Function: glyph-face

glyph-face is an autoloaded and byte-compiled function defined in disp-table.el.gz.

Signature

(glyph-face GLYPH)

Documentation

Return the face of glyph code GLYPH, or nil if glyph has default face.

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/disp-table.el.gz
;;;###autoload
(defun glyph-face (glyph)
  "Return the face of glyph code GLYPH, or nil if glyph has default face."
  (let ((face-id (if (consp glyph) (cdr glyph) (ash glyph -22))))
    (and (> face-id 0)
	 (catch 'face
	   (dolist (face (face-list))
	     (when (eq (face-id face) face-id)
	       (throw 'face face)))))))