changeset 4619:75e7ab37b6c8

Fix query-coding-tests.el failures, non-mule ELCs, mule build. lisp/ChangeLog addition: 2009-02-17 Aidan Kehoe <kehoea@parhasard.net> * unicode.el (unicode-query-coding-region): Avoid eval-when-compile where that gives incorrect results when compiled on a non-Mule XEmacs but run on a Mule XEmacs. Fixes problems seen by 20a807210902131835o2f25930apaffabb6b62a95e5f@mail.gmail.com , thank you Vin! (An equivalent way to get the efficiency of the eval-when-compile would be to provide two defvars, evaluated at dump time, but this code will be in C soon enough, and we can use the relevant preprocessor constants there.)
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 17 Feb 2009 08:35:13 +0000
parents 69cd8e2d2a88
children 4dc42d1fe684
files lisp/ChangeLog lisp/unicode.el
diffstat 2 files changed, 23 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Feb 15 12:32:48 2009 +0000
+++ b/lisp/ChangeLog	Tue Feb 17 08:35:13 2009 +0000
@@ -1,3 +1,16 @@
+2009-02-17  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* unicode.el (unicode-query-coding-region): 
+	Avoid eval-when-compile where that gives incorrect results when
+	compiled on a non-Mule XEmacs but run on a Mule XEmacs.  Fixes
+	problems seen by
+	20a807210902131835o2f25930apaffabb6b62a95e5f@mail.gmail.com ,
+	thank you Vin!
+	(An equivalent way to get the efficiency of the eval-when-compile
+	would be to provide two defvars, evaluated at dump time, but this
+	code will be in C soon enough, and we can use the relevant
+	preprocessor constants there.)	
+
 2009-02-02  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* descr-text.el (describe-char-unicodedata-file):
--- a/lisp/unicode.el	Sun Feb 15 12:32:48 2009 +0000
+++ b/lisp/unicode.el	Tue Feb 17 08:35:13 2009 +0000
@@ -640,6 +640,14 @@
          (ranges (make-range-table))
          (looking-at-arg (concat "[" skip-chars-arg "]"))
          (case-fold-search nil)
+	 (invalid-sequence-lower-unicode-bound
+	  (char-to-unicode
+	   (aref (decode-coding-string "\xd8\x00\x00\x00"
+				       'utf-16-be) 3)))
+	  (invalid-sequence-upper-unicode-bound
+	   (char-to-unicode
+	    (aref (decode-coding-string "\xd8\x00\x00\xFF"
+					'utf-16-be) 3)))
          fail-range-start fail-range-end char-after failed
 	 extent char-unicode failed-reason previous-failed-reason)
     (save-excursion
@@ -662,16 +670,10 @@
                          ;; If the character is in the Unicode range that
                          ;; corresponds to an invalid octet, we want to
                          ;; treat it as unencodable.
-                         (<= (eval-when-compile 
-                               (char-to-unicode
-                                (aref (decode-coding-string "\xd8\x00\x00\x00"
-                                                        'utf-16-be) 3)))
+                         (<= invalid-sequence-lower-unicode-bound
                              char-unicode)
                          (<= char-unicode
-                             (eval-when-compile 
-                               (char-to-unicode
-                                (aref (decode-coding-string "\xd8\x00\x00\xFF"
-                                                            'utf-16-be) 3))))
+			     invalid-sequence-upper-unicode-bound)
                          (setq failed-reason 'invalid-sequence)))
                 (or (null previous-failed-reason)
                     (eq previous-failed-reason failed-reason)))