[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 34eb99d: Add new choice 'keep' to next-error-message-highlight (b
From: |
Juri Linkov |
Subject: |
master 34eb99d: Add new choice 'keep' to next-error-message-highlight (bug#32676) |
Date: |
Sun, 18 Oct 2020 16:38:10 -0400 (EDT) |
branch: master
commit 34eb99d7ba63761ba12acff2b01dc900bbccc720
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
Add new choice 'keep' to next-error-message-highlight (bug#32676)
* lisp/simple.el (next-error-message-highlight): Add new choice 'keep'.
(next-error-message-highlight): Don't delete overlay when option is 'keep'.
---
etc/NEWS | 2 ++
lisp/simple.el | 11 ++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 64758d4..b61bf17 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1185,6 +1185,8 @@ be done (and this restores how this previously worked).
*** New user option 'next-error-message-highlight'.
In addition to a fringe arrow, 'next-error' error may now optionally
highlight the current error message in the 'next-error' buffer.
+This user option can be also customized to keep highlighting on all
+visited errors, so you can have an overview what errors were already visited.
+++
*** New user option 'tab-first-completion'.
diff --git a/lisp/simple.el b/lisp/simple.el
index d6fce92..a29f85b 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -119,8 +119,12 @@ If non-nil, the value is passed directly to `recenter'."
:version "23.1")
(defcustom next-error-message-highlight nil
- "If non-nil, highlight the current error message in the `next-error' buffer."
- :type 'boolean
+ "If non-nil, highlight the current error message in the `next-error' buffer.
+If the value is `keep', highlighting is permanent, so all visited error
+messages are highlighted; this helps to see what messages were visited."
+ :type '(choice (const :tag "Highlight the current error" t)
+ (const :tag "Highlight all visited errors" keep)
+ (const :tag "No highlighting" nil))
:group 'next-error
:version "28.1")
@@ -482,7 +486,8 @@ buffer causes automatic display of the corresponding source
code location."
"Highlight the current error message in the ‘next-error’ buffer."
(when next-error-message-highlight
(with-current-buffer error-buffer
- (when next-error--message-highlight-overlay
+ (when (and next-error--message-highlight-overlay
+ (not (eq next-error-message-highlight 'keep)))
(delete-overlay next-error--message-highlight-overlay))
(let ((ol (make-overlay (line-beginning-position) (1+
(line-end-position)))))
;; do not override region highlighting
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 34eb99d: Add new choice 'keep' to next-error-message-highlight (bug#32676),
Juri Linkov <=