Mercurial > hg > xemacs-beta
changeset 2444:0e3842cd22e2
[xemacs-hg @ 2004-12-17 18:11:26 by scop]
Add 3rd arg to make-obsolete(-variable) <1103137950.3587.138.camel@bobcat.mine.nu>
author | scop |
---|---|
date | Fri, 17 Dec 2004 18:11:47 +0000 |
parents | 5e53a2606f16 |
children | d7784f613f0b |
files | lisp/ChangeLog lisp/bytecomp-runtime.el man/ChangeLog man/lispref/help.texi |
diffstat | 4 files changed, 22 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Dec 16 22:53:17 2004 +0000 +++ b/lisp/ChangeLog Fri Dec 17 18:11:47 2004 +0000 @@ -1,3 +1,9 @@ +2004-12-15 Ville Skyttä <scop@xemacs.org> + + * bytecomp-runtime.el (make-obsolete): Add 3rd argument (no-op for + now) for GNU Emacs compatibility. + (make-obsolete-variable): Ditto. + 2004-11-16 Stephen J. Turnbull <stephen@xemacs.org> * gnuserv.el (gnuserv-edit-files): Improve docstring.
--- a/lisp/bytecomp-runtime.el Thu Dec 16 22:53:17 2004 +0000 +++ b/lisp/bytecomp-runtime.el Fri Dec 17 18:11:47 2004 +0000 @@ -92,10 +92,12 @@ ; (list 'put (list 'quote name) ; ''byte-optimizer ''byte-compile-inline-expand)))) -(defun make-obsolete (fn new) +(defun make-obsolete (fn new &optional when) "Make the byte-compiler warn that function FN is obsolete. The warning will say that NEW should be used instead. -If NEW is a string, that is the `use instead' message." +If NEW is a string, that is the `use instead' message. +If provided, WHEN should be a string indicating when the function +was first made obsolete, for example a date or a release number." (interactive "aMake function obsolete: \nxObsoletion replacement: ") (let ((handler (get fn 'byte-compile))) (if (eq 'byte-compile-obsolete handler) @@ -104,10 +106,12 @@ (put fn 'byte-compile 'byte-compile-obsolete))) fn) -(defun make-obsolete-variable (var new) +(defun make-obsolete-variable (var new &optional when) "Make the byte-compiler warn that variable VAR is obsolete, and NEW should be used instead. If NEW is a string, then that is the -`use instead' message." +`use instead' message. +If provided, WHEN should be a string indicating when the variable +was first made obsolete, for example a date or a release number." (interactive (list (let ((str (completing-read "Make variable obsolete: " obarray 'boundp t)))
--- a/man/ChangeLog Thu Dec 16 22:53:17 2004 +0000 +++ b/man/ChangeLog Fri Dec 17 18:11:47 2004 +0000 @@ -1,3 +1,7 @@ +2004-12-15 Ville Skyttä <scop@xemacs.org> + + * lispref/help.texi: Document 3rd arg to `make-obsolete'. + 2004-12-15 Robert Delius Royar <xemacs@frinabulax.org> * internals/internals.texi (Modules for the Basic Displayable Lisp
--- a/man/lispref/help.texi Thu Dec 16 22:53:17 2004 +0000 +++ b/man/lispref/help.texi Fri Dec 17 18:11:47 2004 +0000 @@ -676,7 +676,7 @@ XEmacs Lisp lets you mark a function or variable as @dfn{obsolete}, and indicate what should be used instead. -@deffn Command make-obsolete function new +@deffn Command make-obsolete function new &optional when This function indicates that @var{function} is an obsolete function, and the function @var{new} should be used instead. The byte compiler will issue a warning to this effect when it encounters a usage of the @@ -684,7 +684,9 @@ documentation. @var{new} can also be a string (if there is not a single function with the same functionality any more), and should be a descriptive statement, such as "use @var{foo} or @var{bar} instead" or "this function is -unnecessary". +unnecessary". If provided, @var{when} should be a string indicating when +the function was first made obsolete, for example a date or a release +number. @end deffn @deffn Command make-obsolete-variable variable new