[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor 2693054 07/18: Flymake faces are
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor 2693054 07/18: Flymake faces are not just for "lines" anymore |
Date: |
Thu, 21 Sep 2017 20:35:25 -0400 (EDT) |
branch: scratch/flymake-refactor
commit 2693054669a0d4f90ec966d473cd997b123c55aa
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Flymake faces are not just for "lines" anymore
Since diagnostics can highlight arbitrary regions, not just lines, it
makes sense to rename these faces.
* lisp/progmodes/flymake-ui.el (flymake-error): Rename from
flymake-errline.
(flymake-warning): Rename from flymake-warnline.
(flymake-warnline, flymake-errline): Obsoletion aliases.
* test/lisp/progmodes/flymake-tests.el (warning-predicate-rx-gcc)
(warning-predicate-function-gcc, warning-predicate-rx-perl)
(warning-predicate-function-perl): Use face `flymake-warning'.
---
lisp/progmodes/flymake-ui.el | 11 +++++++----
test/lisp/progmodes/flymake-tests.el | 8 ++++----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/lisp/progmodes/flymake-ui.el b/lisp/progmodes/flymake-ui.el
index 4f41f39..50c01ac 100644
--- a/lisp/progmodes/flymake-ui.el
+++ b/lisp/progmodes/flymake-ui.el
@@ -176,24 +176,27 @@ verify FILTER, sort them by COMPARE (using KEY)."
"Delete all flymake overlays in BUFFER."
(mapc #'delete-overlay (flymake--overlays)))
-(defface flymake-errline
+(defface flymake-error
'((((supports :underline (:style wave)))
:underline (:style wave :color "Red1"))
(t
:inherit error))
- "Face used for marking error lines."
+ "Face used for marking error regions."
:version "24.4"
:group 'flymake)
-(defface flymake-warnline
+(defface flymake-warning
'((((supports :underline (:style wave)))
:underline (:style wave :color "DarkOrange"))
(t
:inherit warning))
- "Face used for marking warning lines."
+ "Face used for marking warning regions."
:version "24.4"
:group 'flymake)
+(define-obsolete-face-alias 'flymake-warnline 'flymake-warning "26.1")
+(define-obsolete-face-alias 'flymake-errline 'flymake-error "26.1")
+
(defun flymake--diag-region (diagnostic)
(save-excursion
(goto-char (point-min))
diff --git a/test/lisp/progmodes/flymake-tests.el
b/test/lisp/progmodes/flymake-tests.el
index 16c422d..d17f78e 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -67,26 +67,26 @@
(ert-deftest warning-predicate-rx-gcc ()
"Test GCC warning via regexp predicate."
(skip-unless (and (executable-find "gcc") (executable-find "make")))
- (should (eq 'flymake-warnline
+ (should (eq 'flymake-warning
(flymake-tests--current-face "test.c" "^[Ww]arning"))))
(ert-deftest warning-predicate-function-gcc ()
"Test GCC warning via function predicate."
(skip-unless (and (executable-find "gcc") (executable-find "make")))
- (should (eq 'flymake-warnline
+ (should (eq 'flymake-warning
(flymake-tests--current-face "test.c"
(lambda (msg) (string-match "^[Ww]arning" msg))))))
(ert-deftest warning-predicate-rx-perl ()
"Test perl warning via regular expression predicate."
(skip-unless (executable-find "perl"))
- (should (eq 'flymake-warnline
+ (should (eq 'flymake-warning
(flymake-tests--current-face "test.pl" "^Scalar value"))))
(ert-deftest warning-predicate-function-perl ()
"Test perl warning via function predicate."
(skip-unless (executable-find "perl"))
- (should (eq 'flymake-warnline
+ (should (eq 'flymake-warning
(flymake-tests--current-face
"test.pl"
(lambda (msg) (string-match "^Scalar value" msg))))))
- [Emacs-diffs] scratch/flymake-refactor updated (fea31e2 -> 7140018), João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 50a6920 04/18: Make flymake-tests.el friendlier to interactive runs, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 2693054 07/18: Flymake faces are not just for "lines" anymore,
João Távora <=
- [Emacs-diffs] scratch/flymake-refactor 991c88f 11/18: flymake-warning face easier to distinguish from flymake-error, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 7140018 18/18: Protect flymake-ui against commands like fill-paragraph, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 593d4303 16/18: Add a new flymake test for multiple errors and warnings, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 46e0721 01/18: Fix test failure introduced by previous commit, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 46b4391 09/18: flymake-proc.el parses column numbers from gcc/javac errors, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 205c444 03/18: Use non-obsolete variable names in flymake-tests.el, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor f3b8a72 13/18: Refactor flymake-tests.el in preparation for more tests, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor bac7512 05/18: New flymake-diagnostic-types-alist and more cleanup, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor d3168cf 02/18: Make lisp/progmodes/flymake-ui.el some 150 lines lighter, João Távora, 2017/09/21
- [Emacs-diffs] scratch/flymake-refactor 61ba20b 14/18: Echo flymake error messages when navigating errors interactively, João Távora, 2017/09/21