From 510aa7505fc14e0ebc6a0d220160397f068c5c04 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 7 May 2019 08:18:49 -0400 Subject: [PATCH] Stop using message-default-charset (Bug#35370) In 2016-02-14 "Remove compat code for older Emacsen", message-default-charset was obsoleted, and a couple of uses were removed, but others were left behind. * lisp/gnus/message.el (message-send-mail) (message-send-news, message-do-fcc) (message-encode-message-body): * lisp/gnus/mml.el (mml-to-mime): Stop using message-default-charset. --- lisp/gnus/message.el | 13 ++++--------- lisp/gnus/mml.el | 4 +--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index c8b6f0ee685..2c2122d89ab 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4588,8 +4588,7 @@ This function could be useful in `message-setup-hook'." (message-generate-headers '(Lines))) ;; Remove some headers. (message-remove-header message-ignored-mail-headers t) - (let ((mail-parse-charset message-default-charset)) - (mail-encode-encoded-word-buffer))) + (mail-encode-encoded-word-buffer)) (goto-char (point-max)) ;; require one newline at the end. (or (= (preceding-char) ?\n) @@ -4962,8 +4961,7 @@ Otherwise, generate and save a value for `canlock-password' first." (message-generate-headers '(Lines))) ;; Remove some headers. (message-remove-header message-ignored-news-headers t) - (let ((mail-parse-charset message-default-charset)) - (mail-encode-encoded-word-buffer))) + (mail-encode-encoded-word-buffer)) (goto-char (point-max)) ;; require one newline at the end. (or (= (preceding-char) ?\n) @@ -5441,8 +5439,7 @@ The result is a fixnum." (while (setq file (message-fetch-field "fcc" t)) (push file list) (message-remove-header "fcc" nil t)) - (let ((mail-parse-charset message-default-charset) - (rfc2047-header-encoding-alist + (let ((rfc2047-header-encoding-alist (cons '("Newsgroups" . default) rfc2047-header-encoding-alist))) (mail-encode-encoded-word-buffer))) @@ -8101,9 +8098,7 @@ regexp VARSTR." (defun message-encode-message-body () (unless message-inhibit-body-encoding - (let ((mail-parse-charset (or mail-parse-charset - message-default-charset)) - (case-fold-search t) + (let ((case-fold-search t) lines content-type-p) (message-goto-body) (save-restriction diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index f6d358dfc09..7a99a0dc46c 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -48,7 +48,6 @@ (defvar gnus-article-mime-handles) (defvar gnus-newsrc-hashtb) -(defvar message-default-charset) (defvar message-deletable-headers) (defvar message-options) (defvar message-posting-charset) @@ -1015,8 +1014,7 @@ If HANDLES is non-nil, use it instead reparsing the buffer." ;; Skip past any From_ headers. (while (looking-at "From ") (forward-line 1)) - (let ((mail-parse-charset message-default-charset)) - (mail-encode-encoded-word-buffer))) + (mail-encode-encoded-word-buffer)) (message-encode-message-body)) (defun mml-insert-mime (handle &optional no-markup) -- 2.39.2