diff options
| author | Stefan Monnier | 2007-11-22 18:03:05 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-11-22 18:03:05 +0000 |
| commit | 2546bcdd94d00d87ea5559cfd93a342b3ad87807 (patch) | |
| tree | 206e15add260c8e27058e74f719cd1a8a399206b | |
| parent | d1a3873fe8d0f068393425456e6e08f60e347970 (diff) | |
| download | emacs-2546bcdd94d00d87ea5559cfd93a342b3ad87807.tar.gz emacs-2546bcdd94d00d87ea5559cfd93a342b3ad87807.zip | |
(byte-compile-file-form-custom-declare-variable): Simplify.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67552437f30..7ecd1b1d981 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-11-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el | ||
| 4 | (byte-compile-file-form-custom-declare-variable): Simplify. | ||
| 5 | |||
| 1 | 2007-11-22 Juanma Barranquero <lekktu@gmail.com> | 6 | 2007-11-22 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * cus-edit.el (custom-mode): Define with `define-derived-mode'. | 8 | * cus-edit.el (custom-mode): Define with `define-derived-mode'. |
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. | |||
| 2277 | (byte-compile-nogroup-warn form)) | 2277 | (byte-compile-nogroup-warn form)) |
| 2278 | (when (byte-compile-warning-enabled-p 'free-vars) | 2278 | (when (byte-compile-warning-enabled-p 'free-vars) |
| 2279 | (push (nth 1 (nth 1 form)) byte-compile-bound-variables)) | 2279 | (push (nth 1 (nth 1 form)) byte-compile-bound-variables)) |
| 2280 | ;; Don't compile the expression because it may be displayed to the user. | ||
| 2281 | ;; (when (eq (car-safe (nth 2 form)) 'quote) | ||
| 2282 | ;; ;; (nth 2 form) is meant to evaluate to an expression, so if we have the | ||
| 2283 | ;; ;; final value already, we can byte-compile it. | ||
| 2284 | ;; (setcar (cdr (nth 2 form)) | ||
| 2285 | ;; (byte-compile-top-level (cadr (nth 2 form)) nil 'file))) | ||
| 2280 | (let ((tail (nthcdr 4 form))) | 2286 | (let ((tail (nthcdr 4 form))) |
| 2281 | (while tail | 2287 | (while tail |
| 2282 | ;; If there are any (function (lambda ...)) expressions, compile | 2288 | (unless (keywordp (car tail)) ;No point optimizing keywords. |
| 2283 | ;; those functions. | 2289 | ;; Compile the keyword arguments. |
| 2284 | (if (and (consp (car tail)) | 2290 | (setcar tail (byte-compile-top-level (car tail) nil 'file))) |
| 2285 | (eq (car (car tail)) 'function) | ||
| 2286 | (consp (nth 1 (car tail)))) | ||
| 2287 | (setcar tail (byte-compile-lambda (nth 1 (car tail)))) | ||
| 2288 | ;; Likewise for a bare lambda. | ||
| 2289 | (if (and (consp (car tail)) | ||
| 2290 | (eq (car (car tail)) 'lambda)) | ||
| 2291 | (setcar tail (byte-compile-lambda (car tail))))) | ||
| 2292 | (setq tail (cdr tail)))) | 2291 | (setq tail (cdr tail)))) |
| 2293 | form) | 2292 | form) |
| 2294 | 2293 | ||