aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-01-02 16:43:46 -0800
committerGlenn Morris2013-01-02 16:43:46 -0800
commitad235a8b88e353d6e51dafc62d020d8ff647857f (patch)
treea7748ee7f41afe1909df1e9282ebb8219d34b6e5
parentd8fb8cce84b923a3289b69549e30958710ac3ebb (diff)
downloademacs-ad235a8b88e353d6e51dafc62d020d8ff647857f.tar.gz
emacs-ad235a8b88e353d6e51dafc62d020d8ff647857f.zip
defun fix for cl declarations + interactive forms
* lisp/emacs-lisp/byte-run.el (defun): Place cl declarations after any interactive spec. Fixes: debbugs:13265
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/byte-run.el8
2 files changed, 12 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 35fe446f066..0b92be63916 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-01-03 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp/byte-run.el (defun): Place cl declarations
4 after any interactive spec. (Bug#13265)
5
12012-12-31 Andreas Schwab <schwab@linux-m68k.org> 62012-12-31 Andreas Schwab <schwab@linux-m68k.org>
2 7
3 * emacs-lisp/byte-run.el (defmacro): Use same argument parsing as 8 * emacs-lisp/byte-run.el (defmacro): Use same argument parsing as
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index e3179a66070..7322c0fbe6f 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -195,7 +195,13 @@ The return value is undefined.
195 (memq (car x) ;C.f. cl-do-proclaim. 195 (memq (car x) ;C.f. cl-do-proclaim.
196 '(special inline notinline optimize warn))) 196 '(special inline notinline optimize warn)))
197 (push (list 'declare x) 197 (push (list 'declare x)
198 (if (stringp docstring) (cdr body) body)) 198 (if (stringp docstring)
199 (if (eq (car-safe (cadr body)) 'interactive)
200 (cddr body)
201 (cdr body))
202 (if (eq (car-safe (car body)) 'interactive)
203 (cdr body)
204 body)))
199 nil) 205 nil)
200 (t (message "Warning: Unknown defun property `%S' in %S" 206 (t (message "Warning: Unknown defun property `%S' in %S"
201 (car x) name))))) 207 (car x) name)))))