Mercurial > hg > xemacs-beta
diff lisp/mule/mule-cmds.el @ 5890:8704b7957585
#'set-locale-for-language-environment, bind a local variable correctly.
lisp/ChangeLog addition:
2015-04-11 Aidan Kehoe <kehoea@parhasard.net>
* mule/mule-cmds.el (set-locale-for-language-environment):
Bind `position' as a local variable here, as was the original
intention.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 11 Apr 2015 18:34:14 +0100 |
parents | bbe4146603db |
children |
line wrap: on
line diff
--- a/lisp/mule/mule-cmds.el Sat Apr 11 18:06:17 2015 +0100 +++ b/lisp/mule/mule-cmds.el Sat Apr 11 18:34:14 2015 +0100 @@ -1263,7 +1263,8 @@ (error nil)) (return msloc)))))))) (if (eq system-type 'windows-nt) - (let ((ms-locale (mswindows-get-and-set-locale-from-langenv langenv))) + (let* ((ms-locale (mswindows-get-and-set-locale-from-langenv langenv)) + (position (position ?_ (cdr ms-locale)))) (when ms-locale ;; also need to set the clib locale. (or (set-current-locale @@ -1285,7 +1286,7 @@ ;; assume it's DEFAULT or NEUTRAL (or something else ;; without the language in it?) and prepend the ;; language. - (if (setq position (position ?_ (cdr ms-locale))) + (if position (substitute ?\ ?_ (substitute ?- ?_ (cdr ms-locale) :end (1+ position)))