emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117915: * lisp/emacs-lisp/bytecomp.el (byte-compile


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r117915: * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
Date: Mon, 22 Sep 2014 13:47:52 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117915
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2014-09-22 09:47:47 -0400
message:
  * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
  for functions with no arguments.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/emacs-lisp/bytecomp.el    bytecomp.el-20091113204419-o5vbwnq5f7feedwu-492
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-09-22 13:42:57 +0000
+++ b/lisp/ChangeLog    2014-09-22 13:47:47 +0000
@@ -1,5 +1,8 @@
 2014-09-22  Stefan Monnier  <address@hidden>
 
+       * 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.
 

=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el       2014-04-22 06:51:30 +0000
+++ b/lisp/emacs-lisp/bytecomp.el       2014-09-22 13:47:47 +0000
@@ -2521,7 +2521,8 @@
   "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 @@
               ;; 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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]