]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-wash.el
Merge branch 'release'
[notmuch] / emacs / notmuch-wash.el
index a76b4f5b589ab0d0f1ada7ced2bc024e31a5b91b..07fc1a1f6325363df0e0a55268899851dd3cc109 100644 (file)
@@ -1,4 +1,4 @@
-;; notmuch-wash.el --- cleaning up message bodies
+;;; notmuch-wash.el --- cleaning up message bodies
 ;;
 ;; Copyright © Carl Worth
 ;; Copyright © David Edmondson
 ;; General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with Notmuch.  If not, see <http://www.gnu.org/licenses/>.
+;; along with Notmuch.  If not, see <https://www.gnu.org/licenses/>.
 ;;
 ;; Authors: Carl Worth <cworth@cworth.org>
 ;;          David Edmondson <dme@dme.org>
 
+;;; Code:
+
 (require 'coolj)
 
 (declare-function notmuch-show-insert-bodypart "notmuch-show" (msg part depth &optional hide))
+(defvar notmuch-show-indent-messages-width)
 
 ;;
 
@@ -333,12 +336,13 @@ message at the window width. When doing so, citation leaders in
 the wrapped text are maintained."
 
   (let* ((coolj-wrap-follows-window-size nil)
+        (indent (* depth notmuch-show-indent-messages-width))
         (limit (if (numberp notmuch-wash-wrap-lines-length)
                    (min notmuch-wash-wrap-lines-length
                         (window-width))
                  (window-width)))
         (fill-column (- limit
-                        depth
+                        indent
                         ;; 2 to avoid poor interaction with
                         ;; `word-wrap'.
                         2)))
@@ -423,3 +427,5 @@ for error."
 ;;
 
 (provide 'notmuch-wash)
+
+;;; notmuch-wash.el ends here