New Flymake variable flymake-diagnostic-types-alist and much cleanup
A new user-visible variable is introduced where different diagnostic
types can be categorized. Flymake backends can also contribute to
this variable. Anything that doesn’t match an existing error type
is considered.
The variable’s alists are used to propertize the overlays pertaining
to each error type. The user can override the built-in properties by
either by modifying the alist, or by modifying the properties of a
special "category" symbol, named by the `flymake-category' entry in
the alist.
The `flymake-category' entry is especially useful for, say, the author
of foo-flymake-backend, who issues diagnostics of type :foo-note, that
should behave like notes, except with no fringe bitmap:
For essential properties like `severity', `priority', etc, a default
value is produced. Some properties like `evaporate' cannot be
overriden.
* lisp/progmodes/flymake.el (flymake--diag): Rename from
flymake-ler.
(flymake-ler-make): Obsolete alias for flymake-diagnostic-make
(flymake-ler-errorp): Rewrite using flymake--severity.
(flymake--place-overlay): Delete.
(flymake--overlays): Now a cl-defun with &key args. Document.
Use `overlays-at' if BEG is non-nil and END is nil.
(flymake--lookup-type-property): New helper.
(flymake--highlight-line): Rewrite.
(flymake-diagnostic-types-alist): New API variable.
(flymake--diag-region)
(flymake--severity, flymake--face)
(flymake--fringe-overlay-spec): New helper.
(flymake-popup-current-error-menu): Use new flymake-overlays.
(flymake-popup-current-error-menu, flymake-report): Use
flymake--diag-errorp.
(flymake--fix-line-numbers): Use flymake--diag-line.
(flymake-goto-next-error): Pass :key to flymake-overlays
* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Use flymake-diagnostic-make.