]> code.delx.au - gnu-emacs/blob - src/ChangeLog
*** empty log message ***
[gnu-emacs] / src / ChangeLog
1 2008-06-29 Jason Rumney <jasonr@gnu.org>
2
3 * w32term.c (x_set_frame_alpha): Fix logic.
4
5 2008-06-29 Kenichi Handa <handa@m17n.org>
6
7 * fontset.c (Finternal_char_font): Return font-object instead of
8 font-name.
9
10 * composite.c (get_composition_id): Fix the width calculation for
11 TAB.
12
13 2008-06-29 Stefan Monnier <monnier@iro.umontreal.ca>
14
15 * indent.c (Fvertical_motion): Properly handle float column arg.
16
17 2008-06-28 Jason Rumney <jasonr@gnu.org>
18
19 * w32term.c (pfnGetFontUnicodeRanges): Remove unused function pointer.
20 (pfnSetLayeredWindowAttributes): New function pointer.
21 (w32_initialize): Initialize it when supported.
22 (x_set_frame_alpha): New function.
23
24 * w32fns.c (Fx_create_frame): Initialize frame parameter `alpha'.
25 (w32_frame_parm_handlers): Set alpha handler.
26
27 * frame.c (x_set_alpha) [HAVE_NTGUI]: Call x_set_frame_alpha.
28
29 2008-06-27 Jason Rumney <jasonr@gnu.org>
30
31 * w32fns.c (x_to_w32_font, w32_to_x_font, x_to_w32_weight)
32 (w32_to_x_weight, w32_to_all_x_charsets): Remove obsolete functions.
33 (w32_to_x_charset, x_to_w32_charset)
34 (Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
35 (Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
36 (Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
37 (Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
38 (Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
39 (Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
40 (Qw32_charset_mac, Vw32_charset_info_alist): Move to w32font.c.
41 (Qw32_charset_unicode): Remove.
42 (syms_of_w32fns): Update for above changes.
43
44 * w32font.c (w32_to_x_charset, x_to_w32_charset)
45 (Qw32_charset_ansi, Qw32_charset_symbol, Qw32_charset_default)
46 (Qw32_charset_shiftjis, Qw32_charset_hangeul, Qw32_charset_johab)
47 (Qw32_charset_chinesebig5, Qw32_charset_gb2312, Qw32_charset_oem)
48 (Qw32_charset_easteurope, Qw32_charset_turkish, Qw32_charset_baltic)
49 (Qw32_charset_russian, Qw32_charset_arabic, Qw32_charset_greek)
50 (Qw32_charset_hebrew, Qw32_charset_vietnamese, Qw32_charset_thai)
51 (Qw32_charset_mac, Vw32_charset_info_alist): Move from w32fns.c.
52 (syms_of_w32font): Update for above changes.
53
54 2008-06-27 Dan Nicolaescu <dann@ics.uci.edu>
55
56 * s/usg5-4.h: Fix previous change: keep the correct branch of a
57 removed #if.
58 (USG_SHARED_LIBRARIES): Remove duplicate definition.
59
60 2008-06-26 Juanma Barranquero <lekktu@gmail.com>
61 Eli Zaretskii <eliz@gnu.org>
62
63 * makefile.w32-in (LOCAL_FLAGS):
64 Don't include WINDOWSNT, DOS_NT and _UCHAR_T.
65
66 * sysdep.c (_spawnlp, _getpid):
67 Declare with explicit _cdecl instead of _CRTAPI1.
68
69 * editfns.c (Fget_internal_run_time):
70 Check for WINDOWSNT with #ifdef, not #if.
71
72 2008-06-26 Jason Rumney <jasonr@gnu.org>
73
74 * w32font.h (FONT_HANDLE, FONT_TEXTMETRIC): New macros.
75
76 * w32term.c (x_draw_glyph_string_foreground)
77 (x_draw_composite_glyph_string_foreground): Sync with xterm.c.
78 Use FONT_HANDLE macro.
79 (x_draw_glyph_string): Use FONT_TEXTMETRIC macro.
80
81 * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape)
82 (uniscribe_encode_char): Use FONT_HANDLE macro.
83
84 * w32font.c (Fx_select_font): Use FONT_HANDLE macro.
85 (w32font_text_extents): Use precast w32_font.
86 (w32font_close): Free cached metrics.
87 (w32font_open_internal): Allocate space for name on stack.
88
89 2008-06-26 Chong Yidong <cyd@stupidchicken.com>
90
91 * xdisp.c (extend_face_to_end_of_line): Fix last change.
92
93 2008-06-26 Jason Rumney <jasonr@gnu.org>
94
95 * w32term.h (FONT_AVG_WIDTH): Remove obsolete macro.
96 (CP_8BIT, CP_UNICODE, CP_UNKNOWN): Remove obsolete constants.
97
98 2008-06-26 Juanma Barranquero <lekktu@gmail.com>
99
100 * Makefile.in (SOME_MACHINE_OBJECTS): Remove w32bdf.o.
101
102 2008-06-26 Jason Rumney <jasonr@gnu.org>
103
104 * w32bdf.c, w32bdf.h: Remove obsolete files.
105
106 * makefile.w32-in: Remove refs to w32bdf.h and w32bdf.c.
107
108 * w32gui.h: Don't include w32bdf.h.
109 (XCharStruct, enum w32_char_font_type, W32FontStruct):
110 Remove obsolete font support.
111
112 * w32font.h (struct w32font_info): Remove compat_w32_font.
113 Add hfont member.
114 (FONT_COMPAT): Remove obsolete macro.
115
116 * w32font.c (w32font_close): Remove compat code. Delete hfont member.
117 (w32font_encode_char, w32font_text_extents): Use new hfont member.
118 (w32font_open_internal): Remove compat code. Set new hfont member.
119 (Fx_select_font): Use new hfont member.
120
121 * w32uniscribe.c (uniscribe_otf_capability, uniscribe_shape)
122 (uniscribe_encode_char): Use new hfont member.
123
124 * w32term.c (x_draw_glyph_string_foreground)
125 (x_draw_composite_glyph_string_foreground): Use new hfont member.
126 (x_draw_glyph_string): Use metrics in w32font_info.
127
128 2008-06-26 Kenichi Handa <handa@m17n.org>
129
130 * xdisp.c (handle_auto_composed_prop): Fix for the terminal case.
131
132 2008-06-26 Dan Nicolaescu <dann@ics.uci.edu>
133
134 * unexnext.c:
135 * m/ews4800.h:
136 * m/hp9000s300.h:
137 * m/ibm370aix.h:
138 * m/mips-siemens.h:
139 * m/ncr386.h:
140 * m/next.h:
141 * m/pmax.h:
142 * m/powerpcle.h:
143 * m/tandem-s2.h:
144 * s/386bsd.h:
145 * s/bsd386.h:
146 * s/bsd4-1.h:
147 * s/bsd4-2.h:
148 * s/bsdos2-1.h:
149 * s/bsdos2.h:
150 * s/bsdos3.h:
151 * s/bsdos4.h:
152 * s/nextstep.h:
153 * s/ultrix4-3.h:
154 * s/usg5-0.h:
155 * s/usg5-2-2.h:
156 * s/usg5-2.h:
157 * s/usg5-4-3.h:
158 * s/ux4800.h:
159 * s/uxpds.h:
160 * s/uxpv.h: Remove support for obsolete systems.
161 * s/hpux.h, s/hpux10.h, s/hpux8.h, s/hpux9.h, s/hpux9shr.h:
162 Remove, insert contents in s/hpux-10.20.h
163 * s/aix3-1.h, s/aix3-2-5.h, s/aix3-2.h, s/aix4-1.h, s/aix4.h:
164 Remove, insert contents in s/aix-4.2.h
165 * s/usg5-3.h: Remove, insert contents in s/usg5-4.h.
166 * s/bsd4-3.h: Rename to ..
167 * s/bsd-common.h: ... this.
168 * src/data.c:
169 * src/doc.c:
170 * src/ecrt0.c:
171 * src/emacs.c:
172 * src/fileio.c:
173 * src/floatfns.c:
174 * src/keyboard.c:
175 * src/mem-limits.h:
176 * src/print.c:
177 * src/process.c:
178 * src/sysdep.c:
179 * src/syssignal.h:
180 * src/systty.h:
181 * src/syswait.h:
182 * src/term.c:
183 * src/unexec.c:
184 * src/unexelf.c:
185 * src/unexhp9k800.c:
186 * src/m/hp800.h:
187 * src/m/ibmrs6000.h:
188 * src/m/mips.h:
189 * src/m/vax.h:
190 * src/s/darwin.h:
191 * src/s/freebsd.h:
192 * src/s/gnu.h:
193 * src/s/ms-w32.h:
194 * src/s/msdos.h:
195 * src/s/netbsd.h:
196 * src/s/template.h: Remove references to obsolete variables.
197
198 * Makefile.in: Add dependencies for all unexec files.
199 (admindir): Remove unused variable.
200 (UNEXEC_SRC): Remove references.
201
202 2008-06-25 Chong Yidong <cyd@stupidchicken.com>
203
204 * xfns.c (x_default_font_parameter): If Xft is available, first
205 try Monospace-12 for the default font.
206
207 2008-06-25 Jason Rumney <jasonr@gnu.org>
208
209 * xdisp.c (get_glyph_face_and_encoding): Encode invalid glyphs as 0.
210
211 2008-06-25 Stefan Monnier <monnier@iro.umontreal.ca>
212
213 * bytecode.c (Fbyte_code): Disable debugging code that doesn't compile.
214
215 * buffer.c (syms_of_buffer): Remove default-word-wrap.
216
217 2008-06-25 Juanma Barranquero <lekktu@gmail.com>
218
219 * xdisp.c (syms_of_xdisp) <truncate-partial-width-windows>: Doc fix.
220 <scroll-conservatively>: Fix typo in docstring.
221
222 * xselect.c (Fx_send_client_event): Doc fix.
223
224 2008-06-25 Kenichi Handa <handa@m17n.org>
225
226 * xfaces.c (Fx_list_fonts): Call Flist_fonts with the arg PREFER.
227
228 * font.c (font_parse_fcname): Remove unused variables.
229 (font_sort_entites): Delete the arg SPEC. Caller changed.
230 Fix for the case of ! best_only.
231 (font_delete_unmatched): Check DPI and AVGWIDTH too.
232
233 * lisp.h (Fstring_to_unibyte): EXFUN it.
234
235 * character.h (str_to_unibyte): Extern it.
236
237 * character.c (str_to_unibyte): New function.
238
239 * fns.c (Fstring_to_unibyte): New function.
240 (syms_of_fns): Defsubr it.
241
242 2008-06-24 Kenichi Handa <handa@m17n.org>
243
244 * font.c (font_score): Even if the PIXEL_SIZE is the same, check
245 DPI too.
246 (font_sort_entites): Setup prefer_prop[FONT_DPI_INDEX] too.
247
248 2008-06-24 Andreas Schwab <schwab@suse.de>
249
250 * Makefile.in (${lispsource}loaddefs.el): Rename from
251 ../lisp/loaddefs.el.
252 (bootstrap-clean): Do what distclean does but don't remove
253 Makefile.
254 (distclean): Depend on bootstrap-clean and remove Makefile.
255
256 2008-06-24 Chong Yidong <cyd@stupidchicken.com>
257
258 * buffer.h (struct buffer): New member word_wrap.
259
260 * buffer.c (syms_of_buffer): New variables default-word-wrap and
261 word-wrap.
262 (init_buffer_once): Initialize them.
263
264 * dispextern.h (struct it): Replace bool truncate_lines_p with a
265 line_wrap enum possessing three possible values.
266
267 * termopts.h: Replace truncate_partial_width_windows with
268 Vtruncate_partial_width_windows.
269
270 * dispnew.c (direct_output_for_insert): Avoid direct output when
271 inserting a space with word wrap on.
272
273 * indent.c (compute_motion): Obey integer values of
274 truncate-partial-width-windows.
275
276 * xdisp.c (Vtruncate_partial_width_windows): New Lisp_Object,
277 replacing truncate_partial_width_windows.
278 (init_iterator): If Vtruncate_partial_width_windows is an integer,
279 truncate only if the window width is below that integer.
280 (start_display. resize_mini_window, produce_stretch_glyph)
281 (display_string, move_it_in_display_line_to): Use line_wrap.
282 (back_to_previous_visible_line_start, reseat_1): Reset
283 string_from_display_prop_p.
284 (display_line): Extend default face to end of line when wrapping.
285
286 2008-06-24 Kim F. Storm <storm@cua.dk>
287
288 * xdisp.c (display_line, move_it_in_display_line_to): Add ability
289 to wrap continued lines at word boundaries.
290
291 2008-06-24 Jason Rumney <jasonr@gnu.org>
292
293 * font.c (Ffont_face_attributes): Multiply pixel size before point
294 conversion to avoid multiplying rounding error.
295
296 2008-06-23 Jason Rumney <jasonr@gnu.org>
297
298 * w32term.c (x_draw_glyph_string_background)
299 (x_draw_glyph_string): Remove old bdf font code.
300
301 * w32term.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE): Remove.
302
303 2008-06-22 Kenichi Handa <handa@m17n.org>
304
305 * font.c (font_find_for_lface): Try the adstyle specified in
306 the property of LFACE_FONT of LFACE (if any).
307
308 2008-06-21 Seiji Zenitani <zenitani@mac.com>
309 Ryo Yoshitake <ryo@shiftmode.net>
310
311 * xterm.c (x_set_frame_alpha): Add x_catch_errors for bug#437.
312
313 2008-06-22 Stefan Monnier <monnier@iro.umontreal.ca>
314
315 * Makefile.in (${lisp} ${SOME_MACHINE_LISP}, ../lisp/loaddefs.el):
316 Use $(BOOTSTRAPEMACS) rather than witness-emacs.
317 (bootstrap-emacs${EXEEXT}): Merge witness-emacs into it.
318 (witness-emacs): Remove.
319 (lisp, shortlisp): Move loaddefs.el earlier.
320 (mostlyclean): Forget about witness-emacs.
321
322 2008-06-22 Glenn Morris <rgm@gnu.org>
323
324 * Makefile.in (witness-emacs): Depend on temacs${EXEEXT}.
325 (.SUFFIXES): Declare .el.elc as a suffix rule, for non-GNU makes.
326
327 2008-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
328
329 * Makefile.in (PRECOMP): Remove.
330 (${lisp} ${SOME_MACHINE_LISP}): Remove pseudo dependency on PRECOMP.
331 (witness-emacs): Run `compile-first'.
332 (.el.elc): Use the new compile-onefile target.
333
334 2008-06-21 Kenichi Handa <handa@m17n.org>
335
336 * xftfont.c (xftfont_open): Handle QCembolden only when
337 FC_EMBOLDEN is defined.
338
339 2008-06-21 Andreas Schwab <schwab@suse.de>
340
341 * Makefile.in (witness-emacs): Use ../lisp, not $(lispsource).
342 (.el.elc): Likewise.
343
344 2008-06-21 Miles Bader <miles@gnu.org>
345
346 * Makefile.in (../lisp/loaddefs.el): Build autoloads in the lisp
347 build dir, not the lisp source dir.
348
349 2008-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
350
351 * Makefile.in (emacs${EXEEXT}): Link the new emacs to bootstrap-emacs.
352 (bootstrapclean): Remove.
353 (.el.elc): New rule.
354 (PRECOMP): New var.
355 (../lisp/subdirs.el): Remove.
356 (bootstrap-emacs${EXEEXT}): Remove subdirs.el and charpro.el dependency.
357 (witness-emacs): New target.
358 (mostlyclean): Remove witness-emacs as well.
359 (../lisp/loaddefs.el, ${lisp} ${SOME_MACHINE_LISP}):
360 Add witness-emacs dependency.
361
362 2008-06-20 Chong Yidong <cyd@stupidchicken.com>
363
364 * font.c (Ffont_face_attributes): Omit key-attribute pairs not
365 defined by the font.
366
367 2008-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
368
369 * Makefile.in (emacs${EXEEXT}): Depend on the machine-specific files.
370 (bootstrap-clean): New target that keeps TAGS around.
371 (../lisp/subdirs.el, ../lisp/loaddefs.el): New targets.
372 (bootstrap-emacs${EXEEXT}): Depend on subdirs.el.
373
374 2008-06-20 Jason Rumney <jasonr@gnu.org>
375
376 * w32fns.c, w32term.c, w32term.h, w32gui.h [OLD_FONT]:
377 Remove obsolete font code.
378
379 * w32font.c (font_matches_spec): Use csb bitfield from font signature
380 to determine language support.
381
382 2008-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
383
384 * sysdep.c (cfsetspeed): New fun extracted from the code.
385 (cfmakeraw): Move before first use.
386
387 2008-06-20 Angelo Graziosi <angelo.graziosi@alice.it> (tiny change)
388
389 * sysdep.c (cfmakeraw): Provide fallback implementation.
390 (serial_configure): Provide fallback implementation of cfsetspeed.
391
392 2008-06-20 Kenichi Handa <handa@m17n.org>
393
394 * xftfont.c (xftfont_open): Add FOUNDRY, SPACING, DPI, SCALABLE to
395 the pattern.
396
397 * fontset.c (fontset_from_font): Copy font_spec before changing
398 the elements.
399
400 * xfns.c (x_default_font_parameter): Try "monospace-12" too.
401
402 2008-06-20 Stefan Monnier <monnier@iro.umontreal.ca>
403
404 * w32fns.c, xfnc.c (x_default_font_parameter): Only set `font-param'
405 for explicit `font' parameters.
406
407 * frame.c (x_set_font): Remove unexplained call to fix inf-recursion.
408
409 2008-06-19 Kenichi Handa <handa@m17n.org>
410
411 * frame.c: Include <ctype.h>.
412 (x_set_font_backend): Allow spacing characters in the X resource
413 for FontBackend.
414
415 2008-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
416
417 * w32fns.c, xfns.c (Qfont_param): New var.
418 (syms_of_w32fns): Initialize it.
419 (x_default_font_parameter): Record explicit `font' into
420 `font-parameter'.
421
422 2008-06-18 Kenichi Handa <handa@m17n.org>
423
424 * font.c (font_parse_xlfd): Fix previous change.
425 (font_parse_fcname): Don't use :fc-unknown-spec.
426 (FRAME_X_DISPLAY_INFO): Besure to have at least 1 pixel height.
427 (Fcopy_font_spec): Preserve the order of elements in FONT_EXTRA.
428 (font_add_log): Prepend the driver name to the resulting fonts.
429
430 * ftfont.c (ftfont_pattern_entity): New arg extra. Caller changed.
431 (ftfont_spec_pattern): Don't check QCfc_unknown_spec and QCname.
432 (ftfont_list) [FC_FONTFORMAT]: Include FC_FONTFORMAT in objset.
433
434 * xftfont.c (QChinting , QCautohint, QChintstyle, QCrgba)
435 (QCembolden): New variables.
436 (syms_of_xftfont): DEFSYM them.
437 (xftfont_open): Call XftFontMatch. Don't trust the result of
438 XftTextExtents8 if the pixel_size is less than 5.
439
440 2008-06-18 Andreas Schwab <schwab@suse.de>
441
442 * font.c (Ffont_face_attributes): Only define if HAVE_WINDOW_SYSTEM.
443 (syms_of_font): Only defsubr if HAVE_WINDOW_SYSTEM.
444
445 2008-06-18 Jason Rumney <jasonr@gnu.org>
446
447 * w32font.c (w32font_list, w32font_match): Add logging.
448
449 * w32uniscribe (uniscribe_list, uniscribe_match): Add logging.
450
451 2008-06-17 Chong Yidong <cyd@stupidchicken.com>
452
453 * font.c (font_parse_fcname): Store divider characters for
454 unknown-spec list. For known key symbols, intern using correct
455 symbol name.
456
457 2008-06-17 Kenichi Handa <handa@m17n.org>
458
459 * xfaces.c (realize_default_face): If the frame is not on window
460 system, set the fontset of face to nil.
461
462 2008-06-17 Naohiro Aota <nao.aota@gmail.com> (tiny change)
463
464 * fontset.c (fontset_pattern_regexp): Escape some reg-expr characters.
465
466 2008-06-16 Juanma Barranquero <lekktu@gmail.com>
467
468 * dispextern.h (lookup_non_ascii_face, split_font_name_into_vector)
469 (build_font_name_from_vector): Delete externs.
470
471 * xfaces.c (struct font_name): Don't declare.
472
473 2008-06-16 Stefan Monnier <monnier@iro.umontreal.ca>
474
475 * font.c (font_unparse_gtkname): Use EQ to compare Lisp_Objects.
476
477 2008-06-16 Chong Yidong <cyd@stupidchicken.com>
478
479 * font.c (font_parse_fcname): Fix handling of unknown-spec string.
480
481 2008-06-16 Juanma Barranquero <lekktu@gmail.com>
482
483 * font.c (Ffont_spec): Fix usage in docstring.
484 (Ffont_face_attributes): Doc fix.
485
486 2008-06-16 Andreas Schwab <schwab@suse.de>
487
488 * font.c (Ffont_face_attributes): Fix definition.
489
490 2008-06-16 Jason Rumney <jasonr@gnu.org>
491
492 * font.h (font_style_symbolic_from_value): Remove.
493
494 * font.c (font_style_symbolic_from_value): Remove.
495 (font_style_symbolic): Revert to pre 2008-06-13 version.
496
497 * w32font.c (w32_to_fc_weight): New function.
498 (w32font_full_name, logfont_to_fcname): Use it.
499
500 2008-06-16 Kenichi Handa <handa@m17n.org>
501
502 * font.c (font_check_object): Delete it.
503 (font_clear_cache): Check if a font-object is alive.
504 (font_open_entity): Likewise. Set FONT_OBJLST_INDEX of a
505 font-object to nil.
506 (font_close_object): Don't check FONT_CLOSE_OBJECT.
507 (font_at): Don't call font_check_object.
508 (Ffont_get): Return a symbol for :weight, :slant, and :width.
509
510 2008-06-16 Katsumi Yamaoka <yamaoka@jpl.org>
511
512 * puresize.h (BASE_PURESIZE): Increase to 1230000.
513
514 2008-06-16 Chong Yidong <cyd@stupidchicken.com>
515
516 * font.c (font_parse_fcname): Correctly parse KEY=VAL values.
517
518 2008-06-15 Chong Yidong <cyd@stupidchicken.com>
519
520 * font.c (font_parse_fcname): Only one decimal point.
521 (font_unparse_fcname): Handle data in family and foundry indices
522 as symbols, not strings.
523 (font_unparse_gtkname, Ffont_face_attributes): New functions.
524
525 * xfns.c (Fx_select_font): Give GTK font dialog the default font name.
526
527 * font.h (font_unparse_gtkname): Add prototype.
528
529 2008-06-15 Naohiro Aota <nao.aota@gmail.com> (tiny change)
530
531 * fontset.c (fontset_pattern_regexp): Escape `+' characters in pattern.
532
533 2008-06-15 Andreas Schwab <schwab@suse.de>
534
535 * font.c (font_update_drivers): Fix crash when no drivers match.
536
537 2008-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
538
539 * xfns.c (Fx_create_frame): internal-border-width default to 0 for Gtk.
540 * gtkutil.c (xg_create_frame_widgets): Don't set internal_border_width.
541
542 2008-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
543
544 * xdisp.c (syms_of_xdisp): Default underline-minimum-offset to 1.
545
546 2008-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
547
548 * process.c (Fserial_process_configure, Fprocess_send_eof):
549 Use EQ to compare Lisp_Objects.
550
551 2008-06-13 Jason Rumney <jasonr@gnu.org>
552
553 * w32fns.c (Fw32_select_font): Remove old font API function.
554
555 * w32font.c (logfont_to_fcname): New function.
556 (Fx_select_font): New font dialog function compatible with
557 GTK/fontconfig version.
558
559 * font.c (font_style_symbolic_from_value): New function.
560 (font_style_symbolic): Use it.
561
562 * font.h (font_style_symbolic_from_value): Declare new function.
563
564 2008-06-13 Juanma Barranquero <lekktu@gmail.com>
565
566 * font.c (syms_of_font) <font-weight-table, font-slant-table>:
567 <font-width-table>: Fix typos in docstrings.
568
569 2008-06-13 Daniel Engeler <engeler@gmail.com>
570
571 These changes add serial port access.
572 * process.c: Add HAVE_SERIAL.
573 (Fdelete_process, Fprocess_status, Fset_process_buffer)
574 (Fset_process_filter, Fset_process_sentinel, Fprocess_contact)
575 (list_processes_1, select_wrapper, Fstop_process)
576 (Fcontinue_process, Fprocess_send_eof, kill_buffer_processes)
577 (status_notify): Modify to handle serial processes.
578 [HAVE_SERIAL] (Fserial_process_configure)
579 [HAVE_SERIAL] (make_serial_process_unwind, Fmake_serial_process):
580 New functions.
581 * process.h (struct Lisp_Process): Add `type'.
582 * sysdep.c [HAVE_TERMIOS] (serial_open, serial_configure):
583 New functions.
584 * w32.c (_sys_read_ahead, sys_read, sys_write): Modify to handle
585 serial ports.
586 (serial_open, serial_configure) New functions.
587 * w32.h: Add FILE_SERIAL.
588 (struct _child_process): Add ovl_read, ovl_write.
589
590 2008-06-13 Kenichi Handa <handa@m17n.org>
591
592 * dispextern.h (enum lface_attribute_index): New member
593 LFACE_FOUNDRY_INDEX.
594
595 * font.c (font_score): Delete arg alternate_families. Check only
596 weight, slant, width, and size. Ignore the difference of alias
597 style symbols.
598 (font_sort_entites): Adjust for the above change. Reflect the
599 order of font-driver to scores.
600 (font_list_entities): Don't check alternate_familes here.
601 (font_clear_prop): Handle foundry.
602 (font_update_lface): Don't parse "foundry-family" form here.
603 Handle FONT_FOUNDRY_INDEX.
604 (font_find_for_lface): Likewise. Handle alternate families here.
605 If registry is nil, try iso8859-1 and ascii-0.
606 (font_open_for_lface): Pay attention to size in ENTITY.
607 (font_open_by_name): Simplify by calling font_load_for_lface.
608 (free_font_driver_list): Delete it.
609 (font_update_drivers): Preserve the order of backends.
610 (syms_of_font): Setting of sort_shift_bits adjusted for the change
611 of font_score and font_sort_entites.
612 (font_update_sort_order): Likewise.
613
614 * xfaces.c (LFACE_FOUNDRY): New macro.
615 (check_lface_attrs): Check foundry.
616 (set_lface_from_font): Don't parse "FOUNDRY-FAMILY" form.
617 (merge_face_vectors): Check foundry.
618 (merge_face_ref): Likewise.
619 (Finternal_set_lisp_face_attribute): Likewise.
620 (x_update_menu_appearance): Likewise.
621 (Finternal_get_lisp_face_attribute): Likewise.
622 (lface_hash): Likewise.
623 (lface_same_font_attributes_p): Likewise.
624 (x_supports_face_attributes_p): Likewise.
625 (tty_supports_face_attributes_p): Likewise.
626 (Finternal_set_alternative_font_family_alist): Intern strings.
627 (Finternal_set_alternative_font_registry_alist): Downcase strings.
628 (realize_default_face): Set LFACE_FOUNDRY (lface).
629
630 * xfns.c (Fx_create_frame, x_create_tip_frame): Register X
631 font-driver at first.
632
633 * ftfont.c (ftfont_font_format) [! FC_FONTFORMAT]: Declare "int len;".
634
635 2008-06-12 Emanuele Giaquinta <emanuele.giaquinta@gmail.com> (tiny change)
636
637 * lread.c (Fload): Use xfree, not free on saved_doc_string.
638
639 2008-06-12 Jim Meyering <meyering@redhat.com>
640
641 Make unexec_free handle NULL the same way free does.
642 * unexmacosx.c (unexec_free): Ignore a NULL argument.
643
644 2008-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
645
646 * character.h (CHAR_TO_BYTE_SAFE): New macro.
647 * character.c (Fmultibyte_char_to_unibyte): Obey the docstring.
648 * regex.c (RE_CHAR_TO_UNIBYTE): Use the new macro.
649 (WEAK_ALIAS): Simplify.
650 * syntax.c (skip_chars): Don't mark non-byte chars in the fastmap
651 when searching a unibyte buffer.
652
653 2008-06-12 Chong Yidong <cyd@stupidchicken.com>
654
655 * xfns.c (Fx_select_font): Rename from x-font-dialog.
656
657 2008-06-12 Juanma Barranquero <lekktu@gmail.com>
658
659 * w32font.c: Include ctype.h.
660
661 2008-06-11 Jason Rumney <jasonr@gnu.org>
662
663 * w32font.c (w32font_encode_char): Detect missing glyphs that are
664 misreported as space.
665 (add_font_entity_to_list): Support unicode-bmp and unicode-sip
666 as aliases for registry iso10646-1.
667
668 2008-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
669
670 * buffer.c (clone_per_buffer_values): Skip `name'.
671
672 2008-06-11 Chong Yidong <cyd@stupidchicken.com>
673
674 * font.c (font_parse_fcname): Fix last change; accept decimal
675 points in font size.
676
677 2008-06-10 Jason Rumney <jasonr@gnu.org>
678
679 * w32uniscribe.c (add_opentype_font_name_to_list):
680 Skip non unicode fonts.
681
682 2008-06-10 Chong Yidong <cyd@stupidchicken.com>
683
684 * xfns.c (Fx_font_dialog): New function.
685
686 * gtkutil.c (xg_dialog_response_cb): Rename from
687 xg_file_response_callback.
688 (pop_down_dialog): Rename from pop_down_file_dialog.
689 (xg_get_file_name): Callers changed.
690 (xg_get_font_name): New function.
691
692 * gtkutil.h (xg_get_font_name): Insert prototype.
693
694 2008-06-10 Stefan Monnier <monnier@iro.umontreal.ca>
695
696 * xdisp.c (underline_minimum_offset): Rename from xterm.c's
697 x_underline_minimum_display_offset.
698 (syms_of_xdisp): Declare it here rather than in xterm.c.
699 * dispextern.h (underline_minimum_offset): Declare it.
700 * w32term.c (x_draw_glyph_string): Use it.
701 * xterm.c (x_underline_minimum_display_offset): Move to xdisp.c.
702 (syms_of_xterm): Don't declare it any more.
703 (x_draw_glyph_string): Adjust to the new name.
704
705 2008-06-10 David De La Harpe Golden <david@harpegolden.net> (tiny change)
706
707 * xterm.c (x_underline_minimum_display_offset): New var.
708 (x_draw_glyph_string): Use it.
709 (syms_of_xterm): Declare it.
710
711 2008-06-10 Chong Yidong <cyd@stupidchicken.com>
712
713 * font.c (font_parse_fcname): Accept GTK-style font names too.
714
715 2008-06-10 Stefan Monnier <monnier@iro.umontreal.ca>
716
717 * dired.c (file_name_completion): Don't return t if the match is exact
718 but with different capitalization.
719 * minibuf.c (Ftry_completion): Simplify.
720
721 * window.c (Vwindow_point_insertion_type): New var.
722 (set_window_buffer): Use it.
723 (syms_of_window): Init and export it to Lisp.
724
725 2008-06-10 Kenichi Handa <handa@m17n.org>
726
727 * font.h (font_intern_prop): Prototype adjusted.
728
729 * font.c (font_intern_prop): New arg force_symbol.
730 (font_parse_xlfd, font_parse_fcname, font_parse_family_registry):
731 Adjust for the change of font_intern_prop.
732
733 * ftfont.c (ftfont_pattern_entity):
734 * w32font.c (add_font_name_to_list, w32_enumfont_pattern_entity)
735 (w32_registry):
736 * w32uniscribe.c (add_opentype_font_name_to_list): Adjust for
737 the change of font_intern_prop.
738
739 2008-06-09 Juanma Barranquero <lekktu@gmail.com>
740
741 * w32menu.c (digest_single_submenu): Declare extern.
742
743 2008-06-09 Jason Rumney <jasonr@gnu.org>
744
745 * w32term.c (x_make_frame_visible): Use alternate restore flags.
746
747 * w32menu.c (Fx_popup_menu): Unwind protect while building menu.
748 (parse_single_submenu): Remove.
749 (digest_single_submenu): Remove.
750 (syms_of_w32menu): Don't initialise variables that have moved
751 to menu.c.
752 (set_frame_menubar): Sync with version in xmenu.c.
753 (w32_menu_show): Sync with xmenu_show in xmenu.c.
754
755 * menu.c (single_keymap_panes, push_menu_pane, push_menu_item):
756 Make static again.
757
758 2008-06-09 Jason Rumney <jasonr@gnu.org>
759
760 Changes to w32 files related to the move of common menu code
761 to menu.c on 2008-06-08 by Chong Yidong.
762
763 * menu.c [HAVE_NTGUI]: Include w32term.h, move widget related
764 defs to w32gui.h.
765 (single_keymap_panes, push_menu_item, push_menu_pane):
766 Make globally visible.
767
768 * w32menu.c (enum button_type, widget_value, local_heap, local_alloc)
769 (local_free, malloc_widget_value, free_widget_value)
770 (MENU_ITEMS_ITEM_NAME, MENU_ITEMS_ITEM_ENABLE, MENU_ITEMS_ITEM_VALUE)
771 (MENU_ITEMS_ITEM_EQUIV_KEY, MENU_ITEMS_ITEM_DEFINITION)
772 (MENU_ITEMS_ITEM_TYPE, MENU_ITEMS_ITEM_SELECTED, MENU_ITEMS_ITEM_HELP)
773 (MENU_ITEMS_ITEM_LENGTH, enum menu_item_idx): Remove defs.
774 (menu_items, menu_items_allocated, menu_items_used)
775 (menu_items_n_panes, menu_items_submenu_depth): Remove global vars.
776 (init_menu_items, finish_menu_items, discard_menu_items)
777 (grow_menu_items, push_submenu_start, push_submenu_end)
778 (push_left_right_boundary, push_menu_pane, push_menu_item)
779 (keymap_panes, single_keymap_panes, list_of_panes, list_of_items)
780 (free_menubar_widget_tree_value, parse_single_submenu)
781 (update_submenu_strings): Remove functions.
782 (xmalloc_widget_value): Remove and declare extern.
783
784 * makefile.w32-in ($(SRC)/menu.$(O)): New target.
785 (OBJ1): Build it.
786
787 * w32gui.h (widget_value, XtPointer, Boolean, enum button_type)
788 (local_heap, local_alloc, local_free, malloc_widget_value)
789 (free_widget_value): Define here.
790
791 2008-06-09 Kenichi Handa <handa@m17n.org>
792
793 * font.h (Qascii_0): Extern it.
794
795 * font.c (Qascii_0): New variable.
796 (syms_of_font): DEFSYM it.
797 (font_open_by_name): If the registry "iso8859-1" fails, try also
798 "ascii-0".
799
800 * ftfont.c (ftfont_spec_pattern): Accept the registry `ascii-0'.
801
802 2008-06-08 Kenichi Handa <handa@m17n.org>
803
804 * .gdbinit (xfont): New command.
805
806 2008-06-08 Andreas Schwab <schwab@suse.de>
807
808 * menu.c [HAVE_X_WINDOWS]: Include "xterm.h".
809 * Makefile.in (menu.o): Update dependencies.
810
811 * Makefile.in (obj): Always add menu.o.
812 * emacs.c (main): Always call syms_of_menu.
813 * keyboard.h: Remove extra #ifdef HAVE_X_WINDOW.
814
815 2008-06-08 Chong Yidong <cyd@stupidchicken.com>
816
817 * Makefile.in: Compile menu.c.
818
819 * lisp.h: Declare syms_of_menu.
820
821 * emacs.c (main): Call syms_of_menu.
822
823 * keyboard.h: Relocate platform-independent menu definitions from
824 xmenu.c.
825
826 * menu.c: New file. Relocate platform-independent menu
827 definitions from xmenu.c. Suggested by Adrian Robert.
828
829 * xmenu.c: Remove platform-independent menu definitions.
830 (menu_items menu_items_inuse, menu_items_allocated)
831 (menu_items_used, menu_items_n_panes)
832 (menu_items_submenu_depth): Move to keyboard.h.
833 (init_menu_items, finish_menu_items, unuse_menu_items)
834 (discard_menu_items, restore_menu_items, save_menu_items)
835 (grow_menu_items, push_submenu_start, push_submenu_end)
836 (push_left_right_boundary, push_menu_pane, push_menu_item)
837 (keymap_panes, single_keymap_panes, single_menu_item)
838 (list_of_panes, list_of_items, find_and_call_menu_selection)
839 (xmalloc_widget_value, free_menubar_widget_value_tree)
840 (parse_single_submenu, digest_single_submenu)
841 (update_submenu_strings): Move to menu.c.
842
843 2008-06-07 Stefan Monnier <monnier@iro.umontreal.ca>
844
845 * dispnew.c (Flast_nonminibuf_frame): Handle the NULL case.
846
847 2008-06-06 Miles Bader <miles@gnu.org>
848
849 * xdisp.c (x_produce_glyphs): Calculate tab width based on current
850 face, not frame default.
851
852 2008-06-05 Martin Rudalics <rudalics@gmx.at>
853
854 * window.c (pop_up_windows, pop_up_frames)
855 (display_buffer_reuse_frames, Vpop_up_frame_function)
856 (Vdisplay_buffer_function, Veven_window_heights)
857 (Vspecial_display_buffer_names, Vspecial_display_regexps)
858 (Vspecial_display_function, Vsame_window_buffer_names)
859 (Vsame_window_regexps, split_height_threshold)
860 (Vsplit_window_preferred_function): Move those vars to window.el.
861 (display_buffer_1, Fspecial_display_p, Fsame_window_p)
862 (Fdisplay_buffer): Move those functions to window.el.
863 (syms_of_window): Remove corresponding declarations.
864 (display_buffer): New function.
865 (temp_output_buffer_show, Fother_window_for_scrolling): Use it.
866 * dispnew.c (Flast_nonminibuf_frame): New function.
867 * buffer.c (Fpop_to_buffer): Move to window.el.
868
869 2008-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
870
871 * data.c (set_internal): Fix up call to let_shadows_buffer_binding_p.
872
873 2008-06-05 Kenichi Handa <handa@m17n.org>
874
875 * coding.c (detect_coding): Fix previous change.
876 (detect_coding_system): Likewise.
877
878 2008-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
879
880 * character.h (MAKE_CHAR_MULTIBYTE): Check the arg is a (uni)byte.
881
882 * keymap.c (Vminibuffer_local_filename_must_match_map):
883 Rename from Vminibuffer_local_must_match_filename_map.
884 (syms_of_keymap):
885 * minibuf.c (Fcompleting_read): Adjust accordingly.
886 * commands.h: Rename declaration as well.
887
888 2008-06-05 Kenichi Handa <handa@m17n.org>
889
890 * font.c (Ffont_spec): Don't use font_parse_family_registry for
891 family name.
892 (Ffont_put): Likewise.
893
894 * fontset.c (fontset_find_font): Call font_open_for_lface with the
895 current font-spec.
896
897 * xfont.c (xfont_list): Don't set registry to iso8859-1 even if it
898 is unspecified.
899
900 * xfaces.c (realize_x_face): If the font-related face attributes
901 are the same as those of default face, realize a new fontset from
902 default->fontset.
903 (Fx_family_fonts): Use font_parse_family_registry instead of Ffont_put.
904
905 2008-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
906
907 * xdisp.c (move_it_in_display_line_to): Improve the type of its args.
908 (move_it_in_display_line): New wrapper.
909
910 * window.c (window_scroll_pixel_based_preserve_x)
911 (window_scroll_preserve_hpos, window_scroll_preserve_vpos): New vars.
912 (window_scroll_pixel_based, window_scroll_line_based):
913 Use them to preserve column positions.
914 (syms_of_window): Initialize them.
915
916 * indent.c (Fvertical_motion): Extend first arg to allow passing an
917 (HPOS . VPOS) pair.
918
919 * dispextern.h (move_it_in_display_line): Declare.
920
921 2008-06-05 Juanma Barranquero <lekktu@gmail.com>
922
923 * window.c (Fwindow_parameter): Return VALUE, not (PARAMETER . VALUE).
924 (Fwindow_parameters): Return copy of parameter alist. Doc fix.
925 (Fset_window_parameter): Return VALUE, not parameter alist. Doc fix.
926
927 2008-06-04 Juanma Barranquero <lekktu@gmail.com>
928
929 * window.c (Fset_window_parameter): Doc fix.
930 (Fwindow_parameters, Fwindow_parameter): Remove redundant check.
931
932 2008-06-04 Joakim Verona <joakim@verona.se>
933
934 * window.h (struct window): Add new member window_parameters.
935
936 * window.c (Fwindow_parameters, Fwindow_parameter)
937 (Fset_window_parameter): New defuns.
938 (syms_of_window): Defsubr the new defuns.
939 (make_window): Initialize window_parameters to nil.
940
941 2008-06-04 John Paul Wallington <jpw@pobox.com>
942
943 * eval.c (Fdefmacro): Doc fix.
944
945 2008-06-04 Kenichi Handa <handa@m17n.org>
946
947 * coding.c (detect_coding): Fix handling of coding->head_ascii.
948 Be sure to call setup_coding_system when we find a proper coding system.
949 (detect_coding_system): Fix handling of coding->head_ascii.
950
951 2008-06-03 Andreas Schwab <schwab@suse.de>
952
953 * font.c (font_prop_validate_spacing): Fix last change.
954
955 2008-06-03 Kenichi Handa <handa@m17n.org>
956
957 * font.c (font_prop_validate_spacing): Handle uppercase symbols.
958 (font_parse_fcname): Fix handling of unknown key.
959
960 * xfont.c (xfont_list): Try an alias.
961
962 * charset.c (char_charset): Return NULL if the arg charset_list is
963 specified and C doesn't belong to any of them.
964
965 2008-06-02 Chip Coldwell <coldwell@redhat.com>
966
967 * font.c (font_pixel_size): Don't take cdr of an integer.
968
969 2008-06-02 Jim Meyering <meyering@redhat.com>
970
971 Make "xfree (NULL)" a no-op; remove useless if-before-xfree.
972 * alloc.c (xfree): Return right away for a NULL arg.
973 * lread.c (nosuffix): Remove now-useless if-before-xfree tests.
974 * gtkutil.c (xg_gtk_scroll_destroy): Likewise.
975 * mac.c (create_apple_event_from_event_ref): Likewise.
976 (create_apple_event_from_drag_ref, cfstring_create_normalized):
977 Likewise.
978 * doprnt.c (doprnt1): Likewise.
979 * frame.c (frame): Likewise.
980 * keyboard.c (wipe_kboard): Likewise.
981 * macterm.c (x_free_frame_resources, xlfdpat_destroy, XFreePixmap)
982 (init_font_name_table, mac_unload_font, x_delete_display): Likewise.
983 * term.c (tty_default_color_capabilities, maybe_fatal)
984 (delete_tty): Likewise.
985 * w16select.c (string): Likewise.
986 * w32.c (w32_get_resource, SET_ENV_BUF_SIZE): Likewise.
987 * w32bdf.c (w32_free_bdf_font): Likewise.
988 * w32fns.c (w32_unload_font): Likewise.
989 * w32font.c (w32font_close): Likewise.
990 * window.c (size_window): Likewise.
991 * xselect.c (receive_incremental_selection): Likewise.
992 * xterm.c (x_free_frame_resources, x_delete_display): Likewise.
993 * mactoolbox.c (create_apple_event_from_drag_ref): Likewise.
994 * w32.c (stat): Likewise.
995
996 Remove useless if-before-free tests.
997 * editfns.c (Fset_time_zone_rule): Likewise.
998 * lread.c (nosuffix): Likewise.
999 * ralloc.c (get_bloc): Likewise.
1000 * regex.c (reg_free): Likewise.
1001 * xftfont.c (xftfont_open, xftfont_close): Likewise.
1002 * xrdb.c (get_user_app, get_environ_db, x_load_resources): Likewise.
1003 * xsmfns.c (smc_save_yourself_CB): Likewise.
1004
1005 2008-06-02 Kenichi Handa <handa@m17n.org>
1006
1007 * font.c (font_find_for_lface): Handle float font size.
1008 (font_open_for_lface): Likewise.
1009
1010 * xfaces.c (x_supports_face_attributes_p): Check face->font before
1011 comparing the properties.
1012
1013 2008-06-01 Jason Rumney <jasonr@gnu.org>
1014
1015 * w32font.c (w32_enumfont_pattern_entity): Use requested registry.
1016 Treat iso10646-1 and Windows DEFAULT_CHARSET specially.
1017 Duplicate iso8859-1 fonts as iso10646-1 if no registry specified.
1018 Don't add empty script list.
1019 (w32_registry): Only map DEFAULT_CHARSET to iso10646-1 here.
1020
1021 2008-06-01 Dan Nicolaescu <dann@ics.uci.edu>
1022
1023 * Makefile.in (dot, dotdot): Remove, update users.
1024 ".." has been used elsewhere in the file for a long time.
1025 (LIBXT_STATIC): Remove conditional based on unused variable.
1026
1027 2008-06-01 Miles Bader <miles@gnu.org>
1028
1029 * xfaces.c (Vface_remapping_alist): New variable.
1030 (syms_of_xfaces): Initialize it.
1031 (enum named_merge_point_kind): New type.
1032 (struct named_merge_point): Add `named_merge_point_kind' field.
1033 (push_named_merge_point): Make cycle detection respect different
1034 named-merge-point kinds.
1035 (lface_from_face_name_no_resolve): Rename from `lface_from_face_name'.
1036 Remove face-name alias resolution.
1037 (lface_from_face_name): New definition using
1038 `lface_from_face_name_no_resolve'.
1039 (get_lface_attributes_no_remap): Rename from `get_lface_attributes'.
1040 Call lface_from_face_name_no_resolve instead of lface_from_face_name.
1041 (get_lface_attributes): New definition that layers face-remapping on
1042 top of get_lface_attributes_no_remap. New arg `named_merge_points'.
1043 (lookup_basic_face): New function.
1044 (lookup_derived_face): Pass new last arg to `get_lface_attributes'.
1045 (realize_named_face): Call `get_lface_attributes_no_remap' instead of
1046 `get_lface_attributes'.
1047 (face_at_buffer_position): Use `lookup_basic_face' to lookup
1048 DEFAULT_FACE_ID if necessary. When optimizing the default-face case,
1049 return default_face's face-id instead of the constant DEFAULT_FACE_ID.
1050
1051 * xdisp.c (init_iterator): Pass base_face_id through
1052 `lookup_basic_face' when we actually use it as a face-id.
1053 (handle_single_display_prop): Use `lookup_basic_face' to lookup
1054 DEFAULT_FACE_ID.
1055
1056 * fontset.c (Finternal_char_font): Use `lookup_basic_face' to
1057 lookup the initial face-id.
1058
1059 * dispextern.h (lookup_basic_face, Vface_remapping_alist): New decls.
1060
1061 2008-06-01 Juanma Barranquero <lekktu@gmail.com>
1062
1063 * textprop.c (syms_of_textprop) <text-property-default-nonsticky>:
1064 (Fremove_text_properties): Fix typos in docstrings.
1065
1066 2008-05-31 Kenichi Handa <handa@m17n.org>
1067
1068 * font.c (font_list_entities): Fix the car part of data to be
1069 stored in the cache.
1070
1071 * ftfont.c (ftfont_font_format): Don't use strcasestr.
1072
1073 2008-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
1074
1075 * chartab.c (Foptimize_char_table, optimize_sub_char_table):
1076 Add a `test' argument so another predicate than `equal' can be used.
1077 (map_sub_char_table): Use `eq' rather than `equal' to merge ranges.
1078 (map_char_table): Remove unused vars `c' and `i'.
1079 * lisp.h (Foptimize_char_table): Adjust declaration.
1080 * charset.c (Fclear_charset_maps): Adjust call to Foptimize_char_table.
1081
1082 2008-05-30 Kenichi Handa <handa@m17n.org>
1083
1084 * font.c (Ffont_info): Define only if HAVE_WINDOW_SYSTEM is defined.
1085 (syms_of_font): Defsubr Sfont_info only if HAVE_WINDOW_SYSTEM is
1086 defined.
1087
1088 2008-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
1089
1090 * data.c (Fmake_variable_buffer_local, Fmake_local_variable)
1091 (Fmake_variable_frame_local): Disallow mixing buffer-local and
1092 frame-local settings for the same variable.
1093
1094 2008-05-30 Kenichi Handa <handa@m17n.org>
1095
1096 * fontset.c (Ffont_info): Move to font.c.
1097 (syms_of_fontset): Delete defsubr of Sfont_info.
1098
1099 * font.c (font_style_to_value, font_score): Delete casting of the
1100 args to xstcasecmp.
1101 (register_font_driver): Increment num_font_drivers only when
1102 registering the driver globally.
1103 (Ffont_info): Move from fontset.c. Handle a font object too.
1104 (syms_of_font): Defsubr Sfont_info.
1105
1106 2008-05-29 Kenichi Handa <handa@m17n.org>
1107
1108 * coding.h (enum define_coding_utf8_arg_index): New enum.
1109 (enum coding_attr_index): Change coding_attr_utf_16_bom to
1110 coding_attr_utf_bom.
1111 (enum utf_bom_type): Rename from utf_16_bom_type.
1112 (struct utf_16_spec): Adjust for the above change.
1113 (struct coding_system): Add utf_8_bom in `spec' union.
1114
1115 * coding.c (CODING_UTF_8_BOM): New macro.
1116 (enum coding_category): Delete coding_category_utf_8, add
1117 coding_category_utf_8_auto, coding_category_utf_8_nosig, and
1118 coding_category_utf_8_sig.
1119 (CATEGORY_MASK_UTF_8): Delete it.
1120 (CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG)
1121 (CATEGORY_MASK_UTF_8_SIG): New macros.
1122 (CATEGORY_MASK_ANY): Delete CATEGORY_MASK_UTF_8, add
1123 CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG, and
1124 CATEGORY_MASK_UTF_8_SIG.
1125 (CATEGORY_MASK_UTF_8): New macro.
1126 (UTF_BOM, UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3): New macros.
1127 (detect_coding_utf_8): Check BOM.
1128 (decode_coding_utf_8, encode_coding_utf_8): Handle BOM.
1129 (decode_coding_utf_16): Adjust for the change of enum utf_bom_type.
1130 (encode_coding_utf_16): Likewise.
1131 (setup_coding_system): Likewise. Set CODING_UTF_8_BOM (coding).
1132 (detect_coding, detect_coding_system): Handle utf-8-auto.
1133 (Fdefine_coding_system_internal): Handle `bom' property for utf-8.
1134 (syms_of_coding): Fix setting up of Vcoding_category_table.
1135
1136 2008-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
1137
1138 * process.c (Faccept_process_output): If `millisec' is non-nil,
1139 `seconds' default to 0.
1140 (wait_reading_process_output): Also return non-nil if we read output
1141 from a non-running process.
1142
1143 2008-05-29 Jason Rumney <jasonr@gnu.org>
1144
1145 * w32font.c (w32font_open_internal): Prefer truetype fonts unless
1146 `raster' specified.
1147 (add_font_entity_to_list): Allow non-opentype truetype fonts back
1148 in the uniscribe backend, but disallow any font that has no
1149 unicode subrange support.
1150
1151 2008-05-29 Juanma Barranquero <lekktu@gmail.com>
1152
1153 * xfaces.c (Fx_list_fonts, Finternal_copy_lisp_face):
1154 Fix typos in docstrings.
1155
1156 2008-05-29 Kenichi Handa <handa@m17n.org>
1157
1158 * xfaces.c (Fx_list_fonts): Make it return a list of font names.
1159 (Fx_family_fonts): Set frame correctly.
1160
1161 2008-05-28 Jason Rumney <jasonr@gnu.org>
1162
1163 * w32term.c (x_draw_glyph_string): Use clipmask if specified.
1164
1165 2008-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
1166
1167 * fileio.c (Fwrite_region): Delay the defaulting to beg&z to after
1168 calling build_annotations.
1169
1170 2008-05-28 Juanma Barranquero <lekktu@gmail.com>
1171
1172 * coding.c (Fdecode_coding_region, Fencode_coding_region)
1173 (Fencode_coding_string):
1174 (syms_of_coding) <coding-system-for-read, coding-system-for-write>:
1175 <latin-extra-code-table>: Fix typos in docstrings.
1176 (syms_of_coding) <coding-system-alist>: Doc fix.
1177 (syms_of_coding) <translation-table-for-input>: Reflow docstring.
1178
1179 2008-05-28 Kenichi Handa <handa@m17n.org>
1180
1181 * fontset.c (Ffont_info): Don't call font_close_object.
1182
1183 * font.c (font_parse_family_registry): Use Ffont_put to validate
1184 foundry and family.
1185 (font_delete_unmatched): Don't check spacing.
1186 (font_list_entities): Add spacing to the spec to list fonts.
1187
1188 * ftfont.c (ftfont_spec_pattern): Don't set FC_SPACING to pattern.
1189 (ftfont_list): Check spacing here. Don't include FC_CHARSET in objset.
1190
1191 * coding.c (encode_coding_raw_text): Fix previous change.
1192 (encode_coding_object): When the dst_object is a buffer and is
1193 different from src_object, move gap to PT.
1194
1195 2008-05-27 Chong Yidong <cyd@stupidchicken.com>
1196
1197 * xterm.c (x_draw_glyph_string): If a clipmask is specified, use it.
1198
1199 2008-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
1200
1201 * coding.c (encode_coding_raw_text): Set coding->produced_char for
1202 all branches. Compute it differently.
1203
1204 * xdisp.c [!HAVE_WINDOW_SYSTEM]: Include font.h for --without-x.
1205
1206 2008-05-27 Juanma Barranquero <lekktu@gmail.com>
1207
1208 * w32font.c (compute_metrics): Rewrite an "else { if () ... else ... }"
1209 into "else if () ... else ...".
1210
1211 2008-05-27 Jason Rumney <jasonr@gnu.org>
1212
1213 * w32font.c (w32font_open_internal): Determine if glyph indices
1214 are likely to work here.
1215
1216 2008-05-27 Chong Yidong <cyd@stupidchicken.com>
1217
1218 * xdisp.c (draw_glyphs): If mouse-highlighting is on, attempt to
1219 draw overlap glyphs with appropriate highlighting.
1220
1221 2008-05-27 Kenichi Handa <handa@m17n.org>
1222
1223 * xfont.c (xfont_open): Fix calculation of font->average_width.
1224
1225 2008-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
1226
1227 * casefiddle.c (casify_object): Try to guess better whether the
1228 argument is a byte or a char.
1229
1230 2008-05-26 Andreas Schwab <schwab@suse.de>
1231
1232 * xselect.c (x_reply_selection_request): Properly handle format == 32.
1233 Always send multiples of format size.
1234
1235 * xterm.c (x_set_frame_alpha): Fix type mismatch.
1236
1237 2008-05-26 Jason Rumney <jasonr@gnu.org>
1238
1239 * w32font.c (w32font_text_extents): Zero whole metrics struct first.
1240 (compute_metrics): Don't set failure if we just cleared the cache.
1241 (w32_weight_table): Remove unused variable.
1242 (w32_enumfont_pattern_entity): Use FONT_SPACING_CHARCELL for
1243 backwards compatibility.
1244
1245 2008-05-25 Kenichi Handa <handa@m17n.org>
1246
1247 * w32term.c (x_draw_glyph_string):
1248 * xterm.c (x_draw_glyph_string): Fix calculation of underline position.
1249
1250 * xfaces.c: Delete unused function prototypes.
1251 (xstrlwr, font_frame): Delete them.
1252 (clear_face_cache): Delete unused variable.
1253
1254 * xftfont.c (xftfont_open): Delete unused variable.
1255 If underline_thickness is not 1, adjust underline_position.
1256
1257 * ftxfont.c (ftxfont_open): Delete unused variable.
1258
1259 * fontset.c (face_for_char): Optimize for the case of no charset
1260 property.
1261
1262 * font.c (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE)
1263 (check_gstring, check_otf_features, otf_list, otf_tag_symbol)
1264 (otf_open, font_otf_capability, generate_otf_features)
1265 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
1266 Comment out by surrounding "#if 0" and "#endif" for the moment.
1267 (Ffont_drive_otf, Ffont_otf_alternates): Likewise.
1268 (syms_of_font): Codes for accessing above commented out.
1269
1270 2008-05-24 Eli Zaretskii <eliz@gnu.org>
1271
1272 * w32proc.c: Include dispextern.h.
1273
1274 * w32.c: Include dispextern.h.
1275
1276 2008-05-23 Juanma Barranquero <lekktu@gmail.com>
1277
1278 * charset.c (Fencode_char, Fsplit_char): Doc fixes.
1279 (Fget_unused_iso_final_char, Fdecode_char, Fiso_charset):
1280 Fix typos in docstrings.
1281
1282 2008-05-23 Jason Rumney <jasonr@gnu.org>
1283
1284 * xsmfns.c: Remove includes that are already included by config.h.
1285
1286 2008-05-23 Kenichi Handa <handa@m17n.org>
1287
1288 * charset.c (Qemacs, charset_emacs): New variables.
1289 (char_charset): Fix for non-Unicode characters.
1290 (syms_of_charset): Define charset_emacs.
1291
1292 * w32term.c (x_draw_glyph_string): Be sure to update
1293 s->underline_thickness and s->underline_position. Be sure to draw
1294 underline within the current line area.
1295
1296 * xterm.c (x_draw_glyph_string): Be sure to update
1297 s->underline_thickness and s->underline_position. Be sure to draw
1298 underline within the current line area.
1299
1300 * fontset.c: Delete unused variables and add casting for char *
1301 throughout the file.
1302 (fontset_font): Try the fallback fonts of the current fontset
1303 before consulting the default fontset.
1304
1305 * ftfont.c (ftfont_spec_pattern): Free charset if necessary.
1306
1307 * xfont.c (xfont_list_pattern): Free names returned from XListFonts.
1308
1309 2008-05-22 Jason Rumney <jasonr@gnu.org>
1310
1311 * font.c: Don't include strings.h.
1312
1313 * dispextern.h, xfaces.c (xstrcasecmp): Rename from xstricmp.
1314
1315 * dosfns.c, fileio.c, font.c, fontset.c, image.c, macfns.c:
1316 * macterm.c, process.c, w32.c, w32fns.c, w32proc.c, xfaces.c:
1317 * xfns.c, xfont.c: All callers of stricmp and strcasecmp changed
1318 to call xstrcasecmp.
1319
1320 * xfont.c (xfont_list_pattern, compare_font_names): Use xstrcasecmp.
1321
1322 * fontset.c (fs_query_fontset): Use xstrcasecmp.
1323
1324 * font.c (font_style_to_value, font_score): Use xstrcasecmp.
1325
1326 * dosfns.c (msdos_stdcolor_idx): Use xstrcasecmp.
1327
1328 2008-05-22 Kenichi Handa <handa@m17n.org>
1329
1330 * puresize.h (BASE_PURESIZE): Increase to 1220000.
1331
1332 * font.c (font_prop_validate_style): Adjust for the format
1333 change of font_style_table.
1334
1335 * w32font.c (w32font_open_internal): Call Ffont_xlfd_name with
1336 two args.
1337
1338 * xfaces.c (x_update_menu_appearance): Call Ffont_xlfd_name with
1339 two args.
1340
1341 2008-05-22 Stefan Monnier <monnier@iro.umontreal.ca>
1342
1343 * minibuf.c (keys_of_minibuf): Delete.
1344 * lisp.h (keys_of_minibuf): Delete.
1345 * emacs.c (main): Don't call keys_of_minibuf.
1346
1347 2008-05-22 Kenichi Handa <handa@m17n.org>
1348
1349 * ftfont.c (ftfont_resolve_generic_family): Rename from
1350 ftfont_list_generic_family. Return a single family for each
1351 generic family.
1352 (ftfont_spec_pattern): Add FC_FAMILY to pattern.
1353 (ftfont_list): Adjust for the change of ftfont_resolve_generic_family.
1354 Call font_add_log.
1355 (ftfont_match): Call font_add_log.
1356
1357 * font.h (Ffont_xlfd_name): EXFUN adjusted.
1358 (FONT_DEBUG): Define it.
1359 (font_add_log): Extern it.
1360 (font_assert): Rename from xassert.
1361
1362 * xfont.c (xfont_get_pcm): Change xassert to font_assert.
1363 (xfont_list_family): Call font_add_log.
1364 (xfont_match): Likewise.
1365 (memq_no_quit): Delete.
1366
1367 * fontset.c (fontset_from_font, Ffontset_info): Add the 2nd arg in
1368 call of Ffont_xlfd_name.
1369
1370 * xfaces.c (struct table_entry, slant_table, weight_table)
1371 (swidth_table): Move to font.c.
1372
1373 * font.c: Checking of FONT_DEBUG is moved to font.h. All calls of
1374 xassert are changed to font_assert. Delete many unused variables.
1375 (Vfont_weight_table, Vfont_slant_table, Vfont_width_table):
1376 New variables.
1377 (struct table_entry): Move from xfaces.c and modified.
1378 (weight_table, slant_table, width_table): Move from xfaces.c and
1379 contents adjusted for the change of struct table_entry.
1380 (font_style_to_value, font_style_symbolic): Adjust for the
1381 format change of font_style_table.
1382 (font_parse_family_registry): Don't overwrite existing foundry and
1383 family of font_spec.
1384 (font_score): Fix calculation of diff for sizes.
1385 (font_sort_entites): Call font_add_log.
1386 (font_delete_unmatched): Return a newly created list.
1387 (font_list_entities): Fix previous change. Call font_add_log.
1388 (font_matching_entity, font_open_entity, font_close_entity):
1389 Call font_add_log.
1390 (Ffont_xlfd_name): New arg FOLD-WILDCARDS.
1391 (Finternal_set_font_style_table): Delete.
1392 (BUILD_STYLE_TABLE): New macro.
1393 (build_style_table): New function.
1394 (Vfont_log, font_log_env_checked): New variables.
1395 (font_add_log): New function.
1396 (syms_of_font): Delete defsubr Sinternal_set_font_style_table.
1397 Declare Lisp variables "font-weight-table", "font-slant-table",
1398 "font-width-table", and "font-log". Initialize font_style_table.
1399
1400 2008-05-21 Dan Nicolaescu <dann@ics.uci.edu>
1401
1402 * xterm.c (x_set_frame_alpha): Move declarations before statements.
1403
1404 2008-05-21 Seiji Zenitani <zenitani@mac.com>
1405 Ryo Yoshitake <ryo@shiftmode.net>
1406
1407 * frame.c (Qalpha): Add a new frame parameter `alpha'.
1408 (Vframe_alpha_lower_limit): New variable.
1409 (x_set_alpha): New function.
1410
1411 * frame.h (Qalpha, Vframe_parameter_lower_limit): Export them.
1412
1413 * xfns.c (x-create-frame, Qalpha):
1414 Initialize the frame parameter `alpha'.
1415 * xterm.c (OPAQUE, OPACITY): New.
1416 (x_set_frame_alpha): New function.
1417 (frame_highlight, frame_unhighlight): Call x_set_frame_alpha.
1418
1419 * macfns.c (mac_frame_parm_handlers): A null handler for x_set_alpha.
1420 * w32fns.c (w32_frame_parm_handlers): Likewise.
1421
1422 2008-05-20 Jason Rumney <jasonr@gnu.org>
1423
1424 * w32font.c (add_font_entity_to_list): Don't add non-opentype
1425 truetype fonts to opentype list.
1426
1427 2008-05-20 Juanma Barranquero <lekktu@gmail.com>
1428
1429 * fontset.c (Ffontset_info): Doc fix.
1430 (syms_of_fontset) <font-encoding-charset-alist, use-default-ascent>:
1431 <ignore-relative-composition>: Fix typos in docstrings.
1432
1433 * font.c (syms-of-font) <font-encoding-alist>:
1434 (Ffontp, Ffont_make_gstring): Fix typos in docstrings.
1435 (Flist_fonts, Ffont_family_list, Ffont_fill_gstring, Fquery_font)
1436 (Ffont_otf_alternates): Doc fixes.
1437
1438 2008-05-20 Kenichi Handa <handa@m17n.org>
1439
1440 * Makefile.in (FONTSRC): Delete it. Change all $(FONTSRC) to
1441 font.h through out the file.
1442 (FONT_DRIVERS): Rename from FONTOBJ.
1443 (obj): Change $(FONTOBJ) to $(FONT_DRIVERS). Add font.o.
1444 (SOME_MACHINE_OBJECTS): Change $(FONTOBJ) to $(FONT_DRIVERS).
1445
1446 * emacs.c (main): Call syms_of_font unconditionally.
1447
1448 * font.h (find_font_encoding): Extern it.
1449
1450 * font.c (Vfont_encoding_alist, find_font_encoding): Move from
1451 fontset.c.
1452 (font_pixel_size)[! HAVE_WINDOW_SYSTEM]: Return 1.
1453 (font_open_entity): Update FRAME_X_DISPLAY_INFO (f)->n_fonts,
1454 FRAME_SMALLEST_CHAR_WIDTH (f), and FRAME_SMALLEST_FONT_HEIGHT (f)
1455 only when HAVE_WINDOW_SYSTEM is defined.
1456 (font_close_object): Update FRAME_X_DISPLAY_INFO (f)->n_fonts only
1457 when HAVE_WINDOW_SYSTEM is defined.
1458
1459 * fontset.c (Vfont_encoding_alist, find_font_encoding): Move to font.c.
1460 (syms_of_fontset): Move declaration of font-encoding-alist to font.c.
1461
1462 * xfaces.c: Include font.h unconditionally.
1463 (merge_face_ref, merge_face_vectors)
1464 (Finternal_set_lisp_face_attribute): Cancel the previous change.
1465
1466 2008-05-20 Stefan Monnier <monnier@iro.umontreal.ca>
1467
1468 * xdisp.c (select_frame_for_redisplay): Adjust for last change to
1469 indirect_variable.
1470 * eval.c (lisp_indirect_variable): New fun.
1471 (Fuser_variable_p): Use it.
1472
1473 2008-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
1474
1475 * lisp.h (indirect_variable):
1476 * data.c (indirect_variable, let_shadows_buffer_binding_p):
1477 Use Lisp_Symbol pointers rather than Lisp_Object.
1478 Adjust callers.
1479 * buffer.c (buffer_slot_type_mismatch): Use wrong-type-argument.
1480 To this end, change calling-convention.
1481
1482 * minibuf.c (Finternal_complete_buffer): Only strip out hidden buffers
1483 if some non-hidden buffers are selected by string&pred.
1484
1485 2008-05-19 Chong Yidong <cyd@stupidchicken.com>
1486
1487 * process.c (wait_reading_process_output): Always check status
1488 when in batch mode.
1489
1490 2008-05-19 Kenichi Handa <handa@m17n.org>
1491
1492 * font.c (font_list_entities): Fix handling of cache.
1493 (font_matching_entity): Likewise.
1494
1495 * ftfont.c (cs_iso8859_1): Delete.
1496 (ft_face_cache): New variable.
1497 (struct ftfont_info): New member fc_charset_idx.
1498 (ftfont_build_basic_charsets): Delete.
1499 (fc_charset_table): New variable.
1500 (ftfont_pattern_entity): New arg fc_charset_idx. Store (FILENAME
1501 . FC_CHARSET_IDX) as :font-entity property in the font entity.
1502 Callers changed.
1503 (ftfont_lookup_cache, ftfont_get_charset): New functions.
1504 (ftfont_spec_pattern): New argument fc_charset_idx.
1505 Check registry more rigidly. Change callers.
1506 (ftfont_open, ftfont_close, ftfont_has_char): Adjust for the
1507 change of :font-entity property of the font.
1508
1509 * xftfont.c (xftfont_open): Adjust for the change of :font-entity
1510 property of the font.
1511
1512 2008-05-18 Juanma Barranquero <lekktu@gmail.com>
1513
1514 * coding.c (Fcoding_system_p): Rename argument to match docstring.
1515 (Funencodable_char_position, Fcheck_coding_systems_region)
1516 (Fdecode_coding_string, Fencode_coding_string): Fix typos in docstrings.
1517 (Fdetect_coding_region, Fdetect_coding_string, Fencode_coding_region)
1518 (Ffind_operation_coding_system, Fset_coding_system_priority)
1519 (Fcoding_system_eol_type): Doc fixes.
1520
1521 2008-05-17 Glenn Morris <rgm@gnu.org>
1522
1523 * sysdep.c (child_setup_tty): Handle systems with NLDLY, without FFDLY.
1524
1525 2008-05-16 Eli Zaretskii <eliz@gnu.org>
1526
1527 * dired.c (Ffile_attributes): Shut up GCC warnings about st_uid
1528 and st_gid.
1529
1530 * frame.c (Fdelete_frame): Don't call font_update_drivers if
1531 HAVE_WINDOW_SYSTEM is not defined.
1532
1533 * xfaces.c (merge_face_ref, merge_face_vectors)
1534 (Finternal_set_lisp_face_attribute): Use FONT_*_INDEX only when
1535 HAVE_WINDOW_SYSTEM is defined.
1536 (Fface_font): Fix non-HAVE_WINDOW_SYSTEM case.
1537
1538 2008-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
1539
1540 * keyboard.c (parse_menu_item): Do not cache key shortcut any more.
1541
1542 2008-05-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1543
1544 * macterm.c (x_draw_relief_rect): Remove unused variable `dpy'.
1545
1546 2008-05-15 Kenichi Handa <handa@m17n.org>
1547
1548 * font.c (font_find_for_lface): Reflect LFACE_FONT in the font
1549 preference.
1550
1551 2008-05-15 Glenn Morris <rgm@gnu.org>
1552
1553 * emacs.c (USAGE1, standard_args): Remove -disable-font-backend.
1554
1555 2008-05-15 Chong Yidong <cyd@stupidchicken.com>
1556
1557 * fns.c (init_fns): Don't initialize weak_hash_tables here.
1558 (init_weak_hash_tables): New fun. Initialize weak_hash_tables.
1559
1560 * alloc.c (init_alloc_once): Call init_weak_hash_tables.
1561
1562 2008-05-15 Kenichi Handa <handa@m17n.org>
1563
1564 * ftfont.c (ftfont_list): Downcase family name to check generic
1565 families.
1566
1567 * xfaces.c (Finternal_set_lisp_face_attribute): Be sure to make a
1568 font-spec for QCfont value.
1569
1570 * fontset.c (Fnew_fontset): Call font_unparse_xlfd with 256-byte
1571 buffer. Check the return value of it.
1572
1573 2008-05-14 Jason Rumney <jasonr@gnu.org>
1574
1575 * w32term.c (w32_get_glyph_overhangs): Remove.
1576 (w32_redisplay_interface): Use x_get_glyph_overhangs instead.
1577
1578 2008-05-14 Kenichi Handa <handa@m17n.org>
1579
1580 * font.c (font_prop_validate): Make nil a valid value.
1581 (font_clear_cache): Check if the cached vector of entities is nil
1582 or not.
1583
1584 2008-05-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1585
1586 * emacs.c (main_thread): Conditionalize on
1587 FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
1588 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it.
1589
1590 * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define.
1591 (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on
1592 FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
1593
1594 2008-05-14 Kenichi Handa <handa@m17n.org>
1595
1596 * coding.c (detect_coding_iso_2022): Ignore a coding category that
1597 has no corresponding coding system.
1598
1599 2008-05-14 Jason Rumney <jasonr@gnu.org>
1600
1601 * font.h (struct font) [WINDOWSNT]: Remove codepage member.
1602
1603 * w32font.h (w32font_open_internal): Update declaration.
1604
1605 * w32font.c (w32font_open_internal): Change last argument from
1606 w32font_info struct to font object. Fill in font object from
1607 font_entity. Get Outline metrics if possible. Use them to
1608 calculate underline position and thickness. Use xlfd name as name
1609 property. Don't set codepage.
1610 (w32font_open): Pass font_object to w32font_open_internal. Don't
1611 update dpyinfo->smallest_font_height and dpyinfo->smallest_char_width.
1612 (w32font_draw): Use s->font.
1613 (clear_cached_metrics): Don't clear non-existent blocks.
1614
1615 * w32term.c (w32_compute_glyph_string_overhangs): Don't compute if
1616 font was not found.
1617 (x_draw_glyph_string): Use underline position and thickness from font.
1618
1619 * w32uniscribe.c (uniscribe_open): Pass font_object to
1620 w32font_open_internal.
1621
1622 2008-05-14 Kenichi Handa <handa@m17n.org>
1623
1624 These changes are to delete all legacy font-handling codes, and
1625 make Emacs use only font-backends.
1626
1627 * Makefile.in: Delete USE_FONT_BACKEND conditionals.
1628 (frame.o, image.o, print.o): Depend on $(FONTSRC).
1629
1630 * makefile.w32-in (WIN32OBJ): Add w32reg.$(O), remove w32bdf.$(O).
1631
1632 * charset.h (Vcharset_non_preferred_head)
1633 (Vcurrent_iso639_language): Extern them.
1634
1635 * charset.c (Vcharset_non_preferred_head): New variable.
1636 (Vcurrent_iso639_language): New variable.
1637 (syms_of_charset): Declare it as a Lisp variable.
1638 (char_charset): Don't check non preferred charsets. As a last
1639 resort, return charset_unicode.
1640 (Fset_charset_priority): Update Vcharset_non_preferred_head.
1641
1642 * composite.c: Throughout the file, delete all USE_FONT_BACKEND
1643 conditionals. Don't check enable_font_backend. Delete all codes
1644 used only when USE_FONT_BACKEND is not defined.
1645
1646 * dispextern.h (struct glyph_string): Change type of `font' to
1647 `struct font *'.
1648 (struct glyph_string): New member underline_position and
1649 underline_thickness.
1650 (enum lface_attribute_index): Remove LFACE_AVGWIDTH_INDEX.
1651 (struct face): Change type of `font' to `struct font *'. Remove
1652 members `font_name', `font_info_id'.
1653 (per_char_metric, encode_char): Delete externs.
1654 (calc_pixel_width_or_height): Adjust the prototype.
1655
1656 * emacs.c (enable_font_backend): Delete extern.
1657 (main): Don't set enable_font_backend. Don't check the command
1658 line argument "-disable-font-backend".
1659
1660 * font.h (Qfont_spec, Qfont_entity, Qfont_object): Extern them.
1661 (enum font_property_index): New members FONT_DPI_INDEX,
1662 FONT_SPACING_INDEX, FONT_AVGWIDTH_INDEX, FONT_NAME_INDEX,
1663 FONT_FULLNAME_INDEX, FONT_FILE_INDEX, FONT_FORMAT_INDEX,
1664 FONT_OBJECT_MAX. Delete FONT_FRAME_INDEX.
1665 (FONT_WEIGHT_NUMERIC, FONT_SLANT_NUMERIC, FONT_WIDTH_NUMERIC)
1666 (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC, FONT_WIDTH_SYMBOLIC)
1667 (FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE, FONT_WIDTH_FOR_FACE)
1668 (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
1669 (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
1670 (struct font_spec, struct font_entity): New structs.
1671 (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h.
1672 (struct font): Many members from old "struct font_info" moved to
1673 here. Members font and entity deleted.
1674 (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
1675 the new font-related objects.
1676 (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
1677 (CHECK_FONT_GET_OBJECT): Likewise.
1678 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
1679 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h.
1680 (struct font_driver): New members case_sensitive anc check. Type
1681 of the member list and open changed.
1682 (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
1683 (font_symbolic_width, font_find_object, font_get_spec)
1684 (font_set_lface_from_name): Delete extern.
1685 (Fcopy_font_spec, Fmerge_font_spec, Ffont_family_list): New EXFUNs.
1686
1687 * font.c: Include <strings.h>.
1688 (enable_font_backend): Delete it.
1689 (Qfont_spec, Qfont_entity, Qfont_object): New variables.
1690 (CHECK_VALIDATE_FONT_SPEC): Delete it.
1691 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h.
1692 (null_string): Delete it.
1693 (null_vector): Make it static.
1694 (font_family_alist): Delete it.
1695 (Qnormal): Extern it.
1696 (QCextra, QClanguage): Delete it.
1697 (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables.
1698 (font_make_spec, font_make_entity, font_make_object)
1699 (font_intern_prop): Renamed from intern_downcase. Don't downcase
1700 the string. Callers changed.
1701 (font_pixel_size): Adjusted for the format change of font-related
1702 objects.
1703 (prop_name_to_numeric, prop_numeric_to_name): Delete them.
1704 (font_style_to_value, font_style_symbolic): New function.
1705 (build_font_family_alist): Delete it.
1706 (font_registry_charsets): Use Fassoc_string instead of
1707 assq_no_quit.
1708 (font_prop_validate_symbol): Don't return null_string.
1709 (font_prop_validate_style): Adjusted for the change of
1710 style-related values in a font vector.
1711 (font_property_table): Delete entries for QClanguage and
1712 QCantialias, add entries for QCavgwidth.
1713 (get_font_prop_index): Delete the 2nd argument FROM.
1714 (font_prop_validate): Arguments changed.
1715 (font_put_extra): Adjusted for the change of font-related objects.
1716 (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd)
1717 (font_parse_fcname, font_unparse_fcname)
1718 (font_prepare_composition): Likewise.
1719 (font_parse_family_registry): Renamed from font_merge_old_spec.
1720 (otf_open): Delete the 1st arg entity.
1721 (font_otf_capability): Adjusted for the above change.
1722 (font_score): New arg alternate_families. Adjusted for the change
1723 of font-related objects.
1724 (font_sort_entites): New arg best_only.
1725 (font_symbolic_weight, font_symbolic_slant, font_symbolic_width):
1726 Delete them.
1727 (font_match_p): Check alternate families.
1728 (font_find_object): Delete it.
1729 (font_check_object): New function.
1730 (font_clear_cache): Adjusted for the change of font-related objects.
1731 (font_delete_unmatched): New arg.
1732 (font_list_entities): Call font_driver->list with a spec that
1733 doesn't specify style-related properties.
1734 (font_matching_entity): Arguments changed. Caller changed.
1735 (font_open_entity): Adjusted for the change of font-related objects.
1736 (font_close_object, font_has_char, font_encode_char)
1737 (font_get_name, font_get_spec): Likewise.
1738 (font_spec_from_name, font_clear_prop, font_update_lface):
1739 New functions.
1740 (font_find_for_lface, font_open_for_lface, font_load_for_lface)
1741 (font_prepare_for_face, font_done_for_face, font_open_by_name)
1742 (font_at): Adjusted for the change of font-related objects.
1743 (font_range): New function.
1744 (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts)
1745 (Ffont_xlfd_name): Adjusted for the change of font-related objects.
1746 (Fcopy_font_spec, Fmerge_font_spec): New function.
1747 (Ffont_family_list): Renamed from list-families.
1748 (Finternal_set_font_style_table): Arguments changed.
1749 (Ffont_fill_gstring, Ffont_shape_text, Fopen_font)
1750 (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjusted for the
1751 change of font-related objects.
1752 (syms_of_font): Delete "ifdef USE_FONT_BACKEND". DEFSYM new symbols.
1753
1754 * fontset.h (struct font_info): Delete it. Most members go to
1755 struct font.
1756 (FONT_ENCODING_NOT_DECIDED): Moved to font.h.
1757 (enum FONT_SPEC_INDEX): Delete it.
1758 (font_info, list_fonts_func, load_font_func, query_font_func)
1759 (set_frame_fontset_func, find_ccl_program_func)
1760 (get_font_repertory_func, new_fontset_from_font_name): Delete
1761 externs.
1762 (fontset_from_font_name): Extern it.
1763 (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID)
1764 (FONT_INFO_FROM_FACE): Deleted.
1765 (face_for_font): Adjust prototype.
1766
1767 * fontset.c: Throughout the file, delete all USE_FONT_BACKEND
1768 conditionals. Don't check enable_font_backend. Delete all codes
1769 used only when USE_FONT_BACKEND is not defined.
1770 (get_font_info_func, list_font_func, load_font_func)
1771 (query_font_func, set_frame_fontset_func, find_ccl_program_func)
1772 (get_font_repertory_func): Delete them.
1773 (FONTSET_SPEC, FONT_DEF_NEW, FONT_DEF_SPEC, FONT_DEF_ENCODING)
1774 (FONT_DEF_REPERTORY, RFONT_DEF_FACE, RFONT_DEF_SET_FACE)
1775 (RFONT_DEF_FONT_DEF, RFONT_DEF_SPEC, RFONT_DEF_REPERTORY)
1776 (RFONT_DEF_OBJECT, RFONT_DEF_SET_OBJECT, RFONT_DEF_SCORE)
1777 (RFONT_DEF_SET_SCORE, RFONT_DEF_NEW): New macros.
1778 (fontset_compare_rfontdef): New function.
1779 (reorder_font_vector): Remove the argument CHARSET-ID. Sort
1780 ront-defs by qsort. Adjusted for the change of font-group vector.
1781 (load_font_get_repertory): Deleted.
1782 (fontset_find_font): Use new macros to ref/set elements of
1783 font-def and rfont-def.
1784 (fontset_font): Fix the timing of remembering that no font for C.
1785 (free_face_fontset): Do nothing if the face has no fontset.
1786 (face_suitable_for_char_p): Use new macros to ref/set elements of
1787 rfont-def.
1788 (face_for_char): Likewise. Call face_for_char with font_object.
1789 (fs_load_font): Delete. Delete #pragma surrounding it.
1790 (fs_query_fontset): Use strcasecmp instead of strcmp.
1791 (generate_ascii_font_name): Adjusted for the format change of
1792 font-spec.
1793 (Fset_fontset_font): Likewise. Use new macros to set elements of
1794 font-def.
1795 (Fnew_fontset): Use font_unparse_xlfd to generate
1796 FONTSET_ASCII (fontset).
1797 (new_fontset_from_font_name): Deleted.
1798 (fontset_from_font): Renamed from new_fontset_from_font. Check if
1799 a fontset is already created for the font. FIx updating of
1800 Vfontset_alias_alist.
1801 (fontset_ascii_font): Deleted.
1802 (Ffont_info): Adjusted for the format change of font-spec.
1803 (Finternal_char_font): Likewise.
1804 (Ffontset_info): Likewise.
1805 (syms_of_fontset): Don't check load_font_func.
1806
1807 * fns.c (internal_equal): Handle PREV_FONT.
1808
1809 * frame.h: Delete USE_FONT_BACKEND conditional.
1810
1811 * frame.c: Throughout the file, delete all USE_FONT_BACKEND
1812 conditionals. Don't check enable_font_backend. Delete all codes
1813 used only when USE_FONT_BACKEND is not defined.
1814 (x_set_font): Call x_new_font, not x_new_fontset2.
1815 (x_set_font_backend): Use FRAME_FONT macro to check if a font is
1816 already set for the frame.
1817
1818 * ftfont.c (ftfont_pattern_entity): Argument FRAME removed. Make
1819 a font-entity by font_make_entity. Use font_intern_prop instead
1820 of intern_downcase. Use FONT_SET_STYLE to set a style-related
1821 font property. If a font is scalable, set avgwidth property to 0.
1822 Set font-entity property by font_put_extra.
1823 (ftfont_list_generic_family): Argument SPEC and REGISTRY removed.
1824 (ffont_driver): Adjusted for the change of struct font_driver.
1825 (ftfont_spec_pattern): New function.
1826 (ftfont_list): Return a list, not vector.
1827 (ftfont_match): Use ftfont_spec_pattern to get a pattern.
1828 (ftfont_list_family): Don't downcase names.
1829 (ftfont_free_entity): Deleted.
1830 (ftfont_open): Return a font-ojbect. Adjusted for the change of
1831 struct font. Get underline_thickness and underline_position from
1832 font property. Don't update dpyinfo->smallest_font_height and
1833 dpyinfo->smallest_char_width.
1834 (ftfont_close): Don't free `struct font'.
1835 (ftfont_has_char): Adjusted for the format change of font-entity.
1836 (ftfont_encode_char, ftfont_text_extents): Likewise.
1837
1838 * ftxfont.c (ftxfont_list): Return a list, not vector.
1839 (ftxfont_open): Return a font-ojbect. Adjusted for the change of
1840 struct font. Get underline_thickness and underline_position from
1841 font property. Don't update dpyinfo->smallest_font_height and
1842 dpyinfo->smallest_char_width.
1843 (ftxfont_close): Don't decrese FRAME_X_DISPLAY_INFO (f)->n_fonts.
1844 (ftxfont_draw): Adjusted for the change of struct font.
1845
1846 * image.c (image_ascent): Don't include "charset.h". Include
1847 "character.h" and "font.h".
1848
1849 * lisp.h (enum pvec_type): New member PREV_FONT.
1850 (Fassoc_string): EXFUN it.
1851
1852 * print.c: Include font.h.
1853 (print_object): Handle font-related objects.
1854
1855 * xdisp.c: Throughout the file, delete all USE_FONT_BACKEND
1856 conditionals. Don't check enable_font_backend. Delete all codes
1857 used only when USE_FONT_BACKEND is not defined.
1858 (handle_auto_composed_prop): Do nothing if it->f is not on a
1859 window system. Check how many following characters can be
1860 displayed by the same font.
1861 (calc_pixel_width_or_height): Type of the 4th arg is changed to
1862 'struct font *'.
1863 (get_char_face_and_encoding): Assign the whole encoding task to
1864 the `encode-char' method of a font driver.
1865 (fill_composite_glyph_string): Adjusted for the change of `struct
1866 face' and `struct glyph_string'.
1867 (fill_glyph_string): Likewise.
1868 (get_per_char_metric): Arguments changed.
1869 (x_get_glyph_overhangs): Adjusted for the change of `struct face'
1870 and `struct glyph_string'.
1871 (produce_stretch_glyph, calc_line_height_property)
1872 (x_produce_glyphs): Likewise.
1873
1874 * xfaces.c: Throughout the file, delete all USE_FONT_BACKEND
1875 conditionals. Don't check enable_font_backend. Delete all codes
1876 used only when USE_FONT_BACKEND is not defined. Use
1877 FONT_XXX_NAME_NUMERIC instead of face_numeric_xxx.
1878 (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth)
1879 (Qp): Extern them.
1880 (clear_font_table, load_face_font, xlfd_lookup_field_contents):
1881 Deleted.
1882 (struct font_name): Deleted.
1883 (xlfd_numeric_value, xlfd_symbolic_value): Deleted.
1884 (compare_fonts_by_sort_order): New function.
1885 (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight)
1886 (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth):
1887 Deleted.
1888 (Fx_family_fonts): Use font_list_entities, and sort fonts by
1889 compare_fonts_by_sort_order.
1890 (Fx_font_family_list): Call Ffont_family_list.
1891 (face_numeric_value, face_numeric_weight, face_numeric_slant)
1892 (face_numeric_swidth, face_symbolic_value, face_symbolic_weight)
1893 (face_symbolic_slant, face_symbolic_swidth)
1894 (split_font_name_into_vector, build_font_name_from_vector)
1895 (xlfd_fixed_p, xlfd_point_size, pixel_point_size)
1896 (font_rescale_ratio, split_font_name, build_font_name)
1897 (free_font_names, sort_fonts, x_face_list_fonts)
1898 (face_font_available_p, sorted_font_list, cmp_font_names)
1899 (font_list_1, concat_font_list, font_list, remove_duplicates):
1900 Deleted.
1901 (Fx_list_fonts): Use Ffont_list.
1902 (LFACE_AVGWIDTH): Deleted.
1903 (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT
1904 by FONTP.
1905 (lface_fully_specified_p): Don't check LFACE_AVGWIDTH.
1906 (set_lface_from_font_name): Delete it.
1907 (set_lface_from_font): Renamed from
1908 set_lface_from_font_and_fontset. Caller changed. Don't set
1909 LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable
1910 for face.
1911 (merge_face_vectors): Copy font-spec if necessary.
1912 Clear properties of the font-spec if necessary.
1913 (merge_face_ref): Clear properties of the font-spec if necessary.
1914 (Finternal_set_lisp_face_attribute): Likewise.
1915 (set_font_frame_param): Use font_load_for_lface to load a
1916 font-object, and call Fmodify_frame_parameters with it.
1917 (x_update_menu_appearance): Don't check LFACE_AVGWIDTH. Get XLFD
1918 font name by Ffont_xlfd_name.
1919 (Finternal_lisp_face_attribute_values): Don't check QCweight,
1920 QCslant, and QCwidth.
1921 (Fface_font): Get a font name from font->props[FONT_NAME_INDEX].
1922 (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH.
1923 Compare fonts by EQ.
1924 (lookup_non_ascii_face): Deleted.
1925 (face_for_font): The 2nd argument changed.
1926 (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH.
1927 Check atomic font properties by case insensitive.
1928 (realize_non_ascii_face): Set face->overstrike correctly.
1929 (realize_x_face): Likewise. Check if LFACE_FONT is a font_object.
1930 (dump_realized_face): Get font name from
1931 font->props[FONT_NAME_INDEX]. Don't print font_info_id.
1932
1933 * xfns.c: Throughout the file, delete all USE_FONT_BACKEND
1934 conditionals. Don't check enable_font_backend. Delete all codes
1935 used only when USE_FONT_BACKEND is not defined.
1936 (xic_create_xfontset): Original code deleted and renamed from
1937 xic_create_xfontset2. Use FRAME_FONT, not FRAME_FONT_OBJECT.
1938 (x_make_gc): Don't set GCFont in GCs.
1939 (Fx_create_frame) [USE_LUCID]: Set xlwmenu_default_font to a font
1940 opened by "fixed".
1941 (syms_of_xfns): Don't set get_font_info_func, load_font_func,
1942 find_ccl_program_func, query_font_func, set_frame_fontset_func,
1943 get_font_repertory_func.
1944
1945 * xfont.c: Include <stdlib.h> and "ccl.h".
1946 (struct xfont_info): New structure.
1947 (xfont_query_font): Deleted.
1948 (xfont_find_ccl_program): Renamed from x_find_ccl_program and
1949 moved from xterm.c.
1950 (xfont_driver): Adjusted for the change of struct font_driver.
1951 (compare_font_names): New function.
1952 (xfont_list_pattern): Sort font names case insensitively. Make
1953 font_entity by calling font_make_entity. Avoid auto-scaled fonts.
1954 (xfont_list): Return a list, not vector.
1955 (xfont_match): If the font doesn't have QCname property, generate
1956 a name from the other font properties.
1957 (xfont_open): Return a font-ojbect. Adjusted for the change of
1958 struct font. Get underline_thickness and underline_position from
1959 font property. Don't update dpyinfo->smallest_font_height and
1960 dpyinfo->smallest_char_width.
1961 (xfont_close): Don't free struct font.
1962 (xfont_prepare_face): Adjusted for the change of struct font.
1963 (xfont_done_face): Deleted.
1964 (xfont_has_char): Adjusted for the change of struct font.
1965 (xfont_encode_char, xfont_draw): Likewise.
1966 (xfont_check): New function.
1967
1968 * xftfont.c (xftfont_list): Adjusted for the change of `list'
1969 callback function.
1970 (xftfont_match): Adjusted for the fontmat change of font-entity.
1971 (xftfont_open): Adjusted for the format change of font-entity and
1972 font-object. Adjusted for the change of struct font. Return a
1973 font-object. Don't update dpyinfo->smallest_font_height and
1974 dpyinfo->smallest_char_width.
1975 (xftfont_close): Block input while calling XftFontClose.
1976 (xftfont_prepare_face): Don't block input while calling
1977 xftfont_get_colors. Adjusted for the change of struct font.
1978 (xftfont_shape): Return value of error case fixed.
1979
1980 * xrdb.c (x_load_resources): Don't setup a fontset resource.
1981
1982 * xterm.h: Throughout the file, delete all USE_FONT_BACKEND
1983 conditionals.
1984 (FONT_WIDTH): Return (f)->max_width.
1985 (struct x_display_info): Delete member `font'.
1986 (x_list_fonts, x_get_font_info, x_load_font, x_query_font)
1987 (x_find_ccl_program, x_get_font_repertory): Delete externs.
1988 (struct x_output): Change type of `font' to `struct font *'.
1989
1990 * xterm.c: Throughout the file, delete all USE_FONT_BACKEND
1991 conditionals. Don't check enable_font_backend. Delete all codes
1992 used only when USE_FONT_BACKEND is not defined. Don't include ccl.h.
1993 (x_per_char_metric, x_encode_char): Deleted.
1994 (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont.
1995 (x_compute_glyph_string_overhangs): Adjusted for the change of
1996 `struct face'.
1997 (x_draw_glyph_string_foreground)
1998 (x_draw_composite_glyph_string_foreground): Likewise.
1999 (x_draw_glyph_string): Likewise. Use font->underline_position and
2000 font->underline_thickness.
2001 (x_new_font): Renamed from x_new_fontset2.
2002 (x_new_fontset, x_get_font_info, x_list_fonts): Deleted.
2003 (x_check_font): Call `check' method of a font driver.
2004 (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font)
2005 (x_query_font, x_get_font_repertory): Deleted.
2006 (x_find_ccl_program): Renamed and moved to xfont.c.
2007 (x_redisplay_interface): Adjusted for the change of `struct
2008 redisplay_interface'.
2009
2010 * w32fns.c: Throughout the file, delete all USE_FONT_BACKEND
2011 conditionals. Don't check enable_font_backend. Delete all codes
2012 used only when USE_FONT_BACKEND is not defined. Surround non-used
2013 code by "#ifdef OLD_FONT" and "endif".
2014 (Fw32_select_font): Use FONT_COMPAT to get old font structure.
2015
2016 * w32font.h (struct w32font_info): New member.
2017 (FONT_COMPAT): New macro.
2018 (w32font_open_internal): Prototype adjusted.
2019
2020 * w32gui.h (XGCValues): Surround `XFontStruct *font' by "if
2021 OLD_FONT" and "endif".
2022
2023 * w32font.c: Throughout the file, delete all USE_FONT_BACKEND
2024 conditionals. Don't check enable_font_backend. Delete all codes
2025 used only when USE_FONT_BACKEND is not defined.
2026 (w32font_open): Return a font-object. Make a font-object by
2027 font_make_object. Adjusted for the change of struct w32font_info.
2028 (w32font_close): Don't free struct font. Adjusted for the change
2029 of struct w32font_info.
2030 (w32font_encode_char, w32font_text_extents, w32font_draw):
2031 Adjusted for the change of struct w32font_info.
2032 (w32font_draw): Likewise.
2033 (w32font_list_internal): Return a list, not vector.
2034 (w32font_open_internal): Change the 4th arg to font-object.
2035 Adjusted for the change of struct w32font_info and font-object format.
2036 (add_font_name_to_list): Don't downcase names.
2037 (w32_enumfont_pattern_entity): Make a font-entity by
2038 font_make_entity. Adjusted for the format change of font-entity.
2039 Use FONT_SET_STYLE to set a style-related font property. If a
2040 font is scalable, set avgwidth property to 0. Set font-entity
2041 property by font_put_extra.
2042 (font_matches_spec): Adjusted for the format change of font-entity.
2043 (w32_weight_table, w32_decode_weight): New variables.
2044 (w32_encode_weight): New function.
2045 (fill_in_logfont): Adjusted for the format change of font-spec.
2046 (w32font_full_name): Use FONT_WEIGHT_SYMBOLIC to get a symbol
2047 weight value.
2048 (w32font_driver): Adjusted for the change of struct font_driver.
2049
2050 * w32term.h: Throughout the file, delete all USE_FONT_BACKEND
2051 conditionals. Don't check enable_font_backend. Surround non-used
2052 code by "#ifdef OLD_FONT" and "endif".
2053 (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
2054 (FONT_AVG_WIDTH): Adjusted for the change of struct font.
2055
2056 * w32term.c: Throughout the file, delete all USE_FONT_BACKEND
2057 conditionals. Don't check enable_font_backend. Delete all codes
2058 used only when USE_FONT_BACKEND is not defined. Surround non-used
2059 code by "#ifdef OLD_FONT" and "endif".
2060
2061 * w32uniscribe.c: Delete USE_FONT_BACKEND conditional.
2062 (uniscribe_open): Return value changed to font-object.
2063 Adjusted for the format change of font-object.
2064 (uniscribe_otf_capability): Adjusted for the change of struct font.
2065 (add_opentype_font_name_to_list): Don't downcase names.
2066 (uniscribe_font_driver): Adjusted for the change of struct
2067 font_driver.
2068
2069 2008-05-13 Chong Yidong <cyd@stupidchicken.com>
2070
2071 * dispnew.c (update_frame_1): Check if tty output is still valid
2072 before flushing it.
2073
2074 2008-05-13 Jan Djärv <jan.h.d@swipnet.se>
2075
2076 * xterm.c (handle_one_xevent): Don't pass buttons higher than 3
2077 to Gtk+ menus.
2078
2079 2008-05-13 Stefan Monnier <monnier@iro.umontreal.ca>
2080
2081 * dired.c (file_name_completion): Tweak the code so as to always do it
2082 in a single pass. Tighten the scope of some variables.
2083
2084 * dired.c (Qdefault_directory): New var.
2085 (file_name_completion): Use it instead of Fexpand_file_name.
2086 (syms_of_dired): Initialize it.
2087
2088 2008-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
2089
2090 * fileio.c (double_dollars): Remove dead code.
2091
2092 2008-05-10 Eli Zaretskii <eliz@gnu.org>
2093
2094 * dired.c (Ffile_attributes, Fdirectory_files_and_attributes):
2095 Mention w32-get-true-file-attributes in doc string.
2096
2097 * w32proc.c (syms_of_ntproc) <w32-get-true-file-attributes>: Doc fix.
2098
2099 2008-05-09 Glenn Morris <rgm@gnu.org>
2100
2101 * fileio.c (Fread_file_name): Remove reference to insdef, deleted
2102 2008-04-23.
2103
2104 2008-05-09 Eli Zaretskii <eliz@gnu.org>
2105
2106 Support for reporting owner and group of each file on MS-Windows:
2107 * dired.c (stat_uname, stat_gname): New functions, with special
2108 implementation for w32.
2109 (Ffile_attributes): Use them instead of getpwuid and getgrgid.
2110
2111 * w32.c: Rename the_passwd_* to dflt_passwd_*.
2112 (dflt_group_name): New static variable.
2113 (dflt_group): Rename from the_group.
2114 (init_user_info): Init dflt_group fields. Get user's group name
2115 from LookupAccountSid.
2116 (g_b_init_get_file_security, g_b_init_get_security_descriptor_owner)
2117 (g_b_init_get_security_descriptor_group, g_b_init_is_valid_sid):
2118 New initialization states.
2119 (globals_of_w32): Initialize them to zero. Initialize the default
2120 group name to "None".
2121 (GetFileSecurity_Name): New global var, the name of the function
2122 to call for GetFileSecurity.
2123 (GetFileSecurity_Proc, GetSecurityDescriptorOwner_Proc)
2124 (GetSecurityDescriptorGroup_Proc, IsValidSid_Proc): New typedefs.
2125 (get_file_security, get_security_descriptor_owner)
2126 (get_security_descriptor_group, is_valid_sid)
2127 (get_file_security_desc, get_rid, get_name_and_id)
2128 (get_file_owner_and_group): New functions.
2129 (stat): Use get_file_security_desc and get_file_owner_and_group to
2130 report the owner and primary group of each file. Don't ignore the
2131 high 32 bits of file's size, now that st_size is 64-bit wide.
2132 Fix test when to get true file attributes.
2133 (init_user_info): Use get_rid instead of equivalent inline code.
2134 (fstat): Don't ignore the high 32 bits of file's size.
2135
2136 2008-05-09 Chong Yidong <cyd@stupidchicken.com>
2137
2138 * image.c (png_load): Use correct bit-depth for setting background
2139 color.
2140
2141 2008-05-08 Eli Zaretskii <eliz@gnu.org>
2142
2143 * Makefile.in (lisp, shortlisp): Rename epa-file-hook.elc to
2144 epa-hook.elc.
2145
2146 2008-05-08 Juanma Barranquero <lekktu@gmail.com>
2147
2148 * font.c (Ffont_match_p): Don't use `iff' in docstring.
2149
2150 2008-05-07 Dan Nicolaescu <dann@ics.uci.edu>
2151
2152 * macfns.c (Fx_create_frame): Make a copy of frame parameters
2153 because the original parameters are in pure storage now.
2154 (mac_window): Remove unused params. Update callers.
2155
2156 2008-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
2157
2158 * lread.c (substitute_object_recurse): Use lower-level primitives.
2159 Don't signal errors when traversing sub-char-tables.
2160 Don't loop over all the possible characters when traversing char-tables.
2161
2162 * print.c (print_preprocess): Add sub-char-tables to the print-table,
2163 just like we do in print.c.
2164
2165 2008-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
2166
2167 * minibuf.c (Ftry_completion): Remove code left over from when we used
2168 scmp instead of Fcompare_strings.
2169
2170 2008-05-04 Juanma Barranquero <lekktu@gmail.com>
2171
2172 * w32fns.c (Fw32_battery_status): Fix computation of %t (h:min) format.
2173
2174 2008-05-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2175
2176 * image.c [USE_MAC_IMAGE_IO] (image_load_image_io):
2177 Create bitmap context in native byte order.
2178
2179 * macterm.c (XDrawLine)
2180 (XCreatePixmapFromBitmapData) [USE_MAC_IMAGE_IO]: Create bitmap
2181 context in native byte order.
2182
2183 2008-05-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2184
2185 * config.in: Regenerate.
2186
2187 * image.c (PIX_MASK_DRAW, PIX_MASK_RETAIN) [USE_MAC_IMAGE_IO]:
2188 New definitions for Image I/O support.
2189 (XGetImage, XPutPixel, XGetPixel, XDestroyImage)
2190 (mac_create_cg_image_from_image, x_create_x_image_and_pixmap)
2191 [USE_MAC_IMAGE_IO]: Add implementations for Image I/O support.
2192 (mac_data_provider_release_data, image_load_image_io)
2193 [USE_MAC_IMAGE_IO]: New functions.
2194 (CGImageCreateWithPNGDataProviderProcType) [MAC_OSX]: Remove typedef.
2195 (MyCGImageCreateWithPNGDataProvider) [MAC_OSX]: Remove variable.
2196 (init_image_func_pointer) [MAC_OSX]: Remove function.
2197 (image_load_quartz2d) [MAC_OSX]: Check availability of
2198 CGImageCreateWithPNGDataProvider at compile time.
2199 Use lowercase `false' for boolean constant.
2200 (png_load, jpeg_load, tiff_load, gif_load) [USE_MAC_IMAGE_IO]:
2201 Use image_load_image_io.
2202 (png_load) [!USE_MAC_IMAGE_IO && MAC_OSX]:
2203 Don't check MyCGImageCreateWithPNGDataProvider.
2204 (init_image) [MAC_OSX && TARGET_API_MAC_CARBON]:
2205 Don't call init_image_func_pointer.
2206
2207 * macgui.h (Pixmap) [USE_MAC_IMAGE_IO]: New definition for Image I/O.
2208
2209 * macterm.c (mac_cg_color_space_rgb) [USE_CG_DRAWING]:
2210 Make variable non-static.
2211 (XDrawLine, XCreatePixmap, XCreatePixmapFromBitmapData, XFreePixmap)
2212 [USE_MAC_IMAGE_IO]: Add implementations for Image I/O support.
2213
2214 * macterm.h (ARGB_TO_ULONG, ALPHA_FROM_ULONG): New macros.
2215 (RED_FROM_ULONG): Mask off higher bits.
2216 (mac_cg_color_space_rgb) [USE_MAC_IMAGE_IO]: New extern.
2217
2218 * s/darwin.h [HAVE_CARBON && HAVE_AVAILABILITYMACROS_H]:
2219 Include AvailabilityMacros.h.
2220 (USE_MAC_IMAGE_IO, LIBS_IMAGE) [HAVE_CARBON]: New defines.
2221 (LIBS_CARBON) [HAVE_CARBON]: Use LIBS_IMAGE.
2222
2223 2008-05-03 Stefan Monnier <monnier@iro.umontreal.ca>
2224
2225 * chartab.c (Fset_char_table_range): If range is t, really set all
2226 chars to that value.
2227
2228 2008-05-03 Eli Zaretskii <eliz@gnu.org>
2229
2230 * dired.c (Ffile_attributes): Don't allow the device number become
2231 negative.
2232
2233 2008-05-02 Daiki Ueno <ueno@unixuser.org>
2234
2235 * Makefile.in (lisp, shortlisp): Add epa-file-hook.elc.
2236
2237 2008-05-02 Juri Linkov <juri@jurta.org>
2238
2239 * minibuf.c (Fread_from_minibuffer, Fread_string, Fread_command)
2240 (Fread_variable, Fread_buffer, Fcompleting_read): Document the
2241 DEFAULT argument as a list of default values in docstrings.
2242
2243 2008-05-01 Chong Yidong <cyd@stupidchicken.com>
2244
2245 * puresize.h (BASE_PURESIZE): Increase to 1210000.
2246
2247 2008-05-01 Martin Rudalics <rudalics@gmx.at>
2248
2249 * dispnew.c (change_frame_size_1): Preserve small windows when
2250 shrinking frames by calling set_window_height|width with third
2251 arg 2.
2252
2253 * window.h (struct window): Replace field too_small_ok by field
2254 resize_proportionally.
2255
2256 * window.c (make_window): Initialize resize_proportionally.
2257 (enlarge_window): Temporarily set resize_proportionally to make
2258 sure that shrink_windows does scale the window proportionally.
2259 (shrink_windows): When window has resize_proportionally set try
2260 to shrink it proportionally by stealing from other windows.
2261 (struct saved_window, Fset_window_configuration)
2262 (compare_window_configurations): Handle resize_proportionally.
2263 (WINDOW_TOTAL_SIZE): New macro.
2264 (window_min_size, shrink_windows, size_window): Use it.
2265 (check_min_window_sizes): Remove. Invalid values of
2266 window-min-height|width are handled by window_min_size_2 now.
2267 (size_window, Fsplit_window, enlarge_window)
2268 (adjust_window_trailing_edge, grow_mini_window): Don't call
2269 check_min_window_sizes.
2270 (window_min_size_2, window_min_size_1, window_min_size):
2271 New argument safe_p for retrieving "safe" minimum sizes.
2272 (Fdisplay_buffer, Fsplit_window, enlarge_window)
2273 (adjust_window_trailing_edge, grow_mini_window):
2274 Adjust arguments of window_min_size... functions.
2275 (shrink_windows): Argument min_size removed. New argument
2276 safe_p allows shrinking windows to their safe minimum sizes.
2277 Calculate minimum size and decide whether a window shall be
2278 deleted for each window individually.
2279 (size_window): When nodelete_p equals 2, tell shrink_windows to
2280 delete windows only if their new minimum size is no more safe.
2281 (shrink_window_lowest_first): Call window_min_size_1 to make
2282 sure to preserve modeline of bottom-most window when resizing
2283 the minibuffer.
2284 (Fset_window_configuration, Fcurrent_window_configuration)
2285 (compare_window_configurations): Do not handle
2286 window-min-height|width any more.
2287 (syms_of_window): Clarify window-min-height|width doc-strings.
2288
2289 2008-04-30 Stefan Monnier <monnier@iro.umontreal.ca>
2290
2291 * dired.c (file_name_completion): Fix up the encoding/decoding issue
2292 some more. Copy some of the code from Ftry_completions.
2293 Remove special case code that dates back to initial revision when the
2294 slash was only added when necessary and that can't trigger nowadays.
2295
2296 2008-04-27 Kenichi Handa <handa@m17n.org>
2297
2298 * font.c (font_prop_validate): Signal `error' instead of `font'.
2299
2300 2008-04-29 Jason Rumney <jasonr@gnu.org>
2301
2302 * w32fns.c (Fw32_battery_status): New defun.
2303 (syms_of_w32fns): Defsubr it.
2304
2305 2008-04-28 Andreas Schwab <schwab@suse.de>
2306
2307 * dired.c (file_name_completion): Fix another mixing of encoded
2308 and decoded names.
2309
2310 2008-04-28 Juanma Barranquero <lekktu@gmail.com>
2311
2312 * w32fns.c (Fw32_define_rgb_color): Fix typo in docstring.
2313
2314 2008-04-27 Juanma Barranquero <lekktu@gmail.com>
2315
2316 * fringe.c (Fdefine_fringe_bitmap): Doc fix.
2317
2318 2008-04-27 Andreas Schwab <schwab@suse.de>
2319
2320 * dired.c (file_name_completion): Fix inappropriate mixing of
2321 encoded and decoded names.
2322
2323 * xterm.c (XTread_socket): Fix use of uninitialized variable.
2324
2325 * puresize.h (BASE_PURESIZE): Increase to 1200000.
2326
2327 2008-04-26 Eli Zaretskii <eliz@gnu.org>
2328
2329 * dired.c (Ffile_attributes) [WINDOWSNT]: Undo change from
2330 2008-03-31, it's not needed anymore with `struct stat' definition
2331 on nt/inc/sys/stat.h. Undo changes from 2007-01-12 and 2007-01-13
2332 for the same reasons.
2333
2334 2008-04-25 Dennis Gilmore <ausil@fedoraproject.org> (tiny change)
2335
2336 * m/sparc.h: Additional redefinitions for GNU/Linux.
2337
2338 2008-04-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2339
2340 * macterm.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: New variable.
2341 (syms_of_macterm) [USE_MAC_TSM]: Defvar it.
2342 (Qmouse_drag_overlay) [MAC_OSX]: New variable.
2343 (syms_of_macterm) [MAC_OSX]: Intern and staticpro it.
2344 (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars)
2345 (mac_ax_selected_text_range) [MAC_OSX]: New functions.
2346 (mac_ax_number_of_characters) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
2347 Likewise.
2348
2349 * mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern.
2350 (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range)
2351 (mac_ax_number_of_characters): Add externs.
2352 (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars)
2353 [USE_MAC_TSM]: Likewise.
2354 (mac_handle_text_input_event) [MAC_OSX]:
2355 Handle kEventTextInputOffsetToPos for no active input area case.
2356 Handle kEventTextInputPosToOffset and kEventTextInputGetSelectedText.
2357 (mac_handle_document_access_event)
2358 [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: New function.
2359 (install_application_handler) [MAC_OSX]: Register handlers for
2360 kEventTextInputPosToOffset and kEventTextInputGetSelectedText.
2361 (install_application_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
2362 Register mac_handle_document_access_event.
2363
2364 * xdisp.c (x_y_to_hpos_vpos, fast_find_position) [HAVE_CARBON]:
2365 Make functions non-static.
2366
2367 2008-04-23 Stefan Monnier <monnier@iro.umontreal.ca>
2368
2369 * fileio.c (Vread_file_name_function, Vread_file_name_predicate)
2370 (read_file_name_completion_ignore_case, insert_default_directory)
2371 (Qdefault_directory): Move to minibuffer.el.
2372 (Fread_file_name): Call the new `read-file-name' instead.
2373
2374 2008-04-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2375
2376 * mac.c (create_apple_event) [TARGET_API_MAC_CARBON]:
2377 Make function non-static.
2378 (create_apple_event_from_event_ref) [TARGET_API_MAC_CARBON]:
2379 Remove function.
2380 (create_apple_event_from_drag_ref) [TARGET_API_MAC_CARBON]:
2381 Move to mactoolbox.c.
2382 (mac_event_parameters_to_lisp) [TARGET_API_MAC_CARBON]: New function.
2383
2384 * macgui.h (CGFloat) [!CGFLOAT_DEFINED]: New typedef.
2385 (mac_rect_make): New macro.
2386
2387 * macterm.c (mac_draw_image_string_atsui) [MAC_OSX]: Use CGFloat
2388 instead of float.
2389 (mac_draw_image_string_cg) [USE_CG_TEXT_DRAWING]: Likewise.
2390 (init_cg_color, mac_draw_line, mac_draw_cg_image, XSetForeground)
2391 (XSetBackground) [USE_CG_DRAWING]: Likewise.
2392 (mac_draw_image_string_atsui) [MAC_OSX]: Use mac_rect_make instead of
2393 CGRectMake.
2394 (mac_draw_image_string_cg) [USE_CG_TEXT_DRAWING]: Likewise.
2395 (mac_erase_rectangle, mac_draw_cg_image, mac_fill_rectangle)
2396 (mac_set_clip_rectangles) [USE_CG_DRAWING]: Likewise.
2397 (XCreatePixmap, XCreatePixmapFromBitmapData): Use Window
2398 instead of WindowRef in argument type.
2399 (XCreatePixmap) [!MAC_OS8]: Don't call SetPortWindowPort.
2400 (mac_invert_rectangle): Use CGContextSetBlendMode if available.
2401 (mac_set_clip_rectangles, mac_reset_clip_rectangles): Take argument F
2402 instead of DISPLAY. All uses changed.
2403 (mac_handle_size_change): Don't call SET_FRAME_GARBAGED.
2404 (x_calc_absolute_position): Simplify so as not to use
2405 FRAME_PIXEL_WIDTH/FRAME_PIXEL_HEIGHT.
2406
2407 * macterm.h (XCreatePixmap, XCreatePixmapFromBitmapData): Use Window
2408 instead of WindowRef in argument type.
2409 (create_apple_event_from_event_ref, create_apple_event_from_drag_ref)
2410 [TARGET_API_MAC_CARBON]: Remove externs.
2411 (create_apple_event, mac_event_parameters_to_lisp)
2412 [TARGET_API_MAC_CARBON]: Add externs.
2413
2414 * mactoolbox.c (Vmac_ts_script_language_on_focus)
2415 (saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs.
2416 (XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part
2417 is clicked.
2418 (x_activate_menubar): Remove extern for saved_menu_event_location.
2419 (create_apple_event_from_drag_ref) [TARGET_API_MAC_CARBON]:
2420 Move from mac.c.
2421
2422 2008-04-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2423
2424 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc)
2425 [HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex.
2426
2427 2008-04-23 Jason Rumney <jasonr@gnu.org>
2428
2429 * w32.c (stat): When Vw32_get_true_file_attributes is Qlocal, get
2430 attributes only for local files.
2431
2432 * w32proc.c (syms_of_ntproc): Change Vw32_get_true_file attributes
2433 default to Qlocal.
2434
2435 2008-04-22 Juri Linkov <juri@jurta.org>
2436
2437 * buffer.c (Fswitch_to_buffer): Change interactive spec to call
2438 read-buffer-to-switch instead of using the letter "B".
2439
2440 2008-04-21 Stefan Monnier <monnier@iro.umontreal.ca>
2441
2442 * fileio.c (Qdefault_directory): New variable.
2443 (Fread_file_name): Use it to pass `dir' to the completion functions.
2444
2445 2008-04-20 Chong Yidong <cyd@stupidchicken.com>
2446
2447 * xdisp.c (pos_visible_p): Check if iterator stops on a display string.
2448
2449 2008-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
2450
2451 * keyboard.c (Vpre_help_message): Remove.
2452 (show_help_echo): Remove default C code.
2453
2454 * dired.c (directory_files_internal, file_name_completion):
2455 Only call ENCODE_FILE if the string is indeed decoded.
2456
2457 2008-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
2458
2459 * Makefile.in (TOOLKIT_DEFINES): Remove.
2460 (LIBW): Use a bit less #if, remove left over OPEN_LOOK stuff.
2461
2462 2008-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2463
2464 * Makefile.in (MAC_OBJ): Add mactoolbox.o.
2465 (mactoolbox.o): New target.
2466
2467 * mac.c [MAC_OSX] (select_and_poll_event, sys_select):
2468 Use mac_run_loop_run_once instead of CFRunLoopRunInMode.
2469
2470 * macfns.c (x_set_background_color, mac_window, x_create_tip_frame):
2471 Use mac_set_frame_window_background instead of XSetWindowBackground.
2472 (x_set_tool_bar_lines) [USE_MAC_TOOLBAR]:
2473 Use mac_is_window_toolbar_visible instead of IsWindowToolbarVisible.
2474 (x_set_name_internal) [TARGET_API_MAC_CARBON]: Use mac_set_window_title
2475 instead of SetWindowTitleWithCFString.
2476 (mac_update_proxy_icon) [TARGET_API_MAC_CARBON]: Remove BLOCK_INPUT.
2477 Move function to mactoolbox.c.
2478 (mac_update_title_bar) [TARGET_API_MAC_CARBON]:
2479 Use mac_set_window_modified instead of SetWindowModified.
2480 Add BLOCK_INPUT around mac_set_window_modified/mac_update_proxy_icon.
2481 (mac_window, x_create_tip_frame): Use mac_create_frame_window.
2482 (Fx_focus_frame): Use mac_front_non_floating_window instead of
2483 FrontNonFloatingWindow. Use mac_activate_window instead of
2484 ActivateWindow. Use mac_active_non_floating_window instead of
2485 ActiveNonFloatingWindow.
2486 (show_hourglass, hide_hourglass) [TARGET_API_MAC_CARBON]:
2487 Use mac_show_hourglass and mac_hide_hourglass.
2488 (compute_tip_xy) [TARGET_API_MAC_CARBON]: Use mac_get_global_mouse
2489 instead of GetGlobalMouse.
2490 (Fx_show_tip): Use mac_move_window/mac_size_window/mac_show_window
2491 instead of MoveWindow/SizeWindow/ShowWindow, respectively.
2492 Use mac_bring_window_to_front instead of BringToFront.
2493 (Qfile_name_history) [TARGET_API_MAC_CARBON]: Move extern to
2494 mactoolbox.c.
2495 (Fx_file_dialog) [TARGET_API_MAC_CARBON]: Move function body to
2496 mac_file_dialog in mactoolbox.c. Use mac_file_dialog.
2497 (mac_nav_event_callback) [TARGET_API_MAC_CARBON]: Move function to
2498 mactoolbox.c.
2499
2500 * macgui.h [!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
2501 (XtPointer): Move typedef from macmenu.c.
2502 (enum button_type): Move enum from macmenu.c.
2503 (widget_value): Move typedef from macmenu.c.
2504 (M_APPLE, I_ABOUT, EXTRA_STACK_ALLOC, ARGV_STRING_LIST_ID)
2505 (DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN)
2506 (DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH, DIALOG_MAX_INNER_WIDTH)
2507 (DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE)
2508 (DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH)
2509 (DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE)
2510 (DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN)
2511 (DIALOG_ICON_TOP_MARGIN): Move defines from macmenu.c.
2512 (Selection): Move typedef from macselect.c.
2513 (RAM_TOO_LARGE_ALERT_ID, ABOUT_ALERT_ID) [MAC_OS8]: Move defines from
2514 macterm.c.
2515 (mac_set_window_title, mac_set_window_modified, mac_is_window_visible)
2516 (mac_is_window_collapsed, mac_bring_window_to_front)
2517 (mac_send_window_behind, mac_hide_window, mac_show_window)
2518 (mac_collapse_window, mac_front_non_floating_window)
2519 (mac_active_non_floating_window, mac_activate_window)
2520 (mac_move_window_structure, mac_move_window, mac_size_window)
2521 (mac_get_global_mouse, mac_is_window_toolbar_visible): New defines.
2522
2523 * macmenu.c [!TARGET_API_MAC_CARBON]: Move includes to mactoolbox.c.
2524 (enum mac_menu_kind): Move enum to mactoolbox.c.
2525 (min_menu_id): Move variable to mactoolbox.c.
2526 (quit_dialog_event_loop) [TARGET_API_MAC_CARBON]: Likewise.
2527 (DIALOG_WINDOW_RESOURCE): Move define to mactoolbox.c.
2528 (DIALOG_BUTTON_COMMAND_ID_OFFSET, DIALOG_BUTTON_COMMAND_ID_P)
2529 (DIALOG_BUTTON_COMMAND_ID_VALUE, DIALOG_BUTTON_MAKE_COMMAND_ID)
2530 [TARGET_API_MAC_CARBON]: Likewise.
2531 (XtPointer): Move typedef to macgui.h.
2532 (enum button_type): Move enum to macgui.h.
2533 (widget_value): Move typedef to macgui.h.
2534 (DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN)
2535 (DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH, DIALOG_MAX_INNER_WIDTH)
2536 (DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE)
2537 (DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH)
2538 (DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE)
2539 (DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN)
2540 (DIALOG_ICON_TOP_MARGIN): Move defines to macgui.h.
2541 (popup_activated_flag): Make variable non-static.
2542 (x_activate_menubar, install_menu_quit_handler, pop_down_menu)
2543 (add_menu_item, fill_menu, dispose_menus):
2544 Move functions to mactoolbox.c.
2545 (restore_show_help_function, menu_target_item_handler)
2546 (install_menu_target_item_handler, mac_handle_dialog_event)
2547 (install_dialog_event_handler, pop_down_dialog, create_and_show_dialog)
2548 [TARGET_API_MAC_CARBON]: Likewise.
2549 (menu_quit_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]: Likewise.
2550 (mac_dialog) [!TARGET_API_MAC_CARBON]: Likewise.
2551 (find_and_call_menu_selection, name_is_separator): Make function
2552 non-static.
2553 (Vshow_help_function, timer_check) [TARGET_API_MAC_CARBON]: Move extern
2554 to mactoolbox.c.
2555 (set_frame_menubar): Don't call install_menu_quit_handler.
2556 (menu_item_selection): New variable.
2557 (mac_menu_show): Use create_and_show_popup_menu.
2558 (create_and_show_dialog) [TARGET_API_MAC_CARBON]: Don't return
2559 selection but set variable menu_item_selection. All uses changed.
2560 (mac_fill_menubar): Rename from fill_menubar. All uses changed.
2561 Call install_menu_quit_handler. Move to mactoolbox.c.
2562
2563 * macselect.c [!TARGET_API_MAC_CARBON]: Don't include Scrap.h.
2564 (Selection): Move typedef to macgui.h.
2565 (Vselection_converter_alist, Qmac_scrap_name, Qmac_ostype)
2566 (Vmac_apple_event_map, Qmac_apple_event_class, Qmac_apple_event_id):
2567 Make variables non-static.
2568 (Vmac_dnd_known_types) [TARGET_API_MAC_CARBON]: Likewise.
2569 (mac_handle_apple_event, cleanup_all_suspended_apple_events):
2570 Make functions non-static.
2571 (Vmac_service_selection) [MAC_OSX]: Likewise.
2572 (mac_get_selection_from_symbol, get_flavor_type_from_symbol)
2573 (mac_valid_selection_target_p, mac_clear_selection)
2574 (mac_get_selection_ownership_info, mac_valid_selection_value_p)
2575 (mac_put_selection_value, mac_selection_has_target_p)
2576 (mac_get_selection_value, mac_get_selection_target_list)
2577 (init_apple_event_handler, install_drag_handler, remove_drag_handler):
2578 Move functions to mactoolbox.c.
2579 (mac_do_track_drag, mac_do_receive_drag) [TARGET_API_MAC_CARBON]:
2580 Likewise.
2581 (copy_scrap_flavor_data, mac_handle_service_event)
2582 (install_service_handler) [MAC_OSX]: Likewise.
2583 (syms_of_macselect) <Vmac_dnd_known_types>:
2584 Use mac_dnd_default_known_types.
2585
2586 * macterm.h (FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y):
2587 Move to mactoolbox.c.
2588 (HOURGLASS_WIDTH, HOURGLASS_HEIGHT): Change to 15.
2589 (Fx_selection_owner_p): Add EXFUN.
2590 (install_window_handler, remove_window_handler, XSetWindowBackground):
2591 Remove externs.
2592 (do_apple_menu) [!TARGET_API_MAC_CARBON]: Likewise.
2593 (mac_prepare_for_quickdraw) [USE_CG_DRAWING]: Likewise.
2594 (x_raise_frame, x_lower_frame, mac_alert_sound_play)
2595 (install_application_handler, mac_get_frame_bounds, mac_get_frame_mouse)
2596 (mac_convert_frame_point_to_global, mac_set_frame_window_background)
2597 (mac_update_begin mac_update_end, mac_frame_up_to_date, x_flush)
2598 (mac_create_frame_window, mac_dispose_frame_window, mac_begin_clip)
2599 (mac_end_clip, mac_create_scroll_bar, mac_dispose_scroll_bar)
2600 (mac_set_scroll_bar_bounds, mac_redraw_scroll_bar, mac_fill_menubar)
2601 (create_and_show_popup_menu, mac_get_selection_from_symbol)
2602 (mac_valid_selection_target_p, mac_clear_selection)
2603 (mac_get_selection_ownership_info, mac_valid_selection_value_p)
2604 (mac_put_selection_value, mac_selection_has_target_p)
2605 (mac_get_selection_value, mac_get_selection_target_list): Add externs.
2606 (mac_update_proxy_icon, mac_show_hourglass, mac_hide_hourglass)
2607 (mac_reposition_hourglass, mac_file_dialog, create_and_show_dialog)
2608 (mac_dnd_default_known_types) [TARGET_API_MAC_CARBON]: Likewise.
2609 (mac_run_loop_run_once) [MAC_OSX]: Likewise.
2610 (mac_dialog) [!TARGET_API_MAC_CARBON]: Likewise.
2611 (mac_begin_cg_clip, mac_end_cg_clip) [USE_CG_DRAWING]: Likewise.
2612 (x_set_toolkit_scroll_bar_thumb) [!USE_TOOLKIT_SCROLL_BARS]: Likewise.
2613 (x_scroll_bar_set_handle) [!USE_TOOLKIT_SCROLL_BARS]: Likewise.
2614
2615 * mactoolbox.c: New file.
2616
2617 2008-04-18 Jason Rumney <jasonr@gnu.org>
2618
2619 * dired.c (Ffile_attributes) [WINDOWSNT]: Cast uid and gid to unsigned.
2620
2621 2008-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
2622
2623 * character.c (Fmultibyte_char_to_unibyte):
2624 Return latin1 chars unchanged.
2625
2626 * fileio.c (Fexpand_file_name): Refine last fix so `nm' is only
2627 relocated if it points to `name'.
2628
2629 2008-04-17 Kenichi Handa <handa@m17n.org>
2630
2631 * data.c (Faset): Allow setting a multibyte character in an
2632 ASCII-only unibyte string.
2633
2634 * lisp.h (STRING_SET_MULTIBYTE): New macro.
2635
2636 2008-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
2637
2638 * Makefile.in: Don't use HAVE_GTK and don't -DUSE_GTK since it's now
2639 done in config.h.
2640
2641 2008-04-16 Juanma Barranquero <lekktu@gmail.com>
2642
2643 * character.c (Fchar_bytes, Fchar_width, Fstring_width)
2644 (Fchar_direction): Add usage in the docstring.
2645
2646 2008-04-15 Chong Yidong <cyd@stupidchicken.com>
2647
2648 * keyboard.c (read_key_sequence): Remove always-true checks.
2649
2650 2008-04-14 Jason Rumney <jasonr@gnu.org>
2651
2652 * w32font.c (w32font_open_internal): Set max_bounds.descent in
2653 compatibility struct, for better underline positioning.
2654
2655 2008-04-13 David Hansen <david.hansen@gmx.net>
2656
2657 * dbusbind.c (dbus-get-unique-name): Remove extra copying of name
2658 string.
2659
2660 2008-04-12 Dan Nicolaescu <dann@ics.uci.edu>
2661
2662 * m/hp800.h (XUINT, XSET): Remove.
2663
2664 2008-04-12 Juanma Barranquero <lekktu@gmail.com>
2665
2666 * fileio.c (Fexpand_file_name): Add declaration for `p' missing in
2667 previous change.
2668
2669 2008-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
2670
2671 * fileio.c (Fexpand_file_name): Tighten the scope of `p' and `o' vars.
2672 Relocate `nm' after calling DECODE_FILE, in case the GC was run.
2673
2674 2008-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
2675
2676 * keymap.h (map_keymap_canonical): Declare.
2677 * xmenu.c (single_keymap_panes): Use it.
2678
2679 2008-04-11 Glenn Morris <rgm@gnu.org>
2680
2681 * eval.c (Fdefvaralias): If the alias is bound and the target is not,
2682 set the target's value to that of the alias.
2683
2684 2008-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
2685
2686 * term.c (set_tty_color_mode): Left over typo.
2687
2688 2008-04-10 Michael Albinus <michael.albinus@gmx.de>
2689
2690 * fileio.c (Fmake_symbolic_link): Surround code by #ifdef S_IFLNK
2691 only after check for file name handler functions. Signal, when
2692 native functionality is not supported.
2693 (syms_of_fileio): Declare it unconditionally.
2694
2695 2008-04-10 Jason Rumney <jasonr@gnu.org>
2696
2697 * w32menu.c (is_simple_dialog, simple_dialog_show): New functions.
2698 (Fx_popup_dialog): Handle simple yes/no questions as dialogs.
2699
2700 * w32.c (logon_network_drive): Also logon to remote drives that
2701 are mapped to drive letters.
2702
2703 2008-04-10 Glenn Morris <rgm@gnu.org>
2704
2705 * xdisp.c (truncate-partial-width-windows): Doc fix.
2706
2707 2008-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
2708
2709 * fileio.c (read_file_name_cleanup, Fread_file_name_internal):
2710 Move functions to minibuffer.el.
2711 (syms_of_fileio): Don't declare them.
2712
2713 2008-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
2714
2715 * minibuf.c (Vcompletion_auto_help): Move to minibuffer.el.
2716 (syms_of_minibuf): Remove its initialization.
2717
2718 * minibuf.c (temp_echo_area_glyphs): Remove unused function.
2719
2720 2008-04-09 Juanma Barranquero <lekktu@gmail.com>
2721
2722 * editfns.c (Ffield_string_no_properties): Fix typo in docstring.
2723
2724 2008-04-09 Jason Rumney <jasonr@gnu.org>
2725
2726 * makefile.w32-in (distclean): Delete makefile too.
2727 (maintainer-clean): New target.
2728
2729 * xdisp.c (redisplay_internal) [!WINDOWSNT]: Conditionalize last change.
2730
2731 * w32term.c (w32_compute_glyph_string_overhangs): Compute overhangs
2732 for new font backend and composite cases.
2733
2734 2008-04-09 Jan Djärv <jan.h.d@swipnet.se>
2735
2736 * atimer.c (alarm_signal_handler): Call run_timers if not SYNC_INPUT.
2737 Most of the code moved to run_timers.
2738 (do_pending_atimers): Call run_timers.
2739 (run_timers): New function.
2740
2741 * sysdep.c (emacs_write): If SYNC_INPUT and pending_atimers,
2742 run atimers.
2743
2744 * process.c (wait_reading_process_output): The same as above.
2745
2746 2008-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
2747
2748 * minibuf.c (last_exact_completion): Remove variable.
2749 (Fdelete_minibuffer_contents, do_completion, Fminibuffer_complete)
2750 (complete_and_exit_1, complete_and_exit_2)
2751 (Fminibuffer_complete_and_exit, Fminibuffer_complete_word)
2752 (Fdisplay_completion_list, display_completion_list_1)
2753 (Fminibuffer_completion_help, Fself_insert_and_exit)
2754 (Fexit_minibuffer, Fminibuffer_message): Move functions to
2755 minibuffer.el.
2756 (syms_of_minibuf): Remove corresponding initializations.
2757
2758 * keyboard.c (Qdeactivate_mark): New var.
2759 (command_loop_1): Use it to call `deactivate-mark'.
2760 (syms_of_keyboard): Initialize it.
2761
2762 * xdisp.c (redisplay_internal): Reset tty's color_mode when switching
2763 to another frame.
2764 * frame.c (do_switch_frame): Refine the top_frame/async_visible code.
2765 Don't call set_tty_color_mode.
2766 (store_frame_param): Reset previous_frame rather than call
2767 set_tty_color_mode.
2768 * term.c (set_tty_color_mode): Rewrite.
2769 * dispextern.h (set_tty_color_mode): New type.
2770 * termchar.h (struct tty_display_info): Add `previous_color_mode'.
2771
2772 2008-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
2773
2774 * keymap.c (access_keymap): Remove the value 2 for t_ok which was used
2775 for generic chars, which do not exist any more in emacs-unicode.
2776
2777 2008-04-08 Michael Albinus <michael.albinus@gmx.de>
2778
2779 * coding.c (detect_coding_emacs_mule)
2780 (Ffind_operation_coding_system): Fix typo.
2781
2782 2008-04-08 Jason Rumney <jasonr@gnu.org>
2783
2784 * w32uniscribe.c (SNAME): Extract only symbol name.
2785
2786 * w32font.h (struct w32_metric_cache): New struct.
2787 (w32font_info): Use it.
2788 (W32METRIC_NO_ATTEMPT, W32METRIC_SUCCESS, W32METRIC_FAIL)
2789 (CACHE_BLOCKSIZE): New constants.
2790
2791 * w32font.c (Qja, Qko, Qzh): New symbols.
2792 (syms_of_w32font): Initialise them.
2793 (font_matches_spec): Use them to filter by language.
2794 (recompute_cached_metrics): Remove function.
2795 (compute_metrics, clear_cached_metrics): New functions.
2796 (w32font_encode_char): Use them to manage metric cache.
2797 (w32font_text_extents): Cache metrics for all glyphs on demand.
2798 Delay converting glyph indices to WORD until needed.
2799 (w32font_open_internal): Initialize metric cache to empty.
2800 (registry_to_w32_charset): Charset should always be a symbol.
2801 (fill_in_logfont, list_all_matching_fonts): Family should
2802 always be a symbol.
2803
2804 2008-04-06 Jason Rumney <jasonr@gnu.org>
2805
2806 * w32uniscribe.c (uniscribe_shape): Increase items buffer size.
2807 Give up if glyph indices not supported. Use uniscribe obtained
2808 ABC widths for individual metrics. Map glyph clusters back to
2809 characters using fClusterStart flag. Return number of glyphs
2810 produced, not chars processed.
2811 (uniscribe_shape): Map char at FROM to current glyph.
2812
2813 2008-04-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2814
2815 * macmenu.c (fill_menu) [TARGET_API_MAC_CARBON]:
2816 Use SetMenuItemHierarchicalMenu.
2817
2818 2008-04-05 Jason Rumney <jasonr@gnu.org>
2819
2820 * image.c (pbm_load): Allow color values up to 65535.
2821 Throw an error if max_color_idx is outside the supported range.
2822 Report an error when image size is invalid.
2823 Read two bytes at a time when raw images have max_color_idx above 255.
2824
2825 2008-04-05 Eli Zaretskii <eliz@gnu.org>
2826
2827 * w32.c (readdir): If FindFirstFile/FindNextFile return in
2828 cFileName a file name that includes `?' characters, use the 8+3
2829 alias in cAlternateFileName instead.
2830
2831 2008-04-05 Kenichi Handa <handa@ni.aist.go.jp>
2832
2833 * ccl.c (ccl_driver): If ccl->quit_silently is nonzero, don't
2834 append "CCL: Quitted" when the CCL program is quitted.
2835 (setup_ccl_program): Initialize ccl->quit_silently to zero.
2836
2837 * ccl.h (struct ccl_program): New member quit_silently.
2838
2839 2008-04-05 Chong Yidong <cyd@stupidchicken.com>
2840
2841 * search.c (compile_pattern_1): Treat non-nil and non-string of
2842 search-spaces-regexp as nil.
2843
2844 * minibuf.c (Fassoc_string): Tweak docstring.
2845
2846 2008-04-05 Eli Zaretskii <eliz@gnu.org>
2847
2848 * dired.c (Ffile_attributes): Support inode numbers wider than 32
2849 bits. Remove ugly WINDOWSNT-specific kludge introduced on
2850 2008-03-14 to force inode be positive.
2851
2852 * w32.c (sys_chown, stat, fstat): Use S_* constants instead of
2853 _S_* ones, since we now use our own sys/stat.h.
2854 (stat, fstat): Don't mangle the inode number.
2855 (init_user_info): Don't restrict UID and GID to 0-60000 range.
2856
2857 2008-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
2858
2859 * frame.h (struct frame): Give one more bit to `visible' since we use
2860 values larger than 1 to indicate obscured frames on ttys.
2861
2862 * keymap.c (Qkeymap_canonicalize): New var.
2863 (Fmap_keymap_internal): New fun.
2864 (describe_map): Use keymap-canonicalize.
2865
2866 * undo.c (last_boundary_buffer, last_boundary_position): New vars.
2867 (Fundo_boundary): Set them.
2868 (syms_of_undo): Initialize them.
2869 (record_point): Use them instead of last_point_position*.
2870 (last_undo_buffer): Change type.
2871
2872 2008-04-04 Jason Rumney <jasonr@gnu.org>
2873
2874 * w32font.c (w32font_text_extents): Use font's ascent and descent.
2875 (recompute_cached_metrics): Don't set ascent and descent per char.
2876
2877 * w32uniscribe.c (uniscribe_check_otf): Fix last change.
2878 (uniscribe_check_otf): Add GC protection before consing.
2879 Rearrange loop for counting features.
2880
2881 2008-04-03 Stefan Monnier <monnier@iro.umontreal.ca>
2882
2883 * insdel.c (insert_from_buffer_1): Don't compare bytes in destination
2884 buffer with byte-size of source buffer.
2885
2886 2008-04-03 Chong Yidong <cyd@stupidchicken.com>
2887
2888 * callint.c (Fcall_interactively): Handle temporary region even
2889 when shift-select-mode is off.
2890
2891 2008-04-03 Jason Rumney <jasonr@gnu.org>
2892
2893 * w32uniscribe.c (uniscribe_check_otf): Sanity check otf_spec.
2894
2895 2008-04-03 Kenichi Handa <handa@m17n.org>
2896
2897 * coding.c (CATEGORY_MASK_ANY): Add CATEGORY_MASK_UTF_16_AUTO.
2898 (CATEGORY_MASK_UTF_16): Likewise.
2899 (detect_coding_utf_16): Add heuristics to reject utf-16 for a
2900 binary file.
2901 (detect_coding): Add null-byte detection for a binary file.
2902 (detect_coding_system): Likewise.
2903
2904 2008-04-03 Jason Rumney <jasonr@gnu.org>
2905
2906 * w32uniscribe.c: New file.
2907
2908 * font.h (uniscribe_font_driver) [WINDOWSNT]: Declare for w32fns.c.
2909
2910 * w32font.h (uniscribe_check_otf): Declare for w32font.c.
2911
2912 * w32font.c (Qbalinese, Qbuginese, Qbuhid, Qcuneiform, Qcypriot)
2913 (Qdeseret, Qglagolitic, Qgothic, Qhanunoo, Qkharoshthi)
2914 (Qlimbu, Qlinear_b, Qold_italic, Qold_persian, Qosmanya)
2915 (Qphags_pa, Qphoenician, Qshavian, Qsyloti_nagri)
2916 (Qtagalog, Qtagbanwa, Qtai_le, Qtifinagh, Qugaritic)
2917 (Qphonetic): New symbols.
2918 (syms_of_w32font): Initialize them.
2919 (font_supported_scripts): Use them.
2920 (w32font_list_family): List all charsets.
2921 (w32font_text_extents, recompute_cached_metrics): Fix metric
2922 calculations.
2923 (w32_enumfont_pattern_entity): Make full_type a DWORD.
2924 Give opentype fonts their own format.
2925 (font_matches_spec): New arguments backend and logfont.
2926 Handle :otf spec for uniscribe backend.
2927 (add_font_entity_to_list): Match truetype fonts in uniscribe backend.
2928 (fill_in_logfont): Use DEFAULT_CHARSET when charset not supplied.
2929
2930 * w32fns.c (Fx_create_frame): Conditionally register uniscribe
2931 font backend.
2932 (globals_of_w32fns): Initialize uniscribe font backend.
2933
2934 * makefile.w32-in (CONFIG_H): New variable. Use it to clean up
2935 dependencies.
2936 (w32uniscribe.$(O)): New file to build.
2937 (FONT_OBJ): Include w32uniscribe.$(O).
2938 (LIBS): Add uniscribe libraries.
2939
2940 * ftfont.c (ftfont_get_open_type_spec): Check spec->script, not val.
2941
2942 2008-04-02 Chong Yidong <cyd@stupidchicken.com>
2943
2944 * callint.c (Vshift_select_mode): New var.
2945 (Finteractive): Document new ^ spec.
2946 (Fcall_interactively): Call handle-shift-selection if the ^ spec
2947 is present.
2948
2949 * keyboard.c (Vthis_command_keys_shift_translated): New var.
2950 (command_loop_1): Avoid running the direct display versions of
2951 forward-char and backward-char if shift-selection may occur.
2952 (read_key_sequence): Set Vthis_command_keys_shift_translated if
2953 shift-translation takes place.
2954
2955 * buffer.c (Vtransient_mark_mode): Move docstring to simple.el to
2956 avoid clobbering by define-minor-mode.
2957
2958 * cmds.c (Fforward_char, Fbackward_char, Fforward_line)
2959 (Fbeginning_of_line, Fend_of_line): Add ^ interactive spec.
2960
2961 * syntax.c (Fforward_word): Add ^ interactive spec.
2962
2963 * window.c (Fscroll_up, Fscroll_down, Fscroll_left)
2964 (Fscroll_right): Add ^ interactive spec.
2965
2966 2008-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
2967
2968 * xdisp.c (try_window_id): Don't forget to reset delta_bytes.
2969
2970 * casefiddle.c (casify_object): Fix up int/EMACS_INT mixup.
2971
2972 * charset.c (Funibyte_charset, Fset_unibyte_charset): Remove.
2973
2974 2008-03-31 Juri Linkov <juri@jurta.org>
2975
2976 * window.c (Fdisplay_buffer): Reinitialize `tem' to nil.
2977
2978 2008-03-30 Jan Djärv <jan.h.d@swipnet.se>
2979
2980 * gtkutil.c (xg_set_geometry): Fix indentation.
2981 (xg_resize_outer_widget): Remove.
2982 (x_wm_size_hint_off): Fix indentation.
2983 (xg_frame_set_char_size): Call flush_and_sync after
2984 gtk_window_resize.
2985 (x_wm_set_size_hint): Pass NULL as geometry window to
2986 gtk_window_set_geometry_hints due to Gtk+ bug nr 68668.
2987 Add menu bar and tool bar height to base height.
2988 (xg_update_frame_menubar, free_frame_menubar)
2989 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
2990 (update_frame_tool_bar, free_frame_tool_bar):
2991 Change xg_resize_outer_widget to xg_frame_set_char_size.
2992
2993 2008-03-30 Michael Albinus <michael.albinus@gmx.de>
2994
2995 * dbusbind.c (QCdbus_timeout): New D-Bus internal symbol.
2996 (Fdbus_call_method): New parameter TIMEOUT.
2997 (dbus-send-signal): Optimize UNGCPRO call.
2998
2999 2008-03-29 Juri Linkov <juri@jurta.org>
3000
3001 * window.c (Fdisplay_buffer): Move call to
3002 Vsplit_window_preferred_function out of conditions that check
3003 if window is eligible for vertical splitting.
3004 When Vsplit_window_preferred_function is non-nil, call it and use
3005 its non-nil return value as window. Otherwise, continue doing
3006 vertical splitting using Fsplit_window with arg horflag=nil.
3007 (syms_of_window) <Vsplit_window_preferred_function>: Change the
3008 default value from `split-window' to nil.
3009
3010 2008-03-29 Juri Linkov <juri@jurta.org>
3011
3012 * callint.c (Fcall_interactively): Revert 2008-03-16 change
3013 for interactive code letters 'b' and 'B'.
3014
3015 2008-03-29 Eli Zaretskii <eliz@gnu.org>
3016
3017 * fileio.c (Fexpand_file_name): Convert the value of $HOME to a
3018 multibyte string.
3019
3020 2008-03-29 Stefan Monnier <monnier@iro.umontreal.ca>
3021
3022 * keyboard.c (pending_funcalls): New var.
3023 (timer_check): Run it.
3024 (syms_of_keyboard): Initialize it.
3025 * terminal.c (Qrun_hook_with_args, Qdelete_terminal_functions)
3026 (Vdelete_terminal_functions): New vars.
3027 (syms_of_terminal): Initialize them.
3028 (Fdelete_terminal): Run delete-terminal-functions.
3029 * xdisp.c (safe_eval): Rewrite.
3030 (safe_call2): New fun.
3031 * frame.c (Qdelete_frame_functions): New var.
3032 (syms_of_frame): Initialize it.
3033 (Fdelete_frame): Use it and use safe_call2 and pending_funcalls.
3034 * lisp.h (safe_call2, pending_funcalls): Declare.
3035
3036 2008-03-28 Andreas Schwab <schwab@suse.de>
3037
3038 * indent.c (Fmove_to_column): Move declaration before statements.
3039
3040 2008-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
3041
3042 * frame.h (enum fullscreen_type): Give it a name. Move it before use.
3043 (struct frame): Use bit fields for boolean vars.
3044
3045 * process.c (server_accept_connection): Simplify naming.
3046 (emacs_get_tty_pgrp): Use SDATA.
3047
3048 * coding.c (decode_coding_object): Fix last change.
3049
3050 2008-03-27 Jason Rumney <jasonr@gnu.org>
3051
3052 * w32fns.c (start_hourglass): Suppress hourglass on tty frames.
3053
3054 2008-03-27 Kenichi Handa <handa@ni.aist.go.jp>
3055
3056 * charset.c (Fdefine_charset_internal): Change the way of
3057 registering charsets in Vcharset_order_list.
3058 (syms_of_charset): Make the charset `eight-bit' supplementary.
3059
3060 2008-03-26 Alexandre Oliva <aoliva@redhat.com> (tiny change)
3061
3062 * regex.c (EXTEND_BUFFER): Change order of pointer addition
3063 operations, to avoid having the difference between pointers
3064 overflow.
3065
3066 2008-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
3067
3068 * indent.c (check_display_width): New fun.
3069 (scan_for_column): Use it.
3070
3071 * data.c (syms_of_data): Mark most-positive-fixnum and
3072 most-negative-fixnum as constants.
3073
3074 * xdisp.c (redisplay_internal): Reset selected_frame earlier.
3075
3076 * indent.c (scan_for_column): Extract from current_column_1.
3077 Merge with the same code from Fmove_to_column.
3078 (current_column_1, Fmove_to_column): Use it.
3079
3080 2008-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
3081
3082 * keymap.c (map_keymap_internal): New fun.
3083 (map_keymap): Use it.
3084 (Fmap_keymap_internal): New fun.
3085 (Fmap_keymap): Remove left-out test from before make_save_value.
3086
3087 * keymap.c (Fmap_keymap): Use `map-keymap-sorted.
3088
3089 * frame.c (Fmodify_frame_parameters, x_set_frame_parameters):
3090 Use XCAR/XCDR.
3091
3092 * process.h (struct Lisp_Process): Remove filter_multibyte.
3093 * process.c (QCfilter_multibyte): Remove.
3094 (setup_process_coding_systems): Don't use filter_multibyte.
3095 (Fstart_process, Fmake_network_process): Don't set filter_multibyte.
3096 (read_process_output): Don't adjust multibyteness to filter_multibyte.
3097 (Fset_process_filter_multibyte): Change the coding-system to
3098 approximate the previous behavior.
3099 (Fprocess_filter_multibyte_p): Get the multibyteness straight from the
3100 coding-system.
3101
3102 * coding.c (decode_coding_object): When not decoding into a buffer,
3103 obey the coding system's preference of (uni|multi)byte.
3104
3105 2008-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
3106
3107 * casefiddle.c (casify_object): Avoid pathological N^2 worst case if
3108 every char is changed and has a different byte-length.
3109 (Fupcase_word, Fdowncase_word, Fcapitalize_word, operate_on_word):
3110 Fix int -> EMACS_INT.
3111
3112 2008-03-23 David Hansen <david.hansen@gmx.net>
3113
3114 * dbusbind.c (xd_read_message): Remove extra copying of message
3115 strings. Check for NULL `interface' or `member'.
3116
3117 2008-03-22 Eli Zaretskii <eliz@gnu.org>
3118
3119 * w32.c (readdir): If FindFirstFile/FindNextFile return in
3120 cFileName a file name that includes `?' characters, use the 8+3
3121 alias in cAlternateFileName instead.
3122
3123 2008-03-21 Stefan Monnier <monnier@iro.umontreal.ca>
3124
3125 * buffer.c (enlarge_buffer_text): Fix int -> EMACS_INT.
3126
3127 2008-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
3128
3129 * intervals.c (temp_set_point, temp_set_point_both): Use EMACS_INT.
3130 (set_point, set_point_both): Use EMACS_INT. Remove `buffer' arg,
3131 work on current_buffer only instead (that was already the case
3132 for some of the code anyway).
3133 * buffer.h (set_point, set_point_both): Remove buffer arg, use long int.
3134 (temp_set_point, temp_set_point_both): Use EMACS_INT.
3135 (SET_PT, SET_PT_BOTH): Adjust.
3136 * intervals.h (set_point, temp_set_point, set_point_both)
3137 (temp_set_point_both): Remove redundant declarations.
3138
3139 2008-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
3140
3141 * fileio.c (Finsert_file_contents):
3142 * lread.c (Feval_buffer): Use BUF_TEMP_SET_PT.
3143 * buffer.h (BUF_SET_PT): Remove. set_point_both doesn't work right
3144 when buffer != current_buffer anyway.
3145
3146 2008-03-20 Andreas Schwab <schwab@suse.de>
3147
3148 * callint.c (Fcall_interactively) [case 'B']: Use other-buffer
3149 as default.
3150
3151 2008-03-19 Jason Rumney <jasonr@gnu.org>
3152
3153 * w32fns.c (hourglass_timer, hourglass_hwnd): New variables.
3154 (syms_of_w32fns): Initialize them.
3155 (HOURGLASS_ID): New constant.
3156 (x_window_to_frame): Don't check hourglass_window.
3157 (w32_wnd_proc) <WM_TIMER>: Handle hourglass_timer.
3158 (w32_wnd_proc) <WM_EXITMENULOOP>: Set pending hourglass cursor.
3159 (w32_wnd_proc) <WM_SETCURSOR>: Set the hourglass or current cursor.
3160 (w32_wnd_proc) <WM_EMACS_SETCURSOR>: Set frame's current_cursor.
3161 Only change the cursor if hourglass is not active.
3162 (Fx_create_frame): Initialize frame's current_cursor.
3163 (hourglass_atimer): Remove.
3164 (hourglass_started): New function.
3165 (start_hourglass, cancel_hourglass, hide_hourglass): Adapt to w32.
3166 (show_hourglass): Adapt to w32, changing argument to frame.
3167
3168 * w32term.h (struct w32_output): Remove hourglass_window.
3169 Add current_cursor.
3170
3171 * eval.c (call_debugger, Fsignal):
3172 * keyboard.c (recursive_edit_1, cmd_error, Ftop_level)
3173 (command_loop_1, Fread_key_sequence, Fread_key_sequence_vector)
3174 (Fexecute_extended_command, cancel_hourglass_unwind):
3175 * minibuf.c (read_minibuf):
3176 * fns.c (Fy_or_n_p): Enable hourglass when HAVE_WINDOW_SYSTEM.
3177
3178 2008-03-19 Stefan Monnier <monnier@iro.umontreal.ca>
3179
3180 * window.c (run_funs): New fun.
3181 (run_window_configuration_change_hook): Use it to run the buffer-local
3182 and the global part of the hook.
3183
3184 * xdisp.c (format_mode_line_unwind_data): Add window argument.
3185 (unwind_format_mode_line): Restore selected window.
3186 (x_consider_frame_title, Fformat_mode_line): Set selected window.
3187
3188 2008-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
3189
3190 * editfns.c (Fchar_equal): Check they are valid characters.
3191
3192 * buffer.h (Fbuffer_list): Declare (for use in callint.c).
3193
3194 2008-03-17 Andreas Schwab <schwab@suse.de>
3195
3196 * regex.c (re_match_2_internal): Properly match raw 8-bit bytes
3197 against a charset.
3198
3199 * lisp.h (Fbuffer_list): Declare.
3200
3201 2008-03-17 Jan Djärv <jan.h.d@swipnet.se>
3202
3203 * gtkutil.c (free_frame_tool_bar): Only call gtk_container_remove if
3204 handlebox_widget is != 0.
3205
3206 2008-03-16 Juri Linkov <juri@jurta.org>
3207
3208 * callint.c (Fcall_interactively): For interactive code letters
3209 'b' and 'B' put the buffer list into the list of default "future"
3210 values of the minibuffer.
3211
3212 2008-03-16 Andreas Schwab <schwab@suse.de>
3213
3214 * keyboard.c (read_key_sequence): Fix downcasing of letters with
3215 modifiers.
3216
3217 * regex.c (re_match_2_internal): Correct matching of a charset
3218 against latin-1 characters.
3219
3220 2008-03-16 Kenichi Handa <handa@m17n.org>
3221
3222 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY)
3223 (STRING_CHAR_ADVANCE_NO_UNIFY): New macros.
3224 (coding_alloc_by_making_gap): Fix the way to preserve data in the gap.
3225 (alloc_destination): Fix the 2nd arg to coding_alloc_by_making_gap.
3226 (encode_coding_utf_8): Use CHAR_STRING_ADVANCE_NO_UNIFY instead of
3227 CHAR_STRING_ADVANCE.
3228 (produce_chars): Fix for the case that the source and the
3229 destination are the same buffer. Use CHAR_STRING_ADVANCE_NO_UNIFY
3230 instead of CHAR_STRING_ADVANCE.
3231 (consume_chars): Use STRING_CHAR_ADVANCE_NO_UNIFY instead of
3232 STRING_CHAR_ADVANCE.
3233
3234 2008-03-15 Andreas Schwab <schwab@suse.de>
3235
3236 * regex.c (re_match_2_internal): Correct matching of eight bit
3237 characters in unibyte strings.
3238
3239 2008-03-15 Martin Rudalics <rudalics@gmx.at>
3240
3241 * buffer.c (overlays_in, Foverlays_in): Include empty overlays
3242 at end of range when it coincides with the end of the buffer.
3243
3244 2008-03-14 Eli Zaretskii <eliz@gnu.org>
3245
3246 * dired.c (Ffile_attributes) [WINDOWSNT]: Force inode be positive.
3247
3248 * w32fns.c (globals_of_w32fns, Fx_create_frame): Fix last change.
3249
3250 2008-03-14 Jason Rumney <jasonr@gnu.org>
3251
3252 * editfns.c (initial_tz): New variable.
3253 (syms_of_editfns): Initialize it.
3254 (Fset_time_zone_rule): Set it when first called.
3255 Use it when TZSTRING is nil.
3256
3257 * w32fns.c (MONITOR_DEFAULT_TO_NEAREST, struct MONITOR_INFO)
3258 (MonitorFromPoint_Proc, GetMonitorInfo_Proc): New definitions.
3259 (monitor_from_point_fn, get_monitor_info_fn): New globals.
3260 (globals_of_w32fns): Initialize them.
3261 (compute_tip_xy): Use them to position tooltips.
3262
3263 2008-03-14 Glenn Morris <rgm@gnu.org>
3264
3265 * emacs.c (main): Revert previous change.
3266 (standard_args): Revert -internal-script back to -scriptload,
3267 and remove the long-option form.
3268
3269 2008-03-13 Glenn Morris <rgm@gnu.org>
3270
3271 * emacs.c (main, standard_args): Rename -scriptload to -internal-script.
3272 Remove option -enable-font-backend.
3273
3274 2008-03-12 Stefan Monnier <monnier@iro.umontreal.ca>
3275
3276 * buffer.c (Fswitch_to_buffer): Fall back on pop-to-buffer.
3277
3278 2008-03-11 Jan Djärv <jan.h.d@swipnet.se>
3279
3280 * xterm.c (x_connection_closed): For GTK: If this is the last
3281 terminal just exit without closing the display.
3282
3283 2008-03-11 Jason Rumney <jasonr@gnu.org>
3284
3285 * w32font.c (w32font_full_name): Use floor to round.
3286
3287 2008-03-10 dhruva <dhruvakm@gmail.com> (tiny change)
3288
3289 * sound.c (alsa_configure): Declare vol at beginning of block.
3290
3291 * fontset.c (Ffontset_info): Remove extra semicolon.
3292
3293 2008-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
3294
3295 * fileio.c (Fsubstitute_in_file_name): Fix up computation of maximum
3296 size of resulting string.
3297
3298 2008-03-10 Jason Rumney <jasonr@gnu.org>
3299
3300 * dispnew.c (adjust_glyph_matrix): Initialize window_height.
3301
3302 2008-03-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3303
3304 * xdisp.c (handle_single_display_spec): Undo 2007-10-16 changes.
3305 Don't pretend as if characters with display property haven't been
3306 consumed for string-replacing-string case.
3307
3308 2008-03-08 Kim F. Storm <storm@cua.dk>
3309
3310 * xdisp.c (GET_NEXT_DISPLAY_ELEMENT): New macro.
3311 (get_next_display_element, next_element_from_string)
3312 (next_element_from_ellipsis, next_element_from_buffer): Use it.
3313
3314 2008-03-08 Andreas Schwab <schwab@suse.de>
3315
3316 * process.h (struct Lisp_Process): Declare bit fields as unsigned.
3317
3318 2008-03-06 Jason Rumney <jasonr@gnu.org>
3319
3320 * w32font.c (w32_registry): Take font_type argument. Use ANSI
3321 when charset not specified. Only translate ANSI to unicode when
3322 font_type is truetype.
3323 (w32font_coverage_ok): New function.
3324 (add_font_entity_to_list): Use it to filter unsuitable fonts.
3325
3326 2008-03-05 Kenichi Handa <handa@ni.aist.go.jp>
3327
3328 * lread.c (Fread_char): Resolve modifiers.
3329 (Fread_char_exclusive): Likewise.
3330
3331 * character.c (char_resolve_modifier_mask): New function.
3332 (char_string): Use char_resolve_modifier_mask.
3333 (Fchar_resolve_modifiers): New function.
3334 (syms_of_character): Declare Fchar_resolve_modifiers as Lisp
3335 function.
3336
3337 2008-03-04 Jason Rumney <jasonr@gnu.org>
3338
3339 * makefile.w32-in: Always include w32font.c in the build.
3340 * w32font.c: Wrap in USE_FONT_BACKEND conditional.
3341
3342 2008-03-04 Andreas Schwab <schwab@suse.de>
3343
3344 * Makefile.in (clean): Remove emacs-*.*.* instead of emacs-*.
3345 (versionclean): Likewise.
3346
3347 2008-03-04 Juanma Barranquero <lekktu@gmail.com>
3348
3349 * .cvsignore: Add oo.
3350
3351 2008-03-03 Andreas Schwab <schwab@suse.de>
3352
3353 * coding.c (decode_coding_object): Inhibit gap shrinking while
3354 decoding in place.
3355
3356 2008-03-03 Dan Nicolaescu <dann@ics.uci.edu>
3357
3358 * w32term.c: Remove unused include "gnu.h".
3359 * makefile.w32-in (w32term.o): Don't depend on gnu.h.
3360
3361 * gnu.h: Rename to ...
3362 * emacs-icon.h: ... this.
3363 * xterm.c: Use emacs-icon.h instead of gnu.h.
3364 * Makefile (xterm.o): Depend on emacs-icon.h, not gnu.h.
3365
3366 2008-03-03 Juanma Barranquero <lekktu@gmail.com>
3367
3368 * w32font.c: Include math.h.
3369
3370 2008-03-03 Jason Rumney <jasonr@gnu.org>
3371
3372 * w32font.c (recompute_cached_metrics): Change font arg to w32font_info.
3373 Compute options separately.
3374 (w32font_open_internal): Set glyph_idx before caching metrics.
3375
3376 * w32font.h (NTM_PS_OPENTYPE, NTM_TT_OPENTYPE, NTM_TYPE1):
3377 Define if system headers don't.
3378 (struct w32font_info): Enlarge ascii_metrics. Add glyph_idx.
3379 (w32font_encode_char): Don't declare here.
3380
3381 * w32font.c (Quniscribe, QCformat): New symbols.
3382 (syms_of_w32font): Define them.
3383 (w32font_has_char): Indicate uncertainty.
3384 (w32font_encode_char): Encode as glyph point. Make static.
3385 (recompute_cached_metrics): New function.
3386 (w32font_open_internal): Use it. Set font to use glyph points
3387 initially. Set format based on type of font.
3388 (w32font_text_extents, w32font_draw): Optionally use glyph points.
3389 (w32_enumfont_pattern_entity): Accept backend arg. Set type based
3390 on it. Set format based on information available here.
3391 (add_font_entity_to_list): Identify backend based on opentype_only.
3392
3393 2008-03-02 Andreas Schwab <schwab@suse.de>
3394
3395 * ftfont.c (ftfont_pattern_entity): Fix aliasing violations.
3396
3397 * coding.c (decode_coding_big5, produce_chars):
3398 Fix typos in last change.
3399
3400 2008-03-02 Kentaro Ohkouchi <nanasess@fsm.ne.jp>
3401
3402 * gnu.h: New icon.
3403
3404 2008-03-02 Kenichi Handa <handa@m17n.org>
3405
3406 * coding.c (decode_coding_utf_8): When eol-type of CODING is
3407 `dos', don't decode '\r' if that is the last in the source.
3408 (decode_coding_utf_16, decode_coding_emacs_mule)
3409 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
3410 (decode_coding_raw_text, decode_coding_charset): Likewise.
3411 (produce_chars): Don't decode EOL here. Use EMACS_INT.
3412
3413 2008-03-01 Jason Rumney <jasonr@gnu.org>
3414
3415 * w32font.c (w32font_full_name): Report point size for scalable fonts.
3416
3417 2008-03-01 Kim F. Storm <storm@cua.dk>
3418
3419 * dispextern.h (CHAR_GLYPH_SPACE_P): Check for default face.
3420
3421 2008-03-01 Jason Rumney <jasonr@gnu.org>
3422
3423 * w32font.c (w32font_full_name): New function.
3424 (w32font_open_internal): Use it.
3425
3426 2008-03-01 Kim F. Storm <storm@cua.dk>
3427
3428 * dispnew.c (line_draw_cost): Fix invalid glyph check.
3429
3430 2008-03-01 Jason Rumney <jasonr@gnu.org>
3431
3432 * font.c (font_unparse_fcname): Increase len when style is a symbol.
3433
3434 2008-03-01 Jan Djärv <jan.h.d@swipnet.se>
3435
3436 * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call
3437 xg_frame_resized when the event is for the edit widget.
3438
3439 * gtkutil.h (xg_frame_resized): Renamed from xg_resize_widgets.
3440
3441 * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or
3442 set_char_size.
3443 (xg_frame_resized): Renamed from xg_resize_widgets. Remove all
3444 operations on widgets here. Just set frame size if needed.
3445 (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions.
3446 (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing.
3447 (x_wm_set_size_hint): Set size hints on the edit widget only, not
3448 the whole frame.
3449 (xg_create_tool_bar): Move attachement of the tool bar to
3450 xg_pack_tool_bar. Do not attach the tool bar if there are no items.
3451 (free_frame_tool_bar): Remove call to SET_FRAME_GARBAGED.
3452
3453 2008-03-01 Jason Rumney <jasonr@gnu.org>
3454
3455 * w32fns.c (w32_msg_pump): Disable debug code.
3456
3457 2008-03-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3458
3459 * m/intel386.h [MAC_OSX || DARWIN]: Define NO_ARG_ARRAY if _LP64.
3460
3461 2008-02-29 Chong Yidong <cyd@stupidchicken.com>
3462
3463 * xdisp.c (next_overlay_string): Don't set
3464 overlay_strings_at_end_processed_p if we're currently reading from
3465 a display string.
3466
3467 2008-02-29 Stefan Monnier <monnier@iro.umontreal.ca>
3468
3469 * xdisp.c (get_overlay_strings_1): Fix typo.
3470
3471 2008-02-29 Chong Yidong <cyd@stupidchicken.com>
3472
3473 * xdisp.c (get_overlay_strings_1): Add missing argument type.
3474
3475 2008-02-28 Kenichi Handa <handa@ni.aist.go.jp>
3476
3477 * ftfont.c (ftfont_match): Explicitly set pixelsize in pattern.
3478
3479 * xdisp.c (display_mode_element): Cancel the previous change.
3480 (decode_mode_spec): Likewise.
3481 (handle_auto_composed_prop): Don't make composition if it->string
3482 is a string.
3483
3484 2008-02-27 Kim F. Storm <storm@cua.dk>
3485
3486 * lisp.h (GLYPH): Change type from int to struct with separate char
3487 and face_id members.
3488 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Delete macros.
3489 (GLYPH_CHAR, GLYPH_FACE): Remove slow versions with frame arg.
3490 (FAST_GLYPH_CHAR, FAST_GLYPH_FACE): Rename macros to ...
3491 (GLYPH_CHAR, GLYPH_FACE): ... these. Change users.
3492 (FAST_MAKE_GLYPH, MAKE_GLYPH): Remove. Rewrite users to use ...
3493 (SET_GLYPH, SET_GLYPH_CHAR, SET_GLYPH_FACE): ... these macros instead.
3494 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE, GLYPH_CODE_P)
3495 (GLYPH_CODE_CHAR_VALID_P, SET_GLYPH_FROM_GLYPH_CODE): New macros to
3496 handle new Lisp glyph code encoding, either an integer or a cons.
3497
3498 * disptab.h (GLYPH_SIMPLE_P): Rewrite.
3499 (GLYPH_ALIAS): Delete.
3500 (GLYPH_ALIAS_P, GLYPH_FOLLOW_ALIASES): Rewrite.
3501 (GLYPH_LENGTH, GLYPH_STRING): Use GLYPH_CHAR.
3502 (GLYPH_FROM_CHAR): Replace macro by ...
3503 (SET_GLYPH_FROM_CHAR): ... this macro. Change users.
3504
3505 * dispextern.h (CHAR_GLYPH_SPACE_P): Simplify.
3506 (GLYPH_FROM_CHAR_GLYPH): Replace macro by ...
3507 (SET_GLYPH_FROM_CHAR_GLYPH): ... this macro. Change users.
3508 (GLYPH_INVALID_P): New macro.
3509 (spec_glyph_lookup_face): Update prototype.
3510
3511 * dispnew.c (line_draw_cost): Adapt to new glyph type.
3512 (build_frame_matrix_from_leaf_window): Adapt to new glyph type and
3513 new glyph code encoding.
3514 (spec_glyph_lookup_face): No return value; update passed glyph instead.
3515 (init_display): Use SET_CHAR_GLYPH to initialize space_glyph.
3516
3517 * xdisp.c (get_next_display_element, next_element_from_display_vector):
3518 Adapt to new glyph type and new glyph code encoding.
3519
3520 * term.c (encode_terminal_code, produce_special_glyphs): Likewise.
3521
3522 * indent.c (current_column, current_column_1, Fmove_to_column)
3523 (compute_motion): Adapt to new glyph code encoding.
3524
3525 * msdos.c (IT_write_glyphs): Adapt to new glyph type.
3526
3527 2008-02-27 Chong Yidong <cyd@stupidchicken.com>
3528
3529 * process.c (wait_reading_process_output): Check for window
3530 changes caused by timers.
3531 Suggested by Johan Bockgård.
3532
3533 2008-02-27 Glenn Morris <rgm@gnu.org>
3534
3535 * emacs.c (USAGE1): Add `--disable-font-backend'.
3536
3537 2008-02-27 Stefan Monnier <monnier@iro.umontreal.ca>
3538
3539 * fileio.c (Finsert_file_contents): Don't reset undo_list if no change
3540 is made to the buffer.
3541
3542 2008-02-26 Stefan Monnier <monnier@iro.umontreal.ca>
3543
3544 * dispextern.h (face_at_buffer_position, face_for_overlay_string)
3545 (face_at_string_position):
3546 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
3547 (face_at_string_position):
3548 * xdisp.c (display_string, next_overlay_change):
3549 * buffer.h (overlays_at):
3550 * buffer.c (overlays_at): Use EMACS_INT for buffer positions.
3551 Update callers.
3552
3553 2008-02-26 Chong Yidong <cyd@stupidchicken.com>
3554
3555 * editfns.c (Fformat): Doc fix.
3556
3557 2008-02-26 Juanma Barranquero <lekktu@gmail.com>
3558
3559 * font.c (Ffont_spec, Ffont_at): Fix typos in docstrings.
3560 (Ffont_put, Flist_families, Ffont_fill_gstring, Ffont_drive_otf)
3561 (Ffont_otf_alternates, Fquery_font): Doc fixes.
3562
3563 2008-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
3564
3565 * buffer.c (Fbuffer_swap_text): New function.
3566 (syms_of_buffer): Defsubr it.
3567
3568 2008-02-25 Chong Yidong <cyd@stupidchicken.com>
3569
3570 * keyboard.c (command_loop_1): Revert 2006-10-09 change.
3571
3572 2008-02-25 Jason Rumney <jasonr@gnu.org>
3573
3574 * w32font.c (w32font_draw): Draw one character at a time when padding.
3575
3576 2008-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
3577
3578 * window.c (Fdelete_window, Fadjust_window_trailing_edge):
3579 Handle a nil arg. Use run_window_configuration_change_hook.
3580 (delete_window, adjust_window_trailing_edge): Don't handle nil any more.
3581 (Fenlarge_window, Fshrink_window, Fset_window_configuration):
3582 Use run_window_configuration_change_hook.
3583
3584 2008-02-25 Kenichi Handa <handa@ni.aist.go.jp>
3585
3586 * xdisp.c (x_produce_glyphs): For a visible glyph, assure at least
3587 1-pixel width.
3588
3589 2008-02-25 Kenichi Handa <handa@ni.aist.go.jp>
3590
3591 * xdisp.c (fill_glyph_string): Pay attention to glyph->padding_p.
3592 (append_glyph): Set glyph->pixel_width and glyph->padding_p to 1
3593 if the glyph in the font is zero pixel with.
3594
3595 * dispextern.h (struct glyph_string): New member padding_p.
3596
3597 * w32font.c (w32font_draw): Pay attention to s->padding_p.
3598
3599 * ftxfont.c (ftxfont_draw): Pay attention to s->padding_p.
3600
3601 * xfont.c (xfont_draw): Pay attention to s->padding_p.
3602
3603 * xftfont.c (xftfont_draw): Pay attention to s->padding_p.
3604
3605 * font.c: If the font driver doesn't have `shape' function, return Qnil.
3606
3607 2008-02-25 Jason Rumney <jasonr@gnu.org>
3608
3609 * w32fns.c (enum_font_cb2): Don't use raster fonts for Unicode.
3610
3611 2008-02-24 Stefan Monnier <monnier@iro.umontreal.ca>
3612
3613 Allow fine-grained image-cache flushing.
3614 * dispextern.h (struct image): Add `dependencies' field.
3615 (clear_image_caches): Change arg to Lisp_Object.
3616 * image.c (make_image): Initialize `dependencies' field.
3617 (clear_image_cache): Change arg to allow fine-grained flushing.
3618 Perform the flush even if image-cache-eviction-delay is nil.
3619 (clear_image_caches): Change arg to Lisp_Object.
3620 (Fclear_image_cache): Expand meaning of the argument.
3621 (mark_image): Mark `dependencies' field.
3622 * xfaces.c (clear_face_cache): Adapt arg to call to clear_image_caches.
3623 (lface_hash): Use XHASH rather than XFASTINT.
3624 (face_at_buffer_position): Fix int -> EMACS_INT position.
3625 * xdisp.c (next_overlay_change): Fix int -> EMACS_INT position.
3626 (select_frame_for_redisplay): Remove code duplication.
3627 (redisplay_internal): Adapt arg to call to clear_image_caches.
3628
3629 2008-02-24 Dan Nicolaescu <dann@ics.uci.edu>
3630
3631 * s/vms4-0.h:
3632 * s/vms4-2.h:
3633 * s/vms4-4.h:
3634 * s/vms5-5.h: Remove, unused.
3635
3636 * s/irix5-2.h:
3637 * s/irix6-0.h:
3638 * s/riscos5.h:
3639 * s/mach-bsd4-3.h:
3640 * m/mips4.h: Remove files for obsolete systems.
3641
3642 * Makefile.in:
3643 * filelock.c:
3644 * unexmips.c:
3645 * m/hp9000s300.h:
3646 * m/iris4d.h:
3647 * s/aix3-1.h:
3648 * s/hpux.h:
3649 * s/msdos.h:
3650 * s/usg5-0.h:
3651 * s/usg5-2-2.h:
3652 * s/usg5-2.h:
3653 * s/usg5-3.h: Remove references to obsolete variables.
3654
3655 * s/irix5-0.h: Remove, move all the contents ...
3656 * s/irix6-5.h: ... here. Simplify.
3657 * config.in: Regenerate.
3658
3659 2008-02-24 Jason Rumney <jasonr@gnu.org>
3660
3661 * w32term.c (x_draw_glyph_string_background): Clear the background
3662 manually when cleartype is in use.
3663 (x_draw_glyph_string_foreground): Draw text transparently when
3664 cleartype is in use.
3665
3666 * w32font.c (w32font_text_extents): Avoid getting HDC and selecting
3667 a font into it unless we have to.
3668
3669 2008-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
3670
3671 * intervals.h (INT_LISPLIKE): Remove. It may misfire.
3672 (NULL_INTERVAL_P, SET_INTERVAL_PARENT): Don't use it.
3673
3674 2008-02-18 Jason Rumney <jasonr@gnu.org>
3675
3676 * w32fns.c (Fw32_shell_execute): Encode parameters.
3677
3678 2008-02-09 Eli Zaretskii <eliz@gnu.org>
3679
3680 * fileio.c (syms_of_fileio) <insert-default-directory>: Doc fix.
3681
3682 2008-02-05 Juanma Barranquero <lekktu@gmail.com>
3683
3684 * unexhp9k800.c (read_header): Replace `legal' with `valid'.
3685
3686 2008-02-24 Ulrich Neumerkel <ulrich@complang.tuwien.ac.at> (tiny change)
3687
3688 * xterm.c (x_set_offset): Don't change the gravity if
3689 CHANGE_GRAVITY is -1.
3690
3691 2008-02-23 Chong Yidong <cyd@stupidchicken.com>
3692
3693 * fileio.c (auto_save_error_occurred): New var.
3694 (auto_save_error): Set it.
3695 (Fdo_auto_save): Don't overwrite the error message if an auto-save
3696 error occurred.
3697
3698 2008-02-23 Eli Zaretskii <eliz@gnu.org>
3699
3700 * w32.c (globals_of_w32): Add initializations for
3701 g_b_init_get_sid_sub_authority and
3702 g_b_init_get_sid_sub_authority_count.
3703
3704 2008-02-22 Stefan Monnier <monnier@iro.umontreal.ca>
3705
3706 * font.c (font_match_xlfd, font_check_xlfd_parse): New funs.
3707 (font_parse_xlfd): Use them for sanity check.
3708 (Finternal_set_font_style_table): Make sure the table is bijective.
3709
3710 Consolidate the image_cache to the terminal struct.
3711 * termhooks.h (P_): Remove redundant def.
3712 (struct terminal): New field `image_cache'.
3713 * frame.h (FRAME_IMAGE_CACHE): New macro. Use it everywhere in place
3714 of FRAME_X_IMAGE_CACHE.
3715 * xterm.h (struct x_display_info): Remove image_cache field.
3716 (FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
3717 * w32term.h (struct w32_display_info): Remove image_cache field.
3718 (FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
3719 * macterm.h (struct mac_display_info): Remove image_cache field.
3720 (FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead.
3721 * xterm.c (x_term_init):
3722 * w32term.c (w32_term_init):
3723 * macterm.c (mac_term_init): Set the image_cache in the terminal.
3724 * dispextern.h (clear_image_cache, forall_images_in_image_cache):
3725 Remove declarations.
3726 (clear_image_caches, mark_image_cache): New declarations.
3727 * xfaces.c (clear_face_cache):
3728 * xdisp.c (redisplay_internal): Use clear_image_caches.
3729 * image.c (clear_image_cache): Don't check that a frame is on
3730 a window-system before checking if it shares the same cache.
3731 (clear_image_caches): New function.
3732 (Fclear_image_cache): Use it.
3733 (mark_image): Move from allo.c.
3734 (mark_image_cache): Move from alloc.c and forall_images_in_image_cache.
3735 * alloc.c (mark_image, mark_image_cache): Move to image.c.
3736 (mark_object): Don't call mark_image_cache for frames.
3737 (mark_terminals): Call mark_image_cache.
3738
3739 * lisp.h (Fdelete_terminal): Declare.
3740
3741 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
3742 (CHECK_CHARSET_GET_ATTR): Don't use the inexistent return value of
3743 wrong_type_argument.
3744
3745 2008-02-22 Kenichi Handa <handa@ni.aist.go.jp>
3746
3747 * Makefile.in (lisp): Remove devanagari.el, kannada.el,
3748 malayalam.el, and tamil.el. Add sinhala.el.
3749
3750 2008-02-21 Stefan Monnier <monnier@iro.umontreal.ca>
3751
3752 * xterm.c (x_connection_closed): Consolidate identical tests.
3753 (x_delete_terminal): Don't crash if called via x_connection_closed.
3754
3755 2008-02-21 Kenichi Handa <handa@ni.aist.go.jp>
3756
3757 * xdisp.c (decode_mode_spec): New arg string.
3758 (display_mode_element): Adjust for the above change.
3759
3760 2008-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
3761
3762 * callint.c (Fcall_interactively): Use AREF.
3763
3764 2008-02-18 Stefan Monnier <monnier@iro.umontreal.ca>
3765
3766 * font.c (font_unparse_xlfd): Don't ignore integer pixel size specs.
3767
3768 2008-02-18 Jan Djärv <jan.h.d@swipnet.se>
3769
3770 * xfns.c (Fx_show_tip): Set string to " " if empty.
3771
3772 2008-02-17 Dan Nicolaescu <dann@ics.uci.edu>
3773
3774 * callint.c (syms_of_callint): Initialize Vmark_even_if_inactive
3775 with Qt.
3776
3777 2008-02-17 Kenichi Handa <handa@m17n.org>
3778
3779 * ftfont.c (ftfont_shape): Return Lispy number.
3780
3781 * xfaces.c (prepare_face_for_display): Use display_info->font->fid
3782 for GCs.
3783 (Finternal_set_font_selection_order): Call font_update_sort_order
3784 only when enable_font_backend is set.
3785 (realize_x_face): Set face->font_info to that of default face only
3786 when enable_font_backend is set.
3787
3788 * xdisp.c (handle_composition_prop): Set it->c to the fist
3789 characte of the composed region.
3790 (fill_composite_glyph_string): Set base_face->font_info to
3791 s->font_info. Get a face for ascii from base_face->ascii_face.
3792 (BUILD_COMPOSITE_GLYPH_STRING): Call fill_composite_glyph_string
3793 with a face already decided.
3794 (x_produce_glyphs): Be sure to set it->ascent and it->descent to
3795 non-negative.
3796 (x_produce_glyphs): If the composition method is ..._WITH_GLYPH_STRING,
3797 call font_prepare_composition unconditionally.
3798
3799 * xfns.c (x_make_gc): Use the default font id of the frame for GCs.
3800
3801 * xterm.h (struct x_display_info): New member font.
3802
3803 * xterm.c (x_set_cursor_gc): Use display_info->font->fid for GCs.
3804 (x_set_mouse_face_gc, x_new_font): Likewise.
3805 (x_term_init): Setup display_info->font.
3806 (x_delete_terminal): Free display_info->font.
3807
3808 * xfont.c (xfont_draw): Use BLOCK_INPUT and UNBLOCK_INPUT.
3809
3810 * ftxfont.c (ftxfont_default_fid): Delete it.
3811 (ftxfont_open): Set xfont->fid to 0.
3812 (ftxfont_end_for_frame): Clear data specific to the frame and the
3813 font-driver.
3814
3815 * xftfont.c (xftfont_default_fid): Delete it.
3816 (xftfont_open): Set xfont->fid to 0.
3817
3818 * fontset.c (FONTSET_OBJLIST): New macro.
3819 (fontset_find_font): Update font-object list of the fontset.
3820 (free_realized_fontset): New function.
3821 (free_face_fontset): Call free_realized_fontset.
3822 (Ffont_info): Call font_close_object only when enable_font_backend
3823 is set.
3824
3825 * font.c [HAVE_X_WINDOWS]: Include xterm.h.
3826 [HAVE_NTGUI]: Include w32term.h.
3827 [MAC_OS]: Include macterm.ch.
3828 (font_otf_ValueRecord): Use make_number.
3829 (font_finish_cache): Fix handling of reference count.
3830 (font_clear_cache): Update num_fonts.
3831 (font_open_entity): Update smallest_char_width and
3832 smallest_font_height of the frame.
3833 (font_close_object): Update num_fonts.
3834 (Fclear_font_cache): Fix finding the target cache data.
3835
3836 2008-02-16 Glenn Morris <rgm@gnu.org>
3837
3838 * fontset.c (Finternal_char_font): Fix compilation warning.
3839
3840 2008-02-16 Eli Zaretskii <eliz@gnu.org>
3841
3842 * w32.c (init_user_info): Use TOKEN_USER and TOKEN_PRIMARY_GROUP
3843 instead of char arrays. Enlarge the size of array passed to
3844 get_token_information.
3845
3846 * font.c (Ffont_fill_gstring, Fget_font_glyphs): Fix compilation
3847 warnings.
3848
3849 2008-02-15 Dan Nicolaescu <dann@ics.uci.edu>
3850
3851 * .gdbinit: Don't set `args', it breaks gdb --args.
3852
3853 2008-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
3854
3855 * fileio.c (Finsert_file_contents): Adjust offsets when replacing
3856 within a narrowed buffer.
3857
3858 2008-02-14 Kenichi Handa <handa@ni.aist.go.jp>
3859
3860 * coding.c (decode_coding_object, encode_coding_object):
3861 Preserve Vdeactivate_mark. Delete unnecessary call of Fcurrent_buffer.
3862
3863 2008-02-12 Stefan Monnier <monnier@iro.umontreal.ca>
3864
3865 * coding.c (coding_set_destination): Use BEG_BYTE rather than
3866 hardcoding 1.
3867 (detect_coding_system):
3868 * lisp.h (detect_coding_system, chars_in_text, multibyte_chars_in_text)
3869 (string_char_to_byte, string_byte_to_char, insert_from_gap):
3870 * insdel.c (insert_from_gap):
3871 * fns.c (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
3872 (string_char_to_byte, string_byte_to_char, string_make_multibyte)
3873 (string_to_multibyte):
3874 * character.c (chars_in_text, multibyte_chars_in_text):
3875 * fileio.c (Finsert_file_contents): Use EMACS_INT for buffer positions.
3876
3877 * character.h (FETCH_STRING_CHAR_ADVANCE)
3878 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
3879 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Use SDATA and SREF.
3880 (DEC_POS, BUF_DEC_POS): Use BEG_BYTE rather than hardcoding 1.
3881
3882 * casefiddle.c (casify_region): Only call after-change and composition
3883 functions on the part of the region that was changed.
3884
3885 * keyboard.c (read_avail_input):
3886 * frame.c (Fdelete_frame): Call Fdelete_terminal.
3887
3888 2008-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
3889
3890 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
3891 (Fbuffer_local_value, Fbuffer_local_variables): Don't forget undo_list.
3892
3893 2008-02-11 Juanma Barranquero <lekktu@gmail.com>
3894
3895 * w32menu.c (push_submenu_start, push_submenu_end)
3896 (push_left_right_boundary, push_menu_pane, push_menu_item):
3897 * keyboard.c (read_key_sequence): Don't pass args with side effects
3898 to AREF, it fails when compiling with -DENABLE_CHECKING.
3899
3900 2008-02-11 Kenichi Handa <handa@ni.aist.go.jp>
3901
3902 * Makefile.in (${lispsource}international/charprop.el):
3903 Delete this target.
3904
3905 * search.c (boyer_moore): Fix incorrect synching of the trunk and
3906 emacs-unicode-2.
3907
3908 2008-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
3909
3910 * terminal.c (Fdelete_terminal): Clean up the `force' path.
3911
3912 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca>
3913
3914 * frame.c (Qnoelisp): New symbol.
3915 (syms_of_frame): Initialize it.
3916 (Fdelete_frame): Use it to distinguish a mere `force' passed from
3917 someharmles Elisp code, from a strong `force' from x_connection_closed.
3918 * frame.h (Qnoelisp): Declare.
3919 * xterm.c (x_connection_closed): Pass `noelisp'.
3920
3921 * lisp.h (struct Lisp_Misc_Any, struct Lisp_Marker)
3922 (struct Lisp_Overlay, struct Lisp_Kboard_Objfwd)
3923 (struct Lisp_Save_Value, struct Lisp_Free): Use enum Lisp_Misc_Type
3924 rather than `int' for the type of `type'.
3925
3926 2008-02-10 Dan Nicolaescu <dann@ics.uci.edu>
3927
3928 * s/gnu-linux.h: Remove support for non-ELF and linux-1.x.
3929
3930 * Makefile.in (GNUC): Remove support for gcc-1.x.
3931
3932 2008-02-10 Richard Stallman <rms@gnu.org>
3933
3934 * lisp.h (ASET): Use AREF, not ASLOT.
3935
3936 2008-02-10 Stefan Monnier <monnier@iro.umontreal.ca>
3937
3938 * lisp.h (ASET): Check bounds.
3939
3940 2008-02-10 Glenn Morris <rgm@gnu.org>
3941
3942 * buffer.c (mode-name): Doc fix.
3943
3944 2008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
3945
3946 * Makefile.in:
3947 * emacs.c:
3948 * gmalloc.c:
3949 * keyboard.c:
3950 * lisp.h:
3951 * m/ibm370aix.h:
3952 * process.c:
3953 * regex.c:
3954 * s/hpux.h:
3955 * sysdep.c:
3956 * sysselect.h:
3957 * systty.h:
3958 * unexec.c:
3959 * w32term.c:
3960 * xsmfns.c:
3961 * xterm.c: Remove code that deals with obsolete variables.
3962
3963 * s/msdos.h (DONT_NEED_ENVIRON): Don't define.
3964
3965 * ecrt0.c: Replace the DONT_NEED_ENVIRON test with MSDOS test,
3966 nothing else needs it anymore.
3967
3968 2008-02-09 Eli Zaretskii <eliz@gnu.org>
3969
3970 * buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use unibyte_to_multibyte_table
3971 instead of unibyte_char_to_multibyte.
3972
3973 2008-02-09 Dan Nicolaescu <dann@ics.uci.edu>
3974
3975 * s/gnu-linux.h: Remove commented out code.
3976
3977 * unexec.c: Remove references to obsolete variable COFF_ENCAPSULATE.
3978
3979 * Makefile.in: Update what RMS says about using autoconf.
3980 (C_COMPILER, COFF_ENCAPSULATE, MAKE_PARALLEL): Remove obsolete variable.
3981 (C_SWITCH_MACHINE_1, C_SWITCH_SYSTEM_1, C_SWITCH_SITE_1)
3982 (C_SWITCH_X_SITE_1, C_SWITCH_X_MACHINE_1)
3983 (C_SWITCH_X_SYSTEM_1): Move invariant code outside conditional.
3984
3985 2008-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
3986
3987 * keymap.c (Fkey_description): Move side effect outside of macro call.
3988
3989 * xfaces.c (Finternal_make_lisp_face):
3990 * keyboard.c (add_command_key, parse_menu_item): Use ASET.
3991
3992 * fontset.c (free_face_fontset): Use FONTSET_FROM_ID.
3993 (syms_of_fontset): Use ASET.
3994
3995 * fns.c (concat): Move side effect outside of macro call.
3996 (hash_clear): Use ASET.
3997
3998 2008-02-08 Richard Stallman <rms@gnu.org>
3999
4000 * frame.c (Fdelete_frame): If FORCE, don't call hooks.
4001 If FORCE, and frame has a surrogate minibuffer for another frame,
4002 delete the other frame first.
4003
4004 2008-02-07 Timo Savola <timo.savola@iki.fi>
4005
4006 * xterm.c (x_detect_focus_change): Handle embed client message.
4007 (handle_one_xevent): Ditto.
4008 (handle_one_xevent): If embedded and we get a button press/release,
4009 request focus.
4010 (xembed_set_info, xembed_send_message): New functions.
4011 (x_make_frame_visible): Call xembed_set_info if embedded.
4012 (x_make_frame_invisible): Call xembed_set_info if embedded.
4013 (x_term_init): Initialize Xatom_XEMBED.
4014 (x_make_frame_visible): Check for FRAME_X_EMBEDDED_P also.
4015 (x_iconify_frame): Ditto.
4016
4017 * xterm.h (struct x_display_info): Add AtomXatom_XEMBED.
4018 (enum xembed_info, enum xerm srmbed_message, enum xembed_focus)
4019 (enum xembed_modifier, enum xembed_accelerator): New.
4020 (xembed_set_info, xembed_send_message): Declare.
4021 (FRAME_X_EMBEDDED_P): New.
4022
4023 * gtkutil.c (xg_create_frame_widgets): If frame is embedded, call
4024 gtk_plug_new.
4025
4026 * xfns.c (Fx_create_frame): Do not override the explicitly set parent
4027 window ID of a frame.
4028 (x_window): Reparent frame if embedded.
4029 (Fx_create_frame): Don't set border width if embedded.
4030
4031 * emacs.c (USAGE3): Add --parent-id.
4032 (standard_args): Ditto.
4033
4034 2008-02-07 Jan Djärv <jan.h.d@swipnet.se>
4035
4036 * coding.c (DECODE_EMACS_MULE_COMPOSITION_CHAR): Use "do...while (0)".
4037
4038 2008-02-07 Jim Meyering <meyering@redhat.com>
4039
4040 Use "do...while (0)", not "if (1)...else" in macro definitions.
4041 The latter provokes a warning from gcc about the empty else, when
4042 followed by ";". Also, without that trailing semicolon, it would
4043 silently swallow up any following statement.
4044 * syntax.h (SETUP_SYNTAX_TABLE)
4045 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Likewise.
4046 * buffer.h (DECODE_POSITION): Likewise.
4047 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
4048 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise.
4049 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK): Likewise.
4050 (FETCH_CHAR_ADVANCE): Likewise.
4051 (FETCH_CHAR_ADVANCE_NO_CHECK): Likewise.
4052
4053 2008-02-07 Jim Meyering <meyering@redhat.com>
4054
4055 * lread.c [lint]: Don't include <sys/inode.h>.
4056
4057 2008-02-07 Stefan Monnier <monnier@iro.umontreal.ca>
4058
4059 * xselect.c (x_handle_dnd_message):
4060 * xmenu.c (digest_single_submenu, xmenu_show):
4061 * xdisp.c (with_echo_area_buffer_unwind_data)
4062 (format_mode_line_unwind_data, unwind_format_mode_line)
4063 (display_menu_bar):
4064 * eval.c (Ffetch_bytecode):
4065 * doc.c (store_function_docstring):
4066 * ccl.c (resolve_symbol_ccl_program, ccl_get_compiled_code)
4067 (Fccl_execute, Fccl_execute_on_string, Fregister_code_conversion_map):
4068 * buffer.c (add_overlay_mod_hooklist): Use ASET.
4069
4070 2008-02-07 Kenichi Handa <handa@m17n.org>
4071
4072 * ftxfont.c (ftxfont_open): Don't set
4073 dpyinfo->smallest_font_height and dpyinfo->smallest_char_width to 0.
4074
4075 * ftfont.c (ftfont_open): Fix previous change.
4076
4077 2008-02-06 Jason Rumney <jasonr@gnu.org>
4078
4079 * w32font.c (w32font_text_extents): Fill in lbearing metric.
4080 Use cached metrics for ASCII characters.
4081 (w32font_open_internal): Don't set font's owning_frame.
4082 Cache metrics for ASCII characters.
4083
4084 * w32font.h (struct w32font_info): Add ascii_metrics.
4085 Remove owning_frame.
4086
4087 2008-02-06 Kenichi Handa <handa@ni.aist.go.jp>
4088
4089 * xdisp.c (x_produce_glyphs): Don't set it->ascent and it->descent
4090 to negative value.
4091
4092 * ftxfont.c (ftxfont_draw): Use s->font_info, not face->font_info.
4093
4094 * ftfont.c (ftfont_open): Fix calculation of font->font.average_width.
4095
4096 * charset.c (syms_of_charset): Set QCtest and Qeq.
4097
4098 2008-02-06 Stefan Monnier <monnier@iro.umontreal.ca>
4099
4100 * process.c (Fstart_process):
4101 * callproc.c (Fcall_process): Handle the case where
4102 Funhandled_file_name_directory returns nil.
4103
4104 * font.h (enum lgstring_indices, enum lglyph_indices): New enums.
4105 (LGSTRING_SLOT, LGSTRING_SET_SLOT): New macros.
4106 * font.c (check_gstring): Use them and AREF to access the vector before
4107 we know it's really a gstring.
4108 (Ffont_shape_text): Fix typo.
4109 (Ffont_shape_text, Ffont_otf_alternates): Fix up int/Lisp_Oject mixups.
4110
4111 * composite.h (Fcompose_region_internal, Fcompose_string_internal):
4112 Declare.
4113
4114 * chartab.c (make_sub_char_table): Remove noop-yet-incorrect statement.
4115
4116 2008-02-05 Jason Rumney <jasonr@gnu.org>
4117
4118 * w32font.c (w32font_open_internal): Fill min_width with tmAveCharWidth.
4119 Set smallest_font_height and smallest_char_width in display info.
4120
4121 2008-02-05 Kenichi Handa <handa@ni.aist.go.jp>
4122
4123 * coding.c (decode_eol): Pay attention to coding->dst_multibyte.
4124
4125 2008-02-05 Miles Bader <miles@gnu.org>
4126
4127 * xfaces.c (get_lface_attributes, merge_named_face)
4128 (lookup_named_face, lookup_derived_face, realize_named_face):
4129 Revert 2008-02-01 change by cyd@stupidchicken.com.
4130
4131 2008-02-04 Kenichi Handa <handa@ni.aist.go.jp>
4132
4133 * fontset.c (Ffontset_info): Handle the case of inhibitting the
4134 fallback fonts.
4135 (Ffontset_info) [USE_FONT_BACKEND]: Fix getting of opened font names.
4136
4137 2008-02-04 Jason Rumney <jasonr@gnu.org>
4138
4139 * w32font.c (w32font_open_internal): Use font_unparse_fcname to
4140 set full_name.
4141 (w32font_open_internal): Use xmalloc, xrealloc, xfree.
4142
4143 2008-02-03 Jason Rumney <jasonr@gnu.org>
4144
4145 * makefile.w32-in (OBJ1): Include font.o here.
4146 (FONTOBJ) [USE_FONTBACKEND]: Instead of here.
4147
4148 2008-02-02 Jason Rumney <jasonr@gnu.org>
4149
4150 * makefile.w32-in (temacs): Bump EMHEAP to 21.
4151
4152 2008-02-01 Jason Rumney <jasonr@gnu.org>
4153
4154 * s/cygwin.h: Define VIRT_ADDR_VARIES.
4155
4156 * puresize.h [VIRT_ADDR_VARIES]: Don't include CYGWIN in condition.
4157
4158 2008-02-01 Andreas Schwab <schwab@suse.de>
4159
4160 * Makefile.in (shortlisp, lisp): Update for rename of
4161 ../lisp/language/myanmar.el.
4162
4163 2008-02-01 Chong Yidong <cyd@stupidchicken.com>
4164
4165 * xfaces.c (get_lface_attributes): Delete function.
4166 (merge_named_face, lookup_named_face, lookup_derived_face)
4167 (realize_named_face): Call lface_from_face_name directly, and use
4168 the fact that merge_face_vectors does not alter its FROM argument.
4169
4170 2008-02-01 Jason Rumney <jasonr@gnu.org>
4171
4172 * w32term.c (w32_read_socket) <WM_CHAR>: Decode non-Unicode
4173 input in the default locale. Handle non-Unicode multibyte input.
4174
4175 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4176
4177 * fontset.c (reorder_font_vector): Exclude nil elements from the
4178 font group. Don't try multiple fonts.
4179 (fontset_font): Adjust for the above change.
4180 (Finternal_char_font): Return nil if the found font doesn't
4181 contain the character ch.
4182
4183 * Makefile.in (lisp, shortlisp): Add cham.el.
4184
4185 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4186
4187 * font.h (FONTP): Make it return 1 also for a font-object.
4188
4189 * .gdbinit (xfontset): New function.
4190
4191 * font.c (font_find_for_lface): Check if the character C is
4192 supported or not only for the first font.
4193
4194 * fontset.c (reorder_font_vector): Fix typo.
4195 (fontset_find_font): Don't add a font-spec specifying a script.
4196 Use 0 (not Qt) for the indication of empty font-group. Change the
4197 format of RFONT-DEF. Return Qt if no font in the font-group
4198 support the character.
4199 (fontset_font): Adjust for the above change. If no font was
4200 found the character, remember that.
4201 (face_for_char): Adjust for the change of RFONT-DEF.
4202 (Fset_fontset_font): Allow nil for FONT-SPEC to explicitly specify
4203 no font for the target.
4204 (Finternal_char_font): Adjust for the change of RFONT-DEF.
4205
4206 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4207
4208 * font.c (font_load_for_face): Handle the case that the font in
4209 face->lface is a string.
4210
4211 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4212
4213 * xfaces.c (set_lface_from_font_and_fontset): Set the fontname in lface.
4214
4215 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4216
4217 * xfaces.c (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]:
4218 Fix previous change. If the frame is not on a window system,
4219 signal an error.
4220
4221 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4222
4223 * coding.c (decode_coding_object, encode_coding_object): Adjust
4224 marker positions after conversion.
4225
4226 * lisp.h (struct Lisp_Marker): New member need_adjustment.
4227
4228 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4229
4230 * font.c (font_find_for_lface): Fix the handling of the return
4231 value of font_has_char.
4232 (Ffont_shape_text): Fix previous change.
4233
4234 * fontset.c (FONTSET_REF_AND_RANGE): Delete it.
4235 (fontset_ref_and_range): Delete it.
4236 (fontset_find_font): Call char_table_ref_and_range instead of
4237 FONTSET_REF_AND_RANGE.
4238 (make_fontset): Don't setup font groups of Latin here.
4239 (Fset_fontset_font): Don't overwrite the setting of FONTSET_ASCII.
4240 (new_fontset_from_font): Make the specified font the default for
4241 all Latin characters.
4242
4243 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4244
4245 * xfaces.c (Finternal_set_lisp_face_attribute): Check if the frame
4246 is on a window system before accessing the fontset of the frame.
4247
4248 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4249
4250 * Makefile.in (lisp, shortlisp): Add kherm.el and myanmar.el.
4251
4252 * ftfont.c (ftfont_driver): Set ftfont_shape in ftfont_driver only
4253 when both HAVE_M17N_FLT and HAVE_LIBOTF are defined.
4254
4255 * font.c (Ffont_shape_text): If the font driver doesn't have a
4256 shaper function, make zero-width glyphs to have at least one-pixel
4257 width. Fix setting of `to' field of glyphs.
4258
4259 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4260
4261 * ftfont.c (ftfont_drive_otf): Fix setting of FROM and TO slots of
4262 glyphs.
4263
4264 * font.h (struct font_driver): Improve docstring of member `shape'.
4265
4266 2008-02-01 Kenichi Handa <handa@m17n.org>
4267
4268 * composite.c (syms_of_composite): Fix docstring of
4269 auto-composition-function.
4270
4271 * font.h (LGLYPH_SIZE): New macro.
4272
4273 * font.c (Ffont_fill_gstring): Stop filling when a character not
4274 supported by the font is found.
4275 (Ffont_shape_text): When a shape callback function returns nil,
4276 try at most two more times with larger gstring.
4277 (Ffont_at): Fix getting of w. Call font_at with correct 5th argument.
4278
4279 * xdisp.c (handle_auto_composed_prop): Change the argument to
4280 auto-composition-function.
4281
4282 * ftfont.c (ftfont_encode_char): Use the macro FONT_INVALID_CODE.
4283 (ftfont_shape_by_flt): If an element of lgstring is nil, make a
4284 Lispy glyph and store it in the lgstring.
4285
4286 * xfont.c (xfont_encode_char): Use the macro FONT_INVALID_CODE.
4287
4288 * xftfont.c (xftfont_encode_char): Use the macro FONT_INVALID_CODE.
4289
4290 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4291
4292 * font.c (Ffont_shape_text): Avoid unnecessary composition.
4293
4294 * fontset.c (Vfont_encoding_charset_alist): New variable.
4295 (syms_of_fontset): DEFVAR it.
4296 (reorder_font_vector, fontset_find_font): Optimize for the case of
4297 no need of reordering.
4298 (face_for_char): Map the charset property by
4299 Vfont_encoding_charset_alist.
4300
4301 2008-02-01 Jason Rumney <jasonr@gnu.org>
4302
4303 * w32font.c (logfonts_match): Don't check adstyle here.
4304 (font_matches_spec): Check here against physical font instead.
4305 (add_font_entity_to_list): Avoid some substitutions.
4306
4307 * font.c (font_parse_fcname): Default weight and slant to normal.
4308 (font_score): Prefer normal fonts if weight or slant unspecified.
4309 (font_score) [WINDOWSNT]: Scale weight difference down to closer
4310 match freetype scores.
4311
4312 2008-02-01 Jason Rumney <jasonr@gnu.org>
4313
4314 * w32font.c (w32font_text_extents): Don't use the frame stored in the
4315 font, as it may have been deleted.
4316 (w32_enumfont_pattern_entity): Map generic family to adstyle using
4317 most common hyphenless variation.
4318 (logfonts_match): Check generic family.
4319 (font_matches_spec): Don't check generic family here.
4320 (fill_in_logfont): Set generic family based on adstyle.
4321
4322 * w32font.h (w32font_get_cache): Update declaration.
4323
4324 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4325
4326 * ftfont.c (ftfont_get_cache): Adjust the argument type.
4327
4328 * frame.c (x_set_font_backend): Don't call Fclear_font_cache.
4329 If none of the new drivers are available, call font_update_drivers
4330 with the old drivers.
4331
4332 * w32font.c (w32font_get_cache): Adjust the argument type.
4333
4334 * xfont.c (xfont_get_cache): Adjust the argument type.
4335
4336 * font.h (struct font_driver): Change argument type of get_cache.
4337
4338 * xftfont.c (xftfont_start_for_frame): Delete prototype.
4339
4340 * font.c (Ffont_get): Fix arguments to Fassoc.
4341 (font_prepare_cache, font_finish_cache, font_get_cache): New functions.
4342 (font_clear_cache): New function.
4343 (font_list_entities, font_matching_entity): Use font_get_cache.
4344 (font_update_drivers): Call font_clear_cache when finishing a driver.
4345
4346 * fontset.c (fontset_find_font): Fix previous change.
4347
4348 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4349
4350 * xterm.c (x_check_font) [USE_FONT_BACKEND]: Don't access
4351 dpyinfo->font_table.
4352 (x_delete_display) [USE_FONT_BACKEND]: Likewise.
4353 (x_delete_terminal) [USE_FONT_BACKEND]: Likewise.
4354
4355 * font.c (font_at): Handle the case that the arg C is negative.
4356 Handle the unibyte case.
4357 (Ffont_at): Call font_at with the arg C -1.
4358
4359 * xdisp.c (handle_auto_composed_prop): Don't get a character at
4360 the position here, and call font_at with the arg C -1.
4361 Don't check the range of the existing composition at the point.
4362
4363 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4364
4365 * fontset.c (fontset_add): New args charset_id and family.
4366 Change caller.
4367 (load_font_get_repertory, fontset_find_font): Assume that
4368 font_spec is always a font-spec object.
4369 (Fset_fontset_font): Always store a font-spec object in a fontset.
4370
4371 * xdisp.c (handle_auto_composed_prop): Use Fget_text_property
4372 instead of get_property_and_range.
4373
4374 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4375
4376 * xftfont.c (struct xftfont_info): Delete the member ft_face.
4377 (xftfont_open): Don't keep locking face.
4378 (xftfont_close): Don't unlock face.
4379 (xftfont_anchor_point, xftfont_shape): Lock and unlock face.
4380
4381 * fontset.c (fontset_find_font): Don't prefer a font of
4382 supplementary charset.
4383
4384 2008-02-01 Kenichi Handa <handa@m17n.org>
4385
4386 * ftfont.c (struct OpenTypeSpec): Rename members script_tag to
4387 script, langsys_tag to langsys, new member script.
4388 (OTF_TAG_STR): Terminate by '\0'.
4389 (ftfont_get_open_type_spec): If :otf prop is is spec, Limit the
4390 listing to the script specified in that property. Fix arg to
4391 OTF_check_features.
4392
4393 2008-02-01 Jason Rumney <jasonr@gnu.org>
4394
4395 * w32font.h: New file.
4396
4397 * w32font.c: Include it.
4398 (struct w32font_info): Add owning_frame field. Move to w32font.h.
4399 (w32font_open): Set owning_frame.
4400 (w32font_text_extents): Use owning_frame.
4401 (struct font_callback_data): Add opentype_only field.
4402 (add_font_entity_to_list): Use it to filter fonts.
4403 Don't check against full name.
4404 (w32font_list_internal): New function.
4405 (w32font_list): Use it.
4406 (w32font_match_internal): New function.
4407 (w32font_match): Use it.
4408 (w32font_open_internal): New function.
4409 (w32font_open): Use it.
4410 (w32font_get_cache, w32font_close, w32font_has_char)
4411 (w32font_encode_char, w32font_text_extents, w32font_draw):
4412 Make non-static.
4413
4414 * makefile.w32-in (w32font.o): Depend on w32font.h.
4415
4416 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4417
4418 * charset.c (Fdefine_charset_internal): Record a supplementary
4419 charset at the tail of Vcharset_order_list.
4420
4421 * font.c (Ffont_shape_text): Fix the return value.
4422
4423 * ftfont.c (OTF_SYM_TAG, OTF_TAG_STR): Fix argument names.
4424
4425 * xdisp.c (handle_auto_composed_prop): Fix previous change.
4426
4427 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4428
4429 * ftfont.c (struct OpenTypeSpec): New struct.
4430 (OTF_SYM_TAG, OTF_TAG_STR): New macros.
4431 (ftfont_get_open_type_spec): New function.
4432 (ftfont_list) [HAVE_LIBOTF]: Check otf-spec property.
4433
4434 * lread.c (read1): Redo the previous change with checking Vpurify_flag.
4435
4436 2008-02-01 Jason Rumney <jasonr@gnu.org>
4437
4438 * w32font.c (add_font_entity_to_list): Compare only the beginning
4439 of full name.
4440
4441 2008-02-01 Kenichi Handa <handa@m17n.org>
4442
4443 * xdisp.c (handle_auto_composed_prop): Simplify the code.
4444 Never return HANDLED_RECOMPUTE_PROPS.
4445
4446 2008-02-01 Kenichi Handa <handa@m17n.org>
4447
4448 * font.c (font_gstring_produce): Delete it.
4449
4450 * composite.h (COMPOSITION_METHOD):
4451 Handle COMPOSITION_WITH_GLYPH_STRING.
4452
4453 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4454
4455 * xfont.c (Qx): Delete.
4456 (syms_of_xfont): Don't initialize Qx.
4457
4458 * composite.h (enum composition_method):
4459 Define COMPOSITION_WITH_GLYPH_STRING unconditionally.
4460
4461 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4462
4463 * xfaces.c [HAVE_WINDOW_SYSTEM]: Include "font.h" unconditionally.
4464 (choose_face_font): Accept new form of font-spec.
4465
4466 * frame.h (font_driver_list): Declare it unconditionally.
4467 (struct frame): Define members font_driver_list and font_data_list
4468 unconditionally.
4469
4470 * fontset.c: Include "font.h" unconditionally.
4471 (generate_ascii_font_name): Use font_parse_xlfd and font_unparse_xlfd.
4472 (Fset_fontset_font): Accept a font-spec object.
4473
4474 * font.c (font_unparse_xlfd): If pixel_size is zero, make the
4475 PIXEL_SIZE part a wild card.
4476
4477 * dispextern.h (struct glyph_string): Define members clip and
4478 num_clips unconditionally.
4479 (struct face): Define members font_info and extra unconditionally.
4480
4481 * ftfont.c (ftfont_open): Set members maybe_otf and otf of
4482 ftfont_info only when HAVE_LIBOTF is defined.
4483
4484 2008-02-01 Andreas Schwab <schwab@suse.de>
4485
4486 * xdisp.c (back_to_previous_visible_line_start): Fix type of beg
4487 and end.
4488
4489 2008-02-01 Jason Rumney <jasonr@gnu.org>
4490
4491 * w32font.c (w32font_driver): Add new fields.
4492
4493 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4494
4495 * Makefile.in (ALL_CFLAGS): Add @M17N_FLT_CFLAGS@.
4496 (FONTSRC, FONTOBJ) [HAVE_WINDOW_SYSTEM]: Set them unconditionally.
4497 (LIBES): Add @M17N_FLT_CFLAGS@.
4498
4499 * composite.c (compose_text): Don't treat the new style
4500 composition specially.
4501
4502 * emacs.c (main): Call syms_of_font unconditionally.
4503
4504 * font.h (FONT_ENTITY_NOT_LOADABLE)
4505 (FONT_ENTITY_SET_NOT_LOADABLE): New macros.
4506 (LGSTRING_XXXX, LGLYPH_XXX): Adjust for the change of lispy gstring.
4507 (struct font_driver): New member shape.
4508 (font_registry_charsets): Extern it.
4509 (font_find_for_lface, font_prepare_composition): Adjust prototype.
4510 (font_otf_capability, font_drive_otf): Delete their externs.
4511
4512 * font.c [HAVE_M17N_FLT]: Include <m17n-flt.h>.
4513 (font_charset_alist, font_registry_charsets): Move from xfont.c
4514 and rename.
4515 (font_prop_validate_otf): New function.
4516 (font_property_table): Register it for QCotf.
4517 (DEVICE_DELTA, adjust_anchor, REPLACEMENT_CHARACTER)
4518 (font_drive_otf): Delete.
4519 (font_prepare_composition): New arg F. Adjust for the change of
4520 lispy gstring.
4521 (font_find_for_lface): New arg C.
4522 (font_load_for_face): Adjust for the change of font_find_for_lface.
4523 (Ffont_make_gstring, Ffont_fill_gstring): Adjust for the change of
4524 lispy gstring.
4525 (Ffont_shape_text): New function.
4526 (Fopen_font): If the font size is not given, use 12-pixel.
4527 (Ffont_at): New arg STRING.
4528 (syms_of_font): Initalize font_charset_alist.
4529 Declare Ffont_shape_text as a Lisp function. Call syms_of_XXfont
4530 conditionally.
4531
4532 * fontset.c (fontset_find_font) [USE_FONT_BACKEND]: Try multiple
4533 fonts of the same font-spec. Change the format of RFONT-DEF.
4534 (face_for_char, make_fontset_for_ascii_face, Finternal_char_font):
4535 Adjust for the change of RFONT-DEF.
4536 (Fset_fontset_font) [USE_FONT_BACKEND]: Handle new format of font-spec.
4537
4538 * ftfont.h: New file.
4539
4540 * ftfont.c: Don't include Freetype headers. Include "ftfont.h".
4541 (struct ftfont_info) [HAVE_LIBOTF]: New members maybe_otf and otf.
4542 (ftfont_open) [HAVE_LIBOTF]: Initialize the above members.
4543 (ftfont_driver) [HAVE_LIBOTF, HAVE_M17N_FLT]: Don't set
4544 font_otf_capability and font_drive_otf, set ftfont_shape.
4545 (ftfont_list): Adjust for the change of :otf property value.
4546 (struct MFLTFontFT) [HAVE_LIBOTF, HAVE_M17N_FLT]: New struct.
4547 (ftfont_get_glyph_id, ftfont_get_metrics, ftfont_check_otf)
4548 (adjust_anchor, ftfont_drive_otf, ftfont_shape_by_flt)
4549 (ftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.
4550 (DEVICE_DELTA) [HAVE_LIBOTF, HAVE_M17N_FLT]: New macro.
4551 (otf_gstring, gstring, m17n_flt_initialized): New variables.
4552
4553 * w32term.c (x_draw_composite_glyph_string_foreground):
4554 Adjust for the change of lispy gstring.
4555
4556 * xdisp.c (handle_composition_prop): Adjust for the change of
4557 lispy gstring. Call a function for auto-composition with the
4558 third arg it->window.
4559 (fill_composite_glyph_string): Adjust for the change of lispy string.
4560 (x_produce_glyphs): Adjust for the change of font_prepare_compositionl.
4561
4562 * xfaces.c (set_font_frame_param): Adjust for the change of
4563 font_find_for_lface.
4564
4565 * xfont.c (x_font_charset_alist): Move to font.c and rename.
4566 (xfont_registry_charsets): Likewise. Change caller.
4567 (syms_of_xfont): Don't handle x_font_charset_alist.
4568
4569 * xftfont.c: Include "ftfont.h".
4570 (struct xftfont_info) [HAVE_LIBOTF]: New members maybe_otf and otf.
4571 (xftfont_open) [HAVE_LIBOTF]: Initialize the above members.
4572 (xftfont_close) [HAVE_LIBOTF]: Close otf.
4573 (xftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.
4574 (syms_of_xftfont) [HAVE_LIBOTF, HAVE_M17N_FLT]:
4575 Set xftfont_driver.shape to xftfont_shape.
4576
4577 * xterm.c (x_draw_composite_glyph_string_foreground): Adjust for
4578 the change of lispy gstring.
4579
4580 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4581
4582 * ftxfont.c (ftxfont_end_for_frame): Fix array indexing error.
4583
4584 2008-02-01 Jason Rumney <jasonr@gnu.org>
4585
4586 * w32font.c (w32font_draw): Fill background manually.
4587
4588 2008-02-01 Jason Rumney <jasonr@gnu.org>
4589
4590 * font.c (Qfontp): Remove unused symbol.
4591 (QCantialias): New symbol.
4592 (syms_of_font): Define it.
4593 (font_property_table): Set a validator for QCantialias.
4594
4595 * w32font.c (CLEARTYPE_QUALITY, CLEARTYPE_NATURAL_QUALITY):
4596 Define if not already.
4597 (QCfamily): Share with xfaces.c.
4598 (Qstandard, Qsubpixel, Qnatural): New symbols.
4599 (syms_of_w32font): Define them. Don't define QCfamily here.
4600 (w32_antialias_type, lispy_antialias_type): New functions.
4601 (w32_enumfont_pattern_entity): New arg requested_font.
4602 Set antialias parameter if non-default was requested.
4603 (fill_in_logfont): Fill in lfQuality if :antialias specified.
4604
4605 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4606
4607 * lread.c (read1): Undo the previous change.
4608
4609 2008-02-01 CHENG Gao <chenggao@gmail.com> (tiny change)
4610
4611 * frame.c (Fdelete_frame): Call font_update_drivers only when
4612 USE_FONT_BACKEND is defined.
4613
4614 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4615
4616 * font.h (struct font_bitmap): New member bits_per_pixel.
4617 (struct font_driver): New members start_for_frame and end_for_frame.
4618 (struct font_data_list): New struct.
4619 (font_put_frame_data, font_get_frame_data): Extern them.
4620
4621 * frame.h (struct frame): New member font_data_list.
4622
4623 * font.c (font_update_drivers): Call driver->start_for_frame and
4624 driver->end_for_frame at proper timings.
4625 (font_put_frame_data, font_get_frame_data): New functions.
4626 (Ffont_spec): Add usage in the docstring.
4627
4628 * frame.c (make_frame): Initialize f->font_data_list to NULL.
4629 (Fdelete_frame): Call font_update_drivers.
4630
4631 * xftfont.c (struct xftface_info): Delete the member xft_draw.
4632 (xftfont_prepare_face, xftfont_done_face): Adjust for the above change.
4633 (xftfont_get_xft_draw): New function.
4634 (xftfont_draw): Get XftDraw by xftfont_get_xft_draw.
4635 (xftfont_end_for_frame): New function.
4636 (syms_of_xftfont): Set xftfont_driver.end_for_frame.
4637
4638 * ftxfont.c (ftxfont_get_gcs): Rename from ftxfont_create_gcs.
4639 Change argument. Cache GCs in the per-frame data.
4640 (struct ftxfont_frame_data): New struct.
4641 (ftxfont_draw_bitmap): New arg gc_fore and flush.
4642 (ftxfont_prepare_face, ftxfont_done_face): Delete them.
4643 (ftxfont_draw): Get GCs by ftxfont_get_gcs. Reflect s->clip in GCs.
4644 (ftxfont_end_for_frame): New function.
4645 (syms_of_ftxfont): Set ftxfont_driver.end_for_frame.
4646
4647 * ftfont.c (ftfont_get_bitmap): Set bitmap->bits_per_pixel.
4648
4649 2008-02-01 Kenichi Handa <handa@m17n.org>
4650
4651 * xselect.c (Vselection_coding_system)
4652 (Vnext_selection_coding_system): Delete them.
4653 (syms_of_xselect): Don't declare selection-coding-system and
4654 next-selection-coding-system. They are declared in select.el.
4655
4656 2008-02-01 Jason Rumney <jasonr@gnu.org>
4657
4658 * w32term.h (WM_UNICHAR, UNICODE_NOCHAR): Define if not already.
4659
4660 * w32fns.c: Include imm.h.
4661 (get_composition_string_fn, get_ime_context_fn): New optional
4662 system functions.
4663 (globals_of_w32fns): Load them from imm32.dll.
4664 (ignore_ime_char): New flag.
4665 (w32_wnd_proc): Handle WM_UNICHAR, WM_IME_CHAR and
4666 WM_IME_ENDCOMPOSITION messages.
4667
4668 * w32term.c (w32_read_socket) [WM_UNICHAR]: Handle as
4669 MULTIBYTE_CHAR_KEYSTROKE_EVENT.
4670
4671 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4672
4673 * lread.c (READCHAR): Call readchar with the 2nd arg NULL.
4674 (READCHAR_REPORT_MULTIBYTE): New macro.
4675 (readchar): New 2nd arg MULTIBYTE.
4676 (read1): Use READCHAR_REPORT_MULTIBYTE for the first read.
4677 Make symbol's name multibyte according to the multibyteness of the
4678 source.
4679
4680 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4681
4682 * xfaces.c (face_for_overlay_string): Call lookup_face with
4683 correct arguments (fix of synching with the trunk).
4684
4685 2008-02-01 Kenichi Handa <handa@m17n.org>
4686
4687 * font.c (font_prop_validate_symbol, font_prop_validate_style)
4688 (font_prop_validate_non_neg, font_prop_validate_spacing):
4689 Delete argument prop_index.
4690 (font_property_table): Change arguments to validater. Change Callers.
4691 (font_lispy_object): Delete.
4692 (font_at): Use font_find_object instead fo font_lispy_object.
4693
4694 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
4695
4696 * fileio.c (Fexpand_file_name): Adjust multibyteness of directory
4697 and file names.
4698
4699 2008-02-01 Jason Rumney <jasonr@gnu.org>
4700
4701 * w32font.c (add_font_name_to_list): Avoid vertical fonts.
4702 (font_matches_spec): Remove debug output.
4703 (add_font_entity_to_list): Avoid using substituted fonts.
4704
4705 2008-02-01 Jason Rumney <jasonr@gnu.org>
4706
4707 * doc.c (Fsnarf_documentation):
4708 * Makefile.in (temacs${EXEEXT}, mostlyclean): Undo last change.
4709
4710 2008-02-01 Miles Bader <miles@gnu.org>
4711
4712 * dispextern.h (struct glyph_row): Only define "clip" field if
4713 HAVE_WINDOW_SYSTEM is defined.
4714
4715 2008-02-01 Stefan Monnier <monnier@iro.umontreal.ca>
4716
4717 Fix up multi-tty merge.
4718
4719 * xterm.c (handle_one_xevent): Remove duplicate code and fix up nesting
4720 and indentation.
4721
4722 * xfaces.c (free_realized_face, clear_face_gcs):
4723 Include font_done_for_face in the input_blocked section, just in case.
4724
4725 * xdisp.c (decode_mode_spec): Use terminal-local coding systems.
4726 (get_char_face_and_encoding): Undo last change and remove the *other*
4727 duplicate definition (i.e. keep the one that's better scoped and that
4728 includes code for the font-backend).
4729
4730 * terminal.c (create_terminal): Default keyboard_coding to
4731 `no-conversion' and terminal_coding to `undecided'.
4732
4733 * lread.c (read1): Use XSETPVECTYPE to set a pseudovector's tag.
4734
4735 * fontset.c (free_realized_fontsets): Check that the table entry does
4736 contain a fontset before trying to compare it to `base'.
4737
4738 * emacs.c (main): Move syms_of_data, syms_of_fileio, syms_of_alloc,
4739 syms_of_charset, and syms_of_coding earlier because init_window_once
4740 now needs Vcoding_system_hash_table to be setup.
4741
4742 * coding.h (default_buffer_file_coding): Remove.
4743
4744 * coding.c (default_buffer_file_coding): Remove.
4745 (Fterminal_coding_system, Fkeyboard_coding_system): Use ->id rather
4746 than ->symbol, and use the terminal-local coding system.
4747 (syms_of_coding): Don't setup the coding-systems that are not
4748 terminal-local.
4749 (Fdefine_coding_system_internal): Use XCAR/XCDR.
4750
4751 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
4752 Use XSETPVECTYPE now that XSETCHAR_TABLE doesn't set the tag anymore.
4753
4754 * alloc.c (Fmake_char_table, make_sub_char_table): Remove. They're now
4755 in chartab.c and were re-added here by mistake.
4756 (Fpurecopy): Use XSETPVECTYPE after copying a COMPILED pseudovector.
4757
4758 * doc.c (Fsnarf_documentation):
4759 * Makefile.in (temacs${EXEEXT}, mostlyclean): Move buildobj.lst from
4760 src to etc.
4761
4762 * ChangeLog.10: Add mistakenly removed entry.
4763
4764 2008-02-01 Dan Nicolaescu <dann@ics.uci.edu>
4765
4766 * Makefile.in (fringe.o, minibuf.o): Fix dependencies.
4767
4768 2008-02-01 Miles Bader <miles@gnu.org>
4769
4770 * xdisp.c (get_char_face_and_encoding): Remove extraneous definition.
4771 Add extra args to FACE_FOR_CHAR.
4772
4773 2008-02-01 Kenichi Handa <handa@m17n.org>
4774
4775 * keymap.c (where_is_internal_1): If key is a cons, store the copy
4776 in sequence.
4777
4778 * chartab.c (map_sub_char_table, map_char_table): If the range
4779 contains just one character, call the function with that character
4780 even if the depth is not 3.
4781
4782 2008-02-01 Jason Rumney <jasonr@gnu.org>
4783
4784 * w32font.c (w32font_text_extents): Calculate metrics for the
4785 whole string.
4786
4787 2008-02-01 Jason Rumney <jasonr@gnu.org>
4788
4789 * w32xfns.c (get_next_msg): Consolidate WM_PAINT messages.
4790
4791 2008-02-01 Jason Rumney <jasonr@gnu.org>
4792
4793 * w32term.c (x_set_glyph_string_clipping): Use
4794 get_glyph_string_clip_rects.
4795 (x_set_glyph_string_clipping_exactly, x_draw_glyph_string):
4796 Adjust for the change of struct glyph_string.
4797
4798 * w32font.c (w32font_draw): Do clipping here.
4799
4800 2008-02-01 Kenichi Handa <handa@m17n.org>
4801
4802 * xftfont.c (xftfont_draw): Adjust for the change of struct
4803 glyph_string.
4804
4805 * xterm.c (x_set_glyph_string_clipping): Use
4806 get_glyph_string_clip_rects.
4807 (x_set_glyph_string_clipping_exactly, x_draw_glyph_string):
4808 Adjust for the change of struct glyph_string.
4809
4810 * xdisp.c (get_glyph_string_clip_rects): Reflect s->row->clip to
4811 the resulting clip(s}.
4812 (expose_overlaps): Add arg r. Change callers. Set it to
4813 row->clip temporarily.
4814 (expose_window): Redraw rows overlapping the exposed area.
4815
4816 * dispextern.h (struct glyph_row): New member clip.
4817 (struct glyph_string): Delete members clip_x, clip_y, clip_width,
4818 clip_height, new member clip, and num_clips.
4819
4820 2008-02-01 Kenichi Handa <handa@m17n.org>
4821
4822 * data.c (Fchar_or_string_p): Fix docstring.
4823
4824 2008-02-01 Kenichi Handa <handa@m17n.org>
4825
4826 * xftfont.c (xftfont_draw): If s->font_info != s->face->font_info,
4827 create a temporal XftDraw object.
4828
4829 2008-02-01 Kenichi Handa <handa@m17n.org>
4830
4831 * font.c (Ffontp): Fix docstring.
4832
4833 * coding.c (detect_coding_iso_2022): Don't treat SI/SO codes as a
4834 strong evidence of ISO-2022.
4835
4836 2008-02-01 Kenichi Handa <handa@m17n.org>
4837
4838 * abbrev.c (abbrev_check_chars): Use CHAR_TABLE_REF, not
4839 SYNTAX_ENTRY_FOLLOW_PARENT.
4840
4841 2008-02-01 Stefan Monnier <monnier@iro.umontreal.ca>
4842
4843 * fns.c (weak_hash_tables): Rename from Vweak_hash_tables and change
4844 its type.
4845 (make_hash_table, copy_hash_table, sweep_weak_hash_tables, init_fns):
4846 Update to the new type of weak_hash_tables and next_weak.
4847
4848 * lisp.h (struct Lisp_Hash_Table): Change next_weak from Lisp_Object to
4849 a plain C pointer to Lisp_Hash_Table.
4850
4851 * lisp.h (XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
4852 (GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
4853 (GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
4854 (GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
4855 (GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
4856 (GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
4857 (GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
4858 (GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
4859 (GC_EQ): Remove since they've been identical to their non-GC_
4860 alter-egos ever since the markbit was eradicated.
4861
4862 * alloc.c:
4863 * buffer.c:
4864 * buffer.h:
4865 * data.c:
4866 * fileio.c:
4867 * filelock.c:
4868 * fns.c:
4869 * frame.h:
4870 * lisp.h:
4871 * macterm.c:
4872 * print.c:
4873 * process.c:
4874 * w32fns.c:
4875 * w32menu.c:
4876 * w32term.c:
4877 * xfns.c:
4878 * xmenu.c:
4879 * xterm.c: Replace uses of GC_* macros with the non-GC_ versions.
4880
4881 2008-02-01 Kenichi Handa <handa@m17n.org>
4882
4883 * chartab.c (map_sub_char_table): Make it work for the top-level
4884 char-table. Fix handling of parent char-table.
4885 (map_char_table): Adjust for the above change.
4886
4887 2008-02-01 Jason Rumney <jasonr@gnu.org>
4888
4889 * w32font.c (Qgdi): Rename from Qw32.
4890
4891 2008-02-01 Jason Rumney <jasonr@gnu.org>
4892
4893 * w32bdf.c (get_quoted_string): Make function static.
4894
4895 2008-02-01 Kenichi Handa <handa@m17n.org>
4896
4897 * xftfont.c (xftfont_open): If one of font's ASCII glyph has
4898 bigger ascent and descent than those of the font, use them as
4899 font's ascent and descent.
4900
4901 2008-02-01 Kenichi Handa <handa@m17n.org>
4902
4903 * Makefile.in (${lispsource}international/charprop.el): Move this
4904 target within "#ifdef HAVE_UNIDATA" and "#endif".
4905
4906 2008-02-01 Kenichi Handa <handa@m17n.org>
4907
4908 * Makefile.in (lisp): Add ${lispsource}language/tai-viet.el.
4909 (shortlisp): Add ../lisp/language/tai-viet.el.
4910
4911 2008-02-01 Ulrich Mueller <ulm@gentoo.org>
4912
4913 * Makefile.in (${lispsource}international/charprop.el): Depend on
4914 temacs${EXEEXT}.
4915
4916 2008-02-01 Jason Rumney <jasonr@gnu.org>
4917
4918 * w32font.c (w32font_close): Delete the GDI font object.
4919
4920 * w32menu.c: Include character.h.
4921
4922 * w32proc.c: Likewise.
4923
4924 * w32select.c: Likewise.
4925
4926 * makefile.w32-in (w32proc.o): Depend on character.h.
4927
4928 2008-02-01 Jason Rumney <jasonr@gnu.org>
4929
4930 * w32fns.c (syms_of_w32fns): Use DEFSYM macro.
4931
4932 * w32menu.c (syms_of_w32menu): Likewise.
4933
4934 * w32proc.c (syms_of_ntproc): Likewise.
4935
4936 * w32select.c (syms_of_w32select): Likewise.
4937
4938 * w32term.c (syms_of_w32term): Likewise.
4939
4940 2008-02-01 Jason Rumney <jasonr@gnu.org>
4941
4942 * w32font.c (w32font_draw): Delete brush after using it.
4943
4944 2008-02-01 Jason Rumney <jasonr@gnu.org>
4945
4946 * w32font.c (w32font_open): Don't set font_idx.
4947 (w32font_text_extents): Try GetTextExtentPoint32W before defaulting
4948 to font settings.
4949 (w32font_draw): Fill background explicitly.
4950
4951 2008-02-01 Jason Rumney <jasonr@gnu.org>
4952
4953 * w32term.c (w32_initialize): Don't call w32font_initialize.
4954
4955 * w32font.c (w32font_info): Remove subranges.
4956 (QCsubranges, Qmodern, Qswiss, Qroman): Remove.
4957 (QCfamily, Qmonospace, Qsans_serif, Qmono, Qsans, Qsans__serif)
4958 (Qraster, Qoutline, Qlatin, Qgreek, Qcoptic, Qcyrillic, Qarmenian)
4959 (Qhebrew, Qarabic, Qsyriac, Qnko, Qthaana, Qdevanagari, Qbengali)
4960 (Qgurmukhi, Qgujarati, Qoriya, Qtamil, Qtelugu, Qkannada)
4961 (Qmalayalam, Qsinhala, Qthai, Qlao, Qtibetan, Qmyanmar, Qgeorgian)
4962 (Qhangul, Qethiopic, Qcherokee, Qcanadian_aboriginal, Qogham)
4963 (Qrunic, Qkhmer, Qmongolian, Qsymbol, Qbraille, Qhan)
4964 (Qideographic_description, Qcjk_misc, Qkana, Qbopomofo, Qkanbun)
4965 (Qyi, Qbyzantine_musical_symbol, Qmusical_symbol, Qmathematical):
4966 New symbols.
4967 (font_callback_data): New struct.
4968 (w32font_list, w32font_match): Use it.
4969 (w32font_open): Don't populate subranges.
4970 (w32font_has_char): Use script Lisp symbols, not subrange bitmask.
4971 (w32font_encode_char): Always return unicode code-point as-is.
4972 (w32font_text_extents): Supply a tranformation matrix to
4973 GetGlyphOutline. Never look up by glyph index. Avoid looping
4974 twice. Use unicode version of GetTexExtentPoint32 instead of
4975 glyph index version.
4976 (set_fonts_frame): Remove.
4977 (w32_enumfont_pattern_entity): Add frame parameter, use it to
4978 set frame parameter. Use backward compatible fake foundries.
4979 Save generic family in extra slot under QCfamily. Make width slot
4980 constant. Save QCspacing value. Save list of scripts instead of
4981 binary subranges.
4982 (w32_generic_family, logfonts_match, font_matches_spec): New functions.
4983 (add_font_entity_to_list): Use font_callback_data struct. Filter
4984 unwanted fonts.
4985 (add_one_font_entity_to_list): Use font_callback_data struct.
4986 (w32_registry): Default to iso10646_1.
4987 (fill_in_logfont): Use dpi from extra slot. Don't bother with
4988 string font registries. Don't fill in font name if it is a generic
4989 family name, fill family instead. Use spacing, family and script
4990 extra info to fill pitch, family and charset fields.
4991 (list_all_matching_fonts): Use font_callback_data struct.
4992 (unicode_range_for_char): Remove.
4993 (font_supported_scripts): New function.
4994 (w32font_initialize): Remove.
4995 (syms_of_w32font): Update which symbols are defined.
4996
4997 2008-02-01 Jason Rumney <jasonr@gnu.org>
4998
4999 * font.c (font_pixel_size): Reverse assq_no_quit args.
5000
5001 * w32term.h (FONT_WIDTH): Report max width, not average.
5002 (FONT_MAX_WIDTH): Remove.
5003 (FONT_AVG_WIDTH): New macro.
5004
5005 * xfaces.c (Fx_list_fonts) [WINDOWSNT]: Remove Windows only
5006 redefinition of FONT_WIDTH.
5007
5008 * w32term.c (x_font_min_bounds): Use FONT_AVG_WIDTH.
5009 (w32_cache_char_metrics): Use FONT_WIDTH.
5010
5011 * w32fns.c (w32_load_system_font, w32_list_fonts): Use FONT_AVG_WIDTH.
5012
5013 2008-02-01 Jason Rumney <jasonr@gnu.org>
5014
5015 * w32font.c (w32font_open): Make lfHeight negative.
5016
5017 * w32fns.c (x_default_font_parameter): Use new style font name.
5018 (Fx_create_frame, x_create_tip_frame): Initialize resx and resy.
5019
5020 2008-02-01 Jason Rumney <jasonr@gnu.org>
5021
5022 * w32font.c (QCsubranges): New symbol.
5023 (w32font_open, w32font_has_char): Get subranges from subproperty
5024 of extra.
5025 (w32_enumfont_pattern_entity): Set subranges as subproperty of extra.
5026 (syms_of_w32font): Define :subranges symbol.
5027
5028 * font.c (font_put_extra): Expose externally.
5029
5030 * font.h (font_put_extra): Move declaration from font.c.
5031
5032 * font.c (Ffont_get): Use font driver to determine otf capability.
5033 (adjust_anchor): Check if driver defines anchor_point before using.
5034
5035 * w32font.c (w32font_open): Handle size, height and pixel_size better.
5036 (w32font_draw): Use options.
5037 (w32_enumfont_pattern_entity): Set size to 0 for scalable fonts.
5038 Fix detection of truetype fonts.
5039 (registry_to_w32_charset): Handle charsets other than iso8859-1
5040 expressed as lisp symbols.
5041 (w32_registry): Express charset as lisp symbol.
5042 (fill_in_logfont): Reverse pixel and point height logic.
5043 Don't set width here. Set quality to default.
5044
5045 * w32fns.c (w32_load_system_font): Fix detecting FIXED_PITCH fonts.
5046 (x_to_w32_font): Fill in lfPitchAndFamily correctly.
5047
5048 * xterm.c (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]:
5049 Remove redundant loop and allocation.
5050
5051 * makefile.w32-in (font.o, w32font.o): New objects.
5052 (fontset.o, xdisp.o, xfaces.o, w32fns.o, w32term.o): Depend on font.h.
5053 (FONTOBJ): New group of objects conditioned on USE_FONT_BACKEND.
5054
5055 * xdisp.c (fill_composite_glyph_string): Make the first arg to
5056 STORE_XCHARB a valid l-value.
5057
5058 * w32term.c (w32_native_per_char_metric): Swap width and rbearing
5059 calculations for non-Truetype fonts.
5060 (x_draw_glyph_string): Sync with xterm.c.
5061 (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]:
5062 Remove redundant code.
5063 (w32_initialize) [USE_FONT_BACKEND]: Call w32font_initialize.
5064
5065 * w32term.h (w32_output_data) [USE_FONT_BACKEND]: Add fontp member.
5066 (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro from xterm.h.
5067
5068 * w32fns.c [USE_FONT_BACKEND]: Port font backend changes from xfns.c.
5069 (x_to_w32_charset, w32_to_x_charset): Expose externally.
5070
5071 * w32font.c: New file for w32 font backend.
5072
5073 2008-02-01 Kenichi Handa <handa@m17n.org>
5074
5075 * term.c: Don't include "buffer.h" twice.
5076
5077 2008-02-01 Kenichi Handa <handa@m17n.org>
5078
5079 * character.c (Funibyte_string): New function.
5080 (syms_of_character): Defsubr it.
5081
5082 2008-02-01 Jason Rumney <jasonr@gnu.org>
5083
5084 * w32term.c [USE_FONT_BACKEND]:
5085 (x_get_font_repertory, note_mouse_movement, x_set_mouse_face_gc)
5086 (x_set_glyph_string_clipping, x_set_glyph_string_clipping_exactly)
5087 (x_draw_glyph_string, x_draw_glyph_string_foreground)
5088 (x_draw_composite_glyph_string_foreground, x_new_fontset2)
5089 (x_free_frame_resources): Sync with xterm.c.
5090
5091 2008-02-01 Andreas Schwab <schwab@suse.de>
5092
5093 * lread.c (read1): Use CHAR_TABLE_STANDARD_SLOTS to validate
5094 char-table size.
5095
5096 2008-02-01 Kenichi Handa <handa@m17n.org>
5097
5098 * font.c (check_otf_features): Define it regardless of HAVE_LIBOTF.
5099
5100 2008-02-01 Kenichi Handa <handa@m17n.org>
5101
5102 * ftfont.c (ftfont_driver): Delete font_otf_gsub and
5103 font_otf_gpos, add font_drive_otf.
5104
5105 * fontset.c (fontset_find_font): Pay attention to font size
5106 specified for a font.
5107 (reorder_font_vector): Check contents of font_def.
5108
5109 * font.c (struct otf_list): Delete it.
5110 (otf_list): Make it a lisp variable.
5111 (otf_open): Use lispy otf_list.
5112 (generate_otf_features): Rename from parse_gsub_gpos_spec.
5113 (check_otf_features): New function.
5114 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
5115 New functions.
5116 (font_drive_otf): New function merging font_otf_gsub and
5117 font_otf_gpos.
5118 (font_open_for_lface): New arg spec. Change argument order.
5119 (font_load_for_face): Adjust for the change of font_open_for_lface.
5120 (Ffont_drive_otf): New function merging Ffont_otf_gsub and
5121 Ffont_otf_gpos.
5122 (syms_of_font): Staticpro otf_list. Delete defsubr of
5123 Sfont_otf_gsub and Sfont_otf_gpos. Defsubr Sfont_drive_otf.
5124
5125 * xfaces.c (set_font_frame_param): Adjust for the change of
5126 font_open_for_lface.
5127
5128 * font.h (font_open_for_lface): Adjust prototype.
5129 (struct font_driver): Delete members otf_gsub and otf_gpos, add
5130 member otf_drive.
5131 (font_otf_gsub, font_otf_gpos): Delete externs.
5132 (font_drive_otf): Extern it.
5133
5134 2008-02-01 Kenichi Handa <handa@m17n.org>
5135
5136 * font.c (font_at): If the window W is not on a window system,
5137 return Qnil.
5138
5139 * coding.c (produce_chars, encode_coding): Don't call
5140 insert_from_gap if no characters to produce.
5141
5142 2008-02-01 Kenichi Handa <handa@m17n.org>
5143
5144 * fontset.c (free_realized_fontsets): Avoid unnecessary call of
5145 Fclear_face_cache.
5146
5147 * xfaces.c (face_for_font): Check also face->font==font->font.font.
5148
5149 2008-02-01 Miles Bader <miles@gnu.org>
5150
5151 * emacs.c (main): Change default value of `enable_font_backend' to 1.
5152 Parse "--disable-font-backend" option.
5153 (standard_args): Add "--disable-font-backend" option.
5154
5155 2008-02-01 Kenichi Handa <handa@m17n.org>
5156
5157 * fontset.c (fontset_find_font): New function.
5158 (fontset_font): Use fontset_find_font.
5159 (make_fontset_for_ascii_face): Don't set face ID in rfont_def.
5160 Register the specified font for all Latin characters.
5161 (new_fontset_from_font): Register the specified font for all Latin
5162 characters.
5163 (dump_fontset): For a realized fontset, include the base fontset
5164 name in the returned vector.
5165
5166 2008-02-01 Kenichi Handa <handa@m17n.org>
5167
5168 * character.h (CHAR_STRING): Cast C to unsigned on calling
5169 char_string.
5170
5171 * character.c (char_string): Type of arg C changed to unsigned.
5172 Signal an error if C is an invalid character code.
5173
5174 * editfns.c (general_insert_function, Fchar_to_string):
5175 Use CHARACTERP, not INTEGERP.
5176
5177 2008-02-01 Kenichi Handa <handa@m17n.org>
5178
5179 * character.h (MIN_MULTIBYTE_LEADING_CODE)
5180 (MAX_MULTIBYTE_LEADING_CODE): New macros.
5181
5182 * regex.c (analyse_first): Fix for multibyte characters in "case
5183 charset:" and "case categoryspec:".
5184
5185 2008-02-01 Andreas Schwab <schwab@suse.de>
5186
5187 * Makefile.in (LIBES): Move standard libraries to the end.
5188
5189 2008-02-01 Kenichi Handa <handa@m17n.org>
5190
5191 * alloc.c (Fgarbage_collect): If nextb->text->inhibit_shrinking is
5192 nonzero, don't shrink the buffer nextb.
5193
5194 * buffer.h (struct buffer_text): New member inhibit_shrinking.
5195
5196 * coding.c (coding_alloc_by_making_gap): New arg offset.
5197 (alloc_destination): Call coding_alloc_by_making_gap with the arg
5198 offset.
5199 (decode_coding_iso_2022): Update coding->safe_charsets.
5200 (decode_coding_gap): Temporarily set
5201 current_buffer->text->inhibit_shrinking to 1.
5202
5203 2008-02-01 Kenichi Handa <handa@m17n.org>
5204
5205 * xterm.c (x_draw_composite_glyph_string_foreground): Fix
5206 indexing into elements of s->cmp and s->char2b.
5207
5208 2008-02-01 Juanma Barranquero <lekktu@gmail.com>
5209
5210 * regex.c (RE_STRING_CHAR_AND_LENGTH) [! emacs]: Add missing arg `len'.
5211
5212 2008-02-01 Kenichi Handa <handa@m17n.org>
5213
5214 * regex.c (GET_CHAR_BEFORE_2, GET_CHAR_AFTER): Check the variable
5215 target_multibyte instead of multibyte.
5216 (re_match_2_internal): Call bcmp_translate with target_multibyte.
5217 (bcmp_translate): Change the argument name from multibyte to
5218 target_multibyte.
5219
5220 2008-02-01 Kenichi Handa <handa@m17n.org>
5221
5222 These changes are to compile a regexp into a pattern that can be
5223 used both for multibyte and unibyte targets.
5224
5225 * Makefile.in (search.o): Depend on charset.h.
5226
5227 * character.c (multibyte_char_to_unibyte_safe): New function.
5228
5229 * search.c: Include "charset.h".
5230 (compile_pattern_1): Delete argument multibyte. Don't set
5231 cp->buf.target_multibyte here. Set cp->buf.charset_unibyte.
5232 (compile_pattern): Don't compare cp->buf.target_multibyte.
5233 Compare cp->buf.charset_unibyte.
5234 (compile_pattern): Set cp->buf.target_multibyte.
5235
5236 * lisp.h (multibyte_char_to_unibyte_safe): Extern it.
5237
5238 * regex.h (struct re_pattern_buffer): New member charset_unibyte.
5239
5240 * regex.c (RE_STRING_CHAR, RE_STRING_CHAR_AND_LENGTH): New arg
5241 multibyte. Change callers.
5242 (RE_CHAR_TO_MULTIBYTE, RE_CHAR_TO_UNIBYTE): New macros.
5243 (MAKE_CHAR_MULTIBYTE, MAKE_CHAR_UNIBYTE): Delete. Change callers
5244 to use RE_CHAR_TO_MULTIBYTE and RE_CHAR_TO_UNIBYTE, respectively.
5245 (SETUP_ASCII_RANGE, SETUP_UNIBYTE_RANGE): New macros.
5246 (SETUP_MULTIBYTE_RANGE): Generate a more compact range_table.
5247 (regex_compile): Make the compiled pattern usable both for
5248 multibyte and unibyte targets.
5249 (analyse_first): Make the fastmap usable both for multibyte and
5250 unibyte targets.
5251 (TRANSLATE_VIA_MULTIBYTE): Delete.
5252 (re_match_2_internal): Pay attention to the case that the
5253 multibyteness of bufp and target may be different.
5254
5255 2008-02-01 Kenichi Handa <handa@m17n.org>
5256
5257 * xdisp.c (x_produce_glyphs): When a font is not found, make the
5258 empty box occupy at least one column width.
5259
5260 2008-02-01 Miles Bader <miles@gnu.org>
5261
5262 * Makefile.in: Remove redundant HAVE_XFT clause.
5263
5264 2008-02-01 Kenichi Handa <handa@m17n.org>
5265
5266 * xrdb.c (x_load_resources): Setup the default fontSet X reource.
5267
5268 2008-02-01 Kenichi Handa <handa@m17n.org>
5269
5270 * fontset.c (Finternal_char_font): Fix for the case of POSITION
5271 being nil.
5272
5273 2008-02-01 Kenichi Handa <handa@m17n.org>
5274
5275 * xftfont.c (xftfont_open): Call FcConfigSubstitute.
5276
5277 2008-02-01 Kenichi Handa <handa@m17n.org>
5278
5279 * xftfont.c (xftfont_open): Don't enable antialias explicitly.
5280
5281 2008-02-01 Kenichi Handa <handa@m17n.org>
5282
5283 * search.c (simple_search): Fix previous change.
5284
5285 2008-02-01 Kenichi Handa <handa@m17n.org>
5286
5287 * xftfont.c (ftfont_font_format): Extern declaration.
5288
5289 * frame.c (x_set_font): Fix the second arg to fs_query_fontset.
5290
5291 * xfont.c (xfont_driver): Initialize ftfont_driver.type by 0.
5292 (xfont_list): Don't directly use Lisp_Object as an operand of &&.
5293
5294 * ftfont.c (ftfont_driver): Initialize ftfont_driver.type by 0.
5295 (ftfont_font_format): Fix previous change.
5296
5297 * font.h (Ffont_xlfd_name): EXFUN it.
5298
5299 * font.c (font_parse_xlfd): Fix the array size of `f'.
5300 (register_font_driver): Use EQ to compare driver->type.
5301
5302 * xfns.c (xic_create_xfontset2) [USE_FONT_BACKEND]: New function.
5303 (create_frame_xic) [USE_FONT_BACKEND]: Call xic_create_xfontset2.
5304 (xic_set_xfontset) [USE_FONT_BACKEND]: Likewise.
5305
5306 2008-02-01 Kenichi Handa <handa@m17n.org>
5307
5308 * ftfont.c (ftfont_pattern_entity, ftfont_list_generic_family)
5309 (ftfont_list, ftfont_font_format): Check if FC_FONTFORMAT is defined.
5310
5311 2008-02-01 Kenichi Handa <handa@m17n.org>
5312
5313 * xfont.c (xfont_open): Set font->format.
5314
5315 * xftfont.c (xftfont_open): Set font->format.
5316
5317 * ftfont.c (ftfont_pattern_entity): Add fontformat in a pattern.
5318 (ftfont_list): Include FC_FONTFORMAT in FcObject.
5319 (ftfont_open): Set font->format.
5320 (ftfont_font_format): New function.
5321
5322 * font.h (struct font): New memeber format.
5323
5324 * font.c (Qopentype): New variable.
5325 (syms_of_font): Defsym it.
5326 (Fquery_font): Change the format of the last element of the return
5327 value.
5328
5329 2008-02-01 Kenichi Handa <handa@m17n.org>
5330
5331 * xfns.c (xic_create_xfontset): Try the default fontset name as a
5332 last resort.
5333
5334 2008-02-01 Kenichi Handa <handa@m17n.org>
5335
5336 * coding.c (detect_coding_charset): Fix detection of multi-byte
5337 charset.
5338
5339 2008-02-01 Bob Halley <halley@play-bow.org> (tiny change)
5340
5341 * ccl.c (ccl_driver): If DST is NULL, set ccl->produced to 0.
5342
5343 2008-02-01 Kenichi Handa <handa@m17n.org>
5344
5345 * xdisp.c (get_next_display_element): Set it->face_id for the
5346 first component of a composition.
5347 (x_produce_glyphs): Check if the font is changed or not for composition.
5348
5349 2008-02-01 Kenichi Handa <handa@m17n.org>
5350
5351 * fontset.c (Qlatin): New variable.
5352 (syms_of_fontset): Define it as a lisp symbol.
5353 (Fset_fontset_font): If TARGET is `latin', use FONT_SPEC for ASCII.
5354
5355 2008-02-01 Kenichi Handa <handa@m17n.org>
5356
5357 * font.c (font_unparse_fcname): Pay attention to the case that
5358 some of font property is a null string.
5359
5360 2008-02-01 Kenichi Handa <handa@m17n.org>
5361
5362 * term.c: Include "composite.h".
5363 (encode_terminal_code): Output all components of composition.
5364 Check the size of encode_terminal_src.
5365 (produce_glyphs): For composition, call produce_composite_glyph.
5366 (append_composite_glyph, produce_composite_glyph): New functions.
5367
5368 * xdisp.c (x_produce_glyphs): In handling composition, if a font
5369 is not found, get font_info from the current ascii face.
5370
5371 2008-02-01 Kenichi Handa <handa@m17n.org>
5372
5373 * fileio.c (Finsert_file_contents): On replacing, temporarily bind
5374 buffer-file-name to Qnil before calling insert_from_buffer.
5375
5376 * font.c (font_unparse_fcname): Pay attention to the case that
5377 foundry is a null string.
5378
5379 2008-02-01 Kenichi Handa <handa@m17n.org>
5380
5381 * ftfont.c (ftfont_list): Allow registry "unicode-sip".
5382
5383 * font.c (Qunicode_sip): New variable.
5384 (syms_of_font): Declare it as a Lisp symbol.
5385
5386 * font.h (Qunicode_sip): Extern it.
5387
5388 2008-02-01 Kenichi Handa <handa@m17n.org>
5389
5390 * composite.c (get_composition_id): Pay attention to TAB component.
5391
5392 * xterm.c (x_draw_composite_glyph_string_foreground): Don't draw
5393 TAB. Adjust for the change of s->char2b which always points to
5394 the first elememnt of allocated memory.
5395
5396 * xftfont.c (xftfont_text_extents): Fix calculation of descent value.
5397
5398 * xdisp.c (handle_composition_prop): Set it->c to the first
5399 non-TAB component.
5400 (fill_composite_glyph_string): Change argument.
5401 (BUILD_COMPOSITE_GLYPH_STRING): Adjust for the above change.
5402 (x_produce_glyphs): Fix handling of left/right padding.
5403
5404 2008-02-01 Kenichi Handa <handa@m17n.org>
5405
5406 * coding.c (detect_coding_system): Fix for handling off
5407 inhibit_iso_escape_detection. Fix for the case that no coding
5408 system is defined for a specific coding category.
5409
5410 2008-02-01 Kenichi Handa <handa@m17n.org>
5411
5412 * font.c (font_matching_entity): Delete unused local var.
5413
5414 * xftfont.c (xftfont_open): Call XftDefaultSubstitute before
5415 opening a font.
5416
5417 * fileio.c (Finsert_file_contents): On recovering a file, assume
5418 Unix-like eol.
5419 (choose_write_coding_system): On auto-saving a file, force
5420 Unix-like eol.
5421
5422 * coding.c (setup_coding_system): Fix setting of
5423 coding->common_flags based on eol_type.
5424 (coding_inherit_eol_type): If PARENT is not nil, be sure to
5425 inherit from it.
5426
5427 2008-02-01 Kenichi Handa <handa@m17n.org>
5428
5429 * alloc.c (NSTATICS): Increas to 0x600.
5430
5431 2008-02-01 Kenichi Handa <handa@m17n.org>
5432
5433 * ftfont.c (ftfont_driver): Set ftfont_driver.match to ftfont_match.
5434 (ftfont_list): Don't check :name property.
5435 (ftfont_match): New function.
5436 (ftfont_pattern_entity): If the pattern doesn't contain
5437 FC_SPACING, don't assuce FC_MONO.
5438
5439 * font.h (struct font_driver): New member `match'.
5440 (font_update_drivers): Adjust prototype.
5441
5442 * font.c (font_parse_fcname, font_parse_name): Don't change :name
5443 property of FONT.
5444 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring): Define
5445 them unconditionally.
5446 (font_matching_entity): New function.
5447 (font_open_by_name): Try font_matching_entity if exact match is
5448 not found.
5449 (font_update_drivers): Delete the arg FONT. Return a list of
5450 actually used backends. Don't free faces, font caches here.
5451 Don't store data in frame parameters. Don't call x_set_font.
5452 (Ffont_spec): Store :name property as is.
5453 (Ffont_get): Check HAVE_LIBOTF before calling font_otf_capability.
5454 (Ffont_otf_gsub): Call font->driver->otf_gsub instead of font_otf_gsub.
5455 (Ffont_otf_gpos): Call font->driver->otf_gpos instead of font_otf_gpos.
5456 (Ffont_otf_alternates): Check if the driver has otf_gsub function.
5457 Call font->driver->otf_gsub instead of font_otf_gsub.
5458
5459 * frame.c (x_set_font_backend): Do more works that were done in
5460 font_update_drivers before.
5461
5462 * xfont.c (xfont_match): New function.
5463 (xfont_driver): Set xfont_driver.match to xfont_match.
5464 (xfont_draw): Set font in GC if necessary.
5465
5466 * ftxfont.c (ftxfont_match): New function.
5467 (syms_of_ftxfont): Set ftxfont_driver.match to ftxfont_match.
5468
5469 * xftfont.c (xftfont_match): New function.
5470 (syms_of_xftfont): Set xftfont_driver.match to xftfont_match.
5471
5472 2008-02-01 Kenichi Handa <handa@m17n.org>
5473
5474 * font.h (struct font): New member scalable.
5475 (struct font_driver): New arg ALTERANTE_SUBST to otf_gsub.
5476 (font_otf_gsub): Adjust prototype.
5477
5478 * font.c (font_otf_capability): Fix handling of the default langsys.
5479 (parse_gsub_gpos_spec): Change type to void. New arg nbytes.
5480 Check the contents of SPEC.
5481 (LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE): New macros.
5482 (check_gstring): New function.
5483 (REPLACEMENT_CHARACTER): New macro.
5484 (font_otf_gsub): New arg alternate_subst. Be sure to set all
5485 glyph codes of GSTRING.
5486 (font_otf_gpos): Be sure to set all glyph codes of GSTRING.
5487 (font_prepare_composition): Set cmp->glyph_len.
5488 (font_open_entity): Set font->scalable.
5489 (Ffont_get): Handle :otf property.
5490 (Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates): New
5491 functions.
5492 (Fquery_font): Use font->font.full_name.
5493 (syms_of_font): Defsubr Sfont_otf_gsub, Sfont_otf_gpos, and
5494 Sfont_otf_alternates.
5495
5496 * ftfont.c (ftfont_open): Set font->font.full_name and
5497 font->font.name properly. Fix calculation of font->font.height
5498 and font->min_width.
5499
5500 * ftxfont.c (ftxfont_create_gcs): New function.
5501 (ftxfont_draw_bitmap): Fix arg to ftfont_driver.get_bitmap.
5502 (ftxfont_draw_backgrond): Fix filling region.
5503 (ftxfont_default_fid): New function.
5504 (ftxfont_open): Set xfotn->fid to the return value of
5505 ftxfont_default_fid.
5506 (ftxfont_prepare_face): Use ftxfont_create_gcs to create GCs.
5507 (ftxfont_done_face): Free only GCs that are created by
5508 ftxfont_create_gcs.
5509 (ftxfont_draw): If face->gc != s->gc, create proper GCs.
5510
5511 * xterm.c (x_set_glyph_string_clipping_exactly) [USE_FONT_BACKEND]:
5512 Clip to src->width, etc (not src->clip_XXX).
5513
5514 * xfns.c (x_create_tip_frame) [USE_FONT_BACKEND]: Handle
5515 FontBackend frame parameter.
5516
5517 2008-02-01 Kenichi Handa <handa@m17n.org>
5518
5519 * font.h (struct font_driver_list): New member `on'.
5520 (Fclear_font_cache): EXFUN it.
5521 (font_update_drivers): Extern it.
5522
5523 * font.c (font_unparse_fcname): Fix typo (swidth->width).
5524 (font_list_entities): Check driver_list->on.
5525 (register_font_driver): Initalize `on' member to 0.
5526 (font_update_drivers): New function.
5527 (Fclear_font_cache): Check driver_list->on.
5528
5529 * frame.h (Qfont_backend): Extern it.
5530 (x_set_font_backend): Extern it.
5531
5532 * frame.c (Qfont_backend): New variable.
5533 (frame_parms): New element for font-backend.
5534 (x_set_font_backend): New function.
5535
5536 * xfns.c (Fx_create_frame) [USE_FONT_BACKEND]: Handle
5537 FontBackend frame parameter.
5538 (x_frame_parm_handlers) [USE_FONT_BACKEND]: New element
5539 x_set_font_backend.
5540
5541 * xfont.c (xfont_list): Don't try listing by :name property if the
5542 name is not for XLFD.
5543
5544 2008-02-01 Kenichi Handa <handa@m17n.org>
5545
5546 * font.h (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
5547 (LGLYPH_SET_TO): New macros.
5548 (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WADJUST): Check if adjustment
5549 element of G is vector or not.
5550 (font_at): Extern it.
5551
5552 * font.c: Include window.h.
5553 (font_lispy_object): New function.
5554 (font_prepare_composition): Check LGLYPH_FORM (g) to detect the
5555 end of valid glyph.
5556 (font_close_object): Fix getting (struct font *).
5557 (font_at): New function.
5558 (Ffont_get): If FONT is a font-object, get entity from it.
5559 (Ffont_make_gstring): Initialize elements of glyphs with nil.
5560 (Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX. Fix
5561 range check.
5562 (Ffont_at): New function.
5563 (syms_of_font): Defsubr Sfont_at.
5564
5565 * xdisp.c (it_props): Move the entry for Qauto_composed to just
5566 before the entry for Qcomposition.
5567 (handle_auto_composed_prop): Call auto-composition-function with 4 args.
5568 (handle_composition_prop) [USE_FONT_BACKEND]: Set it->face_id from
5569 the font in gstring.
5570 (fill_composite_glyph_string) [USE_FONT_BACKEND]: Check
5571 LGLYPH_FORM (g) to detect the end of valid glyph.
5572 (x_produce_glyphs) [USE_FONT_BACKEND]: Don't update it->face_id if
5573 we are composing with gstring.
5574
5575 * xterm.c (x_draw_composite_glyph_string_foreground) [USE_FONT_BACKEND]:
5576 Check if adjustment is vector or not.
5577
5578 * Makefile.in (font.o): Make it depends on window.h.
5579
5580 2008-02-01 Kenichi Handa <handa@m17n.org>
5581
5582 * xterm.c (x_draw_composite_glyph_string_foreground): Check if
5583 adjustment is vector or not.
5584
5585 2008-02-01 Miles Bader <miles@gnu.org>
5586
5587 * character.h (CHECK_CHARACTER): Redefine in terms of CHECK_TYPE.
5588
5589 2008-02-01 Kenichi Handa <handa@m17n.org>
5590
5591 * font.h (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST)
5592 (LGLYPH_SET_WIDTH): Adjusted for the change of LGLYPH format.
5593 (LGLYPH_ADJUSTMENT, LGLYPH_SET_ADJUSTMENT): New macros.
5594
5595 * font.c (font_merge_old_spec): Treat '*' in foundry as a wild card.
5596 (DEVICE_DELTA): Fix typo.
5597 (font_otf_gpos, font_prepare_compositio): Adjust for the change of
5598 LGLYPH format.
5599
5600 * xterm.c (x_draw_composite_glyph_string_foreground): Adjust for
5601 the change of LGLYPH format.
5602
5603 2008-02-01 Kenichi Handa <handa@m17n.org>
5604
5605 * ftfont.c (ftfont_list): Fix typo.
5606 (ftfont_build_basic_charsets): Don't include letters with diacritics.
5607
5608 2008-02-01 Jan Djärv <jan.h.d@swipnet.se>
5609
5610 * xfaces.c (realize_non_ascii_face): Set face->extra to NULL.
5611
5612 * xftfont.c (xftfont_done_face): Call XftDrawDestroy only if
5613 xftface_info is non-NULL.
5614
5615 2008-02-01 Jan Djärv <jan.h.d@swipnet.se>
5616
5617 * ftfont.c (ftfont_list): Move misplaced #endif.
5618
5619 2008-02-01 Kenichi Handa <handa@m17n.org>
5620
5621 * ftfont.c (ftfont_list): Pay attention to the case that
5622 FC_CAPABILITY is not defined.
5623
5624 2008-02-01 Kenichi Handa <handa@m17n.org>
5625
5626 * xftfont.c (xftfont_open): Set charset related members to -1.
5627
5628 * ftfont.c (ftfont_list): Handle QCotf property. Fix handling of
5629 QCname.
5630 (ftfont_open): Set charset related members to -1.
5631
5632 * fontset.c (Votf_script_alist): New variable.
5633 (syms_of_fontset): Initialize it.
5634 (fontset_font): Delete unused variable.
5635
5636 * fontset.h (Votf_script_alist): Extern it.
5637
5638 * font.c (font_find_for_lface): Optimize code.
5639
5640 * font.h (font_close_object, font_merge_old_spec): Extern them.
5641
5642 2008-02-01 Kenichi Handa <handa@m17n.org>
5643
5644 * font.c (QCscalable, Qc, Qm, Qp, Qd): New variables.
5645 (syms_of_font): Initialize them.
5646 (font_pixel_size): Allow float value in dpi.
5647 (font_prop_validate_type): Delete.
5648 (font_prop_validate_symbol, font_prop_validate_style): Change argument.
5649 Change caller.
5650 (font_prop_validate_non_neg): Rename from font_prop_validate_size.
5651 (font_prop_validate_extra): Delete.
5652 (font_prop_validate_spacing): New function.
5653 (font_property_table): Add elements for all known properties.
5654 (get_font_prop_index): Rename from check_font_prop_name. New
5655 argument FROM. Change caller.
5656 (font_prop_validate): Validate all known properties.
5657 (font_put_extra): Delete argument force. Change caller.
5658 (font_expand_wildcards): Make it static. Fix the way of shrinking
5659 the possible range.
5660 (font_parse_xlfd): Delete argument merge. Fix handling of RESX,
5661 RESY, SPACING, and AVGWIDTH. Don't validate property values here.
5662 Change caller.
5663 (font_unparse_xlfd): Handle dpi, spacing, and scalable properties.
5664 (font_parse_fcname): Delete argument merge. Fix parsing of point
5665 size. Don't validate properties values here. Change caller.
5666 (font_unparse_fcname): Handle dpi, spacing, and scalable properties.
5667 (font_open_by_name): Delete unused variable.
5668 (Ffont_spec): Likewise. Validate property values.
5669 (Ffont_match_p): New function.
5670
5671 * font.h (QCscalable): Extern it.
5672 (font_parse_xlfd, font_parse_fcname): Adjust prototype.
5673
5674 * ftfont.c (ftfont_list): Handle properties dpi, spacing, and scalable.
5675
5676 * xfont.c (xfont_query_font): Adjust for the change of font_parse_xlfd.
5677 (xfont_list_pattern): New function.
5678 (xfont_list): Use xfont_list_pattern.
5679
5680 2008-02-01 Kenichi Handa <handa@m17n.org>
5681
5682 * font.h (Flist_fonts): EXFUN it.
5683
5684 2008-02-01 Jason Rumney <jasonr@gnu.org>
5685
5686 * w32term.c (w32_initialize): Add back smoothing_type and
5687 smoothing_enabled definitions.
5688
5689 2008-02-01 Kenichi Handa <handa@m17n.org>
5690
5691 * xterm.c (x_draw_glyph_string) [USE_FONT_BACKEND]: Check
5692 s->face->font on determining underline position.
5693
5694 2008-02-01 Kenichi Handa <handa@m17n.org>
5695
5696 * font.c (font_parse_xlfd): Fix generating of CHARSET_REGISTRY field.
5697 (font_has_char): Accept font-object too.
5698 (font_find_for_lface): Try at first with a size specified in face.
5699
5700 2008-02-01 Kenichi Handa <handa@m17n.org>
5701
5702 * frame.c (x_set_font) [USE_FONT_BACKEND]: Fix argument to
5703 font_open_by_name.
5704
5705 2008-02-01 Kenichi Handa <handa@m17n.org>
5706
5707 * font.h (QCspacing, QCdpi): Extern them.
5708 (enum font_spacing): New enum.
5709 (FONT_PIXEL_SIZE_QUANTUM): New macro.
5710
5711 * font.c (POINT_TO_PIXEL): Don't divice POINT by 10.
5712 (QCspacing, QCdpi): New variables.
5713 (syms_of_font): Initialize them.
5714 (font_pixel_size): New function.
5715 (font_put_extra): New function.
5716 (font_parse_xlfd): Fix handling of font size. Add QCdpi property
5717 in FONT_EXTRA.
5718 (font_parse_fcname): Handle enumenrated values (e.g. bold).
5719 Fix handling font size. Add QCname property that contains only
5720 unknown properties.
5721 (font_score): Change argument. Change caller. Pay attention to
5722 FONT_PIXEL_SIZE_QUANTUM.
5723 (font_sort_entites, font_list_entities, font_find_for_lface)
5724 (font_open_for_lface, font_open_by_name): Fix handling of font size.
5725 (Ffont_spec): Add QCname property that contains only unknown properties.
5726
5727 * ftfont.c (ftfont_list): Use assq_no_quit, not Fassq. Don't
5728 include weight in listing pattern, instead check weight of each
5729 listed font. Don't include scalable in pattern. Pay attention to
5730 FONT_PIXEL_SIZE_QUANTUM.
5731
5732 2008-02-01 Kenichi Handa <handa@m17n.org>
5733
5734 * font.c (font_parse_fcname): Fix parsing of point-size.
5735 (font_unparse_fcname): Produce symbolic names for style properties.
5736 (font_list_entities): Handle float size correctly.
5737 (font_open_by_name): Prefer `normal' property values if the name
5738 doesn't specify them.
5739
5740 * fontset.c (Finternal_char_font): Use font_get_name, not
5741 Ffont_xlfd_name.
5742
5743 * ftfont.c (ftfont_pattern_entity): Use the numeric value 100 for
5744 FC_WEIGHT_REGULAR. Exclude FC_SIZE and FC_PIXEL_SIZE from listing
5745 pattern. Don't force scalable.
5746
5747 * xftfont.c (xftfont_open): For generating a name, start from
5748 96-byte buffer.
5749
5750 2008-02-01 Jan Djärv <jan.h.d@swipnet.se>
5751
5752 * frame.h (x_new_fontset2): Fix prototype.
5753
5754 2008-02-01 Kenichi Handa <handa@m17n.org>
5755
5756 * font.h (struct font_driver): Delete member parse_name.
5757 (font_match_p, font_get_spec, font_parse_fcname)
5758 (font_unparse_fcname): Extern them.
5759 (font_get_name): Adjust prototype.
5760
5761 * font.c (XLFD_SMALLNUM_MASK): Delete this macro.
5762 (XLFD_LARGENUM_MASK): Delete XLFD_ENCODING_MASK from it.
5763 (font_expand_wildcards): Fix handling ENCODING field. Avoid
5764 unnecessary checks for weight, slant, and swidth.
5765 (font_parse_fcname): New function.
5766 (font_unparse_fcname): New function.
5767 (font_parse_name): New function.
5768 (font_match_p): New function.
5769 (font_get_name): Change return value to Lisp string.
5770 (font_get_spec): New function.
5771 (Qunspecified, Qignore_defface): Don't extern them.
5772 (font_find_for_lface): Assume that LFACE is fully specified.
5773 (font_load_for_face): If lface[LFACE_FONT_INDEX] is an font
5774 object, use it for FACE.
5775 (font_open_by_name): Call Ffont_spec with QCname prop. Don't call
5776 driver->parse_name.
5777 (Ffont_spec): Call font_parse_name, not font_parse_xlfd.
5778
5779 * fontset.h (new_fontset_from_font) [USE_FONT_BACKEND]: Adjust
5780 prototype.
5781
5782 * fontset.c (new_fontset_from_font) [USE_FONT_BACKEND]: Delete
5783 argument F. Don't call Fnew_fontset. Instead, directly call
5784 make_fontset.
5785
5786 * frame.h (x_new_fontset2) [USE_FONT_BACKEND]: Adjust prototype.
5787
5788 * frame.c (x_set_font) [USE_FONT_BACKEND]: Adjust for the change
5789 of x_new_fontset2.
5790
5791 * ftfont.c (Qmonospace, Qsans_serif, Qserif, Qmono, Qsans)
5792 (Qsans__serif): New variables.
5793 (ftfont_generic_family_list): New variable.
5794 (syms_of_ftfont): Initialize the above variables.
5795 (ftfont_pattern_entity): Delete argument NAME.
5796 (ftfont_list_generic_family): New function.
5797 (ftfont_parse_name): Delete this function.
5798 (ftfont_list): Try generic family only when FcFontList found no font.
5799 (ftfont_list_family): Fix args to FcObjectSetBuild.
5800
5801 * xfaces.c (check_lface_attrs) [USE_FONT_BACKEND]: Accept font
5802 object in attrs[LFACE_FONT_INDEX].
5803 (set_lface_from_font_name): Cancel all changes for font-backend.
5804 (set_lface_from_font_and_fontset) [USE_FONT_BACKEND]: New
5805 function.
5806 (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]: Accept a
5807 font object in QCfont attribute.
5808 (set_font_frame_param) [USE_FONT_BACKEND]: Likewise.
5809 (realize_default_face) [USE_FONT_BACKEND]: Call
5810 set_lface_from_font_and_fontset.
5811
5812 * xfns.c (x_default_font_parameter) [USE_FONT_BACKEND]: Try also
5813 "fixed", and signal error here if no suitable font was found.
5814
5815 * xfont.c (xfont_parse_name): Delete this function.
5816
5817 * xftfont.c (xftfont_open): Change coding style of error
5818 handling. Generate fontconfig's fontname pattern.
5819
5820 * xterm.h (struct x_output) [USE_FONT_BACKEND]: New member fontp.
5821 (FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro.
5822
5823 * xterm.c (x_new_fontset2) [USE_FONT_BACKEND]: Change arguments.
5824 Both args FONTSET and FONT_OBJECT must be existing ones.
5825
5826 2008-02-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5827
5828 * macterm.c (mac_set_unicode_keystroke_event): Don't use MAKE_CHAR.
5829
5830 2008-02-01 Kenichi Handa <handa@m17n.org>
5831
5832 * xfont.c (xfont_open, xfont_encode_char): Fix typo.
5833
5834 * font.h (struct font): Fix typo.
5835
5836 * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to
5837 XLFD_XXX_INDEX.
5838 (enum xlfd_field_mask): New enum.
5839 (intern_font_field): Changed argument. Change caller. If digits
5840 are followed by non-digits, return a symbol.
5841 (font_expand_wildcards): New function.
5842 (font_parse_xlfd): Fix wildcard handling.
5843 (Ffont_spec): If :name is specified, reflect the info in the other
5844 properties.
5845
5846 * ftfont.c (ftfont_pattern_entity): Fix typo.
5847 (ftfont_list): Enforce FC_LANG in PATTERN to cancel the effect of
5848 locale.
5849
5850 2008-02-01 Kenichi Handa <handa@m17n.org>
5851
5852 * font.h (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Extern them.
5853
5854 * font.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Move from ftfont.c.
5855 (font_unparse_xlfd): Fix argument type declaration. Append "*" if
5856 registry doesn't specify encoding part.
5857 (font_find_for_lface): Pay attention to LFACE_FONT_INDEX.
5858 (font_open_by_name): At first try parsing the name.
5859 (syms_of_font): Declare Qiso8859_1, Qiso10646_1, and Qunicode_bmp
5860 as Lisp symbols.
5861
5862 * fontset.c (reorder_font_vector): Pay attention to the case that
5863 the 3rd element of font_def is nil.
5864 (fontset_font): For the default fontset, append one more fontset
5865 elements for a script-based font specification. Don't add script
5866 attribute on finding a font.
5867 (new_fontset_from_font): Unconditionally set FONTSET_ASCII to the
5868 font name.
5869 (fontset_ascii_font): If a font can't be opened, return nil.
5870
5871 * ftfont.c (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Move to font.c.
5872 (ftfont_pattern_entity): New function.
5873 (ftfont_get_cache): Assume that freetype_font_cache is already
5874 initialized.
5875 (ftfont_list): Handle the case that a file is specified in font
5876 name. Use ftfont_pattern_entity to generate entities.
5877 (ftfont_has_char): Check if the pattern contains FC_CHARSET.
5878 (syms_of_ftfont): Initialize freetype_font_cache.
5879
5880 * xftfont.c (xftfont_open): Make the font name fontconfig's
5881 style. Add BLOCK_INPUT and UNBLOCK_INPUT.
5882 (xftfont_close): Free font->font.name if not NULL.
5883
5884 * xfont.c (xfont_list): If script is specified for a font, return
5885 null_vector.
5886 (xfont_list_family): Declare argument type.
5887
5888 * xfaces.c (set_lface_from_font_name): If a font doesn't have a
5889 name, set LFACE_FONT (lface) to nil.
5890
5891 * xterm.c (x_new_fontset2): If an ASCII font couldn't be loaded,
5892 return Qnil.
5893
5894 2008-02-01 Kenichi Handa <handa@m17n.org>
5895
5896 * emacs.c (main): Check -enable-font-backend arg after the check of -nl.
5897 (standard_args): Add "-enable-font-backend".
5898
5899 2008-02-01 Kenichi Handa <handa@m17n.org>
5900
5901 * xftfont.c (xftfont_default_fid): Set fid_known to 1.
5902 (struct xftdraw_list, xftdraw_list): Delete them.
5903 (register_xftdraw, check_xftdraw): Delete them.
5904 (xftfont_prepare_face): Don't call register_xftdraw.
5905 (xftfont_done_face): Don't call check_xftdraw.
5906 (xftfont_draw): Get backroudn color only when with_background is
5907 nonzero.
5908
5909 * xfont.c (xfont_encode_char): Fix calculation of char2b.
5910
5911 2008-02-01 Kenichi Handa <handa@m17n.org>
5912
5913 These changes are for the new font handling codes.
5914
5915 * Makefile.in (ALL_CFLAGS): Add @FREETYPE_CFLAGS@,
5916 @FONTCONFIG_CFLAGS@, and @LIBOTF_CFLAGS@.
5917 (LIB_X11_LIB): If HAVE_XFT is defined, set to @XFT_LIBS@.
5918 (FONTSRC, FONTOBJ): New variables.
5919 (obj): Add $(FONTOBJ).
5920 (SOME_MACHINE_OBJECTS): Lib_X11_Lib.
5921 (LIBES): Add @FREETYPE_LIBS@, @FONTCONFIG_LIBS@, and
5922 @LIBOTF_LIBS@.
5923 (font.o, ftfont.o, xfont.o, xftfont.o, ftxfont.o): New targets.
5924 (fontset.o, xdisp.o, xfaces.o, xfns.o, xterm.o): Depend on $(FONTSRC).
5925
5926 * font.h, font.c, xfont.c, ftfont.c, xftfont.c, ftxfont.c: New files.
5927
5928 * character.h (Vscript_representative_chars): Extern it.
5929
5930 * character.c (Vscript_representative_chars): New variable.
5931 (syms_of_character): Declare it as a Lisp variable.
5932
5933 * composite.c (get_composition_id) [USE_FONT_BACKEND]: If
5934 enable_font_backend is nonzero, accept the composition method
5935 COMPOSITION_WITH_GLYPH_STRING.
5936
5937 * composite.h (enum composition_method) [USE_FONT_BACKEND]: New
5938 enumeration COMPOSITION_WITH_GLYPH_STRING.
5939
5940 * dispextern.h (struct glyph_string) [USE_FONT_BACKEND]: New
5941 members clip_x, clip_y, clip_width, and clip_height.
5942 (struct face) [USE_FONT_BACKEND]: New members font_info and extra.
5943
5944 * emacs.c (main) [USE_FONT_BACKEND]: Handle arg
5945 --enable-font-backend. Call syms_of_font.
5946
5947 * fns.c (assoc_no_quit): New function.
5948
5949 * fontset.h (FONT_INFO_FROM_FACE): New macro.
5950 (face_for_font, new_fontset_from_font)
5951 (fontset_ascii_font) [USE_FONT_BACKEND]: Extern them.
5952
5953 * fontset.c [USE_FONT_BACKEND]: Include "font.h".
5954 (fontset_font, fontset_ascii, face_for_char)
5955 (make_fontset_for_ascii_face, Ffont_info)
5956 (Finternal_char_font) [USE_FONT_BACKEND]: If enable_font_backend
5957 is nonzero, use font-backend mechanism.
5958 (find_font_encoding): Make it non-static.
5959 (new_fontset_from_font, fontset_ascii_font) [USE_FONT_BACKEND]:
5960 New functions.
5961
5962 * frame.h (struct frame): New members resx and resy.
5963 (struct frame) [USE_FONT_BACKEND]: New member font_driver_list.
5964 (x_new_fontset2) [USE_FONT_BACKEND]: Extern it.
5965
5966 * frame.c [USE_FONT_BACKEND]: Include "font.h".
5967 (make_frame, x_set_font) [USE_FONT_BACKEND]: Use font-backend mechanism.
5968
5969 * lisp.h (assoc_no_quit): Extern it.
5970
5971 * xdisp.c: If USE_FONT_BACKEND is defined, include "font.h".
5972 Through out the file, use FONT_INFO_FROM_FACE instead of
5973 FONT_INFO_FROM_ID, use get_per_char_metric instead of
5974 rif->per_char_metric.
5975 (handle_composition_prop) [USE_FONT_BACKEND]: If the composition
5976 method is COMPOSITION_WITH_GLYPH_STRING, just set it->c to ' '.
5977 (get_glyph_face_and_encoding, fill_composite_glyph_string)
5978 (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
5979 (x_produce_glyphs) [USE_FONT_BACKEND]: If enable_font_backend is
5980 nonzero, use font-backend mechanism.
5981 (get_per_char_metric): New function.
5982
5983 * xfaces.c [USE_FONT_BACKEND]: Include "font.h".
5984 (set_lface_from_font_name)
5985 (set_font_frame_param, free_realized_face)
5986 (prepare_face_for_display, clear_face_gcs)
5987 (Finternal_set_font_selection_order, realize_x_face)
5988 [USE_FONT_BACKEND]: If enable_font_backend is nonzero, use
5989 font-backend mechanism.
5990 (clear_face_cache) [USE_FONT_BACKEND]: Don't call clear_font_table.
5991 (load_face_font) [USE_FONT_BACKEND]: Abort.
5992 (face_symbolic_value, face_symbolic_weight, face_symbolic_slant)
5993 (face_symbolic_swidth, face_for_font) [USE_FONT_BACKEND]: New functions.
5994
5995 * xfns.c [USE_FONT_BACKEND]: Include "font.h".
5996 (x_default_font_parameter) [USE_FONT_BACKEND]: New function.
5997 (Fx_create_frame) [USE_FONT_BACKEND]: If enable_font_backend is
5998 nonzero, register all available font drivers. Call
5999 x_default_font_parameter for deciding a font.
6000 (x_create_tip_frame) [USE_FONT_BACKEND]: Likewise.
6001
6002 * xterm.c [USE_FONT_BACKEND]: Include "font.h".
6003 (x_set_mouse_face_gc, x_set_glyph_string_clipping)
6004 (x_set_glyph_string_clipping_exactly)
6005 (x_compute_glyph_string_overhangs)
6006 (x_draw_glyph_string_foreground)
6007 (x_draw_composite_glyph_string_foreground, x_draw_glyph_string)
6008 (x_free_frame_resources) [USE_FONT_BACKEND]: If
6009 enable_font_backend is nonzero, use font-backend mechanism.
6010 (x_new_fontset2) [USE_FONT_BACKEND]: New function.
6011
6012 2008-02-01 Kenichi Handa <handa@m17n.org>
6013
6014 * coding.c (coding_inherit_eol_type): If PARENT is nil, inherit from
6015 system_eol_type.
6016 (syms_of_coding): Initialize system_eol_type.
6017
6018 * process.c (Fset_process_coding_system): Inherit system's eol
6019 format if necessary.
6020
6021 2008-02-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6022
6023 * macgui.h (USE_ATSUI): Don't enable on emacs-unicode-2 branch.
6024
6025 2008-02-01 Kenichi Handa <handa@m17n.org>
6026
6027 * coding.c (decode_eol): Pay attention to buffer relocation in
6028 del_range_2.
6029 (decode_coding): Call decode_eol before restoring undo_list.
6030
6031 2008-02-01 Kenichi Handa <handa@m17n.org>
6032
6033 * charset.c (Fdefine_charset_internal): Fix setting of
6034 emacs_mule_bytes.
6035
6036 2008-02-01 Kenichi Handa <handa@m17n.org>
6037
6038 * keyboard.c (read_char): Check if C is a character or not before
6039 looking up Vkeyboard_translate_table.
6040
6041 2008-02-01 Kenichi Handa <handa@m17n.org>
6042
6043 * coding.c (DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Fix
6044 condition to terminate the loop.
6045
6046 2008-02-01 Kenichi Handa <handa@m17n.org>
6047
6048 * coding.c (produce_composition): Compare charbuf[i] instead of
6049 args[i] against 0.
6050 (Fterminal_coding_system): Use EQ to compare Lisp objects.
6051
6052 2008-02-01 Kenichi Handa <handa@m17n.org>
6053
6054 * coding.c (DECODE_COMPOSITION_START): If the source is short, set
6055 coding->result to CODING_RESULT_INSUFFICIENT_SRC.
6056 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of
6057 detect_coding.
6058 (emacs_mule_char): Handle old style (Emacs 20) component character
6059 of a composition.
6060 (DECODE_EMACS_MULE_COMPOSITION_RULE_20)
6061 (DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Fix parsing a
6062 composition rule.
6063 (decode_coding_emacs_mule): Handle invalid bytes correctly.
6064
6065 2008-02-01 Kenichi Handa <handa@m17n.org>
6066
6067 * coding.c (encode_coding_ccl): Allocate destination dynamically
6068 when necessary.
6069
6070 2008-02-01 Kenichi Handa <handa@m17n.org>
6071
6072 * ccl.c (Fccl_execute_on_string): Fix the condition of terminating
6073 the loop. When quitted, show a proper error message.
6074
6075 2008-02-01 Kenichi Handa <handa@m17n.org>
6076
6077 * xterm.c (x_set_glyph_string_clipping_exactly): Set
6078 src->clip_head and src->clip_tail temporarily instead of src->hl.
6079
6080 * ccl.c (CCL_WRITE_STRING): Handle a flag bit for multibyte
6081 character sequence.
6082 (Fccl_execute_on_string): Use ASET, not XSET.
6083
6084 2008-02-01 Kenichi Handa <handa@m17n.org>
6085
6086 * search.c (search_buffer): Fix handling of "\\" in a trivial regexp.
6087
6088 2008-02-01 Kenichi Handa <handa@m17n.org>
6089
6090 * coding.c (decode_coding): Fix the condition of terminating the
6091 decoding loop.
6092
6093 2008-02-01 Kenichi Handa <handa@m17n.org>
6094
6095 * data.c (Faset): On setting a character bigger than 255 in a
6096 unibyte string, signal an error instead of make the string multibyte.
6097
6098 2008-02-01 Kenichi Handa <handa@m17n.org>
6099
6100 * charset.c (map_charset_chars): Fix for ascii-compatible charset
6101 made by a mapping table.
6102
6103 2008-02-01 Kenichi Handa <handa@m17n.org>
6104
6105 * xdisp.c (fill_composite_glyph_string): Check s->face is NULL or
6106 not.
6107 (BUILD_COMPOSITE_GLYPH_STRING): If C is TAB, set s->face to NULL.
6108 (x_produce_glyphs): If CH is TAB, set cmp->offsets properly.
6109
6110 * xterm.c (x_draw_composite_glyph_string_foreground): Check
6111 s->face is NULL or not.
6112
6113 2008-02-01 Kenichi Handa <handa@m17n.org>
6114
6115 * xterm.c (x_set_glyph_string_clipping_exactly): New function.
6116 (x_draw_glyph_string): Fix drawing of right_overhang and
6117 left_overhang around/on cursor.
6118
6119 * xdisp.c (draw_glyphs): Fix inclusion of right_overwriting glyphs.
6120
6121 2008-02-01 Kenichi Handa <handa@m17n.org>
6122
6123 * xdisp.c (x_produce_glyphs): Handle composition with TAB.
6124
6125 2008-02-01 Kenichi Handa <handa@m17n.org>
6126
6127 * coding.c (Fdefine_coding_system_internal)
6128 (Fdefine_coding_system_alias): Avoid a duplicated element in
6129 Vcoding_system_alist.
6130
6131 2008-02-01 Kenichi Handa <handa@m17n.org>
6132
6133 * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF.
6134
6135 * coding.c (Qcoding_system_define_form): New variable.
6136 (syms_of_coding): Intern and staticpro it.
6137 (Fcoding_system_p): Check Qcoding_system_define_form.
6138 (Fcheck_coding_system): Try to autoload the definition of CODING-SYSTEM.
6139
6140 * coding.h (CODING_SYSTEM_P): If ID is not available, call
6141 Fcoding_system_p.
6142 (CHECK_CODING_SYSTEM): If ID is not available, call
6143 Fcheck_coding_system.
6144 (CHECK_CODING_SYSTEM_GET_SPEC, CHECK_CODING_SYSTEM_GET_ID):
6145 Try also Fcheck_coding_system.
6146
6147 2008-02-01 Kenichi Handa <handa@m17n.org>
6148
6149 * coding.c (code_conversion_restore): GCPRO arg.
6150
6151 2008-02-01 Kenichi Handa <handa@m17n.org>
6152
6153 * character.c (lisp_string_width): Check multibyteness of STRING.
6154
6155 2008-02-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6156
6157 * macterm.c (mac_encode_char): Call ccl_driver with the last arg
6158 Qnil. Use JIS_TO_SJIS instead of ENCODE_SJIS.
6159 (decode_mac_font_name): Use decode_coding_c_string instead of
6160 decode_coding.
6161 (x_load_font): Initialize fontp->fontset to -1. Set
6162 fontp->encoding_type.
6163
6164 2008-02-01 Kenichi Handa <handa@m17n.org>
6165
6166 * search.c (search_buffer): Give up BM search on case-fold-search
6167 if one of a target character has a case-equivalence of different
6168 byte length even if that target charcter is an ASCII.
6169 (simple_search): Fix calculation of byte length of matched text.
6170 (boyer_moore): Fix handling of case-equivalent multibyte characters.
6171
6172 2008-02-01 Kenichi Handa <handa@m17n.org>
6173
6174 * coding.c (decode_coding): Fix handling of invalid bytes.
6175
6176 2008-02-01 Kenichi Handa <handa@m17n.org>
6177
6178 * xterm.c (handle_one_xevent): Handle keysyms directly mapped to
6179 Unicode characters.
6180
6181 2008-02-01 Kenichi Handa <handa@m17n.org>
6182
6183 * coding.c (encode_coding_object): If a pre-write-conversion
6184 function makes a new buffer, kill it.
6185
6186 2008-02-01 Kenichi Handa <handa@m17n.org>
6187
6188 * coding.c (QCascii_compatible_p): New variable.
6189 (syms_of_coding): Initialize it.
6190 (ONE_MORE_BYTE, ONE_MORE_BYTE_NO_CHECK): Decrement `src' before
6191 calling string_char.
6192 (record_conversion_result): Add `default:' case.
6193 (coding_charset_list): Delete unused variable `coding_type'.
6194 (Fdefine_coding_system_internal): Add `ascii-compatible-p'
6195 property in the plist of the coding system.
6196 (Fcoding_system_put): Check QCascii_compatible_p.
6197
6198 2008-02-01 Miles Bader <miles@gnu.org>
6199
6200 * xfaces.c (Finternal_lisp_face_equal_p): Restore previously
6201 removed calculation of frame `f', as it's now used.
6202
6203 2008-02-01 Kenichi Handa <handa@m17n.org>
6204
6205 * Makefile.in (RUN_TEMACS): Include "-nl" if HAVE_SHM is defined.
6206 (emacs${EXEEXT}): Run $(RUN_TEMACS) unconditionally.
6207 (UNIDATA): New variable.
6208 (${lispsource}international/charprop.el): Depends on ${UNIDATA}.
6209 (bootstrap-emacs${EXEEXT}): Depends on charprop.el. Run
6210 $(RUN_TEMACS) unconditionally.
6211
6212 2008-02-01 Kenichi Handa <handa@m17n.org>
6213
6214 * Makefile.in (temacs${EXEEXT}): Build charprop.el if necessary.
6215 (admindir): New variable.
6216 ($(lispsource)international/charprop.el): New target.
6217
6218 2008-02-01 Miles Bader <miles@gnu.org>
6219
6220 * character.c (chars-in-region): Remove obsolete function.
6221 (syms_of_character): Remove its initialization.
6222
6223 2008-02-01 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
6224
6225 * w32select.c (validate_coding_system)
6226 (setup_windows_coding_system): New functions.
6227 (convert_to_handle_as_coded, Fw32_get_clipboard_data): Use
6228 setup_windows_coding_system.
6229 (setup_config, Fw32_get_clipboard_data): Use
6230 validate_coding_system.
6231 (Fx_selection_exists): Move call to setup_config to a place
6232 where signals are allowed.
6233
6234 * lisp.h (Fcoding_system_base, Fcoding_system_eol_type)
6235 (Fcheck_coding_system): Add declarations.
6236
6237 2008-02-01 Kenichi Handa <handa@m17n.org>
6238
6239 * charset.c (load_charset_map_from_vector): Fix for the first iteration.
6240
6241 2008-02-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6242
6243 * macfns.c (Fx_create_frame, x_create_tip_frame): Pass Lisp
6244 string as the second argument for x_new_fontset.
6245
6246 2008-02-01 Kenichi Handa <handa@m17n.org>
6247
6248 * coding.c (decode_coding_object): Use safe_call1 instead of call1.
6249 (encode_coding_object): Use safe_call instead of call2.
6250
6251 2008-02-01 Kenichi Handa <handa@m17n.org>
6252
6253 * fontset.c (Fset_fontset_font): Check family element of a given vector.
6254
6255 * Makefile.in (lisp): Include charprop.el.
6256
6257 2008-02-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6258
6259 * macfns.c (Fx_create_frame, x_create_tip_frame): Fix crash.
6260 Not sure if it's unnecessary.
6261
6262 2008-02-01 Steven Tamm <steventamm@mac.com>
6263
6264 * macfns.c (Fx_create_frame, x_create_tip_frame): ifdef'd out
6265 some possibly unnecessary fontset checking code that crashed
6266 when creating a new frame.
6267
6268 2008-02-01 Kenichi Handa <handa@m17n.org>
6269
6270 * xfaces.c (merge_faces): Fix argument to lookup_derived_face and
6271 lookup_face.
6272
6273 * xdisp.c (Fformat_mode_line): Fix argument to lookup_named_face.
6274
6275 * fringe.c (draw_fringe_bitmap_1): Fix argument to lookup_named_face.
6276
6277 2008-02-01 Kenichi Handa <handa@m17n.org>
6278
6279 * coding.c: Cancel the change done in HEAD on 2008-02-01.
6280 (coding_charset_list): New function.
6281
6282 * coding.h (coding_charset_list): Extern it.
6283
6284 2008-02-01 Kenichi Handa <handa@m17n.org>
6285
6286 * fontset.c (Fset_fontset_font): Call find_font_encoding with
6287 concatenation of family and registry.
6288
6289 2008-02-01 Kenichi Handa <handa@m17n.org>
6290
6291 * character.h (BYTE8_STRING): Fix typo.
6292
6293 * editfns.c (Ftranslate_region_internal): Don't convert unibyte
6294 string to multibyte (sync to HEAD).
6295
6296 * casefiddle.c (casify_region): Handle changes in byte-length
6297 using replace_range_2 (sync to HEAD).
6298
6299 2008-02-01 Andreas Schwab <schwab@suse.de>
6300
6301 * chartab.c (map_char_table): GCPRO table and arg.
6302
6303 2008-02-01 Kenichi Handa <handa@m17n.org>
6304
6305 * syntax.c (skip_syntaxes): Return lispy 0 (not nil) if point is
6306 already at limit.
6307
6308 2008-02-01 Kenichi Handa <handa@m17n.org>
6309
6310 * fontset.c (fs_load_font): Use fast_string_match_ignore_case
6311 instead of fast_c_string_match_ignore_case.
6312 (find_font_encoding): Change argument to Lisp_Object. Use
6313 fast_string_match_ignore_case instead of
6314 fast_c_string_match_ignore_case. Change caller.
6315
6316 2008-02-01 Kenichi Handa <handa@m17n.org>
6317
6318 * xdisp.c (get_next_display_element): In unibyte case, decide to
6319 display in octal form by checking a chacter by
6320 UNIBYTE_CHAR_HAS_MULTIBYTE_P.
6321
6322 * charset.c (Fset_unibyte_charset): Setup unibyte_has_multibyte_table.
6323
6324 * character.c (unibyte_has_multibyte_table): New variable.
6325
6326 * character.h (unibyte_has_multibyte_table): Extern it.
6327 (UNIBYTE_CHAR_HAS_MULTIBYTE_P): New macro.
6328
6329 2008-02-01 Kenichi Handa <handa@m17n.org>
6330
6331 * coding.c (encode_coding_iso_2022): Fix handling of charset
6332 annotation.
6333
6334 2008-02-01 Kenichi Handa <handa@m17n.org>
6335
6336 * coding.c (setup_coding_system): If coding_system is nil, use
6337 Qundecided.
6338 (Fterminal_coding_system): Return nil if terminal coding system is
6339 `undecided'.
6340 (syms_of_coding): Define coding-system `undecided' here. Setup
6341 terminal_coding as `undecided'.
6342
6343 2008-02-01 Kenichi Handa <handa@m17n.org>
6344
6345 * xdisp.c (message_dolog, set_message_1): Call
6346 unibyte_char_to_multibyte with arg type int.
6347
6348 * lread.c (read1): Fix reading of a char-table.
6349
6350 * print.c (print_object): Include sub char-table in cicularities
6351 detection.
6352
6353 2008-02-01 Kenichi Handa <handa@m17n.org>
6354
6355 * keymap.c (where_is_internal_2): Fix for the case that KEY is a
6356 cons. Append the found sequences in car of ARGS instead of prepending.
6357
6358 2008-02-01 Kenichi Handa <handa@m17n.org>
6359
6360 * fileio.c (report_file_error): Make a unibyte string from
6361 strerror (errorno).
6362 (Fsubstitute_in_file_name): Fix the arg to
6363 unibyte_char_to_multibyte. It is evaluated twice.
6364
6365 2008-02-01 Kenichi Handa <handa@m17n.org>
6366
6367 * charset.h (CHAR_CHARSET): Shortcut for ASCII case.
6368
6369 2008-02-01 Kenichi Handa <handa@m17n.org>
6370
6371 * coding.c (detect_coding_utf_16): Don't set detect_info->found if
6372 BOM is not found.
6373 (detect_coding, detect_coding_system): Optimization for ISO-2022
6374 when no 8-bit data is found.
6375
6376 2008-02-01 Jason Rumney <jasonr@gnu.org>
6377
6378 * w32fns.c (x_to_w32_font): Update to use new coding struct.
6379
6380 2008-02-01 Kenichi Handa <handa@m17n.org>
6381
6382 * charset.c (Fdeclare_equiv_charset, Fiso_charset): Fix handing of
6383 CHARS.
6384
6385 2008-02-01 Steven Tamm <steventamm@mac.com>
6386
6387 * macterm.c (mac_encode_char): Add charset argument and update
6388 to use encoding_type.
6389 (x_new_font, x_new_fontset): Merge in changes from xterm.c;
6390 switch to pure fontset.
6391 (decode_mac_font_name): Temporarily remove decoding.
6392 (x_font_name_to_mac_font_name): Temporarily remove encoding.
6393 (x_load_font): Temporarily remove encoding.
6394
6395 2008-02-01 Kenichi Handa <handa@m17n.org>
6396
6397 * xfaces.c (Fface_font): If frame is not on a window system,
6398 ignore CHARACTER arg. If HAVE_WINDOW_SYSTEM is not defined, don't
6399 refer to face->font.
6400 (split_font_name_into_vector, build_font_name_from_vector)
6401 (lookup_non_ascii_face, realize_non_ascii_face): Define them only
6402 whne HAVE_WINDOW_SYSTEM is defined.
6403
6404 2008-02-01 Kenichi Handa <handa@m17n.org>
6405
6406 * xdisp.c (BUILD_GLYPH_STRINGS): Check if s is NULL.
6407 (x_produce_glyphs): Fix setting of members of cmp in case
6408 cmp->glyph_len is zero.
6409
6410 * fontset.c (Fset_fontset_font): Fix docstring.
6411 (Ffontset_info): Make it backward compatible. New arg ALL.
6412
6413 2008-02-01 Kim F. Storm <storm@cua.dk>
6414
6415 * process.c (read_process_output): Grow decoding_buf when needed;
6416 this could cause a crash in allocate_string and compact_small_strings.
6417
6418 2008-02-01 Kenichi Handa <handa@m17n.org>
6419
6420 * fileio.c (WRITE_BUF_SIZE): Delete this macro.
6421
6422 2008-02-01 Kenichi Handa <handa@m17n.org>
6423
6424 * coding.c (setup_coding_system): Set coding->common_flags
6425 correctly for raw-text.
6426 (consume_chars): On encoding unibyte text by raw-text, don't check
6427 multibyte form.
6428 (encode_coding): On encoding by raw-text, never use translation tables.
6429
6430 * fileio.c (e_write): Short cut for the case of no encoding.
6431
6432 2008-02-01 Kenichi Handa <handa@m17n.org>
6433
6434 * coding.c (detect_coding, detect_coding_system): Delete unused
6435 variables.
6436
6437 2008-02-01 Kenichi Handa <handa@m17n.org>
6438
6439 * coding.c (encode_coding_utf_8): Fix handling of raw-byte char.
6440 (consume_chars): Fix handling of 8-bit bytes in unibyte source.
6441
6442 2008-02-01 Kenichi Handa <handa@m17n.org>
6443
6444 * coding.c (Ffind_coding_systems_region_internal): Include
6445 raw-text and no-conversion in the result.
6446
6447 2008-02-01 Kenichi Handa <handa@m17n.org>
6448
6449 * fontset.c (find_font_encoding): Return `ascii' for unknown encoding.
6450 (load_font_get_repertory): Delete unnecessary check of ENCODING of
6451 FONT_DEF.
6452 (font_def_arg, add_arg, from_arg, to_arg): New args.
6453 (set_fontset_font): Change argument.
6454 (Fset_fontset_font): Fix for the case that TARGET is a script
6455 name and charset name.
6456 (new_fontset_from_font_name): Fix argument to Fnew_fontset.
6457
6458 2008-02-01 Kenichi Handa <handa@m17n.org>
6459
6460 * fontset.c (fontset_font): Rename from fontset_face. Change return
6461 value.
6462 (face_suitable_for_char_p, face_for_char): Adjust for the change
6463 of fontset_font.
6464 (make_fontset_for_ascii_face): Fix setting of the fontset element
6465 for ASCII.
6466 (Finternal_char_font): Use fontset_font instead of FACE_FOR_CHAR
6467 to get a font name.
6468 (Ffontset_info): Adjust for the change of fontset_font.
6469
6470 * coding.c (emacs_mule_char): Check invalid code more regidly.
6471
6472 * character.h (LEADING_CODE_LATIN_1_MIN)
6473 (LEADING_CODE_LATIN_1_MAX): Delete these macros.
6474
6475 2008-02-01 Kenichi Handa <handa@m17n.org>
6476
6477 * editfns.c (check_translation): New function.
6478 (Ftranslate_region_internal): Handle M:N mapping.
6479
6480 2008-02-01 Kenichi Handa <handa@m17n.org>
6481
6482 * xfaces.c (xlfd_point_size): Set font->numeric[XLFD_PIXEL_SIZE].
6483
6484 2008-02-01 Kenichi Handa <handa@m17n.org>
6485
6486 * coding.c (DECODE_DESIGNATION): Set chars_96 to -1 instead of
6487 goto invalid_code.
6488 (decode_coding_iso_2022): Fix handling of invalid designation.
6489
6490 * fileio.c (Finsert_file_contents): Be sure to call unbind_to
6491 after calling code_conversion_save.
6492
6493 2008-02-01 Kenichi Handa <handa@m17n.org>
6494
6495 * xdisp.c (handle_auto_composed_prop): Fix Lisp_Object/int mixup.
6496
6497 * print.c (print_prune_string_charset): Fix Lisp_Object/int mixup.
6498
6499 * fontset.c: Include "intervals.h".
6500 (fontset_face): Fix comparing of Lisp_Objects.
6501 (free_face_fontset, new_fontset_from_font_name): Fix
6502 Lisp_Object/int mixup.
6503
6504 * editfns.c (Ftranslate_region_internal): Fix Lisp_Object/int mixup.
6505
6506 * coding.c: Add many prototypes for static functions.
6507 (get_translation_table): Allow max_lookup to be NULL.
6508 (decode_coding, Ffind_coding_systems_region_internal)
6509 (Funencodable_char_position, Fcheck_coding_systems_region): Call
6510 get_translation_table with max_lookup NULL.
6511
6512 2008-02-01 Kenichi Handa <handa@m17n.org>
6513
6514 * coding.c (get_translation_table): Declare it as Lisp_Object.
6515 (LOOKUP_TRANSLATION_TABLE): New macro.
6516 (produce_chars, consume_chars): Use LOOKUP_TRANSLATION_TABLE
6517 instead of CHAR_TABLE_REF.
6518
6519 2008-02-01 Kenichi Handa <handa@m17n.org>
6520
6521 * coding.c (MAX_ANNOTATION_LENGTH): Adjust for the change of
6522 annotation data format.
6523 (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA):
6524 Change arguments FROM and TO to single argument NCHARS. Change caller.
6525 (decode_coding_utf_8, decode_coding_utf_16, decode_coding_emacs_mule)
6526 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
6527 (decode_coding_ccl, decode_coding_charset): Pay attention to
6528 coding->charbuf_used.
6529 (get_translation): New function.
6530 (produce_chars): New arguments translation_table and last_block.
6531 Translate characters here. Return number of carryover chars.
6532 Change caller.
6533 (produce_composition): New argument pos. Change caller.
6534 Adjust for the change of annotation data format.
6535 (produce_charset, produce_annotation): Likewise.
6536 (decode_coding, encode_coding): Don't call translate_chars.
6537 (consume_chars): New arg translation_table. Change caller.
6538 (translate_chars): Delete.
6539 (syms_of_coding): Make translation-table's number of extra slots 2.
6540
6541 2008-02-01 Kenichi Handa <handa@m17n.org>
6542
6543 * search.c (simple_search): Fix setting this_pos_byte in backward
6544 search.
6545
6546 * coding.c (detect_coding_emacs_mule): Fix counting of encoded
6547 byte sequence.
6548 (detect_coding_ccl): Fix setting of the variable valids.
6549
6550 2008-02-01 Kenichi Handa <handa@m17n.org>
6551
6552 * xterm.c (x_list_fonts): Fix the detection of an auto-scaled font.
6553
6554 * coding.c (decode_coding_utf_16): Fix handling of surrogate pair.
6555
6556 * editfns.c (Ftranslate_region_internal): Rename from
6557 Ftranslate_region. Accept a char-table in TABLE.
6558 (syms_of_editfns): Defsubr Stranslate_region_internal.
6559
6560 * xfaces.c (set_lface_from_font_name): If a font is specified for
6561 a frame, generate a fontset from the font.
6562 (build_scalable_font_name): If the scalable font is requested for
6563 a specific size, don't change that size.
6564 (try_font_list): Try a scalable font also in the case that a
6565 pattern string is specified.
6566
6567 2008-02-01 Kenichi Handa <handa@m17n.org>
6568
6569 * xfaces.c (Fface_font): New optional arg CHARACTER.
6570
6571 2008-02-01 Kenichi Handa <handa@m17n.org>
6572
6573 * charset.h (CHARSET_OFFSET): New macro.
6574
6575 2008-02-01 Kenichi Handa <handa@m17n.org>
6576
6577 * xterm.c (x_get_font_repertory): Fix for non-Unicode-bmp charset.
6578
6579 * fontset.c (fontset_face): Handle the case that repertory is a
6580 char-table.
6581 (find_font_encoding): Return nil for unknown encoding.
6582 (Fset_fontset_font): Ignore a font of unknown encoding.
6583
6584 2008-02-01 Kenichi Handa <handa@m17n.org>
6585
6586 * keymap.c (describe_vector): Handle default value of a char table.
6587
6588 * fontset.c (fontset_face): Handle fallback fonts correctly.
6589 (Ffontset_info): Return infomation about fallback fonts.
6590
6591 2008-02-01 Kenichi Handa <handa@m17n.org>
6592
6593 * fontset.c (FONTSET_DEFAULT): New macro.
6594 (FONTSET_ADD, fontset_add): Handle the case that range is nil.
6595 (Fset_fontset_font): Change the 2nd arg name to TARGET, and handle
6596 the case that it is nil.
6597 (dump_fontset): Call FONTSET_DEFAULT, not FONTSET_FALLBACK.
6598 (syms_of_fontset): Set char-table-extra-slots property of fontset to 9.
6599
6600 * charset.h (CHAR_CHARSET_P): Fix for the case that the method is
6601 subset or superset.
6602
6603 2008-02-01 Kenichi Handa <handa@m17n.org>
6604
6605 * emacs.c (main): Call init_charset after syms_of_XXX.
6606
6607 * charset.c (Vcharset_map_directory): Delete.
6608 (Vcharset_map_path): New variable.
6609 (load_charset_map_from_file): Use Vcharset_map_path instead.
6610 (init_charset): Initialize Vcharset_map_path.
6611 (syms_of_charset): Delete declaration of "charset-map-directory",
6612 add declaration of "charset-map-path".
6613
6614 2008-02-01 Kenichi Handa <handa@m17n.org>
6615
6616 * fns.c (string_char_to_byte, string_byte_to_char): Optimize for
6617 ASCII only string.
6618
6619 * fileio.c (Finsert_file_contents): Avoid detecting a code twice.
6620
6621 * coding.c (detect_coding_iso_2022): Fix handling of SS2 and SS3.
6622 (detect_coding, detect_coding_system): Treat '\0' as normal ASCII byte.
6623
6624 2008-02-01 Kenichi Handa <handa@m17n.org>
6625
6626 * coding.h (SJIS_TO_JIS2, JIS_TO_SJIS2): New macros.
6627
6628 * coding.c (QCmnemonic, QCdefalut_char)
6629 (QCdecode_translation_table, QCencode_translation_table)
6630 (QCpost_read_conversion, QCpre_write_conversion): New variables.
6631 (get_translation_table): Return a list of translation tables if
6632 necessary.
6633 (decode_coding): Call get_translation_table with ENCODEP 0.
6634 (char_encodable_p): If translation_table is non-nil, always call
6635 translate_char.
6636 (Fdefine_coding_system_internal): Accept list of translation
6637 tables as :encode-translation-table and :decode-translation-table.
6638 (Fcoding_system_put): New function.
6639 (syms_of_coding): Declare new symbols. Defsubr
6640 Scoding_system_put.
6641 (decode_coding_sjis, encode_coding_sjis): Handle 4th charset,
6642 typically JISX0212.
6643
6644 * charset.c (map_charset_chars): Fix arg to map_charset_chars in
6645 when the charset is superset type.
6646
6647 * character.c (translate_char): Accept list of translation tables.
6648
6649 2008-02-01 Kenichi Handa <handa@m17n.org>
6650
6651 * coding.h (enum coding_attr_index): New member coding_attr_trans_tbl.
6652 (CODING_ATTR_TRANS_TBL): New macro.
6653
6654 * coding.c (get_translation_table): New function.
6655 (translate_chars): Fix the bug of skipping annotation data.
6656 (decode_coding, encode_coding): Utilize get_translation_table.
6657 (char_encodable_p, Funencodable_char_position): Translate char if
6658 necessary.
6659 (Ffind_coding_systems_region_internal)
6660 (Fcheck_coding_systems_region): Setup translation table for encode
6661 in a coding system attribute vector in advance.
6662 (Fdefine_coding_system_internal): Allow a symbol as translation
6663 table. For shift-jis type coding system, allow 4th charset.
6664
6665 2008-02-01 Kenichi Handa <handa@m17n.org>
6666
6667 * coding.c (decode_coding_sjis): Check the first byte rigidly.
6668
6669 * xdisp.c (get_next_display_element): Pass -1 as POS to
6670 FACE_FOR_CHAR if displaying a C-string.
6671
6672 2008-02-01 Kenichi Handa <handa@m17n.org>
6673
6674 * composite.c (get_composition_id): Handle xoff and yoff in a
6675 composition rule.
6676
6677 * composite.h (COMPOSITION_DECODE_RULE): New arg xoff and yoff.
6678 (struct composition): New member lbearing and rbearing.
6679
6680 * xdisp.c (move_it_to): Optimize for the case (op & MOVE_TO_Y).
6681 (x_get_glyph_overhangs): Handle a composition glyph.
6682 (x_produce_glyphs): Setup lbearing and rbreaing for a composition glyph.
6683
6684 * xterm.c (x_compute_glyph_string_overhangs): Handle also a
6685 composition glyph.
6686
6687 2008-02-01 Kenichi Handa <handa@m17n.org>
6688
6689 * print.c: Include charset.h.
6690 (Vprint_charset_text_property): New variable.
6691 (Qdefault): Extern it.
6692 (PRINT_STRING_NON_CHARSET_FOUND)
6693 (PRINT_STRING_UNSAFE_CHARSET_FOUND): New macros.
6694 (print_check_string_result): New variable.
6695 (print_check_string_charset_prop): New function.
6696 (print_prune_charset_plist): New variable.
6697 (print_prune_string_charset): New function.
6698 (print_object): Call print_prune_string_charset if
6699 Vprint_charset_text_property is not t.
6700 (print_interval): Print nothing if itnerval->plist is nil.
6701 (syms_of_print): Declare Vprint_charset_text_property as a lisp
6702 variable. Init and staticpro print_prune_charset_plist.
6703
6704 2008-02-01 Kenichi Handa <handa@m17n.org>
6705
6706 * fontset.c (new_fontset_from_font_name): Use the specified font
6707 for all characters in the new fontset.
6708
6709 * macterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
6710 OBJECT args.
6711
6712 * xdisp.c (x_produce_glyphs): Call FACE_FOR_CHAR with POS and
6713 OBJECT args for composition too.
6714
6715 * w32term.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with POS and
6716 OBJECT args.
6717
6718 2008-02-01 Kenichi Handa <handa@m17n.org>
6719
6720 * dispextern.h (FACE_FOR_CHAR): New args POS and OBJECT.
6721
6722 * fontset.c (reorder_font_vector): Adjust for the change of
6723 FONT_DEF format.
6724 (fontset_face): New arg id. Change caller.
6725 (face_for_char): New args pos and object.
6726 (make_fontset_for_ascii_face): Adjust for the change of FONT_DEF format.
6727 (fs_query_fontset): Check NAME by Fassoc too.
6728 (Fset_fontset_font): Allow non-XLFD font name.
6729 (Ffontset_info): Adjust for the change of FONT_DEF format.
6730
6731 * fontset.h (face_for_char): Adjust prototype.
6732
6733 * xdisp.c (face_before_or_after_it_pos, get_next_display_element)
6734 (append_space, extend_face_to_end_of_line)
6735 (get_char_face_and_encoding, BUILD_COMPOSITE_GLYPH_STRING)
6736 (x_produce_glyphs): Call FACE_FOR_CHAR with POS and OBJECT args.
6737
6738 * xfaces.c (compute_char_face): Call FACE_FOR_CHAR with
6739 POS and OBJECT args.
6740
6741 * xterm.c (x_set_mouse_face_gc): Call FACE_FOR_CHAR with
6742 POS and OBJECT args.
6743
6744 2008-02-01 Jason Rumney <jasonr@gnu.org>
6745
6746 * w32select.c (Fw32_set_clipboard_data): Avoid potential realloc
6747 of GlobalAlloc'ed memory.
6748
6749 2008-02-01 Kenichi Handa <handa@m17n.org>
6750
6751 * ccl.c (Fccl_execute_on_string): Fix the condition of loop.
6752
6753 * charset.h (charset_table_used): Delete extern.
6754
6755 * charset.c (charset_table_used): Make it static.
6756 (map_charset_chars): Fix args to c_function with.
6757
6758 * chartab.c (map_sub_char_table_for_charset): Fix args to
6759 c_function with.
6760
6761 * coding.h (enum coding_result_code): Delete
6762 CODING_RESULT_INSUFFICIENT_CMP, add CODING_RESULT_INVALID_SRC.
6763
6764 * coding.c (Qinsufficient_source, Qinconsistent_eol)
6765 (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New variables.
6766 (Vlast_code_conversion_error): New variables.
6767 (syms_of_coding): DEFSYM or DEFVAR_LISP them.
6768 (ONE_MORE_BYTE): Record error if any instead of signaling an
6769 error. If non-ASCII multibyte char is found, return the negative
6770 value of the code. All callers changed to check it.
6771 (ONE_MORE_BYTE_NO_CHECK): Likewise.
6772 (record_conversion_result): New function. Change all codes setting
6773 coding->result to call this function.
6774 (detect_coding_utf_8, decode_coding_utf_8)
6775 (detect_coding_emacs_mule, detect_coding_sji, detect_coding_big5):
6776 Don't use the local variable incomplete.
6777 (emacs_mule_char): Change the second arg to `const'.
6778 (decode_coding): Fix of flushing out unprocessed data.
6779 (make_conversion_work_buffer): Fix making of a work buffer.
6780 (decode_coding_object): Return coding->dst_object.
6781
6782 * fontset.c (set_fontset_font): Fix args.
6783
6784 * lisp.h (CHARACTERBITS): Define as 22.
6785
6786 * process.c (send_process): Be sure to set coding->src_multibyte.
6787
6788 * xdisp.c (handle_auto_composed_prop): Fix setting of limit.
6789
6790 2008-02-01 Kenichi Handa <handa@m17n.org>
6791
6792 * xdisp.c (handle_auto_composed_prop): Give limit to
6793 Fnext_single_char_property_change.
6794
6795 2008-02-01 Kenichi Handa <handa@m17n.org>
6796
6797 * composite.c (syms_of_composite): Don't make the composition hash
6798 table weak.
6799
6800 * fontset.c (Fset_fontset_font): Fix docstring.
6801
6802 * lisp.h (detect_coding_system): Adjust prototype.
6803
6804 * fileio.c (kill_workbuf_unwind): Delete this function.
6805 (Finsert_file_contents): Adjust the call of detect_coding_system.
6806 Get conversion_buffer by code_conversion_save. Use the macor
6807 CODING_MAY_REQUIRE_DECODING. After decoding, update
6808 coding_system.
6809
6810 * coding.h (make_conversion_work_buffer): Delete extern.
6811 (code_conversion_save): Extern it.
6812
6813 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
6814 (CODING_GET_INFO): Delete argument eol_type. Change callers.
6815 (decode_coding_utf_8): Don't do eol converion.
6816 (detect_coding_utf_16): Check coding->src_chars, not
6817 coding->src_bytes. Add heuristics for those that have no signature.
6818 (decode_coding_emacs_mule, decode_coding_iso_2022)
6819 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
6820 Don't do eol converion.
6821 (adjust_coding_eol_type): Return a new coding system.
6822 (detect_coding): Don't detect eol. Fix for utf-16 detection.
6823 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
6824 each change.
6825 (decode_coding): Pay attention to undo_list. Do eol convesion for
6826 all types of coding-systems (if necessary).
6827 (Vcode_conversion_work_buf_list): Delete it.
6828 (Vcode_conversion_reused_workbuf): Rename from
6829 Vcode_conversion_reused_work_buf.
6830 (Vcode_conversion_workbuf_name): New variable.
6831 (reused_workbuf_in_use): New variable.
6832 (make_conversion_work_buffer): Delete the arg DEPTH.
6833 (code_conversion_restore): Change argument to cons.
6834 (code_conversion_save): Delete the argument BUFFER. Change callers.
6835 (detect_coding_system): New argument src_chars. Change callers.
6836 Fix for utf-16 detection.
6837 (init_coding_once): Don't use ISO_carriage_return.
6838 (syms_of_coding): Initialize Vcode_conversion_workbuf_name and
6839 reused_workbuf_in_use.
6840
6841 2008-02-01 Kenichi Handa <handa@m17n.org>
6842
6843 * keymap.c (store_in_keymap): Pay attention to the case that idx
6844 is a cons specifying a character range.
6845
6846 2008-02-01 Kenichi Handa <handa@m17n.org>
6847
6848 * xdisp.c (handle_auto_composed_prop): Fix the case of returning
6849 HANDLED_RECOMPUTE_PROPS.
6850
6851 * coding.c (Fdefine_coding_system_internal): Fix checking of
6852 ascii compatibility.
6853
6854 2008-02-01 Kenichi Handa <handa@m17n.org>
6855
6856 * charset.c (find_charsets_in_text): Delete unused locale variable.
6857 (Fset_charset_priority): Update Vemacs_mule_charset_list too.
6858
6859 * coding.c (encode_coding_emacs_mule): Emit bytes with MSB.
6860 Resync charset_list to Vemacs_mule_charset_list.
6861
6862 * keymap.c (store_in_keymap): Pay attention to the case that idx
6863 is a cons specifying a character range.
6864
6865 2008-02-01 Kenichi Handa <handa@m17n.org>
6866
6867 * composite.c (update_compositions): Bind inhibit-read-only, etc
6868 to t before calling remove-list-of-text-properties.
6869
6870 * print.c (print_object): Always print ASCII chars as is.
6871
6872 2008-02-01 Kenichi Handa <handa@m17n.org>
6873
6874 * keymap.c (Fdefine_key): Fix handling of Lucid style event type list.
6875
6876 * fns.c (Fmapconcat, Fmapcar, Fmapc): Signal an error if SEQUENCE
6877 is a char table.
6878
6879 2008-02-01 Kenichi Handa <handa@m17n.org>
6880
6881 * syntax.c (skip_chars): Be sure to alloca char_ranges when necessary.
6882
6883 2008-02-01 Kenichi Handa <handa@m17n.org>
6884
6885 * xfaces.c (set_lface_from_font_name): Fix for the case that
6886 FONTNAME is not fontset name.
6887
6888 2008-02-01 Kenichi Handa <handa@m17n.org>
6889
6890 * fns.c (base64_encode_1): Fix previous change.
6891
6892 2008-02-01 Kenichi Handa <handa@m17n.org>
6893
6894 * fontset.c (set_fontset_font): New function.
6895 (Fset_fontset_font): If a font is specified for a charset, use
6896 map_charset_chars to store the font spec in a fontset.
6897
6898 2008-02-01 Kenichi Handa <handa@m17n.org>
6899
6900 * fontset.c (fontset_face): Create a fallback fontset on demand.
6901 (make_fontset): Don't create a fallback fontset here.
6902 (free_face_fontset): Free a fallback fontset (if any) too.
6903 (n_auto_fontsets): Delete this variable.
6904 (auto_fontset_alist): New variable.
6905 (new_fontset_from_font_name): Check auto_fontset_alist.
6906 (dump_fontset) [FONTSET_DEBUG]: Fully re-written.
6907 (Ffontset_list_all) [FONTSET_DEBUG]: New function.
6908 (syms_of_fontset): Initialize and staticpro auto_fontset_alist.
6909 Defsubr Sfontset_list_all.
6910
6911 2008-02-01 Kenichi Handa <handa@m17n.org>
6912
6913 * xterm.c (x_list_fonts): Fix excluding of auto-scaled fonts.
6914
6915 2008-02-01 Kenichi Handa <handa@m17n.org>
6916
6917 * fontset.c (Fnew_fontset): Check NAME more rigidly.
6918
6919 2008-02-01 Kenichi Handa <handa@m17n.org>
6920
6921 * editfns.c (Fgoto_char): Fix docstring.
6922
6923 2008-02-01 Kenichi Handa <handa@m17n.org>
6924
6925 * insdel.c (insert_from_gap): Adjust intervals correctly.
6926
6927 2008-02-01 Jason Rumney <jasonr@gnu.org>
6928
6929 * w32term.c (GLYPHSET, WCRANGE): Define if system headers don't.
6930 (pfnGetFontUnicodeRanges): New dynamically loaded function.
6931 (w32_initialize): Try to load it.
6932 (x_get_font_repertory): Use it if available.
6933 (w32_encode_char): Add shortcut for unicode output.
6934
6935 * w32fns.c (w32_load_system_font): Default charset to -1.
6936 (x_to_w32_charset): Match all fonts for unicode.
6937 (w32_to_x_charset): New parameter matching. Don't return partial
6938 or wildcard charsets.
6939 (w32_to_all_x_charsets): Don't return partial or wildcard charsets.
6940 (w32_codepage_for_font): Return CP_UNICODE for unicode.
6941 (w32_to_x_font): Match charset to real charset.
6942 (enum_font_cb2): Always list unicode versions.
6943
6944 * makefile.w32-in (temacs): Increase EMHEAP.
6945
6946 2008-02-01 Jason Rumney <jasonr@gnu.org>
6947
6948 * w32term.c (w32_encode_char): New charset parameter.
6949 font_info.encoding becomes encoding_type.
6950 (x_get_font_repertory): New function. Warning: stub only!
6951 (x_new_font): Return quickly if font already set.
6952 (x_new_fontset): fontsetname parameter is Lisp_Object.
6953 Use new fs_query_fontset. Try new_fontset_from_font_name.
6954 Use fontset_name for return value.
6955
6956 * w32term.h: Declare x_get_font_repertory.
6957
6958 * w32select.c (Fw32_set_clipboard_data): Use string_x_string_p in
6959 place of find_charset_in_text. Use encode_coding_object in place
6960 of encode_coding.
6961 (Fw32_get_clipboard_data): Use decode_coding_c_string in place of
6962 decode_coding.
6963
6964 * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version
6965 of x_new_fontset.
6966 (w32_load_system_font): Initialize charset as unicode.
6967 font_info.encoding becomes encoding_type.
6968 (w32_to_x_font): Use decode_coding_c_string in place of decode_coding.
6969 (x_to_w32_font): Use encode_coding_object in place of encode_coding.
6970 (syms_of_w32fns): Set get_font_repertory_func.
6971
6972 * w32console.c: Include character.h. Use terminal_encode_buffer
6973 from term.c.
6974 (write_glyphs): Use new version of encode_terminal_code. Use
6975 encode_coding_object in place of encode_coding.
6976
6977 * w32bdf.c (w32_load_bdf_font): Clear font_info before filling.
6978 encoding becomes encoding_type.
6979
6980 * term.c (terminal_encode_buffer): Make externally visible.
6981
6982 * makefile.w32-in: Add character.h dependancies.
6983 (character.o, chartab.o): New targets.
6984
6985 2008-02-01 Kenichi Handa <handa@m17n.org>
6986
6987 * fileio.c (Finsert_file_contents) [DOS_NT]: Use the macro
6988 CODING_ID_EOL_TYPE.
6989
6990 2008-02-01 Andreas Schwab <schwab@suse.de>
6991
6992 * coding.c (produce_chars): Revert last change.
6993
6994 2008-02-01 Kenichi Handa <handa@m17n.org>
6995
6996 * charset.h (charset_unicode): Extern it.
6997
6998 * charset.c (string_xstring_p): Check by (C >= 0x100).
6999 (find_charsets_in_text): Change format of the arc CHARSETS. New
7000 arg MULTIBYTE.
7001 (Ffind_charset_region, Ffind_charset_string): Adjust for the
7002 change of find_charsets_in_text.
7003 (Fsplit_char): Fix doc. Never return unknown.
7004
7005 * chartab.c (char_table_translate): Use CHARACTERP, not INETEGERP.
7006
7007 * coding.c (Fdefine_coding_system_alias): Update
7008 Vcoding_system_list.
7009
7010 * fontset.c (load_font_get_repertory): Pay attention to the case
7011 that ENCODING of a font is specified by a char-table.
7012
7013 * xterm.c (x_get_font_repertory): Handle the case that the
7014 encoding of font is other than Unicode.
7015
7016 2008-02-01 Kenichi Handa <handa@m17n.org>
7017
7018 * term.c (encode_terminal_code): Don't handle glyph-table. Check
7019 if a character is encodable by the terminal coding system. If
7020 not, produces proper number of `?'s. Update
7021 terminal_encode_buffer and terminal_encode_buf_size if necessary.
7022 (produce_glyphs): Check by CHAR_BYTE8_P, not SINGLE_BYTE_CHAR_P.
7023
7024 2008-02-01 Kenichi Handa <handa@m17n.org>
7025
7026 * term.c (terminal_encode_buffer, terminal_encode_buf_size): New
7027 variables.
7028 (encode_terminal_code): Change argument. Encode multiple
7029 characters at once. Store the result of encoding in
7030 terminal_encode_buffer.
7031 (write_glyphs, insert_glyphs): Adjust for the change of
7032 encode_terminal_code.
7033 (term_init): Initialize terminal_encode_buffer and
7034 terminal_encode_buf_size.
7035
7036 * coding.c (consume_chars): If coding->src_object is nil, don't
7037 check annotation.
7038
7039 2008-02-01 Kenichi Handa <handa@m17n.org>
7040
7041 * character.c (char_string): Use ASCII_CHAR_P instead of
7042 SINGLE_BYTE_CHAR_P.
7043
7044 2008-02-01 Kenichi Handa <handa@m17n.org>
7045
7046 * xdisp.c (handle_auto_composed_prop): Check if the last
7047 characters of auto-composed region is newly composed with the
7048 following characters.
7049 (handle_composition_prop): Fix checking of point being inside
7050 composition.
7051
7052 2008-02-01 Kenichi Handa <handa@m17n.org>
7053
7054 * fns.c (concat): Don't change multibyteness of the result by
7055 concatenating an 8-bit character.
7056
7057 * data.c (Faset): Check newelt by CHECK_CHARACTER. Don't change
7058 multibyteness of the result when newelt is an 8-bit character.
7059
7060 2008-02-01 Dave Love <fx@gnu.org>
7061
7062 * xmenu.c (find_and_call_menu_selection): Make menu_bar_items_used
7063 EMACS_INT.
7064
7065 * xfns.c (DefaultDepthOfScreen, x_encode_text): Remove unused vars.
7066
7067 * xfaces.c (face_numeric_value): Declare dim size_t.
7068 (Finternal_lisp_face_equal_p): Remove unused f.
7069
7070 * xdisp.c (BUILD_CHAR_GLYPH_STRINGS, display_and_set_cursor)
7071 (MATRIX_ROW): Remove unused vars.
7072 (draw_glyphs, x_insert_glyphs, fast_find_position)
7073 (fast_find_position, fast_find_string_pos): Use EMACS_INT for
7074 byte/char counts.
7075
7076 * regex.c (regex_compile): Remove unused var.
7077
7078 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
7079
7080 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap)
7081 (Faccessible_keymaps, where_is_internal): Remove unused vars.
7082
7083 * keyboard.c (cancel_hourglass_unwind): Return Qnil.
7084
7085 * frame.c (frame_name_fnn_p): Make len EMACS_INT.
7086
7087 * fileio.c (Fwrite_region): Remove unused var.
7088
7089 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
7090 (adjust_frame_glyphs_for_window_redisplay): Remove unused ch_dim.
7091
7092 * composite.c (Fremove_list_of_text_properties): Declare.
7093
7094 * coding.c (inhibit_pre_post_conversion): Remove (unused).
7095 (alloc_destination, produce_chars): Use EMACS_INT for byte/char counts.
7096 (coding_inherit_eol_type): Remove unused attrs.
7097 (detect_coding): Cast arg of detect_eol.
7098
7099 * charset.c (syms_of_charset): Remove unused var p.
7100 (find_charsets_in_text, Ffind_charset_region): Use EMACS_INT for
7101 byte/char counts.
7102
7103 * casetab.c (set_case_table): Remove unused var.
7104
7105 * window.c (Fdisplay_buffer, Fframe_selected_window): Remove
7106 unused vars.
7107
7108 2008-02-01 Dave Love <fx@gnu.org>
7109
7110 * xterm.c (x_bitmap_mask): Declare.
7111
7112 2008-02-01 Dave Love <fx@gnu.org>
7113
7114 * xterm.c (x_term_init): Fix type error.
7115
7116 * lisp.h: Add Funibyte_char_to_multibyte.
7117
7118 * coding.c (Fread_coding_system): Fix arg of XSETSTRING.
7119 (Fset_coding_system_priority): Doc fix.
7120
7121 * ccl.c (ccl_driver): Fix arg of CHARACTERP.
7122
7123 * indent.c (check_composition): Make start and end EMACS_INT.
7124
7125 * character.c (lisp_string_width): Make ignore and end EMACS_INT.
7126
7127 * xdisp.c (handle_composition_prop, check_point_in_composition):
7128 Make buffer positions EMACS_INT.
7129
7130 * composite.c (find_composition, run_composition_function)
7131 (update_compositions, Ffind_composition_internal): Make buffer
7132 positions EMACS_INT.
7133
7134 * composite.h (find_composition, update_compositions): Make
7135 position args EMACS_INT.
7136
7137 * keyboard.c (adjust_point_for_property): Make beg and end EMACS_INT.
7138
7139 * intervals.c (get_property_and_range):
7140 * intervals.h (get_property_and_range): Make start and end EMACS_INT.
7141
7142 * unexalpha.c: Don't include varargs.h.
7143
7144 2008-02-01 Dave Love <fx@gnu.org>
7145
7146 * coding.h (ENCODE_UTF_8): New.
7147
7148 * Makefile.in (gtkutil.o): Depend on coding.h.
7149
7150 * coding.c (Fset_coding_system_priority): Doc fix.
7151
7152 2008-02-01 Kenichi Handa <handa@m17n.org>
7153
7154 * fileio.c (Finsert_file_contents): Call setup_coding_system in
7155 the case of auto saving.
7156
7157 2008-02-01 Andreas Schwab <schwab@suse.de>
7158
7159 * chartab.c (map_char_table, map_char_table_for_charset): Protect
7160 `range' from GC.
7161
7162 2008-02-01 Kenichi Handa <handa@m17n.org>
7163
7164 * coding.c (decode_coding_sjis): Check bytes more rigidly.
7165
7166 2008-02-01 Kenichi Handa <handa@m17n.org>
7167
7168 * fileio.c (choose_write_coding_system): Return a decided coding system.
7169 (Fwrite_region): Set Vlast_coding_system_used to the return value
7170 of choose_write_coding_system.
7171
7172 2008-02-01 Kenichi Handa <handa@m17n.org>
7173
7174 * charset.c (Fset_charset_priority): Pay attention to duplicated
7175 arguments.
7176
7177 * coding.c (QCcategory): New variable.
7178 (syms_of_coding): Defsym it. Set all elements of
7179 Vcoding_category_table and their symbol values.
7180 (Fset_coding_system_priority): Doc fix. Update symbol qvalues of
7181 coding-category-XXX, and coding-category-list.
7182 (Fdefine_coding_system_internal): Add category in the plist.
7183
7184 2008-02-01 Kenichi Handa <handa@m17n.org>
7185
7186 * callproc.c (Fcall_process): Handle carryover correctly.
7187
7188 * coding.c (decode_coding_iso_2022): Fix handling of invalid bytes.
7189 (raw_text_coding_system): Check NILP (coding_system).
7190 (coding_inherit_eol_type): Check NILP (coding_system) and
7191 NILP (parent).
7192 (consume_chars): Fix for the case of raw-text.
7193
7194 * process.c (read_process_output): Handle carryover correctly.
7195
7196 2008-02-01 Dave Love <fx@gnu.org>
7197
7198 * regex.c (re_search_2): Fix last change.
7199
7200 2008-02-01 Kenichi Handa <handa@m17n.org>
7201
7202 * regex.c (GET_CHAR_BEFORE_2): Check multibyte, not
7203 target_multibyte. Even in a unibyte case, return a converted
7204 multibyte char.
7205 (GET_CHAR_AFTER): New macro.
7206 (PATFETCH): Translate via multibyte char.
7207 (HANDLE_UNIBYTE_RANGE): Delete this macro.
7208 (SETUP_MULTIBYTE_RANGE): New macro.
7209 (regex_compile): Setup compiled code so that its multibyteness
7210 matches that of a target. Fix the handling of "[X-YZ]" using
7211 SETUP_MULTIBYTE_RANGE.
7212 (analyse_first) <charset>: For filling fastmap for all multibyte
7213 characters, don't check by BASE_LEADING_CODE_P.
7214 (re_search_2): Don't check RE_TARGET_MULTIBYTE_P (bufp). It is
7215 the same as RE_MULTIBYTE_P (bufp) now.
7216 (mutually_exclusive_p): Check by (! multibyte || IS_REAL_ASCII (c)).
7217 (TARGET_CHAR_AND_LENGTH): Delete this macro.
7218 (TRANSLATE_VIA_MULTIBYTE): New macro.
7219 (re_match_2_internal): Don't check RE_TARGET_MULTIBYTE_P (bufp).
7220 It is the same as RE_MULTIBYTE_P (bufp) now.
7221 <exactn>: Translate via multibyte.
7222 <anychar>: Fetch a character by RE_STRING_CHAR_AND_LENGTH. Don't
7223 translate it.
7224 <charset, charset_not>: Fetch a character by
7225 RE_STRING_CHAR_AND_LENGTH. Translate via multibyte.
7226 <duplicate>: Call bcmp_translate with the last arg `multibyte'.
7227 <wordbound, notwordbound, wordbeg, wordend, syntaxspec,
7228 notsyntaxspec, categoryspec, notcategoryspec> Fetch a character
7229 by GET_CHAR_AFTER.
7230 (bcmp_translate): Likewise.
7231
7232 * search.c (compile_pattern): Check the member target_multibyte,
7233 not the member multibyte of buf.
7234
7235 * lread.c (read1): While reading a string, set force_singlebyte
7236 and force_multibyte correctly.
7237
7238 * charset.c (Fset_unibyte_charset, init_charset_once): Fix setting
7239 up of unibyte_to_multibyte_table.
7240
7241 2008-02-01 Kenichi Handa <handa@m17n.org>
7242
7243 * coding.c (setup_coding_system): If coding has
7244 post-read-conversion or pre-write-conversion, set
7245 CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK
7246 respectively.
7247 (decode_coding_gap): Run post-read-conversion if any.
7248
7249 * fileio.c (Finsert_file_contents): Even if we read into a
7250 unibyte buffer, check if we must decode the result or not.
7251
7252 2008-02-01 Kenichi Handa <handa@m17n.org>
7253
7254 * coding.c (make_conversion_work_buffer): Change the work buffer
7255 name to the same one as that of Emacs 21.
7256
7257 2008-02-01 Kenichi Handa <handa@m17n.org>
7258
7259 * coding.h (make_conversion_work_buffer): Adjust prototype.
7260 (code_conversion_restore): Don't extern it.
7261
7262 * coding.c (detected_mask): Delete unused variable.
7263 (decode_coding_iso_2022): Pay attention to the byte sequence of
7264 CTEXT extended segment, and retain those bytes as is.
7265 (decode_coding_ccl): Delete unused variable `valids'.
7266 (setup_coding_system): Delete unused variable `category'.
7267 (consume_chars): Delete unused variable `category'. Make it work
7268 for non-multibyte case.
7269 (make_conversion_work_buffer): Change argument.
7270 (saved_coding): Delete unused variable.
7271 (code_conversion_restore): Don't check saved_coding->destination.
7272 (code_conversion_save): New function.
7273 (decode_coding_gap, encode_coding_gap): Call code_conversion_save
7274 instead of record_unwind_protect.
7275 (decode_coding_object, encode_coding_object): Likewise. Recover PT.
7276 (detect_coding_system): Delete unused variable `mask'.
7277 (Fdefine_coding_system_internal): Delete unused vaiable id.
7278
7279 * fileio.c (kill_workbuf_unwind): New function.
7280 (Finsert_file_contents): On replacing, call
7281 make_conversion_work_buffer with correct args, and call
7282 record_unwind_protect with the first arg kill_workbuf_unwind.
7283
7284 * lisp.h (Fgenerate_new_buffer_name): EXFUN it.
7285
7286 2008-02-01 Kenichi Handa <handa@m17n.org>
7287
7288 * fontset.c (BASE_FONTSET_P): Check FONTSET_BASE, not FONTSET_NAME.
7289 (fontset_add): Fix for the case that TO is less than TO1.
7290 (Ffontset_info): Don't use fallback fontset on checking the
7291 default fontset.
7292 (dump_fontset): New function for debugging.
7293
7294 * coding.c (Fdefine_coding_system_internal): Fix for the case that
7295 coding_type is Qcharset.
7296
7297 2008-02-01 Kenichi Handa <handa@m17n.org>
7298
7299 * chartab.c (map_sub_char_table): New argument DEFAULT_VAL.
7300 (map_char_table): Don't inherit the value from the parent on
7301 initializing VAL. Adjust for the above change.
7302
7303 2008-02-01 Kenichi Handa <handa@m17n.org>
7304
7305 * coding.c (Qsignature, Qendian): Delete these variables.
7306 (syms_of_coding): Don't initialize them.
7307 (CATEGORY_MASK_UTF_16_AUTO): New macro.
7308 (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in
7309 detect_info->found.
7310 (decode_coding_utf_16): Don't detect BOM here.
7311 (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding)
7312 is NOT utf_16_without_bom.
7313 (setup_coding_system): For a coding system of type utf-16, check
7314 if the attribute :endian is Qbig or not (not nil or not), and set
7315 CODING_REQUIRE_DETECTION_MASK if BOM detection is required.
7316 (detect_coding): If coding type is utf-16 and BOM detection is
7317 required, detect it.
7318 (Fdefine_coding_system_internal): For a coding system of type
7319 utf-16, check if the attribute :endian is Qbig or not (not nil or not).
7320
7321 2008-02-01 Kenichi Handa <handa@m17n.org>
7322
7323 * coding.c (coding_set_source): Fix for the case that the current
7324 buffer is different from coding->src_object.
7325 (decode_coding_object): Don't use the conversion work buffer if
7326 DST_OBJECT is a buffer.
7327
7328 2008-02-01 Dave Love <fx@gnu.org>
7329
7330 * lread.c (read_emacs_mule_char) [len==2]: Index
7331 emacs_mule_charset correctly.
7332
7333 2008-02-01 Dave Love <fx@gnu.org>
7334
7335 * coding.c (Qbig5, Vbig5_coding_system, CATEGORY_MASK_BIG5)
7336 (detect_coding_big5, decode_coding_big5, encode_coding_big5)
7337 (Fdecode_big5_char, Fencode_big5_char): Delete. (Big5 no longer
7338 treated specially.)
7339 (setup_coding_system, coding_category, CATEGORY_MASK_ANY)
7340 (detected_mask): Remove Big5 bits.
7341
7342 2008-02-01 Kenichi Handa <handa@m17n.org>
7343
7344 The following changes are to make the font rescaling facility
7345 compatible with Emacs 21.
7346
7347 * xfaces.c (Vface_font_rescale_alist): Rename from
7348 Vface_resizing_fonts.
7349 (struct font_name): Rename member resizing_ratio to rescale_ratio.
7350 (font_rescale_ratio): Rename from font_resizing_ratio.
7351 (split_font_name): Set font->rescale_ratio.
7352 (better_font_p): Pay attention to font->rescale_ratio.
7353 (build_scalable_font_name): Likewise. Change RESX, and RESY
7354 fields.
7355 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp variable.
7356
7357 2008-02-01 Kenichi Handa <handa@m17n.org>
7358
7359 * coding.c (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
7360 (Qutf_16_le): Remove these variables.
7361 (syms_of_coding): Don't DEFSYM them.
7362 (decode_coding_utf_16): Fix handling of BOM.
7363 (encode_coding_utf_16): Fix handling of BOM.
7364
7365 2008-02-01 Kenichi Handa <handa@m17n.org>
7366
7367 * fileio.c (Finsert_file_contents): On replacing, before decoding
7368 the file into the work buffer, set point of the work buffer to the end.
7369
7370 2008-02-01 Dave Love <fx@gnu.org>
7371
7372 * coding.c (Fcheck_coding_systems_region): Fix type errors.
7373
7374 2008-02-01 Dave Love <fx@gnu.org>
7375
7376 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
7377 and fix C types.
7378
7379 2008-02-01 Kenichi Handa <handa@m17n.org>
7380
7381 * xdisp.c (SKIP_GLYPHS): New macro.
7382 (set_cursor_from_row): Pay attention to string display properties.
7383
7384 * category.c (copy_category_entry): Fix for the case that RANGE
7385 is an integer.
7386
7387 * xterm.c (x_encode_char): Call ccl_driver with the last arg Qnil.
7388
7389 * w32term.c (w32_encode_char): Call ccl_driver with the last arg Qnil.
7390
7391 2008-02-01 Kenichi Handa <handa@m17n.org>
7392
7393 * charset.c (Fcharset_id_internal): New function.
7394 (syms_of_charset): Defsubr it.
7395
7396 * coding.c (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
7397 with the last arg charset_list acquired from coding.
7398 (Fdefine_coding_system_internal): For ccl-based coding system, fix
7399 the attribute coding_attr_ccl_valids.
7400
7401 * coding.h (enum define_coding_ccl_arg_index): Set the first
7402 member coding_arg_ccl_decoder to coding_arg_max.
7403
7404 * ccl.h (ccl_driver): Adjust prototype.
7405
7406 * ccl.c (CCL_DECODE_CHAR, CCL_ENCODE_CHAR): New macros.
7407 (ccl_driver): New arg CHARSET_LIST. Use the above macros instead
7408 of DECODE_CAHR, ENCODE_CHAR, CHAR_CHARSET.
7409 (Fccl_execute, Fccl_execute_on_string): Call ccl_driver with the
7410 last arg Qnil.
7411
7412 2008-02-01 Kenichi Handa <handa@m17n.org>
7413
7414 * charset.h (ENCODE_CHAR): If the method is SUBSET or SUPERSET,
7415 call encode_char.
7416
7417 * charset.c (encode_char): Fix handling of methods SUBSET and SUPERSET.
7418
7419 2008-02-01 Dave Love <fx@gnu.org>
7420
7421 * composite.c (syms_of_composite): Make composition_hash_table weak.
7422
7423 2008-02-01 Kenichi Handa <handa@m17n.org>
7424
7425 * dispextern.h (check_face_attributes, generate_ascii_font_name)
7426 (font_name_registry): Don't extern them.
7427 (split_font_name_into_vector, build_font_name_from_vector): Extern them.
7428
7429 * fontset.h (Qfontset): Don't extern it.
7430 (new_fontset_from_font_name): Extern it.
7431
7432 * fontset.c: Give 8 extra slots to fontset objects.
7433 (Qfontset_info): New variable.
7434 (syms_of_fontset): Defsym it.
7435 (FONTSET_FALLBACK): New macro.
7436 (fontset_face): Try also the default fontset.
7437 (make_fontset): Realize a fallback fontset from the default fontset.
7438 (generate_ascii_font_name): Move from xfaces.c. Rewritten by
7439 using split_font_name_into_vector and build_font_name_from_vector.
7440 (Fset_fontset_font): Access the elements of font_spec by enum
7441 FONT_SPEC_INDEX. If font_spec is a string, extract the registry
7442 name by using split_font_name_into_vector.
7443 (Fnew_fontset): If no ASCII font is specified in FONTLIST,
7444 generate a proper font name from the fontset name. Update
7445 Vfontset_alias_alist.
7446 (n_auto_fontsets): New variable.
7447 (new_fontset_from_font_name): New function.
7448 (Ffont_info): Store the information about fonts generated from the
7449 default fontset in the first extra slot of the returned char-table.
7450
7451 * xfaces.c (generate_ascii_font_name): Move to fontset.c.
7452 (font_name_registry): Delete function.
7453 (split_font_name_into_vector): New function.
7454 (build_font_name_from_vector): New function.
7455 (font_list): The argument REGISTRY is now a list of registry names.
7456 (choose_face_font): If we are choosing an ASCII font, and ATTRS
7457 specifies an explicit font name, return the name as is. Make a
7458 list of registy names.
7459
7460 * xfns.c (x_set_font, x_create_tip_frame): Adjust for the change
7461 of x_new_fontset.
7462 (Fx_create_frame): Don't call x_new_fontset here. Just use
7463 x_list_fonts to check the existence of fonts.
7464
7465 * xterm.h (x_new_fontset): Adjust prototype.
7466
7467 * xterm.c (x_new_fontset): Change the arg FONTSETNAME to Lisp
7468 string. Use new_fontset_from_font_name to create a fontset from a
7469 font name.
7470
7471 2008-02-01 Kenichi Handa <handa@m17n.org>
7472
7473 * syntax.c (Vfind_word_boundary_function_table): New name for
7474 Vnext_word_boundary_function_table.
7475 (find-word-boundary-function-table): New name for
7476 next-word-boundary-function-table.
7477
7478 2008-02-01 Dave Love <fx@gnu.org>
7479
7480 * Makefile.in: Fix some dependencies.
7481
7482 * keymap.c (Fapropos_internal): Don't gcpro apropos_predicate but
7483 set it to nil before returning.
7484
7485 * composite.c (update_compositions): Fix type error.
7486
7487 * syntax.c (skip_chars, skip_syntaxes): Fix type errors.
7488
7489 2008-02-01 Kenichi Handa <handa@m17n.org>
7490
7491 * xterm.c (x_new_font): Optimize for the case that the font is
7492 already set for the frame.
7493
7494 2008-02-01 Kenichi Handa <handa@m17n.org>
7495
7496 * chartab.c (char_table_ascii): Check if the char table contents
7497 is sub-char-table or not.
7498 (char_table_set, char_table_set_range): Fix argument to
7499 char_table_ascii.
7500
7501 * coding.c (CATEGORY_MASK_RAW_TEXT): New macro.
7502 (detect_coding_utf_8, detect_coding_utf_16)
7503 (detect_coding_emacs_mule, detect_coding_iso_2022)
7504 (detect_coding_sjis, detect_coding_big5)
7505 (detect_coding_ccl, detect_coding_charset): Change argument MASK
7506 to DETECT_INFO. Update DETECT_INFO and return 1 if the byte
7507 sequence is valid in this coding system. Change callers.
7508 (MAX_ANNOTATION_LENGTH): New macro.
7509 (ADD_ANNOTATION_DATA): New macro.
7510 (ADD_COMPOSITION_DATA): Change argument. Change callers. Call
7511 ADD_ANNOTATION_DATA. Change the format of annotation data.
7512 (ADD_CHARSET_DATA): New macro.
7513 (emacs_mule_char): New argument ID. Change callers.
7514 (decode_coding_emacs_mule, decode_coding_iso_2022)
7515 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
7516 Produce charset annotation data in coding->charbuf.
7517 (encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
7518 to charset annotation data in coding->charbuf.
7519 (setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
7520 coding->common_flags if the coding system is iso-2022 based and
7521 uses designation.
7522 (produce_composition): Adjust for the new annotation data format.
7523 (produce_charset): New function.
7524 (produce_annotation): Handle charset annotation.
7525 (handle_composition_annotation, handle_charset_annotation): New
7526 functions.
7527 (consume_chars): Handle charset annotation. Utilize the above two
7528 functions.
7529 (encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
7530 buffer, get the deleted text as a string and set
7531 coding->src_object to that string.
7532 (detect_coding, detect_coding_system): Use the new struct
7533 coding_detection_info.
7534
7535 * coding.h (struct coding_detection_info): New structure.
7536 (struct coding_system): Adjust prototype of the member `detector'.
7537 (CODING_ANNOTATE_CHARSET_MASK): New macro.
7538
7539 2008-02-01 Kenichi Handa <handa@m17n.org>
7540
7541 * insdel.c (insert_from_gap): Fix argument to offset_intervals.
7542
7543 2008-02-01 Dave Love <fx@gnu.org>
7544
7545 * keymap.c (apropos_predicate, apropos_accumulate): Declare static.
7546 (Fapropos_internal): Don't gcpro apropos_accumulate. Set result
7547 to new local and nullify apropos_accumulate before returning.
7548 (syms_of_keymap): Staticpro and initialize apropos_accumulate.
7549
7550 2008-02-01 Kenichi Handa <handa@m17n.org>
7551
7552 * charset.c (Fdefine_charset_internal): Setup charset.fast_map
7553 correctly.
7554
7555 2008-02-01 Dave Love <fx@gnu.org>
7556
7557 * fns.c (Flanginfo): Call synchronize_system_time_locale.
7558
7559 2008-02-01 Kenichi Handa <handa@m17n.org>
7560
7561 The following changes are to make character composition happen
7562 automatically on displaying.
7563
7564 * Makefile.in (lisp, shortlisp): Add composite.elc.
7565
7566 * composite.h (Qauto_composed, Vauto_composition_function)
7567 (Qauto_composition_function): Extern them.
7568
7569 * composite.c (Vcomposition_function_table)
7570 (Qcomposition_function_table): Delete variables.
7571 (Qauto_composed, Vauto_composition_function)
7572 (Qauto_composition_function): New variables.
7573 (run_composition_function): Don't call
7574 compose-chars-after-function.
7575 (update_compositions): Clear `auto-composed' text property.
7576 (compose_chars_in_text): Delete this function.
7577 (syms_of_composite): Staticpro Qauto_composed and
7578 Qauto_composition_function. Declare Vauto_composition_function as
7579 a Lisp variable.
7580
7581 * dispextern.h (enum prop_idx): Add member AUTO_COMPOSED_PROP_IDX.
7582
7583 * xdisp.c (it_props): Add an entry for Qauto_composed.
7584 (handle_auto_composed_prop): New function.
7585
7586 * xselect.c (selection_data_to_lisp_data): Don't call
7587 compose_chars_in_text.
7588
7589 2008-02-01 Dave Love <fx@gnu.org>
7590
7591 * keyboard.c (read_char): Modify checking around use of
7592 Vkeyboard_translate_table.
7593
7594 * xterm.c (XTread_socket): Check Lisp types for Vx_keysym_table
7595 and fix C types.
7596
7597 2008-02-01 Kenichi Handa <handa@m17n.org>
7598
7599 * coding.c (decode_coding_utf_8, decode_coding_emacs_mule)
7600 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
7601 (decode_coding_charset, produce_chars): When eol_type is Qdos, handle
7602 the case that the last byte is '\r' correctly.
7603 (decode_coding): Flush out the unprocessed data correctly.
7604 (decode_coding_gap): Set CODING_MODE_LAST_BLOCK bit of coding->mode.
7605
7606 2008-02-01 Dave Love <fx@gnu.org>
7607
7608 * xterm.c (XTread_socket): Fix changes for defined keysyms.
7609 Add XK_ISO... case.
7610 (xaw_scroll_callback): Revert last change.
7611
7612 2008-02-01 Kenichi Handa <handa@m17n.org>
7613
7614 * charset.c (Fset_charset_priority): Update Viso_2022_charset_list.
7615
7616 2008-02-01 Kenichi Handa <handa@m17n.org>
7617
7618 * xfaces.c (Vface_resizing_fonts): New variable.
7619 (struct font_name): New member `resizing_ratio'.
7620 (font_resizing_ratio): New function.
7621 (split_font_name): Set font->resizing_ratio.
7622 (better_font_p): Pay attention to font->resizing_ratio.
7623 (build_scalable_font_name): Likewise. Don't change POINT_SIZE,
7624 RESX, and RESY fields.
7625 (try_alternative_families): Try scalable fonts if
7626 Vscalable_fonts_allowed is not Qt.
7627 (syms_of_xfaces): Declare Vface_resizing_fonts as a Lisp variable.
7628
7629 2008-02-01 Dave Love <fx@gnu.org>
7630
7631 * xterm.c (xaw_scroll_callback): Cast correctly.
7632
7633 2008-02-01 Dave Love <fx@gnu.org>
7634
7635 * keyboard.c (lispy_accent_codes, lispy_accent_keys): Extend.
7636 (lispy_kana_keys): Comment out.
7637 (make_lispy_event) [XK_kana_A]: Comment out.
7638
7639 * xterm.c (xaw_scroll_callback): Cast call_data.
7640 (XTread_socket): Deal with ASCII keysyms.
7641 (syms_of_xterm) <Vx_keysym_table>: Fix args of make_hash_table.
7642
7643 2008-02-01 Dave Love <fx@gnu.org>
7644
7645 * xterm.c (Vx_keysym_table): New.
7646 (syms_of_xterm): Initialize it.
7647 (XTread_socket): Use it.
7648 From head: Eliminate incorrect optimization that tried to avoid
7649 decoding the output of X*LookupString.
7650 (x_get_font_repertory): Delete charset declaration.
7651
7652 2008-02-01 Kenichi Handa <handa@m17n.org>
7653
7654 * coding.c (detect_coding_charset): If only ASCII bytes are found,
7655 return 0.
7656 (Fdefine_coding_system_internal): Setup
7657 CODING_ATTR_ASCII_COMPAT (attrs) correctly.
7658
7659 2008-02-01 Dave Love <fx@gnu.org>
7660
7661 * coding.c (Fcheck_coding_system): Doc fix.
7662
7663 * editfns.c (Finsert_byte): Return a proper value.
7664
7665 2008-02-01 Kenichi Handa <handa@m17n.org>
7666
7667 * coding.c (decode_coding): Fix args to translate_chars. Pay
7668 attention to Vstandard_translation_table_for_decode.
7669 (encode_coding): Fix args to translate_chars. Pay attention to
7670 Vstandard_translation_table_for_encode.
7671
7672 * data.c (Faset): Check NEWELT by ASCII_CHAR_P, not by
7673 SINGLE_BYTE_CHAR_P.
7674
7675 * editfns.c (general_insert_function): Check VAL by ASCII_CHAR_P,
7676 not by SINGLE_BYTE_CHAR_P.
7677
7678 * fns.c (concat): Check CH by ASCII_CHAR_P, not by
7679 SINGLE_BYTE_CHAR_P.
7680
7681 * insdel.c (copy_text): Check C by ASCII_CHAR_P, not by
7682 SINGLE_BYTE_CHAR_P.
7683
7684 * keymap.c (Ftext_char_description): Check C by ASCII_CHAR_P, not
7685 by SINGLE_BYTE_CHAR_P.
7686
7687 * search.c (Freplace_match): Check C by ASCII_CHAR_P, not by
7688 SINGLE_BYTE_CHAR_P.
7689
7690 2008-02-01 Dave Love <fx@gnu.org>
7691
7692 * fns.c (Fstring_as_multibyte, Fstring_to_multibyte): Doc fix.
7693
7694 2008-02-01 Dave Love <fx@gnu.org>
7695
7696 * fns.c (Flanginfo): Fix typo.
7697
7698 * unexelf.c (unexec): Make last change conditional on Irix 6.5.
7699
7700 2008-02-01 Kenichi Handa <handa@m17n.org>
7701
7702 * coding.c (detect_coding_utf_8, detect_coding_utf_16)
7703 (detect_coding_emacs_mule, detect_coding_iso_2022)
7704 (detect_coding_sjis, detect_coding_big5, detect_coding_ccl): Check
7705 incomplete byte sequence. Don't update *mask when correctly detected.
7706 (decode_coding_sjis): Fix decoding of katakana-jisx0201.
7707 (detect_eol): Delete the argument CODING, and add the argument CATEGORY.
7708 (detect_coding, detect_coding_system): Adjust for the changes above.
7709
7710 2008-02-01 Kenichi Handa <handa@m17n.org>
7711
7712 * character.c (char_string): Rename from
7713 char_string_with_unification. Pay attention to CHAR_MODIFIER_MASK.
7714 (string_char): Rename from string_char.
7715
7716 * character.h (CHAR_STRING, CHAR_STRING_ADVANCE): Call char_string
7717 if C is greater than MAX_3_BYTE_CHAR.
7718 (STRING_CHAR, STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE): Call
7719 string_char instead of string_char_with_unification.
7720
7721 2008-02-01 Dave Love <fx@gnu.org>
7722
7723 * coding.c (decode_coding_utf_8): Treat surrogates as invalid.
7724
7725 2008-02-01 Kenichi Handa <handa@m17n.org>
7726
7727 * keymap.c (push_key_description): Pay attention to force_multibyte.
7728
7729 * regex.c (re_search_2): Fix for the case of unibyte buffer.
7730
7731 2008-02-01 Dave Love <fx@gnu.org>
7732
7733 * charset.c (define_charset_internal): Rename `supprementary'.
7734
7735 * Makefile.in (lisp, shortlisp): Remove latin-N.
7736
7737 2008-02-01 Dave Love <fx@gnu.org>
7738
7739 * xfns.c (x_window, x_window): Use use_xim.
7740
7741 * xterm.c (use_xim): Initialize.
7742 (xim_open_dpy, xim_initialize, xim_close_dpy): Use use_xim.
7743 (x_term_init): Maybe set use_xim.
7744
7745 * xterm.h (use_xim) [HAVE_X_I18N]: Declare.
7746
7747 2008-02-01 Kenichi Handa <handa@m17n.org>
7748
7749 * search.c (search_buffer): Fix case-fold-search of multibyte
7750 characters.
7751 (boyer_moore): Rename the last argument to char_high_bits.
7752
7753 2008-02-01 Kenichi Handa <handa@m17n.org>
7754
7755 * xdisp.c (display_string): Fix for the case of zero width glyph.
7756
7757 * xfns.c (x_set_font): Change the error message of the case that
7758 x_new_fontset returns Qt.
7759
7760 * xfaces.c (set_lface_from_font_name): Reject the default fontset.
7761 (Finternal_set_lisp_face_attribute): Use signal_error for the
7762 error of invalid fontset.
7763
7764 * xterm.c (x_new_fontset): If FONTSETNAME specifies the default
7765 fontset, return Qt.
7766
7767 2008-02-01 Dave Love <fx@gnu.org>
7768
7769 * unexelf.c (unexec): Make .got handling not SGI-specific.
7770
7771 * syntax.c (syms_of_syntax) <multibyte-syntax-as-symbol>: Doc fix.
7772
7773 * regex.c: Use `ifdef HAVE_ALLOCA_H', not `if HAVE_ALLOCA_H'.
7774
7775 * keyboard.c (read_key_sequence): Fix type error.
7776
7777 * buffer.c (Fset_buffer_multibyte, Fset_buffer_multibyte): Fix
7778 type error.
7779
7780 * fontset.c (fontset_add): Return Lisp_Object.
7781
7782 2008-02-01 Dave Love <fx@gnu.org>
7783
7784 * charset.h (charset_ordered_list_tick): Declare extern.
7785
7786 2008-02-01 Kenichi Handa <handa@m17n.org>
7787
7788 The following changes (and some of 2008-02-01 changes of mine) are
7789 for handling syntax, category, and case conversion for unibyte
7790 characters by converting them to multibyte on the fly. With these
7791 changes, we don't have to setup syntax and case tables for unibyte
7792 characters in each language environment.
7793
7794 * abbrev.c (Fexpand_abbrev): Convert a unibyte character to
7795 multibyte if necessary.
7796
7797 * bytecode.c (Fbyte_code): Likewise.
7798
7799 * character.h (LEADING_CODE_LATIN_1_MIN)
7800 (LEADING_CODE_LATIN_1_MAX): New macros.
7801 (unibyte_to_multibyte_table): Extern it.
7802 (unibyte_char_to_multibyte): New macro.
7803 (MAKE_CHAR_MULTIBYTE): Use unibyte_to_multibyte_table.
7804 (CHAR_LEADING_CODE): New macro.
7805 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): New macro.
7806
7807 * character.c (unibyte_to_multibyte_table): New variable.
7808 (unibyte_char_to_multibyte): Move to character.h and define as macro.
7809 (multibyte_char_to_unibyte): If C is an eight-bit character,
7810 convert it to the corresponding byte value.
7811
7812 * charset.c (Fset_unibyte_charset): If the dimension of CHARSET is
7813 not 1, singals an error. Update the elements of
7814 unibyte_to_multibyte_table.
7815 (init_charset_once): Initialize unibyte_to_multibyte_table.
7816 (syms_of_charset): Define the charset `iso-8859-1'.
7817
7818 * cmds.c (internal_self_insert): In a multibyte buffer, insert C
7819 as is without converting it to unibyte. In a unibyte buffer,
7820 convert C to multibyte before checking the syntax.
7821
7822 * lisp.h (unibyte_char_to_multibyte): Delete extern.
7823
7824 * minibuf.c (Fminibuffer_complete_word): Use the macro
7825 FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
7826
7827 * regex.h (struct re_pattern_buffer): New member target_multibyte.
7828
7829 * regex.c (RE_TARGET_MULTIBYTE_P): New macro.
7830 (GET_CHAR_BEFORE_2): Check target_multibyte, not multibyte. If
7831 that is zero, convert an eight-bit char to multibyte.
7832 (MAKE_CHAR_MULTIBYTE, CHAR_LEADING_CODE): New dummy new macros for
7833 non-emacs case.
7834 (PATFETCH): Convert an eight-bit char to multibyte.
7835 (HANDLE_UNIBYTE_RANGE): New macro.
7836 (regex_compile): Setup the compiled pattern for multibyte chars
7837 even if the given regex string is unibyte. Use PATFETCH_RAW
7838 instead of PATFETCH in many places. To handle `charset'
7839 specification of unibyte, call HANDLE_UNIBYTE_RANGE. Use bitmap
7840 only for ASCII chars.
7841 (analyse_first) <exactn>: Simplify because the compiled pattern
7842 is multibyte.
7843 <charset_not>: Setup fastmap from bitmap only for ASCII chars.
7844 <charset>: Use CHAR_LEADING_CODE to get leading codes.
7845 <categoryspec>: If multibyte, setup fastmap only for ASCII chars here.
7846 (re_compile_fastmap) [emacs]: Call analyse_first with the arg
7847 multibyte always 1.
7848 (re_search_2): In emacs, set the locale variable multibyte to 1,
7849 otherwise to 0. New local variable target_multibyte. Check it
7850 to decide the multibyteness of STR1 and STR2. If
7851 target_multibyte is zero, convert unibyte chars to multibyte
7852 before translating and checking fastmap.
7853 (TARGET_CHAR_AND_LENGTH): New macro.
7854 (re_match_2_internal): In emacs, set the locale variable multibyte
7855 to 1, otherwise to 0. New local variable target_multibyte. Check
7856 it to decide the multibyteness of STR1 and STR2. Use
7857 TARGET_CHAR_AND_LENGTH to fetch a character from D.
7858 <charset, charset_not>: If multibyte is nonzero, check fastmap
7859 only for ASCII chars. Call bcmp_translate with
7860 target_multibyte, not with multibyte.
7861 <begline>: Declare the local variable C as `unsigned'.
7862 (bcmp_translate): Change the last arg name to target_multibyte.
7863
7864 * search.c (compile_pattern_1): Don't adjust the multibyteness of
7865 the regexp pattern and the matching target. Set cp->buf.multibyte
7866 to the multibyteness of the regexp pattern. Set
7867 cp->but.target_multibyte to the multibyteness of the matching target.
7868 (wordify): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE instead of
7869 FETCH_STRING_CHAR_ADVANCE.
7870 (Freplace_match): Convert unibyte chars to multibyte.
7871
7872 * syntax.c (char_quoted, back_comment, scan_words)
7873 (Fforward_comment, scan_lists, Fbackward_prefix_chars)
7874 (scan_sexps_forward): Use FETCH_CHAR_AS_MULTIBYTE to convert
7875 unibyte chars to multibyte.
7876 (skip_chars): Delete the arg syntaxp, and move the code for
7877 handling syntaxes to skip_syntaxes. Change callers.
7878 Fix the case that the multibyteness of STRING and the current
7879 buffer doesn't match.
7880 (skip_syntaxes): New function.
7881 (SYNTAX_WITH_MULTIBYTE_CHECK): Check C by ASCII_CHAR_P, not by
7882 SINGLE_BYTE_CHAR_P.
7883
7884 2008-02-01 Kenichi Handa <handa@m17n.org>
7885
7886 * xfaces.c (QCfontset): New variable.
7887 (LFACE_FONTSET): New macro.
7888 (check_lface_attrs): Check also LFACE_FONTSET_INDEX.
7889 (set_lface_from_font_name): Setup LFACE_FONTSET (lface).
7890 (Finternal_set_lisp_face_attribute)
7891 (Finternal_get_lisp_face_attribute): Handle QCfontset.
7892 (lface_same_font_attributes_p): Fix checking of LFACE_FONT_INDEX,
7893 check also LFACE_FONTSET_INDEX.
7894 (face_fontset): Check attrs[LFACE_FONTSET_INDEX], not
7895 attrs[LFACE_FONT_INDEX].
7896 (syms_of_xfaces): Intern and staticpro QCfontset.
7897
7898 * dispextern.h (enum lface_attribute_index): New member
7899 LFACE_FONTSET_INDEX.
7900
7901 * fns.c (base64_encode_1): Handle eight-bit chars correctly.
7902
7903 2008-02-01 Kenichi Handa <handa@m17n.org>
7904
7905 * coding.c (coding_set_destination): Fix coding->destination for
7906 the case converting a region.
7907 (encode_coding_utf_8): Encode eight-bit chars as single byte.
7908 (encode_coding_object): Fix coding->dst_pos and
7909 coding->dst_pos_byte for the case converting a region.
7910
7911 * insdel.c (insert_from_gap): Make it work even if PT != GTP.
7912
7913 * character.h (BYTE8_STRING): New macro.
7914
7915 * fns.c (base64_decode_1): Insert eight-bit chars correctly.
7916
7917 2008-02-01 Kenichi Handa <handa@m17n.org>
7918
7919 * xdisp.c (get_next_display_element): Don't display unibyte 8-bit
7920 characters by octal form.
7921
7922 * abbrev.c (Fexpand_abbrev): Fix for the multibyte case.
7923
7924 * buffer.h (_fetch_multibyte_char_len): Delete extern.
7925 (FETCH_MULTIBYTE_CHAR, BUF_FETCH_MULTIBYTE_CHAR): Don't use
7926 _fetch_multibyte_char_len.
7927 (FETCH_CHAR_AS_MULTIBYTE): New macro.
7928
7929 * casetab.c (set_canon, set_identity, shuffle): Simplify.
7930
7931 * casefiddle.c (casify_object): Simplify. Handle the case that
7932 the case conversion change the byte length.
7933 (casify_region): Likewise.
7934
7935 * character.h (MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New macros.
7936
7937 * character.c (_fetch_multibyte_char_len): Delet this variable.
7938 (syms_of_character): Setup Vprintable_chars.
7939
7940 * editfns.c (Fchar_equal): Fix for the unibyte case.
7941 (Finsert_byte): New function.
7942 (syms_of_editfns): Defsubr it.
7943
7944 * keyboard.c (read_key_sequence): Use ~CHAR_MODIFIER_MASK instead
7945 of direct code 0x3ffff.
7946
7947 * search.c (Freplace_match): Fix for the unibyte case.
7948
7949 2008-02-01 Kenichi Handa <handa@m17n.org>
7950
7951 * lread.c (safe_to_load_p): Fix the logic.
7952
7953 * syntax.c (scan_words): Don't treat characters belonging to
7954 different scripts as constituting a word.
7955
7956 * editfns.c (Fformat): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
7957
7958 * fontset.c (Fset_fontset_font): Treat `ascii' as charset, not script.
7959
7960 * emacs.c (main): In the case of --unibyte, instead of aborting on
7961 finding non-empty buffer, make it unibyte.
7962
7963 2008-02-01 Kenichi Handa <handa@m17n.org>
7964
7965 * xterm.c (x_new_fontset): Call `create-fontset-from-ascii-font'
7966 to create a fontset.
7967
7968 2008-02-01 Dave Love <fx@gnu.org>
7969
7970 * character.c (Funibyte_char_to_multibyte): Doc fix.
7971
7972 * xfns.c [HAVE_STDLIB_H]: Fix last change.
7973
7974 2008-02-01 Kenichi Handa <handa@m17n.org>
7975
7976 * fontset.c (fontset_add): Make the type `int'.
7977 (fontset_id_valid_p): Define it if FONTSET_DEBUG is defined.
7978
7979 * character.c (unibyte_char_to_multibyte)
7980 (multibyte_char_to_unibyte, Funibyte_char_to_multibyte): Refer to
7981 charset_unibyte, not charset_primary.
7982
7983 * charset.h (charset_unibyte): Extern it instead of charset_primary.
7984
7985 * charset.c (charset_unibyte): Rename from charset_primary.
7986 (Funibyte_charset): Rename from Fprimary_charset.
7987 (Fset_unibyte_charset): Rename from Fset_primary_charset.
7988 (syms_of_charset): Adjust for the above changes.
7989
7990 * w32term.c (x_produce_glyphs): Use ASCII_CHAR_P, not
7991 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
7992 it->multibyte_p is zero.
7993
7994 * lisp.h (nonascii_insert_offset, Vnonascii_translation_table):
7995 Delete extern.
7996
7997 2008-02-01 Kenichi Handa <handa@m17n.org>
7998
7999 * coding.c (Fdefine_coding_system_internal): Fix category setting
8000 for a coding system of type iso-2022.
8001
8002 2008-02-01 Kenichi Handa <handa@m17n.org>
8003
8004 * fontset.h (FS_LOAD_FONT): Call fs_load_font with the arg CHARSET -1.
8005
8006 2008-02-01 Kenichi Handa <handa@m17n.org>
8007
8008 * syntax.c (Vnext_word_boundary_function_table): New variable.
8009 (next-word-boundary-function-table): Declare it as a Lisp variable
8010 in syms_of_syntax.
8011 (scan_words): Call functions in Vnext_word_boundary_function_table
8012 if any.
8013
8014 * xterm.c (x_load_font): Initialize fontp->fontset to -1.
8015
8016 * fontset.c (fs_load_font): If fontp->charset is not negative,
8017 return fontp without setting its members.
8018
8019 2008-02-01 Dave Love <fx@gnu.org>
8020
8021 * xfns.c [HAVE_STDLIB_H]: Change logic (instead of fixing typo).
8022
8023 * m/sparc.h (HAVE_ALLOCA): Delete.
8024
8025 * s/irix6-5.h: Don't include strings.h.
8026 (bcopy, bzero, bcmp): Don't undef.
8027
8028 * s/irix6-0.h (bcopy, bzero, bcmp): Don't undef.
8029
8030 * s/usg5-4.h (NO_SIOCTL_H): Don't define.
8031 (TIOCSIGSEND): Don't test IRIX6.
8032 (bcopy, bzero, bcmp): Define conditionally.
8033
8034 2008-02-01 Kenichi Handa <handa@m17n.org>
8035
8036 * buffer.c (Qas, Qmake, Qto): New variables.
8037 (Fset_buffer_multibyte): New optional arg METHOD. Change caller.
8038 (syms_of_buffer): Intern and staticpro Qas, Qmake, and Qto.
8039
8040 * callproc.c (Fcall_process): Don't call insert_1_both directly if
8041 we are inserting a process output into a multibyte buffer.
8042
8043 * character.h (CHAR_TO_BYTE8): If C is not eight-bit char, call
8044 multibyte_char_to_unibyte.
8045
8046 * character.c (Funibyte_char_to_multibyte): If C can't be decoded
8047 by the primary charset, make it eight-bit char.
8048 (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8.
8049
8050 * charset.c (charset_eight_bit, Qeight_bit_control): New variables.
8051 (charset_8_bit__control, charset_8_bit_graphic)
8052 (Qeight_bit_control, Qeight_bit_graphic): Delete these variables.
8053 (define_charset_internal): New function.
8054 (syms_of_charset): Call define_charset_internal for pre-defined
8055 charsets.
8056
8057 * charset.h (charset_8_bit): Extern it.
8058
8059 * coding.c (make_conversion_work_buffer): Adjust for the change
8060 of Fset_buffer_multibyte.
8061 (encode_coding_raw_text): Increment p0 in the loop.
8062
8063 * lisp.h (Fset_buffer_multibyte): Adjust prototype.
8064
8065 * xdisp.c (setup_echo_area_for_printing, set_message_1): Adjust
8066 for the change of Fset_buffer_multibyte.
8067
8068 * fns.c (Fstring_to_multibyte): New function.
8069 (syms_of_fns): Declare Fstring_to_multibyte as Lisp subroutine.
8070
8071 2008-02-01 Dave Love <fx@gnu.org>
8072
8073 * xfns.c (x_put_x_image): Declare args.
8074
8075 * xfaces.c (font_name_registry, choose_face_font): Delete unused vars.
8076 (try_font_list): Declare an arg.
8077
8078 * xdisp.c (message2_nolog, set_message): Declare an arg.
8079
8080 * terminfo.c (tparam): Declare an arg. Use P_ to declare tparm.
8081
8082 * syntax.c (scan_sexps_forward): Declare an arg.
8083
8084 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
8085 Declare an arg.
8086
8087 * lisp.h (Fnew_fontset): Declare.
8088
8089 * keymap.c (push_key_description): Call CHARACTERP correctly.
8090
8091 * fontset.c (fontset_add): Declare args. Call make_number correctly.
8092 (face_for_char): Delete unused vars.
8093 (Fset_fontset_font): Doc fix. Delete unused vars.
8094
8095 * doc.c (Fsubstitute_command_keys): Delete unused vars.
8096
8097 * composite.c (update_compositions): Declare arg.
8098
8099 * cm.c (calccost, cmgoto): Declare args.
8100
8101 * charset.c: Remove `emacs' conditional. Doc fixes.
8102 (map_char_table_for_charset): Declare.
8103
8104 * character.c (syms_of_character) <translation-table-vector>: Doc fix.
8105
8106 * ccl.c: Remove `emacs' conditional.
8107
8108 2008-02-01 Kenichi Handa <handa@m17n.org>
8109
8110 The following changes are to allow specifying multiple font
8111 patterns for a character range (specified by script or charset).
8112
8113 * Makefile.in (abbrev.o): Depend on syntax.h.
8114 (xfaces.o): Depend on charset.h.
8115
8116 * alloc.c (Fmake_string): Use ASCII_CHAR_P, not
8117 SINGLE_BYTE_CHAR_P.
8118
8119 * ccl.c (Fccl_execute_on_string): Add `const' to local variables.
8120
8121 * character.h (Vchar_script_table): Extern it.
8122
8123 * character.c (Vscript_alist): Delete.
8124 (Vchar_script_table, Qchar_script_table): New variable.
8125 (syms_of_character): Declare Vchar_script_table as a lisp variable
8126 and initialize it.
8127
8128 * chartab.c (Fmake_char_table): Doc fix. If PURPOSE doesn't
8129 have property char-table-extra-slots, make no extra slot.
8130
8131 * dispextern.h (struct face): Delete member `charset'.
8132 (FACE_SUITABLE_FOR_CHAR_P, FACE_FOR): Use ASCII_CHAR_P, not
8133 SINGLE_BYTE_CHAR_P.
8134 (choose_face_font, lookup_non_ascii_face, font_name_registry):
8135 Add prototypes.
8136 (lookup_face, lookup_named_face, lookup_derived_face): Fix prototype.
8137 (generate_ascii_font_name): Rename from generate_ascii_font.
8138
8139 * fontset.h (get_font_repertory_func): New prototype.
8140 (make_fontset_for_ascii_face, fs_load_font): Fix prototypes.
8141 (FS_LOAD_FONT): Call fs_load_font with the 3rd arg charset_ascii.
8142
8143 * fontset.c (Qprepend, Qappend): New variables.
8144 (FONTSET_CHARSET_ALIST, FONTSET_FACE_ALIST): Delete.
8145 (FONTSET_NOFONT_FACE, FONTSET_REPERTORY): New macros.
8146 (FONTSET_REF): Optimize if FONTSET is Vdefault_fontset.
8147 (FONTSET_REF_AND_RANGE, FONTSET_ADD): New macros.
8148 (fontset_ref_and_range, fontset_add, reorder_font_vector)
8149 (load_font_get_repertory): New functions.
8150 (fontset_set): Delete.
8151 (fontset_face): New arg FACE. Return face ID, not face.
8152 Complete re-write to handle new fontset structure. Change caller.
8153 (free_face_fontset): Use ASET istead of AREF (X) = Y.
8154 (face_for_char): Don't call lookup_face.
8155 (make_fontset_for_ascii_face): New arg FACE.
8156 (fs_load_font): New arg CHARSET_ID. Don't check
8157 Vfont_encoding_alist here.
8158 (find_font_encoding): New function.
8159 (list_fontsets): Use STRINGP, not ! NILP.
8160 (accumulate_script_ranges): New function.
8161 (Fset_fontset_font, Fnew_fontset, Ffontset_info): Completely
8162 re-written to handle new fontset structure.
8163 (Ffontset_font): Return a copy of element.
8164 (syms_of_fontset): Define symbols Qprepend and Qappend. Fix
8165 docstring of font-encoding-alist.
8166
8167 * lisp.h (CHAR_TABLE_REF): Remove unnecessary check (IDX >= 0).
8168 (Fset_fotset_font): Fix arguments to 5.
8169
8170 * msdos.c (XMenuActivate): Adjust for the change of lookup_derived_face.
8171
8172 * xdisp.c (message_dolog, set_message_1, extend_face_to_end_of_line):
8173 Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
8174 (highlight_trailing_whitespace): Adjust for the change of
8175 lookup_named_face.
8176
8177 * xfaces.c: Include charset.h.
8178 (load_face_font): Delete argument C. Change caller.
8179 (generate_ascii_font_name): Rename from generate_ascii_font.
8180 (font_name_registry): New function.
8181 (cache_face): Store ascii faces before non-ascii faces in buckets.
8182 (lookup_face): Delete arguments C and BASE_FACE. Change caller.
8183 Lookup only ascii faces.
8184 (lookup_non_ascii_face): New function.
8185 (lookup_named_face): Delete argument C. Change caller.
8186 (lookup_derived_face): Delete argument C. Change caller.
8187 (try_font_list): New arg PATTERN. Change caller. If PATTERN is
8188 a string, just call font_list with it.
8189 (choose_face_font): Delete arguments FACE and C. New arg
8190 FONT_SPEC. Change caller.
8191 (realize_face, realize_x_face): Delete arguments C and BASE_FACE.
8192 Change caller.
8193 (realize_non_ascii_face): New function.
8194 (realize_x_face): Call load_face_font here.
8195 (realize_tty_face): Delete argument C. Change caller.
8196 (compute_char_face): If CH is not ascii, call FACE_FOR_CHAR to
8197 get a face ID.
8198 (dump_realized_face): Don't print charset of FACE.
8199
8200 * xfns.c (x_set_font): Always call x_new_fontset and
8201 store_frame_parameter.
8202 (Fx_create_frame): Call x_new_fontset, not x_new_font.
8203 (syms_of_xfns): Set get_font_repertory_func to x_get_font_repertory.
8204
8205 * xterm.h (x_get_font_repertory): Extern it.
8206
8207 * xterm.c (x_produce_glyphs): Use ASCII_CHAR_P, not
8208 SINGLE_BYTE_CHAR_P. Fix the logic of handling non-ASCII char when
8209 it->multibyte_p is zero.
8210 (XTread_socket): Use ASCII_CHAR_P, not SINGLE_BYTE_CHAR_P.
8211 (x_new_fontset): If FONTSETNAME doesn't match any existing
8212 fontsets, create a new one.
8213 (x_get_font_repertory): New function.
8214
8215 2008-02-01 Kenichi Handa <handa@m17n.org>
8216
8217 * coding.c (Ffind_coding_systems_region_internal): Detect an
8218 ASCII only string correctly.
8219
8220 * lread.c (Fload): Don't load with Qload_force_doc_strings t if
8221 version is 0.
8222
8223 2008-02-01 Kenichi Handa <handa@m17n.org>
8224
8225 * lread.c: Include "coding.h".
8226 (Qget_emacs_mule_file_char, Qload_force_doc_strings)
8227 (load_each_byte, unread_char): New variables.
8228 (readchar_backlog): Delete.
8229 (readchar): Return a character unless load_each_byte is nonzero.
8230 Handle the case that readcharfun is Qget_emacs_mule_file_char or a
8231 cons. If unread_char is not -1, simply return it.
8232 (unreadchar): Handle the case that readcharfun is
8233 Qget_emacs_mule_file_char or a cons. Set unread_char if necessary.
8234 (read_multibyte): Delete.
8235 (readbyte_for_lambda, readbyte_from_file, readbyte_from_string)
8236 (read_emacs_mule_char): New functions.
8237 (Fload): Even if the file doesn't have the extention ".elc", if
8238 safe_to_load_p returns a positive version number, assume that the
8239 file contains bytecompiled code. If the version is less than 22,
8240 load the file while decoding multibyte sequences by emacs-mule.
8241 (readevalloop): Don't use readchar_backlog.
8242 (Fread): Likewise. Pay attention to the case that STREAM is a cons.
8243 (Fread_from_string): Pay attention to the case that STREAM is a cons.
8244 (read_escape): Delete the arg BYTEREP.
8245 (read1): Set load_each_byte to 1 temporarily while handling
8246 #@NUMBER. Don't call read_multibyte.
8247 (read_vector): Call Fread with a cons. If readcharfun is
8248 Qget_emacs_mule_file_char, decode the read string by emacs-mule.
8249 (read_list): If doc_reference is 2, make the cdr part string as unibyte.
8250 (syms_of_lread): Intern and staticpro Qget_emacs_mule_file_char
8251 and Qload_force_doc_strings.
8252
8253 2008-02-01 Kenichi Handa <handa@m17n.org>
8254
8255 * xdisp.c (face_before_or_after_it_pos): Call
8256 FETCH_MULTIBYTE_CHAR with byte postion, not char position.
8257
8258 2008-02-01 Kenichi Handa <handa@m17n.org>
8259
8260 * character.h (TRAILING_CODE_P): New macro.
8261 (MAYBE_UNIFY_CHAR): Adjust for the change of Funify_charset.
8262 (string_char_with_unification): Fix prototype.
8263 (Vscript_alist): Extern it.
8264
8265 * character.c (Vscript_alist): New variable.
8266 (string_char_with_unification, str_as_unibyte)
8267 (string_escape_byte8): Add `const' to local variables.
8268 (syms_of_character): Declare script-alist as a Lisp variable.
8269
8270 * charset.h (Vcharset_ordered_list): Extern it.
8271 (charset_ordered_list_tick): Extern it.
8272 (EMACS_MULE_LEADING_CODE_PRIVATE_11)
8273 (EMACS_MULE_LEADING_CODE_PRIVATE_12)
8274 (EMACS_MULE_LEADING_CODE_PRIVATE_21)
8275 (EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros.
8276 (Funify_charset): Adjust for the change of Funify_charset.
8277
8278 * charset.c (charset_ordered_list_tick): New variable.
8279 (Fdefine_charset_internal): Increment charset_ordered_list_tick.
8280 (Funify_charset): New optional arg DEUNIFY. If it is non-nil,
8281 deunify intead of unify a charset.
8282 (string_xstring_p): Add `const' to local variables.
8283 (find_charsets_in_text): Add `const' to arguemnts and local variables.
8284 (encode_char): Adjust for the change of Funify_charset. Fix
8285 detecting of invalid code.
8286 (Fset_charset_priority): Increment charset_ordered_list_tick.
8287 (Fmap_charset_chars): Fix handling of default value for FROM_CODE
8288 and TO_CODE.
8289
8290 * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12)
8291 (LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Delete macros.
8292 Changed callers to use EMACS_MULE_LEADING_CODE_PRIVATE_11, etc.
8293 (decode_coding_ccl, consume_chars)
8294 (Ffind_coding_systems_region_internal)
8295 (Fcheck_coding_systems_region): Add `const' to local variables.
8296
8297 * print.c (print_object): Use octal form for printing the
8298 contents of a bool vector.
8299
8300 2008-02-01 Dave Love <fx@gnu.org>
8301
8302 * lread.c (Fload) <!load_dangerous_libraries>: Don't leak fd.
8303 <version == 20>: Refuse to load.
8304
8305 2008-02-01 Dave Love <fx@gnu.org>
8306
8307 * fns.c: Move coding.h.
8308 (Qcodeset, Qdays, Qmonths): New.
8309 (concat): Use CHARACTERP instead of INTERGERP.
8310 (Flocale_codeset): Delete.
8311 (Flanginfo): New function.
8312 (syms_of_fns): Change accordingly.
8313
8314 * coding.c (adjust_coding_eol_type): Fix eol_type/eol_seen mixup.
8315
8316 2008-02-01 Dave Love <fx@gnu.org>
8317
8318 * casetab.c (init_casetab_once, init_casetab_once): Fix
8319 CHAR_TABLE_SET call.
8320
8321 * category.c (Fmodify_category_entry): Fix CATEGORY_MEMBER call.
8322
8323 * character.c (syms_of_character): Fix CHAR_TABLE_SET call.
8324
8325 * charset.c (Fmap_charset_chars): Check args. Convert Lisp types.
8326 (load_charset_map, Fdeclare_equiv_charset, Fencode_char)
8327 (Fset_charset_priority, syms_of_charset): Convert Lisp types.
8328
8329 * charset.h (CHECK_CHARSET_GET_ID): Use XINT on AREF result.
8330
8331 * coding.c (ENCODE_DESIGNATION, decode_eol)
8332 (make_conversion_work_buffer, code_conversion_restore)
8333 (Fdefine_coding_system_internal): Convert Lisp types.
8334 (code_conversion_restore): Use EQ, not ==.
8335 (Fencode_coding_string): Fix code_convert_string call.
8336
8337 * coding.h (code_convert_region): Fix prototype.
8338
8339 * dispextern.h (redraw_frame, redraw_garbaged_frames): Remove.
8340
8341 * fontset.c (fontset_ref, fontset_set, fs_load_font)
8342 (Ffontset_info): Convert Lisp types.
8343
8344 * syntax.h (SYNTAX_ENTRY_INT): Don't use make_number.
8345
8346 * xterm.c (note_mouse_movement): Fix call of window_from_coordinates.
8347
8348 * xdisp.c (display_mode_element): Fix call of Fset_text_properties.
8349
8350 * chartab.c: Include "...h", not <...h> in some cases.
8351
8352 * callproc.c (Fcall_process): Remove unused variables.
8353
8354 2008-02-01 Dave Love <fx@gnu.org>
8355
8356 * coding.c (Fset_coding_system_priority): Allow null arg list.
8357
8358 2008-02-01 Dave Love <fx@gnu.org>
8359
8360 * minibuf.c (Fminibuffer_complete_word): Remove unused var.
8361 (Fself_insert_and_exit): Use CHARACTERP.
8362
8363 * callproc.c (Fcall_process): Remove unused vars.
8364
8365 * xterm.c (XTread_socket): Add extra dead keysyms.
8366
8367 * xdisp.c (decode_mode_spec_coding): Use CHARACTERP.
8368
8369 * dispextern.h: Remove prototypes for redraw_frame,
8370 redraw_garbaged_frames.
8371
8372 * cmds.c (Fself_insert_command): Use CHARACTERP.
8373
8374 * chartab.c (make_sub_char_table): Remove unused var.
8375 (Fset_char_table_default, Fmap_char_table): Doc fix.
8376
8377 * keymap.c (access_keymap): Remove generic char code.
8378 (push_key_description): Use CHARACTERP.
8379
8380 2008-02-01 Dave Love <fx@gnu.org>
8381
8382 * charset.c: Doc fixes.
8383 (Funify_charset): Extra checking.
8384
8385 2008-02-01 Dave Love <fx@gnu.org>
8386
8387 * lread.c: Remove some unused variables.
8388 (safe_to_load_p): If safe, return the magic number version byte.
8389 (Fload): Maybe use load-with-code-conversion.
8390
8391 2008-02-01 Kenichi Handa <handa@m17n.org>
8392
8393 * category.c (Fmodify_category_entry): Don't modify the contents
8394 of category_set for characters out of the range. Avoid
8395 unnecessary modification.
8396
8397 * character.h (MAYBE_UNIFY_CHAR): Adjust for the change of
8398 Vchar_unify_table. The default value of the table is now nil.
8399
8400 * character.c (syms_of_character): Setup Vchar_width_table for
8401 eight-bit-control and raw-byte chars.
8402
8403 * charset.h (enum define_charset_arg_index): Delete
8404 charset_arg_parents and add charset_arg_subset and
8405 charset_arg_superset.
8406 (enum charset_attr_index): Delete charset_parents and add
8407 charset_subset and charset_superset.
8408 (enum charset_method): Delete CHARSET_METHOD_INHERIT and add
8409 CHARSET_METHOD_SUBSET and CHARSET_METHOD_SUPERSET.
8410 (CHARSET_ATTR_PARENTS, CHARSET_PARENTS): Delete.
8411 (CHARSET_ATTR_SUBSET, CHARSET_ATTR_SUPERSET, CHARSET_SUBSET)
8412 (CHARSET_SUPERSET): New macros.
8413 (charset_work): Extern it.
8414 (ENCODE_CHAR): Use charset_work.
8415 (CHAR_CHARSET_P): Adjust for the change of encoder format.
8416 (map_charset_chars): Extern it.
8417
8418 * charset.c (load_charset_map): Set the default value of encoder
8419 and deunifier char-tables to nil.
8420 (map_charset_chars): Change argument. Change callers. Use
8421 map_char_table_for_charset instead of map_char_table.
8422 (Fmap_charset_chars): New optional args from_code and to_code.
8423 (Fdefine_charset_internal): Adjust for the change of
8424 `define-charset' (:parents -> :subset or :superset).
8425 (charset_work): New variable.
8426 (encode_char, syms_of_charset): Adjust for the change of
8427 Fdefine_charset_internal.
8428 (Ffind_charset_string): Setup the vector `charsets' correctly.
8429
8430 * chartab.c (sub_char_table_ref_and_range): New arg default. Fix
8431 the previous change.
8432 (char_table_ref_and_range): Adjust for the above change.
8433 (map_sub_char_table_for_charset): New function.
8434 (map_char_table_for_charset): New function.
8435
8436 * keymap.c (describe_vector): Handle a char-table directly here.
8437 (describe_char_table): Delete.
8438
8439 * lisp.h (map_charset_chars): Delete.
8440
8441 2008-02-01 Dave Love <fx@gnu.org>
8442
8443 * fns.c (count_combining): Comment out (unused).
8444 (Flocale_codeset): New.
8445 (syms_of_fns): Defsubr it.
8446
8447 * config.in (HAVE_PTY_H, HAVE_SIZE_T, HAVE_LANGINFO_CODESET): New.
8448 (size_t): Remove.
8449
8450 2008-02-01 Dave Love <fx@gnu.org>
8451
8452 * Makefile.in (chartab.o): Depend on charset.h.
8453
8454 2008-02-01 Kenichi Handa <handa@m17n.org>
8455
8456 * character.c (syms_of_character): Set the default value of
8457 Vprintable_chars to Qnil.
8458
8459 2008-02-01 Dave Love <fx@gnu.org>
8460
8461 * Makefile.in (lisp, shortlisp): Change indian.elc to indian.el.
8462
8463 2008-02-01 Kenichi Handa <handa@m17n.org>
8464
8465 * charset.c (load_charset_map): Handle the case that from < to
8466 correctly.
8467
8468 * coding.c (encode_coding_emacs_mule, encode_coding_iso_2022)
8469 (encode_coding_sjis, encode_coding_big5, encode_coding_charset):
8470 Pay attention to raw-8-bit chars.
8471
8472 2008-02-01 Kenichi Handa <handa@m17n.org>
8473
8474 * Makefile.in (lisp, shortlisp): Change chinese.elc to chinese.el.
8475 It is not bytecompiled now.
8476
8477 * charset.c (charset_jisx0201_roman, charset_jisx0208_1978)
8478 (charset_jisx0208): New variables.
8479 (Fdefine_charset_internal): Setup them if appropriate.
8480 (init_charset_once): Initialize them to -1.
8481
8482 * charset.h (charset_jisx0201_roman, charset_jisx0208_1978)
8483 (charset_jisx0208): Extern them.
8484
8485 * coding.c (CODING_ISO_FLAG_USE_ROMAN): New macro.
8486 (CODING_ISO_FLAG_USE_OLDJIS): New macro.
8487 (CODING_ISO_FLAG_FULL_SUPPORT): Change macro definition.
8488 (setup_iso_safe_charsets): Fix arguments to Fassq.
8489 (DECODE_DESIGNATION, ENCODE_ISO_CHARACTER_DIMENSION1)
8490 (ENCODE_ISO_CHARACTER_DIMENSION2): Pay attention to
8491 CODING_ISO_FLAG_USE_ROMAN and CODING_ISO_FLAG_USE_OLDJIS.
8492 (encode_coding_iso_2022): Change the 1st arg to
8493 ENCODE_ISO_CHARACTER to a variable.
8494
8495 2008-02-01 Kenichi Handa <handa@m17n.org>
8496
8497 * charset.h (enum define_charset_arg_index): New enums
8498 charset_arg_min_code and charset_arg_max_code.
8499 (struct charset): New member char_index_offset.
8500
8501 * charset.c (CODE_POINT_TO_INDEX, INDEX_TO_CODE_POINT):
8502 Take charset->char_index_offset into account.
8503 (Fdefine_charset_internal): Handle args[charset_arg_min_code] and
8504 args[charset_arg_max_code]. Setup charset.char_index_offset.
8505 (syms_of_charset): Fix args to Fdefine_charset_internal.
8506
8507 2008-02-01 Dave Love <fx@gnu.org>
8508
8509 * coding.c (decode_coding_utf_8): Reject overlong sequences.
8510
8511 2008-02-01 Dave Love <fx@gnu.org>
8512
8513 * coding.c: Doc fixes.
8514 (Fcoding_system_aliases): Fix return value.
8515 (Qmac): Remove (duplicated) definition.
8516
8517 2008-02-01 Dave Love <fx@gnu.org>
8518
8519 * charset.c (Fcharset_priority_list, Fset_charset_priority): New
8520 functions.
8521
8522 * character.c (Fstring): Doc fix.
8523
8524 * charset.c (Fdefine_charset_alias): Update Vcharset_list.
8525
8526 * fontset.c (Ffontset_info): Doc fix. Return charset names, not
8527 ids.
8528 (font-encoding-alist): Doc fix.
8529
8530 2008-02-01 Dave Love <fx@gnu.org>
8531
8532 * term.c (costs_set): Declare static, non-initialized for pcc.
8533 (encode_terminal_code): Remove unused var.
8534
8535 * keyboard.c (kbd_buffer_store_event): Fix interrupt_signal decl
8536 for K&R.
8537
8538 * xterm.c (xlwmenu_window_p): Fix prototype for K&R.
8539
8540 * coding.c (setup_iso_safe_charsets): Fix arg decl for K&R.
8541 (suffixes): Move out of make_subsidiaries for K&R.
8542
8543 * charset.c (map_charset_chars): Fix c_function declaration for K&R.
8544
8545 * lisp.h (DEFUN) [!PROTOTYPES]: Remove spurious `args'.
8546
8547 2008-02-01 Dave Love <fx@gnu.org>
8548
8549 * data.c (Fchar_or_string_p): Doc fix. Use CHARACTERP.
8550
8551 * category.c (Fmodify_category_entry): Doc fix. Remove unused vars.
8552
8553 2008-02-01 Yong Lu <lyongu@asia-infonet.com>
8554
8555 * charset.c (Fdefine_charset_internal): Fix argument to bzero.
8556
8557 * coding.c (decode_coding_charset): Workaround for the bug of GCC 2.96.
8558
8559 2008-02-01 Kenichi Handa <handa@m17n.org>
8560
8561 * Makefile.in (lisp, shortlisp): Change cyrillic.elc to cyrillic.el,
8562 vietnamese.elc to vietnamese.el. They are not bytecompiled now.
8563
8564 2008-02-01 Kenichi Handa <handa@m17n.org>
8565
8566 * coding.c (decode_coding_charset): Adjust for the change of
8567 Fdefine_coding_system_internal.
8568 (Fdefine_coding_system_internal): For a coding system of
8569 `charset' type, store a list of charset IDs in
8570 `charset_attr_charset_valids' element of coding attributes.
8571
8572 2008-02-01 Kenichi Handa <handa@m17n.org>
8573
8574 * coding.c (ONE_MORE_BYTE_NO_CHECK): Increment consumed_chars.
8575 (emacs_mule_char): New arg src. Delete arg `composition'. Change
8576 caller. Handle 2-byte and 3-byte charsets correctly.
8577 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from
8578 DECODE_EMACS_MULE_COMPOSITION_RULE. Change caller.
8579 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
8580 (DECODE_EMACS_MULE_21_COMPOSITION): Call
8581 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
8582 sequence.
8583 (decode_coding_emacs_mule): Handle composition correctly. Rewind
8584 `src' and `consumed_chars' correctly before calling emacs_mule_char.
8585 (DECODE_COMPOSITION_START): Correctly handle the case of altchar
8586 and alt&rule composition.
8587 (decode_coding_iso_2022): Handle composition correctly.
8588 (init_coding_once): Setup emacs_mule_bytes for private charsets.
8589
8590 * charset.c (Fdefine_charset_internal): Fix bug for the case of
8591 re-defining a charset. If the charset has :emacs-mule-id, setup
8592 emacs_mule_bytes.
8593 (Fmake_char): If CODE1 is nil, use the minimum code of the charset.
8594
8595 2008-02-01 Kenichi Handa <handa@m17n.org>
8596
8597 * coding.c (encode_coding_iso_2022, encode_coding_sjis)
8598 (encode_coding_big5, encode_coding_charset): If coding requires safe
8599 encoding, produce a character specified by
8600 CODING_INHIBIT_CHARACTER_SUBSTITUTION.
8601
8602 2008-02-01 Dave Love <fx@gnu.org>
8603
8604 * xterm.c (XSetIMValues): Declare.
8605
8606 * process.c: Conditionally include sys/wait.h, pty.h.
8607
8608 * print.c (print_object): Fix print format for 64-bit systems.
8609
8610 * keyboard.c (modify_event_symbol): Fix print format for 64-bit systems.
8611
8612 * buffer.c (emacs_strerror): Declare.
8613
8614 * fontset.c (Fclear_face_cache): Declare.
8615 (accumulate_font_info): Comment-out (unused).
8616 (face_for_char, Fset_fontset_font, Ffontset_info): Remove unused
8617 variables.
8618
8619 * character.h (string_escape_byte8): Declare.
8620
8621 * charset.c (load_charset_map, load_charset_map_from_file): Remove
8622 unused vars.
8623 (Fdefine_charset_internal, Fsplit_char, syms_of_charset)
8624 (Fmap_charset_chars): Doc fix.
8625
8626 * coding.c (Vchar_coding_system_table, Qchar_coding_system): Remove.
8627 (Fset_coding_system_priority, Fset_coding_system_priority)
8628 (Fdefine_coding_system_internal): Doc fix.
8629
8630 2008-02-01 Dave Love <fx@gnu.org>
8631
8632 * s/osf5-0.h (C_SWITCH_SYSTEM) [!__GNUC__]: Remove -nointrinsics.
8633
8634 2008-02-01 Kenichi Handa <handa@m17n.org>
8635
8636 * character.c (string_escape_byte8): Make multibyte string with
8637 correct size.
8638
8639 * charset.c (Fmake_char): Delete unnecessary code.
8640
8641 2008-02-01 Kenichi Handa <handa@m17n.org>
8642
8643 * xfns.c (x_encode_text): Allocate coding.destination here, and
8644 call encode_coding_object with dst_object Qnil.
8645
8646 * buffer.c (Fset_buffer_multibyte): Convert 8-bit bytes to
8647 multibyte form correctly.
8648
8649 * fontset.c (fs_load_font): Check fontp->full_name (not fontname)
8650 against Vfont_encoding_alist.
8651
8652 * coding.c (Fdecode_sjis_char): Fix typo (0x7F->0xFF). Fix the
8653 handling of charset list.
8654 (encode_coding_iso_2022): Setup coding->safe_charsets in advance.
8655 (decode_coding_object): Move point to coding->dst_pos before
8656 calling post-read-conversion function.
8657 (encode_coding_object): Give correct arguments to
8658 pre-write-conversion. Ignore the return value of
8659 pre-write-conversion function. Pay attention to the case that
8660 pre-write-conversion changes the current buffer. If dst_object is
8661 Qt, even if coding->src_bytes is zero, allocate at least one byte
8662 to coding->destination.
8663
8664 * coding.h (JIS_TO_SJIS): Fix typo (j1->s1, j2->s2).
8665
8666 * charset.c (Fmake_char): Make it more backward compatible.
8667 (Fmap_charset_chars): Fix docstring.
8668
8669 2008-02-01 Dave Love <fx@gnu.org>
8670
8671 * coding.c: Doc fixes.
8672 (Fdefine_coding_system_alias): Use names, not symbols, in
8673 coding-system-alist.
8674
8675 2008-02-01 Kenichi Handa <handa@m17n.org>
8676
8677 * fontset.c (free_realized_fontsets): Call Fclear_face_cache instead
8678 of calling free_realized_face.
8679
8680 2008-02-01 Yong Lu <lyongu@asia-infonet.com>
8681
8682 * charset.c (read_hex): Don't treat SPC as a comment starter.
8683 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return -1.
8684 (Fdecode_char): Fix typo.
8685
8686 2008-02-01 Kenichi Handa <handa@m17n.org>
8687
8688 * charset.h (struct charset): New member `code_space_mask'.
8689
8690 * coding.c (coding_set_source): Delete the local variable beg_byte.
8691 (encode_coding_charset, Fdefine_coding_system_internal):
8692 Delete the local variable charset.
8693 (Fdefine_coding_system_internal): Setup
8694 attrs[coding_attr_charset_valids] correctly.
8695
8696 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
8697 member to check if CODE is valid or not.
8698 (Fdefine_charset_internal): Initialize `code_space_mask' member.
8699 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
8700 is within the range of charset->min_code and carset->max_code.
8701
8702 2008-02-01 Dave Love <fx@gnu.org>
8703
8704 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
8705
8706 * dispextern.h (generate_ascii_font): Fix return type.
8707
8708 * xfaces.c (generate_ascii_font): Fix arg declaration.
8709
8710 * coding.c (coding_inherit_eol_type)
8711 (Fset_terminal_coding_system_internal)
8712 (Fset_safe_terminal_coding_system_internal): Fix arg declarations.
8713
8714 2008-02-01 Kenichi Handa <handa@m17n.org>
8715
8716 * coding.c (decode_coding_charset, encode_coding_charset): Handle
8717 multiple charsets correctly.
8718
8719 2008-02-01 Kenichi Handa <handa@m17n.org>
8720
8721 * search.c (boyer_moore): Fix handling of mulitbyte character
8722 translation.
8723
8724 * xdisp.c (display_mode_element): When the variable `elt' is
8725 changed, update `this' and `lisp_string'.
8726
8727 2008-02-01 Kenichi Handa <handa@m17n.org>
8728
8729 * buffer.c (Fset_buffer_multibyte): Fix 8-bit char handling.
8730
8731 * callproc.c (Fcall_process): Be sure to give the current buffer
8732 to decode_coding_c_string. Update PT and PT_BYTE after the insertion.
8733
8734 * charset.c (struct charset_map_entries): New struct.
8735 (load_charset_map): Rename from parse_charset_map. New args
8736 entries and n_entries. Change caller.
8737 (load_charset_map_from_file): Rename from load_charset_map.
8738 Change caller. New arg control_flag. Call load_charset_map at
8739 the tail.
8740 (load_charset_map_from_vector): New function.
8741 (Fdefine_charset_internal): Setup charset.compact_codes_p.
8742 (encode_char): If the charset is compact, change a character index
8743 to a code point.
8744
8745 * coding.c (coding_alloc_by_making_gap): Check the case that the
8746 source and destination are the same correctly.
8747 (decode_coding_raw_text): Set coding->consumed_char and
8748 coding->consumed to 0.
8749 (produce_chars): If coding->chars_at_source is nonzero, update
8750 coding->consumed_char and coding->consumed before calling
8751 alloc_destination.
8752 (Fdefine_coding_system_alias): Register ALIAS in
8753 Vcoding_system_alist.
8754 (syms_of_coding): Define `no-convesion' coding system at the tail.
8755
8756 * fileio.c (Finsert_file_contents): Set coding_system instead of
8757 val. If the current buffer is multibyte, always call
8758 decode_coding_gap.
8759
8760 * xfaces.c (try_font_list): Give higher priority to fontset's
8761 family than face's family.
8762
8763 2008-02-01 Kenichi Handa <handa@m17n.org>
8764
8765 * callproc.c (Fcall_process): Be sure to give the current buffer
8766 to decode_coding_c_string.
8767
8768 * xfaces.c (try_font_list): Give a family specified in a fontset
8769 higher priority than a family specified in a face.
8770
8771 2008-02-01 Kenichi Handa <handa@m17n.org>
8772
8773 * fileio.c (Finsert_file_contents): Fix calculation of `inserted'.
8774 Fix arguments to insert_from_buffer.
8775
8776 * xdisp.c (display_mode_element): Fix calculation of `bytepos'.
8777
8778 2008-02-01 Kenichi Handa <handa@m17n.org>
8779
8780 * coding.c (produce_chars): Set the variable `multibytep' correctly.
8781 (decode_coding_gap): Set coding->dst_multibyte correctly.
8782
8783 2008-02-01 Kenichi Handa <handa@m17n.org>
8784
8785 * coding.c (encode_coding_utf_8): Initialize produced_chars to 0.
8786 (decode_coding_utf_16): Fix converting high and low bytes to code-point.
8787 (encode_coding_utf_16): Substitute coding->default_char for
8788 non-Unicode characters.
8789 (decode_coding): Don't call record_insert here.
8790 (setup_coding_system): Initialize `surrogate' of
8791 coding->spec.utf_16 to 0.
8792 (EMIT_ONE_BYTE): Fix for multibyte case.
8793
8794 * insdel.c (insert_from_gap): Call record_insert.
8795
8796 2008-02-01 Kenichi Handa <handa@m17n.org>
8797
8798 * casefiddle.c (casify_region): Fix multibyte case.
8799
8800 * character.c (c_string_width): Add return type `int'.
8801 (char_string_with_unification): Delete arg ADVANCED.
8802
8803 * character.h (CHAR_VALID_P): Don't call CHARACTERP.
8804 (CHAR_STRING): Adjust for the change of char_string_with_unification.
8805 (CHAR_STRING_ADVANCE): Make it do-while statement.
8806
8807 * chartab.c (sub_char_table_set_range): Optimize for the case
8808 DEPTH == 3. Add workaround code for a GCC optimization bug.
8809
8810 * charset.c (parse_charset_map): Remove an unused variable.
8811
8812 * coding.c: Delete unused variables.
8813
8814 * fileio.c (Finsert_file_contents): Set coding_system to Qnil
8815 earlier. If inserted is zero and the coding system doesn't
8816 require flushing, don't call decode_coding_gap.
8817
8818 * syntax.h (SET_RAW_SYNTAX_ENTRY): Don't call make_number.
8819
8820 2008-02-01 Kenichi Handa <handa@m17n.org>
8821
8822 The following changes are for using Unicode as an internal
8823 character model, and use UTF-8 format for buffer/string
8824 representation.
8825
8826 * .gdbinit (xchartable): Adjust for the change of char table structure.
8827 (xsubchartable, xcoding, xcharset, xcurbuf): New commands.
8828
8829 * Makefile.in (obj): Add character.o and chartab.o.
8830 (lisp, shortlisp): Remove utf-8.elc.
8831 (*.o): For many files, change dependency on charset.h to
8832 character.h, and add dependency on character.h.
8833 (character.o, chartab.o): New targets.
8834
8835 * abbrev.c, bytecode.c, casefiddle.c, cmds.c, dispnew.c, doc.c:
8836 * doprnt.c, dosfns.c, frame.c, marker.c, minibuf.c, msdos.c:
8837 * w16select.c, w32bdf.c, w32console.c: Include "character.h" instead
8838 of "charset.h".
8839
8840 * dired.c, filelock.c: Include "character.h".
8841
8842 * alloc.c: Include "character.h" instead of "charset.h".
8843 (Fmake_char_table, make_sub_char_table): Move to chartab.c.
8844 (syms_of_alloc): Remove defsubr for Smake_char_table.
8845
8846 * buffer.c: Include "character.h" instead of "charset.h", don't
8847 include "coding.h".
8848 (Fset_buffer_multibyte): Adjust for UTF-8.
8849
8850 * buffer.h: EXFUN Fbuffer_live_p.
8851
8852 * callproc.c: Include "character.h" instead of "charset.h".
8853 (Fcall_process): Big change for the new code-conversion APIs.
8854
8855 * casetab.c: Include "character.h" instead of "charset.h".
8856 (set_canon, set_identity, shuffle): Adjust for the new
8857 map_char_table spec.
8858 (init_casetab_once): Call CHAR_TABLE_SET instead of directly
8859 accessing the char table structure.
8860
8861 * chartab.c: New file that implements char table.
8862
8863 * category.c: Include "character.h".
8864 (copy_category_entry): New function.
8865 (copy_category_table): Call map_char_table and copy_category_entry.
8866 (Fmake_category_table): Initialize all top-vel slots.
8867 (char_category_set): New function.
8868 (modify_lower_category_set): Delete.
8869 (Fmodify_category_entry): Call char_table_ref_and_range.
8870
8871 * category.h (CATEGORY_SET): Just call char_category_set.
8872
8873 * ccl.c: Include "character.h".
8874 (Qccl, Qcclp): New variables.
8875 (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if
8876 it's less than 256.
8877 (CCL_WRITE_MULTIBYTE_CHAR): Delete.
8878 (CCL_WRITE_STRING, CCL_READ_CHAR): Adjust for the change of SRC
8879 and DST type.
8880 (ccl_driver): Change types of argument, adjust code accordingly.
8881 (Fccl_execute, Fccl_execute_on_string): Adjust for the change of
8882 ccl_driver.
8883 (syms_of_ccl): Intern and staticpro Qccl and Qcclp.
8884
8885 * ccl.h (struct ccl_program): Delete members eol_type and multibyte.
8886 New members src_multibyte, dst_multibyte, consumed, and produced.
8887 (struct ccl_spec): Delete members decoder and encoder. New member ccl.
8888 (CODING_SPEC_CCL_PROGRAM): New macro.
8889 (ccl_driver): Update prototype.
8890 (Qccl, Qcclp, Fccl_program_p): Extern them.
8891 (CHECK_CCL_PROGRAM): New macro.
8892
8893 * character.c, character.h, chartab.c: New files.
8894
8895 * charset.c: Mostly re-written. Move character and multibyte sequence
8896 handling codes to character.c.
8897
8898 * charset.h: Mostly re-written. Move character and multibyte sequence
8899 handling codes to character.h.
8900
8901 * coding.c, coding.h: Mostly re-written.
8902
8903 * composite.c: Include "character.h" instead of "charset.h".
8904 (CHAR_WIDTH): Move to character.h.
8905 (HASH_KEY, HASH_VALUE): Delete.
8906
8907 * composite.h (enum composition_method): Change order of enumeration
8908 symbols.
8909
8910 * data.c: Include "character.h" instead of "charset.h".
8911 (Faref): Call CHAR_TABLE_REF for a char table.
8912 (Faset): Call CHAR_TABLE_SET for a char table.
8913
8914 * dispextern.h (free_realized_face, check_face_attribytes)
8915 (generate_ascii_font): Extern them.
8916 (free_realized_multibyte_face): Delete extern.
8917
8918 * disptab.h (DISP_CHAR_VECTOR): Adjust for the change of char
8919 table structure.
8920
8921 * editfns.c: Include "character.h" instead of "charset.h".
8922 (Fchar_to_string): Always call CHAR_STRING.
8923
8924 * emacs.c (main): Call init_charset_once, init_charset,
8925 syms_of_chartab, and syms_of_character.
8926
8927 * fileio.c: Include "character.h" instead of "charset.h".
8928 (Finsert_file_contents): Big change for the new code-conversion API.
8929 (choose_write_coding_system, Fwrite_region): Likewise.
8930 (build_annotations_2): Delete.
8931 (e_write): Big change for the new code-conversion API.
8932
8933 * fns.c: Include "character.h" instead of "charset.h".
8934 (copy_sub_char_table): Move to chartab.c.
8935 (Fcopy_sequence): Call copy_char_table for a char table.
8936 (concat): Delete codes calling count_multibyte.
8937 (string_char_to_byte, string_byte_to_char): Adjust for the new
8938 multibyte form.
8939 (internal_equal): Adjust for the change of char table structure.
8940 (Fchar_table_subtype, Fchar_table_parent, Fset_char_table_parent)
8941 (Fchar_table_extra_slot, Fset_char_table_extra_slot)
8942 (Fchar_table_range, Fset_char_table_range, Fset_char_table_default)
8943 (char_table_translate, optimize_sub_char_table)
8944 (Foptimize_char_table, map_char_table, Fmap_char_table): Move to
8945 chartab.c.
8946 (char_table_ref_and_index): Delete.
8947 (HASH_KEY, HASH_VALUE): Move to lisp.h.
8948 (Fmd5): Call preferred_coding_system instead of accessing
8949 Vcoding_category_list. Adjust for the new code-conversion API.
8950 (syms_of_fns): Move defsubr for char table related functions to
8951 chartab.c.
8952
8953 * fontset.c: Mostly re-written.
8954
8955 * fontset.h (struct font_info): Change type of the member encoding_type.
8956 (enum FONT_SPEC_INDEX): New enum.
8957 (fontset_font_pattern, fs_load_font): Update prototype.
8958 (FS_LOAD_FONT): Adjust for the change of fs_load_font.
8959
8960 * indent.c: Include "character.h" instead of "charset.h".
8961 (MULTIBYTE_BYTES_WIDTH): Call CHAR_WIDTH instead of WIDTH_BY_CHAR_HEAD.
8962
8963 * insdel.c: Include "character.h" instead of "charset.h".
8964 (copy_text): Don't refer to Vnonascii_translation_table.
8965 (insert_from_gap): New function.
8966
8967 * keyboard.c: Include "character.h" instead of "charset.h".
8968 (command_loop_1): Never call direct_output_forward_char before
8969 a non-ASCII character.
8970 (read_char): If Vkeyboard_translate_table is a char table, always
8971 translate a character.
8972
8973 * keymap.c: Include "character.h".
8974 (store_in_keymap): Handle the case that IDX is a cons.
8975 (Fdefine_key): Handle the case that KEY is a cons and the car part
8976 is also a cons (range).
8977 (push_key_description): Adjust for the new character code.
8978 (describe_vector): Call describe_char_table for a char table.
8979 (describe_char_table): New function.
8980
8981 * keymap.h (describe_char_table): Extern it.
8982
8983 * lisp.h (enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
8984 (XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
8985 (CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS)
8986 (SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
8987 Delete.
8988 (CHAR_TABLE_REF, CHAR_TABLE_SET): Adjust for the new char table
8989 structure.
8990 (CHAR_TABLE_TRANSLATE): Just call char_table_translate.
8991 (CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2)
8992 (CHARTAB_SIZE_BITS_3): New macros.
8993 (chartab_size): Extern it.
8994 (struct Lisp_Char_Table): Re-design.
8995 (struct Lisp_Sub_Char_Table): New structure.
8996 (HASH_KEY, HASH_VALUE): Move from fns.c.
8997 (CHARACTERBITS): Define as 22.
8998 (GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjust for the above change.
8999 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
9000 (GC_SUB_CHAR_TABLE_P): New macro.
9001 (Fencode_coding_string, Fdecode_coding_string): Update EXFUN.
9002 (code_convert_string_norecord): Deleted extern.
9003 (init_character_once, syms_of_character, init_charset)
9004 (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
9005
9006 * lread.c: Include "character.h".
9007 (read_multibyte): New arg NBYTES.
9008 (read_escape): Change the meaning of returned *BYTEREP.
9009 (to_multibyte): Delete.
9010 (read1): Adjust the handling of char table and string.
9011
9012 * print.c: Include "character.h" instead of "charset.h".
9013 (print_string): Convert 8-bit raw bytes to octal form by
9014 string_escape_byte8.
9015 (print_object): Adjust for the new multibyte form. Print 8-bit
9016 raw bytes always in octal form. Handle sub char table correctly.
9017
9018 * process.c: Include "character.h" instead of "charset.h".
9019 (read_process_output, send_process): Adjust for the new
9020 code-conversion API.
9021
9022 * puresize.h (BASE_PURESIZE): Increase.
9023
9024 * regex.c: Include "character.h" instead of "charset.h".
9025 (BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
9026 (regex_compile): Accept a range whose starting and ending
9027 character have different leading bytes.
9028 (analyse_first): Adjust for the above change.
9029
9030 * search.c: Include "character.h" instead of "charset.h".
9031 (search_buffer, boyer_moore): Adjust for the new multibyte form.
9032 (Freplace_match): Adjust for the change of multibyte_char_to_unibyte.
9033
9034 * syntax.c: Include "character.h" instead of "charset.h".
9035 (syntax_parent_lookup): Delete.
9036 (Fmodify_syntax_entry): Accept a cons as CHAR.
9037 (skip_chars): Adjust for the new multibyte form.
9038 (init_syntax_once): Call char_table_set_range instead of directly
9039 accessing the structure of a char table.
9040
9041 * syntax.h (SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
9042 (SYNTAX_ENTRY_FOLLOW_PARENT): Delete macro.
9043 (SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
9044 (SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
9045
9046 * term.c: Include "buffer.h" and "character.h".
9047 (encode_terminal_code, write_glyphs): Adjust for the new
9048 code-conversion API.
9049 (produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
9050
9051 * w32term.c (x_new_font): Adjust for the change of FS_LOAD_FONT.
9052
9053 * xdisp.c: Include "character.h".
9054 (get_next_display_element): Adjust for the new multibyte form.
9055 (disp_char_vector): Adjust for the new char table structure.
9056 (decode_mode_spec_coding): Adjust for the new structure of
9057 coding system.
9058 (decode_mode_spec): Adjust for the new code-conversion API.
9059
9060 * xfaces.c: Include "character.h" instead of "charset.h".
9061 (load_face_font): Adjust for the change of choose_face_font and
9062 FS_LOAD_FONT.
9063 (generate_ascii_font): New function.
9064 (set_lface_from_font_name): Adjust for the change of FS_LOAD_FONT.
9065 (set_font_frame_param): Adjust for the change of choose_face_font.
9066 (free_realized_face): Make it public.
9067 (free_realized_faces_for_fontset): Rename from
9068 free_realized_multibyte_face. Free also faces realized for ASCII.
9069 (choose_face_font): Change arguments. Adjust for the change of
9070 fontset_font_pattern and FS_LOAD_FONT.
9071
9072 * xfns.c: Include "character.h".
9073 (x_encode_text): Adjust for the new code-conversion API.
9074
9075 * xselect.c: Don't include "charset.h".
9076 (selection_data_to_lisp_data): Adjust for the new code conversion API.
9077
9078 * xterm.c: Include "character.h".
9079 (x_encode_char): New argument CHARSET. Change caller.
9080 (x_get_char_face_and_encoding, x_get_glyph_face_and_encoding):
9081 Call ENCODE_CHAR instead of SPLIT_CHAR.
9082 (x_produce_glyphs): Don't check Vnonascii_translation_table Call
9083 CHAR_WIDTH instead of CHARSET_WIDTH.
9084 (XTread_socket): Adjust for the new code-conversion API.
9085 (x_new_font): Adjust for the change of FS_LOAD_FONT.
9086 (x_load_font): Adjust for the change of struct font.
9087
9088 2008-02-01 Stefan Monnier <monnier@iro.umontreal.ca>
9089
9090 * xfaces.c (face_at_buffer_position): Remove unused vars.
9091
9092 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
9093
9094 * ccl.c (CCL_WRITE_CHAR, CCL_WRITE_MULTIBYTE_CHAR):
9095 Fix overflow checking.
9096
9097 2008-02-01 Kenichi Handa <handa@ni.aist.go.jp>
9098
9099 * ccl.c (CCL_WRITE_CHAR, CCL_WRITE_MULTIBYTE_CHAR, ccl_driver):
9100 Cancel previous change.
9101
9102 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
9103
9104 * ccl.c (CCL_WRITE_CHAR): Increment extra_bytes only when
9105 ccl->eight_bit_control. Fix check for buffer overflow.
9106 (CCL_WRITE_MULTIBYTE_CHAR): Fix check for buffer overflow.
9107 (ccl_driver): Initialize extra_bytes to 0.
9108
9109 2008-01-31 Kenichi Handa <handa@ni.aist.go.jp>
9110
9111 * keyboard.c (make_ctrl_char): If C is a multibyte character, just
9112 return it ORed with ctrl_modifier.
9113
9114 2008-01-29 Miles Bader <miles@gnu.org>
9115
9116 * macterm.c (XTset_vertical_scroll_bar): Fix merge mistake.
9117
9118 2008-01-28 Jason Rumney <jasonr@gnu.org>
9119
9120 * w32.c (stat): Don't double check for networked drive.
9121
9122 2008-01-28 Stefan Monnier <monnier@iro.umontreal.ca>
9123
9124 * window.c (run_window_configuration_change_hook): New function.
9125 Code extracted from set_window_buffer. Set the selected frame.
9126 (set_window_buffer): Use it.
9127 * window.h (run_window_configuration_change_hook): Declare.
9128 * dispnew.c (change_frame_size_1): Use it instead of set-window-buffer.
9129
9130 * keyboard.c (read_char): Yet another int/Lisp_Object mixup (YAILOM).
9131
9132 2008-01-27 Dan Nicolaescu <dann@ics.uci.edu>
9133
9134 * Makefile.in: Remove references to unused macros.
9135
9136 2008-01-26 Eli Zaretskii <eliz@gnu.org>
9137
9138 * w32.c (g_b_init_get_sid_sub_authority)
9139 (g_b_init_get_sid_sub_authority_count): New static variables.
9140 (GetSidSubAuthority_Proc, GetSidSubAuthorityCount_Proc): New typedefs.
9141 (get_sid_sub_authority, get_sid_sub_authority_count): New functions.
9142 (init_user_info): Use them to retrieve uid and gid.
9143 Use 500/513, the Windows defaults, as Administrator's uid/gid.
9144 (fstat): Use pw_uid and pw_gid from the_passwd structure for
9145 st_uid and st_gid of the file.
9146
9147 2008-01-26 Jason Rumney <jasonr@gnu.org>
9148
9149 * w32.c (logon_network_drive): New function.
9150 (stat): Use it.
9151
9152 2008-01-26 Chong Yidong <cyd@stupidchicken.com>
9153
9154 * xdisp.c (pos_visible_p): Handle the case where charpos falls on
9155 invisible text covered with an ellipsis.
9156
9157 2008-01-25 Richard Stallman <rms@gnu.org>
9158
9159 * xdisp.c (redisplay_window): Run Qwindow_text_change_functions and
9160 jump back to beginning. Move some other initializations after that.
9161 (Qwindow_text_change_functions, Vwindow_text_change_functions):
9162 New variables.
9163 (syms_of_xdisp): Init them.
9164
9165 * keyboard.c (read_char): Restore echo_message_buffer after redisplay.
9166
9167 * buffer.c (reset_buffer_local_variables):
9168 Implement `permanent-local-hook'.
9169 (Qpermanent_local_hook): New variable.
9170 (syms_of_buffer): Init and staticpro it.
9171
9172 2008-01-25 Michael Albinus <michael.albinus@gmx.de>
9173
9174 * dbusbind.c (xd_retrieve_arg): Pacify GCC on x86_64 GNU/Linux.
9175
9176 2008-01-25 Thien-Thi Nguyen <ttn@gnuvola.org>
9177
9178 * fns.c (Fclrhash): Return TABLE.
9179
9180 2008-01-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9181
9182 * macterm.c (x_scroll_bar_create): Initialize bar->redraw_needed_p.
9183 (XTset_vertical_scroll_bar): Redraw scroll bar if bar->redraw_needed_p
9184 is set even without positional changes.
9185 (x_scroll_bar_clear): Set bar->redraw_needed_p.
9186
9187 * macterm.h (struct scroll_bar): New member `redraw_needed_p'.
9188
9189 2008-01-23 Jason Rumney <jasonr@gnu.org>
9190
9191 * xterm.c (handle_one_xevent): Revert to counting chars not bytes.
9192
9193 * w32term.c (w32_read_socket) <WM_CHAR>: Decode characters outside
9194 the unicode range available in MULE by locale-coding-system.
9195 Improve dbcs lead byte detection. Set event timestamp and modifiers
9196 earlier.
9197
9198 2008-01-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9199
9200 * mac.c (mac_emacs_pid) [MAC_OSX]: New variable.
9201 [MAC_OSX] (init_mac_osx_environment): Initialize it.
9202 [MAC_OSX] (mac_try_close_socket) [SELECT_USE_CFSOCKET]: Return 0
9203 when used on child processes.
9204
9205 2008-01-21 Michael Albinus <michael.albinus@gmx.de>
9206
9207 * dbusbind.c (Fdbus_method_return_internal): Rename from
9208 Fdbus_method_return.
9209 (Fdbus_unregister_object): Move to dbus.el.
9210 (Fdbus_call_method, Fdbus_method_return_internal)
9211 (Fdbus_send_signal): Improve debug messages.
9212
9213 2008-01-20 Martin Rudalics <rudalics@gmx.at>
9214
9215 * undo.c (undo_inhibit_record_point): New variable.
9216 (syms_of_undo): Initialize it.
9217 (record_point): Don't record point when undo_inhibit_record_point
9218 is set.
9219
9220 2008-01-19 Stefan Monnier <monnier@iro.umontreal.ca>
9221
9222 * process.c (list_processes_1): Don't use SCHARS on a nil buffer name.
9223
9224 * xdisp.c (Qauto_hscroll_mode): New var.
9225 (syms_of_xdisp): Initialize it.
9226 (hscroll_window_tree): Use it to lookup `auto-hscroll-mode' in each
9227 window's buffer.
9228 (hscroll_windows): Don't check automatic_hscrolling_p here.
9229
9230 * window.c (set_window_buffer): Don't unnecessarily reset hscroll and
9231 vscroll if we're setting window-buffer to the value it already has.
9232
9233 2008-01-18 Dan Nicolaescu <dann@ics.uci.edu>
9234
9235 * m/intel386.h: Remove references to XENIX.
9236
9237 2008-01-17 Andreas Schwab <schwab@suse.de>
9238
9239 * m/amdx86-64.h (START_FILES, LIB_STANDARD): Use HAVE_LIB64_DIR
9240 instead of HAVE_X86_64_LIB64_DIR.
9241 * m/ibms390x.h (START_FILES, LIB_STANDARD): Likewise.
9242
9243 2008-01-17 Glenn Morris <rgm@gnu.org>
9244
9245 * m/ibms390x.h (START_FILES, LIB_STANDARD): Adjust value according
9246 to HAVE_X86_64_LIB64_DIR.
9247
9248 2008-01-16 Dan Nicolaescu <dann@ics.uci.edu>
9249
9250 * s/irix3-3.h:
9251 * s/irix4-0.h:
9252 * s/386-ix.h:
9253 * s/domain.h:
9254 * s/hpux9-x11r4.h:
9255 * s/hpux9shxr4.h: Remove files for systems no longer supported.
9256
9257 * sysdep.c: Remove code containing references to symbols defined
9258 by unsupported systems.
9259
9260 2008-01-16 Glenn Morris <rgm@gnu.org>
9261
9262 * coding.c (select-safe-coding-system-function): Doc fix.
9263
9264 2008-01-15 Glenn Morris <rgm@gnu.org>
9265
9266 * config.in: Revert 2008-01-13 change: this is a generated file.
9267
9268 2008-01-13 Tom Tromey <tromey@redhat.com>
9269
9270 * lisp.h: Fix typo.
9271
9272 2008-01-13 Dan Nicolaescu <dann@ics.uci.edu>
9273
9274 * m/sequent-ptx.h:
9275 * m/sequent.h:
9276 * s/ptx.h:
9277 * s/ptx4-2.h:
9278 * s/ptx4.h: Remove files for systems no longer supported.
9279
9280 * callproc.c (Fcall_process): Fix previous change.
9281
9282 2008-01-13 Dan Nicolaescu <dann@ics.uci.edu>
9283
9284 * unexsunos4.c: Remove file, system not supported anymore.
9285
9286 * m/mips.h:
9287 * m/intel386.h:
9288 * callproc.c:
9289 * config.in:
9290 * ecrt0.c:
9291 * emacs.c:
9292 * fileio.c:
9293 * frame.c:
9294 * getpagesize.h:
9295 * keyboard.c:
9296 * lread.c:
9297 * process.c:
9298 * puresize.h:
9299 * sysdep.c:
9300 * systty.h:
9301 * syswait.h:
9302 * unexec.c:
9303 * xdisp.c:
9304 * alloc.c: Remove code containing references to symbols defined by
9305 unsupported systems.
9306
9307 2008-01-11 Kenichi Handa <handa@ni.aist.go.jp>
9308
9309 * coding.c (detect_coding_mask): Fix previous change.
9310
9311 2008-01-09 Kenichi Handa <handa@ni.aist.go.jp>
9312
9313 * coding.c (detect_coding_iso2022): New arg
9314 latin_extra_code_state. Allow Latin extra codes only
9315 when *latin_extra_code_state is nonzero.
9316 (detect_coding_mask): If there is a NULL byte, detect the encoding
9317 as UTF-16 or binary. If Latin extra codes exist, detect the
9318 encoding as ISO-2022 only when there's no other proper encoding is
9319 found.
9320
9321 2008-01-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9322
9323 * frame.c (Fmake_terminal_frame): Use #ifdef MAC_OS8 instead of
9324 #ifdef MAC_OS.
9325
9326 2008-01-08 Richard Stallman <rms@gnu.org>
9327
9328 * fileio.c (Ffile_name_directory, Fexpand_file_name): Doc fixes.
9329
9330 2008-01-06 Nick Roberts <nickrob@snap.net.nz>
9331
9332 * keyboard.c (parse_menu_item): Don't enclose key bindings on
9333 menu bar in parentheses.
9334
9335 2008-01-06 Dan Nicolaescu <dann@ics.uci.edu>
9336
9337 * m/7300.h:
9338 * m/acorn.h:
9339 * m/alliant-2800.h:
9340 * m/alliant.h:
9341 * m/alliant1.h:
9342 * m/alliant4.h:
9343 * m/altos.h:
9344 * m/amdahl.h:
9345 * m/apollo.h:
9346 * m/att3b.h:
9347 * m/aviion-intel.h:
9348 * m/aviion.h:
9349 * m/celerity.h:
9350 * m/clipper.h:
9351 * m/cnvrgnt.h:
9352 * m/convex.h:
9353 * m/cydra5.h:
9354 * m/delta88k.h:
9355 * m/dpx2.h:
9356 * m/dual.h:
9357 * m/elxsi.h:
9358 * m/f301.h:
9359 * m/gould-np1.h:
9360 * m/gould.h:
9361 * m/i860.h:
9362 * m/ibmps2-aix.h:
9363 * m/ibmrt-aix.h:
9364 * m/ibmrt.h:
9365 * m/irist.h:
9366 * m/is386.h:
9367 * m/isi-ov.h:
9368 * m/mega68.h:
9369 * m/mg1.h:
9370 * m/news-r6.h:
9371 * m/news-risc.h:
9372 * m/news.h:
9373 * m/nh3000.h:
9374 * m/nh4000.h:
9375 * m/ns16000.h:
9376 * m/ns32000.h:
9377 * m/nu.h:
9378 * m/orion.h:
9379 * m/orion105.h:
9380 * m/paragon.h:
9381 * m/pfa50.h:
9382 * m/plexus.h:
9383 * m/pyramid.h:
9384 * m/pyrmips.h:
9385 * m/sh3el.h:
9386 * m/sps7.h:
9387 * m/sr2k.h:
9388 * m/stride.h:
9389 * m/sun1.h:
9390 * m/sun2.h:
9391 * m/sun3-68881.h:
9392 * m/sun3-fpa.h:
9393 * m/sun3-soft.h:
9394 * m/sun3.h:
9395 * m/sun386.h:
9396 * m/symmetry.h:
9397 * m/tad68k.h:
9398 * m/tahoe.h:
9399 * m/targon31.h:
9400 * m/tek4300.h:
9401 * m/tekxd88.h:
9402 * m/tower32.h:
9403 * m/tower32v3.h:
9404 * m/ustation.h:
9405 * m/wicat.h:
9406 * m/xps100.h:
9407 * s/cxux.h:
9408 * s/cxux7.h:
9409 * s/dgux.h:
9410 * s/dgux4.h:
9411 * s/dgux5-4-3.h:
9412 * s/dgux5-4r2.h:
9413 * s/esix.h:
9414 * s/esix5r4.h:
9415 * s/hiuxmpp.h:
9416 * s/hiuxwe2.h:
9417 * s/iris3-5.h:
9418 * s/iris3-6.h:
9419 * s/isc2-2.h:
9420 * s/isc3-0.h:
9421 * s/isc4-0.h:
9422 * s/isc4-1.h:
9423 * s/newsos5.h:
9424 * s/newsos6.h:
9425 * s/osf1.h:
9426 * s/osf5-0.h:
9427 * s/riscix1-1.h:
9428 * s/riscix12.h:
9429 * s/sco4.h:
9430 * s/sco5.h:
9431 * s/sunos4-0.h:
9432 * s/sunos4-1.h:
9433 * s/sunos413.h:
9434 * s/sunos4shr.h:
9435 * s/umax.h:
9436 * s/unipl5-2.h:
9437 * s/xenix.h:
9438 * cxux-crt0.s:
9439 * unexapollo.c:
9440 * unexconvex.c:
9441 * unexenix.c:
9442 * unexsni.c: Remove files for systems no longer supported.
9443
9444 * m/intel386.h: Remove references to unsupported systems.
9445
9446 * w32.c (get_emacs_configuration): Remove reference to i860.
9447
9448 * sysdep.c: Remove dead code.
9449
9450 2008-01-05 Dan Nicolaescu <dann@ics.uci.edu>
9451
9452 * s/rtu.h:
9453 * m/masscomp.h: Remove files. Platform is obsolete.
9454
9455 2008-01-04 Michael Albinus <michael.albinus@gmx.de>
9456
9457 * dbusbind.c (Fdbus_method_return): New function.
9458 (xd_read_message): Add the serial number to the event.
9459 (Fdbus_register_method): Activate the function.
9460
9461 2008-01-03 Stefan Monnier <monnier@iro.umontreal.ca>
9462
9463 * keyboard.c (read_key_sequence): Fix typo.
9464
9465 2008-01-03 Michael Albinus <michael.albinus@gmx.de>
9466
9467 * dbusbind.c (all): Replace XCAR by CAR_SAFE and XCDR by CDR_SAFE.
9468 (xd_signature, xd_append_arg): Handle element type detection for
9469 empty arrays.
9470 (Fdbus_call_method, Fdbus_send_signal): Undo type casting for
9471 SDATA () calls; this must be solved more general.
9472 (Fdbus_register_signal): Use SBYTES instead of strlen.
9473
9474 2008-01-03 Magnus Henoch <magnus@zemdatav>
9475
9476 * dbusbind.c (xd_append_arg): Use unsigned char instead of
9477 unsigned int for byte values (necessary for big-endian platform).
9478 (Fdbus_call_method): Handle the case of no returned arguments.
9479
9480 2007-12-31 Tom Tromey <tromey@redhat.com> (tiny change)
9481
9482 * dbusbind.c (xd_read_message): Use non-static input_event struct.
9483
9484 2007-12-31 Magnus Henoch <mange@freemail.hu>
9485
9486 * dbusbind.c (xd_signature): Signature of variant is just "v".
9487
9488 2007-12-30 Michael Albinus <michael.albinus@gmx.de>
9489
9490 * dbusbind.c: Fix several errors and compiler warnings.
9491 Reported by Tom Tromey <tromey@redhat.com>.
9492 (XD_ERROR, XD_DEBUG_MESSAGE)
9493 (XD_DEBUG_VALID_LISP_OBJECT_P): Wrap code with "do ... while (0)".
9494 (xd_append_arg): Part for basic D-Bus types rewitten.
9495 (xd_retrieve_arg): Split implementation of DBUS_TYPE_BYTE and
9496 DBUS_TYPE_(U)INT16. Don't call XD_DEBUG_MESSAGE with "%f" if not
9497 appropriate.
9498 (xd_read_message): Return Qnil. Don't signal an error; it is not
9499 useful during event reading.
9500 (Fdbus_register_signal): Signal an error if the check for
9501 FUNCTIONP fails.
9502 (Fdbus_register_method): New function. The implementation is not
9503 complete, the call of the function signals an error therefore.
9504 (Fdbus_unregister_object): New function, renamed from
9505 Fdbus_unregister_signal. The initial check signals an error, if
9506 the object is not well formed.
9507
9508 2007-12-30 Richard Stallman <rms@gnu.org>
9509
9510 * textprop.c (get_char_property_and_overlay):
9511 Signal error if POSITION is out of range in a buffer.
9512
9513 2007-12-29 Martin Rudalics <rudalics@gmx.at>
9514
9515 * w32fns.c (Fx_create_frame): Make copy of frame parameters
9516 because the original parameters are in pure storage now.
9517
9518 2007-12-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9519
9520 * xdisp.c (phys_cursor_in_rect_p): Check if cursor is in fringe area.
9521
9522 2007-12-22 Eli Zaretskii <eliz@gnu.org>
9523
9524 * callint.c (syms_of_callint) <command-history>: Add reference to
9525 history-length in the doc string.
9526
9527 2007-12-17 Jason Rumney <jasonr@gnu.org>
9528
9529 * w32fns.c (w32_wnd_proc) <WM_KEYDOWN>: Cast char to unsigned
9530 before passing as wParam.
9531
9532 2007-12-22 Michael Albinus <michael.albinus@gmx.de>
9533
9534 * dbusbind.c (xd_retrieve_arg): Handle DBUS_TYPE_BYTE,
9535 DBUS_TYPE_INT16, DBUS_TYPE_UINT16, DBUS_TYPE_INT64,
9536 DBUS_TYPE_UINT64, DBUS_TYPE_DOUBLE and DBUS_TYPE_SIGNATURE.
9537 Return float when DBUS_TYPE_INT32 or DBUS_TYPE_UINT32 do not fit
9538 as number.
9539 (Fdbus_call_method): Fix docstring.
9540
9541 2007-12-21 Michael Albinus <michael.albinus@gmx.de>
9542
9543 * dbusbind.c (XD_BASIC_DBUS_TYPE, XD_DBUS_TYPE_P, XD_NEXT_VALUE):
9544 New macros.
9545 (XD_SYMBOL_TO_DBUS_TYPE): Rename from XD_LISP_SYMBOL_TO_DBUS_TYPE.
9546 (XD_OBJECT_TO_DBUS_TYPE): Rename from XD_LISP_OBJECT_TO_DBUS_TYPE.
9547 Simplify.
9548 (xd_signature): New function.
9549 (xd_append_arg): Compute also signatures. Major rewrite.
9550 (xd_retrieve_arg): Make debug messages friendly.
9551 (Fdbus_call_method, Fdbus_send_signal): Extend docstring.
9552 Check for signatures of arguments.
9553
9554 2007-12-19 Michael Albinus <michael.albinus@gmx.de>
9555
9556 * dbusbind.c (QCdbus_type_byte, QCdbus_type_boolean)
9557 (QCdbus_type_int16, QCdbus_type_uint16, QCdbus_type_int32)
9558 (QCdbus_type_uint32, QCdbus_type_int64, QCdbus_type_uint64)
9559 (QCdbus_type_double, QCdbus_type_string, QCdbus_type_object_path)
9560 (QCdbus_type_signature, QCdbus_type_array, QCdbus_type_variant)
9561 (QCdbus_type_struct, QCdbus_type_dict_entry): New D-Bus type symbols.
9562 (XD_LISP_SYMBOL_TO_DBUS_TYPE): New macro.
9563 (XD_LISP_OBJECT_TO_DBUS_TYPE): Add compound types.
9564 (xd_retrieve_value): Remove. Functionality included in ...
9565 (xd_append_arg): New function.
9566 (Fdbus_call_method, Fdbus_send_signal): Apply it.
9567
9568 2007-12-16 Michael Albinus <michael.albinus@gmx.de>
9569
9570 * dbusbind.c (top): Include <stdio.h>.
9571 (Fdbus_call_method, Fdbus_send_signal): Apply type cast in
9572 dbus_message_new_method_call and dbus_message_new_signal.
9573 (Fdbus_register_signal): Rename unique_name to uname.
9574 Check handler for FUNCTIONP instead of CHECK_SYMBOL. Handle case of
9575 non-existing unique name. Fix typos in matching rule. Return an
9576 object which is useful in Fdbus_unregister_signal.
9577 (Fdbus_unregister_signal): Reimplementation, in order to remove
9578 only the corresponding entry.
9579 (Vdbus_registered_functions_table): Change the order of entries.
9580 Apply these changes in xd_read_message and Fdbus_register_signal.
9581
9582 2007-12-16 Andreas Schwab <schwab@suse.de>
9583
9584 * fileio.c (Finsert_file_contents): Fix overflow check to not
9585 depend on undefined integer overflow.
9586
9587 2007-12-14 Jason Rumney <jasonr@gnu.org>
9588
9589 * w32term.c (w32_read_socket): Use MULTIBYTE_CHAR_KEYSTROKE_EVENT
9590 for characters above 127.
9591
9592 2007-12-13 Jason Rumney <jasonr@gnu.org>
9593
9594 * w32fns.c (w32_wnd_proc, Fw32_reconstruct_hot_key): Range check
9595 before dereferencing array.
9596 (lookup_vk_code): Remove zero comparison.
9597
9598 2007-12-14 Michael Albinus <michael.albinus@gmx.de>
9599
9600 * dbusbind.c (xd_retrieve_value, xd_retrieve_arg)
9601 (Fdbus_call_method, Fdbus_send_signal, xd_read_message):
9602 Use `unsigned int' instead of `uint'.
9603 (xd_read_message, Fdbus_register_signal): Split expressions into
9604 multiple lines before operators "&&" and "||", according to the
9605 GNU Coding Standards.
9606
9607 2007-12-14 Eli Zaretskii <eliz@gnu.org>
9608
9609 * dispextern.h (WINDOWS_NT): Fix incorrect spelling of WINDOWSNT.
9610
9611 2007-12-12 Juri Linkov <juri@jurta.org>
9612
9613 * buffer.c (Frename_buffer): In interactive spec replace
9614 `read-buffer' with `read-string' that uses `buffer-name-history'
9615 as history, and the current buffer's name as default.
9616
9617 2007-12-10 Stefan Monnier <monnier@iro.umontreal.ca>
9618
9619 * keyboard.c (Fcommand_execute): Call Qcall_interactively instead of
9620 manipulating the backtrace manually.
9621 (make_lispy_event): Merge the ASCII and MULTIBYTE cases.
9622 (struct backtrace, backtrace_list): Remove.
9623 (command_loop_1): Remove dead var `no_direct'.
9624
9625 * buffer.c (reset_buffer_local_variables): If permanent_too is 0, also
9626 preserve non-built-in buffer-local variables.
9627 (Fkill_all_local_variables): Don't re-create&re-set permanent
9628 buffer-local variables.
9629
9630 2007-12-09 Juri Linkov <juri@jurta.org>
9631
9632 * buffer.c (Frename_buffer): Change interactive spec from "s" to
9633 Lisp code that uses `read-buffer' with current buffer as default.
9634
9635 2007-12-08 Michael Albinus <michael.albinus@gmx.de>
9636
9637 * dbusbind.c (xd_read_message): Generate an event for every
9638 registered handler. There might be several handlers registered
9639 for the same signal.
9640 (Fdbus_register_signal): Don't overwrite a registration for the
9641 same signal. Add a new registration if handlers are different.
9642 (Vdbus_registered_functions_table): Rework doc string.
9643
9644 2007-12-07 Michael Albinus <michael.albinus@gmx.de>
9645
9646 * dbusbind.c (Fdbus_get_unique_name, xd_read_message)
9647 (Fdbus_register_signal): Use DBUS_MAXIMUM_NAME_LENGTH and
9648 DBUS_MAXIMUM_MATCH_RULE_LENGTH for string lengths.
9649 (Fdbus_call_method, Fdbus_send_signal, Fdbus_register_signal):
9650 Unify argument lists.
9651 (xd_read_message, Fdbus_register_signal): Reorder and extend event
9652 arguments and hash table keys. Use unique name for service.
9653 (Fdbus_unregister_signal): Remove checks.
9654 (Vdbus_registered_functions_table): Fix doc string.
9655
9656 2007-12-05 Magnus Henoch <mange@freemail.hu>
9657
9658 * process.c (make_process): Initialize pty_flag to 0.
9659
9660 2007-12-05 Jason Rumney <jasonr@gnu.org>
9661
9662 * image.c (xbm_load) [WINDOWSNT]: Shuffle the bits of directly
9663 specified XBMs.
9664
9665 2007-12-05 Richard Stallman <rms@gnu.org>
9666
9667 * xdisp.c (syms_of_xdisp) <scroll-conservatively>: Doc fix.
9668
9669 2007-12-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9670
9671 * mac.c (cfsockets_for_select) [MAC_OSX && SELECT_USE_CFSOCKET]:
9672 New variable.
9673 (mac_try_close_socket) [MAC_OSX]: New function.
9674 [MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]:
9675 Update cfsockets_for_select. Replace invalid CFRunLoop source.
9676
9677 * sysdep.c (emacs_close) [MAC_OSX && HAVE_CARBON]:
9678 Use mac_try_close_socket.
9679
9680 2007-12-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9681
9682 * unexmacosx.c (unrelocate): New argument BASE. Use it instead of
9683 reloc_base.
9684 (copy_dysymtab): Compute relocation base here.
9685 (rebase_reloc_address) [__ppc64__]: New function.
9686 (copy_dysymtab) [__ppc64__]: Use it if relocation base needs to be
9687 changed.
9688
9689 2007-12-05 Jason Rumney <jasonr@gnu.org>
9690
9691 * w32proc.c (sys_spawnve): Quote args with wildcards.
9692
9693 2007-12-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9694
9695 * unexmacosx.c (copy_data_segment): Also copy __gcc_except_tab and
9696 __objc_* sections.
9697 (unrelocate) [_LP64]: Set relocation base to address of data segment.
9698
9699 2007-12-05 Michael Albinus <michael.albinus@gmx.de>
9700
9701 * dbusbind.c (xd_read_message): Return value is a Lisp_Object.
9702 Move check for Vdbus_registered_functions_table to
9703 xd_read_queued_messages.
9704 (xd_read_queued_messages): Protect xd_read_message calls by
9705 internal_condition_case_1.
9706
9707 2007-12-04 Michael Albinus <michael.albinus@gmx.de>
9708
9709 * dbusbind.c (QCdbus_system_bus, QCdbus_session_bus): Rename from
9710 Qdbus_system_bus and Qdbus_session_bus, respectively.
9711 (Vdbus_intern_symbols): Remove.
9712 (Vdbus_registered_functions_table): New hash table.
9713 (XD_SYMBOL_INTERN_SYMBOL): Remove.
9714 (xd_read_message, Fdbus_register_signal, Fdbus_unregister_signal):
9715 Rewrite in order to manage registered functions by hash table
9716 Vdbus_registered_functions_table.
9717
9718 2007-12-03 Jan Djärv <jan.h.d@swipnet.se>
9719
9720 * xterm.c: Update URL to Window Manager Specification in comment.
9721
9722 2007-12-02 Michael Albinus <michael.albinus@gmx.de>
9723
9724 * config.in (HAVE_DBUS): Add.
9725
9726 * Makefile.in (HAVE_DBUS): Add D-Bus definitions if defined.
9727 (ALL_CFLAGS): Add ${DBUS_CFLAGS}.
9728 (obj): Add $(DBUS_OBJ).
9729 (LIBES): Add $(DBUS_LIBS).
9730 (dbusbind.o): New target.
9731
9732 * dbusbind.c: New file.
9733
9734 * emacs.c (main): Call syms_of_dbusbind when HAVE_DBUS is defined.
9735
9736 * keyboard.c: All D-Bus related code is wrapped by "#ifdef HAVE_DBUS".
9737 (Qdbus_event): New Lisp symbol.
9738 (kbd_buffer_get_event, make_lispy_event): Handle DBUS_EVENT.
9739 (gobble_input): Call xd_read_queued_messages, reading D-Bus messages.
9740 (keys_of_keyboard ): Define dbus-event.
9741
9742 * termhooks.h (event_kind): Add DBUS_EVENT when HAVE_DBUS is defined.
9743
9744 2007-12-01 Richard Stallman <rms@gnu.org>
9745
9746 * search.c (syms_of_search) <inhibit-changing-match-data>: Doc fix.
9747
9748 2007-11-30 Jason Rumney <jasonr@gnu.org>
9749
9750 * w32console.c (w32con_ins_del_lines, scroll_line): Clip to window.
9751 (w32con_reset_terminal_modes): Clear screen buffer.
9752 (w32_face_attributes): Don't use color indexes that are out of range.
9753 Only reverse the default colors.
9754
9755 * xfaces.c (map_tty_color, tty_color_name): Remove special case for
9756 WINDOWSNT.
9757
9758 * w32console.c, w32term.h (vga_stdcolor_name): Remove.
9759
9760 2007-11-29 Jason Rumney <jasonr@gnu.org>
9761
9762 * w32console.c: Leave HAVE_WINDOW_SYSTEM defined.
9763 (w32_face_attributes): Use Vtty_defined_color_alist to determine
9764 if the terminal colors are initialized.
9765 (unspecified_fg, unspecified_bg): Remove unused declarations.
9766
9767 2007-11-29 Andreas Schwab <schwab@suse.de>
9768
9769 * keyboard.c (apply_modifiers): Fix typo.
9770
9771 2007-11-29 Richard Stallman <rms@gnu.org>
9772
9773 * keymap.c (Fcurrent_local_map): Doc fix.
9774
9775 2007-11-28 Petr Salinger <Petr.Salinger@seznam.cz> (tiny change)
9776
9777 * s/gnu-kfreebsd.h: New file.
9778
9779 2007-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
9780
9781 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9782 Don't cast redundantly.
9783
9784 * keyboard.c (KEY_TO_CHAR): New macro.
9785 (parse_modifiers, apply_modifiers): Accept integer arguments.
9786 (read_key_sequence): Use them to unify the "shift->unshift" mapping
9787 for chars and symbol keys.
9788 After doing such remapping, apply function-key-map again.
9789
9790 2007-11-27 Dan Nicolaescu <dann@ics.uci.edu>
9791
9792 * Makefile.in (SOME_MACHINE_LISP): Remove VMS files, they are not
9793 compiled anymore.
9794
9795 2007-11-26 Andreas Schwab <schwab@suse.de>
9796
9797 * process.c (list_processes_1): Fix indentation level of the
9798 command column.
9799
9800 2007-11-23 Andreas Schwab <schwab@suse.de>
9801
9802 * editfns.c (Fformat): Handle %c specially since it requires the
9803 argument to be of type int.
9804
9805 2007-11-23 Markus Triska <markus.triska@gmx.at>
9806
9807 * emacs.c (main): Call init_editfns before init_process, since
9808 init_process sets Vprocess_connection_type depending on OS release.
9809
9810 2007-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
9811
9812 * data.c (do_symval_forwarding): Use same code as in find_symbol_value.
9813 (find_symbol_value): Use do_symval_forwarding.
9814
9815 * data.c (set_internal): Set the value in the `cons-cell' (for
9816 Buffer_Local_values) not only for frame-local variables.
9817
9818 2007-11-22 Andreas Schwab <schwab@suse.de>
9819
9820 * data.c (Fnumber_to_string): Add cast when passing EMACS_INT
9821 values to sprintf.
9822 * keymap.c (Fsingle_key_description): Likewise.
9823 * print.c (print_object): Likewise.
9824
9825 2007-11-22 Jan Djärv <jan.h.d@swipnet.se>
9826
9827 * gtkutil.c (update_frame_tool_bar): Don't call x-gtk-map-stock if
9828 file for image is nil.
9829
9830 2007-11-22 Dan Nicolaescu <dann@ics.uci.edu>
9831
9832 * term.c: Include stdarg.h.
9833 (fatal): Implement using varargs.
9834 * lisp.h (fatal): Add argument types. (Restore 2005-09-30 change).
9835
9836 2007-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
9837
9838 * lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field.
9839 * data.c (store_symval_forwarding): Get type from buffer_objfwd.
9840 Update call to buffer_slot_type_mismatch.
9841 * buffer.h (buffer_local_types, PER_BUFFER_TYPE): Remove.
9842 (buffer_slot_type_mismatch): Update.
9843 * buffer.c (buffer_local_types): Remove.
9844 (buffer_slot_type_mismatch): Get the symbol and type as arguments.
9845 (defvar_per_buffer): Set the type in the buffer_objfwd.
9846
9847 2007-11-21 Jason Rumney <jasonr@gnu.org>
9848
9849 * w32bdf.c (w32_init_bdf_font, w32_BDF_to_x_font):
9850 CreateFileMapping returns NULL on failure.
9851
9852 2007-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
9853
9854 * search.c (Fset_match_data): Remove the `evaporate' feature.
9855 (unwind_set_match_data): Don't use the `evaporate' feature.
9856
9857 2007-11-21 Jason Rumney <jasonr@gnu.org>
9858
9859 * dispnew.c (init_display) [WINDOWSNT]: Hardcode terminal_type.
9860
9861 * w32console.c (w32con_write_glyphs): Remove unused variables.
9862
9863 2007-11-20 Dan Nicolaescu <dann@ics.uci.edu>
9864
9865 * macterm.c (mac_term_init): Call add_keyboard_wait_descriptor.
9866
9867 * s/darwin.h (MULTI_KBOARD): Remove.
9868
9869 * macfns.c (x_create_tip_frame, Fx_create_frame)
9870 (x_create_tip_frame): Don't deal with MULTI_KBOARD.
9871
9872 2007-11-19 Stefan Monnier <monnier@iro.umontreal.ca>
9873
9874 * buffer.c (Fbuffer_local_value): Remove redundant test.
9875 (swap_out_buffer_local_variables): Swap out binding in `buffer' rather
9876 than in `current-buffer' to match the comment.
9877 Do the swap using swap_in_global_binding.
9878
9879 * data.c (store_symval_forwarding, set_internal):
9880 * eval.c (specbind): Remove dead code.
9881
9882 * coding.c (detect_coding, Fupdate_coding_systems_internal):
9883 * fns.c (Fmd5): Use find_symbol_value rather than SYMBOL_VALUE
9884 Since we do not want to see internal Lisp_*fwd objects here.
9885
9886 2007-11-18 Jan Djärv <jan.h.d@swipnet.se>
9887
9888 * sysdep.c (init_system_name): Use getaddrinfo if available.
9889
9890 * xterm.c (x_scroll_bar_set_handle, x_scroll_bar_handle_click)
9891 (x_scroll_bar_note_movement): start, end, with, height in struct
9892 scroll_bar are integers and not Lisp_Object, so remove XINT for them.
9893
9894 2007-11-17 Dan Nicolaescu <dann@ics.uci.edu>
9895
9896 * puresize.h (BASE_PURESIZE): Increase to 1190000.
9897
9898 2007-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
9899
9900 * buffer.h (struct buffer): Move `undo_list' back to before `name'.
9901 This undoes Richard's change of 14-Oct-2002.
9902
9903 * alloc.c (allocate_other_vector):
9904 * lisp.h (allocate_other_vector): Remove.
9905
9906 * window.c (struct save_window_data): Move non-lisp data to the end
9907 and make it `int' rather than Lisp_Object.
9908 (Fcurrent_window_configuration): Use ALLOCATE_PSEUDOVECTOR.
9909 Done wrap/unwrap integer values.
9910 (Fset_window_configuration, compare_window_configurations):
9911 Update use of fields to their new types.
9912
9913 * xterm.h (struct scroll_bar): Only use Lisp_Object for lisp data.
9914 Turn integer fields into `int'. Merge x_window_low and x_window_high.
9915 (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK, SCROLL_BAR_X_WINDOW)
9916 (SET_SCROLL_BAR_X_WINDOW): Remove.
9917 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
9918 Access the new x_window field directly.
9919 * xterm.c (x_scroll_bar_create): Use a pseudovector.
9920 Don't wrap/unwrap integers into Lisp_Objects.
9921 (XTset_vertical_scroll_bar, x_scroll_bar_handle_click)
9922 (x_scroll_bar_report_motion):
9923 Don't wrap/unwrap integers into Lisp_Objects.
9924 (x_term_init): Use SDATA.
9925 (x_window_to_scroll_bar, x_create_toolkit_scroll_bar)
9926 (x_scroll_bar_set_handle, x_scroll_bar_remove)
9927 (XTset_vertical_scroll_bar, x_scroll_bar_expose)
9928 (x_scroll_bar_report_motion, x_scroll_bar_clear):
9929 * xfns.c (x_set_background_color):
9930 * gtkutil.c (xg_create_scroll_bar, xg_set_toolkit_scroll_bar_thumb):
9931 Access the new x_window field directly.
9932
9933 * alloc.c (ALLOCATE_PSEUDOVECTOR): Move to lisp.h.
9934 (allocate_pseudovector): Make non-static.
9935
9936 * lisp.h (enum pvec_type): New tag PVEC_OTHER.
9937 (allocate_pseudovector): Declare.
9938 (ALLOCATE_PSEUDOVECTOR): Move from alloc.c.
9939
9940 2007-11-15 Andreas Schwab <schwab@suse.de>
9941
9942 * editfns.c (Fformat): Correctly format EMACS_INT values.
9943 Also take precision into account when formatting an integer.
9944
9945 * keyboard.c (Fevent_symbol_parse_modifiers): Fix declaration.
9946
9947 2007-11-15 Stefan Monnier <monnier@iro.umontreal.ca>
9948
9949 * keyboard.c (Fevent_symbol_parse_modifiers): New function.
9950 (syms_of_keyboard): Defsubr it.
9951
9952 * data.c (swap_in_global_binding): Fix longstanding bug where
9953 store_symval_forwarding was not called with the right second argument,
9954 thus causing objfwd-ing from being dropped.
9955
9956 2007-11-14 Juanma Barranquero <lekktu@gmail.com>
9957
9958 * macfns.c (Fx_create_frame, Fx_display_pixel_width)
9959 (Fx_display_pixel_height, Fx_display_planes)
9960 (Fx_display_color_cells, Fx_server_max_request_size)
9961 (Fx_server_vendor, Fx_server_version, Fx_display_backing_store)
9962 (Fx_display_visual_class, Fx_display_save_under):
9963 * w32fns.c (Fx_create_frame, Fx_display_pixel_width)
9964 (Fx_display_pixel_height, Fx_display_planes)
9965 (Fx_display_color_cells, Fx_server_max_request_size)
9966 (Fx_server_vendor, Fx_server_version, Fx_display_screens)
9967 (Fx_display_mm_height, Fx_display_mm_width)
9968 (Fx_display_backing_store, Fx_display_visual_class)
9969 (Fw32_select_font, Fx_display_save_under):
9970 * xfns.c (Fx_create_frame, Fx_display_pixel_width)
9971 (Fx_display_pixel_height, Fx_display_planes)
9972 (Fx_display_color_cells, Fx_server_max_request_size)
9973 (Fx_server_vendor, Fx_server_version, Fx_display_backing_store)
9974 (Fx_display_save_under): Fix typos in docstrings.
9975
9976 2007-11-14 Juanma Barranquero <lekktu@gmail.com>
9977
9978 * w32fns.c (Fw32_registered_hot_keys): Don't return the nil values
9979 corresponding to deleted entries; they are an implementation detail.
9980 (gray_bitmap_width, gray_bitmap_height, gray_bitmap_bits):
9981 Remove variables.
9982 (w32_pass_extra_mouse_buttons_to_system, w32_strict_fontnames)
9983 (w32_pass_multimedia_buttons_to_system, w32_strict_painting)
9984 (Vw32_charset_info_alist, w32_to_x_color, w32_init_class)
9985 (w32_createscrollbar, w32_createwindow, my_post_msg, w32_get_modifiers)
9986 (w32_grabbed_keys, cancel_all_deferred_msgs): Make static.
9987 (Fw32_define_rgb_color, Fw32_load_color_file)
9988 (syms_of_w32fns) <w32-pass-multimedia-buttons-to-system>:
9989 Fix typos in docstrings.
9990 (Fx_server_version): Reflow docstring.
9991 (Fw32_shell_execute): Doc fixes.
9992
9993 2007-11-13 Juanma Barranquero <lekktu@gmail.com>
9994
9995 * w32fns.c (Fw32_register_hot_key): Don't try to register hot key
9996 if w32_parse_hot_key returned nil.
9997
9998 2007-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
9999
10000 * xdisp.c (load_overlay_strings): Fix copy&paste typo.
10001
10002 2007-11-09 Jason Rumney <jasonr@gnu.org>
10003
10004 * s/ms-w32.c (USE_TOOLKIT_SCROLL_BARS): Define.
10005
10006 * w32term.c (w32_scroll_bar_handle_click): Use SCROLL_BAR_CLICK_EVENT.
10007
10008 * keyboard.c (discard_mouse_events, make_lispy_event) [WINDOWSNT]:
10009 Remove W32_SCROLL_BAR_CLICK_EVENT.
10010
10011 * termhooks.h (enum event_kind) [WINDOWSNT]: Likewise.
10012 Add MULTIMEDIA_KEY_EVENT.
10013
10014 * keyboard.c (lispy_function_keys) [WINDOWSNT]: Add more keys.
10015 (lispy_multimedia_keys) [WINDOWSNT]: New array.
10016 (make_lispy_event) [WINDOWSNT]: Use it to translate
10017 MULTIMEDIA_KEY_EVENT.
10018
10019 * w32term.h (WM_APPCOMMAND): Define if not already.
10020 (GET_APPCOMMAND_LPARAM): Likewise.
10021
10022 * w32term.c (w32_read_socket): Generate MULTIMEDIA_KEY_EVENT from
10023 WM_APPCOMMAND.
10024
10025 * w32fns.c (w32_pass_multimedia_buttons_to_system): New user option.
10026 (syms_of_w32fns): Export and initialize it.
10027 (w32_wnd_proc): Pass WM_APPCOMMAND on to w32_read_socket.
10028
10029 2007-11-09 Chong Yidong <cyd@stupidchicken.com>
10030
10031 * dispextern.h (struct it): Don't define OVERLAY_STRING_CHUNK_SIZE
10032 twice.
10033
10034 * xdisp.c (handle_face_prop): Fix last change.
10035
10036 2007-11-09 Richard Stallman <rms@gnu.org>
10037
10038 * xdisp.c (handle_face_prop): Test for strings that came from overlays,
10039 not just for after-strings and before-strings.
10040 Call face_for_overlay_string and pass the overlay to it.
10041 (handle_display_prop): Determine whether property came from an overlay.
10042 Pass OVERLAY arg to handle_single_display_spec.
10043 (handle_single_display_spec): New arg OVERLAY sets it->from_overlay.
10044 (load_overlay_strings): Fill in it->string_overlays.
10045 (get_overlay_strings_1, push_it, pop_it): Handle it->from_overlays.
10046
10047 * xfaces.c (face_for_overlay_string): Function renamed from
10048 face_at_buffer_position_no_overlays, and add arg OVERLAY.
10049
10050 * dispextern.h (struct it): New elt string_overlays.
10051 New elt from_overlay, also in stack.
10052 Rearrange a few elements.
10053 (face_for_overlay_string): Decl renamed from
10054 face_at_buffer_position_no_overlays, and add argument.
10055
10056 2007-11-09 Richard Stallman <rms@gnu.org>
10057
10058 * xdisp.c (handle_face_prop): Use face_at_buffer_position_no_overlays
10059 to get the base face for an overlay string.
10060
10061 * dispextern.h (face_at_buffer_position_no_overlays): Add decl.
10062
10063 * xfaces.c (face_at_buffer_position_no_overlays): New function.
10064
10065 * xdisp.c (handle_stop): Move some code out of loop.
10066
10067 2007-11-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10068
10069 * macfns.c [USE_ATSUI] (Fmac_atsu_font_face_attributes):
10070 Fix conversion from Lisp object to ATSUFontID.
10071
10072 2007-11-09 Jason Rumney <jasonr@gnu.org>
10073
10074 * xdisp.c (Fformat_mode_line): Do nothing when noninteractive.
10075
10076 2007-11-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10077
10078 * unexmacosx.c (unexec_regions_recorder, unexec_regions_merge):
10079 Don't assume regions are aligned to page boundary.
10080 (print_load_command_name): Add LC_UUID if defined.
10081
10082 2007-11-09 Richard Stallman <rms@gnu.org>
10083
10084 * emacs.c (syms_of_emacs) <installation-directory>: Reflow docstring.
10085
10086 2007-11-07 Jason Rumney <jasonr@gnu.org>
10087
10088 * s/windows95.h: Remove.
10089
10090 2007-11-06 Jan Djärv <jan.h.d@swipnet.se>
10091
10092 * gtkutil.c (xg_tool_bar_menu_proxy): Handle GTK_IMAGE_ICON_NAME and
10093 abort with a message on unhandled store_type values.
10094
10095 2007-11-01 Jan Djärv <jan.h.d@swipnet.se>
10096
10097 * xterm.c, xfns.c, xselect.c, xterm.h, s/msdos.h, s/sco4.h, s/sco5.h:
10098 Remove HAVE_X11R5 and HAVE_X11R4.
10099
10100 2007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
10101
10102 * Makefile.in: Remove references to sunfns.c and sunfns.o.
10103
10104 2007-11-01 Johan Bockgård <bojohan@gnu.org>
10105
10106 * macterm.c, w32term.c, xterm.c (x_draw_stretch_glyph_string):
10107 Don't set s->stippled_p here, since it has already been set by
10108 x_set_glyph_string_gc from x_draw_glyph_string.
10109
10110 2007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
10111
10112 * sunfns.c: Remove file.
10113
10114 * m/sun386.h:
10115 * m/sun2.h:
10116 * m/sparc.h: Remove Sun windows code.
10117
10118 2007-10-31 Stefan Monnier <monnier@iro.umontreal.ca>
10119
10120 * keyboard.c (syms_of_keyboard): Initialize the initial_kboard.
10121 (init_keyboard): Set current_kboard's window-system to nil.
10122 (tty_read_avail_input): Typo.
10123 * frame.c (make_initial_frame): Don't initialize the initial_kboard.
10124
10125 2007-10-31 Dan Nicolaescu <dann@ics.uci.edu>
10126
10127 * s/usg5-4.h:
10128 * s/usg5-3.h:
10129 * s/ptx.h:
10130 * m/is386.h:
10131 * m/ibmps2-aix.h:
10132 * Makefile.in: Remove all mentions of X10.
10133
10134 * dispnew.c (syms_of_display): Don't mention version 10.
10135
10136 2007-10-28 Juanma Barranquero <lekktu@gmail.com>
10137
10138 * makefile.w32-in (OBJ1): Remove abbrev.$(O).
10139 ($(BLD)/abbrev.$(O)): Remove.
10140
10141 2007-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
10142
10143 Rewrite abbrev.c in Elisp.
10144 * image.c (Qcount): Don't declare as extern.
10145 (syms_of_image): Initialize and staticpro `Qcount'.
10146 * puresize.h (BASE_PURESIZE): Increase for the new abbrev.el functions.
10147 * emacs.c (main): Don't call syms_of_abbrev.
10148 * Makefile.in (obj): Remove abbrev.o.
10149 (abbrev.o): Remove.
10150 * abbrev.c: Remove.
10151
10152 2007-10-26 Martin Rudalics <rudalics@gmx.at>
10153
10154 * window.c (window_min_size_2): Don't count header-line.
10155
10156 2007-10-26 Dan Nicolaescu <dann@ics.uci.edu>
10157
10158 * frame.h (struct frame): Move all bit fields after the first bit
10159 field to take advantage of the available space. Group all the
10160 chars together to reduce wasted space due to padding.
10161
10162 2007-10-26 Juanma Barranquero <lekktu@gmail.com>
10163
10164 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Reflow docstrings.
10165
10166 * alloc.c (spare_memory, stack_copy, stack_copy_size, ignore_warnings)
10167 (Vdead, dont_register_blocks, staticvec, staticidx, interval_block)
10168 (n_interval_blocks, init_strings, check_string_bytes, check_sblock)
10169 (init_float, free_float, n_cons_blocks, init_cons, all_vectors)
10170 (n_vectors, symbol_block, symbol_block_index, symbol_free_list)
10171 (n_symbol_blocks, init_symbol, marker_block, marker_free_list)
10172 (n_marker_blocks, init_marker, valid_pointer_p, make_pure_float)
10173 (last_marked, mark_object_loop_halt): Make static.
10174
10175 * frame.c (syms_of_frame) <delete-frame-functions>:
10176 Fix typo in docstring.
10177
10178 2007-10-25 Juanma Barranquero <lekktu@gmail.com>
10179
10180 * w32.c (init_environment): Fix tiny memory leak.
10181 (w32_get_resource): Remove unused variable `ok'.
10182
10183 2007-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
10184
10185 Make `window-system' into a keyboard-local variable (rather than
10186 frame-local as done originally by multi-tty).
10187
10188 * keyboard.h (struct kboard): Add Vwindow_system.
10189 * keyboard.c (init_kboard): Set a default for Vwindow_system.
10190 (mark_kboards): Mark Vwindow_system.
10191
10192 * dispnew.c (syms_of_display) <window-system>: Declare terminal-local.
10193 (init_display): Don't set the obsolete `window-system' frame-param.
10194
10195 * xterm.c (x_term_init):
10196 * w32term.c (w32_create_terminal):
10197 * term.c (init_tty): Set Vwindow_system.
10198 * macterm.c (mac_create_terminal): Set a keyboard (missing piece of the
10199 multi-tty merge maybe?), copied from w32term.c. Set Vwindow_system.
10200
10201 * xfns.c (Fx_create_frame, x_create_tip_frame):
10202 * w32fns.c (Fx_create_frame, x_create_tip_frame):
10203 * macfns.c (Fx_create_frame):
10204 Don't set the obsolete `window-system' frame-param.
10205
10206 * frame.h (Qwindow_system): Remove.
10207 * frame.c (Qwindow_system): Remove. In `syms_of_frame' as well.
10208 (Fmake_terminal_frame): Don't set obsolete `window-system' frame-param.
10209
10210 2007-10-24 Richard Stallman <rms@gnu.org>
10211
10212 * frame.c (x_figure_window_size): For fullscreen case,
10213 set USPosition | PPosition without clobbering rest of window_prompting.
10214
10215 * keyboard.c (Fcurrent_idle_time): Doc fix.
10216
10217 * print.c (Fwith_output_to_temp_buffer): Doc fix.
10218
10219 2007-10-23 Stefan Monnier <monnier@iro.umontreal.ca>
10220
10221 * process.c (unwind_request_sigio): Only define if __ultrix__.
10222
10223 * callproc.c (child_setup): Remove spurious *.
10224
10225 * lisp.h (Fget_text_property): Declare.
10226 (have_menus_p): Declare it here rather than in sys-dep header files.
10227 * macterm.h (have_menus_p):
10228 * msdos.h (have_menus_p):
10229 * xterm.h (have_menus_p): Remove.
10230
10231 * data.c (Fmake_variable_buffer_local, Fmake_local_variable)
10232 (Fmake_variable_frame_local): Just check the variable's const-ness
10233 rather than checking nil or t.
10234
10235 2007-10-22 Jason Rumney <jasonr@gnu.org>
10236
10237 * w32fns.c: Include math.h.
10238 (w32_abort): Declaration moved to nt/config.nt.
10239
10240 * s/ms-w32.h (HAVE_STDLIB_H): Define.
10241 (abort): Redefinition moved to nt/config.nt.
10242
10243 * m/windowsnt.h: Remove.
10244
10245 2007-10-22 Juanma Barranquero <lekktu@gmail.com>
10246
10247 * emacs.c (Fdump_emacs): Fix typo in message.
10248 (syms_of_emacs) <kill-emacs-hook>: Fix typo in docstring.
10249 <installation-directory>: Reflow docstring.
10250
10251 2007-10-22 Juri Linkov <juri@jurta.org>
10252
10253 * minibuf.c: Allow minibuffer default to be a list of default values.
10254 With empty input use the first element of this list as returned default.
10255 (string_to_object)
10256 (read_minibuf_noninteractive): If defalt is cons, set val to its car.
10257 (read_minibuf): If defalt is cons, set histstring to its car.
10258 (Fread_string): If default_value is cons, set val to its car.
10259 (Fread_buffer): If def is cons, use its car.
10260 (Fcompleting_read): If defalt is cons, set val to its car.
10261
10262 2007-10-21 Michael Albinus <michael.albinus@gmx.de>
10263
10264 * fileio.c (Fcopy_file): Call file name handler with preserve_uid_gid.
10265
10266 2007-10-20 Juanma Barranquero <lekktu@gmail.com>
10267
10268 * doc.c (Fdocumentation): Check for advice in all cases.
10269
10270 2007-10-19 Chong Yidong <cyd@stupidchicken.com>
10271
10272 * Makefile.in [HAVE_LIBRESOLV]: Add -lresolv to linker flags.
10273
10274 2007-10-19 Richard Stallman <rms@gnu.org>
10275
10276 * doc.c (Fdocumentation): Check for and handle an advised function.
10277
10278 2007-10-19 Juanma Barranquero <lekktu@gmail.com>
10279
10280 * process.c (Fset_process_filter): Doc fix.
10281
10282 2007-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
10283
10284 * keyboard.c (read_key_sequence): Undo a change introduced by multi-tty
10285 which caused key-translation-map to applied repeatedly (thus breaking
10286 double-mode).
10287
10288 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
10289
10290 * xselect.c (x_own_selection, x_handle_selection_clear)
10291 (x_clear_frame_selections):
10292 * w32menu.c (list_of_panes, list_of_items):
10293 * w32fns.c (w32_color_map_lookup, Fx_create_frame, Fx_display_list):
10294 * textprop.c (validate_plist, interval_has_all_properties)
10295 (interval_has_some_properties, interval_has_some_properties_list)
10296 (add_properties, text_property_list):
10297 * process.c (Fget_buffer_process, list_processes_1, status_notify):
10298 * minibuf.c (Fassoc_string):
10299 * macselect.c (x_own_selection, x_clear_frame_selections)
10300 (Fx_disown_selection_internal):
10301 * keymap.c (Fcommand_remapping, where_is_internal, describe_map_tree):
10302 Use CONSP rather than !NILP and XC[AD]R rather than Fc[ad]r.
10303
10304 2007-10-17 Chong Yidong <cyd@stupidchicken.com>
10305
10306 * process.c: Link to libs for calling res_init() if available.
10307 (Fmake_network_process): Call res_init() before getaddrinfo or
10308 gethostbyname, if possible.
10309
10310 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
10311
10312 * lread.c (read1): Set pvectype for char_tables.
10313
10314 * lisp.h (XMISCANY, XMARKER, XINTFWD, XBOOLFWD, XOBJFWD, XOVERLAY)
10315 (XBUFFER_OBJFWD, XBUFFER_LOCAL_VALUE, XKBOARD_OBJFWD, XSAVE_VALUE):
10316 Add type checks.
10317 (SOME_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP): Remove.
10318
10319 * alloc.c (free_misc): Use XMISCTYPE.
10320 (live_misc_p, gc_sweep): Use Lisp_Misc_Any.
10321
10322 2007-10-17 Glenn Morris <rgm@gnu.org>
10323
10324 * minibuf.c (Qcompletion_ignore_case): New Lisp_Object.
10325 (syms_of_minibuf): Add Qcompletion_ignore_case.
10326 * dired.c (Qcompletion_ignore_case): Change to external.
10327 (syms_of_dired) [VMS]: Remove Qcompletion_ignore_case.
10328 * fileio.c (Qcompletion_ignore_case): New external Lisp_Object.
10329 (Fread_file_name): Use it rather than intern'ing.
10330
10331 * coding.c (Qcompletion_ignore_case): New external Lisp_Object.
10332 (Fread_coding_system): Ignore case of user input.
10333
10334 2007-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10335
10336 * xdisp.c (handle_display_prop): Ignore display specs after
10337 replacing one when string text is being replaced.
10338 (handle_single_display_spec): Pretend as if characters with display
10339 property haven't been consumed only when buffer text is being replaced.
10340
10341 2007-10-16 Stefan Monnier <monnier@iro.umontreal.ca>
10342
10343 * xfns.c (Fx_create_frame, Fx_display_list):
10344 * window.c (window_fixed_size_p, enlarge_window)
10345 (shrink_window_lowest_first):
10346 * macterm.c (init_font_name_table):
10347 * macfns.c (Fx_create_frame, Fx_display_list):
10348 * lread.c (close_load_descs):
10349 * keyboard.c (read_char_x_menu_prompt):
10350 * fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent):
10351 * coding.c (code_convert_region_unwind): Test the type of an object
10352 rather than just !NILP before extracting data from it.
10353
10354 * alloc.c (Fpurecopy): Set the pvec tag on pseudo vectors.
10355
10356 * lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
10357 (XMISCANY): New macro.
10358 (XMISCTYPE): Use it.
10359 (struct Lisp_Misc_Any): New type.
10360 (union Lisp_Misc): Use it.
10361 (struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
10362 * data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
10363 (find_symbol_value, set_internal, default_value, Fset_default)
10364 (Fmake_variable_buffer_local, Fmake_local_variable)
10365 (Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
10366 (Flocal_variable_if_set_p, Fvariable_binding_locus):
10367 The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
10368 * alloc.c (allocate_buffer): Set the size and tag.
10369 (allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
10370 Use XMISCANY.
10371 (die): Follow the GNU convention for error messages.
10372 * print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
10373 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
10374 tag any more.
10375 (set_buffer_internal_1):
10376 * frame.c (store_frame_param):
10377 * eval.c (specbind):
10378 * xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
10379
10380 * doc.c (Fsnarf_documentation): Simplify.
10381
10382 2007-10-14 Juanma Barranquero <lekktu@gmail.com>
10383
10384 * w32term.c (w32_font_is_double_byte, my_create_scrollbar): Make static.
10385 (syms_of_w32term) <w32-enable-unicode-output>: Fix typo in docstring.
10386
10387 2007-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
10388
10389 * buffer.c (Fmake_indirect_buffer): Set the buffer's tag.
10390
10391 2007-10-14 Juanma Barranquero <lekktu@gmail.com>
10392
10393 * eval.c (do_autoload): Don't save autoloads.
10394
10395 * data.c (Ffset): Save autoload of the function being set.
10396
10397 2007-10-07 John Paul Wallington <jpw@pobox.com>
10398
10399 * xfns.c (x_create_tip_frame): Set the `display-type' frame
10400 parameter before setting up faces.
10401
10402 2007-10-13 Eli Zaretskii <eliz@gnu.org>
10403
10404 * ccl.c (Fregister_code_conversion_map):
10405 * keyboard.c (append_tool_bar_item): Reformat last change.
10406
10407 * lisp.h (eabs): Rename from `abs'. All callers changed.
10408
10409 2007-10-05 Dmitry Antipov <dmantipov@yandex.ru>
10410
10411 * buffer.c (add_overlay_mod_hooklist):
10412 * ccl.c (Fregister_ccl_program, Fregister_code_conversion_map):
10413 * fontset.c (make_fontset):
10414 * keyboard.c (GROW_RAW_KEYBUF, menu_bar_items, menu_bar_item)
10415 (append_tool_bar_item):
10416 * macmenu.c (grow_menu_items):
10417 * w32menu.c (grow_menu_items):
10418 * xmenu.c (grow_menu_items): Use larger_vector.
10419
10420 2007-10-13 Eli Zaretskii <eliz@gnu.org>
10421
10422 * msdos.c (dos_rawgetc): Undo last change (there's no ``leaving
10423 selected frame'' on MSDOS).
10424
10425 2007-10-12 Martin Rudalics <rudalics@gmx.at>
10426
10427 * frame.c (Qexplicit_name): New variable.
10428 (x_report_frame_params): Report it in parameter alist.
10429 (syms_of_frame): Intern and staticpro it.
10430
10431 2007-10-10 Patrick Mahan <mahan@mahan.org> (tiny change)
10432
10433 * macfns.c (x_create_tip_frame): Set terminal for frame.
10434
10435 2007-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
10436
10437 * frame.c (Qenvironment): Remove.
10438 (syms_of_frame) <Qenvironment>: Don't initialize.
10439 (Fdelete_frame): Don't treat the `environment' param specially.
10440 * frame.h (Qenvironment): Don't declare.
10441 * callproc.c (set_initial_environment): Don't set unused frame param.
10442
10443 * frame.c (Fframe_with_environment): Remove.
10444 (syms_of_frame) <Sframe_with_environment>: Don't declare.
10445
10446 * lisp.h (Fframe_with_environment): Don't declare.
10447
10448 2007-10-10 Juanma Barranquero <lekktu@gmail.com>
10449
10450 * indent.c (indent_tabs_mode, last_known_column)
10451 (last_known_column_modified): Make static.
10452 (syms_of_indent) <indent-tabs-mode>: Remove redundant info in docstring.
10453
10454 2007-10-10 Katsumi Yamaoka <yamaoka@jpl.org>
10455
10456 * puresize.h (BASE_PURESIZE): Increase to 1170000.
10457
10458 2007-10-09 Jason Rumney <jasonr@gnu.org>
10459
10460 * w32term.c (x_set_window_size): Disable code that attempts to tell
10461 Lisp code about a size change before it actually happens.
10462
10463 2007-10-09 Richard Stallman <rms@gnu.org>
10464
10465 * xdisp.c (handle_invisible_prop): After setting up an ellipsis,
10466 return HANDLED_RETURN.
10467
10468 2007-10-08 Martin Rudalics <rudalics@gmx.at>
10469
10470 * keyboard.c (kbd_buffer_get_event): Break loop waiting for input
10471 when there's an unread command event.
10472
10473 * frame.c (focus_follows_mouse): Move here from frame.el to allow
10474 window autoselection act appropriately when leaving selected frame.
10475 (syms_of_frame): Initialize focus_follows_mouse.
10476 * frame.h (focus_follows_mouse): Extern it.
10477 * macterm.c (XTread_socket): When focus_follows_mouse is nil
10478 make SELECT_WINDOW_EVENT only if we don't leave the selected frame.
10479 * msdos.c (dos_rawgetc): Likewise.
10480 * w32term.c (w32_read_socket): Likewise.
10481 * xterm.c (handle_one_xevent): Likewise.
10482 * xdisp.c (syms_of_xdisp): In doc-string of
10483 mouse-autoselect-window mention focus-follows-mouse.
10484
10485 2007-10-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10486
10487 * macterm.c (mac_load_query_font): Fix missing return value.
10488 [USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
10489 Add BLOCK_INPUT.
10490
10491 2007-10-08 Richard Stallman <rms@gnu.org>
10492
10493 * xdisp.c (get_window_cursor_type): Implement documented behavior
10494 for cursor-in-non-selected-windows = t.
10495
10496 2007-10-08 Jason Rumney <jasonr@gnu.org>
10497
10498 * w32.c (w32_get_resource): Always close registry keys.
10499
10500 2007-10-08 Jason Rumney <jasonr@gnu.org>
10501
10502 * makefile.w32-in (LIBS): Add COMCTL32.
10503
10504 * w32fns.c (globals_of_w32fns): Init common controls.
10505
10506 2007-10-08 Richard Stallman <rms@gnu.org>
10507
10508 * image.c (our_memory_buffer): Rename from omfib_buffer.
10509
10510 2007-10-08 Richard Stallman <rms@gnu.org>
10511
10512 * buffer.c (Foverlays_at): Doc fix.
10513
10514 2007-10-08 Stefan Monnier <monnier@iro.umontreal.ca>
10515
10516 * fns.c (Fplist_put): Preserve uneven tail data.
10517
10518 2007-10-08 Peter O'Gorman <bug-gnu-emacs@mlists.thewrittenword.com> (tiny change)
10519
10520 * termhooks.h (enum event_kind): Remove trailing comma.
10521
10522 * frame.h (enum): Remove trailing comma.
10523
10524 2007-10-08 Dhruva Krishnamurthy <dhruvakm@gmail.com> (tiny change)
10525
10526 * w32proc.c (delete_child): Don't terminate threads of zombies.
10527
10528 2007-10-08 Martin Rudalics <rudalics@gmx.at>
10529
10530 * keyboard.h (struct kboard): New elt Vlast_repeatable_command.
10531
10532 * keyboard.c (syms_of_keyboard): Set up new Lisp variable
10533 last-repeatable-command.
10534 (init_kboard): Initialize Vlast_repeatable_command.
10535 (command_loop_1): Set it to real_this_command unless that was
10536 bound to an input event.
10537 (mark_kboards): Mark it.
10538
10539 2007-10-08 Richard Stallman <rms@gnu.org>
10540
10541 * eval.c (condition-case): Doc fix.
10542
10543 2007-10-08 Masatake YAMATO <jet@gyve.org>
10544
10545 * xfaces.c (tty_supports_face_attributes_p): Fix code
10546 for LFACE_INVERSE_INDEX and LFACE_BACKGROUND_INDEX; code
10547 was copied and not edited.
10548
10549 2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
10550
10551 Add new `input-decode-map' keymap and use it for terminal
10552 escape sequences.
10553 * keyboard.h (struct kboard): Add Vinput_decode_map.
10554 Remove Vlocal_key_translation_map.
10555 * keyboard.c (read_key_sequence): Add support for input-decode-map.
10556 (init_kboard): Init input-decode-map.
10557 Replace local-key-translation-map back with key-translation-map.
10558 (syms_of_keyboard): Declare input-decode-map.
10559 Remove local-key-translation-map. Update docstrings.
10560 (mark_kboards): Mark Vinput_decode_map.
10561 Don't mark Vlocal_key_translation_map.
10562 * keymap.c (Fdescribe_buffer_bindings): Describe input-decode-map.
10563 Replace local-key-translation-map back with key-translation-map.
10564 * term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN):
10565 Bind in input-decode-map rather than function-key-map.
10566
10567 * lisp.h (XSETPSEUDOVECTOR): Don't set the tag anymore.
10568 This was made redundant by the previous introduction of XSETPVECTYPE.
10569
10570 2007-10-09 Richard Stallman <rms@gnu.org>
10571
10572 * image.c (free_bitmap_record): Rename from Free_Bitmap_Record.
10573
10574 2007-09-29 Richard Stallman <rms@gnu.org>
10575
10576 * eval.c (internal_condition_case_2, internal_condition_case_1)
10577 (internal_condition_case): Reenable abort if x_catching_errors ()
10578 to see if that really happens and why.
10579
10580 2007-10-06 Andreas Schwab <schwab@suse.de>
10581
10582 * fileio.c (Fwrite_region): Ignore EINVAL error from fsync.
10583
10584 2007-10-04 Juanma Barranquero <lekktu@gmail.com>
10585
10586 * image.c (syms_of_image) <image-types>: Fix typo in docstring.
10587
10588 2007-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10589
10590 * frame.h (struct frame): Don't try to GC-mark menu_bar_items_used.
10591
10592 2007-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
10593
10594 * window.h (struct window):
10595 * window.c (struct save_window_data, struct saved_window):
10596 * termhooks.h (struct terminal):
10597 * process.h (struct Lisp_Process):
10598 * frame.h (struct frame):
10599 * buffer.h (struct buffer):
10600 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
10601 (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
10602 The size field of (pseudo)vectors is now unsigned.
10603 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
10604
10605 * lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end.
10606 Turn `count' into an integer.
10607
10608 * fns.c (make_hash_table, hash_put, hash_remove, hash_clear)
10609 (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count):
10610 * print.c (print_object) <HASH_TABLE_P>: `count' is an int.
10611 * alloc.c (allocate_hash_table): Use ALLOCATE_PSEUDOVECTOR.
10612 (mark_object) <HASH_TABLE_P>: Use mark_vectorlike.
10613
10614 * alloc.c (allocate_pseudovector): New fun.
10615 (ALLOCATE_PSEUDOVECTOR): New macro.
10616 (allocate_window, allocate_terminal, allocate_frame)
10617 (allocate_process): Use it.
10618 (mark_vectorlike): New function.
10619 (mark_object) <FRAMEP, WINDOWP, BOOL_VECTOR_P, VECTORP>: Use it.
10620 (mark_terminals): Use it.
10621 (Fmake_bool_vector, Fmake_char_table, make_sub_char_table)
10622 (Fmake_byte_code): Use XSETPVECTYPE.
10623
10624 * frame.c (Fframe_parameters): Minor simplification.
10625
10626 * insdel.c (adjust_markers_for_insert): Generalize assertion checks.
10627
10628 * marker.c (Fmarker_buffer): Make test for odd case into a failure.
10629
10630 * buffer.c (Fget_buffer_create, init_buffer_once):
10631 * lread.c (defsubr):
10632 * window.c (Fcurrent_window_configuration): Use XSETPVECTYPE.
10633
10634 * lisp.h (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Don't let them be
10635 defined differently in the m/*.h files.
10636 (XCHAR_TABLE, XBOOL_VECTOR): Add assertion checking.
10637 (XSETPVECTYPE): New macro.
10638 (XSETPSEUDOVECTOR): Use it.
10639
10640 * buffer.c (syms_of_buffer) <local-abbrev-table>: Move from abbrev.c.
10641 (DEFVAR_PER_BUFFER, defvar_per_buffer): Move from lisp.h and lread.c.
10642
10643 * lisp.h (defvar_per_buffer, DEFVAR_PER_BUFFER):
10644 * lread.c (defvar_per_buffer):
10645 * abbrev.c (syms_of_abbrev) <local-abbrev-tabl>: Move to buffer.c.
10646
10647 * window.c (candidate_window_p): Only consider as visible frames that
10648 are on the same terminal.
10649
10650 * m/ibms390x.h (MARKBIT): Remove unused macro.
10651
10652 2007-10-01 Juanma Barranquero <lekktu@gmail.com>
10653
10654 * lread.c (Fload): Fix typo in docstring.
10655
10656 2007-10-01 Michaël Cadilhac <michael@cadilhac.name>
10657
10658 * floatfns.c (Fexpt): Manually check for overflows, so that a power
10659 of a non-zero value can't yield zero.
10660
10661 2007-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
10662
10663 * term.c (term_clear_mouse_face, term_mouse_highlight)
10664 (tty_write_glyphs_with_face): Only define is HAVE_GPM.
10665
10666 * print.c (safe_debug_print): Use XHASH.
10667
10668 * lisp.h (DECL_ALIGN, USE_LSB_TAG): Move logic to before definition of
10669 Lisp elements such as tags.
10670 (XHASH): New macro.
10671 (EQ): Use it.
10672 (SREF, SSET, STRING_COPYIN): Use SDATA.
10673 (VOID_TO_LISP, CVOID_TO_LISP, LISP_TO_VOID, LISP_TO_CVOID): Remove.
10674
10675 * alloc.c (mark_terminal): Remove left-over declaration.
10676 (enum mem_type): Replace all vector subtypes -> MEM_TYPE_VECTORLIKE.
10677 (allocate_vectorlike): Remove type argument. Adjust callers.
10678 (live_vector_p, mark_maybe_pointer, valid_lisp_object_p):
10679 Only handle the one remaining MEM_TYPE_VECTORLIKE.
10680
10681 * alloc.c (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): New macros
10682 to avoid unnecessary BLOCK_INPUTs when SYNC_INPUT is used.
10683 (xmalloc, xrealloc, xfree, lisp_malloc, lisp_free, lisp_align_malloc)
10684 (lisp_align_free, make_interval, allocate_string, allocate_string_data)
10685 (make_float, Fcons, allocate_vectorlike, Fmake_symbol, allocate_misc):
10686 Use them.
10687
10688 * xfaces.c (load_face_font, free_realized_face, clear_face_gcs):
10689 Don't let signal handlers run when a GC is freed but not yet NULL'ed.
10690 (x_free_gc): Remove BLOCK_INPUT since it's now redundant.
10691
10692 2007-09-28 Dan Nicolaescu <dann@ics.uci.edu>
10693
10694 * Makefile.in (lisp, shortlisp): Delete server.elc, it is not
10695 loaded by default.
10696
10697 2007-09-28 Stefan Monnier <monnier@iro.umontreal.ca>
10698
10699 * term.c (Fgpm_mouse_start): Don't signal an error if already activated
10700 on this tty.
10701 (Fgpm_mouse_stop): Only deactivate if it was activated on this tty.
10702
10703 * term.c (mouse_face_window): Rename from Qmouse_face_window.
10704 Update all users.
10705 (handle_one_term_event): Use Gpm_DrawPointer.
10706 (Fgpm_mouse_start): Rename from Fterm_open_connection.
10707 Signal errors instead of returning nil. Always return nil.
10708 (Fgpm_mouse_stop): Rename from Fterm_close_connection.
10709 Make it a noop if gpm-mouse was not activated.
10710 (syms_of_term): Update names.
10711
10712 2007-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
10713
10714 * sysdep.c (narrow_foreground_group, widen_foreground_group): Static.
10715 (init_sys_modes): Check that gpm_tty is the current tty.
10716
10717 * alloc.c (allocate_terminal): Set the vector size to only count the
10718 lisp fields. Initialize those to nil.
10719 (mark_object): Don't treat terminals specially.
10720 (mark_terminal): Remove.
10721 (mark_terminals): Use mark_object instead.
10722
10723 * termhooks.h (struct terminal): Move all Lisp_Object fields traced by
10724 the GC to the beginning.
10725
10726 * indent.h:
10727 * indent.c: Use EMACS_INT for ints coming from Elisp data.
10728
10729 * indent.c (Fmove_to_column): Use EMACS_INT for buffer positions.
10730
10731 2007-09-25 Jason Rumney <jasonr@gnu.org>
10732
10733 * frame.c (make_terminal_frame): Remove special case for WINDOWSNT.
10734
10735 * w32console.c (create_w32cons_output): Remove.
10736
10737 * term.c (init_tty): Call init_sys_modes on WINDOWSNT also.
10738
10739 * sysdep.c (init_sys_modes): Use set_terminal_modes_hook.
10740 (reset_sys_modes): Use reset_terminal_modes_hook.
10741
10742 2007-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
10743
10744 * eval.c (do_autoload): Don't output any message.
10745
10746 2007-09-24 Juri Linkov <juri@jurta.org>
10747
10748 * emacs.c (standard_args): Change priority of "--no-splash"
10749 from 40 to 3. Add "--no-desktop" with the same priority.
10750
10751 2007-09-23 Dmitry Antipov <dmantipov@yandex.ru>
10752
10753 * alloc.c (gc_sweep): Check cons cell mark bits word by word
10754 and optimize the case where they are all 1.
10755
10756 2007-09-23 Johannes Weiner <hannes@saeurebad.de>
10757
10758 * lisp.h (abs): Define if not defined.
10759 * keyboard.c, sound.c, w32term.c, xfaces.c, xterm.c:
10760 Don't define `abs', since it's defined in lisp.h.
10761
10762 2007-09-22 Eli Zaretskii <eliz@gnu.org>
10763
10764 * term.c (DEV_TTY): New macro. Provide a definition for MS-Windows.
10765 (FRAME_TERMCAP_P) [WINDOWSNT]: Don't define to zero.
10766 (Fcontrolling_tty_p, Fresume_tty, dissociate_if_controlling_tty)
10767 (init_tty): Use DEV_TTY instead of "/dev/tty".
10768 [WINDOWSNT]: No need to protect from NAME arg being null.
10769
10770 2007-09-21 Dan Nicolaescu <dann@ics.uci.edu>
10771
10772 * term.c (Fsuspend_tty): Run suspend-tty-functions before cleaning
10773 up the tty state.
10774
10775 2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca>
10776
10777 * termhooks.h (term_gpm): Delete. Use gpm_tty's NULLness instead.
10778 (gpm_tty): Change its type.
10779 * term.c (term_gpm): Delete. Use gpm_tty's NULLness instead.
10780 (gpm_tty): Change its type and initialize it.
10781 (Fterm_open_connection): Check the frame is indeed a tty.
10782 Use the new gpm_tty.
10783 (Fterm_close_connection): Use the new gpm_tty.
10784 * keyboard.c (tty_read_avail_input): Use the new gpm_tty.
10785 * sysdep.c (init_sys_modes): term_gpm -> gpm_tty.
10786
10787 2007-09-21 Juanma Barranquero <lekktu@gmail.com>
10788
10789 * w32term.c (x_draw_glyph_string): Use strike_through_color, not
10790 underline_color, to draw strike-through.
10791
10792 2007-09-21 Stefan Monnier <monnier@iro.umontreal.ca>
10793
10794 * lisp.h (allocate_terminal): Declare.
10795
10796 * window.c (candidate_window_p): Consider frames that are being placed
10797 by the user as somewhere between visible and iconified.
10798 (window_loop): Prefer windows on the current frame.
10799 (Fselect_window): Move the use of select-frame to the beginning so we
10800 can just delegate all the work (it'll call us back anyway).
10801
10802 * frame.c (Qdisplay_environment_variable):
10803 * frame.h (Qdisplay_environment_variable): Delete.
10804
10805 * .gdbinit (xbacktrace): Print the arg's address rather than the value
10806 of the first arg, since that value may be a union.
10807
10808 * callproc.c (child_setup, getenv_internal): Use the frame's `display'
10809 parameter rather than Qdisplay_environment_variable. If all else
10810 fails, look for DISPLAY in initial-environment.
10811
10812 2007-09-21 Glenn Morris <rgm@gnu.org>
10813
10814 * Makefile.in (emacstool): Remove target.
10815 (lisp, shortlisp): Remove termdev.elc.
10816
10817 2007-09-21 Markus Triska <markus.triska@gmx.at>
10818
10819 * xterm.c (x_delete_display): Compile session management conditionally.
10820
10821 2007-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
10822
10823 * callproc.c (getenv_internal_1): New function.
10824 (getenv_internal): Use it.
10825 (Fgetenv_internal): Use it. Accept an env-list as optional arg.
10826
10827 * terminal.c (get_terminal): Don't accept ints to represent terminals.
10828 (Fterminal_name, Fterminal_parameters, Fterminal_parameter)
10829 (Fset_terminal_parameter): Work with dead terminals as well.
10830 (Fmodify_terminal_parameters): Remove.
10831
10832 * terminal.c (get_terminal): Handle terminals.
10833 Make sure the terminal returned is live.
10834 (create_terminal): Use allocate_terminal.
10835 (mark_terminals): Move to alloc.c.
10836 (delete_terminal): Use terminal->name as liveness status.
10837 NULL out fields after freeing their contents.
10838 Don't deallocate the object.
10839 (Fframe_terminal): Use FRAME_TERMINAL. Return the terminal object
10840 rather than an int.
10841 (Fterminal_live_p): Accept non-integer arguments.
10842 (Fterminal_list): Return terminal objects rather than an ints.
10843
10844 * alloc.c (enum mem_type): New member for `terminal' objects.
10845 (allocate_terminal): New function.
10846 (mark_maybe_pointer, valid_lisp_object_p, mark_object):
10847 Handle terminals.
10848 (mark_terminal): New fun.
10849 (mark_terminals): Move from terminal.c.
10850
10851 * term.c (get_tty_terminal): Don't treat output_initial specially.
10852 (Fsuspend_tty, Fresume_tty): Use terminal objects rather than ints.
10853 (delete_tty): Use terminal->name as liveness status.
10854
10855 * termhooks.h (struct terminal): Make it into a pseudovector.
10856 Remove `deleted' replaced by checking `name's nullness.
10857
10858 * print.c (print_object): Handle terminals.
10859
10860 * lisp.h (enum pvec_type): New `terminal' pseudovector.
10861 (XTERMINAL, XSETTERMINAL, TERMINALP, GC_TERMINALP): New macros.
10862
10863 * frame.c (make_terminal_frame):
10864 * keyboard.c (tty_read_avail_input):
10865 * w32term.c (x_delete_terminal):
10866 * xfns.c (Fx_create_frame, x_create_tip_frame):
10867 * xterm.c (x_delete_terminal): Use terminal->name as liveness status.
10868
10869 2007-09-20 Glenn Morris <rgm@gnu.org>
10870
10871 * process.c (Fmake_network_process): Doc fix.
10872
10873 2007-09-19 Jason Rumney <jasonr@gnu.org>
10874
10875 * dispextern.h (w32_init_fringe, mac_init_fringe): Declare rif argument.
10876
10877 2007-09-19 Michaël Cadilhac <michael@cadilhac.name>
10878
10879 * coding.c (detect_eol_type, detect_eol_type_in_2_octet_form):
10880 Fix a C warning regarding variable constness.
10881
10882 * xterm.c (handle_one_xevent): Fix a C warning.
10883
10884 2007-09-18 Jason Rumney <jasonr@gnu.org>
10885
10886 * w32fns.c (Fx_focus_frame): Rename from Fw32_focus_frame.
10887
10888 2007-09-17 Jan Djärv <jan.h.d@swipnet.se>
10889
10890 * gtkutil.c (gdpy_def): New variable.
10891 (xg_initialize): Initialize gdpy_def.
10892 (xg_display_close): If no other display exists, set gdpy_def to a
10893 new connection.
10894
10895 2007-09-16 Jan Djärv <jan.h.d@swipnet.se>
10896
10897 * gtkutil.c (xg_get_image_for_pixmap): Always create a GdkPixbuf
10898 when we have no file name for the icon.
10899 (xg_tool_bar_expose_callback): Remove.
10900 (xg_create_tool_bar): Don't connect expose signal to
10901 xg_tool_bar_expose_callback.
10902 (xg_get_file_with_chooser): Move GCPRO1 after declarations.
10903
10904 2007-09-16 Andreas Schwab <schwab@suse.de>
10905
10906 * alloc.c (reset_malloc_hooks): Set the hooks to the previous
10907 values instead of zapping them.
10908
10909 2007-09-14 Glenn Morris <rgm@gnu.org>
10910
10911 * fringe.c (init_fringe_bitmap) <swap_nibble>: Move to file scope.
10912 * gtkutil.c (xg_separator_p) <separator_names>: Move to file scope.
10913 * image.c (our_memory_fill_input_buffer) <buffer>: Move to file
10914 scope and rename to omfib_buffer for clarity.
10915 (gif_load) <interlace_start, interlace_increment>: Move to file scope.
10916
10917 2007-09-14 Kenichi Handa <handa@m17n.org>
10918
10919 * xterm.c (handle_one_xevent): Skip decoding if nbytes is zero.
10920
10921 2007-09-13 Jason Rumney <jasonr@gnu.org>
10922
10923 * fringe.c (w32_init_fringe, mac_init_fringe): Add rif argument.
10924
10925 * w32term.c (w32_term_init): Pass rif to w32_init_fringe.
10926
10927 * macterm.c (mac_initialize): Don't call mac_init_fringe here.
10928 (mac_term_init): Call here instead, passing rif.
10929
10930 2007-09-13 Glenn Morris <rgm@gnu.org>
10931
10932 * s/hpux.h: No longer define `static' as nothing.
10933
10934 2007-09-13 Johan Bockgård <bojohan@gnu.org>
10935
10936 * callint.c (Fcall_interactively): Remove unused var `fun'.
10937
10938 2007-09-12 Romain Francoise <romain@orebokech.com>
10939
10940 * window.c (prefer_window_split_horizontally, display_buffer):
10941 Revert 2007-09-08 change.
10942
10943 2007-09-12 Glenn Morris <rgm@gnu.org>
10944
10945 * alloca.c: Remove file.
10946 * Makefile.in (alloca): Do not undef.
10947 (allocaobj, alloca.o): Remove.
10948 (otherobj): Remove allocaobj.
10949 * keyboard.c (command_loop_1): Remove #ifdef C_ALLOCA block.
10950 * regex.c (C_ALLOCA): Remove all references and code that was only
10951 used when this was defined.
10952 * search.c (boyer_moore): Remove #ifdef C_ALLOCA block.
10953 * xmenu.c (xmenu_show): Remove #ifdef C_ALLOCA block.
10954 * m/ibms390x.h, m/sh3el.h (C_ALLOCA): Remove references to this.
10955
10956 * Makefile.in (SOURCES, unlock, relock): Delete.
10957
10958 * gtkutil.c (cnt): Rename to menu_grab_callback_cnt for clarity.
10959 (menu_grab_callback): All uses changed.
10960
10961 * xselect.c (cnt): Rename to x_reply_selection_request_cnt for clarity.
10962 (x_reply_selection_request): All uses changed.
10963
10964 2007-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
10965
10966 * lread.c (load_warn_old_style_backquotes): Change message to look
10967 better when it appears in the middle of byte-compiler messages.
10968
10969 2007-09-10 Dan Nicolaescu <dann@ics.uci.edu>
10970
10971 * s/darwin.h (MULTI_KBOARD): Only define for Carbon.
10972
10973 * xterm.c (x_create_terminal): Add comment.
10974
10975 * term.c (clear_tty_hooks, set_tty_hooks): Add comments.
10976
10977 2007-09-10 Richard Stallman <rms@gnu.org>
10978
10979 * xterm.c (x_term_init): Give error if can't open DISPLAY_NAME.
10980
10981 2007-09-10 Michaël Cadilhac <michael@cadilhac.name>
10982
10983 * lisp.h (struct Lisp_Subr): Rename `prompt' field to `intspec'.
10984 (DEFUN): Document `intspec', use it instead of `prompt'.
10985
10986 * eval.c (Fcommandp): Change `->prompt' to `->intspec'.
10987
10988 * data.c (Finteractive_form): If the interactive specification starts
10989 with a `(', use it as a Lisp form.
10990
10991 * fileio.c (Fset_file_modes): Add an interactive spec that reads a file
10992 name and file modes.
10993
10994 * callint.c (Fcall_interactively): Comment fixes.
10995
10996 2007-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
10997
10998 * callint.c (Fcall_interactively): Use Finteractive_form also for subrs
10999 and compiled functions.
11000
11001 2007-09-08 Fredrik Axelsson <f.axelsson@gmail.com>
11002
11003 * window.c (prefer_window_split_horizontally): New variable.
11004 (display_buffer): Consider splitting window horizontally depending
11005 on prefer_window_split_horizontally.
11006
11007 2007-09-08 Eli Zaretskii <eliz@gnu.org>
11008
11009 * sysdep.c [WINDOWSNT]: Don't include sysselect.h.
11010
11011 2007-09-07 Stefan Monnier <monnier@iro.umontreal.ca>
11012
11013 * s/cygwin.h (GC_MARK_STACK): Enable conservative stack marking.
11014
11015 * frame.c (x_set_frame_parameters): Check number is positive before
11016 using XFASTINT.
11017
11018 * window.c (freeze_window_start): Don't presume selected_window holds
11019 a window object.
11020 (Fdisplay_buffer): Remove `register' since `buffer' needs to be gcpro'd.
11021
11022 2007-09-07 Angelo Graziosi <Angelo.Graziosi@roma1.infn.it> (tiny change)
11023
11024 * term.c (dissociate_if_controlling_tty): Call setsid on CYGWIN.
11025
11026 2007-09-07 Stefan Monnier <monnier@iro.umontreal.ca>
11027
11028 * window.c (Vsplit_window_preferred_function): New var.
11029 (Fdisplay_buffer): Use it.
11030 (syms_of_window): Export, and initialize it.
11031
11032 2007-09-06 Pixel <pixel@mandriva.com> (tiny change)
11033
11034 * image.c (gif_load): Fix bug: Handle nonexistent colormap.
11035
11036 2007-09-06 Glenn Morris <rgm@gnu.org>
11037
11038 * gtkutil.c (menu_grab_callback) <cnt>:
11039 * xselect.c (x_reply_selection_request) <cnt>: Move static
11040 variable to file scope.
11041
11042 2007-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
11043
11044 * xdisp.c (redisplay_internal): Make sure Elisp code always sees
11045 consistent values of selected_frame and selected_window.
11046
11047 2007-09-04 Jason Rumney <jasonr@gnu.org>
11048
11049 * w32console.c (initialize_w32_display): Zero unused hooks.
11050
11051 2007-09-04 Dan Nicolaescu <dann@ics.uci.edu>
11052
11053 * term.c (Vsuspend_tty_functions, Vresume_tty_functions)
11054 (syms_of_term, Fsuspend_tty, Fresume_tty): Undo previous change.
11055
11056 2007-09-04 Jason Rumney <jasonr@gnu.org>
11057
11058 * term.c (init_tty) [WINDOWSNT]: Add hooks that are not accessible
11059 in w32console.c. Set up input. Remove XXX comments that have been
11060 confirmed as correct.
11061
11062 * s/ms-w32.h (MULTI_KBOARD): Define.
11063
11064 * w32console.c (one_and_only_w32cons): Remove.
11065 (initialize_w32_display): Take terminal argument.
11066
11067 * term.c (init_tty) [WINDOWSNT]: Pass terminal to
11068 initialize_w32_display.
11069 (init_tty) [MULTI_KBOARD]: Include this code on WINDOWSNT too.
11070
11071 * termhooks.h (enum event_kind) <HORIZ_WHEEL_EVENT>: New event.
11072
11073 * keyboard.c (discard_mouse_events): Discard it.
11074 (make_lispy_event): Translate it to a lisp event.
11075 (lispy_wheel_names): Add wheel-left and right events.
11076 (syms_of_keyboard): Enlarge wheel_syms.
11077
11078 * w32fns.c (w32_wnd_proc) <WM_DROPFILES>: Merge with WM_MOUSEWHEEL.
11079 <WM_MOUSEHWHEEL>: Pass new system message to lisp.
11080
11081 * w32term.h (WM_MOUSEHWHEEL): Define if system headers don't.
11082
11083 * w32term.c (construct_mouse_wheel): Make HORIZ_WHEEL_EVENT
11084 from WM_MOUSEHWHEEL.
11085 (w32_read_socket) <WM_MOUSEHWHEEL>: Treat as WM_MOUSEWHEEL.
11086
11087 * w32fns.c (x_create_tip_frame) [MULTI_KBOARD]: Get keyboard from
11088 terminal.
11089
11090 * w32term.c (w32_create_terminal) [MULTI_KBOARD]: Create a new
11091 keyboard for the terminal.
11092
11093 2007-09-04 Dan Nicolaescu <dann@ics.uci.edu>
11094
11095 * term.c (Vsuspend_tty_hook): Rename from Vsuspend_tty_functions.
11096 (Vresume_tty_hook): Rename from Vresume_tty_functions.
11097 (syms_of_term): Rename suspend-tty-functions to suspend-tty-hook
11098 and resume-tty-function to resume-tty-hook.
11099 (Fsuspend_tty, Fresume_tty): Use new names.
11100
11101 2007-09-02 Jan Djärv <jan.h.d@swipnet.se>
11102
11103 * gtkutil.c (update_frame_tool_bar): Handle stock name as a named icon
11104 if it starts with "n:".
11105
11106 2007-08-31 Jan Djärv <jan.h.d@swipnet.se>
11107
11108 * gtkutil.c (update_frame_tool_bar): Initialize wbutton to NULL.
11109
11110 2007-08-31 Stefan Monnier <monnier@iro.umontreal.ca>
11111
11112 * frame.h:
11113 * frame.c (Qterm_environment_variable): Remove.
11114 (syms_of_frame): Don't init and staticpro it.
11115
11116 * callproc.c (getenv_internal): Remove special case for $TERM.
11117
11118 * callproc.c (Vinitial_environment): New variable.
11119 (set_initial_environment): Initialize it.
11120 (syms_of_callproc): Declare it.
11121 (child_setup): Don't mess with TERM via Qterm_environment_variable; the
11122 TERM under which a process runs is never related to the TERM in which
11123 Emacs is running.
11124
11125 2007-08-29 Dan Nicolaescu <dann@ics.uci.edu>
11126
11127 * config.in (HAVE_WINDOW_SYSTEM): Don't undef MULTI_KBOARD here...
11128 * s/darwin.h: ... do it here.
11129
11130 2007-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
11131
11132 * lisp.h (set_initial_environment): Rename from set_global_environment.
11133
11134 * Makefile.in (${etc}DOC): Re-add a ${EXEEXT} which seems to have been
11135 removed by mistake on the multi-tty branch.
11136
11137 * frame.c (make_terminal_frame): Yet Another Int/Lisp_Object Mixup.
11138 (Fmodify_frame_parameters): Return a value.
11139
11140 * image.c (png_load): Comment-out var only used in commented-out code.
11141
11142 * term.c (mark_ttys): Don't bother checking top_frame (incorrectly)
11143 before passing it to mark_object.
11144
11145 * xfaces.c (internal_resolve_face_name): Return a value.
11146 (internal_resolve_face_name, resolve_face_name_error): Comment out.
11147
11148 * xfns.c (check_x_display_info): Yet Another Int/Lisp_Object Mixup.
11149 (x_icon): Comment-out var only used in commented-out code.
11150
11151 2007-08-29 Romain Francoise <romain@orebokech.com>
11152
11153 * keyboard.c (Fset_input_mode): Don't call `Fset_quit_char' if
11154 QUIT hasn't been provided.
11155
11156 2007-08-29 Dan Nicolaescu <dann@ics.uci.edu>
11157
11158 * callproc.c (child_setup, getenv_internal): Use the
11159 display-environment-variable and term-environment-variable frame params.
11160 (set_initial_environment): Initialise Vprocess_environment.
11161
11162 * config.in: Disable multi-keyboard support on a mac.
11163
11164 * frame.c (Qterm_environment_variable)
11165 (Qdisplay_environment_variable): New variables.
11166 (syms_of_frame): Intern and staticpro them.
11167 (Fmake_terminal_frame): Disable output method test.
11168
11169 * frame.h: Declare them here.
11170
11171 * macfns.c (x_set_mouse_color): Get rif from the frame.
11172 (x_set_tool_bar_lines): Don't use updating_frame.
11173 (mac_window): Add 2 new parameters for consistency with other systems.
11174 (Fx_create_frame): Fix doc string. Rename the parameter. Set the
11175 frame parameters following what is done in X11 and w32. Don't use
11176 FRAME_MAC_DISPLAY_INFO.
11177 (Fx_open_connection, start_hourglass): Remove window-system check.
11178 (x_create_tip_frame): Get the keyboard from the terminal.
11179
11180 * macmenu.c: Reorder includes.
11181 (Fx_popup_menu): Use terminal specific mouse_position_hook.
11182
11183 * macterm.c (XTset_terminal_modes, XTreset_terminal_modes): Add a
11184 terminal parameter.
11185 (x_clear_frame): Add a frame parameter.
11186 (note_mouse_movement): Get rif from the frame.
11187 (mac_term_init): Initialize the terminal.
11188 (mac_initialize): Make static and move terminal initialization ...
11189 (mac_create_terminal): ... to this new function.
11190
11191 * macterm.h (struct mac_display_info): Add terminal.
11192 (mac_initialize): Delete declaration.
11193
11194 * puresize.h (BASE_PURESIZE): Increase base value to 1164000.
11195
11196 * sysdep.c: Comment out text after #endif.
11197
11198 * term.c (init_tty): Only use terminal->kboard when MULTI_KBOARD
11199 is defined. Better initialize ttys in windows. Use terminal
11200 specific mouse_position_hook.
11201
11202 * termhooks.h (union display_info): Add mac_display_info.
11203
11204 * w32fns.c (Fx_create_frame): Use kboard from the terminal.
11205 Set the default minibuffer frame, window_system and the rest of the
11206 frame parameters following what is done in X11.
11207
11208 * w32term.c (w32_initialize): Make static.
11209
11210 * xselect.c (x_handle_selection_clear): Only access
11211 terminal->kboard when MULTI_KBOARD is defined.
11212
11213 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Define here.
11214 (SYSTEM_PURESIZE_EXTRA): Only define on Carbon.
11215
11216 2007-08-29 Jason Rumney <jasonr@gnu.org>
11217
11218 * frame.c (Fdelete_frame): Only get kboard when MULTI_KBOARD defined.
11219 (make_terminal_frame) [WINDOWSNT]: Initialize terminal.
11220
11221 * fringe.c (w32_init_fringe w32_reset_fringes) [HAVE_NTGUI]:
11222 (mac_init_fringe) [MAC_OS]: Get rif from selected_frame.
11223
11224 * keyboard.c (restore_kboard_configuration): Only define when
11225 MULTI_KBOARD defined.
11226
11227 * makefile.w32-in: Update dependancies from Makefile.in.
11228 (OBJ1): Add terminal.$(O)
11229
11230 * term.c (dissociate_if_controlling_tty) [WINDOWSNT]:
11231 Don't define function body.
11232 (init_tty) [WINDOWSNT]: Use selected_frame for initializing.
11233
11234 * termhooks.h (display_info) [WINDOWSNT]: Add w32.
11235
11236 * w32.c (request_sigio, unrequest_sigio): Remove.
11237
11238 * w32console.c (w32con_move_cursor, w32con_clear_to_end)
11239 (w32con_clear_frame, w32con_clear_end_of_line)
11240 (w32con_ins_del_lines, w32con_insert_glyphs, w32con_write_glyphs)
11241 (w32con_delete_glyphs, w32con_set_terminal_window)
11242 (scroll_line, w32_sys_ring_bell): Add frame arg.
11243 (w32con_set_terminal_modes, w32con_reset_terminal_modes):
11244 Add terminal arg.
11245 (PICK_FRAME): Remove.
11246 (w32con_write_glyphs): Use frame specific terminal coding.
11247 (one_and_only_w32cons): New global variable.
11248 (initialize_w32_display): Use it for storing hooks.
11249 (create_w32cons_output): New function.
11250
11251 * w32inevt.c, w32inevt.h (w32_console_read_socket): Make first
11252 arg a frame.
11253
11254 * w32fns.c (x_create_tip_frame): Set terminal and ref count.
11255 Set window_system.
11256 (x_set_tool_bar_lines): Don't use updating_frame.
11257 (Fx_create_frame): Set terminal and ref count.
11258 (Fx_open_connection): Remove window-system check.
11259
11260 * w32menu.c (Fx_popup_menu): Use terminal specific mouse_position_hook.
11261
11262 * w32term.c (w32_term_init): Call add_keyboard_wait_descriptor.
11263 (w32_set_terminal_modes, w32_reset_terminal_modes): Add terminal arg.
11264 (x_clear_frame, x_delete_glyphs, w32_ring_bell, x_ins_del_lines):
11265 Add frame arg.
11266 (x_delete_terminal, w32_create_terminal): New functions.
11267 (w32_term_init): Create a terminal.
11268 (w32_initialize): Move terminal specific initialization to
11269 w32_create_terminal.
11270
11271 * w32term.h (x_output): Remove foreground_pixel and background_pixel.
11272 (w32_clear_rect, w32_clear_area): Use background from frame.
11273 (w32_display_info): Add terminal.
11274 (w32_sys_ring_bell, x_delete_display): Declare here.
11275
11276 * xdisp.c (display_menu_bar) [HAVE_NTGUI]: Check frame type.
11277
11278 * s/ms-w32.h (SYSTEM_PURESIZE_EXTRA): Bump to 50k.
11279
11280 2007-08-29 Kalle Olavi Niemitalo <kon@iki.fi> (tiny change)
11281
11282 * keyboard.c (interrupt_signal, handle_interrupt, Fset_quit_char):
11283 Fix get_named_tty calls for the controlling tty.
11284
11285 2007-08-29 ARISAWA Akihiro <ari@mbf.ocn.ne.jp> (tiny change)
11286
11287 * term.c (dissociate_if_controlling_tty)[USG]: Fix parse error.
11288
11289 2007-08-29 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
11290
11291 * term.c (tty_insert_glyphs): Add missing first parameter.
11292
11293 2007-08-29 Károly Lőrentey <karoly@lorentey.hu>
11294
11295 * buffer.c (Fbuffer_list, Fbury_buffer):
11296 Take frame->buried_buffer_list into account.
11297
11298 * cm.c (current_tty): New variable, for cmputc().
11299 (cmputc): Use it.
11300 (cmcheckmagic): Add tty parameter, look up terminal streams there.
11301 (calccost): Add tty parameter. Use emacs_tputs() instead of tputs().
11302 (cmgoto): Add tty parameter. Pass it on to calccost().
11303 Use emacs_tputs() instead of tputs().
11304
11305 * cm.h (emacs_tputs): New macro to set current_tty, and then call
11306 tputs().
11307 (current_tty): New variable, for cmputc().
11308 (cmcheckmagic, cmputc, cmgoto): Add prototypes.
11309
11310 * eval.c (unwind_to_catch): Don't call x_fully_uncatch_errors.
11311 (internal_condition_case, internal_condition_case_1)
11312 (internal_condition_case_2): Don't abort when x_catching_errors.
11313
11314 * fns.c (Fyes_or_no_p): Don't try to open an X dialog on tty terminals.
11315 (Fy_or_n_p): Likewise. Use temporarily_switch_to_single_kboard to
11316 prevent crashes caused by bogus longjmps in read_char.
11317
11318 * keymap.h (Fset_keymap_parent): Add EXFUN.
11319
11320 * macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL)
11321 * w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL):
11322 Remove redundant definition.
11323
11324 * macfns.c (x_set_mouse_color, x_make_gc):
11325 Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
11326
11327 * w32term.c (x_free_frame_resources):
11328 Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
11329 (w32_initialize): Use the accessor macros for terminal characteristics.
11330
11331 * macterm.c (mac_initialize): Use Fset_input_interrupt_mode.
11332 Use the accessor macros for terminal characteristics.
11333 * msdos.c (internal_terminal_init): Use the accessor macros for
11334 terminal characteristics.
11335 (ScreenVisualBell, internal_terminal_init):
11336 Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
11337
11338 * termopts.h (no_redraw_on_reenter): Declare.
11339
11340 * alloc.c (emacs_blocked_malloc): Disable mallopt call.
11341 (mark_terminals, mark_ttys): Declare.
11342 (Fgarbage_collect): Call them.
11343 (mark_object): Mark buried_buffer_list.
11344
11345 * prefix-args.c: Include stdlib.h for exit.
11346
11347 * syssignal.h: Add comment.
11348
11349 * indent.c: Include stdio.h.
11350
11351 * window.h (Vinitial_window_system): Declare.
11352 (Vwindow_system): Delete declaration.
11353
11354 * fontset.c (Finternal_char_font): Use FRAME_RIF.
11355
11356 * image.c (lookup_image): Don't initialize `c' until the xasserts
11357 have been run.
11358
11359 * gtkutil.c (xg_create_frame_widgets): Use FRAME_BACKGROUND_PIXEL and
11360 FRAME_FOREGROUND_PIXEL.
11361
11362 * print.c (print_preprocess): Don't lose print_depth levels while
11363 iterating.
11364
11365 * widget.c (update_from_various_frame_slots):
11366 Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
11367
11368 * window.c (set_window_buffer): Don't call clear_mouse_face on tty
11369 frames.
11370 (window_internal_height): Remove bogus make_number call.
11371 (init_window_once): Call make_terminal_frame with two zero parameters.
11372
11373 * fileio.c (Fread_file_name): Update comment.
11374
11375 * callint.c (Fcall_interactively):
11376 Use temporarily_switch_to_single_kboard instead of single_kboard_state.
11377 Make sure it is correctly unwound.
11378
11379 * xsmfns.c (x_session_close): New function.
11380
11381 * coding.h (terminal_coding, safe_terminal_coding, keyboard_coding):
11382 Delete declarations.
11383
11384 * xterm.h: Remove declaration for x_fully_uncatch_errors.
11385 (x_output): Remove background_pixel and foreground_pixel fields.
11386 (x_display_info): Add new field TERMINAL. Remove KBOARD field.
11387 (x_delete_device, x_session_close): Declare.
11388
11389 * lread.c: Include setjmp.h. Update declaration of `read_char'.
11390 (read_filtered_event): Call `read_char' with a local
11391 `wrong_kboard_jmpbuf'.
11392
11393 * minibuf.c (read_minibuf): Call temporarily_switch_to_single_kboard.
11394 Don't call single_kboard_state. Use FRAME_RIF.
11395
11396 * process.c (Fmake_network_process): Don't unrequest_sigio on modern
11397 systems.
11398
11399 * lisp.h (set_process_environment): Rename to `set_global_environment'.
11400 (Fframe_with_environment, Fset_input_meta_mode)
11401 (Fset_quit_char): EXFUN.
11402 (x_create_device, tty_output, terminal, tty_display_info): Declare.
11403 (init_sys_modes, reset_sys_modes): Update prototypes.
11404 (init_all_sys_modes, reset_all_sys_modes): New prototypes.
11405
11406 * keyboard.h (struct kboard): Add new fields Vlocal_function_key_map,
11407 Vlocal_key_translation_map, and Vkeyboard_translate_table.
11408 (Vfunction_key_map, Vkeyboard_translate_table, single_kboard_state):
11409 Delete declarations.
11410 (Vfunction_key_map, Vkey_translation_map, push_kboard, pop_kboard)
11411 (temporarily_switch_to_single_kboard, tty_read_avail_input):
11412 New declarations.
11413
11414 * emacs.c (main): Don't call init_sys_modes(), the new term_init()
11415 already does that during init_display(). Call syms_of_keymap
11416 before syms_of_keyboard. Call `syms_of_terminal'.
11417 Call set_initial_environment, not set_process_environment.
11418 (shut_down_emacs): Call reset_all_sys_modes() instead of
11419 reset_sys_modes().
11420
11421 * xfaces.c (x_free_gc): Protect xassert with GLYPH_DEBUG.
11422 (internal_resolve_face_name, resolve_face_name_error): New functions.
11423 (resolve_face_name): Protect against loops and errors thrown by Fget.
11424 (realize_default_face): Don't use FRAME_FONT unless frame is an X frame.
11425 (Ftty_supports_face_attributes_p): Update tty_capable_p call.
11426
11427 * scroll.c: Replace CURTTY() with local variables throughout the
11428 file (where applicable).
11429 (calculate_scrolling, calculate_direct_scrolling)
11430 (scrolling_1, scroll_cost): Use the accessor macros for terminal
11431 characteristics.
11432
11433 * keymap.c (Vfunction_key_map): Remove.
11434 (Fdescribe_buffer_bindings): Update references to Vfunction_key_map.
11435 (syms_of_keymap): Remove DEFVAR for Vfunction_key_map.
11436 (Vkey_translation_map): Remove.
11437 (syms_of_keymap): Remove DEFVAR for key-translation-map.
11438 (Fdescribe_buffer_bindings)
11439 (read_key_sequence, init_kboard, syms_of_keyboard, mark_kboards):
11440 Update for terminal-local key-translation-map.
11441
11442 * Makefile.in (callproc.o): Update dependencies.
11443 (lisp, shortlisp): Add termdev.elc.
11444 (obj): Add terminal.o.
11445 (terminal.o): Add dependencies.
11446 [HAVE_CARBON]: Make terminal.o depend on macgui.h.
11447 (data.o, fns.o): Add termhooks.h dependency.
11448 (SOME_MACHINE_LISP): Add dnd.elc.
11449 (minibuf.o): Fix typo.
11450 Update dependencies.
11451
11452 * data.c (do_symval_forwarding, store_symval_forwarding)
11453 (find_symbol_value): Use the selected frame's keyboard, not
11454 current_kboard.
11455
11456 * .gdbinit (init_sys_modes): Use Vinitial_window_system instead of
11457 Vwindow_system.
11458
11459 * xmenu.c (Fx_menu_bar_open) [USE_X_TOOLKIT, USE_GTK]: Rename from
11460 Fmenu_bar_open.
11461 (syms_of_xmenu): Update defsubr.
11462 (mouse_position_for_popup, Fx_popup_menu)
11463 (Fx_popup_dialog, x_activate_menubar, update_frame_menubar)
11464 (set_frame_menubar, free_frame_menubar)
11465 (create_and_show_popup_menu, xmenu_show, )
11466 (create_and_show_dialog, xdialog_show, xmenu_show): Abort if not
11467 an X frame.
11468
11469 * xselect.c (x_own_selection): Abort if not an X frame.
11470 (some_frame_on_display): Check if it is an X frame.
11471 (x_handle_selection_clear): Deal with MULTI_KBOARD.
11472
11473 * coding.c: Include frame.h and termhooks.h.
11474 (terminal_coding, keyboard_coding): Delete.
11475 (Fset_terminal_coding_system_internal)
11476 (Fset_keyboard_coding_system_internal)
11477 (Fkeyboard_coding_system)
11478 (Fterminal_coding_system): Add a terminal parameter.
11479 Get terminal_coding from the terminal.
11480 (init_coding_once): Don't call setup_coding_system here.
11481
11482 * dispextern.h (set_scroll_region, turn_off_insert)
11483 (turn_off_highlight, background_highlight, clear_end_of_line_raw)
11484 (tty_clear_end_of_line, tty_setup_colors)
11485 (delete_tty, updating_frame)
11486 (produce_special_glyphs, produce_glyphs, write_glyphs)
11487 (insert_glyphs): Remove.
11488 (raw_cursor_to, clear_to_end, tty_turn_off_insert)
11489 (tty_turn_off_highlight, get_tty_size): Add declaration.
11490 (tabs_safe_p, init_baud_rate, get_tty_terminal): Update prototypes.
11491
11492 * frame.h (enum output_method): Add output_initial.
11493 (struct x_output): Delete.
11494 (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL):
11495 Access foreground_pixel and background_pixel directly from the frame.
11496 (tty_display): Delete.
11497 (struct frame): Add buried_buffer_list, foreground_pixel,
11498 background_pixel and terminal. Delete kboard.
11499 (union output_data): Add tty.
11500 (FRAME_KBOARD): Get the kboard from the terminal.
11501 (FRAME_INITIAL_P): New macro.
11502 (Qtty, Qtty_type, Qterminal, Qterminal_live_p, Qenvironment)
11503 (Qterm_environment_variable, Qdisplay_environment_variable)
11504 (make_terminal_frame, Qburied_buffer_list, Qwindow_system):
11505 New declarations.
11506
11507 * termchar.h (tty_output, tty_display_info): New structures.
11508 (tty_list): Declare.
11509 (FRAME_TTY, CURTTY): New macros.
11510 (must_write_spaces, min_padding_speed, fast_clear_end_of_line)
11511 (line_ins_del_ok, char_ins_del_ok, scroll_region_ok)
11512 (scroll_region_cost, memory_below_frame, fast_clear_end_of_line)
11513 (dont_calculate_costs, no_redraw_on_reenter): Remove declarations.
11514
11515 * callproc.c: Include frame.h and termhooks.h, for terminal
11516 parameters.
11517 (add_env): New function.
11518 (child_setup): Use it.
11519 (child_setup, getenv_internal): Handle the new Vprocess_environment.
11520 (getenv_internal): Fix get_terminal_param call.
11521 (Fgetenv_internal, egetenv): Update doc.
11522 (syms_of_callproc): Initialize Vprocess_environment to nil.
11523 Register and initialize them. Remove obsolete defvars. Update doc
11524 strings.
11525 (child_setup): Handle Vlocal_environment_variables.
11526 (getenv_internal): Add terminal parameter.
11527 Handle Vlocal_environment_variables.
11528 (Fgetenv_internal): Add terminal parameter.
11529 (child_setup, getenv_internal, Fgetenv_internal): Store the local
11530 environment in a frame (not terminal) parameter. Update doc strings.
11531 (set_initial_environment): Rename from set_global_environment.
11532 Store Emacs environment in initial frame parameter.
11533
11534 * xdisp.c (redisplay_internal): Update references to
11535 `previous_terminal_frame'.
11536 (display_mode_line, Fformat_mode_line): Replace calls to
11537 `push_frame_kboard' with `push_kboard'.
11538 (get_glyph_string_clip_rects): Add extra parentheses and
11539 braces to prevent compiler warnings.
11540 (calc_pixel_width_or_height): Add xassert to check that the
11541 frame is alive. Don't call `lookup_image' on a termcap frame.
11542 (message2_nolog, message3_nolog, redisplay_internal)
11543 (set_vertical_scroll_bar, redisplay_window, check_x_display_info)
11544 (x_set_scroll_bar_foreground, x_set_scroll_bar_background)
11545 (Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
11546 (Fx_display_pixel_width, Fx_display_pixel_height)
11547 (Fx_display_planes, Fx_display_color_cells)
11548 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
11549 (Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
11550 (Fx_display_backing_store, Fx_display_visual_class)
11551 (Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
11552 Use FRAME_TERMINAL_P, FRAME_WINDOW_P, FRAME_TTY and FRAME_RIF.
11553
11554 * xfns.c (x_set_foreground_color x_set_background_color)
11555 (x_set_mouse_color, x_set_cursor_color, x_make_gc):
11556 Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
11557 (Fx_create_frame, x_create_tip_frame, build_string, x_window)
11558 (Fx_create_frame, x_create_tip_frame): Don't create frames on a
11559 terminal that is being deleted.
11560 (Fx_create_frame): Use `store_frame_param' to set `window-system'
11561 frame parameter, and make sure it overrides any user-supplied setting.
11562 (Fx_close_connection, Fx_synchronize): Unify argument names with
11563 the rest of the DEFUNs.
11564
11565 * dispnew.c (Fsend_string_to_terminal): Update call to
11566 `get_tty_terminal'.
11567 (Fredraw_frame, Fsend_string_to_terminal)
11568 (Fsend_string_to_terminal, init_display): Use FRAME_RIF,
11569 FRAME_TERMCAP_P and FRAME_TTY.
11570 (window_change_signal): Don't believe width/height values that are
11571 impossibly small.
11572 (Vinitial_window_system): Rename from Vwindow_system.
11573 (termscript, Wcm, rif): Delete.
11574
11575 * termhooks.h (struct terminal): New struct containing the
11576 previously global text display hooks and new members NAME,
11577 DELETED and PARAM_ALIST.
11578 (FRAME_TERMINAL, TERMINAL_TERMINAL_CODING)
11579 (TERMINAL_KEYBOARD_CODING, TERMINAL_ACTIVE_P, FRAME_WINDOW_P)
11580 (FRAME_RIF): New macros.
11581 (get_terminal_param, get_device): New declarations.
11582 (termscript): Delete declaration.
11583
11584 * xterm.c (x_initialize): Use Fset_input_interrupt_mode.
11585 (XTflash, x_free_frame_resources, x_scroll_bar_create)
11586 (x_scroll_bar_set_handle): Use FRAME_BACKGROUND_PIXEL and
11587 FRAME_FOREGROUND_PIXEL.
11588 (x_fully_uncatch_errors): Disable definition.
11589 (x_scroll_bar_expose): Fix reference to foreground pixel.
11590 (XTread_socket): Disable loop on all X displays.
11591 (x_delete_terminal): Don't set terminal->deleted and let
11592 delete_terminal delete the frames on the terminal.
11593 (x_delete_display): Doc update to reflect changes in
11594 delete_terminal.
11595 (x_display_info) <terminal>: Move member earlier in the struct.
11596 (deleting_tty): Remove old variable.
11597 (Fsuspend_tty): Call clear_tty_hooks.
11598 (Fresume_tty, init_tty): Call set_tty_hooks.
11599 (Ftty_display_color_p, Ftty_display_color_cells): Don't throw
11600 errors on X frames.
11601 (x_catch_errors_unwind): Abort if x_error_message is NULL.
11602 (handle_one_xevent): Initialize `f' to NULL.
11603 (x_delete_terminal, x_create_terminal): New functions.
11604 (XTset_terminal_modes, XTreset_terminal_modes)
11605 (XTread_socket, x_connection_closed, x_term_init)
11606 (x_term_init, x_delete_display): Add terminal parameter.
11607 (x_term_init) [!HAVE_GTK_MULTIDISPLAY]: Refuse to create secondary
11608 X connections.
11609
11610 * frame.c: Include termchar.h.
11611 (Qterminal, Qterminal_live_p, Qburied_buffer_list, Qtty, Qtty_type)
11612 (Qwindow_system, Qenvironment, Qterm_environment_variable)
11613 (Qdisplay_environment_variable): New vars.
11614 (Fframep): Deal with output_initial.
11615 (Fframe-live-p): Doc fix.
11616 (Fwindow-system): New function.
11617 (x_set_screen_gamma, store_frame_param): Fix compilation errors.
11618 (make_terminal_frame): Don't create frames on a terminal that is
11619 being deleted. Use FRAME_BACKGROUND_PIXEL and FRAME_FOREGROUND_PIXEL.
11620 (store_frame_param): Check for found_for_frame before calling XFRAME.
11621 (Fmake_terminal_frame): Handle NULL tty names correctly.
11622 (syms_of_frame): Enhance doc string of `default-frame-alist'.
11623 (Fdelete_frame): Remove unused variable `count'. Don't allow other
11624 frames to refer to a deleted frame in their 'environment parameter.
11625 (Fframe_with_environment): New function.
11626 (syms_of_frame): Defsubr it. Initialize and staticpro Qenvironment.
11627 (get_future_frame_param): New function.
11628 (Fmake_terminal_frame): Use it.
11629 (x_set_frame_parameters, x_set_screen_gamma): Use FRAME_RIF.
11630
11631 * sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
11632 * sysdep.c (reset_sys_modes): Update for renames.
11633
11634 * keyboard.c (tty_read_avail_input): New function.
11635 (Fset_input_interrupt_mode, Fset_output_flow_control): New functions.
11636 (syms_of_keyboard): Defsubr them.
11637 (Fset_input_meta_mode, Fset_quit_char): New functions.
11638 (Fset_input_mode): Split to above functions.
11639 (read_char_minibuf_menu_prompt): Add wrong_kboard_jmpbuf
11640 parameter. Use it in call to `read_char'.
11641 (read_char): Declare. Update call to `read_char_minibuf_menu_prompt'.
11642 Set wrong_kboard_jmpbuf correctly in recursive calls.
11643 Use current_kboard to access Vkeyboard_translate_table.
11644 Enhance comment before extra longjmp to wrong_kboard_jmpbuf.
11645 Add wrong_kboard_jmpbuf parameter to allow for recursive calls.
11646 Update longjmp invocations. Remember the original current_kboard,
11647 and longjmp to `wrong_kboard_jmpbuf' when a filter, timer or sentinel
11648 changes it. Comment out unnecessary calls to
11649 `record_single_kboard_state' and `any_kboard_state'.
11650 Update recursive calls.
11651 (wrong_kboard_jmpbuf): Remove global variable.
11652 (read_key_sequence): Remove unused variable wrong_kboard_jmpbuf.
11653 Handle deleted interrupted_kboards correctly; that is a legal
11654 case. Add `wrong_kboard_jmpbuf' local variable. Update setjmp
11655 and read_char calls. Abort if interrupted_kboard died in read_char.
11656 (any_kboard_state, single_kboard_state)
11657 (push_frame_kboard): Remove function.
11658 (pop_kboard): Switch out of single_kboard mode if the kboard has
11659 been deleted. Remove unused variable. Help debugging by not
11660 changing current_kboard unnecessarily. Set current_kboard to the
11661 kboard of the selected frame when the stored kboard object has
11662 been deleted before pop_kboard.
11663 (temporarily_switch_to_single_kboard): Change first parameter to a
11664 frame pointer. Throw an error when caller wants to change kboards
11665 while in single_kboard mode. Don't push_kboard if we weren't in
11666 single kboard state. Don't pop_kboard if we popped into any
11667 kboard state.
11668 (restore_kboard_configuration): Abort if pop_kboard changed the
11669 kboard in single_kboard mode. Call pop_kboard only after setting
11670 up single_kboard mode.
11671 (Frecursive_edit): Switch to single_kboard mode only in nested
11672 command loops.
11673 (cmd_error, command_loop, command_loop_1, timer_check):
11674 Comment out unnecessary call to `any_kboard_state' and
11675 `record_single_kboard_state'.
11676 (delete_kboard): Exit single_kboard mode if we have just deleted
11677 that kboard. Use FRAME_KBOARD.
11678 (interrupt_signal): Use `Fkill_emacs' to exit Emacs, not
11679 `fatal_error_signal'.
11680 (record_single_kboard_state): Don't push_kboard if we weren't in
11681 single kboard state. Don't pop_kboard if we popped into any
11682 kboard state.
11683 (push_frame_kboard): Rename to push_kboard.
11684 (kbd_buffer_get_event): Use FRAME_TERMINAL.
11685 (read_avail_input): Read input from all terminals.
11686 (mark_kboards): Also mark Vkeyboard_translate_table.
11687 (kbd_buffer_store_event_hold): Simplify condition.
11688 (read_key_sequence): Reinitialize fkey and keytran at each replay.
11689 (Vkeyboard_translate_table): Move to struct kboard.
11690 (init_kboard): Initialize Vkeyboard_translate_table.
11691 (syms_of_keyboard): Use DEFVAR_KBOARD to define
11692 Vkeyboard_translate_table. Update doc strings. Update docs of
11693 local-function-key-map and function-key-map.
11694
11695 * terminal.c: New file.
11696
11697 * term.c: Include errno.h.
11698 (Vring_bell_function, device_list, initial_device)
11699 (next_device_id, ring_bell, update_begin, update_end)
11700 (set_terminal_window, cursor_to, raw_cursor_to)
11701 (clear_to_end, clear_frame, clear_end_of_line)
11702 (write_glyphs, insert_glyphs, delete_glyphs, ins_del_lines)
11703 (Fdisplay_name, create_device, delete_device): Move to terminal.c.
11704 (syms_of_term): Move their initialization to terminal.c.
11705 (get_tty_terminal, Fdisplay_tty_type, Ftty_display_color_p)
11706 (Ftty_display_color_cells)
11707 (Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
11708 (clear_tty_hooks, set_tty_hooks)
11709 (init_tty, maybe_fatal): New functions.
11710 (Ftty_type): Return nil if terminal is not on a tty instead of
11711 throwing an error. Doc update.
11712 (syms_of_term) <Vsuspend_tty_functions, Vresume_tty_functions>:
11713 Doc update. Initialize new subrs and variables.
11714 (delete_tty): Use terminal->deleted.
11715 (tty_set_terminal_modes): Rename from set_terminal_modes.
11716 (tty_reset_terminal_modes): Rename from reset_terminal_modes.
11717 (set_scroll_region): Rename to `tty_set_scroll_region'.
11718 (turn_on_insert): Rename to `tty_turn_on_insert'.
11719 (turn_off_insert): Rename to `tty_turn_off_insert'.
11720 (turn_off_highlight): Rename to `tty_turn_off_highlight'.
11721 (turn_on_highlight): Rename to `tty_turn_on_highlight'.
11722 (toggle_highligh): Rename to `tty_toggle_highlight'.
11723 (background_highlight): Rename to `tty_background_highlight'.
11724 (highlight_if_desired): Rename to `tty_highlight_if_desired'.
11725 (tty_ring_bell, tty_update_end, tty_set_terminal_window)
11726 (tty_set_scroll_region, tty_background_highlight)
11727 (tty_cursor_to, tty_raw_cursor_to, tty_clear_to_end)
11728 (tty_clear_frame, tty_clear_end_of_line, tty_write_glyphs)
11729 (tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines)
11730 (term_get_fkeys, tty_setup_colors, dissociate_if_controlling_tty):
11731 Add static modifier.
11732 (tty_reset_terminal_modes, tty_set_terminal_window)
11733 (tty_set_scroll_region, tty_background_highlight)
11734 (tty_highlight_if_desired, tty_cursor_to)
11735 (tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame)
11736 (tty_clear_end_of_line, tty_write_glyphs, tty_insert_glyphs)
11737 (tty_delete_glyphs, tty_ins_del_lines, turn_on_face): Update for
11738 renames.
11739
11740 2007-08-28 Jan Djärv <jan.h.d@swipnet.se>
11741
11742 * keyboard.c: Qrtl is new.
11743 (parse_tool_bar_item): Handle :rtl keyword.
11744 (syms_of_keyboard): Intern :rtl keyword.
11745
11746 * dispextern.h (enum tool_bar_item_idx): Add TOOL_BAR_ITEM_RTL_IMAGE.
11747
11748 * gtkutil.c (xg_tool_bar_expose_callback): Just do SET_FRAME_GARBAGED
11749 so no Lisp code is executed.
11750 (file_for_image, find_rtl_image): New functions.
11751 (xg_get_image_for_pixmap): Use file_for_image.
11752 (update_frame_tool_bar): If direction is RTL, use RTL image if
11753 defined. Use Gtk stock images if defined.
11754
11755 2007-08-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11756
11757 * macterm.c (x_draw_composite_glyph_string_foreground): Draw rectangle
11758 for nonexistent or zero-width glyph in composition glyph.
11759
11760 2007-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
11761
11762 * m/amdx86-64.h: Redirect to intel386.h if compiling for i386.
11763
11764 * xdisp.c (Finvisible_p): New function.
11765 (syms_of_xdisp): defsubr it.
11766
11767 2007-08-24 Juanma Barranquero <lekktu@gmail.com>
11768
11769 * image.c (syms_of_image) <image-library-alist, cross-disabled-images>:
11770 Doc fixes.
11771
11772 2007-08-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11773
11774 * mac.c [MAC_OSX] (select_and_poll_event, sys_select): Fix last changes.
11775
11776 2007-08-24 Martin Rudalics <rudalics@gmx.at>
11777
11778 * fileio.c (Finsert_file_contents): Consult CHARS_MODIFF to tell
11779 whether decoding has modified buffer contents.
11780
11781 2007-08-24 Jason Rumney <jasonr@gnu.org>
11782
11783 * image.c [HAVE_NTGUI]: Define dynamic loaded functions for SVG.
11784 (Qgdk_pixbuf, Qglib) [HAVE_NTGUI]: New symbols.
11785 (syms_of_image) [HAVE_NTGUI]: Intern and staticpro them.
11786 (init_svg_functions) [HAVE_NTGUI]: New function.
11787 (fn_g_type_init, fn_g_object_unref, fn_g_error_free): New #defines.
11788 (svg_load_image): Use them.
11789 (svg_load_image) [HAVE_NTGUI]: Implement background.
11790
11791 2007-08-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11792
11793 * Makefile.in (RSVG_LIBS, RSVG_CFLAGS): New variables.
11794 (ALL_CFLAGS): Use ${RSVG_CFLAGS} instead of @RSVG_CFLAGS@.
11795 (LIBX): Remove @RSVG_LIBS@.
11796 (LIBES): Add $(RSVG_LIBS).
11797
11798 * image.c (svg_load_image): Blend with specified background if exists.
11799 Use IMAGE_BACKGROUND. Add Mac OS Support.
11800
11801 * mac.c (wakeup_from_rne_enabled_p) [MAC_OSX]: Remove variable.
11802 (ENABLE_WAKEUP_FROM_RNE, DISABLE_WAKEUP_FROM_RNE) [MAC_OSX]:
11803 Remove macros.
11804 [MAC_OSX] (socket_callback): Do nothing.
11805 [MAC_OSX] (select_and_poll_event): Use CFRunLoopRunInMode instead of
11806 ReceiveNextEvent.
11807 [MAC_OSX] (sys_select): Likewise. Don't set context as argument to
11808 socket_callback.
11809 (mac_wakeup_from_rne) [MAC_OSX]: Do nothing.
11810
11811 2007-08-22 Glenn Morris <rgm@gnu.org>
11812
11813 * image.c (x_find_image_file): Search in etc/images/ rather than etc/.
11814
11815 2007-08-22 Paul Pogonyshev <pogonyshev@gmx.net>
11816
11817 * Makefile.in (ALL_CFLAGS, LIBX): Add RSVG_LIBS.
11818
11819 * image.c: Add support for SVG images. Some additional comments
11820 by Joakim Verona <joakim@verona.se>. When HAVE_RSVG is defined:
11821 (svg_image_p): New function to test for SVG image.
11822 (svg_load): New function to load SVG image.
11823 (svg_load_image): New function, helper for svg_load.
11824 (Qsvg): New Lisp_object.
11825 (svg_keyword_index): New enum.
11826 (svg_format): New static `image_keyword' struct.
11827 (svg_type): New static `image_type' struct.
11828 (librsvg/rsvg.h): Include it.
11829
11830 2007-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
11831
11832 * lread.c (load_warn_old_style_backquotes): Fix up array size typo.
11833
11834 2007-08-22 Stefan Monnier <monnier@iro.umontreal.ca>
11835
11836 * lread.c (Qold_style_backquotes): New var.
11837 (syms_of_lread): Init and staticpro it.
11838 (load_warn_old_style_backquotes): New fun.
11839 (Fload): Use them to warn about old style backquotes.
11840 (end_of_file_error, Fload): Remove unused vars.
11841
11842 * lisp.h (Fclear_face_cache, Fx_send_client_event): Declare.
11843
11844 * lread.c (Vold_style_backquotes): New var.
11845 (syms_of_lread): Init and export it to Elisp.
11846 (read1): Set it when we find an old-style (back)quote.
11847
11848 2007-08-22 Jason Rumney <jasonr@gnu.org>
11849
11850 * w32reg.c (SYSTEM_DEFAULT_RESOURCES): Add missing NULL terminator.
11851
11852 2007-08-22 Katsumi Yamaoka <yamaoka@jpl.org>
11853
11854 * puresize.h (BASE_PURESIZE): Increase to 1140000.
11855
11856 2007-08-19 Richard Stallman <rms@gnu.org>
11857
11858 * eval.c (Ffunction, Fquote): Signal error if not 1 argument.
11859
11860 2007-08-19 Andreas Schwab <schwab@suse.de>
11861
11862 * alloc.c (pure): Round PURESIZE up.
11863
11864 2007-08-17 Jan Djärv <jan.h.d@swipnet.se>
11865
11866 * xterm.c (handle_one_xevent): Remove check that mouse click is in
11867 active frame.
11868
11869 2007-08-16 Richard Stallman <rms@gnu.org>
11870
11871 * eval.c (Fcommandp): Add parens to clarify.
11872
11873 * minibuf.c (Fall_completions): Use enum for type of table.
11874
11875 * emacs.c (USAGE2): Improve text.
11876
11877 2007-08-15 Philippe Waroquiers <philippe.waroquiers@eurocontrol.int>
11878
11879 * term.c (tty_default_color_capabilities): Declare static
11880 variables in file scope, to avoid HPUX compiler problem.
11881
11882 2007-08-13 Jan Djärv <jan.h.d@swipnet.se>
11883
11884 * gtkutil.c (update_frame_tool_bar): Use -1 as index
11885 to gtk_toolbar_insert.
11886
11887 2007-08-13 Stefan Monnier <monnier@iro.umontreal.ca>
11888
11889 * fileio.c (Finsert_file_contents): Yet Another Int/Lisp_Object Mixup.
11890
11891 * insdel.c (reset_var_on_error): New fun.
11892 (signal_before_change, signal_after_change):
11893 Use it to reset (after|before)-change-functions to nil in case of error.
11894 Bind inhibit-modification-hooks to t.
11895 Don't bind (after|before)-change-functions to nil while they run.
11896
11897 2007-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11898
11899 * xterm.c (x_draw_image_glyph_string): Adjust stipple origin when
11900 filling pixmap with stippled background.
11901
11902 2007-08-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11903
11904 * macterm.c [TARGET_API_MAC_CARBON] (mac_handle_window_event):
11905 Don't use invisible frame as parent window for repositioning.
11906
11907 2007-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
11908
11909 * print.c (new_backquote_output): Rename from old_backquote_output.
11910 (print): Inverse its logic (according to its name) so as to match the
11911 behavior of new_backquote_flag in lread.c.
11912
11913 2007-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11914
11915 * gmalloc.c (posix_memalign): New function.
11916
11917 * macterm.c (frame_highlight, frame_unhighlight): Don't call
11918 ActivateControl/DeactivateControl here.
11919 [USE_MAC_TOOLBAR] (free_frame_tool_bar): Suppress animation when
11920 frame-notice-user-settings is non-nil.
11921 [USE_MAC_FONT_PANEL] (mac_handle_font_event): Also record parameter
11922 for kEventParamFMFontStyle.
11923 [TARGET_API_MAC_CARBON] (mac_handle_keyboard_event): Don't check
11924 mac_pass_command_to_system and mac_pass_control_to_system here.
11925 (XTread_socket): Call ActivateControl/DeactivateControl here.
11926 (XTread_socket) [TARGET_API_MAC_CARBON]:
11927 Check mac_pass_command_to_system and mac_pass_control_to_system here.
11928 (mac_handle_window_event) [USE_MAC_TOOLBAR]: Add further workaround
11929 for window repositioning.
11930
11931 2007-08-08 Glenn Morris <rgm@gnu.org>
11932
11933 * Replace `iff' in doc-strings and comments.
11934
11935 2007-08-07 Chong Yidong <cyd@stupidchicken.com>
11936
11937 * xdisp.c (move_it_by_lines): Remove incorrect optimization.
11938
11939 2007-08-07 Martin Rudalics <rudalics@gmx.at>
11940
11941 * fileio.c (Finsert_file_contents): Run format-decode and
11942 after_insert_file_functions on entire buffer when REPLACE is
11943 non-nil and inhibit modification_hooks and point_motion_hooks.
11944 For consistency, run after_insert_file_functions iff something
11945 got inserted. Move signal_after_change and update_compositions
11946 after code running after_insert_file_functions. Make sure that
11947 undo_list doesn't record intermediate steps of the decoding process.
11948
11949 2007-08-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11950
11951 * emacs.c (main)
11952 [HAVE_GTK_AND_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
11953 Call malloc_enable_thread on interactive startup.
11954
11955 * gmalloc.c (_malloc_thread_enabled_p) [USE_PTHREAD]: New variable.
11956 (LOCK, UNLOCK, LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS)
11957 [USE_PTHREAD]: Conditionalize with it.
11958 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
11959 (malloc_atfork_handler_child, malloc_enable_thread) [USE_PTHREAD]:
11960 New functions.
11961
11962 2007-08-06 Chong Yidong <cyd@stupidchicken.com>
11963
11964 * xdisp.c (redisplay_window): When restoring original buffer
11965 position, make sure it is still valid.
11966
11967 * image.c (png_load): Ignore png-supplied background color.
11968
11969 2007-08-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11970
11971 * mac.c [TARGET_API_MAC_CARBON] (cfdate_to_lisp): Obtain microsec value.
11972 Use kCFAbsoluteTimeIntervalSince1970.
11973
11974 * macmenu.c (quit_dialog_event_loop) [TARGET_API_MAC_CARBON]:
11975 New variable.
11976 [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Set it if dialog
11977 event loop should be quit.
11978 [TARGET_API_MAC_CARBON] (create_and_show_dialog) [!MAC_OSX]:
11979 Quit dialog event loop if quit_dialog_event_loop is set.
11980
11981 * macselect.c [!TARGET_API_MAC_CARBON]: Include Scrap.h.
11982 (Selection): New typedef. Use instead of ScrapRef.
11983 (mac_get_selection_from_symbol): Rename from get_scrap_from_symbol.
11984 (mac_valid_selection_target_p): Rename from valid_scrap_target_type_p.
11985 (mac_clear_selection): Rename from clear_scrap.
11986 (get_flavor_type_from_symbol): New argument SEL and subsume function of
11987 scrap_has_target_type. All uses changed.
11988 (mac_get_selection_ownership_info, mac_valid_selection_value_p)
11989 (mac_selection_has_target_p): New functions.
11990 (mac_put_selection_value): Rename from put_scrap_string.
11991 (mac_get_selection_value): Rename from get_scrap_string.
11992 (mac_get_selection_target_list): Rename from get_scrap_target_type_list.
11993 (put_scrap_private_timestamp, scrap_has_target_type)
11994 (get_scrap_private_timestamp): Remove functions.
11995 (SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP): Remove define.
11996 (x_own_selection, x_get_local_selection):
11997 Use mac_valid_selection_value_p.
11998 (x_own_selection): Don't use put_scrap_private_timestamp.
11999 Record OWNERSHIP-INFO into Vselection_alist instead.
12000 (x_get_local_selection): Don't check type if request is local.
12001 (Fx_selection_owner_p): Don't use get_scrap_private_timestamp.
12002 Detect ownership change with OWNERSHIP-INFO in Vselection_alist instead.
12003
12004 2007-08-04 Jan Djärv <jan.h.d@swipnet.se>
12005
12006 * gtkutil.c (xg_tool_bar_callback): Generate two TOOL_BAR_EVENT:s,
12007 add comment explaining why.
12008
12009 2007-08-03 Richard Stallman <rms@gnu.org>
12010
12011 * fileio.c (Fvisited_file_modtime): Use make_time.
12012
12013 2007-08-01 Ryo Yoshitake <ryo@shiftmode.net> (tiny change)
12014
12015 * mac.c (init_mac_osx_environment): Adjust load-path on self-contained
12016 build.
12017
12018 2007-07-31 Stefan Monnier <monnier@iro.umontreal.ca>
12019
12020 * gtkutil.c (xg_tool_bar_callback): Generate a single TOOL_BAR_EVENT.
12021
12022 2007-07-30 Katsumi Yamaoka <yamaoka@jpl.org>
12023
12024 * puresize.h (BASE_PURESIZE): Increase to 1130000.
12025
12026 2007-07-30 Richard Stallman <rms@gnu.org>
12027
12028 * lread.c (readevalloop, read1): Treat NBSP as whitespace.
12029
12030 2007-07-29 Jan Djärv <jan.h.d@swipnet.se>
12031
12032 * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed.
12033
12034 2007-07-28 Nick Roberts <nickrob@snap.net.nz>
12035
12036 * xdisp.c (decode_mode_spec): Use '@' instead of 'R' to test for
12037 remote default-directory.
12038
12039 * buffer.c (mode-line-format): Update doc string.
12040
12041 2007-07-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12042
12043 * w32term.c (w32_draw_fringe_bitmap): Extend fringe background to
12044 scroll bar gap.
12045 (x_scroll_bar_create): Set bar->fringe_extended_p.
12046 (w32_set_vertical_scroll_bar): Put leftmost/rightmost scroll bars
12047 on frame edge. Check fringe background extension. Don't clear
12048 extended fringe background area.
12049
12050 * w32term.h (struct scroll_bar): New member fringe_extended_p.
12051 (w32_fill_area): Enclose multiple statements with do ... while (0).
12052
12053 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
12054 Extend fringe background to scroll bar gap.
12055 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]:
12056 Set bar->fringe_extended_p.
12057 (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
12058 Put leftmost/rightmost scroll bars on frame edge. Check fringe
12059 background extension. Don't clear extended fringe background area.
12060
12061 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
12062 New member fringe_extended_p.
12063
12064 2007-07-25 Glenn Morris <rgm@gnu.org>
12065
12066 * Relicense all FSF files to GPLv3 or later.
12067
12068 * COPYING: Switch to GPLv3.
12069
12070 2007-07-25 Stefan Monnier <monnier@iro.umontreal.ca>
12071
12072 * eval.c (Fcommandp): Pay attention to the `interactive-form' property.
12073
12074 * data.c (Finteractive_form): Check for the presence of an
12075 `interactive-form' symbol property more thoroughly.
12076
12077 * data.c (Finteractive_form): Use an `interactive-form' property if
12078 present, analogous to the function-documentation property.
12079
12080 2007-07-24 Jason Rumney <jasonr@gnu.org>
12081
12082 * w32fns.c (x_real_positions): Get real position from OS instead of
12083 calculating it.
12084
12085 2007-07-23 Jason Rumney <jasonr@gnu.org>
12086
12087 * filelock.c (current_lock_owner): Allow for @ sign in username.
12088
12089 2007-07-22 Nick Roberts <nickrob@snap.net.nz>
12090
12091 * xdisp.c (decode_mode_spec): Add case 'R' for to test for
12092 remote default-directory.
12093
12094 * buffer.c (mode-line-format): Describe above case in doc string.
12095
12096 2007-07-20 Eli Zaretskii <eliz@gnu.org>
12097
12098 * w32proc.c (IMAGE_NT_OPTIONAL_HDR32_MAGIC, IMAGE_OPTIONAL_HEADER32):
12099 Define if not defined.
12100
12101 2007-07-18 Jason Rumney <jasonr@gnu.org>
12102
12103 * w32proc.c (w32_executable_type): Handle 64 bit executables.
12104
12105 2007-07-18 Richard Stallman <rms@gnu.org>
12106
12107 * data.c (Fsetq_default): Doc fix.
12108
12109 * eval.c (Fsetq): Doc fix.
12110
12111 2007-07-18 Juanma Barranquero <lekktu@gmail.com>
12112
12113 * coding.c (Ffind_operation_coding_system):
12114 * eval.c (For, Fand): Doc fixes.
12115 Reported by Johan Bockgård.
12116
12117 2007-07-18 Jan Djärv <jan.h.d@swipnet.se>
12118
12119 * xfns.c (Fx_focus_frame): Call x_ewmh_activate_frame.
12120
12121 * xterm.h: Declare x_ewmh_activate_frame.
12122
12123 * xterm.c (x_ewmh_activate_frame): New function.
12124 (XTframe_raise_lower): Move code to x_ewmh_activate_frame.
12125
12126 2007-07-17 Martin Rudalics <rudalics@gmx.at>
12127
12128 * window.c (Fdisplay_buffer): If largest or LRU window is the
12129 only window, split it even if it is not eligible for splitting.
12130 This restores the original behavior broken by the 2007-07-15
12131 change.
12132
12133 2007-07-17 Glenn Morris <rgm@gnu.org>
12134
12135 * abbrev.c (abbrev_check_chars): New function.
12136 (Fdefine_global_abbrev, Fdefine_mode_abbrev):
12137 Call abbrev_check_chars to check abbrev characters are word
12138 constituents. Doc fix.
12139
12140 2007-07-17 Stefan Monnier <monnier@iro.umontreal.ca>
12141
12142 * process.c (Fstart_process, Fmake_network_process)
12143 (read_process_output): Fix up last changes.
12144
12145 2007-07-16 Eli Zaretskii <eliz@gnu.org>
12146
12147 * makefile.w32-in (clean): Don't delete *~.
12148
12149 2007-07-16 Andreas Schwab <schwab@suse.de>
12150
12151 * window.c (Fdisplay_buffer): Use NILP.
12152 (Fset_window_scroll_bars): Likewise.
12153
12154 2007-07-15 Martin Rudalics <rudalics@gmx.at>
12155
12156 * window.c (window_min_size_2): New function.
12157 (window_min_size_1, size_window, Fdisplay_buffer)
12158 (Fsplit_window, adjust_window_trailing_edge): Use it to avoid
12159 windows without mode- or header-lines when window-min-height is
12160 too small.
12161 (size_window): Reset nodelete_p after testing it, following an
12162 earlier note by Kim F. Storm.
12163 (display_buffer): Do not set split_height_threshold to twice the
12164 value of window_min_height to avoid changing the value of a
12165 customizable variable. Rather explicitly check whether the
12166 height of the window that shall be splitted is at least as large
12167 as split_height_threshold.
12168 (Fwindow_full_width_p): New defun.
12169 (syms_of_window): Defsubr it.
12170
12171 * window.h: Add EXFUN for Fwindow_full_width_p.
12172
12173 2007-07-14 Jason Rumney <jasonr@gnu.org>
12174
12175 * process.c [WINDOWSNT]: Don't undefine AF_INET6.
12176
12177 2007-07-14 Richard Stallman <rms@gnu.org>
12178
12179 * eval.c (maybe_call_debugger): New function.
12180 (find_handler_clause): Use maybe_call_debugger.
12181 Call it when the handler says `debug'.
12182 Eliminate DEBUGGER_VALUE_PTR.
12183 (Fsignal): Eliminate debugger_value.
12184 (Qdebug): New variable.
12185 (syms_of_eval): Initialize it.
12186
12187 2007-07-14 Juanma Barranquero <lekktu@gmail.com>
12188
12189 * eval.c (Fprogn):
12190 * keyboard.c (Ftrack_mouse):
12191 * print.c (Fwith_output_to_temp_buffer):
12192 * window.c (Fsave_window_excursion): Doc fix.
12193
12194 2007-07-13 Stefan Monnier <monnier@iro.umontreal.ca>
12195
12196 * eval.c (init_eval_once): Bump max_lisp_eval_depth to 400.
12197
12198 2007-07-12 Stefan Monnier <monnier@iro.umontreal.ca>
12199
12200 * process.h (struct Lisp_Process): Turn slots infd, outfd,
12201 kill_without_query, pty_flag, tick, update_tick, decoding_carryover,
12202 inherit_coding_system_flag, filter_multibyte, adaptive_read_buffering,
12203 read_output_delay, and read_output_skip from Lisp_Objects to ints.
12204 Remove unused encoding_carryover.
12205 * process.c: Adjust all functions accordingly.
12206
12207 2007-07-12 Richard Stallman <rms@gnu.org>
12208
12209 * term.c: Include unistd.h only if HAVE_UNISTD_H.
12210
12211 2007-07-11 Jason Rumney <jasonr@gnu.org>
12212
12213 * makefile.w32-in (LIBS): Include OLE32.
12214
12215 * w32fns.c (w32_msg_pump) <WM_EMACS_CREATEWINDOW>: Initialize COM.
12216 (w32_msg_pump) <WM_DESTROY>: Uninitialize COM.
12217
12218 2007-07-11 Stefan Monnier <monnier@iro.umontreal.ca>
12219
12220 * lisp.h (struct Lisp_Hash_Table): Turn next_weak into a bare pointer.
12221 * fns.c (weak_hash_tables): Rename from Vweak_hash_tables and turned
12222 from a Lisp_Object into a bare pointer.
12223 (make_hash_table, copy_hash_table, sweep_weak_hash_tables, init_fns):
12224 Adjust the code correspondingly.
12225
12226 * alloc.c (emacs_blocked_free): Remove unused var `bytes_used_now'.
12227
12228 * term.c: Include unistd.h for ttyname, used in handle_one_term_event.
12229 (term_show_mouse_face): Remove unused var `j'.
12230 (handle_one_term_event): Remove unused vars `i' and `j'.
12231 Don't cast return value of ttyname since it's not necessary.
12232
12233 2007-07-10 Stefan Monnier <monnier@iro.umontreal.ca>
12234
12235 * alloc.c (mark_maybe_pointer): Enforce mult-of-8 alignment when using
12236 USE_LSB_TAG. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
12237
12238 * fns.c (map_char_table): Use an array of int for `indices' rather than
12239 an array of Lisp_Objects (which are only ever integers anyway).
12240 (Fmap_char_table): Update caller.
12241 * lisp.h: Update prototype.
12242 * keymap.c (Fset_keymap_parent, map_keymap, Fcopy_keymap):
12243 * fontset.c (Ffontset_info):
12244 * casetab.c (set_case_table): Update callers.
12245
12246 * editfns.c (Ftranspose_regions): Use EMACS_INT for positions.
12247
12248 * keymap.c (struct accessible_keymaps_data)
12249 (struct where_is_internal_data): New structures.
12250 (accessible_keymaps_1, where_is_internal_1): Use them to change
12251 interface to adhere to the one used by map_keymap.
12252 (Faccessible_keymaps, where_is_internal): Use map_keymap.
12253 (accessible_keymaps_char_table, where_is_internal_2): Remove.
12254
12255 * keymap.h (map_keymap_function_t): More informative prototype.
12256
12257 2007-07-10 Guanpeng Xu <herberteuler@hotmail.com>
12258
12259 * search.c (Vinhibit_changing_match_data, search_regs_1): New vars.
12260 (looking_at_1): Don't change search_regs and last_thing_searched
12261 if `inhibit-changing-match-data' is non-nil.
12262 (string_match_1, search_buffer, set_search_regs): Likewise.
12263 (syms_of_search): Add Lisp level definition for
12264 `inhibit-changing-match-data' and set it to nil.
12265 (boyer_moore): If `inhibit-changing-match-data' is non-nil, compute
12266 start and end of the match, instead of using values in search_regs.
12267
12268 2007-07-01 Stefan Monnier <monnier@iro.umontreal.ca>
12269
12270 * minibuf.c (Fcompleting_read): New value `confirm-only'
12271 for `require-match'.
12272
12273 2007-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
12274
12275 * fileio.c (Fdo_auto_save): Revert last patch installed unwillingly as
12276 part of the 2007-06-27 change to syms_of_fileio.
12277
12278 2007-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12279
12280 * macterm.c [USE_MAC_TSM] (mac_handle_text_input_event):
12281 Check WINDOWP before using XWINDOW. Consolidate return statements.
12282
12283 2007-06-27 Richard Stallman <rms@gnu.org>
12284
12285 * fileio.c (syms_of_fileio) <after-insert-file-functions>: Doc fix.
12286
12287 2007-06-27 Juanma Barranquero <lekktu@gmail.com>
12288
12289 * buffer.c (syms_of_buffer) <selective-display>: Fix typo in docstring.
12290
12291 2007-06-26 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12292
12293 * gmalloc.c [HAVE_GTK_AND_PTHREAD]: Check this after including config.h.
12294 (_aligned_blocks_mutex) [USE_PTHREAD]: New variable.
12295 (LOCK_ALIGNED_BLOCKS, UNLOCK_ALIGNED_BLOCKS): New macros.
12296 (_free_internal, memalign): Use them.
12297 (_malloc_mutex, _aligned_blocks_mutex) [USE_PTHREAD]:
12298 Initialize to PTHREAD_MUTEX_INITIALIZER.
12299 (malloc_initialize_1) [USE_PTHREAD]: Don't use recursive mutex.
12300 (morecore_nolock): Rename from morecore. All uses changed.
12301 Use only nolock versions of internal allocation functions.
12302 (_malloc_internal_nolock, _realloc_internal_nolock)
12303 (_free_internal_nolock): New functions created from
12304 _malloc_internal, _realloc_internal, and _free_internal.
12305 (_malloc_internal, _realloc_internal, _free_internal): Use them.
12306 Copy hook value to automatic variable before its use.
12307 (memalign): Copy hook value to automatic variable before its use.
12308
12309 2007-06-26 Kenichi Handa <handa@m17n.org>
12310
12311 * coding.c (Ffind_operation_coding_system): Docstring improved.
12312 (syms_of_coding): Docstring of `file-coding-system-alist' improved.
12313
12314 2007-06-25 David Kastrup <dak@gnu.org>
12315
12316 * keymap.c (Fcurrent_active_maps): Add `position' argument.
12317 (Fwhere_is_internal): Adjust call to `current-active-maps' to
12318 cater for additional parameter.
12319
12320 * keymap.h: Adjust number of parameters to `current-active-maps'.
12321
12322 * doc.c (Fsubstitute_command_keys): Adjust call of
12323 `current-active-maps'.
12324
12325 2007-06-25 David Kastrup <dak@gnu.org>
12326
12327 * callint.c (Fcall_interactively): Make the parsing of interactive
12328 specs somewhat more readable.
12329
12330 2007-06-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12331
12332 * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe background
12333 to scroll bar gap also when bitmap fills fringe. Draw only foreground
12334 if extended background has already been filled.
12335
12336 2007-06-22 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12337
12338 * macgui.h (USE_CG_DRAWING): Don't require USE_ATSUI.
12339 (USE_MAC_TOOLBAR): Require USE_CG_DRAWING.
12340
12341 * macmenu.c (mac_dialog_modal_filter, Fx_popup_dialog) [MAC_OSX]:
12342 Put special treatment for Fmessage_box, Fyes_or_no_p, and Fy_or_n_p
12343 in #if 0 as it is not compatible with y-or-n-p-with-timeout.
12344 (timer_check) [TARGET_API_MAC_CARBON]: Add extern.
12345 [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Use QuitEventLoop
12346 instead of QuitAppModalLoopForWindow. Consolidate QuitEventLoop calls.
12347 (pop_down_dialog) [TARGET_API_MAC_CARBON]: New function.
12348 [TARGET_API_MAC_CARBON] (create_and_show_dialog): Use it for unwind.
12349 Run timers during dialog popup.
12350 (Fmenu_or_popup_active_p) [TARGET_API_MAC_CARBON]: Use popup_activated.
12351
12352 2007-06-21 Jason Rumney <jasonr@gnu.org>
12353
12354 * image.c (convert_mono_to_color_image): Swap fore and background.
12355
12356 2007-06-20 Jason Rumney <jasonr@gnu.org>
12357
12358 * w32bdf.c (w32_BDF_to_x_font): Unmap memory when finished.
12359 (w32_free_bdf_font): Unmap memory not handle.
12360
12361 2007-06-20 Sam Steingold <sds@gnu.org>
12362
12363 * gmalloc.c (__morecore): Fix the declaration to comply with the
12364 definition.
12365
12366 2007-06-20 Juanma Barranquero <lekktu@gmail.com>
12367
12368 * w32term.c (w32_delete_display): Remove leftover declaration.
12369 (w32_define_cursor, w32_initialize): Make static.
12370
12371 * w32.c (_wsa_errlist): Fix typo in error message.
12372 (init_environment): Ignore any environment variable from the
12373 registry having a null value.
12374
12375 2007-06-20 Glenn Morris <rgm@gnu.org>
12376
12377 * Makefile.in (LIBGIF): Default to -lgif.
12378
12379 2007-06-17 Jason Rumney <jasonr@gnu.org>
12380
12381 * w32menu.c (add_menu_item): Don't use multibyte string functions on
12382 unicode strings.
12383
12384 2007-06-16 Juanma Barranquero <lekktu@gmail.com>
12385
12386 * xdisp.c (syms_of_xdisp) <auto-resize-tool-bars>:
12387 Fix typo in docstring.
12388
12389 2007-06-16 Eli Zaretskii <eliz@gnu.org>
12390
12391 * w32menu.c (add_menu_item): Escape `&' characters in menu items
12392 and their keybindings.
12393
12394 2007-06-15 Chong Yidong <cyd@stupidchicken.com>
12395
12396 * composite.c (update_compositions): Fix last fix.
12397
12398 2007-06-14 Jason Rumney <jasonr@gnu.org>
12399
12400 * w32.c (get_process_times_fn): New function pointer.
12401 (globals_of_w32): Intialize it if present in kernel32.dll.
12402 (w32_get_internal_run_time): New function.
12403
12404 * editfns.c (Fget_internal_run_time) [WINDOWSNT]: Use it.
12405
12406 2007-06-14 Kenichi Handa <handa@etlken.m17n.org>
12407
12408 * composite.c (update_compositions): Check the validness of
12409 compositions.
12410
12411 2007-06-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12412
12413 * frame.h (struct frame) [MAC_OS]: New member external_tool_bar.
12414 (FRAME_EXTERNAL_TOOL_BAR) [MAC_OS]: Use it.
12415
12416 * macfns.c (mac_window) [USE_MAC_TOOLBAR]: Set toolbar_win_gravity.
12417 (x_set_tool_bar_lines) [USE_MAC_TOOLBAR]: Set FRAME_EXTERNAL_TOOL_BAR.
12418
12419 * macgui.h (USE_MAC_TOOLBAR): New define.
12420
12421 * macmenu.c [TARGET_API_MAC_CARBON] (menu_target_item_handler):
12422 Return immediately unless popup is activated.
12423
12424 * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe
12425 background to scroll bar gap.
12426 (x_scroll_bar_create) [MAC_OSX]: Set bar->fringe_extended_p.
12427 (XTset_vertical_scroll_bar) [MAC_OSX]: Put leftmost/rightmost
12428 scroll bars on frame edge. Check fringe background extension.
12429 Don't clear extended fringe background area.
12430 (TOOLBAR_IDENTIFIER, TOOLBAR_ICON_ITEM_IDENTIFIER)
12431 (TOOLBAR_ITEM_COMMAND_ID_OFFSET, TOOLBAR_ITEM_COMMAND_ID_P)
12432 (TOOLBAR_ITEM_COMMAND_ID_VALUE, TOOLBAR_ITEM_MAKE_COMMAND_ID):
12433 [USE_MAC_TOOLBAR]: New macros.
12434 (mac_move_window_with_gravity, mac_get_window_origin_with_gravity)
12435 (mac_handle_toolbar_event, mac_image_spec_to_cg_image)
12436 (mac_create_frame_tool_bar, update_frame_tool_bar, free_frame_tool_bar)
12437 (mac_tool_bar_note_mouse_movement, mac_handle_toolbar_command_event)
12438 [USE_MAC_TOOLBAR]: New functions.
12439 (mac_handle_window_event) [USE_MAC_TOOLBAR]: Reposition window
12440 manually if previous repositioning has failed.
12441 (mac_handle_keyboard_event): Use precomputed event kind.
12442 (XTread_socket) [USE_MAC_TOOLBAR]: Handle click in structure region
12443 as tool bar item click. Handle mouse movement over tool bar items.
12444
12445 * macterm.h (struct mac_output) [USE_MAC_TOOLBAR]: New member
12446 toolbar_win_gravity.
12447 (struct scroll_bar) [MAC_OSX]: New member fringe_extended_p.
12448 (update_frame_tool_bar, free_frame_tool_bar) [USE_MAC_TOOLBAR]:
12449 Add externs.
12450
12451 * xdisp.c (update_tool_bar, redisplay_tool_bar, redisplay_window)
12452 [USE_MAC_TOOLBAR]: Sync with GTK+ tool bar display.
12453
12454 2007-06-14 Chong Yidong <cyd@stupidchicken.com>
12455
12456 * image.c (search_image_cache): Remove unused variable.
12457
12458 2007-06-13 Chong Yidong <cyd@stupidchicken.com>
12459
12460 * xfns.c, xmenu.c: Link to xaw3d if available.
12461
12462 2007-06-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12463
12464 * dispextern.h (struct image) [HAVE_WINDOW_SYSTEM]: New members
12465 frame_foreground and frame_background.
12466
12467 * image.c (lookup_image): Save frame foreground and background colors.
12468 (search_image_cache): Check if saved and current frame colors match.
12469
12470 2007-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
12471
12472 * regex.c (regex_compile): Remove the `regnum' counter.
12473 Use bufp->re_nsub instead. Add support for \(?N:RE\).
12474
12475 2007-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
12476
12477 * term.c: Include intervals.h to declare Fget_text_property.
12478
12479 2007-06-10 Jason Rumney <jasonr@gnu.org>
12480
12481 * w32fns.c (Fx_file_dialog): Take size from struct not pointer.
12482
12483 2007-06-08 Juanma Barranquero <lekktu@gmail.com>
12484
12485 * callint.c (Fcall_interactively):
12486 * editfns.c (Fdelete_and_extract_region):
12487 * fileio.c (Fread_file_name):
12488 * fns.c (Fmapconcat):
12489 * keyboard.c (cmd_error_internal):
12490 * keymap.c (Fkey_description):
12491 * lread.c (openp):
12492 * minibuf.c (read_minibuf):
12493 * search.c (wordify):
12494 * sunfns.c (sel_read):
12495 * xdisp.c (Fformat_mode_line, syms_of_xdisp):
12496 * xfns.c (x_default_scroll_bar_color_parameter):
12497 * xmenu.c (menu_help_callback):
12498 * xselect.c (Fx_get_atom_name):
12499 * xterm.c (x_term_init): Use empty_unibyte_string.
12500
12501 2007-06-08 Dmitry Antipov <dmantipov@yandex.ru> (tiny change)
12502
12503 * alloc.c (init_strings): Initialize canonical empty strings.
12504 (make_uninit_string, make_uninit_multibyte_string): Return appropriate
12505 canonical empty string when the requested size is 0.
12506
12507 * emacs.c (empty_unibyte_string): Rename from empty_string.
12508 (empty_multibyte_string): New canonical empty string.
12509 (syms_of_emacs): Don't initialize empty_string.
12510
12511 * lisp.h (STRING_SET_UNIBYTE): Return the canonical empty unibyte
12512 string, if appropriate.
12513 (empty_unibyte_string, empty_multibyte_string): New externs.
12514 (empty_string): Remove extern.
12515
12516 * lread.c (syms_of_lread): Use empty_unibyte_string.
12517
12518 2007-06-07 Jason Rumney <jasonr@gnu.org>
12519
12520 * s/ms-w32.h: Don't define HAVE_TZNAME.
12521
12522 * editfns.c (Fcurrent_time_zone): Remove hack for Japanese Windows.
12523
12524 2007-06-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12525
12526 * mac.c (xrm_get_preference_database): Remove BLOCK_INPUT.
12527
12528 * macfns.c (mac_get_window_bounds): Move extern to macterm.h.
12529 (compute_tip_xy) [TARGET_API_MAC_CARBON]: Use GetGlobalMouse.
12530
12531 * macmenu.c [TARGET_API_MAC_CARBON] (menu_target_item_handler):
12532 Don't call next handler.
12533 [TARGET_API_MAC_CARBON] (install_menu_target_item_handler):
12534 Remove argument. Install handler to application.
12535 (set_frame_menubar): Don't change deep_p.
12536 (mac_menu_show): Use FRAME_OUTER_TO_INNER_DIFF_X and
12537 FRAME_OUTER_TO_INNER_DIFF_Y.
12538 (DIALOG_BUTTON_COMMAND_ID_OFFSET, DIALOG_BUTTON_COMMAND_ID_P)
12539 (DIALOG_BUTTON_COMMAND_ID_VALUE, DIALOG_BUTTON_MAKE_COMMAND_ID)
12540 [HAVE_DIALOGS]: New macros.
12541 [HAVE_DIALOGS] (mac_handle_dialog_event, create_and_show_dialog):
12542 Use them.
12543 (fill_menubar) [TARGET_API_MAC_CARBON]: Use CFString.
12544
12545 * macselect.c [MAC_OSX] (install_service_handler): Rename from
12546 init_service_handler. All callers changed. Return OSStatus value.
12547
12548 * macterm.c (mac_begin_cg_clip): New arg F. Call SetPortWindowPort.
12549 All callers changed so as not to call SetPortWindowPort.
12550 (mac_begin_cg_clip) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw.
12551 (mac_draw_image_string_atsui) [USE_ATSUI]: New function created from
12552 mac_draw_string_common.
12553 (mac_draw_image_string_qd): Likewise.
12554 (mac_draw_string_common): Use them. Add INLINE.
12555 (XTmouse_position, x_scroll_bar_report_motion) [TARGET_API_MAC_CARBON]:
12556 Use FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y, and
12557 GetGlobalMouse.
12558 (x_set_mouse_pixel_position) [MAC_OSX]: Use FRAME_OUTER_TO_INNER_DIFF_X
12559 and FRAME_OUTER_TO_INNER_DIFF_Y.
12560 [TARGET_API_MAC_CARBON] (mac_handle_mouse_event): Likewise.
12561 [USE_MAC_TSM] (mac_handle_text_input_event): Likewise.
12562 (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Move code for
12563 repositioning window to mac_handle_window_event.
12564 (x_make_frame_invisible) [TARGET_API_MAC_CARBON]: Move code for
12565 saving window location to mac_handle_window_event
12566 [USE_MAC_FONT_PANEL] (mac_show_hide_font_panel): Install handler here.
12567 (install_menu_target_item_handler): Remove argument in extern.
12568 [TARGET_API_MAC_CARBON] (mac_event_to_emacs_modifiers):
12569 Also accept command events.
12570 (do_keystroke): New function created from XTread_socket.
12571 (init_command_handler): Remove functions.
12572 [TARGET_API_MAC_CARBON] (mac_handle_window_event): Reposition window
12573 and save window location by kEventWindowShowing and kEventWindowHiding
12574 handlers here. Don't call next handler for window state change and
12575 focus events.
12576 (mac_handle_application_event, mac_handle_keyboard_event)
12577 [TARGET_API_MAC_CARBON]: New functions.
12578 (install_window_handler) [TARGET_API_MAC_CARBON]: Register handlers for
12579 kEventWindowShowing and kEventWindowHiding events. Move installation
12580 of mouse, font, text input and menu target item handlers to
12581 install_application_handler.
12582 (install_application_handler) [TARGET_API_MAC_CARBON]: New function.
12583 (mac_handle_cg_display_reconfig) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
12584 New function.
12585 (init_dm_notification_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030]:
12586 Register it.
12587 (XTread_socket) [TARGET_API_MAC_CARBON]:
12588 Consolidate SendEventToEventTarget calls.
12589 Use FRAME_OUTER_TO_INNER_DIFF_X and FRAME_OUTER_TO_INNER_DIFF_Y.
12590 Move application activation handler to mac_handle_application_event.
12591 Move keyboard handler to mac_handle_keyboard_event.
12592 (XTread_socket) [!TARGET_API_MAC_CARBON]: Use do_keystroke.
12593 (mac_initialize) [TARGET_API_MAC_CARBON]: Don't call
12594 init_command_handler. Call install_application_handler.
12595
12596 * macterm.h (mac_get_window_bounds): Move extern from macfns.c.
12597 (FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y): New macros.
12598
12599 2007-06-07 Glenn Morris <rgm@gnu.org>
12600
12601 * emacs.c (main): Use `emacs-copyright' in --version output.
12602
12603 2007-06-06 Chong Yidong <cyd@stupidchicken.com>
12604
12605 * image.c (xpm_load): Remove spurious call to xpm_init_color_cache.
12606
12607 2007-06-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12608
12609 * macfns.c (mac_window): Replace WindowPtr with WindowRef.
12610
12611 * macgui.h: Replace WindowPtr with WindowRef.
12612
12613 * macmenu.c: Replace MenuHandle and GetMenuHandle with MenuRef and
12614 GetMenuRef, respectively. Replace WindowPtr with WindowRef.
12615 Replace ControlHandle with ControlRef.
12616 (install_menu_quit_handler): Rename arg MENU_HANDLE to ROOT_MENU.
12617
12618 * macterm.c: Replace MenuHandle and GetMenuHandle with MenuRef and
12619 GetMenuRef, respectively. Replace WindowPtr with WindowRef.
12620 Replace ControlHandle with ControlRef.
12621 (USE_CARBON_EVENTS): Remove. Use TARGET_API_MAC_CARBON instead.
12622 [MAC_OS8] (do_get_menus): Rename variable `menu_handle' to `menu'.
12623
12624 * macterm.h (struct scroll_bar): Rename member control_handle_low
12625 and control_handle_high to control_ref_low and control_ref_high.
12626 All uses changed.
12627 (SCROLL_BAR_CONTROL_REF, SET_SCROLL_BAR_CONTROL_REF): Rename from
12628 SCROLL_BAR_CONTROL_HANDLE and SET_SCROLL_BAR_CONTROL_HANDLE,
12629 respectively. All uses changed.
12630 (XCreatePixmap, XCreatePixmapFromBitmapData, XSetWindowBackground)
12631 (install_window_handler, remove_window_handler): Replace WindowPtr
12632 with WindowRef in externs.
12633
12634 2007-06-05 Juanma Barranquero <lekktu@gmail.com>
12635
12636 * xfaces.c (Finternal_lisp_face_p): Signal error for face alias loops.
12637
12638 2007-06-03 Nick Roberts <nickrob@snap.net.nz>
12639
12640 * keyboard.c (discard_mouse_events): Add GPM_CLICK_EVENT case.
12641
12642 * frame.c (Fmouse_position, Fmouse_pixel_position):
12643 Condition on HAVE_GPM too.
12644
12645 * term.c (term_mouse_highlight): Remove unused variables.
12646 (Fterm_open_connection): Set gpm_zerobased to 1.
12647 (term_mouse_movement, term_mouse_click, handle_one_term_event):
12648 Use zero based co-ordinates.
12649 (handle_one_term_event): Report a drag as mouse movement too.
12650
12651 * Makefile.in (MOUSE_SUPPORT): Define for HAVE_GPM.
12652
12653 2007-06-03 Chong Yidong <cyd@stupidchicken.com>
12654
12655 * image.c (search_image_cache): New function. Require background
12656 color match if background color is unspecified in the image spec.
12657 (uncache_image, lookup_image): Use it.
12658
12659 2007-06-01 Juanma Barranquero <lekktu@gmail.com>
12660
12661 * window.c (Fshrink_window): Reflow docstring.
12662
12663 2007-06-02 Chong Yidong <cyd@stupidchicken.com>
12664
12665 * Version 22.1 released.
12666
12667 2007-06-01 Richard Stallman <rms@gnu.org>
12668
12669 * xfns.c (x_encode_text): Add GCPRO.
12670
12671 2007-06-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12672
12673 * xfns.c (x_set_name_internal): Save encoded name before
12674 x_encode_text in case string data is relocated.
12675
12676 2007-05-31 Richard Stallman <rms@gnu.org>
12677
12678 * buffer.c (syms_of_buffer): Doc fix.
12679
12680 2007-05-30 Nick Roberts <nickrob@snap.net.nz>
12681
12682 * sysdep.c (init_sys_modes): Add rather than replace with
12683 O_NONBLOCK.
12684
12685 * frame.c [HAVE_GPM] (Fset_mouse_pixel_position): Add call to
12686 term_mouse_moveto.
12687
12688 * termhooks.h (term_mouse_moveto): New extern.
12689
12690 * term.c (mouse_face_window): Rename...
12691 (Qmouse_face_window): ...to this.
12692 (term_show_mouse_face, term_clear_mouse_face)
12693 (term_mouse_highlight): Use Qmouse_face_window.
12694 (term_mouse_moveto): New function.
12695 (term_mouse_position): Make it work.
12696 (syms_of_term): Uncomment assignment to mouse_position_hook.
12697 Staticpro Qmouse_face_window.
12698
12699 2007-05-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12700
12701 * xdisp.c (redisplay_internal): Bind inhibit-point-motion-hooks to t
12702 around current_column call.
12703
12704 2007-05-26 Dan Nicolaescu <dann@ics.uci.edu>
12705
12706 * xfaces.c (syms_of_xfaces): Delete stray semicolon.
12707 * xdisp.c (next_element_from_buffer):
12708 * window.c (delete_window):
12709 * term.c (term_mouse_highlight):
12710 * msdos.c (getdefdir):
12711 * macterm.c (mac_create_bitmap_from_bitmap_data)
12712 (init_font_name_table):
12713 * fns.c (Fsxhash):
12714 * data.c (Fmake_local_variable):
12715 * ccl.c (ccl_driver): Likewise.
12716
12717 2007-05-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12718
12719 * macterm.c [USE_CARBON_EVENTS] (mac_handle_window_event):
12720 Call mac_wakeup_from_rne on window size change.
12721
12722 2007-05-25 Chong Yidong <cyd@stupidchicken.com>
12723
12724 * image.c (uncache_image): Fix typo.
12725
12726 2007-05-23 Johannes Weiner <hannes@saeurebad.de> (tiny change)
12727
12728 * keyboard.c (make_lispy_movement): Condition on HAVE_GPM too.
12729
12730 2007-05-22 Richard Stallman <rms@gnu.org>
12731
12732 * xterm.c (x_connection_closed): Remove NO_RETURN.
12733
12734 2007-05-22 Martin Rudalics <rudalics@gmx.at>
12735
12736 * syntax.c (scan_words): Fix arg to UPDATE_SYNTAX_TABLE_BACKWARD.
12737
12738 2007-05-21 Chong Yidong <cyd@stupidchicken.com>
12739
12740 * image.c (uncache_image): New function.
12741 (Fimage_refresh): New function.
12742
12743 2007-05-20 Jan Djärv <jan.h.d@swipnet.se>
12744
12745 * Makefile.in: Move GPM check outside HAVE_X_WINDOWS.
12746
12747 2007-05-20 Nick Roberts <nickrob@snap.net.nz>
12748
12749 * config.in, keyboard.c, Makefile.in, sysdep.c, term.c,
12750 * termhooks.h: Use HAVE_GPM instead of HAVE_GPM_H.
12751
12752 2007-05-20 Nick Roberts <nickrob@snap.net.nz>
12753
12754 * keyboard.c (make_lispy_event): Make case GPM_CLICK_EVENT
12755 conditional on [HAVE_GPM_H].
12756
12757 2007-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
12758
12759 * syntax.c (skip_chars): Update syntax-table only after we checked that
12760 the new location is valid.
12761
12762 2007-05-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12763
12764 * macterm.c (x_calc_absolute_position): Add BLOCK_INPUT around
12765 mac_get_window_bounds.
12766
12767 2007-05-20 Nick Roberts <nickrob@snap.net.nz>
12768
12769 * Makefile.in (LIBGPM): Allow it to be set from configure.
12770 If set then link Emacs with it.
12771
12772 * config.in: Regenerate.
12773
12774 * lisp.h (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
12775 New externs.
12776
12777 * termhooks.h [HAVE_GPM_H] (enum event_kind): Add GPM_CLICK_EVENT.
12778 Include gpm.h.
12779 (handle_one_term_event, term_gpm): New externs.
12780
12781 * sysdep.c [HAVE_GPM_H] (init_sys_modes): Make gpm_fd nonblocking
12782 and allow it to be interrupted by SIGIO.
12783
12784 * process.c (gpm_wait_mask, max_gpm_desc): New variables.
12785 (wait_reading_process_output): Wait on gpm_fd too.
12786 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor)): New functions.
12787 (add_gpm_wait_descriptor_called_flag): New variable.
12788 (delete_keyboard_wait_descriptor): Check gpm_wait_mask.
12789
12790 * keyboard.c [HAVE_GPM_H] (Qmouse_fixup_help_message)
12791 (make_lispy_movement, tracking_off, Ftrack_mouse, some_mouse_moved)
12792 (show_help_echo, readable_events, kbd_buffer_get_event, init_keyboard):
12793 Extend HAVE_MOUSE ifdefs to HAVE_GPM_H.
12794 (make_lispy_event): Add case GPM_CLICK_EVENT.
12795 (read_avail_input): Handle mouse input.
12796
12797 * term.c (write_glyphs_with_face): New function.
12798 [HAVE_GPM_H]: Include buffer.h, sys/fcntl.h.
12799 (mouse_face_beg_row, mouse_face_beg_col, mouse_face_end_row)
12800 (mouse_face_end_col, mouse_face_past_end, mouse_face_window)
12801 (mouse_face_face_id, term_gpm, pos_x, pos_y)
12802 (last_mouse_x, last_mouse_y): New variables.
12803 (term_show_mouse_face, term_clear_mouse_face, fast_find_position)
12804 (term_mouse_highlight, term_mouse_movement, term_mouse_position)
12805 (term_mouse_click, handle_one_term_event, Fterm_open_connection)
12806 (Fterm_close_connection): New functions.
12807 (term_init): Initialise mouse_face_window.
12808
12809 2007-05-19 Chong Yidong <cyd@stupidchicken.com>
12810
12811 * xdisp.c (redisplay_window): If first window line is a
12812 continuation line, recompute the new window start instead of
12813 recentering.
12814
12815 2007-05-18 Glenn Morris <rgm@gnu.org>
12816
12817 * m/alpha.h (ORDINARY_LINK): No longer define on OpenBSD.
12818 Suggested by Alfred M. Szmidt <ams@gnu.org>.
12819
12820 2007-05-17 Glenn Morris <rgm@gnu.org>
12821
12822 * m/macppc.h (ORDINARY_LINK): No longer define on OpenBSD.
12823
12824 2007-05-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12825
12826 * macterm.c [USE_CARBON_EVENTS] (mac_convert_event_ref): Also convert
12827 dead key repeat and up events.
12828
12829 2007-05-14 Chong Yidong <cyd@stupidchicken.com>
12830
12831 * image.c (pbm_load): Check image size for monochrome pbm.
12832
12833 2007-05-13 Chong Yidong <cyd@stupidchicken.com>
12834
12835 * xterm.c (XTread_socket): Revert last change.
12836
12837 2007-05-12 Chong Yidong <cyd@stupidchicken.com>
12838
12839 * image.c (pbm_load): Correctly check image size for greyscale pbm.
12840
12841 * xterm.c (XTread_socket): Yet Another Uncaught X Error Crash (YAUXEC).
12842
12843 2007-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
12844
12845 * editfns.c (Ftranspose_regions): Yet another int/Lisp_Object
12846 mixup (YAILOM).
12847
12848 2007-05-07 Andreas Schwab <schwab@suse.de>
12849
12850 * keymap.c (Flookup_key): Fix typo in last change.
12851
12852 2007-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
12853
12854 * keymap.c (Fdefine_key, Flookup_key): Only do the 0x80->meta_modifier
12855 mapping for unibyte strings.
12856
12857 2007-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12858
12859 * macmenu.c (mac_dialog_show): Apply 2007-04-27 change for xmenu.c.
12860 (Fx_popup_dialog) [MAC_OSX]: Likewise.
12861
12862 2007-04-29 Richard Stallman <rms@gnu.org>
12863
12864 * insdel.c (replace_range): For undo, record insertion first.
12865
12866 2007-04-29 Andreas Schwab <schwab@suse.de>
12867
12868 * lisp.h (VECSIZE): Use OFFSETOF.
12869
12870 2007-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12871
12872 * xdisp.c (try_window_reusing_current_matrix): Fix number of
12873 disabled lines.
12874
12875 2007-04-28 Richard Stallman <rms@gnu.org>
12876
12877 * lread.c (read_escape): In a string, \s is always space.
12878
12879 2007-04-27 Jan Djärv <jan.h.d@swipnet.se>
12880
12881 * xmenu.c (xdialog_show): Call Fredisplay before showing the dialog.
12882
12883 * gtkutil.c (xg_update_menubar, create_menus): Create empty
12884 submenu for menu bar items.
12885
12886 See ChangeLog.10 for earlier changes.
12887
12888 ;; Local Variables:
12889 ;; coding: utf-8
12890 ;; add-log-time-zone-rule: t
12891 ;; End:
12892
12893 Copyright (C) 2007, 2008 Free Software Foundation, Inc.
12894
12895 This file is part of GNU Emacs.
12896
12897 GNU Emacs is free software: you can redistribute it and/or modify
12898 it under the terms of the GNU General Public License as published by
12899 the Free Software Foundation, either version 3 of the License, or
12900 (at your option) any later version.
12901
12902 GNU Emacs is distributed in the hope that it will be useful,
12903 but WITHOUT ANY WARRANTY; without even the implied warranty of
12904 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12905 GNU General Public License for more details.
12906
12907 You should have received a copy of the GNU General Public License
12908 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
12909
12910 ;; arch-tag: dfb6ad96-1550-4905-9e53-d2059ee84c40