Mercurial > hg > xemacs-beta
changeset 5678:b0d40183ac79
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.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 12 Aug 2012 11:32:36 +0100 |
parents | febc025c4e0c |
children | a81a739181dc |
files | src/ChangeLog src/specifier.c |
diffstat | 2 files changed, 20 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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):
--- 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)) {