diff options
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/code-pages.el | 282 | ||||
-rw-r--r-- | lisp/international/codepage.el | 22 | ||||
-rw-r--r-- | lisp/international/latexenc.el | 2 | ||||
-rw-r--r-- | lisp/international/mule-cmds.el | 28 | ||||
-rw-r--r-- | lisp/international/mule.el | 8 | ||||
-rw-r--r-- | lisp/international/quail.el | 4 | ||||
-rw-r--r-- | lisp/international/utf-8.el | 5 |
7 files changed, 270 insertions, 81 deletions
diff --git a/lisp/international/code-pages.el b/lisp/international/code-pages.el index 13181268b36..994450b2a70 100644 --- a/lisp/international/code-pages.el +++ b/lisp/international/code-pages.el @@ -1273,6 +1273,138 @@ Return an updated `non-iso-charset-alist'." ?\■ ?\ ]) +;;;###autoload(autoload-coding-system 'cp858 '(require 'code-pages)) +(cp-make-coding-system + cp858 + [?\Ç + ?\ü + ?\é + ?\â + ?\ä + ?\à + ?\å + ?\ç + ?\ê + ?\ë + ?\è + ?\ï + ?\î + ?\ì + ?\Ä + ?\Å + ?\É + ?\æ + ?\Æ + ?\ô + ?\ö + ?\ò + ?\û + ?\ù + ?\ÿ + ?\Ö + ?\Ü + ?\ø + ?\£ + ?\Ø + ?\× + ?\ƒ + ?\á + ?\í + ?\ó + ?\ú + ?\ñ + ?\Ñ + ?\ª + ?\º + ?\¿ + ?\® + ?\¬ + ?\½ + ?\¼ + ?\¡ + ?\« + ?\» + ?\░ + ?\▒ + ?\▓ + ?\│ + ?\┤ + ?\Á + ?\Â + ?\À + ?\© + ?\╣ + ?\║ + ?\╗ + ?\╝ + ?\¢ + ?\¥ + ?\┐ + ?\└ + ?\┴ + ?\┬ + ?\├ + ?\─ + ?\┼ + ?\ã + ?\Ã + ?\╚ + ?\╔ + ?\╩ + ?\╦ + ?\╠ + ?\═ + ?\╬ + ?\¤ + ?\ð + ?\Ð + ?\Ê + ?\Ë + ?\È + ?\€ + ?\Í + ?\Î + ?\Ï + ?\┘ + ?\┌ + ?\█ + ?\▄ + ?\¦ + ?\Ì + ?\▀ + ?\Ó + ?\ß + ?\Ô + ?\Ò + ?\õ + ?\Õ + ?\µ + ?\þ + ?\Þ + ?\Ú + ?\Û + ?\Ù + ?\ý + ?\Ý + ?\¯ + ?\´ + ?\ + ?\± + ?\‗ + ?\¾ + ?\¶ + ?\§ + ?\÷ + ?\¸ + ?\° + ?\¨ + ?\· + ?\¹ + ?\³ + ?\² + ?\■ + ?\ ]) + ;;;###autoload(autoload-coding-system 'cp860 '(require 'code-pages)) (cp-make-coding-system cp860 @@ -3442,11 +3574,11 @@ Return an updated `non-iso-charset-alist'." ?\ƒ ?\§ ?\¤ - nil + ?\’ ?\“ ?\« - nil - nil + ?\‹ + ?\› ?\fi ?\fl ?\® @@ -3457,8 +3589,8 @@ Return an updated `non-iso-charset-alist'." ?\¦ ?\¶ ?\• - nil - nil + ?\‚ + ?\„ ?\” ?\» ?\… @@ -3804,62 +3936,92 @@ Return an updated `non-iso-charset-alist'." (cp-make-coding-system ;; The base system uses arabic-iso-8bit, but that's not a MIME charset. iso-8859-6 - [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil + [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ?\ - ?\¤ - ?\، - ?\ - ?\؛ - ?\؟ - ?\ء - ?\آ - ?\أ - ?\ؤ - ?\إ - ?\ئ - ?\ا - ?\ب - ?\ة - ?\ت - ?\ث - ?\ج - ?\ح - ?\خ - ?\د - ?\ذ - ?\ر - ?\ز - ?\س - ?\ش - ?\ص - ?\ض - ?\ط - ?\ظ - ?\ع - ?\غ - ?\ـ - ?\ف - ?\ق - ?\ك - ?\ل - ?\م - ?\ن - ?\ه - ?\و - ?\ى - ?\ي - ?\ً - ?\ٌ - ?\ٍ - ?\َ - ?\ُ - ?\ِ - ?\ّ - ?\ْ - nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - nil nil nil nil nil nil nil nil nil nil nil] + nil + nil + nil + ?¤ + nil + nil + nil + nil + nil + nil + nil + ?، + ? + nil + nil + nil + nil + nil + nil + nil + nil + nil + nil + nil + nil + nil + ?؛ + nil + nil + nil + ?؟ + nil + ?ء + ?آ + ?أ + ?ؤ + ?إ + ?ئ + ?ا + ?ب + ?ة + ?ت + ?ث + ?ج + ?ح + ?خ + ?د + ?ذ + ?ر + ?ز + ?س + ?ش + ?ص + ?ض + ?ط + ?ظ + ?ع + ?غ + nil + nil + nil + nil + nil + ?ـ + ?ف + ?ق + ?ك + ?ل + ?م + ?ن + ?ه + ?و + ?ى + ?ي + ?ً + ?ٌ + ?ٍ + ?َ + ?ُ + ?ِ + ?ّ + ?ْ + nil nil nil nil nil nil nil nil nil nil nil nil nil] "Unicode-based Arabic ISO/IEC 8859-6 (MIME: ISO-8859-6)" ?6) (define-coding-system-alias 'arabic-iso-8bit 'iso-8859-6) diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el index 56920b968ac..e2499002a34 100644 --- a/lisp/international/codepage.el +++ b/lisp/international/codepage.el @@ -220,16 +220,32 @@ character is generated by (make-char CHARSET OFFSET)." ;; character created by (make-char 'latin-iso8859-1 (+ N 160)). ;; The element nil means there's no corresponding cp850 glyph. [ - 255 173 189 156 207 190 221 245 249 184 166 174 170 240 169 nil + 255 173 189 156 207 190 221 245 249 184 166 174 170 240 169 238 248 241 253 252 239 230 244 250 247 251 167 175 172 171 243 168 183 181 182 199 142 143 146 128 212 144 210 211 222 214 215 216 - 209 165 227 224 226 229 153 158 157 235 233 234 154 237 231 225 + 209 165 227 224 226 229 153 158 157 235 233 234 154 237 232 225 133 160 131 198 132 134 145 135 138 130 136 137 141 161 140 139 - 208 164 149 162 147 228 148 246 155 151 163 150 129 236 232 152] + 208 164 149 162 147 228 148 246 155 151 163 150 129 236 231 152] "Table for converting ISO-8859-1 characters into codepage 850 glyphs.") (setplist 'cp850-decode-table '(charset latin-iso8859-1 language "Latin-1" offset 160)) +;; Multilingual (Latin-9) +(defvar cp858-decode-table + ;; Nth element is the code of a cp858 glyph for the multibyte + ;; character created by (make-char 'latin-iso8859-15 (+ N 160)). + ;; The element nil means there's no corresponding cp858 glyph. + [ + 255 173 189 156 213 190 221 245 249 184 166 174 170 240 169 238 + 248 241 253 252 239 230 244 250 247 251 167 175 172 171 243 168 + 183 181 182 199 142 143 146 128 212 144 210 211 222 214 215 216 + 209 165 227 224 226 229 153 158 157 235 233 234 154 237 232 225 + 133 160 131 198 132 134 145 135 138 130 136 137 141 161 140 139 + 208 164 149 162 147 228 148 246 155 151 163 150 129 236 231 152] + "Table for converting ISO-8859-15 characters into codepage 858 glyphs.") +(setplist 'cp858-decode-table + '(charset latin-iso8859-15 language "Latin-9" offset 160)) + ;; Greek (defvar cp851-decode-table [ diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index 58e8d6c88e8..4f9b4f740d5 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -63,7 +63,7 @@ ("cp437" . cp437) ; IBM code page 437: 225 is \beta ("cp850" . cp850) ; IBM code page 850 ("cp852" . cp852) ; IBM code page 852 - ;; ("cp858" . undecided) ; IBM code page 850 but with a euro symbol + ("cp858" . cp858) ; IBM code page 850 but with a euro symbol ("cp865" . cp865) ; IBM code page 865 ;; The DECMultinational charaterset used by the OpenVMS system ;; ("decmulti" . undecided) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index aecf2128456..5e9846e0155 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -216,19 +216,21 @@ They means `unix', `dos', and `mac' respectively." ((eq eol-type 'dos) 1) ((eq eol-type 'mac) 2) (t eol-type)))) - (let ((orig-eol-type (coding-system-eol-type coding-system))) - (if (vectorp orig-eol-type) - (if (not eol-type) - coding-system - (aref orig-eol-type eol-type)) - (let ((base (coding-system-base coding-system))) - (if (not eol-type) - base - (if (= eol-type orig-eol-type) - coding-system - (setq orig-eol-type (coding-system-eol-type base)) - (if (vectorp orig-eol-type) - (aref orig-eol-type eol-type)))))))) + ;; We call `coding-system-base' before `coding-system-eol-type', + ;; because the coding-system may not be initialized until then. + (let* ((base (coding-system-base coding-system)) + (orig-eol-type (coding-system-eol-type coding-system))) + (cond ((vectorp orig-eol-type) + (if (not eol-type) + coding-system + (aref orig-eol-type eol-type))) + ((not eol-type) + base) + ((= eol-type orig-eol-type) + coding-system) + ((progn (setq orig-eol-type (coding-system-eol-type base)) + (vectorp orig-eol-type)) + (aref orig-eol-type eol-type))))) (defun coding-system-change-text-conversion (coding-system coding) "Return a coding system which differs from CODING-SYSTEM in text conversion. diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 1cce13c76a3..9ddb666bfd0 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1871,7 +1871,13 @@ The optional second arg VISIT non-nil means that we are visiting a file." (let ((pos-marker (copy-marker (+ (point) inserted))) ;; Prevent locking. (buffer-file-name nil)) - (set-buffer-multibyte nil) + (if visit + ;; If we're doing this for find-file, + ;; don't record undo info; this counts as + ;; part of producing the buffer's initial contents. + (let ((buffer-undo-list t)) + (set-buffer-multibyte nil)) + (set-buffer-multibyte nil)) (setq inserted (- pos-marker (point))))) (set-buffer-modified-p modified-p)))) inserted) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 3998764957e..fceebf64f22 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1095,8 +1095,8 @@ Optional 5th arg DECODE-MAP is a Quail decode map. Optional 6th arg PROPS is a property list annotating TRANS. See the function `quail-define-rules' for the detail." - (if (null (stringp key)) - "Invalid Quail key `%s'" key) + (if (not (or (stringp key) (vectorp key))) + (error "Invalid Quail key `%s'" key)) (if (not (or (numberp trans) (stringp trans) (vectorp trans) (consp trans) (symbolp trans) diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 384d973db9f..7a57a3d099b 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -309,7 +309,10 @@ use either \\[customize] or the function ;; Here we bind coding-system-for-read to nil so that coding tags ;; in the files are respected even if the files are not yet ;; byte-compiled - (let ((coding-system-for-read nil)) + (let ((coding-system-for-read nil) + ;; We must avoid clobbering this variable, in case the load + ;; files below use different coding systems. + (last-coding-system-used last-coding-system-used)) (cond ((string= "Korean" current-language-environment) (load "subst-jis") (load "subst-big5") |