changeset 31446:59cb8ecf9b5c

maint: merge stable to default
author Rik <rik@octave.org>
date Tue, 15 Nov 2022 18:38:26 -0800
parents c17155495497 (current diff) 0924234dd747 (diff)
children 903fac22b29d
files
diffstat 3 files changed, 20 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS.8.md	Tue Nov 15 15:22:23 2022 -0800
+++ b/etc/NEWS.8.md	Tue Nov 15 18:38:26 2022 -0800
@@ -135,7 +135,6 @@
   storage.  This setting was `false` by default for compatibility with
   Matlab.  Now you must manually convert to full storage when desired.
 
-
 - Properties
 
   The following property names are discouraged, but there is no fixed
--- a/scripts/deprecated/sparse_auto_mutate.m	Tue Nov 15 15:22:23 2022 -0800
+++ b/scripts/deprecated/sparse_auto_mutate.m	Tue Nov 15 18:38:26 2022 -0800
@@ -29,18 +29,15 @@
 ## @deftypefnx {} {@var{old_val} =} sparse_auto_mutate (@var{new_val}, "local")
 ##
 ## @code{sparse_auto_mutate} is deprecated and will be removed in Octave
-## version 9.  Use @code{optimize_diagonal_matrix} instead.
-##
-## Query or set whether storing diagonal matrices in a special space-efficient
-## format is disabled.
+## version 10.
 ##
-## The default value is false.  If this option is set to true, Octave will
-## store ranges as full matrices.
-##
-## When called from inside a function with the @qcode{"local"} option, the
-## setting is changed locally for the function and any subroutines it calls.
-## The original setting is restored when exiting the function.
-## @seealso{sparse_auto_mutate, disable_permutation_matrix}
+## The @code{sparse_auto_mutate} function no longer has any effect on Octave's
+## behavior.  Previously, after calling @code{sparse_auto_mutate (true)},
+## Octave would automatically convert sparse matrices to full when a sparse
+## matrix required more memory than simply using full matrix storage.  This
+## setting was false by default for compatibility with @sc{matlab}.  Now you
+## must manually convert to full storage when desired (use @code{full}).
+## @seealso{full}
 ## @end deftypefn
 
 ## FIXME: DEPRECATED: Remove in version 10.
@@ -55,8 +52,7 @@
   endif
 
   if (nargin == 0 || nargout > 0)
-    ## Always false now.
-    retval = false;
+    retval = false;  # Always false now.
     return;
   endif
 
@@ -67,9 +63,7 @@
     nargin = 1;
   endif
 
-  ## Don't bother warning that "local" is invalid outside of a
-  ## function.
-
+  ## Don't bother warning that "local" is invalid outside of a function.
   if (nargin > 1)
     print_usage ();
   endif
--- a/scripts/help/which.m	Tue Nov 15 15:22:23 2022 -0800
+++ b/scripts/help/which.m	Tue Nov 15 18:38:26 2022 -0800
@@ -38,6 +38,15 @@
     print_usage ();
   endif
 
+  ## FIXME: "-all" option not implemented.  Warn user that only the first
+  ##        result found will be returned.  See bug #32088.
+  if (any (isall = strcmpi (varargin, "-all")))
+    warning (["which: '-all' not yet implemented - only the first result ", ...
+             "will be returned\n"]);
+    varargin = varargin(! isall);
+    nargin = nargin - sum (isall);
+  endif
+
   m = __which__ (varargin{:});
 
   ## Check whether each name is a variable, variables take precedence over
@@ -113,4 +122,5 @@
 
 %!error <Invalid call> which ()
 %!error <Invalid call> which (1)
+%!warning <'-all' not yet implemented> which ("1", "-all")