# HG changeset patch # User Aidan Kehoe # Date 1344767556 -3600 # Node ID b0d40183ac7959bf1c6f5fe0df678f83b5c8b0ec # Parent febc025c4e0c6f95a8adc7995a072205e56cdf07 GC protect a freshly-consed list, define_specifier_tag(). src/ChangeLog addition: 2012-08-12 Aidan Kehoe * 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. diff -r febc025c4e0c -r b0d40183ac79 src/ChangeLog --- a/src/ChangeLog Mon Aug 06 13:07:55 2012 +0100 +++ b/src/ChangeLog Sun Aug 12 11:32:36 2012 +0100 @@ -1,3 +1,15 @@ +2012-08-12 Aidan Kehoe + + * 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 * lread.c (read1): diff -r febc025c4e0c -r b0d40183ac79 src/specifier.c --- a/src/specifier.c Mon Aug 06 13:07:55 2012 +0100 +++ b/src/specifier.c Sun Aug 12 11:32:36 2012 +0100 @@ -1162,15 +1162,18 @@ 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); @@ -1186,6 +1189,7 @@ Vcharset_tag_lists); } } + END_GC_EXTERNAL_LIST_LOOP (charset_name); } return Qt; } @@ -1222,9 +1226,6 @@ 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)) {