diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-11-22 18:03:05 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-11-22 18:03:05 +0000 |
commit | 2546bcdd94d00d87ea5559cfd93a342b3ad87807 (patch) | |
tree | 206e15add260c8e27058e74f719cd1a8a399206b /lisp/emacs-lisp | |
parent | d1a3873fe8d0f068393425456e6e08f60e347970 (diff) | |
download | emacs-2546bcdd94d00d87ea5559cfd93a342b3ad87807.tar.gz emacs-2546bcdd94d00d87ea5559cfd93a342b3ad87807.tar.bz2 emacs-2546bcdd94d00d87ea5559cfd93a342b3ad87807.zip |
(byte-compile-file-form-custom-declare-variable): Simplify.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b40eac3b9d1..7d1b2b94572 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2277,18 +2277,17 @@ list that represents a doc string reference. (byte-compile-nogroup-warn form)) (when (byte-compile-warning-enabled-p 'free-vars) (push (nth 1 (nth 1 form)) byte-compile-bound-variables)) + ;; Don't compile the expression because it may be displayed to the user. + ;; (when (eq (car-safe (nth 2 form)) 'quote) + ;; ;; (nth 2 form) is meant to evaluate to an expression, so if we have the + ;; ;; final value already, we can byte-compile it. + ;; (setcar (cdr (nth 2 form)) + ;; (byte-compile-top-level (cadr (nth 2 form)) nil 'file))) (let ((tail (nthcdr 4 form))) (while tail - ;; If there are any (function (lambda ...)) expressions, compile - ;; those functions. - (if (and (consp (car tail)) - (eq (car (car tail)) 'function) - (consp (nth 1 (car tail)))) - (setcar tail (byte-compile-lambda (nth 1 (car tail)))) - ;; Likewise for a bare lambda. - (if (and (consp (car tail)) - (eq (car (car tail)) 'lambda)) - (setcar tail (byte-compile-lambda (car tail))))) + (unless (keywordp (car tail)) ;No point optimizing keywords. + ;; Compile the keyword arguments. + (setcar tail (byte-compile-top-level (car tail) nil 'file))) (setq tail (cdr tail)))) form) |