]> git.eshelyaron.com Git - emacs.git/commitdiff
defun fix for cl declarations + interactive forms
authorGlenn Morris <rgm@gnu.org>
Thu, 3 Jan 2013 00:43:46 +0000 (16:43 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 3 Jan 2013 00:43:46 +0000 (16:43 -0800)
* lisp/emacs-lisp/byte-run.el (defun):
Place cl declarations after any interactive spec.

Fixes: debbugs:13265
lisp/ChangeLog
lisp/emacs-lisp/byte-run.el

index 35fe446f066f2d04b3e0f48d311ebb8f622a3219..0b92be639167be4981eeeef6ac0adccc352cf1ad 100644 (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
index e3179a660709e5320da7541b09db6f28ef61c29c..7322c0fbe6f9ccb43d3feea4b264c64ffa47c5f7 100644 (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)))))