aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/bytecomp.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index a337c7d8d97..a981a3cf033 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1659,12 +1659,19 @@ If FORM is a lambda or a macro, byte-compile it as a function."
1659 ;; Skip (interactive) if it is in front (the most usual location). 1659 ;; Skip (interactive) if it is in front (the most usual location).
1660 (if (eq int (car body)) 1660 (if (eq int (car body))
1661 (setq body (cdr body))) 1661 (setq body (cdr body)))
1662 (cond ((cdr int) 1662 (cond ((consp (cdr int))
1663 (if (cdr (cdr int)) 1663 (if (cdr (cdr int))
1664 (byte-compile-warn "malformed interactive spec: %s" 1664 (byte-compile-warn "malformed interactive spec: %s"
1665 (prin1-to-string int))) 1665 (prin1-to-string int)))
1666 (setq int (list 'interactive (byte-compile-top-level 1666 ;; If the interactive spec is a call to `list',
1667 (nth 1 int)))))))) 1667 ;; don't compile it, because `call-interactively'
1668 ;; looks at the args of `list'.
1669 (or (eq (car-safe (nth 1 int)) 'list)
1670 (setq int (list 'interactive
1671 (byte-compile-top-level (nth 1 int))))))
1672 ((cdr int)
1673 (byte-compile-warn "malformed interactive spec: %s"
1674 (prin1-to-string int))))))
1668 (let ((compiled (byte-compile-top-level (cons 'progn body) nil 'lambda))) 1675 (let ((compiled (byte-compile-top-level (cons 'progn body) nil 'lambda)))
1669 (if (and (eq 'byte-code (car-safe compiled)) 1676 (if (and (eq 'byte-code (car-safe compiled))
1670 (byte-compile-version-cond 1677 (byte-compile-version-cond