[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/lisp-func-type-decls 0757ea98654: Rename property 'declared-type
From: |
Andrea Corallo |
Subject: |
scratch/lisp-func-type-decls 0757ea98654: Rename property 'declared-type' to 'function-type' |
Date: |
Mon, 29 Apr 2024 14:41:57 -0400 (EDT) |
branch: scratch/lisp-func-type-decls
commit 0757ea98654bef58d19a46ce2f7ce1a715ec65ca
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Andrea Corallo <acorallo@gnu.org>
Rename property 'declared-type' to 'function-type'
* lisp/emacs-lisp/byte-run.el (byte-run--set-function-type): Rename.
(defun-declarations-alist): Update.
* lisp/emacs-lisp/comp.el (comp--get-function-cstr): Likewise.
---
lisp/emacs-lisp/byte-run.el | 6 +++---
lisp/emacs-lisp/comp-common.el | 2 +-
lisp/emacs-lisp/comp.el | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index 88571593c31..84cc83f2270 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -217,10 +217,10 @@ So far, FUNCTION can only be a symbol, not a lambda
expression."
(cadr elem)))
val)))))
-(defalias 'byte-run--set-declared-type
+(defalias 'byte-run--set-function-type
#'(lambda (f _args &rest val)
(list 'function-put (list 'quote f)
- ''declared-type (list 'quote val))))
+ ''function-type (list 'quote val))))
;; Add any new entries to info node `(elisp)Declare Form'.
(defvar defun-declarations-alist
@@ -245,7 +245,7 @@ If `error-free', drop calls even if
`byte-compile-delete-errors' is nil.")
(list 'completion #'byte-run--set-completion)
(list 'modes #'byte-run--set-modes)
(list 'interactive-args #'byte-run--set-interactive-args)
- (list 'type #'byte-run--set-declared-type))
+ (list 'type #'byte-run--set-function-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,
diff --git a/lisp/emacs-lisp/comp-common.el b/lisp/emacs-lisp/comp-common.el
index dea7af66a0c..ef40882a98a 100644
--- a/lisp/emacs-lisp/comp-common.el
+++ b/lisp/emacs-lisp/comp-common.el
@@ -515,7 +515,7 @@ itself."
(let ((f (and (symbolp function)
(symbol-function function))))
(when (and f (null type-spec))
- (if-let ((delc-type (function-get function 'declared-type)))
+ (if-let ((delc-type (function-get function 'function-type)))
;; Declared Lisp function
(setf type-spec (car delc-type))
(when (subr-native-elisp-p f)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index b37af4c8dc2..d7cd6b79c86 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -194,7 +194,7 @@ Useful to hook into pass checkers.")
(when (symbolp function)
(let ((f (symbol-function function)))
(or (gethash f comp-primitive-func-cstr-h)
- (when-let ((res (function-get function 'declared-type)))
+ (when-let ((res (function-get function 'function-type)))
(comp-type-spec-to-cstr (car res)))))))
;; Keep it in sync with the `cl-deftype-satisfies' property set in
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/lisp-func-type-decls 0757ea98654: Rename property 'declared-type' to 'function-type',
Andrea Corallo <=