mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* emacs-lisp/byte-run.el (advertised-signature-table): New var.
(set-advertised-calling-convention): New function. (make-obsolete, define-obsolete-function-alias) (make-obsolete-variable, define-obsolete-variable-alias): Make the optional-ness of `when' obsolete. (define-obsolete-face-alias): Make `when' non-optional. * help-fns.el (help-function-arglist): * emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use advertised-signature-table.
This commit is contained in:
parent
d308026462
commit
ced10a4c9f
5 changed files with 68 additions and 29 deletions
|
|
@ -100,13 +100,15 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
|
|||
;; Handle symbols aliased to other symbols.
|
||||
(if (and (symbolp def) (fboundp def)) (setq def (indirect-function def)))
|
||||
;; If definition is a macro, find the function inside it.
|
||||
(if (eq (car-safe def) 'macro) (setq def (cdr def)))
|
||||
(cond
|
||||
((byte-code-function-p def) (aref def 0))
|
||||
((eq (car-safe def) 'lambda) (nth 1 def))
|
||||
((and (eq (car-safe def) 'autoload) (not (eq (nth 4 def) 'keymap)))
|
||||
"[Arg list not available until function definition is loaded.]")
|
||||
(t t)))
|
||||
(let ((advertised (gethash def advertised-signature-table t)))
|
||||
(if (listp advertised) advertised
|
||||
(if (eq (car-safe def) 'macro) (setq def (cdr def)))
|
||||
(cond
|
||||
((byte-code-function-p def) (aref def 0))
|
||||
((eq (car-safe def) 'lambda) (nth 1 def))
|
||||
((and (eq (car-safe def) 'autoload) (not (eq (nth 4 def) 'keymap)))
|
||||
"[Arg list not available until function definition is loaded.]")
|
||||
(t t)))))
|
||||
|
||||
(defun help-make-usage (function arglist)
|
||||
(cons (if (symbolp function) function 'anonymous)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue