# HG changeset patch # User scop # Date 1103307107 0 # Node ID 0e3842cd22e219234548651069dd09490974f060 # Parent 5e53a2606f1647612298669bc27821e52639d7d7 [xemacs-hg @ 2004-12-17 18:11:26 by scop] Add 3rd arg to make-obsolete(-variable) <1103137950.3587.138.camel@bobcat.mine.nu> diff -r 5e53a2606f16 -r 0e3842cd22e2 lisp/ChangeLog --- 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ä + + * 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 * gnuserv.el (gnuserv-edit-files): Improve docstring. diff -r 5e53a2606f16 -r 0e3842cd22e2 lisp/bytecomp-runtime.el --- 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))) diff -r 5e53a2606f16 -r 0e3842cd22e2 man/ChangeLog --- 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ä + + * lispref/help.texi: Document 3rd arg to `make-obsolete'. + 2004-12-15 Robert Delius Royar * internals/internals.texi (Modules for the Basic Displayable Lisp diff -r 5e53a2606f16 -r 0e3842cd22e2 man/lispref/help.texi --- 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