Our documentation is long enough that I think it will be more useful
to use an entire window for it (which is easily dismissed with 'q').
This is also kinder for a user not well-initiated with emacs, for
whom the multi-window help can be confusing.
(defun notmuch-help ()
"Display help for the current notmuch mode."
(interactive)
- (let ((mode major-mode))
- (with-help-window (help-buffer)
- (princ (substitute-command-keys (notmuch-substitute-command-keys (documentation mode t)))))))
+ (let* ((mode major-mode)
+ (doc (substitute-command-keys (notmuch-substitute-command-keys (documentation mode t)))))
+ (with-current-buffer (generate-new-buffer "*notmuch-help*")
+ (insert doc)
+ (goto-char (point-min))
+ (set-buffer-modified-p nil)
+ (view-buffer (current-buffer) 'kill-buffer-if-not-modified))))
;;;###autoload
(defun notmuch-show-mode ()