mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* lisp/emacs-lisp/byte-opt.el (featurep): Move compiler-macro...
* lisp/emacs-lisp/bytecomp.el (featurep): ...here. Fixes: debbugs:11692
This commit is contained in:
parent
a12ac9d795
commit
c4c8444a78
3 changed files with 13 additions and 10 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2012-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/byte-opt.el (featurep): Move compiler-macro...
|
||||
* emacs-lisp/bytecomp.el (featurep): ...here (bug#11692).
|
||||
|
||||
* emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt
|
||||
(bug#11649). Add cl-defun and cl-defmacro.
|
||||
|
||||
|
|
|
|||
|
|
@ -1158,16 +1158,6 @@
|
|||
;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte,
|
||||
;; string-make-multibyte for constant args.
|
||||
|
||||
(put 'featurep 'compiler-macro
|
||||
(lambda (form &rest _ignore)
|
||||
;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so
|
||||
;; we can safely optimize away this test.
|
||||
(if (member (cdr-safe form) '(((quote xemacs)) ((quote sxemacs))))
|
||||
nil
|
||||
(if (member (cdr-safe form) '(((quote emacs))))
|
||||
t
|
||||
form))))
|
||||
|
||||
(put 'set 'byte-optimizer 'byte-optimize-set)
|
||||
(defun byte-optimize-set (form)
|
||||
(let ((var (car-safe (cdr-safe form))))
|
||||
|
|
|
|||
|
|
@ -4539,6 +4539,16 @@ and corresponding effects."
|
|||
(setq command-line-args-left (cdr command-line-args-left)))
|
||||
(kill-emacs 0))
|
||||
|
||||
;;; Core compiler macros.
|
||||
|
||||
(put 'featurep 'compiler-macro
|
||||
(lambda (form feature &rest _ignore)
|
||||
;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so
|
||||
;; we can safely optimize away this test.
|
||||
(if (member feature '('xemacs 'sxemacs 'emacs))
|
||||
(eval form)
|
||||
form)))
|
||||
|
||||
(provide 'byte-compile)
|
||||
(provide 'bytecomp)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue