Mercurial > hg > octave-lyh
changeset 16879:cc3743a91652
Rename read_readline_init_file to readline_read_init_file.
* libinterp/interpfcn/input.cc(Fread_readline_init_file): Rename function.
* doc/interpreter/basics.txi: Change function name in manual.
* libgui/src/resource-manager.cc: Rename function in function list.
* scripts/startup/main-rcfile: Call readline_read_init_file on startup.
* scripts/deprecated/read_readline_init_file.m: Deprecated function which
calls readline_read_init_file.
* scripts/deprecated/module.mk: Add m-file to build system.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 30 Jun 2013 17:30:06 -0700 |
parents | 011119bf4868 |
children | 1aebb613a5ac |
files | doc/interpreter/basics.txi libgui/src/resource-manager.cc libinterp/interpfcn/input.cc scripts/deprecated/module.mk scripts/deprecated/read_readline_init_file.m scripts/startup/main-rcfile |
diffstat | 6 files changed, 47 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/basics.txi +++ b/doc/interpreter/basics.txi @@ -749,7 +749,7 @@ Octave provides two commands for initializing Readline and thereby changing the command line behavior. -@DOCSTRING(read_readline_init_file) +@DOCSTRING(readline_read_init_file) @DOCSTRING(re_read_readline_init_file)
--- a/libgui/src/resource-manager.cc +++ b/libgui/src/resource-manager.cc @@ -1389,8 +1389,8 @@ "rcond " "rdivide " "re_read_readline_init_file " - "read_readline_init_file " "readdir " + "readline_read_init_file " "readlink " "real " "reallog "
--- a/libinterp/interpfcn/input.cc +++ b/libinterp/interpfcn/input.cc @@ -1065,9 +1065,9 @@ return retval; } -DEFUN (read_readline_init_file, args, , +DEFUN (readline_read_init_file, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} read_readline_init_file (@var{file})\n\ +@deftypefn {Built-in Function} {} readline_read_init_file (@var{file})\n\ Read the readline library initialization file @var{file}. If\n\ @var{file} is omitted, read the default initialization file (normally\n\ @file{~/.inputrc}).\n\ @@ -1101,6 +1101,7 @@ Re-read the last readline library initialization file that was read.\n\ @xref{Readline Init File, , , readline, GNU Readline Library},\n\ for details.\n\ +@seealso{readline_read_init_file}\n\ @end deftypefn") { octave_value_list retval;
--- a/scripts/deprecated/module.mk +++ b/scripts/deprecated/module.mk @@ -19,6 +19,7 @@ deprecated/javafields.m \ deprecated/javamethods.m \ deprecated/polyderiv.m \ + deprecated/read_readline_init_file.m \ deprecated/saving_history.m \ deprecated/shell_cmd.m \ deprecated/studentize.m \
new file mode 100644 --- /dev/null +++ b/scripts/deprecated/read_readline_init_file.m @@ -0,0 +1,40 @@ +## Copyright (C) 2013 Rik Wehbring +## +## This file is part of Octave. +## +## Octave is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or (at +## your option) any later version. +## +## Octave is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Octave; see the file COPYING. If not, see +## <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Built-in Function} {} read_readline_init_file (@var{file}) +## This function has been deprecated. Use +## @code{@file{readline_read_init_file}} instead. +## @seealso{readline_read_init_file} +## @end deftypefn + +## Deprecated in 3.8 + +function read_readline_init_file (varargin) + + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "read_readline_init_file is obsolete and will be removed from a future version of Octave, please use readline_read_init_file instead"); + endif + + readline_read_init_file (varargin{:}); + +endfunction +
--- a/scripts/startup/main-rcfile +++ b/scripts/startup/main-rcfile @@ -6,7 +6,7 @@ ## Configure readline using the file inputrc in the Octave startup ## directory. -read_readline_init_file (sprintf ("%s%s%s", +readline_read_init_file (sprintf ("%s%s%s", octave_config_info ("startupfiledir"), filesep, "inputrc"));