]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
emacs: Fix display of highlighted line in notmuch-show fix-hl-line-priority
authorMichal Sojka <sojka@os.inf.tu-dresden.de>
Mon, 12 Sep 2011 00:14:04 +0000 (02:14 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 12 Sep 2011 08:04:02 +0000 (10:04 +0200)
emacs/notmuch.el

index f11ec24e76111dd813e399ad1ccf15791c4077ca..32b331a9bfd4ed762dd0dd2dd4b6d44867046c3b 100644 (file)
@@ -185,7 +185,14 @@ For a mouse binding, return nil."
       (set-buffer-modified-p nil)
       (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."
   :type 'hook
   :options '(hl-line-mode)
@@ -489,7 +496,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".
 the messages that are about to be tagged"
 
   :type 'hook
-  :options '(hl-line-mode)
+  :options '(notmuch-hl-line-mode)
   :group 'notmuch)
 
 (defcustom notmuch-after-tag-hook nil
@@ -500,7 +507,7 @@ a list of strings of the form \"+TAG\" or \"-TAG\".
 'query' will be a string containing the search query that determines
 the messages that were tagged"
   :type 'hook
-  :options '(hl-line-mode)
+  :options '(notmuch-hl-line-mode)
   :group 'notmuch)
 
 (defun notmuch-search-set-tags (tags)