Mercurial > hg > xemacs-beta
diff lisp/bytecomp-runtime.el @ 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 | a28c97bd4634 |
children | 018e13fdeaeb |
line wrap: on
line diff
--- 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)))