]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-hello.el
emacs: make the refresh functions more consistent
[notmuch] / emacs / notmuch-hello.el
index 75ccf579504b55c6e638fa4b66146ff3aaaaf3c4..089a19d72a989782a7ce809f183a3c8d0bd0437d 100644 (file)
@@ -607,6 +607,7 @@ with `notmuch-hello-query-counts'."
 (defun notmuch-hello-update (&optional no-display)
   "Update the current notmuch view."
   ;; Lazy - rebuild everything.
 (defun notmuch-hello-update (&optional no-display)
   "Update the current notmuch view."
   ;; Lazy - rebuild everything.
+  (interactive)
   (notmuch-hello no-display))
 
 (defun notmuch-hello-window-configuration-change ()
   (notmuch-hello no-display))
 
 (defun notmuch-hello-window-configuration-change ()
@@ -671,7 +672,7 @@ with `notmuch-hello-query-counts'."
   "Keymap for \"notmuch hello\" buffers.")
 (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
 
   "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
  "Major mode for convenient notmuch navigation. This is your entry portal into notmuch.
 
 Saved searches are \"bookmarks\" for arbitrary queries. Hit RET
@@ -702,13 +703,7 @@ The screen may be customized via `\\[customize]'.
 Complete list of currently available key bindings:
 
 \\{notmuch-hello-mode-map}"
 Complete list of currently available key bindings:
 
 \\{notmuch-hello-mode-map}"
- (interactive)
- (kill-all-local-variables)
  (setq notmuch-buffer-refresh-function #'notmuch-hello-update)
  (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)
 )
 
  ;;(setq buffer-read-only t)
 )