aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/startup.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 444036ea629..a0daa9bff89 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -296,14 +296,14 @@ is less convenient."
296 :type '(choice (const :tag "none" nil) string) 296 :type '(choice (const :tag "none" nil) string)
297 :group 'initialization) 297 :group 'initialization)
298 298
299(defconst iso-8859-n-locale-regexp "8859[-_]?\\([1-49]\\)\\>" 299(defconst iso-8859-n-locale-regexp "8859[-_]?\\([1-49]\\|1[45]\\)\\>"
300 "Regexp that specifies when to enable an ISO 8859-N character set. 300 "Regexp that specifies when to enable an ISO 8859-N character set.
301We do that if this regexp matches the locale name specified by 301We do that if this regexp matches the locale name specified by
302one of the environment variables LC_ALL, LC_CTYPE, or LANG. 302one of the environment variables LC_ALL, LC_CTYPE, or LANG.
303The paren group in the regexp should match the specific character 303The paren group in the regexp should match the specific character
304set number, N. Currently only Latin-[12345] are supported. 304set number, N. Currently only Latin-[1234589] are supported.
305\(Note that Latin-5 is ISO 8859-9, because 8859-[678] are non-Latin 305\(Note that Latin-5 is ISO 8859-9, because 8859-[678] are non-Latin
306alphabets; hence, supported values of N are [12349].\)") 306alphabets; hence, supported values of N are 1, 2, 3, 4, 9, 14 and 15.\)")
307 307
308(defcustom mail-host-address nil 308(defcustom mail-host-address nil
309 "*Name of this machine, for purposes of naming users." 309 "*Name of this machine, for purposes of naming users."
@@ -538,16 +538,17 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
538 (insert-file-contents locale-translation-file-name) 538 (insert-file-contents locale-translation-file-name)
539 (if (re-search-forward 539 (if (re-search-forward
540 (concat "^" (regexp-quote ctype) ":?[ \t]+") nil t) 540 (concat "^" (regexp-quote ctype) ":?[ \t]+") nil t)
541 (setq ctype (buffer-substring (point) 541 (setq ctype (buffer-substring (point) (line-end-position))))))
542 (progn (end-of-line) (point)))))))
543 ;; Now see if the locale specifies an ISO 8859 character set. 542 ;; Now see if the locale specifies an ISO 8859 character set.
544 (when (and ctype 543 (when (and ctype
545 (string-match iso-8859-n-locale-regexp ctype)) 544 (string-match iso-8859-n-locale-regexp ctype))
546 (let (charset (which (match-string 1 ctype))) 545 (let* ((which (match-string 1 ctype))
547 (if (equal "9" which) 546 (latin (cdr (assoc which '(("9" . "5") ("14" . "8")
548 (setq which "5")) 547 ("15" . "9")))))
548 charset)
549 (if latin (setq which latin))
549 (setq charset (concat "latin-" which)) 550 (setq charset (concat "latin-" which))
550 (when (string-match "latin-[12345]" charset) 551 (when (string-match "latin-[1-589]" charset)
551 ;; Set up for this character set. 552 ;; Set up for this character set.
552 ;; This is now the right way to do it 553 ;; This is now the right way to do it
553 ;; for both unibyte and multibyte modes. 554 ;; for both unibyte and multibyte modes.