Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
bf0d01c1
Commit
bf0d01c1
authored
Oct 14, 1999
by
Dave Love
Browse files
(iso-8859-n-locale-regexp): Modify for Latin-[89].
(command-line): Detect Latin-[89] locales.
parent
cce3ba48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
lisp/startup.el
lisp/startup.el
+10
-9
No files found.
lisp/startup.el
View file @
bf0d01c1
...
...
@@ -296,14 +296,14 @@ is less convenient."
:type
'
(
choice
(
const
:tag
"none"
nil
)
string
)
:group
'initialization
)
(
defconst
iso-8859-n-locale-regexp
"8859[-_]?\\([1-49]\\)\\>"
(
defconst
iso-8859-n-locale-regexp
"8859[-_]?\\([1-49]\\
|1[45]\\
)\\>"
"Regexp that specifies when to enable an ISO 8859-N character set.
We do that if this regexp matches the locale name specified by
one of the environment variables LC_ALL, LC_CTYPE, or LANG.
The paren group in the regexp should match the specific character
set number, N. Currently only Latin-[12345] are supported.
set number, N. Currently only Latin-[12345
89
] are supported.
\(Note that Latin-5 is ISO 8859-9, because 8859-[678] are non-Latin
alphabets; hence, supported values of N are
[12349]
.\)"
)
alphabets; hence, supported values of N are
1, 2, 3, 4, 9, 14 and 15
.\)"
)
(
defcustom
mail-host-address
nil
"*Name of this machine, for purposes of naming users."
...
...
@@ -538,16 +538,17 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
(
insert-file-contents
locale-translation-file-name
)
(
if
(
re-search-forward
(
concat
"^"
(
regexp-quote
ctype
)
":?[ \t]+"
)
nil
t
)
(
setq
ctype
(
buffer-substring
(
point
)
(
progn
(
end-of-line
)
(
point
)))))))
(
setq
ctype
(
buffer-substring
(
point
)
(
line-end-position
))))))
;; Now see if the locale specifies an ISO 8859 character set.
(
when
(
and
ctype
(
string-match
iso-8859-n-locale-regexp
ctype
))
(
let
(
charset
(
which
(
match-string
1
ctype
)))
(
if
(
equal
"9"
which
)
(
setq
which
"5"
))
(
let*
((
which
(
match-string
1
ctype
))
(
latin
(
cdr
(
assoc
which
'
((
"9"
.
"5"
)
(
"14"
.
"8"
)
(
"15"
.
"9"
)))))
charset
)
(
if
latin
(
setq
which
latin
))
(
setq
charset
(
concat
"latin-"
which
))
(
when
(
string-match
"latin-[1
2345
]"
charset
)
(
when
(
string-match
"latin-[1
-589
]"
charset
)
;; Set up for this character set.
;; This is now the right way to do it
;; for both unibyte and multibyte modes.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment