X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Fnotmuch-hello.el;h=aff8beb510173fbf74cf8fe704828529ba3f458a;hb=54982e520c3bee74e947e311ee5b1219396fa1a8;hp=8a31f9a1c52ca6aeb7e90c62a8dda4b54686b77c;hpb=b8a136187a3bee1e08aa702951db4b721f0eda6d;p=notmuch
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 8a31f9a1..aff8beb5 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -1,4 +1,4 @@
-;; notmuch-hello.el --- welcome to notmuch, a frontend
+;;; notmuch-hello.el --- welcome to notmuch, a frontend
;;
;; Copyright © David Edmondson
;;
@@ -15,10 +15,12 @@
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
-;; along with Notmuch. If not, see .
+;; along with Notmuch. If not, see .
;;
;; Authors: David Edmondson
+;;; Code:
+
(eval-when-compile (require 'cl))
(require 'widget)
(require 'wid-edit) ; For `widget-forward'.
@@ -263,7 +265,7 @@ International Bureau of Weights and Measures."
:group 'notmuch-hello
:group 'notmuch-hooks)
-(defvar notmuch-hello-url "http://notmuchmail.org"
+(defvar notmuch-hello-url "https://notmuchmail.org"
"The `notmuch' web site.")
(defvar notmuch-hello-custom-section-options
@@ -602,10 +604,11 @@ with `notmuch-hello-query-counts'."
(defimage notmuch-hello-logo ((:type png :file "notmuch-logo.png")))
-(defun notmuch-hello-update (&optional no-display)
- "Update the current notmuch view."
+(defun notmuch-hello-update ()
+ "Update the notmuch-hello buffer."
;; Lazy - rebuild everything.
- (notmuch-hello no-display))
+ (interactive)
+ (notmuch-hello t))
(defun notmuch-hello-window-configuration-change ()
"Hook function to update the hello buffer when it is switched to."
@@ -669,7 +672,7 @@ with `notmuch-hello-query-counts'."
"Keymap for \"notmuch hello\" buffers.")
(fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
-(defun notmuch-hello-mode ()
+(define-derived-mode notmuch-hello-mode fundamental-mode "notmuch-hello"
"Major mode for convenient notmuch navigation. This is your entry portal into notmuch.
Saved searches are \"bookmarks\" for arbitrary queries. Hit RET
@@ -700,13 +703,7 @@ The screen may be customized via `\\[customize]'.
Complete list of currently available key bindings:
\\{notmuch-hello-mode-map}"
- (interactive)
- (kill-all-local-variables)
(setq notmuch-buffer-refresh-function #'notmuch-hello-update)
- (use-local-map notmuch-hello-mode-map)
- (setq major-mode 'notmuch-hello-mode
- mode-name "notmuch-hello")
- (run-mode-hooks 'notmuch-hello-mode-hook)
;;(setq buffer-read-only t)
)
@@ -867,7 +864,7 @@ Supports the following entries in OPTIONS as a plist:
:hide-if-empty - hide if no buttons would be shown
(only makes sense without :show-empty-searches)
:filter - This can be a function that takes the search query as its argument and
- returns a filter to be used in conjuction with the query for that search or nil
+ returns a filter to be used in conjunction with the query for that search or nil
to hide the element. This can also be a string that is used as a combined with
each query using \"and\".
:filter-count - Separate filter to generate the count displayed each search. Accepts
@@ -1016,3 +1013,5 @@ following:
;;
(provide 'notmuch-hello)
+
+;;; notmuch-hello.el ends here