diff options
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
-rw-r--r-- | lisp/emacs-lisp/byte-run.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 8c16c172bed..8993a8169dd 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -258,6 +258,9 @@ The return value is undefined. (cons 'prog1 (cons def declarations)) def)))))) +(defvar defun-last-function-name nil + "Last function name macroexpanded by `defun'.") + ;; Now that we defined defmacro we can use it! (defmacro defun (name arglist &optional docstring &rest body) "Define NAME as a function. @@ -280,6 +283,7 @@ The return value is undefined. (and (listp arglist) (null (delq t (mapcar #'symbolp arglist))))) (error "Malformed arglist: %s" arglist)) + (setq defun-last-function-name name) (let ((decls (cond ((eq (car-safe docstring) 'declare) (prog1 (cdr docstring) (setq docstring nil))) |