mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
(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`.
This commit is contained in:
parent
1d3fe25690
commit
1faeef7924
17 changed files with 63 additions and 42 deletions
|
|
@ -1054,9 +1054,9 @@
|
|||
;; (print "Let's clean up now!"))
|
||||
;; foo
|
||||
;;
|
||||
;; Now `foo's advice is byte-compiled:
|
||||
;; Now `foo's advice is compiled:
|
||||
;;
|
||||
;; (byte-code-function-p 'ad-Advice-foo)
|
||||
;; (compiled-function-p 'ad-Advice-foo)
|
||||
;; t
|
||||
;;
|
||||
;; (foo 3)
|
||||
|
|
@ -1298,7 +1298,7 @@
|
|||
;; constructed during preactivation was used, even though we did not specify
|
||||
;; the `compile' flag:
|
||||
;;
|
||||
;; (byte-code-function-p 'ad-Advice-fum)
|
||||
;; (compiled-function-p 'ad-Advice-fum)
|
||||
;; t
|
||||
;;
|
||||
;; (fum 2)
|
||||
|
|
@ -1329,7 +1329,7 @@
|
|||
;;
|
||||
;; A new uncompiled advised definition got constructed:
|
||||
;;
|
||||
;; (byte-code-function-p 'ad-Advice-fum)
|
||||
;; (compiled-function-p 'ad-Advice-fum)
|
||||
;; nil
|
||||
;;
|
||||
;; (fum 2)
|
||||
|
|
@ -2116,9 +2116,9 @@ the cache-id will clear the cache."
|
|||
|
||||
(defsubst ad-compiled-p (definition)
|
||||
"Return non-nil if DEFINITION is a compiled byte-code object."
|
||||
(or (byte-code-function-p definition)
|
||||
(and (macrop definition)
|
||||
(byte-code-function-p (ad-lambdafy definition)))))
|
||||
(or (compiled-function-p definition)
|
||||
(and (macrop definition)
|
||||
(compiled-function-p (ad-lambdafy definition)))))
|
||||
|
||||
(defsubst ad-compiled-code (compiled-definition)
|
||||
"Return the byte-code object of a COMPILED-DEFINITION."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue