X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fbytecomp-runtime.el;h=7c198d837bf5b988ee0b7a11c33fbf59f2efdc00;hp=adbc4e1e5cf431c8d6289ce7112f9ed4a97a264e;hb=ee38d21b330f5001b47a577cefb5ba7b82a3b7d3;hpb=79d2db7d65205bc85d471590726d0cf3af5598e0 diff --git a/lisp/bytecomp-runtime.el b/lisp/bytecomp-runtime.el index adbc4e1..7c198d8 100644 --- a/lisp/bytecomp-runtime.el +++ b/lisp/bytecomp-runtime.el @@ -91,10 +91,12 @@ They will only be compiled open-coded when `byte-optimize' is true." ; (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) @@ -103,10 +105,12 @@ If NEW is a string, that is the `use instead' message." (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)))