aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-09-22 09:47:47 -0400
committerStefan Monnier2014-09-22 09:47:47 -0400
commit55fa245f374a897bbdef5ca53d6681419fda8026 (patch)
tree22bbddffc89a9bc7ad1ad39660eec94f62254916
parent84a87ab505e6bb94fccabf49efb39268c4a8075e (diff)
downloademacs-55fa245f374a897bbdef5ca53d6681419fda8026.tar.gz
emacs-55fa245f374a897bbdef5ca53d6681419fda8026.zip
* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
for functions with no arguments.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 659c8aa5cba..7dcc1eb9edb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12014-09-22 Stefan Monnier <monnier@iro.umontreal.ca> 12014-09-22 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * emacs-lisp/bytecomp.el (byte-compile-lambda): Don't add fundoc usage
4 for functions with no arguments.
5
3 * mpc.el (mpc-data-directory): Use locate-user-emacs-file. 6 * mpc.el (mpc-data-directory): Use locate-user-emacs-file.
4 (mpc-volume-refresh): Make sure the corresponding header-line is updated. 7 (mpc-volume-refresh): Make sure the corresponding header-line is updated.
5 8
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."
2521 "Return an expression which will evaluate to a function value FUN. 2521 "Return an expression which will evaluate to a function value FUN.
2522FUN should be either a `lambda' value or a `closure' value." 2522FUN should be either a `lambda' value or a `closure' value."
2523 (pcase-let* (((or (and `(lambda ,args . ,body) (let env nil)) 2523 (pcase-let* (((or (and `(lambda ,args . ,body) (let env nil))
2524 `(closure ,env ,args . ,body)) fun) 2524 `(closure ,env ,args . ,body))
2525 fun)
2525 (renv ())) 2526 (renv ()))
2526 ;; Turn the function's closed vars (if any) into local let bindings. 2527 ;; Turn the function's closed vars (if any) into local let bindings.
2527 (dolist (binding env) 2528 (dolist (binding env)
@@ -2723,7 +2724,9 @@ for symbols generated by the byte compiler itself."
2723 ;; byte-string, constants-vector, stack depth 2724 ;; byte-string, constants-vector, stack depth
2724 (cdr compiled) 2725 (cdr compiled)
2725 ;; optionally, the doc string. 2726 ;; optionally, the doc string.
2726 (cond (lexical-binding 2727 (cond ((and lexical-binding arglist)
2728 ;; byte-compile-make-args-desc lost the args's names,
2729 ;; so preserve them in the docstring.
2727 (list (help-add-fundoc-usage doc arglist))) 2730 (list (help-add-fundoc-usage doc arglist)))
2728 ((or doc int) 2731 ((or doc int)
2729 (list doc))) 2732 (list doc)))