[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 8f0f9cc 28/3
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 8f0f9cc 28/39: Flymake uses some new fringe bitmaps |
Date: |
Mon, 2 Oct 2017 20:12:25 -0400 (EDT) |
branch: scratch/flymake-refactor-cleaner-for-emacs-26
commit 8f0f9cc48bcb2c37a10550d8fa2986b09c2d2a89
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Flymake uses some new fringe bitmaps
Also fix behaviour whereby flymake wouldn't react to a change in the
variable.
* lisp/progmodes/flymake-ui.el (flymake-error-bitmap)
(flymake-warning-bitmap): Update bitmaps.
(flymake-note-bitmap): New defcustom.
(flymake-double-exclamation-mark): New bitmap.
(flymake-error, flymake-warning, flymake-note)
(flymake--highlight-line): 'bitmap property must be a symbol.
Also set default face to flymake-error.
(flymake--fringe-overlay-spec): Bitmap property can be a
variable symbol.
---
lisp/progmodes/flymake.el | 69 +++++++++++++++++++++++++++++++++++++----------
1 file changed, 55 insertions(+), 14 deletions(-)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index facce54..3bd60e6 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -44,7 +44,8 @@
:link '(custom-manual "(flymake) Top")
:group 'tools)
-(defcustom flymake-error-bitmap '(exclamation-mark error)
+(defcustom flymake-error-bitmap '(flymake-double-exclamation-mark
+ compilation-error)
"Bitmap (a symbol) used in the fringe for indicating errors.
The value may also be a list of two elements where the second
element specifies the face for the bitmap. For possible bitmap
@@ -59,7 +60,7 @@ this is used."
(symbol :tag "Bitmap")
(face :tag "Face"))))
-(defcustom flymake-warning-bitmap 'question-mark
+(defcustom flymake-warning-bitmap '(exclamation-mark compilation-warning)
"Bitmap (a symbol) used in the fringe for indicating warnings.
The value may also be a list of two elements where the second
element specifies the face for the bitmap. For possible bitmap
@@ -74,6 +75,21 @@ this is used."
(symbol :tag "Bitmap")
(face :tag "Face"))))
+(defcustom flymake-note-bitmap '(exclamation-mark compilation-info)
+ "Bitmap (a symbol) used in the fringe for indicating info notes.
+The value may also be a list of two elements where the second
+element specifies the face for the bitmap. For possible bitmap
+symbols, see `fringe-bitmaps'. See also `flymake-error-bitmap'.
+
+The option `flymake-fringe-indicator-position' controls how and where
+this is used."
+ :group 'flymake
+ :version "26.1"
+ :type '(choice (symbol :tag "Bitmap")
+ (list :tag "Bitmap and face"
+ (symbol :tag "Bitmap")
+ (face :tag "Face"))))
+
(defcustom flymake-fringe-indicator-position 'left-fringe
"The position to put flymake fringe indicator.
The value can be nil (do not use indicators), `left-fringe' or `right-fringe'.
@@ -117,6 +133,25 @@ See `flymake-error-bitmap' and `flymake-warning-bitmap'."
"If non-nil, moving to errors wraps around buffer boundaries."
:group 'flymake :type 'boolean)
+(define-fringe-bitmap 'flymake-double-exclamation-mark
+ (vector #b00000000
+ #b00000000
+ #b00000000
+ #b00000000
+ #b01100110
+ #b01100110
+ #b01100110
+ #b01100110
+ #b01100110
+ #b01100110
+ #b01100110
+ #b01100110
+ #b00000000
+ #b01100110
+ #b00000000
+ #b00000000
+ #b00000000))
+
(defvar-local flymake-timer nil
"Timer for starting syntax check.")
@@ -366,17 +401,17 @@ the diagnostics of each type. The recognized properties
are:
that differ from an existing type by only a few properties.")
(put 'flymake-error 'face 'flymake-error)
-(put 'flymake-error 'bitmap flymake-error-bitmap)
+(put 'flymake-error 'bitmap 'flymake-error-bitmap)
(put 'flymake-error 'severity (warning-numeric-level :error))
(put 'flymake-error 'mode-line-face 'compilation-error)
(put 'flymake-warning 'face 'flymake-warning)
-(put 'flymake-warning 'bitmap flymake-warning-bitmap)
+(put 'flymake-warning 'bitmap 'flymake-warning-bitmap)
(put 'flymake-warning 'severity (warning-numeric-level :warning))
(put 'flymake-warning 'mode-line-face 'compilation-warning)
(put 'flymake-note 'face 'flymake-note)
-(put 'flymake-note 'bitmap nil)
+(put 'flymake-note 'bitmap 'flymake-note-bitmap)
(put 'flymake-note 'severity (warning-numeric-level :debug))
(put 'flymake-note 'mode-line-face 'compilation-info)
@@ -400,14 +435,19 @@ associated `flymake-category' return DEFAULT."
(t
default))))
-(defun flymake--fringe-overlay-spec (bitmap)
- (and flymake-fringe-indicator-position
- bitmap
- (propertize "!" 'display
- (cons flymake-fringe-indicator-position
- (if (listp bitmap)
- bitmap
- (list bitmap))))))
+(defun flymake--fringe-overlay-spec (bitmap &optional recursed)
+ (if (and (symbolp bitmap)
+ (boundp bitmap)
+ (not recursed))
+ (flymake--fringe-overlay-spec
+ (symbol-value bitmap) t)
+ (and flymake-fringe-indicator-position
+ bitmap
+ (propertize "!" 'display
+ (cons flymake-fringe-indicator-position
+ (if (listp bitmap)
+ bitmap
+ (list bitmap)))))))
(defun flymake--highlight-line (diagnostic)
"Highlight buffer with info in DIAGNOSTIC."
@@ -433,7 +473,8 @@ associated `flymake-category' return DEFAULT."
(and cat
(plist-member (symbol-plist cat) prop))))
(overlay-put ov prop value))))
- (default-maybe 'bitmap flymake-error-bitmap)
+ (default-maybe 'bitmap 'flymake-error-bitmap)
+ (default-maybe 'face 'flymake-error)
(default-maybe 'before-string
(flymake--fringe-overlay-spec
(overlay-get ov 'bitmap)))
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2b735b4 08/39: New Flymake variable flymake-diagnostic-types-alist and much cleanup, (continued)
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2b735b4 08/39: New Flymake variable flymake-diagnostic-types-alist and much cleanup, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2971cd0 38/39: Minimal tweak as an attempt to future-proof Flymake API, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 c1661fc 36/39: Hook Flymake onto proper checkdoc and byte-compile interfaces, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 38fdbd6 34/39: Capitalize "Flymake" in docstrings and comments, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 b80d29d 39/39: Start rewriting Flymake manual, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 b4099cb 18/39: New Flymake API variable flymake-diagnostic-functions, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 a506cc6 25/39: Fix three Flymake bugs when checking C header files, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 de4e13a 17/39: More Flymake cleanup before advancing to backend redesign, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 fd9e32c 15/39: Flymake highlights GCC info/notes as detected by flymake-proc.el, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 be9dd4c 32/39: Improve use of flymake-no-changes-timeout, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 8f0f9cc 28/39: Flymake uses some new fringe bitmaps,
João Távora <=
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 3ecfe98 35/39: Tweak Flymake autoloads and dependencies, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 26ac964 23/39: A couple of Flymake backends for emacs-lisp-mode, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 fbc6359 31/39: Flymake variable flymake-diagnostic-functions now a special hook, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 4a110bf 22/39: Fancy Flymake mode-line construct displays status, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 fc30b6b 19/39: Simplify Flymake logging and erroring, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 6a5e6ad 05/39: Flymake diagnostics now apply to arbitrary buffer regions, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 3169bd9 37/39: Integrate elisp checkers into elisp-mode.el directly, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 1f40144 04/39: Move symbols in flymake-proc.el to separate namespace, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 5f0e3328 30/39: A batch of minor flymake cleanup actions agreed to with Stefan, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 71776ec 01/39: Split Flymake into flymake.el into flymake-proc.el (again!), João Távora, 2017/10/02