From: Kenichi Handa Date: Mon, 5 Dec 2005 07:39:01 +0000 (+0000) Subject: (set-language-info-internal): New X-Git-Tag: emacs-pretest-22.0.90~5501 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eec5c8f9b2b82477ed5142351d8069739bca590f;p=emacs.git (set-language-info-internal): New function. (set-language-info): Call set-language-info-internal to update language-info-alist. If LANG-ENV is the current one, call set-language-environment to make INFO effective now. (set-language-info-alist): Likewise. (locale-language-names): With locale "en", use English lang. env. but set the default codings to iso-8859-1. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3a5ef83e24..9d950d5e787 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2005-12-05 Kenichi Handa + + * international/mule-cmds.el (set-language-info-internal): New + function. + (set-language-info): Call set-language-info-internal to update + language-info-alist. If LANG-ENV is the current one, call + set-language-environment to make INFO effective now. + (set-language-info-alist): Likewise. + (locale-language-names): With locale "en", use English + lang. env. but set the default codings to iso-8859-1. + 2005-12-04 Nick Roberts * progmodes/gdb-ui.el (gdb-use-inferior-io-buffer) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index ba9ec37a042..57791409fdd 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1126,6 +1126,13 @@ For a list of useful values for KEY and their meanings, see `language-info-alist'." (if (symbolp lang-env) (setq lang-env (symbol-name lang-env))) + (set-language-info-internal lang-env key info) + (if (equal lang-env current-language-environment) + (set-language-environment lang-env))) + +(defun set-language-info-internal (lang-env key info) + "Internal use only. +Arguments are the same as `set-language-info'." (let (lang-slot key-slot) (setq lang-slot (assoc lang-env language-info-alist)) (if (null lang-slot) ; If no slot for the language, add it. @@ -1196,9 +1203,11 @@ in the European submenu in each of those two menus." (define-key-after setup-map (vector (intern lang-env)) (cons lang-env 'setup-specified-language-environment) t) - (while alist - (set-language-info lang-env (car (car alist)) (cdr (car alist))) - (setq alist (cdr alist))))) + (dolist (elt alist) + (set-language-info-internal lang-env (car elt) (cdr elt))) + + (if (equal lang-env current-language-environment) + (set-language-environment lang-env)))) (defun read-language-name (key prompt &optional default) "Read a language environment name which has information for KEY. @@ -2129,7 +2138,7 @@ of `buffer-file-coding-system' set by this function." ;; That's actually what the GNU locales define, modulo things like ;; en_IN -- fx. ("en_IN" "English" utf-8) ; glibc uses utf-8 for English in India - ("en" . "Latin-1") ; English + ("en" "English" iso-8859-1) ; English ("eo" . "Latin-3") ; Esperanto ("es" "Spanish" iso-8859-1) ("et" . "Latin-1") ; Estonian