]> git.cworth.org Git - notmuch/commitdiff
emacs: Re-enable line wrapping in `notmuch-show-mode'.
authorDavid Edmondson <dme@dme.org>
Thu, 26 Jan 2012 08:17:50 +0000 (08:17 +0000)
committerDavid Bremner <bremner@debian.org>
Fri, 27 Jan 2012 11:48:06 +0000 (07:48 -0400)
Turn on `visual-line-mode' via a hook, so that those who so choose can
avoid it.

emacs/notmuch-show.el

index c37479a52f043b506130aaa81c01383840920b32..94d94ed235b3d877123739e39f40f6bdcdb0692f 100644 (file)
@@ -71,9 +71,10 @@ any given message."
   "A list of functions called to decorate the headers listed in
 `notmuch-message-headers'.")
 
-(defcustom notmuch-show-hook nil
+(defcustom notmuch-show-hook '(notmuch-show-turn-on-visual-line-mode)
   "Functions called after populating a `notmuch-show' buffer."
   :type 'hook
+  :options '(notmuch-show-turn-on-visual-line-mode)
   :group 'notmuch-show
   :group 'notmuch-hooks)
 
@@ -133,6 +134,10 @@ indentation."
            ,@body)
         (kill-buffer buf)))))
 
+(defun notmuch-show-turn-on-visual-line-mode ()
+  "Enable Visual Line mode."
+  (visual-line-mode t))
+
 (defun notmuch-show-view-all-mime-parts ()
   "Use external viewers to view all attachments from the current message."
   (interactive)