From 2bd785a208c84e7ae73884d09a1087da52780b4a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 2 May 2012 22:39:23 -0400 Subject: [PATCH] =?utf8?q?*=20lisp/emacs-lisp/bytecomp.el=20(byte-compile-?= =?utf8?q?file-form-custom-declare-variable):=20Compile=20all=20elements,?= =?utf8?q?=20since=20cconv.el=20might=20have=20introduced=20:fun-body,=20i?= =?utf8?q?nternal-make-closure,=20and=20friends=20for=20bytecomp=20to=20ha?= =?utf8?q?ndle.=20*=20lisp/custom.el=20(defcustom):=20Avoid=20((=CE=BB=20.?= =?utf8?q?.)=20..).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: debbugs:11391 --- lisp/ChangeLog | 8 ++++++++ lisp/custom.el | 2 +- lisp/emacs-lisp/bytecomp.el | 14 +------------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 40df0618c0e..69e887f0d19 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2012-05-03 Stefan Monnier + + * emacs-lisp/bytecomp.el + (byte-compile-file-form-custom-declare-variable): Compile all elements, + since cconv.el might have introduced :fun-body, internal-make-closure, + and friends for bytecomp to handle (bug#11391). + * custom.el (defcustom): Avoid ((λ ..) ..). + 2012-05-02 Stefan Monnier * subr.el (read-passwd): Better clean after ourselves (bug#11392). diff --git a/lisp/custom.el b/lisp/custom.el index 611d5688f30..d0eadcc23ff 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -335,7 +335,7 @@ for more information." ;; expression is checked by the byte-compiler, and that ;; lexical-binding is obeyed, so quote the expression with ;; `lambda' rather than with `quote'. - `(list (lambda () ,standard)) + ``(funcall #',(lambda () ,standard)) `',standard) ,doc ,@args)) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 93c6518d215..9cb0a376e36 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2267,19 +2267,7 @@ list that represents a doc string reference. (when (byte-compile-warning-enabled-p 'callargs) (byte-compile-nogroup-warn form)) (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 - (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) + (byte-compile-keep-pending form)) (put 'require 'byte-hunk-handler 'byte-compile-file-form-require) (defun byte-compile-file-form-require (form) -- 2.11.4.GIT