diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-run.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 3168ddb16e5..b44ec68e2bf 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -199,7 +199,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))))) |