]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/mail/rfc2047.el (rfc2047-encodable-p): Don't require `message`.
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 6 Aug 2019 07:58:50 +0000 (03:58 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 6 Aug 2019 07:58:50 +0000 (03:58 -0400)
Use bound-and-true-p rather than requiring `message` to get
message-posting-charset (since it defaults to nil anyway).

lisp/mail/rfc2047.el

index a02201ec323b298811ced74a932cd65bbdf1fd22..188e5dc39697dc900bdd003ecba7cc6078b27361 100644 (file)
@@ -325,7 +325,6 @@ Should be called narrowed to the head of the message."
 (defun rfc2047-encodable-p ()
   "Return non-nil if any characters in current buffer need encoding in headers.
 The buffer may be narrowed."
-  (require 'message)                   ; for message-posting-charset
   (let ((charsets
         (mm-find-mime-charset-region (point-min) (point-max))))
     (goto-char (point-min))
@@ -334,7 +333,7 @@ The buffer may be narrowed."
                 (re-search-forward rfc2047-encoded-word-regexp nil t)
               (goto-char (point-min))))
        (and charsets
-            (not (equal charsets (list (car message-posting-charset))))))))
+            (not (equal charsets (list (car (bound-and-true-p message-posting-charset)))))))))
 
 ;; Use this syntax table when parsing into regions that may need
 ;; encoding.  Double quotes are string delimiters, backslash is