summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-08-05 12:31:21 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-08-05 12:31:21 -0400
commit673e08bbd4209cc234c76c4430cc62924ba3ba49 (patch)
tree6cc3be9e92ccd04e1da3d7cbea23b5ceb2ee2a97 /lisp/help-fns.el
parent412b635880c2b907a3c4cb340fbb02b4db78b1aa (diff)
downloademacs-673e08bbd4209cc234c76c4430cc62924ba3ba49.tar.gz
* lisp/emacs-lisp/cl-macs.el (cl--make-usage-var, cl--make-usage-args):
New functions. (cl-transform-lambda): Use them. Fixes: debbugs:9239
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index b13e6a77d5d..5e034b14fde 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -65,7 +65,9 @@
(defun help-split-fundoc (docstring def)
"Split a function DOCSTRING into the actual doc and the usage info.
-Return (USAGE . DOC) or nil if there's no usage info.
+Return (USAGE . DOC) or nil if there's no usage info, where USAGE info
+is a string describing the argument list of DEF, such as
+\"(apply FUNCTION &rest ARGUMENTS)\".
DEF is the function whose usage we're looking for in DOCSTRING."
;; Functions can get the calling sequence at the end of the doc string.
;; In cases where `function' has been fset to a subr we can't search for
@@ -156,12 +158,7 @@ the same names as used in the original source code, when possible."
(defun help-make-usage (function arglist)
(cons (if (symbolp function) function 'anonymous)
(mapcar (lambda (arg)
- (if (not (symbolp arg))
- (if (and (consp arg) (symbolp (car arg)))
- ;; CL style default values for optional args.
- (cons (intern (upcase (symbol-name (car arg))))
- (cdr arg))
- arg)
+ (if (not (symbolp arg)) arg
(let ((name (symbol-name arg)))
(cond
((string-match "\\`&" name) arg)