aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero2008-10-17 11:11:34 +0000
committerJuanma Barranquero2008-10-17 11:11:34 +0000
commitac62ec165aad69984eb5c944d6b63443df319099 (patch)
tree8fc2bde322e86ba884f22d62452e920498b8468c /lisp
parent69caa40ac5f51eb27c546b85b693e843532219a5 (diff)
downloademacs-ac62ec165aad69984eb5c944d6b63443df319099.tar.gz
emacs-ac62ec165aad69984eb5c944d6b63443df319099.zip
* w32-fns.el (w32-list-locales): Decode output of `w32-get-locale-info'
according to `locale-coding-system'. (This fixes trivial bug reported as part of bug#1179). Sort list of valid locale ids (EnumSystemLocales does not guarantee any particular order). Use `when'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/w32-fns.el19
2 files changed, 18 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f3e6fe7c2a9..0ee9b6196c9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12008-10-17 Juanma Barranquero <lekktu@gmail.com>
2
3 * w32-fns.el (w32-list-locales): Decode output of `w32-get-locale-info'
4 according to `locale-coding-system'. (This fixes trivial bug reported
5 as part of bug#1179).
6 Sort list of valid locale ids (EnumSystemLocales does not guarantee any
7 particular order). Use `when'.
8
12008-10-16 Juanma Barranquero <lekktu@gmail.com> 92008-10-16 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * w32-fns.el (w32-check-shell-configuration): Doc fix. 11 * w32-fns.el (w32-check-shell-configuration): Doc fix.
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index 8a8ef7f1739..70057871c31 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -217,18 +217,19 @@ You should set this to t when using a non-system shell.\n\n"))))
217(defun w32-list-locales () 217(defun w32-list-locales ()
218 "List the name and id of all locales supported by Windows." 218 "List the name and id of all locales supported by Windows."
219 (interactive) 219 (interactive)
220 (if (null w32-valid-locales) 220 (when (null w32-valid-locales)
221 (setq w32-valid-locales (w32-get-valid-locale-ids))) 221 (setq w32-valid-locales (sort (w32-get-valid-locale-ids) #'<)))
222 (switch-to-buffer-other-window (get-buffer-create "*Supported Locales*")) 222 (switch-to-buffer-other-window (get-buffer-create "*Supported Locales*"))
223 (erase-buffer) 223 (erase-buffer)
224 (insert "LCID\tAbbrev\tFull name\n\n") 224 (insert "LCID\tAbbrev\tFull name\n\n")
225 (insert (mapconcat 225 (insert (decode-coding-string (mapconcat
226 '(lambda (x) 226 (lambda (x)
227 (format "%d\t%s\t%s" 227 (format "%d\t%s\t%s"
228 x 228 x
229 (w32-get-locale-info x) 229 (w32-get-locale-info x)
230 (w32-get-locale-info x t))) 230 (w32-get-locale-info x t)))
231 w32-valid-locales "\n")) 231 w32-valid-locales "\n")
232 locale-coding-system))
232 (insert "\n") 233 (insert "\n")
233 (goto-char (point-min))) 234 (goto-char (point-min)))
234 235