Merge pull request #403 from thierryvolpiatto/master
* mu4e: format regions quoted with `message-mark-inserted-region'
This commit is contained in:
@ -525,6 +525,11 @@ mu4e-compose-mode."
|
|||||||
mu4e-compose-mode."
|
mu4e-compose-mode."
|
||||||
:group 'mu4e-faces)
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
|
(defface mu4e-region-code
|
||||||
|
'((t (:background "DarkSlateGray")))
|
||||||
|
"Face for highlighting marked region in mu4e-view buffer."
|
||||||
|
:group 'mu4e-faces)
|
||||||
|
|
||||||
;; headers info
|
;; headers info
|
||||||
(defconst mu4e-header-info
|
(defconst mu4e-header-info
|
||||||
'( (:attachments .
|
'( (:attachments .
|
||||||
|
|||||||
@ -903,6 +903,32 @@ all messages in the subthread at point in the headers view."
|
|||||||
(interactive)
|
(interactive)
|
||||||
(mu4e~view-in-headers-context (mu4e-headers-search-edit)))
|
(mu4e~view-in-headers-context (mu4e-headers-search-edit)))
|
||||||
|
|
||||||
|
(defun mu4e-mark-region-code ()
|
||||||
|
"Highlight region marked with `message-mark-inserted-region'.
|
||||||
|
Add this function to `mu4e-view-mode-hook' to enable this feature."
|
||||||
|
(require 'message)
|
||||||
|
(let (beg end ov-beg ov-end ov-inv)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
|
(while (re-search-forward
|
||||||
|
(concat "^" message-mark-insert-begin) nil t)
|
||||||
|
(setq ov-beg (match-beginning 0)
|
||||||
|
ov-end (match-end 0)
|
||||||
|
ov-inv (make-overlay ov-beg ov-end)
|
||||||
|
beg ov-end)
|
||||||
|
(overlay-put ov-inv 'invisible t)
|
||||||
|
(when (re-search-forward
|
||||||
|
(concat "^" message-mark-insert-end) nil t)
|
||||||
|
(setq ov-beg (match-beginning 0)
|
||||||
|
ov-end (match-end 0)
|
||||||
|
ov-inv (make-overlay ov-beg ov-end)
|
||||||
|
end ov-beg)
|
||||||
|
(overlay-put ov-inv 'invisible t))
|
||||||
|
(when (and beg end)
|
||||||
|
(let ((ov (make-overlay beg end)))
|
||||||
|
(overlay-put ov 'face 'mu4e-region-code))
|
||||||
|
(setq beg nil end nil))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; attachment handling
|
;; attachment handling
|
||||||
(defun mu4e~view-get-attach-num (prompt msg &optional multi)
|
(defun mu4e~view-get-attach-num (prompt msg &optional multi)
|
||||||
|
|||||||
Reference in New Issue
Block a user