emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9c5a9d4: Rewrite Gnus calls to compat function mm-m


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 9c5a9d4: Rewrite Gnus calls to compat function mm-multibyte-p
Date: Sat, 14 Apr 2018 18:30:31 -0400 (EDT)

branch: master
commit 9c5a9d4dd4e8dcdafe240b067f26681de4a0d4bf
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Rewrite Gnus calls to compat function mm-multibyte-p
---
 lisp/gnus/message.el   | 7 ++++---
 lisp/gnus/mm-bodies.el | 4 ++--
 lisp/gnus/mm-decode.el | 2 +-
 lisp/gnus/mm-util.el   | 4 ++--
 lisp/gnus/nnmail.el    | 2 +-
 5 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index a5f1dfb..33c5e2c 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1351,7 +1351,8 @@ If nil, Message won't auto-save."
   :link '(custom-manual "(message)Various Message Variables")
   :type '(choice directory (const :tag "Don't auto-save" nil)))
 
-(defcustom message-default-charset (and (not (mm-multibyte-p)) 'iso-8859-1)
+(defcustom message-default-charset (and (not enable-multibyte-characters)
+                                       'iso-8859-1)
   "Default charset used in non-MULE Emacsen.
 If nil, you might be asked to input the charset."
   :version "21.1"
@@ -4294,7 +4295,7 @@ conformance."
                                (point-max))))
               (setq char (char-after)))
        (when (or (< char 128)
-                 (and (mm-multibyte-p)
+                 (and enable-multibyte-characters
                       (memq (char-charset char)
                             '(eight-bit-control eight-bit-graphic
                                                 ;; Emacs 23, Bug#1770:
@@ -4326,7 +4327,7 @@ conformance."
        (while (not (eobp))
          (when (let ((char (char-after)))
                  (or (< char 128)
-                     (and (mm-multibyte-p)
+                     (and enable-multibyte-characters
                           ;; FIXME: Wrong for Emacs 23 (unicode) and for
                           ;; things like undecodable utf-8 (in Emacs 21?).
                           ;; Should at least use find-coding-systems-region.
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index faf887c..e292dac 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -262,7 +262,7 @@ decoding.  If it is nil, default to `mail-parse-charset'."
            (setq coding-system
                  (mm-charset-to-coding-system mail-parse-charset)))
        (when (and charset coding-system
-                  (mm-multibyte-p)
+                  enable-multibyte-characters
                   (or (not (eq coding-system 'ascii))
                       (setq coding-system mail-parse-charset)))
          (decode-coding-region (point-min) (point-max) coding-system))
@@ -289,7 +289,7 @@ decoding.  If it is nil, default to `mail-parse-charset'."
         (setq coding-system
               (mm-charset-to-coding-system mail-parse-charset)))
      (when (and charset coding-system
-               (mm-multibyte-p)
+               enable-multibyte-characters
                (or (not (eq coding-system 'ascii))
                    (setq coding-system mail-parse-charset)))
        (decode-coding-string string coding-system)))
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 18c5837..3e6883b 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -760,7 +760,7 @@ MIME-Version header before proceeding."
 (defun mm-copy-to-buffer ()
   "Copy the contents of the current buffer to a fresh buffer."
   (let ((obuf (current-buffer))
-        (mb (mm-multibyte-p))
+        (mb enable-multibyte-characters)
         beg)
     (goto-char (point-min))
     (search-forward-regexp "^\n" nil t)
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 42c2f3a..25b1568 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -559,7 +559,7 @@ nil means ASCII, a single-element list represents an 
appropriate MIME
 charset, and a longer list means no appropriate charset."
   (let (charsets)
     ;; The return possibilities of this function are a mess...
-    (or (and (mm-multibyte-p)
+    (or (and enable-multibyte-characters
             mm-use-find-coding-systems-region
             ;; Find the mime-charset of the most preferred coding
             ;; system that has one.
@@ -628,7 +628,7 @@ charset, and a longer list means no appropriate charset."
 (defun mm-find-charset-region (b e)
   "Return a list of Emacs charsets in the region B to E."
   (cond
-   ((mm-multibyte-p)
+   (enable-multibyte-characters
     ;; Remove composition since the base charsets have been included.
     ;; Remove eight-bit-*, treat them as ascii.
     (let ((css (find-charset-region b e)))
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index d751f18..08db5ab 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1249,7 +1249,7 @@ Return the number of characters in the body."
                     (progn (forward-line 1) (point))))
     (insert (format "Xref: %s" (system-name)))
     (while group-alist
-      (insert (if (mm-multibyte-p)
+      (insert (if enable-multibyte-characters
                  (format " %s:%d" (caar group-alist) (cdar group-alist))
                (encode-coding-string
                 (format " %s:%d" (caar group-alist) (cdar group-alist))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]