diff options
author | Andrea Corallo <acorallo@gnu.org> | 2024-05-14 09:58:42 +0200 |
---|---|---|
committer | Andrea Corallo <acorallo@gnu.org> | 2024-05-14 11:17:25 +0200 |
commit | b87670b56460185bec902806daa52b05faa5d26d (patch) | |
tree | 4632dd4e6c04a9364affe11f6d42f32a3cf060aa /lisp/emacs-lisp/byte-run.el | |
parent | 6e1bb713f61da3e09b811883ed889067a1cc939b (diff) | |
download | emacs-b87670b56460185bec902806daa52b05faa5d26d.tar.gz emacs-b87670b56460185bec902806daa52b05faa5d26d.tar.bz2 emacs-b87670b56460185bec902806daa52b05faa5d26d.zip |
* Allow for optional function name parameter in 'ftype' declaration
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Allow for
optional function name parameter in 'ftype' declaration.
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
-rw-r--r-- | lisp/emacs-lisp/byte-run.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 2031049e678..2fa646f2531 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -223,7 +223,11 @@ So far, FUNCTION can only be a symbol, not a lambda expression." val))))) (defalias 'byte-run--set-function-type - #'(lambda (f _args val) + #'(lambda (f _args val &optional f2) + (when (and f2 (not (eq f2 f))) + (error + "`%s' does not match top level function `%s' inside function type \ +declaration" f2 f)) (list 'function-put (list 'quote f) ''function-type (list 'quote val)))) |