Function: visual-wrap--display-property-safe-p

visual-wrap--display-property-safe-p is a byte-compiled function defined in visual-wrap.el.gz.

Signature

(visual-wrap--display-property-safe-p DISPLAY)

Documentation

Return non-nil if the display property DISPLAY is "safe".

A "safe" display property is one where all the display specs are members of visual-wrap--safe-display-specs (which see).

Source Code

;; Defined in /usr/src/emacs/lisp/visual-wrap.el.gz
(defun visual-wrap--display-property-safe-p (display)
  "Return non-nil if the display property DISPLAY is \"safe\".
A \"safe\" display property is one where all the display specs are
members of `visual-wrap--safe-display-specs' (which see)."
  ;; The display property could be a single display spec; if so, wrap it
  ;; in a list so we can iterate over it in our loop below.
  (when (and (consp display) (not (consp (car display))))
    (setq display (list display)))
  ;; Loop over all the display specs to check if they're safe.  Assume
  ;; any display property other than a vector or list (e.g. a string) is
  ;; unsafe.
  (when (or (vectorp display) (listp display))
    (not (catch 'unsafe
           (mapc (lambda (spec)
                   (unless (member (car-safe spec)
                                   visual-wrap--safe-display-specs)
                     (throw 'unsafe t)))
                 display)))))