From 13d6e8fa54843b0b087e5a9c266e4b7e0d709c3f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 16 Oct 2022 12:01:47 -0400 Subject: cl-generic: Fix `advertised-calling-convention` declarations * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Preserve the `advertised-calling-convention`, if any (bug#58563). * lisp/subr.el (declare): Warn when we hit this. * lisp/emacs-lisp/byte-run.el (get-advertised-calling-convention): New fun. * lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string): * lisp/help-fns.el (help-fns--signature): * lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use it. * test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--acc): New fun. (cl-generic-tests--advertised-calling-convention-bug58563): New test. --- lisp/progmodes/elisp-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/progmodes/elisp-mode.el') diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 7e7ea6aeb9e..537b9484bd5 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1826,8 +1826,8 @@ or elsewhere, return a 1-line docstring." (eq 'function (aref elisp--eldoc-last-data 2))) (aref elisp--eldoc-last-data 1)) (t - (let* ((advertised (gethash (indirect-function sym) - advertised-signature-table t)) + (let* ((advertised (get-advertised-calling-convention + (indirect-function sym))) doc (args (cond -- cgit v1.2.3