changeset: 4639:7757334005ae
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jun 06 12:59:31 2009 +0100
files: lisp/ChangeLog lisp/bytecomp.el
description:
bytecomp.el: always check code in (interactive SEXP) for sanity
2009-05-29 Aidan Kehoe <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-lambda):
Even if we are going to store uncompiled interactive forms in the
compiled-function object, byte compile (and discard) the code, for
the sake of the warnings generated.
diff -r 5bbff3553494 -r 7757334005ae lisp/ChangeLog
--- a/lisp/ChangeLog Fri Jun 05 21:48:41 2009 +0900
+++ b/lisp/ChangeLog Sat Jun 06 12:59:31 2009 +0100
@@ -1,3 +1,10 @@
+2009-05-29 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * bytecomp.el (byte-compile-lambda):
+ Even if we are going to store uncompiled interactive forms in the
+ compiled-function object, byte compile (and discard) the code, for
+ the sake of the warnings generated.
+
2009-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.29 "garbanzo" is released.
diff -r 5bbff3553494 -r 7757334005ae lisp/bytecomp.el
--- a/lisp/bytecomp.el Fri Jun 05 21:48:41 2009 +0900
+++ b/lisp/bytecomp.el Sat Jun 06 12:59:31 2009 +0100
@@ -2541,7 +2541,7 @@
;; only if it is not the only element of the body.
(if (cdr body)
(setq body (cdr body))))))
- (int (assq 'interactive body)))
+ (int (assq 'interactive body)) compiled-int)
(dolist (arg arglist)
(cond ((not (symbolp arg))
(byte-compile-warn "non-symbol in arglist: %S" arg))
@@ -2560,9 +2560,11 @@
(if (cdr (cdr int))
(byte-compile-warn "malformed interactive spec: %s"
(prin1-to-string int)))
- ;; If the interactive spec is a call to `list',
- ;; don't compile it, because `call-interactively'
- ;; looks at the args of `list'.
+ ;; If the interactive spec is a call to `list', don't
+ ;; store the compiled form, because `call-interactively'
+ ;; looks at the args of `list' and treats certain
+ ;; functions specially. Compiling it is nonetheless
+ ;; useful for warnings.
(let ((form (nth 1 int)))
(while (or (eq (car-safe form) 'let)
(eq (car-safe form) 'let*)
@@ -2570,9 +2572,10 @@
(while (consp (cdr form))
(setq form (cdr form)))
(setq form (car form)))
+ (setq compiled-int
+ (byte-compile-top-level (nth 1 int)))
(or (eq (car-safe form) 'list)
- (setq int (list 'interactive
- (byte-compile-top-level (nth 1 int)))))))
+ (setq int (list 'interactive compiled-int)))))
((cdr int)
(byte-compile-warn "malformed interactive spec: %s"
(prin1-to-string int))))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches