Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 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 | 6f1d3e86c4fd |
children | 25173c1db5a6 |
comparison
equal
deleted
inserted
replaced
1531:86202f01266d | 1532:50af75dfa70a |
---|---|
1657 (int (assq 'interactive body))) | 1657 (int (assq 'interactive body))) |
1658 (cond (int | 1658 (cond (int |
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 |
1671 byte-compile-compatibility)) | 1678 byte-compile-compatibility)) |
1672 (apply 'make-byte-code | 1679 (apply 'make-byte-code |