Mercurial > hg > xemacs-beta
annotate src/general-slots.h @ 4690:257b468bf2ca
Move the #'query-coding-region implementation to C.
This is necessary because there is no reasonable way to access the
corresponding mswindows-multibyte functionality from Lisp, and we need such
functionality if we're going to have a reliable and portable
#'query-coding-region implementation. However, this change doesn't yet
provide #'query-coding-region for the mswindow-multibyte coding systems,
there should be no functional differences between an XEmacs with this change
and one without it.
src/ChangeLog addition:
2009-09-19 Aidan Kehoe <kehoea@parhasard.net>
Move the #'query-coding-region implementation to C.
This is necessary because there is no reasonable way to access the
corresponding mswindows-multibyte functionality from Lisp, and we
need such functionality if we're going to have a reliable and
portable #'query-coding-region implementation. However, this
change doesn't yet provide #'query-coding-region for the
mswindow-multibyte coding systems, there should be no functional
differences between an XEmacs with this change and one without it.
* mule-coding.c (struct fixed_width_coding_system):
Add a new coding system type, fixed_width, and implement it. It
uses the CCL infrastructure but has a much simpler creation API,
and its own query_method, formerly in lisp/mule/mule-coding.el.
* unicode.c:
Move the Unicode query method implementation here from
unicode.el.
* lisp.h: Declare Fmake_coding_system_internal, Fcopy_range_table
here.
* intl-win32.c (complex_vars_of_intl_win32):
Use Fmake_coding_system_internal, not Fmake_coding_system.
* general-slots.h: Add Qsucceeded, Qunencodable, Qinvalid_sequence
here.
* file-coding.h (enum coding_system_variant):
Add fixed_width_coding_system here.
(struct coding_system_methods):
Add query_method and query_lstream_method to the coding system
methods.
Provide flags for the query methods.
Declare the default query method; initialise it correctly in
INITIALIZE_CODING_SYSTEM_TYPE.
* file-coding.c (default_query_method):
New function, the default query method for coding systems that do
not set it. Moved from coding.el.
(make_coding_system_1):
Accept new elements in PROPS in #'make-coding-system; aliases, a
list of aliases; safe-chars and safe-charsets (these were
previously accepted but not saved); and category.
(Fmake_coding_system_internal):
New function, what used to be #'make-coding-system--on Mule
builds, we've now moved some of the functionality of this to
Lisp.
(Fcoding_system_canonical_name_p):
Move this earlier in the file, since it's now called from within
make_coding_system_1.
(Fquery_coding_region):
Move the implementation of this here, from coding.el.
(complex_vars_of_file_coding):
Call Fmake_coding_system_internal, not Fmake_coding_system;
specify safe-charsets properties when we're a mule build.
* extents.h (mouse_highlight_priority, Fset_extent_priority,
Fset_extent_face, Fmap_extents):
Make these available to other C files.
lisp/ChangeLog addition:
2009-09-19 Aidan Kehoe <kehoea@parhasard.net>
Move the #'query-coding-region implementation to C.
* coding.el:
Consolidate code that depends on the presence or absence of Mule
at the end of this file.
(default-query-coding-region, query-coding-region):
Move these functions to C.
(default-query-coding-region-safe-charset-skip-chars-map):
Remove this variable, the corresponding C variable is
Vdefault_query_coding_region_chartab_cache in file-coding.c.
(query-coding-string): Update docstring to reflect actual multiple
values, be more careful about not modifying a range table that
we're currently mapping over.
(encode-coding-char): Make the implementation of this simpler.
(featurep 'mule): Autoload #'make-coding-system from
mule/make-coding-system.el if we're a mule build; provide an
appropriate compiler macro.
Do various non-mule compatibility things if we're not a mule
build.
* update-elc.el (additional-dump-dependencies):
Add mule/make-coding-system as a dump time dependency if we're a
mule build.
* unicode.el (ccl-encode-to-ucs-2):
(decode-char):
(encode-char):
Move these earlier in the file, for the sake of some byte compile
warnings.
(unicode-query-coding-region):
Move this to unicode.c
* mule/make-coding-system.el:
New file, not dumped. Contains the functionality to rework the
arguments necessary for fixed-width coding systems, and contains
the implementation of #'make-coding-system, which now calls
#'make-coding-system-internal.
* mule/vietnamese.el (viscii):
* mule/latin.el (iso-8859-2):
(windows-1250):
(iso-8859-3):
(iso-8859-4):
(iso-8859-14):
(iso-8859-15):
(iso-8859-16):
(iso-8859-9):
(macintosh):
(windows-1252):
* mule/hebrew.el (iso-8859-8):
* mule/greek.el (iso-8859-7):
(windows-1253):
* mule/cyrillic.el (iso-8859-5):
(koi8-r):
(koi8-u):
(windows-1251):
(alternativnyj):
(koi8-ru):
(koi8-t):
(koi8-c):
(koi8-o):
* mule/arabic.el (iso-8859-6):
(windows-1256):
Move all these coding systems to being of type fixed-width, not of
type CCL. This allows the distinct query-coding-region for them to
be in C, something which will eventually allow us to implement
query-coding-region for the mswindows-multibyte coding systems.
* mule/general-late.el (posix-charset-to-coding-system-hash):
Document why we're pre-emptively persuading the byte compiler that
the ELC for this file needs to be written using escape-quoted.
Call #'set-unicode-query-skip-chars-args, now the Unicode
query-coding-region implementation is in C.
* mule/thai-xtis.el (tis-620):
Don't bother checking whether we're XEmacs or not here.
* mule/mule-coding.el:
Move the eight bit fixed-width functionality from this file to
make-coding-system.el.
tests/ChangeLog addition:
2009-09-19 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el:
Check a coding system's type, not an 8-bit-fixed property, for
whether that coding system should be treated as a fixed-width
coding system.
* automated/query-coding-tests.el:
Don't test the query coding functionality for mswindows-multibyte
coding systems, it's not yet implemented.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 19 Sep 2009 22:53:13 +0100 |
parents | 6b2ef948e140 |
children | 3ba90c659d01 |
rev | line source |
---|---|
442 | 1 /* Commonly-used symbols -- include file |
2 Copyright (C) 1995 Sun Microsystems. | |
1318 | 3 Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 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 (Qactually_requested); | |
50 SYMBOL (Qafter); | |
51 SYMBOL (Qall); | |
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); | |
75 SYMBOL (Qcategory); | |
3439 | 76 SYMBOL (Qccl_program); |
442 | 77 SYMBOL (Qcenter); |
771 | 78 SYMBOL (Qchain); |
1333 | 79 SYMBOL (Qchange); |
442 | 80 SYMBOL (Qchannel); |
81 SYMBOL (Qchar); | |
82 SYMBOL (Qcharacter); | |
83 SYMBOL (Qchars); | |
771 | 84 SYMBOL (Qcode_page); |
85 SYMBOL (Qcoding_system); | |
442 | 86 SYMBOL (Qcolor); |
87 SYMBOL (Qcolumns); | |
88 SYMBOL (Qcommand); | |
89 SYMBOL_KEYWORD (Q_config); | |
90 SYMBOL (Qconsole); | |
771 | 91 SYMBOL (Qcontrol_1); |
442 | 92 SYMBOL (Qcopies); |
1927 | 93 SYMBOL_MODULE_API (Qcritical); |
442 | 94 SYMBOL (Qctext); |
771 | 95 SYMBOL (Qcurrent); |
442 | 96 SYMBOL (Qcursor); |
97 SYMBOL (Qdata); | |
903 | 98 SYMBOL (Qdde); |
442 | 99 SYMBOL (Qdead); |
793 | 100 SYMBOL (Qdebug); |
442 | 101 SYMBOL (Qdefault); |
1927 | 102 SYMBOL_MODULE_API (Qdelete); |
442 | 103 SYMBOL (Qdelq); |
771 | 104 SYMBOL (Qdescription); |
442 | 105 SYMBOL_KEYWORD (Q_descriptor); |
106 SYMBOL (Qdevice); | |
1318 | 107 SYMBOL (Qdevices); |
442 | 108 SYMBOL_KEYWORD (Q_device); |
109 SYMBOL (Qdialog); | |
673 | 110 SYMBOL (Qdirectory); |
442 | 111 SYMBOL (Qdimension); |
112 SYMBOL (Qdisplay); | |
113 SYMBOL (Qdoc_string); | |
771 | 114 SYMBOL (Qdocumentation); |
442 | 115 SYMBOL (Qduplex); |
116 SYMBOL (Qdynarr_overhead); | |
793 | 117 SYMBOL (Qemergency); |
442 | 118 SYMBOL (Qempty); |
3439 | 119 SYMBOL (Qencode_as_utf_8); |
442 | 120 SYMBOL (Qeq); |
121 SYMBOL (Qeql); | |
122 SYMBOL (Qequal); | |
123 SYMBOL (Qeval); | |
853 | 124 SYMBOL (Qevent); |
442 | 125 SYMBOL (Qextents); |
563 | 126 SYMBOL (Qexternal); |
442 | 127 SYMBOL (Qface); |
1318 | 128 SYMBOL (Qfaces); |
442 | 129 SYMBOL (Qfallback); |
130 SYMBOL (Qfile); | |
1632 | 131 SYMBOL_MODULE_API (Qfile_name); |
442 | 132 SYMBOL_KEYWORD (Q_filter); |
3659 | 133 SYMBOL (Qfinal); |
1983 | 134 SYMBOL (Qfixnum); |
135 SYMBOL (Qfloat); | |
442 | 136 SYMBOL (Qfont); |
137 SYMBOL (Qframe); | |
1318 | 138 SYMBOL (Qframes); |
442 | 139 SYMBOL (Qfrom_page); |
140 SYMBOL (Qfull_assoc); | |
141 SYMBOL (Qfuncall); | |
142 SYMBOL (Qfunction); | |
143 SYMBOL (Qgap_overhead); | |
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); | |
442 | 174 SYMBOL (Qkey); |
175 SYMBOL (Qkey_assoc); | |
2842 | 176 SYMBOL (Qkey_mapping); |
442 | 177 SYMBOL_KEYWORD (Q_key_sequence); |
178 SYMBOL (Qkeyboard); | |
179 SYMBOL (Qkeymap); | |
180 SYMBOL_KEYWORD (Q_keys); | |
181 SYMBOL_KEYWORD (Q_label); | |
182 SYMBOL (Qlandscape); | |
183 SYMBOL (Qlast_command); | |
184 SYMBOL (Qleft); | |
185 SYMBOL (Qleft_margin); | |
186 SYMBOL (Qlet); | |
771 | 187 SYMBOL (Qlevel); |
442 | 188 SYMBOL (Qlist); |
771 | 189 SYMBOL (Qlittle_endian); |
190 SYMBOL (Qlocale); | |
191 SYMBOL (Qlow); | |
442 | 192 SYMBOL (Qmagic); |
193 SYMBOL (Qmalloc_overhead); | |
194 SYMBOL_KEYWORD (Q_margin_width); | |
195 SYMBOL (Qmarkers); | |
196 SYMBOL (Qmax); | |
197 SYMBOL (Qmemory); | |
198 SYMBOL (Qmenubar); | |
199 SYMBOL (Qmessage); | |
200 SYMBOL_GENERAL (Qminus, "-"); | |
201 SYMBOL (Qmodifiers); | |
202 SYMBOL (Qmotion); | |
203 SYMBOL (Qmsprinter); | |
204 SYMBOL (Qmswindows); | |
205 SYMBOL (Qname); | |
1632 | 206 SYMBOL_MODULE_API (Qnative); |
442 | 207 SYMBOL (Qnatnum); |
208 SYMBOL (Qno); | |
209 SYMBOL (Qnone); | |
210 SYMBOL (Qnot); | |
211 SYMBOL (Qnothing); | |
1632 | 212 SYMBOL_MODULE_API (Qnotice); |
442 | 213 SYMBOL (Qobject); |
214 SYMBOL (Qok); | |
215 SYMBOL (Qold_assoc); | |
216 SYMBOL (Qold_delete); | |
217 SYMBOL (Qold_delq); | |
218 SYMBOL (Qold_rassoc); | |
219 SYMBOL (Qold_rassq); | |
220 SYMBOL (Qonly); | |
221 SYMBOL (Qor); | |
222 SYMBOL (Qorientation); | |
223 SYMBOL_KEYWORD (Q_orientation); | |
224 SYMBOL (Qother); | |
225 SYMBOL (Qpage_setup); | |
510 | 226 SYMBOL (Qpages); |
442 | 227 SYMBOL (Qpeer); |
228 SYMBOL (Qpointer); | |
229 SYMBOL (Qpopup); | |
230 SYMBOL (Qportrait); | |
231 SYMBOL (Qprepend); | |
232 SYMBOL (Qprint); | |
233 SYMBOL (Qprinter); | |
234 SYMBOL_KEYWORD (Q_printer_settings); | |
235 SYMBOL (Qprocess); | |
236 SYMBOL_KEYWORD (Q_properties); | |
237 SYMBOL (Qprovide); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
238 SYMBOL (Qquery_coding_clear_highlights); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
239 SYMBOL (Qquery_coding_warning_face); |
442 | 240 SYMBOL (Qquestion); |
241 SYMBOL_KEYWORD (Q_question); | |
242 SYMBOL (Qradio); | |
243 SYMBOL (Qrassoc); | |
244 SYMBOL (Qrassq); | |
1983 | 245 SYMBOL (Qratio); |
1318 | 246 SYMBOL (Qredisplay); |
442 | 247 SYMBOL (Qremove_all); |
248 SYMBOL (Qrequire); | |
249 SYMBOL (Qresource); | |
250 SYMBOL (Qretry); | |
251 SYMBOL (Qreturn); | |
252 SYMBOL (Qreverse); | |
253 SYMBOL (Qright); | |
254 SYMBOL (Qright_margin); | |
1927 | 255 SYMBOL_MODULE_API (Qsearch); |
442 | 256 SYMBOL (Qselected); |
257 SYMBOL_KEYWORD (Q_selected); | |
510 | 258 SYMBOL (Qselection); |
442 | 259 SYMBOL (Qset_glyph_image); |
260 SYMBOL (Qsignal); | |
1927 | 261 SYMBOL_MODULE_API (Qsimple); |
442 | 262 SYMBOL (Qsize); |
563 | 263 SYMBOL (Qsound); |
442 | 264 SYMBOL (Qspace); |
265 SYMBOL (Qspecifier); | |
266 SYMBOL (Qstandard); | |
267 SYMBOL (Qstream); | |
268 SYMBOL (Qstring); | |
269 SYMBOL_KEYWORD (Q_style); | |
270 SYMBOL_KEYWORD (Q_suffix); | |
771 | 271 SYMBOL (Qsubtype); |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
272 SYMBOL (Qsucceeded); |
442 | 273 SYMBOL (Qsymbol); |
274 SYMBOL (Qsyntax); | |
771 | 275 SYMBOL (Qsystem_default); |
442 | 276 SYMBOL (Qterminal); |
277 SYMBOL (Qtest); | |
278 SYMBOL (Qtext); | |
279 SYMBOL_KEYWORD (Q_text); | |
280 SYMBOL (Qthis_command); | |
281 SYMBOL (Qtimeout); | |
282 SYMBOL (Qtimestamp); | |
283 SYMBOL_KEYWORD (Q_title); | |
284 SYMBOL (Qto_page); | |
285 SYMBOL (Qtoggle); | |
286 SYMBOL (Qtoolbar); | |
287 SYMBOL (Qtop); | |
288 SYMBOL (Qtop_margin); | |
289 SYMBOL (Qtty); | |
290 SYMBOL (Qtype); | |
291 SYMBOL (Qundecided); | |
292 SYMBOL (Qundefined); | |
4690
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
293 SYMBOL (Qunencodable); |
257b468bf2ca
Move the #'query-coding-region implementation to C.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3767
diff
changeset
|
294 SYMBOL (Qinvalid_sequence); |
442 | 295 SYMBOL (Qunimplemented); |
3659 | 296 SYMBOL (Qunicode_registries); |
3767 | 297 SYMBOL (Qunicode_type); |
771 | 298 SYMBOL (Quser_default); |
442 | 299 SYMBOL_KEYWORD (Q_value); |
300 SYMBOL (Qvalue_assoc); | |
301 SYMBOL (Qvertical); | |
302 SYMBOL (Qwarning); | |
303 SYMBOL (Qwidget); | |
304 SYMBOL (Qwidth); | |
305 SYMBOL_KEYWORD (Q_width); | |
306 SYMBOL (Qwindow); | |
1318 | 307 SYMBOL (Qwindows); |
308 SYMBOL (Qwindow_id); | |
442 | 309 SYMBOL (Qwindow_system); |
310 SYMBOL (Qx); | |
311 SYMBOL (Qy); | |
312 SYMBOL (Qyes); |