* lisp/emacs-lisp/bytecomp.el (byte-compile-function-form): Only call
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 23 May 2011 01:15:17 +0000 (22:15 -0300)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 23 May 2011 01:15:17 +0000 (22:15 -0300)
byte-compile-lambda if it's actually a lambda.

lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el

index 726f414..f246b8a 100644 (file)
@@ -1,5 +1,8 @@
 2011-05-23  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * emacs-lisp/bytecomp.el (byte-compile-function-form): Only call
+       byte-compile-lambda if it's actually a lambda.
+
        * emacs-lisp/eieio.el (eieio-defgeneric-form-primary-only-one):
        Fix function quoting.  Use backquote better.
 
index 49b39b6..f0f5912 100644 (file)
@@ -3525,9 +3525,9 @@ discarding."
 ;; and (funcall (function foo)) will lose with autoloads.
 
 (defun byte-compile-function-form (form)
-  (byte-compile-constant (if (symbolp (nth 1 form))
-                             (nth 1 form)
-                           (byte-compile-lambda (nth 1 form)))))
+  (byte-compile-constant (if (eq 'lambda (car-safe (nth 1 form)))
+                             (byte-compile-lambda (nth 1 form))
+                           (nth 1 form))))
 
 (defun byte-compile-indent-to (form)
   (let ((len (length form)))