[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/func-type-decls 202c30af99c 1/6: Add function type declarations
From: |
Andrea Corallo |
Subject: |
scratch/func-type-decls 202c30af99c 1/6: Add function type declarations for Lisp functions as well |
Date: |
Fri, 23 Feb 2024 10:12:12 -0500 (EST) |
branch: scratch/func-type-decls
commit 202c30af99ce595a19ea619834391e197e81010b
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Andrea Corallo <acorallo@gnu.org>
Add function type declarations for Lisp functions as well
---
lisp/emacs-lisp/byte-run.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index cc176821026..e37f5fc75e3 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -217,6 +217,11 @@ So far, FUNCTION can only be a symbol, not a lambda
expression."
(cadr elem)))
val)))))
+(defalias 'byte-run--set-declared-type
+ #'(lambda (f _args &rest val)
+ (list 'function-put (list 'quote f)
+ ''declared-type (list 'quote val))))
+
;; Add any new entries to info node `(elisp)Declare Form'.
(defvar defun-declarations-alist
(list
@@ -239,7 +244,8 @@ If `error-free', drop calls even if
`byte-compile-delete-errors' is nil.")
(list 'speed #'byte-run--set-speed)
(list 'completion #'byte-run--set-completion)
(list 'modes #'byte-run--set-modes)
- (list 'interactive-args #'byte-run--set-interactive-args))
+ (list 'interactive-args #'byte-run--set-interactive-args)
+ (list 'function #'byte-run--set-declared-type))
"List associating function properties to their macro expansion.
Each element of the list takes the form (PROP FUN) where FUN is
a function. For each (PROP . VALUES) in a function's declaration,
- scratch/func-type-decls updated (1d630a5e08a -> e8ef297bbea), Andrea Corallo, 2024/02/23
- scratch/func-type-decls 4ae6ac9788b 3/6: Rename comp-primitive-type-specifiers, Andrea Corallo, 2024/02/23
- scratch/func-type-decls acb51997524 5/6: Update C-h f, Andrea Corallo, 2024/02/23
- scratch/func-type-decls 22da320285a 4/6: Make use of Lisp function declarations in the native compiler, Andrea Corallo, 2024/02/23
- scratch/func-type-decls 45e94db72df 2/6: Move remaning declared types out of comp-known-type-specifiers, Andrea Corallo, 2024/02/23
- scratch/func-type-decls e8ef297bbea 6/6: Clean-up now unnecessary 'comp-primitive-type-specifiers', Andrea Corallo, 2024/02/23
- scratch/func-type-decls 202c30af99c 1/6: Add function type declarations for Lisp functions as well,
Andrea Corallo <=