# HG changeset patch # User Aidan Kehoe # Date 1429395040 -3600 # Node ID d3d073aceaea16ee1625363380337b3dad916861 # Parent 053ef01b71a864c1976681daf10253e3708218ce# Parent a0e751d6c3ad1bf5a5b53613a354b50744222373 Merge. diff -r a0e751d6c3ad -r d3d073aceaea lisp/ChangeLog --- a/lisp/ChangeLog Sat Apr 18 23:00:14 2015 +0100 +++ b/lisp/ChangeLog Sat Apr 18 23:10:40 2015 +0100 @@ -1,3 +1,17 @@ +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: + * cl-macs.el (check-type): + Correct the sense of the type test here when PLACE is not + setf'able, something which gave confusing errors with literal + fixnums or, e.g., (+ 30 40). + 2015-04-04 Aidan Kehoe * gutter-items.el (append-progress-feedback): diff -r a0e751d6c3ad -r d3d073aceaea lisp/cl-macs.el --- a/lisp/cl-macs.el Sat Apr 18 23:00:14 2015 +0100 +++ b/lisp/cl-macs.el Sat Apr 18 23:10:40 2015 +0100 @@ -3034,8 +3034,10 @@ (condition-case nil `(while (not ,test) ,(macroexpand `(setf ,place ,signal-error))) + ;; Common Lisp requires that PLACE be setfable, but this is + ;; never a restriction that this package has enforced. (error - `(if ,test (progn ,signal-error nil)))))) + `(if (not ,test) (progn ,signal-error nil)))))) (if (eq temp place) `(progn ,body nil) `(let ((,temp ,place)) ,body nil))))) diff -r a0e751d6c3ad -r d3d073aceaea lisp/mule/mule-cmds.el --- a/lisp/mule/mule-cmds.el Sat Apr 18 23:00:14 2015 +0100 +++ b/lisp/mule/mule-cmds.el Sat Apr 18 23:10:40 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))) diff -r a0e751d6c3ad -r d3d073aceaea tests/ChangeLog --- a/tests/ChangeLog Sat Apr 18 23:00:14 2015 +0100 +++ b/tests/ChangeLog Sat Apr 18 23:10:40 2015 +0100 @@ -1,3 +1,8 @@ +2015-04-11 Aidan Kehoe + + * automated/lisp-tests.el: + Check for a bug just fixed in cl-macs.el. + 2015-04-18 Aidan Kehoe * automated/lisp-tests.el: diff -r a0e751d6c3ad -r d3d073aceaea tests/automated/lisp-tests.el --- a/tests/automated/lisp-tests.el Sat Apr 18 23:00:14 2015 +0100 +++ b/tests/automated/lisp-tests.el Sat Apr 18 23:10:40 2015 +0100 @@ -3825,4 +3825,17 @@ ;; No way to check from Lisp whether the data was actually nulled. +;; Check that a bug in #'check-type with non-setfable PLACE (something not +;; actually specified by Common Lisp) has been fixed. +(Assert (prog1 t (check-type 300 fixnum)) + "checking #'check-type OK, fixnum literal PLACE") +(Check-Error wrong-type-argument + (check-type 300 (integer -1 100)) + "checking #'check-type errors properly on fixnum literal PLACE") +(Assert (prog1 t (check-type (+ 100 200) fixnum)) + "checking #'check-type OK, non-setfable PLACE") +(Check-Error wrong-type-argument + (check-type (+ 600 1000) (integer 0 20)) + "checking #'check-type errors properly, non-setfable PLACE") + ;;; end of lisp-tests.el