diff options
| author | João Távora | 2017-09-27 12:42:20 +0100 |
|---|---|---|
| committer | João Távora | 2017-10-03 14:18:54 +0100 |
| commit | 73601787b45d08cdd5026ea36ff680bd49076950 (patch) | |
| tree | cc6161f0f10f6ec97e8b43d582b1c73395617935 /test | |
| parent | 5ec7d738655db209ef7375e340d3d2b0ae5fc3da (diff) | |
| download | emacs-73601787b45d08cdd5026ea36ff680bd49076950.tar.gz emacs-73601787b45d08cdd5026ea36ff680bd49076950.zip | |
Tweak Flymake commands flymake-goto-[next/prev]-error
Add filters, useful for backends like the upcoming
flymake-elisp-checkdoc backend, for example, which litters everything
with low-priority notes.
Also re-implement wraparound for flymake-goto-next-error. Manual
mentions this, so it's probably a good idea to keep it. Added a new
customization variable flymake-wrap-around to control it.
* lisp/progmodes/flymake.el (flymake-goto-prev-error)
(flymake-goto-next-error): Accept FILTER argument.
(flymake-wrap-around): New variable.
(flymake-goto-next-error): Wrap around according to flymake-wrap-around.
* test/lisp/progmodes/flymake-tests.el
(different-diagnostic-types, dummy-backends): Pass FILTER to
flymake-goto-prev-error.
(different-diagnostic-types)
(dummy-backends): Use flymake-wrap-around.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/flymake-tests.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index 921c2f648a4..fa77a9a8ae6 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el | |||
| @@ -129,7 +129,8 @@ SEVERITY-PREDICATE is used to setup | |||
| 129 | (should (eq 'flymake-warning (face-at-point))) | 129 | (should (eq 'flymake-warning (face-at-point))) |
| 130 | (flymake-goto-next-error) | 130 | (flymake-goto-next-error) |
| 131 | (should (eq 'flymake-error (face-at-point))) | 131 | (should (eq 'flymake-error (face-at-point))) |
| 132 | (should-error (flymake-goto-next-error nil t)) )) | 132 | (let ((flymake-wrap-around nil)) |
| 133 | (should-error (flymake-goto-next-error nil nil t))) )) | ||
| 133 | 134 | ||
| 134 | (defmacro flymake-tests--assert-set (set | 135 | (defmacro flymake-tests--assert-set (set |
| 135 | should | 136 | should |
| @@ -244,7 +245,8 @@ SEVERITY-PREDICATE is used to setup | |||
| 244 | (should (eq 'flymake-warning (face-at-point))) ; dolor | 245 | (should (eq 'flymake-warning (face-at-point))) ; dolor |
| 245 | (flymake-goto-next-error) | 246 | (flymake-goto-next-error) |
| 246 | (should (eq 'flymake-error (face-at-point))) ; prognata | 247 | (should (eq 'flymake-error (face-at-point))) ; prognata |
| 247 | (should-error (flymake-goto-next-error nil t)))))) | 248 | (let ((flymake-wrap-around nil)) |
| 249 | (should-error (flymake-goto-next-error nil nil t))))))) | ||
| 248 | 250 | ||
| 249 | (provide 'flymake-tests) | 251 | (provide 'flymake-tests) |
| 250 | 252 | ||