:group 'notmuch
:type 'string)
+(defcustom notmuch-hello-mode-hook nil
+ "Functions called after entering `notmuch-hello-mode'."
+ :group 'notmuch
+ :type 'hook)
+
(defvar notmuch-hello-url "http://notmuchmail.org"
"The `notmuch' web site.")
collect elem))
;; Add the new one.
(customize-save-variable 'notmuch-saved-searches
- (push (cons name search)
- notmuch-saved-searches))
+ (add-to-list 'notmuch-saved-searches
+ (cons name search) t))
(message "Saved '%s' as '%s'." search name)
(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)
)
(progn
(widget-forward 1)
(widget-value (widget-at)))
- (error nil)))))
+ (error nil))))
+ (inhibit-read-only t))
+
+ ;; Delete all editable widget fields. Editable widget fields are
+ ;; tracked in a buffer local variable `widget-field-list' (and
+ ;; others). If we do `erase-buffer' without properly deleting the
+ ;; widgets, some widget-related functions are confused later.
+ (mapc 'widget-delete widget-field-list)
- (kill-all-local-variables)
- (let ((inhibit-read-only t))
- (erase-buffer))
+ (erase-buffer)
(unless (eq major-mode 'notmuch-hello-mode)
(notmuch-hello-mode))