[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compilation of `interactive'
From: |
Dave Love |
Subject: |
compilation of `interactive' |
Date: |
Mon, 05 Jan 2004 14:53:25 +0000 |
User-agent: |
Gnus/5.1005 (Gnus v5.10.5) Emacs/21.2 (gnu/linux) |
The current compiler won't warn if you do something bogus inside
`interactive', like calling an XEmacs-specific function (the case in
point). Here's a fix.
Index: bytecomp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.139
diff -u -p -c -r2.139 bytecomp.el
cvs server: conflicting specifications of output style
*** bytecomp.el 22 Sep 2003 15:16:10 -0000 2.139
--- bytecomp.el 26 Nov 2003 19:31:56 -0000
*************** if you change this variable."
*************** If FORM is a lambda or a macro, byte-com
*** 2453,2469 ****
(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'.
(let ((form (nth 1 int)))
(while (memq (car-safe form) '(let let* progn save-excursion))
(while (consp (cdr form))
(setq form (cdr form)))
(setq form (car form)))
! (or (eq (car-safe form) '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)))))
--- 2459,2477 ----
(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'. Actually, compile it to get warnings,
! ;; but don't use the result.
(let ((form (nth 1 int)))
(while (memq (car-safe form) '(let let* progn save-excursion))
(while (consp (cdr form))
(setq form (cdr form)))
(setq form (car form)))
! (if (eq (car-safe form) 'list)
! (byte-compile-top-level (nth 1 int))
! (setq int (list 'interactive
! (byte-compile-top-level (nth 1 int)))))))
((cdr int)
(byte-compile-warn "malformed interactive spec: %s"
(prin1-to-string int)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- compilation of `interactive',
Dave Love <=