Mercurial > emacs
changeset 1532:50af75dfa70a
(byte-compile-lambda):
Don't compile the interactive spec if it is a call to `list'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 31 Oct 1992 09:27:47 +0000 |
parents | 86202f01266d |
children | b86ef0432100 |
files | lisp/emacs-lisp/bytecomp.el |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el Sat Oct 31 05:43:42 1992 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Sat Oct 31 09:27:47 1992 +0000 @@ -1659,12 +1659,19 @@ ;; Skip (interactive) if it is in front (the most usual location). (if (eq int (car body)) (setq body (cdr body))) - (cond ((cdr int) + (cond ((consp (cdr int)) (if (cdr (cdr int)) (byte-compile-warn "malformed interactive spec: %s" (prin1-to-string int))) - (setq int (list 'interactive (byte-compile-top-level - (nth 1 int)))))))) + ;; If the interactive spec is a call to `list', + ;; don't compile it, because `call-interactively' + ;; looks at the args of `list'. + (or (eq (car-safe (nth 1 int)) 'list) + (setq int (list 'interactive + (byte-compile-top-level (nth 1 int)))))) + ((cdr int) + (byte-compile-warn "malformed interactive spec: %s" + (prin1-to-string int)))))) (let ((compiled (byte-compile-top-level (cons 'progn body) nil 'lambda))) (if (and (eq 'byte-code (car-safe compiled)) (byte-compile-version-cond