1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-19 04:21:45 -07:00

Rewrite Gnus calls to compat function mm-multibyte-p

This commit is contained in:
Lars Ingebrigtsen 2018-04-15 00:30:14 +02:00
parent ad2c4d3c61
commit 9c5a9d4dd4
5 changed files with 10 additions and 9 deletions

View file

@ -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.

View file

@ -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)))

View file

@ -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)

View file

@ -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)))

View file

@ -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))