Fix uses of long-obsolete font-lock-reference face.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
18e27ea8
PE
12012-09-23 Paul Eggert <eggert@cs.ucla.edu>
2
afea8a8a
PE
3 Move pid_t related decls out of lisp.h.
4 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
5 (interruptible_wait_for_termination):
6 Move these decls from lisp.h to syswait.h, since they use pid_t.
7 Needed on FreeBSD; see Herbert J. Skuhra in
8 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
9 * callproc.c: Include syswait.h.
10
18e27ea8
PE
11 gnutls.c, gtkutil.c: Use bool for boolean.
12 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
13 (emacs_gnutls_handle_error):
14 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
15 (xg_hide_tooltip, xg_create_frame_widgets)
16 (create_dialog, xg_uses_old_file_dialog)
17 (xg_get_file_with_chooser, xg_get_file_with_selection)
18 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
19 (xg_item_label_same_p, xg_update_menubar)
20 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
21 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
22 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
23 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
24 (update_frame_tool_bar, free_frame_tool_bar):
25 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
26 * nsmenu.m (ns_update_menubar):
27 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
28 * xfns.c (Fx_show_tip) [USE_GTK]:
29 Use bool for boolean.
30 * gtkutil.c (xg_update_frame_menubar):
31 * xmenu.c (update_frame_menubar):
32 Return void, not int, since caller ignores return value.
33 * gtkutil.c (xg_change_toolbar_position):
34 Return void, not 1.
35
af0e9f75
JB
362012-09-23 Juanma Barranquero <lekktu@gmail.com>
37
38 * makefile.w32-in (BLOCKINPUT_H): Remove.
39 (SYSSIGNAL_H): New macro.
40 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
41 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
42 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
43 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
44 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
45 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
46 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
47 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
48 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
49 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
50 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
51 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
52 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
53 ($(BLD)/w32xfns.$(O)): Update dependencies.
54
5101529e
EZ
552012-09-23 Eli Zaretskii <eliz@gnu.org>
56
57 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
58 fatal_error_backtrace.
59
60 * w32proc.c (sys_kill): Undo last change: don't do anything when
61 invoked to deliver SIGABRT to our own process. This is now
62 handled by emacs_raise.
63
2c3ee0ad
JB
642012-09-23 Juanma Barranquero <lekktu@gmail.com>
65
66 * w32term.c (w32_read_socket): Remove leftover reference to
67 interrupt_input_pending.
68
62a1d661
PE
692012-09-23 Paul Eggert <eggert@cs.ucla.edu>
70
71 Do not use SA_NODEFER.
72 Problem reported by Dani Moncayo in
73 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
74 * alloc.c (die):
75 * sysdep.c (emacs_abort): Do not reset signal handler.
76 * emacs.c (terminate_due_to_signal): Reset signal handler here.
77 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
78 wanted even on POSIXish hosts, and it doesn't work on Windows.
79
a0942b9a
JD
802012-09-23 Jan Djärv <jan.h.d@swipnet.se>
81
82 * xterm.c (x_term_init): Call fixup_locale before and after calling
83 gtk_init (Bug#12392).
84
d07ff9db
CY
852012-09-23 Chong Yidong <cyd@gnu.org>
86
87 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
88 Vdynamic_library_alist.
89
90 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
91 (Fgnutls_available_p): Caller changed.
92
93 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
94 (Flibxml_parse_xml_region): Likewise.
95
96 * dispextern.h (struct image_type): Remove arg from init function.
97
98 * image.c (Finit_image_library, lookup_image_type)
99 (define_image_type): Remove now-unneeded second arg.
100 (init_xpm_functions, init_png_functions, init_jpeg_functions)
101 (init_tiff_functions, init_gif_functions, init_svg_functions):
102 Arglist and w32_delayed_load calling convention changed.
103 (gs_type): Remove init_gs_functions; there is no such function.
641cfd14 104 (valid_image_p, make_image): Fix caller to lookup_image_type.
d07ff9db 105
4d7e6e51
PE
1062012-09-23 Paul Eggert <eggert@cs.ucla.edu>
107
108 Simplify and avoid signal-handling races (Bug#12471).
109 * alloc.c (die):
110 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
111 Avoid recursive loop if there's a fatal error in the function itself.
112 * atimer.c (pending_atimers):
113 * blockinput.h: Don't include "atimer.h"; no longer needed.
114 (interrupt_input_pending): Remove. All uses removed.
115 pending_signals now counts both atimers and ordinary interrupts.
116 This is less racy than having three separate pending-signal flags.
117 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
118 (input_blocked_p):
119 Rename from their upper-case counterparts BLOCK_INPUT,
120 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
121 INPUT_BLOCKED_P, and turn into functions. All uses changed.
122 This makes it easier to access volatile variables more accurately.
123 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
124 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
125 that's more reliable if the code is buggy and sets
126 interrupt_input_blocked to a negative value. All uses changed.
127 * atimer.c (deliver_alarm_signal):
128 Remove. No need to deliver this to the parent; any thread can
129 handle this signal now. All uses replaced by underlying handler.
130 * atimer.c (turn_on_atimers):
131 * dispnew.c (handle_window_change_signal):
132 * emacs.c (handle_danger_signal):
133 * keyboard.c (kbd_buffer_get_event):
134 Don't reestablish signal handler; not needed with sigaction.
135 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
136 (UNBLOCK_INPUT_TO):
137 Rework to avoid unnecessary accesses to volatile variables.
138 (UNBLOCK_INPUT_TO): Now a function.
139 (totally_unblock_input, unblock_input): New decls.
140 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
141 (init_data): Remove. Necessary stuff now done in init_signal.
142 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
143 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
144 (fatal_error_code): Remove; no longer needed.
145 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
146 it doesn't always backtrace. All uses changed. No need to reset
147 signal to default, since sigaction and/or die does that for us now.
148 Use emacs_raise (FOO), not kill (getpid (), FOO).
149 (main): Check more-accurately whether we're dumping.
150 Move fatal-error setup to sysdep.c
151 * floatfns.c: Do not include "syssignal.h"; no longer needed.
152 * gtkutil.c (xg_get_file_name, xg_get_font):
153 Remove no-longer-needed signal-mask manipulation.
154 * keyboard.c, process.c (POLL_FOR_INPUT):
155 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
156 * keyboard.c (read_avail_input): Remove.
157 All uses replaced by gobble_input.
158 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
159 (kbd_buffer_store_event_hold, gobble_input):
160 (record_asynch_buffer_change) [USABLE_SIGIO]:
161 (store_user_signal_events):
162 No need to mess with signal mask.
163 (gobble_input): If blocking input and there are terminals, simply
164 set pending_signals to 1 and return. All hooks changed to not
165 worry about whether input is blocked.
166 (process_pending_signals): Clear pending_signals before processing
167 them, in case a signal comes in while we're processing.
168 By convention callers now test pending_signals before calling us.
169 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
170 New functions, to support changes to blockinput.h.
171 (handle_input_available_signal): Now extern.
172 (reinvoke_input_signal): Remove. All uses replaced by
173 handle_async_input.
174 (quit_count): Now volatile, since a signal handler uses it.
175 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg. All
176 callers changed. Block SIGINT only if not already blocked.
177 Clear sigmask reliably, even if Fsignal returns, which it can.
178 Omit unnecessary accesses to volatile var.
179 (quit_throw_to_read_char): No need to restore sigmask.
180 * keyboard.c (gobble_input, handle_user_signal):
181 * process.c (wait_reading_process_output):
182 Call signal-handling code rather than killing ourselves.
183 * lisp.h: Include <float.h>, for...
184 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
185 (pending_signals): Now volatile.
186 (syms_of_data): Now const if IEEE floating point.
187 (handle_input_available_signal) [USABLE_SIGIO]:
188 (terminate_due_to_signal, record_child_status_change): New decls.
189 * process.c (create_process): Avoid disaster if memory is exhausted
190 while we're processing a vfork, by tightening the critical section
191 around the vfork.
192 (send_process_frame, process_sent_to, handle_pipe_signal)
193 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
194 ignores SIGPIPE.
195 (send_process): No need for setjmp/longjmp any more, since the
196 SIGPIPE stuff is now gone. Instead, report an error if errno
197 is EPIPE.
198 (record_child_status_change): Now extern. PID and W are now args.
199 Return void, not bool. All callers changed.
200 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
201 Remove. All uses removed. This bug should be fixed now in a
202 different way.
203 (wait_for_termination_1): Use waitpid rather than sigsuspend,
204 and record the child status change directly. This avoids the
205 need to futz with the signal mask.
206 (process_fatal_action): Move here from emacs.c.
207 (emacs_sigaction_flags): New function, containing
208 much of what used to be in emacs_sigaction_init.
209 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
210 caught by emacs, to make races less likely.
211 (deliver_process_signal): Rename from handle_on_main_thread.
212 All uses changed.
213 (BACKTRACE_LIMIT_MAX): Now at top level.
214 (thread_backtrace_buffer, threadback_backtrace_pointers):
215 New static vars.
216 (deliver_thread_signal, deliver_fatal_thread_signal):
217 New functions, for more-accurate delivery of thread-specific signals.
218 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
219 (deliver_arith_signal): Handle in this thread, not
220 in the main thread, since it's triggered by this thread.
221 (maybe_fatal_sig): New function.
222 (init_signals): New arg DUMPING so that we can be more accurate
223 about whether we're dumping. Caller changed.
224 Treat thread-specific signals differently from process-general signals.
225 Block all signals while handling fatal error; that's safer.
226 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
227 on IEEE hosts.
228 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
229 Ignore SIGPIPE unless batch.
230 (emacs_backtrace): Output backtrace for the appropriate thread,
231 which is not necessarily the main thread.
232 * syssignal.h: Include <stdbool.h>.
233 (emacs_raise): New macro.
234 * xterm.c (x_connection_signal): Remove; no longer needed
235 now that we use sigaction.
236 (x_connection_closed): No need to mess with sigmask now.
237 (x_initialize): No need to reset SIGPIPE handler here, since
238 init_signals does this for us now.
239
8f4635e9
JD
2402012-09-23 Jan Djärv <jan.h.d@swipnet.se>
241
242 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
243 background rect may be larger (Bug#12445).
244
3296976d
CY
2452012-09-23 Chong Yidong <cyd@gnu.org>
246
247 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
248
d41e491e
PE
2492012-09-22 Paul Eggert <eggert@cs.ucla.edu>
250
251 * .gdbinit: Just stop at fatal_error_backtrace.
252 See Stefan Monnier's request in
253 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
254 Remove no-longer-used query of system type.
255
c88b867f
CY
2562012-09-22 Chong Yidong <cyd@gnu.org>
257
258 * search.c (Freplace_match): Doc fix (Bug#12325).
259
260 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
261
262 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
263 (Fline_end_position): Doc fix.
264
265 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
266
bb4d86b4
CY
2672012-09-22 Chong Yidong <cyd@gnu.org>
268
269 * dispextern.h (struct image_type): Add new slot, storing a type
270 initialization function.
271
272 * image.c (define_image_type): Call the image initializer function
273 if it is defined. Arguments and return value changed.
274 (valid_image_p, make_image): Callers changed.
275 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
276 (gif_type, imagemagick_type, svg_type, gs_type): Add
277 initialization functions.
278 (Finit_image_library): Call lookup_image_type.
279 (CHECK_LIB_AVAILABLE): Macro deleted.
280 (lookup_image_type): Call define_image_type here, rather than via
281 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
282 (syms_of_image): Move define_image_type calls for xbm_type and
283 pbm_type to lookup_image_type.
284
df9685f3
EZ
2852012-09-22 Eli Zaretskii <eliz@gnu.org>
286
287 * keyboard.c (timer_check_2): Move calculation of 'timers' and
288 'idle_timers' from here ...
289 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
290 lists, to avoid infloops when the timer does something stupid,
291 like reinvoke itself with the same or smaller time-out.
292 (Bug#12447)
293
8e17c9ba
MR
2942012-09-22 Martin Rudalics <rudalics@gmx.at>
295
296 * window.c (Fsplit_window_internal): Handle only Qt value of
297 Vwindow_combination_limit separately.
298 (Qtemp_buffer_resize): New symbol.
299 (Vwindow_combination_limit): New default value. Rewrite
300 doc-string.
301
589bd69b
EZ
3022012-09-22 Eli Zaretskii <eliz@gnu.org>
303
304 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
305 the new overlay string. (Bug#10159)
306
01108e3f
PE
3072012-09-22 Paul Eggert <eggert@cs.ucla.edu>
308
309 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
310 or that fprintf is async-signal-safe. POSIX doesn't require
311 either assumption.
312
82f8cd94
CY
3132012-09-22 Chong Yidong <cyd@gnu.org>
314
315 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
316 (Bug#8207).
317
3cccbd87
KH
3182012-09-22 Kenichi Handa <handa@gnu.org>
319
320 * composite.c (composition_reseat_it): Handle the case that a
321 grapheme cluster is not covered by a single font (Bug#12352).
322
09c01941
CY
3232012-09-21 Chong Yidong <cyd@gnu.org>
324
325 * image.c (define_image_type): Avoid adding duplicate types to
326 image_types (Bug#12463). Suggested by Jörg Walter.
327
acfa068f 3282012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
e25c1a30
YM
329
330 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
331 (print_load_command_name): Add case LC_DATA_IN_CODE.
332 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
333
acfa068f 3342012-09-21 Glenn Morris <rgm@gnu.org>
1e9bbf47
GM
335
336 * eval.c (Frun_hook_with_args_until_success)
337 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
338
acfa068f 3392012-09-21 Andreas Schwab <schwab@linux-m68k.org>
c6ba4138
AS
340
341 * fileio.c (Ffile_selinux_context): Only call freecon when
342 lgetfilecon succeeded.
343 (Fset_file_selinux_context): Likewise. (Bug#12444)
344
acfa068f 3452012-09-21 Eli Zaretskii <eliz@gnu.org>
aa36e4d2
EZ
346
347 * xdisp.c (try_window_reusing_current_matrix): Under bidi
348 reordering, locate the cursor by calling set_cursor_from_row; if
349 that fails, clear the desired glyph matrix before returning a
350 failure indication to the caller. Fixes leaving garbled display
351 when fast scrolling with a down-key. (Bug#12403)
f2016bea
EZ
352 (compute_stop_pos_backwards): Fix a typo that caused crashes while
353 scrolling through multibyte text.
aa36e4d2 354
e99f70c8
SM
3552012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
356
357 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
358 calling mark_vectorlike since that's the one that marks the window.
359 (mark_discard_killed_buffers): Mark the final cdr.
360 * window.h (struct window): Move prev/next_buffers to the
361 non-standard fields.
362 * window.c (make_window): Initialize prev/next_buffers manually.
363
f75beb47
PE
3642012-09-20 Paul Eggert <eggert@cs.ucla.edu>
365
366 Omit unused arg EXPECTED from socket hooks.
367 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
368 * nsterm.m (ns_term_init):
369 * termhooks.h (struct terminal.read_socket_hook):
370 * w32inevt.c (w32_console_read_socket):
371 * w32term.c (w32_read_socket):
372 * xterm.c (XTread_socket):
373 Omit unused arg EXPECTED. All callers changed.
374 (store_user_signal_events): Return void, not int, since callers no
375 longer care about the return value. All uses changed.
376
b019b76a
JB
3772012-09-20 Juanma Barranquero <lekktu@gmail.com>
378
379 * w32gui.h (XParseGeometry): Do not declare.
380
05642592
PE
3812012-09-19 Paul Eggert <eggert@cs.ucla.edu>
382
e4bce92a
PE
383 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
384 Ignore 'expected'. See Eli Zaretskii in
385 <http://bugs.gnu.org/12471#8> (last line).
386
05642592
PE
387 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
388 (XParseGeometry): Now static. Substitute extremal values for
389 values that are out of range.
390
e543ae91
JD
3912012-09-19 Jan Djärv <jan.h.d@swipnet.se>
392
393 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
394
395 * nsfns.m (XParseGeometry): Remove.
396 (Fx_create_frame): Call x_set_offset to correctly interpret
397 top_pos in geometry.
398
399 * frame.c (read_integer, XParseGeometry): Moved from w32xfns.c.
400 (Fx_parse_geometry): If there is a space in string, call
401 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
402
45ba16c7
EZ
4032012-09-17 Eli Zaretskii <eliz@gnu.org>
404
c8b9f1bc
EZ
405 * search.c (scan_buffer): Use character positions in calls to
406 region_cache_forward and region_cache_backward, not byte
407 positions. (Bug#12196)
408
b4c932a2
EZ
409 * w32term.c (w32_read_socket): Set pending_signals to 1, like
410 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
411
45ba16c7
EZ
412 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
413 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
414 emacs_blocked_malloc, now deleted.
415
eeceac93
PE
4162012-09-17 Paul Eggert <eggert@cs.ucla.edu>
417
418 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
419 The workaround was for improving performance on Solaris 2.4, but
420 is getting in the way now. Emacs will still work if someone is
421 still running Solaris 2.4 in a museum somewhere; Sun dropped
422 support for Solaris 2.4 in 2003.
423 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
424 * process.c (create_process) [HAVE_WORKING_VFORK]:
425 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
426 since Emacs no longer uses vfork on that platform.
427
78f83752
GM
4282012-09-17 Glenn Morris <rgm@gnu.org>
429
430 * emacs.c: Use COPYRIGHT.
431
634b8cac
PE
4322012-09-16 Paul Eggert <eggert@cs.ucla.edu>
433
0caaedb1
PE
434 Remove configure's --without-sync-input option (Bug#12450).
435 When auditing signal-handling in preparation for cleaning it up,
436 I found that SYNC_INPUT has race conditions and would be a real
437 pain to fix. Since it's an undocumented and deprecated
438 configure-time option, now seems like a good time to remove it.
439 Also see <http://bugs.gnu.org/11080#16>.
440 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
441 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
442 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
443 (malloc_hysteresis):
444 (check_depth) [XMALLOC_OVERRUN_CHECK]:
445 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
446 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
447 (dont_register_blocks, bytes_used_when_reconsidered)
448 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
449 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
450 [!SYSTEM_MALLOC && !SYNC_INPUT]:
451 Remove. All uses removed.
452 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
453 implementation, one that depends on whether the new macro
454 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
455 is defined.
456 * atimer.c (run_timers, handle_alarm_signal):
457 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
458 (handle_async_input, process_pending_signals)
459 (handle_input_available_signal, init_keyboard):
460 * nsterm.m (ns_read_socket):
461 * process.c (wait_reading_process_output):
462 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
463 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
464 (emacs_write):
465 * xterm.c (XTread_socket):
466 Assume SYNC_INPUT.
467 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
468 * eval.c (handling_signal): Remove. All uses removed.
469 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
470 All uses replaced with the SYNC_INPUT version.
471 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
472 Remove decls.
473 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
474 Now static.
475
634b8cac
PE
476 * font.c (Ffont_shape_gstring): Remove unused local.
477
83da1b55
GM
4782012-09-16 Glenn Morris <rgm@gnu.org>
479
518650a5
GM
480 * Makefile.in (clean): No longer run nextstep's clean.
481
83da1b55
GM
482 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
483 (ns_frag): Remove.
484 (ns-app): Move here from ns.mk, and simplify.
485 (clean): Simplify nextstep entry.
486 * ns.mk: Remove file.
487
85a43e2e
KH
4882012-09-17 Kenichi Handa <handa@gnu.org>
489
490 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
491 not covert the last few charactes.
492
ba13e616 4932012-09-16 Kenichi Handa <handa@gnu.org>
ea964864
KH
494
495 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
496 here, but just check the validity of glyphs in the glyph-string.
497
a8c729af
MR
4982012-09-16 Martin Rudalics <rudalics@gmx.at>
499
500 * window.c (Fwindow_parameter, Fset_window_parameter): Accept
501 any window as argument (Bug#12452).
502
c077c059
JD
5032012-09-16 Jan Djärv <jan.h.d@swipnet.se>
504
505 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
506 to ns_term_init to avoid memory leak.
507
508 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
509 explicit retain/release.
510 (ns_term_init): Only allow one display. Initialize outerpool and
511 ns_*_types.
512
39a57ad0
PE
5132012-09-15 Paul Eggert <eggert@cs.ucla.edu>
514
515 Port _setjmp fix to POSIXish hosts as well as Microsoft.
516 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
517 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
518 the Microsoft problem in a different way, by altering ../nt/config.nt.
519
7105c8cb
EZ
5202012-09-15 Eli Zaretskii <eliz@gnu.org>
521
522 * w32xfns.c:
523 * w32uniscribe.c:
524 * w32term.c:
525 * w32select.c:
526 * w32reg.c:
527 * w32proc.c:
528 * w32menu.c:
529 * w32inevt.c:
530 * w32heap.c:
531 * w32font.c:
532 * w32fns.c:
533 * w32console.c:
534 * w32.c:
535 * w16select.c: Remove inclusion of setjmp.h, as it is now included
536 by lisp.h. This completes removal of setjmp.h inclusion
537 erroneously announced in the previous commit. (Bug#12446)
538
539 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
540 more accurate.
541
542 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
543 not defined as a macro. The latter happens on MS-Windows.
544 (Bug#12446)
545
0328b6de
PE
5462012-09-15 Paul Eggert <eggert@cs.ucla.edu>
547
548 Port better to POSIX hosts lacking _setjmp (Bug#12446).
549 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
7105c8cb 550 Some instances of '#include <setjmp.h>' removed, if the
0328b6de
PE
551 only reason for the instance was because "lisp.h" was included.
552 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
553 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
554 and _longjmp with the new symbols. Emacs already uses _setjmp if
555 available, so this change affects only POSIXish hosts that have
556 sigsetjmp but not _setjmp, such as some versions of Solaris and
557 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
558 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
559 (png_load_body) [HAVE_PNG]:
560 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
561 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
562 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
563 since PNG requires jmp_buf. This is the only exception to the
564 general rule that we now use sys_setjmp and sys_longjmp.
565 This exception is OK since this code does not change the signal
566 mask or longjmp out of a signal handler.
567
2af03429
PE
5682012-09-14 Paul Eggert <eggert@cs.ucla.edu>
569
570 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
571 Include "syssignal.h", for 'main_thread'.
572
2f294edf
DA
5732012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
574
575 Avoid out-of-range marker position (Bug#12426).
576 * insdel.c (replace_range, replace_range_2): Adjust
577 markers before overlays, as suggested by comments.
578 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
579 Remove redundant check before calling offset_intervals.
580
6b533e9c
MR
5812012-09-14 Martin Rudalics <rudalics@gmx.at>
582
583 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
584 current buffer (Bug#12387).
585
2a7931e3
JB
5862012-09-14 Juanma Barranquero <lekktu@gmail.com>
587
588 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
589
c18e885b
PE
5902012-09-13 Paul Eggert <eggert@cs.ucla.edu>
591
592 Use a more backwards-compatible timer format (Bug#12430).
593 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
594 vector element, not from the 4th, since PSECS is now at the end.
595 (Fcurrent_idle_time): Doc fix.
596
d59a1afb
DA
5972012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
598
599 Function to mark objects and remove killed buffers at once.
600 * alloc.c (discard_killed_buffers): Rename to ...
601 (mark_discard_killed buffers) ... new name. Add marking
602 of remaining objects. Fix comment. Adjust users.
603 (mark_object): Do not touch frame buffer lists here.
604 * frame.c (delete_frame): Reset frame buffer lists here.
605
5f0cb45a
PE
6062012-09-13 Paul Eggert <eggert@cs.ucla.edu>
607
8ea47e3a
PE
608 Better workaround for GNOME bug when --enable-gcc-warnings.
609 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
610 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
611 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
612
4a4bbad2
PE
613 Simplify SIGIO usage (Bug#12408).
614 The code that dealt with SIGIO was crufty and confusing, e.g., it
615 played tricks like "#undef SIGIO" but these tricks were not used
616 consistently. Simplify mostly by not #undeffing standard symbols,
617 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
618 or not as we please) rather than "defined SIGIO" (standard symbol
619 that we probably shouldn't #undef).
620 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
621 Modules that need it can include it.
622 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
623 * dispextern.h (ignore_sigio): New decl.
624 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
625 unconditionally, since it's now a no-op if !USABLE_SIGIO.
626 * emacs.c (shut_down_emacs):
627 * keyboard.c (kbd_buffer_store_event_hold):
628 Use ignore_sigio rather than invoking 'signal' directly.
629 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
630 for FIONREAD.
631 (FIONREAD, SIGIO): Do not #undef.
632 (tty_read_avail_input): Use #error rather than a syntax error.
633 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
634 for I_PIPE, used by SETUP_SLAVE_PTY.
635 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
636 * sysdep.c (croak): Remove; no longer needed. This bit of
637 temporary code, with Fred N. Fish's comment that it's temporary,
638 has been in Emacs since at least 1992!
639 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
640 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
641 * syssignal.h (croak): Remove decl.
642 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
643 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
644 now that we're termios-only.
645 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
646 * term.c (dissociate_if_controlling_tty): Use #error rather than
647 a run-time error.
648
5f0cb45a
PE
649 Work around GCC and GNOME bugs when --enable-gcc-warnings.
650 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
651 to work around GNOME bug 683906.
652 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
653 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
654 This works around GCC bug 54561.
655
40bce90b
PE
6562012-09-12 Paul Eggert <eggert@cs.ucla.edu>
657
658 More fixes for 'volatile' and setjmp/longjmp.
659 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
660 * image.c (struct png_load_context) [HAVE_PNG]: New type.
661 (png_load_body) [HAVE_PNG]:
662 (jpeg_load_body) [HAVE_JPEG]:
663 New function, with most of the old parent function's body.
664 (png_load) [HAVE_PNG]:
665 (jpeg_load) [HAVE_JPEG]:
666 Invoke the new function, to avoid longjmp munging our locals.
667 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
668 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
669 longjmp is passed 2, as the C standard doesn't guarantee this.
670 Instead, store the failure code into mgr->failure_code.
671
bfeae2cf
SM
6722012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
673
674 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
675 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
676 (syms_of_keyboard): Remove support for unread-command-char.
677
8099e36b
EZ
6782012-09-12 Eli Zaretskii <eliz@gnu.org>
679
680 * w32proc.c (sys_kill): If PID is our process ID and the signal is
681 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
682 violation. (Bug#12426)
683
92547ff9
PE
6842012-09-12 Paul Eggert <eggert@cs.ucla.edu>
685
686 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
687
45b82ad0
SM
6882012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
689
690 * eval.c: Add `inhibit-debugger'.
691 (Qinhibit_debugger): New symbol.
692 (call_debugger): Bind it instead of Qdebug_on_error.
693 (maybe_call_debugger): Test Vinhibit_debugger.
694 (syms_of_eval): Define inhibit-debugger.
695 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
696 (syms_of_xdisp): Remove inhibit-debug-on-message.
697
5779a1dc
PE
6982012-09-11 Paul Eggert <eggert@cs.ucla.edu>
699
50f2e553
PE
700 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
701 If a nonvolatile local variable is written before a _longjmp to
702 the frame containing the variable, and is read after the _longjmp,
703 the value read is indeterminate. Some local variables of type
704 'struct handler' and 'struct catchtag' are used in this way, so
705 mark each of their slots as volatile if the slot can be set before
706 _longjmp and read afterwards.
707 * lisp.h (struct handler): var and chosen_clause are now volatile.
708 (struct catchtag): val, next, and pdlcount are now volatile.
709
ae1d87e2
PE
710 * bidi.c (bidi_push_it, bidi_pop_it):
711 * fns.c (copy_hash_table):
712 * image.c (define_image_type):
713 * keyboard.c (kbd_buffer_store_event_hold):
714 * process.c (Fprocess_send_eof):
715 * xfaces.c (x_create_gc) [HAVE_NS]:
716 * xgselect.c (xg_select):
717 Prefer assignment to memcpy when either will do.
718
5779a1dc
PE
719 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
720 Use pointer-to-a-pointer to simplify and avoid a NILP check each
721 time an item is removed. No need to mark this function 'inline';
722 the compiler knows better than we do.
723
c4c9756b
JD
7242012-09-11 Jan Djärv <jan.h.d@swipnet.se>
725
726 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
727 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
728 to change_frame_size (Bug#12388).
729 (windowDidResize:): Pass YES to updateFrameSize.
730
731 * nsterm.h: Add delay parameter to updateFrameSize.
732
d73e321c
DA
7332012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
734
735 Discard killed buffers from deleted window and frame objects.
736 This reduces an amount of references to killed buffers and
737 helps GC to reclaim them faster.
738 * alloc.c (discard_killed_buffers): New function.
739 (mark_object): Use it for deleted windows and frames.
740 (mark_object): If symbol's value is set up for a killed buffer
741 or deleted frame, restore it's global binding.
742 * data.c (swap_in_global_binding): Add GC notice.
743 (swap_in_symval_forwarding): Use convenient set_blv_where.
744 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
745 * window.h: ... to here.
746
e578f381
DA
7472012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
748
749 Convenient macro to check whether the buffer is live.
750 * buffer.h (BUFFER_LIVE_P): New macro.
751 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
752 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
753
3057e615
YM
7542012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
755
756 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
757 composition cases (Bug#12364).
758
759 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
760 overhang of succeeding glyphs overlapping box cursor.
761
762 * w32term.c (x_draw_glyph_string): Likewise.
763
6fda35f2
PE
7642012-09-11 Paul Eggert <eggert@cs.ucla.edu>
765
c990426a
PE
766 Simplify, document, and port floating-point (Bug#12381).
767 The porting part of this patch fixes bugs on non-IEEE platforms
768 with frexp, ldexp, logb.
769 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
770 Now static.
771 * floatfns.c: Simplify discussion of functions that Emacs doesn't
772 support, by removing commented-out code and briefly listing the
773 C89 functions excluded. The commented-out stuff was confusing
774 maintenance, e.g., we thought we needed cbrt but it was commented out.
775 (logb): Remove decl; no longer needed.
776 (isfinite): New macro, if not already supplied.
777 (isnan): Don't replace any existing macro.
778 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
779 are present on all C89 platforms.
780 (Ffrexp): Do not special-case zero, as frexp does the right thing
781 for that case.
782 (Flogb): Do not use logb, as it doesn't have the desired meaning
783 on hosts that use non-base-2 floating point. Instead, stick with
784 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
785 frexp, to avoid getting an unspecified result.
786
6fda35f2
PE
787 * xdisp.c (Qinhibit_debug_on_message): Now static.
788
16130a58
JD
7892012-09-10 Jan Djärv <jan.h.d@swipnet.se>
790
791 * nsterm.m (ns_update_begin): Set clip path to whole view by using
792 NSBezierPath (Bug#12131).
793
d105a573
CY
7942012-09-10 Chong Yidong <cyd@gnu.org>
795
796 * fns.c (Fdelq, Fdelete): Doc fix.
797
ff55dfe8
PE
7982012-09-10 Paul Eggert <eggert@cs.ucla.edu>
799
800 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
801 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
802
e7032e7c
SM
8032012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
804
805 * lisp.h (make_lisp_ptr): New macro to replace XSET.
806 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
807 Use it.
808
e9957956
EZ
8092012-09-09 Eli Zaretskii <eliz@gnu.org>
810
aba05ce9
EZ
811 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
812 left fringe if the window has a left margin. This avoids leaving
813 traces of the cursor because its leftmost pixel is not drawn over.
814
e9957956
EZ
815 * dispnew.c (update_window_line): When the left margin area of a
816 screen line is updated, set the redraw_fringe_bitmaps_p flag of
817 that screen line. (Bug#12277)
818
f6196b87
PE
8192012-09-09 Paul Eggert <eggert@cs.ucla.edu>
820
821 Assume C89 or later for math functions (Bug#12381).
822 This simplifies the code, and makes it a bit smaller and faster,
823 and (most important) makes it easier to clean up signal handling
824 since we can stop worring about floating-point exceptions in
825 library code. That was a problem before C89, but the problem
826 went away many years ago on all practical Emacs targets.
827 * data.c, image.c, lread.c, print.c:
828 Don't include <math.h>; no longer needed.
829 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
830 might be autoconfigured, as that never happens.
831 * data.c (fmod):
832 * doprnt.c (DBL_MAX_10_EXP):
833 * print.c (DBL_DIG):
834 Remove. C89 or later always defines these.
835 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
836 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
837 (arith_error, domain_error, domain_error2):
838 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
839 no longer needed -- we simply return what C returns. All uses removed.
840 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
841 the wrapped code.
842 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
843 Remove. All uses expanded, as these macros are no longer used
844 more than once and are now more trouble than they're worth.
845 (Ftan): Use tan, not sin / cos.
846 (Flogb): Assume C89 frexp.
847 (fmod_float): Assume C89 fmod.
848 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
849 (init_floatfns): Remove. All uses removed.
850
9d7f1863
JD
8512012-09-08 Jan Djärv <jan.h.d@swipnet.se>
852
853 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
854 compositeToPoint for OSX < 10.6 (Bug#12390).
855
eabf0404
PE
8562012-09-08 Paul Eggert <eggert@cs.ucla.edu>
857
858 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
859 This produces more-accurate results.
860
0b3b1d23
JD
8612012-09-08 Jan Djärv <jan.h.d@swipnet.se>
862
863 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
864 changes (Bug#12088).
865
6dcef6ec
CY
8662012-09-08 Chong Yidong <cyd@gnu.org>
867
868 * syntax.c (Fstring_to_syntax): Doc fix.
869
aa7d57c5
JD
8702012-09-08 Jan Djärv <jan.h.d@swipnet.se>
871
872 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
873 in the internal border.
874 (x_set_window_size): Remove static variables and their usage.
875 (ns_redraw_scroll_bars): Fix NSTRACE arg.
876 (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
877 fringe/internal border adjustment (Bug#11052).
878 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
879 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
880 (ns_fix_rect_ibw): Remove.
881 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
882 (ns_dumpglyphs_box_or_relief): Ditto.
883 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
884 adjustment.
885 (ns_dumpglyphs_image): Ditto.
fc0c31f8 886 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
aa7d57c5
JD
887 border adjustment.
888 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
889 their usage. Add fringe_extended_p and its use as in other terms.
890 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
891 scroll bar was removed.
892 (updateFrameSize): New function.
893 (windowDidResize): Move code to updateFrameSize and call it.
894
895 * nsterm.h (EmacsView): Add updateFrameSize.
896
1a5432bc
CY
8972012-09-07 Chong Yidong <cyd@gnu.org>
898
b4f5313e
CY
899 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
900
1a5432bc
CY
901 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
902
1a4f1e9b
PE
9032012-09-07 Paul Eggert <eggert@cs.ucla.edu>
904
905 More signal-handler cleanup (Bug#12327).
eddb36a7
PE
906 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
907 Problem introduced when merging patches. Noted by Eli Zaretskii in
908 <http://bugs.gnu.org/12327#67>.
1a4f1e9b
PE
909 * floatfns.c: Comment fix.
910 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
911 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
912 and anyway the declaration is harmless even if SIGDANGER is not defined.
913 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
914 defined BROKEN_FIONREAD). systty.h formerly did this, but other
915 source files not surprisingly expected syssignal.h to define, or
916 not define, SIGIO, and it's cleaner to do it that way, for consistency.
917 Include <sys/ioctl.h>, for FIONREAD.
918 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
919 This eliminates a problem whereby other files mysteriously had
920 to include "syssignal.h" before including "systty.h" if they
921 wanted to use "#ifdef SIGIO".
922
bc8000ff
EZ
9232012-09-07 Eli Zaretskii <eliz@gnu.org>
924
3e6d6928
EZ
925 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
926
927 * w32.c (sigemptyset): Empty the set.
928 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
929
bc8000ff
EZ
930 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
931
b4fa72f2
DA
9322012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
933
934 * alloc.c (mark_buffer): Revert unsafe marking optimization.
935 (mark_object): Likewise for frame objects.
936
30730c93
PE
9372012-09-07 Paul Eggert <eggert@cs.ucla.edu>
938
939 * syssignal.h (handle_on_main_thread): Always declare,
940 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
941 This ports to platforms without HAVE_PTHREAD.
942
2fe28299
PE
9432012-09-06 Paul Eggert <eggert@cs.ucla.edu>
944
945 Signal-handler cleanup (Bug#12327).
946 Emacs's signal handlers were written in the old 4.2BSD style with
947 sigblock and sigmask and so forth, and this led to some
948 inefficiencies and confusion. Rewrite these to use
949 pthread_sigmask etc. without copying signal sets around. Also,
950 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
951 'signal', and instead use functions that do not attempt to take
952 over the system name space. This patch causes Emacs's text
953 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
954 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
955 Do not include <signal.h> or "syssignal.h", as these
956 modules do not use signals.
957 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
958 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
959 Do not include <signal.h>, as "syssignal.h" does that for us now.
960 * atimer.c (sigmask_atimers): New function.
961 (block_atimers, unblock_atimers): New functions,
962 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
963 All uses replaced.
964 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
965 no longer needed here.
966 * emacs.c (main): Inspect existing signal handler with sigaction,
fc0c31f8 967 so that there's no need to block and unblock SIGHUP.
2fe28299
PE
968 * sysdep.c (struct save_signal): New member 'action', replacing
969 old member 'handler'.
970 (save_signal_handlers, restore_signal_handlers):
971 Use sigaction instead of 'signal' to save and restore.
972 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
973 New function. All users of 'signal' modified to use set_sighandler
974 if they're writeonly, and to use sys_signal if they're read+write.
975 (emacs_sigaction_init, forwarded_signal): New functions.
976 (sys_signal): Remove. All uses replaced by calls to sigaction
977 and emacs_sigaction_init, or by direct calls to 'signal'.
978 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
979 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
980 all uses replaced by pthread_sigmask etc. calls.
981 * syssignal.h: Include <signal.h>.
982 (emacs_sigaction_init, forwarded_signal): New decls.
983 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
984 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
985 (sigmask, sys_sigmask): Remove; no longer needed.
986 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
987 (sigblock, sigunblock, sigfree):
988 (sigsetmask) [!defined sigsetmask]:
989 Remove. All uses replaced by pthread_sigmask.
990 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
991 no longer need to be replaced, and its typical old uses
992 are now done via emacs_sigaction_init and sigaction.
993 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
994 (sys_sigdel): Remove; unused.
995 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
996
0216c128
EZ
9972012-09-06 Eli Zaretskii <eliz@gnu.org>
998
999 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
1000 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
1001
c752cfa9
DA
10022012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
1003
1004 Explicitly mark buffer_defaults and buffer_local_symbols.
1005 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
1006 mark_local_symbols here.
1007 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
1008 since special buffers aren't marked here any more.
1009 (allocate_buffer): Chain new buffer with all_buffers here...
1010 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
1011 not here.
1012 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
1013 (syms_of_buffer): Remove staticpro of the above.
1014 (init_buffer_once): Set names for buffer_defaults and
1015 buffer_local_symbols.
1016
a864ef14
PE
10172012-09-06 Paul Eggert <eggert@cs.ucla.edu>
1018
1019 Use bool for booleans in font-related modules.
1020 * font.c (font_intern_prop, font_style_to_value)
1021 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
1022 (generate_otf_features, font_check_otf_features, font_check_otf)
1023 (font_match_p, font_list_entities, font_at):
1024 * fontset.c (fontset_id_valid_p, reorder_font_vector
1025 (fontset_find_font, Fset_fontset_font)
1026 (face_suitable_for_char_p) [0]:
1027 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
1028 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
1029 (m17n_flt_initialized, ftfont_shape_by_flt):
1030 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
1031 * nsfont.m (nsfont_draw):
1032 * w32font.c (w32font_draw):
1033 * w32term.c (x_draw_glyphless_glyph_string_foreground):
1034 Use bool for booleans.
1035 * font.h: Adjust to above API changes.
1036 (struct font, struct font_driver, struct font_driver_list):
1037 Use bool for booleans.
1038 (struct font): Remove useless member encoding_type.
1039 All users removed.
1040 * fontset.c, xftfont.c: Omit unnecessary static decls.
1041
0699fc18
DA
10422012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
1043
1044 * alloc.c (mark_object): Revert window marking code
1045 since it's unsafe for the Fset_window_configuration.
1046
20ef56db
PE
10472012-09-05 Paul Eggert <eggert@cs.ucla.edu>
1048
2fe28299 1049 Fix race conditions with signal handlers and errno (Bug#12327).
20ef56db
PE
1050 Be more systematic about preserving errno whenever a signal
1051 handler returns, even if it's not in the main thread. Do this by
1052 renaming signal handlers to distinguish between signal delivery
1053 and signal handling. All uses changed.
1054 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
1055 * data.c (deliver_arith_signal): Rename from arith_error.
1056 * dispnew.c (deliver_window_change_signal): Rename from
1057 window_change_signal.
1058 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
1059 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
1060 * keyboard.c (deliver_input_available_signal): Rename from
1061 input_available_signal.
1062 (deliver_user_signal): Rename from handle_user_signal.
1063 (deliver_interrupt_signal): Rename from interrupt_signal.
1064 * process.c (deliver_pipe_signal): Rename from send_process_trap.
1065 (deliver_child_signal): Rename from sigchld_handler.
1066 * atimer.c (handle_alarm_signal):
1067 * data.c (handle_arith_signal):
1068 * dispnew.c (handle_window_change_signal):
1069 * emacs.c (handle_fatal_signal, handle_danger_signal):
1070 * keyboard.c (handle_input_available_signal):
1071 * keyboard.c (handle_user_signal, handle_interrupt_signal):
1072 * process.c (handle_pipe_signal, handle_child_signal):
1073 New functions, with the actual signal-handling code taken from the
1074 original respective signal handlers, sans the sporadic attempts to
1075 preserve errno, since that's now done by handle_on_main_thread.
1076 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
1077 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
1078 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1079 Move to sysdep.c.
1080 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1081 Move initialization of main_thread to sysdep.c's init_signals.
1082 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
1083 our usage, and simplifies the mainline code.
1084 (record_child_status_change): New static function, as a helper
1085 for handle_child_signal, and with most of the old child handler's
1086 contents.
1087 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
1088 (handle_child_signal): Use the above.
1089 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1090 Moved here from emacs.c.
1091 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
1092 code moved here from emacs.c's main function.
1093 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
1094 replacing the old SIGNAL_THREAD_CHECK. All uses changed. This
1095 lets callers save and restore errno properly.
1096
e3ccf108
DA
10972012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
1098
1099 Remove redundant or unused things here and there.
1100 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
1101 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
1102 * editfns.c (Fcompare_buffer_substrings): Likewise.
1103 * frame.h (struct terminal, struct font_driver_list):
1104 Remove redundant declarations.
1105 * window.h (Qleft, Qright): Likewise.
1106
697e1e39
DA
11072012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
1108
1109 Do not mark objects from deleted buffers, windows and frames.
1110 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
1111 (mark_object): Likewise for windows and frames.
1112
c1ca42ca
DA
11132012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
1114
1115 * alloc.c (valid_lisp_object_p): Treat killed buffers,
1116 buffer_defaults and buffer_local_symbols as valid objects.
1117 Return special value to denote them.
1118
014d93be
PE
11192012-09-05 Paul Eggert <eggert@cs.ucla.edu>
1120
f75d7a91
PE
1121 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
1122 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
1123 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
1124 (file_name_absolute_p, Fsubstitute_in_file_name):
1125 (check_executable, check_writable, Ffile_accessible_directory_p)
1126 (Fset_file_selinux_context, Fdefault_file_modes)
1127 (Finsert_file_contents, choose_write_coding_system)
1128 (Fwrite_region, build_annotations, a_write, e_write)
1129 (Fdo_auto_save):
1130 * filelock.c (boot_time_initialized, get_boot_time)
1131 (get_boot_time_1, lock_file_1, within_one_second):
1132 * floatfns.c (in_float):
1133 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
1134 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
1135 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
1136 * lisp.h (struct Lisp_Hash_Table.cmpfn):
1137 * window.c (compare_window_configurations):
1138 Use bool for booleans.
1139 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
1140 (Fdefault_file_modes): Now mode_t, not int, for modes.
1141 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
1142 (internal_delete_file): Now returns void, not a (boolean) int,
1143 since nobody was looking at the return value.
1144 * lisp.h, window.h: Adjust to above API changes.
1145
014d93be
PE
1146 * xdisp.c (set_message): Simplify and reindent last change.
1147
776f29e1
JB
11482012-09-05 Juanma Barranquero <lekktu@gmail.com>
1149
1150 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
1151
7f7e0167
LI
11522012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
1153
1154 * eval.c (call_debugger): Make the function non-static so that we
1155 can call it from set_message.
1156
1157 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
1158 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
1159
cf29dd84
PE
11602012-09-04 Paul Eggert <eggert@cs.ucla.edu>
1161
1162 Give more-useful info on a fatal error (Bug#12328).
1163 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
1164 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
1165 of doing the work ourselves.
1166 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
1167 do most of the work.
1168 (fatal_error_backtrace): New function, taken from the guts
1169 of the old fatal_error_signal, but with a new option to output
1170 a backtrace.
1171 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
1172 info about the signal than just its number.
1173 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
1174 * sysdep.c: Include <execinfo.h>
1175 (emacs_backtrace): New function, taken partly from the previous
1176 code of the 'die' function.
1177 (emacs_abort): Call fatal_error_backtrace rather than abort.
1178
972debf2
SM
11792012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
1180
1181 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
1182 eager (load-time) macro-expansion.
1183 * lisp.mk (lisp): Add macroexp.
1184
1088b922
PE
11852012-09-04 Paul Eggert <eggert@cs.ucla.edu>
1186
1187 Simplify redefinition of 'abort' (Bug#12316).
1188 Do not try to redefine the 'abort' function. Instead, redo
1189 the code so that it calls 'emacs_abort' rather than 'abort'.
1190 This removes the need for the NO_ABORT configure-time macro
1191 and makes it easier to change the abort code to do a backtrace.
1192 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
1193 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
1194 Remove; sysdep.c's emacs_abort now takes its place.
1195 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
1196 'abort' changed to use 'emacs_abort'.
1197 * msdos.c (dos_abort) [defined abort]: Remove; not used.
1198 (abort) [!defined abort]: Rename to ...
1199 (emacs_abort): ... new name.
1200 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
1201 the place of the old 'abort' in emacs.c.
1202 * w32.c, w32fns.c (abort): Do not #undef.
1203 * w32.c (emacs_abort): Rename from w32_abort.
1204
30934d33
EZ
12052012-09-04 Eli Zaretskii <eliz@gnu.org>
1206
1207 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
1208 offsets[j].dv, since the y axis of the screen coordinates points
1209 down, while the y axis of the font definition coordinates points
1210 up. This fixes display of Arabic diacritics such as KASRA and
1211 KASRATAN. (Bug#11860)
1212
af26b72c
PE
12132012-09-04 Paul Eggert <eggert@cs.ucla.edu>
1214
1215 Be more systematic about _setjmp vs setjmp.
1216 * alloc.c (test_setjmp, mark_stack):
1217 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
1218 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
1219 (png_load, my_error_exit, jpeg_load):
1220 * process.c (send_process_trap, send_process):
1221 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
1222 The underscored versions are up to 30x faster on some hosts.
1223 Formerly, the code used setjmp+longjmp sometimes and
1224 _setjmp+_longjmp at other times, with no particular reason to
1225 prefer setjmp+longjmp.
1226
26d4541d
PE
12272012-09-03 Paul Eggert <eggert@cs.ucla.edu>
1228
d42f4f0f 1229 Fix minor problem found by static checking.
26d4541d 1230 * buffer.c (Fdelete_all_overlays): Return nil.
26d4541d 1231
c5e28e39
MR
12322012-09-03 Martin Rudalics <rudalics@gmx.at>
1233
1234 * buffer.c (Fdelete_all_overlays): New function.
1235
3eab3ca9
CY
12362012-09-03 Chong Yidong <cyd@gnu.org>
1237
1238 * gtkutil.c: Add extern decl for Qxft.
1239
c04889f8
PE
12402012-09-02 Paul Eggert <eggert@cs.ucla.edu>
1241
1882aa38
PE
1242 * emacs.c, eval.c: Use bool for boolean.
1243 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
1244 (malloc_using_checking) [DOUG_LEA_MALLOC]:
1245 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
1246 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
1247 (main, decode_env_path, Fdaemon_initialized):
1248 * eval.c (call_debugger, Finteractive_p, interactive_p):
1249 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
1250 (maybe_call_debugger, Fbacktrace):
1251 * process.c (read_process_output, exec_sentinel):
1252 Use bool for booleans.
1253 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
1254 All callers changed.
1255 * eval.c (interactive_p): Omit always-true boolean argument
1256 EXCLUDE_SUBRS_P. All callers changed.
1257 * dispextern.h, lisp.h: Reflect above API changes.
1258 * firstfile.c (dummy): Use the address of 'main', whose signature
1259 won't change, instead of the address of 'initialize', whose
1260 signature just changed from int to bool.
1261 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
1262 * msdos.c (fatal_error_in_progress): ... from here.
1263 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
1264 of incrementing it.
1265 (redisplay_internal, unwind_redisplay): Simply clear
1266 REDISPLAYING_P when unwinding, instead of saving its previous,
1267 always-false value and then restoring it.
1268
a411ac43
PE
1269 Clean up some extern decls.
1270 Mostly, this hoists extern decls out of .c files and into .h files.
1271 That way, we're more likely to catch errors if the interfaces change.
1272 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
1273 declare xg_mark_data.
1274 * dispextern.h (x_frame_parm_handlers):
1275 * font.h (Qxft):
1276 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
1277 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
1278 (Qultra_bold, Qoblique, Qitalic):
1279 Move extern decl here from .c file.
1280 * alloc.c (xg_mark_data) [USE_GTK]:
1281 * doc.c (Qclosure):
1282 * eval.c (Qlexical_binding):
1283 * fns.c (time) [!HAVE_UNISTD_H]:
1284 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
1285 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
1286 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
1287 * lread.c (Qinternal_interpreter_environment):
1288 * minibuf.c (Qbuffer):
1289 * process.c (QCfamily, QCfilter):
1290 * widget.c (free_frame_faces):
1291 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
1292 * xfont.c (x_clear_errors):
1293 * xterm.c (x_frame_parm_handlers):
1294 Remove now-redundant extern decls.
1295 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
1296 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
1297 Now static.
1298 * xfaces.c: Remove unnecessary static decls.
1299 * xterm.c (updating_frame): Remove decl of nonexistent object.
1300
c04889f8
PE
1301 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
1302 when building globals.h, as the objects that are not built on
1303 this host are not needed to compile C files on this host.
1304
8b339673
JD
13052012-09-02 Jan Djärv <jan.h.d@swipnet.se>
1306
1307 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
1308
1309 * frame.h: Add missing prototype for x_wm_set_size_hint.
1310
a08d4ba7
PE
13112012-09-02 Paul Eggert <eggert@cs.ucla.edu>
1312
1313 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
1314 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
1315 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
1316 (Fsubstitute_command_keys):
1317 * editfns.c (region_limit, find_field, Fconstrain_to_field)
1318 (save_excursion_save, save_excursion_restore)
1319 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
1320 (format_time_string, general_insert_function)
1321 (make_buffer_string, make_buffer_string_both)
1322 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
1323 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
1324 (copy_text, insert_1, insert_1_both, insert_from_string)
1325 (insert_from_string_before_markers, insert_from_string_1)
1326 (insert_from_buffer, insert_from_buffer_1, replace_range)
1327 (replace_range_2, del_range_1, del_range_byte, del_range_both)
1328 (del_range_2, modify_region):
1329 * intervals.c (intervals_equal, balance_possible_root_interval)
1330 (adjust_intervals_for_insertion, merge_properties_sticky)
1331 (graft_intervals_into_buffer, lookup_char_property)
1332 (adjust_for_invis_intang, set_point_both)
1333 (get_property_and_range, compare_string_intervals)
1334 (set_intervals_multibyte_1, set_intervals_multibyte):
1335 * keyboard.c (decode_timer):
1336 Use bool for boolean.
1337 * intervals.h, lisp.h, systime.h: Reflect above API changes.
1338 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
1339
48c948de
CY
13402012-09-02 Chong Yidong <cyd@gnu.org>
1341
1342 * keymap.c (push_key_description): Print M-TAB as C-M-i
1343 (Bug#11758).
1344
6c49a40b
JB
13452012-09-02 Juanma Barranquero <lekktu@gmail.com>
1346
1347 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
1348 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
1349 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
1350 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
1351 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
1352 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
1353 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
1354
4dfbd238
EZ
13552012-09-01 Eli Zaretskii <eliz@gnu.org>
1356
7e510e28
EZ
1357 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
1358 more than one grapheme cluster passed to the shaper: compute the
1359 offset adjustment values separately for each cluster. (Bug#11860)
1360
4dfbd238
EZ
1361 * image.c: Restore mistakenly removed inclusion of w32.h. Without
1362 it, GCC doesn't see prototypes of w32_delayed_load, and complains
1363 about implicit conversions from integer to pointer.
1364
86571ae0
DC
13652012-09-01 Daniel Colascione <dancol@dancol.org>
1366
1367 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
1368 system used too early.
1369
0e23ef9d
PE
13702012-09-01 Paul Eggert <eggert@cs.ucla.edu>
1371
1372 Better seed support for (random).
1373 * emacs.c (main): Call init_random.
1374 * fns.c (Frandom): Set the seed from a string argument, if given.
1375 Remove long-obsolete Gentzel cruft.
1376 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
1377 (init_random): New function.
1378
17a2cbbd
DC
13792012-09-01 Daniel Colascione <dancol@dancol.org>
1380
1381 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
1382 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
1383 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
1384 x_wm_set_size_hint, x_query_colors, x_real_positions,
1385 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
1386 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
1387 all of which have been moved to common code.
1388
1389 * xfaces.c: Include TERM_HEADER instead of listing all possible
1390 window-system headers.
1391
1392 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
1393 to match header.
1394
1395 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
1396 directly accessing frame internals.
1397
f18cbb28 1398 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
1399 globals_of_w32font.
1400
1401 * process.c: Include TERM_HEADER instead of listing all possible
1402 window-system headers.
1403
1404 * nsterm.h: Remove declarations now in frame.h. Define
1405 FRAME_X_SCREEN, FRAME_X_VISUAL.
1406
1407 * menu.c: Include TERM_HEADER instead of listing all possible
1408 window-system headers.
1409
1410 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
1411 window system.
1412
1413 * keyboard.c: Include TERM_HEADER instead of listing all possible
1414 window-system headers.
1415
1416 * image.c: Include TERM_HEADER instead of listing all possible
1417 window-system headers. Declare Vlibrary_cache when compiling for
1418 Windows.
1419
1420 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
1421 window system declarations.
1422
1423 * frame.h: Move common functions here: set_frame_menubar,
1424 x_set_window_size, x_sync, x_get_focus_frame,
1425 x_set_mouse_position, x_set_mouse_pixel_position,
1426 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
1427 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
1428 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
1429 x_activate_menubar, x_real_positions, x_bitmap_icon,
1430 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
1431 and x_query_colors.
1432
1433 * frame.c: Include TERM_HEADER instead of listing all possible
1434 window-system headers.
1435
1436 * font.c: Include TERM_HEADER instead of listing all possible
1437 window-system headers.
1438
1439 * emacs.c: Include TERM_HEADER.
1440
f18cbb28
EZ
1441 * dispnew.c: Include TERM_HEADER instead of listing all possible
1442 window-system headers.
17a2cbbd 1443
f18cbb28 1444 * ccl.h: Include character.h.
17a2cbbd
DC
1445
1446 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
1447 the current window system; include in list of objects to link into
1448 Emacs.
1449
c650a5de
DA
14502012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1451
1452 Remove mark_ttys function and fix tty_display_info initialization.
1453 * lisp.h (mark_ttys): Remove prototype.
1454 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
1455 to mark_ttys because all possible values of 'top_frame' slot are
1456 the frames which are reachable from Vframe_list.
1457 * term.c (mark_ttys): Remove.
1458 (init_tty): Safely initialize 'top_frame' slot with Qnil.
1459
4e0f6479
DA
14602012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1461
1462 Change struct frame bitfields from unsigned char to unsigned.
1463 * frame.h (struct frame): Change type of 'display_preempted',
1464 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
1465 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
1466 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
1467 bitfields from unsigned char to unsigned.
1468
8b96a52c
DA
14692012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1470
1471 Remove unused member of struct x_output and struct w32_output.
1472 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
1473 * w32term.h (struct w32_output): Likewise.
1474
b4444c8a
JD
14752012-08-30 Jan Djärv <jan.h.d@swipnet.se>
1476
1477 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
1478 does not become zero (Bug#12234).
1479
b98521db
PE
14802012-08-30 Paul Eggert <eggert@cs.ucla.edu>
1481
1482 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
1483 for GCC 4.7.1 x86-64.
1484
31d02438
GM
14852012-08-30 Glenn Morris <rgm@gnu.org>
1486
1487 * lread.c (init_lread): For out-of-tree builds, only add the
1488 source directory's site-lisp dir to the load-path if it exists,
1489 consistent with in-tree builds. (Bug#12302)
1490
7f8941d8
JD
14912012-08-28 Jan Djärv <jan.h.d@swipnet.se>
1492
1493 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
fc0c31f8 1494 button_values to NULL. Call setStykeMask so dialogs get a close button.
7f8941d8
JD
1495 (windowShouldClose:): Set window_closed.
1496 (dealloc): New member, free button_values.
fc0c31f8
JB
1497 (process_dialog:): Make member function. Remove window argument,
1498 replace window with self. Count buttons and allocate and store values
7f8941d8
JD
1499 in button_values.
1500 (addButton:value:row:): value is int with the name tag. Call setTag
fc0c31f8 1501 with tag. Remove return self, declare return value as void.
7f8941d8
JD
1502 (addString:row:): Remove return self, declare return value as void.
1503 (addSplit): Remove return self, declare return value as void.
1504 (clicked:): Remove return self, declare return value as void.
fc0c31f8 1505 Set dialog_return to button_values[seltag]. Code formatting change.
7f8941d8
JD
1506 (initFromContents:isQuestion:): Adjust call to process_dialog.
1507 Code formatting change.
1508 (timeout_handler:): Set timer_fired to YES.
1509 (runDialogAt:): Set timer_fired to NO.
1510 Handle click on close button as quit.
1511
1512 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
1513 Add window_closed and button_values. Add void as return value for
1514 add(Button|String|Split). addButton takes int instead of Lisp_Object.
1515 Add process_dialog as new member.
1516
eada0861 15172012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 1518
eada0861
GM
1519 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
1520 is not one of the heaps we manage. (Bug#12242)
1521
15222012-08-28 Glenn Morris <rgm@gnu.org>
1523
1524 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
1525
457294dd
MR
15262012-08-28 Martin Rudalics <rudalics@gmx.at>
1527
1528 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
1529 auto-buffer-name window parameter. Install revision of reverted
1530 fix.
457294dd 1531
4f2daf31
DA
15322012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1533
1534 Do not allow to set major mode for a dead buffer.
1535 * buffer.c (Fset_buffer_major_mode): Signal an error
1536 if the buffer is dead.
1537 (Fother_buffer, other_buffer_safely): Remove redundant
1538 nested declaration.
1539
66322887
DA
15402012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1541
1542 Always use set_buffer_if_live to restore original buffer at unwind.
1543 * buffer.h (record_unwind_current_buffer): New function.
1544 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
1545 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
1546 * undo.c, window.c: Adjust users.
1547 * buffer.c (set_buffer_if_live): Fix comment.
1548
a3d794a1
DA
15492012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1550
1551 Fix usage of set_buffer_internal.
1552 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
1553 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
1554 * coding.c (decode_coding): Omit redundant test.
1555 * fileio.c (decide_coding_unwind): Likewise.
1556 * fns.c (secure_hash): Likewise.
1557 * insdel.c (modify_region): Likewise.
1558 * keyboard.c (command_loop_1): Likewise.
1559 * print.c (PRINTFINISH): Likewise.
1560 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
1561
59ea14cd
PE
15622012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1563
1564 * dispnew.c: Use bool for boolean.
1565 (frame_garbaged, display_completed, delayed_size_change)
1566 (fonts_changed_p, add_window_display_history)
1567 (add_frame_display_history, verify_row_hash)
1568 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
1569 (row_equal_p, realloc_glyph_pool)
1570 (allocate_matrices_for_frame_redisplay)
1571 (showing_window_margins_p)
1572 (adjust_frame_glyphs_for_frame_redisplay)
1573 (build_frame_matrix_from_leaf_window, make_current)
1574 (mirrored_line_dance, mirror_line_dance, update_frame)
1575 (update_window_tree, update_single_window)
1576 (check_current_matrix_flags, update_window, update_text_area)
1577 (update_window_line, set_window_update_flags, scrolling_window)
1578 (update_frame_1, scrolling, buffer_posn_from_coords)
1579 (do_pending_window_change, change_frame_size)
1580 (change_frame_size_1, sit_for):
1581 Use bool for boolean.
1582 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
1583 and remove last int (actually boolean) argument, which was always 0.
1584 All callers changed.
1585 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
1586 * dispextern.h (struct composition_it): Use bool for boolean.
1587 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
1588 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
1589 * dired.c (file_name_completion):
1590 Use bool for boolean. (This was missed in an earlier change.)
1591
95072a94
MR
15922012-08-27 Martin Rudalics <rudalics@gmx.at>
1593
1594 * window.c (Fset_window_configuration): Revert first part of
1595 last change.
1596
0f19feff
JD
15972012-08-27 Jan Djärv <jan.h.d@swipnet.se>
1598
1599 * nsterm.h (NSPanel): New class variable dialog_return.
1600
1601 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
1602 dialog_return.
1603 (windowShouldClose:): Use stop instead of stopModalWithCode.
1604 (clicked:): Ditto, and also set dialog_return (Bug#12258).
1605 (timeout_handler:): Use stop instead of abortModal. Send a dummy
1606 event.
1607 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
1608 modal loop returns.
1609
f10fe38f
PE
16102012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1611
de1339b0
PE
1612 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
1613 * composite.c (find_composition, composition_gstring_p)
1614 (composition_reseat_it, find_automatic_composition):
1615 * data.c (let_shadows_buffer_binding_p)
1616 (let_shadows_global_binding_p, set_internal, make_blv)
1617 (Fmake_variable_buffer_local, Fmake_local_variable)
1618 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
1619 (cons_to_signed, arith_driver):
1620 * dbusbind.c (xd_in_read_queued_messages):
1621 * dired.c (directory_files_internal, file_name_completion):
1622 Use bool for booleans.
1623 * dired.c (file_name_completion):
1624 * process.h (fd_callback):
1625 Omit int (actually boolean) argument. It wasn't being used.
1626 All uses changed.
1627 * composite.h, lisp.h: Reflect above API changes.
1628
f10fe38f
PE
1629 * cmds.c, coding.c: Use bool for booleans.
1630 * cmds.c (move_point, Fself_insert_command):
1631 * coding.h (struct composition status, struct coding_system):
1632 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
1633 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
1634 (emacs_mule_char, decode_coding_emacs_mule)
1635 (encode_coding_emacs_mule, detect_coding_iso_2022)
1636 (decode_coding_iso_2022, encode_invocation_designation)
1637 (encode_designation_at_bol, encode_coding_iso_2022)
1638 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
1639 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
1640 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
1641 (encode_coding_raw_text, detect_coding_charset)
1642 (decode_coding_charset, encode_coding_charset, detect_eol)
1643 (detect_coding, get_translation_table, produce_chars)
1644 (consume_chars, reused_workbuf_in_use)
1645 (make_conversion_work_buffer, code_conversion_save)
1646 (decode_coding_object, encode_coding_object)
1647 (detect_coding_system, char_encodable_p)
1648 (Funencodable_char_position, code_convert_region)
1649 (code_convert_string, code_convert_string_norecord)
1650 (Fset_coding_system_priority):
1651 * fileio.c (Finsert_file_contents):
1652 Use bool for booleans.
1653 * coding.h, lisp.h: Reflect above API changes.
1654 * coding.c: Remove unnecessary static function decls.
1655 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
1656 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
1657 not a boolean 'int', since callers never look at the return value.
1658 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
1659 * coding.h (decoding_buffer_size, encoding_buffer_size)
1660 (emacs_mule_string_char): Remove unused extern decls.
1661 (struct iso_2022_spec, struct coding_system):
1662 Use 'unsigned int : 1' for boolean fields, since there's more than one.
1663 (struct emacs_mule_spec): Remove unused field 'full_support'.
1664 All initializations removed.
1665 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
1666
5474c384
DA
16672012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1668
f10fe38f 1669 Fix spare memory change (Bug#12286).
5474c384
DA
1670 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
1671 (valid_lisp_object_p): Likewise.
1672
c4b6914d
MR
16732012-08-27 Martin Rudalics <rudalics@gmx.at>
1674
1675 * window.c (Fset_window_configuration): Record any window's old
1676 buffer if it's replaced (see Bug#8789). If the new current
1677 buffer doesn't appear in the selected window, go to its old
1678 point (Bug#12208).
1679
35aaa1ea
DA
16802012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1681
1682 Special MEM_TYPE_SPARE to denote reserved memory.
1683 * alloc.c (enum mem_type): New memory type.
1684 (refill_memory_reserve): Use new type for spare memory.
1685 This prevents live_cons_p and live_string_p from incorrect
1686 detection of uninitialized objects from spare memory as live.
1687
6af64513
PE
16882012-08-26 Paul Eggert <eggert@cs.ucla.edu>
1689
8b2e00a3
PE
1690 Spelling fixes.
1691 * Makefile.in (.PHONY): versioclean -> versionclean.
1692
b52d6985
PE
1693 Remove unused external symbols.
1694 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
1695 * window.c (Qwindow_valid_p, decode_valid_window):
1696 Now static, not extern.
1697 * data.c (Qinterval): Remove; unused.
1698 (syms_of_data): Do not define 'interval'.
1699 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
1700 * window.h (decode_valid_window):
1701 Remove decls.
1702
d5172d4f
PE
1703 * character.c, charset.c, chartab.c: Use bool for booleans.
1704 * character.c (lisp_string_width, string_count_byte8)
1705 (string_escape_byte8):
1706 * charset.c (charset_map_loaded, load_charset_map, read_hex):
1707 (load_charset_map_from_file, map_charset_chars)
1708 (Fdefine_charset_internal, define_charset_internal)
1709 (Fdeclare_equiv_charset, find_charsets_in_text)
1710 (Ffind_charset_region, char_charset, Fiso_charset):
1711 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
1712 (sub_char_table_set, sub_char_table_set_range)
1713 (char_table_set_range, optimize_sub_char_table)
1714 (map_sub_char_table):
1715 Use bool for boolean.
1716 * character.c (str_to_unibyte): Omit last boolean argument; it was
1717 always 0. All callers changed.
1718 * character.h, charset.h: Adjust to match previous changes.
1719 * character.h (char_printable_p): Remove decl of nonexistent function.
1720 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
1721 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
1722 are all boolean, so make them single-bit bitfields.
1723
6af64513
PE
1724 * lisp.h (ASET): Remove attempt to detect side effects.
1725 It was meant to be temporary and it often doesn't work,
1726 because when IDX has side effects the behavior of IDX==IDX
1727 is undefined. See Stefan Monnier in
1728 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
1729
e1f29348
BR
17302012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1731
1732 * lisp.h (functionp): New function (extracted from Ffunctionp).
1733 (FUNCTIONP): Use it.
1734 * eval.c (Ffunctionp): Use it.
1735
17c05d74
PE
17362012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1737
0f46bc75
PE
1738 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
1739 as that's faster and simpler than static storage. Don't bother
1740 with the g_main_context_query overhead if g_main_context_pending
1741 says no events are pending.
1742 (gfds, gfds_size): Remove these static vars.
1743 (xgselect_initialize): Remove; no longer needed.
1744 All uses and decls removed.
1745
ee4c0f69
PE
1746 * emacs.c (fatal_error_signal_hook): Remove.
1747 All uses removed. This leftover from old code was always 0.
1748
17c05d74
PE
1749 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
1750 * casefiddle.c (casify_object, casify_region):
1751 * casetab.c (set_case_table):
1752 * category.c, category.h (word_boundary_p):
1753 * category.h (CHAR_HAS_CATEGORY):
1754 Use bool for booleans, instead of int.
1755
391ceac5
EZ
17562012-08-25 Eli Zaretskii <eliz@gnu.org>
1757
1758 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
1759
2f221583
PE
17602012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1761
f4a681b0
PE
1762 On assertion failure, print backtrace if available.
1763 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
1764 (die) [ENABLE_CHECKING]: Print a backtrace if available.
1765 * Makefile.in (LIB_EXECINFO): New macro.
1766 (LIBES): Use it.
1767
2f221583
PE
1768 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
1769 * bytecode.c (exec_byte_code):
1770 * callint.c (check_mark, Fcall_interactively):
1771 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
1772 (getenv_internal, sync_process_alive, call_process_exited):
1773 * lisp.h (USE_SAFE_ALLOCA):
1774 Use bool for booleans, instead of int.
1775 * lisp.h, process.h: Adjust prototypes to match above changes.
1776 * callint.c (Fcall_interactively): Don't assume the mark's
1777 offset fits in 'int'.
1778
37ef52bb
PE
17792012-08-24 Paul Eggert <eggert@cs.ucla.edu>
1780
1781 * buffer.c, buffer.h: Use bool for boolean.
1782 * buffer.c (reset_buffer_local_variables)
1783 (buffer_lisp_local_variables, Fset_buffer_modified_p)
1784 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
1785 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
1786 (overlay_touches_p, overlay_strings, Foverlay_put)
1787 (report_overlay_modification, call_overlay_mod_hooks):
1788 (mmap_enlarge, mmap_set_vars):
1789 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
1790 Use bool for booleans, instead of int.
1791 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
1792 since the 1-or-0 return value is always ignored anyway.
1793 (mmap_initialized_p):
1794 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
1795 * buffer.h, lisp.h: Adjust prototypes to match above changes.
1796
2cc21167
PE
17972012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1798
1799 * bidi.c: Use bool for boolean.
1800 This is a bit more readable, and makes the text segment of bidi.o
1801 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
1802 Presumably it's faster too.
1803 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
1804 Now bool.
1805 (bidi_cache_find_level_change, bidi_cache_iterator_state)
1806 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
1807 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
1808 (bidi_explicit_dir_char, bidi_level_of_next_char)
1809 (bidi_find_other_level_edge, bidi_move_to_visually_next):
1810 Use bool for booleans, instead of int.
1811 * dispextern.h (bidi_init_it, bidi_paragraph_init)
1812 (bidi_unshelve_cache): Adjust decls to match code.
1813
7db4ddf4
MR
18142012-08-23 Martin Rudalics <rudalics@gmx.at>
1815
1816 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
1817 argument.
1818
b1bb8011
PE
18192012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1820
1821 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
1822 * atimer.h: Include <stdbool.h>.
1823
ff687885
DN
18242012-08-22 Dan Nicolaescu <dann@gnu.org>
1825
1826 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
1827 compile time tests instead of run time tests on systems that do
1828 not use them.
1829 (FRAME_MAC_P): Remove leftover from deleted code.
1830 * frame.c (syms_of_frame): Remove leftover from deleted code.
1831
4ce7a138
JD
18322012-08-22 Jan Djärv <jan.h.d@swipnet.se>
1833
1834 * nsterm.m (insertText:): Don't clear modifiers if code is space.
1835
d733ec6d
PE
18362012-08-22 Paul Eggert <eggert@cs.ucla.edu>
1837
1838 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
1839 Otherwise, the compiler complains about (A?B:C) where B is void
fc0c31f8 1840 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
d733ec6d
PE
1841 (fontset_add): Return void, for FONTSET_ADD.
1842
d0d2d26f
PE
18432012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1844
fce31d69
PE
1845 * alloc.c: Use bool for booleans.
1846 (gc_in_progress, abort_on_gc)
1847 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1848 (dont_register_blocks) [GC_MALLOC_CHECK]:
1849 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
1850 (check_string_bytes, make_specified_string, memory_full)
1851 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
1852 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
1853 (mark_stack, valid_pointer_p, make_pure_string)
1854 (Fgarbage_collect, survives_gc_p, gc_sweep):
1855 Use bool for booleans, instead of int.
1856 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1857 Remove unused local.
1858 * alloc.c (PURE_POINTER_P):
1859 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
1860 * editfns.c (Fformat):
1861 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
1862 (Fdo_auto_save):
1863 * fns.c (sweep_weak_table):
1864 * lisp.h (suppress_checking, push_message, survives_gc_p)
1865 (make_pure_string, gc_in_progress, abort_on_gc):
1866 * lread.c (readchar, read1):
1867 * print.c (Fprin1_to_string):
1868 * xdisp.c (push_message):
1869 Use bool for booleans affected directly or indirectly by
1870 alloc.c's changes.
1871
d0d2d26f
PE
1872 Make recently-introduced setters macros.
1873 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
1874 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
1875 (set_fontset_default, set_fontset_fallback): Rename from their
1876 upper-case counterparts, and make them functions rather than macros.
1877 This is more consistent with the other recently-introduced setters.
1878 These don't need to be inline, since they're local.
1879
d18e2bb6
JD
18802012-08-21 Jan Djärv <jan.h.d@swipnet.se>
1881
1882 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
1883 the loop (Bug#12247).
1884
1b9d9d16
PE
18852012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1886
1887 * lisp.h (vcopy): Use memcpy rather than our own loop.
1888 This fixes a performance regression introduced by the recent
1889 addition of vcopy. This means 'vcopy' will need to be modified
1890 for a copying collector, but that's OK. Also, tighten the
1891 checking in the assertion.
1892
b2f09701
EZ
18932012-08-21 Eli Zaretskii <eliz@gnu.org>
1894
1895 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
1896 components for RTL text (Bug#11860). Adjust X-OFFSET of each
1897 non-base glyph for the width of the base character, according to
e1f29348
BR
1898 what x_draw_composite_glyph_string_foreground expects.
1899 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
1900 expectations, to produce correct width of the composed character.
1901 Reverse the sign of the DU offset produced by ScriptPlace.
1902
9b994fed
PE
19032012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1904
1905 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
1906
086ca913
DA
19072012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1908
1909 Avoid direct writes to contents member of struct Lisp_Vector.
1910 * lisp.h (vcopy): New function to copy data into vector.
1911 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
1912 * fns.c (Ffillarray): Use ASET.
1913 * keyboard.c (timer_check_2): Use AREF and ASET.
1914 (append_tool_bar_item, Frecent_keys): Use vcopy.
1915 * lread.c (read_vector): Use ASET.
1916 * msdos.c (Frecent_doskeys): Use vcopy.
1917 * xface.c (Finternal_copy_lisp_face): Use vcopy.
1918 (Finternal_merge_in_global_face): Use ASET and vcopy.
1919 * xfont.c (xfont_list_pattern): Likewise.
1920
5481664a
MR
19212012-08-21 Martin Rudalics <rudalics@gmx.at>
1922
1923 * window.c (Fwindow_point): For the selected window always return
1924 the position of its buffer's point.
1925 (Fset_window_point): For the selected window always go in its
1926 buffer to the specified position.
1927
6d470bdd
DA
19282012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1929
1930 Setter macros for fontsets.
1931 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
1932 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
1933 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
1934 Adjust users.
1935
24564fe1
GM
19362012-08-20 Glenn Morris <rgm@gnu.org>
1937
1938 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
1939 Don't assume that `ln -f' works.
1940
0a05a035
EZ
19412012-08-20 Eli Zaretskii <eliz@gnu.org>
1942
1943 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
1944 and later about non-assignments with no effect. See discussion at
1945 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
1946 details.
1947
e46f2325
DA
19482012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1949
1950 Inline setter functions for Lisp_Objects slots of struct specbinding.
1951 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
1952 Adjust users.
1953
734fbd86
MR
19542012-08-20 Martin Rudalics <rudalics@gmx.at>
1955
1956 * window.c (select_window): Always make selected window's buffer
1957 current.
1958
f1a95992
DA
19592012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1960
1961 Use AREF and ASET for docstrings of category tables.
1962 * category.h (CATEGORY_DOCSTRING): Use AREF.
1963 (SET_CATEGORY_DOCSTRING): Use ASET.
1964 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
1965
e83064be
DA
19662012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1967
1968 Inline setter functions for hash table members.
1969 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
1970 (set_hash_hash, set_hash_index): Rename with _slot suffix.
1971 (set_hash_key_and_value, set_hash_index, set_hash_next)
1972 (set_hash_hash): New functions.
1973 * charset.c, fns.c: Adjust users.
1974
4ce60d2e
DA
19752012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1976
1977 Inline getter and setter functions for per-buffer values.
1978 * buffer.h (per_buffer_default, set_per_buffer_default)
1979 (per_buffer_value, set_per_buffer_value): New functions.
1980 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
1981 * buffer.c, data.c: Adjust users.
1982
c06c9690
JB
19832012-08-20 Juanma Barranquero <lekktu@gmail.com>
1984
1985 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
1986
32bd4250
PE
19872012-08-19 Paul Eggert <eggert@cs.ucla.edu>
1988
bad03192 1989 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
1990 as gnulib does this if the system doesn't.
1991 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
1992 Remove declaration. MS-Windows declares it on stdlib.h which is
1993 included by conf_post.h.
b69a6d22
PE
1994 * emacs.c (environ) [DOUG_LEA_MALLOC]:
1995 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
1996 * vm-limit.c: Include <unistd.h>, for 'environ'.
1997
22d7feb2
PE
1998 * unexaix.c, unexcoff.c: Include "mem-limits.h".
1999 (start_of_data): Remove decl; mem-limits.h provides it.
2000
32bd4250
PE
2001 * xdisp.c (handle_invisible_prop): Make it a bit faster
2002 and avoid a gcc -Wmaybe-uninitialized diagnostic.
2003
450809af
CY
20042012-08-19 Chong Yidong <cyd@gnu.org>
2005
2006 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
2007 ends (Bug#3874).
2008
9e677988
AS
20092012-08-19 Andreas Schwab <schwab@linux-m68k.org>
2010
6b1319ce
AS
2011 * .gdbinit: Use call instead of set when calling a function in the
2012 inferior.
2013
9e677988
AS
2014 * data.c (set_internal): Don't use set_blv_found.
2015 (Fkill_local_variable): Likewise.
2016
d7191076
AA
20172012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
2018
2019 * nsfont.m (ns_ascii_average_width): Ensure the string
2020 ascii_printable is initialized with a null-terminated character
2021 array. Otherwise, it can contain undesired extra characters.
2022
e757f1c6
PE
20232012-08-18 Paul Eggert <eggert@cs.ucla.edu>
2024
2025 port new setting code to Sun C 5.8 2005/10/13
2026 * chartab.c, lisp.h (char_table_set, char_table_set_range):
2027 Return void, not Lisp_Object. Otherwise, the compiler
2028 complains about (A?B:C) where B is void and C is Lisp_Object
2029 when compiling CHAR_TABLE_SET, due to the recent change to
2030 the API of sub_char_table_set_contents.
2031
a999ce26
CY
20322012-08-18 Chong Yidong <cyd@gnu.org>
2033
2034 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
2035 for the string case (Bug#3874).
2036
3f22b86f
PE
20372012-08-18 Paul Eggert <eggert@cs.ucla.edu>
2038
39eb03f1
PE
2039 * buffer.h (BSET): Remove (Bug#12215).
2040 Replace all uses with calls to new setter functions.
2041 (bset_bidi_paragraph_direction, bset_case_canon_table)
2042 (bset_case_eqv_table, bset_directory, bset_display_count)
2043 (bset_display_time, bset_downcase_table)
2044 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
2045 (bset_last_selected_window, bset_local_var_alist)
2046 (bset_mark_active, bset_point_before_scroll, bset_read_only)
2047 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
2048 (bset_width_table):
2049 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2050 (bset_auto_fill_function, bset_auto_save_file_format)
2051 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2052 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2053 (bset_cache_long_line_scans, bset_case_fold_search)
2054 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2055 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2056 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2057 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2058 (bset_header_line_format, bset_indicate_buffer_boundaries)
2059 (bset_indicate_empty_lines, bset_invisibility_spec)
2060 (bset_left_fringe_width, bset_major_mode, bset_mark)
2061 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2062 (bset_name, bset_overwrite_mode, bset_pt_marker)
2063 (bset_right_fringe_width, bset_save_length)
2064 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2065 (bset_scroll_up_aggressively, bset_selective_display)
2066 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2067 (bset_word_wrap, bset_zv_marker):
2068 * category.c (bset_category_table):
2069 * syntax.c (bset_syntax_table):
2070 New setter functions.
2071
6a09a33b
PE
2072 * process.h (PSET): Remove (Bug#12215).
2073 Replace all uses with calls to new setter functions.
2074 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2075 (PROCESS_INLINE): New macro.
2076 (pset_childp): New setter function.
2077 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
2078 * process.c (PROCESS_INLINE):
2079 Define to EXTERN_INLINE, so that the corresponding functions
2080 are compiled into code.
2081 (pset_buffer, pset_command, pset_decode_coding_system)
2082 (pset_decoding_buf, pset_encode_coding_system)
2083 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
2084 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
2085 (pset_type, pset_write_queue): New setter functions.
2086
e8c17b81
PE
2087 * window.h (WSET): Remove (Bug#12215).
2088 Replace all uses with calls to new setter functions.
2089 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2090 (WINDOW_INLINE): New macro.
2091 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
2092 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
2093 (wset_total_lines, wset_vertical_scroll_bar)
2094 (wset_window_end_pos, wset_window_end_valid)
2095 (wset_window_end_vpos): New setter functions.
2096 * window.c (WINDOW_INLINE):
2097 Define to EXTERN_INLINE, so that the corresponding functions
2098 are compiled into code.
2099 (wset_combination_limit, wset_dedicated, wset_display_table)
2100 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
2101 (wset_new_normal, wset_new_total, wset_next_buffers)
2102 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
2103 (wset_prev_buffers, wset_right_fringe_width)
2104 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
2105 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
2106 (wset_window_parameters):
2107 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2108 (wset_column_number_displayed, wset_region_showing):
2109 New setter functions.
2110
3f22b86f
PE
2111 * termhooks.h (TSET): Remove (Bug#12215).
2112 Replace all uses with calls to new setter functions.
2113 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2114 (TERMHOOKS_INLINE): New macro.
2115 (tset_charset_list, tset_selection_alist): New setter functions.
2116 * terminal.c (TERMHOOKS_INLINE):
2117 Define to EXTERN_INLINE, so that the corresponding functions
2118 are compiled into code.
2119 (tset_param_alist): New setter function.
2120
742af32f
PE
21212012-08-17 Paul Eggert <eggert@cs.ucla.edu>
2122
15dbb4d6
PE
2123 * keyboard.h (KSET): Remove (Bug#12215).
2124 Replace all uses with calls to new setter functions.
2125 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2126 (KEYBOARD_INLINE): New macro.
2127 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
2128 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
2129 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
2130 New setter functions.
2131 * keyboard.c (KEYBOARD_INLINE):
2132 Define to EXTERN_INLINE, so that the corresponding functions
2133 are compiled into code.
2134 (kset_echo_string, kset_kbd_queue)
2135 (kset_keyboard_translate_table, kset_last_prefix_arg)
2136 (kset_last_repeatable_command, kset_local_function_key_map)
2137 (kset_overriding_terminal_local_map, kset_real_last_command)
2138 (kset_system_key_syms): New setter functions.
2139
f00af5b1
PE
2140 * frame.h (FSET): Remove (Bug#12215).
2141 Replace all uses with calls to new setter functions.
2142 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2143 (FRAME_INLINE): New macro.
2144 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
2145 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
2146 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
2147 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
2148 (fset_param_alist, fset_root_window, fset_scroll_bars)
2149 (fset_selected_window, fset_title, fset_tool_bar_items)
2150 (fset_tool_bar_position, fset_tool_bar_window): New functions.
2151 * frame.c (FRAME_INLINE):
2152 Define to EXTERN_INLINE, so that the corresponding functions
2153 are compiled into code.
2154 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
2155
0c94c8d6
PE
2156 A few more naming-convention fixes for getters and setters.
2157 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
2158 and rename from buffer_overlays_set_before.
2159 (set_buffer_overlays_after): Move here from buffer.h, and rename
2160 from buffer_overlays_set_after.
2161 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
2162 All uses changed.
2163 (set_buffer_intervals): Rename from buffer_set_intervals.
2164 * intervals.c (set_interval_object): Move here from intervals.h,
2165 and rename from interval_set_object.
2166 (set_interval_left): Move here from intervals.h, and rename from
2167 interval_set_left.
2168 (set_interval_right): Move here from intervals.h, and rename from
2169 interval_set_right.
2170 (copy_interval_parent): Move here from intervals.h, and rename from
2171 interval_copy_parent.
2172 * intervals.h (set_interval_parent): Rename from interval_set_parent.
2173 (set_interval_plist): Rename from interval_set_plist.
2174 Return void, not Lisp_Object, since no caller uses the result.
2175 * lisp.h (string_intervals): Rename from string_get_intervals.
2176 (set_string_intervals): Rename from string_set_intervals.
2177
34dabdb7
PE
2178 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
2179 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 2180 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
2181 All uses changed. See the end of
2182 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
2183
742af32f
PE
2184 * lisp.h (CSET): Remove (Bug#12215).
2185 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
2186 (set_char_table_purpose): New functions,
2187 replacing CSET. All uses changed. For example, replace
2188 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 2189 "set_char_table_parent (char_table, parent);".
742af32f
PE
2190 The old version was confusing because it used the same name
2191 'parent' for two different things.
2192
a04e2c62
DA
21932012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
2194
2195 Functions to get and set Lisp_Object fields of buffer-local variables.
2196 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
2197 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
2198 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
2199 * data.c, eval.c, frame.c: Adjust users.
2200
383dcbf9
CY
22012012-08-17 Chong Yidong <cyd@gnu.org>
2202
2203 * xfaces.c (merge_face_vectors): If the target font specfies a
2204 font spec, make the font's attributes take precedence over
2205 directly-specified attributes.
2206 (merge_face_ref): Recognize :font.
2207
44386687
DA
22082012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
2209
2210 Do not use memcpy for copying intervals.
2211 * intervals.c (reproduce_interval): New function.
2212 (reproduce_tree, reproduce_tree_obj): Use it.
2213 (reproduce_tree_obj): Remove prototype.
2214
927c7216
PE
22152012-08-17 Paul Eggert <eggert@cs.ucla.edu>
2216
2217 * lisp.h (duration_to_sec_usec): Remove unused decl.
2218
93044f7b
AA
22192012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
2220
2221 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
2222 to an allocated instance of NSString, not to the class itself.
2223
9851e4a5
JB
22242012-08-17 Juanma Barranquero <lekktu@gmail.com>
2225
2226 * makefile.w32-in (C_CTYPE_H): New macro.
2227 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
2228 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
2229 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2230
620f13b0
PE
22312012-08-16 Paul Eggert <eggert@cs.ucla.edu>
2232
2233 Use ASCII tests for character types.
2234 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
2235 * xfns.c, xterm.c:
2236 Don't include <ctype.h>; was not needed.
2237 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
2238 * sysdep.c, xfaces.c:
2239 Include <c-ctype.h> instead of <ctype.h>.
2240 * nsterm.m: Include <c-ctype.h>.
2241 * charset.c (read_hex):
2242 * doc.c (Fsnarf_documentation):
2243 * fileio.c (IS_DRIVE) [WINDOWSNT]:
2244 (DRIVE_LETTER) [DOS_NT]:
2245 (Ffile_name_directory, Fexpand_file_name)
2246 (Fsubstitute_in_file_name):
2247 * font.c (font_parse_xlfd, font_parse_fcname):
2248 * frame.c (x_set_font_backend):
2249 * gtkutil.c (xg_get_font):
2250 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
2251 * nsimage.m (hexchar):
2252 * nsterm.m (ns_xlfd_to_fontname):
2253 * sysdep.c (system_process_attributes):
2254 * xfaces.c (hash_string_case_insensitive):
2255 Use C-locale tests instead of locale-specific tests for character
2256 types, since we want the ASCII interpretation here, not the
2257 interpretation suitable for whatever happens to be the current locale.
2258
52162052
MR
22592012-08-16 Martin Rudalics <rudalics@gmx.at>
2260
2261 Consistently check windows for validity/liveness
2262 (Bug#11984, Bug#12025, Bug#12026).
2263 * lisp.h (CHECK_VALID_WINDOW): New macro.
2264 * window.c (decode_window): Rename to decode_live_window.
2265 (decode_valid_window, Fwindow_valid_p): New functions.
2266 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
2267 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
2268 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
2269 (Fwindow_prev_sibling, Fwindow_combination_limit)
2270 (Fset_window_combination_limit, Fwindow_use_time)
2271 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
2272 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
2273 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
2274 (Fwindow_hscroll, Fset_window_hscroll)
2275 (Fwindow_redisplay_end_trigger)
2276 (Fset_window_redisplay_end_trigger, Fwindow_edges)
2277 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
2278 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
2279 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
2280 (Fwindow_end, Fset_window_point, Fset_window_start)
2281 (Fpos_visible_in_window_p, Fwindow_line_height)
2282 (Fwindow_dedicated_p, Fset_window_dedicated_p)
2283 (Fwindow_prev_buffers, Fset_window_prev_buffers)
2284 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
2285 (Fset_window_parameter, Fwindow_display_table)
2286 (Fset_window_display_table, Fdelete_other_windows_internal)
2287 (Fset_window_buffer, Fset_window_new_total)
2288 (Fset_window_new_normal, Fdelete_window_internal)
2289 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
2290 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
2291 (Fwindow_scroll_bars): Check whether argument window is a valid or
2292 live window. Update doc-strings.
2293 (syms_of_window): New symbol Qwindow_valid_p.
2294 * keyboard.c (Fposn_at_x_y): Check whether argument
2295 frame_or_window denotes a valid window.
2296
2751c80f
DA
22972012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
2298
2299 Fix previous char table change.
2300 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
2301 * chartab.c (optimize_sub_char_table): Likewise.
2302
032a42c8
CY
23032012-08-16 Chong Yidong <cyd@gnu.org>
2304
a2d19368
CY
2305 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
2306
032a42c8
CY
2307 * xfont.c (xfont_open):
2308 * xftfont.c (xftfont_open): Set the font's max_width field.
2309
2310 * nsfont.m (nsfont_open): Similar to the Xft backend, set
2311 min_width to space_width and average_width to the average over
2312 printable ASCII characters.
2313 (ns_char_width): Code cleanup.
2314 (ns_ascii_average_width): New utility function.
2315
2316 * font.h (struct font): Update comments.
2317
a098c930
DA
23182012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
2319
032a42c8 2320 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
2321 * lisp.h (CSET): New macro.
2322 (char_table_set_extras, char_table_set_contents)
2323 (sub_char_table_set_contents): New function.
2324 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
2325 * syntax.c: Adjust users.
2326
8be3a09c
SM
23272012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
2328
2329 * eval.c (eval_sub): Bind lexical-binding.
2330 * lread.c (Qlexical_binding): Make non-static.
2331
ac4845a6
JD
23322012-08-15 Jan Djärv <jan.h.d@swipnet.se>
2333
ddee6515
JD
2334 * nsmenu.m (popupSession): Remove.
2335 (pop_down_menu): Remove endModalSession.
2336 (timeout_handler:): New method.
2337 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
2338 Call runModalForWindow. Check timer_fired when it returns.
2339 If not set, cancel timer and break out of loop.
2340 Otherwise loop again, with a new timeout.
2341
2342 * nsterm.m: Include fcntl.h if present.
2343 (fd_entry, t_readfds, inNsSelect): Remove.
2344 (select_writefds, select_valid, select_timeout, selfds)
2345 (select_mutex, apploopnr): Add.
2346 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
2347 Otherwise call kbd_buffer_store_event.
2348 (ns_send_appdefined): Remove release of fd_entry.
2349 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
2350 Increment and decrement apploopnr.
2351 (ns_select): If no file descriptors, just do a NSTimer.
2352 Otherwise copy read/write masks and start select thread (fd_handler).
2353 Start main loop and wait for application defined event.
2354 Inform select thread to stop selecting after main loop is exited.
2355 (ns_term_init): Create selfds pipe and set non-blocking.
fc0c31f8 2356 Initialize select_mutex. Start the select thread (fd_handler).
ddee6515
JD
2357 (fd_handler:): Loop forever, wait for info from the main thread
2358 to either start or stop selecting. When select returns, send
2359 and appdefined event.
2360 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
2361 If not call kbd_buffer_store_event.
2362
2363 * nsterm.h (EmacsApp): fd_handler takes id argument.
2364 (EmacsDialogPanel): Add timer_fired and timeout_handler.
2365
ac4845a6
JD
2366 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
2367
eb424fe3
EZ
23682012-08-15 Eli Zaretskii <eliz@gnu.org>
2369
2370 * region-cache.c (move_cache_gap): Update gap_len using the actual
2371 growth of the boundaries array. Do not change cache_len.
2372 (Bug#12196)
2373
4e6a86c6
DA
23742012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
2375
2376 Generalize and cleanup font subsystem checks.
2377 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
2378 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
2379 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 2380
5bf192ca
DA
23812012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
2382
2383 * gtkutil.c (xg_get_font): Use pango_units_to_double.
2384
f2045622
CY
23852012-08-15 Chong Yidong <cyd@gnu.org>
2386
8be3a09c
SM
2387 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
2388 When using the new font chooser, use gtk_font_chooser_get_font_desc to
2389 extract the font descriptor instead of just the font name.
2390 In that case, return a font spec instead of a string.
f2045622
CY
2391 (x_last_font_name): Move to this file from xfns.c.
2392
2393 * xfns.c (Fx_select_font): The return value can also be a font
2394 spec. Move x_last_font_name management to gtkutil.c.
2395
2396 * xfaces.c: Make font weight and style symbols non-static.
2397
7f6feb56
SM
23982012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
2399
2400 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
2401 (bug#12117).
2402
fecbd8ff
SM
24032012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
2404
2405 * alloc.c (Fgarbage_collect): Use plural form consistently.
2406
9b8d5165
EZ
24072012-08-14 Eli Zaretskii <eliz@gnu.org>
2408
2409 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
2410 iteration through the command loop. Fixes a problem whereby mouse
2411 movements are ignored until the first mouse click.
2412
f5d9e83a
PE
24132012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2414
2415 Use bool, not int, for Lisp booleans.
2416 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
2417 makes Emacs a bit smaller and presumably a bit faster.
2418 * lisp.h: Include <stdbool.h>.
2419 (struct Lisp_Boolfwd, defvar_bool):
2420 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
2421 * regex.c [!emacs]: Include <stdbool.h>.
2422 (false, true): Remove; <stdbool.h> does this for us now.
2423
55802e4a
CY
24242012-08-14 Chong Yidong <cyd@gnu.org>
2425
4abcdac8
CY
2426 * character.c (Fcharacterp): Doc fix (Bug#12076).
2427
2428 * data.c (Findirect_variable): Doc fix (Bug#11040).
2429
55802e4a
CY
2430 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
2431
2432 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 2433 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 2434
8e99d072
BR
24352012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2436
2437 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
2438 (bug#12022).
2439
08908aca
MR
24402012-08-14 Martin Rudalics <rudalics@gmx.at>
2441
2442 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
2443 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
2444 * minibuf.c (choose_minibuf_frame, read_minibuf):
2445 * w32fns.c (x_create_tip_frame):
2446 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
2447 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
2448
56120d6f
PE
24492012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2450
2451 * intervals.c (offset_intervals): Remove obsolete comment.
2452
67b77c0b
AS
24532012-08-14 Andreas Schwab <schwab@linux-m68k.org>
2454
2455 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
2456
f48b82fd
GR
24572012-08-14 Gergely Risko <gergely@risko.hu>
2458
2459 * coding.c (decode_coding): Record buffer modification before
2460 disabling undo_list (Bug#11773).
2461
fd318b54
DA
24622012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
2463
2464 Revert and cleanup some recent overlay changes.
2465 * buffer.h (enum overlay_type): Remove.
2466 (buffer_get_overlays, buffer_set_overlays): Likewise.
2467 (buffer_set_overlays_before, buffer_set_overlays_after):
2468 New function. Adjust users.
2469 (unchain_both): Add eassert.
2470
41a62dd9
DA
24712012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
2472
2473 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
2474
5884c324
PE
24752012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2476
2477 * gtkutil.c (xg_mark_data): Don't assume C99.
2478
ca06f160
JD
24792012-08-13 Jan Djärv <jan.h.d@swipnet.se>
2480
2481 * gtkutil.c (xg_frame_tb_info): New struct.
2482 (TB_INFO_KEY): New define.
2483 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
2484 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
2485 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
2486 if not present.
2487 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
fc0c31f8 2488 is up to date. Otherwise store new data.
ca06f160
JD
2489 (free_frame_tool_bar): Free xg_frame_tb_info if present.
2490
7864a3f7
DA
24912012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2492
2493 Use KSET for write access to Lisp_Object members of struct kboard.
2494 * keyboard.h (KSET): New macro.
2495 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
2496 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
2497 * xterm.c: Adjust users.
2498
4c31be61
DA
24992012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2500
2501 Use BSET for write access to Lisp_Object members of struct buffer.
2502 * buffer.h (BSET): New macro.
2503 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
2504 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
2505 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
2506 * window.c, xdisp.c, xfns.c: Adjust users.
2507
14ae4239
BT
25082012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
2509
2510 * lread.c (syms_of_lread): Initialize Vlexical_binding.
2511
32bcadb4
JD
25122012-08-11 Jan Djärv <jan.h.d@swipnet.se>
2513
3d29b2ce 2514 * nsterm.m (not_in_argv): New function.
fc0c31f8 2515 (application:openFile, application:openTempFile:):
3d29b2ce
JD
2516 (application:openFileWithoutUI:, application:openFiles:): Open file
2517 if not_in_argv returns non-zero (bug#12171).
2518
32bcadb4 2519 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
2520 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
2521 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
2522 (xg_get_font_name): Use those functions/macros here.
2523 Reported by Frans Oilinki <moilinki@gmail.com>.
2524
9ff9402d 25252012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
2526
2527 * unexmacosx.c (copy_data_segment): Copy initialized data in
2528 statically linked libraries from input file rather than memory.
2529
db74a5fc
YM
2530 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
2531 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
2532 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
2533
25e65510
GM
25342012-08-10 Glenn Morris <rgm@gnu.org>
2535
2536 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
2537 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
2538
7961135c
DA
25392012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2540
2541 Fix last change to allow compilation with low optimization levels.
2542 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
2543 Reported by Jan Djärv <jan.h.d@swipnet.se>.
2544
42b3a444
DA
25452012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2546
2547 Use common inline syntax in intervals.h.
2548 * intervals.h (INTERVALS_INLINE): New macro.
2549 Change all users from LISP_INLINE.
2550
9fb0c957
DA
25512012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2552
2553 Define Qnone once for all platforms.
2554 * frame.c (Qnone): Define here.
2555 (syms_of_frame): DEFSYM it.
2556 * lisp.h (Qnone): New declaration.
2557 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
2558 * xfns.c: Remove duplication. Adjust users.
2559
65e8ee52
DA
25602012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2561
2562 Remove unused macros from intervals.h.
2563 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
2564 * intervals.c: Adjust comment.
2565
9b855fd6
EZ
25662012-08-10 Eli Zaretskii <eliz@gnu.org>
2567
2568 * w32fns.c <w32_unicode_gui>: New static variable.
2569 (globals_of_w32fns): Initialize it according to os_subtype.
2570 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
2571 testing os_subtype.
2572
39cb9e56 25732012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
2574 Eli Zaretskii <eliz@gnu.org>
2575
2576 Fix bug #10299 with Unicode characters sent by customized
2577 keyboards created by MSKLC.
2578 * w32fns.c (INIT_WINDOW_CLASS): New macro.
2579 (w32_init_class): Use it to initialize the Emacs class with either
2580 ANSI or Unicode API calls.
2581 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
2582 later.
2583 (w32_wnd_proc): If the character code sent by WM_CHAR or
2584 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
2585 original message. Call DefWindowProcW on NT and later.
2586
9374581a
GM
25872012-08-10 Glenn Morris <rgm@gnu.org>
2588
4b94e8cf
GM
2589 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
2590
9374581a
GM
2591 * lisp.h (DIRECTORY_SEP): Let configure set it.
2592
a2752828
DA
25932012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
2594
2595 Use TSET for write access to Lisp_Object slots of struct terminal.
2596 * termhooks.h (TSET): New macro.
2597 * coding.c, terminal.c, xselect.c: Adjust users.
2598
cc92c454
SM
25992012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
2600
2601 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
2602 the failing expression, include them in the error message.
2603 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
2604 * lisp.h (internal_condition_case_n): Update declaration.
2605
4cb3e6b3
DA
26062012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2607
2608 Inline functions to examine and change buffer overlays.
2609 * buffer.c (unchain_both): New function.
2610 * buffer.h (buffer_get_overlays, buffer_set_overlays):
2611 (buffer_has_overlays): New function.
2612 (enum overlay_type): New enum.
2613 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
2614 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
2615
8707c1e5
DA
26162012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2617
2618 Inline functions to examine and change buffer intervals.
2619 * alloc.c (mark_interval_tree): Remove.
2620 (MARK_INTERVAL_TREE): Simplify.
2621 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
2622 * intervals.c (buffer_balance_intervals): New function.
2623 (graft_intervals_into_buffer): Adjust indentation.
2624 (set_intervals_multibyte): Simplify.
2625 * buffer.h (BUF_INTERVALS): Remove.
2626 (buffer_get_intervals, buffer_set_intervals): New function.
2627 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
2628 * intervals.c, textprop.c: Adjust users.
2629
ad8c997f
DA
26302012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2631
2632 Inline functions to examine and change string intervals.
2633 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
2634 (string_get_intervals, string_set_intervals): New function.
2635 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2636 * lread.c, print.c, textprop.c: Adjust users.
2637
32ac3a6b
GM
26382012-08-08 Glenn Morris <rgm@gnu.org>
2639
2640 * lisp.mk (lisp): Remove language/persian.elc.
2641
77c7bcb1
DA
26422012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2643
2644 Cleanup intervals.
2645 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
2646 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
2647 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
2648 Adjust comment. Move under #if 0.
77c7bcb1
DA
2649 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2650 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
2651
9c08a8d4
DA
26522012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2653
2654 Check total length of intervals with eassert.
2655 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
2656 * intervals.c: Change all users to eassert.
2657
26d16b35
EZ
26582012-08-07 Eli Zaretskii <eliz@gnu.org>
2659
14ae4239
BT
2660 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
2661 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
2662 INTERNAL_FIELD in Lisp_Cons.
2663
c644523b
DA
26642012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2665
2666 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
2667 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
2668 name since all xname users are fixed long time ago. Do not
2669 use INTERNAL_FIELD.
2670 (set_symbol_name, set_symbol_function, set_symbol_plist):
2671 (set_symbol_next, set_overlay_plist): New function.
2672 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
2673 (struct Lisp_Overlay): Likewise.
2674 (CVAR, MVAR, SVAR): Remove.
2675 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
2676 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
2677 * xterm.c: Adjust users.
2678 * .gdbinit: Change to use name field of struct Lisp_Symbol
2679 where appropriate.
2680
6a3d20cc
DA
26812012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2682
2683 Basic functions to set Lisp_Object and pointer slots of intervals.
2684 * intervals.h (interval_set_parent, interval_set_object):
2685 (interval_set_left, interval_set_right, interval_set_plist):
2686 (interval_copy_parent): New function.
2687 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
2688 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
2689 Adjust indentation.
6a3d20cc
DA
2690 (INTERVAL_SIZE): Remove. Adjust users.
2691 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
2692
4d2b044c
DA
26932012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2694
2695 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
2696 * process.h (PGET): Remove.
2697 (struct Lisp_Process): Do not use INTERNAL_FIELD.
2698 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2699
d3d50620
DA
27002012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2701
2702 Drop WGET and revert read access to Lisp_Objects slots of struct window.
2703 * window.h (WGET): Remove.
2704 (struct window): Do not use INTERNAL_FIELD.
2705 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2706 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2707 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2708 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2709 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2710 Adjust users.
2711
d10a51dc
CY
27122012-08-07 Chong Yidong <cyd@gnu.org>
2713
2714 * window.c (Fwindow_edges, Fwindow_pixel_edges)
2715 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
2716 (Fdelete_window_internal): Signal an error if the window is not on
2717 a live frame (Bug#12025).
2718
e69b0960
DA
27192012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2720
2721 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
2722 * frame.h (FGET): Remove.
2723 (struct frame): Do not use INTERNAL_FIELD.
2724 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2725 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2726 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2727 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2728
25a20a3a
JB
27292012-08-06 Juanma Barranquero <lekktu@gmail.com>
2730
2731 * w32.c: Silence compiler warnings.
2732 (map_w32_filename): Remove unused variable `is_fat'.
2733 (chase_symlinks): Add parentheses around expression.
2734
1c6f11f4
GM
27352012-08-06 Glenn Morris <rgm@gnu.org>
2736
1db4583a
GM
2737 * sysdep.c: Respect BROKEN_GETWD.
2738
1c6f11f4
GM
2739 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
2740 Let configure handle it.
2741 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
2742
2b90362b
DA
27432012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2744
2745 Use GCALIGNMENT where appropriate.
2746 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
2747 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
2748 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
2749
5f50daf2
EZ
27502012-08-06 Eli Zaretskii <eliz@gnu.org>
2751
14ae4239
BT
2752 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
2753 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 2754
cbcc7007
SM
27552012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
2756
2757 * buffer.h (struct buffer): Revert `indirections' to a simple int;
2758 that should be sufficient for everyone.
2759
4d365fa4
JD
27602012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2761
2762 * keyboard.c (timer_check_2): Add break so timer_check returns next
2763 timeout.
2764
dd86bd82
DA
27652012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2766
2767 Fix Windows build errors introduced after converting to WGET and WSET.
2768 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
2769 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2770
054e1668
JD
27712012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2772
2773 * nsterm.m (ns_frame_rehighlight): Use FSET.
2774
2775 * nsmenu.m (ns_update_menubar): Use FSET.
2776
21238f11
DA
27772012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2778
2779 Separate read and write access to Lisp_Object slots of Lisp_Process.
2780 * process.h (PGET, PSET): New macros similar to AREF and ASET.
2781 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2782
077288cf
DA
27832012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2784
2785 Separate read and write access to Lisp_Object slots of struct window.
2786 * window.h (WGET, WSET): New macros similar to AREF and ASET.
2787 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2788 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2789 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2790 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2791 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2792 Adjust users.
2793
71688bd7
DA
27942012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2795
2796 Fix Windows build errors introduced after converting to FGET and FSET.
2797 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
2798 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
2799 (w32_judge_scroll_bars): Change to use FSET.
2800 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2801
f99bac93
DA
28022012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2803
2804 Fix replacement typo.
2805 * window.c (replace_window): Set root_window instead of
2806 selected_window. This fixes a total window subsystem
2807 malfunction reported by Bastien Guerry <bzg@gnu.org>.
2808
8c2a0f2d
GM
28092012-08-06 Glenn Morris <rgm@gnu.org>
2810
2811 * lisp.mk (lisp): Add language/persian.elc.
2812
edd74c35
DA
28132012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2814
2815 Separate read and write access to Lisp_Object slots of struct frame.
2816 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
2817 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2818 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2819 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2820 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2821
8671676c
AS
28222012-08-05 Andreas Schwab <schwab@linux-m68k.org>
2823
2824 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
2825
663e2b3f
DA
28262012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
2827
2828 Generalize common compile-time constants.
2829 * lisp.h (header_size, bool_header_size, word_size): Now here.
2830 (struct Lisp_Vector): Add comment.
2831 (struct Lisp_Bool_Vector): Move up to define handy constants.
2832 (VECSIZE, PSEUDOVECSIZE): Simplify.
2833 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
2834 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
2835 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
2836 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
2837 * xfont.c, xmenu.c: Use word_size where appropriate.
2838
d32e47af
LM
28392012-08-05 Lawrence Mitchell <wence@gmx.li>
2840
2841 * search.c (Freplace_match): Treat \? in the replacement text
2842 literally (Bug#8161).
2843
e5d9c0d1
CY
28442012-08-05 Chong Yidong <cyd@gnu.org>
2845
2846 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
2847 * frame.c (Vdelete_frame_functions):
2848 * emacs.c (Vkill_emacs_hook): Doc fix.
2849
8da0576b
EZ
28502012-08-04 Eli Zaretskii <eliz@gnu.org>
2851
2852 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
2853 --with-x-toolkit=no builds.
2854 Reported by Carsten Mattner <carstenmattner@gmail.com>.
2855
02676e5d
CY
28562012-08-04 Chong Yidong <cyd@gnu.org>
2857
2858 * syntax.c (Fmodify_syntax_entry): Doc fix.
2859
97147da9
EZ
28602012-08-04 Eli Zaretskii <eliz@gnu.org>
2861
76151e2c
EZ
2862 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
2863 * w32.c (init_environment): Change the default values of many
2864 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
2865 them into environment when they were not already defined.
2866 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 2867 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
2868 (check_windows_init_file): Now external, not static.
2869 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
2870 called when Vload_path is already set up.
2871
2872 * w32.h (check_windows_init_file): Add prototype.
2873
2874 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
2875 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
2876 compatibility with Posix platforms.
2877 (main): Move the call to check_windows_init_file to here from
2878 w32.c.
2879 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
2880 any, in the DEFALT argument into the root of the Emacs build or
2881 installation tree, as appropriate.
2882
2883 * callproc.c (init_callproc_1): Call decode_env_path instead of
2884 doing its equivalent by hand.
2885 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
2886 the code that sets Vexec_path run on MS-Windows.
2887
2888 * lread.c (init_lread): Add comments to #ifdef's.
2889
97147da9
EZ
2890 * msdos.c (dos_set_window_size, IT_update_begin)
2891 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
2892 instead of direct references.
2893
185ee146
PE
28942012-08-04 Paul Eggert <eggert@cs.ucla.edu>
2895
2896 Export DEFAULT_REHASH_* to GDB.
2897 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
2898 Now constants, not macros.
2899
8834c57a
PE
29002012-08-03 Paul Eggert <eggert@cs.ucla.edu>
2901
98c6f1e3
PE
2902 Remove unnecessary casts involving pointers.
2903 These casts are no longer needed now that we assume C89 or later,
2904 since they involve casting to or from void *.
2905 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
2906 (make_pure_float, make_pure_vector):
2907 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
2908 * macros.c (Fstart_kbd_macro):
2909 * menu.c (find_and_return_menu_selection):
2910 * minibuf.c (read_minibuf_noninteractive):
2911 * sysdep.c (closedir):
2912 * xdisp.c (x_produce_glyphs):
2913 * xfaces.c (compare_fonts_by_sort_order):
2914 * xfns.c (x_real_positions, select_visual):
2915 * xselect.c (x_stop_queuing_selection_requests)
2916 (x_get_window_property, x_get_window_property_as_lisp_data):
2917 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
2918 Remove unnecessary pointer casts.
2919 * alloc.c (record_xmalloc): New function.
2920 * lisp.h (record_xmalloc): New decl.
2921 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
2922 more like a function. This is because the pointer cast is not
2923 needed. All uses changed.
2924 * print.c (print_string, print_error_message): Avoid length recalc.
2925
8834c57a
PE
2926 Improve fix for macroexp crash with debugging (Bug#12118).
2927 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
2928 ARRAY_MARK_FLAG when checking subscripts, because ASET is
2929 not supposed to be invoked from the garbage collector.
2930 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
2931 (gc_aset): New function, which is like ASET but can be
2932 used in the garbage collector.
2933 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
2934 (set_hash_index): Use it instead of ASET.
2935
6dad7178
EZ
29362012-08-03 Eli Zaretskii <eliz@gnu.org>
2937
2938 Support symlinks on latest versions of MS-Windows.
2939 * w32.c: Include winioctl.h and aclapi.h.
2940 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
2941 (revert_to_self): Forward declarations of static functions.
2942 <static BOOL g_b_init_get_security_info>:
2943 <g_b_init_create_symbolic_link>: New static flags.
2944 (globals_of_w32): Initialize them to zero.
2945 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
2946 (map_w32_filename): Improve commentary. Simplify switch.
2947 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
2948 headers (most versions of MinGW w32api don't).
2949 (get_security_info, create_symbolic_link)
2950 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
2951 New functions.
2952 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
2953 in the argument file name.
2954 (sys_access): Call unc_volume_file_attributes only if
2955 GetFileAttributes fails with network-related error codes.
2956 (sys_rename): Diagnose renaming of a symlink when the user doesn't
2957 have the required privileges.
14ae4239 2958 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
2959 get_file_security_desc.
2960 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
2961 with addition of handling of symlinks and support for 'lstat'.
2962 If possible, get file's attributes and security information by
6dad7178
EZ
2963 handle, not by name. Produce S_IFLNK bit for symlinks, when
2964 called from 'lstat'.
2965 (stat, lstat): New functions, call 'stat_worker'.
2966 (symlink, readlink, careadlinkat): Rewritten to create and resolve
2967 symlinks when the underlying filesystem supports them.
2968
f162bcc3
PE
29692012-08-02 Paul Eggert <eggert@cs.ucla.edu>
2970
79ea6c20
PE
2971 Fix macroexp crash on Windows with debugging (Bug#12118).
2972 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
2973 checking subscripts; problem introduced with the recent
2974 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
2975 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
2976 since it's used in non-static inline functions now.
2977
c0ce93fd
PE
2978 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
2979 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 2980
f162bcc3
PE
2981 Use C99-style 'extern inline' if available.
2982 * buffer.h (BUFFER_INLINE):
2983 * category.h (CATEGORY_INLINE):
2984 * character.h (CHARACTER_INLINE):
2985 * charset.h (CHARSET_INLINE):
2986 * composite.h (COMPOSITE_INLINE):
2987 * dispextern.h (DISPEXTERN_INLINE):
2988 * lisp.h (LISP_INLINE):
2989 * systime.h (SYSTIME_INLINE):
2990 New macro, replacing 'static inline' in this header.
2991 * buffer.h, category.h, character.h, charset.h, composite.h:
2992 * dispextern.h, lisp.h, systime.h:
2993 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2994 * alloc.c (LISP_INLINE):
2995 * buffer.c (BUFFER_INLINE):
2996 * category.c (CATEGORY_INLINE):
2997 * character.c (CHARACTER_INLINE):
2998 * charset.c (CHARSET_INLINE):
2999 * composite.c (COMPOSITE_INLINE):
3000 * dispnew.c (DISPEXTERN_INLINE):
3001 * sysdep.c (SYSTIME_INLINE):
3002 Define to EXTERN_INLINE, so that the corresponding functions
3003 are compiled into code.
3004 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
3005 (INLINE_HEADER_END): New macros.
3006 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
3007 since it's used in non-static inline functions now.
a8333d03 3008 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 3009
837b365b
GM
30102012-08-02 Glenn Morris <rgm@gnu.org>
3011
d66b744d
GM
3012 * s/: Remove empty directory.
3013
837b365b
GM
3014 * s/ms-w32.h: Move to ../nt/inc.
3015 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
3016 Update for new ms-w32.h location.
3017
13294f95
PE
30182012-08-02 Paul Eggert <eggert@cs.ucla.edu>
3019
3020 Port to Solaris 8.
3021 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
3022
90df0db3
GM
30232012-08-02 Glenn Morris <rgm@gnu.org>
3024
3025 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
3026 hard-coding the path separator.
3027
4939150c
PE
30282012-08-01 Paul Eggert <eggert@cs.ucla.edu>
3029
3030 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
3031 This how ASET and AREF are supposed to work, and makes
3032 it easier to think about future improvements. See
3033 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
3034 * charset.h (set_charset_attr): New function.
3035 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
3036 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
3037 (aref_addr): New function. All uses of &AREF(...) changed.
3038 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
3039 (set_hash_index): New functions. All lvalue-style uses of
3040 HASH_KEY etc. changed.
3041 * keyboard.c (set_prop): New function. All lvalue-style uses
3042 of PROP changed.
3043
947b2afd
AA
30442012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
3045
3046 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
3047 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
3048 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
3049 * nsfns.m (ns_set_name_as_filename): Likewise.
3050 * nsmenu.m (ns_update_menubar): Likewise.
3051 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
3052
4f5d0325
EZ
30532012-08-01 Eli Zaretskii <eliz@gnu.org>
3054
2008beae
EZ
3055 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
3056 Adapt to latest changes in field names of the corresponding Lisp
288479f6 3057 objects.
2008beae 3058
4f5d0325
EZ
3059 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
3060
fe3cc771
GM
30612012-08-01 Glenn Morris <rgm@gnu.org>
3062
3063 * s/msdos.h: Remove file.
3064 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
3065 * Makefile.in (S_FILE): Remove.
3066 (config_h): Remove S_FILE.
3067
c90acc54
JB
30682012-08-01 Juanma Barranquero <lekktu@gmail.com>
3069
3070 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
3071 Remove; moved to nt/config.nt.
3072
d8a05828
DA
30732012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3074
3075 Use INTERNAL_FIELD for conses and overlays.
3076 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
3077 Remove obsolete comment.
3078 (MVAR): New macro.
3079 (struct Lisp_Overlay): Use INTERNAL_FIELD.
3080 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
3081
8271d590
DA
30822012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3083
3084 Use INTERNAL_FIELD for symbols.
3085 * lisp.h (SVAR): New macro. Adjust users.
3086 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
3087 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
3088
3193acd2
DA
30892012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3090
3091 Use INTERNAL_FIELD for processes.
3092 * process.h (PVAR): New macro. Adjust style.
3093 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
3094 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
3095
3a45383a
DA
30962012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3097
3098 Use INTERNAL_FIELD for windows.
3099 * window.h (WVAR): New macro.
3100 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
3101 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
3102 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
3103 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
3104 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
3105 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
3106
c1dbc63c
PE
31072012-08-01 Paul Eggert <eggert@cs.ucla.edu>
3108
3109 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
3110
5c0c0e8a
GM
31112012-08-01 Glenn Morris <rgm@gnu.org>
3112
3113 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
3114 Move to configure.ac.
3115
552a99b4
JB
31162012-08-01 Juanma Barranquero <lekktu@gmail.com>
3117
3118 * makefile.w32-in (CONFIG_H): Update dependencies.
3119 (CONF_POST_H): New macro.
3120
3121 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
3122
8d8e2dfe
GM
31232012-07-31 Glenn Morris <rgm@gnu.org>
3124
bc96620a
GM
3125 * Makefile.in (S_FILE): No longer set by configure.
3126
476b1b2d
GM
3127 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
3128 is available.
3129 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
3130
b2c7a106
GM
3131 * process.h (NULL_DEVICE):
3132 * emacs.c (SEPCHAR):
3133 * editfns.c (USER_FULL_NAME): Let configure set them.
3134
d53d062a
GM
3135 * s/README, s/template.h: Remove files.
3136
4515017f
GM
3137 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
3138
8d8e2dfe
GM
3139 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
3140 Move to configure.ac.
3141
5b20b3cc
EZ
31422012-07-31 Eli Zaretskii <eliz@gnu.org>
3143
1e0afd9a
EZ
3144 * .gdbinit (xframe): Adapt to introduction of FVAR and the
3145 resulting renaming of 'struct frame' members.
3146
5b20b3cc
EZ
3147 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
3148
3149 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
3150 after introduction of FVAR.
3151
f1310128
JD
31522012-07-31 Jan Djärv <jan.h.d@swipnet.se>
3153
79e721e0
JD
3154 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
3155
3156 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
3157 instead of compositeToPoint.
3158 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
3159
8d7c7eed 3160 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 3161
e34f7f79
DA
31622012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
3163
3164 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
3165 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 3166 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
3167 (BVAR): Change to use INTERNAL_FIELD.
3168 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
3169 (KVAR): Change to use INTERNAL_FIELD.
3170 * frame.h (FVAR): New macro.
3171 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
3172 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
3173 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
3174 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
3175 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
3176
c09bfb2f
DA
31772012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
3178
3179 Miscellaneous fixes for non-default X toolkits.
3180 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
3181 * xterm.c (x_frame_of_widget): Remove redundant prototype.
3182 Move under #ifdef USE_LUCID.
3183 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
3184 definition and usage to avoid warnings.
3185
14c114ae
JD
31862012-07-31 Jan Djärv <jan.h.d@swipnet.se>
3187
3188 * nsterm.m (openFiles): Fix previous checkin.
3189
3bd21e82
PE
31902012-07-31 Paul Eggert <eggert@cs.ucla.edu>
3191
3192 * indent.c (compute_motion): Remove unused local.
3193
c1529ded
GM
31942012-07-31 Glenn Morris <rgm@gnu.org>
3195
400d5621
GM
3196 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
3197
268e2432
GM
3198 * conf_post.h [USG5_4]:
3199 Move remaining contents of s/usg5-4-common.h here.
3200 * s/usg5-4-common.h: Remove file.
3201
7552f3ee
GM
3202 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
3203 * s/irix6-5.h: Remove file.
3204
6a381852
GM
3205 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
3206 * s/darwin.h: Remove file.
3207
c1529ded
GM
3208 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
3209 * s/hpux10-20.h: Remove file, which is now empty.
3210
b429a4ee
GM
32112012-07-30 Glenn Morris <rgm@gnu.org>
3212
3213 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
3214 * Makefile.in (config_h): Add conf_post.h.
3215 * makefile.w32-in (CONFIG_H): Add conf_post.h.
3216
adff3182
JD
32172012-07-30 Jan Djärv <jan.h.d@swipnet.se>
3218
3219 * nsterm.m (ns_do_open_file): New variable.
b9031d69 3220 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
3221 (openFile, openTempFile, openFileWithoutUI, openFiles):
3222 Open files only if ns_do_open_file.
adff3182 3223
c32af1e4
PE
32242012-07-30 Paul Eggert <eggert@cs.ucla.edu>
3225
7393bcbb
PE
3226 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
3227 This no-op macro hasn't been needed for many years.
3228 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
3229
c32af1e4
PE
3230 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
3231 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
3232 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
3233 gdb_make_enums_visible.
3234 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
3235 (DIRECTORY_SEP): Now a constant, not a macro.
3236
302fc036
EZ
32372012-07-30 Eli Zaretskii <eliz@gnu.org>
3238
3239 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
3240 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
3241
3242 * w32term.c <w32_keyboard_codepage>: Renamed from
3243 keyboard_codepage and now external. All users changed.
3244
3245 * w32term.h: Add declaration of w32_keyboard_codepage.
3246
3247 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
3248 the codepage to translate keys to Unicode. If this argument is
3249 -1, use the value returned by GetConsoleCP. All callers changed.
3250
88fb40b4
PE
32512012-07-30 Paul Eggert <eggert@cs.ucla.edu>
3252
0aee6912
PE
3253 Update .PHONY listings in makefiles.
3254 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
3255 bootstrap-clean, distclean, maintainer-clean, versioclean,
3256 extraclean, frc.
3257
88fb40b4
PE
3258 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
3259 This is a bit clearer. Fix some commentary typos.
3260
0a763bd1
GM
32612012-07-30 Glenn Morris <rgm@gnu.org>
3262
32bac6d6
GM
3263 * s/netbsd.h: Let configure include signal.h if needed.
3264 Remove file, which is now empty.
3265
b65e7c46
GM
3266 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
3267 Let configure set them.
3268 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
3269 No more need to undefine.
0a763bd1 3270
169304bd
AS
32712012-07-30 Andreas Schwab <schwab@linux-m68k.org>
3272
3273 * keymap.c (Fkey_description): Don't remove 0x80 bit from
3274 non-single-byte char when adding meta modifier. (Bug#12090)
3275
6cd7a139
DA
32762012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
3277
3278 Convert safe_call to use variable number of arguments.
3279 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
3280 (safe_call2): Fix comment.
3281 * lisp.h (safe_call): Adjust prototype.
3282 * coding.c (encode_coding_object): Change to use safe_call2.
3283 * xfaces.c (merge_face_heights): Change to use safe_call1.
3284
d34d6ffc
GM
32852012-07-30 Glenn Morris <rgm@gnu.org>
3286
7b8a48e4 3287 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 3288 does that unconditionally. Remove file, which is now empty.
7b8a48e4 3289
d34d6ffc
GM
3290 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
3291 Remove empty files.
3292
03a660a6
PE
32932012-07-30 Paul Eggert <eggert@cs.ucla.edu>
3294
3295 Export to GDB most of lisp.h's remaining object-like macros.
3296 * lisp.h (min, max): Move earlier, because they're used earlier now.
3297 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
3298 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
3299 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
3300 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
3301 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
3302 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
3303 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
3304 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
3305 Now constants, for GDB. They need not be macros.
3306 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
3307 Now constants, for GDB, as well as macros, for static initializers.
3308 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
3309 Move to after the definition of struct Lisp_Char_Table,
3310 since the former now needs that type defined.
3311 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
3312 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
3313 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
3314 New enums, for gdb_make_enums_visible.
3315 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 3316 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
3317 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
3318 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
3319 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
3320 enum maxargs, enum MAX_ALLOCA.
3321 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
3322 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
3323 no longer needed, now that they are done in lisp.h.
3324
e499d0ee
DA
33252012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
3326
3327 Cleanup string bytes checking.
3328 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
3329 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
3330 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
3331 (check_sblock, compact_small_strings): Simplify.
3332
d5040d2d
PE
33332012-07-29 Paul Eggert <eggert@cs.ucla.edu>
3334
3335 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
3336 These macros are confusing and no longer need to be defined, as
3337 the enum values now suffice. All uses replaced with definiens.
3338 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
3339
7f259ae6
JB
33402012-07-29 Juanma Barranquero <lekktu@gmail.com>
3341
3342 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
3343 ($(BLD)/w32console.$(O)): Update dependencies.
3344
7e63e0c3
DA
33452012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3346
3347 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
3348 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
3349 time. Adjust users.
3350 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
3351
ffd817eb
JD
33522012-07-29 Jan Djärv <jan.h.d@swipnet.se>
3353
3354 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
3355 setting sitelisp (Bug#12010).
3356
417a7a0e
EZ
33572012-07-29 Eli Zaretskii <eliz@gnu.org>
3358
14ae4239 3359 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
3360
3361 * w32heap.c (cache_system_info):
3362 * w32.c (sys_rename):
3363 * w32proc.c (find_child_console, sys_kill): All users changed.
3364
387d4d92
PE
33652012-07-29 Paul Eggert <eggert@cs.ucla.edu>
3366
3367 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
3368
55a6cca6
EZ
33692012-07-29 Eli Zaretskii <eliz@gnu.org>
3370
3371 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
3372
dbcf001c
DA
33732012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3374
3375 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
3376 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
3377 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 3378
e2688e4a
DA
33792012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3380
3381 Generalize marker debugging code under MARKER_DEBUG and use eassert.
3382 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
3383 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
3384 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
3385 (replace_range, replace_range_2, del_range_2): Change to eassert.
3386 * marker.c (byte_char_debug_check): Adjust style.
3387
b46a6a83
PE
33882012-07-29 Paul Eggert <eggert@cs.ucla.edu>
3389
3390 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
3391 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
3392 long-ago-commented-out code that talks about "WIN32".
3393 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
3394 All uses changed.
3395
e32a5799
PE
33962012-07-28 Paul Eggert <eggert@cs.ucla.edu>
3397
3398 Use Gnulib stdalign module (Bug#9772, Bug#9960).
3399 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
3400 Simplify by using alignof.
3401 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
3402 * lisp.h: Include <stdalign.h>.
3403 (GCALIGNMENT): New macro and constant.
3404 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
3405 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
3406 (stdalign): New macro, if not already defined.
3407
df81cd29
EZ
34082012-07-28 Eli Zaretskii <eliz@gnu.org>
3409
01bd1b0d
EZ
3410 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
3411 * w32inevt.c: Include w32inevt.h.
3412 (w32_read_console_input): New inline function, calls either
3413 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
3414 w32_console_unicode_input.
3415 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
3416 (w32_kbd_patch_key, key_event): Use the codepage returned by
3417 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
3418 (key_event): use uChar.UnicodeChar only if
3419 w32_console_unicode_input is non-zero.
3420
3421 * w32console.c: Include w32heap.h.
3422 <w32_console_unicode_input>: New global variable.
3423 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
3424 family of Windows, zero otherwise.
3425
3426 * w32inevt.h: Declare w32_console_unicode_input.
3427
df81cd29
EZ
3428 * xdisp.c (init_iterator): Don't reference tip_frame in a build
3429 --without-x. (Bug#11742)
3430
c20fdd9e
PE
34312012-07-27 Paul Eggert <eggert@cs.ucla.edu>
3432
3433 Adjust GDB to reflect pvec_type changes (Bug#12036).
3434 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
3435 2012-07-04 changes to pseudovector representation.
3436 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 3437
32770973 34382012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
3439
3440 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
3441 bus address.
3442 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
3443
3438fe21
EZ
34442012-07-27 Eli Zaretskii <eliz@gnu.org>
3445
bcfbc9de
EZ
3446 * alloc.c (listn): Fix the order the arguments are consed onto the
3447 list.
3448
3438fe21
EZ
3449 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
3450 enumeration constants, as PURE and HEAP are too general, and clash
3451 with other headers and sources, such as gmalloc.c and the
3452 MS-Windows system headers. All users changed.
3453
eeaea515
DA
34542012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3455
3456 Revert last save_excursion_save and save_excursion_restore changes.
3457 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
3458 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
3459
073c88c2
DA
34602012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3461
3462 Fix recently-introduced typos in Windows port.
3463 Reported by Martin Rudalics <rudalics@gmx.at>.
3464 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 3465 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 3466
4706125e
PE
34672012-07-27 Paul Eggert <eggert@cs.ucla.edu>
3468
3469 Improve GDB symbol export (Bug#12036).
3470 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
3471 arms of an 'if', not using conditional expressions; otherwise GDB
3472 complains about the types in the unevaluated arm when the argument
3473 is an integer literal.
3474 (xgetint): Simplify expression.
3475 * alloc.c (gdb_make_enums_visible): New constant. This ports to
3476 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
3477 Zaretskii in <http://bugs.gnu.org/12036#13>.
3478 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
3479 needed now that we have gdb_make_enums_visible.
3480 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
3481 (enum enum_USE_LSB_TAG):
3482 New enum types, packaging up enums that need to be exported to GDB.
3483
694b6c97
DA
34842012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3485
3486 Utility function to make a list from specified amount of objects.
3487 * lisp.h (enum constype): New datatype.
3488 (listn): New prototype.
3489 * alloc.c (listn): New function.
3490 (Fmemory_use_count, syms_of_alloc): Use it.
3491 * buffer.c (syms_of_buffer): Likewise.
3492 * callint.c (syms_of_callint): Likewise.
3493 * charset.c (define_charset_internal): Likewise.
3494 * coding.c (syms_of_coding): Likewise.
3495 * keymap.c (syms_of_keymap): Likewise.
3496 * search.c (syms_of_search): Likewise.
3497 * syntax.c (syms_of_syntax): Likewise.
3498 * w32.c (init_environment): Likewise.
3499 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
3500 * xdisp.c (syms_of_xdisp): Likewise.
3501 * xfns.c (syms_of_xfns): Likewise.
3502
6195f384
DA
35032012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3504
3505 Fast save_excursion_save and save_excursion_restore.
3506 * lisp.h (struct Lisp_Excursion): New data type.
3507 (PVEC_EXCURSION): New pseudovector type.
3508 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
3509 to deal with it. Adjust comments.
3510 (init_marker, attach_marker): New prototype.
3511 (unchain_marker): Adjust prototype.
3512 * marker.c (attach_marker): Change to global.
3513 (init_marker): New function.
3514 * alloc.c (Fmake_marker, build_marker): Use it.
3515 (build_marker): More easserts.
3516 (mark_object): Handle struct Lisp_Excursion.
3517 * editfns.c (save_excursion_save, save_excursion_restore):
3518 Reimplement to use struct Lisp_Excursion. Add comments.
3519
5eceb8fb
PE
35202012-07-26 Paul Eggert <eggert@cs.ucla.edu>
3521
3522 Fix export of symbols to GDB (Bug#12036).
3523 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
3524 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
3525 emacs.c, as this is a more-suitable home. Had this been done earlier
3526 the fix for 12036 would have avoided some of the problems noted in
3527 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
3528 would have been more obvious.
562157c8
PE
3529 * emacs.c: Do not include <verify.h>; no longer needed.
3530 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
3531 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
3532 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
3533 Remove; now done in lisp.h.
3534 * lisp.h (PUBLISH_TO_GDB): New macro.
3535 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
3536 (DATA_SEG_BITS): Use it.
3537 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
3538 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
3539 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
3540 not be usable in #if. This simplifies things.
3541
d6749401
JB
35422012-07-26 Juanma Barranquero <lekktu@gmail.com>
3543
3544 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
3545
1781b9e9
PE
35462012-07-26 Paul Eggert <eggert@cs.ucla.edu>
3547
d89518db 3548 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
3549 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
3550 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
3551 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
3552 Adjust to changes in lisp.h and emacs.c, by using
3553 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
3554 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
3555 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
3556 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
3557 instead of gdb_valbits.
3558 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
3559 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
3560 instead of gdb_array_mark_flag.
3561 (xboolvector): Get size from $->size, not $->header.size.
3562 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
3563 (xreload, hook-run, hookpost-run): Remove.
3564 * emacs.c: Include <verify.h>.
3565 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
3566 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
3567 Remove.
3568 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
3569 (gdb_USE_LSB_TAG): New enum constants.
3570 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
3571 Also define these as enum constants, so they're visible to GDB.
3572 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
3573 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
3574 as constants, so they're visible to GDB.
3575 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
3576 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
3577 Now enum constants, not macros, so they're visible to GDB.
3578 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
3579 more convenient now. All uses changed.
3580 (VALMASK) [USE_LSB_TAG]: Also define in this case.
3581 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
3582
3628596a
DA
35832012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
3584
3585 Explicitly free restriction data that are not needed anymore.
3586 * editfns.c (save_restriction_restore): Free restriction data.
3587
7abaf5cc
SM
35882012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
3589
3590 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
3591 add argument, tune behavior, and adjust all callers.
3592
71f88e00
PE
35932012-07-25 Paul Eggert <eggert@cs.ucla.edu>
3594
3595 Use typedef for EMACS_INT, EMACS_UINT.
3596 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
3597 than macros. This simplifies debugging in the usual case, since
3598 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
3599 and it allows expressions involving EMACS_INT casts.
3600 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
3601
57ec3034
JD
36022012-07-25 Jan Djärv <jan.h.d@swipnet.se>
3603
3604 * nsterm.m (ns_read_socket): Return early if there is a modal
3605 window (Bug#12043).
3606
8137e7b3
MR
36072012-07-25 Martin Rudalics <rudalics@gmx.at>
3608
3609 * frame.c (Fredirect_frame_focus): In doc-string don't mention
3610 that FOCUS-FRAME can be omitted.
3611
04e9897c
DA
36122012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
3613
3614 Adjust buffer text indirection counters at the end of Fkill_buffer.
3615 * buffer.c (Fkill_buffer): Adjust indirection counters when the
3616 buffer is definitely dead. This should really fix an issue reported
3617 by Christoph Scholtes again. (Bug#12007).
3618 (init_buffer_once): Initialize indirection counters of
3619 buffer_defaults and buffer_local_symbols (for sanity and safety).
3620
8a0484e1
EZ
36212012-07-24 Eli Zaretskii <eliz@gnu.org>
3622
3623 * xdisp.c (init_iterator): Don't compute dimensions of truncation
3624 and continuation glyphs on tooltip frames, leave them at zero.
3625 Avoids continued lines in tooltips. (Bug#11832)
3626
fa691a83
DA
36272012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
3628
3629 Simplify copy_overlay.
04e9897c 3630 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
3631 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
3632
436bc8e0
EZ
36332012-07-23 Eli Zaretskii <eliz@gnu.org>
3634
3635 * print.c (print_object): Don't crash when a frame's name is nil
3636 or invalid. (Bug#12025)
3637
3638 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
3639 it signals an error when a tooltip frame is being created.
3640
d7a7fda3
DA
36412012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3642
3643 Cleanup miscellaneous objects allocation and initialization.
3644 * alloc.c (allocate_misc): Change to static. Add argument to
3645 specify the subtype. Adjust comment and users.
3646 (build_overlay): New function.
3647 * buffer.c (copy_overlays, Fmake_overlay): Use it.
3648 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
3649 (allocate_misc): Remove prototype.
3650 (build_overlay): Add prototype.
3651
36522012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
3653
3654 Swap buffer text indirection counters in Fbuffer_swap_text.
3655 * buffer.c (Fbuffer_swap_text): Swap indirections too.
3656 This avoids crash reported by Christoph Scholtes at
3657 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
3658
9d7fa573
JD
36592012-07-22 Jan Djärv <jan.h.d@swipnet.se>
3660
3661 * nsmenu.m (Popdown_data): New struct.
3662 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
3663 free Popdown_data.
3664 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
3665 (initWithContentRect): Make imgView and contentView non-static
3666 and autorelease them. Also autorelease img and matrix (Bug#12005).
3667 (dealloc): Remove (Bug#12005).
3668
0dd6d66d
DA
36692012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3670
3671 Adjust consing_since_gc when objects are explicitly freed.
3672 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
3673 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
3674 (free_cons, free_misc): Subtract object size from consing_since_gc.
3675
d36d71df
DA
36762012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3677
3678 Simplify and cleanup markers positioning code.
3679 * marker.c (attach_marker): More useful eassert.
3680 (live_buffer, set_marker_internal): New function.
3681 (Fset_marker, set_marker_restricted): Use set_marker_internal.
3682 (set_marker_both, set_marker_restricted_both): Use live_buffer.
3683
fb9ea40f
PE
36842012-07-22 Paul Eggert <eggert@cs.ucla.edu>
3685
3686 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
3687 as it's limited by the amount of memory, not by INT_MAX.
3688
2d5c5f7d
EZ
36892012-07-21 Eli Zaretskii <eliz@gnu.org>
3690
07fb592e
EZ
3691 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
3692 in special-event-map. See the discussion at
3693 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
3694 for the reasons.
3695
37a9eac8 3696 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
3697 info.dwItemData. Fixes crashes on 64-bit Windows.
3698 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 3699
c4328746
JD
37002012-07-21 Jan Djärv <jan.h.d@swipnet.se>
3701
fc0c31f8 3702 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 3703 (conversationIdentifier): Return value is NSInteger.
784051c4 3704 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 3705
6e5d1c12
CY
37062012-07-21 Chong Yidong <cyd@gnu.org>
3707
3708 * window.c (decode_any_window): Signal an error if the window is
3709 on a dead frame (Bug#11984).
3710
9928463d
DA
37112012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3712
3713 Add indirection counting to speed up Fkill_buffer.
3714 * buffer.h (struct buffer): New member.
3715 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
3716 (Fmake_indirect_buffer): Set indirection counter to -1, increment
3717 base buffer indirection counter.
3718 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
3719 (Fkill_buffer): Adjust indirection counters as needed, don't walk
3720 through buffer list if indirection counter is 0.
3721
f8643a6b
DA
37222012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3723
3724 Extend the value returned by Fgarbage_collect with heap statistics.
3725 * alloc.c (Qheap): New symbol.
3726 (syms_of_alloc): DEFSYM it.
3727 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
3728 (Fmemory_free): Remove.
3729 (syms_of_alloc): Don't defsubr it.
3730 * buffer.c (Fcompact_buffer): Remove.
3731 (syms_of_buffer): Don't defsubr it.
3732
dac616ff
DA
37332012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3734
3735 Make maybe_gc inline.
3736 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
3737 * lisp.h (consing_since_gc, gc_relative_threshold)
3738 (memory_full_cons_threshold): Revert declaration.
3739 (maybe_gc): Remove prototype, define as inline.
3740 * alloc.c: Remove old commented-out code.
3741 (consing_since_gc, gc_relative_threshold)
3742 (memory_full_cons_threshold): Revert to global.
3743 (maybe_gc): Remove.
3744
d7ea76b4
DA
37452012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3746
3747 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
3748 * lisp.h (build_unibyte_string): New function.
3749 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
3750 * sysdep.c, w32fns.c, xfns.c: Use it.
3751 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
3752 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
3753 Adjust users accordingly.
3754 * font.h (font_open_by_name): Adjust prototype.
3755
765e61e3
DA
37562012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3757
3758 Cleanup calls to Fgarbage_collect.
3759 * lisp.h (maybe_gc): New prototype.
3760 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3761 Remove declarations.
3762 * alloc.c (maybe_gc): New function.
3763 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3764 Make them static.
3765 * bytecode.c (MAYBE_GC): Use maybe_gc.
3766 * eval.c (eval_sub, Ffuncall): Likewise.
3767 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
3768 to avoid dependency from auto-save feature.
3769
52b852c7
PE
37702012-07-19 Paul Eggert <eggert@cs.ucla.edu>
3771
3772 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
3773 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
3774 'for_each_per_buffer_object_at'.
3775 All uses changed. It's better to use upper-case for macros that
3776 cannot be implemented as functions, to give the reader a clue
3777 that they're special.
3778
5db81e33
SM
37792012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
3780
3781 * alloc.c (Fgarbage_collect): Tweak docstring.
3782
5b835e1d
DA
37832012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3784
3785 Tweak the value returned from Fgarbage_collect again.
3786 * alloc.c (Fgarbage_collect): New return value, as confirmed in
3787 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
3788 Adjust documentation.
3789 (total_vector_bytes): Rename to total_vector_slots, adjust
3790 accounting.
3791 (total_free_vector_bytes): Rename to total_free_vector_slots,
3792 adjust accounting.
3793 (Qstring_bytes, Qvector_slots): New symbols.
3794 (syms_of_alloc): DEFSYM them.
3795
9cd47b72
DA
37962012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3797
3798 Buffer compaction primitive which may be used from Lisp.
3799 * buffer.c (compact_buffer, Fcompact_buffer): New function.
3800 (syms_of_buffer): Register Fcompact_buffer.
3801 * alloc.c (Fgarbage_collect): Use compact_buffer.
3802 * buffer.h (compact_buffer): New prototype.
3803 (struct buffer_text): New member.
3804
d17337e5
DA
38052012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3806
3807 New macro to iterate over all buffers, miscellaneous cleanups.
3808 * lisp.h (all_buffers): Remove declaration.
3809 * buffer.h (all_buffers): Add declaration, with comment.
3810 (for_each_buffer): New macro.
3811 * alloc.c (Fgarbage_collect, mark_object): Use it.
3812 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
3813 (init_buffer): Likewise.
3814 * data.c (Fset_default): Likewise.
3815 * coding.c (code_conversion_restore): Remove redundant check
3816 for dead buffer.
3817 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
3818
60cfd278
AS
38192012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3820
3821 Fix bug that created negative-length intervals.
3822 * intervals.c (merge_interval_right, merge_interval_left):
3823 Do not zero out this interval if it is absorbed by its children,
3824 as this interval's total length doesn't change in that case. See
3825 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
3826
d06714cb
PE
38272012-07-18 Paul Eggert <eggert@cs.ucla.edu>
3828
83713154
PE
3829 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
3830 when invoking (make-bool-vector N t) and N is a positive
3831 multiple of 8 -- the last 8 bits were mistakenly cleared.
3832
d06714cb
PE
3833 Remove some struct layout assumptions in bool vectors.
3834 * alloc.c (bool_header_size): New constant.
3835 (header_size, word_size): Move earlier, as they're now used earlier.
3836 Use 'word_size' in a few more places, where it's appropriate.
3837 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
3838 padding before the data member of a bool vector.
3839 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
3840 than doing the check by hand with an abort ().
3841
464d5a5e
SM
38422012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
3843
5fbc0409
SM
3844 * eval.c (Fdefvar): Don't check constants since we only set the var if
3845 it's not yet defined anyway (bug#11904).
3846
464d5a5e
SM
3847 * lisp.h (last_undo_boundary): Declare new var.
3848 * keyboard.c (command_loop_1): Set it.
3849 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
3850 were auto-added by the command loop (bug#11774).
3851
8dc2e44a
AS
38522012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3853
3854 * w32font.c (Qsymbol): Remove local definition.
3855 (syms_of_w32font): Don't DEFSYM it.
3856
169925ec
DA
38572012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3858
3859 Fix sweep_vectors to handle large bool vectors correctly.
3860 * alloc.c (sweep_vectors): Account total_vector_bytes for
3861 bool vectors larger than VBLOCK_BYTES_MAX.
3862
5fbfb018
CY
38632012-07-18 Chong Yidong <cyd@gnu.org>
3864
3865 * frame.c (x_set_frame_parameters): Revert bogus change introduced
3866 in 2012-05-25 commit by Paul Eggert (Bug#11738).
3867
3ab6e069
DA
38682012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3869
3870 Return more descriptive data from Fgarbage_collect.
3871 Suggested by Stefan Monnier in
3872 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
3873 * alloc.c (bounded_number): New function.
3874 (total_buffers, total_vectors): New variable.
3875 (total_string_size): Rename to total_string_bytes, adjust users.
3876 (total_vector_size): Rename to total_vector_bytes, adjust users.
3877 (sweep_vectors): Account total_vectors and total_vector_bytes.
3878 (Fgarbage_collect): New return value. Adjust documentation.
3879 (gc_sweep): Account total_buffers.
3880 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
3881 (VECTOR_SIZE): Remove.
3882 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
3883 (Qinterval, Qmisc): New symbols.
3884 (syms_of_data): Initialize them.
3885 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
3886 (Qcons, Qbuffer): New declarations.
3887
6d02fe5b
PE
38882012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3889
3890 * alloc.c (Fmemory_free): Account for memory-free's own storage.
3891 Round up, not down. Improve doc.
3892
b7ffe040
DA
38932012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3894
3895 Restore old code in allocate_string_data to avoid Faset breakage.
3896 Reported by Julien Danjou <julien@danjou.info> in
3897 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
3898 * alloc.c (allocate_string_data): Restore old code with minor
3899 adjustments, fix comment to explain this subtle issue.
3900
4dc7c8d5
SM
39012012-07-17 Eli Zaretskii <eliz@gnu.org>
3902
3903 Remove FILE_SYSTEM_CASE.
3904 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
3905
3906 * fileio.c (FILE_SYSTEM_CASE): Don't define.
3907 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
3908 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
3909 call-process-region passes it through expand-file-name.
3910
3911 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
3912
39132012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3914
3915 Fix crash when creating indirect buffer (Bug#11917)
3916 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
3917 Don't handle unbound variables specially if non-zero.
3918 (Fbuffer_local_variables): Pass zero.
3919 (clone_per_buffer_values): Pass non-zero.
3920
39212012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3922
3923 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
3924 to make the loop interruptible.
3925
39262012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3927
3928 * gnutls.c (emacs_gnutls_handshake): Only retry if
3929 GNUTLS_E_INTERRUPTED.
3930
cce7fefc
DA
39312012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3932
3933 Cleanup and convert miscellaneous checks to eassert.
3934 * alloc.c (mark_interval): Fix comment, partially rephrase
3935 old comment from intervals.h (see below).
3936 * intervals.c (find_interval, adjust_intervals_for_insertion)
3937 (delete_interval, adjust_intervals_for_deletion)
3938 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
3939 Convert to eassert.
3940 (adjust_intervals_for_insertion, make_new_interval):
3941 Remove obsolete and unused code.
3942 * intervals.h (struct interval): Remove obsolete comment.
3943 * textprotp.c (erase_properties): Remove unused code.
3944 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
3945 (Fremove_list_of_text_properties): Convert to eassert.
3946
9ea10cc3
CY
39472012-07-17 Chong Yidong <cyd@gnu.org>
3948
3949 * editfns.c (Finsert_char): Doc fix.
3950
3900d5de
DA
39512012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3952
3953 Fix previous change to make Fmemory_free always accurate.
3954 * alloc.c (make_interval): Update total_free_intervals.
3955 (make_float): Likewise for total_free_floats.
3956 (free_cons, Fcons): Likewise for total_free_conses.
3957 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
3958 Likewise for total_free_vector_bytes.
3959 (Fmake_symbol): Likewise for total_free_symbols.
3960 (bytes_free): Remove.
3961
7098646f
DA
39622012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3963
3964 Simple free memory accounting feature.
3965 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
3966 (sweep_vectors): Accumulate size of free vectors.
3967 (Fgarbage_collect): Setup bytes_free.
3968 (Fmemory_free): New function.
3969 (syms_of_alloc): Register it.
3970
22657b40
DA
39712012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3972
3973 Cleanup overlays checking.
3974 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
3975 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
3976 eassert and OVERLAYP.
3977 (sort_overlays): Change to use OVERLAYP.
3978
ddfc8813
RK
39792012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
3980
3981 * editfns.c (Finsert_char): Make it interactive, and make the
3982 second arg optional. Copy interactive spec and docstring from
3983 ucs-insert.
3984
7c26cf3c
PE
39852012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3986
3987 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
3988 Unlike the other wrapped functions, fabs has an unspecified
3989 effect on errno.
3990
5d127af9
JD
39912012-07-16 Jan Djärv <jan.h.d@swipnet.se>
3992
3993 * nsterm.m (keyDown): Interpret flags without left/right bits
3994 as the left key (Bug#11670).
3995
6a0dd1d7
DA
39962012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3997
3998 Remove empty and useless init functions.
3999 * lisp.h (init_character_once, init_fns, init_image)
4000 (init_filelock, init_sound): Remove prototype.
4001 * character.c (init_character_once): Remove.
4002 * filelock.c (init_filelock): Likewise.
4003 * fns.c (init_fns): Likewise.
4004 * image.c (init_image): Likewise.
4005 * sound.c (init_sound): Likewise.
4006 * emacs.c (main): Adjust accordingly.
4007
7a6136fd
DA
40082012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4009
4010 * gtkutil.h: Tiny cleanups.
4011 (use_old_gtk_file_dialog): Remove useless declaration.
4012 (xg_uses_old_file_dialog): Add suggested const attribute.
4013
ce811ad9
EZ
40142012-07-15 Eli Zaretskii <eliz@gnu.org>
4015
4016 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
4017 (bidi_paragraph_init): Use it to limit search forward for a strong
4018 directional character in abnormally large paragraphs full of
4019 neutral or weak characters. (Bug#11943)
4020
c9adfeaa
SF
40212012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
4022
4023 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
4024 the toolbar (Bug#9451).
4025 (xg_make_tool_item): Give the widget event box a transparent
4026 background.
4027
fff62aa9
DA
40282012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4029
4030 Cleanup basic allocation variables and functions.
4031 * alloc.c (ignore_warnings, init_intervals, init_float)
4032 (init_cons, init_symbol, init_marker): Remove.
4033 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
4034 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
4035 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
4036 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
4037 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
4038 (staticidx, init_alloc_once, init_strings, free_ablock):
4039 Remove redundant initialization.
4040 * fns.c (init_weak_hash_tables): Remove.
4041 * lisp.h (init_weak_hash_tables): Remove prototype.
4042
9730daca
DA
40432012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4044
4045 Use zero_vector where appropriate.
4046 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
4047 accordingly.
4048 * lisp.h (zero_vector): New declaration.
4049 * font.c (null_vector): Remove.
4050 (syms_of_font): Remove initialization and staticpro.
4051 (font_list_entities, font_find_for_lface): Change to use zero_vector.
4052 * keymap.c (Faccessible_keymaps): Likewise.
4053
2e2d2a13
LL
40542012-07-15 Leo Liu <sdl.web@gmail.com>
4055
4056 * fringe.c: Fix typo in comments.
4057
cd276f6e
LL
40582012-07-14 Leo Liu <sdl.web@gmail.com>
4059
4060 * fringe.c: Add a new bitmap exclamation-mark.
4061
5a1131d9
EZ
40622012-07-14 Eli Zaretskii <eliz@gnu.org>
4063
4064 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
4065
4066 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
4067 (HAVE_MENUS): Don't define, defined by editing config.in with
4068 msdos/sed2v2.inp.
4069 (GMALLOC_INHIBIT_VALLOC): Don't define.
4070 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
4071
22e983b7
JB
40722012-07-14 Juanma Barranquero <lekktu@gmail.com>
4073
4074 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
4075
5b3f250f
GM
40762012-07-14 Glenn Morris <rgm@gnu.org>
4077
4078 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
4079 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
4080 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
4081
33d63ff4
GM
40822012-07-13 Glenn Morris <rgm@gnu.org>
4083
5b633342
GM
4084 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
4085
33d63ff4
GM
4086 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
4087 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
4088
b55b9f85
JD
40892012-07-13 Jan Djärv <jan.h.d@swipnet.se>
4090
0dc8cf50
JD
4091 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
4092 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
4093 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
4094 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
4095 where appropriate.
4096 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
4097 as boolean expression.
4098 (x_set_window_size): Remove unused variable toolbar.
4099 (ns_get_color_default, ns_mod_to_lisp): Remove.
4100 (ns_mouse_position): Remove unused variables xchar and ychar.
4101 (ns_compute_glyph_string_overhangs): Remove unused variable face.
4102 (ns_set_vertical_scroll_bar): Remove unused variable count.
4103 (ns_delete_terminal): Remove unused variable i.
4104 (ns_term_init): Remove unused variables r, g and b.
4105 (mouseDown): Remove unused variable window.
4106 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
4107 (initFrameFromEmacs): Remove unused variable vbextra.
4108 (mouseEntered): Remove unused variables p and dpyinfo.
4109 (mouseExited): Remove unused variables p and r.
4110 (ns_define_frame_cursor, ns_clear_frame_area)
4111 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
4112 (menuDown): Assign [sender tag] to variable and cast the variable.
4113
4114 * nsterm.h (menuDown): Add id as type to argument sender.
4115 (ns_display_info_for_name): Add Lisp_Object argument.
4116 (ns_term_init): Add Lisp_Object argument.
4117 (ns_map_event_to_object): Add void argument.
4118 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
4119 prototype with arguments and only declare if __OBJC__.
4120 (nxatoms_of_nsselect): Add void argument.
4121 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
4122 (ns_alloc_autorelease_pool): Add void argument.
4123 (ns_release_autorelease_pool): Add void* argument.
4124 (ns_get_defaults_value): Add const char* argument.
4125
4126 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
4127 (initFromContents): Use SSDATA where appropriate.
4128 (ns_update_menubar): Add braces to ambigous if-else.
4129 (initWithTitle): Put () around assignment in if statement.
4130 (ns_menu_show): Remove unused variables window and keymap.
4131 (update_frame_tool_bar): Remove unused variable selected_p.
4132 (initWithContentRect): Remove unused variable this_cmd_name.
4133
4134 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
4135 appropriate.
4136 (setXBMColor): Remove unused variable len.
4137 (setPixmapData): Put () around assignment in loop statement.
4138
4139 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
4140 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
4141 where appropriate.
4142 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
4143 around assignment in loop statement.
4144 (nsfont_open): Remove unused variable i.
4145 (nsfont_open): Remove unused variable len.
4146 (nsfont_draw): Remove unused variable cs.
4147
4148 * nsfns.m (x_set_icon_name, ns_set_name_internal)
4149 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
4150 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
4151 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
4152 (Fns_font_name, Fns_perform_service)
4153 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
4154 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
4155 (ns_set_name): Remove unused variable view.
4156 (x_set_menu_bar_lines): Remove unused variable olines.
4157 (x_set_tool_bar_lines): Remove unused variable root_window.
4158 (Fns_list_colors): Put () around assignment in while statement.
4159 (Fns_perform_service): Remove unused variable len.
4160 (Fns_display_usable_bounds): Remove unused variable top.
4161 (syms_of_nsfns): Remove unused variable i.
4162
b55b9f85
JD
4163 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
4164 memcpy (Bug#11907).
4165
ed9265fc 41662012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
4167
4168 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
4169 and free it with DestroyExceptionInfo (Bug#11558).
4170
ef099b57
JB
41712012-07-13 Juanma Barranquero <lekktu@gmail.com>
4172
4173 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
4174 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
4175 Set here, not in nt/config.nt.
4176
ea814a5d
EZ
41772012-07-13 Eli Zaretskii <eliz@gnu.org>
4178
4179 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
4180 cursor overflow into the last glyph on display line when the right
4181 fringe is off. (Bug#11832)
4182
1a952767
PE
41832012-07-13 Paul Eggert <eggert@cs.ucla.edu>
4184
4185 * xdisp.c (produce_special_glyphs): Now static.
4186 * dispextern.h (produce_special_glyphs): Remove decl.
4187
983188fd
GM
41882012-07-13 Glenn Morris <rgm@gnu.org>
4189
8d7c7eed 4190 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
4191 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
4192
983188fd
GM
4193 * s/usg5-4-common.h (USG, USG5):
4194 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
4195 * s/sol2-6.h (SOLARIS2):
4196 * s/irix6-5.h (IRIX6_5):
4197 * s/hpux10-20.h (USG, USG5, HPUX):
4198 * s/gnu-linux.h (USG, GNU_LINUX):
4199 * s/freebsd.h (BSD_SYSTEM):
4200 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
4201 * s/cygwin.h (CYGWIN):
4202 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
4203 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
4204
d1e68667 42052012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
4206
4207 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 4208
6de0e799
GM
42092012-07-13 Glenn Morris <rgm@gnu.org>
4210
739ae010
GM
4211 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
4212
dbee5793
GM
4213 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
4214
6de0e799
GM
4215 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
4216 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
4217
b82da769
GM
42182012-07-12 Glenn Morris <rgm@gnu.org>
4219
4fae5a7a 4220 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
4221
4222 * process.c (init_process_emacs): Rename from init_process.
4223 The old name is also the name of a Mach system call.
4224 * lisp.h, emacs.c: Update for this name change.
4225 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
4226 longer needed.
4227
5a979817
EZ
42282012-07-12 Eli Zaretskii <eliz@gnu.org>
4229
4230 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
4231 memmove call that removes glyphs covered by the left truncation
4232 glyph. Improve commentary.
4233 (display_line): Fix display of continuation glyphs on GUI frames
4234 when the right fringe is turned off and variable-size fonts are
4235 used in the window. Move the code that appends a stretch glyph to
4236 produce_special_glyphs, so that it could be used for truncation
4237 and continuation glyphs alike.
4238 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
4239 glyph of a suitably computed width, to align the special glyphs at
4240 the window margin. Code moved from display_line. (Bug#11832)
4241
3e91a053
GM
42422012-07-12 Glenn Morris <rgm@gnu.org>
4243
ba9e4b84
GM
4244 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
4245
4246 * s/gnu-linux.h, s/hpux10-20.h:
4247 Do not unconditionally define HAVE_XRMSETDATABASE.
4248
3e91a053
GM
4249 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
4250
b300b1f4
PE
42512012-07-12 Paul Eggert <eggert@cs.ucla.edu>
4252
4253 Fix typos that broke OS X build.
4254 Reported by Randal L. Schwartz in
4255 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
4256 * nsterm.m (ns_timeout): Add missing local decl.
4257 (ns_get_color): snprintf -> sprintf, to fix typo.
4258
6e777848
GM
42592012-07-12 Glenn Morris <rgm@gnu.org>
4260
3f922c37
GM
4261 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
4262 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
4263 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
4264 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
4265
0ab7b23a
GM
4266 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
4267 Move PTY_OPEN to configure.
4268
6e777848
GM
4269 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4270 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
4271 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
4272
4a7edc24
DA
42732012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
4274
4275 Use empty_unibyte_string where applicable.
4276 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
4277 * lread.c (read1): Likewise.
4278 * xsettings.c (syms_of_xsettings): Likewise.
4279
308aab79
GM
42802012-07-12 Glenn Morris <rgm@gnu.org>
4281
42bd1719
GM
4282 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
4283 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
4284 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
4285 * s/hpux10-20.h (RUN_TIME_REMAP):
4286 * s/bsd-common.h (TABDLY): Move to configure.
4287
4288 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
4289
4290 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
4291
ea0bbd17 4292 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 4293 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
4294
4295 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 4296
308aab79
GM
4297 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
4298 * s/template.h: Move NARROWPROTO to configure.
4299
ee1cf5cf
GM
43002012-07-11 Glenn Morris <rgm@gnu.org>
4301
30fe9bf4
GM
4302 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
4303 unused since 2011-01-17 change to systty.h.
4304
ee1cf5cf
GM
4305 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
4306 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
4307 Move HAVE_PTYS and HAVE_SOCKETS to configure.
4308
63e47e07
PE
43092012-07-11 Paul Eggert <eggert@cs.ucla.edu>
4310
4311 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
4312
c43fb4c3
GM
43132012-07-11 Glenn Morris <rgm@gnu.org>
4314
4315 * s/darwin.h, s/gnu-linux.h, s/template.h:
4316 Move INTERRUPT_INPUT to configure.
4317
e8df9267
DA
43182012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4319
4320 Minor adjustments to interning code.
4321 * lisp.h (intern, intern_c_string): Redefine as static inline
4322 wrappers for intern_1 and intern_c_string_1, respectively.
4323 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
4324 * lread.c (intern_1, intern_c_string_1, oblookup):
4325 Simplify Vobarray checking.
e8df9267
DA
4326 * font.c (font_intern_prop): Likewise. Adjust comment.
4327 * w32font.c (intern_font_name): Likewise.
4328
34348bd4
AS
43292012-07-11 Andreas Schwab <schwab@linux-m68k.org>
4330
d96a1e0c
AS
4331 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
4332
34348bd4
AS
4333 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
4334 of Fcar/Fcdr if possible.
4335 * font.c (check_otf_features): Likewise.
4336 * fontset.c (Fnew_fontset): Likewise.
4337 * gnutls.c (Fgnutls_boot): Likewise.
4338 * minibuf.c (read_minibuf): Likewise.
4339 * msdos.c (IT_set_frame_parameters): Likewise.
4340 * xmenu.c (Fx_popup_dialog): Likewise.
4341 * w32menu.c (Fx_popup_dialog): Likewise.
4342
c8add24e
GM
43432012-07-11 Glenn Morris <rgm@gnu.org>
4344
4b575b3c
GM
4345 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
4346 since nothing has defined it on these platforms.
4347
09f4e3b0
GM
4348 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
4349 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
4350
172bedef
GM
4351 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4352 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
4353 Move CLASH_DETECTION to configure.
4354
249685df
GM
4355 * s/gnu.h: Remove file, which is now empty.
4356
c8add24e
GM
4357 * s/gnu.h, s/gnu-linux.h:
4358 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
4359
b41253a3
JW
43602012-07-11 John Wiegley <johnw@newartisans.com>
4361
4362 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
4363 function attribute, so we only use it if it exists in the
4364 compiler.
4365
d923b542
DA
43662012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4367
4368 Avoid call to strlen in fast_c_string_match_ignore_case.
4369 * search.c (fast_c_string_match_ignore_case): Change to use
4370 length argument. Adjust users accordingly.
4371 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
4372
5ebbef1d
PE
43732012-07-11 Paul Eggert <eggert@cs.ucla.edu>
4374
bb352260
PE
4375 Assume mkdir, rmdir.
4376 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
4377 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
4378
57054ddd
PE
4379 Assume rename.
4380 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
4381
b747d3f7
PE
4382 Assume perror.
4383 * s/hpux10-20.h (HAVE_PERROR): Remove.
4384 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
4385 Remove dummy definition, as this problem was obsolete long ago.
4386
5ebbef1d
PE
4387 Assume strerror.
4388 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
4389
984e7f30
DA
43902012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4391
4392 Avoid calls to strlen in font processing functions.
4393 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
4394 (font_open_by_name): Change to use length argument.
4395 Adjust users accordingly.
d923b542
DA
4396 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
4397 Adjust prototypes.
4398 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
4399 Change to return ptrdiff_t.
984e7f30
DA
4400 (xfont_list_pattern, xfont_match): Use length returned by
4401 xfont_decode_coding_xlfd.
4402 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
4403
20e94fdd
GM
44042012-07-11 Glenn Morris <rgm@gnu.org>
4405
9d596af3
GM
4406 * s/darwin.h, s/freebsd.h, s/netbsd.h:
4407 Move DONT_REOPEN_PTY to configure.
4408
20e94fdd
GM
4409 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
4410 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
4411
e99a530f
PE
44122012-07-10 Paul Eggert <eggert@cs.ucla.edu>
4413
22ffb973
PE
4414 Remove "#define unix" that is no longer needed (Bug#11905).
4415 * s/aix4-2.h (unix): Remove; no longer needed.
4416
e9a9ae03
PE
4417 EMACS_TIME simplification (Bug#11875).
4418 This replaces macros (which typically do not work in GDB)
4419 with functions, typedefs and enums, making the code easier to debug.
4420 The functional style also makes code easier to read and maintain.
4421 * systime.h: Include <sys/time.h> on all hosts, not just if
4422 WINDOWSNT, since 'struct timeval' is needed in general.
4423 (EMACS_TIME): Now a typedef, not a macro.
4424 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
4425 not macros.
4426 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
4427 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
4428 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
4429 (EMACS_TIME_LE): Now functions, not macros.
4430 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
4431 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
4432 which are not functions. All uses rewritten to use:
4433 (make_emacs_time): New function.
4434 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
4435 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
4436 not functions. All uses rewritten to use the following, respectively:
4437 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
4438 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 4439 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
4440 * fileio.c (Fcopy_file):
4441 * xterm.c (XTflash): Get the current time closer to when it's used.
4442 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
4443
ffacb126
PE
4444 * bytecode.c (targets): Suppress -Woverride-init warnings.
4445
e99a530f
PE
4446 Simplify by avoiding confusing use of strncpy etc.
4447 * doc.c (Fsnarf_documentation):
4448 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
4449 * frame.c (Fmake_terminal_frame):
4450 * gtkutil.c (get_utf8_string):
4451 * lread.c (openp):
4452 * nsmenu.m (ns_update_menubar):
4453 * regex.c (regerror):
4454 Prefer memcpy to strncpy and strncat when either will do.
4455 * fileio.c (Fsubstitute_in_file_name):
4456 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
4457 (menu_separator_name_p):
4458 * nsmenu.m (ns_update_menubar):
4459 Prefer memcmp to strncmp when either will do.
4460 * nsterm.m: Include <ftoastr.h>.
4461 (ns_get_color):
4462 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
4463 Prefer snprintf to strncpy.
4464 * nsterm.m (ns_term_init):
4465 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
4466 * nsterm.m (ns_term_init):
4467 Avoid the need for strncpy, by using build_string or
4468 make_unibyte_string directly. Use dtoastr, not snprintf.
4469 * process.c (Fmake_network_process): Diagnose service names that
4470 are too long, rather than silently truncating them or creating
4471 non-null-terminated names.
4472 (Fnetwork_interface_info): Likewise, for interface names.
4473 * sysdep.c (system_process_attributes) [GNU_LINUX]:
4474 Prefer sprintf to strncat.
4475 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
4476 Prefer vsnprintf to vsprintf + strncpy.
4477
c59592b3
GM
44782012-07-10 Glenn Morris <rgm@gnu.org>
4479
4480 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
4481 Clarify fallback case.
4482
7d7bbefd
DA
44832012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4484
4485 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
4486 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
4487 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 4488 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
4489 where argument type is known to be a Lisp_Cons.
4490
3a4c8000
TT
44912012-07-10 Tom Tromey <tromey@redhat.com>
4492
4493 * bytecode.c (BYTE_CODE_THREADED): New macro.
4494 (BYTE_CODES): New macro. Replaces all old byte-code defines.
4495 (enum byte_code_op): New type.
4496 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
4497 (exec_byte_code): Use them. Use token threading when applicable.
4498
2a0213a6
DA
44992012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4500
4501 Optimize pure C strings initialization.
4502 * lisp.h (make_pure_string): Fix prototype.
4503 (build_pure_c_string): New function, defined as static inline. This
4504 provides a better opportunity to optimize away calls to strlen when
4505 the function is called with compile-time constant argument.
4506 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
4507 argument, adjust users accordingly. Use build_pure_c_string where
4508 appropriate.
4509 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
4510 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
4511 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
4512
cb1caeaf
DA
45132012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4514
4515 Avoid calls to strlen in miscellaneous functions.
4516 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
4517 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
4518 * lread.c (openp): Likewise.
4519
c293e30c
DA
45202012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4521
4522 Avoid calls to strlen in path processing functions.
4523 * fileio.c (file_name_as_directory): Add comment. Change to add
4524 srclen argument and return the length of result. Adjust users
4525 accordingly.
4526 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
4527 swap 1st and 2nd arguments to obey the common convention.
4528 Adjust users accordingly.
c293e30c
DA
4529 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
4530
9e059e3f
GM
45312012-07-10 Glenn Morris <rgm@gnu.org>
4532
d02eb359
GM
4533 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
4534 Move PENDING_OUTPUT_COUNT definition to configure.
4535
882cf227
GM
4536 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
4537 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
4538 * s/gnu.h (DATA_START): Move definitions to configure.
4539
af6e839f
GM
4540 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
4541 We include usg5-4-common.h, which defines them both.
4542
40289a12
GM
4543 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
4544 O_RDONLY already includes it).
4545
9e059e3f
GM
4546 Stop ns builds setting the EMACSLOADPATH environment variable.
4547 * nsterm.m (ns_load_path): Rename from ns_init_paths.
4548 Now it does not set EMACSLOADPATH, just returns the load-path string.
4549 * nsterm.h: Update accordingly.
4550 * lread.c [HAVE_NS]: Include nsterm.h.
4551 (init_lread) [HAVE_NS]: Use ns_load_path.
4552 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
4553
7c4e8ec0
GM
45542012-07-09 Glenn Morris <rgm@gnu.org>
4555
d4f600ff
GM
4556 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
4557 since the included bsd-common.h does so.
4558
cbb31951
GM
4559 Stop ns builds setting the EMACSPATH environment variable.
4560 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
4561 (ns_init_paths): Do not set EMACSPATH.
4562 * nsterm.h (ns_exec_path): Add it.
4563 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
4564 Use ns_exec_path.
4565
7c4e8ec0
GM
4566 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
4567
26bccfae
PE
45682012-07-09 Paul Eggert <eggert@cs.ucla.edu>
4569
a0bee46f
PE
4570 * process.c (wait_reading_process_output): 'waitchannels' was unset
4571 when read_kbd || !NILP (wait_for_cell); fix this.
4572
5994c183
PE
4573 Add GCC-style 'const' attribute to functions that can use it.
4574 * character.h (char_resolve_modifier_mask):
4575 * keyboard.h (make_ctrl_char):
4576 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
4577 (init_character_once, next_almost_prime, init_fns, init_image)
4578 (flush_pending_output, init_sound):
4579 * mem-limits.h (start_of_data):
4580 * menu.h (finish_menu_items):
4581 Add ATTRIBUTE_CONST.
4582 * emacs.c (DEFINE_DUMMY_FUNCTION):
4583 Declare the dummy function with ATTRIBUTE_CONST.
4584 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
4585 Add decls with ATTRIBUTE_CONST.
4586
26bccfae
PE
4587 Minor improvements to make_formatted_string.
4588 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
4589 where int is good enough, as vsprintf returns an int.
4590 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
4591
a8290ec3
DA
45922012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4593
4594 Use make_formatted_string to avoid double length calculation.
4595 * lisp.h (make_formatted_string): New prototype.
4596 * alloc.c (make_formatted_string): New function.
4597 * buffer.c (Fgenerate_new_buffer_name): Use it.
4598 * dbus.c (syms_of_dbusbind): Likewise.
4599 * editfns.c (Fcurrent_time_zone): Likewise.
4600 * filelock.c (get_boot_time): Likewise.
4601 * frame.c (make_terminal_frame, set_term_frame_name)
4602 (x_report_frame_params): Likewise.
4603 * image.c (gs_load): Likewise.
4604 * minibuf.c (get_minibuffer): Likewise.
4605 * msdos.c (dos_set_window_size): Likewise.
4606 * process.c (make_process): Likewise.
4607 * xdisp.c (ensure_echo_area_buffers): Likewise.
4608 * xsettings.c (apply_xft_settings): Likewise.
4609
d01ba2f1
GM
46102012-07-09 Glenn Morris <rgm@gnu.org>
4611
4612 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
4613 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
4614 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
4615 * nsterm.h (ns_etc_directory): Add it.
4616 * callproc.c [HAVE_NS]: Include nsterm.h.
4617 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
4618
f1f924b6
DA
46192012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4620
4621 Move marker debugging code under MARKER_DEBUG.
4622 * marker.c (MARKER_DEBUG): Move marker debugging code under
4623 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
4624 for bootstrap with --enable-checking (~3x slowdown reported
4625 by Juanma Barranquero <lekktu@gmail.com>).
4626 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
4627
ab531b66
PE
46282012-07-08 Paul Eggert <eggert@cs.ucla.edu>
4629
4630 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
4631 See <http://bugs.gnu.org/11825#29>.
4632
c4b3bc8a
EZ
46332012-07-08 Eli Zaretskii <eliz@gnu.org>
4634
4635 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
4636 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
4637 (display_line): Add commentary about displaying truncation glyphs
4638 on GUI frames.
4639 (produce_special_glyphs): Move here from term.c.
4640
4641 * term.c (produce_special_glyphs): Move to xdisp.c.
4642
4643 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
4644 section.
c4b3bc8a 4645
b676b881
AS
46462012-07-07 Andreas Schwab <schwab@linux-m68k.org>
4647
f17c5273
AS
4648 * xdisp.c (display_line): Avoid warning about implicit declaration
4649 of FRAME_FONT.
4650
298819b9
AS
4651 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
4652
b676b881
AS
4653 * lisp.h: Remove empty conditional.
4654
6045c4fd
PE
46552012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4656
b3350bf9
PE
4657 * lread.c (load_path_check): Now static.
4658
6045c4fd
PE
4659 Fix some minor --with-ns problems found by static checking.
4660 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
4661 (x_set_font) [!HAVE_X_WINDOWS]:
4662 * image.c (xpm_load_image) [HAVE_NS]:
4663 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
4664 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
4665 Remove unused local.
4666 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
4667 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
4668 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
4669 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
4670 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
4671 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
4672 Fix pointer signedness problem.
4673 * xfaces.c (FRAME_X_FONT_TABLE):
4674 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
4675
929e7845
GM
46762012-07-07 Glenn Morris <rgm@gnu.org>
4677
4678 * lread.c (load_path_check): New function, split from init_lread.
4679 (init_lread): Reorganize. Motivation:
4680 If EMACSLOADPATH is set, check/warn about that rather than the
4681 defaults, which we are not going to use. Hence we can remove
4682 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
4683 Don't warn if site-lisp directories are missing.
4684 If not installed, start from a blank load-path, since
4685 PATH_LOADSEARCH refers to the eventual installation directories.
4686
58dd0aa4
EZ
46872012-07-07 Eli Zaretskii <eliz@gnu.org>
4688
4689 Support truncation and continuation glyphs on GUI frames, when
4690 fringes are disabled. (Bug#11832)
4691 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
4692 continuation glyphs even if on GUI frames.
4693 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
4694 or both, are absent.
4695 (start_display, move_it_in_display_line_to): Handle the case of a
4696 GUI frame without a fringe to display continuation or truncation
4697 glyphs.
4698 (insert_left_trunc_glyphs): Support GUI frames: make sure
4699 truncation glyphs overwrite enough glyphs from the current line to
4700 have sufficient space in pixels.
4701 (display_line): Support truncation and continuation glyphs on GUI
4702 frames. If some spare pixels are left on the line after inserting
4703 the truncation glyphs, fill that space with a stretch glyph of a
4704 suitably computed width.
4705
4706 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
4707 produce_glyphs, to support GUI sessions.
4708
31571fd7
PE
47092012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4710
5a16b9bc
PE
4711 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
4712
f3047c75
PE
4713 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
4714
31571fd7
PE
4715 Do not require float-time's arg to fit in time_t (Bug#11825).
4716 This works better on hosts where time_t is unsigned, and where
4717 float-time is applied to the (negative) difference between two times.
4718 * editfns.c (decode_time_components): Last arg is now double *,
4719 not int *, and means to store all the result as a double, without
4720 worrying about whether the seconds part fits in time_t.
4721 All callers changed.
4722 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
4723 All callers changed.
4724 (Ffloat_time): Do not fail merely because the specified time falls
4725 outside of time_t range.
4726
4516fbef
GM
47272012-07-07 Glenn Morris <rgm@gnu.org>
4728
4729 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
4730 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
4731 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
4732
07adc2c6
JB
47332012-07-07 Juanma Barranquero <lekktu@gmail.com>
4734
4735 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
4736 Update dependencies.
4737
4738 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
4739
fd573f31
PE
47402012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4741
fee5959d
PE
4742 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
4743 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
4744 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
4745 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
4746 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
4747 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
4748
fd573f31
PE
4749 * xfont.c (compare_font_names): Redo to omit the need for casts.
4750
ddadbc0e
AS
47512012-07-06 Andreas Schwab <schwab@linux-m68k.org>
4752
fca8d6b6
AS
4753 * xfns.c (Fx_change_window_property): Doc fix.
4754 * w32fns.c (Fx_change_window_property): Doc fix.
4755
ddadbc0e
AS
4756 * w32fns.c (Fx_window_property): Accept the same arguments as the
4757 X Windows version. Doc fix.
4758 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
4759
ed9265fc 47602012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
4761 Eli Zaretskii <eliz@gnu.org>
4762
4763 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
4764 Windows-specific code from nt/config.nt moved here.
4765 Obsolete settings removed.
4766
216ee680
PE
47672012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4768
4769 * process.c: Avoid unnecessary calls to gettime.
4770 (wait_reading_process_output): Don't get the time of day
4771 when gobbling data immediately and not waiting, as there's no need
4772 for it in that case. This removes a FIXME.
4773
bdd091e4
JD
47742012-07-06 Jan Djärv <jan.h.d@swipnet.se>
4775
4776 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
4777 is defined (Bug#11768).
4778
9d44f8ce
DA
47792012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4780
4781 Fix marker debugging code.
4782 * marker.c (byte_char_debug_check): Do not perform the check
4783 if buffer is not multibyte.
090bd7cb
JB
4784 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4785 Call byte_char_debug_check with correct arguments.
9d44f8ce 4786
90fc4786
DA
47872012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4788
4789 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
4790 * marker.c (byte_char_debug_check, count_markers):
4791 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
4792 (byte_debug_flag): Remove.
4793 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4794 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
4795
7b7ae965
DA
47962012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4797
4e57b342
DA
4798 Avoid code repetition in marker-related functions.
4799 * marker.c (attach_marker): New function.
4800 (Fset_marker, set_marker_restricted, set_marker_both)
4801 (set_marker_restricted_both): Use it.
4802 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
4803 Consistently rename charno to charpos.
4804 (marker_position): Add eassert.
4805 (marker_byte_position): Convert to eassert.
4806
48072012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4808
4809 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 4810 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 4811 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 4812
657924ff
DA
48132012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4814
4815 Introduce fast path for the widely used marker operation.
4816 * alloc.c (build_marker): New function.
4817 * lisp.h (build_marker): New prototype.
4818 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
4819 * composite.c (autocmp_chars): Likewise.
4820 * editfns.c (buildmark): Remove.
4821 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
4822 (save_restriction_save): Use build_marker.
4823 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
4824 * window.c (save_window_save): Likewise.
4825
041a49a6
DA
48262012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4827
4828 Do not use Fdelete_overlay in delete_all_overlays
4829 to avoid redundant calls to unchain_overlay.
4830 * buffer.c (drop_overlay): New function.
4831 (delete_all_overlays, Fdelete_overlay): Use it.
4832 * minibuf.c (get_minibuffer): Fix comment.
4833
7dca65a4
PE
48342012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4835
4836 Port to OpenBSD 5.1 amd64.
4837 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
4838 This is needed for OpenBSD, and should be harmless on all BSD systems.
4839 Also, include <sys/sysctl.h>, as it should be available on all
4840 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
4841 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
4842 use p_pid member, not kp_proc.pid.
4843
8eb876e2
GM
48442012-07-06 Glenn Morris <rgm@gnu.org>
4845
4846 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
4847
38182d90
PE
48482012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4849
4850 More xmalloc and related cleanup.
4851 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
4852 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
4853 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
4854 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
4855 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
4856 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
4857 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
4858 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
4859 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
4860 * xterm.c:
4861 Omit needless casts involving void * pointers and allocation.
4862 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
4863 as the former is more robust if P's type is changed.
4864 Prefer xzalloc to xmalloc + memset 0.
4865 Simplify malloc-or-realloc to realloc.
4866 Don't worry about xmalloc returning a null pointer.
4867 Prefer xstrdup to xmalloc + strcpy.
4868 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
4869 growing it.
4870 * keyboard.c (apply_modifiers_uncached): Prefer local array to
4871 alloca of a constant.
4872
6dd5a677
EZ
48732012-07-05 Eli Zaretskii <eliz@gnu.org>
4874
4875 * xdisp.c (display_line): Fix horizontal pixel coordinates when
4876 hscroll is larger than the line width. Fixes long and futile
4877 looping inside extend_face_to_end_of_line (on a TTY) producing
4878 glyphs that are not needed and thrown away.
4879
6b312f0f
DA
48802012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4881
4882 * marker.c (set_marker_restricted_both): Simplify by using
4883 clip_to_bounds.
4884
f520ef9b
PE
48852012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4886
4887 * editfns.c (region_limit): Simplify by using clip_to_bounds.
4888
383b7c95
JD
48892012-07-05 Jan Djärv <jan.h.d@swipnet.se>
4890
4891 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
4892 not defined (Bug#11768).
4893 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
4894 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
4895 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
4896 followed by gtk_box_set_homogeneous (Bug#11768).
4897 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
4898 (update_theme_scrollbar_width, xg_create_scroll_bar):
4899 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
4900 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
4901 (is_box_type): New function (Bug#11768).
4902 (xg_tool_item_stale_p): Call is_box_type.
5293d758 4903 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
4904 with default display (Bug#11768).
4905
d6e7bf45
EZ
49062012-07-05 Eli Zaretskii <eliz@gnu.org>
4907
4908 * xdisp.c (window_hscroll_limited): New function.
4909 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
4910 coordinates when window's hscroll is set to insanely large
4911 values. (Bug#11857)
4912
431391ec
JB
49132012-07-05 Juanma Barranquero <lekktu@gmail.com>
4914
4915 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
4916 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
4917
23f86fce
DA
49182012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4919
4920 Cleanup xmalloc.
4921 * lisp.h (xzalloc): New prototype. Omit needless casts.
4922 * alloc.c (xzalloc): New function. Omit needless casts.
4923 * charset.c: Omit needless casts. Convert all calls to
4924 xmalloc with following memset to xzalloc.
4925 * dispnew.c: Likewise.
4926 * fringe.c: Likewise.
4927 * image.c: Likewise.
4928 * sound.c: Likewise.
4929 * term.c: Likewise.
4930 * w32fns.c: Likewise.
4931 * w32font.c: Likewise.
4932 * w32term.c: Likewise.
4933 * xfaces.c: Likewise.
4934 * xfns.c: Likewise.
4935 * xterm.c: Likewise.
4936 * atimer.c: Omit needless casts.
4937 * buffer.c: Likewise.
4938 * callproc.c: Likewise.
4939 * ccl.c: Likewise.
4940 * coding.c: Likewise.
4941 * composite.c: Likewise.
4942 * doc.c: Likewise.
4943 * doprnt.c: Likewise.
4944 * editfns.c: Likewise.
4945 * emacs.c: Likewise.
4946 * eval.c: Likewise.
4947 * filelock.c: Likewise.
4948 * fns.c: Likewise.
4949 * gtkutil.c: Likewise.
4950 * keyboard.c: Likewise.
4951 * lisp.h: Likewise.
4952 * lread.c: Likewise.
4953 * minibuf.c: Likewise.
4954 * msdos.c: Likewise.
4955 * print.c: Likewise.
4956 * process.c: Likewise.
4957 * region-cache.c: Likewise.
4958 * search.c: Likewise.
4959 * sysdep.c: Likewise.
4960 * termcap.c: Likewise.
4961 * terminal.c: Likewise.
4962 * tparam.c: Likewise.
4963 * w16select.c: Likewise.
4964 * w32.c: Likewise.
4965 * w32reg.c: Likewise.
4966 * w32select.c: Likewise.
4967 * w32uniscribe.c: Likewise.
4968 * widget.c: Likewise.
4969 * xdisp.c: Likewise.
4970 * xmenu.c: Likewise.
4971 * xrdb.c: Likewise.
4972 * xselect.c: Likewise.
4973
0497dc44
PE
49742012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4975
4976 * fileio.c (time_error_value): Check the right error number.
4977 Problem reported by Troels Nielsen in
4978 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
4979
356e7178
PE
49802012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4981
4e71fd89
PE
4982 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
4983 This should be fixed in a better way; see Eli Zaretskii in
4984 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
4985 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
4986
f0941253
PE
4987 * fileio.c (time_error_value): Rename from special_mtime.
4988 The old name's problems were noted by Eli Zaretskii in
4989 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
4990
065c9eb4
PE
4991 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
4992 This variable's comment says Emacs needs at least one GDB-visible
4993 symbol of type enum pvec_type, to work around GDB problems.
4994 The symbol's value doesn't matter.
4995
356e7178
PE
4996 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
4997 that causes compilation to fail on pre-C99 compilers.
4998
ed9265fc 49992012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
5000
5001 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
5002 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
5003
3884d954
DA
50042012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5005
d209e2fb 5006 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
5007 headers for buffer_defaults and buffer_local_symbols.
5008 Reported by Juanma Barranquero <lekktu@gmail.com>.
5009
ee28be33
SM
50102012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
5011
5012 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
5013 * lisp.h (enum pvec_type): Use fewer bits.
5014 (PSEUDOVECTOR_SIZE_BITS): New constant.
5015 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
5016 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
5017 change in pvec_type.
5018 (PSEUDOVECTOR_TYPEP): New macro.
5019 (TYPED_PSEUDOVECTORP): Use it.
5020 * fns.c (internal_equal): Adapt code to extract pvectype.
5021 * emacs.c (gdb_pvec_type): Update type.
5022 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
5023 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
5024 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
5025 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
5026 (sweep_vectors): Use it. Use local var `total_bytes' instead of
5027 abusing vector->header.next.nbytes.
5028 (live_vector_p): Use PVEC_TYPE.
5029 (mark_object): Adapt code to extract pvectype. Use switch.
5030
c7f2cd7f
PE
50312012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5032
5033 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
5034 Tighten new eassert a bit.
5035
8ce70ed2
DA
50362012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5037
5038 Fix compilation with --enable-gcc-warnings and -O1
5039 optimization level.
5040 * doprnt.c (doprnt): Change type of tem to int, initialize
5041 to avoid compiler warning. Add eassert.
5042 * search.c (simple_search): Initialize match_byte to avoid
5043 compiler warning. Add eassert.
5044
dea7f1e5
PE
50452012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5046
24a212eb
PE
5047 Avoid weird behavior with large horizontal scrolls.
5048 Without this change, for example, large hscroll values would
5049 mess up Emacs's display on Fedora 15 x86, presumably due to
5050 overflows in int calculations in the display code.
5051 Also, if buffers had long lines, Emacs would freeze.
5052 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
5053 (set_window_hscroll): New function, containing the old guts of
5054 Fset_window_hscroll. Return the clipped value.
5055 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
5056 This avoids the need to check against PTRDIFF_MAX.
5057
dea7f1e5
PE
5058 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
5059
76046526
DA
50602012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5061
5062 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
5063
39adff0d
PE
50642012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5065
63807d47
PE
5066 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
5067 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
5068 since GCC 4.4.6 issues a bogus warning for them.
5069
39adff0d
PE
5070 Fix bugs in file timestamp newness comparisons.
5071 * fileio.c (Ffile_newer_than_file_p):
5072 * lread.c (Fload): Use full timestamp resolution of files,
5073 not just the 1-second resolution, so that files that are only
5074 slightly newer still count as newer.
5075 * fileio.c (Ffile_newer_than_file_p): Don't assume file
5076 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
5077
dbeed9a6
PE
50782012-07-03 Paul Eggert <eggert@cs.ucla.edu>
5079
5080 * fileio.c: Improve handling of file time marker. (Bug#11852)
5081 (special_mtime): New function.
5082 (Finsert_file_contents, Fverify_visited_file_modtime):
5083 Use it to set special mtime values consistently.
5084
636334d6
AS
50852012-07-03 Andreas Schwab <schwab@linux-m68k.org>
5086
5087 * fileio.c (Finsert_file_contents): Properly handle st_mtime
5088 marker for non-existing file. (Bug#11852)
5089
e2017fe2
GM
50902012-07-03 Glenn Morris <rgm@gnu.org>
5091
5092 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
5093 and did not make it into globals.h).
5094
404dbd37
TT
50952012-07-03 Tom Tromey <tromey@redhat.com>
5096
5097 * window.c (Fset_window_margins, Fset_window_fringes)
5098 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
5099 * textprop.c (Fprevious_property_change): No longer static.
5100 * syntax.c (Fsyntax_table_p): No longer static.
5101 * process.c (Fget_process, Fprocess_datagram_address): No longer
5102 static.
5103 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
5104 * keyboard.c (Fcommand_execute): No longer static.
5105 Remove EXFUN.
5106 * insdel.c (Fcombine_after_change_execute): No longer static.
5107 * image.c (Finit_image_library): No longer static.
5108 * fileio.c (Fmake_symbolic_link): No longer static.
5109 * eval.c (Ffetch_bytecode): No longer static.
5110 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
5111 * doc.c (Fdocumentation_property, Fsnarf_documentation):
5112 No longer static.
404dbd37
TT
5113 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
5114 static.
5115 * dired.c (Ffile_attributes): No longer static.
5116 * composite.c (Fcomposition_get_gstring): No longer static.
5117 * callproc.c (Fgetenv_internal): No longer static.
5118
5119 * ccl.h: Remove EXFUNs.
5120 * buffer.h: Remove EXFUNs.
5121 * dispextern.h: Remove EXFUNs.
5122 * intervals.h: Remove EXFUNs.
5123 * fontset.h: Remove EXFUN.
5124 * font.h: Remove EXFUNs.
5125 * dosfns.c (system_process_attributes): Remove EXFUN.
5126 * keymap.h: Remove EXFUNs.
5127 * lisp.h: Remove EXFUNs.
5128 * w32term.h: Remove EXFUNs.
5129 * window.h: Remove EXFUNs.
5130 * xsettings.h: Remove EXFUN.
5131 * xterm.h: Remove EXFUN.
5132
8e4fd1e1
GM
51332012-07-03 Glenn Morris <rgm@gnu.org>
5134
5135 * lisp.h (Frandom): Make it visible to C.
5136 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
5137 buffer for invisible buffers. (Bug#1229)
5138
ca95b3eb
DA
51392012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5140
5141 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
5142 values which aren't power of 2.
14ae4239
BT
5143 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
5144 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
5145 accordingly.
5146
7555c33f
SM
51472012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
5148
5149 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
5150
5151 * alloc.c (mark_object): Revert part of last patch to use `switch'.
5152
d12e8f5a
DA
51532012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5154
5155 * alloc.c (allocate_vector_block): Remove redundant
5156 calls to mallopt if DOUG_LEA_MALLOC is defined.
5157 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
5158 avoid calls to mallopt if zero_vector is returned.
5159
296094c3
DA
51602012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5161
5162 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
5163 is enabled, avoid dereferencing NULL current_sblock if
5164 running undumped.
5165
36429c89
DA
51662012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5167
5168 Cleanup basic buffer management.
5169 * buffer.h (struct buffer): Change layout to use generic vector
5170 marking code. Fix some comments. Change type of 'clip_changed'
5171 to bitfield. Remove unused #ifndef old.
5172 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
5173 (GET_OVERLAYS_AT): Fix indentation.
5174 (for_each_per_buffer_object_at): New macro.
5175 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
5176 (Fbuffer_local_variables): Use it.
5177 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
5178 * alloc.c (allocate_buffer): Adjust to match new layout of
5179 struct buffer. Fix comment.
5180 (mark_overlay): New function.
5181 (mark_buffer): Use it. Use mark_vectorlike to mark normal
5182 Lisp area of struct buffer.
5183 (mark_object): Use it. Adjust marking of misc objects
5184 and related comments.
5185
3b3e4cac
PE
51862012-07-02 Paul Eggert <eggert@cs.ucla.edu>
5187
5188 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
5189 wrapper that is not needed because the wrapped code is a no-op (zero
5190 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
5191 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
5192
cf5c0175
DA
51932012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
5194
5195 * alloc.c (mark_buffer): Simplify. Remove prototype.
5196 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 5197 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
5198 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
5199 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 5200
ca26824c
GM
52012012-06-30 Glenn Morris <rgm@gnu.org>
5202
2e4c5312
GM
5203 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
5204
ca26824c
GM
5205 * epaths.in (PATH_SITELOADSEARCH): New.
5206 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
5207 This is rather than relying on --enable-locallisppath elements
5208 having "site-lisp" in their names. (Bug#10208#25, 11658)
5209
0d23c240
EZ
52102012-06-30 Eli Zaretskii <eliz@gnu.org>
5211
c9240d7a
EZ
5212 * w32proc.c (sys_select): Accept and ignore one more argument.
5213
5214 * w32.c (emacs_gnutls_pull): Call select with one more argument.
5215
0d23c240 5216 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 5217 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
5218
5219 * sysdep.c: Don't include dos.h and dosfns.h.
5220
5221 * process.c (sys_select):
5222 * msdos.c (sys_select): Accept one more argument and ignore it.
5223
5224 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
5225 adapt data types and code to that.
5226
5227 * dosfns.c:
5228 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
5229 which clashes with the gnulib function of the same name.
5230
af5a5a98
AS
52312012-06-30 Andreas Schwab <schwab@linux-m68k.org>
5232
c5e4379c
AS
5233 * font.c (font_style_to_value, font_style_symbolic)
5234 (font_prop_validate_style): Add type checks for values in
5235 font_style_table.
5236
af5a5a98
AS
5237 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
5238 argument.
5239 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
5240 uses.
5241
8d38f461
EZ
52422012-06-29 Eli Zaretskii <eliz@gnu.org>
5243
2e5a6631
EZ
5244 * xdisp.c (try_window_id): Undo last change.
5245
8d38f461
EZ
5246 * w32.c (getwd): Adjust commentary about startup_dir.
5247 (init_environment): Always call sys_access, even in non-MSVC
5248 builds. Don't chdir to the directory of the Emacs executable.
5249 This undoes code from 1997 which was justified by the need to
5250 "avoid conflicts when removing and renaming directories". But its
5251 downside was that every relative file name was being interpreted
5252 relative to the directory of the Emacs executable, which can never
5253 be TRT. In particular, it broke sys_access when called with
5254 relative file names.
5255 (sys_access): Map GetLastError to errno.
5256
2af3565e
DA
52572012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5258
5259 * window.h (struct window): Change type of 'fringes_outside_margins'
5260 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 5261 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
5262 Adjust comment.
5263 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
5264 to ptrdiff_t.
5265
c8d3a25c 52662012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 5267
c8d3a25c
GM
5268 * gnutls.c (emacs_gnutls_handshake):
5269 Add QUIT to make the loop interruptible.
57570cd3 5270
c8d3a25c 52712012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 5272
c8d3a25c
GM
5273 * charset.c (init_charset): Make lack of etc/charsets fatal.
5274
3e984ee8
DA
52752012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5276
5277 * editfns.c (region_limit): Fix type mismatch.
5278
ef884f23
DA
52792012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5280
5281 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
5282 undefined. Convert from xassert to eassert.
5283 * nsmenu.m: Convert from xassert to eassert.
5284 * nsterm.m: Likewise.
5285
7d7e0027
SM
52862012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
5287
5288 * editfns.c (region_limit): Clip to narrowing (bug#11770).
5289
aa754e6a
PE
52902012-06-28 Paul Eggert <eggert@cs.ucla.edu>
5291
5292 Avoid integer overflow on scroll-left and scroll-right.
5293 * window.c (HSCROLL_MAX): New macro.
5294 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
5295 overflow when requested scroll falls outside ptrdiff_t range.
5296
80b00b08
DA
52972012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5298
5299 * window.h (struct window): Change type of 'hscroll',
5300 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
5301 'last_modified' and 'last_overlay_modified' to EMACS_INT.
5302 Adjust users accordingly.
5303 * xdisp.c (try_cursor_movement): Replace type check with eassert.
5304 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
5305 from EMACS_INT to ptrdiff_t.
5306 (make_window): Omit redundant initialization.
5307
62b2bcf6
JB
53082012-06-28 Juanma Barranquero <lekktu@gmail.com>
5309
5310 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
5311
45942c7d
DA
53122012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5313
5314 * window.h (struct window): Change type of 'use_time' and
5315 'sequence_number' from Lisp_Object to int.
5316 * frame.c (make_frame): Adjust users accordingly.
5317 * print.c (print_object): Likewise.
5318 * window.c (select_window, Fwindow_use_time, make_parent_window)
5319 (make_window): Likewise.
5320
e509cfa6
DA
53212012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5322
5323 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
5324 enabled with --enable-checking=[all,glyphs] configure option.
5325 Fix GLYPH_DEBUG usage assuming that it may be undefined,
5326 adjust comments accordingly.
5327 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
5328 undefined, adjust comments accordingly.
5329 * image.c: Likewise.
5330 * scroll.c: Likewise.
5331 * w32fns.c: Likewise.
5332 * w32term.c: Likewise.
5333 * xdisp.c: Likewise.
5334 * xfaces.c: Likewise.
5335 * xfns.c: Likewise.
5336 * xterm.c: Likewise.
5337
a54e2c05
DA
53382012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5339
5340 Generalize run-time debugging checks.
5341 * dispextern.h (XASSERTS): Remove.
5342 * fontset.c (xassert): Remove.
5343 Convert from xassert to eassert.
5344 * alloc.c: Convert from xassert to eassert.
5345 * bidi.c: Likewise.
5346 * dispnew.c: Likewise.
5347 * fns.c: Likewise.
5348 * fringe.c: Likewise.
5349 * ftfont.c: Likewise.
5350 * gtkutil.c: Likewise.
5351 * image.c: Likewise.
5352 * keyboard.c: Likewise.
5353 * menu.c: Likewise.
5354 * process.c: Likewise.
5355 * scroll.c: Likewise.
5356 * sound.c: Likewise.
5357 * term.c: Likewise.
5358 * w32console.c: Likewise.
5359 * w32fns.c: Likewise.
5360 * w32term.c: Likewise.
5361 * window.c: Likewise.
5362 * xdisp.c: Likewise.
5363 * xfaces.c: Likewise.
5364 * xfns.c: Likewise.
5365 * xselect.c: Likewise.
5366 * xterm.c: Likewise.
5367
1ec4b7b2
SM
53682012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
5369
5370 * fns.c (maybe_resize_hash_table): Output message when growing the
5371 purify-hashtable.
5372
2014308a
DA
53732012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5374
5375 * alloc.c (allocate_string_data): Remove dead code.
5376 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
5377 avoid GCC warning about unused macro.
5378
246155eb
DA
53792012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5380
5381 * alloc.c (allocate_string): Omit intervals initialization.
5382 * alloc.c (make_uninit_multibyte_string): Initialize intervals
5383 as in make_pure_string and make_pure_c_string.
5384
43184b7b
DA
53852012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5386
d209e2fb 5387 * alloc.c (allocate_string): Fix last change.
43184b7b 5388
3fe6dd74
DA
53892012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5390
d209e2fb 5391 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
5392 to memset, add explicit initialization where appropriate.
5393
1ba6038a
GM
53942012-06-27 Glenn Morris <rgm@gnu.org>
5395
5396 * lisp.mk (lisp): Remove paths.elc.
5397
c89926a5
CY
53982012-06-27 Chong Yidong <cyd@gnu.org>
5399
5400 * doc.c (Fsubstitute_command_keys): Fix punctuation.
5401
ed6b3510
JW
54022012-06-26 John Wiegley <johnw@newartisans.com>
5403
1ec4b7b2 5404 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
5405 on Mac OS X Lion: __mod_init_func and __mod_term_func.
5406
ed6b3510
JW
5407 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
5408 when building with Clang.
5409
8edd4a2b
SM
54102012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
5411
5412 * eval.c (Fapply): Allow calling it with a single argument.
5413
f6f62d1b
EZ
54142012-06-26 Eli Zaretskii <eliz@gnu.org>
5415
5416 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
5417 _stricmp and _strnicmp.
5418 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
5419
62efea5e
DA
54202012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5421
5422 * alloc.c (allocate_window): Zero out non-Lisp part of newly
5423 allocated window.
5424 (allocate_process): Likewise for new process.
8edd4a2b 5425 (allocate_terminal): Change to use offsetof.
62efea5e
DA
5426 (allocate_frame): Likewise.
5427 * frame.c (make_frame): Omit redundant initialization.
5428 * window.c (make_parent_window): Use memset.
5429 (make_window): Omit redundant initialization.
5430 * process.c (make_process): Omit redundant initialization.
5431 * terminal.c (create_terminal): Likewise.
5432
42997f4d
DA
54332012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5434
5435 * term.c (delete_tty): Remove redundant call to memset.
5436
1130ecfc
DA
54372012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5438
5439 * alloc.c: Remove build_string.
5440 * lisp.h: Define build_string as static inline. This provides
5441 a better opportunity to optimize away calls to strlen when the
5442 function is called with compile-time constant argument.
5443 * image.c (imagemagick_error): Convert to build_string.
5444 * w32proc.c (sys_spawnve): Likewise.
5445 * xterm.c (x_term_init): Likewise.
5446
cf38a720
PE
54472012-06-26 Paul Eggert <eggert@cs.ucla.edu>
5448
99027bdd
PE
5449 Use sprintf return value instead of invoking strlen on result.
5450 In the old days this wasn't portable, since some sprintf
5451 implementations returned char *. But they died out years ago and
5452 Emacs already assumes sprintf returns int.
5453 Similarly for float_to_string.
5454 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
5455 * ccl.c (ccl_driver):
5456 * character.c (string_escape_byte8):
5457 * data.c (Fnumber_to_string):
5458 * doprnt.c (doprnt):
5459 * print.c (print_object):
5460 * xdisp.c (message_dolog):
5461 * xfns.c (syms_of_xfns):
5462 Use sprintf or float_to_string result to avoid need to call strlen.
5463 * data.c (Fnumber_to_string):
5464 Use make_unibyte_string, since the string must be ASCII.
5465 * lisp.h, print.c (float_to_string): Now returns int length.
5466 * term.c (produce_glyphless_glyph):
5467 Use sprintf result rather than recomputing it.
5468
cf38a720
PE
5469 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
5470 * Makefile.in (ALL_CFLAGS):
5471 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
5472 * gmalloc.c, regex.c: Include <config.h> unconditionally.
5473
3511c784
DA
54742012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5475
0a08eb21 5476 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
5477 strcasecmp if available.
5478 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
5479
fb7da12e
AS
54802012-06-25 Andreas Schwab <schwab@linux-m68k.org>
5481
5482 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
5483 Avoid comma operator.
5484 * menu.c (push_submenu_start, push_submenu_end)
5485 (push_left_right_boundary, push_menu_pane): Likewise.
5486 * msdos.c (dos_rawgetc): Likewise.
5487
afa2ffd8
DA
54882012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5489
5490 * xfns.c (xic_create_fontsetname): Remove redundant calls
5491 to memset.
5492
b3b4476b
PE
54932012-06-25 Paul Eggert <eggert@cs.ucla.edu>
5494
4495ff38
PE
5495 * gtkutil.c (get_utf8_string): Remove redundant assignment.
5496 sprintf already null-terminates its output.
5497
b3b4476b
PE
5498 * xfns.c (x_window): Remove redundant cast.
5499
b00876c9
DA
55002012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5501
5502 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
5503 `const char *' to `char *' to avoid compiler warning.
5504
d188e26b
PE
55052012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5506
885d1d74
PE
5507 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
5508 instead of truncating it to 63 (admittedly a generous limit).
5509
d188e26b
PE
5510 * process.c: Fix spelling and caps in comments.
5511
e2f560b1
DN
55122012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
5513
e86db54b 5514 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
5515 * sysdep.c (setpgrp): Remove definition, not used in this file.
5516
7583a3a1
JB
55172012-06-24 Juanma Barranquero <lekktu@gmail.com>
5518
5519 * makefile.w32-in: Update dependencies.
5520
696056c2
EZ
55212012-06-24 Eli Zaretskii <eliz@gnu.org>
5522
5523 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
5524 (SYSTIME_H): Add nt/inc/sys/time.h.
5525
5526 * systime.h [WINDOWSNT]: Include sys/time.h.
5527
5528 * s/ms-w32.h (struct timespec): Definition moved from
5529 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
5530
845ca893
PE
55312012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5532
5533 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
5534 * buffer.h (buffer_slot_type_mismatch):
5535 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
5536 * eval.c (unwind_to_catch):
5537 * image.c (my_png_error, my_error_exit):
5538 * keyboard.c (quit_throw_to_read_char, user_error)
5539 (Fexit_recursive_edit, Fabort_recursive_edit):
5540 * lisp.h (die, args_out_of_range, args_out_of_range_3)
5541 (wrong_type_argument, buffer_overflow, __executable_start)
5542 (memory_full, buffer_memory_full, string_overflow, Fthrow)
5543 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
5544 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
5545 (fatal):
5546 (child_setup) [!DOS_NT]:
5547 * lread.c (end_of_file_error, invalid_syntax):
5548 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
5549 * puresize.h (pure_write_error):
5550 * search.c (matcher_overflow):
5551 * sound.c (sound_perror, alsa_sound_perror):
5552 * sysdep.c, syssignal.h (croak):
5553 * term.c (maybe_fatal, vfatal):
5554 * textprop.c (text_read_only):
5555 * undo.c (user_error):
5556 * unexmacosx.c (unexec_error):
5557 * xterm.c (x_ins_del_lines, x_delete_glyphs):
5558 Use _Noreturn rather than NO_RETURN.
5559 No need for separate decl merely because of _Noreturn.
5560 * sound.c (sound_warning, parse_sound):
5561 Remove unnecessary forward decls.
5562
f1dd8073
PE
55632012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5564
5565 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
5566 * lisp.h (WAIT_READING_MAX): New macro.
5567 * dispnew.c (Fsleep_for, sit_for):
5568 * keyboard.c (kbd_buffer_get_event):
5569 * process.c (Faccept_process_output):
5570 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
5571 This improves on the previous patch, which introduced a bug
5572 when time_t is unsigned and as wide as intmax_t.
5573 See <http://bugs.gnu.org/9000#51>.
5574
b82c1755
EZ
55752012-06-23 Eli Zaretskii <eliz@gnu.org>
5576
5577 * dispnew.c (sit_for, Fsleep_for):
5578 * keyboard.c (kbd_buffer_get_event):
5579 * process.c (Faccept_process_output): Avoid compiler warnings when
5580 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
5581
ca300656
JB
55822012-06-23 Juanma Barranquero <lekktu@gmail.com>
5583
049ec95b
JB
5584 * makefile.w32-in: Update dependencies.
5585
ca300656
JB
5586 * w32.c (ltime): Add return type and declare static.
5587 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
5588
db7b8d06
PE
55892012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5590
5591 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
5592 Privately reported by Herbert J. Skuhra.
5593 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
5594 All uses changed.
5595 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
5596 not make_lisp_timeval, when the argument is of type EMACS_TIME.
5597
0bd8297f
EZ
55982012-06-23 Eli Zaretskii <eliz@gnu.org>
5599
96512555
EZ
5600 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
5601 last argument of make_unibyte_string.
5602
0bd8297f
EZ
5603 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
5604 language ID in the event parameters.
5605
5606 * w32term.c (w32_read_socket): Put the new keyboard codepage into
5607 event.code, not the obscure "character set ID".
5608
63def6b6
CY
56092012-06-23 Chong Yidong <cyd@gnu.org>
5610
5611 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
5612
e8a02204
EZ
56132012-06-23 Eli Zaretskii <eliz@gnu.org>
5614
388cdec0
EZ
5615 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
5616 * w32.c (fdutimens): New function.
5617
5618 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
5619
5620 * s/ms-w32.h (pselect): Redirect to sys_select.
5621
5622 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
5623
e8a02204
EZ
5624 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
5625 in the logic of incrementing and decrementing the value of
5626 use_relocatable_buffers.
5627
d054f3fb
PE
56282012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5629
5630 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
5631 Privately reported by Herbert J. Skuhra.
5632 [__FreeBSD__]: Remove "*/" typo after "#include".
5633 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
5634 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
5635 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
5636 Don't assume EMACS_TIME and struct timeval are the same type.
5637
d35af63c
PE
56382012-06-22 Paul Eggert <eggert@cs.ucla.edu>
5639
5640 Support higher-resolution time stamps (Bug#9000).
5641 The time stamps are only nanosecond-resolution at the C level,
5642 since that's the best that any real-world system supports now.
5643 But they are picosecond-resolution at the Lisp level, as that's
5644 easy, and leaves room for future OS improvements.
5645
5646 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
5647 (LIBES): Use it.
5648
5649 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
5650 Don't get current time unless it's needed.
5651
5652 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
5653 now provides it if it's absent.
5654 (start_atimer): Port to higher-res time stamps.
5655 Check for time stamp overflow. Don't get current time more
5656 often than is needed.
5657
5658 * buffer.h (struct buffer): Buffer modtime now has high resolution.
5659 Include systime.h, not time.h.
5660 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
5661
5662 * dired.c: Include stat-time.h.
5663 (Ffile-attributes): File times now have higher resolution.
5664
5665 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
5666 (struct image): Timestamp now has higher resolution.
5667
5668 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
5669 has at least microseconds now. All uses removed.
5670 (update_frame, update_single_window, update_window, update_frame_1)
5671 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 5672 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
5673
5674 * editfns.c (time_overflow): Now extern.
5675 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
5676 (float-time, Fformat_time_string, Fcurrent_time_string)
5677 (Fcurrent_time_zone): Accept and generate higher-resolution
5678 time stamps.
5679 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
5680 (decode_time_components, lisp_seconds_argument): New functions.
5681 (make_time): Now static.
5682 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
5683 Report an error if the time is invalid, rather than having the caller
5684 do that.
5685
5686 * fileio.c: Include <stat-time.h>
5687 (Fcopy_file): Copy higher-resolution time stamps.
5688 Prefer to set the time stamp via a file descriptor if that works.
5689 (Fset_file_times, Finsert_file_contents, Fwrite_region)
5690 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
5691 (Fvisited_file_modtime, Fset_visited_file_modtime):
5692 Support higher-resolution time stamps.
5693
5694 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
5695
5696 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
5697
5698 * image.c (prepare_image_for_display, clear_image_cache)
5699 (lookup_image): Port to higer-resolution time stamps.
5700
5701 * keyboard.c (start_polling, bind_polling_period):
5702 Check for time stamp overflow.
5703 (read_char, kbd_buffer_get_event, timer_start_idle)
5704 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
5705 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
5706 Port to higher-resolution time stamps. Do not assume time_t is signed.
5707 (decode_timer): New function. Timers are now vectors of length 9,
5708 not 8, to accommodate the picosecond component.
5709 (timer_check_2): Use it.
5710
5711 * nsterm.m (select_timeout, timeval_subtract): Remove.
5712 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
5713 as they're a bit more accurate and handle overflow better.
5714 (ns_select): Change prototype to be compatible with pselect.
5715 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
5716 * nsterm.h (ns_select): Adjust prototype.
5717
5718 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
5719 us-resolution time stamps.
5720 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
5721
5722 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
5723
5724 * lisp.h (time_overflow): New decl.
5725 (wait_reading_process_output): First arg is now intmax_t, not int,
5726 to accommodate larger waits.
5727
5728 * process.h (struct Lisp_Process.read_output_delay):
5729 Now counts nanoseconds, not microseconds.
5730 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
5731 EMACS_HAS_USECS.
5732 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
5733 (wait_reading_process_output):
5734 Port to ns-resolution time stamps.
5735 (Faccept_process_output, wait_reading_process_output):
5736 Check for time stamp overflow. Do not assume time_t is signed.
5737 (select_wrapper): Remove; we now use pselect.
5738 (Fprocess_attributes): Now generates ns-resolution time stamps.
5739
5740 * sysdep.c: Include utimens.h. Don't include utime.h
5741 or worry about struct utimbuf; gnulib does that for us now.
5742 (gettimeofday): Remove; gnulib provides a substitute.
5743 (make_timeval): New function.
5744 (set_file_times): Now sets ns-resolution time stamps.
5745 New arg FD; all uses changed.
5746 (time_from_jiffies, ltime_from_jiffies, get_up_time)
5747 (system_process_attributes):
5748 Now returns ns-resolution time stamp. All uses changed.
5749 Check for time stamp overflow.
5750
5751 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
5752 provides a substitute now.
5753
5754 * systime.h: Include timespec.h rather than sys/time.h and time.h,
5755 since it guarantees struct timespec.
5756 (EMACS_TIME): Now struct timespec, so that we can support
5757 ns-resolution time stamps.
5758 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
5759 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
5760 (EMACS_USECS): Remove.
5761 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
5762 so multiply the arg by 1000 before storing it.
5763 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
5764 New macros.
5765 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
5766 Port to ns-resolution time stamps.
5767 (EMACS_TIME_NEG_P): Remove; replaced by....
5768 (EMACS_TIME_SIGN): New macro.
5769 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
5770 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
5771 (set_file_times, make_time, lisp_time_argument): Adjust signature.
5772 (make_timeval, make_lisp_time, decode_time_components): New decls.
5773 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
5774 that it mishandled time_t overflow. You can't compare by subtracting!
5775 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
5776 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
5777
5778 * term.c: Include <sys/time.h>.
5779 (timeval_to_Time): New function, for proper overflow wraparound.
5780 (term_mouse_position, term_mouse_click): Use it.
5781
5782 * undo.c (record_first_change): Support higher-resolution time stamps
5783 in the undo buffer.
5784 (Fprimitive_undo): Use them when restoring time stamps.
5785
5786 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
5787 (w32_get_internal_run_time):
5788 Port to higher-resolution Emacs time stamps.
5789 (ltime): Now accepts single 64-bit integer, as that's more convenient
5790 for callers.
5791
5792 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
5793
5794 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
5795 for compatibility with pselect. Support ns-resolution time stamps.
5796
5797 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
5798
5799 * xselect.c (wait_for_property_change, x_get_foreign_selection):
5800 Check for time stamp overflow, and support ns-resolution time stamps.
5801
5802 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
5803 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
5804 (timeval_subtract): Remove; no longer needed.
5805 (XTflash, XTring_bell, x_wait_for_event):
5806 Port to ns-resolution time stamps. Don't assume time_t is signed.
5807
b6a92dfe
CY
58082012-06-22 Chong Yidong <cyd@gnu.org>
5809
5810 * xdisp.c (x_consider_frame_title): Revert last change.
5811
d251c37c
EZ
58122012-06-22 Eli Zaretskii <eliz@gnu.org>
5813
5814 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
5815 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
5816 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
5817 staticidx goes up to 1597 out of 1600 = 0x640.)
5818
f10deafb
PE
58192012-06-20 Paul Eggert <eggert@cs.ucla.edu>
5820
5821 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
5822 Otherwise, the umask might be mistakenly 0 while handling input signals.
5823
ec6de1e2
SM
58242012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
5825
5826 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
5827
28be1ada
DA
58282012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5829
5830 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
5831 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
5832 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
5833 access to `contents' member of Lisp_Vector objects with AREF and ASET
5834 where appropriate.
5835
c6bf3022
CY
58362012-06-19 Chong Yidong <cyd@gnu.org>
5837
5838 * frame.c (delete_frame): When selecting a frame on a different
5839 text terminal, do not alter the terminal's top-frame.
5840
5841 * xdisp.c (format_mode_line_unwind_data): Record the target
5842 frame's selected window and its terminal's top-frame.
5843 (unwind_format_mode_line): Restore them.
5844 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
5845 Callers changed.
5846 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
5847 since tty frames can be explicitly named.
5848 (prepare_menu_bars): Likewise.
5849
5850 * term.c (Ftty_top_frame): New function.
5851
defd4196
PE
58522012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5853
5854 Port byte-code-meter to modern targets.
5855 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
5856 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 5857 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
5858 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
5859 (METER_1, METER_2): Simplify.
5860
1053a871
SM
58612012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
5862
5863 * data.c (Fdefalias): Return `symbol' (bug#11686).
5864
b7e8d081
MR
58652012-06-18 Martin Rudalics <rudalics@gmx.at>
5866
5867 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
5868 gets killed during executing of this function (Bug#11665).
5869 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
5870 (Vkill_buffer_query_functions): In doc-string say that functions
5871 run by this hook should not change the current buffer.
5872
7ea2b339
PE
58732012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5874
5875 Fix recently-introduced process.c problems found by static checking.
5876 * process.c (write_queue_push, write_queue_pop, send_process):
5877 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
5878 (write_queue_pop): Fix pointer signedness problem.
5879 (send_process): Remove unused local.
5880
96a313a1
CY
58812012-06-17 Chong Yidong <cyd@gnu.org>
5882
5883 * xdisp.c (redisplay_internal): No need to redisplay terminal
5884 frames that are not on top.
5885
20ca2e94
TN
58862012-06-17 Troels Nielsen <bn.troels@gmail.com>
5887
5888 * process.c (make_process): Initialize write_queue.
5889 (write_queue_push, write_queue_pop): New functions.
5890 (send_process): Use them to maintain correct ordering of process
5891 writes (Bug#10815).
5892
9a900ca9
PE
58932012-06-17 Paul Eggert <eggert@cs.ucla.edu>
5894
310fbfa8
PE
5895 * lisp.h (eassert): Assume C89 or later.
5896 This removes the need for CHECK.
5897 (CHECK): Remove. Its comments about always evaluating its
5898 argument were confusing, as 'eassert' typically does not evaluate
5899 its argument.
5900
27bb1ca4
PE
5901 * coding.c (produce_chars): Use ptrdiff_t, not int.
5902
9a900ca9
PE
5903 * xterm.c (x_draw_underwave): Check for integer overflow.
5904 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
5905
41b7f8bc 59062012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
5907
5908 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
5909 referenced (Bug#11583).
5910
9b0e3eba
AA
59112012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
5912
5913 Implement wave-style variant of underlining.
5914 * dispextern.h (face_underline_type): New enum.
5915 (face): Add field for underline type.
5916 * nsterm.m (ns_draw_underwave): New function.
5917 (ns_draw_text_decoration): Use it.
5918 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
5919 New functions.
5920 (x_draw_glyph_string): Use them.
5921 * xfaces.c (Qline, Qwave): New Lisp objects.
5922 (check_lface_attrs, merge_face_ref)
1053a871
SM
5923 (Finternal_set_lisp_face_attribute, realize_x_face):
5924 Handle wave-style underline face attributes.
9b0e3eba
AA
5925 * xterm.c (x_draw_underwave): New function.
5926 (x_draw_glyph_string): Use it.
5927
0fb52f11
JB
59282012-06-16 Juanma Barranquero <lekktu@gmail.com>
5929
5930 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
5931 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
5932 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
5933 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
5934 ($(BLD)/w32select.$(O)): Update dependencies.
5935
e5560ff7
AS
59362012-06-16 Andreas Schwab <schwab@linux-m68k.org>
5937
5938 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
5939 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
5940 * character.c (_fetch_multibyte_char_p): Remove.
5941 * alloc.c: Include "character.h" before "buffer.h".
5942 * bidi.c: Likewise.
5943 * buffer.c: Likewise.
5944 * bytecode.c: Likewise.
5945 * callint.c: Likewise.
5946 * callproc.c: Likewise.
5947 * casefiddle.c: Likewise.
5948 * casetab.c: Likewise.
5949 * category.c: Likewise.
5950 * cmds.c: Likewise.
5951 * coding.c: Likewise.
5952 * composite.c: Likewise.
5953 * dired.c: Likewise.
5954 * dispnew.c: Likewise.
5955 * doc.c: Likewise.
5956 * dosfns.c: Likewise.
5957 * editfns.c: Likewise.
5958 * emacs.c: Likewise.
5959 * fileio.c: Likewise.
5960 * filelock.c: Likewise.
5961 * font.c: Likewise.
5962 * fontset.c: Likewise.
5963 * fringe.c: Likewise.
5964 * indent.c: Likewise.
5965 * insdel.c: Likewise.
5966 * intervals.c: Likewise.
5967 * keyboard.c: Likewise.
5968 * keymap.c: Likewise.
5969 * lread.c: Likewise.
5970 * macros.c: Likewise.
5971 * marker.c: Likewise.
5972 * minibuf.c: Likewise.
5973 * nsfns.m: Likewise.
5974 * nsmenu.m: Likewise.
5975 * print.c: Likewise.
5976 * process.c: Likewise.
5977 * regex.c: Likewise.
5978 * region-cache.c: Likewise.
5979 * search.c: Likewise.
5980 * syntax.c: Likewise.
5981 * term.c: Likewise.
5982 * textprop.c: Likewise.
5983 * undo.c: Likewise.
5984 * unexsol.c: Likewise.
5985 * w16select.c: Likewise.
5986 * w32fns.c: Likewise.
5987 * w32menu.c: Likewise.
5988 * window.c: Likewise.
5989 * xdisp.c: Likewise.
5990 * xfns.c: Likewise.
5991 * xmenu.c: Likewise.
5992 * xml.c: Likewise.
5993 * xselect.c: Likewise.
5994
2f07e6af
EZ
59952012-06-16 Eli Zaretskii <eliz@gnu.org>
5996
1053a871
SM
5997 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
5998 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 5999 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
6000 row.
6001 (handle_face_prop): Use chunk-relative overlay string index when
6002 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
6003 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
6004 the rightmost. (Bug#11720)
2f07e6af 6005
29b83cec
AS
60062012-06-16 Andreas Schwab <schwab@linux-m68k.org>
6007
6008 * category.h (CHAR_HAS_CATEGORY): Define as inline.
6009 (CATEGORY_MEMBER): Enforce 1/0 value.
6010 * category.c (_temp_category_set): Remove.
6011
4c5501e9
EZ
60122012-06-16 Eli Zaretskii <eliz@gnu.org>
6013
6014 * window.c (Fdelete_other_windows_internal)
6015 (Fdelete_window_internal): Don't access frame's mouse highlight
6016 info of the initial frame. (Bug#11677)
6017
2b570124
PE
60182012-06-14 Paul Eggert <eggert@cs.ucla.edu>
6019
e93864f9
PE
6020 * .gdbinit (xgetint): Fix recently-introduced paren typo.
6021 Assume USE_2_TAGS_FOR_INTS.
6022 (xreload): Adjust $tagmask width to match recent lisp.h change.
6023
2b570124
PE
6024 Simplify lisp.h in minor ways that should not affect code.
6025 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
6026 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
6027 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
6028 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
6029 (INTTYPEBITS): New macro, for clarity.
6030 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
6031 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
6032 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
6033 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
6034 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
6035
81755f69
JB
60362012-06-13 Juanma Barranquero <lekktu@gmail.com>
6037
6038 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
6039
16192a57
GM
60402012-06-13 Glenn Morris <rgm@gnu.org>
6041
6042 * s/bsd-common.h (BSD4_3):
6043 * s/usg5-4-common.h (USG5_4): No longer define; unused.
6044
646b5f55
AS
60452012-06-13 Andreas Schwab <schwab@linux-m68k.org>
6046
6047 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
6048 instead of union.
6049 (XLI, XIL): Define.
1053a871
SM
6050 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
6051 Use them.
6052 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 6053 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 6054 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
6055 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
6056 * frame.c (delete_frame): Remove outdated comment.
6057 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
6058 USE_LISP_UNION_TYPE.
6059 (Fw32_unregister_hot_key): Likewise.
6060 (Fw32_toggle_lock_key): Likewise.
6061 * w32menu.c (add_menu_item): Likewise.
6062 (w32_menu_display_help): Use XIL instead of checking
6063 USE_LISP_UNION_TYPE.
6064 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
6065 (init_heap): Likewise.
6066 * w32term.c (w32_read_socket): Update comment.
6067
1d3823c9
GM
60682012-06-13 Glenn Morris <rgm@gnu.org>
6069
c62ff706
GM
6070 * s/usg5-4-common.h, src/s/unixware.h:
6071 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
6072
1d3823c9
GM
6073 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
6074
bfe3e0a2
PE
60752012-06-13 Paul Eggert <eggert@cs.ucla.edu>
6076
6077 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
6078 * alloc.c (make_number) [!defined make_number]:
6079 Remove, as lisp.h always defines this now.
6080 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
6081 (roundup_size): Verify that it is a power of 2.
6082 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
6083 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
6084 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
6085 -DUSE_LSB_TAG=0, to override the automatically-selected default.
6086 USE_LSB_TAG now is always defined to be either 0 or 1.
6087 All uses changed.
6088 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
6089 code works fine either way, and efficiency is not a concern here,
6090 as the union type is for debugging, not for production.
6091 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
6092 Use an inline function on all platforms when using the union type,
6093 since this is simpler and 'static inline' can be used portably
6094 within Emacs now.
6095 (LISP_INITIALLY_ZERO): New macro.
6096 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
6097 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
6098
45fa9c0f
GM
60992012-06-12 Glenn Morris <rgm@gnu.org>
6100
b4492cba
GM
6101 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
6102
6103 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 6104
45fa9c0f
GM
6105 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
6106 Move BROKEN_SIGIO to configure.
6107
6108 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
6109 Move NO_TERMIO to configure.
6110
0e25d334
CY
61112012-06-12 Chong Yidong <cyd@gnu.org>
6112
6113 * image.c (imagemagick_load_image): Use MagickFlattenImage if
6114 MagickMergeImageLayers is undefined. Use pixel pusher loop if
6115 MagickExportImagePixels is undefined.
6116
43682bb6
PE
61172012-06-12 Paul Eggert <eggert@cs.ucla.edu>
6118
6119 * image.c (imagemagick_load_image): Remove unused label.
6120
a9be7d2b
GM
61212012-06-11 Glenn Morris <rgm@gnu.org>
6122
6123 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
6124 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
6125 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
6126 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
6127
3017f87f
SM
61282012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
6129
6130 * alloc.c (make_byte_code): New function.
6131 (Fmake_byte_code): Use it. Don't purify here.
6132 * lread.c (read1): Use it as well to avoid extra allocation.
6133
1b9b4cf4
CY
61342012-06-11 Chong Yidong <cyd@gnu.org>
6135
6136 * image.c (imagemagick_load_image): Implement transparency.
6137
95988fcf
AS
61382012-06-10 Andreas Schwab <schwab@linux-m68k.org>
6139
6140 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
6141 account for preceding backslashes. (Bug#11663)
6142
cd4eb164
CY
61432012-06-09 Chong Yidong <cyd@gnu.org>
6144
6145 * term.c: Support italics in capable terminals (Bug#9652).
6146 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
6147 (turn_on_face): Output using TS_enter_italic_mode if available.
6148 Don't handle unused blinking and alt-charset cases.
6149 (turn_off_face): Handle italic case; discard unused tty_blinking_p
6150 and tty_alt_charset_p cases.
6151 (tty_capable_p, init_tty): Support italics.
6152
6153 * termchar.h (struct tty_display_info): Add field for italics.
6154 Remove unused blink field.
6155
6156 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
6157 Handle slant.
6158
6159 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
6160 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
6161 tty_alt_charset_p. Add tty_italic_p.
6162
ff88beb8
MA
61632012-06-09 Michael Albinus <michael.albinus@gmx.de>
6164
6165 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
6166 dbus_type_is_basic if available.
6167 (xd_extract_signed, xd_extract_unsigned): Rename from
6168 extract_signed and extract_unsigned, respectively. Adapt callers.
6169
44286096
CY
61702012-06-09 Chong Yidong <cyd@gnu.org>
6171
1682701f
CY
6172 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
6173
44286096
CY
6174 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
6175 case (Bug#9752).
6176
d86feb17
PE
61772012-06-08 Paul Eggert <eggert@cs.ucla.edu>
6178
6179 * xdisp.c (vmessage): Treat frame message as multibyte.
6180 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
6181 would generate the diagnostic "Making \302\247 buffer-local while
6182 let-bound!".
6183
d5c20fe8
EZ
61842012-06-08 Eli Zaretskii <eliz@gnu.org>
6185
6186 * dispnew.c (showing_window_margins_p): Undo last change, which
6187 was done due to an inadvertent commit.
6188 (adjust_frame_glyphs_for_frame_redisplay): Do call
6189 showing_window_margins_p.
6190
513749ee
SM
61912012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
6192
6193 * eval.c (Fmake_var_non_special): New primitive.
6194 (syms_of_eval): Defsubr it.
6195 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
6196
d4a8f5c1
JB
61972012-06-08 Juanma Barranquero <lekktu@gmail.com>
6198
6199 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
6200 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
6201
8bbbc977
EZ
62022012-06-08 Eli Zaretskii <eliz@gnu.org>
6203
6204 * alloc.c (allocate_vectorlike): Fix last change.
6205
f3372c87
DA
62062012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
6207
6208 Block-based vector allocation of small vectors.
6209 * lisp.h (struct vectorlike_header): New field `nbytes',
6210 adjust comment accordingly.
6211 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
fc0c31f8 6212 to denote vector blocks. Adjust users (live_vector_p,
f3372c87
DA
6213 mark_maybe_pointer, valid_lisp_object_p) accordingly.
6214 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
6215 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
6216 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
6217 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
6218 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
6219 (roundup_size): New constant.
6220 (struct vector_block): New data type.
6221 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 6222 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
6223 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
6224 (sweep_vectors): New functions.
6225 (allocate_vectorlike): Return `zero_vector' as the only vector of
fc0c31f8 6226 0 items. Allocate new vector from block if vector size is less than
f3372c87
DA
6227 or equal to VBLOCK_BYTES_MAX.
6228 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
6229 (init_alloc_once): Add call to init_vectors.
6230
4f18a4ed
SM
62312012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
6232
6233 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
6234
86f158bc
PE
62352012-06-07 Paul Eggert <eggert@cs.ucla.edu>
6236
6237 * doprnt.c (doprnt): Truncate multibyte char correctly.
6238 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
6239 would mishandle a string argument "Xc" if X was a multibyte
6240 character of length 2: it would truncate after X's first byte
6241 rather than including all of X.
6242
c5cfcbe0
CY
62432012-06-06 Chong Yidong <cyd@gnu.org>
6244
6245 * buffer.c (word_wrap): Doc fix.
6246
c05cf390
PE
62472012-06-04 Paul Eggert <eggert@cs.ucla.edu>
6248
6249 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
6250
0c3461de
GM
62512012-06-03 Glenn Morris <rgm@gnu.org>
6252
6253 * xdisp.c (tool-bar-style): Doc fix.
6254
c71232db
UM
62552012-06-03 Ulrich Müller <ulm@gentoo.org>
6256
6257 * Makefile.in (PAXCTL): Define.
6258 (temacs$(EXEEXT)): Disable memory randomization for the temacs
6259 binary via PaX flags if the paxctl utility is available.
6260 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
6261 Restore PaX flags to their default. (Bug#11398)
6262
383f7350
CY
62632012-06-03 Chong Yidong <cyd@gnu.org>
6264
6265 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
6266 buffer (Bug#11226).
6267
5f2c76c6
CY
62682012-06-03 Chong Yidong <cyd@gnu.org>
6269
6270 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
6271 (note_mode_line_or_margin_highlight): If there is no help echo,
6272 use mode-line-default-help-echo. Handle the case where the mouse
6273 position is past the end of the mode line string.
6274
6275 * buffer.c (buffer_local_value_1): New function, split from
6276 Fbuffer_local_value; can return Qunbound.
6277 (Fbuffer_local_value): Use it.
6278 (Vmode_line_format): Docstring tweaks.
6279
773d47f6
PE
62802012-06-02 Paul Eggert <eggert@cs.ucla.edu>
6281
6282 * sysdep.c (system_process_attributes): Improve comment.
6283
f2d6a3df
SM
62842012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
6285
6286 * keyboard.c: Export real-this-command to Elisp.
6287 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
6288 and DEFVAR it. Update all users.
6289
63810350
PE
62902012-06-02 Paul Eggert <eggert@cs.ucla.edu>
6291
7bd5c1f4
PE
6292 * minibuf.c (Fassoc_string): Remove duplicate declaration.
6293
63810350
PE
6294 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
6295 Convert pctcpu and pctmem to Lisp float properly.
6296 Let the compiler fold better, as 100.0/0x8000 is exact.
6297
a2821611
AS
62982012-06-02 Andreas Schwab <schwab@linux-m68k.org>
6299
6300 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
6301 cons_block.
6302
5fceba1d
PE
63032012-06-01 Paul Eggert <eggert@cs.ucla.edu>
6304
6305 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
6306
c98ff5dd
DA
63072012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
6308
6309 For a 'struct window', replace some Lisp_Object fields to
6310 bitfields where appropriate, remove unused fields.
6311 * window.h (struct window): Remove unused 'last_mark_x' and
6312 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
6313 change it's type from Lisp_Object to bitfield.
6314 Change type of 'force_start', 'optional_new_start',
6315 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fc0c31f8 6316 fields from Lisp_Object to bitfield. Adjust users accordingly.
c98ff5dd 6317
ca34e0be
PE
63182012-05-31 Paul Eggert <eggert@cs.ucla.edu>
6319
6320 Pacify gcc -Wdouble-precision when using Xaw.
6321 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
6322 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
6323 Use 'float' consistently, rather than 'float' in most places
6324 and 'double' in a couple of places.
6325
efc00ab1 63262012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
6327
6328 * xdisp.c (handle_stop): Detect whether we have overlay strings
6329 loaded by testing it->current.overlay_string_index to be
6330 non-negative, instead of checking whether n_overlay_strings is
6331 positive. (Bug#11587)
6332
efc00ab1 63332012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
6334
6335 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
6336
6337 * doc.c (Fsubstitute_command_keys): Doc fix.
6338
efc00ab1 63392012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
6340
6341 * search.c (search_buffer): Remove calls to
6342 r_alloc_inhibit_buffer_relocation, as it is now called by
6343 maybe_unify_char, which was the cause of relocation of buffer text
6344 in bug#11519.
6345
efc00ab1 63462012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
6347
6348 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
6349 for the duration of call to load_charset, to avoid problems with
6350 callers of maybe_unify_char that access buffer text through C
6351 pointers.
6352
6353 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
6354 decrement the inhibition flag, instead of just setting or
6355 resetting it.
6356
ba93a187
PE
63572012-05-31 Paul Eggert <eggert@cs.ucla.edu>
6358
6359 Remove obsolete '#define static' cruft.
6360 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
6361 This #undef was "temporary" in 2000; it is no longer needed
6362 now that '#define static' has gone away.
6363 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
6364 (gray_bitmap_bits): Remove; no longer needed.
6365 All uses replaced with definiens.
6366 * xterm.c: Include "bitmaps/gray.xbm".
6367
9e4bf381
PE
63682012-05-30 Paul Eggert <eggert@cs.ucla.edu>
6369
6370 Clean up __executable_start, monstartup when --enable-profiling.
6371 The following changes affect the code only when profiling.
6372 * dispnew.c (__executable_start): Rename from safe_bcopy.
6373 Define only on platforms that need it.
6374 * emacs.c: Include <sys/gmon.h> when profiling.
6375 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
6376 (__executable_start): Remove decl, since lisp.h does it now.
6377 (safe_bcopy): Remove decl; no longer has that name.
6378 (main): Coalesce #if into single bit of code, for simplicity.
6379 Cast pointers to uintptr_t, since standard libraries want integers
6380 and not pointers.
6381 * lisp.h (__executable_start): New decl.
6382
32d72c2f
GM
63832012-05-31 Glenn Morris <rgm@gnu.org>
6384
6385 * image.c (Fimagemagick_types): Doc fix.
6386
baac5bc7
JM
63872012-05-30 Jim Meyering <meyering@redhat.com>
6388
6389 * callproc.c (Fcall_process_region): Include directory component
6390 in mkstemp error message (Bug#11586).
6391
72cb32cf
PE
63922012-05-30 Paul Eggert <eggert@cs.ucla.edu>
6393
6394 * alloc.c, lisp.h (make_pure_vector): Now static.
6395
61b108cc
SM
63962012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
6397
6398 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
6399 Move to byte-run.el.
6400 (Fautoload): Do the hash-doc more carefully.
6401 * data.c (Fdefalias): Purify definition, except for keymaps.
6402 (Qdefun): Move from eval.c.
6403 * lisp.h (Qdefun): Remove.
6404 * lread.c (read1): Tiny simplification.
6405
471fe23d
TN
64062012-05-29 Troels Nielsen <bn.troels@gmail.com>
6407
934f3f58 6408 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
6409 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
6410 Bug#9642, but explicitly check that the buffer the overlay would
6411 be moved to is live and rearrange lines to make sure that errors
6412 will not put the overlay in an inconsistent state.
6413 (Fdelete_overlay): Cosmetics.
6414
85d0efd1
EZ
64152012-05-28 Eli Zaretskii <eliz@gnu.org>
6416
6417 * w32term.c (my_bring_window_to_top): New function.
6418 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
6419 could be different from the original one.
6420 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
6421 (Bug#11513)
6422
6423 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
6424 by calling BringWindowToTop.
6425
6426 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
6427 (WM_EMACS_END): Increase by one.
6428
da92a98c
PE
64292012-05-28 Paul Eggert <eggert@cs.ucla.edu>
6430
6431 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
6432 This avoids undefined behavior that might cause the eassert
6433 to not catch an out-of-range value.
6434
74d1f848
JB
64352012-05-28 Juanma Barranquero <lekktu@gmail.com>
6436
6437 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
6438 Update dependencies.
6439
9e1a06fc
EZ
64402012-05-27 Eli Zaretskii <eliz@gnu.org>
6441
6442 * bidi.c (bidi_mirror_char): Fix last change.
6443
f3dd7312
AS
64442012-05-27 Andreas Schwab <schwab@linux-m68k.org>
6445
6446 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
6447 when referring to sectname field in printf format.
6448
81899c91
PE
64492012-05-27 Paul Eggert <eggert@cs.ucla.edu>
6450
57b81a9f
PE
6451 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
6452 Only r_alloc_inhibit_buffer_relocation needed to be added;
6453 the others were already declared.
6454
81899c91
PE
6455 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
6456 before checking whether it's out of range. Put the check inside
6457 eassert. See
6458 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
6459
33017faf 64602012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
6461
6462 * callproc.c (Fcall_process): Restore a line that was accidentally
6463 commented out in the 2011-02-13 change (bug#11547).
6464
33017faf 64652012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
6466
6467 * lisp.h [REL_ALLOC]: Add prototypes for external functions
6468 defined on ralloc.c.
6469
6470 * buffer.c [REL_ALLOC]: Remove prototypes of
6471 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
6472 they are now on lisp.h.
6473
6474 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
6475
6476 * search.c (search_buffer): Use it to inhibit relocation of buffer
6477 text while re_search_2 is doing its job, because re_search_2 is
6478 passed C pointers to buffer text. (Bug#11519)
6479
23415acf
EZ
6480 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
6481 Update value to 24.
6482
44e27368
EZ
6483 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
6484 state after an additional call to move_it_in_display_line_to, keep
6485 the values of it->max_ascent and it->max_descent found for the
6486 entire line.
6487 (pos_visible_p): Revert the comparison against bottom_y to what it
6488 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
6489 (Bug#11464)
6490
c1892f11
PE
64912012-05-26 Paul Eggert <eggert@cs.ucla.edu>
6492
6493 Fix coding-related core dumps with gcc -ftrapv.
6494 The code was computing A - B, where A and B are pointers, and B is
6495 random garbage. This can lead to core dumps on platforms that
6496 have special pointer registers, and it also leads to core dumps on
6497 x86-64 when compiled with gcc -ftrapv. The fix is to compute
6498 A - B only when B is initialized properly.
6499 * coding.c (coding_set_source, coding_set_destination): Return void.
6500 (coding_change_source, coding_change_destinations): New functions,
6501 with the old behaviors of coding_set_source and coding_set_destination.
6502 All callers that need an offset changed to use these new functions.
6503
eb7afdad
GM
65042012-05-26 Glenn Morris <rgm@gnu.org>
6505
6506 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
6507
f12fdf02
EZ
65082012-05-26 Eli Zaretskii <eliz@gnu.org>
6509
53a63be6 6510 Extend mouse support on W32 text-mode console.
61b108cc
SM
6511 * xdisp.c (draw_row_with_mouse_face):
6512 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 6513
eb3f6f01 6514 * w32console.c: Include window.h.
61b108cc
SM
6515 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
6516 New functions.
eb3f6f01
EZ
6517 (initialize_w32_display): Initialize mouse-highlight data.
6518
53a63be6
EZ
6519 * w32inevt.c: Include termchar.h and window.h.
6520 (do_mouse_event): Support mouse-autoselect-window. When the mouse
6521 moves, call note_mouse_highlight. If help_echo changed, call
6522 gen_help_event to produce help-echo message in the echo area.
6523 Call clear_mouse_face if mouse_face_hidden is set in the mouse
6524 highlight info.
6525
4cfd81f6
PE
65262012-05-26 Paul Eggert <eggert@cs.ucla.edu>
6527
6528 * lread.c (read1): Simplify slightly to avoid an overflow warning
6529 with GCC 4.7.0 on x86-64.
6530
4446092a
EZ
65312012-05-26 Eli Zaretskii <eliz@gnu.org>
6532
6533 * bidi.c (bidi_mirror_char): Revert last change: an int is
6534 definitely wide enough here.
6535
42b2a986 65362012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 6537
42b2a986 6538 Fix integer width and related bugs (Bug#9874).
eb106a49 6539 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
6540 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
6541 (string_bytes, check_sblock, allocate_string_data):
6542 (compact_small_strings, Fmake_bool_vector, make_string)
6543 (make_unibyte_string, make_multibyte_string)
6544 (make_string_from_bytes, make_specified_string)
6545 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
6546 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
6547 (mark_vectorlike):
6548 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6549 (allocate_pseudovector):
6550 Use int, not EMACS_INT, where int is wide enough.
6551 (inhibit_garbage_collection, Fgarbage_collect):
6552 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6553 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
6554 int might not be wide enough.
6555 (bidi_cache_search, bidi_cache_find, bidi_init_it)
6556 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
6557 (bidi_at_paragraph_end, bidi_find_paragraph_start)
6558 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
6559 (bidi_level_of_next_char, bidi_move_to_visually_next):
6560 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6561 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
6562 (Fkill_buffer, Fset_buffer_major_mode)
6563 (advance_to_char_boundary, Fbuffer_swap_text)
6564 (Fset_buffer_multibyte, overlays_at, overlays_in)
6565 (overlay_touches_p, struct sortvec, record_overlay_string)
6566 (overlay_strings, recenter_overlay_lists)
6567 (adjust_overlays_for_insert, adjust_overlays_for_delete)
6568 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
6569 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
6570 (Foverlay_recenter, last_overlay_modification_hooks_used)
6571 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
6572 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
6573 (validate_region): Omit unnecessary test for b <= e,
6574 since that's guaranteed by the previous test.
d311d28c
PE
6575 (adjust_overlays_for_delete): Avoid pos + length overflow.
6576 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
6577 (report_overlay_modification):
6578 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6579 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
6580 Omit pointer cast, which isn't needed anyway, and doesn't work
6581 after the EMACS_INT -> ptrdiff_t change.
02481186 6582 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
6583 * buffer.h: Adjust decls to match defn changes elsewhere.
6584 (struct buffer_text, struct buffer):
6585 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6586 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
6587 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
6588 not int, to avoid needless 32-bit limit on 64-bit hosts.
6589 (exec_byte_code): Use tighter memory-full test, one that checks
6590 for alloca overflow. Don't compute the address of the object just
6591 before an array, as that's not portable. Use EMACS_INT, not
6592 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
6593 * callint.c (Fcall_interactively):
6594 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6595 * callproc.c (call_process_kill, Fcall_process):
6596 Don't assume pid_t fits into an Emacs fixnum.
6597 (call_process_cleanup, Fcall_process, child_setup):
6598 Don't assume pid_t fits into int.
6599 (call_process_cleanup, Fcall_process, delete_temp_file)
6600 (Fcall_process_region):
6601 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6602 (Fcall_process): Simplify handling of volatile integers.
6603 Use int, not EMACS_INT, where int will do.
6604 * casefiddle.c (casify_object, casify_region, operate_on_word)
6605 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
6606 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6607 (casify_object): Avoid integer overflow when overallocating buffer.
6608 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 6609 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
6610 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
6611 * category.h (CATEGORYP): Don't assume arg is nonnegative.
6612 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
6613 integers are now checked earlier. All uses replaced with XINT.
6614 (ccl_driver):
6615 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6616 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
6617 (ccl_driver, Fregister_code_conversion_map):
6618 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
6619 (resolve_symbol_ccl_program): Check that vector header is in range.
6620 Always copy the vector, so that we can check its contents reliably
6621 now rather than having to recheck each instruction as it's being
6622 executed. Check that vector words fit in 'int'.
6623 (ccl_get_compiled_code, Fregister_ccl_program)
6624 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
6625 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
6626 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
6627 contents are in range.
6628 (Fccl_execute_on_string): Check that status is in range.
6629 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
6630 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
6631 Accept and return EMACS_INT, not int, because callers can pass values
6632 out of 'int' range.
6633 (c_string_width, strwidth, lisp_string_width, chars_in_text)
6634 (multibyte_chars_in_text, parse_str_as_multibyte)
6635 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
6636 (str_as_unibyte, str_to_unibyte, string_count_byte8)
6637 (string_escape_byte8, Fget_byte):
6638 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 6639 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
6640 avoid mishandling large integers.
6641 * character.h: Adjust decls to match defn changes elsewhere.
6642 * charset.c (load_charset_map_from_file, find_charsets_in_text)
6643 (Ffind_charset_region):
6644 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6645 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
6646 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 6647 Don't assume fixnum fits in int.
d311d28c
PE
6648 (load_charset_map_from_vector, Fmap_charset_chars):
6649 Remove now-unnecessary CHECK_NATNUMs.
6650 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
6651 Don't rely on undefined behavior with signed left shift overflow.
6652 Don't assume unsigned int fits into fixnum, or that fixnum fits
6653 into unsigned int. Don't require max_code to be a valid fixnum;
6654 that's not true for gb10830 4-byte on a 32-bit host. Allow
6655 invalid_code to be a cons, for the same reason. Require code_offset
6656 to be a character. Avoid int overflow if max_char is close
6657 to INT_MAX.
6658 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
6659 this is intended anyway and avoids some undefined behavior.
6660 (load_charset_map): Pass unsigned, not int, as 2nd arg of
6661 INDEX_TO_CODE_POINT, as that's what it expects.
6662 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
6663 * charset.h (DECODE_CHAR): Return int, not unsigned;
6664 this is what was intended anyway, and it avoids undefined behavior.
6665 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
6666 integer-overflow issues.
6667 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
6668 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
6669 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
6670 * chartab.c (Fmake_char_table, Fset_char_table_range)
6671 (uniprop_get_decoder, uniprop_get_encoder):
6672 Don't assume fixnum fits in int.
6673 * cmds.c (move_point): New function, that does the gist of
6674 Fforward_char and Fbackward_char, but does so while checking
6675 for integer overflow more accurately.
c96e5d6a 6676 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
6677 (Fforward_line, Fend_of_line, internal_self_insert)
6678 (internal_self_insert):
6679 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6680 Fix a FIXME, by checking for integer overflow when calculating
6681 target_clm and actual_clm.
6682 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 6683 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
6684 (ASSURE_DESTINATION, coding_alloc_by_realloc)
6685 (coding_alloc_by_making_gap, alloc_destination)
6686 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
6687 (encode_coding_utf_16, detect_coding_emacs_mule)
6688 (decode_coding_emacs_mule, encode_coding_emacs_mule)
6689 (detect_coding_iso_2022, decode_coding_iso_2022)
6690 (encode_invocation_designation, encode_designation_at_bol)
6691 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
6692 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
6693 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
6694 (encode_coding_ccl, encode_coding_raw_text)
6695 (detect_coding_charset, decode_coding_charset)
6696 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
6697 (produce_composition, produce_charset, produce_annotation)
6698 (decode_coding, handle_composition_annotation)
6699 (handle_charset_annotation, consume_chars, decode_coding_gap)
6700 (decode_coding_object, encode_coding_object, detect_coding_system)
6701 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
6702 (code_convert_region, code_convert_string)
8f50130c
PE
6703 (Fdefine_coding_system_internal)
6704 (coding_set_source, coding_set_destination):
d311d28c
PE
6705 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6706 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
6707 (Fdefine_coding_system_internal):
6708 Don't assume fixnums fit in int.
6709 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 6710 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
6711 (Funencodable_char_position, Fcheck_coding_systems_region)
6712 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 6713 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 6714 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 6715 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 6716 Don't access memory outside of the args array.
d311d28c 6717 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
6718 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
6719 result of ENCODE_CHAR.
d311d28c
PE
6720 * coding.h: Adjust decls to match defn changes elsewhere.
6721 (struct coding_system):
6722 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6723 * composite.c (get_composition_id, find_composition)
6724 (run_composition_function, update_compositions)
6725 (compose_text, composition_gstring_put_cache)
6726 (composition_gstring_p, composition_gstring_width)
6727 (fill_gstring_header, fill_gstring_body, autocmp_chars)
6728 (composition_compute_stop_pos, composition_reseat_it)
6729 (composition_update_it, struct position_record)
6730 (find_automatic_composition, composition_adjust_point)
6731 (Fcomposition_get_gstring, Ffind_composition_internal):
6732 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6733 (update_compositions):
6734 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6735 * composite.h: Adjust decls to match defn changes elsewhere.
6736 (struct composition):
6737 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6738 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
6739 Do not attempt to compute the address of the object just before a
6740 buffer; this is not portable.
6741 (Faref, Faset):
6742 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6743 (Faset): Use int, not EMACS_INT, where int is wide enough.
6744 (Fstring_to_number): Don't assume fixnums fit in int.
6745 (Frem): Don't assume arg is nonnegative.
6746 * dbusbind.c (xd_append_arg): Check for integers out of range.
6747 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 6748 (extract_signed, extract_unsigned): New functions.
243e0530
PE
6749 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
6750 (xd_get_connection_references): Return ptrdiff_t, not int.
6751 All uses changed.
6752 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
6753 (xd_read_message_1):
6754 Use int, not unsigned, where the dbus API uses int.
6755 (Fdbus_message_internal): Don't overflow mtype.
6756 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
6757 * dired.c (directory_files_internal, file_name_completion, scmp)
6758 (file_name_completion_stat):
6759 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6760 (file_name_completion): Don't overflow matchcount.
6761 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
6762 * dispextern.h: Adjust decls to match defn changes elsewhere.
6763 (struct text_pos, struct glyph, struct bidi_saved_info)
6764 (struct bidi_string_data, struct bidi_it, struct composition_it)
6765 (struct it):
6766 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6767 (struct display_pos, struct composition_it, struct it):
6768 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6769 * dispnew.c (increment_matrix_positions)
6770 (increment_row_positions, mode_line_string)
6771 (marginal_area_string):
6772 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 6773 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
6774 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6775 (duration_to_sec_usec): New function, to check for overflow better.
6776 (Fsleep_for, sit_for): Use it.
6777 * doc.c (get_doc_string, store_function_docstring):
6778 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6779 (get_doc_string, Fsnarf_documentation):
6780 Use int, not EMACS_INT, where int is wide enough.
6781 (get_doc_string):
6782 Use SAFE_ALLOCA, not alloca.
6783 Check for overflow when converting EMACS_INT to off_t.
6784 * doprnt.c (doprnt):
6785 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6786 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
6787 Don't assume uid_t fits into fixnum.
6788 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
6789 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
6790 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
6791 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
6792 (general_insert_function)
6793 (Finsert_char, make_buffer_string, make_buffer_string_both)
6794 (update_buffer_properties, Fbuffer_substring)
6795 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
6796 (Fsubst_char_in_region, check_translation)
6797 (Ftranslate_region_internal, save_restriction_restore, Fformat)
6798 (transpose_markers, Ftranspose_regions):
6799 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6800 (clip_to_bounds): Move to lisp.h as an inline function).
6801 (Fconstrain_to_field): Don't assume integers are nonnegative.
6802 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
6803 (Fsubst_char_in_region, Fsave_restriction):
6804 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6805 (Femacs_pid): Don't assume pid_t fits into fixnum.
6806 (lo_time): Use int, not EMACS_INT, when int suffices.
6807 (lisp_time_argument): Check for usec out of range.
6808 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
6809 (Fuser_login_name, Fuser_full_name): Signal an error
6810 if a uid argument is out of range, rather than relying on
6811 undefined behavior.
c8d5c857
PE
6812 (Fformat_time_string): Remove now-unnecessary check.
6813 lisp_time_argument checks for out-of-range usec now.
243e0530 6814 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
6815 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
6816 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
6817 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
6818 (init_cmdargs, Fdump_emacs):
6819 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6820 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
6821 the bottom (typically) 32 bits of the fixnum.
6822 * eval.c (specpdl_size, call_debugger):
6823 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6824 (when_entered_debugger, Fbacktrace_debug):
6825 Don't assume fixnum can fit in int.
6826 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
6827 the object just before a buffer; this is not portable.
6828 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
6829 (grow_specpdl, unbind_to):
6830 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6831 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
6832 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 6833 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
6834 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
6835 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
6836 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6837 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
6838 (a_write, e_write):
6839 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6840 (Fcopy_file, non_regular_nbytes, read_non_regular)
6841 (Finsert_file_contents):
6842 Use int, not EMACS_INT, where int is wide enough.
6843 (READ_BUF_SIZE): Verify that it fits in int.
6844 (Finsert_file_contents): Check that counts are in proper range,
6845 rather than assuming fixnums fit into ptrdiff_t etc.
6846 Don't assume fixnums fit into int.
125b3835 6847 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
6848 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
6849 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
6850 (string_char_to_byte, string_byte_to_char)
6851 (string_make_multibyte, string_to_multibyte)
6852 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
6853 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
6854 (substring_both, Fdelete, internal_equal, Ffillarray)
6855 (Fclear_string, mapcar1)
6856 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
6857 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
6858 (larger_vector, make_hash_table, maybe_resize_hash_table)
6859 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
6860 (Fmaphash, secure_hash):
6861 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6862 (concat): Check for string index and length overflow.
6863 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
6864 (Frequire):
6865 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6866 (larger_vector): New API (vec, incr_min, size_max) replaces old
6867 one (vec, new_size, init). This catches size overflow.
6868 INIT was removed because it was always Qnil.
6869 All callers changed.
6870 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
6871 the upper bound on a hash table index size.
6872 (make_hash_table, maybe_resize_hash_table): Use it.
6873 (secure_hash): Computer start_byte and end_byte only after
6874 they're known to be in ptrdiff_t range.
6875 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
6876 (Ffont_get_glyphs, Ffont_at):
6877 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6878 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
6879 (Flist_fonts, Fopen_font):
6880 Don't assume fixnum can fit in int.
6881 (check_gstring): Don't assume index can fit in int.
6882 (font_match_p): Check that fixnum is a character, not a nonnegative
6883 fixnum, since the later code needs to stuff it into an int.
6884 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
6885 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
6886 conversion overflow issues.
6887 (Fopen_font): Check for integer out of range.
6888 (Ffont_get_glyphs): Don't assume index can fit in int.
6889 * font.h: Adjust decls to match defn changes elsewhere.
6890 * fontset.c (reorder_font_vector): Redo score calculation to avoid
6891 integer overflow.
6892 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
6893 printmax_t, where ptrdiff_t is wide enough.
6894 (Finternal_char_font):
6895 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6896 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
6897 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
6898 (Fset_frame_position, x_set_frame_parameters)
6899 (x_set_line_spacing, x_set_border_width)
6900 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
6901 Check that fixnums are in proper range for system types.
6902 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
6903 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6904 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
6905 Use SAFE_ALLOCA_LISP, not alloca.
6906 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
6907 intptr_t is wide enough.
6908 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
6909 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
6910 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
6911 Check for fixnum out of range.
6912 * ftfont.c (ftfont_list): Don't assume index fits in int.
6913 Check that fixnums are in proper range for system types.
6914 (ftfont_shape_by_flt):
6915 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
6916 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
6917 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6918 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
6919 Check that fixnums are in proper range for system types.
6920 * gnutls.h: Adjust decls to match defn changes elsewhere.
6921 * gtkutil.c (xg_dialog_run):
6922 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6923 (update_frame_tool_bar):
6924 Check that fixnums are in proper range for system types.
6925 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 6926 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
6927 * indent.c (last_known_column, last_known_column_point):
6928 (current_column_bol_cache):
6929 (skip_invisible, current_column, check_display_width):
6930 (check_display_width, scan_for_column, current_column_1)
6931 (Findent_to, Fcurrent_indentation, position_indentation)
6932 (indented_beyond_p, Fmove_to_column, compute_motion):
6933 (Fcompute_motion, Fvertical_motion):
6934 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6935 (last_known_column_modified): Use EMACS_INT, not int.
6936 (check_display_width):
6937 (Fcompute_motion):
6938 Check that fixnums and floats are in proper range for system types.
6939 (compute_motion): Don't assume index or fixnum fits in int.
6940 (compute_motion, Fcompute_motion):
6941 Use int, not EMACS_INT, when it is wide enough.
6942 (vmotion): Omit local var start_hpos that is always 0; that way
6943 we don't need to worry about overflow in expressions involving it.
6944 * indent.h: Adjust decls to match defn changes elsewhere.
6945 (struct position):
6946 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6947 Use int, not EMACS_INT, where int is wide enough.
6948 Remove unused members ovstring_chars_done and tab_offset;
6949 all uses removed.
6950 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
6951 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
6952 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
6953 (make_gap, copy_text, insert, insert_and_inherit)
6954 (insert_before_markers, insert_before_markers_and_inherit)
6955 (insert_1, count_combining_before, count_combining_after)
6956 (insert_1_both, insert_from_string)
6957 (insert_from_string_before_markers, insert_from_string_1)
6958 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
6959 (adjust_after_replace, adjust_after_insert, replace_range)
6960 (replace_range_2, del_range, del_range_1, del_range_byte)
6961 (del_range_both, del_range_2, modify_region)
6962 (prepare_to_modify_buffer, signal_before_change)
6963 (signal_after_change, Fcombine_after_change_execute):
6964 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6965 * intervals.c (traverse_intervals, rotate_right, rotate_left)
6966 (balance_an_interval, split_interval_right, split_interval_left)
6967 (find_interval, next_interval, update_interval)
6968 (adjust_intervals_for_insertion, delete_node, delete_interval)
6969 (interval_deletion_adjustment, adjust_intervals_for_deletion)
6970 (static_offset_intervals, offset_intervals)
6971 (merge_interval_right, merge_interval_left, make_new_interval)
6972 (graft_intervals_into_buffer, temp_set_point_both)
6973 (temp_set_point, set_point, adjust_for_invis_intang)
6974 (set_point_both, move_if_not_intangible, get_property_and_range)
6975 (get_local_map, copy_intervals, copy_intervals_to_string)
6976 (compare_string_intervals, set_intervals_multibyte_1):
6977 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6978 * intervals.h: Adjust decls to match defn changes elsewhere.
6979 (struct interval):
6980 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6981 * keyboard.c (this_command_key_count, this_single_command_key_start)
6982 (before_command_key_count, before_command_echo_length, echo_now)
6983 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
6984 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
6985 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
6986 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
6987 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6988 (last_non_minibuf_size, last_point_position, echo_truncate)
6989 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
6990 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
6991 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
6992 (stuff_buffered_input):
6993 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6994 (last_auto_save, command_loop_1, read_char):
6995 Use EMACS_INT, not int, to avoid integer overflow.
6996 (record_char): Avoid overflow in total_keys computation.
6997 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
6998 * keyboard.h: Adjust decls to match defn changes elsewhere.
6999 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
7000 (Fkey_description, Fdescribe_vector, Flookup_key):
7001 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7002 (click_position): New function, to check that positions are in range.
7003 (Fcurrent_active_maps):
7004 (describe_command):
7005 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7006 (Faccessible_keymaps, Fkey_description):
7007 (preferred_sequence_p):
7008 Don't assume fixnum can fit into int.
7009 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
7010 Check for integer overflow in size calculations.
7011 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
7012 avoid mishandling large integers.
7013 * lisp.h: Adjust decls to match defn changes elsewhere.
7014 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
7015 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
7016 (struct Lisp_Marker):
7017 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7018 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
7019 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
7020 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
7021 All callers changed.
7022 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
7023 Assume the arg has valid form, since it always does.
7024 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
7025 unsigned integer system type.
7026 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
7027 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
7028 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7029 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
7030 (duration_to_sec_usec): New decl.
7031 * lread.c (read_from_string_index, read_from_string_index_byte)
7032 (read_from_string_limit, readchar, unreadchar, openp)
7033 (read_internal_start, read1, oblookup):
7034 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7035 (Fload, readevalloop, Feval_buffer, Feval_region):
7036 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7037 (openp): Check for out-of-range argument to 'access'.
7038 (read1): Use int, not EMACS_INT, where int is wide enough.
7039 Don't assume fixnum fits into int.
6efdadfd 7040 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
7041 (read_filtered_event): Use duration_to_sec_usec
7042 to do proper overflow checking on durations.
d311d28c
PE
7043 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
7044 in size calculation.
7045 (Fexecute_kbd_macro):
7046 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7047 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
7048 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
7049 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
7050 (set_marker_both, set_marker_restricted_both, marker_position)
7051 (marker_byte_position, Fbuffer_has_markers_at):
7052 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7053 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 7054 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
7055 It now merely ensures that the menu is large enough, without
7056 necessarily growing it, as this avoids some integer overflow issues.
7057 All callers changed.
7058 (keymap_panes, parse_single_submenu, Fx_popup_menu):
7059 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7060 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
7061 Use SAFE_ALLOCA_LISP, not alloca.
7062 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
7063 to EMACS_INT. Check that fixnums are in proper range for system types.
7064 * minibuf.c (minibuf_prompt_width, string_to_object)
7065 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
7066 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
7067 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7068 (get_minibuffer, read_minibuf_unwind):
7069 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7070 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
7071 this simplifies overflow checking. All callers changed.
7072 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
7073 (Ftest_completion):
7074 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7075 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
7076 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
7077 Check that fixnums are in proper range for system types.
7078 (Fx_create_frame, Fx_show_tip):
7079 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7080 * nsfont.m (ns_findfonts, nsfont_list_family):
7081 Don't assume fixnum fits in long.
7082 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
7083 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7084 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
7085 wide enough.
17fdb222 7086 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
7087 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7088 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
7089 (PRINTDECLARE, PRINTPREPARE):
7090 (strout, print_string):
7091 (print, print_preprocess, print_check_string_charset_prop)
7092 (print_object):
7093 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7094 (PRINTDECLARE):
7095 (temp_output_buffer_setup, Fprin1_to_string, print_object):
7096 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7097 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 7098 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 7099 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
7100 (print_error_message): Use SAFE_ALLOCA, not alloca.
7101 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
7102 (print_depth, new_backquote_output, print_number_index):
7103 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
7104 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
7105 (Fset_process_window_size, Fformat_network_address)
7106 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 7107 (sigchld_handler):
d311d28c 7108 Check that fixnums are in proper range for system types.
d44287d4 7109 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
7110 Check for process-ids out of pid_t range rather than relying on
7111 undefined behavior.
e4d81efc 7112 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
7113 (Fformat_network_address, read_process_output, send_process)
7114 (Fprocess_send_region, status_notify):
7115 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7116 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
7117 (wait_reading_process_output, read_process_output, exec_sentinel):
7118 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7119 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
7120 (Faccept_process_output): Use duration_to_sec_usec to do proper
7121 overflow checking on durations.
dde14581
PE
7122 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
7123 Don't assume pid_t fits in int.
02481186
PE
7124 * process.h (struct Lisp_Process): Members tick and update_tick
7125 are now of type EMACS_INT, not int.
b62b53e8
PE
7126 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
7127 configured --with-wide-int.
d311d28c
PE
7128 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
7129 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
7130 * search.c (looking_at_1, string_match_1):
7131 (fast_string_match, fast_c_string_match_ignore_case)
7132 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
7133 (scan_newline, find_before_next_newline, search_command)
7134 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
7135 (set_search_regs, wordify):
7136 (Freplace_match):
7137 (Fmatch_data):
7138 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7139 (string_match_1, search_buffer, set_search_regs):
7140 (Fmatch_data):
7141 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7142 (wordify): Check for overflow in size calculation.
7143 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
7144 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
7145 Check that fixnums are in proper range for system types.
7146 * sound.c (struct sound_device)
7147 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
7148 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7149 (Fplay_sound_internal):
7150 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 7151 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
7152 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
7153 (Fparse_partial_sexp):
7154 Don't assume fixnums can fit in int.
7155 (struct lisp_parse_state, find_start_pos, find_start_value)
7156 (find_start_value_byte, find_start_begv)
7157 (update_syntax_table, char_quoted, dec_bytepos)
7158 (find_defun_start, prev_char_comend_first, back_comment):
7159 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
7160 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
7161 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7162 (Finternal_describe_syntax_value): Check that match_lisp is a
7163 character, not an integer, since the code stuffs it into int.
7164 (scan_words, scan_sexps_forward):
7165 Check that fixnums are in proper range for system types.
7166 (Fforward_word):
7167 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7168 (scan_sexps_forward):
7169 Use CHARACTERP, not INTEGERP, since the value must fit into int.
7170 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
7171 * syntax.h: Adjust decls to match defn changes elsewhere.
7172 (struct gl_state_s):
7173 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
7174 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
7175 MOST_POSITIVE_FIXNUM.
d311d28c
PE
7176 * sysdep.c (wait_for_termination_1, wait_for_termination)
7177 (interruptible_wait_for_termination, mkdir):
7178 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
7179 (emacs_read, emacs_write):
7180 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
7181 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
7182 and double all fit in int.
d311d28c
PE
7183 * term.c (set_tty_color_mode):
7184 Check that fixnums are in proper range for system types.
7185 * termhooks.h (struct input_event):
7186 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7187 * textprop.c (validate_interval_range, interval_of)
7188 (Fadd_text_properties, set_text_properties_1)
7189 (Fremove_text_properties, Fremove_list_of_text_properties)
7190 (Ftext_property_any, Ftext_property_not_all)
7191 (copy_text_properties, text_property_list, extend_property_ranges)
7192 (verify_interval_modification):
7193 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7194 (Fnext_single_char_property_change)
7195 (Fprevious_single_char_property_change):
7196 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
7197 (copy_text_properties):
7198 Check for integer overflow in index calculation.
d311d28c
PE
7199 * undo.c (last_boundary_position, record_point, record_insert)
7200 (record_delete, record_marker_adjustment, record_change)
7201 (record_property_change):
7202 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7203 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
7204 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7205 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
7206 (Fx_hide_tip, Fx_file_dialog):
7207 * w32menu.c (set_frame_menubar):
7208 Use ptrdiff_t, not int, for consistency with rest of code.
7209 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
7210 (select_window, Fdelete_other_windows_internal)
7211 (window_scroll_pixel_based, window_scroll_line_based)
7212 (Frecenter, Fset_window_configuration):
7213 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7214 (Fset_window_hscroll, run_window_configuration_change_hook)
7215 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 7216 (Fscroll_other_window, Frecenter):
d311d28c
PE
7217 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7218 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
7219 Don't assume fixnum fits in int.
7220 (Fset_window_scroll_bars):
7221 Check that fixnums are in proper range for system types.
7222 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
7223 (string_pos, c_string_pos, number_of_chars, init_iterator)
7224 (in_ellipses_for_invisible_text_p, init_from_display_pos)
7225 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
7226 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
7227 (face_before_or_after_it_pos, handle_invisible_prop)
7228 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
7229 (display_prop_intangible_p, string_buffer_position_lim)
7230 (string_buffer_position, handle_composition_prop, load_overlay_strings)
7231 (get_overlay_strings_1, get_overlay_strings)
7232 (iterate_out_of_display_property, forward_to_next_line_start)
7233 (back_to_previous_visible_line_start, reseat, reseat_to_string)
7234 (get_next_display_element, set_iterator_to_next)
7235 (get_visually_first_element, compute_stop_pos_backwards)
7236 (handle_stop_backwards, next_element_from_buffer)
7237 (move_it_in_display_line_to, move_it_in_display_line)
7238 (move_it_to, move_it_vertically_backward, move_it_by_lines)
7239 (add_to_log, message_dolog, message_log_check_duplicate)
7240 (message2, message2_nolog, message3, message3_nolog
7241 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
7242 (current_message_1, truncate_echo_area, truncate_message_1)
7243 (set_message, set_message_1, store_mode_line_noprop)
7244 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
7245 (text_outside_line_unchanged_p, check_point_in_composition)
7246 (reconsider_clip_changes)
7247 (redisplay_internal, set_cursor_from_row, try_scrolling)
7248 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
7249 (redisplay_window, find_last_unchanged_at_beg_row)
7250 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
7251 (trailing_whitespace_p, find_row_edges, display_line)
7252 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
7253 (display_mode_element, store_mode_line_string)
7254 (pint2str, pint2hrstr, decode_mode_spec)
7255 (display_count_lines, display_string, draw_glyphs)
7256 (x_produce_glyphs, x_insert_glyphs)
7257 (rows_from_pos_range, mouse_face_from_buffer_pos)
7258 (fast_find_string_pos, mouse_face_from_string_pos)
7259 (note_mode_line_or_margin_highlight, note_mouse_highlight):
7260 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7261 (safe_call, init_from_display_pos, handle_fontified_prop)
7262 (handle_single_display_spec, load_overlay_strings)
7263 (with_echo_area_buffer, setup_echo_area_for_printing)
7264 (display_echo_area, echo_area_display)
7265 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
7266 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
7267 (redisplay_window, dump_glyph_row, display_mode_line)
7268 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 7269 (handle_display_spec, display_prop_string_p):
d311d28c
PE
7270 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7271 (handle_single_display_spec, build_desired_tool_bar_string)
7272 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
7273 (get_specified_cursor_type):
7274 Check that fixnums are in proper range for system types.
7275 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
7276 (Flookup_image_map):
7277 Don't assume fixnums fit in int.
7278 (compare_overlay_entries):
7279 Avoid mishandling comparisons due to subtraction overflow.
7280 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
7281 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
7282 (handle_tool_bar_click):
7283 Use int, not unsigned, since we prefer signed and the signedness
7284 doesn't matter here.
7285 (get_next_display_element, next_element_from_display_vector):
7286 Use int, not EMACS_INT, when int is wide enough.
7287 (start_hourglass): Use duration_to_sec_usec to do proper
7288 overflow checking on durations.
7289 * xfaces.c (Fbitmap_spec_p):
7290 Check that fixnums are in proper range for system types.
7291 (compare_fonts_by_sort_order):
7292 Avoid mishandling comparisons due to subtraction overflow.
7293 (Fx_family_fonts, realize_basic_faces):
7294 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7295 (Fx_family_fonts):
7296 Don't assume fixnum fits in int.
7297 Use SAFE_ALLOCA_LISP, not alloca.
7298 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
7299 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
7300 (face_at_buffer_position, face_for_overlay_string)
7301 (face_at_string_position):
7302 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7303 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
7304 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
7305 (Fx_show_tip):
7306 Check that fixnums are in proper range for system types.
7307 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
7308 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
7309 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7310 (Fx_change_window_property): Don't assume fixnums fit in int.
7311 * xfont.c (xfont_chars_supported):
7312 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7313 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
7314 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
7315 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7316 * xml.c (parse_region):
7317 * xrdb.c (magic_file_p):
7318 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7319 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
7320 (x_get_local_selection, x_reply_selection_request)
7321 (x_handle_selection_request, wait_for_property_change):
7322 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7323 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
7324 short is wide enough.
7325 (x_send_client_event): Don't assume fixnum fits in int.
7326 * xterm.c (x_x_to_emacs_modifiers):
7327 Don't assume EMACS_INT overflows nicely into int.
7328 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
7329 may come from Lisp.
7330 (handle_one_xevent): NATNUMP can eval its arg twice.
7331 (x_connection_closed):
7332 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7333 * xterm.h: Adjust decls to match defn changes elsewhere.
7334 (struct scroll_bar): Use struct vectorlike_header
7335 rather than rolling our own approximation.
7336 (SCROLL_BAR_VEC_SIZE): Remove; not used.
7337
c6574eb5
GM
73382012-05-25 Glenn Morris <rgm@gnu.org>
7339
7340 * lisp.mk (lisp): Update for more files being compiled now.
7341
e8d32c7e
SM
73422012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
7343
48def666
SM
7344 * lread.c: Remove `read_pure' which makes no difference.
7345 (read_pure): Remove var.
7346 (unreadpure): Remove function.
7347 (readevalloop): Don't call read_list with -1 flag.
7348 (read1, read_vector): Don't test read_pure any more.
7349 (read_list): Simplify.
7350
e8d32c7e
SM
7351 * fileio.c, character.h: Minor style tweaks.
7352
4b2addb7
DA
73532012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
7354
7355 * window.h (clip_changed): Remove useless declaration.
7356
584461b2
JB
73572012-05-22 Juanma Barranquero <lekktu@gmail.com>
7358
7359 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
7360 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
7361
34374650
PE
73622012-05-22 Paul Eggert <eggert@cs.ucla.edu>
7363
7364 Remove src/m/*.
7365 This directory predates autoconf and is no longer needed nowadays.
7366 Move its few remaining bits of functionality to where they're needed.
7367 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
7368 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
7369 * m/template.h: Remove.
7370 * Makefile.in (M_FILE): Remove. All uses removed.
7371 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
7372 * lisp.h (USE_LSB_TAG):
7373 * mem-limits.h (EXCEEDS_LISP_PTR):
7374 Use VAL_MAX, not VALBITS, in #if.
7375 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
7376 (EMACS_UINT): Define unconditionally now.
7377 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
7378 (BITS_PER_EMACS_INT): New constants, replacing
7379 what used to be in config.h, but not useful in #if.
7380 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
7381 define them any more.
7382 (VAL_MAX): New macro.
7383 (VALMASK): Use it.
7384 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
7385 BITS_PER_EMACS_INT, in #if.
7386 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
7387 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
7388 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
7389 * s/ms-w32.h (DATA_START):
7390 Move here from removed file m/intel386.h.
7391 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
7392 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
7393
261cb4bb
PE
73942012-05-21 Paul Eggert <eggert@cs.ucla.edu>
7395
7396 Assume C89 or later.
7397 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
7398 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
7399 (xrealloc):
7400 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
7401 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
7402 * textprop.c, tparam.c (NULL): Remove.
7403 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
7404 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
7405 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
7406 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
7407 * xterm.c (input_signal_count): Assume volatile works.
7408
ff23cd9f
KB
74092012-05-21 Ken Brown <kbrown@cornell.edu>
7410
7411 * xgselect.c (xg_select): Fix first argument in call to 'select'
7412 (bug#11508).
7413
1b170bc6
KB
74142012-05-20 Ken Brown <kbrown@cornell.edu>
7415
7416 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 7417 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 7418
b2f4d39f
KB
74192012-05-19 Ken Brown <kbrown@cornell.edu>
7420
7421 * xfns.c (x_in_use): Remove `static' qualifier.
7422 * xterm.h (x_in_use): Declare.
7423 * xgselect.c: Include xterm.h.
7424 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
7425 and `display_arg' (bug#9754).
7426
003fdae2
PE
74272012-05-19 Paul Eggert <eggert@cs.ucla.edu>
7428
9232a6d9
PE
7429 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
7430
003fdae2
PE
7431 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
7432 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
7433
784b56e2
EZ
74342012-05-18 Eli Zaretskii <eliz@gnu.org>
7435
7436 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
7437
7438 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 7439 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
7440
7441 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
7442 reference to image_cache->refcount.
7443 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
7444
a0a79cde
JL
74452012-05-17 Juri Linkov <juri@jurta.org>
7446
7447 * search.c (Fword_search_regexp, Fword_search_backward)
7448 (Fword_search_forward, Fword_search_backward_lax)
7449 (Fword_search_forward_lax): Move functions to isearch.el
7450 (bug#10145, bug#11381).
7451
b0572523
PE
74522012-05-16 Paul Eggert <eggert@cs.ucla.edu>
7453
7454 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
7455
9660f5fc
SM
74562012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
7457
7458 * lread.c (init_obarray): Declare Qt and Qnil as special.
7459
4374de83
GM
74602012-05-14 Glenn Morris <rgm@gnu.org>
7461
7462 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 7463 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 7464
dc44c39a
PE
74652012-05-14 Paul Eggert <eggert@cs.ucla.edu>
7466
078c97cb
PE
7467 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
7468
dc44c39a
PE
7469 * unexaix.c: Port to more-recent AIX compilers.
7470 (report_error, report_error_1, make_hdr, copy_sym)
7471 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
7472 Make arguments const char *, not char *, to avoid violations of C
7473 standard and to fix some AIX warnings reported by Gilles Pion.
7474
e18afed7 74752012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
7476
7477 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
7478 already have overlays loaded.
7479 (handle_single_display_spec): Before returning without displaying
7480 fringe bitmap, synchronize the bidi iterator with the main display
7481 iterator, by calling iterate_out_of_display_property.
7482 (iterate_out_of_display_property): Detect buffer iteration by
7483 testing that it->string is a Lisp string.
7484 (get_next_display_element): When the current object is exhausted,
7485 and there's something on it->stack, call set_iterator_to_next to
7486 proceed with what's on the stack, instead of returning zero.
7487 (set_iterator_to_next): If called at the end of a Lisp string,
7488 proceed to consider_string_end without incrementing string
7489 position. Don't increment display vector index past the end of
7490 the display vector. (Bug#11417)
c8fb9dc6
EZ
7491 (pos_visible_p): Don't report a position visible when move_it_to
7492 stopped at the last line of window, which happens to be scanned
7493 backwards by the bidi iteration. (Bug#11464)
ac268e67 7494
e18afed7 74952012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
7496
7497 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
7498 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
7499 are on a TTY, and thus unable to display on the fringes.
7500 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
7501 so we need to signal to the caller that this is a "replacing"
7502 display spec. This fixes display when the spec is invalid or we
7503 are on a TTY.
7504
e18afed7 75052012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
7506
7507 * unexaix.c (make_hdr): Fix typo in prototype.
7508 This bug broke the build on AIX. Problem reported by Gilles Pion.
7509
9d0a235a
MA
75102012-05-14 Michael Albinus <michael.albinus@gmx.de>
7511
7512 * keyboard.c (kbd_buffer_get_event): Read special events also in
7513 batch mode. (Bug#11415)
7514
9e6b06ed
GM
75152012-05-12 Glenn Morris <rgm@gnu.org>
7516
7517 * ns.mk: Update for ns_appbindir no longer having trailing "/".
7518
c1a1d7a3
EZ
75192012-05-12 Eli Zaretskii <eliz@gnu.org>
7520
7521 * lisp.mk (lisp): Add newcomment.elc.
7522
3fe7cdc8
GM
75232012-05-12 Glenn Morris <rgm@gnu.org>
7524
7525 * Makefile.in (MKDIR_P): New, set by configure.
7526 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
7527
53f7d2c0
PE
75282012-05-11 Paul Eggert <eggert@cs.ucla.edu>
7529
7530 Remove unused function hourglass_started.
7531 * dispextern.h (hourglass_started):
7532 * w32fns.c (hourglass_started):
7533 * xdisp.c (hourglass_started): Remove.
7534
75aafb17
JB
75352012-05-10 Juanma Barranquero <lekktu@gmail.com>
7536
7537 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
7538 Update dependencies.
7539
12959e8e
PE
75402012-05-10 Paul Eggert <eggert@cs.ucla.edu>
7541
97107e2e
PE
7542 * xgselect.c (xg_select): Put maxfds+1 into a var.
7543 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
7544
12959e8e
PE
7545 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
7546
836d29b3
DA
75472012-05-10 Dave Abrahams <dave@boostpro.com>
7548
7549 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
7550 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
7551
5cb67954
MA
75522012-05-09 Michael Albinus <michael.albinus@gmx.de>
7553
7554 * dbusbind.c (xd_registered_buses): New internal Lisp object.
7555 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
7556 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
7557 Initialize xd_registered_buses.
7558
3478ec45
PE
75592012-05-09 Paul Eggert <eggert@cs.ucla.edu>
7560
b263a6b0
PE
7561 Untag more efficiently if USE_LSB_TAG.
7562 This is based on a proposal by YAMAMOTO Mitsuharu in
7563 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
7564 For an admittedly artificial (nth 8000 longlist) benchmark on
7565 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
7566 Emacs's overall text size by 1%.
7567 * lisp.h (XUNTAG): New macro.
7568 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
7569 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
7570 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
7571 * eval.c (Fautoload):
7572 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
7573 * frame.h (XFRAME): Use XUNTAG.
7574
3478ec45
PE
7575 Port recent dbusbind.c changes to 32-bit --with-wide-int.
7576 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
7577 Remove unportable assumptions about print widths of types like
7578 dbus_uint32_t.
7579 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
7580 intptr_t when converting between pointer and integer, to avoid GCC
7581 warnings about wrong width.
7582
666b903b 75832012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
7584
7585 * w32proc.c (new_child): Force Windows to reserve only 64KB of
7586 stack for each reader_thread, instead of defaulting to 8MB
7587 determined by the linker. This avoids failures in creating
7588 subprocesses on Windows 7, see the discussion in this thread:
7589 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
7590
b120cc17
JC
75912012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
7592
7593 Fix up display of the *Minibuf-0* buffer in the mini window.
7594 * keyboard.c (read_char): Don't clear the echo area if there's no
7595 message to clear.
7596 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 7597 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 7598
9a4b36f8
MA
75992012-05-07 Michael Albinus <michael.albinus@gmx.de>
7600
7601 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
7602 batch mode.
7603
e5f9458f
CY
76042012-05-06 Chong Yidong <cyd@gnu.org>
7605
7606 * lisp.mk (lisp): Update.
7607
eceeb5fc 76082012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
7609
7610 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
7611
71873e2b
SM
76122012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
7613
7614 * data.c (PUT_ERROR): New macro.
7615 (syms_of_data): Use it. Add new error type `user-error'.
7616 * undo.c (user_error): New function.
7617 (Fprimitive_undo): Use it.
7618 * print.c (print_error_message): Adjust print style for `user-error'.
7619 * keyboard.c (user_error): New function.
7620 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
7621
ab0fa4e4
PE
76222012-05-03 Paul Eggert <eggert@cs.ucla.edu>
7623
7624 Do not limit current-time-string to years 1000..9999.
7625 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
7626 (Fcurrent_time_string): Support any year that is supported by the
7627 underlying localtime representation. Don't use asctime, as it
7628 has undefined behavior for years outside the range -999..9999.
7629
7ed806a7
PE
76302012-05-02 Paul Eggert <eggert@cs.ucla.edu>
7631
7632 Fix race conditions involving setenv, gmtime, localtime, asctime.
7633 Without this fix, interrupts could mess up code that uses these
7634 nonreentrant functions, since setting TZ invalidates existing
7635 tm_zone or tzname values, and since most of these functions return
7636 pointers to static storage.
7637 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
7638 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
7639 Grow the critical sections to include not just invoking
7640 localtime/gmtime, but also accessing these functions' results
7641 including their tm_zone values if any, and any related TZ setting.
7642 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
7643 so that the struct tm is saved in the critical section.
7644 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
7645 motivated by the fact that memory allocation needs to be outside
7646 the critical section.
7647
0c16dfed
DA
76482012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
7649
7650 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
7651 with RESET_INTERVAL.
7652
7653 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7654 Remove duplicated buffer name initialization.
7655
3f83ace8
JM
76562012-05-02 Jim Meyering <jim@meyering.net>
7657
7658 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
7659
c7b8541e
JM
7660 * xfns.c (x_window): Use xstrdup (Bug#11375).
7661
90207a15 76622012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
7663
7664 * xdisp.c (pos_visible_p): If already at a newline from the
7665 display string before the 'while' loop, don't walk back the glyphs
7666 from it3.glyph_row. Solves assertion violation when the display
7667 string begins with a newline (egg.el). (Bug#11367)
7668
b593d6a9
AH
76692012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
7670
7671 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
7672 Move to simple.el.
7673
4737362e
GM
76742012-05-01 Glenn Morris <rgm@gnu.org>
7675
99cf43f9
GM
7676 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
7677 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
7678 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
7679 All were removed before 23.1.
7680
9311dcff
GM
7681 * dispnew.c: Remove HAVE_LIBNCURSES test;
7682 it is always true on relevant platforms.
7683
4d5c6349
GM
7684 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
7685 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
7686
4737362e
GM
7687 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
7688
74dd3a6b
AS
76892012-04-30 Andreas Schwab <schwab@linux-m68k.org>
7690
7691 * .gdbinit (xpr): Remove checks for no longer existing misc types.
7692 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
7693 Remove.
7694
13c379ee
PE
76952012-04-28 Paul Eggert <eggert@cs.ucla.edu>
7696
7697 Do not avoid creating empty evaporating overlays (Bug#9642).
7698 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
7699 That is, do not delete an evaporating overlay if it becomes
7700 empty after its bounds are adjusted to fit within its buffer.
7701 This fix caused other problems, and I'm reverting it until we get
7702 to the bottom of them.
7703
a8e7d6d7 77042012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
7705
7706 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
7707
a8e7d6d7 77082012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
7709
7710 * xdisp.c (pos_visible_p): If the window start position is beyond
7711 ZV, start the display from buffer beginning. Prevents assertion
7712 violation in init_iterator when the minibuffer window is scrolled
7713 via the scroll bar.
7714
7715 * window.c (window_scroll_pixel_based): Likewise.
7716
a8e7d6d7 77172012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
7718
7719 * keymap.c (where_is_internal): Doc fix (Bug#10872).
7720
a8e7d6d7 77212012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
7722
7723 * fileio.c (Fcopy_file, Fset_file_selinux_context):
7724 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
7725
a8e7d6d7 77262012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 7727
b593d6a9
AH
7728 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
7729 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 7730
1c6900d9
EZ
77312012-04-26 Eli Zaretskii <eliz@gnu.org>
7732
4c3fa1d9
EZ
7733 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
7734 display element, check also the underlying string or buffer
7735 character. (Bug#11341)
7736
1c6900d9
EZ
7737 * w32menu.c: Include w32heap.h.
7738 (add_menu_item): If the call to AppendMenuW (via
7739 unicode_append_menu) fails, disable Unicode menus only if we are
7740 running on Windows 9X/Me.
7741
42bf8205
AS
77422012-04-24 Andreas Schwab <schwab@linux-m68k.org>
7743
7744 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
7745 (xgetint): Add missing shift for LSB tags.
7746
b1bac16e
MR
77472012-04-24 Martin Rudalics <rudalics@gmx.at>
7748
7749 * keyboard.c (read_char): Don't wipe echo area for select window
7750 events: These might get delayed via `mouse-autoselect-window'
7751 (Bug#11304).
7752
d69621cc
JB
77532012-04-24 Juanma Barranquero <lekktu@gmail.com>
7754
7755 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
7756 manipulation of :loaded-from data.
7757
02fd101b
JB
77582012-04-23 Juanma Barranquero <lekktu@gmail.com>
7759
7760 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
7761 now a cons (bug#11311).
7762
888bec30
PE
77632012-04-23 Paul Eggert <eggert@cs.ucla.edu>
7764
89a438bd
PE
7765 Do not create empty overlays with the evaporate property (Bug#9642).
7766 * buffer.c (Fmove_overlay): Delete an evaporating overlay
7767 if it becomes empty after its bounds are adjusted to fit within
7768 its buffer. Without this fix, in a nonempty buffer (let ((o
7769 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
7770 yields an empty overlay that has the evaporate property, which is
7771 not supposed to happen.
7772
1068fe4d
PE
7773 Fix minor GTK3 problems found by static checking.
7774 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7775 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7776 (struct _EmacsFixedClass, emacs_fixed_get_type):
7777 Move decls here from emacsgtkfixed.h, since they needn't be public.
7778 (emacs_fixed_get_type): Now static.
7779 (emacs_fixed_class_init): Omit unused local.
7780 (emacs_fixed_child_type): Remove; unused.
7781 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7782 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7783 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
7784 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
7785 (EMACS_FIXED_GET_CLASS): Remove; unused.
7786 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
7787
888bec30
PE
7788 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
7789 Problem reported by Juanma Barranquero for Windows -Wunused-function.
7790
de85e130
PE
77912012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7792
d0baac98 7793 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 7794 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
7795 (__malloc_size_t, __malloc_ptrdiff_t):
7796 Remove. All uses removed, replaced by the definiens if needed,
7797 since we can assume C89 or better now.
7798 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
7799 (protect_malloc_state, align, get_contiguous_space)
7800 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
7801 (malloc_atfork_handler_child, malloc_enable_thread)
7802 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
7803 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
7804 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
7805 (special_realloc, _realloc_internal_nolock, _realloc_internal)
7806 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
7807 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
7808 Define using prototypes, not old style.
7809 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
7810 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
7811 (align): Don't assume that signed integer overflow wraps around.
7812 Omit unused local var.
7813 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
7814 (_free_internal_nolock, memalign, mallochook, reallochook):
7815 Omit no-longer-needed casts.
7816 (valloc): Use getpagesize, not __getpagesize.
7817 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
7818 (struct hdr): The 'magic' member is now size_t, not unsigned long.
7819
de85e130
PE
7820 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
7821
dcbf5805
MA
78222012-04-22 Michael Albinus <michael.albinus@gmx.de>
7823
7824 Move functions from C to Lisp. Make non-blocking method calls
7825 the default. Implement further D-Bus standard interfaces.
7826
7827 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
7828 (QCdbus_request_name_allow_replacement)
7829 (QCdbus_request_name_replace_existing)
7830 (QCdbus_request_name_do_not_queue)
7831 (QCdbus_request_name_reply_primary_owner)
7832 (QCdbus_request_name_reply_in_queue)
7833 (QCdbus_request_name_reply_exists)
7834 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
7835 (QCdbus_registered_serial, QCdbus_registered_method)
7836 (QCdbus_registered_signal): New Lisp objects.
7837 (XD_DEBUG_MESSAGE): Use sizeof.
7838 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
7839 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
7840 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
7841 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
7842 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
7843 (xd_signature, xd_append_arg): Allow float for integer types.
7844 (xd_get_connection_references): New function.
b593d6a9
AH
7845 (xd_get_connection_address): Rename from xd_initialize.
7846 Return cached address.
dcbf5805
MA
7847 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
7848 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
7849 level.
7850 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 7851 Return number of refcounts.
dcbf5805
MA
7852 (Fdbus_get_unique_name): Make stronger parameter check.
7853 (Fdbus_message_internal): New defun.
7854 (Fdbus_call_method, Fdbus_call_method_asynchronously)
7855 (Fdbus_method_return_internal, Fdbus_method_error_internal)
7856 (Fdbus_send_signal, Fdbus_register_service)
7857 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
7858 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
7859 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
7860 (Vdbus_compiled_version, Vdbus_runtime_version)
7861 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
7862 (Vdbus_message_type_method_return, Vdbus_message_type_error)
7863 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
7864 (Vdbus_registered_buses, Vdbus_registered_objects_table):
7865 Adapt docstring.
dcbf5805 7866
52828e02
PE
78672012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7868
da05bc4c
PE
7869 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
7870 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
7871 Do not assume ptrdiff_t is the same width as 'int'.
7872
52828e02
PE
7873 * alloc.c: Handle unusual debugging option combinations.
7874 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
7875 since the two debugging options are incompatible.
7876 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
7877 is defined.
7878 (mem_init, mem_insert, mem_insert_fixup):
7879 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
7880 (NEED_MEM_INSERT): Remove; no longer needed.
7881
f01769f9
LL
78822012-04-22 Leo Liu <sdl.web@gmail.com>
7883
7884 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
7885
5790543d
PE
78862012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7887
7888 * sysdep.c [__FreeBSD__]: Minor cleanups.
7889 (list_system_processes, system_process_attributes) [__FreeBSD__]:
7890 Use Emacs indenting style more consistently. Avoid some casts.
7891 Use 'double' consistently rather than mixing 'float' and 'double'.
7892
b91b7e4d
EW
78932012-04-21 Eduard Wiebe <usenet@pusto.de>
7894
b593d6a9
AH
7895 * sysdep.c (list_system_processes, system_process_attributes):
7896 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 7897
6114eb15
AS
78982012-04-21 Andreas Schwab <schwab@linux-m68k.org>
7899
7900 * lisp.mk (lisp): Update.
7901
2f38dff7
PE
79022012-04-20 Paul Eggert <eggert@cs.ucla.edu>
7903
7904 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
7905 It is never used otherwise.
7906
4ae29f89
SM
79072012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
7908
7909 * print.c (print_preprocess): Only check print_depth if print-circle
7910 is nil.
7911 (print_object): Check for cycles even when print-circle is nil and
7912 print-gensym is t, but only check print_depth if print-circle is nil.
7913
f30d612a
CY
79142012-04-20 Chong Yidong <cyd@gnu.org>
7915
7916 * process.c (wait_reading_process_output): If EIO occurs on a pty,
7917 set the status to "failed" and ensure that sentinel is run.
7918
c07a4c0b 79192012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
7920
7921 * process.c (Fset_process_inherit_coding_system_flag)
7922 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 7923 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 7924
c07a4c0b 79252012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
7926
7927 * xdisp.c (string_buffer_position_lim): Limit starting position to
7928 BEGV.
7929 (set_cursor_from_row): If called for a mode-line or header-line
7930 row, return zero immediately.
7931 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
7932 farther than the first row after the header line, if any.
7933 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
7934 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
7935
c07a4c0b 79362012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 7937
4ae29f89
SM
7938 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
7939 (bug#11238).
ad3a2b41 7940
c07a4c0b 79412012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 79422012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
7943
7944 configure: new option --enable-gcc-warnings (Bug#11207)
7945 * Makefile.in (C_WARNINGS_SWITCH): Remove.
7946 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
7947 (ALL_CFLAGS): Use new macros rather than old.
7948 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
7949 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
7950 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
7951 -Wunused-result, -Wunused-variable. This should go away once
7952 the Emacs and Gnulib regex code is merged.
7953 (xmalloc, xrealloc): Now static.
7954
aba027e8
PE
79552012-04-17 Paul Eggert <eggert@cs.ucla.edu>
7956
7957 * dired.c (Fsystem_groups): Remove unused local.
7958
e5a36063
GM
79592012-04-17 Glenn Morris <rgm@gnu.org>
7960
7961 * dired.c (Fsystem_users): Doc fix.
7962
316411f0
DA
79632012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
7964
7965 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
7966 (syms_of_dired): Add them.
7967
9426aba4
PE
79682012-04-16 Paul Eggert <eggert@cs.ucla.edu>
7969
b62a57be
PE
7970 Fix minor alloc.c problems found by static checking.
7971 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
7972 New extern decls, to avoid calling undeclared functions.
7973 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
7974 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
7975 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
7976 (NEED_MEM_INSERT): New macro.
7977 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 7978 Remove one incorrect comment and fix another.
b62a57be 7979
3539f31f
PE
7980 Fix minor ralloc.c problems found by static checking.
7981 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
7982 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
7983 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
7984 (r_alloc_sbrk): Now static.
7985
a041960a
PE
7986 Improve ralloc.c interface checking.
7987 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
7988 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
7989 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
7990 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
7991 [REL_ALLOC]: ... to here, to check interface.
7992 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
7993 Remove decls. This fixes an "It stinks!".
7994
9426aba4
PE
7995 * alloc.c (which_symbols): Fix alignment issue / type clash.
7996
d55c12ed
AS
79972012-04-15 Andreas Schwab <schwab@linux-m68k.org>
7998
7999 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
8000 (struct Lisp_Misc_Any): Likewise.
8001 (struct Lisp_Free): Likewise.
8002 * alloc.c (union aligned_Lisp_Symbol): Define.
8003 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
8004 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
8005 (union aligned_Lisp_Misc): Define.
8006 (MARKER_BLOCK_SIZE, struct marker_block): Use union
8007 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 8008 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 8009
b948ce8b
PE
80102012-04-14 Paul Eggert <eggert@cs.ucla.edu>
8011
8012 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
8013 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
8014 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
8015 * s/netbsd.h, s/sol2-6.h:
8016 Remove definition of GC_MARK_STACK, since the default now works.
8017 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
8018 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
8019 no longer the default.
8020 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
8021
35dc09a1 80222012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 8023
35dc09a1
GM
8024 * lread.c (lisp_file_lexically_bound_p):
8025 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 8026
35dc09a1
GM
80272012-04-14 Eli Zaretskii <eliz@gnu.org>
8028
8029 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
8030 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
8031
80322012-04-14 Jan Djärv <jan.h.d@swipnet.se>
8033
8034 * nsterm.m (constrainFrameRect): Always constrain when there is only
8035 one screen (Bug#10962).
8036
bcd86815
KB
80372012-04-13 Ken Brown <kbrown@cornell.edu>
8038
8039 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
8040
c25df26e
RT
80412012-04-13 Reuben Thomas <rrt@sc3d.org>
8042
8043 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
8044
0fc59f1e
DC
80452012-04-11 Daniel Colascione <dancol@dancol.org>
8046
8047 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
8048 against is gone. It's better to use vfork now so that when Cygwin
8049 gains a new, working vfork, we use it automatically (bug#10398).
8050
de8c03dc
SM
80512012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
8052
8053 * window.c (save_window_save): Obey window-point-insertion-type.
8054
2f097256
GM
80552012-04-11 Glenn Morris <rgm@gnu.org>
8056
8057 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
8058
453b951e
SM
80592012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
8060
8061 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
8062
75f1671a 80632012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
8064
8065 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
8066 (force_quit_count): New var.
8067 (handle_interrupt): Use it.
8068
2a8ce227
JB
80692012-04-10 Juanma Barranquero <lekktu@gmail.com>
8070
8071 * w32.c (w32_delayed_load): Record the full path of the library
8072 being loaded (bug#10424).
8073
935396c0
GM
80742012-04-09 Glenn Morris <rgm@gnu.org>
8075
05920a43
GM
8076 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
8077 not just in the obarray, before snarfing them. (Bug#11036)
8078
935396c0
GM
8079 * Makefile.in ($(leimdir)/leim-list.el):
8080 Pass EMACS rather than BUILT_EMACS.
8081
a18ecafa
TZ
80822012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
8083
8084 * process.c (make_process):
8085 * process.h: Add integer `gnutls_handshakes_tried' member to
8086 process struct.
8087
6bbef4e5
JC
8088 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
8089 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
8090
8091 * gnutls.c (gnutls_log_function2i): Convenience log function.
8092 (emacs_gnutls_read): Use new log functions,
8093 `gnutls_handshakes_tried' process member, and
8094 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
8095 attempts per process (connection).
8096
b4d3bc10
CY
80972012-04-09 Chong Yidong <cyd@gnu.org>
8098
8099 * eval.c (Fuser_variable_p, user_variable_p_eh)
8100 (lisp_indirect_variable): Functions deleted.
8101 (Fdefvar): Caller changed.
8102
8103 * callint.c (Finteractive, Fcall_interactively):
8104 * minibuf.c (Fread_variable): Callers changed.
8105
70f4d973
EZ
81062012-04-09 Eli Zaretskii <eliz@gnu.org>
8107
8108 * xdisp.c (set_cursor_from_row): If the display string appears in
8109 the buffer at position that is closer to point than the position
8110 after the display string, display the cursor on the first glyph of
8111 the display string. Fixes cursor display when a 'display' text
8112 property immediately follows invisible text. (Bug#11094)
8113
cb3c2e3e
PE
81142012-04-09 Paul Eggert <eggert@cs.ucla.edu>
8115
8116 composite.c: use 'double' consistently
8117 * composite.c (get_composition_id): Use 'double' consistently
8118 instead of converting 'float' to 'double' and vice versa; this is
8119 easier to understand and avoids a GCC warning.
8120
fd06db5d
GM
81212012-04-09 Glenn Morris <rgm@gnu.org>
8122
50fe702a
GM
8123 * Makefile.in: Generate leim-list with bootstrap-emacs, in
8124 preparation for dumping it with emacs. (Bug#4789)
8125 (leimdir): New variable.
8126 ($(leimdir)/leim-list.el): New rule.
8127 (emacs$(EXEEXT)): Depend on leim-list.el.
8128
fd06db5d
GM
8129 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
8130 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
8131 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
8132
55c131ee
AS
81332012-04-08 Andreas Schwab <schwab@linux-m68k.org>
8134
8135 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
8136 proper alignment.
8137
9209588f
JB
81382012-04-07 Juanma Barranquero <lekktu@gmail.com>
8139
8140 * xml.c (init_libxml2_functions) [WINDOWSNT]:
8141 Remove unused local variable.
8142
e3fb2efb
PE
81432012-04-07 Paul Eggert <eggert@cs.ucla.edu>
8144
8145 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
8146 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
8147 (mark_memory): Mark Lisp_Objects only if pointers might hide in
8148 objects, as mark_maybe_pointer will catch them otherwise.
8149 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
8150 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
8151
b5385551
PE
81522012-04-07 Paul Eggert <eggert@cs.ucla.edu>
8153
8154 Fix typo that broke non-Windows builds.
8155 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
8156
9078ead6
EZ
81572012-04-07 Eli Zaretskii <eliz@gnu.org>
8158
8159 Support building on MS-Windows with libxml2.
8160
8161 * makefile.w32-in (OBJ2): Add xml.$(O).
8162 (GLOBAL_SOURCES): Add xml.c.
8163 ($(BLD)/xml.$(O)): New dependency list.
8164
8165 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
8166 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
8167 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
8168 [!WINDOWSNT]: New macros.
8169 (init_libxml2_functions, libxml2_loaded_p): New functions.
8170 (parse_region): Call fn_xmlCheckVersion instead of using the macro
8171 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
8172 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
8173 Calls xmlCleanupParser only if libxml2 was loaded (or statically
8174 linked in).
6bbef4e5
JC
8175 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
8176 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
8177 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
8178
8179 * emacs.c: Don't include libxml/parser.h.
8180 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
8181 xmlCleanupParser directly.
8182
8183 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
8184
3811fdf3
EZ
81852012-04-07 Eli Zaretskii <eliz@gnu.org>
8186
8187 * indent.c (Fvertical_motion): If there is a display string at
8188 point, use it.vpos to compute how many lines to backtrack after
8189 move_it_to point. (Bug#11133)
8190
2f8e16b2
EZ
81912012-04-06 Eli Zaretskii <eliz@gnu.org>
8192
8193 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
8194 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
8195 about subtle differences between FETCH_CHAR* and STRING_CHAR*
8196 macros related to unification of CJK characters. For the details,
8197 see the discussion following the message here:
8198 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
8199
3d439cd1
CY
82002012-04-04 Chong Yidong <cyd@gnu.org>
8201
8202 * keyboard.c (Vdelayed_warnings_list): Doc fix.
8203
8bc53d00
EZ
82042012-04-01 Eli Zaretskii <eliz@gnu.org>
8205
8206 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
8207 instead of alloca. (Bug#11138)
8208
3b0512a3
AS
82092012-04-01 Andreas Schwab <schwab@linux-m68k.org>
8210
8211 * w32menu.c (is_simple_dialog): Properly check lisp types.
8212 (Bug#11141)
8213
8427ddd2
EZ
82142012-03-31 Eli Zaretskii <eliz@gnu.org>
8215
979022ef
EZ
8216 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
8217 position we get to after a call to move_it_to fails the
8218 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
8219 only if we wind up in a string from display property. (Bug#11063)
8220
a6b1c7cc
EZ
8221 * window.c (Fdelete_other_windows_internal): Invalidate the row
8222 and column information about mouse highlight, so that redisplay
8223 restores it after reallocating the glyph matrices. (Bug#7464)
8224
8427ddd2
EZ
8225 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
8226 string comes from a `display' text property, use the buffer
8227 position of that property as if we actually saw that position in
8228 the row's glyphs.
697ba24b
EZ
8229 (move_it_by_lines): Remove the assertion that
8230 "it->current_x == 0 && it->hpos == 0" which can be legitimately
8231 violated when there's a before-string at the beginning of a line.
8232 (Bug#11063)
8427ddd2 8233
65a0a738
EZ
82342012-03-30 Eli Zaretskii <eliz@gnu.org>
8235
8236 * xdisp.c (append_space_for_newline): If the default face was
8237 remapped, use the remapped face for the appended newline.
8238 (extend_face_to_end_of_line): Use the remapped default face for
8239 extending the face to the end of the line.
8240 (display_line): Call extend_face_to_end_of_line when the default
8241 face was remapped. (Bug#11068)
8242
581355cc
EZ
82432012-03-29 Eli Zaretskii <eliz@gnu.org>
8244
8245 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
8246
e8fc049f
SM
82472012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
8248
8249 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
8250
4fb9a543
GM
82512012-03-27 Glenn Morris <rgm@gnu.org>
8252
8253 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
8254 Doc fixes.
8255
679910f1
KH
82562012-03-26 Kenichi Handa <handa@m17n.org>
8257
8258 * dispextern.h (struct glyph): Fix previous change. Change the
8259 bit length of glyphless.ch to 25 (Bug#11082).
8260
90d49b7f
CY
82612012-03-26 Chong Yidong <cyd@gnu.org>
8262
8263 * keyboard.c (Vselection_inhibit_update_commands): New variable.
8264 (command_loop_1): Use it; inhibit selection update for
8265 handle-select-window too (Bug#8996).
8266
f514f6f0
FP
82672012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
8268
e8fc049f 8269 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 8270
bf43fa51
KH
82712012-03-25 Kenichi Handa <handa@m17n.org>
8272
8273 * dispextern.h (struct glyph): Change the bit length of
8274 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
8275
8a0c01dd
EZ
82762012-03-24 Eli Zaretskii <eliz@gnu.org>
8277
8278 * s/ms-w32.h (tzname): Include time.h before redirecting to
8279 _tzname. Fixes the MSVC build. (Bug#9960)
8280
7d1c3a76
AS
82812012-03-24 Andreas Schwab <schwab@linux-m68k.org>
8282
8ed79523
AS
8283 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
8284 characters.
8285
7d1c3a76
AS
8286 * xterm.c (XTread_socket): Only modify handling_signal if
8287 !SYNC_INPUT. (Bug#11080)
8288
e99a9b8b
EZ
82892012-03-23 Eli Zaretskii <eliz@gnu.org>
8290
8291 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
8292 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
8293 when fetching a multibyte character consumes more bytes than
8294 CHAR_BYTES returns, due to unification of CJK characters in
8295 string_char. (Bug#11073)
8296
5063c0e1
TN
82972012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
8298
8299 * process.c (wait_reading_process_output): Handle pty disconnect
8300 by refraining from sending oneself a SIGCHLD (bug#10933).
8301
9f851fbd
CY
83022012-03-22 Chong Yidong <cyd@gnu.org>
8303
8304 * dispextern.h (struct it): New member string_from_prefix_prop_p.
8305
5063c0e1 8306 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
8307 Mark string as coming from a prefix property.
8308 (handle_face_prop): Use default face for prefix strings (Bug#4281).
8309 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
8310
fb5b8aca
CY
83112012-03-21 Chong Yidong <cyd@gnu.org>
8312
8313 * xfaces.c (Vface_remapping_alist): Doc fix.
8314
62356a1b
EZ
83152012-03-20 Eli Zaretskii <eliz@gnu.org>
8316
8317 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
8318 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
8319 Doc fixes.
62356a1b 8320
025de85b
CY
83212012-03-20 Chong Yidong <cyd@gnu.org>
8322
8323 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
8324 to reflect default non-nil value of redisplay-dont-pause.
8325
4827f94e
KH
83262012-03-19 Kenichi Handa <handa@m17n.org>
8327
8328 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
8329 it fit in a valid range (Bug#11003).
8330
e50a24a2
EZ
83312012-03-18 Eli Zaretskii <eliz@gnu.org>
8332
8333 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
8334 that is not from display property, accept the row as a "cursor
8335 row" if one of the string's character has a non-nil `cursor'
8336 property. Fixes cursor positioning when there are newlines in
8337 overlay strings, e.g. in icomplete.el. (Bug#11035)
8338
9af5ed87
PE
83392012-03-12 Paul Eggert <eggert@cs.ucla.edu>
8340
8341 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
8342
d1f55f16
CY
83432012-03-12 Chong Yidong <cyd@gnu.org>
8344
8345 * eval.c (inhibit_lisp_code): Rename from
8346 inhibit_window_configuration_change_hook; move from window.c.
8347
8348 * xfns.c (unwind_create_frame_1, Fx_create_frame):
8349 * window.c (run_window_configuration_change_hook)
8350 (syms_of_window): Callers changed.
8351
66c5eebd
CY
83522012-03-11 Chong Yidong <cyd@gnu.org>
8353
413df973
CY
8354 * keymap.c (Fkey_description): Doc fix (Bug#9700).
8355
66c5eebd
CY
8356 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
8357
1de11f56
CY
83582012-03-10 Chong Yidong <cyd@gnu.org>
8359
8360 * frame.c (other_visible_frames): Don't assume the selected frame
8361 is visible (Bug#10955).
8362
cae07000
SM
83632012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
8364
8365 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
8366
89c94350
JD
83672012-03-08 Jan Djärv <jan.h.d@swipnet.se>
8368
8369 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
8370 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
8371 zero (Bug#10954).
8372
999dd333
GM
83732012-03-03 Glenn Morris <rgm@gnu.org>
8374
01a6dcc8 8375 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 8376
de0100f2
EZ
83772012-03-02 Eli Zaretskii <eliz@gnu.org>
8378
8379 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
8380 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
8381 (redisplay_window, next_element_from_string): Fix typos in
8382 comments.
3e441275
EZ
8383 (redisplay_window): Pass to move_it_vertically the margin in
8384 pixels, not in screen lines.
de0100f2 8385
96a72ee9
GM
83862012-03-02 Glenn Morris <rgm@gnu.org>
8387
8388 * buffer.c (buffer-list-update-hook): Doc fix.
8389
312508d7
EZ
83902012-02-29 Eli Zaretskii <eliz@gnu.org>
8391
8392 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
8393 push_it before setting up the iterator for the first overlay
8394 string, even if we have an empty string loaded.
8395 (next_overlay_string): If there's an empty string on the iterator
8396 stack, pop the stack. (Bug#10903)
8397
27f3c637
PE
83982012-02-25 Paul Eggert <eggert@cs.ucla.edu>
8399
8400 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
8401 Suggested by Stefan Monnier in
8402 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
8403 * alloc.c (widen_to_Lisp_Object): New static function.
8404 (mark_memory): Also mark Lisp_Objects by fetching pointer words
8405 and widening them to Lisp_Objects. This would work even if
8406 USE_LSB_TAG is defined and wide integers are used, which might
8407 happen in a future version of Emacs.
8408
3c9dfce6
CY
84092012-02-25 Chong Yidong <cyd@gnu.org>
8410
fa74b241
CY
8411 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
8412 Doc fix.
8413
3c9dfce6
CY
8414 * xselect.c (Fx_selection_exists_p): Doc fix.
8415 (x_clipboard_manager_save_all): Print an informative message
8416 before saving to clipboard manager.
8417
9486df08
CY
84182012-02-24 Chong Yidong <cyd@gnu.org>
8419
8420 * keyboard.c (process_special_events): Handle all X selection
8421 requests in kbd_buffer, not just the next one (Bug#8869).
8422
f01d3321
CY
84232012-02-23 Chong Yidong <cyd@gnu.org>
8424
8425 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
8426 call when setting menu-bar-lines and tool-bar-lines parameters.
8427 (unwind_create_frame_1): New helper function.
8428
8429 * window.c (inhibit_window_configuration_change_hook): New var.
8430 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 8431 (syms_of_window): Initialize it.
f01d3321 8432
86b847b6
CY
84332012-02-22 Chong Yidong <cyd@gnu.org>
8434
8435 * xterm.c (x_draw_image_relief): Add missing type check for
8436 Vtool_bar_button_margin (Bug#10743).
8437
a59225b1
CY
84382012-02-21 Chong Yidong <cyd@gnu.org>
8439
8440 * fileio.c (Vfile_name_handler_alist): Doc fix.
8441
8442 * buffer.c (Fget_file_buffer): Protect against invalid file
8443 handler return value.
8444
310f5bd4
PE
84452012-02-20 Paul Eggert <eggert@cs.ucla.edu>
8446
cb3a28cc
PE
8447 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
8448 when computing $valmask.
8449
310f5bd4
PE
8450 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
8451 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
8452 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
8453 It's useless in that case, and it can cause problems on hosts
8454 that allocate halves of EMACS_INT values separately.
8455 Reported by Dan Horák. Diagnosed by Andreas Schwab in
8456 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
8457 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
8458 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
8459 it avoids undefined behavior on hosts where shifting right by more
8460 than the word width has undefined behavior.
8461
2375c96a
CY
84622012-02-19 Chong Yidong <cyd@gnu.org>
8463
8464 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
8465 (Funhandled_file_name_directory, Ffile_name_as_directory)
8466 (Fdirectory_file_name, Fexpand_file_name)
8467 (Fsubstitute_in_file_name): Protect against invalid file handler
8468 return values (Bug#10845).
8469
3eb49e71
EZ
84702012-02-18 Eli Zaretskii <eliz@gnu.org>
8471
8472 * .gdbinit (pitx): Fix incorrect references to fields of the
8473 iterator stack.
8474
7b926f3f
CY
84752012-02-17 Chong Yidong <cyd@gnu.org>
8476
8477 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
8478
11273115
PE
84792012-02-15 Paul Eggert <eggert@cs.ucla.edu>
8480
8481 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
8482 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
8483
c3a70e2b
CY
84842012-02-15 Chong Yidong <cyd@gnu.org>
8485
8486 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
8487 marked as special. Also, starting docstrings with * is obsolete.
8488
0ca43699
AS
84892012-02-13 Andreas Schwab <schwab@linux-m68k.org>
8490
8491 * gnutls.c (emacs_gnutls_write): Fix last change.
8492
2e8f3c56
LI
84932012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
8494
8495 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
8496 send_process.
8497
af70074f
SM
84982012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
8499
8500 * keymap.c (Fsingle_key_description): Handle char ranges.
8501
95986d52
CY
85022012-02-12 Chong Yidong <cyd@gnu.org>
8503
afd83bd1
CY
8504 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
8505 as that creates a dangerous corner case.
8506
95986d52
CY
8507 * window.c (Fdelete_window_internal): Invalidate the mouse
8508 highlight (Bug#9904).
8509
bd7da63e
GM
85102012-02-12 Glenn Morris <rgm@gnu.org>
8511
8512 * xselect.c (Fx_own_selection_internal)
8513 (Fx_get_selection_internal, Fx_disown_selection_internal)
8514 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
8515 * nsselect.m (Fx_own_selection_internal)
8516 (Fx_disown_selection_internal, Fx_selection_exists_p)
8517 (Fx_selection_owner_p, Fx_get_selection_internal):
8518 Sync docs and argument specs with the xselect.c versions.
8519
77abcbc2
LI
85202012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
8521
8522 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
8523
90b671e2
EZ
85242012-02-11 Eli Zaretskii <eliz@gnu.org>
8525
1c0ca0b7
EZ
8526 * w32select.c (Fx_selection_exists_p): Sync doc string and
8527 argument list with xselect.c. (Bug#10783)
8528
8529 * w16select.c (Fx_selection_exists_p): Sync doc string and
8530 argument list with xselect.c. (Bug#10783)
90b671e2 8531
49241268
GM
85322012-02-10 Glenn Morris <rgm@gnu.org>
8533
8534 * fns.c (Fsecure_hash): Doc fix.
8535
f998bbe7 85362012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
8537
8538 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
8539
0992bd9c
CY
85402012-02-07 Chong Yidong <cyd@gnu.org>
8541
8542 * buffer.c (Fbuffer_local_variables)
8543 (buffer_lisp_local_variables): Handle unbound vars correctly;
8544 don't let Qunbound leak into Lisp.
8545
af008560
GM
85462012-02-07 Glenn Morris <rgm@gnu.org>
8547
dd605cc4
GM
8548 * image.c (Fimagemagick_types): Doc fix.
8549
af008560
GM
8550 * image.c (imagemagick-render-type): Change it from a lisp object
8551 to an integer. Move the doc here from the lisp manual.
8552 Treat all values not equal to 0 the same.
8553
1449fa1d
CY
85542012-02-06 Chong Yidong <cyd@gnu.org>
8555
8556 * doc.c (store_function_docstring): Avoid applying docstring of
8557 alias to base function (Bug#2603).
8558
3723ec07
AS
85592012-02-04 Andreas Schwab <schwab@linux-m68k.org>
8560
8561 * .gdbinit (pp1, pv1): Remove redundant defines.
8562 (pr): Use pp.
8563
79c1cc1e
CY
85642012-02-04 Chong Yidong <cyd@gnu.org>
8565
8566 * nsterm.m: Declare a global (Bug#10694).
8567
d7f29f8e
EZ
85682012-02-04 Eli Zaretskii <eliz@gnu.org>
8569
cae07000
SM
8570 * w32.c (get_emacs_configuration_options):
8571 Include --enable-checking, if specified, in the return value.
d7f29f8e 8572
3b95a6f9
MR
85732012-02-04 Martin Rudalics <rudalics@gmx.at>
8574
8575 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
8576 after rounding frame sizes. (Bug#9723)
8577
d6fa96a6
EZ
85782012-02-04 Eli Zaretskii <eliz@gnu.org>
8579
8580 * keyboard.c (adjust_point_for_property): Don't position point
8581 before BEGV. (Bug#10696)
8582
df0b2940
PE
85832012-02-03 Paul Eggert <eggert@cs.ucla.edu>
8584
8585 Handle overflow when computing char display width (Bug#9496).
8586 * character.c (char_width): Return EMACS_INT, not int.
8587 (char_width, c_string_width): Check for overflow when
8588 computing the width; this is possible now that individual
8589 characters can have unbounded width. Problem introduced
8590 by merge from Emacs 23 on 2012-01-19.
8591
6bee44d6
MA
85922012-02-02 Michael Albinus <michael.albinus@gmx.de>
8593
8594 * dbusbind.c (Fdbus_register_method): Mention the return value
8595 :ignore in the docstring.
8596
44f92739
GM
85972012-02-02 Glenn Morris <rgm@gnu.org>
8598
1b9f60cc
GM
8599 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
8600
44f92739
GM
8601 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8602 Unconditionally set to t. (Bug#10673)
8603 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8604 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8605 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
8606
c5d3843c
KH
86072012-02-02 Kenichi Handa <handa@m17n.org>
8608
8609 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
8610 0, do not call append_composite_glyph.
8611
159462d4 86122012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
8613
8614 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
8615 NULL (Bug#6988).
8616 (x_produce_glyphs): If the component of a composition is a null
8617 string, set it->pixel_width to 1 to avoid zero-width glyph.
8618
78cef877
EZ
86192012-02-01 Eli Zaretskii <eliz@gnu.org>
8620
8621 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
8622 first 2 arguments are identical. This makes inserting large
8623 output from a subprocess an order of magnitude faster on
8624 MS-Windows, where all sbrk'ed memory is always contiguous.
8625
97897668
GM
86262012-01-31 Glenn Morris <rgm@gnu.org>
8627
8628 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 8629 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
8630 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
8631
31fd3586
GM
86322012-01-29 Glenn Morris <rgm@gnu.org>
8633
8634 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
8635
0e24a8b2
CY
86362012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
8637
8638 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
8639
cc0adcb0
CY
86402012-01-28 Chong Yidong <cyd@gnu.org>
8641
8642 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
8643
acc28cb9
CY
86442012-01-26 Chong Yidong <cyd@gnu.org>
8645
9c69cfb7
CY
8646 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
8647
acc28cb9
CY
8648 * search.c (Fsearch_forward, Fsearch_backward): Document negative
8649 repeat counts (Bug#10507).
8650
48da7392
GM
86512012-01-26 Glenn Morris <rgm@gnu.org>
8652
8653 * lread.c (syms_of_lread): Doc fix.
8654
14af5f7f
CY
86552012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
8656
8657 * coding.c (encode_designation_at_bol): Change return value to
8658 EMACS_INT.
8659
0b21c100
CY
86602012-01-25 Chong Yidong <cyd@gnu.org>
8661
8662 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
8663
3c2907f7
CY
86642012-01-21 Chong Yidong <cyd@gnu.org>
8665
8666 * floatfns.c (Fcopysign): Make the second argument non-optional,
8667 since nil is not allowed anyway.
8668
959ad23f
AS
86692012-01-21 Andreas Schwab <schwab@linux-m68k.org>
8670
8671 * process.c (read_process_output): Use p instead of XPROCESS (proc).
8672 (send_process): Likewise.
8673
34a02f46
MR
86742012-01-19 Martin Rudalics <rudalics@gmx.at>
8675
8676 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
8677 (Vwindow_persistent_parameters): Do not use Qstate.
8678 Rewrite doc-strings.
34a02f46 8679
1259009a 86802012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
8681
8682 * character.c (char_width): New function.
70d4fdf6
GM
8683 (Fchar_width, c_string_width, lisp_string_width):
8684 Use char_width (Bug#9496).
25ed9e61 8685
6a6ee00d
MR
86862012-01-16 Martin Rudalics <rudalics@gmx.at>
8687
8688 * window.c (Vwindow_persistent_parameters): New variable.
8689 (Fset_window_configuration, save_window_save): Handle persistent
8690 window parameters.
8691
c85efaf7
EZ
86922012-01-14 Eli Zaretskii <eliz@gnu.org>
8693
8694 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
8695 thrashing the stack of the thread. (Bug#9087)
8696
5944709e
PE
86972012-01-12 Paul Eggert <eggert@cs.ucla.edu>
8698
8699 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
8700
e71f5d99
EZ
87012012-01-11 Eli Zaretskii <eliz@gnu.org>
8702
8703 * xdisp.c (rows_from_pos_range): Handle the case where the
8704 highlight ends on a newline. (Bug#10464)
8705 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
8706 he end column for display of highlight that ends on a newline
8707 before a R2L line.
8708
ce316182
GM
87092012-01-11 Glenn Morris <rgm@gnu.org>
8710
8711 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
8712 from load-path also when installation-directory is nil. (Bug#10208)
8713
5b43da69
GM
87142012-01-10 Glenn Morris <rgm@gnu.org>
8715
74cc8ff9
GM
8716 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
8717
7d8d6e4e
GM
8718 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
8719 Update template values to be closer to their typical values these days.
5b43da69 8720
a0db8d43
EZ
87212012-01-09 Eli Zaretskii <eliz@gnu.org>
8722
8723 * xdisp.c (rows_from_pos_range): Accept additional argument
8724 DISP_STRING, and accept any glyph in a row whose object is that
8725 string as eligible for mouse highlight. Fixes mouse highlight of
8726 display strings from overlays. (Bug#10464)
8727
9a0115ab 87282012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 8729
b9110d6a 8730 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
8731 * fileio.c (auto_saving_dir_umask): New static var.
8732 (Fmake_directory_internal): Use it.
8733 (do_auto_save_make_dir): Set it, instead of invoking chmod after
8734 creating the directory. The old code temporarily assigns
8735 too-generous permissions to the directory.
8736 (do_auto_save_eh): Clear it.
b9110d6a 8737 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
8738 that the var is always cleared.
8739
6c1bd3f3
EZ
87402012-01-07 Eli Zaretskii <eliz@gnu.org>
8741
8742 * search.c (scan_buffer): Pass character positions to
8743 know_region_cache, not byte positions. (Bug#6540)
8744
069d2b50
L
87452012-01-07 LynX <_LynX@bk.ru> (tiny change)
8746
8747 * w32.c (sys_rename): Report EXDEV when rename of a directory
8748 fails because the target is on another logical disk. (Bug#10284)
8749
75bf0d33
DB
87502012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
8751
8752 * xterm.c (x_embed_request_focus): New function.
8753
8754 * xterm.h: Add prototype.
8755
8756 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
8757
1c6e5a32
GM
87582012-01-05 Glenn Morris <rgm@gnu.org>
8759
8760 * emacs.c (emacs_copyright): Update short copyright year to 2012.
8761
651e947e
EZ
87622012-01-01 Eli Zaretskii <eliz@gnu.org>
8763
8764 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
8765 Load gnutls_transport_set_lowat only if GnuTLS version is below
8766 2.11.1.
8767 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
8768 GnuTLS versions below 2.11.1.
8769
3778cdd8
AL
87702011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
8771
8772 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
8773 to the doc string advising against its use for altering the way
8774 windows are scrolled.
8775
0e5317f7
KH
87762011-12-28 Kenichi Handa <handa@m17n.org>
8777
8778 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
8779 coding-system ASCII compatible only when it does not produce BOM
8780 on encoding (Bug#10383).
8781
93d5ca1f
JD
87822011-12-26 Jan Djärv <jan.h.d@swipnet.se>
8783
8784 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
8785 can scroll.
8786 (create_and_show_popup_menu): Always use menu_position_func for
8787 Gtk3 (Bug#10361).
8788
ca22b785
AS
87892011-12-24 Andreas Schwab <schwab@linux-m68k.org>
8790
8791 * callint.c (Fcall_interactively): Don't truncate prompt string.
8792
d048e1e6
EZ
87932011-12-23 Eli Zaretskii <eliz@gnu.org>
8794
8795 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
8796 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 8797 resumed from there (after widening). (Bug#10360)
d048e1e6 8798
5ccaba1f
JD
87992011-12-22 Jan Djärv <jan.h.d@swipnet.se>
8800
8801 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
8802
204ee57f
JD
88032011-12-21 Jan Djärv <jan.h.d@swipnet.se>
8804
b81d40f0
JB
8805 * nsterm.m (x_free_frame_resources):
8806 Release f->output_data.ns->miniimage.
204ee57f
JD
8807 (ns_index_color): Fix indentation. Do not retain
8808 color_table->colors[i].
8809
8810 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
8811 before returning.
8812
8813 * nsfns.m (x_set_background_color): Assign return value from
8814 ns_index_color to face-background instead of NSColor*.
8815 (ns_implicitly_set_icon_type): Fix indentation.
8816 Change assignment in for loop to comparison.
8817
8818 * emacs.c (ns_pool): New variable.
8819 (main): Assign ns_pool.
8820 (Fkill_emacs): Call ns_release_autorelease_pool.
8821
8822 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
8823 autorelease fdesc, release fdAttrs and tdict.
8824 (ns_get_covering_families): Release charset.
8825 (ns_findfonts): Release NSFontDescriptor created with new.
8826 (ns_uni_to_glyphs): Fix indentation.
8827 (setString): Release attrStr before assigning new value.
8828
c803b2b7
JD
88292011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8830
678f4426
JD
8831 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
8832 and NS_IMPL_COCOA.
8833 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
8834 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
8835
cd394be1 88362011-12-18 David Reitter <reitter@cmu.edu>
678f4426 8837
5fecd5fc
JD
8838 * nsterm.m (ns_term_init): Subscribe for notifications
8839 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
8840 to method trackingNotification in EmacsMenu.
8841
8842 * nsmenu.m (trackingMenu): New variable.
3771cb17 8843 (trackingNotification): New method (from Aquamacs).
5fecd5fc 8844 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 8845 from Aquamacs (Bug#7030).
678f4426
JD
8846
88472011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 8848
c803b2b7
JD
8849 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
8850 (symbol_to_nsstring): Fix indentation.
8851 (ns_symbol_to_pb): New function.
cae07000
SM
8852 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
8853 (Fns_rotate_cut_buffers_internal): Remove.
8854 (Fns_store_selection_internal): Rename from
c803b2b7
JD
8855 Fns_store_cut_buffer_internal.
8856 (ns_get_foreign_selection, Fx_own_selection_internal)
8857 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
8858 (Fns_get_selection_internal, Fns_store_selection_internal):
8859 Use ns_symbol_to_pb and check if return value is nil.
8860 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
8861 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
8862 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
8863 renamed to Sns_store_selection_internal.
8864 (ns_handle_selection_request): Move code to Fx_own_selection_internal
8865 and remove this function.
8866 (ns_handle_selection_clear): Remove, never used.
8867 (Fx_own_selection_internal): Move code from ns_handle_selection_request
8868 here.
8869
e1b01a3a
KB
88702011-12-17 Ken Brown <kbrown@cornell.edu>
8871
8872 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
8873 GID is unknown (Bug#10257).
8874
2adb6e85
PE
88752011-12-17 Paul Eggert <eggert@cs.ucla.edu>
8876
8877 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
8878 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
8879 which caused a build failure on GNU/Linux IA-64. This problem was
8880 introduced by my 2011-10-07 patch.
8881
d1d7b339
JL
88822011-12-15 Juri Linkov <juri@jurta.org>
8883
8884 * image.c (imagemagick_error): New function. (Bug#10112)
8885 (imagemagick_load_image): Comment out `MagickSetResolution' call.
8886 Use `imagemagick_error' where ImageMagick functions return
8887 `MagickFalse'.
8888 (Fimagemagick_types): Add `Fnreverse' to return the list in the
8889 proper order.
8890
100d5755
KH
88912011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8892
8893 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
8894 fill background (Bug#8992).
8895
454592a6
MR
88962011-12-13 Martin Rudalics <rudalics@gmx.at>
8897
8898 * window.c (Vwindow_combination_resize)
8899 (Vwindow_combination_limit): Use t instead of non-nil in
8900 doc-strings.
61d4b438
MR
8901 (Vrecenter_redisplay): Add first sentence of doc-string on
8902 separate line.
53524d93 8903 (Frecenter): Fix doc-string typo.
454592a6 8904
3633e3aa
KH
89052011-12-11 Kenichi Handa <handa@m17n.org>
8906
8907 * coding.c (Funencodable_char_position): Pay attention to the
8908 buffer text relocation (Bug#9389).
8909
7b9d523a 89102011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 8911
7b9d523a
JD
8912 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
8913 gtk_init (Bug#10100).
8914
b73189c6
EZ
89152011-12-10 Eli Zaretskii <eliz@gnu.org>
8916
8917 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
8918 IT->string is nil. (Bug#10263)
8919
f7dfe5d6
JD
89202011-12-10 Jan Djärv <jan.h.d@swipnet.se>
8921
83faebb4
JD
8922 * nsterm.h (x_free_frame_resources): Declare.
8923
f7dfe5d6
JD
8924 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
8925 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
8926
8927 * nsterm.h (ns_get_defaults_value): Declare.
8928
8929 * nsterm.m (ns_default): Call ns_get_defaults_value.
8930
7cd4e72c
EZ
89312011-12-09 Eli Zaretskii <eliz@gnu.org>
8932
8933 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
8934 (Bug#10170)
8935
b34d7317
YM
89362011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8937
8938 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
8939 that where the value of an _OBJC_* symbol points to is in the .bss
8940 section (Bug#10240).
8941
76470ad1
KH
89422011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8943
8944 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 8945 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 8946
745fff94
KH
89472011-12-08 Kenichi Handa <handa@m17n.org>
8948
8949 * ftfont.c (get_adstyle_property): Fix previous change
8950 (Bug#10233).
8951
6e44397c
JB
89522011-12-07 Juanma Barranquero <lekktu@gmail.com>
8953
8954 * w32.c (init_environment): If no_site_lisp, remove site-lisp
8955 dirs from the default value of EMACSLOADPATH (bug#10208).
8956
7efa6272
GM
89572011-12-07 Glenn Morris <rgm@gnu.org>
8958
8959 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
8960 installation and source directories as well. (Bug#10208)
8961
f6fc4d87
CY
89622011-12-06 Chong Yidong <cyd@gnu.org>
8963
8964 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
8965
2bf26180
GM
89662011-12-06 Glenn Morris <rgm@gnu.org>
8967
8968 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
8969 as an error, not just -1. (Bug#10217)
8970
3a6ad4f0
CY
89712011-12-05 Chong Yidong <cyd@gnu.org>
8972
8973 * keyboard.c (process_special_events): New function.
8974 (swallow_events, Finput_pending_p): Use it (Bug#10195).
8975
75a3b399
PE
89762011-12-05 Paul Eggert <eggert@cs.ucla.edu>
8977
8978 * coding.c (encode_designation_at_bol): Don't use uninitialized
8979 local variable (Bug#9318).
8980
c3c9e25e
KH
89812011-12-05 Kenichi Handa <handa@m17n.org>
8982
8983 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
8984 return Qnil (Bug#8046, Bug#10193).
8985
5eb05ea3
KH
89862011-12-05 Kenichi Handa <handa@m17n.org>
8987
8988 * coding.c (encode_designation_at_bol): New args charbuf_end and
8989 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
8990 (coding_set_source): Return how many bytes coding->source was
8991 relocated.
8992 (coding_set_destination): Return how many bytes
8993 coding->destination was relocated.
8994 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 8995 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
8996
89972011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8998
8999 * coding.c (CODING_CHAR_CHARSET_P): New macro.
9000 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
9001 macro (Bug#9318).
9002
90032011-12-05 Andreas Schwab <schwab@linux-m68k.org>
9004
9005 The following changes are to fix Bug#9318.
9006
a79703f5 9007 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
9008 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
9009 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 9010 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 9011
7dbda6df
JB
90122011-12-05 Juanma Barranquero <lekktu@gmail.com>
9013
9014 * lisp.h (process_quit_flag): Fix external declaration.
9015
6d5eb5b0
SM
90162011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9017
9018 Don't macro-inline non-performance-critical code.
9019 * eval.c (process_quit_flag): New function.
9020 * lisp.h (QUIT): Use it.
9021
a0c3fad0
JD
90222011-12-04 Jan Djärv <jan.h.d@swipnet.se>
9023
9024 * nsfns.m (get_geometry_from_preferences): New function.
9025 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
9026
6c07aac2
AS
90272011-12-04 Andreas Schwab <schwab@linux-m68k.org>
9028
9029 * emacs.c (Qkill_emacs): Define.
9030 (syms_of_emacs): Initialize it.
9031 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
9032 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
9033 (quit_throw_to_read_char): Add parameter `from_signal'.
9034 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
9035 * lisp.h (QUIT): Call Fkill_emacs if requested.
9036
c052ead4
JD
90372011-12-03 Jan Djärv <jan.h.d@swipnet.se>
9038
9039 * widget.c (update_wm_hints): Return if wmshell is null.
9040 (widget_update_wm_size_hints): New function.
9041
9042 * widget.h (widget_update_wm_size_hints): Declare.
9043
9044 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
9045 widget_update_wm_size_hints (Bug#10104).
9046
9e49252b
EZ
90472011-12-03 Eli Zaretskii <eliz@gnu.org>
9048
9049 * xdisp.c (handle_invisible_prop): If the invisible text ends just
9050 before a newline, prepare the bidi iterator for consuming the
9051 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 9052 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 9053
02b16839
JL
90542011-12-02 Juri Linkov <juri@jurta.org>
9055
9056 * search.c (Fword_search_regexp): New Lisp function created from
9057 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
9058 (Fword_search_backward, Fword_search_forward)
9059 (Fword_search_backward_lax, Fword_search_forward_lax):
9060 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
9061 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
9062
0068070e
SM
90632011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
9064
9065 * fileio.c (Finsert_file_contents): Move after-change-function call
9066 to before the "handled:" label, since all "goto handled" appear in
9067 cases where the *-change-functions have already been properly called
9068 (bug#10117).
9069
3360a3fc
AS
90702011-12-01 Andreas Schwab <schwab@linux-m68k.org>
9071
9072 * keyboard.c (interrupt_signal): Don't call kill-emacs when
9073 waiting for input. (Bug#10169)
9074
73d6c093
EZ
90752011-11-30 Eli Zaretskii <eliz@gnu.org>
9076
9077 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
9078 verifies glyph row's hash code--we have just reallocated the
9079 glyphs, so their contents can be complete garbage. (Bug#10164)
9080
febe6bea
JB
90812011-11-30 Juanma Barranquero <lekktu@gmail.com>
9082
9083 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
9084
801a4313
EZ
90852011-11-30 Eli Zaretskii <eliz@gnu.org>
9086
9087 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
9088 attributes are tested _before_ calling verify_row_hash, to protect
9089 against GCC re-ordering of the tests. (Bug#10164)
9090
2b56b87e
JD
90912011-11-29 Jan Djärv <jan.h.d@swipnet.se>
9092
9093 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
9094
9095 * xterm.c (handle_one_xevent): Only set async_visible and friends
9096 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 9097 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
9098 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
9099
dbf31225
PE
91002011-11-28 Paul Eggert <eggert@cs.ucla.edu>
9101
9102 Remove GCPRO-related macros that exist only to avoid shadowing locals.
9103 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
9104 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
9105 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
9106 All uses changed to use GCPRO1 etc.
9107 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
9108 Revert to old implementation (i.e., before 2011-03-11).
9109
1305621b
YM
91102011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9111
9112 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
9113 of scroll runs so as to avoid assigning disabled bogus rows and
9114 unnecessary graphics copy operations.
9115
8c9afb46
EZ
91162011-11-27 Eli Zaretskii <eliz@gnu.org>
9117
9118 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
9119 (snprintf) [_MSC_VER]: Redirect to _snprintf.
9120 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
9121 (malloc, free, realloc, calloc): Redirect to e_* only when
9122 compiling Emacs.
9123
9124 * lisp.h (GCTYPEBITS): Move before first use.
9125 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
9126 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
9127 this macro definition.
9128
9129 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
9130 _MSC_VER.
9131
54e9e3bf
JD
91322011-11-27 Jan Djärv <jan.h.d@swipnet.se>
9133
6d5eb5b0
SM
9134 * gtkutil.c (xg_create_frame_widgets):
9135 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
9136 present with Gtk+ 2.0.
9137
83aca1cb
PE
91382011-11-26 Paul Eggert <eggert@cs.ucla.edu>
9139
9140 * fileio.c (Finsert_file_contents): Undo previous change; see
9141 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
9142
5b76caa4
PE
91432011-11-26 Paul Eggert <eggert@cs.ucla.edu>
9144
9145 Rename locals to avoid shadowing.
9146 * fileio.c (Finsert_file_contents):
9147 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
9148 * process.c (wait_reading_process_output):
9149 Rename inner 'proc' to 'p' to avoid shadowing.
9150 Indent for consistency with usual Emacs style.
9151
8c535114
EZ
91522011-11-25 Eli Zaretskii <eliz@gnu.org>
9153
9154 * xdisp.c (redisplay_window): If cursor row is not fully visible
9155 after recentering, and scroll-conservatively is set to a large
9156 number, scroll window by a few more lines to make the cursor fully
9157 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
9158 (start_display): Don't move to the next line if the display should
9159 start at a newline that is part of a display vector or an overlay
9160 string. (Bug#10119)
8c535114 9161
fa4fdb5c
JL
91622011-11-24 Juri Linkov <juri@jurta.org>
9163
9164 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
9165 after the `MagickPingImage' call. (Bug#10112)
9166
90ec88df
CY
91672011-11-23 Chong Yidong <cyd@gnu.org>
9168
9169 * window.c (Fcoordinates_in_window_p): Accept only live windows.
9170
56e2e794
MR
91712011-11-23 Martin Rudalics <rudalics@gmx.at>
9172
9173 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
9174 making another buffer current. (Bug#10114)
9175
b6e64c41
GM
91762011-11-23 Glenn Morris <rgm@gnu.org>
9177
9178 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
9179
6b21de18
CY
91802011-11-23 Chong Yidong <cyd@gnu.org>
9181
9182 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
9183 using it (Bug#5984).
9184
b12cd789
EZ
91852011-11-22 Eli Zaretskii <eliz@gnu.org>
9186
9187 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
9188 and header-lines, as they don't have one computed for them.
9189 (Bug#10098)
9190
9191 * .gdbinit (prow): Make displayed values more self-explaining.
9192 Add row's hash code.
9193
261b6fd4
LMI
91942011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
9195
9196 * process.c (wait_reading_process_output): Fix asynchrounous
9197 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 9198 (wait_reading_process_output): Add comment and URL.
261b6fd4 9199
e7cfd277
JD
92002011-11-21 Jan Djärv <jan.h.d@swipnet.se>
9201
9202 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
9203
a9b9b7f5
CY
92042011-11-21 Chong Yidong <cyd@gnu.org>
9205
9206 * window.c (Fnext_window, Fprevious_window): Doc fix.
9207
b0d15b4f
SM
92082011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
9209
9210 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
9211
fe7a3057
JB
92122011-11-20 Juanma Barranquero <lekktu@gmail.com>
9213
9214 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
9215
d2999b1a
MR
92162011-11-20 Martin Rudalics <rudalics@gmx.at>
9217
9218 * window.c (Fset_window_combination_limit): Rename argument
9219 STATUS to LIMIT.
9220 (Vwindow_combination_limit): Remove "status" from doc-string.
9221
d5ff9cd0
AS
92222011-11-20 Andreas Schwab <schwab@linux-m68k.org>
9223
9224 * m/ibms390.h: Remove.
9225 * m/ibms390x.h: Don't include "ibms390.h".
9226
a5bb9bd3
SM
92272011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
9228
9229 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
9230 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
9231
cd1181db
JB
92322011-11-20 Juanma Barranquero <lekktu@gmail.com>
9233
9234 * casetab.c (Fset_case_table):
9235 * charset.c (Fcharset_after): Fix typos.
9236
615a3b8d 92372011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 9238
17e845af
PE
9239 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
9240 Otherwise, valgrind does not work on some platforms.
9241 Problem reported by Andreas Schwab in
6a0bf43d
PE
9242 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
9243 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
9244 is set, removing the need for VIRT_ADDRESS_VARIES.
9245 (PURE_P): Use a more-efficient implementation that needs just one
9246 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
9247 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
9248 to 4 (xorl, subq, cmpq, setbe).
9249 * alloc.c (pure): Always extern now, since that's the
9250 VIRT_ADDR_VARIES behavior.
9251 (PURE_POINTER_P): Use a single comparison, not two, for
9252 consistency with the new puresize.h.
9253 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
9254 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
9255 Remove VIRT_ADDR_VARIES no longer needed.
9256
f8fe6f96
EZ
92572011-11-19 Eli Zaretskii <eliz@gnu.org>
9258
9259 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
9260 (erase_phys_cursor, update_window_cursor, show_mouse_face)
9261 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
9262 behave as if the cursor position were at the window margin.
9263
9264 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
9265 and the cursor position is out of bounds, behave as if the cursor
9266 position were at the window margin. (Bug#10075)
9267
df05a53c
CY
92682011-11-18 Chong Yidong <cyd@gnu.org>
9269
9270 * window.c (Fwindow_combination_limit): Make first argument
9271 non-optional, since it is meaningless for live windows like the
9272 selected window.
61ccba97 9273
2071918e
DA
92742011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
9275
9276 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
9277
b50a28de
SM
92782011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
9279
9280 * intervals.c: Fix grafting over the whole buffer (bug#10071).
9281 (graft_intervals_into_buffer): Simplify.
9282
015137db
EZ
92832011-11-18 Eli Zaretskii <eliz@gnu.org>
9284
9285 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
9286 hash values of the two rows.
9287 (copy_row_except_pointers): Preserve the used[] arrays and the
9288 hash values of the two rows. (Bug#10035)
68c95424 9289 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
9290
9291 * xdisp.c (row_hash): New function, body extracted from
9292 compute_line_metrics.
9293 (compute_line_metrics): Call row_hash, instead of computing the
9294 hash code inline.
9295
9296 * dispnew.c (verify_row_hash): Call row_hash for computing the
9297 hash code of a row, instead of duplicating code from xdisp.c.
9298
9299 * dispextern.h (row_hash): Add prototype.
9300
a2addb04
TH
93012011-11-18 Tassilo Horn <tassilo@member.fsf.org>
9302
9303 * frame.c (delete_frame): Don't delete the terminal when the last
9304 X frame is closed if emacs is built with GTK toolkit.
9305
df85d315
JB
93062011-11-17 Juanma Barranquero <lekktu@gmail.com>
9307
9308 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
9309
a0c2d0ae
MR
93102011-11-17 Martin Rudalics <rudalics@gmx.at>
9311
9312 * window.c (Vwindow_splits): Rename to
9313 Vwindow_combination_resize. Suggested by Juri Linkov.
9314 (Fsplit_window_internal): Use Vwindow_combination_resize instead
9315 of Vwindow_splits.
9316
58179cce
JB
93172011-11-16 Juanma Barranquero <lekktu@gmail.com>
9318
7877f373
JB
9319 * nsfns.m (Fns_font_name):
9320 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 9321
b6f67890
MR
93222011-11-16 Martin Rudalics <rudalics@gmx.at>
9323
9324 * window.h (window): Rename slot "nest" to "combination_limit".
9325 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
9326 (Fset_window_nest): Rename to Fset_window_combination_limit.
9327 (Vwindow_nest): Rename to Vwindow_combination_limit.
9328 (recombine_windows, make_parent_window, make_window)
9329 (Fsplit_window_internal, saved_window)
9330 (Fset_window_configuration, save_window_save): Rename all
9331 occurrences of window_nest to window_combination_limit.
9332
c7015153
JB
93332011-11-15 Juanma Barranquero <lekktu@gmail.com>
9334
9335 * image.c (imagemagick_load_image): Fix typo.
9336
322ad6ec
EZ
93372011-11-14 Eli Zaretskii <eliz@gnu.org>
9338
9339 * xdisp.c (display_line): Move the call to
9340 highlight_trailing_whitespace before the call to
9341 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
9342 faces of all the glyphs to compute ROW's hash value.
9343 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 9344
f067b8ec
JB
93452011-11-14 Juanma Barranquero <lekktu@gmail.com>
9346
9347 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
9348 just return (bug#10044).
9349
1e5b2111
EZ
93502011-11-12 Eli Zaretskii <eliz@gnu.org>
9351
7ef3cbd5
EZ
9352 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
9353 with user-defined heap size. Bump the default size of the temacs
9354 heap to 27MB, to avoid memory warning when running temacs.
9355 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
9356
1e5b2111
EZ
9357 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
9358 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
9359 (verify_row_hash) [XASSERTS]: New function.
9360 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
9361 that the hash value of glyph rows is correct.
1e5b2111 9362
89d61221
MR
93632011-11-12 Martin Rudalics <rudalics@gmx.at>
9364
9365 * window.h (window): Remove splits slot.
9366 * window.c (Fwindow_splits, Fset_window_splits): Remove.
9367 (Fdelete_other_windows_internal, make_parent_window)
9368 (make_window, Fsplit_window_internal, Fdelete_window_internal)
9369 (Fset_window_configuration, save_window_save): Don't deal with
9370 split status of windows.
9371 (saved_window): Remove splits slot.
9372 (Vwindow_splits): Rewrite doc-string.
9373
97f18cc8
JD
93742011-11-11 Jan Djärv <jan.h.d@swipnet.se>
9375
9376 * xfns.c (unwind_create_frame):
9377 * nsfns.m (unwind_create_frame):
9378 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
9379 Vframe_list (Bug#9999).
9380
22a648b4
DA
93812011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
9382
0b381c7e 9383 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 9384
659afede
KH
93852011-11-11 Kenichi Handa <handa@m17n.org>
9386
9387 * callproc.c (Fcall_process): Set the member dst_multibyte of
9388 process_coding.
9389
9ac0394b
KH
93902011-11-11 Johan Bockgård <bojohan@gnu.org>
9391
9392 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
9393 avoid a crash (bug#9496).
9394
2fbdc249
CY
93952011-11-09 Chong Yidong <cyd@gnu.org>
9396
9397 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
9398 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
9399
ac6b1f81
PE
94002011-11-08 Paul Eggert <eggert@cs.ucla.edu>
9401
9402 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
9403
09db192c
PE
94042011-11-08 Paul Eggert <eggert@cs.ucla.edu>
9405
9406 Avoid some portability problems by eschewing 'extern inline' functions.
9407 The trivial performance wins aren't worth the portability hassles; see
9408 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
9409 et seq.
9410 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
9411 (window_box_width, window_box_left, window_box_left_offset)
9412 (window_box_right, window_box_right_offset): Undo previous change,
9413 by removing the "extern"s.
9414 * intervals.c (adjust_intervals_for_insertion)
9415 (adjust_intervals_for_deletion): Undo previous change,
9416 making these static again.
9417 (offset_intervals, temp_set_point_both, temp_set_point)
9418 (copy_intervals_to_string): No longer inline.
9419 * xdisp.c (window_text_bottom_y, window_box_width)
9420 (window_box_height, window_box_left_offset)
9421 (window_box_right_offset, window_box_left, window_box_right)
9422 (window_box): No longer inline.
9423
105216ed
CY
94242011-11-08 Chong Yidong <cyd@gnu.org>
9425
9426 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
9427 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
9428 Signal an error if not a live window.
105216ed
CY
9429 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
9430 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
9431
ae9e237f
JB
94322011-11-07 Juanma Barranquero <lekktu@gmail.com>
9433
9434 * lisp.h (syms_of_abbrev): Remove declaration.
9435 Reported by CHENG Gao <chenggao@royau.me>.
9436
c7aa8333
EZ
94372011-11-07 Eli Zaretskii <eliz@gnu.org>
9438
9439 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
9440 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
9441 of temacs in GUI mode.
9442
be7f5545
MR
94432011-11-07 Martin Rudalics <rudalics@gmx.at>
9444
9445 * window.h: Declare delete_all_child_windows instead of
9446 delete_all_subwindows.
9447 * window.c (Fwindow_nest, Fset_window_nest)
9448 (Fset_window_new_total, Fset_window_new_normal)
9449 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
9450 (delete_all_subwindows): Rename to delete_all_child_windows.
9451 (Fdelete_other_windows_internal, Fset_window_configuration):
9452 Call delete_all_child_windows instead of delete_all_subwindows.
9453 * frame.c (delete_frame): Call delete_all_child_windows instead
9454 of delete_all_subwindows.
9455
ca78dc43
PE
94562011-11-07 Paul Eggert <eggert@cs.ucla.edu>
9457
9458 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
9459 This is also needed for porting to any host where GC_MARK_STACK is
9460 not GC_MAKE_GCPROS_NOOPS.
9461 (which_symbols): Use it.
9462
a0241d01
KH
94632011-11-07 Kenichi Handa <handa@m17n.org>
9464
9465 * coding.c (coding_set_destination): Check coding->src_pos only
9466 when coding->src_object is a buffer (bug#9910).
9467
9468 * process.c (send_process): Set the member src_multibyte of coding
9469 to 0 (bug#9911) when sending a unibyte text.
9470
9471 * callproc.c (Fcall_process): Set the member src_multibyte of
9472 process_coding to 0 (bug#9912).
9473
a64bfdfa 94742011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
9475
9476 * xmenu.c (cleanup_widget_value_tree): New function.
9477 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
9478 calling free_menubar_widget_value_tree directly (Bug#9830).
9479
cb41b32a
PE
94802011-11-06 Paul Eggert <eggert@cs.ucla.edu>
9481
9482 Fix some portability problems with 'inline'.
9483 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
9484 (window_box_width, window_box_left, window_box_left_offset)
9485 (window_box_right, window_box_right_offset): Declare extern.
9486 Otherwise, these inline functions do not conform to C99 and
9487 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
9488 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
9489 * intervals.c (adjust_intervals_for_insertion)
9490 (adjust_intervals_for_deletion): Now extern, because otherwise the
9491 extern inline functions 'offset_intervals' couldn't refer to it.
9492 (static_offset_intervals): Remove.
9493 (offset_intervals): Rewrite using the old contents of
9494 static_offset_intervals. The old version didn't conform to C99
9495 because an extern inline function contained a reference to an
9496 identifier with static linkage.
9497
b7041366
AS
94982011-11-06 Andreas Schwab <schwab@linux-m68k.org>
9499
9500 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
9501 GC.
9502
88a37c4d
EZ
95032011-11-06 Eli Zaretskii <eliz@gnu.org>
9504
9505 * xdisp.c (init_iterator, reseat_to_string): Don't set the
9506 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
9507 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
9508 return Qleft_to_right.
9509
49745b39
CY
95102011-11-06 Chong Yidong <cyd@gnu.org>
9511
9512 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
9513 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
9514 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
9515 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
9516 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
9517 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
9518 (Fwindow_vscroll): Doc fix.
9519 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
9520 argument, since it makes no sense to pass a live window and for
9521 consistency with window-child.
9522
1f05cd82
CS
95232011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
9524
9525 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
9526 support MSVC.
9527
22610910
JR
95282011-11-05 Jason Rumney <jasonr@gnu.org>
9529
9530 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
9531 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
9532 fonts (Bug#6029).
9533 (add_font_entity_to_list): Fix logic errors in mixed boolean and
9534 bitwise arithmetic preventing use of unicode-sip and non-truetype
9535 opentype fonts.
9536
a06776b2
EZ
95372011-11-05 Eli Zaretskii <eliz@gnu.org>
9538
3ad924ba
EZ
9539 * s/ms-w32.h (fstat, stat, utime): Move redirections to
9540 "emacs"-only part.
9541
a06776b2
EZ
9542 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
9543 initialization code to keep similarity to xfns.c after changes
9544 from 2011-11-05.
9545
c9e7db78
JD
95462011-11-05 Jan Djärv <jan.h.d@swipnet.se>
9547
a97f8f3f
JD
9548 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
9549 (unwind_create_frame): New function (Bug#9943).
9550 (Fx_create_frame): Restructure code to be more similar to the one in
9551 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
9552 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
9553 Move terminal->reference_count++ just before making the frame official
9554 (Bug#9943).
9555
9556 * nsterm.m (x_free_frame_resources): New function.
9557 (x_destroy_window): Move code to x_free_frame_resources.
9558
c9e7db78 9559 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
9560 (Fx_create_frame, x_create_tip_frame):
9561 Move terminal->reference_count++ just before making the frame
75f1671a 9562 official. Move initialization of image_cache_refcount and
c9e7db78
JD
9563 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
9564
a6fc3b5c
EZ
95652011-11-05 Eli Zaretskii <eliz@gnu.org>
9566
9567 Support MSVC build with newer versions of Visual Studio.
9568 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
9569 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
9570 nt/gmake.defs.
9571
9572 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
9573 which are not supported by MSVC.
9574 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
9575 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
9576 bitfields.
9577 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
9578 types in bitfields.
9579 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
9580
9581 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
9582
58179cce 95832011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
9584
9585 Support MSVC build with newer versions of Visual Studio.
9586 * w32.c: Don't include w32api.h for MSVC.
9587 (init_environment) [_MSC_VER]: Call sys_access, not _access.
9588
9589 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
9590 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
9591 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
9592 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
9593 e_* cousins.
9594 (alloca) [_MSC_VER]: Define to _alloca.
9595
9596 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
9597
9598 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
9599
a58c13ed
EZ
96002011-11-04 Eli Zaretskii <eliz@gnu.org>
9601
9602 * xdisp.c (note_mouse_highlight): If either of
9603 previous/next-single-property-change returns nil, treat that as
9604 the beginning or the end of the buffer. (Bug#9955)
9605
fe0b6370
JD
96062011-11-04 Jan Djärv <jan.h.d@swipnet.se>
9607
a58c13ed 9608 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
9609 label is not null (Bug#9951).
9610 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
9611 may be NULL.
9612
89bd5ee1
EZ
96132011-11-04 Eli Zaretskii <eliz@gnu.org>
9614
9615 * window.c (Fwindow_body_size): Mention in the doc string that the
9616 return value is in frame's canonical units. (Bug#9949)
9617
84c3edb9
EZ
96182011-11-03 Eli Zaretskii <eliz@gnu.org>
9619
4e2fb5c7
EZ
9620 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
9621
84c3edb9 9622 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 9623 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 9624 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 9625
bc17a887
EZ
96262011-11-01 Eli Zaretskii <eliz@gnu.org>
9627
9628 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
9629 Don't stop backward scan on the continuation glyph, even though
9630 its CHARPOS is positive.
6d5eb5b0
SM
9631 (mouse_face_from_buffer_pos, note_mouse_highlight):
9632 Rename cover_string to disp_string.
bc17a887 9633
4ee88440
MR
96342011-11-01 Martin Rudalics <rudalics@gmx.at>
9635
9636 * window.c (temp_output_buffer_show): Don't use
9637 Vtemp_buffer_show_specifiers.
9638 (Vtemp_buffer_show_specifiers): Remove unused variable.
9639
c2ff3c02
EZ
96402011-10-30 Eli Zaretskii <eliz@gnu.org>
9641
9642 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
9643 past the beginning of the current glyph matrix.
9644
58179cce 96452011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
9646
9647 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
9648 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
9649 HAVE_GTK3 (Bug#9869).
b77a6a7f 9650
3b574623
JD
9651 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
9652 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
9653
b77a6a7f
JD
9654 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
9655
9656 * xterm.c: Declare x_handle_net_wm_state to return int.
9657 (handle_one_xevent): Check if we are iconified but don't have
9658 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
9659 (get_current_wm_state): Return non-zero if not hidden,
9660 check for _NET_WM_STATE_HIDDEN (Bug#9893).
9661 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
9662 (x_handle_net_wm_state): Return what get_current_wm_state returns.
9663 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
9664
196e41e4
PE
96652011-10-29 Paul Eggert <eggert@cs.ucla.edu>
9666
9667 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
9668 so that this new function doesn't get optimized away by a
9669 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
9670
021f2e1a
AS
96712011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9672
9673 * frame.h (MOUSE_HL_INFO): Remove excess parens.
9674
8b058d44
EZ
96752011-10-29 Eli Zaretskii <eliz@gnu.org>
9676
9677 Fix the `xbytecode' command.
9678 * .gdbinit (xprintbytestr): New command.
b50a28de 9679 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
9680 (xbytecode): Print the byte-code string as well.
9681
4452fb80
EZ
96822011-10-29 Kim Storm <storm@cua.dk>
9683
8b058d44
EZ
9684 * alloc.c (which_symbols): New function.
9685
21b72067
AS
96862011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9687
9688 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
9689 line. (Bug#9903)
9690
83ed7b5c
GM
96912011-10-29 Glenn Morris <rgm@gnu.org>
9692
9693 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
9694 Not clear what it was for, and it causes various bugs. (Bug#9839)
9695
5a7a728b
EZ
96962011-10-28 Eli Zaretskii <eliz@gnu.org>
9697
9698 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
9699 possible random value that matches one of those tested as
9700 condition to clear the mouse face.
9701
d3d0842f
CY
97022011-10-28 Chong Yidong <cyd@gnu.org>
9703
9704 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
9705
31b39d13
DN
97062011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
9707
9708 * window.c (make_window): Initialize phys_cursor_on_p.
9709
9aba6043
SM
97102011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
9711
9712 * lisp.h (struct Lisp_Symbol): Update comments.
9713
c20992f4
JB
97142011-10-28 Juanma Barranquero <lekktu@gmail.com>
9715
9716 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
9717
db4f02f2
EZ
97182011-10-28 Eli Zaretskii <eliz@gnu.org>
9719
9720 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
9721 <oslsachem@gmail.com> for helping to debug this.
9722
9723 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
9724 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
9725 (g_b_init_get_glyph_outline_w): New static variables.
9726 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
9727 (GetGlyphOutlineW_Proc): New typedefs.
9728 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
9729 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
9730 New functions.
9731 (w32font_open_internal, compute_metrics):
9732 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
9733 instead of calling the "wide" APIs directly.
9734
9735 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
9736
9737 * w32.h (syms_of_w32font): Add prototype.
9738
87e68db4
JB
97392011-10-27 Juanma Barranquero <lekktu@gmail.com>
9740
9741 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
9742 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
9743 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
9744 (Fmove_to_window_line): Doc fix.
9745
435c1d67
CY
97462011-10-27 Chong Yidong <cyd@gnu.org>
9747
9748 * process.c (make_process): Set gnutls_state to NULL.
9749
9750 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
9751 non-NULL, regardless of GNUTLS_INITSTAGE.
9752 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
9753 an error. Set process slots as soon as we allocate them.
9754
9755 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
9756
9c6c6f49
CY
97572011-10-27 Chong Yidong <cyd@gnu.org>
9758
9aba6043
SM
9759 * gnutls.c (emacs_gnutls_deinit): New function.
9760 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
9761 (Fgnutls_deinit, Fgnutls_boot): Use it.
9762
9763 * process.c (make_process): Initialize GnuTLS credentials to NULL.
9764 (deactivate_process): Call emacs_gnutls_deinit.
9765
657d08d3
JB
97662011-10-27 Juanma Barranquero <lekktu@gmail.com>
9767
9768 * image.c (x_create_x_image_and_pixmap):
9769 * w32.c (sys_rename, w32_delayed_load):
9770 * w32font.c (fill_in_logfont):
9771 * w32reg.c (x_get_string_resource): Silence compiler warnings.
9772
5430d399
JB
97732011-10-26 Juanma Barranquero <lekktu@gmail.com>
9774
9775 * w32fns.c (w32_default_color_map): New function,
9776 extracted from Fw32_default_color_map.
a7ef684b 9777 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 9778
fe0055fa
PE
97792011-10-25 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
9782
e6346438
SM
97832011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
9784
9785 * keyboard.c (test_undefined): New function (bug#9751).
9786 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
9787
e112cc37
ET
97882011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
9789
9790 * sysdep.c (init_sys_modes): Fix the check for the controlling
9791 terminal (Bug#6649).
9792
7b5d6677
EZ
97932011-10-20 Eli Zaretskii <eliz@gnu.org>
9794
9795 * dispextern.h (struct bidi_it): New member next_en_type.
9796
9797 * bidi.c (bidi_line_init): Initialize the next_en_type member.
9798 (bidi_resolve_explicit_1): When next_en_pos is valid for the
9799 current character, check also for next_en_type being WEAK_EN.
9800 (bidi_resolve_weak): Don't enter the expensive loop if the current
9801 position is before next_en_pos. Record the bidi type of the first
9802 non-ET, non-BN character we find, in addition to its position.
9803 (bidi_level_of_next_char): Invalidate next_en_type when
9804 next_en_pos is over-stepped.
9805
7da0b018
PE
98062011-10-20 Paul Eggert <eggert@cs.ucla.edu>
9807
9808 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
9809 * editfns.c: Rewrite current-time-zone so that it invokes
9810 the equivalent of (format-time-string "%Z") to get the time zone name.
9811 This fixes a bug when the time zone name contains characters that
9812 need converting from the system time locale to Emacs internal format.
9813 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
9814 that patch fixed format-time-string to do the conversion, but
9815 I forgot to fix current-time-zone.
9816 (format_time_string): New function, containing most of
9817 what Fformat_time_string used to contain.
9818 (Fformat_time_string): Rewrite in terms of format_time_string.
9819 This doesn't change this function's behavior.
9820 (current-time-zone): Rewrite to use format_time_string.
9821 This fixes the bug reported by Michael Schierl in
9822 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
9823 Jason Rumney's 2007-06-07 change worked around this bug, but
9824 didn't fix it.
9825 * systime.h (tzname, timezone): Remove no-longer-used declarations.
9826
8547b010
EZ
98272011-10-19 Eli Zaretskii <eliz@gnu.org>
9828
9829 * xdisp.c (start_display): If the character at POS is displayed
9830 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
9831 (try_window_reusing_current_matrix): If a line ends in a display
9832 vector or the next line starts in a display vector, continue
9833 redrawing the window even though the character position of
9834 start_row was reached.
8547b010
EZ
9835 (Bug#9771, part 2)
9836
4e948d15
CY
98372011-10-18 Chong Yidong <cyd@gnu.org>
9838
9839 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
9840 with nobreak-char-display too.
9841
4787455f
EZ
98422011-10-18 Eli Zaretskii <eliz@gnu.org>
9843
9844 Fix part 3 of bug#9771.
9845 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
9846 (bidi_resolve_neutral): Don't enter the expensive loop looking for
9847 non-neutral characters if the current character is a paragraph
9848 separator (a.k.a. Newline). This avoids running the same
9849 expensive loop twice, once when we consume the preceding newline
9850 and the other time when the line actually needs to be displayed.
9851 Avoid the loop when we see neutrals on the base embedding level
9852 following a character whose directionality is the same as the
9853 paragraph's. This avoids running the expensive loop when a line
9854 ends in a long sequence of neutrals, like control characters.
9855 Add assertion against STRONG_AL type. Slightly rearrange code
9856 that determines the type of a neutral given the first non-neutral
9857 that follows it.
9858 (bidi_level_of_next_char): Set next_en_pos to zero when
9859 invalidating its info.
9860
2c91f553
EZ
98612011-10-17 Eli Zaretskii <eliz@gnu.org>
9862
9863 * xdisp.c (push_display_prop): Determine whether to record string
9864 or buffer position by IT->string, not by IT->method. Allow
9865 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
9866 (move_it_vertically_backward): Don't look for character position
9867 immediately after the newline when in a continuation line.
9868 (Bug#9771, part 1)
2c91f553 9869
c7b08b0d
MR
98702011-10-15 Martin Rudalics <rudalics@gmx.at>
9871
9872 * window.c (coordinates_in_window): Rewrite and delabelize
9873 vertical border check. (Bug#5357) (Bug#9618)
9874
6b02f655
SM
98752011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
9876
9877 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
9878 errors in XSetWindowBorder (bug#9310).
9879
81d40c92
DA
98802011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
9881
9882 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
9883 avoid crash when xmalloc overrun checking is enabled.
9884
d4172c3b
EZ
98852011-10-13 Eli Zaretskii <eliz@gnu.org>
9886
9887 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
9888 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
9889 cursor motion with <left> and <right> arrow keys.
9890
9891 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
9892 some callers set that themselves.
9893
b00eea75
EZ
98942011-10-12 Eli Zaretskii <eliz@gnu.org>
9895
9896 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
9897 display string and the previous row comes from the same string and
9898 is empty. (Bug#9739) (Bug#9738)
9899
8fe012c4
SM
99002011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
9901
9902 * doc.c (get_doc_string): Encode file name (bug#9735).
9903
0074aef2
EZ
99042011-10-12 Eli Zaretskii <eliz@gnu.org>
9905
79beb178
EZ
9906 * bidi.c (bidi_level_of_next_char):
9907 * xdisp.c (get_visually_first_element): Remove old incorrect
9908 comments regarding the Unicode Line Separator character.
9909
0074aef2
EZ
9910 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
9911
6e4b3fbe
DA
99122011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
9913
9914 * alloc.c (Fgc_status): Do not access beyond zombies array
9915 boundary if nzombies > MAX_ZOMBIES.
9916 * alloc.c (dump_zombies): Add missing format specifier.
9917
0324f3af
PE
99182011-10-12 Paul Eggert <eggert@cs.ucla.edu>
9919
b5525cac
PE
9920 * xdisp.c (set_cursor_from_row): Simplify conditionals,
9921 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
9922
0324f3af
PE
9923 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
9924 Some packages use them to denote characters with modifiers.
9925
e9b5f888
AS
99262011-10-11 Andreas Schwab <schwab@linux-m68k.org>
9927
9928 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
9929 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
9930 matching a pp-number. Rename parameter var to var1.
9931
127827c0
SM
99322011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
9933
9934 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
9935
c8fd3bd0
GM
99362011-10-08 Glenn Morris <rgm@gnu.org>
9937
9938 * callint.c (Fcall_interactively): Give a more explicit error for the
9939 'c' case with a non-character input. (Bug#8479)
9940
352ec8ff
EZ
99412011-10-08 Eli Zaretskii <eliz@gnu.org>
9942
03669ccb
EZ
9943 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
9944 lines.
7061c986
EZ
9945 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
9946 lines that are hscrolled on the left.
03669ccb 9947
352ec8ff
EZ
9948 * dispnew.c (buffer_posn_from_coords): Account for a possible
9949 presence of header-line. (Bug#4426)
9950
a66cfb1c
SM
99512011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
9952
6b02f655
SM
9953 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
9954 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 9955
7c5ee88e
PE
99562011-10-07 Paul Eggert <eggert@cs.ucla.edu>
9957
9958 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
9959 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
9960 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
9961 this makes Emacs dump core during garbage collection on rare
9962 occasions. sizeof is obviously inferior to offsetof here, so
9963 stick with offsetof.
9964 (GC_POINTER_ALIGNMENT): New macro.
9965 (mark_memory): Omit 3rd (offset) arg; caller changed.
9966 Don't assume EMACS_INT alignment is the same as pointer alignment.
9967
df1bbe5b
SM
99682011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9969
9970 * keyboard.c (read_key_sequence_remapped): New var.
9971 (read_key_sequence): Compute remapping in the right buffer.
9972 (command_loop_1): Use read_key_sequence's remapping directly.
9973
51553db6
SM
99742011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
9975
32c1fffd
SM
9976 * dired.c (file_name_completion): Don't expand file name.
9977 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
9978 before checking file name handler.
9979
51553db6
SM
9980 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
9981 they've been requested explicitly (bug#9591).
9982
b6bd1599 99832011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
9984
9985 * keymap.c (Fsingle_key_description): Use make_specified_string
9986 instead of build_string to build string from push_key_description.
9987 (Bug#5193)
9988
f701dc2a
PE
99892011-09-30 Paul Eggert <eggert@cs.ucla.edu>
9990
4222c55d
PE
9991 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
9992 This fixes a Y2038 bug on 64-bit hosts.
9993 * buffer.c (reset_buffer):
9994 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
9995 (Fclear_buffer_auto_save_failure):
9996 Use 0, not -1, to represent an unset failure time, since time_t
9997 might not be signed.
9998
f701dc2a
PE
9999 Remove dependency on glibc malloc internals.
10000 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10001 Move back here from lisp.h, but with their new implementations.
10002 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10003 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
10004 * charset.c (charset_table_init): New static var.
10005 (syms_of_charset): Use it instead of xmalloc. This removes a
10006 dependency on glibc malloc internals. See Eli Zaretskii's comment in
10007 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
10008 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10009 Move back to alloc.c.
10010 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10011 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
10012
9ceebf39
JD
100132011-09-30 Jan Djärv <jan.h.d@swipnet.se>
10014
10015 * nsterm.m (windowDidResize): Call x_set_window_size only when
10016 ns_in_resize is true. Otherwise set pixelwidth/height and
10017 call change_frame_size (Bug#9628).
10018
cb993c58
PE
100192011-09-30 Paul Eggert <eggert@cs.ucla.edu>
10020
3930c88b
PE
10021 Port --enable-checking=all to Fedora 14 x86-64.
10022 * charset.c (syms_of_charset): Also account for glibc malloc's
10023 internal overhead when calculating the initial malloc maximum.
10024
cb993c58
PE
10025 Port --enable-checking=all to Fedora 14 x86.
10026 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10027 Move to lisp.h.
10028 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
10029 (overrun_check_realloc, overrun_check_free):
10030 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
10031 That way, xmalloc returns a properly-aligned pointer even if
10032 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
10033 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
10034 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
10035 into account when calculating the initial malloc maximum.
10036 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10037 Move here from alloc.c, so that charset.c can use it too.
10038 Properly align; the old code wasn't right for common 32-bit hosts
10039 when configured with --enable-checking=all.
10040 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10041 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
10042
31bed486
EZ
100432011-09-29 Eli Zaretskii <eliz@gnu.org>
10044
04c70788 10045 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
10046 use EDOM.
10047
fbcaa2f3
EZ
100482011-09-28 Eli Zaretskii <eliz@gnu.org>
10049
10050 * xdisp.c (compute_display_string_end): If there's no display
10051 string at CHARPOS, return -1.
10052
10053 * bidi.c (bidi_fetch_char): When compute_display_string_end
10054 returns a negative value, treat the character as a normal
10055 character not covered by a display string. (Bug#9624)
10056
a239d4e9
JB
100572011-09-28 Juanma Barranquero <lekktu@gmail.com>
10058
10059 * lread.c (Fread_from_string): Fix typo in docstring.
10060
88652fd5
EZ
100612011-09-27 Eli Zaretskii <eliz@gnu.org>
10062
10063 * xdisp.c (handle_invisible_prop): If invisible text ends on a
10064 newline, reseat the iterator instead of bidi-iterating there one
10065 character at a time. (Bug#9610)
32c1fffd
SM
10066 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
10067 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 10068
ed497dd4
AS
100692011-09-27 Andreas Schwab <schwab@linux-m68k.org>
10070
10071 * lread.c (readevalloop): Use correct code for NBSP.
10072 (read1): Likewise. (Bug#9608)
10073
b2bf61aa
MA
100742011-09-25 Michael Albinus <michael.albinus@gmx.de>
10075
10076 * dbusbind.c (Fdbus_register_signal): When service is not
10077 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
10078
32bbb17c
GM
100792011-09-25 Glenn Morris <rgm@gnu.org>
10080
10081 * buffer.c (truncate-lines): Doc fix.
10082
94e0933e
CY
100832011-09-24 Chong Yidong <cyd@stupidchicken.com>
10084
10085 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
10086 (Fset_window_next_buffers): Doc fix.
10087
cddde921
GM
100882011-09-24 Glenn Morris <rgm@gnu.org>
10089
10090 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
10091
1260aef1
PE
100922011-09-24 Paul Eggert <eggert@cs.ucla.edu>
10093
25b4bfa0
PE
10094 Fix minor problems found by static checking.
10095 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
10096 * indent.c (Fvertical_motion): Fix == vs = typo.
10097
e3cbd34b
EZ
100982011-09-24 Eli Zaretskii <eliz@gnu.org>
10099
a66cfb1c
SM
10100 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
10101 Default value is now t. Doc fix.
6bf7006f 10102
e3cbd34b 10103 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 10104 logic when moving up, not only when moving down. Fix the
e3cbd34b 10105 confusing name and values of the it_overshoot_expected variable;
32c1fffd 10106 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
10107
10108 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
10109 CHARPOS is covered by a display string which includes newlines.
10110 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
10111 is covered by a display string with embedded newlines.
10112
a3de0cbd
MA
101132011-09-24 Michael Albinus <michael.albinus@gmx.de>
10114
10115 * dbusbind.c (Fdbus_register_signal): Add match rule to
10116 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
10117 (Fdbus_register_method, Vdbus_registered_objects_table):
10118 Fix docstring.
a3de0cbd 10119
b260039d
JM
101202011-09-24 Jim Meyering <meyering@redhat.com>
10121
32c1fffd 10122 do not ignore write error for any output size
b260039d
JM
10123 The previous change was incomplete.
10124 While it makes emacs --batch detect the vast majority of stdout
10125 write failures, errors were still ignored whenever the output size is
10126 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
10127 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
10128 && echo FAIL: ignored write error
10129 FAIL: ignored write error
10130 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
10131 && echo FAIL: ignored write error
10132 FAIL: ignored write error
10133 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
10134
8eca8a7c
AS
101352011-09-23 Andreas Schwab <schwab@linux-m68k.org>
10136
10137 * emacs.c (Fkill_emacs): In noninteractive mode exit
10138 non-successfully if a write error occurred on stdout. (Bug#9574)
10139
3341db62
EZ
101402011-09-21 Eli Zaretskii <eliz@gnu.org>
10141
10142 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
10143 the xassert test.
10144
10145 * dispextern.h (struct it): Update the comment documenting what
10146 can it->OBJECT be.
10147
8c203dbf
EZ
101482011-09-20 Eli Zaretskii <eliz@gnu.org>
10149
10150 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
10151 a display string, extend search for cursor position to end of row.
10152 (find_row_edges): If the row ends in a newline from a display
10153 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
10154 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
10155 (Fcurrent_bidi_paragraph_direction): Fix search for previous
10156 non-empty line. Fixes confusing cursor motion with arrow keys at
10157 the beginning of a line that starts with whitespace.
8c203dbf 10158
a4824228
LMI
101592011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
10160
10161 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
10162 (bug#9493).
10163
33ed493b
CY
101642011-09-18 Chong Yidong <cyd@stupidchicken.com>
10165
10166 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
10167 boolean (Bug#9154).
10168
56cd55c8
EZ
101692011-09-18 Eli Zaretskii <eliz@gnu.org>
10170
10171 * xdisp.c (display_line): Record maximum and minimum buffer
10172 positions even if no glyphs were produced (e.g., by a zero-width
10173 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
10174 buffer positions that will be removed from the glyph row because
10175 they don't fit.
c02dcedf
EZ
10176 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
10177 column is beyond frame width: don't subtract 1 "pixel" when
10178 computing width of the stretch.
3e62b7e0
EZ
10179 (reseat_at_next_visible_line_start): Undo the change made on
10180 2011-09-17 that saved paragraph information and restored it after
10181 the call to `reseat'. (Bug#9545)
56cd55c8 10182
5ed99d36 101832011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
10184
10185 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
10186 and turn window cursor on if cleared (Bug#9415).
10187
5ed99d36 101882011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
10189
10190 * search.c (boyer_moore): Take unibyte characters from pattern
10191 literally. (Bug#9458)
10192
9bade7b2
EZ
101932011-09-18 Eli Zaretskii <eliz@gnu.org>
10194
10195 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
10196
e5e9d610
PE
101972011-09-18 Paul Eggert <eggert@cs.ucla.edu>
10198
87e4427a
PE
10199 Fix minor problem found by static checking.
10200 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
10201 initialized, to pacify gcc -Wuninitialized.
10202
e5e9d610
PE
10203 * fileio.c: Report proper errno when syscall falls.
10204 (Finsert_file_contents): Save and restore errno,
10205 so that report_file_error outputs the correct diagnostic.
10206 (Fwrite_region) [CLASH_DETECTION]: Likewise.
10207
a1674f0b
EZ
102082011-09-18 Eli Zaretskii <eliz@gnu.org>
10209
10210 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
10211
fbfb6dd4
EZ
102122011-09-17 Eli Zaretskii <eliz@gnu.org>
10213
10214 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
10215 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
10216
bb187662
EZ
102172011-09-17 Eli Zaretskii <eliz@gnu.org>
10218
1137e8b8 10219 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 10220 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
10221
10222 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
10223 (bidi_find_paragraph_start): Search back for paragraph beginning
10224 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
10225 (bidi_move_to_visually_next): Only trigger paragraph-related
10226 computations when the last character is a newline or at EOB, not
10227 just any NEUTRAL_B. (Bug#9470)
10228
bb187662
EZ
10229 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
10230 truncated lines if point is covered by a display string. (Bug#9524)
10231
2e621251
PE
102322011-09-16 Paul Eggert <eggert@cs.ucla.edu>
10233
10234 * xselect.c: Relax test for outgoing X longs (Bug#9498).
10235 (cons_to_x_long): New function.
10236 (lisp_data_to_selection_data): Use it. Correct the test for
10237 short-versus-long data; it was negated. Break out of vector
10238 loop, for efficiency, when a long datum is discovered.
10239
91a15bc6
SM
102402011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
10241
10242 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
10243
b41c3a35
EZ
102442011-09-16 Eli Zaretskii <eliz@gnu.org>
10245
10246 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
10247 GCC PR/17406) by declaring this function with external scope.
10248
7812ba2d
PE
102492011-09-15 Paul Eggert <eggert@cs.ucla.edu>
10250
10251 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
10252 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
10253
cf7edc2a
AS
102542011-09-15 Andreas Schwab <schwab@linux-m68k.org>
10255
10256 * editfns.c (Fformat): Correctly handle text properties on "%%".
10257
bd01620e
EZ
102582011-09-15 Eli Zaretskii <eliz@gnu.org>
10259
10260 * xterm.c (x_draw_composite_glyph_string_foreground):
10261 * w32term.c (x_draw_composite_glyph_string_foreground):
10262 * term.c (encode_terminal_code):
10263 * composite.c (composition_update_it, get_composition_id):
10264 * xdisp.c (get_next_display_element)
10265 (fill_composite_glyph_string): Add comments about special meaning
10266 of TAB characters in a composition.
10267
a02719a3
PE
102682011-09-15 Paul Eggert <eggert@cs.ucla.edu>
10269
10270 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
10271 This occurs when processing a multibyte format.
10272 Problem reported by Wolfgang Jenker.
a02719a3 10273
72589a3c
JB
102742011-09-15 Johan Bockgård <bojohan@gnu.org>
10275
10276 * xdisp.c (try_cursor_movement): Only check for exact match if
10277 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
10278
1c14176c
PE
102792011-09-14 Paul Eggert <eggert@cs.ucla.edu>
10280
10281 Remove unused external symbols.
10282 * dispextern.h (calc_pixel_width_or_height): Remove decl.
10283 * xdisp.c (calc_pixel_width_or_height): Now static.
10284 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
10285 * indent.c (check_display_width):
10286 * w32term.c: Fix comment to match code.
10287 * xterm.c, xterm.h (x_catching_errors): Remove.
10288
d2eea5b5
PE
102892011-09-14 Paul Eggert <eggert@cs.ucla.edu>
10290
10291 * xselect.c: Use signed conversions more consistently (Bug#9498).
10292 (selection_data_to_lisp_data): Assume incoming selection data are
10293 signed integers, not unsigned. This is to be consistent with
10294 outgoing selection data, which was modified to use signed integers
10295 in as part of the fix to Bug#9196 in response to Jan D.'s comment
10296 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
10297 expects long, not unsigned long.
10298
46888499
EZ
102992011-09-14 Eli Zaretskii <eliz@gnu.org>
10300
10301 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
10302 computation of loop end. Reported by Johan Bockgård
10303 <bojohan@gnu.org>.
10304
ef8ef9fb
CY
103052011-09-13 Chong Yidong <cyd@stupidchicken.com>
10306
10307 * frame.c (Fother_visible_frames_p): Function deleted.
10308
fa819fed
EZ
103092011-09-12 Eli Zaretskii <eliz@gnu.org>
10310
10311 * indent.c (compute_motion): Process display vector front to back
10312 rather than the other way around. (Bug#2496)
10313
2ba8e008
SM
103142011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
10315
10316 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
10317
20f53c69
CY
103182011-09-11 Chong Yidong <cyd@stupidchicken.com>
10319
10320 * minibuf.c (Fread_from_minibuffer): Doc fix.
10321
d562d7a4
EZ
103222011-09-11 Eli Zaretskii <eliz@gnu.org>
10323
10324 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
10325 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
10326
1c4d7f3d
LMI
103272011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
10328
10329 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
10330 value for non-existent files.
10331
b885bf36
EZ
103322011-09-11 Eli Zaretskii <eliz@gnu.org>
10333
10334 * fileio.c (Finsert_file_contents): If the file cannot be opened,
10335 set its "size" to -1. This will set the modtime_size field of
10336 the corresponding buffer to -1, which is what
10337 verify-visited-file-modtime expects for files that do not exist.
10338 (Bug#9139)
10339
6612f0bf
PE
103402011-09-11 Paul Eggert <eggert@cs.ucla.edu>
10341
10342 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
10343 here ...
10344 * lisp.h: ... from here. push_key_description is no longer
10345 defined in keyboard.c, so its declaration should not be in
10346 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
10347 logically belongs with push_key_description.
10348
dfb3f755
PE
103492011-09-10 Paul Eggert <eggert@cs.ucla.edu>
10350
10351 * buffer.h: Include <sys/types.h> instead of <time.h>.
10352 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
10353 Problem reported by Herbert J. Skuhra.
10354
3134906c
LMI
103552011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
10356
10357 * xml.c (parse_region): Make the parsing work for
10358 non-comment-starting XML files again (bug#9144).
10359
8d903f4e
AS
103602011-09-10 Andreas Schwab <schwab@linux-m68k.org>
10361
10362 * image.c (gif_load): Fix calculation of bottom and right corner.
10363 (Bug#9468)
10364
80ad64f4
EZ
103652011-09-10 Eli Zaretskii <eliz@gnu.org>
10366
10367 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
10368 redisplay in small windows.
10369
208a048d
EZ
103702011-09-09 Eli Zaretskii <eliz@gnu.org>
10371
10372 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
10373
9b1c252e
MR
103742011-09-08 Martin Rudalics <rudalics@gmx.at>
10375
10376 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
10377 Operate on live windows only.
10378
2949f33b
JB
103792011-09-08 Juanma Barranquero <lekktu@gmail.com>
10380
10381 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
10382
e08dcafd
EZ
103832011-09-07 Eli Zaretskii <eliz@gnu.org>
10384
10385 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
10386 only under bidi iteration.
10387
115b96bd
JD
103882011-09-07 Jan Djärv <jan.h.d@swipnet.se>
10389
10390 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
10391
c8199d0f
PE
103922011-09-06 Paul Eggert <eggert@cs.ucla.edu>
10393
10394 isnan: Fix porting problem to Solaris 10 with bundled gcc.
10395 Without this fix, the command to link temacs failed due to an
10396 undefined symbol __builtin_isnan. This is because
10397 /usr/include/iso/math_c99.h #defines isnan(x) to
10398 __builtin_isnan(x), but the bundled gcc, which identifies itself
10399 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
10400 a __builtin_isnan.
10401 * floatfns.c (isnan): #undef, and then #define to a clone of
10402 what's in data.c.
10403 (Fisnan): Always define, since it's always available now.
10404 (syms_of_floatfns): Always define isnan at the Lisp level.
10405
e39b275c 104062011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
10407
10408 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
10409
b2db44d9 104102011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 10411
f4af5137 10412 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
10413 The previous code assumed that file offsets (off_t values) fit in
10414 EMACS_INT variables, which is not true on typical 32-bit hosts.
10415 The code messed up by falsely reporting buffer overflow in cases
10416 such as (insert-file-contents "big" nil 1 2) into an empty buffer
10417 when "big" contains more than 2**29 bytes, even though this
10418 inserts just one byte and does not overflow the buffer.
10419 (Finsert_file_contents): Store file offsets as off_t
10420 values, not as EMACS_INT values. Check for overflow when
10421 converting between EMACS_INT and off_t. When checking for
10422 buffer overflow or for overlap, take the offsets into account.
10423 Don't use EMACS_INT for small values where int suffices.
10424 When checking for overlap, fix a typo: ZV was used where
10425 ZV_BYTE was intended.
10426 (Fwrite_region): Don't assume off_t fits into 'long'.
10427 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
10428
ecfc0a49
MA
104292011-09-05 Michael Albinus <michael.albinus@gmx.de>
10430
10431 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
10432
6511acf2 104332011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 10434
0999621a 10435 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
10436
10437 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 10438 (esprintf, exprintf, evxprintf): New functions.
62f19c19 10439 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 10440 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
10441 (modify_event_symbol): Do not assume that the length of
10442 name_alist_or_stem is safe to alloca and fits in int.
10443 (Fexecute_extended_command): Likewise for function name and binding.
10444 (Frecursion_depth): Wrap around reliably on integer overflow.
10445 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
10446 since some callers pass EMACS_INT values.
10447 (Fsingle_key_description): Don't crash if symbol name contains more
10448 than MAX_ALLOCA bytes.
10449 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
10450 (get_minibuffer): Arg is now EMACS_INT, not int.
10451 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 10452 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
10453 * window.h (command_loop_level, minibuf_level): Reflect API changes.
10454
2be7d702
PE
10455 * dbusbind.c (signature_cat): New function.
10456 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
10457 Do not overrun buffer; instead, report string overflow.
10458
9d1df220
PE
10459 * dispnew.c (add_window_display_history): Don't overrun buffer.
10460 Truncate instead; this is OK since it's just a log.
10461
33ef5c64
PE
10462 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
10463 even if the time zone offset is outlandishly large.
10464 Don't mishandle offset == INT_MIN.
10465
66c6fdd5
PE
10466 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
10467 when creating daemon; the previous buffer-overflow check was incorrect.
10468
d749b01b
PE
10469 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
10470 which has the guts of the old verror function.
10471
b5cd1905
PE
10472 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
10473 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
10474
6e1a67fb
PE
10475 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
10476 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 10477 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 10478 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
10479 length of string rather than counting it via multiple sprintfs;
10480 that's simpler and more reliable.
c21721cc
PE
10481 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
10482 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
10483 sprintf, in case result does not fit in int.
10484
c57b67fc
PE
10485 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
10486 (fontset_from_font): Print it.
10487
8a401434
PE
10488 * frame.c (tty_frame_count): Now printmax_t, not int.
10489 (make_terminal_frame, set_term_frame_name): Print it.
10490 (x_report_frame_params): In X, window IDs are unsigned long,
10491 not signed long, so print them as unsigned.
10492 (validate_x_resource_name): Check for implausibly long names,
10493 and don't assume name length fits in 'int'.
10494 (x_get_resource_string): Don't blindly alloca invocation name;
10495 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
10496 not fit in int.
10497
6e1a67fb
PE
10498 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
10499 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
10500 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
10501
0df02bf3
PE
10502 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
10503 Use esprintf, not sprintf, in case result does not fit in int.
10504
48e30793
PE
10505 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
10506 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
10507 it as a large positive number.
10508 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
10509 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
10510
a66ff6d8
PE
10511 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
10512 in case result does not fit in int.
10513
aca216ff
PE
10514 * print.c (float_to_string): Detect width overflow more reliably.
10515 (print_object): Make sprintf buffer a bit bigger, to avoid potential
10516 buffer overrun. Don't assume list length fits in 'int'. Treat
10517 print length of 0 as 0, not as infinity; to be consistent with other
10518 uses of print length in this function. Don't overflow print length
10519 index. Don't assume hash table size fits in 'long', or that
10520 vectorlike size fits in 'unsigned long'.
10521
31c286f7
PE
10522 * process.c (make_process): Use printmax_t, not int, to format
10523 process-name gensyms.
10524
55e5faa1
PE
10525 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
10526
80f2e268
PE
10527 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
10528 to avoid potential buffer overrun.
10529
670741ab
PE
10530 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
10531 if X resource line is longer than 512 bytes.
10532
b7163a50
PE
10533 * xfns.c (x_window): Make sprintf buffer a bit bigger
10534 to avoid potential buffer overrun.
10535
ae58ff1f
PE
10536 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
10537
c43c8a6a
PE
10538 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
10539
3f8236f4
PE
105402011-09-04 Paul Eggert <eggert@cs.ucla.edu>
10541
53e9fe90 10542 Integer overflow fixes for scrolling, etc.
6511acf2
PE
10543 Without these, Emacs silently mishandles large integers sometimes.
10544 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
10545 it were "C-u 1 M-x recenter" on a typical 64-bit host.
10546
6511acf2
PE
10547 * xdisp.c (try_window_id): Check Emacs fixnum range before
10548 converting to 'int'.
806add1d 10549
6511acf2 10550 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
10551 Check that an Emacs fixnum is in range before assigning it to 'int'.
10552 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
10553 values converted from Emacs fixnums.
10554 (Frecenter): Don't wrap around a line count if it is out of 'int'
10555 range; instead, treat it as an extreme value.
10556 (Fset_window_configuration, compare_window_configurations):
10557 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
10558
6511acf2
PE
10559 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
10560 that can exceed INT_MAX. Check that EMACS_INT value is in range
10561 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
10562 (match_limit): Don't assume that a fixnum can fit in 'int'.
10563
6511acf2 10564 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
10565 exceed INT_MAX.
10566
6511acf2 10567 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
10568 (Fvertical_motion): Don't wrap around LINES values that don't fit
10569 in 'int'. Instead, treat them as extreme values. This is good
10570 enough for windows, which can't have more than INT_MAX lines anyway.
10571
fcb901a7
LMI
105722011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
10573
0f2f6b6d
LMI
10574 * Require libxml/parser.h to avoid compilation warning.
10575
fcb901a7
LMI
10576 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
10577
10578 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
10579 since this reportedly can destroy thread storage.
10580
6e20a0d4
CY
105812011-08-30 Chong Yidong <cyd@stupidchicken.com>
10582
10583 * syntax.c (find_defun_start): Update all cache variables if
10584 exiting early (Bug#9401).
10585
148ae00e
EZ
105862011-08-30 Eli Zaretskii <eliz@gnu.org>
10587
f6cfbd8f
EZ
10588 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
10589
148ae00e
EZ
10590 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
10591 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
10592 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
10593
10594 * term.c (tty_append_glyph): New function.
10595 (produce_stretch_glyph): Static function and its prototype deleted.
10596
a66cfb1c
SM
10597 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
10598 Add prototypes.
148ae00e 10599
c4a07a4c
PE
106002011-08-29 Paul Eggert <eggert@cs.ucla.edu>
10601
10602 * image.c (parse_image_spec): Check for nonnegative, not for positive,
10603 when checking :margin (Bug#9390).
10604 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 10605 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
10606 so that the name doesn't mislead. All uses changed.
10607
6bc8cd65
JB
106082011-08-28 Johan Bockgård <bojohan@gnu.org>
10609
10610 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
10611 set_tty_hooks.
10612
dca4927e
EZ
106132011-08-27 Eli Zaretskii <eliz@gnu.org>
10614
10615 * xdisp.c (move_it_to): Don't bail out early when reaching
10616 position beyond to_charpos, if we are scanning backwards.
10617 (move_it_vertically_backward): When DY == 0, make sure we get to
10618 the first character in the line after the newline.
10619
f2cad773
PE
106202011-08-27 Paul Eggert <eggert@cs.ucla.edu>
10621
10622 * ccl.c: Improve and simplify overflow checking (Bug#9196).
10623 (ccl_driver): Do not generate an out-of-range pointer.
10624 (Fccl_execute_on_string): Remove unnecessary check for
10625 integer overflow, noted by Stefan Monnier in
10626 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
10627 Remove a FIXME that didn't need fixing.
10628 Simplify the newly-introduced buffer reallocation code.
10629
0cae2cdb
JB
106302011-08-27 Juanma Barranquero <lekktu@gmail.com>
10631
10632 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
10633
5fc295a4 106342011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 10635
70c60eb2 10636 Integer and memory overflow issues (Bug#9196).
726e0ab1 10637
d31850da
PE
10638 * doc.c (get_doc_string): Rework so that
10639 get_doc_string_buffer_size is the actual buffer size, rather than
10640 being 1 less than the actual buffer size; this makes xpalloc more
10641 convenient.
10642
a69fbedb
PE
10643 * image.c (x_allocate_bitmap_record, cache_image):
10644 * xselect.c (Fx_register_dnd_atom):
10645 Simplify previous changes by using xpalloc.
10646
fe5c5d37
PE
10647 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
10648 since either will do and ptrdiff_t is convenient with xpalloc.
10649
0065d054
PE
10650 * charset.c (charset_table_size)
10651 (struct charset_sort_data.priority): Now ptrdiff_t.
10652 (charset_compare): Don't overflow if priorities differ greatly.
10653 (Fsort_charsets): Don't assume list length fits in int.
10654 Check for size-calculation overflow when allocating sort data.
10655 (syms_of_charset): Allocate an initial charset table that is
10656 just under 64 KiB, to avoid problems with glibc malloc and mmap.
10657
10658 * cmds.c (internal_self_insert): Check for size-calculation overflow.
10659
10660 * composite.h (struct composition.glyph_len): Now int, not unsigned.
10661 The actual value is always <= INT_MAX, and leaving it unsigned made
10662 overflow checking harder.
10663
10664 * dispextern.h (struct glyph_matrix.rows_allocated)
10665 (struct face_cache.size): Now ptrdiff_t, for convenience in use
10666 with xpalloc. The values are still always <= INT_MAX.
10667
10668 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
10669
10670 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
10671 (SAFE_NALLOCA): New macro.
10672
10673 * region-cache.c (struct boundary.pos, find_cache_boundary)
10674 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
10675 (set_cache_region, invalidate_region_cache)
10676 (revalidate_region_cache, know_region_cache, region_cache_forward)
10677 (region_cache_backward, pp_cache):
10678 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
10679 so that ptrdiff_t * can be passed to xpalloc.
10680 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
10681 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
10682 (pp_cache): Don't assume cache_len fits in int.
10683 * region-cache.h: Adjust extern decls to match.
10684
10685 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
10686 EMACS_INT, since either will do, for xpalloc.
10687
10688 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
10689 (xnmalloc, xnrealloc, xpalloc): New functions.
10690
726e0ab1
PE
10691 * bidi.c (bidi_shelve_header_size): New constant.
10692 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
10693 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
10694
51f30bc5 10695 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
10696 * buffer.c (overlays_at, overlays_in, record_overlay_string)
10697 (overlay_strings):
10698 Don't update size of array until after memory allocation succeeds,
10699 because xmalloc/xrealloc may not return.
0065d054
PE
10700 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
10701 now that we have proper integer overflow checking.
10702 (record_overlay_string, overlay_strings): Catch overflows when
10703 calculating size of overlay_str_buf.
726e0ab1 10704
0065d054
PE
10705 * callproc.c (Fcall_process): Check for size overflow when
10706 calculating size of args2.
10707 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
10708 Normally we prefer signed values, but sticking with ptrdiff_t would
10709 require adding more-complicated checks.
726e0ab1
PE
10710
10711 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
10712 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
10713 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 10714 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
10715
10716 * character.c (Fstring): Check for size-calculation overflow.
10717
10718 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
10719 unnecessary integer overflow. Check for size overflow.
10720 (encode_coding_object): Don't update size until xmalloc succeeds.
10721
10722 * composite.c (get_composition_id): Check for overflow in glyph
10723 length calculations.
10724
10725 Integer and memory overflow fixes for display code.
10726 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
10727 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
10728 (scrolling_window): Check for overflow in size calculations.
10729 (line_draw_cost, realloc_glyph_pool, add_row_entry):
10730 Don't assume glyph table len fits in int.
10731 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
10732 (row_table_size): Now ptrdiff_t, not int.
10733 (scrolling_window): Avoid overflow in size calculations.
10734 Don't update size until allocation succeeds.
10735 * fns.c (concat): Check for overflow in size calculations.
10736 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
10737 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
10738 (NEXT_ALMOST_PRIME_LIMIT): New constant.
10739
10740 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
10741 (get_doc_string): Check for size calculation overflow.
10742 Don't update size until allocation succeeds.
10743 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
10744 EMACS_INT, where ptrdiff_t will do.
10745 (Fsubstitute_command_keys): Check for string overflow.
10746
10747 * editfns.c (set_time_zone_rule): Don't assume environment length
10748 fits in int.
10749 (message_length): Now ptrdiff_t, not int.
10750 (Fmessage_box): Don't update size until allocation succeeds.
10751 Don't assume message length fits in int.
10752 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
10753
0065d054
PE
10754 * emacs.c (main): Do not reallocate argv, since there is a null at
10755 the end that can be overwritten, and this way there's no need to
10756 worry about size-calculation overflow.
10757 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
10758
10759 * eval.c (init_eval_once, grow_specpdl): Don't update size until
10760 alloc succeeds.
10761 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
10762
10763 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
10764 (x_set_scroll_bar_width, x_figure_window_size):
10765 Check for integer overflow.
10766 (x_set_alpha): Do not assume XINT fits in int.
10767
10768 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
10769 This is for the members text_lines, text_cols, total_lines, total_cols,
10770 where the system imposes an 'int' limit.
10771
10772 * fringe.c (Fdefine_fringe_bitmap):
10773 Don't update size until alloc works.
10774
10775 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
10776 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
10777
10778 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
10779 Check for size-calculation overflow.
10780 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
10781 do, as we prefer signed integers.
10782 (id_to_widget.max_size, id_to_widget.used)
10783 (xg_store_widget_in_map, xg_remove_widget_from_map)
10784 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
10785 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
10786 Use and return ptrdiff_t, not int.
10787 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
10788 * gtkutil.h: Change prototypes to match the above.
10789
10790 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
10791 are duplicate now that they've been promoted to lisp.h.
10792 (x_allocate_bitmap_record, x_alloc_image_color)
10793 (make_image_cache, cache_image, xpm_load):
10794 Don't update size until alloc is done.
10795 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
10796 (x_detect_edges):
3256efce 10797 Check for size calculation overflow.
726e0ab1
PE
10798 (ct_colors_allocated_max): New constant.
10799 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
10800 overflow.
3256efce 10801
726e0ab1
PE
10802 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
10803 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
10804 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
10805 Use ptrdiff_t, not int, to count maps.
10806 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
10807 calculations. Don't update size until allocation succeeds.
10808 Redo calculations to avoid overflow.
726e0ab1
PE
10809 * keyboard.h: Change prototypes to match the above.
10810
10811 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
10812 to count maps.
10813 (current_minor_maps): Check for size calculation overflow.
10814 * keymap.h: Change prototypes to match the above.
10815
10816 * lread.c (read1, init_obarray): Don't update size until alloc done.
10817
10818 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
10819 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
10820
726e0ab1
PE
10821 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
10822 Now ptrdiff_t, not int.
10823 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
10824 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
10825
10826 * process.c (Fnetwork_interface_list): Check for overflow
10827 in size calculation.
10828
10829 * region-cache.c (move_cache_gap): Check for size calculation overflow.
10830
10831 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
10832 overflow. Don't bother calling xmalloc when xrealloc will do.
10833
10834 * search.c (Freplace_match): Check for size calculation overflow.
10835 (Fset_match_data): Don't assume list lengths fit in 'int'.
10836
10837 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
10838 for command line length. Do not attempt to address one before the
10839 beginning of an array, as that's not portable.
10840
10841 * term.c (max_frame_lines): Remove; unused.
10842 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
10843 not int.
10844 (encode_terminal_code, calculate_costs): Check for size
10845 calculation overflow.
10846 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
10847 table lengths and related sizes. Don't update size until alloc
10848 done. Redo calculations to avoid overflow.
10849 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
10850
10851 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
10852 subtracting pointers.
10853 (gobble_line): Check for overflow more carefully. Don't update size
10854 until alloc done.
10855
10856 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
10857 Don't update size until alloc done.
10858 Redo size calculations to avoid overflow.
10859 Check for size calculation overflow.
0065d054 10860 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
10861
10862 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
10863 Use ptrdiff_t, not int, for sizes.
10864 (store_mode_line_noprop_char): Don't update size until alloc done.
10865
0065d054
PE
10866 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
10867 Use ptrdiff_t, not int, for sizes.
10868 (Finternal_make_lisp_face, cache_face):
10869 Check for size calculation overflow.
10870 (cache_face): Treat size calculation overflows as if they were
10871 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
10872
10873 * xfns.c (x_encode_text, x_set_name_internal)
10874 (Fx_change_window_property): Use ptrdiff_t, not int, to count
10875 sizes, since they can exceed INT_MAX in size. Check for size
10876 calculation overflow.
10877
0065d054
PE
10878 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
10879 (xg_select): Check for size calculation overflow.
726e0ab1
PE
10880 Don't update size until alloc done.
10881
0065d054 10882 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 10883 as sprintf is limited to int lengths.
1d526e2f 10884
252c5ee1
PE
10885 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
10886 (X_LONG_MIN): New macros.
864d7ce7
PE
10887 Use them to make the following changes clearer.
10888 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
10889 This change doesn't affect the value now, but it may help remind
10890 future maintainers not to raise the value too much later.
10891 (SELECTION_QUANTUM): Remove, replacing with ...
10892 (selection_quantum): ... new function, which avoids overflow.
10893 All uses changed.
10894 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
10895 assumption that selection length fits in 'int'.
10896 (x_reply_selection_request, x_handle_selection_request)
10897 (x_get_window_property, receive_incremental_selection)
10898 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
10899 (lisp_data_to_selection_data, clean_local_selection_data):
10900 Use ptrdiff_t, not int, to record length of selection.
10901 (x_reply_selection_request, x_get_window_property)
10902 (receive_incremental_selection, x_property_data_to_lisp):
10903 Redo calculations to avoid overflow.
10904 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 10905 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
10906 something.
10907 (x_get_window_property, receive_incremental_selection)
10908 (lisp_data_to_selection_data, x_property_data_to_lisp):
10909 Check for size-calculation overflow.
10910 (x_get_window_property, receive_incremental_selection)
10911 (lisp_data_to_selection_data, Fx_register_dnd_atom):
10912 Don't store size until memory allocation succeeds.
10913 (x_get_window_property): Plug memory leak on memory exhaustion.
10914 Don't double-block input; malloc is safe here. Don't assume 2**34
10915 - 4 fits in unsigned long. Add an xassert to check
10916 XGetWindowProperty overflow. Be more careful about overflow
10917 calculations, and distinguish size from memory overflow better.
10918 (receive_incremental_selection): When tracing, don't assume
10919 unsigned int is less than INT_MAX.
10920 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
10921 harmful) conversions of unsigned short to int.
10922 (lisp_data_to_selection_data): Don't assume that integers
10923 in the range -65535 through -1 fit in an X unsigned short.
10924 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
10925 result parameters unless successful. Rely on cons_to_unsigned
10926 to report problems with elements; the old code wasn't right anyway.
10927 (x_check_property_data): Check for int overflow; we cannot use
10928 a wider type due to X limits.
10929 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
10930
726e0ab1 10931 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 10932
0065d054
PE
10933 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
10934 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
10935 (x_color_cells): Don't store size until memory allocation succeeds.
10936 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 10937 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
10938 (x_term_init): Don't assume length fits in int (sprintf is limited
10939 to int size).
bc18e09d 10940
ebfa62c0
PE
10941 Use ptrdiff_t for composition IDs.
10942 * character.c (lisp_string_width):
10943 * composite.c (composition_table_size, n_compositions)
10944 (get_composition_id, composition_gstring_from_id):
10945 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
10946 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
10947 * window.c (Frecenter):
10948 Use ptrdiff_t, not int, for composition IDs.
10949 * composite.c (get_composition_id): Check for integer overflow.
10950 * composite.h: Adjust prototypes to match the above changes.
10951
d3411f89
PE
10952 Use ptrdiff_t for hash table indexes.
10953 * category.c (hash_get_category_set):
10954 * ccl.c (ccl_driver):
10955 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
10956 * coding.c (coding_system_charset_list, detect_coding_system):
10957 * coding.h (struct coding_system.id):
10958 * composite.c (get_composition_id, gstring_lookup_cache):
10959 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
10960 * image.c (xpm_get_color_table_h):
10961 * lisp.h (hash_lookup, hash_put):
10962 * minibuf.c (Ftest_completion):
10963 Use ptrdiff_t for hash table indexes, not int (which is too
10964 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
10965 32-bit --with-wide-int hosts).
10966
e097a6fa
PE
10967 * charset.c (Fdefine_charset_internal): Check for integer overflow.
10968 Add a FIXME comment about memory leaks.
10969 (syms_of_charset): Don't assume xmalloc returns.
10970
5637687f
PE
10971 Don't assume that stated character widths fit in int.
10972 * character.c (Fchar_width, c_string_width, lisp_string_width):
10973 * character.h (CHAR_WIDTH):
10974 * indent.c (MULTIBYTE_BYTES_WIDTH):
10975 Use sanitize_char_width to avoid undefined and/or bad behavior
10976 with outlandish widths.
a66cfb1c 10977 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
10978 now that we have two such functions. All uses changed.
10979 (sanitize_char_width): New inline function.
10980
a2271ba2
PE
10981 Don't assume that tab-width fits in int.
10982 * character.h (sanitize_width): New inline function.
10983 (SANE_TAB_WIDTH): New macro.
10984 (ASCII_CHAR_WIDTH): Use it.
10985 * indent.c (sane_tab_width): Remove. All uses replaced by
10986 SANE_TAB_WIDTH (current_buffer).
10987 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
10988
18c52557
PE
10989 * fileio.c: Integer overflow issues with file modes.
10990 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
10991
caeeedc1
PE
10992 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
10993 Remove unreachable code.
10994 (read_hex, load_charset_map_from_file): Check for integer overflow.
10995
6df6ae42 10996 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
10997 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
10998 (x_send_scroll_bar_event): Likewise. Check that the size does not
10999 exceed limits imposed by XClientMessageEvent, as well as the usual
11000 ptrdiff_t and size_t limits.
11001
b13995db
PE
11002 * keyboard.c: Overflow, signedness and related fixes.
11003 (make_lispy_movement): Use same integer type in forward decl
11004 that is used in the definition.
11005 (read_key_sequence, keyremap_step):
11006 Change bufsize argument back to int, undoing my 2011-03-30 change.
11007 We prefer signed types, and int is wide enough here.
11008 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
11009 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
11010 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
11011 length, not size_t. Use ptrdiff_t for index, not int.
11012 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
11013 possibility of integer overflow.
11014
13464394
PE
11015 Overflow, signedness and related fixes for images.
11016
11017 * dispextern.h (struct it.stack[0].u.image.image_id)
11018 (struct_it.image_id, struct image.id, struct image_cache.size)
11019 (struct image_cache.used, struct image_cache.ref_count):
11020 * gtkutil.c (update_frame_tool_bar):
11021 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
11022 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
11023 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
11024 * nsmenu.m (update_frame_tool_bar):
11025 * xdisp.c (calc_pixel_width_or_height):
11026 * xfns.c (image_cache_refcount):
11027 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
11028 on typical 64-bit hosts.
11029
11030 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
11031 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
11032 Omit unnecessary casts to int.
11033 (parse_image_spec): Check that integers fall into 'int' range
11034 when the callers expect that.
11035 (image_ascent): Redo ascent calculation to avoid int overflow.
11036 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
11037 (lookup_image): Remove unnecessary tests.
11038 (xbm_image_p): Locals are now of int, not EMACS_INT,
11039 since parse_image_check makes sure they fit into int.
11040 (png_load, gif_load, svg_load_image):
11041 Prefer int to unsigned where either will do.
11042 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
11043 old tiff_error_handler and tiff_warning_handler.
11044 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
11045 stack buffer overflows. It uses only the features of vsnprintf
11046 that are common to both POSIX and native Microsoft.
11047 (tiff_error_handler, tiff_warning_handler): Use it.
11048 (tiff_load, gif_load, imagemagick_load_image):
11049 Don't assume :index value fits in 'int'.
11050 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
11051 (imagemagick_load_image): Check that crop parameters fit into
11052 the integer types that MagickCropImage accepts. Don't assume
11053 Vimagemagick_render_type has a nonnegative value. Don't assume
11054 size_t fits in 'long'.
11055 (gs_load): Use printmax_t to print the widest integers possible.
11056 Check for integer overflow when computing image height and width.
11057
c11821d4
EZ
110582011-08-26 Eli Zaretskii <eliz@gnu.org>
11059
11060 * xdisp.c (redisplay_window): Don't force window start if point
11061 will be invisible in the resulting window. (Bug#9324)
11062
0c95fcf7
EZ
110632011-08-25 Eli Zaretskii <eliz@gnu.org>
11064
11065 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
11066 the display spec is of the form `(space ...)'.
11067 (handle_display_spec): Return the value returned by
11068 handle_single_display_spec, not just 1 or zero.
11069 (handle_single_display_spec): If the display spec is of the form
11070 `(space ...)', and specifies display in the text area, return 2
11071 rather than 1.
fee65a97 11072 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
11073 accurately, and prefer exact match for point under bidi.
11074 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
11075
11076 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
11077 into disp_prop; all users changed.
11078
11079 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
11080 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
11081 for the text covered by the display property.
11082
e4ed06f1
CY
110832011-08-25 Chong Yidong <cyd@stupidchicken.com>
11084
11085 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
11086 Change return value to nil.
11087 (Frecord_buffer): Delete unused function.
11088
f67cdd7f
EZ
110892011-08-24 Eli Zaretskii <eliz@gnu.org>
11090
5980d4c6
EZ
11091 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
11092 buffers, return left-to-right.
8610fe8b
EZ
11093 (set_cursor_from_row): Consider candidate row a win if its glyph
11094 represents a newline and point is on that newline. Fixes cursor
11095 positioning on the newline at EOL of R2L text within L2R
11096 paragraph, and vice versa.
11097 (try_cursor_movement): Check continued rows, in addition to
11098 continuation rows. Fixes unwarranted scroll when point enters a
11099 continued line of R2L text within an L2R paragraph, or vice versa.
11100 (cursor_row_p): Consider the case of point being equal to
11101 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
11102 from the end of a short line to the beginning of a continued line
11103 of R2L text within L2R paragraph.
11104 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
11105 composed characters.
5980d4c6 11106
f67cdd7f
EZ
11107 * bidi.c (bidi_check_type): Use xassert.
11108 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
11109 members.
11110
bca633fb
EZ
111112011-08-23 Eli Zaretskii <eliz@gnu.org>
11112
11113 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
11114 a character.
11115
4a5885a7
CY
111162011-08-23 Chong Yidong <cyd@stupidchicken.com>
11117
11118 * nsfont.m (ns_otf_to_script): Fix typo.
11119
0902a04e
KH
111202011-08-22 Kenichi Handa <handa@m17n.org>
11121
11122 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
11123 extra slot even if the purpose is char-code-property-table.
11124
1a2e6670
EZ
111252011-08-23 Eli Zaretskii <eliz@gnu.org>
11126
8ddde651
EZ
11127 * xdisp.c (redisplay_window): When computing centering_position,
11128 account for the height of the header line. (Bug#8874)
11129
425cc014
EZ
11130 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
11131 instead of CHAR_TO_BYTE. Fixes a crash when a completion
11132 candidate is selected by the mouse, and that candidate has a
11133 composed character under the mouse.
11134
1a2e6670
EZ
11135 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
11136 coordinates reported by pos-visible-in-window-p for a composed
11137 character in column zero.
11138
8b76d6f8
SM
111392011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
11140
11141 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
11142
dac347dd
EZ
111432011-08-22 Eli Zaretskii <eliz@gnu.org>
11144
11145 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
11146 consider it a hit if to_charpos is anywhere in the range of the
11147 composed buffer positions.
11148
e013fb34
CY
111492011-08-22 Chong Yidong <cyd@stupidchicken.com>
11150
11151 * image.c (gif_load): Don't assume that each subimage has the same
11152 dimensions as the base image. Handle disposal method that is
11153 "undefined" by the gif spec (Bug#9335).
11154
bd1ba3e8
CY
111552011-08-20 Chong Yidong <cyd@stupidchicken.com>
11156
11157 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 11158 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 11159
54a1215b
EZ
111602011-08-19 Eli Zaretskii <eliz@gnu.org>
11161
823564e5
EZ
11162 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
11163 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
11164 from an Org mode buffer to a Speedbar frame.
11165
54a1215b
EZ
11166 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
11167 a composition, take its buffer position from IT->cmp_it.charpos.
11168 Fixes cursor positioning at the beginning of a line that begins
11169 with a composed character.
11170
9778ebcc
EZ
111712011-08-18 Eli Zaretskii <eliz@gnu.org>
11172
0be6ee06
EZ
11173 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
11174 character bidirectional type, use STRONG_L instead. Fixes crashes
11175 in a buffer produced by `describe-categories'.
11176
9778ebcc
EZ
11177 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
11178 members before the level stack, so they would be saved and
11179 restored when copying iterator state. Fixes incorrect reordering
11180 around TABs covered by display properties.
11181
156bffbe
AS
111822011-08-18 Andreas Schwab <schwab@linux-m68k.org>
11183
6b02f655 11184 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 11185
72ad093b
CY
111862011-08-17 Chong Yidong <cyd@stupidchicken.com>
11187
11188 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
11189 (internal_condition_case_2, internal_condition_case_n):
11190 Remove unnecessary aborts (Bug#9081).
72ad093b 11191
35774242
EZ
111922011-08-17 Eli Zaretskii <eliz@gnu.org>
11193
11194 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
11195 has no `load' handler, try opening the file locally. (Bug#9311)
11196
db76dd85
KB
111972011-08-16 Ken Brown <kbrown@cornell.edu>
11198
11199 * gmalloc.c: Expand comment.
11200
b215eee5
EZ
112012011-08-16 Eli Zaretskii <eliz@gnu.org>
11202
11203 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
11204 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
11205
a4579d33
KB
112062011-08-16 Ken Brown <kbrown@cornell.edu>
11207
11208 Fix memory allocation problems in Cygwin build (Bug#9273).
11209
11210 * unexcw.c ( __malloc_initialized): Declare external variable.
11211 (fixup_executable): Force the dumped emacs to reinitialize malloc.
11212
8b76d6f8
SM
11213 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
11214 New variables.
a4579d33
KB
11215 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
11216 dumped emacs.
11217 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
11218 in the static heap.
11219 [CYGWIN] (special_realloc): New function.
11220 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
11221 requests to realloc storage in the static heap.
11222
3ebec551
PE
112232011-08-15 Paul Eggert <eggert@cs.ucla.edu>
11224
11225 * bidi.c (bidi_initialize): Remove unused local.
11226
9fd8be00
EZ
112272011-08-15 Eli Zaretskii <eliz@gnu.org>
11228
6b02f655
SM
11229 * bidimirror.h:
11230 * biditype.h: Remove file.
11231 * makefile.w32-in ($(BLD)/bidi.$(O)):
11232 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
11233
11234 * dispextern.h: Fix a typo in the comment to bidi_type_t.
11235
11236 * chartab.c: Improve commentary for the uniprop_table API.
11237
32413314
EZ
11238 * bidi.c (bidi_paragraph_init): Support zero value of
11239 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
11240 (bidi_initialize): Use uniprop_table instead of including
11241 biditype.h and bidimirror.h.
32413314 11242
9fd8be00
EZ
11243 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
11244 coordinates of the iterator when restoring from ppos_it.
11245 (Bug#9296)
11246
5cf2b69b
KH
112472011-08-14 Kenichi Handa <handa@m17n.org>
11248
11249 * process.c (create_process): Call setup_process_coding_systems
72ad093b 11250 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 11251
daf17d00
EZ
112522011-08-14 Eli Zaretskii <eliz@gnu.org>
11253
11254 * xdisp.c (move_it_in_display_line_to): Don't invoke
11255 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
11256 ppos_it. Fixes vertical cursor motion when line beginning is
11257 covered by an image. (Bug#9296)
11258
08e3161a
JD
112592011-08-14 Jan Djärv <jan.h.d@swipnet.se>
11260
11261 * nsterm.h (ns_run_ascript): Declare.
11262 (NSAPP_DATA2_RUNASSCRIPT): Define.
11263
11264 * nsfns.m (as_script, as_result, as_status): New static variables.
11265 (ns_run_ascript): New function.
5e617bc2 11266 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
11267 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
11268 the event loop. Get status from as_status (Bug#7276).
11269
11270 * nsterm.m (sendEvent): If event is NSApplicationDefined and
11271 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
11272 the event loop (Bug#7276).
11273
a3720aa2
AS
112742011-08-14 Andreas Schwab <schwab@linux-m68k.org>
11275
11276 * gnutls.c (QCgnutls_bootprop_priority)
11277 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
11278 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
11279 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
11280 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
11281 (QCgnutls_bootprop_verify_hostname_error)
11282 (QCgnutls_bootprop_callbacks_verify): Rename from
11283 Qgnutls_bootprop_..., all uses changed.
11284
11285 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
11286 uses changed.
11287
0a0d27fb
PE
112882011-08-14 Paul Eggert <eggert@cs.ucla.edu>
11289
19d5c50c
PE
11290 * xfaces.c (Qframe_set_background_mode): Now static.
11291 * dispextern.h (Qframe_set_background_mode): Remove decl.
11292
0a0d27fb
PE
11293 * process.c (Fnetwork_interface_info): Declare local only if needed.
11294
377538cb
JD
112952011-08-13 Jan Djärv <jan.h.d@swipnet.se>
11296
11297 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
11298 (Fnetwork_interface_list): Allocate in increments of bytes instead
11299 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
11300 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
11301 sockaddr.
11302 (struct ifflag_def): notrailers is smart on OSX.
11303 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
11304 Get hardware address with getifaddrs if available.
11305
08fff70c
EZ
113062011-08-12 Eli Zaretskii <eliz@gnu.org>
11307
11308 * xdisp.c (iterate_out_of_display_property): xassert that
11309 IT->position is set to within IT->object's boundaries. Break from
11310 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
11311 when IT->position is set up wrongly due to some bug.
11312 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
11313 (push_display_prop): Allow GET_FROM_STRING as IT->method on
11314 entry. Force push_it to save on the stack the current
11315 buffer/string position, to be restored by pop_it. Fix flags in
11316 the iterator structure wrt the object coming from a display
11317 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
11318 properties. (Bug#9284)
11319
7be1c708 113202011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 11321
7be1c708
CY
11322 * fontset.c (fontset_get_font_group): Add proper type checks.
11323 (Bug#9172)
aac0c6e3 11324
7be1c708 113252011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 11326
7be1c708
CY
11327 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
11328 and LC_VERSION_MIN_MACOSX.
11329 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
11330 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 11331
97bb72a6
EZ
113322011-08-08 Eli Zaretskii <eliz@gnu.org>
11333
11334 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
11335 no-display-properties-and-no-overlays under bidi display.
11336 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 11337 properties and overlays.
97bb72a6 11338
d5617611
CY
113392011-08-08 Chong Yidong <cyd@stupidchicken.com>
11340
37e11a63
CY
11341 * editfns.c (Fset_time_zone_rule): Document relationship with the
11342 setenv function.
11343
d5617611
CY
11344 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
11345 the font entity extracted from the cache (Bug#8109).
11346
58872834
CY
113472011-08-07 Chong Yidong <cyd@stupidchicken.com>
11348
11349 * composite.c (autocmp_chars): Don't reset point. That is done by
11350 restore_point_unwind (Bug#5984).
11351
75bfc667
JL
113522011-08-07 Juri Linkov <juri@jurta.org>
11353
11354 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
11355 to show the arg `TIME' instead of `TIMEVAL'.
11356
d1410150
EZ
113572011-08-06 Eli Zaretskii <eliz@gnu.org>
11358
11359 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
11360 display property strides EOL and includes a newline, as in
11361 longlines-mode. (Bug#9254)
75b771e4
EZ
11362 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
11363 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
11364
11365 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
11366 is non-zero, even if the data buffer is NULL. Fixes a crash in
11367 vertical-motion with longlines-mode. (Bug#9254)
11368
35928349
EZ
113692011-08-05 Eli Zaretskii <eliz@gnu.org>
11370
ec7cc85b
EZ
11371 * bidi.c <bidi_cache_total_alloc>: Now static.
11372 (bidi_initialize): Initialize bidi_cache_total_alloc.
11373
8b76d6f8 11374 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
11375 cache. (Bug#9221)
11376
11377 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
11378 amount allocated this far in `bidi_cache_total_alloc'.
11379 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
11380 non-zero, only free the data buffer without restoring the cache
11381 contents. All callers changed.
11382
11383 * dispextern.h (bidi_unshelve_cache): Update prototype.
11384
11385 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
11386 (move_it_in_display_line, move_it_to)
11387 (move_it_vertically_backward, move_it_by_lines): Replace the call
11388 to xfree to an equivalent call to bidi_unshelve_cache.
11389 (move_it_in_display_line_to): Fix logic of returning
412b6358 11390 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 11391
e2e2423b
EZ
113922011-08-05 Eli Zaretskii <eliz@gnu.org>
11393
11394 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
11395 came from a string character with a `cursor' property. (Bug#9229)
11396
ae9e757a
JD
113972011-08-04 Jan Djärv <jan.h.d@swipnet.se>
11398
11399 * Makefile.in (LIB_PTHREAD): New variable.
11400 (LIBES): Add LIB_PTHREAD (Bug#9216).
11401
11402 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
11403 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
11404
213bd7f2
AS
114052011-08-04 Andreas Schwab <schwab@linux-m68k.org>
11406
6b02f655 11407 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 11408
99aaf75f
JD
114092011-08-04 Jan Djärv <jan.h.d@swipnet.se>
11410
11411 * xterm.c (x_find_topmost_parent): New function.
11412 (x_set_frame_alpha): Find topmost parent window with
11413 x_find_topmost_parent and set the property there also (bug#9181).
11414 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
11415
c74e9d86
PE
114162011-08-04 Paul Eggert <eggert@cs.ucla.edu>
11417
11418 * callproc.c (Fcall_process): Avoid vfork clobbering
11419 the local vars buffer, coding_systems, current_dir.
11420
640c8776
SM
114212011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
11422
11423 * keymap.c (Fmake_composed_keymap): Move to subr.el.
11424
f26d0e4c
PE
114252011-08-03 Paul Eggert <eggert@cs.ucla.edu>
11426
8a10d76c
PE
11427 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
11428 so that it is not optimized away.
11429
f26d0e4c
PE
11430 * xdisp.c (compute_display_string_pos): Remove unused local.
11431
55439c61
EZ
114322011-08-02 Eli Zaretskii <eliz@gnu.org>
11433
11434 Fix slow cursor motion and scrolling in large buffers with
11435 selective display, like Org Mode buffers. (Bug#9218)
11436
11437 * dispextern.h (struct bidi_it): New member disp_prop_p.
11438
11439 * xdisp.c: Remove one-slot cache of display string positions.
11440 (compute_display_string_pos): Accept an additional argument
5e617bc2 11441 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
11442 for a display string or property. If found, set DISP_PROP_P
11443 non-zero.
11444
11445 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
11446 DISP_PROP_P, and pass it to compute_display_string_pos.
11447 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
11448 non-zero. All callers of bidi_fetch_char changed.
11449
fb33fa43
SM
114502011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
11451
11452 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
11453
b099e063
DM
114542010-12-03 Don March <don@ohspite.net>
11455
11456 * keymap.c (Fdefine_key): Fix non-prefix key error message when
11457 last character M-[char] is translated to ESC [char] (bug#7541).
11458
5cc7f7af
KH
114592011-08-02 Kenichi Handa <handa@m17n.org>
11460
d0fffa3f 11461 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
11462
11463 * chartab.c (uniprop_table): Make it non-static.
11464
525d5e6e
EZ
114652011-08-01 Eli Zaretskii <eliz@gnu.org>
11466
11467 * xdisp.c (forward_to_next_line_start): Accept additional argument
11468 BIDI_IT_PREV, and store into it the state of the bidi iterator had
11469 on the newline.
11470 (reseat_at_next_visible_line_start): Use the bidi iterator state
11471 returned by forward_to_next_line_start to restore the state of
11472 it->bidi_it after backing up to previous newline. (Bug#9212)
11473
31011111
AS
114742011-07-30 Andreas Schwab <schwab@linux-m68k.org>
11475
11476 * regex.c (re_comp): Protoize.
11477 (re_exec): Fix return type.
11478 (regexec): Fix type of `ret'. (Bug#9203)
11479
476371c4
PE
114802011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11481
e5d76069
PE
11482 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
11483 This is needed if max-image-size is a floating-point number.
11484
9a79b20c
AS
114852011-07-28 Andreas Schwab <schwab@linux-m68k.org>
11486
11487 * print.c (print_object): Print empty symbol as ##.
11488
11489 * lread.c (read1): Read ## as empty symbol.
11490
d8c2fa78
AA
114912011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
11492
11493 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
11494 setting frame foreground color (Bug#9175).
11495 (x_set_background_color): Likewise.
11496
ffe57a7a
AA
11497 * nsmenu.m (-setText): Size tooltip dimensions precisely to
11498 contents (Bug#9176).
11499 (EmacsTooltip -init): Remove bezels and add shadows to
11500 tooltip windows.
11501
bf3492a5
AA
11502 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
11503 or scroll bar (Bug#8470).
11504
d55e9c53
AA
11505 * nsfont.m (nsfont_open): Remove assignment to voffset and
11506 unnecessary vars hshink, expand, hd, full_height, min_height.
11507 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
11508
11509 * nsterm.h (nsfont_info): Remove voffset field.
11510
d8c2fa78 115112011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
11512
11513 Implement strike-through and overline on NextStep (Bug#8863).
11514
11515 * nsfont.m (nsfont_open): Use underline position provided by font,
11516 instead of hard-coded value of 2.
11517 (nsfont_draw): Call ns_draw_text_decoration instead.
11518
11519 * nsterm.h: Add declaration for ns_draw_text_decoration.
11520
11521 * nsterm.m (ns_draw_text_decoration): New function for drawing
11522 underline, overline, and strike-through.
11523 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
11524 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 11525 accommodate underlining, etc.
4843aac3 11526
4cc60b9b
EZ
115272011-07-28 Eli Zaretskii <eliz@gnu.org>
11528
bc7ece87
EZ
11529 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
11530 default.
4cc60b9b 11531
476371c4
PE
115322011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11533
66606eea
PE
11534 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
11535 Without this fix, if a signal arrives just after memory fills up,
11536 'malloc' might be invoked reentrantly.
11537
476371c4
PE
11538 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
11539 In other words, assume that every image size is allowed, on non-X
11540 hosts. This assumption is probably wrong, but it lets Emacs compile.
11541
f3fcc40d
AS
115422011-07-28 Andreas Schwab <schwab@linux-m68k.org>
11543
11544 * regex.c (re_iswctype): Convert return values to boolean.
11545
350c992f
EZ
115462011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
11547
11548 * xdisp.c (compute_display_string_pos): Don't use cached display
11549 string position if the buffer had its restriction changed.
11550 (Bug#9184)
11551
5266b4bb
PE
115522011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11553
11554 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
11555
2573a837 115562011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 11557
41f55ccd 11558 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 11559
39e378da
PE
11560 * bidi.c: Integer size and overflow fixes.
11561 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
11562 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
11563 (bidi_cache_find_level_change, bidi_cache_ensure_space)
11564 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
11565 (bidi_find_other_level_edge):
11566 Use ptrdiff_t instead of EMACS_INT where either will do.
11567 This works better on 32-bit hosts configured --with-wide-int.
11568 (bidi_cache_ensure_space): Check for size-calculation overflow.
11569 Use % rather than repeated addition, for better worst-case speed.
11570 Don't set bidi_cache_size until after xrealloc returns, because it
11571 might not return.
11572 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
11573 (bidi_cache_ensure_space): Also check that the bidi cache size
11574 does not exceed that of the largest Lisp string or buffer. See Eli
11575 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 11576
5e927815
PE
11577 * alloc.c (__malloc_size_t): Remove.
11578 All uses replaced by size_t. See Andreas Schwab's note
11579 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
11580
ca4aa935
PE
11581 * image.c: Improve checking for integer overflow.
11582 (check_image_size): Assume that f is nonnull, since
11583 it is always nonnull in practice. This is one less thing to
11584 worry about when checking for integer overflow later.
11585 (x_check_image_size): New function, which checks for integer
11586 overflow issues inside X.
11587 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
11588 This removes the need for a memory_full check.
11589 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
11590 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
11591 (xbm_read_bitmap_data): Change locals back to 'int', since
11592 their values must fit in 'int'.
11593 (xpm_load_image, png_load, tiff_load):
11594 Invoke x_create_x_image_and_pixmap earlier,
11595 to avoid much needless work if the image is too large.
11596 (tiff_load): Treat overly large images as if
11597 x_create_x_image_and_pixmap failed, not as malloc failures.
11598 (gs_load): Use x_check_image_size.
11599
5f8f9cc2
PE
11600 * gtkutil.c: Omit integer casts.
11601 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
11602 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
11603
5adf60bc
PE
11604 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
11605
c8907a93
PE
11606 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
11607 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
11608 would wrongly return t on a 64-bit host.
11609
e3c25c68
PE
11610 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
11611 The plain *_OVERFLOW macros run afoul of GCC bug 49705
11612 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
11613 and therefore cause GCC to emit a bogus diagnostic in some cases.
11614
3f791afe
PE
11615 * image.c: Integer signedness and overflow and related fixes.
11616 This is not an exhaustive set of fixes, but it's time to
11617 record what I've got.
11618 (lookup_pixel_color, check_image_size): Remove redundant decls.
11619 (check_image_size): Don't assume that arbitrary EMACS_INT values
11620 fit in 'int', or that arbitrary 'double' values fit in 'int'.
11621 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
11622 (tiff_load, imagemagick_load_image):
11623 Check for overflow in size calculations.
11624 (x_create_x_image_and_pixmap): Remove unnecessary test for
11625 xmalloc returning NULL; that can't happen.
11626 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
11627 (xpm_color_bucket): Use better integer hashing function.
11628 (xpm_cache_color): Don't possibly over-allocate memory.
11629 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
11630 (gif_memory_source):
11631 Use ptrdiff_t, not int or size_t, to record sizes.
11632 (png_load): Don't assume values greater than 2**31 fit in 'int'.
11633 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
11634 either works, as we prefer signed integers.
11635 (tiff_read_from_memory, tiff_write_from_memory):
11636 Return tsize_t, not size_t, since that's what the TIFF API wants.
11637 (tiff_read_from_memory): Don't fail simply because the read would
11638 go past EOF; instead, return a short read.
11639 (tiff_load): Omit no-longer-needed casts.
11640 (Fimagemagick_types): Don't assume size fits into 'int'.
11641
3cc5a532
PE
11642 Improve hashing quality when configured --with-wide-int.
11643 * fns.c (hash_string): New function, taken from sxhash_string.
11644 Do not discard information about ASCII character case; this
11645 discarding is no longer needed.
11646 (sxhash-string): Use it. Change sig to match it. Caller changed.
11647 * lisp.h: Declare it.
11648 * lread.c (hash_string): Remove, since we now use fns.c's version.
11649 The fns.c version returns a wider integer if --with-wide-int is
11650 specified, so this should help the quality of the hashing a bit.
11651
b312a492
PE
11652 * emacs.c: Integer overflow minor fix.
11653 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
11654 Define only if GNU_LINUX.
11655 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
11656
dfd153ae
PE
11657 * dispnew.c: Integer signedness and overflow fixes.
11658 Remove unnecessary forward decls, that were a maintenance hassle.
11659 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
11660 All uses changed.
11661 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
11662 (scrolling_window): Use ptrdiff_t, not int, for byte count.
11663 (prepare_desired_row, line_draw_cost):
11664 Use int, not unsigned, where either works.
11665 (save_current_matrix, restore_current_matrix):
11666 Use ptrdiff_t, not size_t, where either works.
11667 (init_display): Check for overflow more accurately, and without
11668 relying on undefined behavior.
11669
a81d11a3
PE
11670 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
11671 Remove, replacing with the new symbols in lisp.h. All uses changed.
11672 * fileio.c (make_temp_name):
11673 * filelock.c (lock_file_1, lock_file):
11674 * xdisp.c (message_dolog):
11675 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
11676 Use pMd etc. instead.
11677 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
11678 replacing the pWIDE etc. symbols removed from editfns.c.
11679
3300e6fd
PE
11680 * keyboard.h (num_input_events): Now uintmax_t.
11681 This is (very slightly) less likely to mess up due to wraparound.
11682 All uses changed.
11683
fd05c7e9
PE
11684 * buffer.c: Integer signedness fixes.
11685 (alloc_buffer_text, enlarge_buffer_text):
11686 Use ptrdiff_t rather than size_t when either will do, as we prefer
11687 signed integers.
11688
903fe15d
PE
11689 * alloc.c: Integer signedness and overflow fixes.
11690 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
11691 (__malloc_size_t): Default to size_t, not to int.
11692 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
11693 (Fgarbage_collect, mark_object_loop_halt, mark_object):
11694 Prefer ptrdiff_t to size_t when either would do, as we prefer
11695 signed integers.
11696 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
11697 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
11698 Now const. Initialize with values that are in range even if char
11699 is signed.
11700 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
11701 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
11702 These functions do the right thing with sizes > 2**32.
11703 (check_depth): Now ptrdiff_t, not int.
11704 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
11705 Adjust to new way of storing sizes. Check for size overflow bugs
11706 in rest of code.
11707 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
11708 slightly wrong anyway, as it missed one instance of
11709 XMALLOC_OVERRUN_CHECK_OVERHEAD.
11710 (refill_memory_reserve): Omit needless cast to size_t.
11711 (mark_object_loop_halt): Mark as externally visible.
11712
ac82cc6a
PE
11713 * xselect.c: Integer signedness and overflow fixes.
11714 (Fx_register_dnd_atom, x_handle_dnd_message):
11715 Use ptrdiff_t, not size_t, since we prefer signed.
11716 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
11717 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
11718 x_dnd_atoms_size and x_dnd_atoms_length.
11719
c2d1e36d
PE
11720 * doprnt.c: Prefer signed to unsigned when either works.
11721 * eval.c (verror):
11722 * doprnt.c (doprnt):
11723 * lisp.h (doprnt):
11724 * xdisp.c (vmessage):
11725 Use ptrdiff_t, not size_t, when using or implementing doprnt,
11726 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
11727 prefer signed arithmetic to avoid comparison confusion.
11728 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
11729 but is a bit tricky.
11730
0e926e56
PE
11731 Assume freestanding C89 headers, string.h, stdlib.h.
11732 * data.c, doprnt.c, floatfns.c, print.c:
11733 Include float.h unconditionally.
11734 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
11735 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
11736 * regex.c: Likewise for stddef.h, string.h.
11737 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
11738 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
11739 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
11740 (STDC_HEADERS): Remove obsolete defines.
11741 * sysdep.c: Include limits.h unconditionally.
11742
9cfdb3ec
PE
11743 Assume support for memcmp, memcpy, memmove, memset.
11744 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
11745 * regex.c (memcmp, memcpy):
11746 Remove; we assume C89 now.
11747
11748 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
11749 (__malloc_safe_bcopy): Remove; no longer needed.
11750
cf950e6b 11751 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
11752 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
11753 well either way, and we prefer signed to unsigned.
11754
dbf38e02
LMI
117552011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
11756
11757 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
11758 closes the connection while we're reading (bug#9182).
11759
d6f0886c 117602011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 11761
d6f0886c
JD
11762 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
11763 are specified (Bug#9168).
24e0f6b1 11764
2eb1f9e6
PE
117652011-07-25 Paul Eggert <eggert@cs.ucla.edu>
11766
11767 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
11768 Found by GCC static checking and --with-wide-int on a 32-bit host.
11769
22381272 117702011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
11771
11772 * xdisp.c (compute_display_string_pos): Fix logic of caching
11773 previous display string position. Initialize cached_prev_pos to
11774 -1. Fixes slow-down at the beginning of a buffer.
11775
f25e39b4
EZ
117762011-07-24 Eli Zaretskii <eliz@gnu.org>
11777
11778 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
11779 for attrs[LFACE_FONTSET_INDEX].
11780
04c4b52e
PE
117812011-07-23 Paul Eggert <eggert@cs.ucla.edu>
11782
11783 * xml.c (parse_region): Remove unused local
11784 that was recently introduced.
11785
c1734fbd
EZ
117862011-07-23 Eli Zaretskii <eliz@gnu.org>
11787
be18c5a5
EZ
11788 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
11789 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
11790
c1734fbd
EZ
11791 * xdisp.c (move_it_in_display_line_to): Record the best matching
11792 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
11793 exit if none of the characters scanned was an exact match.
11794 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
11795 when exact match is impossible due to invisible text, and the
11796 lines are truncated.
11797
a258d627
JD
117982011-07-23 Jan Djärv <jan.h.d@swipnet.se>
11799
11800 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
11801 for OSX >= 10.7.
11802
b6d5a689
EZ
118032011-07-22 Eli Zaretskii <eliz@gnu.org>
11804
0f74f785
EZ
11805 Fix a significant slow-down of cursor motion with C-n, C-p,
11806 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
11807 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 11808 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
11809 (next_element_from_buffer): Call compute_stop_pos_backwards to
11810 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
11811 base_level_stop.
11812 (reseat): Don't look for prev_stop, as that could mean a very long
11813 run.
11814 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
11815 <cached_disp_overlay_modiff>: Cache for last found display string
11816 position.
551918c1 11817 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
11818 about the same buffer in the same area of character positions, and
11819 the buffer wasn't changed since the time the display string
11820 position was cached.
551918c1 11821
b2d0c91a
EZ
118222011-07-22 Eli Zaretskii <eliz@gnu.org>
11823
11824 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
11825 is an integer, which is important for empty lines. (Bug#9149)
11826
043604ee
CY
118272011-07-22 Chong Yidong <cyd@stupidchicken.com>
11828
11829 * frame.c (Fmodify_frame_parameters): In tty case, update the
11830 default face if necessary (Bug#4238).
11831
da4adb04
CY
118322011-07-21 Chong Yidong <cyd@stupidchicken.com>
11833
11834 * editfns.c (Fstring_to_char): No need to explain what a character
11835 is in the docstring (Bug#6576).
11836
9abd0532
LMI
118372011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11838
11839 * xml.c (parse_region): Make sure we always return a tree.
11840
36881d16
HK
118412011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
11842
11843 * xml.c (parse_region): If a document contains only comments,
11844 return that, too.
11845
1e98674d
LMI
118462011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11847
11848 * xml.c (make_dom): Return comments, too.
11849
590bd467
PE
118502011-07-19 Paul Eggert <eggert@cs.ucla.edu>
11851
11852 Port to OpenBSD.
11853 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
11854 and the surrounding thread.
11855 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
11856 rather than fgets, and retry after EINTR. Otherwise, 'emacs
11857 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
11858 timer goes off.
11859 * s/openbsd.h (BROKEN_SIGIO): Define.
11860 * unexelf.c (unexec) [__OpenBSD__]:
11861 Don't update the .mdebug section of the Alpha COFF symbol table.
11862
f41628b2
LMI
118632011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11864
11865 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
11866 (bug#8460).
11867
b59b67c5
PE
118682011-07-18 Paul Eggert <eggert@cs.ucla.edu>
11869
15e3a074
PE
11870 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
11871 This fixes some race conditions on the permissions of any newly
11872 created file.
11873
41bed37d
PE
11874 * alloc.c (valid_pointer_p): Use pipe, not open.
11875 This fixes some permissions issues when debugging.
11876
b59b67c5
PE
11877 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
11878 If fchown fails to set both uid and gid, try to set just gid,
11879 as that is sometimes allowed. Adjust the file's mode to eliminate
11880 setuid or setgid bits that are inappropriate if fchown fails.
11881
925a6be7
SM
118822011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
11883
11884 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
11885 to compare Lisp_Objects.
11886 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
11887 global_gnutls_log_level, don't mistake it for a Lisp_Object.
11888 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
11889
52968808
AS
118902011-07-17 Andreas Schwab <schwab@linux-m68k.org>
11891
0a6a104b
AS
11892 * lread.c (read_integer): Unread even EOF character.
11893 (read1): Likewise. Properly record start position of symbol.
11894
52968808
AS
11895 * lread.c (read1): Read `#:' as empty uninterned symbol if no
11896 symbol character follows.
11897
9e381cdd
PE
118982011-07-17 Paul Eggert <eggert@cs.ucla.edu>
11899
11900 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
11901 This works around a problem with the previous change to Fcopy_file.
11902 Recent glibc declares fchown with __attribute__((warn_unused_result)),
11903 and without this change, GCC might complain about discarding
11904 fchown's return value.
11905
b5641435
JB
119062011-07-16 Juanma Barranquero <lekktu@gmail.com>
11907
11908 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
11909
a8031457
PE
119102011-07-16 Paul Eggert <eggert@cs.ucla.edu>
11911
11912 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
11913
dd889327
LMI
119142011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
11915
750c33f7
LMI
11916 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
11917 it's used from the C level.
11918
dd889327
LMI
11919 * process.c: Use the same condition for POLL_FOR_INPUT in both
11920 keyboard.c and process.c (bug#1858).
11921
87e86684
LM
119222011-07-09 Lawrence Mitchell <wence@gmx.li>
11923
11924 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
11925 (Fgnutls_boot): Use it.
11926
64348f40
AS
119272011-07-15 Andreas Schwab <schwab@linux-m68k.org>
11928
11929 * doc.c (Fsubstitute_command_keys): Revert last change.
11930
1d698799
LMI
119312011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11932
f863868c
LMI
11933 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
11934 quotes the next character, and doesn't affect other longer
11935 sequences (bug#8935).
11936
1d698799
LMI
11937 * lread.c (syms_of_lread): Clarify that is isn't only
11938 `eval-buffer' and `eval-defun' that's affected by
11939 `lexical-binding' (bug#8460).
11940
aa4b6df6
EZ
119412011-07-15 Eli Zaretskii <eliz@gnu.org>
11942
11943 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 11944 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 11945
5d856da6
PE
119462011-07-14 Paul Eggert <eggert@cs.ucla.edu>
11947
ad6042bb
PE
11948 Fix minor problems found by static checking.
11949 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
11950 (elsz): Now a signed constant, not a size_t var. We prefer signed
11951 types to unsigned, to avoid integer comparison confusion. Without
11952 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
11953 "cannot optimize loop, the loop counter may overflow", a symptom
11954 of the confusion.
f00bbb22 11955 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
11956 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
11957
6468f31c
LMI
119582011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11959
49080b10
LMI
11960 * search.c (Fre_search_backward): Mention `case-fold-search' in
11961 all the re_search_* functions (bug#8138).
11962
6468f31c
LMI
11963 * keyboard.c (Fopen_dribble_file): Document when the file is
11964 closed (bug#8056).
11965
c965adc5
EZ
119662011-07-14 Eli Zaretskii <eliz@gnu.org>
11967
df9733bf
EZ
11968 * bidi.c (bidi_dump_cached_states): Fix format of displaying
11969 bidi_cache_idx.
11970
0bb23927
EZ
11971 Support bidi reordering of display and overlay strings.
11972 * xdisp.c (compute_display_string_pos)
11973 (compute_display_string_end): Accept additional argument STRING.
11974 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
11975 (reseat_to_string): Initialize bidi_it->string.s and
11976 bidi_it->string.schars.
11977 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
11978 NULL (avoids a crash in bidi_paragraph_init).
11979 Initialize itb.string.lstring.
0bb23927
EZ
11980 (init_iterator): Call bidi_init_it only of a valid
11981 buffer position was specified. Initialize paragraph_embedding to
11982 L2R.
11983 (reseat_to_string): Initialize the bidi iterator.
11984 (display_string): If we need to ignore text properties of
11985 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
11986 original value of -1 will not work with bidi.)
11987 (compute_display_string_pos): First arg is now struct
11988 `text_pos *'; all callers changed. Support display properties on
11989 Lisp strings.
11990 (compute_display_string_end): Support display properties on Lisp
11991 strings.
11992 (init_iterator, reseat_1, reseat_to_string): Initialize the
11993 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
11994 when iterating on a string not from display properties).
640c8776
SM
11995 (compute_display_string_pos, compute_display_string_end):
11996 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
11997 arrow keys.
11998 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
11999 base_level_stop; instead, set base_level_stop to BEGV.
12000 Fixes crashes in vertical-motion.
0bb23927
EZ
12001 (next_element_from_buffer): Improve commentary for when
12002 the iterator is before prev_stop.
12003 (init_iterator): Initialize bidi_p from the default value of
12004 bidi-display-reordering, not from buffer-local value. Use the
12005 buffer-local value only if initializing for buffer iteration.
12006 (handle_invisible_prop): Support invisible properties on strings
12007 that are being bidi-reordered.
12008 (set_iterator_to_next): Support bidi reordering of C strings and
12009 Lisp strings.
12010 (next_element_from_string): Support bidi reordering of Lisp
12011 strings.
12012 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
12013 (display_string): Support display of R2L glyph rows.
12014 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
12015 (init_iterator): Don't initialize it->bidi_p for strings
12016 here.
12017 (reseat_to_string): Initialize it->bidi_p for strings here.
12018 (next_element_from_string, next_element_from_c_string)
12019 (next_element_from_buffer): Add xassert's for correspondence
12020 between IT's object being iterated and it->bidi_it.string
12021 structure.
12022 (face_before_or_after_it_pos): Support bidi iteration.
12023 (next_element_from_c_string): Handle the case of the first string
12024 character that is not the first one in the visual order.
12025 (get_visually_first_element): New function, refactored from common
12026 parts of next_element_from_buffer, next_element_from_string, and
12027 next_element_from_c_string.
12028 (tool_bar_lines_needed, redisplay_tool_bar)
12029 (display_menu_bar): Force left-to-right direction. Add a FIXME
12030 comment for making that be controlled by a user option.
12031 (push_it, pop_it): Save and restore the state of the
12032 bidi iterator. Save and restore the bidi_p flag.
12033 (pop_it): Iterate out of display property for string iteration as
12034 well.
12035 (iterate_out_of_display_property): Support iteration over strings.
12036 (handle_single_display_spec): Set up it->bidi_it for iteration
12037 over a display string, and call bidi_init_it.
12038 (handle_single_display_spec, next_overlay_string)
12039 (get_overlay_strings_1, push_display_prop): Set up the bidi
12040 iterator for displaying display or overlay strings.
12041 (forward_to_next_line_start): Don't use the shortcut if
12042 bidi-iterating.
12043 (back_to_previous_visible_line_start): If handle_display_prop
12044 pushed the iterator stack, restore the internal state of the bidi
12045 iterator by calling bidi_pop_it same number of times.
12046 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
12047 and we are bidi-iterating, don't decrement the iterator position;
12048 instead, set the first_elt flag in the bidi iterator, to produce
12049 the same effect.
12050 (reseat_1): Remove redundant setting of string_from_display_prop_p.
12051 (push_display_prop): xassert that we are iterating a buffer.
12052 (push_it, pop_it): Save and restore paragraph_embedding member.
12053 (handle_single_display_spec, next_overlay_string)
12054 (get_overlay_strings_1, reseat_1, reseat_to_string)
12055 (push_display_prop): Set up the `unibyte' member of bidi_it.string
12056 correctly. Don't assume unibyte strings are not bidi-reordered.
12057 (compute_display_string_pos)
12058 (compute_display_string_end): Fix handling the case of C string.
12059 (push_it, pop_it): Save and restore from_disp_prop_p.
12060 (handle_single_display_spec, push_display_prop): Set the
12061 from_disp_prop_p flag.
12062 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
12063 (pop_it): Call iterate_out_of_display_property only if we are
12064 popping after iteration over a string that came from a display
12065 property. Fix a typo in popping stretch info. Add an assertion
12066 for verifying that the iterator position is in sync with the bidi
12067 iterator.
12068 (handle_single_display_spec, get_overlay_strings_1)
12069 (push_display_prop): Fix initialization of paragraph direction for
12070 string when that of the parent object is not yet determined.
12071 (reseat_1): Call bidi_init_it to resync the bidi
12072 iterator with IT's position. (Bug#7616)
12073 (find_row_edges): If ROW->start.pos gives position
12074 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
12075 (handle_stop, back_to_previous_visible_line_start, reseat_1):
12076 Reset the from_disp_prop_p flag.
12077 (SAVE_IT, RESTORE_IT): New macros.
12078 (pos_visible_p, face_before_or_after_it_pos)
12079 (back_to_previous_visible_line_start)
12080 (move_it_in_display_line_to, move_it_in_display_line)
12081 (move_it_to, move_it_vertically_backward, move_it_by_lines)
12082 (try_scrolling, redisplay_window, display_line): Use them when
12083 saving a temporary copy of the iterator and restoring it back.
12084 (back_to_previous_visible_line_start, reseat_1)
12085 (init_iterator): Empty the bidi cache "stack".
12086 (move_it_in_display_line_to): If iterator ended up at
12087 EOL, but we never saw any buffer positions smaller than
12088 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
12089 motion in bidi-reordered lines.
12090 (move_it_in_display_line_to): Record prev_method and prev_pos
12091 immediately before the call to set_iterator_to_next. Fixes cursor
12092 motion in bidi-reordered lines with stretch glyphs and strings
12093 displayed in margins. (Bug#8133) (Bug#8867)
12094 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
12095 TO_CHARPOS.
640c8776
SM
12096 (pos_visible_p): Support positions in bidi-reordered lines.
12097 Save and restore bidi cache.
0bb23927
EZ
12098
12099 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
12100 (bidi_paragraph_info): Delete unused struct.
12101 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
12102 (bidi_cache_start): New variable.
12103 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
12104 to zero.
12105 (bidi_cache_fetch_state, bidi_cache_search)
12106 (bidi_cache_find_level_change, bidi_cache_iterator_state)
12107 (bidi_cache_find, bidi_peek_at_next_level)
12108 (bidi_level_of_next_char, bidi_find_other_level_edge)
12109 (bidi_move_to_visually_next): Compare cache index with
12110 bidi_cache_start rather than with zero.
12111 (bidi_fetch_char): Accept new argument STRING; all callers
12112 changed. Support iteration over a string. Support strings with
12113 display properties. Support unibyte strings. Fix the type of
12114 `len' according to what STRING_CHAR_AND_LENGTH expects.
12115 (bidi_paragraph_init, bidi_resolve_explicit_1)
12116 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
12117 (bidi_level_of_next_char, bidi_move_to_visually_next):
12118 Support iteration over a string.
0bb23927
EZ
12119 (bidi_set_sor_type, bidi_resolve_explicit_1)
12120 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
12121 can now be zero (for strings); special values 0 and -1 were
12122 changed to -1 and -2, respectively.
12123 (bidi_char_at_pos): New function.
12124 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
12125 Call it instead of FETCH_MULTIBYTE_CHAR.
12126 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
12127 initialized to valid values.
12128 (bidi_init_it): Don't initialize charpos and bytepos with invalid
12129 values.
12130 (bidi_level_of_next_char): Allow the sentinel "position" to pass
12131 the test for valid cached positions. Fix the logic for looking up
12132 the sentinel state in the cache. GCPRO the Lisp string we are
12133 iterating.
12134 (bidi_push_it, bidi_pop_it): New functions.
12135 (bidi_initialize): Initialize the bidi cache start stack pointer.
12136 (bidi_cache_ensure_space): New function, refactored from part of
12137 bidi_cache_iterator_state. Don't assume the required size is just
12138 one BIDI_CACHE_CHUNK away.
12139 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
12140 (bidi_count_bytes, bidi_char_at_pos): New functions.
12141 (bidi_cache_search): Don't assume bidi_cache_last_idx is
12142 always valid if bidi_cache_idx is valid.
12143 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
12144 is valid if it's going to be used.
12145 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
12146 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
12147 (bidi_cache_find_level_change, bidi_cache_ensure_space)
12148 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
12149 (bidi_find_other_level_edge, bidi_cache_start_stack):
12150 All variables related to cache indices are now EMACS_INT.
c965adc5 12151
0bb23927
EZ
12152 * dispextern.h (struct bidi_string_data): New structure.
12153 (struct bidi_it): New member `string'. Make flag members be 1-bit
12154 fields, and put them last in the struct.
640c8776
SM
12155 (compute_display_string_pos, compute_display_string_end):
12156 Update prototypes.
0bb23927
EZ
12157 (bidi_push_it, bidi_pop_it): Add prototypes.
12158 (struct iterator_stack_entry): New members bidi_p,
12159 paragraph_embedding, and from_disp_prop_p.
12160 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
12161 (bidi_shelve_cache, bidi_unshelve_cache):
12162 Declare prototypes.
0bb23927
EZ
12163
12164 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
12165 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
12166 and vector-like objects.
12167
12168 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
12169 cache around display iteration.
12170
12171 * window.c (Fwindow_end, window_scroll_pixel_based)
12172 (displayed_window_lines, Frecenter): Save and restore the bidi
12173 cache around display iteration.
12174
3bbd2265
LMI
121752011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12176
12177 * editfns.c (Fdelete_region): Clarify the use of the named
12178 parameters (bug#6788).
12179
adc47434
MR
121802011-07-14 Martin Rudalics <rudalics@gmx.at>
12181
12182 * indent.c (Fvertical_motion): Set and restore w->pointm when
12183 saving and restoring the window's buffer (Bug#9006).
12184
837c31f8
LMI
121852011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12186
12187 * editfns.c (Fstring_to_char): Clarify just what is returned
12188 (bug#6576). Text by Eli Zaretskii.
12189
ac389d0c
JB
121902011-07-13 Juanma Barranquero <lekktu@gmail.com>
12191
12192 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
12193
0be0ce47
EZ
121942011-07-13 Eli Zaretskii <eliz@gnu.org>
12195
12196 * buffer.c (mmap_find): Fix a typo.
12197
cd18e7e3
JB
121982011-07-13 Johan Bockgård <bojohan@gnu.org>
12199
12200 Fix execution of x selection hooks.
12201 * xselect.c (Qx_lost_selection_functions)
12202 (Qx_sent_selection_functions): New vars.
12203 (syms_of_xselect): DEFSYM them.
12204 (x_handle_selection_request): Pass Qx_sent_selection_functions
12205 rather than Vx_sent_selection_functions to Frun_hook_with_args.
12206 (x_handle_selection_clear,x_clear_frame_selections):
12207 Pass Qx_lost_selection_functions rather than
12208 Vx_lost_selection_functions to Frun_hook_with_args.
12209
47ea7f44
PE
122102011-07-13 Paul Eggert <eggert@cs.ucla.edu>
12211
ac389d0c 12212 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
12213 The old code sometimes used this field without initializing it.
12214
47ea7f44
PE
12215 * alloc.c (gc_sweep): Don't read past end of array.
12216 In theory, the old code could also have corrupted Emacs internals,
12217 though it'd be very unlikely.
12218
bc985c87
AS
122192011-07-12 Andreas Schwab <schwab@linux-m68k.org>
12220
12221 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 12222 argument. (Bug#4026)
bc985c87 12223
0cf34688
LMI
122242011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
12225
b3dadd76
LMI
12226 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
12227 key" (bug#4257).
12228
0cf34688
LMI
12229 * window.c (Fset_window_start): Doc fix (bug#4199).
12230 (Fset_window_hscroll): Ditto.
12231
270768cd
PE
122322011-07-12 Paul Eggert <eggert@cs.ucla.edu>
12233
077e3dda 12234 Fix minor new problems caught by GCC 4.6.1.
270768cd 12235 * term.c (init_tty): Remove unused local.
490011a6 12236 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 12237 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 12238 not used otherwise.
270768cd 12239
b1f58454
CY
122402011-07-12 Chong Yidong <cyd@stupidchicken.com>
12241
12242 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
12243
22b9578d
LMI
122442011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
12245
6e70ab07
LMI
12246 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
12247 are the mini-buffer and the echo area (bug#3320).
12248
22b9578d
LMI
12249 * term.c (init_tty): Remove support for supdup, c10 and perq
12250 terminals, which are no longer supported (bug#1482).
12251
8974cc9f
JB
122522011-07-10 Johan Bockgård <bojohan@gnu.org>
12253
12254 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
12255
a560d974
JD
122562011-07-10 Jan Djärv <jan.h.d@swipnet.se>
12257
12258 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
12259 for non-popups (Bug#3642).
12260
1dae0f0a
AS
122612011-07-10 Andreas Schwab <schwab@linux-m68k.org>
12262
268c2c36 12263 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 12264 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
12265 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
12266 * cm.c (losecursor): Likewise.
1dae0f0a
AS
12267 * data.c (fmod): Likewise.
12268 * dispnew.c (swap_glyphs_in_rows): Likewise.
12269 * emacs.c (memory_warning_signal): Likewise.
12270 * floatfns.c (float_error): Likewise.
12271 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
12272 (otf_open, font_otf_capability, generate_otf_features)
12273 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
12274 Likewise.
12275 * image.c (pbm_read_file): Likewise.
12276 * indent.c (string_display_width): Likewise.
12277 * intervals.c (check_for_interval, search_for_interval)
12278 (inc_interval_count, count_intervals, root_interval)
12279 (adjust_intervals_for_insertion, make_new_interval): Likewise.
12280 * lread.c (defalias): Likewise.
268c2c36 12281 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
12282 * regex.c (set_image_of_range_1, set_image_of_range)
12283 (regex_grow_registers): Likewise.
12284 * sysdep.c (strerror): Likewise.
12285 * termcap.c (valid_filename_p, tprint, main): Likewise.
12286 * tparam.c (main): Likewise.
12287 * unexhp9k800.c (run_time_remap, save_data_space)
12288 (update_file_ptrs, read_header, write_header, calculate_checksum)
12289 (copy_file, copy_rest, display_header): Likewise.
12290 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
12291 Likewise.
12292 * xdisp.c (check_it): Likewise.
12293 * xfaces.c (register_color, unregister_color, unregister_colors):
12294 Likewise.
12295 * xfns.c (print_fontset_result): Likewise.
12296 * xrdb.c (member, fatal, main): Likewise.
12297
99033785
PE
122982011-07-10 Paul Eggert <eggert@cs.ucla.edu>
12299
12300 Fix minor problems found by static checking (Bug#9031).
12301 * chartab.c (char_table_set_range, map_sub_char_table):
12302 Remove unused locals.
12303 (uniprop_table): Now static.
12304 * composite.c (_work_char): Remove unused static var.
12305
9cb2ac56
JB
123062011-07-09 Juanma Barranquero <lekktu@gmail.com>
12307
12308 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
12309
f25661f0
JD
123102011-07-09 Jan Djärv <jan.h.d@swipnet.se>
12311
12312 * gtkutil.c (qttip_cb): Remove code without function.
12313
8278c4fe
EZ
123142011-07-09 Eli Zaretskii <eliz@gnu.org>
12315
12316 * w32.c (pthread_sigmask): New stub.
12317
1692ae2d 123182011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 12319
8a6ebd58 12320 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
12321 sigprocmask is portable only for single-threaded applications, and
12322 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
12323 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
12324 (LIBES): Use it.
12325 * callproc.c (Fcall_process):
12326 * process.c (create_process):
12327 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
12328 Use pthread_sigmask, not sigprocmask.
123403e4 12329
1b854618
JD
123302011-07-08 Jan Djärv <jan.h.d@swipnet.se>
12331
12332 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
12333 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
12334 wrong (Bug#8591).
12335
3fe4b549
JD
123362011-07-08 Jan Djärv <jan.h.d@swipnet.se>
12337
0ce7e563
JD
12338 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
12339 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
12340 (xg_hide_tooltip): Fix comment.
12341
3fe4b549
JD
12342 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
12343 in registerServicesMenuSendTypes.
12344 (validRequestorForSendType): Don't check ns_return_types.
12345
12346 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
12347 ns_return_type.
12348
5df75e47
JR
123492011-07-08 Jason Rumney <jasonr@gnu.org>
12350
22610910
JR
12351 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
12352 SH_SHOW for hidden windows (Bug#5482).
12353
5df75e47
JR
12354 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
12355 frame struct members of non-existent frames (Bug#6284).
12356
699c10bd
JD
123572011-07-08 Jan Djärv <jan.h.d@swipnet.se>
12358
4393663b
JD
12359 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
12360 variable firstTime not needed on OSX >= 10.6.
12361 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
12362 >= 10.5. Use setKnobProportion, setDoubleValue.
12363
12364 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
12365 (MAC_OS_X_VERSION_10_5): Define if not defined.
12366 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
12367 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
12368 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
12369
12370 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 12371 cString and lossyCString on OSX >= 10.4.
4393663b 12372
58179cce 12373 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
12374 sizeToFit on OSX >= 10.2.
12375
12376 * nsimage.m (allocInitFromFile): Don't use deprecated method
12377 bestRepresentationForDevice on OSX >= 10.6.
12378
12379 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
12380 to avoid warning.
12381
12382 * emacs.c: Declare unexec_init_emacs_zone.
12383
a63e0781
JD
12384 * nsgui.h: Fix compiler warning about gnulib redefining verify.
12385
699c10bd
JD
12386 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
12387
12388 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
12389 on svcsMenu (Bug#8842).
12390
12391 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
12392 ns_return_types.
12393 (Fns_list_services): Just return Qnil on 10.6, code not working there.
12394
12395 * nsterm.m (QUTF8_STRING): Declare.
12396 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
12397 (validRequestorForSendType): Return type is (id).
12398 Change indexOfObjectIdenticalTo to indexOfObject.
12399 Check if we have local selection before returning self (Bug#8842).
12400 (writeSelectionToPasteboard): Put local selection into paste board
12401 if we have a local selection (Bug#8842).
12402 (syms_of_nsterm): DEFSYM QUTF8_STRING.
12403
12404 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
12405 (ns_get_local_selection): Declare.
12406
54e10184
LMI
124072011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
12408
9888ff71
LMI
12409 * keymap.c (describe_map_tree): Don't insert a double newline at
12410 the end of the buffer (bug#1169) and return whether we inserted
12411 something.
12412
54e10184
LMI
12413 * callint.c (Fcall_interactively): Change "reading args" to
12414 "providing args" to try to clarify what it does (bug#1010).
12415
15fa4783
KH
124162011-07-07 Kenichi Handa <handa@m17n.org>
12417
12418 * composite.c (composition_compute_stop_pos): Ignore a static
12419 composition starting before CHARPOS (Bug#8915).
12420
12421 * xdisp.c (handle_composition_prop): Likewise.
12422
a8815b00
EZ
124232011-07-07 Eli Zaretskii <eliz@gnu.org>
12424
12425 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
12426 (Bug#9015)
12427
ef7b981d 124282011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
12429
12430 * character.h (unicode_category_t): New enum type.
12431
12432 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
12433 (Qchar_code_property_table): New variable.
12434 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
12435 (UNIPROP_COMPRESSED_FORM_P): New macros.
12436 (char_table_ascii): Uncompress the compressed values.
12437 (sub_char_table_ref): New arg is_uniprop. Callers changed.
12438 Uncompress the compressed values.
ac389d0c 12439 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
12440 (char_table_ref_and_range): Uncompress the compressed values.
12441 (sub_char_table_set): New arg is_uniprop. Callers changed.
12442 Uncompress the compressed values.
12443 (sub_char_table_set_range): Args changed. Callers changed.
12444 (char_table_set_range): Adjuted for the above change.
12445 (map_sub_char_table): Delete args default_val and parent. Add arg
12446 top. Give decoded values to a Lisp function.
640c8776 12447 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
12448 values to a Lisp function. Gcpro more variables.
12449 (uniprop_table_uncompress)
12450 (uniprop_decode_value_run_length): New functions.
12451 (uniprop_decoder, uniprop_decoder_count): New variables.
12452 (uniprop_get_decoder, uniprop_encode_value_character)
12453 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
12454 New functions.
12455 (uniprop_encoder, uniprop_encoder_count): New variables.
12456 (uniprop_get_encoder, uniprop_table)
12457 (Funicode_property_table_internal, Fget_unicode_property_internal)
12458 (Fput_unicode_property_internal): New functions.
12459 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
12460 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 12461 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
12462 char-code-property-alist.
12463
640c8776 12464 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
12465 Vunicode_category_table.
12466
640c8776 12467 * font.c (font_range): Adjust for the change of
c805dec0
KH
12468 Vunicode_category_table.
12469
76b397fb
DN
124702011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
12471
12472 * m/iris4d.h: Remove file, move contents ...
12473 * s/irix6-5.h: ... here.
12474
22b4128e
PE
124752011-07-06 Paul Eggert <eggert@cs.ucla.edu>
12476
12477 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
12478 * alloc.c (mark_buffer):
12479 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
12480 (clone_per_buffer_values): Don't assume that
22b4128e
PE
12481 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
12482 This isn't true in general, and it's particularly not true
12483 if Emacs is configured with --with-wide-int.
12484 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
12485 New macros, used in the buffer.c change.
12486
869795d6
JD
124872011-07-05 Jan Djärv <jan.h.d@swipnet.se>
12488
12489 * xsettings.c: Use both GConf and GSettings if both are available.
12490 (store_config_changed_event): Add comment.
12491 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
12492 (store_tool_bar_style_changed): New functions.
5e617bc2 12493 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
12494 (struct xsettings): Move font inside HAVE_XFT.
12495 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 12496 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 12497 Move inside HAVE_XFT.
640c8776 12498 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
12499 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
12500 also.
12501 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 12502 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 12503 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
12504 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
12505 (parse_settings): Move check for font inside HAVE_XFT.
12506 (read_settings, apply_xft_settings): Add comment.
12507 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
12508 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
12509 call store_font_name_changed.
12510 (xft_settings_event): Add comment.
12511 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
12512 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
12513 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
12514 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
12515 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
12516 (xsettings_get_system_font, xsettings_get_system_normal_font):
12517 Add comment.
869795d6 12518
d8ed26bd
PE
125192011-07-05 Paul Eggert <eggert@cs.ucla.edu>
12520
12521 Random fixes. E.g., (random) never returned negative values.
12522 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
12523 subseconds part to the entropy, as that's a bit more random.
12524 Prefer signed to unsigned, since the signedness doesn't matter and
12525 in general we prefer signed. When given a limit, use a
12526 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
12527 latter isn't right if USE_2_TAGS_FOR_INTS.
12528 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
12529 not 0..VALMASK. Don't discard "excess" bits that random () returns.
12530
cabf1cac
SM
125312011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
12532
12533 * textprop.c (text_property_stickiness):
12534 Obey Vtext_property_default_nonsticky.
12535 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
12536 * w32fns.c (syms_of_w32fns):
12537 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
12538
6e9b2be9
PE
125392011-07-04 Paul Eggert <eggert@cs.ucla.edu>
12540
12541 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
12542 This is more efficient than Ffile_directory_p and avoids a minor race.
12543
90186c68
LMI
125442011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
12545
7c301272
LMI
12546 * buffer.c (Foverlay_put): Say what the return value is
12547 (bug#7835).
12548
c4f2d8d4
LMI
12549 * fileio.c (barf_or_query_if_file_exists): Check first if the file
12550 is a directory before asking whether to use the file name
12551 (bug#7564).
ad637907
LMI
12552 (barf_or_query_if_file_exists): Make the "File is a directory"
12553 error be more correct.
c4f2d8d4 12554
90186c68
LMI
12555 * fns.c (Frequire): Remove the mention of the .gz files, since
12556 that's installation-specific, but keep the mention of
12557 `get-load-suffixes'.
12558
da64016e
PE
125592011-07-04 Paul Eggert <eggert@cs.ucla.edu>
12560
12561 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
12562 Report string overflow if the output is too long.
12563
7d47b580
JB
125642011-07-04 Juanma Barranquero <lekktu@gmail.com>
12565
a555cb87
JB
12566 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
12567 (syms_of_gnutls): Remove duplicate DEFSYM for
12568 Qgnutls_bootprop_verify_hostname_error, an error for
12569 Qgnutls_bootprop_verify_error (which is no longer used).
12570
7d47b580
JB
12571 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
12572 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
12573 Also (re)move comments that are misplaced or no longer relevant.
12574
1e49bfab
LMI
125752011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12576
12577 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
12578
1485f4c0
CY
125792011-07-03 Chong Yidong <cyd@stupidchicken.com>
12580
12581 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
12582 and background color parameters if they have been changed.
12583
a9ab721e
LMI
125842011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12585
12586 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
12587
cf7cff57
PE
125882011-07-03 Paul Eggert <eggert@cs.ucla.edu>
12589
2e13213d
PE
12590 * xsettings.c (SYSTEM_FONT): Define only when used.
12591 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
12592
cf7cff57
PE
12593 * keymap.c (access_keymap_1): Now static.
12594
7a8e04f7
CY
125952011-07-02 Chong Yidong <cyd@stupidchicken.com>
12596
12597 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
12598 leave any prefix arg for the up event (Bug#1586).
12599
61352f62
LMI
126002011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
12601
69bb1ef7
LMI
12602 * lread.c (syms_of_lread): Mention single symbols defined by
12603 `defvar' or `defconst' (bug#7154).
12604
61352f62 12605 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 12606 (Frequire): Mention get-load-suffixes.
61352f62 12607
28545e04
MR
126082011-07-02 Martin Rudalics <rudalics@gmx.at>
12609
12610 * window.h (window): Remove clone_number slot.
12611 * window.c (Fwindow_clone_number, Fset_window_clone_number):
12612 Remove.
12613 (make_parent_window, make_window, saved_window)
12614 (Fset_window_configuration, save_window_save): Don't deal with
12615 clone numbers.
12616 * buffer.c (Qclone_number): Remove declaration.
12617 (sort_overlays, overlay_strings): Don't deal with clone numbers.
12618
3349e122
SM
126192011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
12620
12621 Add multiple inheritance to keymaps.
12622 * keymap.c (Fmake_composed_keymap): New function.
12623 (Fset_keymap_parent): Simplify.
12624 (fix_submap_inheritance): Remove.
12625 (access_keymap_1): New function extracted from access_keymap to handle
12626 embedded parents and handle lists of maps.
12627 (access_keymap): Use it.
12628 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
12629 (Fcopy_keymap): Handle embedded parents.
12630 (Fcommand_remapping, define_as_prefix): Simplify.
12631 (Fkey_binding): Simplify.
12632 (syms_of_keymap): Move minibuffer-local-completion-map,
12633 minibuffer-local-filename-completion-map,
12634 minibuffer-local-must-match-map, and
12635 minibuffer-local-filename-must-match-map to Elisp.
12636 (syms_of_keymap): Defsubr make-composed-keymap.
12637 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
12638 (parse_menu_item): Trivial simplification.
12639
3279eb87
GM
126402011-07-01 Glenn Morris <rgm@gnu.org>
12641
12642 * Makefile.in (SETTINGS_LIBS): Fix typo.
12643
39cb9e56 126442011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
12645
12646 * coding.c (Fencode_coding_string): Record the last coding system
12647 used, as the function doc string says (bug#8738).
12648
0949d2b6
JD
126492011-07-01 Jan Djärv <jan.h.d@swipnet.se>
12650
12651 * xsettings.c (store_monospaced_changed): Take new font as arg and
12652 check for change against current_mono_font.
12653 (EMACS_TYPE_SETTINGS): Remove this and related defines.
12654 (emacs_settings_constructor, emacs_settings_get_property)
12655 (emacs_settings_set_property, emacs_settings_class_init)
12656 (emacs_settings_init, gsettings_obj): Remove.
12657 (something_changedCB): New function for HAVE_GSETTINGS.
12658 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
12659 with value as argument.
12660 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
12661 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 12662 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
12663 "changed".
12664
12665 * xgselect.c: Add defined (HAVE_GSETTINGS).
12666 (xgselect_initialize): Ditto.
12667
12668 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
12669 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
12670 xg_select.
12671
bbc6b304
PE
126722011-07-01 Paul Eggert <eggert@cs.ucla.edu>
12673
12674 * eval.c (struct backtrace): Simplify and port the data structure.
12675 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
12676 signed bit field, as this assumption is not portable and it makes
12677 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
12678 "char debug_on_exit : 1" as this is not portable either; instead,
12679 use the portable "unsigned int debug_on_exit : 1". Remove unused
12680 member evalargs. Remove obsolete comments about cc bombing out.
12681
9851bfc5
JD
126822011-06-30 Jan Djärv <jan.h.d@swipnet.se>
12683
51bb811f 12684 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
12685 Let HAVE_GSETTINGS override HAVE_GCONF.
12686 (store_monospaced_changed): New function.
12687 (EMACS_SETTINGS): A new type derived from GObject to handle
12688 GSettings notifications.
12689 (emacs_settings_constructor, emacs_settings_get_property)
12690 (emacs_settings_set_property, emacs_settings_class_init):
12691 New functions.
12692 (gsettings_client, gsettings_obj): New variables.
12693 (GSETTINGS_SCHEMA): New define.
12694 (something_changedCB): Call store_monospaced_changed.
12695 (init_gsettings): New function.
12696 (xsettings_initialize): Call init_gsettings.
12697 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
12698 to NULL.
12699
640c8776 12700 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
12701 GCONF_CFLAGS/LIBS.
12702
5386012d
MR
127032011-06-29 Martin Rudalics <rudalics@gmx.at>
12704
12705 * window.c (resize_root_window, grow_mini_window)
12706 (shrink_mini_window): Rename Qresize_root_window to
12707 Qwindow_resize_root_window and Qresize_root_window_vertically to
12708 Qwindow_resize_root_window_vertically.
12709
f13e0b08
PE
127102011-06-28 Paul Eggert <eggert@cs.ucla.edu>
12711
12712 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
12713
94515237
JB
127142011-06-27 Juanma Barranquero <lekktu@gmail.com>
12715
12716 * makefile.w32-in: Redesign dependencies so they reflect more
12717 clearly which files are directly included by each source file,
12718 and not through other includes.
12719
e43b6e43
MR
127202011-06-27 Martin Rudalics <rudalics@gmx.at>
12721
12722 * buffer.c (Qclone_number): Declare static and DEFSYM it.
12723 (sort_overlays, overlay_strings): When an overlay's clone number
12724 matches the window's clone number process the overlay even if
12725 the overlay's window property doesn't match the current window.
12726
d68443dc
MR
12727 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
12728 (Fwindow_hchild): Rename to Fwindow_left_child.
12729 (Fwindow_next): Rename to Fwindow_next_sibling.
12730 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
12731 (resize_window_check): Rename to window_resize_check.
12732 (resize_window_apply): Rename to window_resize_apply.
12733 (Fresize_window_apply): Rename to Fwindow_resize_apply.
12734 (Fdelete_other_windows_internal, resize_frame_windows)
12735 (Fsplit_window_internal, Fdelete_window_internal)
12736 (grow_mini_window, shrink_mini_window)
12737 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 12738
c7e73be5
JD
127392011-06-26 Jan Djärv <jan.h.d@swipnet.se>
12740
12741 * emacsgtkfixed.h: State that this is only used with Gtk+3.
12742 (emacs_fixed_set_min_size): Remove.
12743 (emacs_fixed_new): Take frame as argument.
12744
12745 * emacsgtkfixed.c: State that this is only used with Gtk+3.
12746 (_EmacsFixedPrivate): Remove minwidth/height.
12747 Add struct frame *f.
12748 (emacs_fixed_init): Initialize priv->f.
12749 (get_parent_class, emacs_fixed_set_min_size): Remove.
12750 (emacs_fixed_new): Set priv->f to argument.
12751 (emacs_fixed_get_preferred_width)
12752 (emacs_fixed_get_preferred_height): Use min_width/height from
12753 frames size_hint to set minimum and natural (Bug#8919).
12754 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
12755 and use min_width/height from frames size_hint to set
12756 min_width/height (Bug#8919).
12757
12758 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
12759 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
12760 Fix indentation.
c7e73be5 12761
cf99dcf8
EZ
127622011-06-26 Eli Zaretskii <eliz@gnu.org>
12763
12764 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
12765 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
12766 called at ZV.
12767
029529ac
CY
127682011-06-26 Chong Yidong <cyd@stupidchicken.com>
12769
12770 * process.c (wait_reading_process_output): Bypass select if
12771 waiting for a cell while ignoring keyboard input, and input is
12772 pending. Suggested by Jan Djärv (Bug#8869).
12773
7a7ef429
PE
127742011-06-25 Paul Eggert <eggert@cs.ucla.edu>
12775
12776 Use gnulib's dup2 module instead of rolling our own.
12777 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
12778
11fdef7d 127792011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
12780
12781 * dispnew.c (scrolling_window): Before scrolling, turn off a
12782 mouse-highlight in the window being scrolled.
12783
cd3520a4
JB
127842011-06-24 Juanma Barranquero <lekktu@gmail.com>
12785
12786 Move DEFSYM to lisp.h and use everywhere.
12787
12788 * character.h (DEFSYM): Move declaration...
12789 * lisp.h (DEFSYM): ...here.
12790
12791 * gnutls.c:
12792 * minibuf.c:
12793 * w32menu.c:
12794 * w32proc.c:
12795 * w32select.c: Don't include character.h.
12796
12797 * alloc.c (syms_of_alloc):
12798 * buffer.c (syms_of_buffer):
12799 * bytecode.c (syms_of_bytecode):
12800 * callint.c (syms_of_callint):
12801 * casefiddle.c (syms_of_casefiddle):
12802 * casetab.c (init_casetab_once):
12803 * category.c (init_category_once, syms_of_category):
12804 * ccl.c (syms_of_ccl):
12805 * cmds.c (syms_of_cmds):
12806 * composite.c (syms_of_composite):
12807 * dbusbind.c (syms_of_dbusbind):
12808 * dired.c (syms_of_dired):
12809 * dispnew.c (syms_of_display):
12810 * doc.c (syms_of_doc):
12811 * editfns.c (syms_of_editfns):
12812 * emacs.c (syms_of_emacs):
12813 * eval.c (syms_of_eval):
12814 * fileio.c (syms_of_fileio):
12815 * fns.c (syms_of_fns):
12816 * frame.c (syms_of_frame):
12817 * fringe.c (syms_of_fringe):
12818 * insdel.c (syms_of_insdel):
12819 * keymap.c (syms_of_keymap):
12820 * lread.c (init_obarray, syms_of_lread):
12821 * macros.c (syms_of_macros):
12822 * msdos.c (syms_of_msdos):
12823 * print.c (syms_of_print):
12824 * process.c (syms_of_process):
12825 * search.c (syms_of_search):
12826 * sound.c (syms_of_sound):
12827 * syntax.c (init_syntax_once, syms_of_syntax):
12828 * terminal.c (syms_of_terminal):
12829 * textprop.c (syms_of_textprop):
12830 * undo.c (syms_of_undo):
12831 * w32.c (globals_of_w32):
12832 * window.c (syms_of_window):
12833 * xdisp.c (syms_of_xdisp):
12834 * xfaces.c (syms_of_xfaces):
12835 * xfns.c (syms_of_xfns):
12836 * xmenu.c (syms_of_xmenu):
12837 * xsettings.c (syms_of_xsettings):
12838 * xterm.c (syms_of_xterm): Use DEFSYM.
12839
4228cf16
TZ
128402011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
12841
cd3520a4 12842 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 12843
7fcccf1e
PE
128442011-06-23 Paul Eggert <eggert@cs.ucla.edu>
12845
7efb4e0e
PE
12846 Integer and buffer overflow fixes (Bug#8873).
12847
ff5844ad
PE
12848 * print.c (printchar, strout): Check for string overflow.
12849 (PRINTPREPARE, printchar, strout):
12850 Don't set size unless allocation succeeds.
12851
90532f02
PE
12852 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
12853 for sizes. Check for string overflow more accurately.
12854 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
12855
6d84508d
PE
12856 * macros.c: Integer and buffer overflow fixes.
12857 * keyboard.h (struct keyboard.kbd_macro_bufsize):
12858 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
12859 Use ptrdiff_t, not int, for sizes.
12860 Don't increment bufsize until after realloc succeeds.
12861 Check for size-calculation overflow.
12862 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
12863
437b2cb4
PE
12864 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
12865
8b9ac8b4
PE
12866 * lread.c: Integer overflow fixes.
12867 (read_integer): Radix is now EMACS_INT, not int,
12868 to improve quality of diagnostics for out-of-range radices.
12869 Calculate buffer size correctly for out-of-range radices.
12870 (read1): Check for integer overflow in radices, and in
12871 read-circle numbers.
82cb60d3
PE
12872 (read_escape): Avoid int overflow.
12873 (Fload, openp, read_buffer_size, read1)
12874 (substitute_object_recurse, read_vector, read_list, map_obarray):
12875 Use ptrdiff_t, not int, for sizes.
12876 (read1): Use EMACS_INT, not int, for sizes.
20270765 12877 Check for size overflow.
8b9ac8b4 12878
7fcccf1e
PE
12879 * image.c (cache_image): Check for size arithmetic overflow.
12880
bfbbd7e7
PE
12881 * lread.c: Integer overflow issues.
12882 (saved_doc_string_size, saved_doc_string_length)
12883 (prev_saved_doc_string_size, prev_saved_doc_string_length):
12884 Now ptrdiff_t, not int.
12885 (read1): Don't assume doc string length fits in int. Check for
12886 out-of-range doc string lengths.
12887 (read_list): Don't assume file position fits in int.
39019e54 12888 (read_escape): Check for hex character overflow.
bfbbd7e7 12889
4e323265
LL
128902011-06-22 Leo Liu <sdl.web@gmail.com>
12891
12892 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
12893 Move to minibuffer.el.
12894
85fece3e
PE
128952011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12896
20b84ce9 12897 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
12898 The following patches are for when GLYPH_DEBUG && !XASSERT.
12899 * dispextern.h (trace_redisplay_p, dump_glyph_string):
12900 * dispnew.c (flush_stdout):
12901 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
12902 Mark as externally visible.
12903 * dispnew.c (check_window_matrix_pointers): Now static.
12904 * dispnew.c (window_to_frame_vpos):
12905 * xfns.c (unwind_create_frame):
12906 * xterm.c (x_check_font): Remove unused local.
12907 * scroll.c (CHECK_BOUNDS):
12908 * xfaces.c (cache_fache): Rename local to avoid shadowing.
12909 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
12910 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
12911 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
12912 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
12913 Now static.
12914 (debug_method_add): Use va_list and vsprintf rather than relying
12915 on undefined behavior with wrong number of arguments.
12916 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
12917 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
12918 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
12919 since we're not interested in debugging glyphs with old libraries.
12920 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
12921 GCC 4.6.0's static checking.
12922
0766b489
PE
129232011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12924
31fd4b32
PE
12925 Integer overflow and signedness fixes (Bug#8873).
12926 A few related buffer overrun fixes, too.
12927
b79e8648
PE
12928 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
12929
0766b489
PE
12930 * dispextern.h (struct face.stipple):
12931 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
12932 (x_bitmap_mask, x_allocate_bitmap_record)
12933 (x_create_bitmap_from_data, x_create_bitmap_from_file)
12934 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
12935 (x_create_bitmap_from_xpm_data):
12936 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
12937 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
12938 (.bitmaps_last):
12939 * xfaces.c (load_pixmap):
12940 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
12941 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
12942 (.bitmaps_last, struct x_output.icon_bitmap):
12943 Use ptrdiff_t, not int, for bitmap indexes.
12944 (x_allocate_bitmap_record): Check for size overflow.
12945 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
12946
b081724f
PE
12947 Use ptrdiff_t, not int, for overlay counts.
12948 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
12949 * editfns.c (overlays_around, get_pos_property):
12950 * textprop.c (get_char_property_and_overlay):
12951 * xdisp.c (next_overlay_change, note_mouse_highlight):
12952 * xfaces.c (face_at_buffer_position):
21514da7
PE
12953 * buffer.c (OVERLAY_COUNT_MAX): New macro.
12954 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
12955 (Fnext_overlay_change, Fprevious_overlay_change)
12956 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 12957 Use ptrdiff_t, not int, for sizes.
21514da7 12958 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 12959
3de73e5e
PE
12960 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
12961
2606c57b
PE
12962 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
12963 (x_session_initialize): Do not assume string length fits in int.
12964
aaafe47a
PE
12965 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
12966 This is unlikely, but can occur if DPI is outlandish.
12967
2674ddc8 12968 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
12969 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
12970
28154962
PE
12971 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
12972 * xrdb.c (magic_file_p, search_magic_path):
12973 Omit last arg SUFFIX; it was always 0. All callers changed.
12974 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
12975
7de51af5
PE
12976 * xfont.c (xfont_match): Avoid need for strlen.
12977
25ed6cc3
PE
12978 * xfns.c: Don't assume strlen fits in int.
12979 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
12980
4eab31dd
PE
12981 * xdisp.c (message_log_check_duplicate): Return intmax_t,
12982 not unsigned long, as we prefer signed integers. All callers changed.
12983 Detect integer overflow in repeat count.
12984 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 12985 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 12986
171e2a58
PE
12987 * termcap.c: Don't assume sizes fit in int and never overflow.
12988 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
12989 (gobble_line): Check for size-calculation overflow.
12990
ad39faca 12991 * minibuf.c (Fread_buffer):
6e5bb2dc 12992 * lread.c (intern, intern_c_string):
74ca2eb3
PE
12993 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
12994 Don't assume string length fits in int.
12995
52c61c22 12996 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
12997 * gtkutil.c (style_changed_cb): Avoid need for strlen.
12998
b5b8c9e5
PE
12999 * font.c: Don't assume string length fits in int.
13000 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
13001 Use ptrdiff_t, not int.
ccd6111c
PE
13002 (font_intern_prop): Don't assume string length fits in int.
13003 Don't assume integer property fits in fixnum.
13004 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 13005
882f0d81 13006 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 13007 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
13008 Reformulate so as not to need the command string.
13009 Invoke gzip -cd rather than gunzip, as it's more portable.
13010 (lock_info_type, lock_file_1, lock_file):
13011 Don't assume pid_t and time_t fit in unsigned long.
13012 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
13013 (current_lock_owner): Prefer signed type for sizes.
13014 Use memcpy, not strncpy, where memcpy is what is really wanted.
13015 Don't assume (via atoi) that time_t and pid_t fit in int.
13016 Check for time_t and/or pid_t out of range, e.g., via a network share.
13017 Don't alloca where an auto var works fine.
13018
93f4cf88
PE
13019 * fileio.c: Fix some integer overflow issues.
13020 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
13021 Don't assume string length fits in int.
13022 (directory_file_name): Don't assume string length fits in long.
13023 (make_temp_name): Don't assume pid fits in int, or that its print
13024 length is less than 20.
13025
f3e92b69
PE
13026 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
13027
1bfdaf10
PE
13028 * coding.c (make_subsidiaries): Don't assume string length fits in int.
13029
35016e9a
PE
13030 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
13031
3d1e65a1
PE
13032 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
13033 We prefer signed integers, even for size calculations.
13034
0b963a93
PE
13035 * emacs.c: Don't assume string length fits in 'int'.
13036 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
13037 (main): Don't invoke strlen when not needed.
13038
573f4b54
PE
13039 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
13040 (XD_DEBUG_MESSAGE): Don't waste a byte.
13041
989f33ba
PE
13042 * callproc.c (getenv_internal_1, getenv_internal)
13043 (Fgetenv_internal):
965d34eb
PE
13044 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
13045
e4d29b33
PE
13046 * lread.c (invalid_syntax): Omit length argument.
13047 All uses changed. This doesn't fix a bug, but it simplifies the
13048 code away from its former Hollerith-constant appearance, and it's
13049 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 13050 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 13051
eb49b136
PE
13052 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
13053 This didn't break anything, but it didn't help either.
13054 It's confusing to put a bogus integer in a place where the actual
13055 value does not matter.
9f62aeb1 13056 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 13057 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 13058
15375a22
PE
13059 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
13060 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
13061 implementation.
b61cc01c
PE
13062 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
13063 We prefer signed types, and the value cannot exceed the EMACS_INT
13064 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
13065 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
13066 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
13067 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 13068
53b2623d
PE
13069 * indent.c (sane_tab_width): New function.
13070 (current_column, scan_for_column, Findent_to, position_indentation)
13071 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 13072 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 13073
51cab52b 13074 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 13075
f2ed8a70
PE
13076 * lisp.h (lint_assume): New macro.
13077 * composite.c (composition_gstring_put_cache):
13078 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
13079
abe80cc6
PE
13080 * editfns.c, insdel.c:
13081 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 13082
b02c740e
PE
13083 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
13084
ebc96716
PE
13085 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
13086
b4e50fa0 13087 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 13088 Use much-faster test for byte-length change.
311d5d7c 13089 Don't assume string byte-length fits in 'int'.
a4cf38e4 13090 Check that character arg fits in 'int'.
85461888 13091 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 13092
c0c1ee9f
PE
13093 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
13094
a498d7f4
PE
13095 * fns.c (concat): Catch string overflow earlier.
13096 Do not rely on integer wraparound.
13097
51cab52b
PE
13098 * dispextern.h (struct it.overlay_strings_charpos)
13099 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
13100 * xdisp.c (forward_to_next_line_start)
13101 (back_to_previous_visible_line_start)
13102 (reseat_at_next_visible_line_start, next_element_from_buffer):
13103 Don't arbitrarily truncate the value of 'selective' to int.
13104
76031fad
PE
13105 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
13106
5eb55db9
PE
13107 * composite.c: Don't truncate sizes to 'int'.
13108 (composition_gstring_p, composition_reseat_it)
13109 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
13110 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
13111 not EMACS_UINT, for indexes.
5eb55db9 13112
0703a717
PE
13113 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
13114
d6202519
PE
13115 * buffer.c: Include <verify.h>.
13116 (struct sortvec.priority, struct sortstr.priority):
8961a454 13117 Now EMACS_INT, not int.
c20998a7 13118 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
13119 (struct sortstr.size, record_overlay_string)
13120 (struct sortstrlist.size, struct sortlist.used):
13121 Don't truncate size to int.
13122 (record_overlay_string): Check for size-calculation overflow.
d6202519 13123 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 13124
d5a19415
JM
131252011-06-22 Jim Meyering <meyering@redhat.com>
13126
029529ac 13127 Don't leak an XBM-image-sized buffer
d5a19415
JM
13128 * image.c (xbm_load): Free the image buffer after using it.
13129
a9041e6c
PE
131302011-06-21 Paul Eggert <eggert@cs.ucla.edu>
13131
13132 Port to Sun C.
13133 * composite.c (find_automatic_composition): Omit needless 'return 0;'
13134 that Sun C diagnosed.
13135 * fns.c (secure_hash): Fix pointer signedness issue.
13136 * intervals.c (static_offset_intervals): New function.
13137 (offset_intervals): Use it.
13138
7f3f739f
LL
131392011-06-21 Leo Liu <sdl.web@gmail.com>
13140
13141 * deps.mk (fns.o):
13142 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
13143 sha512.h.
13144
13145 * fns.c (secure_hash): Rename from crypto_hash_function and change
13146 the first arg to accept symbols.
5b66d427 13147 (Fsecure_hash): New primitive.
7f3f739f
LL
13148 (syms_of_fns): New symbols.
13149
76147d94
DD
131502011-06-20 Deniz Dogan <deniz@dogan.se>
13151
13152 * process.c (Fset_process_buffer): Clarify return value in
13153 docstring.
13154
7d7d0045
CY
131552011-06-18 Chong Yidong <cyd@stupidchicken.com>
13156
13157 * dispnew.c (add_window_display_history): Use BVAR.
13158
13159 * xdisp.c (debug_method_add): Use BVAR.
13160 (check_window_end, dump_glyph_matrix, dump_glyph)
13161 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
13162
13163 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
13164 Likewise.
13165
13166 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
13167 check till after the cache is created in init_frame_faces.
13168
ff2bc410
SM
131692011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
13170
13171 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
13172
28177add
PE
131732011-06-16 Paul Eggert <eggert@cs.ucla.edu>
13174
dd3482fe
PE
13175 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
13176 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
13177 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
13178
393d71f3 13179 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
13180 * fileio.c (Finsert_file_contents):
13181 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
13182 Remove the old (too-loose) buffer overflow checks.
13183 They weren't needed, since make_gap checks for buffer overflow.
13184 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
13185 The old code merely checked for Emacs fixnum overflow, and relied
13186 on undefined (wraparound) behavior. The new code avoids undefined
13187 behavior, and also checks for ptrdiff_t and/or size_t overflow.
13188
2e6813b0 13189 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
13190 Tune. Don't use wider integers than needed. Don't use alloca.
13191 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 13192
599a9e4f
PE
13193 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
13194
99561444
PE
13195 * insdel.c, lisp.h (buffer_overflow): New function.
13196 (insert_from_buffer_1, replace_range, replace_range_2):
13197 * insdel.c (make_gap_larger):
13198 * editfns.c (Finsert_char):
13199 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
13200
28177add
PE
13201 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
13202
e69dafad
PE
132032011-06-15 Paul Eggert <eggert@cs.ucla.edu>
13204
4baa020d 13205 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 13206
b1c46f02
PE
13207 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
13208 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
13209
e69dafad
PE
13210 * fileio.c: Don't assume EMACS_INT fits in off_t.
13211 (emacs_lseek): New static function.
13212 (Finsert_file_contents, Fwrite_region): Use it.
13213 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
13214
566684ea
PE
13215 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
13216
e6966cd6
PE
13217 * fns.c: Don't overflow int when computing a list length.
13218 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
13219 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
13220 truncation on 64-bit hosts. Check for QUIT every
13221 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
13222 faster and is responsive enough.
13223 (Flength): Report an error instead of overflowing an integer.
13224 (Fsafe_length): Return a float if the value is not representable
13225 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 13226 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 13227 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 13228
dd0b0efb
PE
13229 * alloc.c: Check that resized vectors' lengths fit in fixnums.
13230 (header_size, word_size): New constants.
13231 (allocate_vectorlike): Don't check size overflow here.
13232 (allocate_vector): Check it here instead, since this is the only
13233 caller of allocate_vectorlike that could cause overflow.
13234 Check that the new vector's length is representable as a fixnum.
13235
86fe5cfe
PE
13236 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
13237 The previous code was bogus. For example, next_almost_prime (32)
13238 returned 39, which is undesirable as it is a multiple of 3; and
13239 next_almost_prime (24) returned 25, which is a multiple of 5 so
13240 why was the code bothering to check for multiples of 7?
13241
80e88859
PE
13242 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
13243
4a2f0ad6
PE
13244 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
13245
f66c7cf8
PE
13246 Variadic C functions now count arguments with ptrdiff_t.
13247 This partly undoes my 2011-03-30 change, which replaced int with size_t.
13248 Back then I didn't know that the Emacs coding style prefers signed int.
13249 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
13250 were being counted with int, which may truncate counts on 64-bit
13251 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
13252 * lisp.h (struct Lisp_Subr.function.aMANY)
13253 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
13254 Arg counts are now ptrdiff_t, not size_t.
13255 All variadic functions and their callers changed accordingly.
13256 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
13257 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
13258 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
13259 * callint.c (Fcall_interactively): Check arg count for overflow,
13260 to avoid potential buffer overrun. Use signed char, not 'int',
13261 for 'varies' array, so that we needn't bother to check its size
13262 calculation for overflow.
13263 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
13264 * eval.c (apply_lambda):
13265 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
13266 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
13267 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
13268
a1759b76
PE
13269 * callint.c (Fcall_interactively): Don't use index var as event count.
13270
d96be9fc
PE
13271 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
13272 * mem-limits.h (SIZE): Remove; no longer used.
13273
a690a978 13274 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 13275
578c21e6
PE
13276 Remove unnecessary casts.
13277 * xterm.c (x_term_init):
13278 * xfns.c (x_set_border_pixel):
13279 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
13280 These aren't needed now that we assume ANSI C.
13281
96f53c6c
PE
13282 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
13283 It's more likely to cause problems (due to unsigned overflow)
13284 than to cure them.
13285
83c77d31
PE
13286 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
13287
ee2079f1
PE
13288 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
13289
6da65536
PE
13290 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
13291
7147c4a4
PE
13292 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
13293
193e32d9
PE
13294 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
13295
e5533da6
PE
13296 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
13297
9910e595
PE
13298 GLYPH_CODE_FACE returns EMACS_INT, not int.
13299 * dispextern.h (merge_faces):
13300 * xfaces.c (merge_faces):
01103c44
PE
13301 * xdisp.c (get_next_display_element, next_element_from_display_vector):
13302 Don't assume EMACS_INT fits in int.
9910e595 13303
2638320e
PE
13304 * character.h (CHAR_VALID_P): Remove unused parameter.
13305 * fontset.c, lisp.h, xdisp.c: All uses changed.
13306
045eb8d9
PE
13307 * editfns.c (Ftranslate_region_internal): Omit redundant test.
13308
c1f134b5
PE
13309 * fns.c (concat): Minor tuning based on overflow analysis.
13310 This doesn't fix any bugs. Use int to hold character, instead
13311 of constantly refetching from Emacs object. Use XFASTINT, not
13312 XINT, for value known to be a character. Don't bother comparing
13313 a single byte to 0400, as it's always less.
13314
395fcb93 13315 * floatfns.c (Fexpt):
327eeec8
PE
13316 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
13317
abbd3d23
PE
13318 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
13319 for characters.
13320
684a03ef
PE
13321 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
13322
0fed43f3
PE
13323 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
13324 Without this fix, on a 64-bit host (aset S 0 4294967386) would
13325 incorrectly succeed when S was a string, because 4294967386 was
13326 truncated before it was used.
13327
8fd02eb7
PE
13328 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
13329 Otherwise, an out-of-range integer could cause undefined behavior
13330 on a 64-bit host.
13331
f8c86b69
PE
13332 * composite.c: Use int, not EMACS_INT, for characters.
13333 (fill_gstring_body, composition_compute_stop_pos): Use int, not
13334 EMACS_INT, for values that are known to be in character range.
13335 This doesn't fix any bugs but is the usual style inside Emacs and
13336 may generate better code on 32-bit machines.
13337
34206dd2
PE
13338 Make sure a 64-bit char is never passed to ENCODE_CHAR.
13339 This is for reasons similar to the recent CHAR_STRING fix.
13340 * charset.c (Fencode_char): Check that character arg is actually
13341 a character. Pass an int to ENCODE_CHAR.
13342 * charset.h (ENCODE_CHAR): Verify that the character argument is no
13343 wider than 'int', as a compile-time check to prevent future regressions
13344 in this area.
13345
c5958d4c 13346 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
13347
13348 Make sure a 64-bit char is never passed to CHAR_STRING.
13349 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
13350 by silently ignoring the top 32 bits, allowing some values
13351 that were far too large to be valid characters.
13352 * character.h: Include <verify.h>.
13353 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
13354 arguments are no wider than unsigned, as a compile-time check
13355 to prevent future regressions in this area.
13356 * data.c (Faset):
01103c44 13357 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
13358 (Fsubst_char_in_region):
13359 * fns.c (concat):
13360 * xdisp.c (decode_mode_spec_coding):
13361 Adjust to CHAR_STRING's new requirement.
13362 * editfns.c (Finsert_char, Fsubst_char_in_region):
13363 * fns.c (concat): Check that character args are actually
13364 characters. Without this test, these functions did the wrong
13365 thing with wildly out-of-range values on 64-bit hosts.
13366
d37ca623
PE
13367 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
13368 These casts should not be needed on 32-bit hosts, either.
13369 * keyboard.c (read_char):
13370 * lread.c (Fload): Remove casts to unsigned.
13371
ea204efb
PE
13372 * lisp.h (UNSIGNED_CMP): New macro.
13373 This fixes comparison bugs on 64-bit hosts.
13374 (ASCII_CHAR_P): Use it.
13375 * casefiddle.c (casify_object):
01103c44 13376 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
13377 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
13378 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
13379 * dispextern.h (FACE_FROM_ID):
13380 * keyboard.c (read_char): Use UNSIGNED_CMP.
13381
41cb286c
PE
13382 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
13383 not to EMACS_INT, to avoid GCC warning.
13384
4a1b9832
PE
13385 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
13386
55daad71
PE
13387 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
13388 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
13389 isn't needed on 32-bit machines.
8f95c75c 13390
01103c44
PE
13391 * buffer.c (Fgenerate_new_buffer_name):
13392 Use EMACS_INT for count, not int.
0ceccced 13393 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
13394
13395 * data.c (Qcompiled_function): Now static.
13396
c6f072e7
PE
13397 * window.c (window_body_lines): Now static.
13398
20ce5912
PE
13399 * image.c (gif_load): Rename local to avoid shadowing.
13400
9c4c5f81
PE
13401 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
13402 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
13403 * alloc.c (make_save_value): Integer argument is now of type
13404 ptrdiff_t, not int.
13405 (mark_object): Use ptrdiff_t, not int.
13406 * lisp.h (pD): New macro.
13407 * print.c (print_object): Use it.
13408
c0c5c8ae
PE
13409 * alloc.c: Use EMACS_INT, not int, to count objects.
13410 (total_conses, total_markers, total_symbols, total_vector_size)
13411 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
13412 (total_free_floats, total_floats, total_free_intervals)
13413 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
13414 Now EMACS_INT, not int. All uses changed.
13415 (Fgarbage_collect): Compute overall total using a double, so that
13416 integer overflow is less likely to be a problem. Check for overflow
13417 when converting back to an integer.
5a25e253
PE
13418 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
13419 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
13420 These were 'int' variables that could overflow on 64-bit hosts;
13421 they were never used, so remove them instead of repairing them.
211a0b2a 13422 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
13423 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
13424 Previously, this ceilinged at INT_MAX, but that doesn't work on
13425 64-bit machines.
e46bb31a 13426 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 13427
c78baabf 13428 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 13429 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
13430 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
13431 when a (possibly-narrower) signed value would do just as well.
13432 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 13433
c9d624c6
PE
13434 * alloc.c: Catch some string size overflows that we were missing.
13435 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
13436 for convenience in STRING_BYTES_MAX.
13437 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
13438 The definition here is exact; the one in lisp.h was approximate.
13439 (allocate_string_data): Check for string overflow. This catches
13440 some instances we weren't catching before. Also, it catches
13441 size_t overflow on (unusual) hosts where SIZE_MAX <= min
13442 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
13443 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 13444
c9d624c6
PE
13445 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
13446 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 13447 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 13448
353032ce
PE
13449 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
13450
2bccce07
PE
13451 * alloc.c (Fmake_string): Check for out-of-range init.
13452
0ac30604
SM
134532011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
13454
13455 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
13456
c195f2de
JD
134572011-06-14 Jan Djärv <jan.h.d@swipnet.se>
13458
13459 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
13460 xg_get_default_scrollbar_width.
13461
13462 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
13463 (int_gtk_range_get_value): Move to the scroll bar part of the file.
13464 (style_changed_cb): Call update_theme_scrollbar_width and call
13465 x_set_scroll_bar_default_width and xg_frame_set_char_size for
13466 all frames (Bug#8505).
13467 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
13468 Call gtk_window_set_resizable if HAVE_GTK3.
13469 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
13470 and height if HAVE_GTK3 (Bug#8505).
13471 (scroll_bar_width_for_theme): New variable.
13472 (update_theme_scrollbar_width): New function.
13473 (xg_get_default_scrollbar_width): Move code to
13474 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
13475 (xg_initialize): Call update_theme_scrollbar_width.
13476
13477 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
13478
13479 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
13480
e10ac9f1
MR
134812011-06-12 Martin Rudalics <rudalics@gmx.at>
13482
13483 * frame.c (make_frame): Call other_buffer_safely instead of
13484 other_buffer.
13485
13486 * window.c (temp_output_buffer_show): Call display_buffer with
13487 second argument Vtemp_buffer_show_specifiers and reset latter
13488 immediately after the call.
13489 (Vtemp_buffer_show_specifiers): New variable.
13490 (auto_window_vscroll_p, next_screen_context_lines)
13491 (Vscroll_preserve_screen_position): Remove leading asterisks from
13492 doc-strings.
13493
2d3c217e 134942011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 13495
7b7f97e8 13496 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
13497 * buffer.c (Qclone_number): Remove for now, as it's unused.
13498 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
13499 (record_buffer): Remove unused local.
13500 * frame.c (other_visible_frames, frame_buffer_list): Now static.
13501 (set_frame_buffer_list): Remove; unused.
13502 * frame.h (other_visible_frames): Remove decl.
13503 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
13504 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
13505 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
13506 if HAVE_GPM.
13507 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
13508 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
13509 Define only if HAVE_GPM.
13510 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
13511 (update_hints_inhibit): Remove; never set. All uses removed.
13512 * widgetprv.h (emacsFrameClassRec): Remove decl.
13513 * window.c (delete_deletable_window): Now returns void, since it
13514 wasn't returning anything.
13515 (compare_window_configurations): Remove unused locals.
13516 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
13517 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
13518 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
13519 the same widths as pointers. This follows up on the 2011-05-06 patch.
13520 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
13521 * xterm.h: Likewise.
13522 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
13523
1384b89e
JB
135242011-06-12 Juanma Barranquero <lekktu@gmail.com>
13525
13526 * makefile.w32-in: Update dependencies.
13527 (LISP_H): Add lib/intprops.h.
13528
1100a63c
CY
135292011-06-11 Chong Yidong <cyd@stupidchicken.com>
13530
13531 * image.c (gif_load): Add animation frame delay to the metadata.
13532 (syms_of_image): Use DEFSYM. New symbol `delay'.
13533
6198ccd0
MR
135342011-06-11 Martin Rudalics <rudalics@gmx.at>
13535
13536 * window.c (delete_deletable_window): Re-add.
13537 (Fset_window_configuration): Rewrite to handle dead buffers and
13538 consequently deletable windows.
13539 (window_tree, Fwindow_tree): Remove. Supply functionality in
13540 window.el.
13541 (compare_window_configurations): Simplify code.
13542
b6e3633c
AS
135432011-06-11 Andreas Schwab <schwab@linux-m68k.org>
13544
1ab0dee5
AS
13545 * image.c (imagemagick_load_image): Fix type mismatch.
13546 (Fimagemagick_types): Likewise.
13547
b6e3633c
AS
13548 * window.h (replace_buffer_in_windows): Declare.
13549
9397e56f
MR
135502011-06-11 Martin Rudalics <rudalics@gmx.at>
13551
13552 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
13553 Qclone_number. Remove external declaration of Qdelete_window.
13554 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
13555 code.
640c8776
SM
13556 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
13557 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
13558 (Fother_buffer): Rewrite doc-string. Major rewrite for new
13559 buffer list implementation.
13560 (other_buffer_safely): New function.
13561 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
13562 calls to replace_buffer_in_windows and
13563 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
13564 if allowed.
13565 (record_buffer): Inhibit quitting and rewrite using quittable
13566 functions. Run Qbuffer_list_update_hook if allowed.
13567 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
13568 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
13569 Move switch-to-buffer to window.el.
9397e56f
MR
13570 (bury-buffer): Move to window.el.
13571 (Vbuffer_list_update_hook): New variable.
13572
13573 * lisp.h (other_buffer_safely): Add prototype in buffer.c
13574 section.
13575
13576 * window.h (resize_frame_windows): Move up in code.
13577 (Fwindow_frame): Remove EXFUN.
13578 (replace_buffer_in_all_windows): Remove prototype.
13579 (replace_buffer_in_windows_safely): Add prototype.
13580
13581 * window.c: Declare Qdelete_window static again. Move down
13582 declaration of select_count.
13583 (Fnext_window, Fprevious_window): Rewrite doc-strings.
13584 (Fother_window): Move to window.el.
13585 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
13586 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
13587 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
13588 window.el.
13589 (replace_buffer_in_windows): Implement by calling
13590 Qreplace_buffer_in_windows.
13591 (replace_buffer_in_all_windows): Remove with some functionality
13592 moved into replace_buffer_in_windows_safely.
13593 (replace_buffer_in_windows_safely): New function.
13594 (select_window_norecord, select_frame_norecord): Move in front
13595 of run_window_configuration_change_hook. Remove now obsolete
13596 declarations.
640c8776
SM
13597 (Fset_window_buffer): Rewrite doc-string.
13598 Call Qrecord_window_buffer.
9397e56f
MR
13599 (keys_of_window): Move binding for other-window to window.el.
13600
b50691aa
CY
136012011-06-11 Chong Yidong <cyd@stupidchicken.com>
13602
13603 * dispextern.h (struct image): Replace data member, whose int_val
13604 and ptr_val fields were not used by anything, with a single
13605 lisp_val object.
13606
13607 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
13608 (gif_clear_image, gif_load, imagemagick_load_image)
13609 (gs_clear_image, gs_load): Callers changed.
13610
3f754b86
PE
136112011-06-10 Paul Eggert <eggert@cs.ucla.edu>
13612
cca69397
PE
13613 * buffer.h: Include <time.h>, for time_t.
13614 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
13615
109e28d0
PE
13616 Fix minor problems found by static checking.
13617
60737f02
PE
13618 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
13619
4b66faf3
PE
13620 Make identifiers static if they are not used in other modules.
13621 * data.c (Qcompiled_function, Qframe, Qvector):
13622 * image.c (QimageMagick, Qsvg):
13623 * minibuf.c (Qmetadata):
13624 * window.c (resize_window_check, resize_root_window): Now static.
13625 * window.h (resize_window_check, resize_root_window): Remove decls.
13626
109e28d0
PE
13627 * window.c (window_deletion_count, delete_deletable_window):
13628 Remove; unused.
46a4ce9e
PE
13629 (window_body_lines): Now static.
13630 (Fdelete_other_windows_internal): Mark vars as initialized.
13631 Make sure 'resize_failed' is initialized.
13632 (run_window_configuration_change_hook): Rename local to avoid shadowing.
13633 (resize_window_apply): Remove unused local.
13634 * window.h (delete_deletable_window): Remove decl.
13635
109e28d0 13636 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
13637 (imagemagick_load_image): Fix pointer signedness problem by changing
13638 last arg from unsigned char * to char *. All uses changed.
13639 Also, fix a local for similar reasons.
13640 Remove unused locals. Remove locals to avoid shadowing.
13641 (fn_rsvg_handle_free): Remove; unused.
13642 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 13643 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 13644
3f754b86
PE
13645 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
13646
2547adb1
CY
136472011-06-10 Chong Yidong <cyd@stupidchicken.com>
13648
13649 * image.c (gif_load): Fix omitted cast error introduced by
13650 2011-06-06 change.
13651
2c8e37d4
MR
136522011-06-10 Martin Rudalics <rudalics@gmx.at>
13653
13654 * window.h (resize_proportionally, orig_total_lines)
13655 (orig_top_line): Remove from window structure.
13656 (set_window_height, set_window_width, change_window_heights)
13657 (Fdelete_window): Remove prototypes.
13658 (resize_frame_windows): Remove duplicate declaration.
13659
440a42e3
EZ
136602011-06-10 Eli Zaretskii <eliz@gnu.org>
13661
13662 * window.h (resize_frame_windows, resize_window_check)
13663 (delete_deletable_window, resize_root_window)
13664 (resize_frame_windows): Declare prototypes.
13665
13666 * window.c (resize_window_apply): Make definition be "static" to
13667 match the prototype.
13668
562dd5e9
MR
136692011-06-10 Martin Rudalics <rudalics@gmx.at>
13670
13671 * window.c: Remove declarations of Qwindow_size_fixed,
13672 window_min_size_1, window_min_size_2, window_min_size,
13673 size_window, window_fixed_size_p, enlarge_window, delete_window.
13674 Remove static from declaration of Qdelete_window, it's
13675 temporarily needed by Fbury_buffer.
13676 (replace_window): Don't assign orig_top_line and
13677 orig_total_lines.
13678 (Fdelete_window, delete_window): Remove. Window deletion is
13679 handled by window.el.
640c8776
SM
13680 (window_loop): Remove DELETE_OTHER_WINDOWS case.
13681 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
13682 (Fdelete_other_windows): Remove. Deleting other windows is
13683 handled by window.el.
13684 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
13685 handled in window.el.
13686 (window_min_size_2, window_min_size_1, window_min_size): Remove.
13687 Window minimum sizes are handled in window.el.
13688 (shrink_windows, size_window, set_window_height)
13689 (set_window_width, change_window_heights, window_height)
13690 (window_width, CURBEG, CURSIZE, enlarge_window)
13691 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
13692 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
13693 handled in window.el.
13694 (make_dummy_parent): Rename to make_parent_window and give it a
13695 second argument horflag.
13696 (make_window): Don't set resize_proportionally any more.
13697 (Fsplit_window): Remove. Windows are split in window.el.
13698 (save_restore_action, save_restore_orig_size)
13699 (shrink_window_lowest_first, save_restore_orig_size): Remove.
13700 Resize mini windows in window.el.
13701 (grow_mini_window, shrink_mini_window): Implement by calling
13702 Qresize_root_window_vertically, resize_window_check and
13703 resize_window_apply.
640c8776
SM
13704 (saved_window, Fset_window_configuration, save_window_save):
13705 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
13706 resize_proportionally.
13707 (window_min_height, window_min_width): Move to window.el.
13708 (keys_of_window): Move bindings for delete-other-windows,
13709 split-window, delete-window and enlarge-window to window.el.
13710
13711 * buffer.c: Temporarily extern Qdelete_window.
13712 (Fbury_buffer): Temporarily call Qdelete_window instead of
13713 Fdelete_window (Fbury_buffer will move to window.el soon).
13714
13715 * frame.c (set_menu_bar_lines_1): Remove code handling
13716 orig_top_line and orig_total_lines.
13717
13718 * dispnew.c (adjust_frame_glyphs_initially): Don't use
13719 set_window_height but set heights directly.
13720 (change_frame_size_1): Use resize_frame_windows.
13721
13722 * xdisp.c (init_xdisp): Don't use set_window_height but set
13723 heights directly.
13724
640c8776
SM
13725 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
13726 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
13727 run_window_configuration_change_hook.
13728
13729 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
13730 instead of change_window_heights and run
13731 run_window_configuration_change_hook.
13732
1a13852e
MR
137332011-06-09 Martin Rudalics <rudalics@gmx.at>
13734
13735 * window.c (replace_window): Rename second argument REPLACEMENT to
13736 NEW. New third argument SETFLAG. Rewrite.
13737 (delete_window, make_dummy_parent): Call replace_window with
13738 third argument 1.
13739 (window_list_1): Move down in code.
13740 (run_window_configuration_change_hook): Move set_buffer part
13741 before select_frame_norecord part in order to unwind correctly.
13742 Rename count1 to count.
13743 (recombine_windows, delete_deletable_window, resize_root_window)
13744 (Fdelete_other_windows_internal)
13745 (Frun_window_configuration_change_hook, make_parent_window)
13746 (resize_window_check, resize_window_apply, Fresize_window_apply)
13747 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
13748 (Fdelete_window_internal, Fresize_mini_window_internal):
13749 New functions.
1a13852e
MR
13750 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
13751
f3d1777e
MR
137522011-06-08 Martin Rudalics <rudalics@gmx.at>
13753
496e208e
MR
13754 * window.h (window): Add some new members to window structure -
13755 normal_lines, normal_cols, new_total, new_normal, clone_number,
13756 splits, nest, prev_buffers, next_buffers.
13757 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 13758 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 13759
f3d1777e
MR
13760 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
13761 Remove.
496e208e
MR
13762 (make_dummy_parent): Set new members of windows structure.
13763 (make_window): Move down in code. Handle new members of window
13764 structure.
13765 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
13766 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
13767 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
13768 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
13769 (Fset_window_next_buffers, Fset_window_clone_number):
13770 New functions.
496e208e
MR
13771 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
13772 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
13773 Doc-string fixes.
13774 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
13775 Argument WINDOW can be now internal window too.
13776 (Fwindow_use_time): Move up in code.
13777 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
13778 Rewrite doc-string.
13779 (Fset_window_configuration, saved_window)
13780 (Fcurrent_window_configuration, save_window_save): Handle new
13781 members of window structure.
b9e809c2
MR
13782 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
13783 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
13784 (syms_of_window): New Lisp objects Qrecord_window_buffer,
13785 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
13786 Qget_mru_window, Qresize_root_window,
13787 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
13788 Qauto_buffer_name; staticpro them.
f3d1777e 13789
abde8f8c
MR
137902011-06-07 Martin Rudalics <rudalics@gmx.at>
13791
13792 * window.c (Fwindow_total_size, Fwindow_left_column)
13793 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
13794 (Fwindow_list_1): New functions.
13795 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
13796 (Fwindow_width, Fscroll_left, Fscroll_right):
13797 Use window_body_cols instead of window_box_text_cols.
13798 (delete_window, Fset_window_configuration):
13799 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
13800 (delete_all_subwindows): Take a window as argument and not a
13801 structure. Rewrite.
190b47e6
MR
13802 (window_loop): Remove handling of GET_LRU_WINDOW and
13803 GET_LARGEST_WINDOW.
13804 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
13805
13806 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
13807 window_box_text_cols. delete_all_subwindows now takes a
13808 Lisp_Object as argument.
abde8f8c 13809
640c8776
SM
13810 * indent.c (compute_motion, Fcompute_motion):
13811 Use window_body_cols instead of window_box_text_cols.
abde8f8c 13812
fa8a67e6
MR
13813 * frame.c (delete_frame): Call delete_all_subwindows with root
13814 window as argument.
13815
a54e3482
DC
138162011-06-07 Daniel Colascione <dan.colascione@gmail.com>
13817
13818 * fns.c (Fputhash): Document return value.
13819
60002bf5
CY
138202011-06-06 Chong Yidong <cyd@stupidchicken.com>
13821
13822 * image.c (gif_load): Implement gif89a spec "no disposal" method.
13823
0c671da6 138242011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 13825
b862a52a 13826 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 13827
be44ca6c
PE
13828 Check for overflow when converting integer to cons and back.
13829 * charset.c (Fdefine_charset_internal, Fdecode_char):
13830 Use cons_to_unsigned to catch overflow.
13831 (Fencode_char): Use INTEGER_TO_CONS.
13832 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
13833 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
13834 * data.c (long_to_cons, cons_to_long): Remove.
13835 (cons_to_unsigned, cons_to_signed): New functions.
13836 These signal an error for invalid or out-of-range values.
13837 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
13838 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
13839 * font.c (Ffont_variation_glyphs):
13840 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
13841 * lisp.h: Include <intprops.h>.
13842 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
13843 (cons_to_signed, cons_to_unsigned): New decls.
13844 (long_to_cons, cons_to_long): Remove decls.
13845 * undo.c (record_first_change): Use INTEGER_TO_CONS.
13846 (Fprimitive_undo): Use CONS_TO_INTEGER.
13847 * xfns.c (Fx_window_property): Likewise.
13848 * xselect.c: Include <limits.h>.
13849 (x_own_selection, selection_data_to_lisp_data):
13850 Use INTEGER_TO_CONS.
13851 (x_handle_selection_request, x_handle_selection_clear)
13852 (x_get_foreign_selection, Fx_disown_selection_internal)
13853 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
13854 (lisp_data_to_selection_data): Use cons_to_unsigned.
13855 (x_fill_property_data): Use cons_to_signed.
13856 Report values out of range.
13857
d1f3d2af
PE
13858 Check for buffer and string overflow more precisely.
13859 * buffer.h (BUF_BYTES_MAX): New macro.
13860 * lisp.h (STRING_BYTES_MAX): New macro.
13861 * alloc.c (Fmake_string):
13862 * character.c (string_escape_byte8):
13863 * coding.c (coding_alloc_by_realloc):
13864 * doprnt.c (doprnt):
13865 * editfns.c (Fformat):
13866 * eval.c (verror):
13867 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
13868 since they may not be the same number.
13869 * editfns.c (Finsert_char):
13870 * fileio.c (Finsert_file_contents):
13871 Likewise for BUF_BYTES_MAX.
13872
dd52fcea
PE
13873 * image.c: Use ptrdiff_t, not int, for sizes.
13874 (slurp_file): Switch from int to ptrdiff_t.
13875 All uses changed.
13876 (slurp_file): Check that file size fits in both size_t (for
13877 malloc) and ptrdiff_t (for sanity and safety).
13878
7f9bbdbb
PE
13879 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
13880 if b->modtime has its maximal value.
13881
dfe18f82
PE
13882 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
13883
84acfcf0
PE
13884 Don't assume time_t can fit into int.
13885 * buffer.h (struct buffer.modtime): Now time_t, not int.
13886 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
13887 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
13888
ccd9a01a
PE
13889 Minor fixes for signed vs unsigned integers.
13890 * character.h (MAYBE_UNIFY_CHAR):
13891 * charset.c (maybe_unify_char):
13892 * keyboard.c (read_char, reorder_modifiers):
13893 XINT -> XFASTINT, since the integer must be nonnegative.
13894 * ftfont.c (ftfont_spec_pattern):
13895 * keymap.c (access_keymap, silly_event_symbol_error):
13896 XUINT -> XFASTINT, since the integer must be nonnegative.
13897 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
13898 since it makes no difference and we prefer signed.
13899 * keyboard.c (record_char): Use XUINT when all the neighbors do.
13900 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
13901 nonnegative.
13902
d6d100dd
SM
139032011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
13904
13905 * window.h (Fwindow_frame): Declare.
13906
2b6148e4
PE
139072011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13908
13909 * alloc.c: Simplify handling of large-request failures (Bug#8800).
13910 (SPARE_MEMORY): Always define.
13911 (LARGE_REQUEST): Remove.
13912 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
13913
f230ecc9
MR
139142011-06-06 Martin Rudalics <rudalics@gmx.at>
13915
727e958e
MR
13916 * lisp.h: Move EXFUNS for Fframe_root_window,
13917 Fframe_first_window and Fset_frame_selected_window to window.h.
13918
13919 * window.h: Move EXFUNS for Fframe_root_window,
13920 Fframe_first_window and Fset_frame_selected_window here from
13921 lisp.h.
13922
13923 * frame.c (Fwindow_frame, Fframe_first_window)
13924 (Fframe_root_window, Fframe_selected_window)
13925 (Fset_frame_selected_window): Move to window.c.
13926 (Factive_minibuffer_window): Move to minibuf.c.
13927 (Fother_visible_frames_p): New function.
13928
13929 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
13930
f230ecc9
MR
13931 * window.c (decode_window, decode_any_window): Move up in code.
13932 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
13933 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
13934 (Fwindow_buffer): Move up and rewrite doc-string.
13935 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
13936 (Fwindow_prev): New functions.
727e958e
MR
13937 (Fwindow_frame): Move here from frame.c. Accept any window as
13938 argument.
13939 (Fframe_root_window, Fframe_first_window)
13940 (Fframe_selected_window): Move here from frame.c. Accept frame
13941 or arbitrary window as argument. Update doc-strings.
13942 (Fminibuffer_window): Move up in code.
13943 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
13944 (Fset_frame_selected_window): Move here from frame.c.
13945 Marginal rewrite.
727e958e
MR
13946 (Fselected_window, select_window, Fselect_window): Move up in
13947 code. Minor doc-string fixes.
f230ecc9 13948
4d09bcf6
PE
139492011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13950
13951 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
13952 Do not assume that spare memory exists; that assumption is valid
13953 only if SYSTEM_MALLOC.
13954 (LARGE_REQUEST): New macro, so that the issue of large requests
13955 is separated from the issue of spare memory.
13956
810928a2
AS
139572011-06-05 Andreas Schwab <schwab@linux-m68k.org>
13958
172418ad
AS
13959 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
13960 format. (Bug#8806)
13961
43f862f7
AS
13962 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
13963
810928a2
AS
13964 * xfns.c (x_set_scroll_bar_default_width): Move declarations
13965 before statements.
13966
a059fe24
JD
139672011-06-05 Jan Djärv <jan.h.d@swipnet.se>
13968
13969 * gtkutil.c (xg_get_default_scrollbar_width): New function.
13970
13971 * gtkutil.h: Declare xg_get_default_scrollbar_width.
13972
13973 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
13974 min width by calling x_set_scroll_bar_default_width (Bug#8505).
13975
989bf368
JB
139762011-06-05 Juanma Barranquero <lekktu@gmail.com>
13977
13978 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
13979
4b80f674
CY
139802011-06-04 Chong Yidong <cyd@stupidchicken.com>
13981
13982 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
13983 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
13984 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
13985 New error handlers.
4b80f674
CY
13986 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
13987 Obey Vx_select_enable_clipboard_manager. Catch errors in
13988 x_clipboard_manager_save (Bug#8779).
13989 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 13990 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 13991
99a33b77 139922011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
13993
13994 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
13995
99a33b77 139962011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
13997
13998 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
13999 in the current matrix if keep_current_p is non-zero.
14000
8264569d
EZ
140012011-06-04 Eli Zaretskii <eliz@gnu.org>
14002
14003 * bidi.c (bidi_level_of_next_char): Fix last change.
14004
57f97249
EZ
140052011-06-03 Eli Zaretskii <eliz@gnu.org>
14006
fec2107c 14007 Support bidi reordering of text covered by display properties.
57f97249 14008
fec2107c
EZ
14009 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
14010 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
14011 (bidi_cache_search, bidi_cache_iterator_state)
14012 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
14013 (bidi_level_of_next_char, bidi_move_to_visually_next):
14014 Support character positions inside a run of characters covered by a
fec2107c
EZ
14015 display string.
14016 (bidi_paragraph_init, bidi_resolve_explicit_1)
14017 (bidi_level_of_next_char): Call bidi_fetch_char and
14018 bidi_fetch_char_advance instead of FETCH_CHAR and
14019 FETCH_CHAR_ADVANCE.
14020 (bidi_init_it): Initialize new members.
14021 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
14022 definitions.
14023 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
14024 instead of using explicit *_CHAR codes.
d6d100dd
SM
14025 (bidi_resolve_explicit, bidi_resolve_weak):
14026 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
14027 bidirectional text is supported only in multibyte buffers.
14028 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
14029 it to initialize the frame_window_p member of struct bidi_it.
14030 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
14031 (bidi_resolve_explicit, bidi_resolve_weak)
14032 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
14033 bidi_it->nchars is non-positive.
14034 (bidi_level_of_next_char): Don't try to lookup the cache for the
14035 next/previous character if nothing is cached there yet, or if we
14036 were just reseat()'ed to a new position.
c40e2fb2 14037
0e14fe90
EZ
14038 * xdisp.c (set_cursor_from_row): Set start and stop points
14039 according to the row's direction when priming the loop that looks
14040 for the glyph on which to display cursor.
14041 (single_display_spec_intangible_p): Function deleted.
14042 (display_prop_intangible_p): Reimplement to call
14043 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
14044 Accept 3 additional arguments needed by handle_display_spec.
14045 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
14046 values: lists, `(when COND...)' forms, etc.
14047 (single_display_spec_string_p): Support property values that are
14048 lists with the argument STRING its top-level element.
14049 (display_prop_string_p): Fix the condition for processing a
14050 property that is a list to be consistent with handle_display_spec.
fec2107c 14051 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
14052 last portion of handle_display_prop.
14053 (compute_display_string_pos): Accept additional argument
14054 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
14055 value of a `display' property is a "replacing spec".
14056 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
14057 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
14058 the display property, but just return a value indicating whether
14059 the display property will replace the characters it covers.
14060 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
14061 frame_window_p members of struct bidi_it.
d6d100dd
SM
14062 (compute_display_string_pos, compute_display_string_end):
14063 New functions.
fec2107c
EZ
14064 (push_it): Accept second argument POSITION, where pop_it should
14065 jump to continue iteration.
14066 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 14067
fec2107c
EZ
14068 * keyboard.c (adjust_point_for_property): Adjust the call to
14069 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
14070
14071 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
14072 (bidi_init_it): Update prototypes.
14073 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
14074 (compute_display_string_pos, compute_display_string_end):
14075 Declare prototypes.
fec2107c
EZ
14076 (struct bidi_it): New members nchars and disp_pos. ch_len is now
14077 EMACS_INT.
fc6f18ce 14078
40087514 140792011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 14080
57f53182
PE
14081 Malloc failure behavior now depends on size of allocation.
14082 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
14083 * lisp.h: Change signatures accordingly.
14084 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
14085 All callers changed. (Bug#8762)
14086
14087 * gnutls.c: Use Emacs's memory allocators.
14088 Without this change, the gnutls library would invoke malloc etc.
14089 directly, which causes problems on non-SYNC_INPUT hosts, and which
14090 runs afoul of improving memory_full behavior. (Bug#8761)
14091 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
14092 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
14093 xfree instead of the default malloc, realloc, free.
14094 (Fgnutls_boot): No need to check for memory allocation failure,
14095 since xmalloc does that for us.
14096
ac32cd99 14097 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
14098 * category.c (hash_get_category_set):
14099 * ccl.c (ccl_driver):
14100 * charset.c (Fdefine_charset_internal):
14101 * charset.h (struct charset.hash_index):
14102 * composite.c (get_composition_id, gstring_lookup_cache)
14103 (composition_gstring_put_cache):
14104 * composite.h (struct composition.hash_index):
14105 * dispextern.h (struct image.hash):
14106 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
14107 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
14108 (hashfn_equal, hashfn_user_defined, make_hash_table)
14109 (maybe_resize_hash_table, hash_lookup, hash_put)
14110 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
14111 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
14112 (Fsxhash, Fgethash, Fputhash, Fmaphash):
14113 * image.c (make_image, search_image_cache, lookup_image)
14114 (xpm_put_color_table_h):
14115 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 14116 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 14117 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 14118 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
14119 * alloc.c (allocate_vectorlike):
14120 Check for overflow in vector size calculations.
14121 * ccl.c (ccl_driver):
14122 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
14123 * fns.c, image.c: Remove unnecessary static decls that would otherwise
14124 need to be updated by these changes.
40087514
PE
14125 * fns.c (make_hash_table, maybe_resize_hash_table):
14126 Check for integer overflow with large hash tables.
0de4bb68
PE
14127 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
14128 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
14129 (SXHASH_REDUCE): New macro.
14130 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
14131 Use it instead of discarding useful hash info with large hash values.
14132 (sxhash_float): New function.
14133 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
14134 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
14135 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
14136 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
14137 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
14138 Adjust signatures to match updated version of code.
14139 (consing_since_gc): Now EMACS_INT, since a single hash table can
14140 use more than INT_MAX bytes.
14141
698d32e2
DN
141422011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
14143
14144 Make it possible to build with GCC-4.6+ -O2 -flto.
14145
14146 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
14147
fd6fa53f
SM
141482011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
14149
14150 * minibuf.c (get_minibuffer, read_minibuf_unwind):
14151 Call minibuffer-inactive-mode.
14152
864db017
JB
141532011-05-31 Juanma Barranquero <lekktu@gmail.com>
14154
14155 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
14156 Update dependencies.
14157
2ad0baf4
DN
141582011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14159
14160 * data.c (init_data): Remove code for UTS, this system is not
14161 supported anymore.
14162
4fcc2638
DN
141632011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14164
14165 Don't force ./temacs to start in terminal mode.
14166
14167 * frame.c (make_initial_frame): Initialize faces in all cases, not
14168 only when CANNOT_DUMP is defined.
14169 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
14170
c56e0fd5
DN
141712011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14172
14173 * dispnew.c (add_window_display_history): Use const for the string
14174 pointer. Remove declaration, not needed.
14175
333d54da 141762011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 14177
55d4c1b2 14178 Use 'inline', not 'INLINE'.
333d54da 14179 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
14180 * alloc.c, fontset.c (INLINE): Remove.
14181 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
14182 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
14183 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
14184 * gmalloc.c (register_heapinfo): Use inline unconditionally.
14185 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
14186
738db178
DN
141872011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14188
14189 Make it possible to run ./temacs.
14190
14191 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
14192 syms_of_callproc does the same thing. Remove test for
14193 "initialized", do it in the caller.
14194 * emacs.c (main): Avoid calling set_initial_environment when dumping.
14195
620c53a6
SM
141962011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
14197
14198 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
14199 (read_minibuf): Use get_minibuffer.
14200 (syms_of_minibuf): Use DEFSYM.
14201 (Qmetadata): New var.
14202 * data.c (Qbuffer): Don't make it static.
14203 (syms_of_data): Use DEFSYM.
14204
e003a292
PE
142052011-05-31 Paul Eggert <eggert@cs.ucla.edu>
14206
14207 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
14208 (CCL_CODE_MIN): New macro.
14209
ed008a6d
PE
142102011-05-30 Paul Eggert <eggert@cs.ucla.edu>
14211
3687c2ef
PE
14212 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
14213
ed008a6d
PE
14214 * eval.c (Qdebug): Now static.
14215 * lisp.h (Qdebug): Remove decl. This reverts a part of the
14216 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
14217 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
14218
d66c4c7c
CY
142192011-05-29 Chong Yidong <cyd@stupidchicken.com>
14220
14221 * image.c: Various fixes to ImageMagick code comments.
14222 (Fimagemagick_types): Doc fix.
14223
5fbc2025
PE
142242011-05-29 Paul Eggert <eggert@cs.ucla.edu>
14225
0196f88a
PE
14226 Minor fixes prompted by GCC 4.6.0 warnings.
14227
14228 * xselect.c (converted_selections, conversion_fail_tag): Now static.
14229
5fbc2025
PE
14230 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
14231 (x_clipboard_manager_save_all): Move extern decl to ...
14232 * xterm.h: ... here, so that it can be checked for consistency.
14233
1dd3c2d9
CY
142342011-05-29 Chong Yidong <cyd@stupidchicken.com>
14235
14236 * xselect.c (x_clipboard_manager_save_frame)
14237 (x_clipboard_manager_save_all): New functions.
14238 (Fx_clipboard_manager_save): Lisp function deleted.
14239
14240 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
14241 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
14242
14243 * xterm.h: Update prototype.
14244
5ba6571d
WX
142452011-05-28 William Xu <william.xwl@gmail.com>
14246
14247 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
14248 exiting (Bug#8239).
14249
3eaff834
JM
142502011-05-28 Jim Meyering <meyering@redhat.com>
14251
e1900994 14252 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
14253 * fns.c (to_uchar): Define.
14254 (crypto_hash_function): Use it to convert some newly-signed
14255 variables to unsigned, to avoid sign-extension bugs. For example,
14256 without this change, (md5 "truc") would evaluate to
14257 45723a2aff78ff4fff7fff1114760e62 rather than the expected
14258 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 14259 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 14260
0f6990a7
PE
142612011-05-27 Paul Eggert <eggert@cs.ucla.edu>
14262
14263 Integer overflow fixes.
c8a9ca5a 14264
08686060
PE
14265 * dbusbind.c: Serial number integer overflow fixes.
14266 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
14267 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
14268 to hold a serial number that is too large for a fixnum.
14269 (Fdbus_method_return_internal, Fdbus_method_error_internal):
14270 Check for serial numbers out of range. Decode any serial number
59568bf0 14271 that was so large that it became a float. (Bug#8722)
08686060 14272
2d1fc3c7
PE
14273 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
14274 (Fdbus_call_method, Fdbus_call_method_asynchronously):
14275 Use XFASTINT rather than XUINT when numbers are nonnegative.
14276 (xd_append_arg, Fdbus_method_return_internal):
14277 (Fdbus_method_error_internal): Likewise. Also, for unsigned
14278 arguments, check that Lisp number is nonnegative, rather than
59568bf0 14279 silently wrapping negative numbers around. (Bug#8722)
30217ff0 14280 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 14281 (Bug#8722)
2d1fc3c7 14282
c8a9ca5a
PE
14283 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
14284
519e1d69
PE
14285 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
14286
6df6ae42 14287 ccl: Add integer overflow checks.
30569699
PE
14288 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
14289 (IN_INT_RANGE): New macros.
14290 (ccl_driver): Use them to check for integer overflow when
14291 decoding a CCL program. Many of the new checks are whether XINT (x)
14292 fits in int; it doesn't always, on 64-bit hosts. The new version
14293 doesn't catch all possible integer overflows, but it's an
847044ea 14294 improvement. (Bug#8719)
30569699 14295
c11285dc
PE
14296 * alloc.c (make_event_array): Use XINT, not XUINT.
14297 There's no need for unsigned here.
14298
fdccd48e
PE
14299 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
14300 This follows up to the 2011-05-06 change that substituted uintptr_t
14301 for EMACS_INT. This case wasn't caught back then.
14302
37910ab2
PE
14303 Rework Fformat to avoid integer overflow issues.
14304 * editfns.c: Include <float.h> unconditionally, as it's everywhere
14305 now (part of C89). Include <verify.h>.
14306 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
14307 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
14308 (Fformat): Avoid the prepass trying to compute sizes; it was only
14309 approximate and thus did not catch overflow reliably. Instead, walk
14310 through the format just once, formatting and computing sizes as we go,
14311 checking for integer overflow at every step, and allocating a larger
14312 buffer as needed. Keep track separately whether the format is
14313 multibyte. Keep only the most-recently calculated precision, rather
14314 than them all. Record whether each argument has been converted to
14315 string. Use EMACS_INT, not int, for byte and char and arg counts.
14316 Support field widths and precisions larger than INT_MAX. Avoid
14317 sprintf's undefined behavior with conversion specifications such as %#d
14318 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
14319 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
14320 formatting out-of-range floating point numbers with int
9173deec 14321 formats. (Bug#8668)
37910ab2 14322
2e6578fb
PE
14323 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
14324
0ae6bdee
PE
14325 * data.c: Avoid integer truncation in expressions involving floats.
14326 * data.c: Include <intprops.h>.
14327 (arith_driver): When there's an integer overflow in an expression
14328 involving floating point, convert the integers to floating point
14329 so that the resulting value does not suffer from catastrophic
14330 integer truncation. For example, on a 64-bit host (* 4
14331 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
14332 Do not rely on undefined behavior after integer overflow.
14333
de883a70
PE
14334 merge count_size_as_multibyte, parse_str_to_multibyte
14335 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 14336 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
14337 Check for integer overflow.
14338 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
14339 since it's now a duplicate of the other. This is more of
14340 a character than a buffer op, so better that it's in character.c.
14341 * fns.c, print.c: Adjust to above changes.
14342
2ff916cb
PE
143432011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
14344
14345 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
14346
f1b54466
PE
143472011-05-27 Paul Eggert <eggert@cs.ucla.edu>
14348
fb1ac845
PE
14349 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
14350 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
14351 (x_clipboard_manager_save): Now static.
14352 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
14353
f1b54466
PE
14354 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
14355 (crypto_hash_function): Now static.
14356 Fix pointer signedness problems. Avoid unnecessary initializations.
14357
a9f737ee
CY
143582011-05-27 Chong Yidong <cyd@stupidchicken.com>
14359
14360 * termhooks.h (Vselection_alist): Make it terminal-local.
14361
14362 * terminal.c (create_terminal): Initialize it.
14363
14364 * xselect.c: Support for clipboard managers.
14365 (Vselection_alist): Move to termhooks.h as terminal-local var.
14366 (LOCAL_SELECTION): New macro.
14367 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
14368 (symbol_to_x_atom): Remove gratuitous arg.
14369 (x_handle_selection_request, lisp_data_to_selection_data)
14370 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
14371 (x_own_selection, x_get_local_selection, x_convert_selection):
14372 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
14373 (some_frame_on_display): Delete unused function.
14374 (Fx_own_selection_internal, Fx_get_selection_internal)
14375 (Fx_disown_selection_internal, Fx_selection_owner_p)
14376 (Fx_selection_exists_p): New optional frame arg.
14377 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
14378 (x_handle_selection_clear): Don't treat other terminals with the
14379 same keyboard specially. Use the terminal-local Vselection_alist.
14380 (x_clear_frame_selections): Use Frun_hook_with_args.
14381
14382 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
14383
14384 * xterm.h: Add support for those atoms.
14385
e067f0c1
CY
143862011-05-26 Chong Yidong <cyd@stupidchicken.com>
14387
14388 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
14389 (converted_selections, conversion_fail_tag): New global variables.
14390 (x_selection_request_lisp_error): Free the above.
14391 (x_get_local_selection): Remove unnecessary code.
14392 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
14393 of converted selections stored in converted_selections.
14394 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
14395 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
14396 (x_convert_selection): New function.
14397 (x_handle_selection_event): Simplify.
14398 (x_get_foreign_selection): Don't ignore incoming requests while
14399 waiting for an answer; this will fail when we implement
14400 SAVE_TARGETS, and seems unnecessary anyway.
14401 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
14402 (Vx_sent_selection_functions): Doc fix.
14403
0f4aebc0
LL
144042011-05-26 Leo Liu <sdl.web@gmail.com>
14405
14406 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
14407
e61124cd
YM
144082011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14409
14410 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
14411
14412 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
14413 for fringe update if it has periodic bitmap.
ac389d0c 14414 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
14415 and fringe_bitmap_periodic_p.
14416
14417 * fringe.c (get_fringe_bitmap_data): New function.
14418 (draw_fringe_bitmap_1, update_window_fringes): Use it.
14419 (update_window_fringes): Record periodicity of fringe bitmap in glyph
14420 row. Mark glyph row for fringe update if periodicity changed.
14421
14422 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
14423 for fringe update unless it has periodic bitmap.
14424
f16d9837
KH
144252011-05-25 Kenichi Handa <handa@m17n.org>
14426
14427 * xdisp.c (get_next_display_element): Set correct it->face_id for
14428 a static composition.
14429
e1b90ef6
LL
144302011-05-24 Leo Liu <sdl.web@gmail.com>
14431
14432 * deps.mk (fns.o):
14433 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
14434
14435 * fns.c (crypto_hash_function, Fsha1): New function.
14436 (Fmd5): Use crypto_hash_function.
14437 (syms_of_fns): Add Ssha1.
14438
7400048f
PE
144392011-05-22 Paul Eggert <eggert@cs.ucla.edu>
14440
14441 * gnutls.c: Remove unused macros.
14442 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
14443 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
14444 Remove macros that are defined and never used.
14445 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
14446
abb71cf4
CY
144472011-05-22 Chong Yidong <cyd@stupidchicken.com>
14448
14449 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
14450 (Fx_get_selection_internal): Minor cleanup.
14451 (Fx_own_selection_internal): Rename arguments for consistency with
14452 select.el.
14453
6307db39
PE
144542011-05-22 Paul Eggert <eggert@cs.ucla.edu>
14455
14456 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
14457
f3d4e0a4
CY
144582011-05-22 Chong Yidong <cyd@stupidchicken.com>
14459
14460 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
14461
4d8ade89
YM
144622011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14463
14464 * dispnew.c (scrolling_window): Don't exclude the case that the
14465 last enabled row in the desired matrix touches the bottom boundary.
14466
32078c8d
GM
144672011-05-21 Glenn Morris <rgm@gnu.org>
14468
14469 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
14470 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
14471 and add some more files.
32078c8d 14472
7285dc67
EZ
144732011-05-20 Eli Zaretskii <eliz@gnu.org>
14474
14475 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
14476 report_file_error introduced by the change from 2011-05-07.
14477
89d1bd22
PE
144782011-05-20 Paul Eggert <eggert@cs.ucla.edu>
14479
14480 * systime.h (Time): Define only if emacs is defined.
14481 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
14482 where the include path doesn't have X11/X.h by default. See
14483 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
14484
cd394be1 144852011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
14486
14487 * composite.c (find_automatic_composition): Fix previous change.
14488
b9704ad9
GM
144892011-05-20 Glenn Morris <rgm@gnu.org>
14490
14491 * lisp.mk: New file, split from Makefile.in.
14492 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
14493 (shortlisp): Remove.
14494 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
14495
4a720484
GM
144962011-05-19 Glenn Morris <rgm@gnu.org>
14497
14498 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
14499 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
14500 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
14501 (lisp): Set the order to that of loadup.el.
14502 (shortlisp): Make it a copy of $lisp.
14503 (SOME_MACHINE_LISP): Remove.
14504 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
14505 Use just $shortlisp, not $SOME_MACHINE_LISP too.
14506
a28d4396
KH
145072011-05-18 Kenichi Handa <handa@m17n.org>
14508
14509 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
14510 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
14511 (find_automatic_composition): Mostly rewrite for efficiency.
14512
a2b1fa8e
JB
145132011-05-18 Juanma Barranquero <lekktu@gmail.com>
14514
14515 * makefile.w32-in: Update dependencies.
14516
8e1f5610
CS
145172011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
14518
14519 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 14520 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 14521
7025ee00 145222011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 14523
cdfa6eab
PE
14524 Fix some integer overflow issues, such as string length overflow.
14525
06d6db33
PE
14526 * insdel.c (count_size_as_multibyte): Check for string overflow.
14527
2b4560a8
PE
14528 * character.c (lisp_string_width): Check for string overflow.
14529 Use EMACS_INT, not int, for string indexes and lengths; in
14530 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
14531 the resulting string length overflows an EMACS_INT; instead,
14532 report a string overflow if no precision given. When checking for
14533 precision exhaustion, use a check that cannot possibly have
14534 integer overflow. (Bug#8675)
14535 * character.h (lisp_string_width): Adjust to new signature.
14536
cb93f9be
PE
14537 * alloc.c (string_overflow): New function.
14538 (Fmake_string): Use it. This doesn't change behavior, but saves
14539 a few bytes and will simplify future changes.
14540 * character.c (string_escape_byte8): Likewise.
14541 * lisp.h (string_overflow): New decl.
14542
1a1f3366
PE
14543 Fixups, following up to the user-interface timestamp change.
14544 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
14545 for UI timestamps, instead of unsigned long.
9fbd6841
PE
14546 * msdos.c (mouse_get_pos): Likewise.
14547 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
14548 * w32gui.h (Time): Define by including "systime.h" rather than by
14549 declaring it ourselves. (Bug#8664)
14550
d4e3e4d3
PE
14551 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
14552 * image.c (clear_image_cache): Likewise.
14553
f6a24d19
PE
14554 * term.c (term_mouse_position): Don't assume time_t wraparound.
14555
08dc5ae6
PE
14556 Be more systematic about user-interface timestamps.
14557 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
14558 and sometimes 'EMACS_UINT', to represent these timestamps.
14559 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
14560 This makes the code easier to follow, and makes it easier to catch
14561 integer overflow bugs such as Bug#8664.
14562 * frame.c (Fmouse_position, Fmouse_pixel_position):
14563 Use Time, not unsigned long, for user-interface timestamps.
14564 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
14565 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
14566 * keyboard.h (last_event_timestamp): Likewise.
14567 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
14568 * menu.h (xmenu_show): Likewise.
14569 * term.c (term_mouse_position): Likewise.
14570 * termhooks.h (struct input_event.timestamp): Likewise.
14571 (struct terminal.mouse_position_hook): Likewise.
14572 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
14573 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
14574 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
14575 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
14576 what it was before.
14577 * menu.h, termhooks.h: Include "systime.h", for Time.
14578
8e55734a
PE
14579 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
14580 Don't assume that the difference between two unsigned long values
14581 can fit into an integer. At this point, we know button_down_time
14582 <= event->timestamp, so the difference must be nonnegative, so
14583 there's no need to cast the result if double-click-time is
14584 nonnegative, as it should be; check that it's nonnegative, just in
14585 case. This bug is triggered when events are more than 2**31 ms
86db42d2 14586 apart (about 25 days). (Bug#8664)
8e55734a 14587
841f1b75 14588 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 14589 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 14590
3e26f69c
PE
14591 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
14592 that always fit in int. Use a sentinel instead of a counter, to
14593 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
14594 * frame.h (struct frame): Use int for menu_bar_items_used
14595 instead of EMACS_INT, since it always fits in int.
3e26f69c 14596
5cc152c0
PE
14597 * menu.c (grow_menu_items): Check for int overflow.
14598
d89eb65e
PE
14599 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
14600
5235bd3e
PE
14601 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
14602 Before, the code was not consistent. These values cannot exceed
14603 2**31 - 1 so there's no need to make them unsigned.
14604 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
14605 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
14606 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
14607 as modifiers.
14608 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
14609
bc827e23
PE
14610 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
14611 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
14612 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
14613 presumably because the widths might not match.
14614
78eb494e
PE
14615 * window.c (size_window): Avoid needless test at loop start.
14616
04f2d78b
CB
146172011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
14618
14619 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
14620
d2fc7e3d 146212011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
14622
14623 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
14624
d2fc7e3d 146252011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
14626
14627 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
14628 `width' to `bar_area_x' and `bar_area_width', respectively.
14629 (x_scroll_run): Take account of fringe background extension.
14630
04f2d78b
CB
14631 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
14632 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
14633 `bar_area_width', respectively.
14634 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
14635 background extension.
14636
79b70037
GM
146372011-05-10 Jim Meyering <meyering@redhat.com>
14638
14639 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
14640
2f142cc5
JB
146412011-05-10 Juanma Barranquero <lekktu@gmail.com>
14642
14643 * image.c (Finit_image_library): Return t for built-in image types,
14644 like pbm and xbm. (Bug#8640)
14645
57679c86
AS
146462011-05-09 Andreas Schwab <schwab@linux-m68k.org>
14647
14648 * w32menu.c (set_frame_menubar): Fix submenu allocation.
14649
888c9e86
EZ
146502011-05-07 Eli Zaretskii <eliz@gnu.org>
14651
b0512a1d
EZ
14652 * w32console.c (Fset_screen_color): Doc fix.
14653 (Fget_screen_color): New function.
14654 (syms_of_ntterm): Defsubr it.
14655
7285dc67
EZ
14656 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
14657 unlink the temporary file if Fcall_process didn't create it in the
14658 first place.
14659 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
14660 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
14661 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
14662 cue to call_process_cleanup not to close that handle.
14663
4d3fcc8e
BK
146642011-05-07 Ben Key <bkey76@gmail.com>
14665
14666 * makefile.w32-in: The bootstrap-temacs rule now makes use of
14667 one of two shell specific rules, either bootstrap-temacs-CMD or
14668 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
14669 to the previous implementation of the bootstrap-temacs rule.
14670 The bootstrap-temacs-CMD rule is similar to the previous
14671 implementation of the bootstrap-temacs rule except that it
14672 makes use of the ESC_CFLAGS variable instead of the CFLAGS
14673 variable.
14674
14675 These changes, along with some changes to nt/configure.bat,
14676 nt/gmake.defs, and nt/nmake.defs, are required to extend my
14677 earlier fix to add support for --cflags and --ldflags options
14678 that include quotes so that it works whether make uses cmd or
14679 sh as the shell.
14680
b4289b64
MA
146812011-05-06 Michael Albinus <michael.albinus@gmx.de>
14682
14683 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
14684 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
14685 is a constant.
14686 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
14687 a string. Handle both cases.
14688 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
14689 (Fdbus_register_method): Use Qinvalid_function.
14690
af4c0e28
JB
146912011-05-06 Juanma Barranquero <lekktu@gmail.com>
14692
14693 * makefile.w32-in: Update dependencies.
14694 (LISP_H): Add inttypes.h and stdin.h.
14695 (PROCESS_H): Add unistd.h.
14696
c51453d9
EZ
146972011-05-06 Eli Zaretskii <eliz@gnu.org>
14698
14699 * lread.c: Include limits.h (fixes the MS-Windows build broken by
14700 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
14701
8ff0ac3c 147022011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 14703
4c4b566b
PE
14704 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
14705
aab2b9b5
PE
14706 * term.c (vfatal): Remove stray call to va_end.
14707 It's not needed and the C Standard doesn't allow it here anyway.
14708
c378da0b
PE
14709 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
14710 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
14711
288b08c7
PE
14712 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
14713 bytes.
14714
e3601888
PE
14715 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
14716
db6c0e74
PE
14717 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14718
dd5963ea
PE
14719 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
14720
88c9450f
PE
14721 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
14722
2f9442b8
PE
14723 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
14724
c032b5f8
PE
14725 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
14726 * charset.c (Fdefine_charset_internal): Don't initialize
14727 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 14728 32-bit int (Bug#8600).
a108c10b
PE
14729
14730 * lread.c (read_integer): Be more consistent with string-to-number.
14731 Use string_to_number to do the actual conversion; this avoids
14732 rounding errors and fixes some other screwups. Without this fix,
14733 for example, #x1fffffffffffffff was misread as -2305843009213693952.
14734 (digit_to_number): Move earlier, for benefit of read_integer.
14735 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 14736 not a digit in any supported base. (Bug#8602)
a108c10b 14737
ad5f9eea
PE
14738 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
14739
aec1708a
PE
14740 * dispnew.c (scrolling_window): Return 1 if we scrolled,
14741 to match comment at start of function. This also removes a
14742 GCC warning about overflow in a 32+64-bit port.
14743
47be4ab5
PE
14744 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
14745
371cac43
PE
14746 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
14747 Reported by Stefan Monnier in
14748 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
14749 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14750 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 14751
d01a7826
PE
14752 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
14753 (EMACS_UINTPTR): Likewise, with uintptr_t.
14754
7fd47d5c
PE
14755 * lisp.h: Prefer 64-bit EMACS_INT if available.
14756 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
14757 on 32-bit hosts that have 64-bit int, so that they can access
14758 large files.
122b0c86
PE
14759 However, temporarily disable this change unless the temporary
14760 symbol WIDE_EMACS_INT is defined.
7fd47d5c 14761
8727937b
PE
14762 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
14763
8ac068ac
PE
14764 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
14765 This removes an assumption that EMACS_INT and long are the same
14766 width as pointers. The assumption is true for Emacs porting targets
14767 now, but we want to make other targets possible.
14768 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
14769 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
14770 In the rest of the code, change types of integers that hold casted
14771 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
14772 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
14773 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
14774 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
14775 No need to cast type when ORing.
14776 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
14777 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
14778 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
14779 assume EMACS_INT is the same width as char *.
14780 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
14781 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
14782 Remove no-longer-needed casts.
14783 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
14784 (xg_tool_bar_help_callback, xg_make_tool_item):
14785 Use EMACS_INTPTR to hold an integer
14786 that will be cast to void *; this can avoid a GCC warning
14787 if EMACS_INT is not the same width as void *.
14788 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
14789 * xdisp.c (display_echo_area_1, resize_mini_window_1):
14790 (current_message_1, set_message_1):
14791 Use a local to convert to proper width without a cast.
14792 * xmenu.c (dialog_selection_callback): Likewise.
14793
ede49d71
PE
14794 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
14795 Also, don't assume VALBITS / RAND_BITS is less than 5,
14796 and don't rely on undefined behavior when shifting a 1 left into
14797 the sign bit.
14798 * lisp.h (get_random): Change signature to match.
14799
2f30ecd0
PE
14800 * lread.c (hash_string): Use size_t, not int, for hash computation.
14801 Normally we prefer signed values; but hashing is special, because
14802 it's better to use unsigned division on hash table sizes so that
14803 the remainder is nonnegative. Also, size_t is the natural width
14804 for hashing into memory. The previous code used 'int', which doesn't
14805 retain enough info to hash well into very large tables.
14806 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
14807
2a866e7b
PE
14808 * dbusbind.c: Don't possibly lose pointer info when converting.
14809 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14810 Use XPNTR rather than XHASH, so that the high-order bits of
14811 the pointer aren't lost when converting through void *.
14812
51639eac
PE
14813 * eval.c (Fautoload): Don't double-shift a pointer.
14814
92394119
PE
14815 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
14816
dbdb9a7c
JB
148172011-05-06 Juanma Barranquero <lekktu@gmail.com>
14818
14819 * gnutls.c (DEF_GNUTLS_FN):
14820 * image.c (DEF_IMGLIB_FN): Make function pointers static.
14821
db7a0b4f
AS
148222011-05-05 Andreas Schwab <schwab@linux-m68k.org>
14823
14824 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
14825 marker. (Bug#8610)
14826
cd394be1 148272011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
14828
14829 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
14830 New version that can reserve upto 2GB of heap space.
14831
f7ff1b0f 148322011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
14833
14834 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
14835
639c109b
TZ
148362011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
14837
14838 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
14839 `gnutls_certificate_set_x509_key_file'.
14840
d2127135
JB
148412011-05-05 Juanma Barranquero <lekktu@gmail.com>
14842
14843 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
14844 Update dependencies.
14845
e968f4f3
JB
148462011-05-04 Juanma Barranquero <lekktu@gmail.com>
14847
14848 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
14849 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
14850 Remove unused parameter `fildes'.
14851 * process.c (read_process_output, send_process): Don't pass it.
14852
84d358f0
JB
148532011-05-04 Juanma Barranquero <lekktu@gmail.com>
14854
14855 Fix previous change: the library cache is defined in w32.c.
14856 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
14857 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
14858
0898ca10
JB
148592011-05-04 Juanma Barranquero <lekktu@gmail.com>
14860
14861 Implement dynamic loading of GnuTLS on Windows.
14862
14863 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
14864 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
14865 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14866 Declare.
14867
14868 * gnutls.c (Qgnutls_dll): Define.
14869 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
14870 (gnutls_*): Declare function pointers.
14871 (init_gnutls_functions): New function to initialize function pointers.
14872 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
14873 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
14874 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14875 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
14876 (emacs_gnutls_write, emacs_gnutls_read)
14877 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
14878 (Fgnutls_available_p): New function.
14879 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
14880 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
14881 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
14882
14883 * image.c: Include w32.h.
14884 (Vimage_type_cache): Delete.
14885 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
14886 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
14887 (w32_delayed_load): Move to w32.c.
14888
14889 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
14890
14891 * w32.c (QCloaded_from, Vlibrary_cache): Define.
14892 (w32_delayed_load): Move from image.c. When loading a library, record
14893 its filename in the :loaded-from property of the library id.
14894 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
14895 Initialize and staticpro them.
14896 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
14897
14898 * process.c: Include lisp.h before w32.h, not after.
14899 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
14900 instead of gnutls_record_check_pending.
14901
14902 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
14903
ff4de4aa
TZ
149042011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
14905
14906 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
14907 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
14908 as passed in.
14909
abe95abb
JD
149102011-05-03 Jan Djärv <jan.h.d@swipnet.se>
14911
14912 * xterm.c (x_set_frame_alpha): Do not set property on anything
14913 else than FRAME_X_OUTER_WINDOW (Bug#8608).
14914
e16e55d4
JB
149152011-05-02 Juanma Barranquero <lekktu@gmail.com>
14916
14917 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
14918
bafcf6a5
JB
149192011-05-02 Juanma Barranquero <lekktu@gmail.com>
14920
14921 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
14922 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
14923 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
14924 (gnutls_global_initialized, Qgnutls_bootprop_priority)
14925 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
14926 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
14927 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
14928 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
14929 (Qgnutls_bootprop_callbacks_verify): Make static.
14930
e7a6747f
AS
149312011-05-01 Andreas Schwab <schwab@linux-m68k.org>
14932
19ed11ba
AS
14933 * callproc.c: Indentation fixup.
14934
e7a6747f 14935 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
14936 (wait_for_termination, interruptible_wait_for_termination):
14937 Move after wait_for_termination_1.
e7a6747f 14938
1ef14cb4
LMI
149392011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
14940
14941 * sysdep.c (interruptible_wait_for_termination): New function
14942 which is like wait_for_termination, but allows keyboard
14943 interruptions.
14944
14945 * callproc.c (Fcall_process): Add (:file "file") as an option for
14946 the STDOUT buffer.
14947 (Fcall_process_region): Ditto.
14948
330d880c
EZ
149492011-04-30 Eli Zaretskii <eliz@gnu.org>
14950
8db90b73
EZ
14951 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
14952 rather than `XVECTOR (FOO)->size'.
14953
330d880c
EZ
14954 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
14955 inttypes.h, as a gnulib replacement is used if it not available in
14956 system headers.
14957
15cbd324
EZ
149582011-04-21 Eli Zaretskii <eliz@gnu.org>
14959
14960 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
14961 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
14962 of MOST_POSITIVE_FIXNUM. (Bug#8528)
14963
14964 * coding.c (coding_alloc_by_realloc): Error out if destination
14965 will grow beyond MOST_POSITIVE_FIXNUM.
14966 (decode_coding_emacs_mule): Abort if there isn't enough place in
14967 charbuf for the composition carryover bytes. Reserve an extra
14968 space for up to 2 characters produced in a loop.
14969 (decode_coding_iso_2022): Abort if there isn't enough place in
14970 charbuf for the composition carryover bytes.
14971
149722011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 14973
ae940cca
EZ
14974 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
14975 aborting when %lld or %lll format is passed.
14976 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
14977 %llo or %llx format is passed. (Bug#8545)
14978
03ab8921
EZ
14979 * window.c (window_scroll_line_based): Use a marker instead of
14980 simple variables to record original value of point. (Bug#7952)
14981
afda1437
EZ
14982 * doprnt.c (doprnt): Fix the case where a multibyte sequence
14983 produced by %s or %c overflows available buffer space. (Bug#8545)
14984
f76dee0c
PE
149852011-04-28 Paul Eggert <eggert@cs.ucla.edu>
14986
14987 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 14988 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 14989
fdc5744d
JB
149902011-04-28 Juanma Barranquero <lekktu@gmail.com>
14991
14992 * w32.c (init_environment): Warn about defaulting HOME to C:\.
14993
638f053a
JB
149942011-04-28 Juanma Barranquero <lekktu@gmail.com>
14995
14996 * keyboard.c (Qdelayed_warnings_hook): Define.
14997 (command_loop_1): Run `delayed-warnings-hook'
14998 if Vdelayed_warnings_list is non-nil.
14999 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
15000 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
15001
d178f871
EZ
150022011-04-28 Eli Zaretskii <eliz@gnu.org>
15003
15004 * doprnt.c (doprnt): Don't return value smaller than the buffer
15005 size if the message was truncated. (Bug#8545).
15006
b124fd93
JB
150072011-04-28 Juanma Barranquero <lekktu@gmail.com>
15008
15009 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
15010 (Fx_window_property): #if-0 the whole functions, not just the bodies.
15011
e810457d
PE
150122011-04-27 Paul Eggert <eggert@cs.ucla.edu>
15013
15014 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
15015
ea51cceb
JB
150162011-04-27 Juanma Barranquero <lekktu@gmail.com>
15017
15018 * makefile.w32-in: Update dependencies.
15019
94dcfacf
EZ
150202011-04-27 Eli Zaretskii <eliz@gnu.org>
15021
15022 Improve `doprnt' and its usage. (Bug#8545)
15023 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
15024 `format_end'. Remove support for %l as a conversion specifier.
15025 Don't use xrealloc. Improve diagnostics when the %l size modifier
15026 is used. Update the commentary.
15027
15028 * eval.c (verror): Simplify calculation of size_t.
15029
15030 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
15031 messages.
15032
f61f41d7
PE
150332011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
15034
15035 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
15036 change.
15037
96fb4434
PE
150382011-04-27 Paul Eggert <eggert@cs.ucla.edu>
15039
15040 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
15041 This makes this file independent of the recent pseudovector change.
15042
671875da 150432011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 15044
69e9b5a3
PE
15045 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
15046
b5f869a7 15047 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 15048 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 15049 Remove unused local.
c8926152 15050 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 15051
841a1577 15052 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
15053 GCC 4.6.0 optimizes based on type-based alias analysis.
15054 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
15055 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
15056 != &v->size, and therefore "v->size = 1; b->size = 2; return
15057 v->size;" must therefore return 1. This assumption is incorrect
15058 for Emacs, since it type-puns struct Lisp_Vector * with many other
15059 types. To fix this problem, this patch adds a new type struct
f904488f 15060 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
15061 and pseudovectors, and helps optimizing compilers not get fooled
15062 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
15063 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
15064 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
15065 the size member.
eab3844f
PE
15066 (XSETPVECTYPE): Rewrite in terms of new macro.
15067 (XSETPVECTYPESIZE): New macro, specifying both type and size.
15068 This is a bit clearer, and further avoids the possibility of
15069 undesirable aliasing.
15070 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 15071 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
15072 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
15073 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
15074 (ASIZE): Now uses header.size rather than size.
15075 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
15076 to avoid the hassle of writing XVECTOR (foo)->header.size.
15077 (struct vectorlike_header): New type.
eab3844f
PE
15078 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
15079 object, to help avoid aliasing.
15080 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
15081 (SUBRP): Likewise, since Lisp_Subr is a special case.
15082 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
15083 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
15084 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 15085 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
15086 changed to be "header.size" and "header.next".
15087 * buffer.h (struct buffer): Likewise.
15088 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
15089 * frame.h (struct frame): Likewise.
15090 * process.h (struct Lisp_Process): Likewise.
15091 * termhooks.h (struct terminal): Likewise.
15092 * window.c (struct save_window_data, struct saved_window): Likewise.
15093 * window.h (struct window): Likewise.
15094 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
15095 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
15096 * buffer.c (init_buffer_once): Likewise.
15097 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
15098 special case.
15099 * process.c (Fformat_network_address): Use local var for size,
15100 for brevity.
15101
0df1eac5
PE
15102 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
15103
847ab9d1 15104 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
15105 * data.c (atof): Remove decl; no longer used or needed.
15106 (digit_to_number): Move to lread.c.
15107 (Fstring_to_number): Use new string_to_number function, to be
15108 consistent with how the Lisp reader treats infinities and NaNs.
15109 Do not assume that floating-point numbers represent EMACS_INT
15110 without losing information; this is not true on most 64-bit hosts.
15111 Avoid double-rounding errors, by insisting on integers when
15112 parsing non-base-10 numbers, as the documentation specifies.
15113 * lisp.h (string_to_number): New decl, replacing ...
15114 (isfloat_string): Remove.
bc0a5c13 15115 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 15116 (read1): Do not accept +. and -. as integers; this
452f4150
PE
15117 appears to have been a coding error. Similarly, do not accept
15118 strings like +-1e0 as floating point numbers. Do not report
15119 overflow for integer overflows unless the base is not 10 which
15120 means we have no simple and reliable way to continue.
15121 Break out the floating-point parsing into a new
15122 function string_to_number, so that Fstring_to_number parses
15123 floating point numbers consistently with the Lisp reader.
04f2d78b 15124 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
15125 (E_CHAR, EXP_INT): Remove, replacing with ...
15126 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
15127 (string_to_number): New function, replacing isfloat_string.
15128 This function checks for valid syntax and produces the resulting
15129 Lisp float number too. Rework it so that string-to-number
bc0a5c13 15130 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
15131 so that overflow for non-base-10 numbers is reported only when
15132 there's no portable and simple way to convert to floating point.
452f4150 15133
67769ffc
PE
15134 * textprop.c (set_text_properties_1): Rewrite for clarity,
15135 and to avoid GCC warning about integer overflow.
15136
c20db43f
PE
15137 * intervals.h (struct interval): Use EMACS_INT for members
15138 where EMACS_UINT might cause problems. See
15139 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
15140 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
15141 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
15142 All uses changed.
37aa2f85
PE
15143 (offset_intervals): Tell GCC not to worry about length overflow
15144 when negating a negative length.
c20db43f 15145
2538aa2f
PE
15146 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
15147 (overrun_check_free): Likewise.
15148
f2d3008d
PE
15149 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
15150 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
15151 word size.
15152
ec8df744
PE
15153 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
15154 (gnutls_make_error): Rename local to avoid shadowing.
15155 (gnutls_emacs_global_deinit): ifdef out; not used.
15156 (Fgnutls_boot): Use const for pointer to readonly storage.
15157 Comment out unused local. Fix pointer signedness problems.
15158
640ee02d
PE
15159 * lread.c (openp): Don't stuff size_t into an 'int'.
15160 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
15161 about possible signed overflow.
15162
6048fb2a
PE
15163 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
15164 (GDK_KEY_g): Don't define if already defined.
15165 (xg_prepare_tooltip): Avoid pointer signedness problem.
15166 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
15167
fa3c87e1
PE
15168 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
15169 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
15170
2172544b
PE
15171 * xfns.c (Fx_window_property): Simplify a bit,
15172 to make a bit faster and to avoid GCC 4.6.0 warning.
15173 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
15174
9b821a21
PE
15175 * fns.c (internal_equal): Don't assume size_t fits in int.
15176
3c616cfa
PE
15177 * alloc.c (compact_small_strings): Tighten assertion a little.
15178
c2982e87
PE
15179 Replace pEd with more-general pI, and fix some printf arg casts.
15180 * lisp.h (pI): New macro, generalizing old pEd macro to other
15181 conversion specifiers. For example, use "...%"pI"d..." rather
15182 than "...%"pEd"...".
15183 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 15184 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
15185 * alloc.c (check_pure_size): Don't overflow by converting size to int.
15186 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
15187 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
15188 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
15189 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
15190 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
15191 64-bit hosts.
15192 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
15193 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
15194 * print.c (safe_debug_print, print_object): Likewise.
15195 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
15196 to int.
6f04d126
PE
15197 Use pI instead of if-then-else-abort. Use %p to avoid casts,
15198 avoiding the 0 flag, which is not portable.
c2982e87
PE
15199 * process.c (Fmake_network_process): Use pI to avoid cast.
15200 * region-cache.c (pp_cache): Likewise.
15201 * xdisp.c (decode_mode_spec): Likewise.
15202 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
15203 behavior on 64-bit hosts with printf arg.
6f04d126 15204 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
15205 (x_stop_queuing_selection_requests): Likewise.
15206 (x_get_window_property): Don't truncate byte count to an 'int'
15207 when tracing.
0b432f21 15208
5e073ec7
PE
15209 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
15210 here, since it parses constructs like leading '-' and spaces,
15211 which are not wanted; and it overflows with large numbers.
15212 Instead, simply match F[0-9]+, which is what is wanted anyway.
15213
36372bf9
PE
15214 * alloc.c: Remove unportable assumptions about struct layout.
15215 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
15216 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
15217 (allocate_vectorlike, make_pure_vector): Use the new macros,
15218 plus offsetof, to remove unportable assumptions about struct layout.
15219 These assumptions hold on all porting targets that I know of, but
15220 they are not guaranteed, they're easy to remove, and removing them
15221 makes further changes easier.
15222
0b432f21
PE
15223 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
15224 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
15225 (string_overrun_cookie): Now const. Use initializers that
15226 don't formally overflow signed char, to avoid warnings.
000098c1
PE
15227 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
15228 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
15229 (allocate_buffer): Don't assume sizeof (struct buffer) is a
15230 multiple of sizeof (EMACS_INT); it need not be, if
15231 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 15232 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 15233
895009e1
JB
152342011-04-26 Juanma Barranquero <lekktu@gmail.com>
15235
15236 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
15237
6a7a1b0b
TZ
152382011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
15239
15240 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 15241 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
15242 Reported by Paul Eggert <eggert@cs.ucla.edu>.
15243
841a1577 152442011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
15245
15246 * lisp.h (Qdebug): List symbol.
895009e1 15247 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
15248 * keyboard.c (debug-on-event): New variable.
15249 (handle_user_signal): Break into debugger when debug-on-event
15250 matches the current signal symbol.
15251
f2d3ba6f
DN
152522011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
15253
15254 * alloc.c (check_sblock, check_string_bytes)
15255 (check_string_free_list): Convert to standard C.
15256
42ce4c63
TZ
152572011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
15258
15259 * w32.c (emacs_gnutls_push): Fix typo.
15260
825cd63c
EZ
152612011-04-25 Eli Zaretskii <eliz@gnu.org>
15262
fb11d64d
EZ
15263 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
15264 "cast to pointer from integer of different size".
15265
825cd63c
EZ
15266 Improve doprnt and its use in verror. (Bug#8545)
15267 * doprnt.c (doprnt): Document the set of format control sequences
15268 supported by the function. Use SAFE_ALLOCA instead of always
15269 using `alloca'.
15270
15271 * eval.c (verror): Don't limit the buffer size at size_max-1, that
15272 is one byte too soon. Don't use xrealloc; instead xfree and
15273 xmalloc anew.
15274
e061a11b
TZ
152752011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
15276
15277 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
15278 callbacks stage.
15279
15280 * gnutls.c: Renamed global_initialized to
15281 gnutls_global_initialized. Added internals for the
15282 :verify-hostname-error, :verify-error, and :verify-flags
15283 parameters of `gnutls-boot' and documented those parameters in the
15284 docstring. Start callback support.
9173deec
JB
15285 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
15286 unless a fatal error occurred. Call gnutls_alert_send_appropriate
15287 on error. Return error code.
e061a11b
TZ
15288 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
15289 (emacs_gnutls_read): Likewise.
15290 (Fgnutls_boot): Return handshake error code.
15291 (emacs_gnutls_handle_error): New function.
15292 (wsaerror_to_errno): Likewise.
15293
15294 * w32.h (emacs_gnutls_pull): Add prototype.
15295 (emacs_gnutls_push): Likewise.
15296
15297 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
15298 (emacs_gnutls_push): Likewise.
15299
153002011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
15301
15302 * process.c (wait_reading_process_output): Check if GnuTLS
15303 buffered some data internally if no FDs are set for TLS
15304 connections.
15305
15306 * makefile.w32-in (OBJ2): Add gnutls.$(O).
15307 (LIBS): Link to USER_LIBS.
15308 ($(BLD)/gnutls.$(0)): New target.
15309
fa6996bc
EZ
153102011-04-24 Eli Zaretskii <eliz@gnu.org>
15311
eb35682e
EZ
15312 * xdisp.c (handle_single_display_spec): Rename the
15313 display_replaced_before_p argument into display_replaced_p, to
15314 make it consistent with the commentary. Fix typos in the
15315 commentary.
15316
e2ad650c
EZ
15317 * textprop.c (syms_of_textprop): Remove dead code.
15318 (copy_text_properties): Delete obsolete commentary about an
15319 interface that was deleted long ago. Fix typos in the description
15320 of arguments.
15321
1b2de274
EZ
15322 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
15323 to changes in oldXMenu/XMenu.h from 2011-04-16.
15324 <menu_help_message, prev_menu_help_message>: Constify.
15325 (IT_menu_make_room): menu->help_text is now `const char **';
15326 adjust.
15327
15328 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
15329 to changes in oldXMenu/XMenu.h from 2011-04-16.
15330 (struct XMenu): Declare `help_text' `const char **'.
15331
15332 * xfaces.c <Qunspecified>: Make extern again.
15333
15334 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 15335 required by POSIX.
1b2de274 15336
762b15be
EZ
15337 * doc.c (get_doc_string): Improve the format passed to `error'.
15338
15339 * doprnt.c (doprnt): Improve commentary.
15340
15341 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
15342
15343 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
15344 them with etags.
15345
f1052e5d
EZ
15346 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
15347 changes in globals.h immediately force recompilation.
762b15be
EZ
15348 (TAGS): Depend on $(CURDIR)/m/intel386.h and
15349 $(CURDIR)/s/ms-w32.h.
15350 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 15351
fa6996bc
EZ
15352 * character.c (Fchar_direction): Function deleted.
15353 (syms_of_character): Don't defsubr it.
15354 <char-direction-table>: Deleted.
15355
e6c3da20
EZ
153562011-04-23 Eli Zaretskii <eliz@gnu.org>
15357
15358 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
15359 * doprnt.c: Include limits.h.
15360 (SIZE_MAX): New macro.
04f2d78b
CB
15361 (doprnt): Return a size_t value. 2nd arg is now size_t.
15362 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
15363 Improve overflow protection. Support `l' modifier for integer
15364 conversions. Support %l conversion. Don't assume an EMACS_INT
15365 argument for integer conversions and for %c.
15366
15367 * lisp.h (doprnt): Restore prototype.
15368
15369 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
15370 $(SRC)/character.h.
15371
15372 * Makefile.in (base_obj): Add back doprnt.o.
15373
15374 * deps.mk (doprnt.o): Add back prerequisites.
15375 (callint.o): Depend on character.h.
15376
15377 * eval.c (internal_lisp_condition_case): Include the handler
15378 representation in the error message.
15379 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
15380 when breaking from the loop.
15381
15382 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
15383
15384 * callint.c (Fcall_interactively): When displaying error message
15385 about invalid control letter, pass the character's codepoint, not
15386 a pointer to its multibyte form. Improve display of the character
15387 in octal and display also its hex code.
15388
15389 * character.c (char_string): Use %x to display the (unsigned)
15390 codepoint of an invalid character, to avoid displaying a bogus
15391 negative value.
15392
15393 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
15394 `error', not SYMBOL_NAME itself.
15395
15396 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
15397 character arguments to `error'.
15398
15399 * charset.c (check_iso_charset_parameter): Fix incorrect argument
15400 to `error' in error message about FINAL_CHAR argument. Make sure
15401 FINAL_CHAR is a character, and use %c when it is passed as
15402 argument to `error'.
15403
4ffd0d6b 154042011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
15405
15406 * s/ms-w32.h (localtime): Redirect to sys_localtime.
15407
15408 * w32.c: Include <time.h>.
15409 (sys_localtime): New function.
15410
4ffd0d6b 154112011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
15412
15413 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
15414
4ffd0d6b 15415 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 15416
4ffd0d6b 154172011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 15418
4ffd0d6b
GM
15419 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
15420 zombies (Bug#8467).
aac0c6e3 15421
04c56954
EZ
154222011-04-19 Eli Zaretskii <eliz@gnu.org>
15423
15424 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
15425 gl_state.e_property when gl_state.object is Qt.
15426
15427 * insdel.c (make_gap_larger): Remove limitation of buffer size
15428 to <= INT_MAX.
15429
16a43933
CY
154302011-04-18 Chong Yidong <cyd@stupidchicken.com>
15431
15432 * xdisp.c (lookup_glyphless_char_display)
15433 (produce_glyphless_glyph): Handle cons cell entry in
15434 glyphless-char-display.
15435 (Vglyphless_char_display): Document it.
15436
15437 * term.c (produce_glyphless_glyph): Handle cons cell entry in
15438 glyphless-char-display.
15439
4581706e
CY
154402011-04-17 Chong Yidong <cyd@stupidchicken.com>
15441
15442 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
15443
15444 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
15445
15446 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
15447 definition for no-X builds.
15448
4887c6e2 154492011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 15450
fd35b6f9
PE
15451 Static checks with GCC 4.6.0 and non-default toolkits.
15452
5c1ccb01
PE
15453 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
15454
006c5daa
PE
15455 * process.c (keyboard_bit_set): Define only if SIGIO.
15456 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
15457 (send_process): Repair possible setjmp clobbering.
15458
efc736d3
PE
15459 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
15460
4e2fe2e6
PE
15461 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
15462
f97334a2
PE
15463 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
15464
4e75f29d
PE
15465 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
15466 Define only if needed.
15467
90efadd1
PE
15468 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
15469 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 15470 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 15471
3c647824
PE
15472 * dispextern.h (struct redisplay_interface): Rename param
15473 to avoid shadowing.
e264f262 15474 * termhooks.h (struct terminal): Likewise.
761383f4 15475 * xterm.c (xembed_send_message): Likewise.
3c647824 15476
b58c5c4a
PE
15477 * insdel.c (make_gap_smaller): Define only if
15478 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
15479
cad59032
PE
15480 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
15481 it.
15482
c339dc2e
PE
15483 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
15484 so that we aren't warned about unused symbols.
15485
91a3e27b
PE
15486 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
15487
399c71d3 15488 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 15489
8ffc96f5
PE
15490 * xfns.c (x_real_positions): Mark locals as initialized.
15491
eef9bc79
PE
15492 * xmenu.c (xmenu_show): Don't use uninitialized vars.
15493
098db9dd
PE
15494 * xterm.c: Fix problems found by static analysis with other toolkits.
15495 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
15496 (x_dispatch_event): Declare static if USE_GTK, and
15497 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 15498 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 15499 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
15500 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
15501 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 15502
eb18f6cc
PE
15503 * xmenu.c (menu_help_callback): Pointer type fixes.
15504 Use const pointers when pointing at readonly data. Avoid pointer
15505 signedness clashes.
15506 (FALSE): Remove unused macro.
15507 (update_frame_menubar): Remove unused decl.
15508
1fe72bf8
PE
15509 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
15510
60d9e1db
PE
15511 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
15512 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
15513 (single_menu_item): Rename local to avoid shadowing.
15514
39261c26
PE
15515 * keyboard.c (make_lispy_event): Remove unused local var.
15516
018c5e19
PE
15517 * frame.c, frame.h (x_get_resource_string): Bring this back, but
15518 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
15519
63d2b86e
PE
15520 * bitmaps: Change bitmaps from unsigned char back to the X11
15521 compatible char. Avoid the old compiler warnings about
15522 out-of-range initializers by using, for example, '\xab' rather
15523 than 0xab.
15524
aefd87e1
PE
15525 * xgselect.c (xgselect_initialize): Check vs interface
15526 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
15527
bf501fb9
PE
15528 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
15529
e9829fdf
PE
15530 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
15531 to read-only memory.
15532
1086c095
PE
15533 * fns.c (vector): Remove; this old hack is no longer needed.
15534
2baccd04 15535 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 15536 Remove unused var.
dde42981 15537 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 15538
72391843 15539 * xrdb.c (x_load_resources): Omit unused local.
3565b346 15540
436c16df 15541 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 15542 (x_window): Rename locals to avoid shadowing.
dc5ddd85 15543 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 15544
92bb796d 15545 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 15546 (x_term_init): Remove local to avoid shadowing.
92bb796d 15547
764430a3 15548 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
15549
15550 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
15551 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
15552
d1dfb56c
EZ
155532011-04-16 Eli Zaretskii <eliz@gnu.org>
15554
c4354cb4
EZ
15555 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
15556
d1dfb56c
EZ
15557 Fix regex.c, syntax.c and friends for buffers > 2GB.
15558 * syntax.h (struct gl_state_s): Declare character position members
15559 EMACS_INT.
15560
15561 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
15562
04f2d78b
CB
15563 * textprop.c (verify_interval_modification, interval_of):
15564 Declare arguments EMACS_INT.
d1dfb56c
EZ
15565
15566 * intervals.c (adjust_intervals_for_insertion): Declare arguments
15567 EMACS_INT.
15568
15569 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
15570
15571 * indent.c (Fvertical_motion): Local variable it_start is now
15572 EMACS_INT.
15573
15574 * regex.c (re_match, re_match_2, re_match_2_internal)
15575 (bcmp_translate, regcomp, regexec, print_double_string)
15576 (group_in_compile_stack, re_search, re_search_2, regex_compile)
15577 (re_compile_pattern, re_exec): Declare arguments and local
15578 variables `size_t' and `ssize_t' and return values `regoff_t', as
15579 appropriate.
15580 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
15581 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
15582 <compile_stack_type>: `size' and `avail' are now `size_t'.
15583
15584 * regex.h <regoff_t>: Use ssize_t, not int.
15585 (re_search, re_search_2, re_match, re_match_2): Arguments that
15586 specify buffer/string position and length are now ssize_t and
15587 size_t. Return type is regoff_t.
15588
613052cd
BK
155892011-04-16 Ben Key <bkey76@gmail.com>
15590
15591 * nsfont.m: Fixed bugs in ns_get_family and
15592 ns_descriptor_to_entity that were caused by using free to
15593 deallocate memory blocks that were allocated by xmalloc (via
15594 xstrdup). This caused Emacs to crash when compiled with
15595 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
15596 --enable-checking=xmallocoverrun). xfree is now used to
15597 deallocate these memory blocks.
15598
4170f62f 155992011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 15600
71b41406
PE
15601 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
15602
9587a89d
PE
15603 emacs_write: Accept and return EMACS_INT for sizes.
15604 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
15605 et seq.
15606 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
15607 Accept and return EMACS_INT.
15608 (emacs_gnutls_write): Return the number of bytes written on
15609 partial writes.
15610 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
15611 (emacs_read, emacs_write): Remove check for negative size, as the
15612 Emacs source code has been audited now.
9587a89d
PE
15613 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
15614 (emacs_read, emacs_write): Use it.
273a5f82
PE
15615 * process.c (send_process): Adjust to the new signatures of
15616 emacs_write and emacs_gnutls_write. Do not attempt to store
15617 a byte offset into an 'int'; it might overflow.
9587a89d 15618 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 15619
3e047f51
PE
15620 * sound.c: Don't assume sizes fit in 'int'.
15621 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 15622 Return EMACS_INT, not int.
3e047f51 15623 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
15624 Accept EMACS_INT, not int.
15625 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
15626 record read return values.
15627
cc39a9db
BK
156282011-04-15 Ben Key <bkey76@gmail.com>
15629
c9d0ec6d
JB
15630 * keyboard.c (Qundefined): Don't declare static since it is used
15631 in nsfns.m.
15632 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
15633 static since they are used in nsfont.m.
cc39a9db 15634
6c60eb9f
SM
156352011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
15636
15637 * process.c (Qprocessp): Don't declare static.
15638 * lisp.h (Qprocessp): Declare again.
15639
7990b61a
JB
156402011-04-15 Juanma Barranquero <lekktu@gmail.com>
15641
15642 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
15643
5d4cb038
PE
156442011-04-14 Paul Eggert <eggert@cs.ucla.edu>
15645
8bd7b830 15646 Improve C-level modularity by making more things 'static'.
cd64ea1d 15647
e3b27b31
PE
15648 Don't publish debugger-only interfaces to other modules.
15649 * lisp.h (safe_debug_print, debug_output_compilation_hack):
15650 (verify_bytepos, count_markers): Move decls to the only modules
15651 that need them.
15652 * region-cache.h (pp_cache): Likewise.
15653 * window.h (check_all_windows): Likewise.
15654 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
15655
5d4cb038
PE
15656 * sysdep.c (croak): Now static, if
15657 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
15658 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
15659
15660 * alloc.c (refill_memory_reserve): Now static if
15661 !defined REL_ALLOC || defined SYSTEM_MALLOC.
15662 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 15663
e87b6180
PE
15664 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
15665 Define only if USE_LUCID.
15666
ac64929e
PE
15667 * xrdb.c (x_customization_string, x_rm_string): Now static.
15668
6f37259d
PE
15669 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
15670 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
15671
1683e3ab
PE
15672 * xdisp.c (draw_row_with_mouse_face): Now static.
15673 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
15674
de9c2632
PE
15675 * window.h (check_all_windows): Mark externally visible.
15676
2b96acb7
PE
15677 * window.c (window_deletion_count): Now static.
15678
15679 * undo.c: Make symbols static if they're not exported.
15680 (last_undo_buffer, last_boundary_position, pending_boundary):
15681 Now static.
15682
50436f33
PE
15683 * textprop.c (interval_insert_behind_hooks): Now static.
15684 (interval_insert_in_front_hooks): Likewise.
15685
64520e5c
PE
15686 * term.c: Make symbols static if they're not exported.
15687 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
15688 (max_frame_lines, tty_set_terminal_modes):
15689 (tty_reset_terminal_modes, tty_turn_off_highlight):
15690 (get_tty_terminal): Now static.
15691 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
15692 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 15693 HAVE_WINDOW_SYSTEM.
64520e5c
PE
15694 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
15695 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
15696
1fa53021
PE
15697 * sysdep.c: Make symbols static if they're not exported.
15698 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
15699 Now static.
15700 (sigprocmask_set, full_mask): Remove; unused.
15701 (wait_debugging): Mark as visible.
15702 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
15703 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
15704
d4b43b22
PE
15705 * syntax.c (syntax_temp): Define only if !__GNUC__.
15706
b7c513d0
PE
15707 * sound.c (current_sound_device, current_sound): Now static.
15708
989b29ad
PE
15709 * search.c (searchbufs, searchbuf_head): Now static.
15710
13a55a78
PE
15711 * scroll.c (scroll_cost): Remove; unused.
15712 * dispextern.h (scroll_cost): Remove decl.
15713
de68a1fc
PE
15714 * region-cache.h (pp_cache): Mark as externally visible.
15715
40ccffa6
PE
15716 * process.c: Make symbols static if they're not exported.
15717 (process_tick, update_tick, create_process, chan_process):
15718 (Vprocess_alist, proc_buffered_char, datagram_access):
15719 (fd_callback_data, send_process_frame, process_sent_to): Now static.
15720 (deactivate_process): Mark defn as static, as well as decl.
15721 * lisp.h (create_process): Remove decl.
15722 * process.h (chan_process, Vprocess_alist): Remove decls.
15723
ad64fc97
PE
15724 * print.c: Make symbols static if they're not exported.
15725 (print_depth, new_backquote_output, being_printed, print_buffer):
15726 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
15727 (print_interval, print_number_index, initial_stderr_stream):
15728 Now static.
15729 * lisp.h (Fprinc): Remove decl.
15730 (debug_output_compilation_hack): Mark as externally visible.
15731
adddb265
PE
15732 * sysdep.c (croak): Move decl from here to syssignal.h.
15733 * syssignal.h (croak): Put it here, so the API can be checked when
15734 'croak' is called from dissociate_if_controlling_tty.
15735
1717ede2
PE
15736 * minibuf.c: Make symbols static if they're not exported.
15737 (minibuf_save_list, choose_minibuf_frame): Now static.
15738 * lisp.h (choose_minibuf_frame): Remove decl.
15739
fa5fb2bc
PE
15740 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
15741
1e3890d1
PE
15742 * lread.c: Make symbols static if they're not exported.
15743 (read_objects, initial_obarray, oblookup_last_bucket_number):
15744 Now static.
15745 (make_symbol): Remove; unused.
15746 * lisp.h (initial_obarray, make_symbol): Remove decls.
15747
8a1414fa
PE
15748 * keyboard.c: Make symbols static if they're not exported.
15749 (single_kboard, recent_keys_index, total_keys, recent_keys):
15750 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
15751 (this_single_command_key_start, echoing, last_auto_save):
15752 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
15753 (command_loop, echo_now, keyboard_init_hook, help_char_p):
15754 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
15755 (Vlispy_mouse_stem, double_click_count):
15756 Now static.
15757 (force_auto_save_soon): Define only if SIGDANGER.
15758 (ignore_mouse_drag_p): Now static if
15759 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
15760 (print_help): Remove; unused.
15761 (stop_character, last_timer_event): Mark as externally visible.
15762 * keyboard.h (ignore_mouse_drag_p): Declare only if
15763 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
15764 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
15765 * lisp.h (echoing): Remove decl.
15766 (force_auto_save_soon): Declare only if SIGDANGER.
15767 * xdisp.c (redisplay_window): Simplify code, to make it more
15768 obvious that ignore_mouse_drag_p is not accessed if !defined
15769 USE_GTK && !defined HAVE_NS.
15770
93ea6e8f
PE
15771 * intervals.c: Make symbols static if they're not exported.
15772 (merge_properties_sticky, merge_interval_right, delete_interval):
15773 Now static.
15774 * intervals.h (merge_interval_right, delete_interval): Remove decls.
15775
77382fcc
PE
15776 * insdel.c: Make symbols static if they're not exported.
15777 However, leave prepare_to_modify_buffer alone. It's never
15778 called from outside this function, but that appears to be a bug.
15779 (combine_after_change_list, combine_after_change_buffer):
4889fc82 15780 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
15781 (adjust_after_replace_noundo): Remove; unused.
15782 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 15783 (signal_before_change): Remove decls.
77382fcc 15784
9306c32e
PE
15785 * indent.c (val_compute_motion, val_vmotion): Now static.
15786
cd44d2eb
PE
15787 * image.c: Make symbols static if they're not exported.
15788 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
15789 if USE_GTK.
15790 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
15791 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
15792
ad9a7a06
PE
15793 * fringe.c (standard_bitmaps): Now static.
15794 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
15795
81626931
PE
15796 * frame.c: Make symbols static if they're not exported.
15797 (x_report_frame_params, make_terminal_frame): Now static.
15798 (get_frame_param): Now static, unless HAVE_NS.
15799 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
15800 (x_get_resource_string): Remove; not used.
15801 * frame.h (make_terminal_frame, x_report_frame_params):
15802 (x_get_resource_string); Remove decls.
15803 (x_fullscreen_adjust): Declare only if WINDOWSNT.
15804 * lisp.h (get_frame_param): Declare only if HAVE_NS.
15805
239f9db9
PE
15806 * font.c, fontset.c: Make symbols static if they're not exported.
15807 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
15808 (FACE_SUITABLE_FOR_CHAR_P): Use it.
15809 * font.c (font_close_object): Now static.
15810 * font.h (font_close_object): Remove.
15811 * fontset.c (FONTSET_OBJLIST): Remove.
15812 (free_realized_fontset) #if-0 the body, which does nothing.
15813 (face_suitable_for_char_p): #if-0, as it's never called.
15814 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
15815 * xfaces.c (face_at_string_position):
15816 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
15817 since 0 is always ASCII.
15818
dfcf3579
PE
15819 * fns.c (weak_hash_tables): Now static.
15820
5045092b
PE
15821 * fileio.c: Make symbols static if they're not exported.
15822 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
15823 (Vwrite_region_annotation_buffers): Now static.
15824
57a96f5c
PE
15825 * eval.c: Make symbols static if they're not exported.
15826 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
15827 * lisp.h (backtrace_list): Remove decl.
15828
35f08c38
PE
15829 * emacs.c: Make symbols static if they're not exported.
15830 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
15831 (fatal_error_code, fatal_error_signal_hook, standard_args):
15832 Now static.
15833 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
15834 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
15835 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
15836 * lisp.h (fatal_error_signal_hook): Remove decl.
15837 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
15838
f44bd759
PE
15839 * editfns.c: Move a (normally-unused) function to its only use.
15840 * editfns.c, lisp.h (get_operating_system_release): Remove.
15841 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
15842 worth the hassle of breaking this out.
15843
b532497d
PE
15844 * xterm.c: Make symbols static if they're not exported.
15845 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
15846 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
15847 (x_destroy_window, x_delete_display):
15848 Now static.
15849 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
15850 (x_mouse_leave): Remove; unused.
15851 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
15852 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
15853 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
15854 Remove decls.
15855 (x_mouse_leave): Declare only if WINDOWSNT.
15856 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
15857 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
15858 USE_X_TOOLKIT.
15859
1675728f
PE
15860 * ftxfont.c: Make symbols static if they're not exported.
15861 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
15862 HAVE_FREETYPE.
15863 * font.h (ftxfont_driver): Likewise.
15864
e4cebfca
PE
15865 * xfns.c: Make symbols static if they're not exported.
15866 (x_last_font_name, x_display_info_for_name):
15867 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
15868 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
15869 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
15870 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
15871 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
15872 (last_show_tip_args): Now static.
15873 (xic_defaut_fontset, xic_create_fontsetname): Define only if
15874 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
15875 (x_screen_planes): Remove; unused.
15876 * dispextern.h (x_screen_planes): Remove decl.
15877
5bf46f05
PE
15878 * dispnew.c: Make symbols static if they're not exported.
15879 * dispextern.h (redraw_garbaged_frames, scrolling):
15880 (increment_row_positions): Remove.
15881 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
15882 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
15883 Now static.
15884 (redraw_garbaged_frames): Remove; unused.
15885
435f4c28
PE
15886 * xfaces.c: Make symbols static if they're not exported.
15887 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
15888 Remove decls.
15889 * xterm.h (defined_color): Remove decls.
15890 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
15891 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
15892 (menu_face_changed_default, defined_color, free_realized_face):
15893 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
15894 (ascii_face_of_lisp_face): Remove; unused.
15895
8524aef3
PE
15896 * xdisp.c: Make symbols static if they're not exported.
15897 * dispextern.h (scratch_glyph_row, window_box_edges):
15898 (glyph_to_pixel_coords, set_cursor_from_row):
15899 (get_next_display_element, set_iterator_to_next):
15900 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
15901 (show_mouse_face): Remove decls
15902 * frame.h (message_buf_print): Likewise.
15903 * lisp.h (pop_message, set_message, check_point_in_composition):
15904 Likewise.
15905 * xterm.h (set_vertical_scroll_bar): Likewise.
15906 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
15907 (message_buf_print, scratch_glyph_row, displayed_buffer):
15908 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
15909 (get_next_display_element, show_mouse_face, window_box_edges):
15910 (frame_to_window_pixel_xy, check_point_in_composition):
15911 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
15912 (glyph_to_pixel_coords): Remove; unused.
15913
16390cd2
PE
15914 * dired.c (file_name_completion): Now static.
15915
15916 * dbusbind.c (xd_in_read_queued_messages): Now static.
15917
a25f4dfa
PE
15918 * lisp.h (circular_list_error, FOREACH): Remove; unused.
15919 * data.c (circular_list_error): Remove.
15920
14a9c8df
PE
15921 * commands.h (last_point_position, last_point_position_buffer):
15922 (last_point_position_window): Remove decls.
15923 * keyboard.c: Make these variables static.
15924
04f2d78b
CB
15925 * coding.h (coding, code_convert_region, encode_coding_gap):
15926 Remove decls.
74ab6df5
PE
15927 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
15928 (iso_code_class, detect_coding, code_convert_region): Now static.
15929 (encode_coding_gap): Remove; unused.
15930
38dfbee1
PE
15931 * chartab.c (chartab_chars, chartab_bits): Now static.
15932
a2cb4e63
PE
15933 * charset.h (charset_iso_8859_1): Remove decl.
15934 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
15935 Now static.
15936
127198fd
PE
15937 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
15938 * ccl.c (Vccl_program_table): Now static.
15939 (check_ccl_update): Remove; unused.
15940
d85b608f
PE
15941 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
15942 * category.h: ... from here.
15943 * category.c (check_category_table, set_category_set): Now static.
15944
31cd66f3
PE
15945 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
15946 * lisp.h: Remove these decls.
15947
c358e587
PE
15948 * buffer.c (buffer_count): Remove unused var.
15949
e78aecca
PE
15950 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
15951 so that it's not optimized away.
15952 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
15953 * dispextern.h (bidi_dump_cached_states): Remove, since it's
15954 exported only to the debugger.
15955
e192d7d3 15956 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 15957 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 15958
92470028
PE
15959 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
15960 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
15961 was inaccessible from Lisp.
15962 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
15963 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
15964
244ed907
PE
15965 alloc.c: Import and export fewer symbols, and remove unused items.
15966 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
15967 is defined.
15968 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
15969 it's not optimized away by whole-program optimization.
15970 (message_enable_multibyte, free_misc): Remove.
15971 (catchlist, handlerlist, mark_backtrace):
15972 Declare only if BYTE_MARK_STACK.
15973 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
15974 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
15975 (message_enable_multibyte): Remove decl.
15976 (free_misc, interval_free_list, float_block, float_block_index):
15977 (n_float_blocks, float_free_list, cons_block, cons_block_index):
15978 (cons_free_list, last_marked_index):
15979 Now static.
15980 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
15981 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
15982 (mark_backtrace): Define only if BYTE_MARK_STACK.
15983 * xdisp.c (message_enable_multibyte): Now static.
15984
61c2b50e 15985 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
15986 This makes it easier for human readers (and static analyzers)
15987 to see whether these variables are used from other modules.
15988 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
15989 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
15990 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
15991 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
15992 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
15993 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
15994 * xmenu.c, xselect.c:
15995 Declare Q* vars static if they are not used in other modules.
15996 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
15997 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
15998 Remove decls of unexported vars.
15999 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
16000
95c82688
PE
16001 * lisp.h (DEFINE_FUNC): Make sname 'static'.
16002
16a97296
PE
16003 Make Emacs functions such as Fatom 'static' by default.
16004 This makes it easier for human readers (and static analyzers)
16005 to see whether these functions can be called from other modules.
16006 DEFUN now defines a static function. To make the function external
16007 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
16008 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
16009 (Finit_image_library):
16a97296
PE
16010 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
16011 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
16012 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
16013 Remove decls, since these functions are now static.
16014 (Funintern, Fget_internal_run_time): New decls, since these functions
16015 were already external.
95c82688 16016
16a97296
PE
16017 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
16018 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
16019 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
16020 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
16021 * keyboard.c, keymap.c, lread.c:
16022 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
16023 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
16024 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
16025 Mark functions with DEFUE instead of DEFUN,
16026 if they are used in other modules.
16027 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
16028 decls for now-static functions.
16029 * buffer.h (Fdelete_overlay): Remove decl.
16030 * callproc.c (Fgetenv_internal): Mark as internal.
16031 * composite.c (Fremove_list_of_text_properties): Remove decl.
16032 (Fcomposition_get_gstring): New forward static decl.
16033 * composite.h (Fcomposite_get_gstring): Remove decl.
16034 * dired.c (Ffile_attributes): New forward static decl.
16035 * doc.c (Fdocumntation_property): New forward static decl.
16036 * eval.c (Ffetch_bytecode): New forward static decl.
16037 (Funintern): Remove extern decl; now in .h file where it belongs.
16038 * fileio.c (Fmake_symbolic_link): New forward static decl.
16039 * image.c (Finit_image_library): New forward static decl.
16040 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
16041 * intervals.h (Fprevious_property_change):
16042 (Fremove_list_of_text_properties): Remove decls.
16043 * keyboard.c (Fthis_command_keys): Remove decl.
16044 (Fcommand_execute): New forward static decl.
16045 * keymap.c (Flookup_key): New forward static decl.
16046 (Fcopy_keymap): Now static.
16047 * keymap.h (Flookup_key): Remove decl.
16048 * process.c (Fget_process): New forward static decl.
16049 (Fprocess_datagram_address): Mark as internal.
16050 * syntax.c (Fsyntax_table_p): New forward static decl.
16051 (skip_chars): Remove duplicate decl.
16052 * textprop.c (Fprevious_property_change): New forward static decl.
16053 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
16054 Now internal.
16055 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
16056 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
16057
785bbd42
PE
16058 * editfns.c (Fformat): Remove unreachable code.
16059
8b913b57
AS
160602011-04-14 Andreas Schwab <schwab@linux-m68k.org>
16061
16062 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
16063 change. (Bug#8496)
16064
a6744a35
EZ
160652011-04-13 Eli Zaretskii <eliz@gnu.org>
16066
16067 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
16068 when at ZV. (Bug#8487)
16069
e7974947
AS
160702011-04-12 Andreas Schwab <schwab@linux-m68k.org>
16071
baad03f0
AS
16072 * charset.c (Fclear_charset_maps): Use xfree instead of free.
16073 (Bug#8437)
16074 * keyboard.c (parse_tool_bar_item): Likewise.
16075 * sound.c (sound_cleanup, alsa_close): Likewise.
16076 * termcap.c (tgetent): Likewise.
16077 * xfns.c (x_default_font_parameter): Likewise.
16078 * xsettings.c (read_and_apply_settings): Likewise.
16079
e7974947
AS
16080 * alloc.c (overrun_check_malloc, overrun_check_realloc)
16081 (overrun_check_free): Protoize.
16082
28272684
PE
160832011-04-12 Paul Eggert <eggert@cs.ucla.edu>
16084
16085 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
16086 since callers should never pass a negative size.
16087 Change the signature to match that of plain 'read' and 'write'; see
16088 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
16089 * lisp.h: Update prototypes of emacs_write and emacs_read.
16090
11997c76
EZ
160912011-04-11 Eli Zaretskii <eliz@gnu.org>
16092
16093 * xdisp.c (redisplay_window): Don't try to determine the character
16094 position of the scroll margin if the window start point w->startp
e896f03c 16095 is outside the buffer's accessible region. (Bug#8468)
11997c76 16096
8a2cbd72
EZ
160972011-04-10 Eli Zaretskii <eliz@gnu.org>
16098
16099 Fix write-region and its subroutines for buffers > 2GB.
16100 * fileio.c (a_write, e_write): Modify declaration of arguments and
16101 local variables to support buffers larger than 2GB.
16102 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
16103
16104 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
16105 argument, local variables, and return value.
16106
16107 * lisp.h: Update prototypes of emacs_write and emacs_read.
16108
16109 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
16110
4073e537 161112011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 16112
1ebfdcb6
PE
16113 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
16114
b2ded58d
PE
16115 Fix more problems found by GCC 4.6.0's static checks.
16116
7d66342c
PE
16117 * xdisp.c (vmessage): Use a better test for character truncation.
16118
bbf47d44
PE
16119 * charset.c (load_charset_map): <, not <=, for optimization,
16120 and to avoid potential problems with integer overflow.
9248994d 16121 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 16122 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 16123 * editfns.c (Fformat): Likewise.
1e69125e 16124 * syntax.c (skip_chars): Likewise.
3befa583 16125
e3019616
PE
16126 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
16127 This also lets GCC 4.6.0 generate slightly better loop code.
16128
becfa255
PE
16129 * callint.c (Fcall_interactively): <, not <=, for optimization.
16130 (Fcall_interactively): Count the number of arguments produced,
16131 not the number of arguments given. This is simpler and lets GCC
16132 4.6.0 generate slightly better code.
16133
dae0cd48
PE
16134 * ftfont.c: Distingish more carefully between FcChar8 and char.
16135 The previous code passed unsigned char * to a functions like
16136 strlen and xstrcasecmp that expect char *, which does not
16137 conform to the C standard.
16138 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
16139 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
16140 char * when the C standard requires it.
16141
76032d70
PE
16142 * keyboard.c (read_char): Remove unused var.
16143
eb3f1cc8
PE
16144 * eval.c: Port to Windows vsnprintf (Bug#8435).
16145 Include <limits.h>.
16146 (SIZE_MAX): Define if the headers do not.
16147 (verror): Do not give up if vsnprintf returns a negative count.
16148 Instead, grow the buffer. This ports to Windows vsnprintf, which
16149 does not conform to C99. Problem reported by Eli Zaretskii.
16150 Also, simplify the allocation scheme, by avoiding the need for
16151 calling realloc, and removing the ALLOCATED variable.
16152
70476b54
PE
16153 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
16154
12020a9e
PE
16155 Remove invocations of doprnt, as Emacs now uses vsnprintf.
16156 But keep the doprint source code for now, as we might revamp it
16157 and use it again (Bug#8435).
ea6c7ae6
PE
16158 * lisp.h (doprnt): Remove.
16159 * Makefile.in (base_obj): Remove doprnt.o.
16160 * deps.mk (doprnt.o): Remove.
16161
5fdb398c
PE
16162 error: Print 32- and 64-bit integers portably (Bug#8435).
16163 Without this change, on typical 64-bit hosts error ("...%d...", N)
16164 was used to print both 32- and 64-bit integers N, which relied on
16165 undefined behavior.
61bdb816 16166 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
16167 * lisp.h (error, verror): Mark as printf-like functions.
16168 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
16169 Report overflow in size calculations when allocating printf buffer.
16170 Do not truncate output string at its first null byte.
16171 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
16172 Truncate the output at a character boundary, since vsnprintf does not
16173 do that.
16174 * charset.c (check_iso_charset_parameter): Convert internal
16175 character to string before calling 'error', since %c now has the
16176 printf meaning.
16177 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
16178 overflow when computing char to be passed to 'error'. Do not
16179 pass Lisp_Object to 'error'; pass the integer instead.
16180 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
16181 formatted with plain %d.
16182
b189fa66
PE
16183 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
16184
bff87ef0
PE
16185 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
16186
7e2cac20
PE
16187 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
16188
ce4d90b5
PE
16189 * xterm.c (x_catch_errors): Remove duplicate declaration.
16190
266c9547
PE
16191 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
16192
79c49ad2
PE
16193 * xdisp.c, lisp.h (message_nolog): Remove; unused.
16194
368f4090
JM
161952011-04-10 Jim Meyering <meyering@redhat.com>
16196
16197 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
16198 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
16199 return ssize_t not "int", and use size_t as the buffer length.
16200 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
16201 * gnutls.h: Update declarations.
16202 * process.c (read_process_output): Use ssize_t, to match.
16203 (send_process): Likewise.
16204
a32d4040
CY
162052011-04-09 Chong Yidong <cyd@stupidchicken.com>
16206
16207 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
16208
8546720e 162092011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 16210
04f2d78b
CB
16211 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
16212 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 16213
8546720e
GM
16214 * xterm.c (handle_one_xevent):
16215 * xmenu.c (create_and_show_popup_menu):
16216 * xselect.c (x_decline_selection_request)
16217 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 16218
0a2f5c1a 162192011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
16220
16221 Fix some uses of `int' instead of EMACS_INT.
16222 * search.c (string_match_1, fast_string_match)
16223 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
16224 (scan_buffer, find_next_newline_no_quit)
16225 (find_before_next_newline, search_command, Freplace_match)
16226 (Fmatch_data): Make some `int' variables be EMACS_INT.
16227
16228 * xdisp.c (display_count_lines): 3rd argument and return value now
16229 EMACS_INT. All callers changed.
16230 (pint2hrstr): Last argument is now EMACS_INT.
16231
16232 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
16233 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
16234 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
16235 (decode_coding_utf_16, decode_coding_emacs_mule)
16236 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
16237 (decode_coding_ccl, decode_coding_charset)
16238 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
16239 (decode_coding_iso_2022, decode_coding_emacs_mule)
16240 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
16241 <char_offset, last_offset>: Declare EMACS_INT.
16242 (encode_coding_utf_8, encode_coding_utf_16)
16243 (encode_coding_emacs_mule, encode_invocation_designation)
16244 (encode_designation_at_bol, encode_coding_iso_2022)
16245 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
16246 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
16247 Declare EMACS_INT.
16248 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
16249 (encode_invocation_designation): Last argument P_NCHARS is now
16250 EMACS_INT.
16251 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
16252 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
16253
16254 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
16255 All users changed.
16256
16257 * ccl.c (Fccl_execute_on_string): Declare some variables
16258 EMACS_INT.
16259
8546720e 162602011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
16261
16262 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
16263
4e19a977
CS
162642011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
16265
16266 * process.c (Fformat_network_address): Doc fix.
16267
87302331
R
162682011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
16269
ee7683eb 16270 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 16271
cbb59342
CY
162722011-04-08 Chong Yidong <cyd@stupidchicken.com>
16273
16274 * keyboard.c (read_char): Call Lisp function help-form-show,
16275 instead of using internal_with_output_to_temp_buffer.
16276 (Qhelp_form_show): New var.
e0d38eeb 16277 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
16278
16279 * print.c (internal_with_output_to_temp_buffer): Function deleted.
16280
16281 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
16282
e67a13ab
CY
162832011-04-06 Chong Yidong <cyd@stupidchicken.com>
16284
04f2d78b
CB
16285 * process.c (Flist_processes): Remove to Lisp.
16286 (list_processes_1): Delete.
e67a13ab 16287
973f782d
EZ
162882011-04-06 Eli Zaretskii <eliz@gnu.org>
16289
7c106b1e
EZ
16290 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
16291
973f782d
EZ
16292 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
16293
41cf7d1a 162942011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 16295
ca23cc88
PE
16296 Fix more problems found by GCC 4.6.0's static checks.
16297
f390e2d5
PE
16298 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
16299
42eea0d0
PE
16300 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
16301
b69769da 16302 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 16303
f9541e84
PE
16304 * xdisp.c (vmessage): Mark as a printf-like function.
16305
13841b55
PE
16306 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
16307
c136c10f
PE
16308 * sound.c (sound_warning): Don't crash if arg contains a printf format.
16309
5e2d4a30
PE
16310 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
16311 printf-like functions.
16312 (tiff_load): Add casts to remove these marks before passing them
16313 to system-supplied API.
16314
583f48b9
PE
16315 * eval.c (Fsignal): Remove excess argument to 'fatal'.
16316
b25d760e
PE
16317 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
16318 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
16319 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
16320 directly, rather than having caller test rule sign. This avoids
16321 some unnecessary tests.
16322 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
16323 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
16324 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 16325
bc7b6697 16326 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 16327 (xfont_open): Avoid unnecessary tests.
bc7b6697 16328
27ccc379
PE
16329 * composite.c (composition_gstring_put_cache): Use unsigned integer.
16330
dcd5c89a
PE
16331 * composite.h, composite.c (composition_gstring_put_cache):
16332 Use EMACS_INT, not int, for length.
16333
b13a45c6
PE
16334 * composite.h (COMPOSITION_DECODE_REFS): New macro,
16335 breaking out part of COMPOSITION_DECODE_RULE.
16336 (COMPOSITION_DECODE_RULE): Use it.
16337 * composite.c (get_composition_id): Remove unused local vars,
16338 by using the new macro.
16339
1e792e4d
PE
16340 * textprop.c (set_text_properties_1): Change while to do-while,
16341 since the condition is always true at first.
16342
dc6c6455 16343 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
16344 (interval_deletion_adjustment): Return unsigned value.
16345 All uses changed.
dc6c6455 16346
aba7731a
PE
16347 * process.c (list_processes_1, create_pty, read_process_output):
16348 (exec_sentinel): Remove vars that were set but not used.
afd4052b 16349 (create_pty): Remove unnecessary "volatile"s.
bc57d757 16350 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 16351 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 16352 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 16353
fdfc4bf3
PE
16354 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
16355
fca8fe46 16356 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 16357 (update_syntax_table): Use unsigned instead of int.
fca8fe46 16358
06a0259a 16359 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 16360 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 16361 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 16362
e7b9e80f
PE
16363 * print.c (print_error_message): Avoid int overflow.
16364
56201685
PE
16365 * font.c (font_list_entities): Redo for clarity,
16366 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
16367
78834453 16368 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 16369 (font_score): Avoid potential overflow in diff calculation.
78834453 16370
0bc0b309 16371 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 16372 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 16373
e610eaca
PE
16374 * eval.c (funcall_lambda): Rename local to avoid shadowing.
16375
b895abce
PE
16376 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
16377 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
16378 can always succeed if overflow has undefined behavior.
16379
1f1d9321 16380 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 16381 (wordify): Omit three unnecessary tests.
1f1d9321 16382
c59478bc
PE
16383 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
16384 All callers changed. This avoids the need for an unused var.
16385
79b73827
PE
16386 * casefiddle.c (casify_region): Remove var that is set but not used.
16387
a4db5dfe
PE
16388 * dired.c (file_name_completion): Remove var that is set but not used.
16389
43aae36e
PE
16390 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
16391
2a47c44d 16392 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 16393 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 16394
a37c69bf
PE
16395 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
16396 Check for integer overflow on size calculations.
16397
328ab8e7
PE
16398 * buffer.c (Fprevious_overlay_change): Remove var that is set
16399 but not used.
16400
e5a2a5cb
PE
16401 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
16402 Remove vars that are set but not used.
8d84a6eb 16403 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 16404 (timer_check_2): Mark vars as initialized.
e5a2a5cb 16405
a60e5f68
PE
16406 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
16407
f661cb61 16408 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 16409 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 16410
f0397f5a
PE
16411 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
16412 that are set but not used.
16413
8664db06 16414 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 16415 if XCreateBitmapFromData fails (Bug#8410).
8664db06 16416
6abdaa4a
PE
16417 * xselect.c (x_get_local_selection, x_handle_property_notify):
16418 Remove vars that are set but not used.
16419
0ce7538d 16420 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 16421 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 16422
9ae848fc
PE
16423 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
16424 Remove var that is set but not used.
0b918413
PE
16425 (scroll_bar_windows_size): Now size_t, not int.
16426 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
16427 Check for overflow.
9ae848fc 16428
a5a62657
PE
16429 * xfaces.c (realize_named_face): Remove vars that are set but not used.
16430 (map_tty_color) [!defined MSDOS]: Likewise.
16431
5c5cdd39
PE
16432 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
16433
66ebf983
PE
16434 * coding.c: Remove vars that are set but not used.
16435 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
16436 All callers changed.
16437 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
16438 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
16439 (decode_coding_charset): Remove vars that are set but not used.
16440
1be4d761
PE
16441 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
16442 that is set but not used.
16443
47553fa8
PE
16444 * print.c (print_object): Remove var that is set but not used.
16445
1f7196bf 16446 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
16447 The gnulib version avoids calling malloc in the usual case,
16448 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
16449 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
16450 * filelock.c (current_lock_owner): Likewise.
16451 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
16452 * sysdep.c: Include allocator.h, careadlinkat.h.
16453 (emacs_no_realloc_allocator): New static constant.
16454 (emacs_readlink): New function.
fdb61804
PE
16455 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
16456 ../lib/careadlinkat.h.
d1fdcab7 16457
f84c17c7
SM
164582011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
16459
16460 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
16461 first non-nil return value).
16462
ef3862ad
JD
164632011-04-03 Jan Djärv <jan.h.d@swipnet.se>
16464
16465 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
16466 if not defined (Bug#8403).
16467
376a7006
JB
164682011-04-02 Juanma Barranquero <lekktu@gmail.com>
16469
16470 * xdisp.c (display_count_lines): Remove parameter `start',
16471 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16472 (get_char_face_and_encoding): Remove parameter `multibyte_p',
16473 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
16474 (fill_stretch_glyph_string): Remove parameters `row' and `area',
16475 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
16476 and thereabouts. All callers changed.
16477 (get_per_char_metric): Remove parameter `f', unused since
16478 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
16479
6ca3801d
JM
164802011-04-02 Jim Meyering <meyering@redhat.com>
16481
16482 do not dereference NULL upon failed strdup
16483 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
16484 (ns_get_family): Likewise.
16485
d8e2b5ba
JB
164862011-04-02 Juanma Barranquero <lekktu@gmail.com>
16487
16488 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
16489
8c74fcbd
JD
164902011-04-02 Jan Djärv <jan.h.d@swipnet.se>
16491
16492 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
16493 later (Bug#8403).
16494
7200d79c
SM
164952011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
16496
03408648 16497 Add lexical binding.
7200d79c 16498
03408648
SM
16499 * window.c (Ftemp_output_buffer_show): New fun.
16500 (Fsave_window_excursion):
16501 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
16502
16503 * lread.c (lisp_file_lexically_bound_p): New function.
16504 (Fload): Bind Qlexical_binding.
16505 (readevalloop): Remove `evalfun' arg.
16506 Bind Qinternal_interpreter_environment.
16507 (Feval_buffer): Bind Qlexical_binding.
16508 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
16509 Mark as dynamic.
16510 (syms_of_lread): Declare `lexical-binding'.
16511
16512 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
16513
16514 * keyboard.c (eval_dyn): New fun.
16515 (menu_item_eval_property): Use it.
ca105506
SM
16516
16517 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 16518
03408648
SM
16519 * fns.c (concat, mapcar1): Accept byte-code-functions.
16520
16521 * eval.c (Fsetq): Handle lexical vars.
16522 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
16523 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
16524 (FletX, Flet): Obey lexical binding.
16525 (Fcommandp): Handle closures.
16526 (Feval): New `lexical' arg.
16527 (eval_sub): New function extracted from Feval. Use it almost
16528 everywhere where Feval was used. Look up vars in lexical env.
16529 Handle closures.
16530 (Ffunctionp): Move from subr.el.
16531 (Ffuncall): Handle closures.
16532 (apply_lambda): Remove `eval_flags'.
16533 (funcall_lambda): Handle closures and new byte-code-functions.
16534 (Fspecial_variable_p): New function.
16535 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
16536 but without exporting it to Lisp.
23aba0ea 16537
23aba0ea 16538 * doc.c (Fdocumentation, store_function_docstring):
03408648 16539 * data.c (Finteractive_form): Handle closures.
23aba0ea 16540
03408648
SM
16541 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
16542 interactive spec.
ba83908c 16543
04f2d78b
CB
16544 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
16545 New byte-codes.
03408648
SM
16546 (exec_byte_code): New function extracted from Fbyte_code to handle new
16547 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 16548
03408648 16549 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 16550
03408648 16551 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 16552
e2abce01
JB
165532011-03-31 Juanma Barranquero <lekktu@gmail.com>
16554
16555 * xdisp.c (redisplay_internal): Fix prototype.
16556
63696a73 165572011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 16558
63696a73 16559 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
16560 (try_scrolling): Use it when setting scroll_limit.
16561 Limit scrolling to 100 screen lines.
63696a73
EZ
16562 (redisplay_window): Even when falling back on "recentering",
16563 position point in the window according to scroll-conservatively,
16564 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
16565
16566 (try_scrolling): When point is above the window, allow searching
16567 as far as scroll_max, or one screenful, to compute vertical
16568 distance from PT to the scroll margin position. This prevents
16569 try_scrolling from unnecessarily failing when
16570 scroll-conservatively is set to a value slightly larger than the
16571 window height. Clean up the case of PT below the margin at bottom
16572 of window: scroll_max can no longer be INT_MAX. When aggressive
16573 scrolling is in use, don't let point enter the opposite scroll
16574 margin as result of the scroll.
16575 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
16576 threshold of 100 lines for never-recentering scrolling.
16577
e4cc2dfc
JB
165782011-03-31 Juanma Barranquero <lekktu@gmail.com>
16579
16580 * dispextern.h (move_it_by_lines):
16581 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
16582 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
16583 (message_log_check_duplicate): Remove parameters `prev_bol' and
16584 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16585 (redisplay_internal): Remove parameter `preserve_echo_area',
16586 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
16587
16588 * indent.c (Fvertical_motion):
16589 * window.c (window_scroll_pixel_based, Frecenter):
16590 Don't pass `need_y_p' to `move_it_by_lines'.
16591
1c470562
SM
165922011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
16593
44f230aa
SM
16594 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
16595 steal a few bits to be more compact.
16596 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
16597 Remove unneeded casts.
16598
1c470562
SM
16599 * bytecode.c (Fbyte_code): CAR and CDR can GC.
16600
888adce9
ZK
166012011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
16602
16603 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
16604 binding" message (bug#7967).
16605
f838ed7b
PE
166062011-03-30 Paul Eggert <eggert@cs.ucla.edu>
16607
77861b95
PE
16608 Fix more problems found by GCC 4.6.0's static checks.
16609
de6dbc14
PE
16610 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
16611 Remove unused local var.
16612
f838ed7b
PE
16613 * editfns.c (Fmessage_box): Remove unused local var.
16614
792c7b2b
PE
16615 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
16616 (note_mode_line_or_margin_highlight, note_mouse_highlight):
16617 Omit unused local vars.
c499e557 16618 * window.c (shrink_windows): Omit unused local var.
b01a1c29 16619 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
16620 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
16621 Omit unused local var.
16622
ba0165e1
PE
16623 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
16624 Don't assume string length fits in int.
32ad8845 16625 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 16626 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 16627
3c59b4c9
PE
16628 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
16629 instead of alloca (Bug#8344).
16630
a3eed478 16631 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 16632 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 16633
eb4d412d
PE
16634 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
16635
1658b401
PE
16636 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
16637 concerns.
16638
16639 * term.c (produce_glyphless_glyph): Remove unnecessary test.
16640
16641 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 16642
9a2c6e05
PE
16643 * keyboard.c (syms_of_keyboard): Use the same style as later
16644 in this function when indexing through an array. This also
16645 works around GCC bug 48267.
16646
03d0a109
PE
16647 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
16648
44f730c8
PE
16649 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
16650
fe75f926
PE
16651 * chartab.c (sub_char_table_ref_and_range): Redo for slight
16652 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
16653
ffa8c828
PE
16654 * keyboard.c, keyboard.h (num_input_events): Now size_t.
16655 This avoids undefined behavior on integer overflow, and is a bit
16656 more convenient anyway since it is compared to a size_t variable.
16657
c5101a77
PE
16658 Variadic C functions now count arguments with size_t, not int.
16659 This avoids an unnecessary limitation on 64-bit machines, which
16660 caused (substring ...) to crash on large vectors (Bug#8344).
16661 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
16662 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 16663 All variadic functions and their callers changed accordingly.
c5101a77
PE
16664 (struct gcpro.nvars): Now size_t, not int. All uses changed.
16665 * data.c (arith_driver, float_arith_driver): Likewise.
16666 * editfns.c (general_insert_function): Likewise.
16667 * eval.c (struct backtrace.nargs, interactive_p)
16668 (internal_condition_case_n, run_hook_with_args, apply_lambda)
16669 (funcall_lambda, mark_backtrace): Likewise.
16670 * fns.c (concat): Likewise.
16671 * frame.c (x_set_frame_parameters): Likewise.
16672 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
16673 0 if not found, not -1. All callers changed.
16674
dd3f25f7
PE
16675 * alloc.c (garbage_collect): Don't assume stack size fits in int.
16676 (stack_copy_size): Now size_t, not int.
16677 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
16678
461c2ab9
JB
166792011-03-28 Juanma Barranquero <lekktu@gmail.com>
16680
16681 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
16682 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16683 All callers changed.
16684
16685 * lisp.h (multibyte_char_to_unibyte):
16686 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
16687 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16688 * character.h (CHAR_TO_BYTE8):
16689 * cmds.c (internal_self_insert):
16690 * editfns.c (general_insert_function):
16691 * keymap.c (push_key_description):
16692 * search.c (Freplace_match):
16693 * xdisp.c (message_dolog, set_message_1): All callers changed.
16694
f6d62986
SM
166952011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16696
16697 * keyboard.c (safe_run_hook_funcall): New function.
16698 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
16699 don't set the hook to nil, but remove the offending function instead.
16700 (Qcommand_hook_internal): Remove, unused.
16701 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
16702 Vcommand_hook_internal.
16703
16704 * eval.c (enum run_hooks_condition): Remove.
16705 (funcall_nil, funcall_not): New functions.
16706 (run_hook_with_args): Call each function through a `funcall' argument.
16707 Remove `cond' argument, now redundant.
16708 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
16709 (Frun_hook_with_args_until_failure): Adjust accordingly.
16710 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
16711
1db5b1ad
JB
167122011-03-28 Juanma Barranquero <lekktu@gmail.com>
16713
16714 * dispextern.h (string_buffer_position): Remove declaration.
16715
16716 * print.c (strout): Remove parameter `multibyte', unused since
16717 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
16718
16719 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
16720 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
16721 All callers changed.
16722
16723 * w32.c (_wsa_errlist): Use braces for struct initializers.
16724
16725 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
16726 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
16727 All callers changed.
16728 (string_buffer_position): Likewise. Also, make static (it's never
16729 used outside xdisp.c).
16730 (cursor_row_p): Remove parameter `w', unused since
16731 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
16732 (decode_mode_spec): Remove parameter `precision', introduced during
16733 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
16734 All callers changed.
16735
5ffb62aa
JD
167362011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16737
16738 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
16739
461c2ab9 167402011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
16741
16742 * nsterm.m (ns_menu_bar_is_hidden): New variable.
16743 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
16744 (ns_update_auto_hide_menu_bar): New functions.
16745 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
16746 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
16747 ns_constrain_all_frames.
16748 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
16749 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
16750
5c380ffb
JD
167512011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16752
16753 * nsmenu.m (runDialogAt): Remove argument to timer_check.
16754
9af30bdf
GM
167552011-03-27 Glenn Morris <rgm@gnu.org>
16756
16757 * syssignal.h: Replace RETSIGTYPE with void.
16758 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
16759 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
16760 Replace SIGTYPE with void everywhere.
16761 * s/usg5-4-common.h (SIGTYPE): Remove definition.
16762 * s/template.h (SIGTYPE): Remove commented out definition.
16763
e2abce01
JB
167642011-03-26 Eli Zaretskii <eliz@gnu.org>
16765
16766 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
16767 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
16768
f868cd8a
JB
167692011-03-26 Juanma Barranquero <lekktu@gmail.com>
16770
59eb0929
JB
16771 * w32.c (read_unc_volume): Use parameter `henum', instead of
16772 global variable `wget_enum_handle'.
16773
16774 * keymap.c (describe_vector): Remove parameters `indices' and
16775 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
16776 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
16777
f868cd8a
JB
16778 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
16779
16780 * keyboard.c (timer_check): Remove parameter `do_it_now',
16781 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
16782 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
16783 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
16784
16785 * keyboard.c (read_char):
16786 * w32menu.c (w32_menu_display_help):
16787 * xmenu.c (show_help_event, menu_help_callback):
16788 Adjust calls to `show_help_echo'.
16789
16790 * gtkutil.c (xg_maybe_add_timer):
16791 * keyboard.c (readable_events):
16792 * process.c (wait_reading_process_output):
16793 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
16794
16795 * insdel.c (adjust_markers_gap_motion):
16796 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
16797 (gap_left, gap_right): Don't call it.
16798
2ecf6fdb
CY
167992011-03-25 Chong Yidong <cyd@stupidchicken.com>
16800
16801 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
16802 incurred during fontification.
16803
6b1f9ba4
JB
168042011-03-25 Juanma Barranquero <lekktu@gmail.com>
16805
16806 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
16807 (DEFVAR_PER_BUFFER): Don't pass it.
16808
16809 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
16810 (scrolling_window): Don't pass it.
16811
0f4a96b5
JB
168122011-03-25 Juanma Barranquero <lekktu@gmail.com>
16813
16814 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
16815
16816 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
16817 and `suffix'.
16818 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
16819 of variables specific to SELinux and computation of `encoded_absname'.
16820
16821 * image.c (XPutPixel): Remove unused variable `height'.
16822
16823 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
16824
16825 * unexw32.c (get_section_info): Remove unused variable `section'.
16826
16827 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
16828 (system_process_attributes): Remove unused variable `sess'.
16829 (sys_read): Remove unused variable `err'.
16830
16831 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
16832 (w32_wnd_proc): Remove unused variable `isdead'.
16833 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
16834 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
16835 (x_create_tip_frame): Remove unused variable `tem'.
16836
16837 * w32inevt.c (w32_console_read_socket):
16838 Remove unused variable `no_events'.
16839
16840 * w32term.c (x_draw_composite_glyph_string_foreground):
16841 Remove unused variable `width'.
16842
1149507c
JB
168432011-03-24 Juanma Barranquero <lekktu@gmail.com>
16844
16845 * w32term.c (x_set_glyph_string_clipping):
16846 Don't pass uninitialized region to CombineRgn.
16847
9c88f339
JB
168482011-03-23 Juanma Barranquero <lekktu@gmail.com>
16849
16850 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
16851 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
16852 (Fx_close_connection): Remove unused variable `i'.
16853
16854 * w32font.c (w32font_draw): Return number of glyphs.
16855 (w32font_open_internal): Remove unused variable `i'.
16856 (w32font_driver): Add missing initializer.
16857
16858 * w32menu.c (utf8to16): Remove unused variable `utf16'.
16859 (fill_in_menu): Remove unused variable `items_added'.
16860
16861 * w32term.c (last_mouse_press_frame): Remove static global variable.
16862 (w32_clip_to_row): Remove unused variable `f'.
16863 (x_delete_terminal): Remove unused variable `i'.
16864
16865 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
16866 (NOTHING): Remove unused static global variable.
16867 (uniscribe_check_otf): Remove unused variable `table'.
16868 (uniscribe_font_driver): Add missing initializers.
16869
dee091a3
JD
168702011-03-23 Julien Danjou <julien@danjou.info>
16871
16872 * term.c (Fsuspend_tty, Fresume_tty):
16873 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
16874 * window.c (temp_output_buffer_show):
16875 * insdel.c (signal_before_change):
16876 * frame.c (Fhandle_switch_frame):
16877 * fileio.c (Fdo_auto_save):
16878 * emacs.c (Fkill_emacs):
16879 * editfns.c (save_excursion_restore):
16880 * cmds.c (internal_self_insert):
16881 * callint.c (Fcall_interactively):
16882 * buffer.c (Fkill_all_local_variables):
16883 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
16884 Use Frun_hooks.
0f4a96b5 16885 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 16886 unconditionally since it does the check itself.
dee091a3 16887
2c520ab5 168882011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 16889
c9c49752
PE
16890 Fix more problems found by GCC 4.5.2's static checks.
16891
8abc3f12
PE
16892 * coding.c (encode_coding_raw_text): Avoid unnecessary test
16893 the first time through the loop, since we know p0 < p1 then.
16894 This also avoids a gcc -Wstrict-overflow warning.
16895
a2d26660
PE
16896 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
16897 leading to a memory leak, possible in functions like
16898 load_charset_map_from_file that can allocate an unbounded number
b12ef411 16899 of objects (Bug#8318).
a2d26660 16900
916c72e9
PE
16901 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
16902 that could (at least in theory) be that large.
16903
19ab8a18
PE
16904 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
16905 This is less likely to overflow, and avoids undefined behavior if
16906 overflow does occur. All callers changed. Use strtoul to scan
16907 for the unsigned long integer.
b7cbbd6f
PE
16908 (pint2hrstr): Simplify and tune code slightly.
16909 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 16910
f0641eff
PE
16911 * scroll.c (do_scrolling): Work around GCC bug 48228.
16912 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
16913
7f650bb9
PE
16914 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
16915 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
16916 (validate_x_resource_name): Simplify count usage.
16917 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 16918
37dd57d1
PE
16919 * fileio.c (Fcopy_file): Report error if fchown or fchmod
16920 fail (Bug#8306).
81e56e61 16921
699979fc 16922 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 16923
401bf9b4
PE
16924 * process.c (Fmake_network_process): Use socklen_t, not int,
16925 where POSIX says socklen_t is required in portable programs.
16926 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 16927 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
16928 (Fmake_network_process, server_accept_connection):
16929 (wait_reading_process_output, read_process_output):
16930 Likewise.
16931
b93aacde
PE
16932 * process.c: Rename or move locals to avoid shadowing.
16933 (list_processes_1, Fmake_network_process):
16934 (read_process_output_error_handler, exec_sentinel_error_handler):
16935 Rename or move locals.
4dc343ee 16936 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 16937 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 16938 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 16939 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 16940 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 16941
af8a867c 16942 Make tparam.h and terminfo.c consistent.
44f230aa
SM
16943 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
16944 Include tparam.h instead, since it declares them.
af8a867c
PE
16945 * cm.h (PC): Remove extern decl; tparam.h now does this.
16946 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
16947 * terminfo.c: Include tparam.h, to check interfaces.
16948 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
16949 (tparam): Adjust signature to match interface in tparam.h;
16950 this removes some undefined behavior. Check that outstring and len
16951 are zero, which they always are with Emacs.
16952 * tparam.h (PC, BC, UP): New extern decls.
16953
0248044d 16954 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 16955 (xftfont_open): Rename locals to avoid shadowing.
0248044d 16956
8ff096c1 16957 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
16958 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
16959 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 16960 (ftfont_list): Remove unused local.
49eaafba
PE
16961 (get_adstyle_property, ftfont_pattern_entity):
16962 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
16963 Rename locals to avoid shadowing.
8ff096c1 16964
e2be39f6
PE
16965 * xfont.c (xfont_list_family): Mark var as initialized.
16966
c9735e30
PE
16967 * xml.c (make_dom): Now static.
16968
8f5201ae
PE
16969 * composite.c (composition_compute_stop_pos): Rename local to
16970 avoid shadowing.
b246f932
PE
16971 (composition_reseat_it): Remove unused locals.
16972 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 16973 (composition_update_it): Mark var as initialized.
11b61122
PE
16974 (find_automatic_composition): Mark vars as initialized,
16975 with a FIXME (Bug#8290).
8f5201ae 16976
760fbc2c
PE
16977 character.h: Rename locals to avoid shadowing.
16978 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
16979 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
16980 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
16981 (BUF_DEC_POS): Be more systematic about renaming local temporaries
16982 to avoid shadowing.
16983
ff08eb85
PE
16984 * textprop.c (property_change_between_p): Remove; unused.
16985
fc7bf025
PE
16986 * intervals.c (interval_start_pos): Now static.
16987
235d7abc
PE
16988 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
16989
44f230aa
SM
16990 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
16991 Rename locals to avoid shadowing.
3e7d6594 16992
50060332
PE
16993 * sound.c (wav_play, au_play, Fplay_sound_internal):
16994 Fix pointer signedness.
d01f234b 16995 (alsa_choose_format): Remove unused local var.
c83b8872
PE
16996 (wav_play): Initialize a variable to 0, to prevent undefined
16997 behavior (Bug#8278).
50060332 16998
c4fc4e30
PE
16999 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
17000
918436ed
PE
17001 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
17002
c939f91b
PE
17003 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
17004 clobbering (Bug#8298).
b9c7f648
PE
17005 * sysdep.c (sys_subshell): Likewise.
17006 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 17007
6bd8c144
PE
17008 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
17009 This should get cleaned up, so that child_setup has the
17010 same signature on all platforms.
17011
7710357c 17012 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 17013 (relocate_fd): Rename locals to avoid shadowing.
7710357c 17014
c59da222
CY
170152011-03-22 Chong Yidong <cyd@stupidchicken.com>
17016
17017 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
17018 not to be necessary, and produces flickering.
17019
66b87493
GM
170202011-03-20 Glenn Morris <rgm@gnu.org>
17021
17022 * config.in: Remove file.
17023
45b6f6d5
JB
170242011-03-20 Juanma Barranquero <lekktu@gmail.com>
17025
17026 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
17027 are now in src/globals.h.
17028 (syms_of_minibuf): Remove spurious & from previous change.
17029
cd394be1 170302011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
17031
17032 * minibuf.c (completing-read-function): New variable.
17033 (completing-read-default): Rename from completing-read.
17034 (completing-read): Call completing-read-function.
17035
b14e3e21
CY
170362011-03-19 Juanma Barranquero <lekktu@gmail.com>
17037
17038 * xfaces.c (Fx_load_color_file):
17039 Read color file from absolute filename (bug#8250).
17040
f2b726e6
JB
170412011-03-19 Juanma Barranquero <lekktu@gmail.com>
17042
17043 * makefile.w32-in: Update dependencies.
17044
09f6ff02
EZ
170452011-03-17 Eli Zaretskii <eliz@gnu.org>
17046
17047 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
17048
29a6015a
PE
170492011-03-17 Paul Eggert <eggert@cs.ucla.edu>
17050
a3a6c54e
PE
17051 Fix more problems found by GCC 4.5.2's static checks.
17052
b766f867
PE
17053 * process.c (make_serial_process_unwind, send_process_trap):
17054 (sigchld_handler): Now static.
17055
be02381c
PE
17056 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
17057 That way, the code declares only the vars that it needs.
17058 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
17059 * s/cygwin.h (PTY_ITERATION): Likewise.
17060 * s/darwin.h (PTY_ITERATION): Likewise.
17061 * s/gnu-linux.h (PTY_ITERATION): Likewise.
17062
57048744
PE
17063 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
17064 * process.c (allocate_pty): Don't declare stb unless it's needed.
17065
7914961c 17066 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
17067 (CONSTANTLIM): Remove; unused.
17068 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
17069 Define only if needed.
7914961c 17070
b3967b18
PE
17071 * unexelf.c (unexec): Name an expression,
17072 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
17073 Use a different way to cause a compilation error if anyone uses
17074 n rather than nn, a way that does not involve shadowing.
73366a00 17075 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 17076
29a6015a
PE
17077 * deps.mk (unexalpha.o): Remove; unused.
17078
43cfc33e 17079 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 17080 * unexec.h: New file.
ce701a33
PE
17081 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
17082 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
17083 Depend on unexec.h.
17084 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
17085 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
17086 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 17087 Change as necessary to match prototype in unexec.h.
ce701a33 17088
01f44d5a
PE
17089 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
17090 shadowing.
4f63c6bb 17091 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 17092
a6670b0b
PE
17093 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
17094 Rename locals to avoid shadowing.
17095
cef2010d 17096 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 17097 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 17098
d4d7173a
PE
17099 * print.c (Fredirect_debugging_output): Fix pointer signedess.
17100
f08b802a
PE
17101 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
17102 warning when compiling print.c.
17103
3ddb0639
PE
17104 * font.c (font_unparse_fcname): Abort in an "impossible" situation
17105 instead of using an uninitialized var.
5ad03b97 17106 (font_sort_entities): Mark var as initialized.
3ddb0639 17107
170a2692
PE
17108 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
17109
e663c700
PE
17110 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
17111 pointers to constants.
89bc529a 17112 (font_parse_fcname): Remove unused vars.
7b81e2d0 17113 (font_delete_unmatched): Now static.
ea838e10 17114 (font_get_spec): Remove; unused.
13a547c6
PE
17115 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
17116 (font_update_drivers, Ffont_get_glyphs, font_add_log):
17117 Rename or move locals to avoid shadowing.
e663c700 17118
2a80c887 17119 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 17120 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 17121
1384fa33 17122 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 17123 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 17124
8b2c52e9
PE
17125 * alloc.c (mark_backtrace): Move decl from here ...
17126 * lisp.h: ... to here, so that it can be checked.
17127
475545b5 17128 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 17129 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
17130 (lisp_indirect_variable): Name an expression,
17131 to avoid gcc -Wbad-function-cast warning.
1faed8ae 17132 (Fdefvar): Rename locals to avoid shadowing.
475545b5 17133
b1349114 17134 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 17135 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 17136 Use const pointer when appropriate.
b1349114 17137
a2928364
PE
17138 * lisp.h (get_system_name, get_operating_system_release):
17139 Move decls here, to check interfaces.
17140 * process.c (get_operating_system_release): Move decl to lisp.h.
17141 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
17142 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
17143 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
17144 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
17145 (Fformat_time_string, Fencode_time, Finsert_char):
17146 (Ftranslate_region_internal, Fformat):
17147 Rename or remove local vars to avoid shadowing.
9710023e 17148 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 17149
a415e694
PE
17150 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
17151 avoid shadowing.
17152
8ef4622d
PE
17153 * lisp.h (eassert): Check that the argument compiles, even if
17154 ENABLE_CHECKING is not defined.
17155
946f9a5b
PE
17156 * data.c (Findirect_variable): Name an expression, to avoid
17157 gcc -Wbad-function-cast warning.
112396d6 17158 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 17159 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
17160 (Fmake_variable_buffer_local, Fmake_local_variable):
17161 Mark variables as initialized.
52746918 17162 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 17163
e5aab7e7 17164 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
17165 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
17166 Rename locals to avoid shadowing.
dff45157
PE
17167 (mark_stack): Move local variables into the #ifdef region where
17168 they're used.
7bc26fdb
PE
17169 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
17170 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
17171 needed otherwise.
17172 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
17173 (GC_STRING_CHARS): Remove; not used.
d40d4be1 17174 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 17175
e5aab7e7
PE
17176 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
17177 avoids undefined behavior in theory.
17178
4da60324
PE
17179 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
17180
88043301
PE
17181 Use functions, not macros, for up- and down-casing (Bug#8254).
17182 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
17183 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
17184 to use the following functions instead of these macros.
17185 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
17186 EMACS_INT, since callers assume the returned value fits in int.
17187 (upcase1): Likewise, for UPCASE_TABLE.
17188 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 17189 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 17190 the race-condition problem in the old DOWNCASE.
88043301 17191
19ed5445
PE
17192 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
17193 Rename locals to avoid shadowing.
17194 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
17195 (regex_compile, re_search_2, re_match_2_internal):
17196 Remove unused local vars.
952db0d7
PE
17197 (FREE_VAR): Rewrite so as not to use empty "else",
17198 which gcc can warn about.
da053e48 17199 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
17200 (RETALLOC_IF): Define only if needed.
17201 (WORDCHAR_P): Likewise. This one is never needed, but is used
17202 only in a comment talking about a compiler bug, so put inside
17203 the #if 0 of that comment.
17204 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
17205 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
17206 Remove; unused.
19ed5445 17207
1f3561e4 17208 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
17209 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
17210 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 17211
ded6f8f7
PE
17212 * search.c (simple_search): Remove unused var.
17213
dbd37a95
PE
17214 * dired.c (compile_pattern): Move decl from here ...
17215 * lisp.h: ... to here, so that it can be checked.
17216 (struct re_registers): New forward decl.
17217
7e47afad
PE
17218 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
17219
85f24f61
PE
17220 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
17221 All uses changed.
17222 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
17223 Rename locals to avoid shadowing.
5671df8f 17224 (Fvertical_motion): Mark locals as initialized.
85f24f61 17225
181aa2be 17226 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 17227 (casify_region): Mark local as initialized.
181aa2be 17228
930d429c
PE
17229 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
17230
7082eac6
PE
17231 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
17232 New macros, so that the caller can use some names other than
17233 gcpro1, gcpro2, etc.
17234 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
17235 of the new macros.
17236 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
17237 argument, for consistency with GCPRO2_VAR, etc: it is now the
17238 prefix of the variable, not the variable itself. All uses
17239 changed.
38b2c076
PE
17240 * dired.c (directory_files_internal, file_name_completion):
17241 Rename locals to avoid shadowing.
17242
15206ed9
PE
17243 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
17244 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
17245 dired.c's scmp function, had undefined behavior.
17246 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
17247 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
17248 * buffer.h: ... to here, because these macros use current_buffer,
17249 and the new implementation with inline functions needs to have
17250 current_buffer in scope now, rather than later when the macros
17251 are used.
17252 (downcase, upcase1): New static inline functions.
17253 (DOWNCASE, UPCASE1): Reimplement using these functions.
17254 This avoids undefined behavior in expressions like
17255 DOWNCASE (x) == DOWNCASE (y), which previously suffered
17256 from race conditions in accessing the global variables
17257 case_temp1 and case_temp2.
17258 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
17259 * lisp.h (case_temp1, case_temp2): Remove their decls.
17260 * character.h (ASCII_CHAR_P): Move from here ...
17261 * lisp.h: ... to here, so that the inline functions mentioned
17262 above can use them.
17263
4a6bea26
PE
17264 * dired.c (directory_files_internal_unwind): Now static.
17265
f14b7e14
PE
17266 * fileio.c (file_name_as_directory, directory_file_name):
17267 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
17268 Now static.
2893f146
PE
17269 (file_name_as_directory): Use const pointers when appropriate.
17270 (Fexpand_file_name): Likewise. In particular, newdir might
17271 point at constant storage, so make it a const pointer.
fd4ead52 17272 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
17273 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
17274 signedness issues.
f839df0c
PE
17275 (Fset_file_times, Finsert_file_contents, auto_save_error):
17276 Rename locals to avoid shadowing.
f14b7e14 17277
5716756e 17278 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
17279 (Ftry_completion, Fall_completions): Rename or remove locals
17280 to avoid shadowing.
5716756e 17281
b4c3046a
PE
17282 * marker.c (bytepos_to_charpos): Remove; unused.
17283
b45db522
PE
17284 * lisp.h (verify_bytepos, count_markers): New decls,
17285 so that gcc does not warn that these functions aren't declared.
17286
85876d07
PE
17287 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
17288 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 17289 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 17290 (copy_text): Remove unused local var.
85876d07 17291
03d78a21 17292 * filelock.c (within_one_second): Now static.
b3dd38ab 17293 (lock_file_1): Rename local to avoid shadowing.
03d78a21 17294
5df8f01b
PE
17295 * buffer.c (fix_overlays_before): Mark locals as initialized.
17296 (fix_start_end_in_overlays): Likewise. This function should be
17297 simplified by using pointers-to-pointers, but that's a different
17298 matter.
b1d876f1 17299 (switch_to_buffer_1): Now static.
8f54f30a
PE
17300 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
17301 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 17302
a70072c9 17303 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 17304 Fix pointer signedness issue.
edced198
PE
17305 (sys_subshell): Mark local as volatile if checking for lint,
17306 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 17307 (MAXPATHLEN): Define only if needed.
a70072c9 17308
a0977c44
PE
17309 * process.c (serial_open, serial_configure): Move decls from here ...
17310 * systty.h: ... to here, so that they can be checked.
17311
a884fdcc
PE
17312 * fns.c (get_random, seed_random): Move extern decls from here ...
17313 * lisp.h: ... to here, so that they can be checked.
17314
604efe86 17315 * sysdep.c (reset_io): Now static.
b8950c94 17316 (wait_for_termination_signal): Remove; unused.
604efe86 17317
38fc62d9
PE
17318 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
17319 (copy_keymap_item, append_key, push_text_char_description):
17320 Now static.
1004a21a 17321 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 17322 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
17323 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
17324 (describe_map_tree):
17325 Rename locals to avoid shadowing.
38fc62d9 17326
2f2650da
PE
17327 * keyboard.c: Declare functions static if they are not used elsewhere.
17328 (echo_char, echo_dash, cmd_error, top_level_2):
17329 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
17330 (read_char, kbd_buffer_get_event, make_lispy_position):
17331 (make_lispy_event, make_lispy_movement, apply_modifiers):
17332 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
17333 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
17334 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 17335 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 17336 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 17337
a053e86c 17338 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
17339 (mark_kboards): Move decl here ...
17340 * alloc.c (mark_kboards): ... from here.
a053e86c 17341
4752793e
PE
17342 * lisp.h (force_auto_save_soon): New decl.
17343
74f10ca7 17344 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
17345 (DEFINE_DUMMY_FUNCTION): New macro.
17346 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
17347 Use it.
c03cd23f
PE
17348 (main): Add casts to avoid warnings
17349 if GCC considers string literals to be constants.
74f10ca7 17350
022e70d4
PE
17351 * lisp.h (fatal_error_signal): Add decl, since it's exported.
17352
59d6fe83
PE
17353 * dbusbind.c: Pointer signedness fixes.
17354 (xd_signature, xd_append_arg, xd_initialize):
17355 (Fdbus_call_method, Fdbus_call_method_asynchronously):
17356 (Fdbus_method_return_internal, Fdbus_method_error_internal):
17357 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
17358 (Fdbus_register_signal): Use SSDATA when the context wants char *.
17359
78320123
PE
17360 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
17361 if GCC considers string literals to be constants.
49cebcca 17362 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 17363
35ac2a97
SM
173642011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
17365
fb103ca9
SM
17366 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
17367 (print_preprocess, print_object): New macro to fix last change.
17368
35ac2a97
SM
17369 * print.c (print_preprocess): Don't forget font objects.
17370
62973b41
JB
173712011-03-16 Juanma Barranquero <lekktu@gmail.com>
17372
17373 * emacs.c (USAGE3): Doc fixes.
17374
0e48bb22
AS
173752011-03-15 Andreas Schwab <schwab@linux-m68k.org>
17376
17377 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
17378 structure.
17379
7684e57b
JB
173802011-03-14 Juanma Barranquero <lekktu@gmail.com>
17381
17382 * lisp.h (VWindow_system, Qfile_name_history):
17383 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
17384 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
17385 (w32_system_caret_x, w32_system_caret_y): Declare extern.
17386
17387 * w32select.c: Don't #include "keyboard.h".
c96bbc66 17388 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
17389
17390 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
17391 * w32console.c (detect_input_pending, read_input_pending)
17392 (encode_terminal_code):
17393 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
17394 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
17395 (w32_system_caret_y, Qfile_name_history):
17396 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
17397 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
17398 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
17399 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
17400 * w32proc.c (Qlocal, report_file_error):
17401 * w32term.c (Vwindow_system, updating_frame):
17402 * w32uniscribe.c (initialized, uniscribe_font_driver):
17403 Remove unneeded extern declarations.
17404
2aa46d6c
CY
174052011-03-14 Chong Yidong <cyd@stupidchicken.com>
17406
c96bbc66 17407 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 17408
cffc6f3b
CY
174092011-03-13 Chong Yidong <cyd@stupidchicken.com>
17410
17411 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
17412 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
17413 These macros can no longer be used for assignment.
17414
44f230aa
SM
17415 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
17416 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
17417 (record_buffer_markers, fetch_buffer_markers): New functions for
17418 recording and fetching special buffer markers.
17419 (set_buffer_internal_1, set_buffer_temp): Use them.
17420
17421 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
17422
17423 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
17424
17425 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
17426 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
17427
17428 * xdisp.c (hscroll_window_tree):
17429 (reconsider_clip_changes): Use PT instead of BUF_PT.
17430
d251f04b
EZ
174312011-03-13 Eli Zaretskii <eliz@gnu.org>
17432
17433 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
17434 $(EMACS_ROOT)/lib/intprops.h.
17435
f0c77cd1
PE
174362011-03-13 Paul Eggert <eggert@cs.ucla.edu>
17437
3eca4629
PE
17438 Fix more problems found by GCC 4.5.2's static checks.
17439
7c86ee98
PE
17440 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
17441 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
17442 (xg_free_frame_widgets): Make it clear that a local variable is
17443 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
17444 (gdk_window_get_screen): Make it clear that this macro is needed
17445 only if USE_GTK_TOOLTIP.
1e5524e7
PE
17446 (int_gtk_range_get_value): New function, which avoids a diagnostic
17447 from gcc -Wbad-function-cast.
17448 (xg_set_toolkit_scroll_bar_thumb): Use it.
17449 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
17450 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
17451 (get_utf8_string, xg_get_file_with_chooser):
17452 Rename locals to avoid shadowing.
17453 (create_dialog): Move locals to avoid shadowing.
7c86ee98 17454
41729b81
PE
17455 * xgselect.c (xg_select): Remove unused var.
17456
f0c77cd1
PE
17457 * image.c (four_corners_best): Mark locals as initialized.
17458 (gif_load): Initialize transparent_p to zero (Bug#8238).
17459 Mark another local as initialized.
ec6cf4c6 17460 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 17461
ce0ad53d 17462 * image.c (clear_image_cache): Now static.
d5d5a617 17463 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 17464 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
17465 (x_edge_detection): Remove unnecessary cast that
17466 gcc -Wbad-function-cast diagnoses.
2037898d 17467 (gif_load): Fix pointer signedness.
6ae141d6
PE
17468 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
17469 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 17470
33383987 174712011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 17472
d32df629
PE
17473 Improve quality of tests for time stamp overflow.
17474 For example, without this patch (encode-time 0 0 0 1 1
17475 1152921504606846976) returns the obviously-bogus value (-948597
17476 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
17477 reports time overflow. See
17478 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
17479 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
17480 * editfns.c: Include limits.h and intprops.h.
17481 (TIME_T_MIN, TIME_T_MAX): New macros.
17482 (time_overflow): Move earlier, to before first use.
17483 (hi_time, lo_time): New functions, for an accurate test for
17484 out-of-range times.
17485 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
17486 (Fget_internal_run_time): Don't assume time_t fits in int.
17487 (make_time): Use list2 instead of Fcons twice.
17488 (Fdecode_time): More accurate test for out-of-range times.
17489 (check_tm_member): New function.
17490 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
17491 (lisp_time_argument): Don't rely on undefined left-shift and
17492 right-shift behavior when checking for time stamp overflow.
8be6f318 17493
fe31d94c
PE
17494 * editfns.c (time_overflow): New function, refactoring common code.
17495 (Fformat_time_string, Fdecode_time, Fencode_time):
17496 (Fcurrent_time_string): Use it.
17497
8be6f318
PE
17498 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
17499 * dired.c (make_time): Move to ...
17500 * editfns.c (make_time): ... here.
17501 * systime.h: Note the move.
17502
09d9db2c 175032011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 17504
126bc0dc
YM
17505 * fringe.c (update_window_fringes): Remove unused variables.
17506
c47cbdfd
YM
17507 * unexmacosx.c (copy_data_segment): Also copy __got section.
17508 (Bug#8223)
17509
7ac80be9
EZ
175102011-03-12 Eli Zaretskii <eliz@gnu.org>
17511
c96bbc66 17512 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
17513 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
17514 Constify `char *' arguments and their references according to
17515 prototypes in tparam.h.
17516
ecb0f94d 17517 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 17518
7ac80be9
EZ
17519 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
17520 Adapt all references accordingly.
17521
17522 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
17523
ef1fd07e
TT
175242011-03-11 Tom Tromey <tromey@redhat.com>
17525
17526 * buffer.c (syms_of_buffer): Remove obsolete comment.
17527
7ef4b50c
EZ
175282011-03-11 Eli Zaretskii <eliz@gnu.org>
17529
17530 * termhooks.h (encode_terminal_code): Declare prototype.
17531
17532 * msdos.c (encode_terminal_code): Don't declare prototype.
17533
17534 * term.c (encode_terminal_code): Now external again, used by
17535 w32console.c and msdos.c.
17536
44f230aa
SM
17537 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
17538 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 17539
4b1ec863 175402011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 17541
1714f52b 17542 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 17543
4b1ec863
PE
17544 * fringe.c (update_window_fringes): Mark locals as initialized
17545 (Bug#8227).
17546 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 17547
524c7aa6
PE
17548 * alloc.c (mark_fringe_data): Move decl from here ...
17549 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
17550 to check its interface.
17551 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
17552
a5c0af81 17553 * fontset.c (free_realized_fontset): Now static.
7519b8cd 17554 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 17555 (fontset_font): Mark local as initialized.
a9a06e0b 17556 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 17557
b4716021
PE
17558 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
17559
811e9bac 17560 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 17561 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
17562 (x_own_selection, Fx_disown_selection_internal): Rename locals
17563 to avoid shadowing.
17564 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 17565
7e3ab302
PE
17566 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
17567 so that the caller can use some name other than gcpro1.
17568 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
17569 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17570 (Fx_backspace_delete_keys_p):
17571 Use them to avoid shadowing, and rename vars to avoid shadowing.
17572 (x_decode_color, x_set_name, x_window): Now static.
6b437900 17573 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 17574 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
17575 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
17576 Remove unused locals.
7e3ab302
PE
17577 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17578 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
17579 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
17580 macros.
f78faa98 17581
e2b13473
PE
17582 * xterm.h (x_mouse_leave): New decl.
17583
77f23912
PE
17584 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
17585 Remove unused functions.
cdf4ba58
PE
17586 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
17587 (x_calc_absolute_position): Now static.
7411c686 17588 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 17589 Don't declare local "event" unless it's used.
ed7bf3a5
PE
17590 (x_iconify_frame, x_free_frame_resources): Don't declare locals
17591 unless they are used.
38d0b34a
PE
17592 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
17593 (x_fatal_error_signal): Remove; not used.
a6067996
PE
17594 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
17595 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
17596 (x_error_catcher, x_connection_closed, x_error_handler):
17597 (x_error_quitter, xembed_send_message, x_iconify_frame):
17598 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 17599 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 17600 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 17601
44f230aa
SM
17602 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
17603 Rename or move locals to avoid shadowing.
6b463e58 17604 (tty_defined_color, merge_face_heights): Now static.
5967d051 17605 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
17606 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
17607 does not deduce is never used uninitialized.
73719eba
PE
17608 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
17609 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 17610
426994c3 17611 * terminal.c (store_terminal_param): Now static.
5489860b 17612
032f1620 17613 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 17614 (set_frame_menubar): Remove unused local.
d4323972 17615 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
17616 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
17617 since they might point to immutable storage.
281585b0
PE
17618 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
17619 since it's unused otherwise.
032f1620 17620
367c19e5 17621 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 17622 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
17623 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
17624 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 17625 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
17626 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
17627 does not deduce are never used uninitialized.
70739cbe 17628
07b48fa9
PE
17629 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
17630
8868a238 17631 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
17632 * window.c (window_loop, size_window):
17633 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 17634
7e5cf297 17635 * window.c (display_buffer): Now static.
d6550a9f
PE
17636 (size_window): Mark variables that gcc -Wuninitialized
17637 does not deduce are never used uninitialized.
a586633d
PE
17638 * window.h (check_all_windows): New decl, to forestall
17639 gcc -Wmissing-prototypes diagnostic.
5b555da1 17640 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 17641
f6095868
PE
17642 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
17643 shadowing.
17644 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
17645 Include <limits.h>.
17646 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
17647 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
17648 (load_charset_map): Mark variables that gcc -Wuninitialized
17649 does not deduce are never used uninitialized.
53df7c11 17650 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 17651
f38b440c
PE
17652 * coding.c (coding_set_source, coding_set_destination):
17653 Use "else { /* comment */ }" rather than "else /* comment */;"
17654 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
17655 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
17656 a block, when the outer 'i' will do.
17657 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
17658 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
17659 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
17660 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
17661 (Fdecode_sjis_char, Fdefine_coding_system_internal):
17662 Rename locals to avoid shadowing.
17663 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
17664 * coding.c (emacs_mule_char, encode_invocation_designation):
17665 Now static, since they're not used elsewhere.
413bb2db 17666 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 17667 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
17668 (decode_coding_emacs_mule): Mark variables that gcc
17669 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
17670 (detect_coding_iso_2022): Initialize a local variable that might
17671 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 17672 this initialization is needed. (Bug#8211)
5f58e762
PE
17673 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
17674 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
17675 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
17676 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
17677 Remove unused macros.
f38b440c 17678
232b38b9 17679 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 17680 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 17681 * character.c (string_count_byte8): Likewise.
232b38b9 17682
fb90da1b
PE
17683 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
17684 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
17685
fb93dbc2
PE
17686 * chartab.c (copy_sub_char_table): Now static, since it's not used
17687 elsewhere.
5c156ace
PE
17688 (sub_char_table_ref_and_range, char_table_ref_and_range):
17689 Rename locals to avoid shadowing.
bbcd0949 17690 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 17691
7d3b3862 17692 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 17693 (BIDI_BOB): Remove unused macro.
7d3b3862 17694
6be7d3da
PE
17695 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
17696 deduce are never used uninitialized.
c2ed9c8b 17697 * term.c (encode_terminal_code): Likewise.
6be7d3da 17698
75f8807f 17699 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 17700
50938595
PE
17701 * tparam.h: New file.
17702 * term.c, tparam.h: Include it.
17703 * deps.mk (term.o, tparam.o): Depend on tparam.h.
17704 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
17705 Move these decls to tparam.h, and make them agree with what
17706 is actually in tparam.c. The previous trick of using incompatible
17707 decls in different modules does not conform to the C standard.
17708 All callers of tparam changed to use tparam's actual API.
17709 * tparam.c (tparam1, tparam, tgoto):
17710 Use const pointers where appropriate.
17711
fbceeba2
PE
17712 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
17713 * cm.h (struct cm): Likewise.
17714 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
17715 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
17716 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
17717 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
17718 (turn_on_face, init_tty): Likewise.
17719 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 17720
7f3f1250
PE
17721 * term.c (term_mouse_position): Rename local to avoid shadowing.
17722
e6ca6543
PE
17723 * alloc.c (mark_ttys): Move decl from here ...
17724 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
17725
c40f8d15
AS
177262011-03-11 Andreas Schwab <schwab@linux-m68k.org>
17727
17728 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
17729
cfe0661d
JB
177302011-03-09 Juanma Barranquero <lekktu@gmail.com>
17731
17732 * search.c (compile_pattern_1): Remove argument regp, unused since
17733 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
17734 (compile_pattern): Don't pass it.
17735
0afb4571
J
177362011-03-08 Jan Djärv <jan.h.d@swipnet.se>
17737
17738 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
17739 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
17740 for ! HAVE_GTK3.
17741 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
17742
17743 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
17744
17745 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
17746 gdk_window_get_screen, gdk_window_get_geometry,
17747 gdk_x11_window_lookup_for_display and GDK_KEY_g.
17748 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
17749 (xg_get_pixbuf_from_pixmap): New function.
17750 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
17751 to Pixmap, take frame as parameter, remove GdkColormap parameter.
17752 Call xg_get_pixbuf_from_pixmap instead of
17753 gdk_pixbuf_get_from_drawable.
17754 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
17755 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
17756 (xg_check_special_colors): Use GtkStyleContext and its functions
17757 for HAVE_GTK3.
17758 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
17759 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
17760 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
17761 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
17762 Call gtk_widget_get_preferred_size.
0afb4571
J
17763 (xg_frame_resized): gdk_window_get_geometry only takes 5
17764 parameters.
44f230aa
SM
17765 (xg_win_to_widget, xg_event_is_for_menubar):
17766 Call gdk_x11_window_lookup_for_display.
0afb4571
J
17767 (xg_set_widget_bg): New function.
17768 (delete_cb): New function.
895009e1 17769 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 17770 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
17771 (xg_set_background_color): Call xg_set_widget_bg.
17772 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
17773 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
17774 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
17775 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
17776 if ! HAVE_GTK3.
17777 (update_frame_tool_bar): Call gtk_widget_hide.
17778 (xg_initialize): Use GDK_KEY_g.
17779
17780 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
17781 if ! HAVE_GTK3
17782 (x_session_initialize): Call gdk_x11_set_sm_client_id.
17783
17784 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
17785 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
17786 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
17787
1c2cc4ef
JB
177882011-03-08 Juanma Barranquero <lekktu@gmail.com>
17789
17790 * w32xfns.c (select_palette): Check success of RealizePalette against
17791 GDI_ERROR, not zero.
17792
33383987 17793See ChangeLog.11 for earlier changes.
aac0c6e3
MR
17794
17795;; Local Variables:
17796;; coding: utf-8
aac0c6e3
MR
17797;; End:
17798
2f097256 17799 Copyright (C) 2011-2012 Free Software Foundation, Inc.
aac0c6e3
MR
17800
17801 This file is part of GNU Emacs.
17802
17803 GNU Emacs is free software: you can redistribute it and/or modify
17804 it under the terms of the GNU General Public License as published by
17805 the Free Software Foundation, either version 3 of the License, or
17806 (at your option) any later version.
17807
17808 GNU Emacs is distributed in the hope that it will be useful,
17809 but WITHOUT ANY WARRANTY; without even the implied warranty of
17810 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17811 GNU General Public License for more details.
17812
17813 You should have received a copy of the GNU General Public License
17814 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.