Mercurial > hg > xemacs-beta
changeset 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 | bd644055ef44 |
children | 053ef01b71a8 |
files | lisp/ChangeLog lisp/mule/mule-cmds.el |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sat Apr 11 18:06:17 2015 +0100 +++ b/lisp/ChangeLog Sat Apr 11 18:34:14 2015 +0100 @@ -1,3 +1,9 @@ +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. + 2015-04-11 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el:
--- 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)))