diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-21 11:39:06 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-21 11:39:06 +0100 |
| commit | aa2e6e7c7ce43a46b010c2e1198ddf31b2dbe382 (patch) | |
| tree | 5617eaaac6c6cf50cb6c1a8cad3ad80707743520 /compat-29.el | |
| parent | 7321d20be7a4ac2f214f149419314c075c239ec8 (diff) | |
imagep prototypefeature/imagep
Diffstat (limited to 'compat-29.el')
| -rw-r--r-- | compat-29.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compat-29.el b/compat-29.el index df39dc6..e75b5c8 100644 --- a/compat-29.el +++ b/compat-29.el @@ -169,6 +169,14 @@ This function does not move point. Also see `line-end-position'." (let ((inhibit-field-text-motion t)) (line-end-position n))) +;;;; Defined in image.c + +(compat-defun imagep (spec) ;; <compat-tests:imagep> + "Value is non-nil if SPEC is a valid image specification." + (and (eq (car-safe spec) 'image) (plistp (cdr spec)) + (or (plist-get (cdr spec) :data) (plist-get (cdr spec) :file)) + (image-type-available-p (plist-get (cdr spec) :type)))) + ;;;; Defined in subr.el (compat-defun buffer-local-restore-state (states) ;; <compat-tests:buffer-local-set-state> |
