diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 20:01:40 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 20:04:07 +0100 |
| commit | 43041cba01617164750b5bbdd343b3c8ce1b2008 (patch) | |
| tree | 90449786d8f2e10e4fef6e95f46c737207575cbd /compat-29.el | |
| parent | 157e5c13d558bb6d21f6ecd6e17c16453d673732 (diff) | |
compat-29: Add compiled-function-p
Diffstat (limited to 'compat-29.el')
| -rw-r--r-- | compat-29.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compat-29.el b/compat-29.el index 27edaaa..bae8f07 100644 --- a/compat-29.el +++ b/compat-29.el @@ -185,6 +185,12 @@ and return the value found in PLACE instead." (compat-defalias string-split split-string) ;; <compat-tests:string-split> +(compat-defun compiled-function-p (object) ;; <compat-tests:compiled-function-p> + "Return non-nil if OBJECT is a function that has been compiled. +Does not distinguish between functions implemented in machine code +or byte-code." + (or (subrp object) (byte-code-function-p object))) + (compat-defun function-alias-p (func &optional noerror) ;; <compat-tests:function-alias-p> "Return nil if FUNC is not a function alias. If FUNC is a function alias, return the function alias chain. |
