aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-01-10 15:01:05 +0100
committerDavid Bremner <david@tethera.net>2021-01-15 06:45:20 -0400
commit25a8873c68f9ef033d393efaf7f4c46a29f798f4 (patch)
treec3518e3c3dfaca6e9bfc3f82107beb5ab699574a /emacs/notmuch.el
parentc6ac1121d4af9ff1187ae2f5a361fb74ef9c281b (diff)
emacs: reorder notmuch.el a bit
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el41
1 files changed, 20 insertions, 21 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 481a0e0a..40b730df 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -70,6 +70,8 @@
(require 'mm-view)
(require 'message)
+(require 'hl-line)
+
(require 'notmuch-lib)
(require 'notmuch-tag)
(require 'notmuch-show)
@@ -114,8 +116,12 @@ there will be called at other points of notmuch execution."
:type 'file
:group 'notmuch)
-(defvar notmuch-query-history nil
- "Variable to store minibuffer history for notmuch queries.")
+(defcustom notmuch-search-hook '(notmuch-hl-line-mode)
+ "List of functions to call when notmuch displays the search results."
+ :type 'hook
+ :options '(notmuch-hl-line-mode)
+ :group 'notmuch-search
+ :group 'notmuch-hooks)
;;; Mime Utilities
@@ -155,24 +161,6 @@ there will be called at other points of notmuch execution."
(mm-save-part p))))
mm-handle))
-;;; Integrations
-
-(require 'hl-line)
-
-(defun notmuch-hl-line-mode ()
- (prog1 (hl-line-mode)
- (when hl-line-overlay
- (overlay-put hl-line-overlay 'priority 1))))
-
-;;; Options
-
-(defcustom notmuch-search-hook '(notmuch-hl-line-mode)
- "List of functions to call when notmuch displays the search results."
- :type 'hook
- :options '(notmuch-hl-line-mode)
- :group 'notmuch-search
- :group 'notmuch-hooks)
-
;;; Keymap
(defvar notmuch-search-mode-map
@@ -207,6 +195,9 @@ there will be called at other points of notmuch execution."
;;; Internal Variables
+(defvar notmuch-query-history nil
+ "Variable to store minibuffer history for notmuch queries.")
+
(defvar-local notmuch-search-query-string nil)
(defvar-local notmuch-search-target-thread nil)
(defvar-local notmuch-search-target-line nil)
@@ -1150,7 +1141,15 @@ If no notmuch buffers exist, run `notmuch'."
(pop-to-buffer-same-window first))
(notmuch))))
-;;; Imenu Support
+;;; Integrations
+;;;; Hl-line Support
+
+(defun notmuch-hl-line-mode ()
+ (prog1 (hl-line-mode)
+ (when hl-line-overlay
+ (overlay-put hl-line-overlay 'priority 1))))
+
+;;;; Imenu Support
(defun notmuch-search-imenu-prev-index-position-function ()
"Move point to previous message in notmuch-search buffer.