Function: flymake-make-diagnostic

flymake-make-diagnostic is an autoloaded and byte-compiled function defined in flymake.el.gz.

Signature

(flymake-make-diagnostic LOCUS BEG END TYPE TEXT &optional DATA OVERLAY-PROPERTIES)

Documentation

Make a Flymake diagnostic for LOCUS's region from BEG to END.

LOCUS is a buffer object or a string designating a file name.

TYPE is a diagnostic symbol and TEXT is string describing the problem detected in this region. DATA is any object that the caller wishes to attach to the created diagnostic for later retrieval with flymake-diagnostic-data.

If LOCUS is a buffer BEG and END should be buffer positions inside it. If LOCUS designates a file, BEG and END should be a cons (LINE . COL) indicating a file position. In this second case, END may be omitted in which case the region is computed using flymake-diag-region if the diagnostic is appended to an actual buffer.

OVERLAY-PROPERTIES is an alist of properties attached to the created diagnostic, overriding the default properties and any properties listed in the flymake-overlay-control property of the diagnostic's type symbol.

Aliases

eglot--make-diag

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/flymake.el.gz
;;;###autoload
(defun flymake-make-diagnostic (locus
                                beg
                                end
                                type
                                text
                                &optional data
                                overlay-properties)
  "Make a Flymake diagnostic for LOCUS's region from BEG to END.
LOCUS is a buffer object or a string designating a file name.

TYPE is a diagnostic symbol and TEXT is string describing the
problem detected in this region.  DATA is any object that the
caller wishes to attach to the created diagnostic for later
retrieval with `flymake-diagnostic-data'.

If LOCUS is a buffer BEG and END should be buffer positions
inside it.  If LOCUS designates a file, BEG and END should be a
cons (LINE . COL) indicating a file position.  In this second
case, END may be omitted in which case the region is computed
using `flymake-diag-region' if the diagnostic is appended to an
actual buffer.

OVERLAY-PROPERTIES is an alist of properties attached to the
created diagnostic, overriding the default properties and any
properties listed in the `flymake-overlay-control' property of
the diagnostic's type symbol."
  (when (stringp locus)
    (setq locus (expand-file-name locus)))
  (flymake--diag-make :locus locus :beg beg :end end
                      :type type :text text :data data
                      :overlay-properties overlay-properties
                      :orig-beg beg
                      :orig-end end))