aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2024-04-29 20:31:05 +0200
committerAndrea Corallo2024-04-29 20:41:11 +0200
commit0757ea98654bef58d19a46ce2f7ce1a715ec65ca (patch)
treec142aee5e1caf5e9c9d403d192a4c91311b556c1
parent15016288ecaefbfb2822c1fcef7146a5d8663650 (diff)
downloademacs-0757ea98654bef58d19a46ce2f7ce1a715ec65ca.tar.gz
emacs-0757ea98654bef58d19a46ce2f7ce1a715ec65ca.zip
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.
-rw-r--r--lisp/emacs-lisp/byte-run.el6
-rw-r--r--lisp/emacs-lisp/comp-common.el2
-rw-r--r--lisp/emacs-lisp/comp.el2
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."
217 (cadr elem))) 217 (cadr elem)))
218 val))))) 218 val)))))
219 219
220(defalias 'byte-run--set-declared-type 220(defalias 'byte-run--set-function-type
221 #'(lambda (f _args &rest val) 221 #'(lambda (f _args &rest val)
222 (list 'function-put (list 'quote f) 222 (list 'function-put (list 'quote f)
223 ''declared-type (list 'quote val)))) 223 ''function-type (list 'quote val))))
224 224
225;; Add any new entries to info node `(elisp)Declare Form'. 225;; Add any new entries to info node `(elisp)Declare Form'.
226(defvar defun-declarations-alist 226(defvar defun-declarations-alist
@@ -245,7 +245,7 @@ If `error-free', drop calls even if `byte-compile-delete-errors' is nil.")
245 (list 'completion #'byte-run--set-completion) 245 (list 'completion #'byte-run--set-completion)
246 (list 'modes #'byte-run--set-modes) 246 (list 'modes #'byte-run--set-modes)
247 (list 'interactive-args #'byte-run--set-interactive-args) 247 (list 'interactive-args #'byte-run--set-interactive-args)
248 (list 'type #'byte-run--set-declared-type)) 248 (list 'type #'byte-run--set-function-type))
249 "List associating function properties to their macro expansion. 249 "List associating function properties to their macro expansion.
250Each element of the list takes the form (PROP FUN) where FUN is 250Each element of the list takes the form (PROP FUN) where FUN is
251a function. For each (PROP . VALUES) in a function's declaration, 251a 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."
515 (let ((f (and (symbolp function) 515 (let ((f (and (symbolp function)
516 (symbol-function function)))) 516 (symbol-function function))))
517 (when (and f (null type-spec)) 517 (when (and f (null type-spec))
518 (if-let ((delc-type (function-get function 'declared-type))) 518 (if-let ((delc-type (function-get function 'function-type)))
519 ;; Declared Lisp function 519 ;; Declared Lisp function
520 (setf type-spec (car delc-type)) 520 (setf type-spec (car delc-type))
521 (when (subr-native-elisp-p f) 521 (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.")
194 (when (symbolp function) 194 (when (symbolp function)
195 (let ((f (symbol-function function))) 195 (let ((f (symbol-function function)))
196 (or (gethash f comp-primitive-func-cstr-h) 196 (or (gethash f comp-primitive-func-cstr-h)
197 (when-let ((res (function-get function 'declared-type))) 197 (when-let ((res (function-get function 'function-type)))
198 (comp-type-spec-to-cstr (car res))))))) 198 (comp-type-spec-to-cstr (car res)))))))
199 199
200;; Keep it in sync with the `cl-deftype-satisfies' property set in 200;; Keep it in sync with the `cl-deftype-satisfies' property set in