about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2022-02-21 22:40:35 -0600
committerCase Duckworth2022-02-21 22:40:35 -0600
commit4326b4327f8b253051bb0f4ee4c6ae7d20985207 (patch)
tree98342de86e3f522cfe470d5a989977f394036c69 /lisp
parentTry to improve bongo tab-bar width (diff)
downloademacs-4326b4327f8b253051bb0f4ee4c6ae7d20985207.tar.gz
emacs-4326b4327f8b253051bb0f4ee4c6ae7d20985207.zip
Further configure mail
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+message.el26
-rw-r--r--lisp/+tab-bar.el2
2 files changed, 27 insertions, 1 deletions
diff --git a/lisp/+message.el b/lisp/+message.el new file mode 100644 index 0000000..b8bc234 --- /dev/null +++ b/lisp/+message.el
@@ -0,0 +1,26 @@
1;;; +message.el --- Extra message-mode functions -*- lexical-binding: t; -*-
2
3;;; Commentary:
4
5;;; Code:
6
7;; Thanks to Alex Schroeder for this!
8;; https://www.emacswiki.org/emacs/Change_Signature_Dynamically
9
10(defun +message-check-for-signature-change (&rest ignore)
11 "Check for a change in the To: or Cc: fields"
12 (when (and (message--in-tocc-p)
13 (not (buffer-narrowed-p)))
14 (save-excursion
15 (goto-char (point-max))
16 (let ((end (point)))
17 (when (re-search-backward message-signature-separator nil t)
18 (delete-region (1- (match-beginning 0)) end)))
19 (message-insert-signature))))
20
21(defun +message-signature-setup ()
22 (make-local-variable 'after-change-functions)
23 (push '+message-check-for-signature-change after-change-functions))
24
25(provide '+message)
26;;; +message.el ends here
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index c56ca68..c4b7420 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -53,7 +53,7 @@
53 "Display a notmuch count in the tab-bar." 53 "Display a notmuch count in the tab-bar."
54 (when (featurep 'notmuch) 54 (when (featurep 'notmuch)
55 (let* ((counts (notmuch-hello-query-counts notmuch-saved-searches)) 55 (let* ((counts (notmuch-hello-query-counts notmuch-saved-searches))
56 (next (cl-find "next" counts :key (lambda (l) (plist-get l :name)) :test 'equal)) 56 (next (cl-find "inbox" counts :key (lambda (l) (plist-get l :name)) :test 'equal))
57 (next-count (plist-get next :count))) 57 (next-count (plist-get next :count)))
58 (when (and next-count (> next-count 0)) 58 (when (and next-count (> next-count 0))
59 `((notmuch-count menu-item 59 `((notmuch-count menu-item