Mercurial > hg > xemacs-beta
comparison lisp/bytecomp-runtime.el @ 991:a28c97bd4634
[xemacs-hg @ 2002-09-03 05:36:51 by scop]
2002-09-02 Ville Skyttä <ville.skytta@xemacs.org>
* bytecomp-runtime.el (make-obsolete): Docstring argument nit.
(make-obsolete-variable): Ditto.
(make-compatible): Ditto.
(make-compatible-variable): Ditto.
author | scop |
---|---|
date | Tue, 03 Sep 2002 05:36:52 +0000 |
parents | 6728e641994e |
children | 0e3842cd22e2 |
comparison
equal
deleted
inserted
replaced
990:4700aface1ab | 991:a28c97bd4634 |
---|---|
91 ; (list 'eval-and-compile | 91 ; (list 'eval-and-compile |
92 ; (list 'put (list 'quote name) | 92 ; (list 'put (list 'quote name) |
93 ; ''byte-optimizer ''byte-compile-inline-expand)))) | 93 ; ''byte-optimizer ''byte-compile-inline-expand)))) |
94 | 94 |
95 (defun make-obsolete (fn new) | 95 (defun make-obsolete (fn new) |
96 "Make the byte-compiler warn that FUNCTION is obsolete. | 96 "Make the byte-compiler warn that function FN is obsolete. |
97 The warning will say that NEW should be used instead. | 97 The warning will say that NEW should be used instead. |
98 If NEW is a string, that is the `use instead' message." | 98 If NEW is a string, that is the `use instead' message." |
99 (interactive "aMake function obsolete: \nxObsoletion replacement: ") | 99 (interactive "aMake function obsolete: \nxObsoletion replacement: ") |
100 (let ((handler (get fn 'byte-compile))) | 100 (let ((handler (get fn 'byte-compile))) |
101 (if (eq 'byte-compile-obsolete handler) | 101 (if (eq 'byte-compile-obsolete handler) |
103 (put fn 'byte-obsolete-info (cons new handler)) | 103 (put fn 'byte-obsolete-info (cons new handler)) |
104 (put fn 'byte-compile 'byte-compile-obsolete))) | 104 (put fn 'byte-compile 'byte-compile-obsolete))) |
105 fn) | 105 fn) |
106 | 106 |
107 (defun make-obsolete-variable (var new) | 107 (defun make-obsolete-variable (var new) |
108 "Make the byte-compiler warn that VARIABLE is obsolete, | 108 "Make the byte-compiler warn that variable VAR is obsolete, |
109 and NEW should be used instead. If NEW is a string, then that is the | 109 and NEW should be used instead. If NEW is a string, then that is the |
110 `use instead' message." | 110 `use instead' message." |
111 (interactive | 111 (interactive |
112 (list | 112 (list |
113 (let ((str (completing-read "Make variable obsolete: " obarray 'boundp t))) | 113 (let ((str (completing-read "Make variable obsolete: " obarray 'boundp t))) |
118 var) | 118 var) |
119 | 119 |
120 ;; By overwhelming demand, we separate out truly obsolete symbols from | 120 ;; By overwhelming demand, we separate out truly obsolete symbols from |
121 ;; those that are present for GNU Emacs compatibility. | 121 ;; those that are present for GNU Emacs compatibility. |
122 (defun make-compatible (fn new) | 122 (defun make-compatible (fn new) |
123 "Make the byte-compiler know that FUNCTION is provided for compatibility. | 123 "Make the byte-compiler know that function FN is provided for compatibility. |
124 The warning will say that NEW should be used instead. | 124 The warning will say that NEW should be used instead. |
125 If NEW is a string, that is the `use instead' message." | 125 If NEW is a string, that is the `use instead' message." |
126 (interactive "aMake function compatible: \nxCompatible replacement: ") | 126 (interactive "aMake function compatible: \nxCompatible replacement: ") |
127 (let ((handler (get fn 'byte-compile))) | 127 (let ((handler (get fn 'byte-compile))) |
128 (if (eq 'byte-compile-compatible handler) | 128 (if (eq 'byte-compile-compatible handler) |
130 (put fn 'byte-compatible-info (cons new handler)) | 130 (put fn 'byte-compatible-info (cons new handler)) |
131 (put fn 'byte-compile 'byte-compile-compatible))) | 131 (put fn 'byte-compile 'byte-compile-compatible))) |
132 fn) | 132 fn) |
133 | 133 |
134 (defun make-compatible-variable (var new) | 134 (defun make-compatible-variable (var new) |
135 "Make the byte-compiler know that VARIABLE is provided for compatibility. | 135 "Make the byte-compiler know that variable VAR is provided for compatibility, |
136 and NEW should be used instead. If NEW is a string, then that is the | 136 and NEW should be used instead. If NEW is a string, then that is the |
137 `use instead' message." | 137 `use instead' message." |
138 (interactive | 138 (interactive |
139 (list | 139 (list |
140 (let ((str (completing-read "Make variable compatible: " | 140 (let ((str (completing-read "Make variable compatible: " |