* mu4e-view.el: indent continuation header lines, so they're easier distinguishable

This commit is contained in:
djcb
2012-04-19 19:00:09 +03:00
parent 1ba30650e3
commit 3d1c5bb1e9

View File

@ -140,14 +140,20 @@ marking if it still had that."
(defun mu4e-view-header (key val &optional dont-propertize-val)
"Return header KEY with value VAL if VAL is non-nil. If
DONT-PROPERTIZE-VAL, do not add text-properties to VAL."
DONT-PROPERTIZE-VAL is non-nil, do not add text-properties to VAL."
(if val
(with-temp-buffer
(insert (propertize key 'face 'mu4e-view-header-key-face) ": "
(if dont-propertize-val
val
(propertize val 'face 'mu4e-view-header-value-face)) "\n")
;; temporarily set the fill column <margin> positions to the right, so
;; we can indent following lines with positions
(let*((margin 1) (fill-column (- fill-column margin)))
(fill-region (point-min) (point-max))
(goto-char (point-min))
(while (and (zerop (forward-line 1)) (not (looking-at "^$")))
(indent-to-column margin)))
(buffer-string))
""))
@ -386,7 +392,6 @@ is nil, and otherwise open it."
;; esp. with '>' cited parts
(when (fboundp 'filladapt-mode)
(filladapt-mode))
(setq truncate-lines t))