diff options
| author | Dave Love | 1999-10-14 10:23:59 +0000 |
|---|---|---|
| committer | Dave Love | 1999-10-14 10:23:59 +0000 |
| commit | bf0d01c18614d07b2eaa3641a8d16cdbbfb7ee89 (patch) | |
| tree | 03903d29d563684a82880778678f13ff2b8f7ea2 | |
| parent | cce3ba480a96d9a21abe8f44951426a2dc252a9e (diff) | |
| download | emacs-bf0d01c18614d07b2eaa3641a8d16cdbbfb7ee89.tar.gz emacs-bf0d01c18614d07b2eaa3641a8d16cdbbfb7ee89.zip | |
(iso-8859-n-locale-regexp): Modify for Latin-[89].
(command-line): Detect Latin-[89] locales.
| -rw-r--r-- | lisp/startup.el | 19 |
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. |
| 301 | We do that if this regexp matches the locale name specified by | 301 | We do that if this regexp matches the locale name specified by |
| 302 | one of the environment variables LC_ALL, LC_CTYPE, or LANG. | 302 | one of the environment variables LC_ALL, LC_CTYPE, or LANG. |
| 303 | The paren group in the regexp should match the specific character | 303 | The paren group in the regexp should match the specific character |
| 304 | set number, N. Currently only Latin-[12345] are supported. | 304 | set 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 |
| 306 | alphabets; hence, supported values of N are [12349].\)") | 306 | alphabets; 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. |