aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRobin Templeton <[email protected]>2014-08-12 07:41:14 -0400
committerRobin Templeton <[email protected]>2015-04-20 00:29:03 -0400
commit07a0b6bb6a7a233906629fa079083709589d2db4 (patch)
tree8921989b3f5027430439b4f5bb236939b3619fd8 /lisp
parente8584a75c8f26ad4d0cd14571e43d708acb39acb (diff)
defun/defmacro autoload generation
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/byte-run.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 68f541af80..6e6cfc7948 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -193,10 +193,11 @@ The return value is undefined.
(message "Warning: Unknown macro property %S in %S"
(car x) name))))
decls)))
- (list 'eval-when '(:compile-toplevel :load-toplevel :execute)
- (if declarations
- (cons 'prog1 (cons def declarations))
- def)))))))
+ (list 'progn
+ (list 'eval-when '(:compile-toplevel :load-toplevel :execute)
+ def
+ (cons 'progn declarations))
+ (list 'quote name)))))))
;; Now that we defined defmacro we can use it!
(defmacro defun (name arglist &optional docstring &rest body)
@@ -243,15 +244,16 @@ The return value is undefined.
(list 'function
(cons 'lambda
(cons arglist body))))))
- (list 'prog1
- (if declarations
- (cons 'prog1 (cons def declarations))
- def)
+ (list 'progn
+ def
+ (cons 'progn declarations)
+ :autoload-end
(list 'funcall
(list '@ '(guile) 'set-procedure-property!)
(list 'symbol-function (list 'quote name))
(list 'quote 'name)
- (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.