]> git.eshelyaron.com Git - emacs.git/commitdiff
(locale-charset-to-coding-system):
authorDave Love <fx@gnu.org>
Thu, 23 Oct 2003 22:57:58 +0000 (22:57 +0000)
committerDave Love <fx@gnu.org>
Thu, 23 Oct 2003 22:57:58 +0000 (22:57 +0000)
Don't rely on nil being a coding system.

lisp/ChangeLog
lisp/international/mule-cmds.el

index 29f4bc97ddeba15c3e6eb08432ddc02a66eacef9..61f656eb7c752a73dd9afbbbc57bb6b7f3f4b387 100644 (file)
@@ -5,6 +5,9 @@
 
 2003-10-23  Dave Love  <fx@gnu.org>
 
+       * international/mule-cmds.el (locale-charset-to-coding-system):
+       Don't rely on nil being a coding system.
+
        * mail/mail-extr.el (mail-extr-ignore-single-names): Add :version.
        (mail-extr-address-syntax-table): Remove non-ASCII unibyte chars.
        (mail-extr-voodoo): Use char classes in regexps (for non-ASCII).
index f29e11b8e2639c52b47a1d0fc45215bd85d2f587..fb918094d4c521d7a833e10c89035a9d1321e9e7 100644 (file)
@@ -1981,6 +1981,13 @@ of `buffer-file-coding-system' set by this function."
     ;; http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/en_listp1.html.
     ;; CODESET and MODIFIER are implementation-dependent.
 
+     ;; jasonr comments: MS Windows uses three letter codes for
+     ;; languages instead of the two letter ISO codes that POSIX
+     ;; uses. In most cases the first two letters are the same, so
+     ;; most of the regexps in locale-language-names work. Japanese
+     ;; and Chinese are exceptions, which are listed in the
+     ;; non-standard section at the bottom of locale-language-names.
+
     ; aa Afar
     ; ab Abkhazian
     ("af" . "Latin-1") ; Afrikaans
@@ -2235,7 +2242,7 @@ is returned.  Thus, for instance, if charset \"ISO8859-2\",
          (if (locale-charset-match-p charset (caar cs))
              (setq c (intern (caar cs)))
            (pop cs)))
-       (coding-system-base c))))
+       (if c (coding-system-base c)))))
 
 ;; Fixme: This ought to deal with the territory part of the locale
 ;; too, for setting things such as calendar holidays, ps-print paper