projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f9e028
)
* lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.
author
Andrea Corallo
<akrl@sdf.org>
Sun, 4 Jun 2023 14:25:14 +0000
(16:25 +0200)
committer
Andrea Corallo
<akrl@sdf.org>
Sun, 4 Jun 2023 14:25:14 +0000
(16:25 +0200)
lisp/emacs-lisp/comp.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/comp.el
b/lisp/emacs-lisp/comp.el
index 696ed8d21f95e72be67063ea3b190adbea1876e1..b65da1487873ccfb3576ccac8734cdbd708780b3 100644
(file)
--- a/
lisp/emacs-lisp/comp.el
+++ b/
lisp/emacs-lisp/comp.el
@@
-4460,9
+4460,11
@@
inferred from the code itself by the native compiler; if it is
type-spec )
(when-let ((res (gethash function comp-known-func-cstr-h)))
(setf type-spec (comp-cstr-to-type-spec res)))
- (unless type-spec
- (setf kind 'inferred
- type-spec (subr-type (symbol-function function))))
+ (let ((f (symbol-function function)))
+ (when (and (null type-spec)
+ (subr-native-elisp-p f))
+ (setf kind 'inferred
+ type-spec (subr-type f))))
(when type-spec
(cons type-spec kind))))