Function: help--make-usage
help--make-usage is a byte-compiled function defined in help.el.gz.
Signature
(help--make-usage FUNCTION ARGLIST)
Aliases
help-make-usage (obsolete since 25.1)
Source Code
;; Defined in /usr/src/emacs/lisp/help.el.gz
(defun help--make-usage (function arglist)
(cons (if (symbolp function) function 'anonymous)
(mapcar (lambda (arg)
(cond
;; Parameter name.
((symbolp arg)
(let ((name (symbol-name arg)))
(cond
((string-match "\\`&" name) arg)
((string-match "\\`_." name)
(intern (upcase (substring name 1))))
(t (intern (upcase name))))))
;; Parameter with a default value (from
;; cl-defgeneric etc).
((and (consp arg)
(symbolp (car arg)))
(cons (intern (upcase (symbol-name (car arg)))) (cdr arg)))
;; Something else.
(t arg)))
arglist)))