From: Eli Zaretskii Date: Mon, 30 Aug 2021 12:42:32 +0000 (+0300) Subject: Minor improvement in 'get-locale-names' on MS-Windows X-Git-Tag: emacs-28.0.90~1259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b654420b1b9bd6f1da489278a7e18de7d1bf71dd;p=emacs.git Minor improvement in 'get-locale-names' on MS-Windows * lisp/international/mule-cmds.el (get-locale-names): Delete duplicate locales from the list returned by the MS-Windows implementation. --- diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index dc09dad2cb4..8494d540916 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2616,7 +2616,7 @@ is returned. Thus, for instance, if charset \"ISO8859-2\", ;; On Windows we have a built-in method to get the names. ((and (fboundp 'w32-get-locale-info) (fboundp 'w32-get-valid-locale-ids)) - (mapcar #'w32-get-locale-info (w32-get-valid-locale-ids))) + (delete-dups (mapcar #'w32-get-locale-info (w32-get-valid-locale-ids)))) ;; Unix-ey hosts should have a command to output locales currently ;; defined by the OS. ((executable-find "locale")