diff NEWS @ 15427:6823ad7a25b1

implement local option for warnings * error.cc (warning_query): New function. (Fwarning): Handle "local" option when setting warning states. Use warning_query to handle query option. * ov-usr-fcn.cc (octave_usr_function::restore_warning_states): New private function. (octave_usr_function::bind_automatic_vars): Create hidden auto variable .saved_warning_states. (octave_usr_function::do_multi_index_op): Insert pointer to restore_warning_states function in unwind_protect frame. * ov-usr-fcn.h (octave_usr_function::restore_warning_states): Provide decl. * NEWS: Note user visible change.
author John W. Eaton <jwe@octave.org>
date Thu, 20 Sep 2012 12:20:39 -0400
parents 3a33f93c9e62
children 7a0a202fedfe
line wrap: on
line diff
--- a/NEWS	Thu Sep 20 10:14:03 2012 -0400
+++ b/NEWS	Thu Sep 20 12:20:39 2012 -0400
@@ -3,6 +3,17 @@
 
  ** A new GUI is now available with Octave.
 
+ ** Warning states may now be set temporarily, until the end of the
+    current function, using the syntax
+
+      warning STATE ID "local"
+
+    in which STATE may be "on", "off", or "error".  Changes to warning
+    states that are set locally affect the current function and all
+    functions called from the current scope.  The previous warning state
+    is restored on return from the current function.  The "local"
+    option is ignored if used in the top-level workspace.
+
 Summary of important user-visible changes for version 3.8:
 ---------------------------------------------------------