diff options
author | João Távora <joaotavora@gmail.com> | 2018-06-05 15:13:02 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2018-06-05 15:22:16 +0100 |
commit | fa794d1b603e52e2a80d69c5610b782904ee6a69 (patch) | |
tree | e6dbf1d0ac1460488235e7785bf392caf472404c /lisp/progmodes/flymake-proc.el | |
parent | aadac04923c9ae47f0bccc706857b94166c9d355 (diff) | |
download | emacs-fa794d1b603e52e2a80d69c5610b782904ee6a69.tar.gz |
Obsolete Flymake's flymake-diagnostic-types-alist
That varaiable was an association between symbols and properties,
effecively duplicating symbol's property lists. It is simpler to just
put properties on symbols. Backward compatibility to the old variable
has been kept.
* doc/misc/flymake.texi (Flymake error types): Don't mention
flymake-diagnostic-types-alist.
(Flymake error types): Rework section.
(Backend functions): Refill a paragraph.
(Flymake utility functions): Don't mention
flymake-diagnostic-types-alist.
(Proc customization variables): Don't mention
flymake-diagnostic-types-alist.
* etc/NEWS: Mention obsoletion of flymake-diagnostic-types-alist.
* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Don't use
flymake-diagnostic-types-alist.
* lisp/progmodes/flymake.el: Rewrite commentary.
(flymake-make-diagnostic, flymake-mode, flymake-goto-next-error)
(flymake-goto-prev-error): Don't mention
flymake-diagnostic-types-alist in docstring.
(flymake-diagnostic-types-alist): Make obsolete.
(:error, :warning, :note): Put flymake-category in these symbols.
(flymake-error, flymake-warning, flymake-note): Put
`flymake-bitmap', not `bitmap' in these symbols.
(flymake--lookup-type-property, flymake--highlight-line): Rewrite.
Honor flymake-diagnostic-types-alist for backward
compatibility.
* lisp/progmodes/python.el (python-flymake-msg-alist): Don't
mention flymake-diagnostic-types-alist.
Diffstat (limited to 'lisp/progmodes/flymake-proc.el')
-rw-r--r-- | lisp/progmodes/flymake-proc.el | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index e38e4a75d45..8600be9b97c 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el @@ -196,11 +196,10 @@ from compile.el") 'flymake-proc-default-guess "Predicate matching against diagnostic text to detect its type. Takes a single argument, the diagnostic's text and should return -a value suitable for indexing -`flymake-diagnostic-types-alist' (which see). If the returned -value is nil, a type of `:error' is assumed. For some backward -compatibility, if a non-nil value is returned that doesn't -index that alist, a type of `:warning' is assumed. +a diagnostic symbol naming a type. If the returned value is nil, +a type of `:error' is assumed. For some backward compatibility, +if a non-nil value is returned that doesn't name a type, +`:warning' is assumed. Instead of a function, it can also be a string, a regular expression. A match indicates `:warning' type, otherwise @@ -516,8 +515,8 @@ Create parent directories as needed." :error)) ((functionp pred) (let ((probe (funcall pred message))) - (cond ((assoc-default probe - flymake-diagnostic-types-alist) + (cond ((and (symbolp probe) + (get probe 'flymake-category)) probe) (probe :warning) |