* mu4e/mu4e-utils.el (mu4e~fontify-cited): Use string-width.
* mu4e/mu4e-vars.el (mu4e-cited-regexp): Improve it.
This commit is contained in:
@ -1090,10 +1090,10 @@ used in the view and compose modes."
|
||||
(goto-char (point-min))
|
||||
(when (search-forward-regexp "^\n" nil t) ;; search the first empty line
|
||||
(while (re-search-forward mu4e-cited-regexp nil t)
|
||||
(let* ((level (length (replace-regexp-in-string " " "" (match-string 1))))
|
||||
(face
|
||||
(unless (zerop level)
|
||||
(intern-soft (format "mu4e-cited-%d-face" level)))))
|
||||
(let* ((level (string-width (replace-regexp-in-string
|
||||
" " "" (match-string 1))))
|
||||
(face (unless (zerop level)
|
||||
(intern-soft (format "mu4e-cited-%d-face" level)))))
|
||||
(when face
|
||||
(add-text-properties (line-beginning-position 1)
|
||||
(line-end-position 1) `(face ,face)))))))))
|
||||
|
||||
@ -181,7 +181,7 @@ view buffer."
|
||||
:type 'boolean
|
||||
:group 'mu4e)
|
||||
|
||||
(defcustom mu4e-cited-regexp "^ *\\(> *>*\\)"
|
||||
(defcustom mu4e-cited-regexp "^ *\\(\\(>+ ?\\)+\\)"
|
||||
"Regular expression that determines whether a line is a citation."
|
||||
:type 'string
|
||||
:group 'mu4e)
|
||||
|
||||
Reference in New Issue
Block a user