1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00: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>
* 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.
'(special inline notinline optimize warn)))
(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)
(t (message "Warning: Unknown defun property `%S' in %S"
(car x) name)))))