diff options
| author | Stefan Monnier | 2012-06-13 09:16:34 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-06-13 09:16:34 -0400 |
| commit | c4c8444a78a7a292331ee9eb6dc1f535f05e6c15 (patch) | |
| tree | 70a067672d9a043a17a69ee0714787e1711bd74a | |
| parent | a12ac9d7951d68282e90fd49f218cc17d5342152 (diff) | |
| download | emacs-c4c8444a78a7a292331ee9eb6dc1f535f05e6c15.tar.gz emacs-c4c8444a78a7a292331ee9eb6dc1f535f05e6c15.zip | |
* lisp/emacs-lisp/byte-opt.el (featurep): Move compiler-macro...
* lisp/emacs-lisp/bytecomp.el (featurep): ...here.
Fixes: debbugs:11692
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 10 |
3 files changed, 13 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ad97e58935..920c9efb874 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-06-13 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-06-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/byte-opt.el (featurep): Move compiler-macro... | ||
| 4 | * emacs-lisp/bytecomp.el (featurep): ...here (bug#11692). | ||
| 5 | |||
| 3 | * emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt | 6 | * emacs-lisp/autoload.el (make-autoload): Accept nil doc-string-elt |
| 4 | (bug#11649). Add cl-defun and cl-defmacro. | 7 | (bug#11649). Add cl-defun and cl-defmacro. |
| 5 | 8 | ||
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index ab0e22fb5ce..92a10dff774 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -1158,16 +1158,6 @@ | |||
| 1158 | ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, | 1158 | ;; optimize string-as-unibyte, string-as-multibyte, string-make-unibyte, |
| 1159 | ;; string-make-multibyte for constant args. | 1159 | ;; string-make-multibyte for constant args. |
| 1160 | 1160 | ||
| 1161 | (put 'featurep 'compiler-macro | ||
| 1162 | (lambda (form &rest _ignore) | ||
| 1163 | ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so | ||
| 1164 | ;; we can safely optimize away this test. | ||
| 1165 | (if (member (cdr-safe form) '(((quote xemacs)) ((quote sxemacs)))) | ||
| 1166 | nil | ||
| 1167 | (if (member (cdr-safe form) '(((quote emacs)))) | ||
| 1168 | t | ||
| 1169 | form)))) | ||
| 1170 | |||
| 1171 | (put 'set 'byte-optimizer 'byte-optimize-set) | 1161 | (put 'set 'byte-optimizer 'byte-optimize-set) |
| 1172 | (defun byte-optimize-set (form) | 1162 | (defun byte-optimize-set (form) |
| 1173 | (let ((var (car-safe (cdr-safe form)))) | 1163 | (let ((var (car-safe (cdr-safe form)))) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index a65a355bfdf..934c0f01fcd 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -4539,6 +4539,16 @@ and corresponding effects." | |||
| 4539 | (setq command-line-args-left (cdr command-line-args-left))) | 4539 | (setq command-line-args-left (cdr command-line-args-left))) |
| 4540 | (kill-emacs 0)) | 4540 | (kill-emacs 0)) |
| 4541 | 4541 | ||
| 4542 | ;;; Core compiler macros. | ||
| 4543 | |||
| 4544 | (put 'featurep 'compiler-macro | ||
| 4545 | (lambda (form feature &rest _ignore) | ||
| 4546 | ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so | ||
| 4547 | ;; we can safely optimize away this test. | ||
| 4548 | (if (member feature '('xemacs 'sxemacs 'emacs)) | ||
| 4549 | (eval form) | ||
| 4550 | form))) | ||
| 4551 | |||
| 4542 | (provide 'byte-compile) | 4552 | (provide 'byte-compile) |
| 4543 | (provide 'bytecomp) | 4553 | (provide 'bytecomp) |
| 4544 | 4554 | ||