1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

defun fix for cl declarations + interactive forms

* lisp/emacs-lisp/byte-run.el (defun):
Place cl declarations after any interactive spec.

Fixes: debbugs:13265
This commit is contained in:
Glenn Morris 2013-01-02 16:43:46 -08:00
parent d8fb8cce84
commit ad235a8b88
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-01-03 Glenn Morris <rgm@gnu.org>
* emacs-lisp/byte-run.el (defun): Place cl declarations
after any interactive spec. (Bug#13265)
2012-12-31 Andreas Schwab <schwab@linux-m68k.org> 2012-12-31 Andreas Schwab <schwab@linux-m68k.org>
* emacs-lisp/byte-run.el (defmacro): Use same argument parsing as * emacs-lisp/byte-run.el (defmacro): Use same argument parsing as

View file

@ -195,7 +195,13 @@ The return value is undefined.
(memq (car x) ;C.f. cl-do-proclaim. (memq (car x) ;C.f. cl-do-proclaim.
'(special inline notinline optimize warn))) '(special inline notinline optimize warn)))
(push (list 'declare x) (push (list 'declare x)
(if (stringp docstring) (cdr body) body)) (if (stringp docstring)
(if (eq (car-safe (cadr body)) 'interactive)
(cddr body)
(cdr body))
(if (eq (car-safe (car body)) 'interactive)
(cdr body)
body)))
nil) nil)
(t (message "Warning: Unknown defun property `%S' in %S" (t (message "Warning: Unknown defun property `%S' in %S"
(car x) name))))) (car x) name)))))