Mercurial > hg > xemacs
diff shared/mail-extras.el @ 3:0a81352bd7d0
catch up
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Sat, 17 Sep 2022 11:01:40 +0100 |
parents | 107d592c5f4a |
children |
line wrap: on
line diff
--- a/shared/mail-extras.el Mon Feb 08 12:29:18 2021 +0000 +++ b/shared/mail-extras.el Sat Sep 17 11:01:40 2022 +0100 @@ -450,6 +450,7 @@ ;; see message-citation-line-function in message.el (defun safe-citation () + (use-text-not-html) (when message-reply-headers (let ((from (mail-header-from message-reply-headers))) (cond ((string-match "^\"?\\([^\"]*\\)\"? <.*>$" from) @@ -459,6 +460,19 @@ (t (insert "[anon] writes:\n\n")))))) +(defun use-text-not-html (&optional clear) + (when (and (if clear (looking-at "<html") + (looking-at "> <html")) + (bufferp (get-buffer "*Shell Command Output*"))) + ;; replace HTML only with result of my HTML filter + (delete-region (point)(mark t)) + (insert-buffer "*Shell Command Output*") + (when (looking-at "piping") + (kill-entire-line) + (indent-rigidly (point) (mark t) -3) + (if (not clear) + (submerge-region (point) (mark t))))) + ) (setq message-citation-line-function (function safe-citation))