Function: flymake-diagnostic-oneliner
flymake-diagnostic-oneliner is a byte-compiled function defined in
flymake.el.gz.
Signature
(flymake-diagnostic-oneliner DIAG &optional NOPAINTP)
Documentation
Get truncated one-line text string for diagnostic DIAG.
This is useful for displaying the DIAG's text to the user in
confined spaces, such as the echo are. Unless NOPAINTP is t,
propertize returned text with the echo-face property of DIAG's
type.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/flymake.el.gz
(defun flymake-diagnostic-oneliner (diag &optional nopaintp)
"Get truncated one-line text string for diagnostic DIAG.
This is useful for displaying the DIAG's text to the user in
confined spaces, such as the echo are. Unless NOPAINTP is t,
propertize returned text with the `echo-face' property of DIAG's
type."
(let* ((txt (flymake-diagnostic-text diag))
(txt (substring txt 0 (cl-loop for i from 0 for a across txt
when (eq a ?\n) return i))))
(if nopaintp txt
(propertize txt 'face
(flymake--lookup-type-property
(flymake-diagnostic-type diag) 'echo-face 'flymake-error)))))