aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2017-12-15 16:22:25 -0500
committerGlenn Morris2017-12-15 16:22:25 -0500
commit5e6fb1e246b1e7f44ebba48e7e24f597a8eb92dd (patch)
tree6b7a7374b7899aeeccc4ced74e1148cc6225a9e6
parent6c301afa70f6eac32ad1ce92412ea3cf6fcdeeca (diff)
downloademacs-5e6fb1e246b1e7f44ebba48e7e24f597a8eb92dd.tar.gz
emacs-5e6fb1e246b1e7f44ebba48e7e24f597a8eb92dd.zip
Automatically evaluate top-level define-obsolete-function-alias etc
* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-make-obsolete): New handler.
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 995fb05eac8..c898305d916 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2486,6 +2486,12 @@ list that represents a doc string reference.
2486 (mapc 'byte-compile-file-form (cdr form)) 2486 (mapc 'byte-compile-file-form (cdr form))
2487 nil)) 2487 nil))
2488 2488
2489;; Automatically evaluate define-obsolete-function-alias etc at top-level.
2490(put 'make-obsolete 'byte-hunk-handler 'byte-compile-file-form-make-obsolete)
2491(defun byte-compile-file-form-make-obsolete (form)
2492 (prog1 (byte-compile-keep-pending form)
2493 (apply 'make-obsolete (mapcar 'eval (cdr form)))))
2494
2489;; This handler is not necessary, but it makes the output from dont-compile 2495;; This handler is not necessary, but it makes the output from dont-compile
2490;; and similar macros cleaner. 2496;; and similar macros cleaner.
2491(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval) 2497(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval)