summaryrefslogtreecommitdiff
path: root/lisp/progmodes/flymake-proc.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2017-09-07 15:13:39 +0100
committerJoão Távora <joaotavora@gmail.com>2017-10-03 13:52:24 +0100
commitae64bf12a865d5d40b7541af0da9b971936994ec (patch)
treeb9dd67356caad12e89293ef8fc19a8730540da8d /lisp/progmodes/flymake-proc.el
parent9f8ad133eb66ffb0a1985a35a3c05bc52e6f6361 (diff)
downloademacs-ae64bf12a865d5d40b7541af0da9b971936994ec.tar.gz
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: (add-to-list 'flymake-diagnostic-types-alist '(:foo-note . ((flymake-category . flymake-note) (bitmap . nil)))) 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.
Diffstat (limited to 'lisp/progmodes/flymake-proc.el')
-rw-r--r--lisp/progmodes/flymake-proc.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index 0395fff3224..abda259e898 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -409,7 +409,7 @@ Create parent directories as needed."
(string-to-number col-string))))
(with-current-buffer (process-buffer proc)
(push
- (flymake-ler-make
+ (flymake-make-diagnostic
:file fname
:line line-number
:col col-number