emacs: Fix display of highlighted line in notmuch-search

When notmuch-search-line-faces is used to set background color in search
results, the highlight of the current line is not always displayed
correctly. This patch fixes that by increasing the priority property of
the highlight overlay.
This commit is contained in:
Michal Sojka 2012-02-14 18:09:47 +01:00 committed by David Bremner
parent 36ce7e3c98
commit e4ceb19cc7

View file

@ -249,10 +249,17 @@ For a mouse binding, return nil."
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(view-buffer (current-buffer) 'kill-buffer-if-not-modified)))) (view-buffer (current-buffer) 'kill-buffer-if-not-modified))))
(defcustom notmuch-search-hook '(hl-line-mode) (require 'hl-line)
(defun notmuch-hl-line-mode ()
(prog1 (hl-line-mode)
(when hl-line-overlay
(overlay-put hl-line-overlay 'priority 1))))
(defcustom notmuch-search-hook '(notmuch-hl-line-mode)
"List of functions to call when notmuch displays the search results." "List of functions to call when notmuch displays the search results."
:type 'hook :type 'hook
:options '(hl-line-mode) :options '(notmuch-hl-line-mode)
:group 'notmuch-search :group 'notmuch-search
:group 'notmuch-hooks) :group 'notmuch-hooks)
@ -567,7 +574,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".
the messages that are about to be tagged" the messages that are about to be tagged"
:type 'hook :type 'hook
:options '(hl-line-mode) :options '(notmuch-hl-line-mode)
:group 'notmuch-hooks) :group 'notmuch-hooks)
(defcustom notmuch-after-tag-hook nil (defcustom notmuch-after-tag-hook nil
@ -578,7 +585,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".
'query' will be a string containing the search query that determines 'query' will be a string containing the search query that determines
the messages that were tagged" the messages that were tagged"
:type 'hook :type 'hook
:options '(hl-line-mode) :options '(notmuch-hl-line-mode)
:group 'notmuch-hooks) :group 'notmuch-hooks)
(defun notmuch-search-set-tags (tags) (defun notmuch-search-set-tags (tags)