From c7f6a5e8fd9128a66bbbb4a79d872747e08c8166 Mon Sep 17 00:00:00 2001 From: Robin Templeton Date: Thu, 20 Mar 2014 01:25:12 -0400 Subject: [PATCH] * lisp/emacs-lisp/byte-run.el (defun): Set name after definition. --- lisp/emacs-lisp/byte-run.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index da1a44059f..077e1dc7fc 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -193,9 +193,9 @@ The return value is undefined. (message "Warning: Unknown macro property %S in %S" (car x) name)))) decls))) - (if declarations - (cons 'prog1 (cons def declarations)) - def)))))) + (if declarations + (cons 'prog1 (cons def declarations)) + def)))))) ;; Now that we defined defmacro we can use it! (defmacro defun (name arglist &optional docstring &rest body) @@ -249,10 +249,15 @@ The return value is undefined. (list 'function (cons 'lambda (cons arglist body)))))) - (if declarations - (cons 'prog1 (cons def declarations)) - def)))) - + (list 'prog1 + (if declarations + (cons 'prog1 (cons def declarations)) + def) + (list 'funcall + (list '@ '(guile) 'set-procedure-property!) + (list 'symbol-function (list 'quote name)) + (list 'quote 'name) + (list 'quote name)))))) ;; Redefined in byte-optimize.el. ;; This is not documented--it's not clear that we should promote it. -- 2.20.1