Mercurial > hg > xemacs-beta
annotate src/general-slots.h @ 5191:71ee43b8a74d
Add #'equalp as a hash test by default; add #'define-hash-table-test, GNU API
tests/ChangeLog addition:
2010-04-05 Aidan Kehoe <kehoea@parhasard.net>
* automated/hash-table-tests.el:
Test the new built-in #'equalp hash table test. Test
#'define-hash-table-test.
* automated/lisp-tests.el:
When asserting that two objects are #'equalp, also assert that
their #'equalp-hash is identical.
man/ChangeLog addition:
2010-04-03 Aidan Kehoe <kehoea@parhasard.net>
* lispref/hash-tables.texi (Introduction to Hash Tables):
Document that we now support #'equalp as a hash table test by
default, and mention #'define-hash-table-test.
(Working With Hash Tables): Document #'define-hash-table-test.
src/ChangeLog addition:
2010-04-05 Aidan Kehoe <kehoea@parhasard.net>
* elhash.h:
* elhash.c (struct Hash_Table_Test, lisp_object_eql_equal)
(lisp_object_eql_hash, lisp_object_equal_equal)
(lisp_object_equal_hash, lisp_object_equalp_hash)
(lisp_object_equalp_equal, lisp_object_general_hash)
(lisp_object_general_equal, Feq_hash, Feql_hash, Fequal_hash)
(Fequalp_hash, define_hash_table_test, Fdefine_hash_table_test)
(init_elhash_once_early, mark_hash_table_tests, string_equalp_hash):
* glyphs.c (vars_of_glyphs):
Add a new hash table test in C, #'equalp.
Make it possible to specify new hash table tests with functions
define_hash_table_test, #'define-hash-table-test.
Use define_hash_table_test() in glyphs.c.
Expose the hash functions (besides that used for #'equal) to Lisp,
for people writing functions to be used with #'define-hash-table-test.
Call define_hash_table_test() very early in temacs, to create the
built-in hash table tests.
* ui-gtk.c (emacs_gtk_boxed_hash):
* specifier.h (struct specifier_methods):
* specifier.c (specifier_hash):
* rangetab.c (range_table_entry_hash, range_table_hash):
* number.c (bignum_hash, ratio_hash, bigfloat_hash):
* marker.c (marker_hash):
* lrecord.h (struct lrecord_implementation):
* keymap.c (keymap_hash):
* gui.c (gui_item_id_hash, gui_item_hash):
* glyphs.c (image_instance_hash, glyph_hash):
* glyphs-x.c (x_image_instance_hash):
* glyphs-msw.c (mswindows_image_instance_hash):
* glyphs-gtk.c (gtk_image_instance_hash):
* frame-msw.c (mswindows_set_title_from_ibyte):
* fontcolor.c (color_instance_hash, font_instance_hash):
* fontcolor-x.c (x_color_instance_hash):
* fontcolor-tty.c (tty_color_instance_hash):
* fontcolor-msw.c (mswindows_color_instance_hash):
* fontcolor-gtk.c (gtk_color_instance_hash):
* fns.c (bit_vector_hash):
* floatfns.c (float_hash):
* faces.c (face_hash):
* extents.c (extent_hash):
* events.c (event_hash):
* data.c (weak_list_hash, weak_box_hash):
* chartab.c (char_table_entry_hash, char_table_hash):
* bytecode.c (compiled_function_hash):
* alloc.c (vector_hash):
Change the various object hash methods to take a new EQUALP
parameter, hashing appropriately for #'equalp if it is true.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 05 Apr 2010 13:03:35 +0100 |
parents | 2e528066e2fc |
children | 41ac827cb71b |
rev | line source |
---|---|
442 | 1 /* Commonly-used symbols -- include file |
2 Copyright (C) 1995 Sun Microsystems. | |
5157
1fae11d56ad2
redo memory-usage mechanism, add way of dynamically initializing Lisp objects
Ben Wing <ben@xemacs.org>
parents:
5084
diff
changeset
|
3 Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2010 Ben Wing. |
442 | 4 |
5 This file is part of XEmacs. | |
6 | |
7 XEmacs is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* Synched up with: Not in FSF. */ | |
23 | |
24 /* The purpose of this file is as a central place to stick symbols | |
25 that don't have any obvious connection to any particular module | |
26 and might be used in many different contexts. | |
27 | |
1632 | 28 Four types of declarations are allowed here: |
442 | 29 |
30 SYMBOL (Qfoo); declares a symbol "foo" | |
1632 | 31 SYMBOL_MODULE_API (Qfoo); declares a symbol "foo" that is visible to modules |
442 | 32 SYMBOL_KEYWORD (Q_foo); declares a keyword symbol ":foo" |
33 SYMBOL_GENERAL (Qfoo, "bar"); declares a symbol named "bar" but stored in | |
34 the variable Qfoo | |
35 | |
36 To sort the crap in this file, use the following: | |
37 | |
38 (sort-regexp-fields nil | |
39 "^.*(Q_?\\(.*\\));$" "\\1" | |
40 (progn | |
41 (search-forward "SYMBOL") | |
42 (match-beginning 0)) | |
43 (point-max)) | |
44 */ | |
45 | |
46 SYMBOL (Qabort); | |
47 SYMBOL_KEYWORD (Q_accelerator); | |
48 SYMBOL_KEYWORD (Q_active); | |
49 SYMBOL (Qafter); | |
50 SYMBOL (Qall); | |
5084
6afe991b8135
Add a PARSE_KEYWORDS macro, use it in #'make-hash-table.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4995
diff
changeset
|
51 SYMBOL_KEYWORD (Q_allow_other_keys); |
442 | 52 SYMBOL (Qand); |
53 SYMBOL (Qappend); | |
771 | 54 SYMBOL (Qascii); |
442 | 55 SYMBOL (Qassoc); |
56 SYMBOL (Qat); | |
57 SYMBOL (Qautodetect); | |
58 SYMBOL (Qbad_variable); | |
59 SYMBOL (Qbefore); | |
1983 | 60 SYMBOL (Qbigfloat); |
442 | 61 SYMBOL (Qbinary); |
62 SYMBOL (Qbitmap); | |
63 SYMBOL (Qboolean); | |
64 SYMBOL_KEYWORD (Q_border); | |
65 SYMBOL (Qbottom); | |
66 SYMBOL (Qbottom_margin); | |
67 SYMBOL (Qbuffer); | |
1318 | 68 SYMBOL (Qbuffers); |
442 | 69 SYMBOL (Qbuilt_in); |
70 SYMBOL (Qbutton); | |
71 SYMBOL_KEYWORD (Q_buttons); | |
72 SYMBOL_KEYWORD (Q_callback); | |
73 SYMBOL_KEYWORD (Q_callback_ex); | |
74 SYMBOL (Qcancel); | |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
75 SYMBOL (Qcar); |
442 | 76 SYMBOL (Qcategory); |
3439 | 77 SYMBOL (Qccl_program); |
442 | 78 SYMBOL (Qcenter); |
771 | 79 SYMBOL (Qchain); |
1333 | 80 SYMBOL (Qchange); |
442 | 81 SYMBOL (Qchannel); |
82 SYMBOL (Qchar); | |
83 SYMBOL (Qcharacter); | |
84 SYMBOL (Qchars); | |
771 | 85 SYMBOL (Qcode_page); |
86 SYMBOL (Qcoding_system); | |
4995
8431b52e43b1
Move the various map* functions to C; add #'map-into.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4691
diff
changeset
|
87 SYMBOL (Qcoerce); |
442 | 88 SYMBOL (Qcolor); |
89 SYMBOL (Qcolumns); | |
90 SYMBOL (Qcommand); | |
91 SYMBOL_KEYWORD (Q_config); | |
92 SYMBOL (Qconsole); | |
771 | 93 SYMBOL (Qcontrol_1); |
442 | 94 SYMBOL (Qcopies); |
1927 | 95 SYMBOL_MODULE_API (Qcritical); |
442 | 96 SYMBOL (Qctext); |
771 | 97 SYMBOL (Qcurrent); |
442 | 98 SYMBOL (Qcursor); |
99 SYMBOL (Qdata); | |
903 | 100 SYMBOL (Qdde); |
442 | 101 SYMBOL (Qdead); |
793 | 102 SYMBOL (Qdebug); |
442 | 103 SYMBOL (Qdefault); |
1927 | 104 SYMBOL_MODULE_API (Qdelete); |
442 | 105 SYMBOL (Qdelq); |
771 | 106 SYMBOL (Qdescription); |
442 | 107 SYMBOL_KEYWORD (Q_descriptor); |
108 SYMBOL (Qdevice); | |
1318 | 109 SYMBOL (Qdevices); |
442 | 110 SYMBOL_KEYWORD (Q_device); |
111 SYMBOL (Qdialog); | |
673 | 112 SYMBOL (Qdirectory); |
442 | 113 SYMBOL (Qdimension); |
114 SYMBOL (Qdisplay); | |
115 SYMBOL (Qdoc_string); | |
771 | 116 SYMBOL (Qdocumentation); |
442 | 117 SYMBOL (Qduplex); |
793 | 118 SYMBOL (Qemergency); |
442 | 119 SYMBOL (Qempty); |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
120 SYMBOL_KEYWORD (Q_end); |
3439 | 121 SYMBOL (Qencode_as_utf_8); |
442 | 122 SYMBOL (Qeval); |
853 | 123 SYMBOL (Qevent); |
442 | 124 SYMBOL (Qextents); |
563 | 125 SYMBOL (Qexternal); |
442 | 126 SYMBOL (Qface); |
1318 | 127 SYMBOL (Qfaces); |
442 | 128 SYMBOL (Qfallback); |
129 SYMBOL (Qfile); | |
1632 | 130 SYMBOL_MODULE_API (Qfile_name); |
442 | 131 SYMBOL_KEYWORD (Q_filter); |
3659 | 132 SYMBOL (Qfinal); |
1983 | 133 SYMBOL (Qfixnum); |
5191
71ee43b8a74d
Add #'equalp as a hash test by default; add #'define-hash-table-test, GNU API
Aidan Kehoe <kehoea@parhasard.net>
parents:
5182
diff
changeset
|
134 SYMBOL (Qfixnump); |
1983 | 135 SYMBOL (Qfloat); |
442 | 136 SYMBOL (Qfont); |
137 SYMBOL (Qframe); | |
1318 | 138 SYMBOL (Qframes); |
442 | 139 SYMBOL (Qfrom_page); |
4691
3ba90c659d01
Move Qfrom_unicode to general-slots.h, fix the native Win32 build.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4690
diff
changeset
|
140 SYMBOL (Qfrom_unicode); |
442 | 141 SYMBOL (Qfull_assoc); |
142 SYMBOL (Qfuncall); | |
143 SYMBOL (Qfunction); | |
1333 | 144 SYMBOL (Qgarbage_collection); |
442 | 145 SYMBOL (Qgeneric); |
146 SYMBOL (Qgeometry); | |
147 SYMBOL (Qglobal); | |
853 | 148 SYMBOL (Qglyph); |
462 | 149 SYMBOL (Qgtk); |
853 | 150 SYMBOL (Qgui_item); |
442 | 151 SYMBOL (Qgutter); |
152 SYMBOL (Qheight); | |
153 SYMBOL_KEYWORD (Q_height); | |
154 SYMBOL (Qhelp); | |
771 | 155 SYMBOL (Qhigh); |
442 | 156 SYMBOL (Qhighlight); |
157 SYMBOL (Qhorizontal); | |
158 SYMBOL (Qicon); | |
159 SYMBOL (Qid); | |
160 SYMBOL (Qignore); | |
3659 | 161 SYMBOL (Qinitial); |
442 | 162 SYMBOL (Qimage); |
163 SYMBOL_KEYWORD (Q_image); | |
164 SYMBOL_KEYWORD (Q_included); | |
165 SYMBOL (Qinfo); | |
166 SYMBOL (Qinherit); | |
167 SYMBOL_KEYWORD (Q_initial_focus); | |
168 SYMBOL (Qinteger); | |
169 SYMBOL (Qinternal); | |
170 SYMBOL_KEYWORD (Q_items); | |
171 SYMBOL_KEYWORD (Q_justify); | |
863 | 172 SYMBOL_KEYWORD (Q_vertically_justify); |
173 SYMBOL_KEYWORD (Q_horizontally_justify); | |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
174 SYMBOL_KEYWORD (Q_key); |
442 | 175 SYMBOL (Qkey); |
176 SYMBOL (Qkey_assoc); | |
2842 | 177 SYMBOL (Qkey_mapping); |
442 | 178 SYMBOL_KEYWORD (Q_key_sequence); |
179 SYMBOL (Qkeyboard); | |
180 SYMBOL (Qkeymap); | |
181 SYMBOL_KEYWORD (Q_keys); | |
182 SYMBOL_KEYWORD (Q_label); | |
183 SYMBOL (Qlandscape); | |
184 SYMBOL (Qlast_command); | |
185 SYMBOL (Qleft); | |
186 SYMBOL (Qleft_margin); | |
187 SYMBOL (Qlet); | |
771 | 188 SYMBOL (Qlevel); |
442 | 189 SYMBOL (Qlist); |
771 | 190 SYMBOL (Qlittle_endian); |
191 SYMBOL (Qlocale); | |
192 SYMBOL (Qlow); | |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
193 SYMBOL_GENERAL (Qlss, "<"); |
442 | 194 SYMBOL (Qmagic); |
195 SYMBOL_KEYWORD (Q_margin_width); | |
196 SYMBOL (Qmarkers); | |
197 SYMBOL (Qmax); | |
198 SYMBOL (Qmemory); | |
199 SYMBOL (Qmenubar); | |
200 SYMBOL (Qmessage); | |
201 SYMBOL_GENERAL (Qminus, "-"); | |
202 SYMBOL (Qmodifiers); | |
203 SYMBOL (Qmotion); | |
204 SYMBOL (Qmsprinter); | |
205 SYMBOL (Qmswindows); | |
206 SYMBOL (Qname); | |
1632 | 207 SYMBOL_MODULE_API (Qnative); |
442 | 208 SYMBOL (Qnatnum); |
209 SYMBOL (Qno); | |
210 SYMBOL (Qnone); | |
211 SYMBOL (Qnot); | |
212 SYMBOL (Qnothing); | |
1632 | 213 SYMBOL_MODULE_API (Qnotice); |
442 | 214 SYMBOL (Qobject); |
215 SYMBOL (Qok); | |
216 SYMBOL (Qold_assoc); | |
217 SYMBOL (Qold_delete); | |
218 SYMBOL (Qold_delq); | |
219 SYMBOL (Qold_rassoc); | |
220 SYMBOL (Qold_rassq); | |
221 SYMBOL (Qonly); | |
222 SYMBOL (Qor); | |
223 SYMBOL (Qorientation); | |
224 SYMBOL_KEYWORD (Q_orientation); | |
225 SYMBOL (Qother); | |
226 SYMBOL (Qpage_setup); | |
510 | 227 SYMBOL (Qpages); |
442 | 228 SYMBOL (Qpeer); |
229 SYMBOL (Qpointer); | |
230 SYMBOL (Qpopup); | |
231 SYMBOL (Qportrait); | |
232 SYMBOL (Qprepend); | |
233 SYMBOL (Qprint); | |
234 SYMBOL (Qprinter); | |
235 SYMBOL_KEYWORD (Q_printer_settings); | |
236 SYMBOL (Qprocess); | |
237 SYMBOL_KEYWORD (Q_properties); | |
238 SYMBOL (Qprovide); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
239 SYMBOL (Qquery_coding_clear_highlights); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
240 SYMBOL (Qquery_coding_warning_face); |
442 | 241 SYMBOL (Qquestion); |
242 SYMBOL_KEYWORD (Q_question); | |
243 SYMBOL (Qradio); | |
244 SYMBOL (Qrassoc); | |
245 SYMBOL (Qrassq); | |
1983 | 246 SYMBOL (Qratio); |
1318 | 247 SYMBOL (Qredisplay); |
442 | 248 SYMBOL (Qremove_all); |
249 SYMBOL (Qrequire); | |
250 SYMBOL (Qresource); | |
251 SYMBOL (Qretry); | |
252 SYMBOL (Qreturn); | |
253 SYMBOL (Qreverse); | |
254 SYMBOL (Qright); | |
255 SYMBOL (Qright_margin); | |
1927 | 256 SYMBOL_MODULE_API (Qsearch); |
442 | 257 SYMBOL (Qselected); |
258 SYMBOL_KEYWORD (Q_selected); | |
510 | 259 SYMBOL (Qselection); |
442 | 260 SYMBOL (Qset_glyph_image); |
261 SYMBOL (Qsignal); | |
1927 | 262 SYMBOL_MODULE_API (Qsimple); |
442 | 263 SYMBOL (Qsize); |
563 | 264 SYMBOL (Qsound); |
442 | 265 SYMBOL (Qspace); |
266 SYMBOL (Qspecifier); | |
267 SYMBOL (Qstandard); | |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
268 SYMBOL_KEYWORD (Q_start); |
442 | 269 SYMBOL (Qstream); |
270 SYMBOL (Qstring); | |
271 SYMBOL_KEYWORD (Q_style); | |
272 SYMBOL_KEYWORD (Q_suffix); | |
771 | 273 SYMBOL (Qsubtype); |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
274 SYMBOL (Qsucceeded); |
442 | 275 SYMBOL (Qsymbol); |
276 SYMBOL (Qsyntax); | |
771 | 277 SYMBOL (Qsystem_default); |
442 | 278 SYMBOL (Qterminal); |
279 SYMBOL (Qtest); | |
280 SYMBOL (Qtext); | |
281 SYMBOL_KEYWORD (Q_text); | |
282 SYMBOL (Qthis_command); | |
283 SYMBOL (Qtimeout); | |
284 SYMBOL (Qtimestamp); | |
285 SYMBOL_KEYWORD (Q_title); | |
286 SYMBOL (Qto_page); | |
287 SYMBOL (Qtoggle); | |
288 SYMBOL (Qtoolbar); | |
289 SYMBOL (Qtop); | |
290 SYMBOL (Qtop_margin); | |
291 SYMBOL (Qtty); | |
292 SYMBOL (Qtype); | |
293 SYMBOL (Qundecided); | |
294 SYMBOL (Qundefined); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
295 SYMBOL (Qunencodable); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
296 SYMBOL (Qinvalid_sequence); |
442 | 297 SYMBOL (Qunimplemented); |
3659 | 298 SYMBOL (Qunicode_registries); |
3767 | 299 SYMBOL (Qunicode_type); |
771 | 300 SYMBOL (Quser_default); |
442 | 301 SYMBOL_KEYWORD (Q_value); |
302 SYMBOL (Qvalue_assoc); | |
303 SYMBOL (Qvertical); | |
304 SYMBOL (Qwarning); | |
305 SYMBOL (Qwidget); | |
306 SYMBOL (Qwidth); | |
307 SYMBOL_KEYWORD (Q_width); | |
308 SYMBOL (Qwindow); | |
1318 | 309 SYMBOL (Qwindows); |
310 SYMBOL (Qwindow_id); | |
442 | 311 SYMBOL (Qwindow_system); |
312 SYMBOL (Qx); | |
313 SYMBOL (Qy); | |
314 SYMBOL (Qyes); |