# HG changeset patch # User Aidan Kehoe # Date 1428773654 -3600 # Node ID 8704b7957585c98601fe81e84d2e96f05d6206b4 # Parent bd644055ef44ca0cad95c1bdc0aef9b5d4a99bca #'set-locale-for-language-environment, bind a local variable correctly. lisp/ChangeLog addition: 2015-04-11 Aidan Kehoe * mule/mule-cmds.el (set-locale-for-language-environment): Bind `position' as a local variable here, as was the original intention. diff -r bd644055ef44 -r 8704b7957585 lisp/ChangeLog --- 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 + + * 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 * cl-macs.el: diff -r bd644055ef44 -r 8704b7957585 lisp/mule/mule-cmds.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)))