aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-10-30 01:34:41 +0000
committerKenichi Handa2000-10-30 01:34:41 +0000
commita89f541b4ad5faae5269295e0ecfb1f82e60efc1 (patch)
tree34c6b607e0560e37f7a2c83e7f9c890967ca4ead
parentfa0cb51dd0876c564161160f3d5ae2027e9614a3 (diff)
downloademacs-a89f541b4ad5faae5269295e0ecfb1f82e60efc1.tar.gz
emacs-a89f541b4ad5faae5269295e0ecfb1f82e60efc1.zip
(encode-coding-char): Check property safe-chars instead of
safe-charsets.
-rw-r--r--lisp/international/mule-cmds.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 69f11ea8952..f02c470c8b5 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1952,13 +1952,13 @@ It can be retrieved with `(get-char-code-property CHAR PROPNAME)'."
1952If CODING-SYSTEM can't safely encode CHAR, return nil." 1952If CODING-SYSTEM can't safely encode CHAR, return nil."
1953 (let ((str1 (string-as-multibyte (char-to-string char))) 1953 (let ((str1 (string-as-multibyte (char-to-string char)))
1954 (str2 (string-as-multibyte (make-string 2 char))) 1954 (str2 (string-as-multibyte (make-string 2 char)))
1955 (safe-charsets (and coding-system 1955 (safe-chars (and coding-system
1956 (coding-system-get coding-system 'safe-charsets))) 1956 (coding-system-get coding-system 'safe-chars)))
1957 (charset (char-charset char)) 1957 (charset (char-charset char))
1958 enc1 enc2 i1 i2) 1958 enc1 enc2 i1 i2)
1959 (when (or (eq safe-charsets t) 1959 (when (or (eq safe-chars t)
1960 (eq charset 'ascii) 1960 (eq charset 'ascii)
1961 (memq charset safe-charsets)) 1961 (and safe-chars (aref safe-chars char)))
1962 ;; We must find the encoded string of CHAR. But, just encoding 1962 ;; We must find the encoded string of CHAR. But, just encoding
1963 ;; CHAR will put extra control sequences (usually to designate 1963 ;; CHAR will put extra control sequences (usually to designate
1964 ;; ASCII charaset) at the tail if type of CODING is ISO 2022. 1964 ;; ASCII charaset) at the tail if type of CODING is ISO 2022.