summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-run.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-06-02 00:42:55 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-06-02 00:42:55 -0700
commitaf3c30cb283811135d9a1136fa5072e6922410a9 (patch)
tree46c7ba217ef48f4951f6cb9ec8594d4169f6dfdc /lisp/emacs-lisp/byte-run.el
parent3870d916919d4ac5d052698e7ac61a04ad0beb94 (diff)
parent7d5200893a8cc980744bb4c65355df5a936388bb (diff)
downloademacs-af3c30cb283811135d9a1136fa5072e6922410a9.tar.gz
emacs-af3c30cb283811135d9a1136fa5072e6922410a9.tar.bz2
emacs-af3c30cb283811135d9a1136fa5072e6922410a9.zip
Merge from trunk.
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
-rw-r--r--lisp/emacs-lisp/byte-run.el26
1 files changed, 10 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index c76cdffd62f..f79add14836 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -120,13 +120,13 @@ convention was modified."
The warning will say that CURRENT-NAME should be used instead.
If CURRENT-NAME is a string, that is the `use instead' message
\(it should end with a period, and not start with a capital).
-If provided, WHEN should be a string indicating when the function
+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: ")
(put obsolete-name 'byte-obsolete-info
;; The second entry used to hold the `byte-compile' handler, but
;; is not used any more nowadays.
- (list (purecopy current-name) nil (purecopy when)))
+ (purecopy (list current-name nil when)))
obsolete-name)
(set-advertised-calling-convention
;; New code should always provide the `when' argument.
@@ -153,27 +153,21 @@ See the docstrings of `defalias' and `make-obsolete' for more details."
'define-obsolete-function-alias
'(obsolete-name current-name when &optional docstring) "23.1")
-(defun make-obsolete-variable (obsolete-name current-name &optional when)
+(defun make-obsolete-variable (obsolete-name current-name &optional when access-type)
"Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
The warning will say that CURRENT-NAME should be used instead.
If CURRENT-NAME is a string, that is the `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)))
- (if (equal str "") (error ""))
- (intern str))
- (car (read-from-string (read-string "Obsoletion replacement: ")))))
+WHEN should be a string indicating when the variable
+was first made obsolete, for example a date or a release number.
+ACCESS-TYPE if non-nil should specify the kind of access that will trigger
+ obsolescence warnings; it can be either `get' or `set'."
(put obsolete-name 'byte-obsolete-variable
- (cons
- (if (stringp current-name)
- (purecopy current-name)
- current-name) (purecopy when)))
+ (purecopy (list current-name access-type when)))
obsolete-name)
(set-advertised-calling-convention
;; New code should always provide the `when' argument.
- 'make-obsolete-variable '(obsolete-name current-name when) "23.1")
+ 'make-obsolete-variable
+ '(obsolete-name current-name when &optional access-type) "23.1")
(defmacro define-obsolete-variable-alias (obsolete-name current-name
&optional when docstring)