# HG changeset patch # User Rik # Date 1350316229 25200 # Node ID ae43fc2ddcacf2cfdc19589570e356f841d491b4 # Parent bf466a60651f6cfc6759b87b25aacff8a874fe91# Parent 15628a84a4faeeb676d80a4ca1a60868073de0b0 maint: Merge stable to default to pick up documentation fix for warning ids. diff -r bf466a60651f -r ae43fc2ddcac doc/interpreter/errors.txi --- a/doc/interpreter/errors.txi Mon Oct 15 08:40:01 2012 -0400 +++ b/doc/interpreter/errors.txi Mon Oct 15 08:50:29 2012 -0700 @@ -296,7 +296,10 @@ If a warning has such an ID the user can enable and disable this warning as will be described in the next section. To assign an ID to a warning, simply call @code{warning} with two string arguments, where the first -is the identification string, and the second is the actual warning. +is the identification string, and the second is the actual warning. Note +that warning IDs are in the format "NAMESPACE:WARNING-NAME". The namespace +"Octave" is used for Octave's own warnings. Any other string is available +as a namespace for user's own warnings. @DOCSTRING(warning) @@ -315,7 +318,7 @@ @example @group -warning ("non-negative-variable", +warning ("example:non-negative-variable", "'a' must be non-negative. Setting 'a' to zero."); @end group @end example @@ -325,8 +328,8 @@ @example @group -warning ("off", "non-negative-variable"); -warning ("non-negative-variable", +warning ("off", "example:non-negative-variable"); +warning ("example:non-negative-variable", "'a' must be non-negative. Setting 'a' to zero."); @end group @end example diff -r bf466a60651f -r ae43fc2ddcac libinterp/interpfcn/error.cc --- a/libinterp/interpfcn/error.cc Mon Oct 15 08:40:01 2012 -0400 +++ b/libinterp/interpfcn/error.cc Mon Oct 15 08:50:29 2012 -0700 @@ -1213,8 +1213,10 @@ to go on.\n\ \n\ The optional message identifier allows users to enable or disable\n\ -warnings tagged by @var{id}. The special identifier @samp{\"all\"} may\n\ -be used to set the state of all warnings.\n\ +warnings tagged by @var{id}. A message identifier is of the form\n\ +\"NAMESPACE:WARNING-NAME\". Octave's own warnings use the \"Octave\"\n\ +namespace (@pxref{doc-warning_ids}). The special identifier @samp{\"all\"}\n\ +may be used to set the state of all warnings.\n\ \n\ If the first argument is @samp{\"on\"} or @samp{\"off\"}, set the state\n\ of a particular warning using the identifier @var{id}. If the first\n\