diff src/load-path.cc @ 7391:f071480b7eac

[project @ 2008-01-17 07:50:33 by jwe]
author jwe
date Thu, 17 Jan 2008 07:50:33 +0000
parents 4ff9611147ba
children 37ff0c21c17d
line wrap: on
line diff
--- a/src/load-path.cc	Wed Jan 16 19:27:21 2008 +0000
+++ b/src/load-path.cc	Thu Jan 17 07:50:33 2008 +0000
@@ -1679,12 +1679,27 @@
   return retval;
 }
 
-DEFUN (pathdef, , ,
+DEFUN (restoredefaultpath, , ,
+    "-*- texinfo -*-\n\
+@deftypefn {Built-in Function} {} restoredefaultpath (@dots{})\n\
+Restore Octave's path to it's initial state at startup.\n\
+\n\
+@seealso{path, addpath, rmpath, genpath, pathdef, savepath, pathsep}\n\
+@end deftypefn")
+{
+  load_path::initialize (true);
+
+  return octave_value (load_path::system_path ());
+}
+
+DEFUN (__pathorig__, , ,
   "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {@var{val} =} pathdef ()\n\
-Return the default list of directories in which to search for function\n\
-files.\n\
-@seealso{path, addpath, rmpath, genpath, savepath, pathsep}\n\
+@deftypefn {Built-in Function} {@var{val} =} __pathorig__ ()\n\
+Return Octave's original default list of directories in which to search\n\
+for function files. This corresponds to the path that exists prior to\n\
+running the system's @file{octaverc}, or the users' @file{~/.octaverc}\n\
+@seealso{path, addpath, rmpath, genpath, savepath, pathsep, \n\
+restoredefaultpath}\n\
 @end deftypefn")
 {
   return octave_value (load_path::system_path ());