* lisp/emacs-lisp/byte-run.el (defun): Set name after definition.
authorRobin Templeton <robin@terpri.org>
Thu, 20 Mar 2014 05:25:12 +0000 (01:25 -0400)
committerRobin Templeton <robin@terpri.org>
Mon, 9 Feb 2015 18:04:24 +0000 (13:04 -0500)
lisp/emacs-lisp/byte-run.el

index da1a440..077e1dc 100644 (file)
@@ -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))))))
 \f
 ;; Redefined in byte-optimize.el.
 ;; This is not documented--it's not clear that we should promote it.