-`notmuch-show-headers'.")
-
-(defvar notmuch-show-hook '(notmuch-show-pretty-hook)
- "A list of functions called after populating a
-`notmuch-show' buffer.")
-
-(defun notmuch-show-pretty-hook ()
- (goto-address-mode 1)
- (visual-line-mode))
-
-(defun notmuch-toggle-invisible-action (cite-button)
- (let ((invis-spec (button-get cite-button 'invisibility-spec)))
- (if (invisible-p invis-spec)
- (remove-from-invisibility-spec invis-spec)
- (add-to-invisibility-spec invis-spec)
- ))
- (force-window-update)
- (redisplay t))
-
-(define-button-type 'notmuch-button-invisibility-toggle-type
- 'action 'notmuch-toggle-invisible-action
- 'follow-link t
- 'face 'font-lock-comment-face)
-(define-button-type 'notmuch-button-citation-toggle-type
- 'help-echo "mouse-1, RET: Show citation"
- :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-signature-toggle-type
- 'help-echo "mouse-1, RET: Show signature"
- :supertype 'notmuch-button-invisibility-toggle-type)
-(define-button-type 'notmuch-button-headers-toggle-type
- 'help-echo "mouse-1, RET: Show headers"
- :supertype 'notmuch-button-invisibility-toggle-type)
-
-(defun notmuch-show-region-to-button (beg end type prefix button-text)
- "Auxilary function to do the actual making of overlays and buttons
-
-BEG and END are buffer locations. TYPE should a string, either
-\"citation\" or \"signature\". PREFIX is some arbitrary text to
-insert before the button, probably for indentation. BUTTON-TEXT
-is what to put on the button."
-
-;; This uses some slightly tricky conversions between strings and
-;; symbols because of the way the button code works. Note that
-;; replacing intern-soft with make-symbol will cause this to fail,
-;; since the newly created symbol has no plist.
-
- (let ((overlay (make-overlay beg end))
- (invis-spec (make-symbol (concat "notmuch-" type "-region")))
- (button-type (intern-soft (concat "notmuch-button-"
- type "-toggle-type"))))
- (add-to-invisibility-spec invis-spec)
- (overlay-put overlay 'invisible invis-spec)
- (goto-char (1+ end))
- (save-excursion
- (goto-char (1- beg))
- (insert prefix)
- (insert-button button-text
- 'invisibility-spec invis-spec
- :type button-type))))
+`notmuch-message-headers'.")
+
+(defcustom notmuch-show-hook nil
+ "Functions called after populating a `notmuch-show' buffer."
+ :group 'notmuch
+ :type 'hook)
+
+(defcustom notmuch-show-insert-text/plain-hook '(notmuch-wash-excerpt-citations)
+ "Functions used to improve the display of text/plain parts."
+ :group 'notmuch
+ :type 'hook
+ :options '(notmuch-wash-convert-inline-patch-to-part
+ notmuch-wash-wrap-long-lines
+ notmuch-wash-tidy-citations
+ notmuch-wash-elide-blank-lines
+ notmuch-wash-excerpt-citations))