summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 4b1fc832da1..42ce9148a90 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4077,6 +4077,12 @@ Otherwise, return nil."
(or (eq 'macro (car def))
(and (autoloadp def) (memq (nth 4 def) '(macro t)))))))
+(defun compiled-function-p (object)
+ "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)))
+
(defun field-at-pos (pos)
"Return the field at position POS, taking stickiness etc into account."
(let ((raw-field (get-char-property (field-beginning pos) 'field)))