Mercurial > hg > xemacs-beta
annotate src/general-slots.h @ 5182:2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
lisp/ChangeLog addition:
2010-04-01 Aidan Kehoe <kehoea@parhasard.net>
* cl-seq.el (fill, sort*, merge): Move these functions to fns.c.
(stable-sort): Make this docstring reflect the argument names used
in the #'sort* docstring.
* cl-macs.el (stable-sort): Make #'stable-sort exactly equivalent
to #'sort* in compiled code.
* bytecomp.el (byte-compile-maybe-add-*):
New macro, for functions like #'sort and #'mapcar that, to be
strictly compatible, should only take two args, but in our
implementation can take more, because they're aliases of #'sort*
and #'mapcar*.
(byte-compile-mapcar, byte-compile-sort, byte-compile-fillarray):
Use this new macro.
(map-into): Add a byte-compile method for #'map-into in passing.
* apropos.el (apropos-print): Use #'sort* with a :key argument,
now it's in C.
* compat.el (extent-at): Ditto.
* register.el (list-registers): Ditto.
* package-ui.el (pui-list-packages): Ditto.
* help.el (sorted-key-descriptions): Ditto.
src/ChangeLog addition:
2010-03-31 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (STRING_DATA_TO_OBJECT_ARRAY)
(BIT_VECTOR_TO_OBJECT_ARRAY, c_merge_predicate_key)
(c_merge_predicate_nokey, list_merge, array_merge)
(list_array_merge_into_list, list_list_merge_into_array)
(list_array_merge_into_array, CHECK_KEY_ARGUMENT, Fmerge)
(list_sort, array_sort, FsortX):
Move #'sort*, #'fill, #'merge from cl-seq.el to C, extending the
implementations of Fsort, Ffillarray, and merge() to do so.
* keymap.c (keymap_submaps, map_keymap_sort_predicate)
(describe_map_sort_predicate):
Change the calling semantics of the C sort predicates to return a
non-nil Lisp object if the first argument is less than the second,
rather than C integers.
* fontcolor-msw.c (sort_font_list_function):
* fileio.c (build_annotations):
* dired.c (Fdirectory_files):
* abbrev.c (Finsert_abbrev_table_description):
Call list_sort instead of Fsort, list_merge instead of merge() in
these functions.
man/ChangeLog addition:
2010-04-01 Aidan Kehoe <kehoea@parhasard.net>
* lispref/lists.texi (Rearrangement):
Update the documentation of #'sort here, now that it accepts any
type of sequence and the KEY keyword argument. (Though this is
probably now the wrong place for this function, given that.)
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 01 Apr 2010 20:22:50 +0100 |
parents | 1fae11d56ad2 |
children | 71ee43b8a74d |
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 (Qeq); |
123 SYMBOL (Qeql); | |
124 SYMBOL (Qequal); | |
125 SYMBOL (Qeval); | |
853 | 126 SYMBOL (Qevent); |
442 | 127 SYMBOL (Qextents); |
563 | 128 SYMBOL (Qexternal); |
442 | 129 SYMBOL (Qface); |
1318 | 130 SYMBOL (Qfaces); |
442 | 131 SYMBOL (Qfallback); |
132 SYMBOL (Qfile); | |
1632 | 133 SYMBOL_MODULE_API (Qfile_name); |
442 | 134 SYMBOL_KEYWORD (Q_filter); |
3659 | 135 SYMBOL (Qfinal); |
1983 | 136 SYMBOL (Qfixnum); |
137 SYMBOL (Qfloat); | |
442 | 138 SYMBOL (Qfont); |
139 SYMBOL (Qframe); | |
1318 | 140 SYMBOL (Qframes); |
442 | 141 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
|
142 SYMBOL (Qfrom_unicode); |
442 | 143 SYMBOL (Qfull_assoc); |
144 SYMBOL (Qfuncall); | |
145 SYMBOL (Qfunction); | |
1333 | 146 SYMBOL (Qgarbage_collection); |
442 | 147 SYMBOL (Qgeneric); |
148 SYMBOL (Qgeometry); | |
149 SYMBOL (Qglobal); | |
853 | 150 SYMBOL (Qglyph); |
462 | 151 SYMBOL (Qgtk); |
853 | 152 SYMBOL (Qgui_item); |
442 | 153 SYMBOL (Qgutter); |
154 SYMBOL (Qheight); | |
155 SYMBOL_KEYWORD (Q_height); | |
156 SYMBOL (Qhelp); | |
771 | 157 SYMBOL (Qhigh); |
442 | 158 SYMBOL (Qhighlight); |
159 SYMBOL (Qhorizontal); | |
160 SYMBOL (Qicon); | |
161 SYMBOL (Qid); | |
162 SYMBOL (Qignore); | |
3659 | 163 SYMBOL (Qinitial); |
442 | 164 SYMBOL (Qimage); |
165 SYMBOL_KEYWORD (Q_image); | |
166 SYMBOL_KEYWORD (Q_included); | |
167 SYMBOL (Qinfo); | |
168 SYMBOL (Qinherit); | |
169 SYMBOL_KEYWORD (Q_initial_focus); | |
170 SYMBOL (Qinteger); | |
171 SYMBOL (Qinternal); | |
172 SYMBOL_KEYWORD (Q_items); | |
173 SYMBOL_KEYWORD (Q_justify); | |
863 | 174 SYMBOL_KEYWORD (Q_vertically_justify); |
175 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
|
176 SYMBOL_KEYWORD (Q_key); |
442 | 177 SYMBOL (Qkey); |
178 SYMBOL (Qkey_assoc); | |
2842 | 179 SYMBOL (Qkey_mapping); |
442 | 180 SYMBOL_KEYWORD (Q_key_sequence); |
181 SYMBOL (Qkeyboard); | |
182 SYMBOL (Qkeymap); | |
183 SYMBOL_KEYWORD (Q_keys); | |
184 SYMBOL_KEYWORD (Q_label); | |
185 SYMBOL (Qlandscape); | |
186 SYMBOL (Qlast_command); | |
187 SYMBOL (Qleft); | |
188 SYMBOL (Qleft_margin); | |
189 SYMBOL (Qlet); | |
771 | 190 SYMBOL (Qlevel); |
442 | 191 SYMBOL (Qlist); |
771 | 192 SYMBOL (Qlittle_endian); |
193 SYMBOL (Qlocale); | |
194 SYMBOL (Qlow); | |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
195 SYMBOL_GENERAL (Qlss, "<"); |
442 | 196 SYMBOL (Qmagic); |
197 SYMBOL_KEYWORD (Q_margin_width); | |
198 SYMBOL (Qmarkers); | |
199 SYMBOL (Qmax); | |
200 SYMBOL (Qmemory); | |
201 SYMBOL (Qmenubar); | |
202 SYMBOL (Qmessage); | |
203 SYMBOL_GENERAL (Qminus, "-"); | |
204 SYMBOL (Qmodifiers); | |
205 SYMBOL (Qmotion); | |
206 SYMBOL (Qmsprinter); | |
207 SYMBOL (Qmswindows); | |
208 SYMBOL (Qname); | |
1632 | 209 SYMBOL_MODULE_API (Qnative); |
442 | 210 SYMBOL (Qnatnum); |
211 SYMBOL (Qno); | |
212 SYMBOL (Qnone); | |
213 SYMBOL (Qnot); | |
214 SYMBOL (Qnothing); | |
1632 | 215 SYMBOL_MODULE_API (Qnotice); |
442 | 216 SYMBOL (Qobject); |
217 SYMBOL (Qok); | |
218 SYMBOL (Qold_assoc); | |
219 SYMBOL (Qold_delete); | |
220 SYMBOL (Qold_delq); | |
221 SYMBOL (Qold_rassoc); | |
222 SYMBOL (Qold_rassq); | |
223 SYMBOL (Qonly); | |
224 SYMBOL (Qor); | |
225 SYMBOL (Qorientation); | |
226 SYMBOL_KEYWORD (Q_orientation); | |
227 SYMBOL (Qother); | |
228 SYMBOL (Qpage_setup); | |
510 | 229 SYMBOL (Qpages); |
442 | 230 SYMBOL (Qpeer); |
231 SYMBOL (Qpointer); | |
232 SYMBOL (Qpopup); | |
233 SYMBOL (Qportrait); | |
234 SYMBOL (Qprepend); | |
235 SYMBOL (Qprint); | |
236 SYMBOL (Qprinter); | |
237 SYMBOL_KEYWORD (Q_printer_settings); | |
238 SYMBOL (Qprocess); | |
239 SYMBOL_KEYWORD (Q_properties); | |
240 SYMBOL (Qprovide); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
241 SYMBOL (Qquery_coding_clear_highlights); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
242 SYMBOL (Qquery_coding_warning_face); |
442 | 243 SYMBOL (Qquestion); |
244 SYMBOL_KEYWORD (Q_question); | |
245 SYMBOL (Qradio); | |
246 SYMBOL (Qrassoc); | |
247 SYMBOL (Qrassq); | |
1983 | 248 SYMBOL (Qratio); |
1318 | 249 SYMBOL (Qredisplay); |
442 | 250 SYMBOL (Qremove_all); |
251 SYMBOL (Qrequire); | |
252 SYMBOL (Qresource); | |
253 SYMBOL (Qretry); | |
254 SYMBOL (Qreturn); | |
255 SYMBOL (Qreverse); | |
256 SYMBOL (Qright); | |
257 SYMBOL (Qright_margin); | |
1927 | 258 SYMBOL_MODULE_API (Qsearch); |
442 | 259 SYMBOL (Qselected); |
260 SYMBOL_KEYWORD (Q_selected); | |
510 | 261 SYMBOL (Qselection); |
442 | 262 SYMBOL (Qset_glyph_image); |
263 SYMBOL (Qsignal); | |
1927 | 264 SYMBOL_MODULE_API (Qsimple); |
442 | 265 SYMBOL (Qsize); |
563 | 266 SYMBOL (Qsound); |
442 | 267 SYMBOL (Qspace); |
268 SYMBOL (Qspecifier); | |
269 SYMBOL (Qstandard); | |
5182
2e528066e2fc
Move #'sort*, #'fill, #'merge to C from cl-seq.el.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5157
diff
changeset
|
270 SYMBOL_KEYWORD (Q_start); |
442 | 271 SYMBOL (Qstream); |
272 SYMBOL (Qstring); | |
273 SYMBOL_KEYWORD (Q_style); | |
274 SYMBOL_KEYWORD (Q_suffix); | |
771 | 275 SYMBOL (Qsubtype); |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
276 SYMBOL (Qsucceeded); |
442 | 277 SYMBOL (Qsymbol); |
278 SYMBOL (Qsyntax); | |
771 | 279 SYMBOL (Qsystem_default); |
442 | 280 SYMBOL (Qterminal); |
281 SYMBOL (Qtest); | |
282 SYMBOL (Qtext); | |
283 SYMBOL_KEYWORD (Q_text); | |
284 SYMBOL (Qthis_command); | |
285 SYMBOL (Qtimeout); | |
286 SYMBOL (Qtimestamp); | |
287 SYMBOL_KEYWORD (Q_title); | |
288 SYMBOL (Qto_page); | |
289 SYMBOL (Qtoggle); | |
290 SYMBOL (Qtoolbar); | |
291 SYMBOL (Qtop); | |
292 SYMBOL (Qtop_margin); | |
293 SYMBOL (Qtty); | |
294 SYMBOL (Qtype); | |
295 SYMBOL (Qundecided); | |
296 SYMBOL (Qundefined); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
297 SYMBOL (Qunencodable); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
298 SYMBOL (Qinvalid_sequence); |
442 | 299 SYMBOL (Qunimplemented); |
3659 | 300 SYMBOL (Qunicode_registries); |
3767 | 301 SYMBOL (Qunicode_type); |
771 | 302 SYMBOL (Quser_default); |
442 | 303 SYMBOL_KEYWORD (Q_value); |
304 SYMBOL (Qvalue_assoc); | |
305 SYMBOL (Qvertical); | |
306 SYMBOL (Qwarning); | |
307 SYMBOL (Qwidget); | |
308 SYMBOL (Qwidth); | |
309 SYMBOL_KEYWORD (Q_width); | |
310 SYMBOL (Qwindow); | |
1318 | 311 SYMBOL (Qwindows); |
312 SYMBOL (Qwindow_id); | |
442 | 313 SYMBOL (Qwindow_system); |
314 SYMBOL (Qx); | |
315 SYMBOL (Qy); | |
316 SYMBOL (Qyes); |