1. Aidan Kehoe
  2. unicode-internal

Commits

Aidan Kehoe  committed b0d4018

GC protect a freshly-consed list, define_specifier_tag().

src/ChangeLog addition:

2012-08-12 Aidan Kehoe <kehoea@parhasard.net>

* specifier.c (define_specifier_tag):
GC protect the list that Fcharset_list () gave back, it's freshly
consed.
Clear the alist entries for this tag in CHARSET's tag list if the
charset_predicate is nil, so re-creating a charset tag works more
effectively.
* specifier.c (Fdefine_specifier_tag):
Device-type-specific tags *are* available, even if that device
type isn't; see specifier.el.

  • Participants
  • Parent commits febc025
  • Branches default

Comments (0)

Files changed (2)

File src/ChangeLog

View file
  • Ignore whitespace
+2012-08-12  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* specifier.c (define_specifier_tag):
+	GC protect the list that Fcharset_list () gave back, it's freshly
+	consed.
+	Clear the alist entries for this tag in CHARSET's tag list if the
+	charset_predicate is nil, so re-creating a charset tag works more
+	effectively.
+	* specifier.c (Fdefine_specifier_tag):
+	Device-type-specific tags *are* available, even if that device
+	type isn't; see specifier.el.
+
 2012-08-06  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* lread.c (read1):

File src/specifier.c

View file
  • Ignore whitespace
 
   if (recompute_charsets)
     {
-
-      LIST_LOOP_2 (charset_name, Fcharset_list ())
+      GC_EXTERNAL_LIST_LOOP_2 (charset_name, Fcharset_list ())
 	{
 	  Lisp_Object charset = Fget_charset (charset_name);
 	  Lisp_Object tag_list = Fgethash (charset, Vcharset_tag_lists, Qnil);
 	  Lisp_Object charpres;
 
-	  if (NILP (charset_predicate))
-	    continue;
+          if (NILP (charset_predicate))
+            {
+	      Fputhash (charset, remassq_no_quit (tag, tag_list),
+                        Vcharset_tag_lists);
+              continue;
+            }
 
 	  charpres = call_charset_predicate (charset_predicate, charset);
 
 			Vcharset_tag_lists);
 	    }
 	}
+      END_GC_EXTERNAL_LIST_LOOP (charset_name);
     }
   return Qt;
 }
 You can redefine an existing user-defined specifier tag.  However, you
 cannot redefine most of the built-in specifier tags \(the device types and
 classes, `initial', and `final') or the symbols nil, t, `all', or `global'.
-Note that if a device type is not supported in this XEmacs, it will not be
-available as a built-in specifier tag; this is probably something we should
-change.
 */
        (tag, device_predicate, charset_predicate))
 {