Mercurial > hg > xemacs-beta
diff src/elhash.c @ 5222:18c0b5909d16
Use keywords in structure syntax; new #define, NEED_TO_HANDLE_21_4_CODE 1
src/ChangeLog addition:
2010-05-31 Aidan Kehoe <kehoea@parhasard.net>
* rangetab.c (print_range_table, rangetab_instantiate)
(structure_type_create_rangetab):
* chartab.c (print_char_table, chartab_instantiate)
(structure_type_create_chartab):
* faces.c (syms_of_faces, print_face, face_validate):
Move structure syntax in these files to using keywords by default,
as is done in Common Lisp and GNU Emacs, accepting for the moment
the older non-keywords syntax too.
* glyphs.h: No need to have Q_data here.
* general-slots.h: Add Q_data, Q_type here.
* config.h.in (NEED_TO_HANDLE_21_4_CODE):
New #define, always 1 for the moment, replacing the previous
never-really-used NO_NEED_TO_HANDLE_21_4_CODE, and avoiding
confusing syntax.
* eval.c (Ffuncall): Wrap the hack that allows #'throw to be
funcalled in #ifdef NEED_TO_HANDLE_21_4_CODE.
* elhash.c (syms_of_elhash): Move Q_type, Q_data to
general-slots.h. Change to NEED_TO_HANDLE_21_4_CODE throughout
this file.
lisp/ChangeLog addition:
2010-05-31 Aidan Kehoe <kehoea@parhasard.net>
* specifier.el (current-display-table):
Use keywords in the structure syntax here, now we've moved to that
by default in C.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 31 May 2010 16:47:44 +0100 |
parents | 41ac827cb71b |
children | 33899241a6a8 |
line wrap: on
line diff
--- a/src/elhash.c Sun May 30 15:16:07 2010 +0100 +++ b/src/elhash.c Mon May 31 16:47:44 2010 +0100 @@ -99,7 +99,7 @@ /* obsolete as of 19990901 in xemacs-21.2 */ static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qkey_or_value_weak; -static Lisp_Object Qnon_weak, Q_type, Q_data; +static Lisp_Object Qnon_weak; /* A hash table test, with its associated hash function. equal_function may call lisp_equal_function, and hash_function similarly may call @@ -757,7 +757,7 @@ if (EQ (value, Qkey_or_value)) return 1; if (EQ (value, Qvalue)) return 1; -#ifndef NO_NEED_TO_HANDLE_21_4_CODE +#ifdef NEED_TO_HANDLE_21_4_CODE /* Following values are obsolete as of 19990901 in xemacs-21.2 */ if (EQ (value, Qnon_weak)) return 1; if (EQ (value, Qweak)) return 1; @@ -781,7 +781,7 @@ if (EQ (obj, Qkey_or_value)) return HASH_TABLE_KEY_VALUE_WEAK; if (EQ (obj, Qvalue)) return HASH_TABLE_VALUE_WEAK; -#ifndef NO_NEED_TO_HANDLE_21_4_CODE +#ifdef NEED_TO_HANDLE_21_4_CODE /* Following values are obsolete as of 19990901 in xemacs-21.2 */ if (EQ (obj, Qnon_weak)) return HASH_TABLE_NON_WEAK; if (EQ (obj, Qweak)) return HASH_TABLE_WEAK; @@ -1015,6 +1015,7 @@ define_structure_type_keyword (st, Q_weakness, hash_table_weakness_validate); define_structure_type_keyword (st, Q_data, hash_table_data_validate); +#ifdef NEED_TO_HANDLE_21_4_CODE /* Next the mutually exclusive, older, non-keyword syntax: */ define_structure_type_keyword (st, Qtest, hash_table_test_validate); define_structure_type_keyword (st, Qsize, hash_table_size_validate); @@ -1023,7 +1024,6 @@ define_structure_type_keyword (st, Qweakness, hash_table_weakness_validate); define_structure_type_keyword (st, Qdata, hash_table_data_validate); -#ifndef NO_NEED_TO_HANDLE_21_4_CODE /* obsolete as of 19990901 in xemacs-21.2 */ define_structure_type_keyword (st, Qtype, hash_table_weakness_validate); #endif @@ -1037,7 +1037,9 @@ structure_type_create_hash_table (void) { structure_type_create_hash_table_structure_name (Qhash_table); +#ifdef NEED_TO_HANDLE_21_4_CODE structure_type_create_hash_table_structure_name (Qhashtable); /* compat */ +#endif } @@ -2277,7 +2279,6 @@ DEFKEYWORD (Q_rehash_size); DEFKEYWORD (Q_rehash_threshold); DEFKEYWORD (Q_weakness); - DEFKEYWORD (Q_type); /* obsolete */ } void