aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero2004-05-07 00:58:54 +0000
committerJuanma Barranquero2004-05-07 00:58:54 +0000
commit506b775323a723f91ae87e31580d881af3741d66 (patch)
treec00a94d17e81b450a35c1bcd8ac4d0e4906fc6cb /lisp
parent403532ee37ee66147de1de4b1b68c2d73ec803b9 (diff)
downloademacs-506b775323a723f91ae87e31580d881af3741d66.tar.gz
emacs-506b775323a723f91ae87e31580d881af3741d66.zip
(make-obsolete, make-obsolete-variable): Make argument names match their use in
docstring.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 4ed47129fc9..2cd0896c835 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -76,21 +76,21 @@
76 (eval-and-compile 76 (eval-and-compile
77 (put ',name 'byte-optimizer 'byte-compile-inline-expand)))) 77 (put ',name 'byte-optimizer 'byte-compile-inline-expand))))
78 78
79(defun make-obsolete (fn new &optional when) 79(defun make-obsolete (function new &optional when)
80 "Make the byte-compiler warn that FUNCTION is obsolete. 80 "Make the byte-compiler warn that FUNCTION is obsolete.
81The warning will say that NEW should be used instead. 81The warning will say that NEW should be used instead.
82If NEW is a string, that is the `use instead' message. 82If NEW is a string, that is the `use instead' message.
83If provided, WHEN should be a string indicating when the function 83If provided, WHEN should be a string indicating when the function
84was first made obsolete, for example a date or a release number." 84was first made obsolete, for example a date or a release number."
85 (interactive "aMake function obsolete: \nxObsoletion replacement: ") 85 (interactive "aMake function obsolete: \nxObsoletion replacement: ")
86 (let ((handler (get fn 'byte-compile))) 86 (let ((handler (get function 'byte-compile)))
87 (if (eq 'byte-compile-obsolete handler) 87 (if (eq 'byte-compile-obsolete handler)
88 (setq handler (nth 1 (get fn 'byte-obsolete-info))) 88 (setq handler (nth 1 (get function 'byte-obsolete-info)))
89 (put fn 'byte-compile 'byte-compile-obsolete)) 89 (put function 'byte-compile 'byte-compile-obsolete))
90 (put fn 'byte-obsolete-info (list new handler when))) 90 (put function 'byte-obsolete-info (list new handler when)))
91 fn) 91 function)
92 92
93(defun make-obsolete-variable (var new &optional when) 93(defun make-obsolete-variable (variable new &optional when)
94 "Make the byte-compiler warn that VARIABLE is obsolete. 94 "Make the byte-compiler warn that VARIABLE is obsolete.
95The warning will say that NEW should be used instead. 95The warning will say that NEW should be used instead.
96If NEW is a string, that is the `use instead' message. 96If NEW is a string, that is the `use instead' message.
@@ -102,8 +102,8 @@ was first made obsolete, for example a date or a release number."
102 (if (equal str "") (error "")) 102 (if (equal str "") (error ""))
103 (intern str)) 103 (intern str))
104 (car (read-from-string (read-string "Obsoletion replacement: "))))) 104 (car (read-from-string (read-string "Obsoletion replacement: ")))))
105 (put var 'byte-obsolete-variable (cons new when)) 105 (put variable 'byte-obsolete-variable (cons new when))
106 var) 106 variable)
107 107
108(put 'dont-compile 'lisp-indent-hook 0) 108(put 'dont-compile 'lisp-indent-hook 0)
109(defmacro dont-compile (&rest body) 109(defmacro dont-compile (&rest body)