aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRobin Templeton <[email protected]>2014-03-20 01:25:12 -0400
committerRobin Templeton <[email protected]>2015-04-20 00:29:01 -0400
commitc7f6a5e8fd9128a66bbbb4a79d872747e08c8166 (patch)
tree117967de462b7fd1e54390f088327b5719d873d5 /lisp
parent943a56c7b3c7ccc192adb371e9d47bc568d15576 (diff)
* lisp/emacs-lisp/byte-run.el (defun): Set name after definition.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el19
1 files 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.