From ad235a8b88e353d6e51dafc62d020d8ff647857f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 2 Jan 2013 16:43:46 -0800 Subject: defun fix for cl declarations + interactive forms * lisp/emacs-lisp/byte-run.el (defun): Place cl declarations after any interactive spec. Fixes: debbugs:13265 --- lisp/emacs-lisp/byte-run.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') 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. (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))))) -- cgit v1.2.3