Function: get-display-property

get-display-property is a byte-compiled function defined in compat-29.el.

Signature

(get-display-property POSITION PROP &optional OBJECT PROPERTIES)

Documentation

[Compatibility function for get-display-property, defined in Emacs 29.1. See
(compat) Emacs 29.1' for more details.]

Get the value of the display property PROP at POSITION. If OBJECT, this should be a buffer or string where the property is fetched from. If omitted, OBJECT defaults to the current buffer.

If PROPERTIES, look for value of PROP in PROPERTIES instead of the properties at POSITION.

Source Code

;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-29.el
(compat-defalias window-configuration-equal-p compare-window-configurations) ;; <compat-tests:window-configuration-equal-p>

;;;; Defined in xdisp.c

(compat-defun get-display-property (position prop &optional object properties) ;; <compat-tests:get-display-property>
  "Get the value of the `display' property PROP at POSITION.
If OBJECT, this should be a buffer or string where the property is
fetched from.  If omitted, OBJECT defaults to the current buffer.

If PROPERTIES, look for value of PROP in PROPERTIES instead of
the properties at POSITION."
  (if properties
      (unless (listp properties)
        (signal 'wrong-type-argument (list 'listp properties)))
    (setq properties (get-text-property position 'display object)))
  (cond
   ((vectorp properties)
    (catch 'found
      (dotimes (i (length properties))
        (let ((ent (aref properties i)))
          (when (eq (car ent) prop)
            (throw 'found (cadr ent )))))))
   ((consp (car properties))
    (condition-case nil
        (cadr (assq prop properties))
      ;; Silently handle improper lists:
      (wrong-type-argument nil)))
   ((and (consp (cdr properties))
         (eq (car properties) prop))
    (cadr properties))))