diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-09-22 09:47:47 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2014-09-22 09:47:47 -0400 |
commit | 55fa245f374a897bbdef5ca53d6681419fda8026 (patch) | |
tree | 22bbddffc89a9bc7ad1ad39660eec94f62254916 /lisp/emacs-lisp | |
parent | 84a87ab505e6bb94fccabf49efb39268c4a8075e (diff) | |
download | emacs-55fa245f374a897bbdef5ca53d6681419fda8026.tar.gz emacs-55fa245f374a897bbdef5ca53d6681419fda8026.tar.bz2 emacs-55fa245f374a897bbdef5ca53d6681419fda8026.zip |
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
for functions with no arguments.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 9c52cc44eb4..d21b39fd268 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2521,7 +2521,8 @@ If QUOTED is non-nil, print with quoting; otherwise, print without quoting." "Return an expression which will evaluate to a function value FUN. FUN should be either a `lambda' value or a `closure' value." (pcase-let* (((or (and `(lambda ,args . ,body) (let env nil)) - `(closure ,env ,args . ,body)) fun) + `(closure ,env ,args . ,body)) + fun) (renv ())) ;; Turn the function's closed vars (if any) into local let bindings. (dolist (binding env) @@ -2723,7 +2724,9 @@ for symbols generated by the byte compiler itself." ;; byte-string, constants-vector, stack depth (cdr compiled) ;; optionally, the doc string. - (cond (lexical-binding + (cond ((and lexical-binding arglist) + ;; byte-compile-make-args-desc lost the args's names, + ;; so preserve them in the docstring. (list (help-add-fundoc-usage doc arglist))) ((or doc int) (list doc))) |