changeset 3736:01830ac74073

[xemacs-hg @ 2006-12-11 12:22:47 by aidan] 2006-12-08 Aidan Kehoe <kehoea@parhasard.net> * specifier.c (charset_matches_specifier_tag_set_p): A charset's entry in Vcharset_tag_lists may be nil, if, when that charset was created, no tags with associated charset predicates existed. Accept this possibility, treat it as the tag not matching that charset.
author aidan
date Mon, 11 Dec 2006 12:22:52 +0000
parents 0c544f2f566c
children 7a1c4c523603
files src/ChangeLog src/specifier.c
diffstat 2 files changed, 18 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Dec 11 10:10:20 2006 +0000
+++ b/src/ChangeLog	Mon Dec 11 12:22:52 2006 +0000
@@ -1,3 +1,11 @@
+2006-12-08  Aidan Kehoe  <kehoea@parhasard.net> 
+ 
+	* specifier.c (charset_matches_specifier_tag_set_p): 
+	A charset's entry in Vcharset_tag_lists may be nil, if, when that 
+	charset was created, no tags with associated charset predicates 
+	existed. Accept this possibility, treat it as the tag not matching 
+	that charset.  
+
 2006-12-11  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* event-tty.c: 
--- a/src/specifier.c	Mon Dec 11 10:10:20 2006 +0000
+++ b/src/specifier.c	Mon Dec 11 12:22:52 2006 +0000
@@ -997,12 +997,16 @@
       Lisp_Object tag = XCAR (rest);
       Lisp_Object assoc;
 
-      /* This function will not ever be called with a charset for which the
-	 relevant information hasn't been calculated (the information is
-	 calculated with the creation of every charset).  */
-      assert (!NILP(XVECTOR_DATA
-		    (Vcharset_tag_lists)[XCHARSET_LEADING_BYTE(charset) 
-					 - MIN_LEADING_BYTE]));
+      /* In the event that, during the creation of a charset, no specifier
+         tags exist for which CHARSET-PREDICATE has been specified, then
+         that charset's entry in Vcharset_tag_lists will be nil, and this
+         charset shouldn't match. */
+
+      if (NILP (XVECTOR_DATA(Vcharset_tag_lists)[XCHARSET_LEADING_BYTE(charset) 
+                                                 - MIN_LEADING_BYTE]))
+        {
+          return 0;
+        }
 
       /* Now, find out what the pre-calculated value is. */
       assoc = assq_no_quit(tag,