* lisp/gnus/mm-encode.el (mm-default-buffer-type): Check `major-mode'.

This commit is contained in:
Michael Albinus 2025-03-25 15:13:16 +01:00
parent 0b1102a704
commit a15534f32e

View file

@ -109,10 +109,8 @@ This variable should never be set directly, but bound before a call to
(defun mm-default-buffer-type (buffer)
"Return a default content type for BUFFER, a buffer name."
(if (and (stringp buffer)
(string-match-p
(rx (| "*Diff*" "*vc-diff*" "*ediff-diff*" "*ediff-custom-diff*"))
buffer))
(if-let* ((buf (get-buffer buffer))
((eq (buffer-local-value 'major-mode buf) 'diff-mode)))
"text/x-patch" "text/plain"))
(defun mm-safer-encoding (encoding &optional type)