diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-08-14 12:28:37 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-08-14 12:30:05 -0400 |
commit | 1faeef7924c535e9003b617b723b85567a821f5c (patch) | |
tree | 8445634792cba5e60e857cc52aaf73a922894188 /lisp/help-fns.el | |
parent | 1d3fe256907d5e78a4acedd194e55db8ab952952 (diff) | |
download | emacs-1faeef7924c535e9003b617b723b85567a821f5c.tar.gz |
(compiled-function-p): New function (bug#56648)
* lisp/subr.el (compiled-function-p): New function.
* test/lisp/international/ucs-normalize-tests.el (ucs-normalize-part1):
* lisp/gnus/gnus.el (gnus):
* lisp/mh-e/mh-e.el (mh-version):
* lisp/emacs-lisp/macroexp.el (emacs-startup-hook):
* lisp/emacs-lisp/cl-macs.el (compiled-function):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition)
(byte-compile, display-call-tree):
* lisp/emacs-lisp/byte-opt.el (<toplevel-end>):
* lisp/emacs-lisp/advice.el (ad-compiled-p):
* lisp/cedet/semantic/bovine.el (semantic-bovinate-stream):
* lisp/loadup.el (macroexpand-all):
* admin/unidata/unidata-gen.el (unidata--ensure-compiled): Use it.
* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add entries for it.
(pcase--split-pred): Use it.
* lisp/help-fns.el (help-fns-function-description-header): Use `functionp`.
(help-fns--var-safe-local): Use `compiled-function-p`.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 59a509b2215..74e18285e64 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1005,9 +1005,9 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." (help-fns--analyze-function function)) (file-name (find-lisp-object-file-name function (if aliased 'defun def))) - (beg (if (and (or (byte-code-function-p def) + (beg (if (and (or (functionp def) (keymapp def) - (memq (car-safe def) '(macro lambda closure))) + (eq (car-safe def) 'macro)) (stringp file-name) (help-fns--autoloaded-p function)) (concat @@ -1040,7 +1040,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." (t "Lisp function")))) ((or (eq (car-safe def) 'macro) ;; For advised macros, def is a lambda - ;; expression or a byte-code-function-p, so we + ;; expression or a compiled-function-p, so we ;; need to check macros before functions. (macrop function)) (concat beg "Lisp macro")) @@ -1534,8 +1534,8 @@ This cancels value editing without updating the value." (when safe-var (princ " This variable is safe as a file local variable ") (princ "if its value\n satisfies the predicate ") - (princ (if (byte-code-function-p safe-var) - "which is a byte-compiled expression.\n" + (princ (if (compiled-function-p safe-var) + "which is a compiled expression.\n" (format-message "`%s'.\n" safe-var)))))) (add-hook 'help-fns-describe-variable-functions #'help-fns--var-risky) |