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.
"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)
;; 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)))