Function: prettify-symbols--composition-displayable-p

prettify-symbols--composition-displayable-p is a byte-compiled function defined in prog-mode.el.gz.

Signature

(prettify-symbols--composition-displayable-p COMPOSITION)

Documentation

Return non-nil if COMPOSITION can be displayed with the current fonts.

COMPOSITION can be a single character, a string, or a sequence (vector or list) of characters and composition rules as described in the documentation of prettify-symbols-alist and compose-region.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/prog-mode.el.gz
(defun prettify-symbols--composition-displayable-p (composition)
  "Return non-nil if COMPOSITION can be displayed with the current fonts.
COMPOSITION can be a single character, a string, or a sequence (vector or
list) of characters and composition rules as described in the documentation
of `prettify-symbols-alist' and `compose-region'."
  (cond
   ((characterp composition)
    (char-displayable-on-frame-p composition))
   ((stringp composition)
    (seq-every-p #'char-displayable-on-frame-p composition))
   ((seqp composition)
    ;; check that every even-indexed element is displayable
    (seq-every-p
     (lambda (idx-elt)
       (if (evenp (cdr idx-elt))
           (char-displayable-on-frame-p (car idx-elt))
         t))
     (seq-map-indexed #'cons composition)))
   (t
    ;; silently ignore invalid compositions
    t)))