]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Sep 2014 13:47:47 +0000 (09:47 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Sep 2014 13:47:47 +0000 (09:47 -0400)
for functions with no arguments.

lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el

index 659c8aa5cba7419f677c38b3b2a09f2ac64970aa..7dcc1eb9edb94cc60c06e8778be28cfd271b9df1 100644 (file)
@@ -1,5 +1,8 @@
 2014-09-22  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
+       for functions with no arguments.
+
        * mpc.el (mpc-data-directory): Use locate-user-emacs-file.
        (mpc-volume-refresh): Make sure the corresponding header-line is updated.
 
index 9c52cc44eb4d6151c44b0eaa1d6a59fadcefe853..d21b39fd268744d549223125ea4976da0a927afd 100644 (file)
@@ -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)))