Function: flymake--indicator-overlay-spec

flymake--indicator-overlay-spec is a byte-compiled function defined in flymake.el.gz.

Signature

(flymake--indicator-overlay-spec INDICATOR)

Documentation

Return INDICATOR as propertized string to use in error indicators.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/flymake.el.gz
(defun flymake--indicator-overlay-spec (indicator)
  "Return INDICATOR as propertized string to use in error indicators."
  (let* ((value (if (symbolp indicator)
                    (symbol-value indicator)
                  indicator))
         (indicator-car (if (listp value)
                            (car value)
                          value))
         (indicator-cdr (if (listp value)
                            (cdr value))))
    (cond
     ((and (symbolp indicator-car)
           flymake-fringe-indicator-position)
      (propertize "!" 'display
                  (cons flymake-fringe-indicator-position
                        (if (listp value)
                            value
                          (list value)))))
     ((and (stringp indicator-car)
           flymake-margin-indicator-position)
      (propertize "!"
                  'display
                  `((margin ,flymake-margin-indicator-position)
                    ,(propertize
                      indicator-car
                      'face
                      `(:inherit (,indicator-cdr
                                  default)))))))))