# HG changeset patch # User Rik # Date 1372638606 25200 # Node ID cc3743a91652c2a8e321abde8f3a31e8bfbce375 # Parent 011119bf48681afcaf53bba9015a1b67830b701c 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. diff --git a/doc/interpreter/basics.txi b/doc/interpreter/basics.txi --- 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) diff --git a/libgui/src/resource-manager.cc b/libgui/src/resource-manager.cc --- 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 " diff --git a/libinterp/interpfcn/input.cc b/libinterp/interpfcn/input.cc --- 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; diff --git a/scripts/deprecated/module.mk b/scripts/deprecated/module.mk --- 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 \ diff --git a/scripts/deprecated/read_readline_init_file.m b/scripts/deprecated/read_readline_init_file.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 +## . + +## -*- 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 + diff --git a/scripts/startup/main-rcfile b/scripts/startup/main-rcfile --- 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"));