]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/bytecomp.el
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 May 2012 02:39:23 +0000 (22:39 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 May 2012 02:39:23 +0000 (22:39 -0400)
(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.
* lisp/custom.el (defcustom): Avoid ((λ ..) ..).

Fixes: debbugs:11391
lisp/ChangeLog
lisp/custom.el
lisp/emacs-lisp/bytecomp.el

index 40df0618c0e37c7036c94fee16a745b0de58f969..69e887f0d19335fa0f6a89605f19ee006315e0e7 100644 (file)
@@ -1,3 +1,11 @@
+2012-05-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * subr.el (read-passwd): Better clean after ourselves (bug#11392).
index 611d5688f3080d19fe9cba291167af21700a8162..d0eadcc23ff1bbb691a324a48c4a464ef07c8b4f 100644 (file)
@@ -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))
index 93c6518d215a607b15a8ee2a8d0a91ae6d799f42..9cb0a376e36be0e4bbd8bbdf1a70037afe52ceb7 100644 (file)
@@ -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)