changeset 19388:93f7f4d074b1

Deprecate dump_prefs.m * NEWS: Announce deprecation. * scripts/deprecated/dump_prefs.m: Function moved from miscellaneous/. Adding warning to docstring and to code. * scripts/deprecated/module.mk: Add new dump_prefs.m to build system. * scripts/miscellaneous/module.mk: Remove old dump_prefs.m from build system.
author Rik <rik@octave.org>
date Tue, 30 Sep 2014 15:23:59 -0700
parents 23519ad614da
children 09bc8304f182
files NEWS scripts/deprecated/dump_prefs.m scripts/deprecated/module.mk scripts/miscellaneous/dump_prefs.m scripts/miscellaneous/module.mk
diffstat 4 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS
+++ b/NEWS
@@ -116,6 +116,7 @@
       -------------------|------------------
       bicubic            | interp2
       delaunay3          | delaunay
+      dump_prefs         | individual preference get/set routines
       find_dir_in_path   | dir_in_loadpath
       finite             | isfinite
       fmod               | rem
rename from scripts/miscellaneous/dump_prefs.m
rename to scripts/deprecated/dump_prefs.m
--- a/scripts/miscellaneous/dump_prefs.m
+++ b/scripts/deprecated/dump_prefs.m
@@ -19,6 +19,10 @@
 ## -*- texinfo -*-
 ## @deftypefn  {Function File} {} dump_prefs ()
 ## @deftypefnx {Function File} {} dump_prefs (@var{fid})
+##
+## @code{dump_prefs} is deprecated and will be removed in Octave version 4.6.
+## Please use individual preference get/set routines in all new code.
+##
 ## Dump the current settings of all user preferences to stdout in a format that
 ## can be parsed by Octave later.
 ##
@@ -31,6 +35,13 @@
 
 function dump_prefs (fid)
 
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "dump_prefs is obsolete and will be removed from a future version of Octave, recode using individual preference get/set routines");
+  endif
+
   if (nargin > 1)
     print_usage ();
   endif
--- a/scripts/deprecated/module.mk
+++ b/scripts/deprecated/module.mk
@@ -3,6 +3,7 @@
 deprecated_FCN_FILES = \
   deprecated/bicubic.m \
   deprecated/delaunay3.m \
+  deprecated/dump_prefs.m \
   deprecated/find_dir_in_path.m \
   deprecated/finite.m \
   deprecated/fmod.m \
--- a/scripts/miscellaneous/module.mk
+++ b/scripts/miscellaneous/module.mk
@@ -21,7 +21,6 @@
   miscellaneous/desktop.m \
   miscellaneous/dir.m \
   miscellaneous/dos.m \
-  miscellaneous/dump_prefs.m \
   miscellaneous/edit.m \
   miscellaneous/error_ids.m \
   miscellaneous/fact.m \