From 24c38527d134951d3cfe8e3adae0b723061920d5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 12 Nov 2012 00:42:27 -0800 Subject: [PATCH] Document flymake fringe bitmaps * doc/misc/flymake.texi (Customizable variables) (Highlighting erroneous lines): Mention flymake-error-bitmap, flymake-warning-bitmap, and flymake-fringe-indicator-position. * lisp/progmodes/flymake.el (flymake-error-bitmap) (flymake-warning-bitmap, flymake-fringe-indicator-position): Doc fixes. (flymake-error-bitmap, flymake-warning-bitmap): Fix :types. * etc/NEWS: Related markup. --- doc/misc/ChangeLog | 6 ++++++ doc/misc/flymake.texi | 20 ++++++++++++++++++++ etc/NEWS | 1 + lisp/ChangeLog | 6 ++++++ lisp/progmodes/flymake.el | 30 ++++++++++++++++++++++-------- 5 files changed, 55 insertions(+), 8 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 80d19f3adaa..b3b4ad07147 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2012-11-12 Glenn Morris + + * flymake.texi (Customizable variables) + (Highlighting erroneous lines): Mention flymake-error-bitmap, + flymake-warning-bitmap, and flymake-fringe-indicator-position. + 2012-11-09 Chong Yidong * url.texi (Introduction): Move url-configuration-directory to diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 28fb7864f06..4a873490e86 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -337,6 +337,17 @@ been reported. A custom face for highlighting lines for which at least one warning and no errors have been reported. +@item flymake-error-bitmap +A bitmap used in the fringe to mark lines for which an error has +been reported. + +@item flymake-warning-bitmap +A bitmap used in the fringe to mark lines for which a warning has +been reported. + +@item flymake-fringe-indicator-position +Which fringe (if any) should show the warning/error bitmaps. + @end table @node Adding support for a new syntax check tool @@ -718,6 +729,15 @@ are used: @code{flymake-errline} and @code{flymake-warnline}. Errors belonging outside the current buffer are considered to belong to line 1 of the current buffer. +@c This manual does not use vindex. +@c @vindex flymake-fringe-indicator-position +@c @vindex flymake-error-bitmap +@c @vindex flymake-warning-bitmap +If the option @code{flymake-fringe-indicator-position} is non-@code{nil}, +errors and warnings are also highlighted in the left or right fringe, +using the bitmaps specified by @code{flymake-error-bitmap} +and @code{flymake-warning-bitmap}. + @node Interaction with other modes @section Interaction with other modes @cindex Interaction with other modes diff --git a/etc/NEWS b/etc/NEWS index d57e96eb566..6913909c6a8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -440,6 +440,7 @@ when you receive a private message or your nickname is mentioned. *** ERC will look up server/channel names via auth-source and use any channel keys found. ++++ ** Flymake uses fringe bitmaps to indicate errors and warnings. See `flymake-fringe-indicator-position', `flymake-error-bitmap' and `flymake-warning-bitmap'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfd74a15a8a..9a01f2be20f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-11-12 Glenn Morris + + * progmodes/flymake.el (flymake-error-bitmap) + (flymake-warning-bitmap, flymake-fringe-indicator-position): Doc fixes. + (flymake-error-bitmap, flymake-warning-bitmap): Fix :types. + 2012-11-12 Dmitry Gutov * progmodes/ruby-mode.el (ruby-move-to-block): When moving diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 2614af9ffa4..5ba84f8991e 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -764,25 +764,39 @@ line number outside the file being compiled." (and (overlayp ov) (overlay-get ov 'flymake-overlay))) (defcustom flymake-error-bitmap '(exclamation-mark error) - "Bitmap used in the fringe for indicating errors. + "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." +element specifies the face for the bitmap. For possible bitmap +symbols, see `fringe-bitmaps'. See also `flymake-warning-bitmap'. + +The option `flymake-fringe-indicator-position' controls how and where +this is used." :group 'flymake :version "24.3" - :type 'symbol) + :type '(choice (symbol :tag "Bitmap") + (list :tag "Bitmap and face" + (symbol :tag "Bitmap") + (face :tag "Face")))) (defcustom flymake-warning-bitmap 'question-mark - "Bitmap used in the fringe for indicating warnings. + "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." +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 "24.3" - :type 'symbol) + :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, left-fringe or right-fringe. -Fringe indicators are disabled if nil." +The value can be nil (do not use indicators), `left-fringe' or `right-fringe'. +See `flymake-error-bitmap' and `flymake-warning-bitmap'." :group 'flymake :version "24.3" :type '(choice (const left-fringe) -- 2.39.2