summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-06-04 15:28:25 +0300
committerEli Zaretskii <eliz@gnu.org>2023-06-04 15:28:25 +0300
commit3f9e0281ad2776e3973a3cceda4b16c9925f6673 (patch)
tree85234082bdb82b1f881f2b60324bc963000cd951 /lisp/emacs-lisp
parent508005b3cf91b03736adc6f6edfc1cebe22be0df (diff)
downloademacs-3f9e0281ad2776e3973a3cceda4b16c9925f6673.tar.gz
emacs-3f9e0281ad2776e3973a3cceda4b16c9925f6673.tar.bz2
emacs-3f9e0281ad2776e3973a3cceda4b16c9925f6673.zip
; Minor doc copyedits in comp.el
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix commentary. (comp-function-type-spec): Doc fix.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/comp.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index e516c8b5eb9..696ed8d21f9 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -277,9 +277,9 @@ Useful to hook into pass checkers.")
;; FIXME this probably should not be here but... good for now.
(defconst comp-known-type-specifiers
`(
- ;; Functions we can trust not to be redefined or if redefined
- ;; should expose the same type. The vast majority of these is
- ;; either pure or primitive, the original list is the union of
+ ;; Functions we can trust not to be redefined, or, if redefined,
+ ;; to expose the same type. The vast majority of these are
+ ;; either pure or primitive; the original list is the union of
;; pure + side-effect-free-fns + side-effect-and-error-free-fns:
(% (function ((or number marker) (or number marker)) number))
(* (function (&rest (or number marker)) number))
@@ -4449,14 +4449,13 @@ of (commands) to run simultaneously."
;;;###autoload
(defun comp-function-type-spec (function)
- "Given FUNCTION gives its type specifier.
-Return a cons with its car being the function specifier and its
-cdr being a symbol.
-
-If the symbol is `inferred' the type specifier is automatically
-inferred from the code itself by the native compiler, if it is
-`know' the type specifier comes from
-`comp-known-type-specifiers'."
+ "Return the type specifier of FUNCTION.
+
+This function returns a cons cell whose car is the function
+specifier, and cdr is a symbol, either `inferred' or `know'.
+If the symbol is `inferred', the type specifier is automatically
+inferred from the code itself by the native compiler; if it is
+`know', the type specifier comes from `comp-known-type-specifiers'."
(let ((kind 'know)
type-spec )
(when-let ((res (gethash function comp-known-func-cstr-h)))