1 2012-09-25 Eli Zaretskii <eliz@gnu.org>
3 * w32proc.c (sys_signal): Handle all signals defined by the
4 MS-Windows runtime, not just SIGCHLD. Actually install the signal
5 handlers for signals supported by Windows. Don't override
6 term_ntproc as the handler for SIGABRT.
7 (sigaction): Rewrite to call sys_signal instead of duplicating its
9 (sys_kill): Improve commentary.
11 * w32.c (term_ntproc): Accept (and ignore) one argument, for
12 consistency with a signature of a signal handler. All callers
14 (init_ntproc): Accept an argument DUMPING. If dumping, don't
15 install term_ntproc as a signal handler for SIGABRT, as that
16 should be done by the dumped Emacs.
18 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
20 * w32select.c (term_w32select): Protect against repeated
21 invocation by setting clipboard_owner to NULL after calling
24 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
25 and term_ntproc to their modified signatures.
27 * character.c (char_string, string_char): Remove calls to
28 MAYBE_UNIFY_CHAR. See the discussion starting at
29 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
32 2012-09-25 Chong Yidong <cyd@gnu.org>
34 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
36 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
38 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
39 when encountering an unknown bytecode.
41 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
43 image.c, indent.c: Use bool for booleans.
44 * dispextern.h (struct image_type): Members valid_p, load, init
45 now return bool, not int. All uses changed.
46 * image.c: Omit unnecessary static decls.
47 (x_create_bitmap_mask, x_build_heuristic_mask):
48 Return void, not int, since callers don't care about the return value.
49 (x_create_bitmap_mask, define_image_type, valid_image_p)
50 (struct image_keyword, parse_image_spec, image_spec_value)
51 (check_image_size, image_background)
52 (image_background_transparent, x_clear_image_1)
53 (postprocess_image, lookup_image, x_check_image_size)
54 (x_create_x_image_and_pixmap, xbm_image_p)
55 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
56 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
57 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
58 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
59 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
60 (png_image_p, init_png_functions, png_load_body, png_load)
61 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
62 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
63 (init_gif_functions, gif_load, imagemagick_image_p)
64 (imagemagick_load_image, imagemagick_load, svg_image_p)
65 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
67 * nsimage.m (ns_load_image):
68 * nsterm.m (ns_defined_color):
69 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
70 * xfns.c (x_defined_color):
71 * xterm.c (x_alloc_lighter_color_for_widget)
72 (x_alloc_nearest_color_1, x_alloc_nearest_color)
73 (x_alloc_lighter_color):
74 * indent.c (disptab_matches_widthtab, current_column)
75 (scan_for_column, string_display_width, indented_beyond_p)
76 (compute_motion, vmotion, Fvertical_motion):
77 Use bool for booleans.
79 2012-09-24 Chong Yidong <cyd@gnu.org>
81 * chartab.c (Fset_char_table_default): Obsolete function removed.
83 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
85 Move pid_t related decls out of lisp.h.
86 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
87 (interruptible_wait_for_termination):
88 Move these decls from lisp.h to syswait.h, since they use pid_t.
89 Needed on FreeBSD; see Herbert J. Skuhra in
90 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
91 * callproc.c: Include syswait.h.
93 gnutls.c, gtkutil.c: Use bool for boolean.
94 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
95 (emacs_gnutls_handle_error):
96 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
97 (xg_hide_tooltip, xg_create_frame_widgets)
98 (create_dialog, xg_uses_old_file_dialog)
99 (xg_get_file_with_chooser, xg_get_file_with_selection)
100 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
101 (xg_item_label_same_p, xg_update_menubar)
102 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
103 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
104 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
105 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
106 (update_frame_tool_bar, free_frame_tool_bar):
107 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
108 * nsmenu.m (ns_update_menubar):
109 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
110 * xfns.c (Fx_show_tip) [USE_GTK]:
111 Use bool for boolean.
112 * gtkutil.c (xg_update_frame_menubar):
113 * xmenu.c (update_frame_menubar):
114 Return void, not int, since caller ignores return value.
115 * gtkutil.c (xg_change_toolbar_position):
118 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
120 * makefile.w32-in (BLOCKINPUT_H): Remove.
121 (SYSSIGNAL_H): New macro.
122 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
123 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
124 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
125 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
126 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
127 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
128 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
129 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
130 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
131 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
132 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
133 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
134 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
135 ($(BLD)/w32xfns.$(O)): Update dependencies.
137 2012-09-23 Eli Zaretskii <eliz@gnu.org>
139 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
140 fatal_error_backtrace.
142 * w32proc.c (sys_kill): Undo last change: don't do anything when
143 invoked to deliver SIGABRT to our own process. This is now
144 handled by emacs_raise.
146 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
148 * w32term.c (w32_read_socket): Remove leftover reference to
149 interrupt_input_pending.
151 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
153 Do not use SA_NODEFER.
154 Problem reported by Dani Moncayo in
155 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
157 * sysdep.c (emacs_abort): Do not reset signal handler.
158 * emacs.c (terminate_due_to_signal): Reset signal handler here.
159 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
160 wanted even on POSIXish hosts, and it doesn't work on Windows.
162 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
164 * xterm.c (x_term_init): Call fixup_locale before and after calling
165 gtk_init (Bug#12392).
167 2012-09-23 Chong Yidong <cyd@gnu.org>
169 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
170 Vdynamic_library_alist.
172 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
173 (Fgnutls_available_p): Caller changed.
175 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
176 (Flibxml_parse_xml_region): Likewise.
178 * dispextern.h (struct image_type): Remove arg from init function.
180 * image.c (Finit_image_library, lookup_image_type)
181 (define_image_type): Remove now-unneeded second arg.
182 (init_xpm_functions, init_png_functions, init_jpeg_functions)
183 (init_tiff_functions, init_gif_functions, init_svg_functions):
184 Arglist and w32_delayed_load calling convention changed.
185 (gs_type): Remove init_gs_functions; there is no such function.
186 (valid_image_p, make_image): Fix caller to lookup_image_type.
188 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
190 Simplify and avoid signal-handling races (Bug#12471).
192 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
193 Avoid recursive loop if there's a fatal error in the function itself.
194 * atimer.c (pending_atimers):
195 * blockinput.h: Don't include "atimer.h"; no longer needed.
196 (interrupt_input_pending): Remove. All uses removed.
197 pending_signals now counts both atimers and ordinary interrupts.
198 This is less racy than having three separate pending-signal flags.
199 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
201 Rename from their upper-case counterparts BLOCK_INPUT,
202 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
203 INPUT_BLOCKED_P, and turn into functions. All uses changed.
204 This makes it easier to access volatile variables more accurately.
205 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
206 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
207 that's more reliable if the code is buggy and sets
208 interrupt_input_blocked to a negative value. All uses changed.
209 * atimer.c (deliver_alarm_signal):
210 Remove. No need to deliver this to the parent; any thread can
211 handle this signal now. All uses replaced by underlying handler.
212 * atimer.c (turn_on_atimers):
213 * dispnew.c (handle_window_change_signal):
214 * emacs.c (handle_danger_signal):
215 * keyboard.c (kbd_buffer_get_event):
216 Don't reestablish signal handler; not needed with sigaction.
217 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
219 Rework to avoid unnecessary accesses to volatile variables.
220 (UNBLOCK_INPUT_TO): Now a function.
221 (totally_unblock_input, unblock_input): New decls.
222 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
223 (init_data): Remove. Necessary stuff now done in init_signal.
224 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
225 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
226 (fatal_error_code): Remove; no longer needed.
227 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
228 it doesn't always backtrace. All uses changed. No need to reset
229 signal to default, since sigaction and/or die does that for us now.
230 Use emacs_raise (FOO), not kill (getpid (), FOO).
231 (main): Check more-accurately whether we're dumping.
232 Move fatal-error setup to sysdep.c
233 * floatfns.c: Do not include "syssignal.h"; no longer needed.
234 * gtkutil.c (xg_get_file_name, xg_get_font):
235 Remove no-longer-needed signal-mask manipulation.
236 * keyboard.c, process.c (POLL_FOR_INPUT):
237 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
238 * keyboard.c (read_avail_input): Remove.
239 All uses replaced by gobble_input.
240 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
241 (kbd_buffer_store_event_hold, gobble_input):
242 (record_asynch_buffer_change) [USABLE_SIGIO]:
243 (store_user_signal_events):
244 No need to mess with signal mask.
245 (gobble_input): If blocking input and there are terminals, simply
246 set pending_signals to 1 and return. All hooks changed to not
247 worry about whether input is blocked.
248 (process_pending_signals): Clear pending_signals before processing
249 them, in case a signal comes in while we're processing.
250 By convention callers now test pending_signals before calling us.
251 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
252 New functions, to support changes to blockinput.h.
253 (handle_input_available_signal): Now extern.
254 (reinvoke_input_signal): Remove. All uses replaced by
256 (quit_count): Now volatile, since a signal handler uses it.
257 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg. All
258 callers changed. Block SIGINT only if not already blocked.
259 Clear sigmask reliably, even if Fsignal returns, which it can.
260 Omit unnecessary accesses to volatile var.
261 (quit_throw_to_read_char): No need to restore sigmask.
262 * keyboard.c (gobble_input, handle_user_signal):
263 * process.c (wait_reading_process_output):
264 Call signal-handling code rather than killing ourselves.
265 * lisp.h: Include <float.h>, for...
266 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
267 (pending_signals): Now volatile.
268 (syms_of_data): Now const if IEEE floating point.
269 (handle_input_available_signal) [USABLE_SIGIO]:
270 (terminate_due_to_signal, record_child_status_change): New decls.
271 * process.c (create_process): Avoid disaster if memory is exhausted
272 while we're processing a vfork, by tightening the critical section
274 (send_process_frame, process_sent_to, handle_pipe_signal)
275 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
277 (send_process): No need for setjmp/longjmp any more, since the
278 SIGPIPE stuff is now gone. Instead, report an error if errno
280 (record_child_status_change): Now extern. PID and W are now args.
281 Return void, not bool. All callers changed.
282 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
283 Remove. All uses removed. This bug should be fixed now in a
285 (wait_for_termination_1): Use waitpid rather than sigsuspend,
286 and record the child status change directly. This avoids the
287 need to futz with the signal mask.
288 (process_fatal_action): Move here from emacs.c.
289 (emacs_sigaction_flags): New function, containing
290 much of what used to be in emacs_sigaction_init.
291 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
292 caught by emacs, to make races less likely.
293 (deliver_process_signal): Rename from handle_on_main_thread.
295 (BACKTRACE_LIMIT_MAX): Now at top level.
296 (thread_backtrace_buffer, threadback_backtrace_pointers):
298 (deliver_thread_signal, deliver_fatal_thread_signal):
299 New functions, for more-accurate delivery of thread-specific signals.
300 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
301 (deliver_arith_signal): Handle in this thread, not
302 in the main thread, since it's triggered by this thread.
303 (maybe_fatal_sig): New function.
304 (init_signals): New arg DUMPING so that we can be more accurate
305 about whether we're dumping. Caller changed.
306 Treat thread-specific signals differently from process-general signals.
307 Block all signals while handling fatal error; that's safer.
308 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
310 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
311 Ignore SIGPIPE unless batch.
312 (emacs_backtrace): Output backtrace for the appropriate thread,
313 which is not necessarily the main thread.
314 * syssignal.h: Include <stdbool.h>.
315 (emacs_raise): New macro.
316 * xterm.c (x_connection_signal): Remove; no longer needed
317 now that we use sigaction.
318 (x_connection_closed): No need to mess with sigmask now.
319 (x_initialize): No need to reset SIGPIPE handler here, since
320 init_signals does this for us now.
322 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
324 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
325 background rect may be larger (Bug#12445).
327 2012-09-23 Chong Yidong <cyd@gnu.org>
329 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
331 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
333 * .gdbinit: Just stop at fatal_error_backtrace.
334 See Stefan Monnier's request in
335 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
336 Remove no-longer-used query of system type.
338 2012-09-22 Chong Yidong <cyd@gnu.org>
340 * search.c (Freplace_match): Doc fix (Bug#12325).
342 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
344 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
345 (Fline_end_position): Doc fix.
347 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
349 2012-09-22 Chong Yidong <cyd@gnu.org>
351 * dispextern.h (struct image_type): Add new slot, storing a type
352 initialization function.
354 * image.c (define_image_type): Call the image initializer function
355 if it is defined. Arguments and return value changed.
356 (valid_image_p, make_image): Callers changed.
357 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
358 (gif_type, imagemagick_type, svg_type, gs_type): Add
359 initialization functions.
360 (Finit_image_library): Call lookup_image_type.
361 (CHECK_LIB_AVAILABLE): Macro deleted.
362 (lookup_image_type): Call define_image_type here, rather than via
363 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
364 (syms_of_image): Move define_image_type calls for xbm_type and
365 pbm_type to lookup_image_type.
367 2012-09-22 Eli Zaretskii <eliz@gnu.org>
369 * keyboard.c (timer_check_2): Move calculation of 'timers' and
370 'idle_timers' from here ...
371 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
372 lists, to avoid infloops when the timer does something stupid,
373 like reinvoke itself with the same or smaller time-out.
376 2012-09-22 Martin Rudalics <rudalics@gmx.at>
378 * window.c (Fsplit_window_internal): Handle only Qt value of
379 Vwindow_combination_limit separately.
380 (Qtemp_buffer_resize): New symbol.
381 (Vwindow_combination_limit): New default value. Rewrite
384 2012-09-22 Eli Zaretskii <eliz@gnu.org>
386 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
387 the new overlay string. (Bug#10159)
389 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
391 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
392 or that fprintf is async-signal-safe. POSIX doesn't require
395 2012-09-22 Chong Yidong <cyd@gnu.org>
397 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
400 2012-09-22 Kenichi Handa <handa@gnu.org>
402 * composite.c (composition_reseat_it): Handle the case that a
403 grapheme cluster is not covered by a single font (Bug#12352).
405 2012-09-21 Chong Yidong <cyd@gnu.org>
407 * image.c (define_image_type): Avoid adding duplicate types to
408 image_types (Bug#12463). Suggested by Jörg Walter.
410 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
412 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
413 (print_load_command_name): Add case LC_DATA_IN_CODE.
414 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
416 2012-09-21 Glenn Morris <rgm@gnu.org>
418 * eval.c (Frun_hook_with_args_until_success)
419 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
421 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
423 * fileio.c (Ffile_selinux_context): Only call freecon when
424 lgetfilecon succeeded.
425 (Fset_file_selinux_context): Likewise. (Bug#12444)
427 2012-09-21 Eli Zaretskii <eliz@gnu.org>
429 * xdisp.c (try_window_reusing_current_matrix): Under bidi
430 reordering, locate the cursor by calling set_cursor_from_row; if
431 that fails, clear the desired glyph matrix before returning a
432 failure indication to the caller. Fixes leaving garbled display
433 when fast scrolling with a down-key. (Bug#12403)
434 (compute_stop_pos_backwards): Fix a typo that caused crashes while
435 scrolling through multibyte text.
437 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
439 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
440 calling mark_vectorlike since that's the one that marks the window.
441 (mark_discard_killed_buffers): Mark the final cdr.
442 * window.h (struct window): Move prev/next_buffers to the
444 * window.c (make_window): Initialize prev/next_buffers manually.
446 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
448 Omit unused arg EXPECTED from socket hooks.
449 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
450 * nsterm.m (ns_term_init):
451 * termhooks.h (struct terminal.read_socket_hook):
452 * w32inevt.c (w32_console_read_socket):
453 * w32term.c (w32_read_socket):
454 * xterm.c (XTread_socket):
455 Omit unused arg EXPECTED. All callers changed.
456 (store_user_signal_events): Return void, not int, since callers no
457 longer care about the return value. All uses changed.
459 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
461 * w32gui.h (XParseGeometry): Do not declare.
463 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
465 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
466 Ignore 'expected'. See Eli Zaretskii in
467 <http://bugs.gnu.org/12471#8> (last line).
469 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
470 (XParseGeometry): Now static. Substitute extremal values for
471 values that are out of range.
473 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
475 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
477 * nsfns.m (XParseGeometry): Remove.
478 (Fx_create_frame): Call x_set_offset to correctly interpret
481 * frame.c (read_integer, XParseGeometry): Moved from w32xfns.c.
482 (Fx_parse_geometry): If there is a space in string, call
483 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
485 2012-09-17 Eli Zaretskii <eliz@gnu.org>
487 * search.c (scan_buffer): Use character positions in calls to
488 region_cache_forward and region_cache_backward, not byte
489 positions. (Bug#12196)
491 * w32term.c (w32_read_socket): Set pending_signals to 1, like
492 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
494 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
495 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
496 emacs_blocked_malloc, now deleted.
498 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
500 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
501 The workaround was for improving performance on Solaris 2.4, but
502 is getting in the way now. Emacs will still work if someone is
503 still running Solaris 2.4 in a museum somewhere; Sun dropped
504 support for Solaris 2.4 in 2003.
505 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
506 * process.c (create_process) [HAVE_WORKING_VFORK]:
507 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
508 since Emacs no longer uses vfork on that platform.
510 2012-09-17 Glenn Morris <rgm@gnu.org>
512 * emacs.c: Use COPYRIGHT.
514 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
516 Remove configure's --without-sync-input option (Bug#12450).
517 When auditing signal-handling in preparation for cleaning it up,
518 I found that SYNC_INPUT has race conditions and would be a real
519 pain to fix. Since it's an undocumented and deprecated
520 configure-time option, now seems like a good time to remove it.
521 Also see <http://bugs.gnu.org/11080#16>.
522 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
523 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
524 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
526 (check_depth) [XMALLOC_OVERRUN_CHECK]:
527 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
528 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
529 (dont_register_blocks, bytes_used_when_reconsidered)
530 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
531 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
532 [!SYSTEM_MALLOC && !SYNC_INPUT]:
533 Remove. All uses removed.
534 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
535 implementation, one that depends on whether the new macro
536 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
538 * atimer.c (run_timers, handle_alarm_signal):
539 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
540 (handle_async_input, process_pending_signals)
541 (handle_input_available_signal, init_keyboard):
542 * nsterm.m (ns_read_socket):
543 * process.c (wait_reading_process_output):
544 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
545 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
547 * xterm.c (XTread_socket):
549 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
550 * eval.c (handling_signal): Remove. All uses removed.
551 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
552 All uses replaced with the SYNC_INPUT version.
553 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
555 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
558 * font.c (Ffont_shape_gstring): Remove unused local.
560 2012-09-16 Glenn Morris <rgm@gnu.org>
562 * Makefile.in (clean): No longer run nextstep's clean.
564 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
566 (ns-app): Move here from ns.mk, and simplify.
567 (clean): Simplify nextstep entry.
568 * ns.mk: Remove file.
570 2012-09-17 Kenichi Handa <handa@gnu.org>
572 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
573 not covert the last few charactes.
575 2012-09-16 Kenichi Handa <handa@gnu.org>
577 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
578 here, but just check the validity of glyphs in the glyph-string.
580 2012-09-16 Martin Rudalics <rudalics@gmx.at>
582 * window.c (Fwindow_parameter, Fset_window_parameter): Accept
583 any window as argument (Bug#12452).
585 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
587 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
588 to ns_term_init to avoid memory leak.
590 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
591 explicit retain/release.
592 (ns_term_init): Only allow one display. Initialize outerpool and
595 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
597 Port _setjmp fix to POSIXish hosts as well as Microsoft.
598 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
599 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
600 the Microsoft problem in a different way, by altering ../nt/config.nt.
602 2012-09-15 Eli Zaretskii <eliz@gnu.org>
617 * w16select.c: Remove inclusion of setjmp.h, as it is now included
618 by lisp.h. This completes removal of setjmp.h inclusion
619 erroneously announced in the previous commit. (Bug#12446)
621 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
624 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
625 not defined as a macro. The latter happens on MS-Windows.
628 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
630 Port better to POSIX hosts lacking _setjmp (Bug#12446).
631 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
632 Some instances of '#include <setjmp.h>' removed, if the
633 only reason for the instance was because "lisp.h" was included.
634 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
635 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
636 and _longjmp with the new symbols. Emacs already uses _setjmp if
637 available, so this change affects only POSIXish hosts that have
638 sigsetjmp but not _setjmp, such as some versions of Solaris and
639 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
640 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
641 (png_load_body) [HAVE_PNG]:
642 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
643 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
644 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
645 since PNG requires jmp_buf. This is the only exception to the
646 general rule that we now use sys_setjmp and sys_longjmp.
647 This exception is OK since this code does not change the signal
648 mask or longjmp out of a signal handler.
650 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
652 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
653 Include "syssignal.h", for 'main_thread'.
655 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
657 Avoid out-of-range marker position (Bug#12426).
658 * insdel.c (replace_range, replace_range_2): Adjust
659 markers before overlays, as suggested by comments.
660 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
661 Remove redundant check before calling offset_intervals.
663 2012-09-14 Martin Rudalics <rudalics@gmx.at>
665 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
666 current buffer (Bug#12387).
668 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
670 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
672 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
674 Use a more backwards-compatible timer format (Bug#12430).
675 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
676 vector element, not from the 4th, since PSECS is now at the end.
677 (Fcurrent_idle_time): Doc fix.
679 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
681 Function to mark objects and remove killed buffers at once.
682 * alloc.c (discard_killed_buffers): Rename to ...
683 (mark_discard_killed buffers) ... new name. Add marking
684 of remaining objects. Fix comment. Adjust users.
685 (mark_object): Do not touch frame buffer lists here.
686 * frame.c (delete_frame): Reset frame buffer lists here.
688 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
690 Better workaround for GNOME bug when --enable-gcc-warnings.
691 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
692 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
693 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
695 Simplify SIGIO usage (Bug#12408).
696 The code that dealt with SIGIO was crufty and confusing, e.g., it
697 played tricks like "#undef SIGIO" but these tricks were not used
698 consistently. Simplify mostly by not #undeffing standard symbols,
699 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
700 or not as we please) rather than "defined SIGIO" (standard symbol
701 that we probably shouldn't #undef).
702 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
703 Modules that need it can include it.
704 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
705 * dispextern.h (ignore_sigio): New decl.
706 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
707 unconditionally, since it's now a no-op if !USABLE_SIGIO.
708 * emacs.c (shut_down_emacs):
709 * keyboard.c (kbd_buffer_store_event_hold):
710 Use ignore_sigio rather than invoking 'signal' directly.
711 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
713 (FIONREAD, SIGIO): Do not #undef.
714 (tty_read_avail_input): Use #error rather than a syntax error.
715 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
716 for I_PIPE, used by SETUP_SLAVE_PTY.
717 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
718 * sysdep.c (croak): Remove; no longer needed. This bit of
719 temporary code, with Fred N. Fish's comment that it's temporary,
720 has been in Emacs since at least 1992!
721 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
722 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
723 * syssignal.h (croak): Remove decl.
724 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
725 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
726 now that we're termios-only.
727 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
728 * term.c (dissociate_if_controlling_tty): Use #error rather than
731 Work around GCC and GNOME bugs when --enable-gcc-warnings.
732 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
733 to work around GNOME bug 683906.
734 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
735 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
736 This works around GCC bug 54561.
738 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
740 More fixes for 'volatile' and setjmp/longjmp.
741 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
742 * image.c (struct png_load_context) [HAVE_PNG]: New type.
743 (png_load_body) [HAVE_PNG]:
744 (jpeg_load_body) [HAVE_JPEG]:
745 New function, with most of the old parent function's body.
746 (png_load) [HAVE_PNG]:
747 (jpeg_load) [HAVE_JPEG]:
748 Invoke the new function, to avoid longjmp munging our locals.
749 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
750 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
751 longjmp is passed 2, as the C standard doesn't guarantee this.
752 Instead, store the failure code into mgr->failure_code.
754 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
756 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
757 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
758 (syms_of_keyboard): Remove support for unread-command-char.
760 2012-09-12 Eli Zaretskii <eliz@gnu.org>
762 * w32proc.c (sys_kill): If PID is our process ID and the signal is
763 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
764 violation. (Bug#12426)
766 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
768 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
770 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
772 * eval.c: Add `inhibit-debugger'.
773 (Qinhibit_debugger): New symbol.
774 (call_debugger): Bind it instead of Qdebug_on_error.
775 (maybe_call_debugger): Test Vinhibit_debugger.
776 (syms_of_eval): Define inhibit-debugger.
777 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
778 (syms_of_xdisp): Remove inhibit-debug-on-message.
780 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
782 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
783 If a nonvolatile local variable is written before a _longjmp to
784 the frame containing the variable, and is read after the _longjmp,
785 the value read is indeterminate. Some local variables of type
786 'struct handler' and 'struct catchtag' are used in this way, so
787 mark each of their slots as volatile if the slot can be set before
788 _longjmp and read afterwards.
789 * lisp.h (struct handler): var and chosen_clause are now volatile.
790 (struct catchtag): val, next, and pdlcount are now volatile.
792 * bidi.c (bidi_push_it, bidi_pop_it):
793 * fns.c (copy_hash_table):
794 * image.c (define_image_type):
795 * keyboard.c (kbd_buffer_store_event_hold):
796 * process.c (Fprocess_send_eof):
797 * xfaces.c (x_create_gc) [HAVE_NS]:
798 * xgselect.c (xg_select):
799 Prefer assignment to memcpy when either will do.
801 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
802 Use pointer-to-a-pointer to simplify and avoid a NILP check each
803 time an item is removed. No need to mark this function 'inline';
804 the compiler knows better than we do.
806 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
808 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
809 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
810 to change_frame_size (Bug#12388).
811 (windowDidResize:): Pass YES to updateFrameSize.
813 * nsterm.h: Add delay parameter to updateFrameSize.
815 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
817 Discard killed buffers from deleted window and frame objects.
818 This reduces an amount of references to killed buffers and
819 helps GC to reclaim them faster.
820 * alloc.c (discard_killed_buffers): New function.
821 (mark_object): Use it for deleted windows and frames.
822 (mark_object): If symbol's value is set up for a killed buffer
823 or deleted frame, restore it's global binding.
824 * data.c (swap_in_global_binding): Add GC notice.
825 (swap_in_symval_forwarding): Use convenient set_blv_where.
826 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
827 * window.h: ... to here.
829 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
831 Convenient macro to check whether the buffer is live.
832 * buffer.h (BUFFER_LIVE_P): New macro.
833 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
834 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
836 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
838 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
839 composition cases (Bug#12364).
841 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
842 overhang of succeeding glyphs overlapping box cursor.
844 * w32term.c (x_draw_glyph_string): Likewise.
846 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
848 Simplify, document, and port floating-point (Bug#12381).
849 The porting part of this patch fixes bugs on non-IEEE platforms
850 with frexp, ldexp, logb.
851 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
853 * floatfns.c: Simplify discussion of functions that Emacs doesn't
854 support, by removing commented-out code and briefly listing the
855 C89 functions excluded. The commented-out stuff was confusing
856 maintenance, e.g., we thought we needed cbrt but it was commented out.
857 (logb): Remove decl; no longer needed.
858 (isfinite): New macro, if not already supplied.
859 (isnan): Don't replace any existing macro.
860 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
861 are present on all C89 platforms.
862 (Ffrexp): Do not special-case zero, as frexp does the right thing
864 (Flogb): Do not use logb, as it doesn't have the desired meaning
865 on hosts that use non-base-2 floating point. Instead, stick with
866 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
867 frexp, to avoid getting an unspecified result.
869 * xdisp.c (Qinhibit_debug_on_message): Now static.
871 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
873 * nsterm.m (ns_update_begin): Set clip path to whole view by using
874 NSBezierPath (Bug#12131).
876 2012-09-10 Chong Yidong <cyd@gnu.org>
878 * fns.c (Fdelq, Fdelete): Doc fix.
880 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
882 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
883 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
885 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
887 * lisp.h (make_lisp_ptr): New macro to replace XSET.
888 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
891 2012-09-09 Eli Zaretskii <eliz@gnu.org>
893 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
894 left fringe if the window has a left margin. This avoids leaving
895 traces of the cursor because its leftmost pixel is not drawn over.
897 * dispnew.c (update_window_line): When the left margin area of a
898 screen line is updated, set the redraw_fringe_bitmaps_p flag of
899 that screen line. (Bug#12277)
901 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
903 Assume C89 or later for math functions (Bug#12381).
904 This simplifies the code, and makes it a bit smaller and faster,
905 and (most important) makes it easier to clean up signal handling
906 since we can stop worring about floating-point exceptions in
907 library code. That was a problem before C89, but the problem
908 went away many years ago on all practical Emacs targets.
909 * data.c, image.c, lread.c, print.c:
910 Don't include <math.h>; no longer needed.
911 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
912 might be autoconfigured, as that never happens.
914 * doprnt.c (DBL_MAX_10_EXP):
916 Remove. C89 or later always defines these.
917 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
918 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
919 (arith_error, domain_error, domain_error2):
920 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
921 no longer needed -- we simply return what C returns. All uses removed.
922 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
924 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
925 Remove. All uses expanded, as these macros are no longer used
926 more than once and are now more trouble than they're worth.
927 (Ftan): Use tan, not sin / cos.
928 (Flogb): Assume C89 frexp.
929 (fmod_float): Assume C89 fmod.
930 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
931 (init_floatfns): Remove. All uses removed.
933 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
935 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
936 compositeToPoint for OSX < 10.6 (Bug#12390).
938 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
940 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
941 This produces more-accurate results.
943 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
945 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
948 2012-09-08 Chong Yidong <cyd@gnu.org>
950 * syntax.c (Fstring_to_syntax): Doc fix.
952 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
954 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
955 in the internal border.
956 (x_set_window_size): Remove static variables and their usage.
957 (ns_redraw_scroll_bars): Fix NSTRACE arg.
958 (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
959 fringe/internal border adjustment (Bug#11052).
960 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
961 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
962 (ns_fix_rect_ibw): Remove.
963 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
964 (ns_dumpglyphs_box_or_relief): Ditto.
965 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
967 (ns_dumpglyphs_image): Ditto.
968 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
970 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
971 their usage. Add fringe_extended_p and its use as in other terms.
972 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
973 scroll bar was removed.
974 (updateFrameSize): New function.
975 (windowDidResize): Move code to updateFrameSize and call it.
977 * nsterm.h (EmacsView): Add updateFrameSize.
979 2012-09-07 Chong Yidong <cyd@gnu.org>
981 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
983 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
985 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
987 More signal-handler cleanup (Bug#12327).
988 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
989 Problem introduced when merging patches. Noted by Eli Zaretskii in
990 <http://bugs.gnu.org/12327#67>.
991 * floatfns.c: Comment fix.
992 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
993 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
994 and anyway the declaration is harmless even if SIGDANGER is not defined.
995 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
996 defined BROKEN_FIONREAD). systty.h formerly did this, but other
997 source files not surprisingly expected syssignal.h to define, or
998 not define, SIGIO, and it's cleaner to do it that way, for consistency.
999 Include <sys/ioctl.h>, for FIONREAD.
1000 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
1001 This eliminates a problem whereby other files mysteriously had
1002 to include "syssignal.h" before including "systty.h" if they
1003 wanted to use "#ifdef SIGIO".
1005 2012-09-07 Eli Zaretskii <eliz@gnu.org>
1007 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
1009 * w32.c (sigemptyset): Empty the set.
1010 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
1012 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
1014 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
1016 * alloc.c (mark_buffer): Revert unsafe marking optimization.
1017 (mark_object): Likewise for frame objects.
1019 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
1021 * syssignal.h (handle_on_main_thread): Always declare,
1022 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
1023 This ports to platforms without HAVE_PTHREAD.
1025 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
1027 Signal-handler cleanup (Bug#12327).
1028 Emacs's signal handlers were written in the old 4.2BSD style with
1029 sigblock and sigmask and so forth, and this led to some
1030 inefficiencies and confusion. Rewrite these to use
1031 pthread_sigmask etc. without copying signal sets around. Also,
1032 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
1033 'signal', and instead use functions that do not attempt to take
1034 over the system name space. This patch causes Emacs's text
1035 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
1036 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
1037 Do not include <signal.h> or "syssignal.h", as these
1038 modules do not use signals.
1039 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
1040 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
1041 Do not include <signal.h>, as "syssignal.h" does that for us now.
1042 * atimer.c (sigmask_atimers): New function.
1043 (block_atimers, unblock_atimers): New functions,
1044 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
1046 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
1047 no longer needed here.
1048 * emacs.c (main): Inspect existing signal handler with sigaction,
1049 so that there's no need to block and unblock SIGHUP.
1050 * sysdep.c (struct save_signal): New member 'action', replacing
1051 old member 'handler'.
1052 (save_signal_handlers, restore_signal_handlers):
1053 Use sigaction instead of 'signal' to save and restore.
1054 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
1055 New function. All users of 'signal' modified to use set_sighandler
1056 if they're writeonly, and to use sys_signal if they're read+write.
1057 (emacs_sigaction_init, forwarded_signal): New functions.
1058 (sys_signal): Remove. All uses replaced by calls to sigaction
1059 and emacs_sigaction_init, or by direct calls to 'signal'.
1060 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
1061 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
1062 all uses replaced by pthread_sigmask etc. calls.
1063 * syssignal.h: Include <signal.h>.
1064 (emacs_sigaction_init, forwarded_signal): New decls.
1065 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
1066 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
1067 (sigmask, sys_sigmask): Remove; no longer needed.
1068 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
1069 (sigblock, sigunblock, sigfree):
1070 (sigsetmask) [!defined sigsetmask]:
1071 Remove. All uses replaced by pthread_sigmask.
1072 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
1073 no longer need to be replaced, and its typical old uses
1074 are now done via emacs_sigaction_init and sigaction.
1075 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
1076 (sys_sigdel): Remove; unused.
1077 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
1079 2012-09-06 Eli Zaretskii <eliz@gnu.org>
1081 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
1082 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
1084 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
1086 Explicitly mark buffer_defaults and buffer_local_symbols.
1087 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
1088 mark_local_symbols here.
1089 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
1090 since special buffers aren't marked here any more.
1091 (allocate_buffer): Chain new buffer with all_buffers here...
1092 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
1094 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
1095 (syms_of_buffer): Remove staticpro of the above.
1096 (init_buffer_once): Set names for buffer_defaults and
1097 buffer_local_symbols.
1099 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
1101 Use bool for booleans in font-related modules.
1102 * font.c (font_intern_prop, font_style_to_value)
1103 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
1104 (generate_otf_features, font_check_otf_features, font_check_otf)
1105 (font_match_p, font_list_entities, font_at):
1106 * fontset.c (fontset_id_valid_p, reorder_font_vector
1107 (fontset_find_font, Fset_fontset_font)
1108 (face_suitable_for_char_p) [0]:
1109 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
1110 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
1111 (m17n_flt_initialized, ftfont_shape_by_flt):
1112 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
1113 * nsfont.m (nsfont_draw):
1114 * w32font.c (w32font_draw):
1115 * w32term.c (x_draw_glyphless_glyph_string_foreground):
1116 Use bool for booleans.
1117 * font.h: Adjust to above API changes.
1118 (struct font, struct font_driver, struct font_driver_list):
1119 Use bool for booleans.
1120 (struct font): Remove useless member encoding_type.
1122 * fontset.c, xftfont.c: Omit unnecessary static decls.
1124 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
1126 * alloc.c (mark_object): Revert window marking code
1127 since it's unsafe for the Fset_window_configuration.
1129 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
1131 Fix race conditions with signal handlers and errno (Bug#12327).
1132 Be more systematic about preserving errno whenever a signal
1133 handler returns, even if it's not in the main thread. Do this by
1134 renaming signal handlers to distinguish between signal delivery
1135 and signal handling. All uses changed.
1136 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
1137 * data.c (deliver_arith_signal): Rename from arith_error.
1138 * dispnew.c (deliver_window_change_signal): Rename from
1139 window_change_signal.
1140 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
1141 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
1142 * keyboard.c (deliver_input_available_signal): Rename from
1143 input_available_signal.
1144 (deliver_user_signal): Rename from handle_user_signal.
1145 (deliver_interrupt_signal): Rename from interrupt_signal.
1146 * process.c (deliver_pipe_signal): Rename from send_process_trap.
1147 (deliver_child_signal): Rename from sigchld_handler.
1148 * atimer.c (handle_alarm_signal):
1149 * data.c (handle_arith_signal):
1150 * dispnew.c (handle_window_change_signal):
1151 * emacs.c (handle_fatal_signal, handle_danger_signal):
1152 * keyboard.c (handle_input_available_signal):
1153 * keyboard.c (handle_user_signal, handle_interrupt_signal):
1154 * process.c (handle_pipe_signal, handle_child_signal):
1155 New functions, with the actual signal-handling code taken from the
1156 original respective signal handlers, sans the sporadic attempts to
1157 preserve errno, since that's now done by handle_on_main_thread.
1158 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
1159 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
1160 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1162 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1163 Move initialization of main_thread to sysdep.c's init_signals.
1164 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
1165 our usage, and simplifies the mainline code.
1166 (record_child_status_change): New static function, as a helper
1167 for handle_child_signal, and with most of the old child handler's
1169 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
1170 (handle_child_signal): Use the above.
1171 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1172 Moved here from emacs.c.
1173 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
1174 code moved here from emacs.c's main function.
1175 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
1176 replacing the old SIGNAL_THREAD_CHECK. All uses changed. This
1177 lets callers save and restore errno properly.
1179 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
1181 Remove redundant or unused things here and there.
1182 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
1183 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
1184 * editfns.c (Fcompare_buffer_substrings): Likewise.
1185 * frame.h (struct terminal, struct font_driver_list):
1186 Remove redundant declarations.
1187 * window.h (Qleft, Qright): Likewise.
1189 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
1191 Do not mark objects from deleted buffers, windows and frames.
1192 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
1193 (mark_object): Likewise for windows and frames.
1195 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
1197 * alloc.c (valid_lisp_object_p): Treat killed buffers,
1198 buffer_defaults and buffer_local_symbols as valid objects.
1199 Return special value to denote them.
1201 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
1203 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
1204 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
1205 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
1206 (file_name_absolute_p, Fsubstitute_in_file_name):
1207 (check_executable, check_writable, Ffile_accessible_directory_p)
1208 (Fset_file_selinux_context, Fdefault_file_modes)
1209 (Finsert_file_contents, choose_write_coding_system)
1210 (Fwrite_region, build_annotations, a_write, e_write)
1212 * filelock.c (boot_time_initialized, get_boot_time)
1213 (get_boot_time_1, lock_file_1, within_one_second):
1214 * floatfns.c (in_float):
1215 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
1216 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
1217 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
1218 * lisp.h (struct Lisp_Hash_Table.cmpfn):
1219 * window.c (compare_window_configurations):
1220 Use bool for booleans.
1221 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
1222 (Fdefault_file_modes): Now mode_t, not int, for modes.
1223 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
1224 (internal_delete_file): Now returns void, not a (boolean) int,
1225 since nobody was looking at the return value.
1226 * lisp.h, window.h: Adjust to above API changes.
1228 * xdisp.c (set_message): Simplify and reindent last change.
1230 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
1232 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
1234 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
1236 * eval.c (call_debugger): Make the function non-static so that we
1237 can call it from set_message.
1239 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
1240 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
1242 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
1244 Give more-useful info on a fatal error (Bug#12328).
1245 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
1246 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
1247 of doing the work ourselves.
1248 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
1249 do most of the work.
1250 (fatal_error_backtrace): New function, taken from the guts
1251 of the old fatal_error_signal, but with a new option to output
1253 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
1254 info about the signal than just its number.
1255 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
1256 * sysdep.c: Include <execinfo.h>
1257 (emacs_backtrace): New function, taken partly from the previous
1258 code of the 'die' function.
1259 (emacs_abort): Call fatal_error_backtrace rather than abort.
1261 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
1263 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
1264 eager (load-time) macro-expansion.
1265 * lisp.mk (lisp): Add macroexp.
1267 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
1269 Simplify redefinition of 'abort' (Bug#12316).
1270 Do not try to redefine the 'abort' function. Instead, redo
1271 the code so that it calls 'emacs_abort' rather than 'abort'.
1272 This removes the need for the NO_ABORT configure-time macro
1273 and makes it easier to change the abort code to do a backtrace.
1274 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
1275 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
1276 Remove; sysdep.c's emacs_abort now takes its place.
1277 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
1278 'abort' changed to use 'emacs_abort'.
1279 * msdos.c (dos_abort) [defined abort]: Remove; not used.
1280 (abort) [!defined abort]: Rename to ...
1281 (emacs_abort): ... new name.
1282 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
1283 the place of the old 'abort' in emacs.c.
1284 * w32.c, w32fns.c (abort): Do not #undef.
1285 * w32.c (emacs_abort): Rename from w32_abort.
1287 2012-09-04 Eli Zaretskii <eliz@gnu.org>
1289 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
1290 offsets[j].dv, since the y axis of the screen coordinates points
1291 down, while the y axis of the font definition coordinates points
1292 up. This fixes display of Arabic diacritics such as KASRA and
1293 KASRATAN. (Bug#11860)
1295 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
1297 Be more systematic about _setjmp vs setjmp.
1298 * alloc.c (test_setjmp, mark_stack):
1299 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
1300 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
1301 (png_load, my_error_exit, jpeg_load):
1302 * process.c (send_process_trap, send_process):
1303 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
1304 The underscored versions are up to 30x faster on some hosts.
1305 Formerly, the code used setjmp+longjmp sometimes and
1306 _setjmp+_longjmp at other times, with no particular reason to
1307 prefer setjmp+longjmp.
1309 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
1311 Fix minor problem found by static checking.
1312 * buffer.c (Fdelete_all_overlays): Return nil.
1314 2012-09-03 Martin Rudalics <rudalics@gmx.at>
1316 * buffer.c (Fdelete_all_overlays): New function.
1318 2012-09-03 Chong Yidong <cyd@gnu.org>
1320 * gtkutil.c: Add extern decl for Qxft.
1322 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
1324 * emacs.c, eval.c: Use bool for boolean.
1325 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
1326 (malloc_using_checking) [DOUG_LEA_MALLOC]:
1327 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
1328 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
1329 (main, decode_env_path, Fdaemon_initialized):
1330 * eval.c (call_debugger, Finteractive_p, interactive_p):
1331 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
1332 (maybe_call_debugger, Fbacktrace):
1333 * process.c (read_process_output, exec_sentinel):
1334 Use bool for booleans.
1335 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
1336 All callers changed.
1337 * eval.c (interactive_p): Omit always-true boolean argument
1338 EXCLUDE_SUBRS_P. All callers changed.
1339 * dispextern.h, lisp.h: Reflect above API changes.
1340 * firstfile.c (dummy): Use the address of 'main', whose signature
1341 won't change, instead of the address of 'initialize', whose
1342 signature just changed from int to bool.
1343 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
1344 * msdos.c (fatal_error_in_progress): ... from here.
1345 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
1347 (redisplay_internal, unwind_redisplay): Simply clear
1348 REDISPLAYING_P when unwinding, instead of saving its previous,
1349 always-false value and then restoring it.
1351 Clean up some extern decls.
1352 Mostly, this hoists extern decls out of .c files and into .h files.
1353 That way, we're more likely to catch errors if the interfaces change.
1354 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
1355 declare xg_mark_data.
1356 * dispextern.h (x_frame_parm_handlers):
1358 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
1359 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
1360 (Qultra_bold, Qoblique, Qitalic):
1361 Move extern decl here from .c file.
1362 * alloc.c (xg_mark_data) [USE_GTK]:
1364 * eval.c (Qlexical_binding):
1365 * fns.c (time) [!HAVE_UNISTD_H]:
1366 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
1367 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
1368 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
1369 * lread.c (Qinternal_interpreter_environment):
1370 * minibuf.c (Qbuffer):
1371 * process.c (QCfamily, QCfilter):
1372 * widget.c (free_frame_faces):
1373 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
1374 * xfont.c (x_clear_errors):
1375 * xterm.c (x_frame_parm_handlers):
1376 Remove now-redundant extern decls.
1377 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
1378 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
1380 * xfaces.c: Remove unnecessary static decls.
1381 * xterm.c (updating_frame): Remove decl of nonexistent object.
1383 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
1384 when building globals.h, as the objects that are not built on
1385 this host are not needed to compile C files on this host.
1387 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
1389 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
1391 * frame.h: Add missing prototype for x_wm_set_size_hint.
1393 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
1395 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
1396 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
1397 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
1398 (Fsubstitute_command_keys):
1399 * editfns.c (region_limit, find_field, Fconstrain_to_field)
1400 (save_excursion_save, save_excursion_restore)
1401 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
1402 (format_time_string, general_insert_function)
1403 (make_buffer_string, make_buffer_string_both)
1404 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
1405 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
1406 (copy_text, insert_1, insert_1_both, insert_from_string)
1407 (insert_from_string_before_markers, insert_from_string_1)
1408 (insert_from_buffer, insert_from_buffer_1, replace_range)
1409 (replace_range_2, del_range_1, del_range_byte, del_range_both)
1410 (del_range_2, modify_region):
1411 * intervals.c (intervals_equal, balance_possible_root_interval)
1412 (adjust_intervals_for_insertion, merge_properties_sticky)
1413 (graft_intervals_into_buffer, lookup_char_property)
1414 (adjust_for_invis_intang, set_point_both)
1415 (get_property_and_range, compare_string_intervals)
1416 (set_intervals_multibyte_1, set_intervals_multibyte):
1417 * keyboard.c (decode_timer):
1418 Use bool for boolean.
1419 * intervals.h, lisp.h, systime.h: Reflect above API changes.
1420 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
1422 2012-09-02 Chong Yidong <cyd@gnu.org>
1424 * keymap.c (push_key_description): Print M-TAB as C-M-i
1427 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
1429 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
1430 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
1431 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
1432 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
1433 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
1434 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
1435 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
1437 2012-09-01 Eli Zaretskii <eliz@gnu.org>
1439 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
1440 more than one grapheme cluster passed to the shaper: compute the
1441 offset adjustment values separately for each cluster. (Bug#11860)
1443 * image.c: Restore mistakenly removed inclusion of w32.h. Without
1444 it, GCC doesn't see prototypes of w32_delayed_load, and complains
1445 about implicit conversions from integer to pointer.
1447 2012-09-01 Daniel Colascione <dancol@dancol.org>
1449 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
1450 system used too early.
1452 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
1454 Better seed support for (random).
1455 * emacs.c (main): Call init_random.
1456 * fns.c (Frandom): Set the seed from a string argument, if given.
1457 Remove long-obsolete Gentzel cruft.
1458 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
1459 (init_random): New function.
1461 2012-09-01 Daniel Colascione <dancol@dancol.org>
1463 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
1464 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
1465 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
1466 x_wm_set_size_hint, x_query_colors, x_real_positions,
1467 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
1468 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
1469 all of which have been moved to common code.
1471 * xfaces.c: Include TERM_HEADER instead of listing all possible
1472 window-system headers.
1474 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
1477 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
1478 directly accessing frame internals.
1480 * w32font.h: Include font.h. Define syms_of_w32font and
1483 * process.c: Include TERM_HEADER instead of listing all possible
1484 window-system headers.
1486 * nsterm.h: Remove declarations now in frame.h. Define
1487 FRAME_X_SCREEN, FRAME_X_VISUAL.
1489 * menu.c: Include TERM_HEADER instead of listing all possible
1490 window-system headers.
1492 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
1495 * keyboard.c: Include TERM_HEADER instead of listing all possible
1496 window-system headers.
1498 * image.c: Include TERM_HEADER instead of listing all possible
1499 window-system headers. Declare Vlibrary_cache when compiling for
1502 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
1503 window system declarations.
1505 * frame.h: Move common functions here: set_frame_menubar,
1506 x_set_window_size, x_sync, x_get_focus_frame,
1507 x_set_mouse_position, x_set_mouse_pixel_position,
1508 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
1509 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
1510 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
1511 x_activate_menubar, x_real_positions, x_bitmap_icon,
1512 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
1515 * frame.c: Include TERM_HEADER instead of listing all possible
1516 window-system headers.
1518 * font.c: Include TERM_HEADER instead of listing all possible
1519 window-system headers.
1521 * emacs.c: Include TERM_HEADER.
1523 * dispnew.c: Include TERM_HEADER instead of listing all possible
1524 window-system headers.
1526 * ccl.h: Include character.h.
1528 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
1529 the current window system; include in list of objects to link into
1532 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1534 Remove mark_ttys function and fix tty_display_info initialization.
1535 * lisp.h (mark_ttys): Remove prototype.
1536 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
1537 to mark_ttys because all possible values of 'top_frame' slot are
1538 the frames which are reachable from Vframe_list.
1539 * term.c (mark_ttys): Remove.
1540 (init_tty): Safely initialize 'top_frame' slot with Qnil.
1542 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1544 Change struct frame bitfields from unsigned char to unsigned.
1545 * frame.h (struct frame): Change type of 'display_preempted',
1546 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
1547 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
1548 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
1549 bitfields from unsigned char to unsigned.
1551 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1553 Remove unused member of struct x_output and struct w32_output.
1554 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
1555 * w32term.h (struct w32_output): Likewise.
1557 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
1559 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
1560 does not become zero (Bug#12234).
1562 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
1564 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
1565 for GCC 4.7.1 x86-64.
1567 2012-08-30 Glenn Morris <rgm@gnu.org>
1569 * lread.c (init_lread): For out-of-tree builds, only add the
1570 source directory's site-lisp dir to the load-path if it exists,
1571 consistent with in-tree builds. (Bug#12302)
1573 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
1575 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
1576 button_values to NULL. Call setStykeMask so dialogs get a close button.
1577 (windowShouldClose:): Set window_closed.
1578 (dealloc): New member, free button_values.
1579 (process_dialog:): Make member function. Remove window argument,
1580 replace window with self. Count buttons and allocate and store values
1582 (addButton:value:row:): value is int with the name tag. Call setTag
1583 with tag. Remove return self, declare return value as void.
1584 (addString:row:): Remove return self, declare return value as void.
1585 (addSplit): Remove return self, declare return value as void.
1586 (clicked:): Remove return self, declare return value as void.
1587 Set dialog_return to button_values[seltag]. Code formatting change.
1588 (initFromContents:isQuestion:): Adjust call to process_dialog.
1589 Code formatting change.
1590 (timeout_handler:): Set timer_fired to YES.
1591 (runDialogAt:): Set timer_fired to NO.
1592 Handle click on close button as quit.
1594 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
1595 Add window_closed and button_values. Add void as return value for
1596 add(Button|String|Split). addButton takes int instead of Lisp_Object.
1597 Add process_dialog as new member.
1599 2012-08-28 Eli Zaretskii <eliz@gnu.org>
1601 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
1602 is not one of the heaps we manage. (Bug#12242)
1604 2012-08-28 Glenn Morris <rgm@gnu.org>
1606 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
1608 2012-08-28 Martin Rudalics <rudalics@gmx.at>
1610 * window.c (Fset_window_configuration): Remove handling of
1611 auto-buffer-name window parameter. Install revision of reverted
1614 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1616 Do not allow to set major mode for a dead buffer.
1617 * buffer.c (Fset_buffer_major_mode): Signal an error
1618 if the buffer is dead.
1619 (Fother_buffer, other_buffer_safely): Remove redundant
1622 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1624 Always use set_buffer_if_live to restore original buffer at unwind.
1625 * buffer.h (record_unwind_current_buffer): New function.
1626 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
1627 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
1628 * undo.c, window.c: Adjust users.
1629 * buffer.c (set_buffer_if_live): Fix comment.
1631 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1633 Fix usage of set_buffer_internal.
1634 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
1635 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
1636 * coding.c (decode_coding): Omit redundant test.
1637 * fileio.c (decide_coding_unwind): Likewise.
1638 * fns.c (secure_hash): Likewise.
1639 * insdel.c (modify_region): Likewise.
1640 * keyboard.c (command_loop_1): Likewise.
1641 * print.c (PRINTFINISH): Likewise.
1642 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
1644 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1646 * dispnew.c: Use bool for boolean.
1647 (frame_garbaged, display_completed, delayed_size_change)
1648 (fonts_changed_p, add_window_display_history)
1649 (add_frame_display_history, verify_row_hash)
1650 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
1651 (row_equal_p, realloc_glyph_pool)
1652 (allocate_matrices_for_frame_redisplay)
1653 (showing_window_margins_p)
1654 (adjust_frame_glyphs_for_frame_redisplay)
1655 (build_frame_matrix_from_leaf_window, make_current)
1656 (mirrored_line_dance, mirror_line_dance, update_frame)
1657 (update_window_tree, update_single_window)
1658 (check_current_matrix_flags, update_window, update_text_area)
1659 (update_window_line, set_window_update_flags, scrolling_window)
1660 (update_frame_1, scrolling, buffer_posn_from_coords)
1661 (do_pending_window_change, change_frame_size)
1662 (change_frame_size_1, sit_for):
1663 Use bool for boolean.
1664 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
1665 and remove last int (actually boolean) argument, which was always 0.
1666 All callers changed.
1667 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
1668 * dispextern.h (struct composition_it): Use bool for boolean.
1669 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
1670 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
1671 * dired.c (file_name_completion):
1672 Use bool for boolean. (This was missed in an earlier change.)
1674 2012-08-27 Martin Rudalics <rudalics@gmx.at>
1676 * window.c (Fset_window_configuration): Revert first part of
1679 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
1681 * nsterm.h (NSPanel): New class variable dialog_return.
1683 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
1685 (windowShouldClose:): Use stop instead of stopModalWithCode.
1686 (clicked:): Ditto, and also set dialog_return (Bug#12258).
1687 (timeout_handler:): Use stop instead of abortModal. Send a dummy
1689 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
1692 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1694 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
1695 * composite.c (find_composition, composition_gstring_p)
1696 (composition_reseat_it, find_automatic_composition):
1697 * data.c (let_shadows_buffer_binding_p)
1698 (let_shadows_global_binding_p, set_internal, make_blv)
1699 (Fmake_variable_buffer_local, Fmake_local_variable)
1700 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
1701 (cons_to_signed, arith_driver):
1702 * dbusbind.c (xd_in_read_queued_messages):
1703 * dired.c (directory_files_internal, file_name_completion):
1704 Use bool for booleans.
1705 * dired.c (file_name_completion):
1706 * process.h (fd_callback):
1707 Omit int (actually boolean) argument. It wasn't being used.
1709 * composite.h, lisp.h: Reflect above API changes.
1711 * cmds.c, coding.c: Use bool for booleans.
1712 * cmds.c (move_point, Fself_insert_command):
1713 * coding.h (struct composition status, struct coding_system):
1714 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
1715 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
1716 (emacs_mule_char, decode_coding_emacs_mule)
1717 (encode_coding_emacs_mule, detect_coding_iso_2022)
1718 (decode_coding_iso_2022, encode_invocation_designation)
1719 (encode_designation_at_bol, encode_coding_iso_2022)
1720 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
1721 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
1722 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
1723 (encode_coding_raw_text, detect_coding_charset)
1724 (decode_coding_charset, encode_coding_charset, detect_eol)
1725 (detect_coding, get_translation_table, produce_chars)
1726 (consume_chars, reused_workbuf_in_use)
1727 (make_conversion_work_buffer, code_conversion_save)
1728 (decode_coding_object, encode_coding_object)
1729 (detect_coding_system, char_encodable_p)
1730 (Funencodable_char_position, code_convert_region)
1731 (code_convert_string, code_convert_string_norecord)
1732 (Fset_coding_system_priority):
1733 * fileio.c (Finsert_file_contents):
1734 Use bool for booleans.
1735 * coding.h, lisp.h: Reflect above API changes.
1736 * coding.c: Remove unnecessary static function decls.
1737 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
1738 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
1739 not a boolean 'int', since callers never look at the return value.
1740 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
1741 * coding.h (decoding_buffer_size, encoding_buffer_size)
1742 (emacs_mule_string_char): Remove unused extern decls.
1743 (struct iso_2022_spec, struct coding_system):
1744 Use 'unsigned int : 1' for boolean fields, since there's more than one.
1745 (struct emacs_mule_spec): Remove unused field 'full_support'.
1746 All initializations removed.
1747 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
1749 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1751 Fix spare memory change (Bug#12286).
1752 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
1753 (valid_lisp_object_p): Likewise.
1755 2012-08-27 Martin Rudalics <rudalics@gmx.at>
1757 * window.c (Fset_window_configuration): Record any window's old
1758 buffer if it's replaced (see Bug#8789). If the new current
1759 buffer doesn't appear in the selected window, go to its old
1762 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1764 Special MEM_TYPE_SPARE to denote reserved memory.
1765 * alloc.c (enum mem_type): New memory type.
1766 (refill_memory_reserve): Use new type for spare memory.
1767 This prevents live_cons_p and live_string_p from incorrect
1768 detection of uninitialized objects from spare memory as live.
1770 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
1773 * Makefile.in (.PHONY): versioclean -> versionclean.
1775 Remove unused external symbols.
1776 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
1777 * window.c (Qwindow_valid_p, decode_valid_window):
1778 Now static, not extern.
1779 * data.c (Qinterval): Remove; unused.
1780 (syms_of_data): Do not define 'interval'.
1781 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
1782 * window.h (decode_valid_window):
1785 * character.c, charset.c, chartab.c: Use bool for booleans.
1786 * character.c (lisp_string_width, string_count_byte8)
1787 (string_escape_byte8):
1788 * charset.c (charset_map_loaded, load_charset_map, read_hex):
1789 (load_charset_map_from_file, map_charset_chars)
1790 (Fdefine_charset_internal, define_charset_internal)
1791 (Fdeclare_equiv_charset, find_charsets_in_text)
1792 (Ffind_charset_region, char_charset, Fiso_charset):
1793 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
1794 (sub_char_table_set, sub_char_table_set_range)
1795 (char_table_set_range, optimize_sub_char_table)
1796 (map_sub_char_table):
1797 Use bool for boolean.
1798 * character.c (str_to_unibyte): Omit last boolean argument; it was
1799 always 0. All callers changed.
1800 * character.h, charset.h: Adjust to match previous changes.
1801 * character.h (char_printable_p): Remove decl of nonexistent function.
1802 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
1803 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
1804 are all boolean, so make them single-bit bitfields.
1806 * lisp.h (ASET): Remove attempt to detect side effects.
1807 It was meant to be temporary and it often doesn't work,
1808 because when IDX has side effects the behavior of IDX==IDX
1809 is undefined. See Stefan Monnier in
1810 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
1812 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1814 * lisp.h (functionp): New function (extracted from Ffunctionp).
1815 (FUNCTIONP): Use it.
1816 * eval.c (Ffunctionp): Use it.
1818 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1820 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
1821 as that's faster and simpler than static storage. Don't bother
1822 with the g_main_context_query overhead if g_main_context_pending
1823 says no events are pending.
1824 (gfds, gfds_size): Remove these static vars.
1825 (xgselect_initialize): Remove; no longer needed.
1826 All uses and decls removed.
1828 * emacs.c (fatal_error_signal_hook): Remove.
1829 All uses removed. This leftover from old code was always 0.
1831 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
1832 * casefiddle.c (casify_object, casify_region):
1833 * casetab.c (set_case_table):
1834 * category.c, category.h (word_boundary_p):
1835 * category.h (CHAR_HAS_CATEGORY):
1836 Use bool for booleans, instead of int.
1838 2012-08-25 Eli Zaretskii <eliz@gnu.org>
1840 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
1842 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1844 On assertion failure, print backtrace if available.
1845 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
1846 (die) [ENABLE_CHECKING]: Print a backtrace if available.
1847 * Makefile.in (LIB_EXECINFO): New macro.
1850 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
1851 * bytecode.c (exec_byte_code):
1852 * callint.c (check_mark, Fcall_interactively):
1853 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
1854 (getenv_internal, sync_process_alive, call_process_exited):
1855 * lisp.h (USE_SAFE_ALLOCA):
1856 Use bool for booleans, instead of int.
1857 * lisp.h, process.h: Adjust prototypes to match above changes.
1858 * callint.c (Fcall_interactively): Don't assume the mark's
1859 offset fits in 'int'.
1861 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
1863 * buffer.c, buffer.h: Use bool for boolean.
1864 * buffer.c (reset_buffer_local_variables)
1865 (buffer_lisp_local_variables, Fset_buffer_modified_p)
1866 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
1867 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
1868 (overlay_touches_p, overlay_strings, Foverlay_put)
1869 (report_overlay_modification, call_overlay_mod_hooks):
1870 (mmap_enlarge, mmap_set_vars):
1871 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
1872 Use bool for booleans, instead of int.
1873 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
1874 since the 1-or-0 return value is always ignored anyway.
1875 (mmap_initialized_p):
1876 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
1877 * buffer.h, lisp.h: Adjust prototypes to match above changes.
1879 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1881 * bidi.c: Use bool for boolean.
1882 This is a bit more readable, and makes the text segment of bidi.o
1883 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
1884 Presumably it's faster too.
1885 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
1887 (bidi_cache_find_level_change, bidi_cache_iterator_state)
1888 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
1889 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
1890 (bidi_explicit_dir_char, bidi_level_of_next_char)
1891 (bidi_find_other_level_edge, bidi_move_to_visually_next):
1892 Use bool for booleans, instead of int.
1893 * dispextern.h (bidi_init_it, bidi_paragraph_init)
1894 (bidi_unshelve_cache): Adjust decls to match code.
1896 2012-08-23 Martin Rudalics <rudalics@gmx.at>
1898 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
1901 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1903 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
1904 * atimer.h: Include <stdbool.h>.
1906 2012-08-22 Dan Nicolaescu <dann@gnu.org>
1908 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
1909 compile time tests instead of run time tests on systems that do
1911 (FRAME_MAC_P): Remove leftover from deleted code.
1912 * frame.c (syms_of_frame): Remove leftover from deleted code.
1914 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
1916 * nsterm.m (insertText:): Don't clear modifiers if code is space.
1918 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
1920 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
1921 Otherwise, the compiler complains about (A?B:C) where B is void
1922 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
1923 (fontset_add): Return void, for FONTSET_ADD.
1925 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1927 * alloc.c: Use bool for booleans.
1928 (gc_in_progress, abort_on_gc)
1929 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1930 (dont_register_blocks) [GC_MALLOC_CHECK]:
1931 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
1932 (check_string_bytes, make_specified_string, memory_full)
1933 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
1934 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
1935 (mark_stack, valid_pointer_p, make_pure_string)
1936 (Fgarbage_collect, survives_gc_p, gc_sweep):
1937 Use bool for booleans, instead of int.
1938 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1939 Remove unused local.
1940 * alloc.c (PURE_POINTER_P):
1941 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
1942 * editfns.c (Fformat):
1943 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
1945 * fns.c (sweep_weak_table):
1946 * lisp.h (suppress_checking, push_message, survives_gc_p)
1947 (make_pure_string, gc_in_progress, abort_on_gc):
1948 * lread.c (readchar, read1):
1949 * print.c (Fprin1_to_string):
1950 * xdisp.c (push_message):
1951 Use bool for booleans affected directly or indirectly by
1954 Make recently-introduced setters macros.
1955 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
1956 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
1957 (set_fontset_default, set_fontset_fallback): Rename from their
1958 upper-case counterparts, and make them functions rather than macros.
1959 This is more consistent with the other recently-introduced setters.
1960 These don't need to be inline, since they're local.
1962 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
1964 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
1965 the loop (Bug#12247).
1967 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1969 * lisp.h (vcopy): Use memcpy rather than our own loop.
1970 This fixes a performance regression introduced by the recent
1971 addition of vcopy. This means 'vcopy' will need to be modified
1972 for a copying collector, but that's OK. Also, tighten the
1973 checking in the assertion.
1975 2012-08-21 Eli Zaretskii <eliz@gnu.org>
1977 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
1978 components for RTL text (Bug#11860). Adjust X-OFFSET of each
1979 non-base glyph for the width of the base character, according to
1980 what x_draw_composite_glyph_string_foreground expects.
1981 Generate WADJUST value according to composition_gstring_width's
1982 expectations, to produce correct width of the composed character.
1983 Reverse the sign of the DU offset produced by ScriptPlace.
1985 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1987 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
1989 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1991 Avoid direct writes to contents member of struct Lisp_Vector.
1992 * lisp.h (vcopy): New function to copy data into vector.
1993 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
1994 * fns.c (Ffillarray): Use ASET.
1995 * keyboard.c (timer_check_2): Use AREF and ASET.
1996 (append_tool_bar_item, Frecent_keys): Use vcopy.
1997 * lread.c (read_vector): Use ASET.
1998 * msdos.c (Frecent_doskeys): Use vcopy.
1999 * xface.c (Finternal_copy_lisp_face): Use vcopy.
2000 (Finternal_merge_in_global_face): Use ASET and vcopy.
2001 * xfont.c (xfont_list_pattern): Likewise.
2003 2012-08-21 Martin Rudalics <rudalics@gmx.at>
2005 * window.c (Fwindow_point): For the selected window always return
2006 the position of its buffer's point.
2007 (Fset_window_point): For the selected window always go in its
2008 buffer to the specified position.
2010 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
2012 Setter macros for fontsets.
2013 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
2014 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
2015 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
2018 2012-08-20 Glenn Morris <rgm@gnu.org>
2020 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
2021 Don't assume that `ln -f' works.
2023 2012-08-20 Eli Zaretskii <eliz@gnu.org>
2025 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
2026 and later about non-assignments with no effect. See discussion at
2027 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
2030 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2032 Inline setter functions for Lisp_Objects slots of struct specbinding.
2033 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
2036 2012-08-20 Martin Rudalics <rudalics@gmx.at>
2038 * window.c (select_window): Always make selected window's buffer
2041 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2043 Use AREF and ASET for docstrings of category tables.
2044 * category.h (CATEGORY_DOCSTRING): Use AREF.
2045 (SET_CATEGORY_DOCSTRING): Use ASET.
2046 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
2048 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2050 Inline setter functions for hash table members.
2051 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
2052 (set_hash_hash, set_hash_index): Rename with _slot suffix.
2053 (set_hash_key_and_value, set_hash_index, set_hash_next)
2054 (set_hash_hash): New functions.
2055 * charset.c, fns.c: Adjust users.
2057 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2059 Inline getter and setter functions for per-buffer values.
2060 * buffer.h (per_buffer_default, set_per_buffer_default)
2061 (per_buffer_value, set_per_buffer_value): New functions.
2062 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
2063 * buffer.c, data.c: Adjust users.
2065 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
2067 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
2069 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
2071 Rely on <config.h> + <unistd.h> to declare 'environ',
2072 as gnulib does this if the system doesn't.
2073 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
2074 Remove declaration. MS-Windows declares it on stdlib.h which is
2075 included by conf_post.h.
2076 * emacs.c (environ) [DOUG_LEA_MALLOC]:
2077 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
2078 * vm-limit.c: Include <unistd.h>, for 'environ'.
2080 * unexaix.c, unexcoff.c: Include "mem-limits.h".
2081 (start_of_data): Remove decl; mem-limits.h provides it.
2083 * xdisp.c (handle_invisible_prop): Make it a bit faster
2084 and avoid a gcc -Wmaybe-uninitialized diagnostic.
2086 2012-08-19 Chong Yidong <cyd@gnu.org>
2088 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
2091 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
2093 * .gdbinit: Use call instead of set when calling a function in the
2096 * data.c (set_internal): Don't use set_blv_found.
2097 (Fkill_local_variable): Likewise.
2099 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
2101 * nsfont.m (ns_ascii_average_width): Ensure the string
2102 ascii_printable is initialized with a null-terminated character
2103 array. Otherwise, it can contain undesired extra characters.
2105 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
2107 port new setting code to Sun C 5.8 2005/10/13
2108 * chartab.c, lisp.h (char_table_set, char_table_set_range):
2109 Return void, not Lisp_Object. Otherwise, the compiler
2110 complains about (A?B:C) where B is void and C is Lisp_Object
2111 when compiling CHAR_TABLE_SET, due to the recent change to
2112 the API of sub_char_table_set_contents.
2114 2012-08-18 Chong Yidong <cyd@gnu.org>
2116 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
2117 for the string case (Bug#3874).
2119 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
2121 * buffer.h (BSET): Remove (Bug#12215).
2122 Replace all uses with calls to new setter functions.
2123 (bset_bidi_paragraph_direction, bset_case_canon_table)
2124 (bset_case_eqv_table, bset_directory, bset_display_count)
2125 (bset_display_time, bset_downcase_table)
2126 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
2127 (bset_last_selected_window, bset_local_var_alist)
2128 (bset_mark_active, bset_point_before_scroll, bset_read_only)
2129 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
2131 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2132 (bset_auto_fill_function, bset_auto_save_file_format)
2133 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2134 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2135 (bset_cache_long_line_scans, bset_case_fold_search)
2136 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2137 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2138 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2139 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2140 (bset_header_line_format, bset_indicate_buffer_boundaries)
2141 (bset_indicate_empty_lines, bset_invisibility_spec)
2142 (bset_left_fringe_width, bset_major_mode, bset_mark)
2143 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2144 (bset_name, bset_overwrite_mode, bset_pt_marker)
2145 (bset_right_fringe_width, bset_save_length)
2146 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2147 (bset_scroll_up_aggressively, bset_selective_display)
2148 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2149 (bset_word_wrap, bset_zv_marker):
2150 * category.c (bset_category_table):
2151 * syntax.c (bset_syntax_table):
2152 New setter functions.
2154 * process.h (PSET): Remove (Bug#12215).
2155 Replace all uses with calls to new setter functions.
2156 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2157 (PROCESS_INLINE): New macro.
2158 (pset_childp): New setter function.
2159 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
2160 * process.c (PROCESS_INLINE):
2161 Define to EXTERN_INLINE, so that the corresponding functions
2162 are compiled into code.
2163 (pset_buffer, pset_command, pset_decode_coding_system)
2164 (pset_decoding_buf, pset_encode_coding_system)
2165 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
2166 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
2167 (pset_type, pset_write_queue): New setter functions.
2169 * window.h (WSET): Remove (Bug#12215).
2170 Replace all uses with calls to new setter functions.
2171 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2172 (WINDOW_INLINE): New macro.
2173 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
2174 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
2175 (wset_total_lines, wset_vertical_scroll_bar)
2176 (wset_window_end_pos, wset_window_end_valid)
2177 (wset_window_end_vpos): New setter functions.
2178 * window.c (WINDOW_INLINE):
2179 Define to EXTERN_INLINE, so that the corresponding functions
2180 are compiled into code.
2181 (wset_combination_limit, wset_dedicated, wset_display_table)
2182 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
2183 (wset_new_normal, wset_new_total, wset_next_buffers)
2184 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
2185 (wset_prev_buffers, wset_right_fringe_width)
2186 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
2187 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
2188 (wset_window_parameters):
2189 * xdisp.c (wset_base_line_number, wset_base_line_pos)
2190 (wset_column_number_displayed, wset_region_showing):
2191 New setter functions.
2193 * termhooks.h (TSET): Remove (Bug#12215).
2194 Replace all uses with calls to new setter functions.
2195 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2196 (TERMHOOKS_INLINE): New macro.
2197 (tset_charset_list, tset_selection_alist): New setter functions.
2198 * terminal.c (TERMHOOKS_INLINE):
2199 Define to EXTERN_INLINE, so that the corresponding functions
2200 are compiled into code.
2201 (tset_param_alist): New setter function.
2203 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
2205 * keyboard.h (KSET): Remove (Bug#12215).
2206 Replace all uses with calls to new setter functions.
2207 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2208 (KEYBOARD_INLINE): New macro.
2209 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
2210 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
2211 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
2212 New setter functions.
2213 * keyboard.c (KEYBOARD_INLINE):
2214 Define to EXTERN_INLINE, so that the corresponding functions
2215 are compiled into code.
2216 (kset_echo_string, kset_kbd_queue)
2217 (kset_keyboard_translate_table, kset_last_prefix_arg)
2218 (kset_last_repeatable_command, kset_local_function_key_map)
2219 (kset_overriding_terminal_local_map, kset_real_last_command)
2220 (kset_system_key_syms): New setter functions.
2222 * frame.h (FSET): Remove (Bug#12215).
2223 Replace all uses with calls to new setter functions.
2224 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2225 (FRAME_INLINE): New macro.
2226 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
2227 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
2228 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
2229 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
2230 (fset_param_alist, fset_root_window, fset_scroll_bars)
2231 (fset_selected_window, fset_title, fset_tool_bar_items)
2232 (fset_tool_bar_position, fset_tool_bar_window): New functions.
2233 * frame.c (FRAME_INLINE):
2234 Define to EXTERN_INLINE, so that the corresponding functions
2235 are compiled into code.
2236 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
2238 A few more naming-convention fixes for getters and setters.
2239 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
2240 and rename from buffer_overlays_set_before.
2241 (set_buffer_overlays_after): Move here from buffer.h, and rename
2242 from buffer_overlays_set_after.
2243 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
2245 (set_buffer_intervals): Rename from buffer_set_intervals.
2246 * intervals.c (set_interval_object): Move here from intervals.h,
2247 and rename from interval_set_object.
2248 (set_interval_left): Move here from intervals.h, and rename from
2250 (set_interval_right): Move here from intervals.h, and rename from
2252 (copy_interval_parent): Move here from intervals.h, and rename from
2253 interval_copy_parent.
2254 * intervals.h (set_interval_parent): Rename from interval_set_parent.
2255 (set_interval_plist): Rename from interval_set_plist.
2256 Return void, not Lisp_Object, since no caller uses the result.
2257 * lisp.h (string_intervals): Rename from string_get_intervals.
2258 (set_string_intervals): Rename from string_set_intervals.
2260 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
2261 (set_char_table_contents): Rename from char_table_set_contents.
2262 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
2263 All uses changed. See the end of
2264 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
2266 * lisp.h (CSET): Remove (Bug#12215).
2267 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
2268 (set_char_table_purpose): New functions,
2269 replacing CSET. All uses changed. For example, replace
2270 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
2271 "set_char_table_parent (char_table, parent);".
2272 The old version was confusing because it used the same name
2273 'parent' for two different things.
2275 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
2277 Functions to get and set Lisp_Object fields of buffer-local variables.
2278 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
2279 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
2280 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
2281 * data.c, eval.c, frame.c: Adjust users.
2283 2012-08-17 Chong Yidong <cyd@gnu.org>
2285 * xfaces.c (merge_face_vectors): If the target font specfies a
2286 font spec, make the font's attributes take precedence over
2287 directly-specified attributes.
2288 (merge_face_ref): Recognize :font.
2290 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
2292 Do not use memcpy for copying intervals.
2293 * intervals.c (reproduce_interval): New function.
2294 (reproduce_tree, reproduce_tree_obj): Use it.
2295 (reproduce_tree_obj): Remove prototype.
2297 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
2299 * lisp.h (duration_to_sec_usec): Remove unused decl.
2301 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
2303 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
2304 to an allocated instance of NSString, not to the class itself.
2306 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
2308 * makefile.w32-in (C_CTYPE_H): New macro.
2309 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
2310 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
2311 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2313 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
2315 Use ASCII tests for character types.
2316 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
2318 Don't include <ctype.h>; was not needed.
2319 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
2320 * sysdep.c, xfaces.c:
2321 Include <c-ctype.h> instead of <ctype.h>.
2322 * nsterm.m: Include <c-ctype.h>.
2323 * charset.c (read_hex):
2324 * doc.c (Fsnarf_documentation):
2325 * fileio.c (IS_DRIVE) [WINDOWSNT]:
2326 (DRIVE_LETTER) [DOS_NT]:
2327 (Ffile_name_directory, Fexpand_file_name)
2328 (Fsubstitute_in_file_name):
2329 * font.c (font_parse_xlfd, font_parse_fcname):
2330 * frame.c (x_set_font_backend):
2331 * gtkutil.c (xg_get_font):
2332 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
2333 * nsimage.m (hexchar):
2334 * nsterm.m (ns_xlfd_to_fontname):
2335 * sysdep.c (system_process_attributes):
2336 * xfaces.c (hash_string_case_insensitive):
2337 Use C-locale tests instead of locale-specific tests for character
2338 types, since we want the ASCII interpretation here, not the
2339 interpretation suitable for whatever happens to be the current locale.
2341 2012-08-16 Martin Rudalics <rudalics@gmx.at>
2343 Consistently check windows for validity/liveness
2344 (Bug#11984, Bug#12025, Bug#12026).
2345 * lisp.h (CHECK_VALID_WINDOW): New macro.
2346 * window.c (decode_window): Rename to decode_live_window.
2347 (decode_valid_window, Fwindow_valid_p): New functions.
2348 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
2349 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
2350 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
2351 (Fwindow_prev_sibling, Fwindow_combination_limit)
2352 (Fset_window_combination_limit, Fwindow_use_time)
2353 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
2354 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
2355 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
2356 (Fwindow_hscroll, Fset_window_hscroll)
2357 (Fwindow_redisplay_end_trigger)
2358 (Fset_window_redisplay_end_trigger, Fwindow_edges)
2359 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
2360 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
2361 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
2362 (Fwindow_end, Fset_window_point, Fset_window_start)
2363 (Fpos_visible_in_window_p, Fwindow_line_height)
2364 (Fwindow_dedicated_p, Fset_window_dedicated_p)
2365 (Fwindow_prev_buffers, Fset_window_prev_buffers)
2366 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
2367 (Fset_window_parameter, Fwindow_display_table)
2368 (Fset_window_display_table, Fdelete_other_windows_internal)
2369 (Fset_window_buffer, Fset_window_new_total)
2370 (Fset_window_new_normal, Fdelete_window_internal)
2371 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
2372 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
2373 (Fwindow_scroll_bars): Check whether argument window is a valid or
2374 live window. Update doc-strings.
2375 (syms_of_window): New symbol Qwindow_valid_p.
2376 * keyboard.c (Fposn_at_x_y): Check whether argument
2377 frame_or_window denotes a valid window.
2379 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
2381 Fix previous char table change.
2382 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
2383 * chartab.c (optimize_sub_char_table): Likewise.
2385 2012-08-16 Chong Yidong <cyd@gnu.org>
2387 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
2389 * xfont.c (xfont_open):
2390 * xftfont.c (xftfont_open): Set the font's max_width field.
2392 * nsfont.m (nsfont_open): Similar to the Xft backend, set
2393 min_width to space_width and average_width to the average over
2394 printable ASCII characters.
2395 (ns_char_width): Code cleanup.
2396 (ns_ascii_average_width): New utility function.
2398 * font.h (struct font): Update comments.
2400 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
2402 Simple interface to set Lisp_Object fields of character tables.
2403 * lisp.h (CSET): New macro.
2404 (char_table_set_extras, char_table_set_contents)
2405 (sub_char_table_set_contents): New function.
2406 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
2407 * syntax.c: Adjust users.
2409 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
2411 * eval.c (eval_sub): Bind lexical-binding.
2412 * lread.c (Qlexical_binding): Make non-static.
2414 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
2416 * nsmenu.m (popupSession): Remove.
2417 (pop_down_menu): Remove endModalSession.
2418 (timeout_handler:): New method.
2419 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
2420 Call runModalForWindow. Check timer_fired when it returns.
2421 If not set, cancel timer and break out of loop.
2422 Otherwise loop again, with a new timeout.
2424 * nsterm.m: Include fcntl.h if present.
2425 (fd_entry, t_readfds, inNsSelect): Remove.
2426 (select_writefds, select_valid, select_timeout, selfds)
2427 (select_mutex, apploopnr): Add.
2428 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
2429 Otherwise call kbd_buffer_store_event.
2430 (ns_send_appdefined): Remove release of fd_entry.
2431 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
2432 Increment and decrement apploopnr.
2433 (ns_select): If no file descriptors, just do a NSTimer.
2434 Otherwise copy read/write masks and start select thread (fd_handler).
2435 Start main loop and wait for application defined event.
2436 Inform select thread to stop selecting after main loop is exited.
2437 (ns_term_init): Create selfds pipe and set non-blocking.
2438 Initialize select_mutex. Start the select thread (fd_handler).
2439 (fd_handler:): Loop forever, wait for info from the main thread
2440 to either start or stop selecting. When select returns, send
2441 and appdefined event.
2442 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
2443 If not call kbd_buffer_store_event.
2445 * nsterm.h (EmacsApp): fd_handler takes id argument.
2446 (EmacsDialogPanel): Add timer_fired and timeout_handler.
2448 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
2450 2012-08-15 Eli Zaretskii <eliz@gnu.org>
2452 * region-cache.c (move_cache_gap): Update gap_len using the actual
2453 growth of the boundaries array. Do not change cache_len.
2456 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
2458 Generalize and cleanup font subsystem checks.
2459 * font.h (FONT_DEBUG, font_assert): Remove.
2460 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
2461 Change font_assert to eassert. Use eassert where appropriate.
2463 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
2465 * gtkutil.c (xg_get_font): Use pango_units_to_double.
2467 2012-08-15 Chong Yidong <cyd@gnu.org>
2469 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
2470 When using the new font chooser, use gtk_font_chooser_get_font_desc to
2471 extract the font descriptor instead of just the font name.
2472 In that case, return a font spec instead of a string.
2473 (x_last_font_name): Move to this file from xfns.c.
2475 * xfns.c (Fx_select_font): The return value can also be a font
2476 spec. Move x_last_font_name management to gtkutil.c.
2478 * xfaces.c: Make font weight and style symbols non-static.
2480 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
2482 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
2485 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
2487 * alloc.c (Fgarbage_collect): Use plural form consistently.
2489 2012-08-14 Eli Zaretskii <eliz@gnu.org>
2491 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
2492 iteration through the command loop. Fixes a problem whereby mouse
2493 movements are ignored until the first mouse click.
2495 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2497 Use bool, not int, for Lisp booleans.
2498 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
2499 makes Emacs a bit smaller and presumably a bit faster.
2500 * lisp.h: Include <stdbool.h>.
2501 (struct Lisp_Boolfwd, defvar_bool):
2502 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
2503 * regex.c [!emacs]: Include <stdbool.h>.
2504 (false, true): Remove; <stdbool.h> does this for us now.
2506 2012-08-14 Chong Yidong <cyd@gnu.org>
2508 * character.c (Fcharacterp): Doc fix (Bug#12076).
2510 * data.c (Findirect_variable): Doc fix (Bug#11040).
2512 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
2514 * editfns.c (Fformat): Doc fix (Bug#12059).
2515 (Fsave_current_buffer): Doc fix (Bug#11542).
2517 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2519 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
2522 2012-08-14 Martin Rudalics <rudalics@gmx.at>
2524 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
2525 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
2526 * minibuf.c (choose_minibuf_frame, read_minibuf):
2527 * w32fns.c (x_create_tip_frame):
2528 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
2529 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
2531 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2533 * intervals.c (offset_intervals): Remove obsolete comment.
2535 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
2537 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
2539 2012-08-14 Gergely Risko <gergely@risko.hu>
2541 * coding.c (decode_coding): Record buffer modification before
2542 disabling undo_list (Bug#11773).
2544 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
2546 Revert and cleanup some recent overlay changes.
2547 * buffer.h (enum overlay_type): Remove.
2548 (buffer_get_overlays, buffer_set_overlays): Likewise.
2549 (buffer_set_overlays_before, buffer_set_overlays_after):
2550 New function. Adjust users.
2551 (unchain_both): Add eassert.
2553 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
2555 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
2557 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2559 * gtkutil.c (xg_mark_data): Don't assume C99.
2561 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
2563 * gtkutil.c (xg_frame_tb_info): New struct.
2564 (TB_INFO_KEY): New define.
2565 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
2566 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
2567 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
2569 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
2570 is up to date. Otherwise store new data.
2571 (free_frame_tool_bar): Free xg_frame_tb_info if present.
2573 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2575 Use KSET for write access to Lisp_Object members of struct kboard.
2576 * keyboard.h (KSET): New macro.
2577 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
2578 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
2579 * xterm.c: Adjust users.
2581 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2583 Use BSET for write access to Lisp_Object members of struct buffer.
2584 * buffer.h (BSET): New macro.
2585 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
2586 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
2587 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
2588 * window.c, xdisp.c, xfns.c: Adjust users.
2590 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
2592 * lread.c (syms_of_lread): Initialize Vlexical_binding.
2594 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
2596 * nsterm.m (not_in_argv): New function.
2597 (application:openFile, application:openTempFile:):
2598 (application:openFileWithoutUI:, application:openFiles:): Open file
2599 if not_in_argv returns non-zero (bug#12171).
2601 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
2602 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
2603 Define for Gtk+ versions less than 3.2.
2604 (xg_get_font_name): Use those functions/macros here.
2605 Reported by Frans Oilinki <moilinki@gmail.com>.
2607 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2609 * unexmacosx.c (copy_data_segment): Copy initialized data in
2610 statically linked libraries from input file rather than memory.
2612 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
2613 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
2614 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
2616 2012-08-10 Glenn Morris <rgm@gnu.org>
2618 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
2619 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
2621 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2623 Fix last change to allow compilation with low optimization levels.
2624 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
2625 Reported by Jan Djärv <jan.h.d@swipnet.se>.
2627 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2629 Use common inline syntax in intervals.h.
2630 * intervals.h (INTERVALS_INLINE): New macro.
2631 Change all users from LISP_INLINE.
2633 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2635 Define Qnone once for all platforms.
2636 * frame.c (Qnone): Define here.
2637 (syms_of_frame): DEFSYM it.
2638 * lisp.h (Qnone): New declaration.
2639 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
2640 * xfns.c: Remove duplication. Adjust users.
2642 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2644 Remove unused macros from intervals.h.
2645 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
2646 * intervals.c: Adjust comment.
2648 2012-08-10 Eli Zaretskii <eliz@gnu.org>
2650 * w32fns.c <w32_unicode_gui>: New static variable.
2651 (globals_of_w32fns): Initialize it according to os_subtype.
2652 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
2655 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
2656 Eli Zaretskii <eliz@gnu.org>
2658 Fix bug #10299 with Unicode characters sent by customized
2659 keyboards created by MSKLC.
2660 * w32fns.c (INIT_WINDOW_CLASS): New macro.
2661 (w32_init_class): Use it to initialize the Emacs class with either
2662 ANSI or Unicode API calls.
2663 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
2665 (w32_wnd_proc): If the character code sent by WM_CHAR or
2666 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
2667 original message. Call DefWindowProcW on NT and later.
2669 2012-08-10 Glenn Morris <rgm@gnu.org>
2671 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
2673 * lisp.h (DIRECTORY_SEP): Let configure set it.
2675 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
2677 Use TSET for write access to Lisp_Object slots of struct terminal.
2678 * termhooks.h (TSET): New macro.
2679 * coding.c, terminal.c, xselect.c: Adjust users.
2681 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
2683 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
2684 the failing expression, include them in the error message.
2685 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
2686 * lisp.h (internal_condition_case_n): Update declaration.
2688 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2690 Inline functions to examine and change buffer overlays.
2691 * buffer.c (unchain_both): New function.
2692 * buffer.h (buffer_get_overlays, buffer_set_overlays):
2693 (buffer_has_overlays): New function.
2694 (enum overlay_type): New enum.
2695 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
2696 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
2698 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2700 Inline functions to examine and change buffer intervals.
2701 * alloc.c (mark_interval_tree): Remove.
2702 (MARK_INTERVAL_TREE): Simplify.
2703 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
2704 * intervals.c (buffer_balance_intervals): New function.
2705 (graft_intervals_into_buffer): Adjust indentation.
2706 (set_intervals_multibyte): Simplify.
2707 * buffer.h (BUF_INTERVALS): Remove.
2708 (buffer_get_intervals, buffer_set_intervals): New function.
2709 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
2710 * intervals.c, textprop.c: Adjust users.
2712 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2714 Inline functions to examine and change string intervals.
2715 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
2716 (string_get_intervals, string_set_intervals): New function.
2717 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2718 * lread.c, print.c, textprop.c: Adjust users.
2720 2012-08-08 Glenn Morris <rgm@gnu.org>
2722 * lisp.mk (lisp): Remove language/persian.elc.
2724 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2727 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
2728 (NULL_INTERVAL_P): Likewise. Adjust users.
2729 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
2730 Adjust comment. Move under #if 0.
2731 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2732 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
2734 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2736 Check total length of intervals with eassert.
2737 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
2738 * intervals.c: Change all users to eassert.
2740 2012-08-07 Eli Zaretskii <eliz@gnu.org>
2742 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
2743 Rename fields to match removal of FGET and WGET and disuse of
2744 INTERNAL_FIELD in Lisp_Cons.
2746 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2748 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
2749 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
2750 name since all xname users are fixed long time ago. Do not
2752 (set_symbol_name, set_symbol_function, set_symbol_plist):
2753 (set_symbol_next, set_overlay_plist): New function.
2754 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
2755 (struct Lisp_Overlay): Likewise.
2756 (CVAR, MVAR, SVAR): Remove.
2757 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
2758 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
2759 * xterm.c: Adjust users.
2760 * .gdbinit: Change to use name field of struct Lisp_Symbol
2763 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2765 Basic functions to set Lisp_Object and pointer slots of intervals.
2766 * intervals.h (interval_set_parent, interval_set_object):
2767 (interval_set_left, interval_set_right, interval_set_plist):
2768 (interval_copy_parent): New function.
2769 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
2770 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
2772 (INTERVAL_SIZE): Remove. Adjust users.
2773 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
2775 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2777 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
2778 * process.h (PGET): Remove.
2779 (struct Lisp_Process): Do not use INTERNAL_FIELD.
2780 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2782 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2784 Drop WGET and revert read access to Lisp_Objects slots of struct window.
2785 * window.h (WGET): Remove.
2786 (struct window): Do not use INTERNAL_FIELD.
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:
2794 2012-08-07 Chong Yidong <cyd@gnu.org>
2796 * window.c (Fwindow_edges, Fwindow_pixel_edges)
2797 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
2798 (Fdelete_window_internal): Signal an error if the window is not on
2799 a live frame (Bug#12025).
2801 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2803 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
2804 * frame.h (FGET): Remove.
2805 (struct frame): Do not use INTERNAL_FIELD.
2806 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2807 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2808 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2809 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2811 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
2813 * w32.c: Silence compiler warnings.
2814 (map_w32_filename): Remove unused variable `is_fat'.
2815 (chase_symlinks): Add parentheses around expression.
2817 2012-08-06 Glenn Morris <rgm@gnu.org>
2819 * sysdep.c: Respect BROKEN_GETWD.
2821 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
2822 Let configure handle it.
2823 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
2825 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2827 Use GCALIGNMENT where appropriate.
2828 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
2829 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
2830 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
2832 2012-08-06 Eli Zaretskii <eliz@gnu.org>
2834 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
2835 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
2837 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
2839 * buffer.h (struct buffer): Revert `indirections' to a simple int;
2840 that should be sufficient for everyone.
2842 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2844 * keyboard.c (timer_check_2): Add break so timer_check returns next
2847 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2849 Fix Windows build errors introduced after converting to WGET and WSET.
2850 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
2851 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2853 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2855 * nsterm.m (ns_frame_rehighlight): Use FSET.
2857 * nsmenu.m (ns_update_menubar): Use FSET.
2859 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2861 Separate read and write access to Lisp_Object slots of Lisp_Process.
2862 * process.h (PGET, PSET): New macros similar to AREF and ASET.
2863 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2865 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2867 Separate read and write access to Lisp_Object slots of struct window.
2868 * window.h (WGET, WSET): New macros similar to AREF and ASET.
2869 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2870 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2871 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2872 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2873 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2876 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2878 Fix Windows build errors introduced after converting to FGET and FSET.
2879 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
2880 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
2881 (w32_judge_scroll_bars): Change to use FSET.
2882 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2884 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2886 Fix replacement typo.
2887 * window.c (replace_window): Set root_window instead of
2888 selected_window. This fixes a total window subsystem
2889 malfunction reported by Bastien Guerry <bzg@gnu.org>.
2891 2012-08-06 Glenn Morris <rgm@gnu.org>
2893 * lisp.mk (lisp): Add language/persian.elc.
2895 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2897 Separate read and write access to Lisp_Object slots of struct frame.
2898 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
2899 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2900 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2901 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2902 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2904 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
2906 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
2908 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
2910 Generalize common compile-time constants.
2911 * lisp.h (header_size, bool_header_size, word_size): Now here.
2912 (struct Lisp_Vector): Add comment.
2913 (struct Lisp_Bool_Vector): Move up to define handy constants.
2914 (VECSIZE, PSEUDOVECSIZE): Simplify.
2915 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
2916 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
2917 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
2918 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
2919 * xfont.c, xmenu.c: Use word_size where appropriate.
2921 2012-08-05 Lawrence Mitchell <wence@gmx.li>
2923 * search.c (Freplace_match): Treat \? in the replacement text
2924 literally (Bug#8161).
2926 2012-08-05 Chong Yidong <cyd@gnu.org>
2928 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
2929 * frame.c (Vdelete_frame_functions):
2930 * emacs.c (Vkill_emacs_hook): Doc fix.
2932 2012-08-04 Eli Zaretskii <eliz@gnu.org>
2934 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
2935 --with-x-toolkit=no builds.
2936 Reported by Carsten Mattner <carstenmattner@gmail.com>.
2938 2012-08-04 Chong Yidong <cyd@gnu.org>
2940 * syntax.c (Fmodify_syntax_entry): Doc fix.
2942 2012-08-04 Eli Zaretskii <eliz@gnu.org>
2944 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
2945 * w32.c (init_environment): Change the default values of many
2946 environment variables in dflt_envvars[] to NULL, to avoid pushing
2947 them into environment when they were not already defined.
2948 Remove the code that deletes site-lisp subdirectories from the default
2949 value of EMACSLOADPATH, as it is no longer needed.
2950 (check_windows_init_file): Now external, not static.
2951 Use Vload_path as is, without adding anything, as this function is now
2952 called when Vload_path is already set up.
2954 * w32.h (check_windows_init_file): Add prototype.
2956 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
2957 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
2958 compatibility with Posix platforms.
2959 (main): Move the call to check_windows_init_file to here from
2961 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
2962 any, in the DEFALT argument into the root of the Emacs build or
2963 installation tree, as appropriate.
2965 * callproc.c (init_callproc_1): Call decode_env_path instead of
2966 doing its equivalent by hand.
2967 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
2968 the code that sets Vexec_path run on MS-Windows.
2970 * lread.c (init_lread): Add comments to #ifdef's.
2972 * msdos.c (dos_set_window_size, IT_update_begin)
2973 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
2974 instead of direct references.
2976 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
2978 Export DEFAULT_REHASH_* to GDB.
2979 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
2980 Now constants, not macros.
2982 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
2984 Remove unnecessary casts involving pointers.
2985 These casts are no longer needed now that we assume C89 or later,
2986 since they involve casting to or from void *.
2987 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
2988 (make_pure_float, make_pure_vector):
2989 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
2990 * macros.c (Fstart_kbd_macro):
2991 * menu.c (find_and_return_menu_selection):
2992 * minibuf.c (read_minibuf_noninteractive):
2993 * sysdep.c (closedir):
2994 * xdisp.c (x_produce_glyphs):
2995 * xfaces.c (compare_fonts_by_sort_order):
2996 * xfns.c (x_real_positions, select_visual):
2997 * xselect.c (x_stop_queuing_selection_requests)
2998 (x_get_window_property, x_get_window_property_as_lisp_data):
2999 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
3000 Remove unnecessary pointer casts.
3001 * alloc.c (record_xmalloc): New function.
3002 * lisp.h (record_xmalloc): New decl.
3003 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
3004 more like a function. This is because the pointer cast is not
3005 needed. All uses changed.
3006 * print.c (print_string, print_error_message): Avoid length recalc.
3008 Improve fix for macroexp crash with debugging (Bug#12118).
3009 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
3010 ARRAY_MARK_FLAG when checking subscripts, because ASET is
3011 not supposed to be invoked from the garbage collector.
3012 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
3013 (gc_aset): New function, which is like ASET but can be
3014 used in the garbage collector.
3015 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
3016 (set_hash_index): Use it instead of ASET.
3018 2012-08-03 Eli Zaretskii <eliz@gnu.org>
3020 Support symlinks on latest versions of MS-Windows.
3021 * w32.c: Include winioctl.h and aclapi.h.
3022 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
3023 (revert_to_self): Forward declarations of static functions.
3024 <static BOOL g_b_init_get_security_info>:
3025 <g_b_init_create_symbolic_link>: New static flags.
3026 (globals_of_w32): Initialize them to zero.
3027 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
3028 (map_w32_filename): Improve commentary. Simplify switch.
3029 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
3030 headers (most versions of MinGW w32api don't).
3031 (get_security_info, create_symbolic_link)
3032 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
3034 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
3035 in the argument file name.
3036 (sys_access): Call unc_volume_file_attributes only if
3037 GetFileAttributes fails with network-related error codes.
3038 (sys_rename): Diagnose renaming of a symlink when the user doesn't
3039 have the required privileges.
3040 (get_file_security_desc_by_name): Rename from
3041 get_file_security_desc.
3042 (stat_worker): New function, with most of the guts of 'stat', and
3043 with addition of handling of symlinks and support for 'lstat'.
3044 If possible, get file's attributes and security information by
3045 handle, not by name. Produce S_IFLNK bit for symlinks, when
3046 called from 'lstat'.
3047 (stat, lstat): New functions, call 'stat_worker'.
3048 (symlink, readlink, careadlinkat): Rewritten to create and resolve
3049 symlinks when the underlying filesystem supports them.
3051 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
3053 Fix macroexp crash on Windows with debugging (Bug#12118).
3054 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
3055 checking subscripts; problem introduced with the recent
3056 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
3057 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
3058 since it's used in non-static inline functions now.
3060 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
3061 Don't assume buffer size fits in 'int'. Remove unused local.
3063 Use C99-style 'extern inline' if available.
3064 * buffer.h (BUFFER_INLINE):
3065 * category.h (CATEGORY_INLINE):
3066 * character.h (CHARACTER_INLINE):
3067 * charset.h (CHARSET_INLINE):
3068 * composite.h (COMPOSITE_INLINE):
3069 * dispextern.h (DISPEXTERN_INLINE):
3070 * lisp.h (LISP_INLINE):
3071 * systime.h (SYSTIME_INLINE):
3072 New macro, replacing 'static inline' in this header.
3073 * buffer.h, category.h, character.h, charset.h, composite.h:
3074 * dispextern.h, lisp.h, systime.h:
3075 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3076 * alloc.c (LISP_INLINE):
3077 * buffer.c (BUFFER_INLINE):
3078 * category.c (CATEGORY_INLINE):
3079 * character.c (CHARACTER_INLINE):
3080 * charset.c (CHARSET_INLINE):
3081 * composite.c (COMPOSITE_INLINE):
3082 * dispnew.c (DISPEXTERN_INLINE):
3083 * sysdep.c (SYSTIME_INLINE):
3084 Define to EXTERN_INLINE, so that the corresponding functions
3085 are compiled into code.
3086 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
3087 (INLINE_HEADER_END): New macros.
3088 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
3089 since it's used in non-static inline functions now.
3090 (VALMASK) [!USE_LSB_TAG]: Likewise.
3092 2012-08-02 Glenn Morris <rgm@gnu.org>
3094 * s/: Remove empty directory.
3096 * s/ms-w32.h: Move to ../nt/inc.
3097 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
3098 Update for new ms-w32.h location.
3100 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
3103 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
3105 2012-08-02 Glenn Morris <rgm@gnu.org>
3107 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
3108 hard-coding the path separator.
3110 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
3112 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
3113 This how ASET and AREF are supposed to work, and makes
3114 it easier to think about future improvements. See
3115 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
3116 * charset.h (set_charset_attr): New function.
3117 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
3118 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
3119 (aref_addr): New function. All uses of &AREF(...) changed.
3120 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
3121 (set_hash_index): New functions. All lvalue-style uses of
3122 HASH_KEY etc. changed.
3123 * keyboard.c (set_prop): New function. All lvalue-style uses
3126 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
3128 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
3129 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
3130 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
3131 * nsfns.m (ns_set_name_as_filename): Likewise.
3132 * nsmenu.m (ns_update_menubar): Likewise.
3133 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
3135 2012-08-01 Eli Zaretskii <eliz@gnu.org>
3137 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
3138 Adapt to latest changes in field names of the corresponding Lisp
3141 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
3143 2012-08-01 Glenn Morris <rgm@gnu.org>
3145 * s/msdos.h: Remove file.
3146 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
3147 * Makefile.in (S_FILE): Remove.
3148 (config_h): Remove S_FILE.
3150 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
3152 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
3153 Remove; moved to nt/config.nt.
3155 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3157 Use INTERNAL_FIELD for conses and overlays.
3158 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
3159 Remove obsolete comment.
3161 (struct Lisp_Overlay): Use INTERNAL_FIELD.
3162 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
3164 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3166 Use INTERNAL_FIELD for symbols.
3167 * lisp.h (SVAR): New macro. Adjust users.
3168 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
3169 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
3171 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3173 Use INTERNAL_FIELD for processes.
3174 * process.h (PVAR): New macro. Adjust style.
3175 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
3176 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
3178 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3180 Use INTERNAL_FIELD for windows.
3181 * window.h (WVAR): New macro.
3182 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
3183 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
3184 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
3185 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
3186 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
3187 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
3189 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
3191 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
3193 2012-08-01 Glenn Morris <rgm@gnu.org>
3195 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
3196 Move to configure.ac.
3198 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
3200 * makefile.w32-in (CONFIG_H): Update dependencies.
3201 (CONF_POST_H): New macro.
3203 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
3205 2012-07-31 Glenn Morris <rgm@gnu.org>
3207 * Makefile.in (S_FILE): No longer set by configure.
3209 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
3211 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
3213 * process.h (NULL_DEVICE):
3214 * emacs.c (SEPCHAR):
3215 * editfns.c (USER_FULL_NAME): Let configure set them.
3217 * s/README, s/template.h: Remove files.
3219 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
3221 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
3222 Move to configure.ac.
3224 2012-07-31 Eli Zaretskii <eliz@gnu.org>
3226 * .gdbinit (xframe): Adapt to introduction of FVAR and the
3227 resulting renaming of 'struct frame' members.
3229 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
3231 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
3232 after introduction of FVAR.
3234 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
3236 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
3238 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
3239 instead of compositeToPoint.
3240 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
3242 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
3244 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
3246 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
3247 * lisp.h (INTERNAL_FIELD): New macro.
3248 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
3249 (BVAR): Change to use INTERNAL_FIELD.
3250 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
3251 (KVAR): Change to use INTERNAL_FIELD.
3252 * frame.h (FVAR): New macro.
3253 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3254 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
3255 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
3256 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
3257 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
3259 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
3261 Miscellaneous fixes for non-default X toolkits.
3262 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
3263 * xterm.c (x_frame_of_widget): Remove redundant prototype.
3264 Move under #ifdef USE_LUCID.
3265 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
3266 definition and usage to avoid warnings.
3268 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
3270 * nsterm.m (openFiles): Fix previous checkin.
3272 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
3274 * indent.c (compute_motion): Remove unused local.
3276 2012-07-31 Glenn Morris <rgm@gnu.org>
3278 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
3280 * conf_post.h [USG5_4]:
3281 Move remaining contents of s/usg5-4-common.h here.
3282 * s/usg5-4-common.h: Remove file.
3284 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
3285 * s/irix6-5.h: Remove file.
3287 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
3288 * s/darwin.h: Remove file.
3290 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
3291 * s/hpux10-20.h: Remove file, which is now empty.
3293 2012-07-30 Glenn Morris <rgm@gnu.org>
3295 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
3296 * Makefile.in (config_h): Add conf_post.h.
3297 * makefile.w32-in (CONFIG_H): Add conf_post.h.
3299 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
3301 * nsterm.m (ns_do_open_file): New variable.
3302 (ns_term_init): Set ns_do_open_file to YES after run returns.
3303 (openFile, openTempFile, openFileWithoutUI, openFiles):
3304 Open files only if ns_do_open_file.
3306 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
3308 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
3309 This no-op macro hasn't been needed for many years.
3310 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
3312 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
3313 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
3314 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
3315 gdb_make_enums_visible.
3316 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
3317 (DIRECTORY_SEP): Now a constant, not a macro.
3319 2012-07-30 Eli Zaretskii <eliz@gnu.org>
3321 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
3322 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
3324 * w32term.c <w32_keyboard_codepage>: Renamed from
3325 keyboard_codepage and now external. All users changed.
3327 * w32term.h: Add declaration of w32_keyboard_codepage.
3329 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
3330 the codepage to translate keys to Unicode. If this argument is
3331 -1, use the value returned by GetConsoleCP. All callers changed.
3333 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
3335 Update .PHONY listings in makefiles.
3336 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
3337 bootstrap-clean, distclean, maintainer-clean, versioclean,
3340 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
3341 This is a bit clearer. Fix some commentary typos.
3343 2012-07-30 Glenn Morris <rgm@gnu.org>
3345 * s/netbsd.h: Let configure include signal.h if needed.
3346 Remove file, which is now empty.
3348 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
3349 Let configure set them.
3350 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
3351 No more need to undefine.
3353 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
3355 * keymap.c (Fkey_description): Don't remove 0x80 bit from
3356 non-single-byte char when adding meta modifier. (Bug#12090)
3358 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
3360 Convert safe_call to use variable number of arguments.
3361 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
3362 (safe_call2): Fix comment.
3363 * lisp.h (safe_call): Adjust prototype.
3364 * coding.c (encode_coding_object): Change to use safe_call2.
3365 * xfaces.c (merge_face_heights): Change to use safe_call1.
3367 2012-07-30 Glenn Morris <rgm@gnu.org>
3369 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
3370 does that unconditionally. Remove file, which is now empty.
3372 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
3375 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
3377 Export to GDB most of lisp.h's remaining object-like macros.
3378 * lisp.h (min, max): Move earlier, because they're used earlier now.
3379 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
3380 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
3381 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
3382 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
3383 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
3384 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
3385 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
3386 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
3387 Now constants, for GDB. They need not be macros.
3388 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
3389 Now constants, for GDB, as well as macros, for static initializers.
3390 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
3391 Move to after the definition of struct Lisp_Char_Table,
3392 since the former now needs that type defined.
3393 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
3394 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
3395 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
3396 New enums, for gdb_make_enums_visible.
3397 (GLYPH_MODE_LINE_FACE): Remove; unused.
3398 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
3399 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
3400 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
3401 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
3402 enum maxargs, enum MAX_ALLOCA.
3403 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
3404 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
3405 no longer needed, now that they are done in lisp.h.
3407 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
3409 Cleanup string bytes checking.
3410 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
3411 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
3412 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
3413 (check_sblock, compact_small_strings): Simplify.
3415 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
3417 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
3418 These macros are confusing and no longer need to be defined, as
3419 the enum values now suffice. All uses replaced with definiens.
3420 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
3422 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
3424 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
3425 ($(BLD)/w32console.$(O)): Update dependencies.
3427 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3429 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
3430 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
3432 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
3434 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
3436 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
3437 setting sitelisp (Bug#12010).
3439 2012-07-29 Eli Zaretskii <eliz@gnu.org>
3441 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
3443 * w32heap.c (cache_system_info):
3444 * w32.c (sys_rename):
3445 * w32proc.c (find_child_console, sys_kill): All users changed.
3447 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
3449 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
3451 2012-07-29 Eli Zaretskii <eliz@gnu.org>
3453 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
3455 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3457 Cleanup statistics calculation in Fgarbage_collect.
3458 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
3459 Fix zombies percentage calculation. Simplify elapsed time calculation.
3461 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3463 Generalize marker debugging code under MARKER_DEBUG and use eassert.
3464 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
3465 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
3466 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
3467 (replace_range, replace_range_2, del_range_2): Change to eassert.
3468 * marker.c (byte_char_debug_check): Adjust style.
3470 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
3472 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
3473 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
3474 long-ago-commented-out code that talks about "WIN32".
3475 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
3478 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
3480 Use Gnulib stdalign module (Bug#9772, Bug#9960).
3481 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
3482 Simplify by using alignof.
3483 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
3484 * lisp.h: Include <stdalign.h>.
3485 (GCALIGNMENT): New macro and constant.
3486 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
3487 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
3488 (stdalign): New macro, if not already defined.
3490 2012-07-28 Eli Zaretskii <eliz@gnu.org>
3492 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
3493 * w32inevt.c: Include w32inevt.h.
3494 (w32_read_console_input): New inline function, calls either
3495 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
3496 w32_console_unicode_input.
3497 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
3498 (w32_kbd_patch_key, key_event): Use the codepage returned by
3499 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
3500 (key_event): use uChar.UnicodeChar only if
3501 w32_console_unicode_input is non-zero.
3503 * w32console.c: Include w32heap.h.
3504 <w32_console_unicode_input>: New global variable.
3505 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
3506 family of Windows, zero otherwise.
3508 * w32inevt.h: Declare w32_console_unicode_input.
3510 * xdisp.c (init_iterator): Don't reference tip_frame in a build
3511 --without-x. (Bug#11742)
3513 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
3515 Adjust GDB to reflect pvec_type changes (Bug#12036).
3516 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
3517 2012-07-04 changes to pseudovector representation.
3518 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
3520 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
3522 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
3524 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
3526 2012-07-27 Eli Zaretskii <eliz@gnu.org>
3528 * alloc.c (listn): Fix the order the arguments are consed onto the
3531 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
3532 enumeration constants, as PURE and HEAP are too general, and clash
3533 with other headers and sources, such as gmalloc.c and the
3534 MS-Windows system headers. All users changed.
3536 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3538 Revert last save_excursion_save and save_excursion_restore changes.
3539 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
3540 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
3542 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3544 Fix recently-introduced typos in Windows port.
3545 Reported by Martin Rudalics <rudalics@gmx.at>.
3546 * w32.c (init_environment): Replace comma with semicolon.
3547 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
3549 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
3551 Improve GDB symbol export (Bug#12036).
3552 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
3553 arms of an 'if', not using conditional expressions; otherwise GDB
3554 complains about the types in the unevaluated arm when the argument
3555 is an integer literal.
3556 (xgetint): Simplify expression.
3557 * alloc.c (gdb_make_enums_visible): New constant. This ports to
3558 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
3559 Zaretskii in <http://bugs.gnu.org/12036#13>.
3560 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
3561 needed now that we have gdb_make_enums_visible.
3562 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
3563 (enum enum_USE_LSB_TAG):
3564 New enum types, packaging up enums that need to be exported to GDB.
3566 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3568 Utility function to make a list from specified amount of objects.
3569 * lisp.h (enum constype): New datatype.
3570 (listn): New prototype.
3571 * alloc.c (listn): New function.
3572 (Fmemory_use_count, syms_of_alloc): Use it.
3573 * buffer.c (syms_of_buffer): Likewise.
3574 * callint.c (syms_of_callint): Likewise.
3575 * charset.c (define_charset_internal): Likewise.
3576 * coding.c (syms_of_coding): Likewise.
3577 * keymap.c (syms_of_keymap): Likewise.
3578 * search.c (syms_of_search): Likewise.
3579 * syntax.c (syms_of_syntax): Likewise.
3580 * w32.c (init_environment): Likewise.
3581 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
3582 * xdisp.c (syms_of_xdisp): Likewise.
3583 * xfns.c (syms_of_xfns): Likewise.
3585 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3587 Fast save_excursion_save and save_excursion_restore.
3588 * lisp.h (struct Lisp_Excursion): New data type.
3589 (PVEC_EXCURSION): New pseudovector type.
3590 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
3591 to deal with it. Adjust comments.
3592 (init_marker, attach_marker): New prototype.
3593 (unchain_marker): Adjust prototype.
3594 * marker.c (attach_marker): Change to global.
3595 (init_marker): New function.
3596 * alloc.c (Fmake_marker, build_marker): Use it.
3597 (build_marker): More easserts.
3598 (mark_object): Handle struct Lisp_Excursion.
3599 * editfns.c (save_excursion_save, save_excursion_restore):
3600 Reimplement to use struct Lisp_Excursion. Add comments.
3602 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
3604 Fix export of symbols to GDB (Bug#12036).
3605 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
3606 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
3607 emacs.c, as this is a more-suitable home. Had this been done earlier
3608 the fix for 12036 would have avoided some of the problems noted in
3609 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
3610 would have been more obvious.
3611 * emacs.c: Do not include <verify.h>; no longer needed.
3612 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
3613 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
3614 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
3615 Remove; now done in lisp.h.
3616 * lisp.h (PUBLISH_TO_GDB): New macro.
3617 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
3618 (DATA_SEG_BITS): Use it.
3619 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
3620 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
3621 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
3622 not be usable in #if. This simplifies things.
3624 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
3626 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
3628 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
3630 Simplify export of symbols to GDB (Bug#12036).
3631 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
3632 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
3633 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
3634 Adjust to changes in lisp.h and emacs.c, by using
3635 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
3636 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
3637 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
3638 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
3639 instead of gdb_valbits.
3640 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
3641 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
3642 instead of gdb_array_mark_flag.
3643 (xboolvector): Get size from $->size, not $->header.size.
3644 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
3645 (xreload, hook-run, hookpost-run): Remove.
3646 * emacs.c: Include <verify.h>.
3647 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
3648 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
3650 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
3651 (gdb_USE_LSB_TAG): New enum constants.
3652 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
3653 Also define these as enum constants, so they're visible to GDB.
3654 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
3655 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
3656 as constants, so they're visible to GDB.
3657 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
3658 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
3659 Now enum constants, not macros, so they're visible to GDB.
3660 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
3661 more convenient now. All uses changed.
3662 (VALMASK) [USE_LSB_TAG]: Also define in this case.
3663 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
3665 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
3667 Explicitly free restriction data that are not needed anymore.
3668 * editfns.c (save_restriction_restore): Free restriction data.
3670 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
3672 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
3673 add argument, tune behavior, and adjust all callers.
3675 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
3677 Use typedef for EMACS_INT, EMACS_UINT.
3678 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
3679 than macros. This simplifies debugging in the usual case, since
3680 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
3681 and it allows expressions involving EMACS_INT casts.
3682 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
3684 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
3686 * nsterm.m (ns_read_socket): Return early if there is a modal
3689 2012-07-25 Martin Rudalics <rudalics@gmx.at>
3691 * frame.c (Fredirect_frame_focus): In doc-string don't mention
3692 that FOCUS-FRAME can be omitted.
3694 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
3696 Adjust buffer text indirection counters at the end of Fkill_buffer.
3697 * buffer.c (Fkill_buffer): Adjust indirection counters when the
3698 buffer is definitely dead. This should really fix an issue reported
3699 by Christoph Scholtes again. (Bug#12007).
3700 (init_buffer_once): Initialize indirection counters of
3701 buffer_defaults and buffer_local_symbols (for sanity and safety).
3703 2012-07-24 Eli Zaretskii <eliz@gnu.org>
3705 * xdisp.c (init_iterator): Don't compute dimensions of truncation
3706 and continuation glyphs on tooltip frames, leave them at zero.
3707 Avoids continued lines in tooltips. (Bug#11832)
3709 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
3711 Simplify copy_overlay.
3712 * buffer.c (copy_overlay): Simplify. Use build_marker.
3713 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
3715 2012-07-23 Eli Zaretskii <eliz@gnu.org>
3717 * print.c (print_object): Don't crash when a frame's name is nil
3718 or invalid. (Bug#12025)
3720 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
3721 it signals an error when a tooltip frame is being created.
3723 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3725 Cleanup miscellaneous objects allocation and initialization.
3726 * alloc.c (allocate_misc): Change to static. Add argument to
3727 specify the subtype. Adjust comment and users.
3728 (build_overlay): New function.
3729 * buffer.c (copy_overlays, Fmake_overlay): Use it.
3730 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
3731 (allocate_misc): Remove prototype.
3732 (build_overlay): Add prototype.
3734 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3736 Swap buffer text indirection counters in Fbuffer_swap_text.
3737 * buffer.c (Fbuffer_swap_text): Swap indirections too.
3738 This avoids crash reported by Christoph Scholtes at
3739 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
3741 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
3743 * nsmenu.m (Popdown_data): New struct.
3744 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
3746 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
3747 (initWithContentRect): Make imgView and contentView non-static
3748 and autorelease them. Also autorelease img and matrix (Bug#12005).
3749 (dealloc): Remove (Bug#12005).
3751 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3753 Adjust consing_since_gc when objects are explicitly freed.
3754 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
3755 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
3756 (free_cons, free_misc): Subtract object size from consing_since_gc.
3758 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3760 Simplify and cleanup markers positioning code.
3761 * marker.c (attach_marker): More useful eassert.
3762 (live_buffer, set_marker_internal): New function.
3763 (Fset_marker, set_marker_restricted): Use set_marker_internal.
3764 (set_marker_both, set_marker_restricted_both): Use live_buffer.
3766 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
3768 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
3769 as it's limited by the amount of memory, not by INT_MAX.
3771 2012-07-21 Eli Zaretskii <eliz@gnu.org>
3773 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
3774 in special-event-map. See the discussion at
3775 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
3778 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
3779 info.dwItemData. Fixes crashes on 64-bit Windows.
3780 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
3782 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
3784 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
3785 (conversationIdentifier): Return value is NSInteger.
3786 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
3788 2012-07-21 Chong Yidong <cyd@gnu.org>
3790 * window.c (decode_any_window): Signal an error if the window is
3791 on a dead frame (Bug#11984).
3793 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3795 Add indirection counting to speed up Fkill_buffer.
3796 * buffer.h (struct buffer): New member.
3797 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
3798 (Fmake_indirect_buffer): Set indirection counter to -1, increment
3799 base buffer indirection counter.
3800 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
3801 (Fkill_buffer): Adjust indirection counters as needed, don't walk
3802 through buffer list if indirection counter is 0.
3804 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3806 Extend the value returned by Fgarbage_collect with heap statistics.
3807 * alloc.c (Qheap): New symbol.
3808 (syms_of_alloc): DEFSYM it.
3809 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
3810 (Fmemory_free): Remove.
3811 (syms_of_alloc): Don't defsubr it.
3812 * buffer.c (Fcompact_buffer): Remove.
3813 (syms_of_buffer): Don't defsubr it.
3815 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3817 Make maybe_gc inline.
3818 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
3819 * lisp.h (consing_since_gc, gc_relative_threshold)
3820 (memory_full_cons_threshold): Revert declaration.
3821 (maybe_gc): Remove prototype, define as inline.
3822 * alloc.c: Remove old commented-out code.
3823 (consing_since_gc, gc_relative_threshold)
3824 (memory_full_cons_threshold): Revert to global.
3827 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3829 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
3830 * lisp.h (build_unibyte_string): New function.
3831 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
3832 * sysdep.c, w32fns.c, xfns.c: Use it.
3833 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
3834 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
3835 Adjust users accordingly.
3836 * font.h (font_open_by_name): Adjust prototype.
3838 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3840 Cleanup calls to Fgarbage_collect.
3841 * lisp.h (maybe_gc): New prototype.
3842 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3843 Remove declarations.
3844 * alloc.c (maybe_gc): New function.
3845 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3847 * bytecode.c (MAYBE_GC): Use maybe_gc.
3848 * eval.c (eval_sub, Ffuncall): Likewise.
3849 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
3850 to avoid dependency from auto-save feature.
3852 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
3854 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
3855 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
3856 'for_each_per_buffer_object_at'.
3857 All uses changed. It's better to use upper-case for macros that
3858 cannot be implemented as functions, to give the reader a clue
3859 that they're special.
3861 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
3863 * alloc.c (Fgarbage_collect): Tweak docstring.
3865 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3867 Tweak the value returned from Fgarbage_collect again.
3868 * alloc.c (Fgarbage_collect): New return value, as confirmed in
3869 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
3870 Adjust documentation.
3871 (total_vector_bytes): Rename to total_vector_slots, adjust
3873 (total_free_vector_bytes): Rename to total_free_vector_slots,
3875 (Qstring_bytes, Qvector_slots): New symbols.
3876 (syms_of_alloc): DEFSYM them.
3878 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3880 Buffer compaction primitive which may be used from Lisp.
3881 * buffer.c (compact_buffer, Fcompact_buffer): New function.
3882 (syms_of_buffer): Register Fcompact_buffer.
3883 * alloc.c (Fgarbage_collect): Use compact_buffer.
3884 * buffer.h (compact_buffer): New prototype.
3885 (struct buffer_text): New member.
3887 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3889 New macro to iterate over all buffers, miscellaneous cleanups.
3890 * lisp.h (all_buffers): Remove declaration.
3891 * buffer.h (all_buffers): Add declaration, with comment.
3892 (for_each_buffer): New macro.
3893 * alloc.c (Fgarbage_collect, mark_object): Use it.
3894 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
3895 (init_buffer): Likewise.
3896 * data.c (Fset_default): Likewise.
3897 * coding.c (code_conversion_restore): Remove redundant check
3899 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
3901 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3903 Fix bug that created negative-length intervals.
3904 * intervals.c (merge_interval_right, merge_interval_left):
3905 Do not zero out this interval if it is absorbed by its children,
3906 as this interval's total length doesn't change in that case. See
3907 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
3909 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
3911 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
3912 when invoking (make-bool-vector N t) and N is a positive
3913 multiple of 8 -- the last 8 bits were mistakenly cleared.
3915 Remove some struct layout assumptions in bool vectors.
3916 * alloc.c (bool_header_size): New constant.
3917 (header_size, word_size): Move earlier, as they're now used earlier.
3918 Use 'word_size' in a few more places, where it's appropriate.
3919 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
3920 padding before the data member of a bool vector.
3921 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
3922 than doing the check by hand with an abort ().
3924 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
3926 * eval.c (Fdefvar): Don't check constants since we only set the var if
3927 it's not yet defined anyway (bug#11904).
3929 * lisp.h (last_undo_boundary): Declare new var.
3930 * keyboard.c (command_loop_1): Set it.
3931 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
3932 were auto-added by the command loop (bug#11774).
3934 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3936 * w32font.c (Qsymbol): Remove local definition.
3937 (syms_of_w32font): Don't DEFSYM it.
3939 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3941 Fix sweep_vectors to handle large bool vectors correctly.
3942 * alloc.c (sweep_vectors): Account total_vector_bytes for
3943 bool vectors larger than VBLOCK_BYTES_MAX.
3945 2012-07-18 Chong Yidong <cyd@gnu.org>
3947 * frame.c (x_set_frame_parameters): Revert bogus change introduced
3948 in 2012-05-25 commit by Paul Eggert (Bug#11738).
3950 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3952 Return more descriptive data from Fgarbage_collect.
3953 Suggested by Stefan Monnier in
3954 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
3955 * alloc.c (bounded_number): New function.
3956 (total_buffers, total_vectors): New variable.
3957 (total_string_size): Rename to total_string_bytes, adjust users.
3958 (total_vector_size): Rename to total_vector_bytes, adjust users.
3959 (sweep_vectors): Account total_vectors and total_vector_bytes.
3960 (Fgarbage_collect): New return value. Adjust documentation.
3961 (gc_sweep): Account total_buffers.
3962 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
3963 (VECTOR_SIZE): Remove.
3964 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
3965 (Qinterval, Qmisc): New symbols.
3966 (syms_of_data): Initialize them.
3967 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
3968 (Qcons, Qbuffer): New declarations.
3970 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3972 * alloc.c (Fmemory_free): Account for memory-free's own storage.
3973 Round up, not down. Improve doc.
3975 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3977 Restore old code in allocate_string_data to avoid Faset breakage.
3978 Reported by Julien Danjou <julien@danjou.info> in
3979 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
3980 * alloc.c (allocate_string_data): Restore old code with minor
3981 adjustments, fix comment to explain this subtle issue.
3983 2012-07-17 Eli Zaretskii <eliz@gnu.org>
3985 Remove FILE_SYSTEM_CASE.
3986 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
3988 * fileio.c (FILE_SYSTEM_CASE): Don't define.
3989 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
3990 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
3991 call-process-region passes it through expand-file-name.
3993 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
3995 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3997 Fix crash when creating indirect buffer (Bug#11917)
3998 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
3999 Don't handle unbound variables specially if non-zero.
4000 (Fbuffer_local_variables): Pass zero.
4001 (clone_per_buffer_values): Pass non-zero.
4003 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
4005 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
4006 to make the loop interruptible.
4008 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
4010 * gnutls.c (emacs_gnutls_handshake): Only retry if
4011 GNUTLS_E_INTERRUPTED.
4013 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4015 Cleanup and convert miscellaneous checks to eassert.
4016 * alloc.c (mark_interval): Fix comment, partially rephrase
4017 old comment from intervals.h (see below).
4018 * intervals.c (find_interval, adjust_intervals_for_insertion)
4019 (delete_interval, adjust_intervals_for_deletion)
4020 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
4022 (adjust_intervals_for_insertion, make_new_interval):
4023 Remove obsolete and unused code.
4024 * intervals.h (struct interval): Remove obsolete comment.
4025 * textprotp.c (erase_properties): Remove unused code.
4026 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
4027 (Fremove_list_of_text_properties): Convert to eassert.
4029 2012-07-17 Chong Yidong <cyd@gnu.org>
4031 * editfns.c (Finsert_char): Doc fix.
4033 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4035 Fix previous change to make Fmemory_free always accurate.
4036 * alloc.c (make_interval): Update total_free_intervals.
4037 (make_float): Likewise for total_free_floats.
4038 (free_cons, Fcons): Likewise for total_free_conses.
4039 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
4040 Likewise for total_free_vector_bytes.
4041 (Fmake_symbol): Likewise for total_free_symbols.
4042 (bytes_free): Remove.
4044 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4046 Simple free memory accounting feature.
4047 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
4048 (sweep_vectors): Accumulate size of free vectors.
4049 (Fgarbage_collect): Setup bytes_free.
4050 (Fmemory_free): New function.
4051 (syms_of_alloc): Register it.
4053 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4055 Cleanup overlays checking.
4056 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
4057 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
4058 eassert and OVERLAYP.
4059 (sort_overlays): Change to use OVERLAYP.
4061 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
4063 * editfns.c (Finsert_char): Make it interactive, and make the
4064 second arg optional. Copy interactive spec and docstring from
4067 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
4069 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
4070 Unlike the other wrapped functions, fabs has an unspecified
4073 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
4075 * nsterm.m (keyDown): Interpret flags without left/right bits
4076 as the left key (Bug#11670).
4078 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4080 Remove empty and useless init functions.
4081 * lisp.h (init_character_once, init_fns, init_image)
4082 (init_filelock, init_sound): Remove prototype.
4083 * character.c (init_character_once): Remove.
4084 * filelock.c (init_filelock): Likewise.
4085 * fns.c (init_fns): Likewise.
4086 * image.c (init_image): Likewise.
4087 * sound.c (init_sound): Likewise.
4088 * emacs.c (main): Adjust accordingly.
4090 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4092 * gtkutil.h: Tiny cleanups.
4093 (use_old_gtk_file_dialog): Remove useless declaration.
4094 (xg_uses_old_file_dialog): Add suggested const attribute.
4096 2012-07-15 Eli Zaretskii <eliz@gnu.org>
4098 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
4099 (bidi_paragraph_init): Use it to limit search forward for a strong
4100 directional character in abnormally large paragraphs full of
4101 neutral or weak characters. (Bug#11943)
4103 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
4105 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
4106 the toolbar (Bug#9451).
4107 (xg_make_tool_item): Give the widget event box a transparent
4110 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4112 Cleanup basic allocation variables and functions.
4113 * alloc.c (ignore_warnings, init_intervals, init_float)
4114 (init_cons, init_symbol, init_marker): Remove.
4115 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
4116 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
4117 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
4118 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
4119 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
4120 (staticidx, init_alloc_once, init_strings, free_ablock):
4121 Remove redundant initialization.
4122 * fns.c (init_weak_hash_tables): Remove.
4123 * lisp.h (init_weak_hash_tables): Remove prototype.
4125 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4127 Use zero_vector where appropriate.
4128 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
4130 * lisp.h (zero_vector): New declaration.
4131 * font.c (null_vector): Remove.
4132 (syms_of_font): Remove initialization and staticpro.
4133 (font_list_entities, font_find_for_lface): Change to use zero_vector.
4134 * keymap.c (Faccessible_keymaps): Likewise.
4136 2012-07-15 Leo Liu <sdl.web@gmail.com>
4138 * fringe.c: Fix typo in comments.
4140 2012-07-14 Leo Liu <sdl.web@gmail.com>
4142 * fringe.c: Add a new bitmap exclamation-mark.
4144 2012-07-14 Eli Zaretskii <eliz@gnu.org>
4146 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
4148 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
4149 (HAVE_MENUS): Don't define, defined by editing config.in with
4151 (GMALLOC_INHIBIT_VALLOC): Don't define.
4152 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
4154 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
4156 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
4158 2012-07-14 Glenn Morris <rgm@gnu.org>
4160 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
4161 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
4162 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
4164 2012-07-13 Glenn Morris <rgm@gnu.org>
4166 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
4168 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
4169 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
4171 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
4173 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
4174 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
4175 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
4176 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
4178 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
4179 as boolean expression.
4180 (x_set_window_size): Remove unused variable toolbar.
4181 (ns_get_color_default, ns_mod_to_lisp): Remove.
4182 (ns_mouse_position): Remove unused variables xchar and ychar.
4183 (ns_compute_glyph_string_overhangs): Remove unused variable face.
4184 (ns_set_vertical_scroll_bar): Remove unused variable count.
4185 (ns_delete_terminal): Remove unused variable i.
4186 (ns_term_init): Remove unused variables r, g and b.
4187 (mouseDown): Remove unused variable window.
4188 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
4189 (initFrameFromEmacs): Remove unused variable vbextra.
4190 (mouseEntered): Remove unused variables p and dpyinfo.
4191 (mouseExited): Remove unused variables p and r.
4192 (ns_define_frame_cursor, ns_clear_frame_area)
4193 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
4194 (menuDown): Assign [sender tag] to variable and cast the variable.
4196 * nsterm.h (menuDown): Add id as type to argument sender.
4197 (ns_display_info_for_name): Add Lisp_Object argument.
4198 (ns_term_init): Add Lisp_Object argument.
4199 (ns_map_event_to_object): Add void argument.
4200 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
4201 prototype with arguments and only declare if __OBJC__.
4202 (nxatoms_of_nsselect): Add void argument.
4203 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
4204 (ns_alloc_autorelease_pool): Add void argument.
4205 (ns_release_autorelease_pool): Add void* argument.
4206 (ns_get_defaults_value): Add const char* argument.
4208 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
4209 (initFromContents): Use SSDATA where appropriate.
4210 (ns_update_menubar): Add braces to ambigous if-else.
4211 (initWithTitle): Put () around assignment in if statement.
4212 (ns_menu_show): Remove unused variables window and keymap.
4213 (update_frame_tool_bar): Remove unused variable selected_p.
4214 (initWithContentRect): Remove unused variable this_cmd_name.
4216 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
4218 (setXBMColor): Remove unused variable len.
4219 (setPixmapData): Put () around assignment in loop statement.
4221 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
4222 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
4224 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
4225 around assignment in loop statement.
4226 (nsfont_open): Remove unused variable i.
4227 (nsfont_open): Remove unused variable len.
4228 (nsfont_draw): Remove unused variable cs.
4230 * nsfns.m (x_set_icon_name, ns_set_name_internal)
4231 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
4232 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
4233 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
4234 (Fns_font_name, Fns_perform_service)
4235 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
4236 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
4237 (ns_set_name): Remove unused variable view.
4238 (x_set_menu_bar_lines): Remove unused variable olines.
4239 (x_set_tool_bar_lines): Remove unused variable root_window.
4240 (Fns_list_colors): Put () around assignment in while statement.
4241 (Fns_perform_service): Remove unused variable len.
4242 (Fns_display_usable_bounds): Remove unused variable top.
4243 (syms_of_nsfns): Remove unused variable i.
4245 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
4248 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
4250 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
4251 and free it with DestroyExceptionInfo (Bug#11558).
4253 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
4255 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
4256 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
4257 Set here, not in nt/config.nt.
4259 2012-07-13 Eli Zaretskii <eliz@gnu.org>
4261 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
4262 cursor overflow into the last glyph on display line when the right
4263 fringe is off. (Bug#11832)
4265 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
4267 * xdisp.c (produce_special_glyphs): Now static.
4268 * dispextern.h (produce_special_glyphs): Remove decl.
4270 2012-07-13 Glenn Morris <rgm@gnu.org>
4272 * s/bsd-common.h, s/cygwin.h: Remove empty files.
4273 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
4275 * s/usg5-4-common.h (USG, USG5):
4276 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
4277 * s/sol2-6.h (SOLARIS2):
4278 * s/irix6-5.h (IRIX6_5):
4279 * s/hpux10-20.h (USG, USG5, HPUX):
4280 * s/gnu-linux.h (USG, GNU_LINUX):
4281 * s/freebsd.h (BSD_SYSTEM):
4282 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
4283 * s/cygwin.h (CYGWIN):
4284 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
4285 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
4287 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
4289 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
4291 2012-07-13 Glenn Morris <rgm@gnu.org>
4293 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
4295 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
4297 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
4298 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
4300 2012-07-12 Glenn Morris <rgm@gnu.org>
4302 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
4304 * process.c (init_process_emacs): Rename from init_process.
4305 The old name is also the name of a Mach system call.
4306 * lisp.h, emacs.c: Update for this name change.
4307 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
4310 2012-07-12 Eli Zaretskii <eliz@gnu.org>
4312 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
4313 memmove call that removes glyphs covered by the left truncation
4314 glyph. Improve commentary.
4315 (display_line): Fix display of continuation glyphs on GUI frames
4316 when the right fringe is turned off and variable-size fonts are
4317 used in the window. Move the code that appends a stretch glyph to
4318 produce_special_glyphs, so that it could be used for truncation
4319 and continuation glyphs alike.
4320 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
4321 glyph of a suitably computed width, to align the special glyphs at
4322 the window margin. Code moved from display_line. (Bug#11832)
4324 2012-07-12 Glenn Morris <rgm@gnu.org>
4326 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
4328 * s/gnu-linux.h, s/hpux10-20.h:
4329 Do not unconditionally define HAVE_XRMSETDATABASE.
4331 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
4333 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
4335 Fix typos that broke OS X build.
4336 Reported by Randal L. Schwartz in
4337 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
4338 * nsterm.m (ns_timeout): Add missing local decl.
4339 (ns_get_color): snprintf -> sprintf, to fix typo.
4341 2012-07-12 Glenn Morris <rgm@gnu.org>
4343 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
4344 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
4345 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
4346 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
4348 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
4349 Move PTY_OPEN to configure.
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/irix6-5.h, s/template.h:
4353 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
4355 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
4357 Use empty_unibyte_string where applicable.
4358 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
4359 * lread.c (read1): Likewise.
4360 * xsettings.c (syms_of_xsettings): Likewise.
4362 2012-07-12 Glenn Morris <rgm@gnu.org>
4364 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
4365 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
4366 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
4367 * s/hpux10-20.h (RUN_TIME_REMAP):
4368 * s/bsd-common.h (TABDLY): Move to configure.
4370 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
4372 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
4374 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
4375 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
4377 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
4379 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
4380 * s/template.h: Move NARROWPROTO to configure.
4382 2012-07-11 Glenn Morris <rgm@gnu.org>
4384 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
4385 unused since 2011-01-17 change to systty.h.
4387 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
4388 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
4389 Move HAVE_PTYS and HAVE_SOCKETS to configure.
4391 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
4393 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
4395 2012-07-11 Glenn Morris <rgm@gnu.org>
4397 * s/darwin.h, s/gnu-linux.h, s/template.h:
4398 Move INTERRUPT_INPUT to configure.
4400 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4402 Minor adjustments to interning code.
4403 * lisp.h (intern, intern_c_string): Redefine as static inline
4404 wrappers for intern_1 and intern_c_string_1, respectively.
4405 (intern_1, intern_c_string_1): Rename prototypes.
4406 * lread.c (intern_1, intern_c_string_1, oblookup):
4407 Simplify Vobarray checking.
4408 * font.c (font_intern_prop): Likewise. Adjust comment.
4409 * w32font.c (intern_font_name): Likewise.
4411 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
4413 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
4415 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
4416 of Fcar/Fcdr if possible.
4417 * font.c (check_otf_features): Likewise.
4418 * fontset.c (Fnew_fontset): Likewise.
4419 * gnutls.c (Fgnutls_boot): Likewise.
4420 * minibuf.c (read_minibuf): Likewise.
4421 * msdos.c (IT_set_frame_parameters): Likewise.
4422 * xmenu.c (Fx_popup_dialog): Likewise.
4423 * w32menu.c (Fx_popup_dialog): Likewise.
4425 2012-07-11 Glenn Morris <rgm@gnu.org>
4427 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
4428 since nothing has defined it on these platforms.
4430 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
4431 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
4433 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4434 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
4435 Move CLASH_DETECTION to configure.
4437 * s/gnu.h: Remove file, which is now empty.
4439 * s/gnu.h, s/gnu-linux.h:
4440 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
4442 2012-07-11 John Wiegley <johnw@newartisans.com>
4444 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
4445 function attribute, so we only use it if it exists in the
4448 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4450 Avoid call to strlen in fast_c_string_match_ignore_case.
4451 * search.c (fast_c_string_match_ignore_case): Change to use
4452 length argument. Adjust users accordingly.
4453 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
4455 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
4457 Assume mkdir, rmdir.
4458 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
4459 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
4462 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
4465 * s/hpux10-20.h (HAVE_PERROR): Remove.
4466 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
4467 Remove dummy definition, as this problem was obsolete long ago.
4470 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
4472 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4474 Avoid calls to strlen in font processing functions.
4475 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
4476 (font_open_by_name): Change to use length argument.
4477 Adjust users accordingly.
4478 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
4480 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
4481 Change to return ptrdiff_t.
4482 (xfont_list_pattern, xfont_match): Use length returned by
4483 xfont_decode_coding_xlfd.
4484 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
4486 2012-07-11 Glenn Morris <rgm@gnu.org>
4488 * s/darwin.h, s/freebsd.h, s/netbsd.h:
4489 Move DONT_REOPEN_PTY to configure.
4491 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
4492 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
4494 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
4496 Remove "#define unix" that is no longer needed (Bug#11905).
4497 * s/aix4-2.h (unix): Remove; no longer needed.
4499 EMACS_TIME simplification (Bug#11875).
4500 This replaces macros (which typically do not work in GDB)
4501 with functions, typedefs and enums, making the code easier to debug.
4502 The functional style also makes code easier to read and maintain.
4503 * systime.h: Include <sys/time.h> on all hosts, not just if
4504 WINDOWSNT, since 'struct timeval' is needed in general.
4505 (EMACS_TIME): Now a typedef, not a macro.
4506 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
4508 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
4509 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
4510 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
4511 (EMACS_TIME_LE): Now functions, not macros.
4512 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
4513 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
4514 which are not functions. All uses rewritten to use:
4515 (make_emacs_time): New function.
4516 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
4517 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
4518 not functions. All uses rewritten to use the following, respectively:
4519 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
4520 (add_emacs_time, sub_emacs_time): New functions.
4521 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
4522 * fileio.c (Fcopy_file):
4523 * xterm.c (XTflash): Get the current time closer to when it's used.
4524 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
4526 * bytecode.c (targets): Suppress -Woverride-init warnings.
4528 Simplify by avoiding confusing use of strncpy etc.
4529 * doc.c (Fsnarf_documentation):
4530 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
4531 * frame.c (Fmake_terminal_frame):
4532 * gtkutil.c (get_utf8_string):
4534 * nsmenu.m (ns_update_menubar):
4535 * regex.c (regerror):
4536 Prefer memcpy to strncpy and strncat when either will do.
4537 * fileio.c (Fsubstitute_in_file_name):
4538 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
4539 (menu_separator_name_p):
4540 * nsmenu.m (ns_update_menubar):
4541 Prefer memcmp to strncmp when either will do.
4542 * nsterm.m: Include <ftoastr.h>.
4544 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
4545 Prefer snprintf to strncpy.
4546 * nsterm.m (ns_term_init):
4547 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
4548 * nsterm.m (ns_term_init):
4549 Avoid the need for strncpy, by using build_string or
4550 make_unibyte_string directly. Use dtoastr, not snprintf.
4551 * process.c (Fmake_network_process): Diagnose service names that
4552 are too long, rather than silently truncating them or creating
4553 non-null-terminated names.
4554 (Fnetwork_interface_info): Likewise, for interface names.
4555 * sysdep.c (system_process_attributes) [GNU_LINUX]:
4556 Prefer sprintf to strncat.
4557 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
4558 Prefer vsnprintf to vsprintf + strncpy.
4560 2012-07-10 Glenn Morris <rgm@gnu.org>
4562 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
4563 Clarify fallback case.
4565 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4567 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
4568 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
4569 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
4570 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
4571 where argument type is known to be a Lisp_Cons.
4573 2012-07-10 Tom Tromey <tromey@redhat.com>
4575 * bytecode.c (BYTE_CODE_THREADED): New macro.
4576 (BYTE_CODES): New macro. Replaces all old byte-code defines.
4577 (enum byte_code_op): New type.
4578 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
4579 (exec_byte_code): Use them. Use token threading when applicable.
4581 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4583 Optimize pure C strings initialization.
4584 * lisp.h (make_pure_string): Fix prototype.
4585 (build_pure_c_string): New function, defined as static inline. This
4586 provides a better opportunity to optimize away calls to strlen when
4587 the function is called with compile-time constant argument.
4588 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
4589 argument, adjust users accordingly. Use build_pure_c_string where
4591 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
4592 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
4593 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
4595 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4597 Avoid calls to strlen in miscellaneous functions.
4598 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
4599 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
4600 * lread.c (openp): Likewise.
4602 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4604 Avoid calls to strlen in path processing functions.
4605 * fileio.c (file_name_as_directory): Add comment. Change to add
4606 srclen argument and return the length of result. Adjust users
4608 (directory_file_name): Fix comment. Change to add srclen argument,
4609 swap 1st and 2nd arguments to obey the common convention.
4610 Adjust users accordingly.
4611 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
4613 2012-07-10 Glenn Morris <rgm@gnu.org>
4615 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
4616 Move PENDING_OUTPUT_COUNT definition to configure.
4618 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
4619 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
4620 * s/gnu.h (DATA_START): Move definitions to configure.
4622 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
4623 We include usg5-4-common.h, which defines them both.
4625 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
4626 O_RDONLY already includes it).
4628 Stop ns builds setting the EMACSLOADPATH environment variable.
4629 * nsterm.m (ns_load_path): Rename from ns_init_paths.
4630 Now it does not set EMACSLOADPATH, just returns the load-path string.
4631 * nsterm.h: Update accordingly.
4632 * lread.c [HAVE_NS]: Include nsterm.h.
4633 (init_lread) [HAVE_NS]: Use ns_load_path.
4634 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
4636 2012-07-09 Glenn Morris <rgm@gnu.org>
4638 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
4639 since the included bsd-common.h does so.
4641 Stop ns builds setting the EMACSPATH environment variable.
4642 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
4643 (ns_init_paths): Do not set EMACSPATH.
4644 * nsterm.h (ns_exec_path): Add it.
4645 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
4648 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
4650 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
4652 * process.c (wait_reading_process_output): 'waitchannels' was unset
4653 when read_kbd || !NILP (wait_for_cell); fix this.
4655 Add GCC-style 'const' attribute to functions that can use it.
4656 * character.h (char_resolve_modifier_mask):
4657 * keyboard.h (make_ctrl_char):
4658 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
4659 (init_character_once, next_almost_prime, init_fns, init_image)
4660 (flush_pending_output, init_sound):
4661 * mem-limits.h (start_of_data):
4662 * menu.h (finish_menu_items):
4663 Add ATTRIBUTE_CONST.
4664 * emacs.c (DEFINE_DUMMY_FUNCTION):
4665 Declare the dummy function with ATTRIBUTE_CONST.
4666 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
4667 Add decls with ATTRIBUTE_CONST.
4669 Minor improvements to make_formatted_string.
4670 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
4671 where int is good enough, as vsprintf returns an int.
4672 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
4674 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4676 Use make_formatted_string to avoid double length calculation.
4677 * lisp.h (make_formatted_string): New prototype.
4678 * alloc.c (make_formatted_string): New function.
4679 * buffer.c (Fgenerate_new_buffer_name): Use it.
4680 * dbus.c (syms_of_dbusbind): Likewise.
4681 * editfns.c (Fcurrent_time_zone): Likewise.
4682 * filelock.c (get_boot_time): Likewise.
4683 * frame.c (make_terminal_frame, set_term_frame_name)
4684 (x_report_frame_params): Likewise.
4685 * image.c (gs_load): Likewise.
4686 * minibuf.c (get_minibuffer): Likewise.
4687 * msdos.c (dos_set_window_size): Likewise.
4688 * process.c (make_process): Likewise.
4689 * xdisp.c (ensure_echo_area_buffers): Likewise.
4690 * xsettings.c (apply_xft_settings): Likewise.
4692 2012-07-09 Glenn Morris <rgm@gnu.org>
4694 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
4695 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
4696 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
4697 * nsterm.h (ns_etc_directory): Add it.
4698 * callproc.c [HAVE_NS]: Include nsterm.h.
4699 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
4701 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4703 Move marker debugging code under MARKER_DEBUG.
4704 * marker.c (MARKER_DEBUG): Move marker debugging code under
4705 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
4706 for bootstrap with --enable-checking (~3x slowdown reported
4707 by Juanma Barranquero <lekktu@gmail.com>).
4708 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
4710 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
4712 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
4713 See <http://bugs.gnu.org/11825#29>.
4715 2012-07-08 Eli Zaretskii <eliz@gnu.org>
4717 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
4718 has no font, use the frame's font. (Bug#11813)
4719 (display_line): Add commentary about displaying truncation glyphs
4721 (produce_special_glyphs): Move here from term.c.
4723 * term.c (produce_special_glyphs): Move to xdisp.c.
4725 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
4728 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
4730 * xdisp.c (display_line): Avoid warning about implicit declaration
4733 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
4735 * lisp.h: Remove empty conditional.
4737 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4739 * lread.c (load_path_check): Now static.
4741 Fix some minor --with-ns problems found by static checking.
4742 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
4743 (x_set_font) [!HAVE_X_WINDOWS]:
4744 * image.c (xpm_load_image) [HAVE_NS]:
4745 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
4746 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
4747 Remove unused local.
4748 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
4749 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
4750 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
4751 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
4752 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
4753 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
4754 Fix pointer signedness problem.
4755 * xfaces.c (FRAME_X_FONT_TABLE):
4756 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
4758 2012-07-07 Glenn Morris <rgm@gnu.org>
4760 * lread.c (load_path_check): New function, split from init_lread.
4761 (init_lread): Reorganize. Motivation:
4762 If EMACSLOADPATH is set, check/warn about that rather than the
4763 defaults, which we are not going to use. Hence we can remove
4764 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
4765 Don't warn if site-lisp directories are missing.
4766 If not installed, start from a blank load-path, since
4767 PATH_LOADSEARCH refers to the eventual installation directories.
4769 2012-07-07 Eli Zaretskii <eliz@gnu.org>
4771 Support truncation and continuation glyphs on GUI frames, when
4772 fringes are disabled. (Bug#11832)
4773 * xdisp.c (init_iterator): Get dimensions of truncation and
4774 continuation glyphs even if on GUI frames.
4775 Adjust it->last_visible_x on GUI frames when the left or right fringes,
4776 or both, are absent.
4777 (start_display, move_it_in_display_line_to): Handle the case of a
4778 GUI frame without a fringe to display continuation or truncation
4780 (insert_left_trunc_glyphs): Support GUI frames: make sure
4781 truncation glyphs overwrite enough glyphs from the current line to
4782 have sufficient space in pixels.
4783 (display_line): Support truncation and continuation glyphs on GUI
4784 frames. If some spare pixels are left on the line after inserting
4785 the truncation glyphs, fill that space with a stretch glyph of a
4786 suitably computed width.
4788 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
4789 produce_glyphs, to support GUI sessions.
4791 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4793 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
4795 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
4797 Do not require float-time's arg to fit in time_t (Bug#11825).
4798 This works better on hosts where time_t is unsigned, and where
4799 float-time is applied to the (negative) difference between two times.
4800 * editfns.c (decode_time_components): Last arg is now double *,
4801 not int *, and means to store all the result as a double, without
4802 worrying about whether the seconds part fits in time_t.
4803 All callers changed.
4804 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
4805 All callers changed.
4806 (Ffloat_time): Do not fail merely because the specified time falls
4807 outside of time_t range.
4809 2012-07-07 Glenn Morris <rgm@gnu.org>
4811 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
4812 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
4813 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
4815 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
4817 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
4818 Update dependencies.
4820 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
4822 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4824 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
4825 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
4826 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
4827 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
4828 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
4829 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
4831 * xfont.c (compare_font_names): Redo to omit the need for casts.
4833 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
4835 * xfns.c (Fx_change_window_property): Doc fix.
4836 * w32fns.c (Fx_change_window_property): Doc fix.
4838 * w32fns.c (Fx_window_property): Accept the same arguments as the
4839 X Windows version. Doc fix.
4840 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
4842 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
4843 Eli Zaretskii <eliz@gnu.org>
4845 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
4846 Windows-specific code from nt/config.nt moved here.
4847 Obsolete settings removed.
4849 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4851 * process.c: Avoid unnecessary calls to gettime.
4852 (wait_reading_process_output): Don't get the time of day
4853 when gobbling data immediately and not waiting, as there's no need
4854 for it in that case. This removes a FIXME.
4856 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
4858 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
4859 is defined (Bug#11768).
4861 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4863 Fix marker debugging code.
4864 * marker.c (byte_char_debug_check): Do not perform the check
4865 if buffer is not multibyte.
4866 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4867 Call byte_char_debug_check with correct arguments.
4869 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4871 Compile marker debugging code only if ENABLE_CHECKING is defined.
4872 * marker.c (byte_char_debug_check, count_markers):
4873 Use only if ENABLE_CHECKING is defined.
4874 (byte_debug_flag): Remove.
4875 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4876 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
4878 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4880 Avoid code repetition in marker-related functions.
4881 * marker.c (attach_marker): New function.
4882 (Fset_marker, set_marker_restricted, set_marker_both)
4883 (set_marker_restricted_both): Use it.
4884 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
4885 Consistently rename charno to charpos.
4886 (marker_position): Add eassert.
4887 (marker_byte_position): Convert to eassert.
4889 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4891 Simplify list operations in unchain_overlay and unchain_marker.
4892 * buffer.c (unchain_overlay): Simplify. Add comment.
4893 * marker.c (unchain_marker): Simplify. Fix comments.
4895 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4897 Introduce fast path for the widely used marker operation.
4898 * alloc.c (build_marker): New function.
4899 * lisp.h (build_marker): New prototype.
4900 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
4901 * composite.c (autocmp_chars): Likewise.
4902 * editfns.c (buildmark): Remove.
4903 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
4904 (save_restriction_save): Use build_marker.
4905 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
4906 * window.c (save_window_save): Likewise.
4908 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4910 Do not use Fdelete_overlay in delete_all_overlays
4911 to avoid redundant calls to unchain_overlay.
4912 * buffer.c (drop_overlay): New function.
4913 (delete_all_overlays, Fdelete_overlay): Use it.
4914 * minibuf.c (get_minibuffer): Fix comment.
4916 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4918 Port to OpenBSD 5.1 amd64.
4919 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
4920 This is needed for OpenBSD, and should be harmless on all BSD systems.
4921 Also, include <sys/sysctl.h>, as it should be available on all
4922 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
4923 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
4924 use p_pid member, not kp_proc.pid.
4926 2012-07-06 Glenn Morris <rgm@gnu.org>
4928 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
4930 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4932 More xmalloc and related cleanup.
4933 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
4934 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
4935 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
4936 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
4937 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
4938 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
4939 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
4940 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
4941 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
4943 Omit needless casts involving void * pointers and allocation.
4944 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
4945 as the former is more robust if P's type is changed.
4946 Prefer xzalloc to xmalloc + memset 0.
4947 Simplify malloc-or-realloc to realloc.
4948 Don't worry about xmalloc returning a null pointer.
4949 Prefer xstrdup to xmalloc + strcpy.
4950 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
4952 * keyboard.c (apply_modifiers_uncached): Prefer local array to
4953 alloca of a constant.
4955 2012-07-05 Eli Zaretskii <eliz@gnu.org>
4957 * xdisp.c (display_line): Fix horizontal pixel coordinates when
4958 hscroll is larger than the line width. Fixes long and futile
4959 looping inside extend_face_to_end_of_line (on a TTY) producing
4960 glyphs that are not needed and thrown away.
4962 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4964 * marker.c (set_marker_restricted_both): Simplify by using
4967 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4969 * editfns.c (region_limit): Simplify by using clip_to_bounds.
4971 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
4973 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
4974 not defined (Bug#11768).
4975 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
4976 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
4977 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
4978 followed by gtk_box_set_homogeneous (Bug#11768).
4979 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
4980 (update_theme_scrollbar_width, xg_create_scroll_bar):
4981 Use gtk_scrollbar_new (Bug#11768).
4982 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
4983 (is_box_type): New function (Bug#11768).
4984 (xg_tool_item_stale_p): Call is_box_type.
4985 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
4986 with default display (Bug#11768).
4988 2012-07-05 Eli Zaretskii <eliz@gnu.org>
4990 * xdisp.c (window_hscroll_limited): New function.
4991 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
4992 coordinates when window's hscroll is set to insanely large
4995 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
4997 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
4998 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
5000 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
5003 * lisp.h (xzalloc): New prototype. Omit needless casts.
5004 * alloc.c (xzalloc): New function. Omit needless casts.
5005 * charset.c: Omit needless casts. Convert all calls to
5006 xmalloc with following memset to xzalloc.
5007 * dispnew.c: Likewise.
5008 * fringe.c: Likewise.
5009 * image.c: Likewise.
5010 * sound.c: Likewise.
5012 * w32fns.c: Likewise.
5013 * w32font.c: Likewise.
5014 * w32term.c: Likewise.
5015 * xfaces.c: Likewise.
5017 * xterm.c: Likewise.
5018 * atimer.c: Omit needless casts.
5019 * buffer.c: Likewise.
5020 * callproc.c: Likewise.
5022 * coding.c: Likewise.
5023 * composite.c: Likewise.
5025 * doprnt.c: Likewise.
5026 * editfns.c: Likewise.
5027 * emacs.c: Likewise.
5029 * filelock.c: Likewise.
5031 * gtkutil.c: Likewise.
5032 * keyboard.c: Likewise.
5034 * lread.c: Likewise.
5035 * minibuf.c: Likewise.
5036 * msdos.c: Likewise.
5037 * print.c: Likewise.
5038 * process.c: Likewise.
5039 * region-cache.c: Likewise.
5040 * search.c: Likewise.
5041 * sysdep.c: Likewise.
5042 * termcap.c: Likewise.
5043 * terminal.c: Likewise.
5044 * tparam.c: Likewise.
5045 * w16select.c: Likewise.
5047 * w32reg.c: Likewise.
5048 * w32select.c: Likewise.
5049 * w32uniscribe.c: Likewise.
5050 * widget.c: Likewise.
5051 * xdisp.c: Likewise.
5052 * xmenu.c: Likewise.
5054 * xselect.c: Likewise.
5056 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
5058 * fileio.c (time_error_value): Check the right error number.
5059 Problem reported by Troels Nielsen in
5060 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
5062 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5064 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
5065 This should be fixed in a better way; see Eli Zaretskii in
5066 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
5067 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
5069 * fileio.c (time_error_value): Rename from special_mtime.
5070 The old name's problems were noted by Eli Zaretskii in
5071 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
5073 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
5074 This variable's comment says Emacs needs at least one GDB-visible
5075 symbol of type enum pvec_type, to work around GDB problems.
5076 The symbol's value doesn't matter.
5078 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
5079 that causes compilation to fail on pre-C99 compilers.
5081 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
5083 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
5084 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
5086 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5088 * buffer.c (init_buffer_once): Fix initialization of
5089 headers for buffer_defaults and buffer_local_symbols.
5090 Reported by Juanma Barranquero <lekktu@gmail.com>.
5092 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
5094 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
5095 * lisp.h (enum pvec_type): Use fewer bits.
5096 (PSEUDOVECTOR_SIZE_BITS): New constant.
5097 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
5098 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
5099 change in pvec_type.
5100 (PSEUDOVECTOR_TYPEP): New macro.
5101 (TYPED_PSEUDOVECTORP): Use it.
5102 * fns.c (internal_equal): Adapt code to extract pvectype.
5103 * emacs.c (gdb_pvec_type): Update type.
5104 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
5105 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
5106 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
5107 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
5108 (sweep_vectors): Use it. Use local var `total_bytes' instead of
5109 abusing vector->header.next.nbytes.
5110 (live_vector_p): Use PVEC_TYPE.
5111 (mark_object): Adapt code to extract pvectype. Use switch.
5113 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5115 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
5116 Tighten new eassert a bit.
5118 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5120 Fix compilation with --enable-gcc-warnings and -O1
5122 * doprnt.c (doprnt): Change type of tem to int, initialize
5123 to avoid compiler warning. Add eassert.
5124 * search.c (simple_search): Initialize match_byte to avoid
5125 compiler warning. Add eassert.
5127 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5129 Avoid weird behavior with large horizontal scrolls.
5130 Without this change, for example, large hscroll values would
5131 mess up Emacs's display on Fedora 15 x86, presumably due to
5132 overflows in int calculations in the display code.
5133 Also, if buffers had long lines, Emacs would freeze.
5134 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
5135 (set_window_hscroll): New function, containing the old guts of
5136 Fset_window_hscroll. Return the clipped value.
5137 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
5138 This avoids the need to check against PTRDIFF_MAX.
5140 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
5142 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5144 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
5146 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5148 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
5149 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
5150 since GCC 4.4.6 issues a bogus warning for them.
5152 Fix bugs in file timestamp newness comparisons.
5153 * fileio.c (Ffile_newer_than_file_p):
5154 * lread.c (Fload): Use full timestamp resolution of files,
5155 not just the 1-second resolution, so that files that are only
5156 slightly newer still count as newer.
5157 * fileio.c (Ffile_newer_than_file_p): Don't assume file
5158 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
5160 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
5162 * fileio.c: Improve handling of file time marker. (Bug#11852)
5163 (special_mtime): New function.
5164 (Finsert_file_contents, Fverify_visited_file_modtime):
5165 Use it to set special mtime values consistently.
5167 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
5169 * fileio.c (Finsert_file_contents): Properly handle st_mtime
5170 marker for non-existing file. (Bug#11852)
5172 2012-07-03 Glenn Morris <rgm@gnu.org>
5174 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
5175 and did not make it into globals.h).
5177 2012-07-03 Tom Tromey <tromey@redhat.com>
5179 * window.c (Fset_window_margins, Fset_window_fringes)
5180 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
5181 * textprop.c (Fprevious_property_change): No longer static.
5182 * syntax.c (Fsyntax_table_p): No longer static.
5183 * process.c (Fget_process, Fprocess_datagram_address): No longer
5185 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
5186 * keyboard.c (Fcommand_execute): No longer static.
5188 * insdel.c (Fcombine_after_change_execute): No longer static.
5189 * image.c (Finit_image_library): No longer static.
5190 * fileio.c (Fmake_symbolic_link): No longer static.
5191 * eval.c (Ffetch_bytecode): No longer static.
5192 * editfns.c (Fuser_full_name): No longer static.
5193 * doc.c (Fdocumentation_property, Fsnarf_documentation):
5195 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
5197 * dired.c (Ffile_attributes): No longer static.
5198 * composite.c (Fcomposition_get_gstring): No longer static.
5199 * callproc.c (Fgetenv_internal): No longer static.
5201 * ccl.h: Remove EXFUNs.
5202 * buffer.h: Remove EXFUNs.
5203 * dispextern.h: Remove EXFUNs.
5204 * intervals.h: Remove EXFUNs.
5205 * fontset.h: Remove EXFUN.
5206 * font.h: Remove EXFUNs.
5207 * dosfns.c (system_process_attributes): Remove EXFUN.
5208 * keymap.h: Remove EXFUNs.
5209 * lisp.h: Remove EXFUNs.
5210 * w32term.h: Remove EXFUNs.
5211 * window.h: Remove EXFUNs.
5212 * xsettings.h: Remove EXFUN.
5213 * xterm.h: Remove EXFUN.
5215 2012-07-03 Glenn Morris <rgm@gnu.org>
5217 * lisp.h (Frandom): Make it visible to C.
5218 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
5219 buffer for invisible buffers. (Bug#1229)
5221 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5223 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
5224 values which aren't power of 2.
5225 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
5226 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
5229 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
5231 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
5233 * alloc.c (mark_object): Revert part of last patch to use `switch'.
5235 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5237 * alloc.c (allocate_vector_block): Remove redundant
5238 calls to mallopt if DOUG_LEA_MALLOC is defined.
5239 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
5240 avoid calls to mallopt if zero_vector is returned.
5242 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5244 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
5245 is enabled, avoid dereferencing NULL current_sblock if
5248 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5250 Cleanup basic buffer management.
5251 * buffer.h (struct buffer): Change layout to use generic vector
5252 marking code. Fix some comments. Change type of 'clip_changed'
5253 to bitfield. Remove unused #ifndef old.
5254 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
5255 (GET_OVERLAYS_AT): Fix indentation.
5256 (for_each_per_buffer_object_at): New macro.
5257 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
5258 (Fbuffer_local_variables): Use it.
5259 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
5260 * alloc.c (allocate_buffer): Adjust to match new layout of
5261 struct buffer. Fix comment.
5262 (mark_overlay): New function.
5263 (mark_buffer): Use it. Use mark_vectorlike to mark normal
5264 Lisp area of struct buffer.
5265 (mark_object): Use it. Adjust marking of misc objects
5266 and related comments.
5268 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
5270 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
5271 wrapper that is not needed because the wrapped code is a no-op (zero
5272 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
5273 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
5275 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
5277 * alloc.c (mark_buffer): Simplify. Remove prototype.
5278 (mark_object): Add comment. Reorganize marking of vector-like
5279 objects. Use CHECK_LIVE for all vector-like objects except buffers
5280 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
5281 Avoid redundant calls to mark_vectorlike for bool vectors.
5283 2012-06-30 Glenn Morris <rgm@gnu.org>
5285 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
5287 * epaths.in (PATH_SITELOADSEARCH): New.
5288 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
5289 This is rather than relying on --enable-locallisppath elements
5290 having "site-lisp" in their names. (Bug#10208#25, 11658)
5292 2012-06-30 Eli Zaretskii <eliz@gnu.org>
5294 * w32proc.c (sys_select): Accept and ignore one more argument.
5296 * w32.c (emacs_gnutls_pull): Call select with one more argument.
5298 * sysselect.h [DOS_NT]: Don't include sys/select.h.
5299 (pselect) [!MS_DOS]: Redirect to sys_select.
5301 * sysdep.c: Don't include dos.h and dosfns.h.
5303 * process.c (sys_select):
5304 * msdos.c (sys_select): Accept one more argument and ignore it.
5306 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
5307 adapt data types and code to that.
5310 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
5311 which clashes with the gnulib function of the same name.
5313 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
5315 * font.c (font_style_to_value, font_style_symbolic)
5316 (font_prop_validate_style): Add type checks for values in
5319 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
5321 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
5324 2012-06-29 Eli Zaretskii <eliz@gnu.org>
5326 * xdisp.c (try_window_id): Undo last change.
5328 * w32.c (getwd): Adjust commentary about startup_dir.
5329 (init_environment): Always call sys_access, even in non-MSVC
5330 builds. Don't chdir to the directory of the Emacs executable.
5331 This undoes code from 1997 which was justified by the need to
5332 "avoid conflicts when removing and renaming directories". But its
5333 downside was that every relative file name was being interpreted
5334 relative to the directory of the Emacs executable, which can never
5335 be TRT. In particular, it broke sys_access when called with
5336 relative file names.
5337 (sys_access): Map GetLastError to errno.
5339 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5341 * window.h (struct window): Change type of 'fringes_outside_margins'
5342 to bitfield. Fix comment. Adjust users accordingly.
5343 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
5345 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
5348 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
5350 * gnutls.c (emacs_gnutls_handshake):
5351 Add QUIT to make the loop interruptible.
5353 2012-06-29 Glenn Morris <rgm@gnu.org>
5355 * charset.c (init_charset): Make lack of etc/charsets fatal.
5357 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5359 * editfns.c (region_limit): Fix type mismatch.
5361 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5363 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
5364 undefined. Convert from xassert to eassert.
5365 * nsmenu.m: Convert from xassert to eassert.
5366 * nsterm.m: Likewise.
5368 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
5370 * editfns.c (region_limit): Clip to narrowing (bug#11770).
5372 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
5374 Avoid integer overflow on scroll-left and scroll-right.
5375 * window.c (HSCROLL_MAX): New macro.
5376 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
5377 overflow when requested scroll falls outside ptrdiff_t range.
5379 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5381 * window.h (struct window): Change type of 'hscroll',
5382 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
5383 'last_modified' and 'last_overlay_modified' to EMACS_INT.
5384 Adjust users accordingly.
5385 * xdisp.c (try_cursor_movement): Replace type check with eassert.
5386 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
5387 from EMACS_INT to ptrdiff_t.
5388 (make_window): Omit redundant initialization.
5390 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
5392 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
5394 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5396 * window.h (struct window): Change type of 'use_time' and
5397 'sequence_number' from Lisp_Object to int.
5398 * frame.c (make_frame): Adjust users accordingly.
5399 * print.c (print_object): Likewise.
5400 * window.c (select_window, Fwindow_use_time, make_parent_window)
5401 (make_window): Likewise.
5403 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5405 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
5406 enabled with --enable-checking=[all,glyphs] configure option.
5407 Fix GLYPH_DEBUG usage assuming that it may be undefined,
5408 adjust comments accordingly.
5409 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
5410 undefined, adjust comments accordingly.
5411 * image.c: Likewise.
5412 * scroll.c: Likewise.
5413 * w32fns.c: Likewise.
5414 * w32term.c: Likewise.
5415 * xdisp.c: Likewise.
5416 * xfaces.c: Likewise.
5418 * xterm.c: Likewise.
5420 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
5422 Generalize run-time debugging checks.
5423 * dispextern.h (XASSERTS): Remove.
5424 * fontset.c (xassert): Remove.
5425 Convert from xassert to eassert.
5426 * alloc.c: Convert from xassert to eassert.
5428 * dispnew.c: Likewise.
5430 * fringe.c: Likewise.
5431 * ftfont.c: Likewise.
5432 * gtkutil.c: Likewise.
5433 * image.c: Likewise.
5434 * keyboard.c: Likewise.
5436 * process.c: Likewise.
5437 * scroll.c: Likewise.
5438 * sound.c: Likewise.
5440 * w32console.c: Likewise.
5441 * w32fns.c: Likewise.
5442 * w32term.c: Likewise.
5443 * window.c: Likewise.
5444 * xdisp.c: Likewise.
5445 * xfaces.c: Likewise.
5447 * xselect.c: Likewise.
5448 * xterm.c: Likewise.
5450 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
5452 * fns.c (maybe_resize_hash_table): Output message when growing the
5455 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5457 * alloc.c (allocate_string_data): Remove dead code.
5458 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
5459 avoid GCC warning about unused macro.
5461 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5463 * alloc.c (allocate_string): Omit intervals initialization.
5464 * alloc.c (make_uninit_multibyte_string): Initialize intervals
5465 as in make_pure_string and make_pure_c_string.
5467 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5469 * alloc.c (allocate_string): Fix last change.
5471 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
5473 * alloc.c (allocate_string): Remove two redundant calls
5474 to memset, add explicit initialization where appropriate.
5476 2012-06-27 Glenn Morris <rgm@gnu.org>
5478 * lisp.mk (lisp): Remove paths.elc.
5480 2012-06-27 Chong Yidong <cyd@gnu.org>
5482 * doc.c (Fsubstitute_command_keys): Fix punctuation.
5484 2012-06-26 John Wiegley <johnw@newartisans.com>
5486 * unexmacosx.c (copy_data_segment): Add two section names used
5487 on Mac OS X Lion: __mod_init_func and __mod_term_func.
5489 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
5490 when building with Clang.
5492 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
5494 * eval.c (Fapply): Allow calling it with a single argument.
5496 2012-06-26 Eli Zaretskii <eliz@gnu.org>
5498 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
5499 _stricmp and _strnicmp.
5500 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
5502 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5504 * alloc.c (allocate_window): Zero out non-Lisp part of newly
5506 (allocate_process): Likewise for new process.
5507 (allocate_terminal): Change to use offsetof.
5508 (allocate_frame): Likewise.
5509 * frame.c (make_frame): Omit redundant initialization.
5510 * window.c (make_parent_window): Use memset.
5511 (make_window): Omit redundant initialization.
5512 * process.c (make_process): Omit redundant initialization.
5513 * terminal.c (create_terminal): Likewise.
5515 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5517 * term.c (delete_tty): Remove redundant call to memset.
5519 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5521 * alloc.c: Remove build_string.
5522 * lisp.h: Define build_string as static inline. This provides
5523 a better opportunity to optimize away calls to strlen when the
5524 function is called with compile-time constant argument.
5525 * image.c (imagemagick_error): Convert to build_string.
5526 * w32proc.c (sys_spawnve): Likewise.
5527 * xterm.c (x_term_init): Likewise.
5529 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
5531 Use sprintf return value instead of invoking strlen on result.
5532 In the old days this wasn't portable, since some sprintf
5533 implementations returned char *. But they died out years ago and
5534 Emacs already assumes sprintf returns int.
5535 Similarly for float_to_string.
5536 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
5537 * ccl.c (ccl_driver):
5538 * character.c (string_escape_byte8):
5539 * data.c (Fnumber_to_string):
5540 * doprnt.c (doprnt):
5541 * print.c (print_object):
5542 * xdisp.c (message_dolog):
5543 * xfns.c (syms_of_xfns):
5544 Use sprintf or float_to_string result to avoid need to call strlen.
5545 * data.c (Fnumber_to_string):
5546 Use make_unibyte_string, since the string must be ASCII.
5547 * lisp.h, print.c (float_to_string): Now returns int length.
5548 * term.c (produce_glyphless_glyph):
5549 Use sprintf result rather than recomputing it.
5551 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
5552 * Makefile.in (ALL_CFLAGS):
5553 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
5554 * gmalloc.c, regex.c: Include <config.h> unconditionally.
5556 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5558 * dispextern.h (xstrcasecmp): Define to library function
5559 strcasecmp if available.
5560 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
5562 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
5564 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
5565 Avoid comma operator.
5566 * menu.c (push_submenu_start, push_submenu_end)
5567 (push_left_right_boundary, push_menu_pane): Likewise.
5568 * msdos.c (dos_rawgetc): Likewise.
5570 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5572 * xfns.c (xic_create_fontsetname): Remove redundant calls
5575 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
5577 * gtkutil.c (get_utf8_string): Remove redundant assignment.
5578 sprintf already null-terminates its output.
5580 * xfns.c (x_window): Remove redundant cast.
5582 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5584 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
5585 `const char *' to `char *' to avoid compiler warning.
5587 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5589 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
5590 instead of truncating it to 63 (admittedly a generous limit).
5592 * process.c: Fix spelling and caps in comments.
5594 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
5596 * emacs.c (setpgrp): Remove definition, unused.
5597 * sysdep.c (setpgrp): Remove definition, not used in this file.
5599 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
5601 * makefile.w32-in: Update dependencies.
5603 2012-06-24 Eli Zaretskii <eliz@gnu.org>
5605 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
5606 (SYSTIME_H): Add nt/inc/sys/time.h.
5608 * systime.h [WINDOWSNT]: Include sys/time.h.
5610 * s/ms-w32.h (struct timespec): Definition moved from
5611 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
5613 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5615 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
5616 * buffer.h (buffer_slot_type_mismatch):
5617 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
5618 * eval.c (unwind_to_catch):
5619 * image.c (my_png_error, my_error_exit):
5620 * keyboard.c (quit_throw_to_read_char, user_error)
5621 (Fexit_recursive_edit, Fabort_recursive_edit):
5622 * lisp.h (die, args_out_of_range, args_out_of_range_3)
5623 (wrong_type_argument, buffer_overflow, __executable_start)
5624 (memory_full, buffer_memory_full, string_overflow, Fthrow)
5625 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
5626 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
5628 (child_setup) [!DOS_NT]:
5629 * lread.c (end_of_file_error, invalid_syntax):
5630 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
5631 * puresize.h (pure_write_error):
5632 * search.c (matcher_overflow):
5633 * sound.c (sound_perror, alsa_sound_perror):
5634 * sysdep.c, syssignal.h (croak):
5635 * term.c (maybe_fatal, vfatal):
5636 * textprop.c (text_read_only):
5637 * undo.c (user_error):
5638 * unexmacosx.c (unexec_error):
5639 * xterm.c (x_ins_del_lines, x_delete_glyphs):
5640 Use _Noreturn rather than NO_RETURN.
5641 No need for separate decl merely because of _Noreturn.
5642 * sound.c (sound_warning, parse_sound):
5643 Remove unnecessary forward decls.
5645 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5647 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
5648 * lisp.h (WAIT_READING_MAX): New macro.
5649 * dispnew.c (Fsleep_for, sit_for):
5650 * keyboard.c (kbd_buffer_get_event):
5651 * process.c (Faccept_process_output):
5652 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
5653 This improves on the previous patch, which introduced a bug
5654 when time_t is unsigned and as wide as intmax_t.
5655 See <http://bugs.gnu.org/9000#51>.
5657 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5659 * dispnew.c (sit_for, Fsleep_for):
5660 * keyboard.c (kbd_buffer_get_event):
5661 * process.c (Faccept_process_output): Avoid compiler warnings when
5662 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
5664 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
5666 * makefile.w32-in: Update dependencies.
5668 * w32.c (ltime): Add return type and declare static.
5669 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
5671 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5673 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
5674 Privately reported by Herbert J. Skuhra.
5675 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
5677 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
5678 not make_lisp_timeval, when the argument is of type EMACS_TIME.
5680 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5682 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
5683 last argument of make_unibyte_string.
5685 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
5686 language ID in the event parameters.
5688 * w32term.c (w32_read_socket): Put the new keyboard codepage into
5689 event.code, not the obscure "character set ID".
5691 2012-06-23 Chong Yidong <cyd@gnu.org>
5693 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
5695 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5697 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
5698 * w32.c (fdutimens): New function.
5700 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
5702 * s/ms-w32.h (pselect): Redirect to sys_select.
5704 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
5706 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
5707 in the logic of incrementing and decrementing the value of
5708 use_relocatable_buffers.
5710 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5712 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
5713 Privately reported by Herbert J. Skuhra.
5714 [__FreeBSD__]: Remove "*/" typo after "#include".
5715 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
5716 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
5717 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
5718 Don't assume EMACS_TIME and struct timeval are the same type.
5720 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
5722 Support higher-resolution time stamps (Bug#9000).
5723 The time stamps are only nanosecond-resolution at the C level,
5724 since that's the best that any real-world system supports now.
5725 But they are picosecond-resolution at the Lisp level, as that's
5726 easy, and leaves room for future OS improvements.
5728 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
5731 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
5732 Don't get current time unless it's needed.
5734 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
5735 now provides it if it's absent.
5736 (start_atimer): Port to higher-res time stamps.
5737 Check for time stamp overflow. Don't get current time more
5738 often than is needed.
5740 * buffer.h (struct buffer): Buffer modtime now has high resolution.
5741 Include systime.h, not time.h.
5742 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
5744 * dired.c: Include stat-time.h.
5745 (Ffile-attributes): File times now have higher resolution.
5747 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
5748 (struct image): Timestamp now has higher resolution.
5750 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
5751 has at least microseconds now. All uses removed.
5752 (update_frame, update_single_window, update_window, update_frame_1)
5753 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
5754 (duration_to_sec_usec): Remove; no longer needed.
5756 * editfns.c (time_overflow): Now extern.
5757 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
5758 (float-time, Fformat_time_string, Fcurrent_time_string)
5759 (Fcurrent_time_zone): Accept and generate higher-resolution
5761 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
5762 (decode_time_components, lisp_seconds_argument): New functions.
5763 (make_time): Now static.
5764 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
5765 Report an error if the time is invalid, rather than having the caller
5768 * fileio.c: Include <stat-time.h>
5769 (Fcopy_file): Copy higher-resolution time stamps.
5770 Prefer to set the time stamp via a file descriptor if that works.
5771 (Fset_file_times, Finsert_file_contents, Fwrite_region)
5772 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
5773 (Fvisited_file_modtime, Fset_visited_file_modtime):
5774 Support higher-resolution time stamps.
5776 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
5778 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
5780 * image.c (prepare_image_for_display, clear_image_cache)
5781 (lookup_image): Port to higer-resolution time stamps.
5783 * keyboard.c (start_polling, bind_polling_period):
5784 Check for time stamp overflow.
5785 (read_char, kbd_buffer_get_event, timer_start_idle)
5786 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
5787 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
5788 Port to higher-resolution time stamps. Do not assume time_t is signed.
5789 (decode_timer): New function. Timers are now vectors of length 9,
5790 not 8, to accommodate the picosecond component.
5791 (timer_check_2): Use it.
5793 * nsterm.m (select_timeout, timeval_subtract): Remove.
5794 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
5795 as they're a bit more accurate and handle overflow better.
5796 (ns_select): Change prototype to be compatible with pselect.
5797 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
5798 * nsterm.h (ns_select): Adjust prototype.
5800 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
5801 us-resolution time stamps.
5802 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
5804 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
5806 * lisp.h (time_overflow): New decl.
5807 (wait_reading_process_output): First arg is now intmax_t, not int,
5808 to accommodate larger waits.
5810 * process.h (struct Lisp_Process.read_output_delay):
5811 Now counts nanoseconds, not microseconds.
5812 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
5814 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
5815 (wait_reading_process_output):
5816 Port to ns-resolution time stamps.
5817 (Faccept_process_output, wait_reading_process_output):
5818 Check for time stamp overflow. Do not assume time_t is signed.
5819 (select_wrapper): Remove; we now use pselect.
5820 (Fprocess_attributes): Now generates ns-resolution time stamps.
5822 * sysdep.c: Include utimens.h. Don't include utime.h
5823 or worry about struct utimbuf; gnulib does that for us now.
5824 (gettimeofday): Remove; gnulib provides a substitute.
5825 (make_timeval): New function.
5826 (set_file_times): Now sets ns-resolution time stamps.
5827 New arg FD; all uses changed.
5828 (time_from_jiffies, ltime_from_jiffies, get_up_time)
5829 (system_process_attributes):
5830 Now returns ns-resolution time stamp. All uses changed.
5831 Check for time stamp overflow.
5833 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
5834 provides a substitute now.
5836 * systime.h: Include timespec.h rather than sys/time.h and time.h,
5837 since it guarantees struct timespec.
5838 (EMACS_TIME): Now struct timespec, so that we can support
5839 ns-resolution time stamps.
5840 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
5841 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
5842 (EMACS_USECS): Remove.
5843 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
5844 so multiply the arg by 1000 before storing it.
5845 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
5847 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
5848 Port to ns-resolution time stamps.
5849 (EMACS_TIME_NEG_P): Remove; replaced by....
5850 (EMACS_TIME_SIGN): New macro.
5851 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
5852 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
5853 (set_file_times, make_time, lisp_time_argument): Adjust signature.
5854 (make_timeval, make_lisp_time, decode_time_components): New decls.
5855 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
5856 that it mishandled time_t overflow. You can't compare by subtracting!
5857 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
5858 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
5860 * term.c: Include <sys/time.h>.
5861 (timeval_to_Time): New function, for proper overflow wraparound.
5862 (term_mouse_position, term_mouse_click): Use it.
5864 * undo.c (record_first_change): Support higher-resolution time stamps
5866 (Fprimitive_undo): Use them when restoring time stamps.
5868 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
5869 (w32_get_internal_run_time):
5870 Port to higher-resolution Emacs time stamps.
5871 (ltime): Now accepts single 64-bit integer, as that's more convenient
5874 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
5876 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
5877 for compatibility with pselect. Support ns-resolution time stamps.
5879 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
5881 * xselect.c (wait_for_property_change, x_get_foreign_selection):
5882 Check for time stamp overflow, and support ns-resolution time stamps.
5884 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
5885 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
5886 (timeval_subtract): Remove; no longer needed.
5887 (XTflash, XTring_bell, x_wait_for_event):
5888 Port to ns-resolution time stamps. Don't assume time_t is signed.
5890 2012-06-22 Chong Yidong <cyd@gnu.org>
5892 * xdisp.c (x_consider_frame_title): Revert last change.
5894 2012-06-22 Eli Zaretskii <eliz@gnu.org>
5896 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
5897 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
5898 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
5899 staticidx goes up to 1597 out of 1600 = 0x640.)
5901 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
5903 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
5904 Otherwise, the umask might be mistakenly 0 while handling input signals.
5906 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
5908 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
5910 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5912 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
5913 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
5914 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
5915 access to `contents' member of Lisp_Vector objects with AREF and ASET
5918 2012-06-19 Chong Yidong <cyd@gnu.org>
5920 * frame.c (delete_frame): When selecting a frame on a different
5921 text terminal, do not alter the terminal's top-frame.
5923 * xdisp.c (format_mode_line_unwind_data): Record the target
5924 frame's selected window and its terminal's top-frame.
5925 (unwind_format_mode_line): Restore them.
5926 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
5928 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
5929 since tty frames can be explicitly named.
5930 (prepare_menu_bars): Likewise.
5932 * term.c (Ftty_top_frame): New function.
5934 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5936 Port byte-code-meter to modern targets.
5937 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
5938 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
5939 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
5940 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
5941 (METER_1, METER_2): Simplify.
5943 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
5945 * data.c (Fdefalias): Return `symbol' (bug#11686).
5947 2012-06-18 Martin Rudalics <rudalics@gmx.at>
5949 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
5950 gets killed during executing of this function (Bug#11665).
5951 Try to always return Qt when the buffer has been actually killed.
5952 (Vkill_buffer_query_functions): In doc-string say that functions
5953 run by this hook should not change the current buffer.
5955 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5957 Fix recently-introduced process.c problems found by static checking.
5958 * process.c (write_queue_push, write_queue_pop, send_process):
5959 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
5960 (write_queue_pop): Fix pointer signedness problem.
5961 (send_process): Remove unused local.
5963 2012-06-17 Chong Yidong <cyd@gnu.org>
5965 * xdisp.c (redisplay_internal): No need to redisplay terminal
5966 frames that are not on top.
5968 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
5970 * process.c (make_process): Initialize write_queue.
5971 (write_queue_push, write_queue_pop): New functions.
5972 (send_process): Use them to maintain correct ordering of process
5975 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
5977 * lisp.h (eassert): Assume C89 or later.
5978 This removes the need for CHECK.
5979 (CHECK): Remove. Its comments about always evaluating its
5980 argument were confusing, as 'eassert' typically does not evaluate
5983 * coding.c (produce_chars): Use ptrdiff_t, not int.
5985 * xterm.c (x_draw_underwave): Check for integer overflow.
5986 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
5988 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
5990 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
5991 referenced (Bug#11583).
5993 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
5995 Implement wave-style variant of underlining.
5996 * dispextern.h (face_underline_type): New enum.
5997 (face): Add field for underline type.
5998 * nsterm.m (ns_draw_underwave): New function.
5999 (ns_draw_text_decoration): Use it.
6000 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
6002 (x_draw_glyph_string): Use them.
6003 * xfaces.c (Qline, Qwave): New Lisp objects.
6004 (check_lface_attrs, merge_face_ref)
6005 (Finternal_set_lisp_face_attribute, realize_x_face):
6006 Handle wave-style underline face attributes.
6007 * xterm.c (x_draw_underwave): New function.
6008 (x_draw_glyph_string): Use it.
6010 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
6012 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
6013 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
6014 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
6015 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
6016 ($(BLD)/w32select.$(O)): Update dependencies.
6018 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
6020 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
6021 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
6022 * character.c (_fetch_multibyte_char_p): Remove.
6023 * alloc.c: Include "character.h" before "buffer.h".
6025 * buffer.c: Likewise.
6026 * bytecode.c: Likewise.
6027 * callint.c: Likewise.
6028 * callproc.c: Likewise.
6029 * casefiddle.c: Likewise.
6030 * casetab.c: Likewise.
6031 * category.c: Likewise.
6033 * coding.c: Likewise.
6034 * composite.c: Likewise.
6035 * dired.c: Likewise.
6036 * dispnew.c: Likewise.
6038 * dosfns.c: Likewise.
6039 * editfns.c: Likewise.
6040 * emacs.c: Likewise.
6041 * fileio.c: Likewise.
6042 * filelock.c: Likewise.
6044 * fontset.c: Likewise.
6045 * fringe.c: Likewise.
6046 * indent.c: Likewise.
6047 * insdel.c: Likewise.
6048 * intervals.c: Likewise.
6049 * keyboard.c: Likewise.
6050 * keymap.c: Likewise.
6051 * lread.c: Likewise.
6052 * macros.c: Likewise.
6053 * marker.c: Likewise.
6054 * minibuf.c: Likewise.
6055 * nsfns.m: Likewise.
6056 * nsmenu.m: Likewise.
6057 * print.c: Likewise.
6058 * process.c: Likewise.
6059 * regex.c: Likewise.
6060 * region-cache.c: Likewise.
6061 * search.c: Likewise.
6062 * syntax.c: Likewise.
6064 * textprop.c: Likewise.
6066 * unexsol.c: Likewise.
6067 * w16select.c: Likewise.
6068 * w32fns.c: Likewise.
6069 * w32menu.c: Likewise.
6070 * window.c: Likewise.
6071 * xdisp.c: Likewise.
6073 * xmenu.c: Likewise.
6075 * xselect.c: Likewise.
6077 2012-06-16 Eli Zaretskii <eliz@gnu.org>
6079 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
6080 If all the glyphs of the glyph row came from strings, and we have no
6081 cursor positioning clues, put the cursor on the first glyph of the
6083 (handle_face_prop): Use chunk-relative overlay string index when
6084 indexing into it->string_overlays array. (Bug#11653)
6085 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
6086 the rightmost. (Bug#11720)
6088 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
6090 * category.h (CHAR_HAS_CATEGORY): Define as inline.
6091 (CATEGORY_MEMBER): Enforce 1/0 value.
6092 * category.c (_temp_category_set): Remove.
6094 2012-06-16 Eli Zaretskii <eliz@gnu.org>
6096 * window.c (Fdelete_other_windows_internal)
6097 (Fdelete_window_internal): Don't access frame's mouse highlight
6098 info of the initial frame. (Bug#11677)
6100 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
6102 * .gdbinit (xgetint): Fix recently-introduced paren typo.
6103 Assume USE_2_TAGS_FOR_INTS.
6104 (xreload): Adjust $tagmask width to match recent lisp.h change.
6106 Simplify lisp.h in minor ways that should not affect code.
6107 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
6108 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
6109 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
6110 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
6111 (INTTYPEBITS): New macro, for clarity.
6112 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
6113 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
6114 Simplify now that USE_LSB_TAG is always defined.
6115 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
6116 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
6118 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
6120 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
6122 2012-06-13 Glenn Morris <rgm@gnu.org>
6124 * s/bsd-common.h (BSD4_3):
6125 * s/usg5-4-common.h (USG5_4): No longer define; unused.
6127 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
6129 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
6132 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
6134 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
6135 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
6136 * alloc.c (widen_to_Lisp_Object): Remove.
6137 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
6138 * frame.c (delete_frame): Remove outdated comment.
6139 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
6140 USE_LISP_UNION_TYPE.
6141 (Fw32_unregister_hot_key): Likewise.
6142 (Fw32_toggle_lock_key): Likewise.
6143 * w32menu.c (add_menu_item): Likewise.
6144 (w32_menu_display_help): Use XIL instead of checking
6145 USE_LISP_UNION_TYPE.
6146 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
6147 (init_heap): Likewise.
6148 * w32term.c (w32_read_socket): Update comment.
6150 2012-06-13 Glenn Morris <rgm@gnu.org>
6152 * s/usg5-4-common.h, src/s/unixware.h:
6153 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
6155 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
6157 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
6159 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
6160 * alloc.c (make_number) [!defined make_number]:
6161 Remove, as lisp.h always defines this now.
6162 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
6163 (roundup_size): Verify that it is a power of 2.
6164 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
6165 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
6166 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
6167 -DUSE_LSB_TAG=0, to override the automatically-selected default.
6168 USE_LSB_TAG now is always defined to be either 0 or 1.
6170 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
6171 code works fine either way, and efficiency is not a concern here,
6172 as the union type is for debugging, not for production.
6173 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
6174 Use an inline function on all platforms when using the union type,
6175 since this is simpler and 'static inline' can be used portably
6177 (LISP_INITIALLY_ZERO): New macro.
6178 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
6179 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
6181 2012-06-12 Glenn Morris <rgm@gnu.org>
6183 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
6185 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
6187 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
6188 Move BROKEN_SIGIO to configure.
6190 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
6191 Move NO_TERMIO to configure.
6193 2012-06-12 Chong Yidong <cyd@gnu.org>
6195 * image.c (imagemagick_load_image): Use MagickFlattenImage if
6196 MagickMergeImageLayers is undefined. Use pixel pusher loop if
6197 MagickExportImagePixels is undefined.
6199 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
6201 * image.c (imagemagick_load_image): Remove unused label.
6203 2012-06-11 Glenn Morris <rgm@gnu.org>
6205 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
6206 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
6207 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
6208 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
6210 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
6212 * alloc.c (make_byte_code): New function.
6213 (Fmake_byte_code): Use it. Don't purify here.
6214 * lread.c (read1): Use it as well to avoid extra allocation.
6216 2012-06-11 Chong Yidong <cyd@gnu.org>
6218 * image.c (imagemagick_load_image): Implement transparency.
6220 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
6222 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
6223 account for preceding backslashes. (Bug#11663)
6225 2012-06-09 Chong Yidong <cyd@gnu.org>
6227 * term.c: Support italics in capable terminals (Bug#9652).
6228 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
6229 (turn_on_face): Output using TS_enter_italic_mode if available.
6230 Don't handle unused blinking and alt-charset cases.
6231 (turn_off_face): Handle italic case; discard unused tty_blinking_p
6232 and tty_alt_charset_p cases.
6233 (tty_capable_p, init_tty): Support italics.
6235 * termchar.h (struct tty_display_info): Add field for italics.
6236 Remove unused blink field.
6238 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
6241 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
6242 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
6243 tty_alt_charset_p. Add tty_italic_p.
6245 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
6247 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
6248 dbus_type_is_basic if available.
6249 (xd_extract_signed, xd_extract_unsigned): Rename from
6250 extract_signed and extract_unsigned, respectively. Adapt callers.
6252 2012-06-09 Chong Yidong <cyd@gnu.org>
6254 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
6256 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
6259 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
6261 * xdisp.c (vmessage): Treat frame message as multibyte.
6262 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
6263 would generate the diagnostic "Making \302\247 buffer-local while
6266 2012-06-08 Eli Zaretskii <eliz@gnu.org>
6268 * dispnew.c (showing_window_margins_p): Undo last change, which
6269 was done due to an inadvertent commit.
6270 (adjust_frame_glyphs_for_frame_redisplay): Do call
6271 showing_window_margins_p.
6273 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
6275 * eval.c (Fmake_var_non_special): New primitive.
6276 (syms_of_eval): Defsubr it.
6277 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
6279 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
6281 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
6282 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
6284 2012-06-08 Eli Zaretskii <eliz@gnu.org>
6286 * alloc.c (allocate_vectorlike): Fix last change.
6288 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
6290 Block-based vector allocation of small vectors.
6291 * lisp.h (struct vectorlike_header): New field `nbytes',
6292 adjust comment accordingly.
6293 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
6294 to denote vector blocks. Adjust users (live_vector_p,
6295 mark_maybe_pointer, valid_lisp_object_p) accordingly.
6296 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
6297 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
6298 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
6299 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
6300 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
6301 (roundup_size): New constant.
6302 (struct vector_block): New data type.
6303 (vector_blocks, vector_free_lists, zero_vector): New variables.
6304 (all_vectors): Rename to `large_vectors'.
6305 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
6306 (sweep_vectors): New functions.
6307 (allocate_vectorlike): Return `zero_vector' as the only vector of
6308 0 items. Allocate new vector from block if vector size is less than
6309 or equal to VBLOCK_BYTES_MAX.
6310 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
6311 (init_alloc_once): Add call to init_vectors.
6313 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
6315 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
6317 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
6319 * doprnt.c (doprnt): Truncate multibyte char correctly.
6320 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
6321 would mishandle a string argument "Xc" if X was a multibyte
6322 character of length 2: it would truncate after X's first byte
6323 rather than including all of X.
6325 2012-06-06 Chong Yidong <cyd@gnu.org>
6327 * buffer.c (word_wrap): Doc fix.
6329 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
6331 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
6333 2012-06-03 Glenn Morris <rgm@gnu.org>
6335 * xdisp.c (tool-bar-style): Doc fix.
6337 2012-06-03 Ulrich Müller <ulm@gentoo.org>
6339 * Makefile.in (PAXCTL): Define.
6340 (temacs$(EXEEXT)): Disable memory randomization for the temacs
6341 binary via PaX flags if the paxctl utility is available.
6342 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
6343 Restore PaX flags to their default. (Bug#11398)
6345 2012-06-03 Chong Yidong <cyd@gnu.org>
6347 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
6350 2012-06-03 Chong Yidong <cyd@gnu.org>
6352 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
6353 (note_mode_line_or_margin_highlight): If there is no help echo,
6354 use mode-line-default-help-echo. Handle the case where the mouse
6355 position is past the end of the mode line string.
6357 * buffer.c (buffer_local_value_1): New function, split from
6358 Fbuffer_local_value; can return Qunbound.
6359 (Fbuffer_local_value): Use it.
6360 (Vmode_line_format): Docstring tweaks.
6362 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
6364 * sysdep.c (system_process_attributes): Improve comment.
6366 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
6368 * keyboard.c: Export real-this-command to Elisp.
6369 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
6370 and DEFVAR it. Update all users.
6372 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
6374 * minibuf.c (Fassoc_string): Remove duplicate declaration.
6376 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
6377 Convert pctcpu and pctmem to Lisp float properly.
6378 Let the compiler fold better, as 100.0/0x8000 is exact.
6380 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
6382 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
6385 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
6387 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
6389 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
6391 For a 'struct window', replace some Lisp_Object fields to
6392 bitfields where appropriate, remove unused fields.
6393 * window.h (struct window): Remove unused 'last_mark_x' and
6394 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
6395 change it's type from Lisp_Object to bitfield.
6396 Change type of 'force_start', 'optional_new_start',
6397 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
6398 fields from Lisp_Object to bitfield. Adjust users accordingly.
6400 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
6402 Pacify gcc -Wdouble-precision when using Xaw.
6403 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
6404 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
6405 Use 'float' consistently, rather than 'float' in most places
6406 and 'double' in a couple of places.
6408 2012-05-31 Eli Zaretskii <eliz@gnu.org>
6410 * xdisp.c (handle_stop): Detect whether we have overlay strings
6411 loaded by testing it->current.overlay_string_index to be
6412 non-negative, instead of checking whether n_overlay_strings is
6413 positive. (Bug#11587)
6415 2012-05-31 Chong Yidong <cyd@gnu.org>
6417 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
6419 * doc.c (Fsubstitute_command_keys): Doc fix.
6421 2012-05-31 Eli Zaretskii <eliz@gnu.org>
6423 * search.c (search_buffer): Remove calls to
6424 r_alloc_inhibit_buffer_relocation, as it is now called by
6425 maybe_unify_char, which was the cause of relocation of buffer text
6428 2012-05-31 Eli Zaretskii <eliz@gnu.org>
6430 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
6431 for the duration of call to load_charset, to avoid problems with
6432 callers of maybe_unify_char that access buffer text through C
6435 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
6436 decrement the inhibition flag, instead of just setting or
6439 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
6441 Remove obsolete '#define static' cruft.
6442 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
6443 This #undef was "temporary" in 2000; it is no longer needed
6444 now that '#define static' has gone away.
6445 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
6446 (gray_bitmap_bits): Remove; no longer needed.
6447 All uses replaced with definiens.
6448 * xterm.c: Include "bitmaps/gray.xbm".
6450 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
6452 Clean up __executable_start, monstartup when --enable-profiling.
6453 The following changes affect the code only when profiling.
6454 * dispnew.c (__executable_start): Rename from safe_bcopy.
6455 Define only on platforms that need it.
6456 * emacs.c: Include <sys/gmon.h> when profiling.
6457 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
6458 (__executable_start): Remove decl, since lisp.h does it now.
6459 (safe_bcopy): Remove decl; no longer has that name.
6460 (main): Coalesce #if into single bit of code, for simplicity.
6461 Cast pointers to uintptr_t, since standard libraries want integers
6463 * lisp.h (__executable_start): New decl.
6465 2012-05-31 Glenn Morris <rgm@gnu.org>
6467 * image.c (Fimagemagick_types): Doc fix.
6469 2012-05-30 Jim Meyering <meyering@redhat.com>
6471 * callproc.c (Fcall_process_region): Include directory component
6472 in mkstemp error message (Bug#11586).
6474 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
6476 * alloc.c, lisp.h (make_pure_vector): Now static.
6478 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
6480 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
6481 Move to byte-run.el.
6482 (Fautoload): Do the hash-doc more carefully.
6483 * data.c (Fdefalias): Purify definition, except for keymaps.
6484 (Qdefun): Move from eval.c.
6485 * lisp.h (Qdefun): Remove.
6486 * lread.c (read1): Tiny simplification.
6488 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
6490 Do not create empty overlays with the evaporate property (Bug#9642).
6491 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
6492 Bug#9642, but explicitly check that the buffer the overlay would
6493 be moved to is live and rearrange lines to make sure that errors
6494 will not put the overlay in an inconsistent state.
6495 (Fdelete_overlay): Cosmetics.
6497 2012-05-28 Eli Zaretskii <eliz@gnu.org>
6499 * w32term.c (my_bring_window_to_top): New function.
6500 (x_raise_frame): Use handle returned by DeferWindowPos, which
6501 could be different from the original one.
6502 Call my_bring_window_to_top instead of my_set_foreground_window.
6505 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
6506 by calling BringWindowToTop.
6508 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
6509 (WM_EMACS_END): Increase by one.
6511 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
6513 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
6514 This avoids undefined behavior that might cause the eassert
6515 to not catch an out-of-range value.
6517 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
6519 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
6520 Update dependencies.
6522 2012-05-27 Eli Zaretskii <eliz@gnu.org>
6524 * bidi.c (bidi_mirror_char): Fix last change.
6526 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
6528 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
6529 when referring to sectname field in printf format.
6531 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
6533 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
6534 Only r_alloc_inhibit_buffer_relocation needed to be added;
6535 the others were already declared.
6537 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
6538 before checking whether it's out of range. Put the check inside
6540 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
6542 2012-05-27 Ken Brown <kbrown@cornell.edu>
6544 * callproc.c (Fcall_process): Restore a line that was accidentally
6545 commented out in the 2011-02-13 change (bug#11547).
6547 2012-05-27 Eli Zaretskii <eliz@gnu.org>
6549 * lisp.h [REL_ALLOC]: Add prototypes for external functions
6550 defined on ralloc.c.
6552 * buffer.c [REL_ALLOC]: Remove prototypes of
6553 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
6554 they are now on lisp.h.
6556 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
6558 * search.c (search_buffer): Use it to inhibit relocation of buffer
6559 text while re_search_2 is doing its job, because re_search_2 is
6560 passed C pointers to buffer text. (Bug#11519)
6562 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
6565 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
6566 state after an additional call to move_it_in_display_line_to, keep
6567 the values of it->max_ascent and it->max_descent found for the
6569 (pos_visible_p): Revert the comparison against bottom_y to what it
6570 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
6573 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
6575 Fix coding-related core dumps with gcc -ftrapv.
6576 The code was computing A - B, where A and B are pointers, and B is
6577 random garbage. This can lead to core dumps on platforms that
6578 have special pointer registers, and it also leads to core dumps on
6579 x86-64 when compiled with gcc -ftrapv. The fix is to compute
6580 A - B only when B is initialized properly.
6581 * coding.c (coding_set_source, coding_set_destination): Return void.
6582 (coding_change_source, coding_change_destinations): New functions,
6583 with the old behaviors of coding_set_source and coding_set_destination.
6584 All callers that need an offset changed to use these new functions.
6586 2012-05-26 Glenn Morris <rgm@gnu.org>
6588 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
6590 2012-05-26 Eli Zaretskii <eliz@gnu.org>
6592 Extend mouse support on W32 text-mode console.
6593 * xdisp.c (draw_row_with_mouse_face):
6594 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
6596 * w32console.c: Include window.h.
6597 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
6599 (initialize_w32_display): Initialize mouse-highlight data.
6601 * w32inevt.c: Include termchar.h and window.h.
6602 (do_mouse_event): Support mouse-autoselect-window. When the mouse
6603 moves, call note_mouse_highlight. If help_echo changed, call
6604 gen_help_event to produce help-echo message in the echo area.
6605 Call clear_mouse_face if mouse_face_hidden is set in the mouse
6608 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
6610 * lread.c (read1): Simplify slightly to avoid an overflow warning
6611 with GCC 4.7.0 on x86-64.
6613 2012-05-26 Eli Zaretskii <eliz@gnu.org>
6615 * bidi.c (bidi_mirror_char): Revert last change: an int is
6616 definitely wide enough here.
6618 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
6620 Fix integer width and related bugs (Bug#9874).
6621 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
6622 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
6623 (string_bytes, check_sblock, allocate_string_data):
6624 (compact_small_strings, Fmake_bool_vector, make_string)
6625 (make_unibyte_string, make_multibyte_string)
6626 (make_string_from_bytes, make_specified_string)
6627 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
6628 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
6630 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6631 (allocate_pseudovector):
6632 Use int, not EMACS_INT, where int is wide enough.
6633 (inhibit_garbage_collection, Fgarbage_collect):
6634 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6635 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
6636 int might not be wide enough.
6637 (bidi_cache_search, bidi_cache_find, bidi_init_it)
6638 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
6639 (bidi_at_paragraph_end, bidi_find_paragraph_start)
6640 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
6641 (bidi_level_of_next_char, bidi_move_to_visually_next):
6642 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6643 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
6644 (Fkill_buffer, Fset_buffer_major_mode)
6645 (advance_to_char_boundary, Fbuffer_swap_text)
6646 (Fset_buffer_multibyte, overlays_at, overlays_in)
6647 (overlay_touches_p, struct sortvec, record_overlay_string)
6648 (overlay_strings, recenter_overlay_lists)
6649 (adjust_overlays_for_insert, adjust_overlays_for_delete)
6650 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
6651 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
6652 (Foverlay_recenter, last_overlay_modification_hooks_used)
6653 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
6654 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6655 (validate_region): Omit unnecessary test for b <= e,
6656 since that's guaranteed by the previous test.
6657 (adjust_overlays_for_delete): Avoid pos + length overflow.
6658 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
6659 (report_overlay_modification):
6660 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6661 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
6662 Omit pointer cast, which isn't needed anyway, and doesn't work
6663 after the EMACS_INT -> ptrdiff_t change.
6664 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
6665 * buffer.h: Adjust decls to match defn changes elsewhere.
6666 (struct buffer_text, struct buffer):
6667 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6668 Use EMACS_INT, not int, where int might not be wide enough.
6669 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
6670 not int, to avoid needless 32-bit limit on 64-bit hosts.
6671 (exec_byte_code): Use tighter memory-full test, one that checks
6672 for alloca overflow. Don't compute the address of the object just
6673 before an array, as that's not portable. Use EMACS_INT, not
6674 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
6675 * callint.c (Fcall_interactively):
6676 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6677 * callproc.c (call_process_kill, Fcall_process):
6678 Don't assume pid_t fits into an Emacs fixnum.
6679 (call_process_cleanup, Fcall_process, child_setup):
6680 Don't assume pid_t fits into int.
6681 (call_process_cleanup, Fcall_process, delete_temp_file)
6682 (Fcall_process_region):
6683 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6684 (Fcall_process): Simplify handling of volatile integers.
6685 Use int, not EMACS_INT, where int will do.
6686 * casefiddle.c (casify_object, casify_region, operate_on_word)
6687 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
6688 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6689 (casify_object): Avoid integer overflow when overallocating buffer.
6690 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
6691 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
6692 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
6693 * category.h (CATEGORYP): Don't assume arg is nonnegative.
6694 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
6695 integers are now checked earlier. All uses replaced with XINT.
6697 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6698 For CCL_MapSingle, check that content and value are in int range.
6699 (ccl_driver, Fregister_code_conversion_map):
6700 Check that Vcode_version_map_vector is a vector.
6701 (resolve_symbol_ccl_program): Check that vector header is in range.
6702 Always copy the vector, so that we can check its contents reliably
6703 now rather than having to recheck each instruction as it's being
6704 executed. Check that vector words fit in 'int'.
6705 (ccl_get_compiled_code, Fregister_ccl_program)
6706 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
6707 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
6708 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
6709 contents are in range.
6710 (Fccl_execute_on_string): Check that status is in range.
6711 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
6712 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
6713 Accept and return EMACS_INT, not int, because callers can pass values
6715 (c_string_width, strwidth, lisp_string_width, chars_in_text)
6716 (multibyte_chars_in_text, parse_str_as_multibyte)
6717 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
6718 (str_as_unibyte, str_to_unibyte, string_count_byte8)
6719 (string_escape_byte8, Fget_byte):
6720 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6721 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
6722 avoid mishandling large integers.
6723 * character.h: Adjust decls to match defn changes elsewhere.
6724 * charset.c (load_charset_map_from_file, find_charsets_in_text)
6725 (Ffind_charset_region):
6726 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6727 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
6728 (load_charset_map_from_vector, Fdefine_charset_internal):
6729 Don't assume fixnum fits in int.
6730 (load_charset_map_from_vector, Fmap_charset_chars):
6731 Remove now-unnecessary CHECK_NATNUMs.
6732 (Fdefine_charset_internal): Check ranges here, more carefully.
6733 Don't rely on undefined behavior with signed left shift overflow.
6734 Don't assume unsigned int fits into fixnum, or that fixnum fits
6735 into unsigned int. Don't require max_code to be a valid fixnum;
6736 that's not true for gb10830 4-byte on a 32-bit host. Allow
6737 invalid_code to be a cons, for the same reason. Require code_offset
6738 to be a character. Avoid int overflow if max_char is close
6740 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
6741 this is intended anyway and avoids some undefined behavior.
6742 (load_charset_map): Pass unsigned, not int, as 2nd arg of
6743 INDEX_TO_CODE_POINT, as that's what it expects.
6744 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
6745 * charset.h (DECODE_CHAR): Return int, not unsigned;
6746 this is what was intended anyway, and it avoids undefined behavior.
6747 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
6748 integer-overflow issues.
6749 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
6750 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
6751 where the argument is EMACS_INT, and this behavior is not intended.
6752 * chartab.c (Fmake_char_table, Fset_char_table_range)
6753 (uniprop_get_decoder, uniprop_get_encoder):
6754 Don't assume fixnum fits in int.
6755 * cmds.c (move_point): New function, that does the gist of
6756 Fforward_char and Fbackward_char, but does so while checking
6757 for integer overflow more accurately.
6758 (Fforward_char, Fbackward_char): Use it.
6759 (Fforward_line, Fend_of_line, internal_self_insert)
6760 (internal_self_insert):
6761 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6762 Fix a FIXME, by checking for integer overflow when calculating
6763 target_clm and actual_clm.
6764 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
6765 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
6766 (ASSURE_DESTINATION, coding_alloc_by_realloc)
6767 (coding_alloc_by_making_gap, alloc_destination)
6768 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
6769 (encode_coding_utf_16, detect_coding_emacs_mule)
6770 (decode_coding_emacs_mule, encode_coding_emacs_mule)
6771 (detect_coding_iso_2022, decode_coding_iso_2022)
6772 (encode_invocation_designation, encode_designation_at_bol)
6773 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
6774 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
6775 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
6776 (encode_coding_ccl, encode_coding_raw_text)
6777 (detect_coding_charset, decode_coding_charset)
6778 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
6779 (produce_composition, produce_charset, produce_annotation)
6780 (decode_coding, handle_composition_annotation)
6781 (handle_charset_annotation, consume_chars, decode_coding_gap)
6782 (decode_coding_object, encode_coding_object, detect_coding_system)
6783 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
6784 (code_convert_region, code_convert_string)
6785 (Fdefine_coding_system_internal)
6786 (coding_set_source, coding_set_destination):
6787 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6788 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
6789 (Fdefine_coding_system_internal):
6790 Don't assume fixnums fit in int.
6791 (decode_coding_gap, decode_coding_object, encode_coding_object)
6792 (Fread_coding_system, Fdetect_coding_region)
6793 (Funencodable_char_position, Fcheck_coding_systems_region)
6794 (get_translation, handle_composition_annotation, consume_chars):
6795 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6796 (consume_chars): Rewrite to not calculate an address outside buffer.
6797 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
6798 Don't access memory outside of the args array.
6799 (Fdefine_coding_system_internal): Check for charset-id overflow.
6800 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
6801 result of ENCODE_CHAR.
6802 * coding.h: Adjust decls to match defn changes elsewhere.
6803 (struct coding_system):
6804 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6805 * composite.c (get_composition_id, find_composition)
6806 (run_composition_function, update_compositions)
6807 (compose_text, composition_gstring_put_cache)
6808 (composition_gstring_p, composition_gstring_width)
6809 (fill_gstring_header, fill_gstring_body, autocmp_chars)
6810 (composition_compute_stop_pos, composition_reseat_it)
6811 (composition_update_it, struct position_record)
6812 (find_automatic_composition, composition_adjust_point)
6813 (Fcomposition_get_gstring, Ffind_composition_internal):
6814 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6815 (update_compositions):
6816 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6817 * composite.h: Adjust decls to match defn changes elsewhere.
6818 (struct composition):
6819 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6820 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
6821 Do not attempt to compute the address of the object just before a
6822 buffer; this is not portable.
6824 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6825 (Faset): Use int, not EMACS_INT, where int is wide enough.
6826 (Fstring_to_number): Don't assume fixnums fit in int.
6827 (Frem): Don't assume arg is nonnegative.
6828 * dbusbind.c (xd_append_arg): Check for integers out of range.
6829 (Fdbus_call_method): Don't overflow the timeout int.
6830 (extract_signed, extract_unsigned): New functions.
6831 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
6832 (xd_get_connection_references): Return ptrdiff_t, not int.
6834 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
6835 (xd_read_message_1):
6836 Use int, not unsigned, where the dbus API uses int.
6837 (Fdbus_message_internal): Don't overflow mtype.
6838 (syms_of_dbusbind): Allocate right-sized buffer for integers.
6839 * dired.c (directory_files_internal, file_name_completion, scmp)
6840 (file_name_completion_stat):
6841 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6842 (file_name_completion): Don't overflow matchcount.
6843 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
6844 * dispextern.h: Adjust decls to match defn changes elsewhere.
6845 (struct text_pos, struct glyph, struct bidi_saved_info)
6846 (struct bidi_string_data, struct bidi_it, struct composition_it)
6848 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6849 (struct display_pos, struct composition_it, struct it):
6850 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6851 * dispnew.c (increment_matrix_positions)
6852 (increment_row_positions, mode_line_string)
6853 (marginal_area_string):
6854 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6855 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
6856 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6857 (duration_to_sec_usec): New function, to check for overflow better.
6858 (Fsleep_for, sit_for): Use it.
6859 * doc.c (get_doc_string, store_function_docstring):
6860 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6861 (get_doc_string, Fsnarf_documentation):
6862 Use int, not EMACS_INT, where int is wide enough.
6864 Use SAFE_ALLOCA, not alloca.
6865 Check for overflow when converting EMACS_INT to off_t.
6866 * doprnt.c (doprnt):
6867 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6868 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
6869 Don't assume uid_t fits into fixnum.
6870 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
6871 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
6872 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
6873 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
6874 (general_insert_function)
6875 (Finsert_char, make_buffer_string, make_buffer_string_both)
6876 (update_buffer_properties, Fbuffer_substring)
6877 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
6878 (Fsubst_char_in_region, check_translation)
6879 (Ftranslate_region_internal, save_restriction_restore, Fformat)
6880 (transpose_markers, Ftranspose_regions):
6881 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6882 (clip_to_bounds): Move to lisp.h as an inline function).
6883 (Fconstrain_to_field): Don't assume integers are nonnegative.
6884 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
6885 (Fsubst_char_in_region, Fsave_restriction):
6886 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6887 (Femacs_pid): Don't assume pid_t fits into fixnum.
6888 (lo_time): Use int, not EMACS_INT, when int suffices.
6889 (lisp_time_argument): Check for usec out of range.
6890 (Fencode_time): Don't assume fixnum fits in int.
6891 (Fuser_login_name, Fuser_full_name): Signal an error
6892 if a uid argument is out of range, rather than relying on
6894 (Fformat_time_string): Remove now-unnecessary check.
6895 lisp_time_argument checks for out-of-range usec now.
6896 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
6897 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
6898 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
6899 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
6900 (init_cmdargs, Fdump_emacs):
6901 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6902 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
6903 the bottom (typically) 32 bits of the fixnum.
6904 * eval.c (specpdl_size, call_debugger):
6905 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6906 (when_entered_debugger, Fbacktrace_debug):
6907 Don't assume fixnum can fit in int.
6908 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
6909 the object just before a buffer; this is not portable.
6910 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
6911 (grow_specpdl, unbind_to):
6912 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6913 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
6914 (grow_specpdl): Simplify allocation by using xpalloc.
6915 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
6916 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
6917 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
6918 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6919 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
6921 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6922 (Fcopy_file, non_regular_nbytes, read_non_regular)
6923 (Finsert_file_contents):
6924 Use int, not EMACS_INT, where int is wide enough.
6925 (READ_BUF_SIZE): Verify that it fits in int.
6926 (Finsert_file_contents): Check that counts are in proper range,
6927 rather than assuming fixnums fit into ptrdiff_t etc.
6928 Don't assume fixnums fit into int.
6929 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
6930 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
6931 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
6932 (string_char_to_byte, string_byte_to_char)
6933 (string_make_multibyte, string_to_multibyte)
6934 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
6935 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
6936 (substring_both, Fdelete, internal_equal, Ffillarray)
6937 (Fclear_string, mapcar1)
6938 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
6939 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
6940 (larger_vector, make_hash_table, maybe_resize_hash_table)
6941 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
6942 (Fmaphash, secure_hash):
6943 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6944 (concat): Check for string index and length overflow.
6945 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
6947 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6948 (larger_vector): New API (vec, incr_min, size_max) replaces old
6949 one (vec, new_size, init). This catches size overflow.
6950 INIT was removed because it was always Qnil.
6951 All callers changed.
6952 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
6953 the upper bound on a hash table index size.
6954 (make_hash_table, maybe_resize_hash_table): Use it.
6955 (secure_hash): Computer start_byte and end_byte only after
6956 they're known to be in ptrdiff_t range.
6957 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
6958 (Ffont_get_glyphs, Ffont_at):
6959 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6960 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
6961 (Flist_fonts, Fopen_font):
6962 Don't assume fixnum can fit in int.
6963 (check_gstring): Don't assume index can fit in int.
6964 (font_match_p): Check that fixnum is a character, not a nonnegative
6965 fixnum, since the later code needs to stuff it into an int.
6966 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
6967 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
6968 conversion overflow issues.
6969 (Fopen_font): Check for integer out of range.
6970 (Ffont_get_glyphs): Don't assume index can fit in int.
6971 * font.h: Adjust decls to match defn changes elsewhere.
6972 * fontset.c (reorder_font_vector): Redo score calculation to avoid
6974 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
6975 printmax_t, where ptrdiff_t is wide enough.
6976 (Finternal_char_font):
6977 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6978 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
6979 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
6980 (Fset_frame_position, x_set_frame_parameters)
6981 (x_set_line_spacing, x_set_border_width)
6982 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
6983 Check that fixnums are in proper range for system types.
6984 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
6985 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6986 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
6987 Use SAFE_ALLOCA_LISP, not alloca.
6988 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
6989 intptr_t is wide enough.
6990 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
6991 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
6992 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
6993 Check for fixnum out of range.
6994 * ftfont.c (ftfont_list): Don't assume index fits in int.
6995 Check that fixnums are in proper range for system types.
6996 (ftfont_shape_by_flt):
6997 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6998 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
6999 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7000 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
7001 Check that fixnums are in proper range for system types.
7002 * gnutls.h: Adjust decls to match defn changes elsewhere.
7003 * gtkutil.c (xg_dialog_run):
7004 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7005 (update_frame_tool_bar):
7006 Check that fixnums are in proper range for system types.
7007 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
7008 (lookup_image): Check that fixnums are in range for system types.
7009 * indent.c (last_known_column, last_known_column_point):
7010 (current_column_bol_cache):
7011 (skip_invisible, current_column, check_display_width):
7012 (check_display_width, scan_for_column, current_column_1)
7013 (Findent_to, Fcurrent_indentation, position_indentation)
7014 (indented_beyond_p, Fmove_to_column, compute_motion):
7015 (Fcompute_motion, Fvertical_motion):
7016 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7017 (last_known_column_modified): Use EMACS_INT, not int.
7018 (check_display_width):
7020 Check that fixnums and floats are in proper range for system types.
7021 (compute_motion): Don't assume index or fixnum fits in int.
7022 (compute_motion, Fcompute_motion):
7023 Use int, not EMACS_INT, when it is wide enough.
7024 (vmotion): Omit local var start_hpos that is always 0; that way
7025 we don't need to worry about overflow in expressions involving it.
7026 * indent.h: Adjust decls to match defn changes elsewhere.
7028 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7029 Use int, not EMACS_INT, where int is wide enough.
7030 Remove unused members ovstring_chars_done and tab_offset;
7032 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
7033 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
7034 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
7035 (make_gap, copy_text, insert, insert_and_inherit)
7036 (insert_before_markers, insert_before_markers_and_inherit)
7037 (insert_1, count_combining_before, count_combining_after)
7038 (insert_1_both, insert_from_string)
7039 (insert_from_string_before_markers, insert_from_string_1)
7040 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
7041 (adjust_after_replace, adjust_after_insert, replace_range)
7042 (replace_range_2, del_range, del_range_1, del_range_byte)
7043 (del_range_both, del_range_2, modify_region)
7044 (prepare_to_modify_buffer, signal_before_change)
7045 (signal_after_change, Fcombine_after_change_execute):
7046 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7047 * intervals.c (traverse_intervals, rotate_right, rotate_left)
7048 (balance_an_interval, split_interval_right, split_interval_left)
7049 (find_interval, next_interval, update_interval)
7050 (adjust_intervals_for_insertion, delete_node, delete_interval)
7051 (interval_deletion_adjustment, adjust_intervals_for_deletion)
7052 (static_offset_intervals, offset_intervals)
7053 (merge_interval_right, merge_interval_left, make_new_interval)
7054 (graft_intervals_into_buffer, temp_set_point_both)
7055 (temp_set_point, set_point, adjust_for_invis_intang)
7056 (set_point_both, move_if_not_intangible, get_property_and_range)
7057 (get_local_map, copy_intervals, copy_intervals_to_string)
7058 (compare_string_intervals, set_intervals_multibyte_1):
7059 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7060 * intervals.h: Adjust decls to match defn changes elsewhere.
7062 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7063 * keyboard.c (this_command_key_count, this_single_command_key_start)
7064 (before_command_key_count, before_command_echo_length, echo_now)
7065 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
7066 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
7067 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
7068 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
7069 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7070 (last_non_minibuf_size, last_point_position, echo_truncate)
7071 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
7072 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
7073 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
7074 (stuff_buffered_input):
7075 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7076 (last_auto_save, command_loop_1, read_char):
7077 Use EMACS_INT, not int, to avoid integer overflow.
7078 (record_char): Avoid overflow in total_keys computation.
7079 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
7080 * keyboard.h: Adjust decls to match defn changes elsewhere.
7081 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
7082 (Fkey_description, Fdescribe_vector, Flookup_key):
7083 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7084 (click_position): New function, to check that positions are in range.
7085 (Fcurrent_active_maps):
7087 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7088 (Faccessible_keymaps, Fkey_description):
7089 (preferred_sequence_p):
7090 Don't assume fixnum can fit into int.
7091 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
7092 Check for integer overflow in size calculations.
7093 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
7094 avoid mishandling large integers.
7095 * lisp.h: Adjust decls to match defn changes elsewhere.
7096 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
7097 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
7098 (struct Lisp_Marker):
7099 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7100 (clip_to_bounds): Now an inline function, moved here from editfns.c.
7101 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
7102 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
7103 All callers changed.
7104 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
7105 Assume the arg has valid form, since it always does.
7106 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
7107 unsigned integer system type.
7108 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
7109 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
7110 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7111 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
7112 (duration_to_sec_usec): New decl.
7113 * lread.c (read_from_string_index, read_from_string_index_byte)
7114 (read_from_string_limit, readchar, unreadchar, openp)
7115 (read_internal_start, read1, oblookup):
7116 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7117 (Fload, readevalloop, Feval_buffer, Feval_region):
7118 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7119 (openp): Check for out-of-range argument to 'access'.
7120 (read1): Use int, not EMACS_INT, where int is wide enough.
7121 Don't assume fixnum fits into int.
7122 Fix off-by-one error that can read outside a buffer.
7123 (read_filtered_event): Use duration_to_sec_usec
7124 to do proper overflow checking on durations.
7125 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
7126 in size calculation.
7127 (Fexecute_kbd_macro):
7128 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7129 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
7130 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
7131 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
7132 (set_marker_both, set_marker_restricted_both, marker_position)
7133 (marker_byte_position, Fbuffer_has_markers_at):
7134 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7135 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
7136 * menu.c (ensure_menu_items): Rename from grow_menu_items.
7137 It now merely ensures that the menu is large enough, without
7138 necessarily growing it, as this avoids some integer overflow issues.
7139 All callers changed.
7140 (keymap_panes, parse_single_submenu, Fx_popup_menu):
7141 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7142 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
7143 Use SAFE_ALLOCA_LISP, not alloca.
7144 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
7145 to EMACS_INT. Check that fixnums are in proper range for system types.
7146 * minibuf.c (minibuf_prompt_width, string_to_object)
7147 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
7148 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
7149 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7150 (get_minibuffer, read_minibuf_unwind):
7151 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7152 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
7153 this simplifies overflow checking. All callers changed.
7154 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
7156 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7157 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
7158 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
7159 Check that fixnums are in proper range for system types.
7160 (Fx_create_frame, Fx_show_tip):
7161 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7162 * nsfont.m (ns_findfonts, nsfont_list_family):
7163 Don't assume fixnum fits in long.
7164 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
7165 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7166 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
7168 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
7169 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7170 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
7171 (PRINTDECLARE, PRINTPREPARE):
7172 (strout, print_string):
7173 (print, print_preprocess, print_check_string_charset_prop)
7175 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7177 (temp_output_buffer_setup, Fprin1_to_string, print_object):
7178 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7179 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
7180 (printchar, strout): Use xpalloc to catch size calculation overflow.
7181 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
7182 (print_error_message): Use SAFE_ALLOCA, not alloca.
7183 (print_object): Use int, not EMACS_INT, where int is wide enough.
7184 (print_depth, new_backquote_output, print_number_index):
7185 Use ptrdiff_t, not int, where int might not be wide enough.
7186 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
7187 (Fset_process_window_size, Fformat_network_address)
7188 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
7190 Check that fixnums are in proper range for system types.
7191 (Fsignal_process): Simplify by avoiding a goto.
7192 Check for process-ids out of pid_t range rather than relying on
7194 (process_tick, update_tick): Use EMACS_INT, not int.
7195 (Fformat_network_address, read_process_output, send_process)
7196 (Fprocess_send_region, status_notify):
7197 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7198 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
7199 (wait_reading_process_output, read_process_output, exec_sentinel):
7200 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7201 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
7202 (Faccept_process_output): Use duration_to_sec_usec to do proper
7203 overflow checking on durations.
7204 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
7205 Don't assume pid_t fits in int.
7206 * process.h (struct Lisp_Process): Members tick and update_tick
7207 are now of type EMACS_INT, not int.
7208 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
7209 configured --with-wide-int.
7210 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
7211 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
7212 * search.c (looking_at_1, string_match_1):
7213 (fast_string_match, fast_c_string_match_ignore_case)
7214 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
7215 (scan_newline, find_before_next_newline, search_command)
7216 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
7217 (set_search_regs, wordify):
7220 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7221 (string_match_1, search_buffer, set_search_regs):
7223 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7224 (wordify): Check for overflow in size calculation.
7225 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
7226 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
7227 Check that fixnums are in proper range for system types.
7228 * sound.c (struct sound_device)
7229 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
7230 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7231 (Fplay_sound_internal):
7232 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7233 * syntax.c (struct lisp_parse_state, find_start_modiff)
7234 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
7235 (Fparse_partial_sexp):
7236 Don't assume fixnums can fit in int.
7237 (struct lisp_parse_state, find_start_pos, find_start_value)
7238 (find_start_value_byte, find_start_begv)
7239 (update_syntax_table, char_quoted, dec_bytepos)
7240 (find_defun_start, prev_char_comend_first, back_comment):
7241 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
7242 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
7243 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7244 (Finternal_describe_syntax_value): Check that match_lisp is a
7245 character, not an integer, since the code stuffs it into int.
7246 (scan_words, scan_sexps_forward):
7247 Check that fixnums are in proper range for system types.
7249 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7250 (scan_sexps_forward):
7251 Use CHARACTERP, not INTEGERP, since the value must fit into int.
7252 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
7253 * syntax.h: Adjust decls to match defn changes elsewhere.
7254 (struct gl_state_s):
7255 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7256 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
7257 MOST_POSITIVE_FIXNUM.
7258 * sysdep.c (wait_for_termination_1, wait_for_termination)
7259 (interruptible_wait_for_termination, mkdir):
7260 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
7261 (emacs_read, emacs_write):
7262 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7263 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
7264 and double all fit in int.
7265 * term.c (set_tty_color_mode):
7266 Check that fixnums are in proper range for system types.
7267 * termhooks.h (struct input_event):
7268 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7269 * textprop.c (validate_interval_range, interval_of)
7270 (Fadd_text_properties, set_text_properties_1)
7271 (Fremove_text_properties, Fremove_list_of_text_properties)
7272 (Ftext_property_any, Ftext_property_not_all)
7273 (copy_text_properties, text_property_list, extend_property_ranges)
7274 (verify_interval_modification):
7275 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7276 (Fnext_single_char_property_change)
7277 (Fprevious_single_char_property_change):
7278 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7279 (copy_text_properties):
7280 Check for integer overflow in index calculation.
7281 * undo.c (last_boundary_position, record_point, record_insert)
7282 (record_delete, record_marker_adjustment, record_change)
7283 (record_property_change):
7284 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7285 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
7286 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7287 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
7288 (Fx_hide_tip, Fx_file_dialog):
7289 * w32menu.c (set_frame_menubar):
7290 Use ptrdiff_t, not int, for consistency with rest of code.
7291 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
7292 (select_window, Fdelete_other_windows_internal)
7293 (window_scroll_pixel_based, window_scroll_line_based)
7294 (Frecenter, Fset_window_configuration):
7295 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7296 (Fset_window_hscroll, run_window_configuration_change_hook)
7297 (set_window_buffer, temp_output_buffer_show, scroll_command)
7298 (Fscroll_other_window, Frecenter):
7299 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7300 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
7301 Don't assume fixnum fits in int.
7302 (Fset_window_scroll_bars):
7303 Check that fixnums are in proper range for system types.
7304 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
7305 (string_pos, c_string_pos, number_of_chars, init_iterator)
7306 (in_ellipses_for_invisible_text_p, init_from_display_pos)
7307 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
7308 (compute_display_string_end, handle_face_prop)
7309 (face_before_or_after_it_pos, handle_invisible_prop)
7310 (handle_display_prop, handle_display_spec, handle_single_display_spec)
7311 (display_prop_intangible_p, string_buffer_position_lim)
7312 (string_buffer_position, handle_composition_prop, load_overlay_strings)
7313 (get_overlay_strings_1, get_overlay_strings)
7314 (iterate_out_of_display_property, forward_to_next_line_start)
7315 (back_to_previous_visible_line_start, reseat, reseat_to_string)
7316 (get_next_display_element, set_iterator_to_next)
7317 (get_visually_first_element, compute_stop_pos_backwards)
7318 (handle_stop_backwards, next_element_from_buffer)
7319 (move_it_in_display_line_to, move_it_in_display_line)
7320 (move_it_to, move_it_vertically_backward, move_it_by_lines)
7321 (add_to_log, message_dolog, message_log_check_duplicate)
7322 (message2, message2_nolog, message3, message3_nolog
7323 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
7324 (current_message_1, truncate_echo_area, truncate_message_1)
7325 (set_message, set_message_1, store_mode_line_noprop)
7326 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
7327 (text_outside_line_unchanged_p, check_point_in_composition)
7328 (reconsider_clip_changes)
7329 (redisplay_internal, set_cursor_from_row, try_scrolling)
7330 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
7331 (redisplay_window, find_last_unchanged_at_beg_row)
7332 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
7333 (trailing_whitespace_p, find_row_edges, display_line)
7334 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
7335 (display_mode_element, store_mode_line_string)
7336 (pint2str, pint2hrstr, decode_mode_spec)
7337 (display_count_lines, display_string, draw_glyphs)
7338 (x_produce_glyphs, x_insert_glyphs)
7339 (rows_from_pos_range, mouse_face_from_buffer_pos)
7340 (fast_find_string_pos, mouse_face_from_string_pos)
7341 (note_mode_line_or_margin_highlight, note_mouse_highlight):
7342 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7343 (safe_call, init_from_display_pos, handle_fontified_prop)
7344 (handle_single_display_spec, load_overlay_strings)
7345 (with_echo_area_buffer, setup_echo_area_for_printing)
7346 (display_echo_area, echo_area_display)
7347 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
7348 (update_tool_bar, hscroll_window_tree, redisplay_internal)
7349 (redisplay_window, dump_glyph_row, display_mode_line)
7350 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
7351 (handle_display_spec, display_prop_string_p):
7352 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7353 (handle_single_display_spec, build_desired_tool_bar_string)
7354 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
7355 (get_specified_cursor_type):
7356 Check that fixnums are in proper range for system types.
7357 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
7358 (Flookup_image_map):
7359 Don't assume fixnums fit in int.
7360 (compare_overlay_entries):
7361 Avoid mishandling comparisons due to subtraction overflow.
7362 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
7363 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
7364 (handle_tool_bar_click):
7365 Use int, not unsigned, since we prefer signed and the signedness
7366 doesn't matter here.
7367 (get_next_display_element, next_element_from_display_vector):
7368 Use int, not EMACS_INT, when int is wide enough.
7369 (start_hourglass): Use duration_to_sec_usec to do proper
7370 overflow checking on durations.
7371 * xfaces.c (Fbitmap_spec_p):
7372 Check that fixnums are in proper range for system types.
7373 (compare_fonts_by_sort_order):
7374 Avoid mishandling comparisons due to subtraction overflow.
7375 (Fx_family_fonts, realize_basic_faces):
7376 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7378 Don't assume fixnum fits in int.
7379 Use SAFE_ALLOCA_LISP, not alloca.
7380 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
7381 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
7382 (face_at_buffer_position, face_for_overlay_string)
7383 (face_at_string_position):
7384 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7385 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
7386 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
7388 Check that fixnums are in proper range for system types.
7389 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
7390 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
7391 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7392 (Fx_change_window_property): Don't assume fixnums fit in int.
7393 * xfont.c (xfont_chars_supported):
7394 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7395 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
7396 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
7397 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7398 * xml.c (parse_region):
7399 * xrdb.c (magic_file_p):
7400 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7401 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
7402 (x_get_local_selection, x_reply_selection_request)
7403 (x_handle_selection_request, wait_for_property_change):
7404 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7405 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
7406 short is wide enough.
7407 (x_send_client_event): Don't assume fixnum fits in int.
7408 * xterm.c (x_x_to_emacs_modifiers):
7409 Don't assume EMACS_INT overflows nicely into int.
7410 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
7412 (handle_one_xevent): NATNUMP can eval its arg twice.
7413 (x_connection_closed):
7414 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7415 * xterm.h: Adjust decls to match defn changes elsewhere.
7416 (struct scroll_bar): Use struct vectorlike_header
7417 rather than rolling our own approximation.
7418 (SCROLL_BAR_VEC_SIZE): Remove; not used.
7420 2012-05-25 Glenn Morris <rgm@gnu.org>
7422 * lisp.mk (lisp): Update for more files being compiled now.
7424 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
7426 * lread.c: Remove `read_pure' which makes no difference.
7427 (read_pure): Remove var.
7428 (unreadpure): Remove function.
7429 (readevalloop): Don't call read_list with -1 flag.
7430 (read1, read_vector): Don't test read_pure any more.
7431 (read_list): Simplify.
7433 * fileio.c, character.h: Minor style tweaks.
7435 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
7437 * window.h (clip_changed): Remove useless declaration.
7439 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
7441 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
7442 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
7444 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
7447 This directory predates autoconf and is no longer needed nowadays.
7448 Move its few remaining bits of functionality to where they're needed.
7449 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
7450 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
7451 * m/template.h: Remove.
7452 * Makefile.in (M_FILE): Remove. All uses removed.
7453 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
7454 * lisp.h (USE_LSB_TAG):
7455 * mem-limits.h (EXCEEDS_LISP_PTR):
7456 Use VAL_MAX, not VALBITS, in #if.
7457 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
7458 (EMACS_UINT): Define unconditionally now.
7459 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
7460 (BITS_PER_EMACS_INT): New constants, replacing
7461 what used to be in config.h, but not useful in #if.
7462 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
7463 define them any more.
7464 (VAL_MAX): New macro.
7466 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
7467 BITS_PER_EMACS_INT, in #if.
7468 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
7469 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
7470 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
7471 * s/ms-w32.h (DATA_START):
7472 Move here from removed file m/intel386.h.
7473 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
7474 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
7476 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
7478 Assume C89 or later.
7479 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
7480 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
7482 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
7483 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
7484 * textprop.c, tparam.c (NULL): Remove.
7485 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
7486 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
7487 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
7488 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
7489 * xterm.c (input_signal_count): Assume volatile works.
7491 2012-05-21 Ken Brown <kbrown@cornell.edu>
7493 * xgselect.c (xg_select): Fix first argument in call to 'select'
7496 2012-05-20 Ken Brown <kbrown@cornell.edu>
7498 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
7499 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
7501 2012-05-19 Ken Brown <kbrown@cornell.edu>
7503 * xfns.c (x_in_use): Remove `static' qualifier.
7504 * xterm.h (x_in_use): Declare.
7505 * xgselect.c: Include xterm.h.
7506 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
7507 and `display_arg' (bug#9754).
7509 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
7511 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
7513 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
7514 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
7516 2012-05-18 Eli Zaretskii <eliz@gnu.org>
7518 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
7520 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
7521 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
7523 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
7524 reference to image_cache->refcount.
7525 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
7527 2012-05-17 Juri Linkov <juri@jurta.org>
7529 * search.c (Fword_search_regexp, Fword_search_backward)
7530 (Fword_search_forward, Fword_search_backward_lax)
7531 (Fword_search_forward_lax): Move functions to isearch.el
7532 (bug#10145, bug#11381).
7534 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
7536 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
7538 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
7540 * lread.c (init_obarray): Declare Qt and Qnil as special.
7542 2012-05-14 Glenn Morris <rgm@gnu.org>
7544 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
7545 Put "libexec" before "bin", for the sake of init_callproc_1.
7547 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
7549 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
7551 * unexaix.c: Port to more-recent AIX compilers.
7552 (report_error, report_error_1, make_hdr, copy_sym)
7553 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
7554 Make arguments const char *, not char *, to avoid violations of C
7555 standard and to fix some AIX warnings reported by Gilles Pion.
7557 2012-05-14 Eli Zaretskii <eliz@gnu.org>
7559 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
7560 already have overlays loaded.
7561 (handle_single_display_spec): Before returning without displaying
7562 fringe bitmap, synchronize the bidi iterator with the main display
7563 iterator, by calling iterate_out_of_display_property.
7564 (iterate_out_of_display_property): Detect buffer iteration by
7565 testing that it->string is a Lisp string.
7566 (get_next_display_element): When the current object is exhausted,
7567 and there's something on it->stack, call set_iterator_to_next to
7568 proceed with what's on the stack, instead of returning zero.
7569 (set_iterator_to_next): If called at the end of a Lisp string,
7570 proceed to consider_string_end without incrementing string
7571 position. Don't increment display vector index past the end of
7572 the display vector. (Bug#11417)
7573 (pos_visible_p): Don't report a position visible when move_it_to
7574 stopped at the last line of window, which happens to be scanned
7575 backwards by the bidi iteration. (Bug#11464)
7577 2012-05-14 Eli Zaretskii <eliz@gnu.org>
7579 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
7580 and right-margin display specs even if the spec is invalid or we
7581 are on a TTY, and thus unable to display on the fringes.
7582 That's because the text with the property will not be displayed anyway,
7583 so we need to signal to the caller that this is a "replacing"
7584 display spec. This fixes display when the spec is invalid or we
7587 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
7589 * unexaix.c (make_hdr): Fix typo in prototype.
7590 This bug broke the build on AIX. Problem reported by Gilles Pion.
7592 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
7594 * keyboard.c (kbd_buffer_get_event): Read special events also in
7595 batch mode. (Bug#11415)
7597 2012-05-12 Glenn Morris <rgm@gnu.org>
7599 * ns.mk: Update for ns_appbindir no longer having trailing "/".
7601 2012-05-12 Eli Zaretskii <eliz@gnu.org>
7603 * lisp.mk (lisp): Add newcomment.elc.
7605 2012-05-12 Glenn Morris <rgm@gnu.org>
7607 * Makefile.in (MKDIR_P): New, set by configure.
7608 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
7610 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
7612 Remove unused function hourglass_started.
7613 * dispextern.h (hourglass_started):
7614 * w32fns.c (hourglass_started):
7615 * xdisp.c (hourglass_started): Remove.
7617 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
7619 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
7620 Update dependencies.
7622 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
7624 * xgselect.c (xg_select): Put maxfds+1 into a var.
7625 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
7627 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
7629 2012-05-10 Dave Abrahams <dave@boostpro.com>
7631 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
7632 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
7634 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
7636 * dbusbind.c (xd_registered_buses): New internal Lisp object.
7637 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
7638 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
7639 Initialize xd_registered_buses.
7641 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
7643 Untag more efficiently if USE_LSB_TAG.
7644 This is based on a proposal by YAMAMOTO Mitsuharu in
7645 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
7646 For an admittedly artificial (nth 8000 longlist) benchmark on
7647 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
7648 Emacs's overall text size by 1%.
7649 * lisp.h (XUNTAG): New macro.
7650 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
7651 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
7652 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
7653 * eval.c (Fautoload):
7654 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
7655 * frame.h (XFRAME): Use XUNTAG.
7657 Port recent dbusbind.c changes to 32-bit --with-wide-int.
7658 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
7659 Remove unportable assumptions about print widths of types like
7661 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
7662 intptr_t when converting between pointer and integer, to avoid GCC
7663 warnings about wrong width.
7665 2012-05-09 Eli Zaretskii <eliz@gnu.org>
7667 * w32proc.c (new_child): Force Windows to reserve only 64KB of
7668 stack for each reader_thread, instead of defaulting to 8MB
7669 determined by the linker. This avoids failures in creating
7670 subprocesses on Windows 7, see the discussion in this thread:
7671 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
7673 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
7675 Fix up display of the *Minibuf-0* buffer in the mini window.
7676 * keyboard.c (read_char): Don't clear the echo area if there's no
7678 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
7679 contents of *Minibuf-0*) if there's no message displayed in its stead.
7681 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
7683 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
7686 2012-05-06 Chong Yidong <cyd@gnu.org>
7688 * lisp.mk (lisp): Update.
7690 2012-05-05 Jim Meyering <meyering@redhat.com>
7692 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
7694 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
7696 * data.c (PUT_ERROR): New macro.
7697 (syms_of_data): Use it. Add new error type `user-error'.
7698 * undo.c (user_error): New function.
7699 (Fprimitive_undo): Use it.
7700 * print.c (print_error_message): Adjust print style for `user-error'.
7701 * keyboard.c (user_error): New function.
7702 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
7704 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
7706 Do not limit current-time-string to years 1000..9999.
7707 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
7708 (Fcurrent_time_string): Support any year that is supported by the
7709 underlying localtime representation. Don't use asctime, as it
7710 has undefined behavior for years outside the range -999..9999.
7712 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
7714 Fix race conditions involving setenv, gmtime, localtime, asctime.
7715 Without this fix, interrupts could mess up code that uses these
7716 nonreentrant functions, since setting TZ invalidates existing
7717 tm_zone or tzname values, and since most of these functions return
7718 pointers to static storage.
7719 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
7720 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
7721 Grow the critical sections to include not just invoking
7722 localtime/gmtime, but also accessing these functions' results
7723 including their tm_zone values if any, and any related TZ setting.
7724 (format_time_string): Last arg is now struct tm *, not struct tm **,
7725 so that the struct tm is saved in the critical section.
7726 All callers changed. Simplify allocation of initial buffer, partly
7727 motivated by the fact that memory allocation needs to be outside
7728 the critical section.
7730 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
7732 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
7733 with RESET_INTERVAL.
7735 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7736 Remove duplicated buffer name initialization.
7738 2012-05-02 Jim Meyering <jim@meyering.net>
7740 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
7742 * xfns.c (x_window): Use xstrdup (Bug#11375).
7744 2012-05-02 Eli Zaretskii <eliz@gnu.org>
7746 * xdisp.c (pos_visible_p): If already at a newline from the
7747 display string before the 'while' loop, don't walk back the glyphs
7748 from it3.glyph_row. Solves assertion violation when the display
7749 string begins with a newline (egg.el). (Bug#11367)
7751 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
7753 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
7756 2012-05-01 Glenn Morris <rgm@gnu.org>
7758 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
7759 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
7760 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
7761 All were removed before 23.1.
7763 * dispnew.c: Remove HAVE_LIBNCURSES test;
7764 it is always true on relevant platforms.
7766 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
7767 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
7769 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
7771 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
7773 * .gdbinit (xpr): Remove checks for no longer existing misc types.
7774 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
7777 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
7779 Do not avoid creating empty evaporating overlays (Bug#9642).
7780 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
7781 That is, do not delete an evaporating overlay if it becomes
7782 empty after its bounds are adjusted to fit within its buffer.
7783 This fix caused other problems, and I'm reverting it until we get
7784 to the bottom of them.
7786 2012-04-27 Chong Yidong <cyd@gnu.org>
7788 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
7790 2012-04-27 Eli Zaretskii <eliz@gnu.org>
7792 * xdisp.c (pos_visible_p): If the window start position is beyond
7793 ZV, start the display from buffer beginning. Prevents assertion
7794 violation in init_iterator when the minibuffer window is scrolled
7797 * window.c (window_scroll_pixel_based): Likewise.
7799 2012-04-27 Chong Yidong <cyd@gnu.org>
7801 * keymap.c (where_is_internal): Doc fix (Bug#10872).
7803 2012-04-27 Glenn Morris <rgm@gnu.org>
7805 * fileio.c (Fcopy_file, Fset_file_selinux_context):
7806 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
7808 2012-04-27 Eli Zaretskii <eliz@gnu.org>
7810 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
7811 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
7813 2012-04-26 Eli Zaretskii <eliz@gnu.org>
7815 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
7816 display element, check also the underlying string or buffer
7817 character. (Bug#11341)
7819 * w32menu.c: Include w32heap.h.
7820 (add_menu_item): If the call to AppendMenuW (via
7821 unicode_append_menu) fails, disable Unicode menus only if we are
7822 running on Windows 9X/Me.
7824 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
7826 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
7827 (xgetint): Add missing shift for LSB tags.
7829 2012-04-24 Martin Rudalics <rudalics@gmx.at>
7831 * keyboard.c (read_char): Don't wipe echo area for select window
7832 events: These might get delayed via `mouse-autoselect-window'
7835 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
7837 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
7838 manipulation of :loaded-from data.
7840 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
7842 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
7843 now a cons (bug#11311).
7845 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
7847 Do not create empty overlays with the evaporate property (Bug#9642).
7848 * buffer.c (Fmove_overlay): Delete an evaporating overlay
7849 if it becomes empty after its bounds are adjusted to fit within
7850 its buffer. Without this fix, in a nonempty buffer (let ((o
7851 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
7852 yields an empty overlay that has the evaporate property, which is
7853 not supposed to happen.
7855 Fix minor GTK3 problems found by static checking.
7856 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7857 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7858 (struct _EmacsFixedClass, emacs_fixed_get_type):
7859 Move decls here from emacsgtkfixed.h, since they needn't be public.
7860 (emacs_fixed_get_type): Now static.
7861 (emacs_fixed_class_init): Omit unused local.
7862 (emacs_fixed_child_type): Remove; unused.
7863 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7864 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7865 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
7866 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
7867 (EMACS_FIXED_GET_CLASS): Remove; unused.
7868 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
7870 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
7871 Problem reported by Juanma Barranquero for Windows -Wunused-function.
7873 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7875 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
7876 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
7877 (__malloc_size_t, __malloc_ptrdiff_t):
7878 Remove. All uses removed, replaced by the definiens if needed,
7879 since we can assume C89 or better now.
7880 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
7881 (protect_malloc_state, align, get_contiguous_space)
7882 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
7883 (malloc_atfork_handler_child, malloc_enable_thread)
7884 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
7885 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
7886 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
7887 (special_realloc, _realloc_internal_nolock, _realloc_internal)
7888 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
7889 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
7890 Define using prototypes, not old style.
7891 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
7892 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
7893 (align): Don't assume that signed integer overflow wraps around.
7894 Omit unused local var.
7895 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
7896 (_free_internal_nolock, memalign, mallochook, reallochook):
7897 Omit no-longer-needed casts.
7898 (valloc): Use getpagesize, not __getpagesize.
7899 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
7900 (struct hdr): The 'magic' member is now size_t, not unsigned long.
7902 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
7904 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
7906 Move functions from C to Lisp. Make non-blocking method calls
7907 the default. Implement further D-Bus standard interfaces.
7909 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
7910 (QCdbus_request_name_allow_replacement)
7911 (QCdbus_request_name_replace_existing)
7912 (QCdbus_request_name_do_not_queue)
7913 (QCdbus_request_name_reply_primary_owner)
7914 (QCdbus_request_name_reply_in_queue)
7915 (QCdbus_request_name_reply_exists)
7916 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
7917 (QCdbus_registered_serial, QCdbus_registered_method)
7918 (QCdbus_registered_signal): New Lisp objects.
7919 (XD_DEBUG_MESSAGE): Use sizeof.
7920 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
7921 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
7922 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
7923 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
7924 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
7925 (xd_signature, xd_append_arg): Allow float for integer types.
7926 (xd_get_connection_references): New function.
7927 (xd_get_connection_address): Rename from xd_initialize.
7928 Return cached address.
7929 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
7930 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
7932 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
7933 Return number of refcounts.
7934 (Fdbus_get_unique_name): Make stronger parameter check.
7935 (Fdbus_message_internal): New defun.
7936 (Fdbus_call_method, Fdbus_call_method_asynchronously)
7937 (Fdbus_method_return_internal, Fdbus_method_error_internal)
7938 (Fdbus_send_signal, Fdbus_register_service)
7939 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
7940 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
7941 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
7942 (Vdbus_compiled_version, Vdbus_runtime_version)
7943 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
7944 (Vdbus_message_type_method_return, Vdbus_message_type_error)
7945 (Vdbus_message_type_signal): New defvars.
7946 (Vdbus_registered_buses, Vdbus_registered_objects_table):
7949 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7951 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
7952 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
7953 Do not assume ptrdiff_t is the same width as 'int'.
7955 * alloc.c: Handle unusual debugging option combinations.
7956 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
7957 since the two debugging options are incompatible.
7958 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
7960 (mem_init, mem_insert, mem_insert_fixup):
7961 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
7962 (NEED_MEM_INSERT): Remove; no longer needed.
7964 2012-04-22 Leo Liu <sdl.web@gmail.com>
7966 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
7968 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7970 * sysdep.c [__FreeBSD__]: Minor cleanups.
7971 (list_system_processes, system_process_attributes) [__FreeBSD__]:
7972 Use Emacs indenting style more consistently. Avoid some casts.
7973 Use 'double' consistently rather than mixing 'float' and 'double'.
7975 2012-04-21 Eduard Wiebe <usenet@pusto.de>
7977 * sysdep.c (list_system_processes, system_process_attributes):
7978 Add implementation for FreeBSD (Bug#5243).
7980 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
7982 * lisp.mk (lisp): Update.
7984 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
7986 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
7987 It is never used otherwise.
7989 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
7991 * print.c (print_preprocess): Only check print_depth if print-circle
7993 (print_object): Check for cycles even when print-circle is nil and
7994 print-gensym is t, but only check print_depth if print-circle is nil.
7996 2012-04-20 Chong Yidong <cyd@gnu.org>
7998 * process.c (wait_reading_process_output): If EIO occurs on a pty,
7999 set the status to "failed" and ensure that sentinel is run.
8001 2012-04-20 Glenn Morris <rgm@gnu.org>
8003 * process.c (Fset_process_inherit_coding_system_flag)
8004 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
8005 (Fmake_network_process, Fmake_serial_process): Doc fix.
8007 2012-04-20 Eli Zaretskii <eliz@gnu.org>
8009 * xdisp.c (string_buffer_position_lim): Limit starting position to
8011 (set_cursor_from_row): If called for a mode-line or header-line
8012 row, return zero immediately.
8013 (try_cursor_movement): If inside continuation line, don't back up
8014 farther than the first row after the header line, if any.
8015 Don't consider the header-line row as "partially visible", even if
8016 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
8018 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
8020 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
8023 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
8024 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
8026 configure: new option --enable-gcc-warnings (Bug#11207)
8027 * Makefile.in (C_WARNINGS_SWITCH): Remove.
8028 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
8029 (ALL_CFLAGS): Use new macros rather than old.
8030 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
8031 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
8032 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
8033 -Wunused-result, -Wunused-variable. This should go away once
8034 the Emacs and Gnulib regex code is merged.
8035 (xmalloc, xrealloc): Now static.
8037 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
8039 * dired.c (Fsystem_groups): Remove unused local.
8041 2012-04-17 Glenn Morris <rgm@gnu.org>
8043 * dired.c (Fsystem_users): Doc fix.
8045 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
8047 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
8048 (syms_of_dired): Add them.
8050 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
8052 Fix minor alloc.c problems found by static checking.
8053 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
8054 New extern decls, to avoid calling undeclared functions.
8055 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
8056 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
8057 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
8058 (NEED_MEM_INSERT): New macro.
8059 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
8060 Remove one incorrect comment and fix another.
8062 Fix minor ralloc.c problems found by static checking.
8063 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
8064 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
8065 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
8066 (r_alloc_sbrk): Now static.
8068 Improve ralloc.c interface checking.
8069 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
8070 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
8071 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
8072 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
8073 [REL_ALLOC]: ... to here, to check interface.
8074 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
8075 Remove decls. This fixes an "It stinks!".
8077 * alloc.c (which_symbols): Fix alignment issue / type clash.
8079 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
8081 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
8082 (struct Lisp_Misc_Any): Likewise.
8083 (struct Lisp_Free): Likewise.
8084 * alloc.c (union aligned_Lisp_Symbol): Define.
8085 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
8086 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
8087 (union aligned_Lisp_Misc): Define.
8088 (MARKER_BLOCK_SIZE, struct marker_block): Use union
8089 aligned_Lisp_Misc instead of union Lisp_Misc.
8090 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
8092 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
8094 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
8095 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
8096 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
8097 * s/netbsd.h, s/sol2-6.h:
8098 Remove definition of GC_MARK_STACK, since the default now works.
8099 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
8100 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
8101 no longer the default.
8102 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
8104 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
8106 * lread.c (lisp_file_lexically_bound_p):
8107 Fix hang at ";-*-\n" (bug#11238).
8109 2012-04-14 Eli Zaretskii <eliz@gnu.org>
8111 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
8112 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
8114 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
8116 * nsterm.m (constrainFrameRect): Always constrain when there is only
8117 one screen (Bug#10962).
8119 2012-04-13 Ken Brown <kbrown@cornell.edu>
8121 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
8123 2012-04-13 Reuben Thomas <rrt@sc3d.org>
8125 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
8127 2012-04-11 Daniel Colascione <dancol@dancol.org>
8129 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
8130 against is gone. It's better to use vfork now so that when Cygwin
8131 gains a new, working vfork, we use it automatically (bug#10398).
8133 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
8135 * window.c (save_window_save): Obey window-point-insertion-type.
8137 2012-04-11 Glenn Morris <rgm@gnu.org>
8139 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
8141 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
8143 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
8145 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
8147 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
8148 (force_quit_count): New var.
8149 (handle_interrupt): Use it.
8151 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
8153 * w32.c (w32_delayed_load): Record the full path of the library
8154 being loaded (bug#10424).
8156 2012-04-09 Glenn Morris <rgm@gnu.org>
8158 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
8159 not just in the obarray, before snarfing them. (Bug#11036)
8161 * Makefile.in ($(leimdir)/leim-list.el):
8162 Pass EMACS rather than BUILT_EMACS.
8164 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
8166 * process.c (make_process):
8167 * process.h: Add integer `gnutls_handshakes_tried' member to
8170 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
8171 Add convenience `GNUTLS_LOG2i' macro.
8173 * gnutls.c (gnutls_log_function2i): Convenience log function.
8174 (emacs_gnutls_read): Use new log functions,
8175 `gnutls_handshakes_tried' process member, and
8176 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
8177 attempts per process (connection).
8179 2012-04-09 Chong Yidong <cyd@gnu.org>
8181 * eval.c (Fuser_variable_p, user_variable_p_eh)
8182 (lisp_indirect_variable): Functions deleted.
8183 (Fdefvar): Caller changed.
8185 * callint.c (Finteractive, Fcall_interactively):
8186 * minibuf.c (Fread_variable): Callers changed.
8188 2012-04-09 Eli Zaretskii <eliz@gnu.org>
8190 * xdisp.c (set_cursor_from_row): If the display string appears in
8191 the buffer at position that is closer to point than the position
8192 after the display string, display the cursor on the first glyph of
8193 the display string. Fixes cursor display when a 'display' text
8194 property immediately follows invisible text. (Bug#11094)
8196 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
8198 composite.c: use 'double' consistently
8199 * composite.c (get_composition_id): Use 'double' consistently
8200 instead of converting 'float' to 'double' and vice versa; this is
8201 easier to understand and avoids a GCC warning.
8203 2012-04-09 Glenn Morris <rgm@gnu.org>
8205 * Makefile.in: Generate leim-list with bootstrap-emacs, in
8206 preparation for dumping it with emacs. (Bug#4789)
8207 (leimdir): New variable.
8208 ($(leimdir)/leim-list.el): New rule.
8209 (emacs$(EXEEXT)): Depend on leim-list.el.
8211 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
8212 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
8213 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
8215 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
8217 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
8220 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
8222 * xml.c (init_libxml2_functions) [WINDOWSNT]:
8223 Remove unused local variable.
8225 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
8227 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
8228 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
8229 (mark_memory): Mark Lisp_Objects only if pointers might hide in
8230 objects, as mark_maybe_pointer will catch them otherwise.
8231 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
8232 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
8234 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
8236 Fix typo that broke non-Windows builds.
8237 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
8239 2012-04-07 Eli Zaretskii <eliz@gnu.org>
8241 Support building on MS-Windows with libxml2.
8243 * makefile.w32-in (OBJ2): Add xml.$(O).
8244 (GLOBAL_SOURCES): Add xml.c.
8245 ($(BLD)/xml.$(O)): New dependency list.
8247 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
8248 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
8249 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
8250 [!WINDOWSNT]: New macros.
8251 (init_libxml2_functions, libxml2_loaded_p): New functions.
8252 (parse_region): Call fn_xmlCheckVersion instead of using the macro
8253 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
8254 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
8255 Calls xmlCleanupParser only if libxml2 was loaded (or statically
8257 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
8258 Call init_libxml2_functions before calling libxml2 functions.
8259 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
8261 * emacs.c: Don't include libxml/parser.h.
8262 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
8263 xmlCleanupParser directly.
8265 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
8267 2012-04-07 Eli Zaretskii <eliz@gnu.org>
8269 * indent.c (Fvertical_motion): If there is a display string at
8270 point, use it.vpos to compute how many lines to backtrack after
8271 move_it_to point. (Bug#11133)
8273 2012-04-06 Eli Zaretskii <eliz@gnu.org>
8275 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
8276 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
8277 about subtle differences between FETCH_CHAR* and STRING_CHAR*
8278 macros related to unification of CJK characters. For the details,
8279 see the discussion following the message here:
8280 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
8282 2012-04-04 Chong Yidong <cyd@gnu.org>
8284 * keyboard.c (Vdelayed_warnings_list): Doc fix.
8286 2012-04-01 Eli Zaretskii <eliz@gnu.org>
8288 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
8289 instead of alloca. (Bug#11138)
8291 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
8293 * w32menu.c (is_simple_dialog): Properly check lisp types.
8296 2012-03-31 Eli Zaretskii <eliz@gnu.org>
8298 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
8299 position we get to after a call to move_it_to fails the
8300 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
8301 only if we wind up in a string from display property. (Bug#11063)
8303 * window.c (Fdelete_other_windows_internal): Invalidate the row
8304 and column information about mouse highlight, so that redisplay
8305 restores it after reallocating the glyph matrices. (Bug#7464)
8307 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
8308 string comes from a `display' text property, use the buffer
8309 position of that property as if we actually saw that position in
8311 (move_it_by_lines): Remove the assertion that
8312 "it->current_x == 0 && it->hpos == 0" which can be legitimately
8313 violated when there's a before-string at the beginning of a line.
8316 2012-03-30 Eli Zaretskii <eliz@gnu.org>
8318 * xdisp.c (append_space_for_newline): If the default face was
8319 remapped, use the remapped face for the appended newline.
8320 (extend_face_to_end_of_line): Use the remapped default face for
8321 extending the face to the end of the line.
8322 (display_line): Call extend_face_to_end_of_line when the default
8323 face was remapped. (Bug#11068)
8325 2012-03-29 Eli Zaretskii <eliz@gnu.org>
8327 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
8329 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
8331 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
8333 2012-03-27 Glenn Morris <rgm@gnu.org>
8335 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
8338 2012-03-26 Kenichi Handa <handa@m17n.org>
8340 * dispextern.h (struct glyph): Fix previous change. Change the
8341 bit length of glyphless.ch to 25 (Bug#11082).
8343 2012-03-26 Chong Yidong <cyd@gnu.org>
8345 * keyboard.c (Vselection_inhibit_update_commands): New variable.
8346 (command_loop_1): Use it; inhibit selection update for
8347 handle-select-window too (Bug#8996).
8349 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
8351 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
8353 2012-03-25 Kenichi Handa <handa@m17n.org>
8355 * dispextern.h (struct glyph): Change the bit length of
8356 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
8358 2012-03-24 Eli Zaretskii <eliz@gnu.org>
8360 * s/ms-w32.h (tzname): Include time.h before redirecting to
8361 _tzname. Fixes the MSVC build. (Bug#9960)
8363 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
8365 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
8368 * xterm.c (XTread_socket): Only modify handling_signal if
8369 !SYNC_INPUT. (Bug#11080)
8371 2012-03-23 Eli Zaretskii <eliz@gnu.org>
8373 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
8374 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
8375 when fetching a multibyte character consumes more bytes than
8376 CHAR_BYTES returns, due to unification of CJK characters in
8377 string_char. (Bug#11073)
8379 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
8381 * process.c (wait_reading_process_output): Handle pty disconnect
8382 by refraining from sending oneself a SIGCHLD (bug#10933).
8384 2012-03-22 Chong Yidong <cyd@gnu.org>
8386 * dispextern.h (struct it): New member string_from_prefix_prop_p.
8388 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
8389 Mark string as coming from a prefix property.
8390 (handle_face_prop): Use default face for prefix strings (Bug#4281).
8391 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
8393 2012-03-21 Chong Yidong <cyd@gnu.org>
8395 * xfaces.c (Vface_remapping_alist): Doc fix.
8397 2012-03-20 Eli Zaretskii <eliz@gnu.org>
8399 * w32proc.c (Fw32_set_console_codepage)
8400 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
8403 2012-03-20 Chong Yidong <cyd@gnu.org>
8405 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
8406 to reflect default non-nil value of redisplay-dont-pause.
8408 2012-03-19 Kenichi Handa <handa@m17n.org>
8410 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
8411 it fit in a valid range (Bug#11003).
8413 2012-03-18 Eli Zaretskii <eliz@gnu.org>
8415 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
8416 that is not from display property, accept the row as a "cursor
8417 row" if one of the string's character has a non-nil `cursor'
8418 property. Fixes cursor positioning when there are newlines in
8419 overlay strings, e.g. in icomplete.el. (Bug#11035)
8421 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
8423 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
8425 2012-03-12 Chong Yidong <cyd@gnu.org>
8427 * eval.c (inhibit_lisp_code): Rename from
8428 inhibit_window_configuration_change_hook; move from window.c.
8430 * xfns.c (unwind_create_frame_1, Fx_create_frame):
8431 * window.c (run_window_configuration_change_hook)
8432 (syms_of_window): Callers changed.
8434 2012-03-11 Chong Yidong <cyd@gnu.org>
8436 * keymap.c (Fkey_description): Doc fix (Bug#9700).
8438 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
8440 2012-03-10 Chong Yidong <cyd@gnu.org>
8442 * frame.c (other_visible_frames): Don't assume the selected frame
8443 is visible (Bug#10955).
8445 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
8447 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
8449 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
8451 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
8452 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
8455 2012-03-03 Glenn Morris <rgm@gnu.org>
8457 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
8459 2012-03-02 Eli Zaretskii <eliz@gnu.org>
8461 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
8462 position past the first glyph_row that ends at ZV. (Bug#10902)
8463 (redisplay_window, next_element_from_string): Fix typos in
8465 (redisplay_window): Pass to move_it_vertically the margin in
8466 pixels, not in screen lines.
8468 2012-03-02 Glenn Morris <rgm@gnu.org>
8470 * buffer.c (buffer-list-update-hook): Doc fix.
8472 2012-02-29 Eli Zaretskii <eliz@gnu.org>
8474 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
8475 push_it before setting up the iterator for the first overlay
8476 string, even if we have an empty string loaded.
8477 (next_overlay_string): If there's an empty string on the iterator
8478 stack, pop the stack. (Bug#10903)
8480 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
8482 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
8483 Suggested by Stefan Monnier in
8484 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
8485 * alloc.c (widen_to_Lisp_Object): New static function.
8486 (mark_memory): Also mark Lisp_Objects by fetching pointer words
8487 and widening them to Lisp_Objects. This would work even if
8488 USE_LSB_TAG is defined and wide integers are used, which might
8489 happen in a future version of Emacs.
8491 2012-02-25 Chong Yidong <cyd@gnu.org>
8493 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
8496 * xselect.c (Fx_selection_exists_p): Doc fix.
8497 (x_clipboard_manager_save_all): Print an informative message
8498 before saving to clipboard manager.
8500 2012-02-24 Chong Yidong <cyd@gnu.org>
8502 * keyboard.c (process_special_events): Handle all X selection
8503 requests in kbd_buffer, not just the next one (Bug#8869).
8505 2012-02-23 Chong Yidong <cyd@gnu.org>
8507 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
8508 call when setting menu-bar-lines and tool-bar-lines parameters.
8509 (unwind_create_frame_1): New helper function.
8511 * window.c (inhibit_window_configuration_change_hook): New var.
8512 (run_window_configuration_change_hook): Obey it.
8513 (syms_of_window): Initialize it.
8515 2012-02-22 Chong Yidong <cyd@gnu.org>
8517 * xterm.c (x_draw_image_relief): Add missing type check for
8518 Vtool_bar_button_margin (Bug#10743).
8520 2012-02-21 Chong Yidong <cyd@gnu.org>
8522 * fileio.c (Vfile_name_handler_alist): Doc fix.
8524 * buffer.c (Fget_file_buffer): Protect against invalid file
8525 handler return value.
8527 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
8529 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
8530 when computing $valmask.
8532 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
8533 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
8534 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
8535 It's useless in that case, and it can cause problems on hosts
8536 that allocate halves of EMACS_INT values separately.
8537 Reported by Dan Horák. Diagnosed by Andreas Schwab in
8538 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
8539 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
8540 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
8541 it avoids undefined behavior on hosts where shifting right by more
8542 than the word width has undefined behavior.
8544 2012-02-19 Chong Yidong <cyd@gnu.org>
8546 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
8547 (Funhandled_file_name_directory, Ffile_name_as_directory)
8548 (Fdirectory_file_name, Fexpand_file_name)
8549 (Fsubstitute_in_file_name): Protect against invalid file handler
8550 return values (Bug#10845).
8552 2012-02-18 Eli Zaretskii <eliz@gnu.org>
8554 * .gdbinit (pitx): Fix incorrect references to fields of the
8557 2012-02-17 Chong Yidong <cyd@gnu.org>
8559 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
8561 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
8563 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
8564 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
8566 2012-02-15 Chong Yidong <cyd@gnu.org>
8568 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
8569 marked as special. Also, starting docstrings with * is obsolete.
8571 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
8573 * gnutls.c (emacs_gnutls_write): Fix last change.
8575 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
8577 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
8580 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
8582 * keymap.c (Fsingle_key_description): Handle char ranges.
8584 2012-02-12 Chong Yidong <cyd@gnu.org>
8586 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
8587 as that creates a dangerous corner case.
8589 * window.c (Fdelete_window_internal): Invalidate the mouse
8590 highlight (Bug#9904).
8592 2012-02-12 Glenn Morris <rgm@gnu.org>
8594 * xselect.c (Fx_own_selection_internal)
8595 (Fx_get_selection_internal, Fx_disown_selection_internal)
8596 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
8597 * nsselect.m (Fx_own_selection_internal)
8598 (Fx_disown_selection_internal, Fx_selection_exists_p)
8599 (Fx_selection_owner_p, Fx_get_selection_internal):
8600 Sync docs and argument specs with the xselect.c versions.
8602 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
8604 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
8606 2012-02-11 Eli Zaretskii <eliz@gnu.org>
8608 * w32select.c (Fx_selection_exists_p): Sync doc string and
8609 argument list with xselect.c. (Bug#10783)
8611 * w16select.c (Fx_selection_exists_p): Sync doc string and
8612 argument list with xselect.c. (Bug#10783)
8614 2012-02-10 Glenn Morris <rgm@gnu.org>
8616 * fns.c (Fsecure_hash): Doc fix.
8618 2012-02-09 Kenichi Handa <handa@m17n.org>
8620 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
8622 2012-02-07 Chong Yidong <cyd@gnu.org>
8624 * buffer.c (Fbuffer_local_variables)
8625 (buffer_lisp_local_variables): Handle unbound vars correctly;
8626 don't let Qunbound leak into Lisp.
8628 2012-02-07 Glenn Morris <rgm@gnu.org>
8630 * image.c (Fimagemagick_types): Doc fix.
8632 * image.c (imagemagick-render-type): Change it from a lisp object
8633 to an integer. Move the doc here from the lisp manual.
8634 Treat all values not equal to 0 the same.
8636 2012-02-06 Chong Yidong <cyd@gnu.org>
8638 * doc.c (store_function_docstring): Avoid applying docstring of
8639 alias to base function (Bug#2603).
8641 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
8643 * .gdbinit (pp1, pv1): Remove redundant defines.
8646 2012-02-04 Chong Yidong <cyd@gnu.org>
8648 * nsterm.m: Declare a global (Bug#10694).
8650 2012-02-04 Eli Zaretskii <eliz@gnu.org>
8652 * w32.c (get_emacs_configuration_options):
8653 Include --enable-checking, if specified, in the return value.
8655 2012-02-04 Martin Rudalics <rudalics@gmx.at>
8657 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
8658 after rounding frame sizes. (Bug#9723)
8660 2012-02-04 Eli Zaretskii <eliz@gnu.org>
8662 * keyboard.c (adjust_point_for_property): Don't position point
8663 before BEGV. (Bug#10696)
8665 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
8667 Handle overflow when computing char display width (Bug#9496).
8668 * character.c (char_width): Return EMACS_INT, not int.
8669 (char_width, c_string_width): Check for overflow when
8670 computing the width; this is possible now that individual
8671 characters can have unbounded width. Problem introduced
8672 by merge from Emacs 23 on 2012-01-19.
8674 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
8676 * dbusbind.c (Fdbus_register_method): Mention the return value
8677 :ignore in the docstring.
8679 2012-02-02 Glenn Morris <rgm@gnu.org>
8681 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
8683 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8684 Unconditionally set to t. (Bug#10673)
8685 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8686 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8687 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
8689 2012-02-02 Kenichi Handa <handa@m17n.org>
8691 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
8692 0, do not call append_composite_glyph.
8694 2012-02-02 Kenichi Handa <handa@m17n.org>
8696 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
8698 (x_produce_glyphs): If the component of a composition is a null
8699 string, set it->pixel_width to 1 to avoid zero-width glyph.
8701 2012-02-01 Eli Zaretskii <eliz@gnu.org>
8703 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
8704 first 2 arguments are identical. This makes inserting large
8705 output from a subprocess an order of magnitude faster on
8706 MS-Windows, where all sbrk'ed memory is always contiguous.
8708 2012-01-31 Glenn Morris <rgm@gnu.org>
8710 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8711 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8712 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
8714 2012-01-29 Glenn Morris <rgm@gnu.org>
8716 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
8718 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
8720 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
8722 2012-01-28 Chong Yidong <cyd@gnu.org>
8724 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
8726 2012-01-26 Chong Yidong <cyd@gnu.org>
8728 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
8730 * search.c (Fsearch_forward, Fsearch_backward): Document negative
8731 repeat counts (Bug#10507).
8733 2012-01-26 Glenn Morris <rgm@gnu.org>
8735 * lread.c (syms_of_lread): Doc fix.
8737 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
8739 * coding.c (encode_designation_at_bol): Change return value to
8742 2012-01-25 Chong Yidong <cyd@gnu.org>
8744 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
8746 2012-01-21 Chong Yidong <cyd@gnu.org>
8748 * floatfns.c (Fcopysign): Make the second argument non-optional,
8749 since nil is not allowed anyway.
8751 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
8753 * process.c (read_process_output): Use p instead of XPROCESS (proc).
8754 (send_process): Likewise.
8756 2012-01-19 Martin Rudalics <rudalics@gmx.at>
8758 * window.c (save_window_save, Fcurrent_window_configuration)
8759 (Vwindow_persistent_parameters): Do not use Qstate.
8760 Rewrite doc-strings.
8762 2012-01-19 Kenichi Handa <handa@m17n.org>
8764 * character.c (char_width): New function.
8765 (Fchar_width, c_string_width, lisp_string_width):
8766 Use char_width (Bug#9496).
8768 2012-01-16 Martin Rudalics <rudalics@gmx.at>
8770 * window.c (Vwindow_persistent_parameters): New variable.
8771 (Fset_window_configuration, save_window_save): Handle persistent
8774 2012-01-14 Eli Zaretskii <eliz@gnu.org>
8776 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
8777 thrashing the stack of the thread. (Bug#9087)
8779 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
8781 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
8783 2012-01-11 Eli Zaretskii <eliz@gnu.org>
8785 * xdisp.c (rows_from_pos_range): Handle the case where the
8786 highlight ends on a newline. (Bug#10464)
8787 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
8788 he end column for display of highlight that ends on a newline
8791 2012-01-11 Glenn Morris <rgm@gnu.org>
8793 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
8794 from load-path also when installation-directory is nil. (Bug#10208)
8796 2012-01-10 Glenn Morris <rgm@gnu.org>
8798 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
8800 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
8801 Update template values to be closer to their typical values these days.
8803 2012-01-09 Eli Zaretskii <eliz@gnu.org>
8805 * xdisp.c (rows_from_pos_range): Accept additional argument
8806 DISP_STRING, and accept any glyph in a row whose object is that
8807 string as eligible for mouse highlight. Fixes mouse highlight of
8808 display strings from overlays. (Bug#10464)
8810 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
8812 emacs: fix an auto-save permissions race condition (Bug#10400)
8813 * fileio.c (auto_saving_dir_umask): New static var.
8814 (Fmake_directory_internal): Use it.
8815 (do_auto_save_make_dir): Set it, instead of invoking chmod after
8816 creating the directory. The old code temporarily assigns
8817 too-generous permissions to the directory.
8818 (do_auto_save_eh): Clear it.
8819 (Fdo_auto_save): Catch all errors, not just file errors, so
8820 that the var is always cleared.
8822 2012-01-07 Eli Zaretskii <eliz@gnu.org>
8824 * search.c (scan_buffer): Pass character positions to
8825 know_region_cache, not byte positions. (Bug#6540)
8827 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
8829 * w32.c (sys_rename): Report EXDEV when rename of a directory
8830 fails because the target is on another logical disk. (Bug#10284)
8832 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
8834 * xterm.c (x_embed_request_focus): New function.
8836 * xterm.h: Add prototype.
8838 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
8840 2012-01-05 Glenn Morris <rgm@gnu.org>
8842 * emacs.c (emacs_copyright): Update short copyright year to 2012.
8844 2012-01-01 Eli Zaretskii <eliz@gnu.org>
8846 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
8847 Load gnutls_transport_set_lowat only if GnuTLS version is below
8849 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
8850 GnuTLS versions below 2.11.1.
8852 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
8854 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
8855 to the doc string advising against its use for altering the way
8856 windows are scrolled.
8858 2011-12-28 Kenichi Handa <handa@m17n.org>
8860 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
8861 coding-system ASCII compatible only when it does not produce BOM
8862 on encoding (Bug#10383).
8864 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
8866 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
8868 (create_and_show_popup_menu): Always use menu_position_func for
8871 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
8873 * callint.c (Fcall_interactively): Don't truncate prompt string.
8875 2011-12-23 Eli Zaretskii <eliz@gnu.org>
8877 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
8878 property that ends at ZV, so that the bidi iteration could be
8879 resumed from there (after widening). (Bug#10360)
8881 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
8883 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
8885 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
8887 * nsterm.m (x_free_frame_resources):
8888 Release f->output_data.ns->miniimage.
8889 (ns_index_color): Fix indentation. Do not retain
8890 color_table->colors[i].
8892 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
8895 * nsfns.m (x_set_background_color): Assign return value from
8896 ns_index_color to face-background instead of NSColor*.
8897 (ns_implicitly_set_icon_type): Fix indentation.
8898 Change assignment in for loop to comparison.
8900 * emacs.c (ns_pool): New variable.
8901 (main): Assign ns_pool.
8902 (Fkill_emacs): Call ns_release_autorelease_pool.
8904 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
8905 autorelease fdesc, release fdAttrs and tdict.
8906 (ns_get_covering_families): Release charset.
8907 (ns_findfonts): Release NSFontDescriptor created with new.
8908 (ns_uni_to_glyphs): Fix indentation.
8909 (setString): Release attrStr before assigning new value.
8911 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8913 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
8915 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
8916 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
8918 2011-12-18 David Reitter <reitter@cmu.edu>
8920 * nsterm.m (ns_term_init): Subscribe for notifications
8921 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
8922 to method trackingNotification in EmacsMenu.
8924 * nsmenu.m (trackingMenu): New variable.
8925 (trackingNotification): New method (from Aquamacs).
8926 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
8927 from Aquamacs (Bug#7030).
8929 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8931 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
8932 (symbol_to_nsstring): Fix indentation.
8933 (ns_symbol_to_pb): New function.
8934 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
8935 (Fns_rotate_cut_buffers_internal): Remove.
8936 (Fns_store_selection_internal): Rename from
8937 Fns_store_cut_buffer_internal.
8938 (ns_get_foreign_selection, Fx_own_selection_internal)
8939 (Fx_disown_selection_internal, Fx_selection_exists_p)
8940 (Fns_get_selection_internal, Fns_store_selection_internal):
8941 Use ns_symbol_to_pb and check if return value is nil.
8942 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
8943 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
8944 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
8945 renamed to Sns_store_selection_internal.
8946 (ns_handle_selection_request): Move code to Fx_own_selection_internal
8947 and remove this function.
8948 (ns_handle_selection_clear): Remove, never used.
8949 (Fx_own_selection_internal): Move code from ns_handle_selection_request
8952 2011-12-17 Ken Brown <kbrown@cornell.edu>
8954 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
8955 GID is unknown (Bug#10257).
8957 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
8959 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
8960 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
8961 which caused a build failure on GNU/Linux IA-64. This problem was
8962 introduced by my 2011-10-07 patch.
8964 2011-12-15 Juri Linkov <juri@jurta.org>
8966 * image.c (imagemagick_error): New function. (Bug#10112)
8967 (imagemagick_load_image): Comment out `MagickSetResolution' call.
8968 Use `imagemagick_error' where ImageMagick functions return
8970 (Fimagemagick_types): Add `Fnreverse' to return the list in the
8973 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8975 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
8976 fill background (Bug#8992).
8978 2011-12-13 Martin Rudalics <rudalics@gmx.at>
8980 * window.c (Vwindow_combination_resize)
8981 (Vwindow_combination_limit): Use t instead of non-nil in
8983 (Vrecenter_redisplay): Add first sentence of doc-string on
8985 (Frecenter): Fix doc-string typo.
8987 2011-12-11 Kenichi Handa <handa@m17n.org>
8989 * coding.c (Funencodable_char_position): Pay attention to the
8990 buffer text relocation (Bug#9389).
8992 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
8994 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
8995 gtk_init (Bug#10100).
8997 2011-12-10 Eli Zaretskii <eliz@gnu.org>
8999 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
9000 IT->string is nil. (Bug#10263)
9002 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
9004 * nsterm.h (x_free_frame_resources): Declare.
9006 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
9007 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
9009 * nsterm.h (ns_get_defaults_value): Declare.
9011 * nsterm.m (ns_default): Call ns_get_defaults_value.
9013 2011-12-09 Eli Zaretskii <eliz@gnu.org>
9015 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
9018 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9020 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
9021 that where the value of an _OBJC_* symbol points to is in the .bss
9022 section (Bug#10240).
9024 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9026 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
9027 after the loop to call ccl_driver at least once (Bug#8619).
9029 2011-12-08 Kenichi Handa <handa@m17n.org>
9031 * ftfont.c (get_adstyle_property): Fix previous change
9034 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
9036 * w32.c (init_environment): If no_site_lisp, remove site-lisp
9037 dirs from the default value of EMACSLOADPATH (bug#10208).
9039 2011-12-07 Glenn Morris <rgm@gnu.org>
9041 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
9042 installation and source directories as well. (Bug#10208)
9044 2011-12-06 Chong Yidong <cyd@gnu.org>
9046 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
9048 2011-12-06 Glenn Morris <rgm@gnu.org>
9050 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
9051 as an error, not just -1. (Bug#10217)
9053 2011-12-05 Chong Yidong <cyd@gnu.org>
9055 * keyboard.c (process_special_events): New function.
9056 (swallow_events, Finput_pending_p): Use it (Bug#10195).
9058 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
9060 * coding.c (encode_designation_at_bol): Don't use uninitialized
9061 local variable (Bug#9318).
9063 2011-12-05 Kenichi Handa <handa@m17n.org>
9065 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
9066 return Qnil (Bug#8046, Bug#10193).
9068 2011-12-05 Kenichi Handa <handa@m17n.org>
9070 * coding.c (encode_designation_at_bol): New args charbuf_end and
9071 dst. Return the number of produced bytes. Callers changed.
9072 (coding_set_source): Return how many bytes coding->source was
9074 (coding_set_destination): Return how many bytes
9075 coding->destination was relocated.
9076 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
9077 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
9079 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9081 * coding.c (CODING_CHAR_CHARSET_P): New macro.
9082 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
9085 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
9087 The following changes are to fix Bug#9318.
9089 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
9090 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
9091 (encode_coding_iso_2022, encode_coding_sjis)
9092 (encode_coding_big5, encode_coding_charset): Use the above macros.
9094 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
9096 * lisp.h (process_quit_flag): Fix external declaration.
9098 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9100 Don't macro-inline non-performance-critical code.
9101 * eval.c (process_quit_flag): New function.
9102 * lisp.h (QUIT): Use it.
9104 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
9106 * nsfns.m (get_geometry_from_preferences): New function.
9107 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
9109 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
9111 * emacs.c (Qkill_emacs): Define.
9112 (syms_of_emacs): Initialize it.
9113 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
9114 Qquit_flag to `kill-emacs' instead.
9115 (quit_throw_to_read_char): Add parameter `from_signal'.
9116 All callers changed. Call Fkill_emacs if requested and safe.
9117 * lisp.h (QUIT): Call Fkill_emacs if requested.
9119 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
9121 * widget.c (update_wm_hints): Return if wmshell is null.
9122 (widget_update_wm_size_hints): New function.
9124 * widget.h (widget_update_wm_size_hints): Declare.
9126 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
9127 widget_update_wm_size_hints (Bug#10104).
9129 2011-12-03 Eli Zaretskii <eliz@gnu.org>
9131 * xdisp.c (handle_invisible_prop): If the invisible text ends just
9132 before a newline, prepare the bidi iterator for consuming the
9133 newline, and keep the current paragraph direction. (Bug#10183)
9134 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9136 2011-12-02 Juri Linkov <juri@jurta.org>
9138 * search.c (Fword_search_regexp): New Lisp function created from
9139 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
9140 (Fword_search_backward, Fword_search_forward)
9141 (Fword_search_backward_lax, Fword_search_forward_lax):
9142 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
9143 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
9145 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
9147 * fileio.c (Finsert_file_contents): Move after-change-function call
9148 to before the "handled:" label, since all "goto handled" appear in
9149 cases where the *-change-functions have already been properly called
9152 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
9154 * keyboard.c (interrupt_signal): Don't call kill-emacs when
9155 waiting for input. (Bug#10169)
9157 2011-11-30 Eli Zaretskii <eliz@gnu.org>
9159 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
9160 verifies glyph row's hash code--we have just reallocated the
9161 glyphs, so their contents can be complete garbage. (Bug#10164)
9163 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
9165 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
9167 2011-11-30 Eli Zaretskii <eliz@gnu.org>
9169 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
9170 attributes are tested _before_ calling verify_row_hash, to protect
9171 against GCC re-ordering of the tests. (Bug#10164)
9173 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
9175 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
9177 * xterm.c (handle_one_xevent): Only set async_visible and friends
9178 if net_wm_state_hidden_seen is non-zero (Bug#10002)
9179 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
9180 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
9182 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
9184 Remove GCPRO-related macros that exist only to avoid shadowing locals.
9185 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
9186 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
9187 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
9188 All uses changed to use GCPRO1 etc.
9189 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
9190 Revert to old implementation (i.e., before 2011-03-11).
9192 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9194 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
9195 of scroll runs so as to avoid assigning disabled bogus rows and
9196 unnecessary graphics copy operations.
9198 2011-11-27 Eli Zaretskii <eliz@gnu.org>
9200 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
9201 (snprintf) [_MSC_VER]: Redirect to _snprintf.
9202 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
9203 (malloc, free, realloc, calloc): Redirect to e_* only when
9206 * lisp.h (GCTYPEBITS): Move before first use.
9207 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
9208 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
9209 this macro definition.
9211 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
9214 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
9216 * gtkutil.c (xg_create_frame_widgets):
9217 Call gtk_window_set_has_resize_grip (FALSE) if that function is
9218 present with Gtk+ 2.0.
9220 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
9222 * fileio.c (Finsert_file_contents): Undo previous change; see
9223 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
9225 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
9227 Rename locals to avoid shadowing.
9228 * fileio.c (Finsert_file_contents):
9229 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
9230 * process.c (wait_reading_process_output):
9231 Rename inner 'proc' to 'p' to avoid shadowing.
9232 Indent for consistency with usual Emacs style.
9234 2011-11-25 Eli Zaretskii <eliz@gnu.org>
9236 * xdisp.c (redisplay_window): If cursor row is not fully visible
9237 after recentering, and scroll-conservatively is set to a large
9238 number, scroll window by a few more lines to make the cursor fully
9239 visible and out of scroll-margin. (Bug#10105)
9240 (start_display): Don't move to the next line if the display should
9241 start at a newline that is part of a display vector or an overlay
9244 2011-11-24 Juri Linkov <juri@jurta.org>
9246 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
9247 after the `MagickPingImage' call. (Bug#10112)
9249 2011-11-23 Chong Yidong <cyd@gnu.org>
9251 * window.c (Fcoordinates_in_window_p): Accept only live windows.
9253 2011-11-23 Martin Rudalics <rudalics@gmx.at>
9255 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
9256 making another buffer current. (Bug#10114)
9258 2011-11-23 Glenn Morris <rgm@gnu.org>
9260 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
9262 2011-11-23 Chong Yidong <cyd@gnu.org>
9264 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
9265 using it (Bug#5984).
9267 2011-11-22 Eli Zaretskii <eliz@gnu.org>
9269 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
9270 and header-lines, as they don't have one computed for them.
9273 * .gdbinit (prow): Make displayed values more self-explaining.
9274 Add row's hash code.
9276 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
9278 * process.c (wait_reading_process_output): Fix asynchrounous
9279 GnuTLS socket handling on some versions of the GnuTLS library.
9280 (wait_reading_process_output): Add comment and URL.
9282 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
9284 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
9286 2011-11-21 Chong Yidong <cyd@gnu.org>
9288 * window.c (Fnext_window, Fprevious_window): Doc fix.
9290 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
9292 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
9294 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
9296 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
9298 2011-11-20 Martin Rudalics <rudalics@gmx.at>
9300 * window.c (Fset_window_combination_limit): Rename argument
9302 (Vwindow_combination_limit): Remove "status" from doc-string.
9304 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
9306 * m/ibms390.h: Remove.
9307 * m/ibms390x.h: Don't include "ibms390.h".
9309 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
9311 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
9312 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
9314 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
9316 * casetab.c (Fset_case_table):
9317 * charset.c (Fcharset_after): Fix typos.
9319 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
9321 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
9322 Otherwise, valgrind does not work on some platforms.
9323 Problem reported by Andreas Schwab in
9324 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
9325 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
9326 is set, removing the need for VIRT_ADDRESS_VARIES.
9327 (PURE_P): Use a more-efficient implementation that needs just one
9328 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
9329 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
9330 to 4 (xorl, subq, cmpq, setbe).
9331 * alloc.c (pure): Always extern now, since that's the
9332 VIRT_ADDR_VARIES behavior.
9333 (PURE_POINTER_P): Use a single comparison, not two, for
9334 consistency with the new puresize.h.
9335 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
9336 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
9337 Remove VIRT_ADDR_VARIES no longer needed.
9339 2011-11-19 Eli Zaretskii <eliz@gnu.org>
9341 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
9342 (erase_phys_cursor, update_window_cursor, show_mouse_face)
9343 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
9344 behave as if the cursor position were at the window margin.
9346 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
9347 and the cursor position is out of bounds, behave as if the cursor
9348 position were at the window margin. (Bug#10075)
9350 2011-11-18 Chong Yidong <cyd@gnu.org>
9352 * window.c (Fwindow_combination_limit): Make first argument
9353 non-optional, since it is meaningless for live windows like the
9356 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
9358 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
9360 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
9362 * intervals.c: Fix grafting over the whole buffer (bug#10071).
9363 (graft_intervals_into_buffer): Simplify.
9365 2011-11-18 Eli Zaretskii <eliz@gnu.org>
9367 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
9368 hash values of the two rows.
9369 (copy_row_except_pointers): Preserve the used[] arrays and the
9370 hash values of the two rows. (Bug#10035)
9371 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
9373 * xdisp.c (row_hash): New function, body extracted from
9374 compute_line_metrics.
9375 (compute_line_metrics): Call row_hash, instead of computing the
9378 * dispnew.c (verify_row_hash): Call row_hash for computing the
9379 hash code of a row, instead of duplicating code from xdisp.c.
9381 * dispextern.h (row_hash): Add prototype.
9383 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
9385 * frame.c (delete_frame): Don't delete the terminal when the last
9386 X frame is closed if emacs is built with GTK toolkit.
9388 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
9390 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
9392 2011-11-17 Martin Rudalics <rudalics@gmx.at>
9394 * window.c (Vwindow_splits): Rename to
9395 Vwindow_combination_resize. Suggested by Juri Linkov.
9396 (Fsplit_window_internal): Use Vwindow_combination_resize instead
9399 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
9401 * nsfns.m (Fns_font_name):
9402 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
9404 2011-11-16 Martin Rudalics <rudalics@gmx.at>
9406 * window.h (window): Rename slot "nest" to "combination_limit".
9407 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
9408 (Fset_window_nest): Rename to Fset_window_combination_limit.
9409 (Vwindow_nest): Rename to Vwindow_combination_limit.
9410 (recombine_windows, make_parent_window, make_window)
9411 (Fsplit_window_internal, saved_window)
9412 (Fset_window_configuration, save_window_save): Rename all
9413 occurrences of window_nest to window_combination_limit.
9415 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
9417 * image.c (imagemagick_load_image): Fix typo.
9419 2011-11-14 Eli Zaretskii <eliz@gnu.org>
9421 * xdisp.c (display_line): Move the call to
9422 highlight_trailing_whitespace before the call to
9423 compute_line_metrics, since the latter needs to see the final
9424 faces of all the glyphs to compute ROW's hash value.
9425 Fixes assertion violations in row_equal_p. (Bug#10035)
9427 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
9429 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
9430 just return (bug#10044).
9432 2011-11-12 Eli Zaretskii <eliz@gnu.org>
9434 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
9435 with user-defined heap size. Bump the default size of the temacs
9436 heap to 27MB, to avoid memory warning when running temacs.
9437 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
9439 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
9440 current_matrix and desired_matrix. (Bug#9990)
9441 (verify_row_hash) [XASSERTS]: New function.
9442 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
9443 that the hash value of glyph rows is correct.
9445 2011-11-12 Martin Rudalics <rudalics@gmx.at>
9447 * window.h (window): Remove splits slot.
9448 * window.c (Fwindow_splits, Fset_window_splits): Remove.
9449 (Fdelete_other_windows_internal, make_parent_window)
9450 (make_window, Fsplit_window_internal, Fdelete_window_internal)
9451 (Fset_window_configuration, save_window_save): Don't deal with
9452 split status of windows.
9453 (saved_window): Remove splits slot.
9454 (Vwindow_splits): Rewrite doc-string.
9456 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
9458 * xfns.c (unwind_create_frame):
9459 * nsfns.m (unwind_create_frame):
9460 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
9461 Vframe_list (Bug#9999).
9463 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
9465 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
9467 2011-11-11 Kenichi Handa <handa@m17n.org>
9469 * callproc.c (Fcall_process): Set the member dst_multibyte of
9472 2011-11-11 Johan Bockgård <bojohan@gnu.org>
9474 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
9475 avoid a crash (bug#9496).
9477 2011-11-09 Chong Yidong <cyd@gnu.org>
9479 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
9480 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
9482 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
9484 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
9486 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
9488 Avoid some portability problems by eschewing 'extern inline' functions.
9489 The trivial performance wins aren't worth the portability hassles; see
9490 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
9492 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
9493 (window_box_width, window_box_left, window_box_left_offset)
9494 (window_box_right, window_box_right_offset): Undo previous change,
9495 by removing the "extern"s.
9496 * intervals.c (adjust_intervals_for_insertion)
9497 (adjust_intervals_for_deletion): Undo previous change,
9498 making these static again.
9499 (offset_intervals, temp_set_point_both, temp_set_point)
9500 (copy_intervals_to_string): No longer inline.
9501 * xdisp.c (window_text_bottom_y, window_box_width)
9502 (window_box_height, window_box_left_offset)
9503 (window_box_right_offset, window_box_left, window_box_right)
9504 (window_box): No longer inline.
9506 2011-11-08 Chong Yidong <cyd@gnu.org>
9508 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
9509 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
9510 Signal an error if not a live window.
9511 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
9512 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
9514 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
9516 * lisp.h (syms_of_abbrev): Remove declaration.
9517 Reported by CHENG Gao <chenggao@royau.me>.
9519 2011-11-07 Eli Zaretskii <eliz@gnu.org>
9521 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
9522 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
9523 of temacs in GUI mode.
9525 2011-11-07 Martin Rudalics <rudalics@gmx.at>
9527 * window.h: Declare delete_all_child_windows instead of
9528 delete_all_subwindows.
9529 * window.c (Fwindow_nest, Fset_window_nest)
9530 (Fset_window_new_total, Fset_window_new_normal)
9531 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
9532 (delete_all_subwindows): Rename to delete_all_child_windows.
9533 (Fdelete_other_windows_internal, Fset_window_configuration):
9534 Call delete_all_child_windows instead of delete_all_subwindows.
9535 * frame.c (delete_frame): Call delete_all_child_windows instead
9536 of delete_all_subwindows.
9538 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
9540 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
9541 This is also needed for porting to any host where GC_MARK_STACK is
9542 not GC_MAKE_GCPROS_NOOPS.
9543 (which_symbols): Use it.
9545 2011-11-07 Kenichi Handa <handa@m17n.org>
9547 * coding.c (coding_set_destination): Check coding->src_pos only
9548 when coding->src_object is a buffer (bug#9910).
9550 * process.c (send_process): Set the member src_multibyte of coding
9551 to 0 (bug#9911) when sending a unibyte text.
9553 * callproc.c (Fcall_process): Set the member src_multibyte of
9554 process_coding to 0 (bug#9912).
9556 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9558 * xmenu.c (cleanup_widget_value_tree): New function.
9559 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
9560 calling free_menubar_widget_value_tree directly (Bug#9830).
9562 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
9564 Fix some portability problems with 'inline'.
9565 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
9566 (window_box_width, window_box_left, window_box_left_offset)
9567 (window_box_right, window_box_right_offset): Declare extern.
9568 Otherwise, these inline functions do not conform to C99 and
9569 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
9570 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
9571 * intervals.c (adjust_intervals_for_insertion)
9572 (adjust_intervals_for_deletion): Now extern, because otherwise the
9573 extern inline functions 'offset_intervals' couldn't refer to it.
9574 (static_offset_intervals): Remove.
9575 (offset_intervals): Rewrite using the old contents of
9576 static_offset_intervals. The old version didn't conform to C99
9577 because an extern inline function contained a reference to an
9578 identifier with static linkage.
9580 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
9582 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
9585 2011-11-06 Eli Zaretskii <eliz@gnu.org>
9587 * xdisp.c (init_iterator, reseat_to_string): Don't set the
9588 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
9589 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
9590 return Qleft_to_right.
9592 2011-11-06 Chong Yidong <cyd@gnu.org>
9594 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
9595 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
9596 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
9597 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
9598 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
9599 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
9600 (Fwindow_vscroll): Doc fix.
9601 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
9602 argument, since it makes no sense to pass a live window and for
9603 consistency with window-child.
9605 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
9607 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
9610 2011-11-05 Jason Rumney <jasonr@gnu.org>
9612 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
9613 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
9615 (add_font_entity_to_list): Fix logic errors in mixed boolean and
9616 bitwise arithmetic preventing use of unicode-sip and non-truetype
9619 2011-11-05 Eli Zaretskii <eliz@gnu.org>
9621 * s/ms-w32.h (fstat, stat, utime): Move redirections to
9624 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
9625 initialization code to keep similarity to xfns.c after changes
9628 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
9630 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
9631 (unwind_create_frame): New function (Bug#9943).
9632 (Fx_create_frame): Restructure code to be more similar to the one in
9633 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
9634 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
9635 Move terminal->reference_count++ just before making the frame official
9638 * nsterm.m (x_free_frame_resources): New function.
9639 (x_destroy_window): Move code to x_free_frame_resources.
9641 * xfns.c (unwind_create_frame): Fix comment.
9642 (Fx_create_frame, x_create_tip_frame):
9643 Move terminal->reference_count++ just before making the frame
9644 official. Move initialization of image_cache_refcount and
9645 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
9647 2011-11-05 Eli Zaretskii <eliz@gnu.org>
9649 Support MSVC build with newer versions of Visual Studio.
9650 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
9651 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
9654 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
9655 which are not supported by MSVC.
9656 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
9657 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
9659 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
9661 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
9663 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
9665 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
9667 Support MSVC build with newer versions of Visual Studio.
9668 * w32.c: Don't include w32api.h for MSVC.
9669 (init_environment) [_MSC_VER]: Call sys_access, not _access.
9671 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
9672 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
9673 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
9674 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
9676 (alloca) [_MSC_VER]: Define to _alloca.
9678 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
9680 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
9682 2011-11-04 Eli Zaretskii <eliz@gnu.org>
9684 * xdisp.c (note_mouse_highlight): If either of
9685 previous/next-single-property-change returns nil, treat that as
9686 the beginning or the end of the buffer. (Bug#9955)
9688 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
9690 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
9691 label is not null (Bug#9951).
9692 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
9695 2011-11-04 Eli Zaretskii <eliz@gnu.org>
9697 * window.c (Fwindow_body_size): Mention in the doc string that the
9698 return value is in frame's canonical units. (Bug#9949)
9700 2011-11-03 Eli Zaretskii <eliz@gnu.org>
9702 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
9704 * w32fns.c (unwind_create_frame): If needed, free the glyph
9705 matrices of the partially constructed frame. (Bug#9943)
9706 * xfns.c (unwind_create_frame): Likewise.
9708 2011-11-01 Eli Zaretskii <eliz@gnu.org>
9710 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
9711 Don't stop backward scan on the continuation glyph, even though
9712 its CHARPOS is positive.
9713 (mouse_face_from_buffer_pos, note_mouse_highlight):
9714 Rename cover_string to disp_string.
9716 2011-11-01 Martin Rudalics <rudalics@gmx.at>
9718 * window.c (temp_output_buffer_show): Don't use
9719 Vtemp_buffer_show_specifiers.
9720 (Vtemp_buffer_show_specifiers): Remove unused variable.
9722 2011-10-30 Eli Zaretskii <eliz@gnu.org>
9724 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
9725 past the beginning of the current glyph matrix.
9727 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
9729 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
9730 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
9731 HAVE_GTK3 (Bug#9869).
9733 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
9734 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
9736 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
9738 * xterm.c: Declare x_handle_net_wm_state to return int.
9739 (handle_one_xevent): Check if we are iconified but don't have
9740 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
9741 (get_current_wm_state): Return non-zero if not hidden,
9742 check for _NET_WM_STATE_HIDDEN (Bug#9893).
9743 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
9744 (x_handle_net_wm_state): Return what get_current_wm_state returns.
9745 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
9747 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
9749 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
9750 so that this new function doesn't get optimized away by a
9751 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
9753 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9755 * frame.h (MOUSE_HL_INFO): Remove excess parens.
9757 2011-10-29 Eli Zaretskii <eliz@gnu.org>
9759 Fix the `xbytecode' command.
9760 * .gdbinit (xprintbytestr): New command.
9761 (xwhichsymbols): Rename from `which'; all callers changed.
9762 (xbytecode): Print the byte-code string as well.
9764 2011-10-29 Kim Storm <storm@cua.dk>
9766 * alloc.c (which_symbols): New function.
9768 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9770 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
9773 2011-10-29 Glenn Morris <rgm@gnu.org>
9775 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
9776 Not clear what it was for, and it causes various bugs. (Bug#9839)
9778 2011-10-28 Eli Zaretskii <eliz@gnu.org>
9780 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
9781 possible random value that matches one of those tested as
9782 condition to clear the mouse face.
9784 2011-10-28 Chong Yidong <cyd@gnu.org>
9786 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
9788 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
9790 * window.c (make_window): Initialize phys_cursor_on_p.
9792 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
9794 * lisp.h (struct Lisp_Symbol): Update comments.
9796 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
9798 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
9800 2011-10-28 Eli Zaretskii <eliz@gnu.org>
9802 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
9803 <oslsachem@gmail.com> for helping to debug this.
9805 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
9806 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
9807 (g_b_init_get_glyph_outline_w): New static variables.
9808 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
9809 (GetGlyphOutlineW_Proc): New typedefs.
9810 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9811 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
9813 (w32font_open_internal, compute_metrics):
9814 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
9815 instead of calling the "wide" APIs directly.
9817 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
9819 * w32.h (syms_of_w32font): Add prototype.
9821 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
9823 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
9824 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
9825 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
9826 (Fmove_to_window_line): Doc fix.
9828 2011-10-27 Chong Yidong <cyd@gnu.org>
9830 * process.c (make_process): Set gnutls_state to NULL.
9832 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
9833 non-NULL, regardless of GNUTLS_INITSTAGE.
9834 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
9835 an error. Set process slots as soon as we allocate them.
9837 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
9839 2011-10-27 Chong Yidong <cyd@gnu.org>
9841 * gnutls.c (emacs_gnutls_deinit): New function.
9842 Deallocate credentials structures as well as calling gnutls_deinit.
9843 (Fgnutls_deinit, Fgnutls_boot): Use it.
9845 * process.c (make_process): Initialize GnuTLS credentials to NULL.
9846 (deactivate_process): Call emacs_gnutls_deinit.
9848 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
9850 * image.c (x_create_x_image_and_pixmap):
9851 * w32.c (sys_rename, w32_delayed_load):
9852 * w32font.c (fill_in_logfont):
9853 * w32reg.c (x_get_string_resource): Silence compiler warnings.
9855 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
9857 * w32fns.c (w32_default_color_map): New function,
9858 extracted from Fw32_default_color_map.
9859 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
9861 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
9863 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
9865 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
9867 * keyboard.c (test_undefined): New function (bug#9751).
9868 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
9870 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
9872 * sysdep.c (init_sys_modes): Fix the check for the controlling
9873 terminal (Bug#6649).
9875 2011-10-20 Eli Zaretskii <eliz@gnu.org>
9877 * dispextern.h (struct bidi_it): New member next_en_type.
9879 * bidi.c (bidi_line_init): Initialize the next_en_type member.
9880 (bidi_resolve_explicit_1): When next_en_pos is valid for the
9881 current character, check also for next_en_type being WEAK_EN.
9882 (bidi_resolve_weak): Don't enter the expensive loop if the current
9883 position is before next_en_pos. Record the bidi type of the first
9884 non-ET, non-BN character we find, in addition to its position.
9885 (bidi_level_of_next_char): Invalidate next_en_type when
9886 next_en_pos is over-stepped.
9888 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
9890 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
9891 * editfns.c: Rewrite current-time-zone so that it invokes
9892 the equivalent of (format-time-string "%Z") to get the time zone name.
9893 This fixes a bug when the time zone name contains characters that
9894 need converting from the system time locale to Emacs internal format.
9895 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
9896 that patch fixed format-time-string to do the conversion, but
9897 I forgot to fix current-time-zone.
9898 (format_time_string): New function, containing most of
9899 what Fformat_time_string used to contain.
9900 (Fformat_time_string): Rewrite in terms of format_time_string.
9901 This doesn't change this function's behavior.
9902 (current-time-zone): Rewrite to use format_time_string.
9903 This fixes the bug reported by Michael Schierl in
9904 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
9905 Jason Rumney's 2007-06-07 change worked around this bug, but
9907 * systime.h (tzname, timezone): Remove no-longer-used declarations.
9909 2011-10-19 Eli Zaretskii <eliz@gnu.org>
9911 * xdisp.c (start_display): If the character at POS is displayed
9912 via a display vector, reset IT->current.dpvec_index to zero.
9913 (try_window_reusing_current_matrix): If a line ends in a display
9914 vector or the next line starts in a display vector, continue
9915 redrawing the window even though the character position of
9916 start_row was reached.
9919 2011-10-18 Chong Yidong <cyd@gnu.org>
9921 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
9922 with nobreak-char-display too.
9924 2011-10-18 Eli Zaretskii <eliz@gnu.org>
9926 Fix part 3 of bug#9771.
9927 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
9928 (bidi_resolve_neutral): Don't enter the expensive loop looking for
9929 non-neutral characters if the current character is a paragraph
9930 separator (a.k.a. Newline). This avoids running the same
9931 expensive loop twice, once when we consume the preceding newline
9932 and the other time when the line actually needs to be displayed.
9933 Avoid the loop when we see neutrals on the base embedding level
9934 following a character whose directionality is the same as the
9935 paragraph's. This avoids running the expensive loop when a line
9936 ends in a long sequence of neutrals, like control characters.
9937 Add assertion against STRONG_AL type. Slightly rearrange code
9938 that determines the type of a neutral given the first non-neutral
9940 (bidi_level_of_next_char): Set next_en_pos to zero when
9941 invalidating its info.
9943 2011-10-17 Eli Zaretskii <eliz@gnu.org>
9945 * xdisp.c (push_display_prop): Determine whether to record string
9946 or buffer position by IT->string, not by IT->method. Allow
9947 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
9948 (move_it_vertically_backward): Don't look for character position
9949 immediately after the newline when in a continuation line.
9952 2011-10-15 Martin Rudalics <rudalics@gmx.at>
9954 * window.c (coordinates_in_window): Rewrite and delabelize
9955 vertical border check. (Bug#5357) (Bug#9618)
9957 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
9959 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
9960 errors in XSetWindowBorder (bug#9310).
9962 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
9964 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
9965 avoid crash when xmalloc overrun checking is enabled.
9967 2011-10-13 Eli Zaretskii <eliz@gnu.org>
9969 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
9970 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
9971 cursor motion with <left> and <right> arrow keys.
9973 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
9974 some callers set that themselves.
9976 2011-10-12 Eli Zaretskii <eliz@gnu.org>
9978 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
9979 display string and the previous row comes from the same string and
9980 is empty. (Bug#9739) (Bug#9738)
9982 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
9984 * doc.c (get_doc_string): Encode file name (bug#9735).
9986 2011-10-12 Eli Zaretskii <eliz@gnu.org>
9988 * bidi.c (bidi_level_of_next_char):
9989 * xdisp.c (get_visually_first_element): Remove old incorrect
9990 comments regarding the Unicode Line Separator character.
9992 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
9994 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
9996 * alloc.c (Fgc_status): Do not access beyond zombies array
9997 boundary if nzombies > MAX_ZOMBIES.
9998 * alloc.c (dump_zombies): Add missing format specifier.
10000 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
10002 * xdisp.c (set_cursor_from_row): Simplify conditionals,
10003 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
10005 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
10006 Some packages use them to denote characters with modifiers.
10008 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
10010 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
10011 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
10012 matching a pp-number. Rename parameter var to var1.
10014 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
10016 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
10018 2011-10-08 Glenn Morris <rgm@gnu.org>
10020 * callint.c (Fcall_interactively): Give a more explicit error for the
10021 'c' case with a non-character input. (Bug#8479)
10023 2011-10-08 Eli Zaretskii <eliz@gnu.org>
10025 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
10027 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
10028 lines that are hscrolled on the left.
10030 * dispnew.c (buffer_posn_from_coords): Account for a possible
10031 presence of header-line. (Bug#4426)
10033 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
10035 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
10036 Don't advertise functionality which we discourage or doesn't work.
10038 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
10040 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
10041 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
10042 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
10043 this makes Emacs dump core during garbage collection on rare
10044 occasions. sizeof is obviously inferior to offsetof here, so
10045 stick with offsetof.
10046 (GC_POINTER_ALIGNMENT): New macro.
10047 (mark_memory): Omit 3rd (offset) arg; caller changed.
10048 Don't assume EMACS_INT alignment is the same as pointer alignment.
10050 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10052 * keyboard.c (read_key_sequence_remapped): New var.
10053 (read_key_sequence): Compute remapping in the right buffer.
10054 (command_loop_1): Use read_key_sequence's remapping directly.
10056 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
10058 * dired.c (file_name_completion): Don't expand file name.
10059 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
10060 before checking file name handler.
10062 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
10063 they've been requested explicitly (bug#9591).
10065 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
10067 * keymap.c (Fsingle_key_description): Use make_specified_string
10068 instead of build_string to build string from push_key_description.
10071 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
10073 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
10074 This fixes a Y2038 bug on 64-bit hosts.
10075 * buffer.c (reset_buffer):
10076 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
10077 (Fclear_buffer_auto_save_failure):
10078 Use 0, not -1, to represent an unset failure time, since time_t
10079 might not be signed.
10081 Remove dependency on glibc malloc internals.
10082 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10083 Move back here from lisp.h, but with their new implementations.
10084 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10085 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
10086 * charset.c (charset_table_init): New static var.
10087 (syms_of_charset): Use it instead of xmalloc. This removes a
10088 dependency on glibc malloc internals. See Eli Zaretskii's comment in
10089 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
10090 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10091 Move back to alloc.c.
10092 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10093 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
10095 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
10097 * nsterm.m (windowDidResize): Call x_set_window_size only when
10098 ns_in_resize is true. Otherwise set pixelwidth/height and
10099 call change_frame_size (Bug#9628).
10101 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
10103 Port --enable-checking=all to Fedora 14 x86-64.
10104 * charset.c (syms_of_charset): Also account for glibc malloc's
10105 internal overhead when calculating the initial malloc maximum.
10107 Port --enable-checking=all to Fedora 14 x86.
10108 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10110 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
10111 (overrun_check_realloc, overrun_check_free):
10112 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
10113 That way, xmalloc returns a properly-aligned pointer even if
10114 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
10115 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
10116 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
10117 into account when calculating the initial malloc maximum.
10118 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10119 Move here from alloc.c, so that charset.c can use it too.
10120 Properly align; the old code wasn't right for common 32-bit hosts
10121 when configured with --enable-checking=all.
10122 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10123 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
10125 2011-09-29 Eli Zaretskii <eliz@gnu.org>
10127 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
10130 2011-09-28 Eli Zaretskii <eliz@gnu.org>
10132 * xdisp.c (compute_display_string_end): If there's no display
10133 string at CHARPOS, return -1.
10135 * bidi.c (bidi_fetch_char): When compute_display_string_end
10136 returns a negative value, treat the character as a normal
10137 character not covered by a display string. (Bug#9624)
10139 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
10141 * lread.c (Fread_from_string): Fix typo in docstring.
10143 2011-09-27 Eli Zaretskii <eliz@gnu.org>
10145 * xdisp.c (handle_invisible_prop): If invisible text ends on a
10146 newline, reseat the iterator instead of bidi-iterating there one
10147 character at a time. (Bug#9610)
10148 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
10149 TO_CHARPOS if the bidi iterator is at base embedding level.
10151 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
10153 * lread.c (readevalloop): Use correct code for NBSP.
10154 (read1): Likewise. (Bug#9608)
10156 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
10158 * dbusbind.c (Fdbus_register_signal): When service is not
10159 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
10161 2011-09-25 Glenn Morris <rgm@gnu.org>
10163 * buffer.c (truncate-lines): Doc fix.
10165 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
10167 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
10168 (Fset_window_next_buffers): Doc fix.
10170 2011-09-24 Glenn Morris <rgm@gnu.org>
10172 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
10174 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
10176 Fix minor problems found by static checking.
10177 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
10178 * indent.c (Fvertical_motion): Fix == vs = typo.
10180 2011-09-24 Eli Zaretskii <eliz@gnu.org>
10182 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
10183 Default value is now t. Doc fix.
10185 * indent.c (Fvertical_motion): Compute and apply the overshoot
10186 logic when moving up, not only when moving down. Fix the
10187 confusing name and values of the it_overshoot_expected variable;
10188 logic changes accordingly. (Bug#9254) (Bug#9549)
10190 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
10191 CHARPOS is covered by a display string which includes newlines.
10192 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
10193 is covered by a display string with embedded newlines.
10195 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
10197 * dbusbind.c (Fdbus_register_signal): Add match rule to
10198 Vdbus_registered_objects_table. (Bug#9581)
10199 (Fdbus_register_method, Vdbus_registered_objects_table):
10202 2011-09-24 Jim Meyering <meyering@redhat.com>
10204 do not ignore write error for any output size
10205 The previous change was incomplete.
10206 While it makes emacs --batch detect the vast majority of stdout
10207 write failures, errors were still ignored whenever the output size is
10208 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
10209 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
10210 && echo FAIL: ignored write error
10211 FAIL: ignored write error
10212 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
10213 && echo FAIL: ignored write error
10214 FAIL: ignored write error
10215 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
10217 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
10219 * emacs.c (Fkill_emacs): In noninteractive mode exit
10220 non-successfully if a write error occurred on stdout. (Bug#9574)
10222 2011-09-21 Eli Zaretskii <eliz@gnu.org>
10224 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
10227 * dispextern.h (struct it): Update the comment documenting what
10230 2011-09-20 Eli Zaretskii <eliz@gnu.org>
10232 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
10233 a display string, extend search for cursor position to end of row.
10234 (find_row_edges): If the row ends in a newline from a display
10235 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
10236 Handle the case of a display string with multiple newlines.
10237 (Fcurrent_bidi_paragraph_direction): Fix search for previous
10238 non-empty line. Fixes confusing cursor motion with arrow keys at
10239 the beginning of a line that starts with whitespace.
10241 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
10243 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
10246 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
10248 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
10249 boolean (Bug#9154).
10251 2011-09-18 Eli Zaretskii <eliz@gnu.org>
10253 * xdisp.c (display_line): Record maximum and minimum buffer
10254 positions even if no glyphs were produced (e.g., by a zero-width
10255 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
10256 buffer positions that will be removed from the glyph row because
10258 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
10259 column is beyond frame width: don't subtract 1 "pixel" when
10260 computing width of the stretch.
10261 (reseat_at_next_visible_line_start): Undo the change made on
10262 2011-09-17 that saved paragraph information and restored it after
10263 the call to `reseat'. (Bug#9545)
10265 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10267 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
10268 and turn window cursor on if cleared (Bug#9415).
10270 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
10272 * search.c (boyer_moore): Take unibyte characters from pattern
10273 literally. (Bug#9458)
10275 2011-09-18 Eli Zaretskii <eliz@gnu.org>
10277 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
10279 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
10281 Fix minor problem found by static checking.
10282 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
10283 initialized, to pacify gcc -Wuninitialized.
10285 * fileio.c: Report proper errno when syscall falls.
10286 (Finsert_file_contents): Save and restore errno,
10287 so that report_file_error outputs the correct diagnostic.
10288 (Fwrite_region) [CLASH_DETECTION]: Likewise.
10290 2011-09-18 Eli Zaretskii <eliz@gnu.org>
10292 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
10294 2011-09-17 Eli Zaretskii <eliz@gnu.org>
10296 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
10297 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
10299 2011-09-17 Eli Zaretskii <eliz@gnu.org>
10301 * xdisp.c (reseat_at_next_visible_line_start): Keep information
10302 about the current paragraph and restore it after the call to reseat.
10304 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
10305 (bidi_find_paragraph_start): Search back for paragraph beginning
10306 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
10307 (bidi_move_to_visually_next): Only trigger paragraph-related
10308 computations when the last character is a newline or at EOB, not
10309 just any NEUTRAL_B. (Bug#9470)
10311 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
10312 truncated lines if point is covered by a display string. (Bug#9524)
10314 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
10316 * xselect.c: Relax test for outgoing X longs (Bug#9498).
10317 (cons_to_x_long): New function.
10318 (lisp_data_to_selection_data): Use it. Correct the test for
10319 short-versus-long data; it was negated. Break out of vector
10320 loop, for efficiency, when a long datum is discovered.
10322 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
10324 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
10326 2011-09-16 Eli Zaretskii <eliz@gnu.org>
10328 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
10329 GCC PR/17406) by declaring this function with external scope.
10331 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
10333 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
10334 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
10336 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
10338 * editfns.c (Fformat): Correctly handle text properties on "%%".
10340 2011-09-15 Eli Zaretskii <eliz@gnu.org>
10342 * xterm.c (x_draw_composite_glyph_string_foreground):
10343 * w32term.c (x_draw_composite_glyph_string_foreground):
10344 * term.c (encode_terminal_code):
10345 * composite.c (composition_update_it, get_composition_id):
10346 * xdisp.c (get_next_display_element)
10347 (fill_composite_glyph_string): Add comments about special meaning
10348 of TAB characters in a composition.
10350 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
10352 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
10353 This occurs when processing a multibyte format.
10354 Problem reported by Wolfgang Jenker.
10356 2011-09-15 Johan Bockgård <bojohan@gnu.org>
10358 * xdisp.c (try_cursor_movement): Only check for exact match if
10359 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
10361 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
10363 Remove unused external symbols.
10364 * dispextern.h (calc_pixel_width_or_height): Remove decl.
10365 * xdisp.c (calc_pixel_width_or_height): Now static.
10366 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
10367 * indent.c (check_display_width):
10368 * w32term.c: Fix comment to match code.
10369 * xterm.c, xterm.h (x_catching_errors): Remove.
10371 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
10373 * xselect.c: Use signed conversions more consistently (Bug#9498).
10374 (selection_data_to_lisp_data): Assume incoming selection data are
10375 signed integers, not unsigned. This is to be consistent with
10376 outgoing selection data, which was modified to use signed integers
10377 in as part of the fix to Bug#9196 in response to Jan D.'s comment
10378 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
10379 expects long, not unsigned long.
10381 2011-09-14 Eli Zaretskii <eliz@gnu.org>
10383 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
10384 computation of loop end. Reported by Johan Bockgård
10387 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
10389 * frame.c (Fother_visible_frames_p): Function deleted.
10391 2011-09-12 Eli Zaretskii <eliz@gnu.org>
10393 * indent.c (compute_motion): Process display vector front to back
10394 rather than the other way around. (Bug#2496)
10396 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
10398 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
10400 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
10402 * minibuf.c (Fread_from_minibuffer): Doc fix.
10404 2011-09-11 Eli Zaretskii <eliz@gnu.org>
10406 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
10407 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
10409 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
10411 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
10412 value for non-existent files.
10414 2011-09-11 Eli Zaretskii <eliz@gnu.org>
10416 * fileio.c (Finsert_file_contents): If the file cannot be opened,
10417 set its "size" to -1. This will set the modtime_size field of
10418 the corresponding buffer to -1, which is what
10419 verify-visited-file-modtime expects for files that do not exist.
10422 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
10424 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
10426 * lisp.h: ... from here. push_key_description is no longer
10427 defined in keyboard.c, so its declaration should not be in
10428 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
10429 logically belongs with push_key_description.
10431 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
10433 * buffer.h: Include <sys/types.h> instead of <time.h>.
10434 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
10435 Problem reported by Herbert J. Skuhra.
10437 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
10439 * xml.c (parse_region): Make the parsing work for
10440 non-comment-starting XML files again (bug#9144).
10442 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
10444 * image.c (gif_load): Fix calculation of bottom and right corner.
10447 2011-09-10 Eli Zaretskii <eliz@gnu.org>
10449 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
10450 redisplay in small windows.
10452 2011-09-09 Eli Zaretskii <eliz@gnu.org>
10454 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
10456 2011-09-08 Martin Rudalics <rudalics@gmx.at>
10458 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
10459 Operate on live windows only.
10461 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
10463 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
10465 2011-09-07 Eli Zaretskii <eliz@gnu.org>
10467 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
10468 only under bidi iteration.
10470 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
10472 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
10474 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
10476 isnan: Fix porting problem to Solaris 10 with bundled gcc.
10477 Without this fix, the command to link temacs failed due to an
10478 undefined symbol __builtin_isnan. This is because
10479 /usr/include/iso/math_c99.h #defines isnan(x) to
10480 __builtin_isnan(x), but the bundled gcc, which identifies itself
10481 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
10483 * floatfns.c (isnan): #undef, and then #define to a clone of
10485 (Fisnan): Always define, since it's always available now.
10486 (syms_of_floatfns): Always define isnan at the Lisp level.
10488 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
10490 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
10492 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
10494 * fileio.c: Fix bugs with large file offsets (Bug#9428).
10495 The previous code assumed that file offsets (off_t values) fit in
10496 EMACS_INT variables, which is not true on typical 32-bit hosts.
10497 The code messed up by falsely reporting buffer overflow in cases
10498 such as (insert-file-contents "big" nil 1 2) into an empty buffer
10499 when "big" contains more than 2**29 bytes, even though this
10500 inserts just one byte and does not overflow the buffer.
10501 (Finsert_file_contents): Store file offsets as off_t
10502 values, not as EMACS_INT values. Check for overflow when
10503 converting between EMACS_INT and off_t. When checking for
10504 buffer overflow or for overlap, take the offsets into account.
10505 Don't use EMACS_INT for small values where int suffices.
10506 When checking for overlap, fix a typo: ZV was used where
10507 ZV_BYTE was intended.
10508 (Fwrite_region): Don't assume off_t fits into 'long'.
10509 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
10511 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
10513 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
10515 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
10517 sprintf-related integer and memory overflow issues (Bug#9412).
10519 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
10520 (esprintf, exprintf, evxprintf): New functions.
10521 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
10522 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
10523 (modify_event_symbol): Do not assume that the length of
10524 name_alist_or_stem is safe to alloca and fits in int.
10525 (Fexecute_extended_command): Likewise for function name and binding.
10526 (Frecursion_depth): Wrap around reliably on integer overflow.
10527 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
10528 since some callers pass EMACS_INT values.
10529 (Fsingle_key_description): Don't crash if symbol name contains more
10530 than MAX_ALLOCA bytes.
10531 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
10532 (get_minibuffer): Arg is now EMACS_INT, not int.
10533 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
10534 (esprintf, exprintf, evxprintf): New decls.
10535 * window.h (command_loop_level, minibuf_level): Reflect API changes.
10537 * dbusbind.c (signature_cat): New function.
10538 (xd_signature, Fdbus_register_signal):
10539 Do not overrun buffer; instead, report string overflow.
10541 * dispnew.c (add_window_display_history): Don't overrun buffer.
10542 Truncate instead; this is OK since it's just a log.
10544 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
10545 even if the time zone offset is outlandishly large.
10546 Don't mishandle offset == INT_MIN.
10548 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
10549 when creating daemon; the previous buffer-overflow check was incorrect.
10551 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
10552 which has the guts of the old verror function.
10554 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
10555 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
10557 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
10558 (font_unparse_xlfd): Don't blindly alloca long strings.
10559 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
10560 fits in int, when using sprintf. Use single snprintf to count
10561 length of string rather than counting it via multiple sprintfs;
10562 that's simpler and more reliable.
10563 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
10564 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
10565 sprintf, in case result does not fit in int.
10567 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
10568 (fontset_from_font): Print it.
10570 * frame.c (tty_frame_count): Now printmax_t, not int.
10571 (make_terminal_frame, set_term_frame_name): Print it.
10572 (x_report_frame_params): In X, window IDs are unsigned long,
10573 not signed long, so print them as unsigned.
10574 (validate_x_resource_name): Check for implausibly long names,
10575 and don't assume name length fits in 'int'.
10576 (x_get_resource_string): Don't blindly alloca invocation name;
10577 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
10580 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
10581 (xg_check_special_colors, xg_set_geometry):
10582 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
10584 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
10585 Use esprintf, not sprintf, in case result does not fit in int.
10587 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
10588 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
10589 it as a large positive number.
10590 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
10591 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
10593 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
10594 in case result does not fit in int.
10596 * print.c (float_to_string): Detect width overflow more reliably.
10597 (print_object): Make sprintf buffer a bit bigger, to avoid potential
10598 buffer overrun. Don't assume list length fits in 'int'. Treat
10599 print length of 0 as 0, not as infinity; to be consistent with other
10600 uses of print length in this function. Don't overflow print length
10601 index. Don't assume hash table size fits in 'long', or that
10602 vectorlike size fits in 'unsigned long'.
10604 * process.c (make_process): Use printmax_t, not int, to format
10605 process-name gensyms.
10607 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
10609 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
10610 to avoid potential buffer overrun.
10612 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
10613 if X resource line is longer than 512 bytes.
10615 * xfns.c (x_window): Make sprintf buffer a bit bigger
10616 to avoid potential buffer overrun.
10618 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
10620 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
10622 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
10624 Integer overflow fixes for scrolling, etc.
10625 Without these, Emacs silently mishandles large integers sometimes.
10626 For example, "C-u 4294967297 M-x recenter" was treated as if
10627 it were "C-u 1 M-x recenter" on a typical 64-bit host.
10629 * xdisp.c (try_window_id): Check Emacs fixnum range before
10630 converting to 'int'.
10632 * window.c (window_scroll_line_based, Frecenter):
10633 Check that an Emacs fixnum is in range before assigning it to 'int'.
10634 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
10635 values converted from Emacs fixnums.
10636 (Frecenter): Don't wrap around a line count if it is out of 'int'
10637 range; instead, treat it as an extreme value.
10638 (Fset_window_configuration, compare_window_configurations):
10639 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
10641 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
10642 that can exceed INT_MAX. Check that EMACS_INT value is in range
10643 before assigning it to the (possibly-narrower) index.
10644 (match_limit): Don't assume that a fixnum can fit in 'int'.
10646 * print.c (print_object): Use ptrdiff_t, not int, for index that can
10649 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
10650 (Fvertical_motion): Don't wrap around LINES values that don't fit
10651 in 'int'. Instead, treat them as extreme values. This is good
10652 enough for windows, which can't have more than INT_MAX lines anyway.
10654 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
10656 * Require libxml/parser.h to avoid compilation warning.
10658 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
10660 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
10661 since this reportedly can destroy thread storage.
10663 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
10665 * syntax.c (find_defun_start): Update all cache variables if
10666 exiting early (Bug#9401).
10668 2011-08-30 Eli Zaretskii <eliz@gnu.org>
10670 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
10672 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
10673 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
10674 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
10676 * term.c (tty_append_glyph): New function.
10677 (produce_stretch_glyph): Static function and its prototype deleted.
10679 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
10682 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
10684 * image.c (parse_image_spec): Check for nonnegative, not for positive,
10685 when checking :margin (Bug#9390).
10686 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
10687 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
10688 so that the name doesn't mislead. All uses changed.
10690 2011-08-28 Johan Bockgård <bojohan@gnu.org>
10692 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
10695 2011-08-27 Eli Zaretskii <eliz@gnu.org>
10697 * xdisp.c (move_it_to): Don't bail out early when reaching
10698 position beyond to_charpos, if we are scanning backwards.
10699 (move_it_vertically_backward): When DY == 0, make sure we get to
10700 the first character in the line after the newline.
10702 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
10704 * ccl.c: Improve and simplify overflow checking (Bug#9196).
10705 (ccl_driver): Do not generate an out-of-range pointer.
10706 (Fccl_execute_on_string): Remove unnecessary check for
10707 integer overflow, noted by Stefan Monnier in
10708 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
10709 Remove a FIXME that didn't need fixing.
10710 Simplify the newly-introduced buffer reallocation code.
10712 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
10714 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
10716 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
10718 Integer and memory overflow issues (Bug#9196).
10720 * doc.c (get_doc_string): Rework so that
10721 get_doc_string_buffer_size is the actual buffer size, rather than
10722 being 1 less than the actual buffer size; this makes xpalloc more
10725 * image.c (x_allocate_bitmap_record, cache_image):
10726 * xselect.c (Fx_register_dnd_atom):
10727 Simplify previous changes by using xpalloc.
10729 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
10730 since either will do and ptrdiff_t is convenient with xpalloc.
10732 * charset.c (charset_table_size)
10733 (struct charset_sort_data.priority): Now ptrdiff_t.
10734 (charset_compare): Don't overflow if priorities differ greatly.
10735 (Fsort_charsets): Don't assume list length fits in int.
10736 Check for size-calculation overflow when allocating sort data.
10737 (syms_of_charset): Allocate an initial charset table that is
10738 just under 64 KiB, to avoid problems with glibc malloc and mmap.
10740 * cmds.c (internal_self_insert): Check for size-calculation overflow.
10742 * composite.h (struct composition.glyph_len): Now int, not unsigned.
10743 The actual value is always <= INT_MAX, and leaving it unsigned made
10744 overflow checking harder.
10746 * dispextern.h (struct glyph_matrix.rows_allocated)
10747 (struct face_cache.size): Now ptrdiff_t, for convenience in use
10748 with xpalloc. The values are still always <= INT_MAX.
10750 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
10752 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
10753 (SAFE_NALLOCA): New macro.
10755 * region-cache.c (struct boundary.pos, find_cache_boundary)
10756 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
10757 (set_cache_region, invalidate_region_cache)
10758 (revalidate_region_cache, know_region_cache, region_cache_forward)
10759 (region_cache_backward, pp_cache):
10760 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
10761 so that ptrdiff_t * can be passed to xpalloc.
10762 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
10763 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
10764 (pp_cache): Don't assume cache_len fits in int.
10765 * region-cache.h: Adjust extern decls to match.
10767 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
10768 EMACS_INT, since either will do, for xpalloc.
10770 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
10771 (xnmalloc, xnrealloc, xpalloc): New functions.
10773 * bidi.c (bidi_shelve_header_size): New constant.
10774 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
10775 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
10777 * bidi.c (bidi_cache_shrink):
10778 * buffer.c (overlays_at, overlays_in, record_overlay_string)
10780 Don't update size of array until after memory allocation succeeds,
10781 because xmalloc/xrealloc may not return.
10782 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
10783 now that we have proper integer overflow checking.
10784 (record_overlay_string, overlay_strings): Catch overflows when
10785 calculating size of overlay_str_buf.
10787 * callproc.c (Fcall_process): Check for size overflow when
10788 calculating size of args2.
10789 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
10790 Normally we prefer signed values, but sticking with ptrdiff_t would
10791 require adding more-complicated checks.
10793 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
10794 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
10795 Redo buffer-overflow calculations to avoid integer overflow.
10796 Add a FIXME comment where memory seems to be over-allocated.
10798 * character.c (Fstring): Check for size-calculation overflow.
10800 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
10801 unnecessary integer overflow. Check for size overflow.
10802 (encode_coding_object): Don't update size until xmalloc succeeds.
10804 * composite.c (get_composition_id): Check for overflow in glyph
10805 length calculations.
10807 Integer and memory overflow fixes for display code.
10808 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
10809 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
10810 (scrolling_window): Check for overflow in size calculations.
10811 (line_draw_cost, realloc_glyph_pool, add_row_entry):
10812 Don't assume glyph table len fits in int.
10813 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
10814 (row_table_size): Now ptrdiff_t, not int.
10815 (scrolling_window): Avoid overflow in size calculations.
10816 Don't update size until allocation succeeds.
10817 * fns.c (concat): Check for overflow in size calculations.
10818 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
10819 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
10820 (NEXT_ALMOST_PRIME_LIMIT): New constant.
10822 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
10823 (get_doc_string): Check for size calculation overflow.
10824 Don't update size until allocation succeeds.
10825 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
10826 EMACS_INT, where ptrdiff_t will do.
10827 (Fsubstitute_command_keys): Check for string overflow.
10829 * editfns.c (set_time_zone_rule): Don't assume environment length
10831 (message_length): Now ptrdiff_t, not int.
10832 (Fmessage_box): Don't update size until allocation succeeds.
10833 Don't assume message length fits in int.
10834 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
10836 * emacs.c (main): Do not reallocate argv, since there is a null at
10837 the end that can be overwritten, and this way there's no need to
10838 worry about size-calculation overflow.
10839 (sort_args): Check for size-calculation overflow.
10841 * eval.c (init_eval_once, grow_specpdl): Don't update size until
10843 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
10845 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
10846 (x_set_scroll_bar_width, x_figure_window_size):
10847 Check for integer overflow.
10848 (x_set_alpha): Do not assume XINT fits in int.
10850 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
10851 This is for the members text_lines, text_cols, total_lines, total_cols,
10852 where the system imposes an 'int' limit.
10854 * fringe.c (Fdefine_fringe_bitmap):
10855 Don't update size until alloc works.
10857 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
10858 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
10860 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
10861 Check for size-calculation overflow.
10862 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
10863 do, as we prefer signed integers.
10864 (id_to_widget.max_size, id_to_widget.used)
10865 (xg_store_widget_in_map, xg_remove_widget_from_map)
10866 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
10867 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
10868 Use and return ptrdiff_t, not int.
10869 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
10870 * gtkutil.h: Change prototypes to match the above.
10872 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
10873 are duplicate now that they've been promoted to lisp.h.
10874 (x_allocate_bitmap_record, x_alloc_image_color)
10875 (make_image_cache, cache_image, xpm_load):
10876 Don't update size until alloc is done.
10877 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
10879 Check for size calculation overflow.
10880 (ct_colors_allocated_max): New constant.
10881 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
10884 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
10885 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
10886 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
10887 Use ptrdiff_t, not int, to count maps.
10888 (read_char_minibuf_menu_prompt): Check for overflow in size
10889 calculations. Don't update size until allocation succeeds.
10890 Redo calculations to avoid overflow.
10891 * keyboard.h: Change prototypes to match the above.
10893 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
10895 (current_minor_maps): Check for size calculation overflow.
10896 * keymap.h: Change prototypes to match the above.
10898 * lread.c (read1, init_obarray): Don't update size until alloc done.
10900 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
10901 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
10903 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
10904 Now ptrdiff_t, not int.
10905 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
10906 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
10908 * process.c (Fnetwork_interface_list): Check for overflow
10909 in size calculation.
10911 * region-cache.c (move_cache_gap): Check for size calculation overflow.
10913 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
10914 overflow. Don't bother calling xmalloc when xrealloc will do.
10916 * search.c (Freplace_match): Check for size calculation overflow.
10917 (Fset_match_data): Don't assume list lengths fit in 'int'.
10919 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
10920 for command line length. Do not attempt to address one before the
10921 beginning of an array, as that's not portable.
10923 * term.c (max_frame_lines): Remove; unused.
10924 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
10926 (encode_terminal_code, calculate_costs): Check for size
10927 calculation overflow.
10928 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
10929 table lengths and related sizes. Don't update size until alloc
10930 done. Redo calculations to avoid overflow.
10931 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
10933 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
10934 subtracting pointers.
10935 (gobble_line): Check for overflow more carefully. Don't update size
10938 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
10939 Don't update size until alloc done.
10940 Redo size calculations to avoid overflow.
10941 Check for size calculation overflow.
10942 (main) [DEBUG]: Fix typo in invoking tparam1.
10944 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
10945 Use ptrdiff_t, not int, for sizes.
10946 (store_mode_line_noprop_char): Don't update size until alloc done.
10948 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
10949 Use ptrdiff_t, not int, for sizes.
10950 (Finternal_make_lisp_face, cache_face):
10951 Check for size calculation overflow.
10952 (cache_face): Treat size calculation overflows as if they were
10953 memory exhaustion (the usual treatment), rather than aborting.
10955 * xfns.c (x_encode_text, x_set_name_internal)
10956 (Fx_change_window_property): Use ptrdiff_t, not int, to count
10957 sizes, since they can exceed INT_MAX in size. Check for size
10958 calculation overflow.
10960 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
10961 (xg_select): Check for size calculation overflow.
10962 Don't update size until alloc done.
10964 * xrdb.c (get_environ_db): Don't assume path length fits in int,
10965 as sprintf is limited to int lengths.
10967 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
10968 (X_LONG_MIN): New macros.
10969 Use them to make the following changes clearer.
10970 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
10971 This change doesn't affect the value now, but it may help remind
10972 future maintainers not to raise the value too much later.
10973 (SELECTION_QUANTUM): Remove, replacing with ...
10974 (selection_quantum): ... new function, which avoids overflow.
10976 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
10977 assumption that selection length fits in 'int'.
10978 (x_reply_selection_request, x_handle_selection_request)
10979 (x_get_window_property, receive_incremental_selection)
10980 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
10981 (lisp_data_to_selection_data, clean_local_selection_data):
10982 Use ptrdiff_t, not int, to record length of selection.
10983 (x_reply_selection_request, x_get_window_property)
10984 (receive_incremental_selection, x_property_data_to_lisp):
10985 Redo calculations to avoid overflow.
10986 (x_reply_selection_request): When sending hint, ceiling it at
10987 X_LONG_MAX rather than relying on wraparound overflow to send
10989 (x_get_window_property, receive_incremental_selection)
10990 (lisp_data_to_selection_data, x_property_data_to_lisp):
10991 Check for size-calculation overflow.
10992 (x_get_window_property, receive_incremental_selection)
10993 (lisp_data_to_selection_data, Fx_register_dnd_atom):
10994 Don't store size until memory allocation succeeds.
10995 (x_get_window_property): Plug memory leak on memory exhaustion.
10996 Don't double-block input; malloc is safe here. Don't assume 2**34
10997 - 4 fits in unsigned long. Add an xassert to check
10998 XGetWindowProperty overflow. Be more careful about overflow
10999 calculations, and distinguish size from memory overflow better.
11000 (receive_incremental_selection): When tracing, don't assume
11001 unsigned int is less than INT_MAX.
11002 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
11003 harmful) conversions of unsigned short to int.
11004 (lisp_data_to_selection_data): Don't assume that integers
11005 in the range -65535 through -1 fit in an X unsigned short.
11006 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
11007 result parameters unless successful. Rely on cons_to_unsigned
11008 to report problems with elements; the old code wasn't right anyway.
11009 (x_check_property_data): Check for int overflow; we cannot use
11010 a wider type due to X limits.
11011 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
11013 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
11015 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
11016 (x_term_init): Check for size calculation overflow.
11017 (x_color_cells): Don't store size until memory allocation succeeds.
11018 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
11019 Don't assume alloca size is less than MAX_ALLOCA.
11020 (x_term_init): Don't assume length fits in int (sprintf is limited
11023 Use ptrdiff_t for composition IDs.
11024 * character.c (lisp_string_width):
11025 * composite.c (composition_table_size, n_compositions)
11026 (get_composition_id, composition_gstring_from_id):
11027 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
11028 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
11029 * window.c (Frecenter):
11030 Use ptrdiff_t, not int, for composition IDs.
11031 * composite.c (get_composition_id): Check for integer overflow.
11032 * composite.h: Adjust prototypes to match the above changes.
11034 Use ptrdiff_t for hash table indexes.
11035 * category.c (hash_get_category_set):
11036 * ccl.c (ccl_driver):
11037 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
11038 * coding.c (coding_system_charset_list, detect_coding_system):
11039 * coding.h (struct coding_system.id):
11040 * composite.c (get_composition_id, gstring_lookup_cache):
11041 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
11042 * image.c (xpm_get_color_table_h):
11043 * lisp.h (hash_lookup, hash_put):
11044 * minibuf.c (Ftest_completion):
11045 Use ptrdiff_t for hash table indexes, not int (which is too
11046 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
11047 32-bit --with-wide-int hosts).
11049 * charset.c (Fdefine_charset_internal): Check for integer overflow.
11050 Add a FIXME comment about memory leaks.
11051 (syms_of_charset): Don't assume xmalloc returns.
11053 Don't assume that stated character widths fit in int.
11054 * character.c (Fchar_width, c_string_width, lisp_string_width):
11055 * character.h (CHAR_WIDTH):
11056 * indent.c (MULTIBYTE_BYTES_WIDTH):
11057 Use sanitize_char_width to avoid undefined and/or bad behavior
11058 with outlandish widths.
11059 * character.h (sanitize_tab_width): Rename from sanitize_width,
11060 now that we have two such functions. All uses changed.
11061 (sanitize_char_width): New inline function.
11063 Don't assume that tab-width fits in int.
11064 * character.h (sanitize_width): New inline function.
11065 (SANE_TAB_WIDTH): New macro.
11066 (ASCII_CHAR_WIDTH): Use it.
11067 * indent.c (sane_tab_width): Remove. All uses replaced by
11068 SANE_TAB_WIDTH (current_buffer).
11069 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
11071 * fileio.c: Integer overflow issues with file modes.
11072 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
11074 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
11075 Remove unreachable code.
11076 (read_hex, load_charset_map_from_file): Check for integer overflow.
11078 * xterm.c: Don't go over XClientMessageEvent limit.
11079 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
11080 (x_send_scroll_bar_event): Likewise. Check that the size does not
11081 exceed limits imposed by XClientMessageEvent, as well as the usual
11082 ptrdiff_t and size_t limits.
11084 * keyboard.c: Overflow, signedness and related fixes.
11085 (make_lispy_movement): Use same integer type in forward decl
11086 that is used in the definition.
11087 (read_key_sequence, keyremap_step):
11088 Change bufsize argument back to int, undoing my 2011-03-30 change.
11089 We prefer signed types, and int is wide enough here.
11090 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
11091 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
11092 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
11093 length, not size_t. Use ptrdiff_t for index, not int.
11094 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
11095 possibility of integer overflow.
11097 Overflow, signedness and related fixes for images.
11099 * dispextern.h (struct it.stack[0].u.image.image_id)
11100 (struct_it.image_id, struct image.id, struct image_cache.size)
11101 (struct image_cache.used, struct image_cache.ref_count):
11102 * gtkutil.c (update_frame_tool_bar):
11103 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
11104 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
11105 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
11106 * nsmenu.m (update_frame_tool_bar):
11107 * xdisp.c (calc_pixel_width_or_height):
11108 * xfns.c (image_cache_refcount):
11109 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
11110 on typical 64-bit hosts.
11112 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
11113 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
11114 Omit unnecessary casts to int.
11115 (parse_image_spec): Check that integers fall into 'int' range
11116 when the callers expect that.
11117 (image_ascent): Redo ascent calculation to avoid int overflow.
11118 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
11119 (lookup_image): Remove unnecessary tests.
11120 (xbm_image_p): Locals are now of int, not EMACS_INT,
11121 since parse_image_check makes sure they fit into int.
11122 (png_load, gif_load, svg_load_image):
11123 Prefer int to unsigned where either will do.
11124 (tiff_handler): New function, combining the cores of the
11125 old tiff_error_handler and tiff_warning_handler.
11126 This function is rewritten to use vsnprintf and thereby avoid
11127 stack buffer overflows. It uses only the features of vsnprintf
11128 that are common to both POSIX and native Microsoft.
11129 (tiff_error_handler, tiff_warning_handler): Use it.
11130 (tiff_load, gif_load, imagemagick_load_image):
11131 Don't assume :index value fits in 'int'.
11132 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
11133 (imagemagick_load_image): Check that crop parameters fit into
11134 the integer types that MagickCropImage accepts. Don't assume
11135 Vimagemagick_render_type has a nonnegative value. Don't assume
11136 size_t fits in 'long'.
11137 (gs_load): Use printmax_t to print the widest integers possible.
11138 Check for integer overflow when computing image height and width.
11140 2011-08-26 Eli Zaretskii <eliz@gnu.org>
11142 * xdisp.c (redisplay_window): Don't force window start if point
11143 will be invisible in the resulting window. (Bug#9324)
11145 2011-08-25 Eli Zaretskii <eliz@gnu.org>
11147 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
11148 the display spec is of the form `(space ...)'.
11149 (handle_display_spec): Return the value returned by
11150 handle_single_display_spec, not just 1 or zero.
11151 (handle_single_display_spec): If the display spec is of the form
11152 `(space ...)', and specifies display in the text area, return 2
11154 (try_cursor_movement): Check for the need to scroll more
11155 accurately, and prefer exact match for point under bidi.
11156 Don't advance `row' beyond the last row of the window.
11158 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
11159 into disp_prop; all users changed.
11161 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
11162 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
11163 for the text covered by the display property.
11165 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
11167 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
11168 Change return value to nil.
11169 (Frecord_buffer): Delete unused function.
11171 2011-08-24 Eli Zaretskii <eliz@gnu.org>
11173 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
11174 buffers, return left-to-right.
11175 (set_cursor_from_row): Consider candidate row a win if its glyph
11176 represents a newline and point is on that newline. Fixes cursor
11177 positioning on the newline at EOL of R2L text within L2R
11178 paragraph, and vice versa.
11179 (try_cursor_movement): Check continued rows, in addition to
11180 continuation rows. Fixes unwarranted scroll when point enters a
11181 continued line of R2L text within an L2R paragraph, or vice versa.
11182 (cursor_row_p): Consider the case of point being equal to
11183 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
11184 from the end of a short line to the beginning of a continued line
11185 of R2L text within L2R paragraph.
11186 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
11187 composed characters.
11189 * bidi.c (bidi_check_type): Use xassert.
11190 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
11193 2011-08-23 Eli Zaretskii <eliz@gnu.org>
11195 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
11198 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
11200 * nsfont.m (ns_otf_to_script): Fix typo.
11202 2011-08-22 Kenichi Handa <handa@m17n.org>
11204 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
11205 extra slot even if the purpose is char-code-property-table.
11207 2011-08-23 Eli Zaretskii <eliz@gnu.org>
11209 * xdisp.c (redisplay_window): When computing centering_position,
11210 account for the height of the header line. (Bug#8874)
11212 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
11213 instead of CHAR_TO_BYTE. Fixes a crash when a completion
11214 candidate is selected by the mouse, and that candidate has a
11215 composed character under the mouse.
11217 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
11218 coordinates reported by pos-visible-in-window-p for a composed
11219 character in column zero.
11221 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
11223 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
11225 2011-08-22 Eli Zaretskii <eliz@gnu.org>
11227 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
11228 consider it a hit if to_charpos is anywhere in the range of the
11229 composed buffer positions.
11231 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
11233 * image.c (gif_load): Don't assume that each subimage has the same
11234 dimensions as the base image. Handle disposal method that is
11235 "undefined" by the gif spec (Bug#9335).
11237 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
11239 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
11240 (Fcondition_case): Document `debug' symbol in error handler.
11242 2011-08-19 Eli Zaretskii <eliz@gnu.org>
11244 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
11245 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
11246 from an Org mode buffer to a Speedbar frame.
11248 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
11249 a composition, take its buffer position from IT->cmp_it.charpos.
11250 Fixes cursor positioning at the beginning of a line that begins
11251 with a composed character.
11253 2011-08-18 Eli Zaretskii <eliz@gnu.org>
11255 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
11256 character bidirectional type, use STRONG_L instead. Fixes crashes
11257 in a buffer produced by `describe-categories'.
11259 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
11260 members before the level stack, so they would be saved and
11261 restored when copying iterator state. Fixes incorrect reordering
11262 around TABs covered by display properties.
11264 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
11266 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
11268 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
11270 * eval.c (internal_condition_case, internal_condition_case_1)
11271 (internal_condition_case_2, internal_condition_case_n):
11272 Remove unnecessary aborts (Bug#9081).
11274 2011-08-17 Eli Zaretskii <eliz@gnu.org>
11276 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
11277 has no `load' handler, try opening the file locally. (Bug#9311)
11279 2011-08-16 Ken Brown <kbrown@cornell.edu>
11281 * gmalloc.c: Expand comment.
11283 2011-08-16 Eli Zaretskii <eliz@gnu.org>
11285 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
11286 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
11288 2011-08-16 Ken Brown <kbrown@cornell.edu>
11290 Fix memory allocation problems in Cygwin build (Bug#9273).
11292 * unexcw.c ( __malloc_initialized): Declare external variable.
11293 (fixup_executable): Force the dumped emacs to reinitialize malloc.
11295 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
11297 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
11299 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
11300 in the static heap.
11301 [CYGWIN] (special_realloc): New function.
11302 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
11303 requests to realloc storage in the static heap.
11305 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
11307 * bidi.c (bidi_initialize): Remove unused local.
11309 2011-08-15 Eli Zaretskii <eliz@gnu.org>
11312 * biditype.h: Remove file.
11313 * makefile.w32-in ($(BLD)/bidi.$(O)):
11314 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
11316 * dispextern.h: Fix a typo in the comment to bidi_type_t.
11318 * chartab.c: Improve commentary for the uniprop_table API.
11320 * bidi.c (bidi_paragraph_init): Support zero value of
11321 bidi_ignore_explicit_marks_for_paragraph_level.
11322 (bidi_initialize): Use uniprop_table instead of including
11323 biditype.h and bidimirror.h.
11325 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
11326 coordinates of the iterator when restoring from ppos_it.
11329 2011-08-14 Kenichi Handa <handa@m17n.org>
11331 * process.c (create_process): Call setup_process_coding_systems
11332 after the pid of the process is set to -1 (Bug#8162).
11334 2011-08-14 Eli Zaretskii <eliz@gnu.org>
11336 * xdisp.c (move_it_in_display_line_to): Don't invoke
11337 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
11338 ppos_it. Fixes vertical cursor motion when line beginning is
11339 covered by an image. (Bug#9296)
11341 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
11343 * nsterm.h (ns_run_ascript): Declare.
11344 (NSAPP_DATA2_RUNASSCRIPT): Define.
11346 * nsfns.m (as_script, as_result, as_status): New static variables.
11347 (ns_run_ascript): New function.
11348 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
11349 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
11350 the event loop. Get status from as_status (Bug#7276).
11352 * nsterm.m (sendEvent): If event is NSApplicationDefined and
11353 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
11354 the event loop (Bug#7276).
11356 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
11358 * gnutls.c (QCgnutls_bootprop_priority)
11359 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
11360 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
11361 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
11362 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
11363 (QCgnutls_bootprop_verify_hostname_error)
11364 (QCgnutls_bootprop_callbacks_verify): Rename from
11365 Qgnutls_bootprop_..., all uses changed.
11367 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
11370 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
11372 * xfaces.c (Qframe_set_background_mode): Now static.
11373 * dispextern.h (Qframe_set_background_mode): Remove decl.
11375 * process.c (Fnetwork_interface_info): Declare local only if needed.
11377 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
11379 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
11380 (Fnetwork_interface_list): Allocate in increments of bytes instead
11381 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
11382 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
11384 (struct ifflag_def): notrailers is smart on OSX.
11385 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
11386 Get hardware address with getifaddrs if available.
11388 2011-08-12 Eli Zaretskii <eliz@gnu.org>
11390 * xdisp.c (iterate_out_of_display_property): xassert that
11391 IT->position is set to within IT->object's boundaries. Break from
11392 the loop as soon as EOB is reached; avoids infloops in redisplay
11393 when IT->position is set up wrongly due to some bug.
11394 Set IT->current to match the bidi iterator unconditionally.
11395 (push_display_prop): Allow GET_FROM_STRING as IT->method on
11396 entry. Force push_it to save on the stack the current
11397 buffer/string position, to be restored by pop_it. Fix flags in
11398 the iterator structure wrt the object coming from a display
11399 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
11400 properties. (Bug#9284)
11402 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
11404 * fontset.c (fontset_get_font_group): Add proper type checks.
11407 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11409 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
11410 and LC_VERSION_MIN_MACOSX.
11411 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
11412 (dump_it) [LC_FUNCTION_STARTS]: Use it.
11414 2011-08-08 Eli Zaretskii <eliz@gnu.org>
11416 * xdisp.c (forward_to_next_line_start): Allow to use the
11417 no-display-properties-and-no-overlays under bidi display.
11418 Set disp_pos in the bidi iterator to avoid searches for display
11419 properties and overlays.
11421 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
11423 * editfns.c (Fset_time_zone_rule): Document relationship with the
11426 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
11427 the font entity extracted from the cache (Bug#8109).
11429 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
11431 * composite.c (autocmp_chars): Don't reset point. That is done by
11432 restore_point_unwind (Bug#5984).
11434 2011-08-07 Juri Linkov <juri@jurta.org>
11436 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
11437 to show the arg `TIME' instead of `TIMEVAL'.
11439 2011-08-06 Eli Zaretskii <eliz@gnu.org>
11441 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
11442 display property strides EOL and includes a newline, as in
11443 longlines-mode. (Bug#9254)
11444 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
11445 word-wrap under bidirectional display. (Bug#9224)
11447 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
11448 is non-zero, even if the data buffer is NULL. Fixes a crash in
11449 vertical-motion with longlines-mode. (Bug#9254)
11451 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11453 * bidi.c <bidi_cache_total_alloc>: Now static.
11454 (bidi_initialize): Initialize bidi_cache_total_alloc.
11456 * xdisp.c (display_line): Release buffer allocated for shelved bidi
11459 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
11460 amount allocated this far in `bidi_cache_total_alloc'.
11461 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
11462 non-zero, only free the data buffer without restoring the cache
11463 contents. All callers changed.
11465 * dispextern.h (bidi_unshelve_cache): Update prototype.
11467 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
11468 (move_it_in_display_line, move_it_to)
11469 (move_it_vertically_backward, move_it_by_lines): Replace the call
11470 to xfree to an equivalent call to bidi_unshelve_cache.
11471 (move_it_in_display_line_to): Fix logic of returning
11472 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
11474 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11476 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
11477 came from a string character with a `cursor' property. (Bug#9229)
11479 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
11481 * Makefile.in (LIB_PTHREAD): New variable.
11482 (LIBES): Add LIB_PTHREAD (Bug#9216).
11484 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
11485 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
11487 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
11489 * regex.c (re_iswctype): Remove some redundant boolean conversions.
11491 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
11493 * xterm.c (x_find_topmost_parent): New function.
11494 (x_set_frame_alpha): Find topmost parent window with
11495 x_find_topmost_parent and set the property there also (bug#9181).
11496 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
11498 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
11500 * callproc.c (Fcall_process): Avoid vfork clobbering
11501 the local vars buffer, coding_systems, current_dir.
11503 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
11505 * keymap.c (Fmake_composed_keymap): Move to subr.el.
11507 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
11509 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
11510 so that it is not optimized away.
11512 * xdisp.c (compute_display_string_pos): Remove unused local.
11514 2011-08-02 Eli Zaretskii <eliz@gnu.org>
11516 Fix slow cursor motion and scrolling in large buffers with
11517 selective display, like Org Mode buffers. (Bug#9218)
11519 * dispextern.h (struct bidi_it): New member disp_prop_p.
11521 * xdisp.c: Remove one-slot cache of display string positions.
11522 (compute_display_string_pos): Accept an additional argument
11523 DISP_PROP_P; callers changed. Scan at most 5K characters forward
11524 for a display string or property. If found, set DISP_PROP_P
11527 * bidi.c (bidi_fetch_char): Accept an additional argument
11528 DISP_PROP_P, and pass it to compute_display_string_pos.
11529 Only handle text covered by a display string if DISP_PROP_P is returned
11530 non-zero. All callers of bidi_fetch_char changed.
11532 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
11534 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
11536 2010-12-03 Don March <don@ohspite.net>
11538 * keymap.c (Fdefine_key): Fix non-prefix key error message when
11539 last character M-[char] is translated to ESC [char] (bug#7541).
11541 2011-08-02 Kenichi Handa <handa@m17n.org>
11543 * lisp.h (uniprop_table): Extern it.
11545 * chartab.c (uniprop_table): Make it non-static.
11547 2011-08-01 Eli Zaretskii <eliz@gnu.org>
11549 * xdisp.c (forward_to_next_line_start): Accept additional argument
11550 BIDI_IT_PREV, and store into it the state of the bidi iterator had
11552 (reseat_at_next_visible_line_start): Use the bidi iterator state
11553 returned by forward_to_next_line_start to restore the state of
11554 it->bidi_it after backing up to previous newline. (Bug#9212)
11556 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
11558 * regex.c (re_comp): Protoize.
11559 (re_exec): Fix return type.
11560 (regexec): Fix type of `ret'. (Bug#9203)
11562 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11564 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
11565 This is needed if max-image-size is a floating-point number.
11567 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
11569 * print.c (print_object): Print empty symbol as ##.
11571 * lread.c (read1): Read ## as empty symbol.
11573 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
11575 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
11576 setting frame foreground color (Bug#9175).
11577 (x_set_background_color): Likewise.
11579 * nsmenu.m (-setText): Size tooltip dimensions precisely to
11580 contents (Bug#9176).
11581 (EmacsTooltip -init): Remove bezels and add shadows to
11584 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
11585 or scroll bar (Bug#8470).
11587 * nsfont.m (nsfont_open): Remove assignment to voffset and
11588 unnecessary vars hshink, expand, hd, full_height, min_height.
11589 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
11591 * nsterm.h (nsfont_info): Remove voffset field.
11593 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
11595 Implement strike-through and overline on NextStep (Bug#8863).
11597 * nsfont.m (nsfont_open): Use underline position provided by font,
11598 instead of hard-coded value of 2.
11599 (nsfont_draw): Call ns_draw_text_decoration instead.
11601 * nsterm.h: Add declaration for ns_draw_text_decoration.
11603 * nsterm.m (ns_draw_text_decoration): New function for drawing
11604 underline, overline, and strike-through.
11605 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
11606 ns_draw_text_decoration. Change treatment of cursor drawing to
11607 accommodate underlining, etc.
11609 2011-07-28 Eli Zaretskii <eliz@gnu.org>
11611 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
11614 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11616 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
11617 Without this fix, if a signal arrives just after memory fills up,
11618 'malloc' might be invoked reentrantly.
11620 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
11621 In other words, assume that every image size is allowed, on non-X
11622 hosts. This assumption is probably wrong, but it lets Emacs compile.
11624 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
11626 * regex.c (re_iswctype): Convert return values to boolean.
11628 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
11630 * xdisp.c (compute_display_string_pos): Don't use cached display
11631 string position if the buffer had its restriction changed.
11634 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11636 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
11638 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11640 Integer signedness and overflow and related fixes. (Bug#9079)
11642 * bidi.c: Integer size and overflow fixes.
11643 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
11644 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
11645 (bidi_cache_find_level_change, bidi_cache_ensure_space)
11646 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
11647 (bidi_find_other_level_edge):
11648 Use ptrdiff_t instead of EMACS_INT where either will do.
11649 This works better on 32-bit hosts configured --with-wide-int.
11650 (bidi_cache_ensure_space): Check for size-calculation overflow.
11651 Use % rather than repeated addition, for better worst-case speed.
11652 Don't set bidi_cache_size until after xrealloc returns, because it
11654 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
11655 (bidi_cache_ensure_space): Also check that the bidi cache size
11656 does not exceed that of the largest Lisp string or buffer. See Eli
11657 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
11659 * alloc.c (__malloc_size_t): Remove.
11660 All uses replaced by size_t. See Andreas Schwab's note
11661 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
11663 * image.c: Improve checking for integer overflow.
11664 (check_image_size): Assume that f is nonnull, since
11665 it is always nonnull in practice. This is one less thing to
11666 worry about when checking for integer overflow later.
11667 (x_check_image_size): New function, which checks for integer
11668 overflow issues inside X.
11669 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
11670 This removes the need for a memory_full check.
11671 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
11672 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
11673 (xbm_read_bitmap_data): Change locals back to 'int', since
11674 their values must fit in 'int'.
11675 (xpm_load_image, png_load, tiff_load):
11676 Invoke x_create_x_image_and_pixmap earlier,
11677 to avoid much needless work if the image is too large.
11678 (tiff_load): Treat overly large images as if
11679 x_create_x_image_and_pixmap failed, not as malloc failures.
11680 (gs_load): Use x_check_image_size.
11682 * gtkutil.c: Omit integer casts.
11683 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
11684 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
11686 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
11688 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
11689 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
11690 would wrongly return t on a 64-bit host.
11692 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
11693 The plain *_OVERFLOW macros run afoul of GCC bug 49705
11694 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
11695 and therefore cause GCC to emit a bogus diagnostic in some cases.
11697 * image.c: Integer signedness and overflow and related fixes.
11698 This is not an exhaustive set of fixes, but it's time to
11699 record what I've got.
11700 (lookup_pixel_color, check_image_size): Remove redundant decls.
11701 (check_image_size): Don't assume that arbitrary EMACS_INT values
11702 fit in 'int', or that arbitrary 'double' values fit in 'int'.
11703 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
11704 (tiff_load, imagemagick_load_image):
11705 Check for overflow in size calculations.
11706 (x_create_x_image_and_pixmap): Remove unnecessary test for
11707 xmalloc returning NULL; that can't happen.
11708 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
11709 (xpm_color_bucket): Use better integer hashing function.
11710 (xpm_cache_color): Don't possibly over-allocate memory.
11711 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
11712 (gif_memory_source):
11713 Use ptrdiff_t, not int or size_t, to record sizes.
11714 (png_load): Don't assume values greater than 2**31 fit in 'int'.
11715 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
11716 either works, as we prefer signed integers.
11717 (tiff_read_from_memory, tiff_write_from_memory):
11718 Return tsize_t, not size_t, since that's what the TIFF API wants.
11719 (tiff_read_from_memory): Don't fail simply because the read would
11720 go past EOF; instead, return a short read.
11721 (tiff_load): Omit no-longer-needed casts.
11722 (Fimagemagick_types): Don't assume size fits into 'int'.
11724 Improve hashing quality when configured --with-wide-int.
11725 * fns.c (hash_string): New function, taken from sxhash_string.
11726 Do not discard information about ASCII character case; this
11727 discarding is no longer needed.
11728 (sxhash-string): Use it. Change sig to match it. Caller changed.
11729 * lisp.h: Declare it.
11730 * lread.c (hash_string): Remove, since we now use fns.c's version.
11731 The fns.c version returns a wider integer if --with-wide-int is
11732 specified, so this should help the quality of the hashing a bit.
11734 * emacs.c: Integer overflow minor fix.
11735 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
11736 Define only if GNU_LINUX.
11737 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
11739 * dispnew.c: Integer signedness and overflow fixes.
11740 Remove unnecessary forward decls, that were a maintenance hassle.
11741 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
11743 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
11744 (scrolling_window): Use ptrdiff_t, not int, for byte count.
11745 (prepare_desired_row, line_draw_cost):
11746 Use int, not unsigned, where either works.
11747 (save_current_matrix, restore_current_matrix):
11748 Use ptrdiff_t, not size_t, where either works.
11749 (init_display): Check for overflow more accurately, and without
11750 relying on undefined behavior.
11752 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
11753 Remove, replacing with the new symbols in lisp.h. All uses changed.
11754 * fileio.c (make_temp_name):
11755 * filelock.c (lock_file_1, lock_file):
11756 * xdisp.c (message_dolog):
11757 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
11758 Use pMd etc. instead.
11759 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
11760 replacing the pWIDE etc. symbols removed from editfns.c.
11762 * keyboard.h (num_input_events): Now uintmax_t.
11763 This is (very slightly) less likely to mess up due to wraparound.
11766 * buffer.c: Integer signedness fixes.
11767 (alloc_buffer_text, enlarge_buffer_text):
11768 Use ptrdiff_t rather than size_t when either will do, as we prefer
11771 * alloc.c: Integer signedness and overflow fixes.
11772 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
11773 (__malloc_size_t): Default to size_t, not to int.
11774 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
11775 (Fgarbage_collect, mark_object_loop_halt, mark_object):
11776 Prefer ptrdiff_t to size_t when either would do, as we prefer
11778 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
11779 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
11780 Now const. Initialize with values that are in range even if char
11782 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
11783 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
11784 These functions do the right thing with sizes > 2**32.
11785 (check_depth): Now ptrdiff_t, not int.
11786 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
11787 Adjust to new way of storing sizes. Check for size overflow bugs
11789 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
11790 slightly wrong anyway, as it missed one instance of
11791 XMALLOC_OVERRUN_CHECK_OVERHEAD.
11792 (refill_memory_reserve): Omit needless cast to size_t.
11793 (mark_object_loop_halt): Mark as externally visible.
11795 * xselect.c: Integer signedness and overflow fixes.
11796 (Fx_register_dnd_atom, x_handle_dnd_message):
11797 Use ptrdiff_t, not size_t, since we prefer signed.
11798 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
11799 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
11800 x_dnd_atoms_size and x_dnd_atoms_length.
11802 * doprnt.c: Prefer signed to unsigned when either works.
11804 * doprnt.c (doprnt):
11806 * xdisp.c (vmessage):
11807 Use ptrdiff_t, not size_t, when using or implementing doprnt,
11808 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
11809 prefer signed arithmetic to avoid comparison confusion.
11810 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
11811 but is a bit tricky.
11813 Assume freestanding C89 headers, string.h, stdlib.h.
11814 * data.c, doprnt.c, floatfns.c, print.c:
11815 Include float.h unconditionally.
11816 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
11817 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
11818 * regex.c: Likewise for stddef.h, string.h.
11819 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
11820 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
11821 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
11822 (STDC_HEADERS): Remove obsolete defines.
11823 * sysdep.c: Include limits.h unconditionally.
11825 Assume support for memcmp, memcpy, memmove, memset.
11826 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
11827 * regex.c (memcmp, memcpy):
11828 Remove; we assume C89 now.
11830 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
11831 (__malloc_safe_bcopy): Remove; no longer needed.
11833 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
11834 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
11835 well either way, and we prefer signed to unsigned.
11837 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
11839 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
11840 closes the connection while we're reading (bug#9182).
11842 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
11844 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
11845 are specified (Bug#9168).
11847 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
11849 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
11850 Found by GCC static checking and --with-wide-int on a 32-bit host.
11852 2011-07-25 Eli Zaretskii <eliz@gnu.org>
11854 * xdisp.c (compute_display_string_pos): Fix logic of caching
11855 previous display string position. Initialize cached_prev_pos to
11856 -1. Fixes slow-down at the beginning of a buffer.
11858 2011-07-24 Eli Zaretskii <eliz@gnu.org>
11860 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
11861 for attrs[LFACE_FONTSET_INDEX].
11863 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
11865 * xml.c (parse_region): Remove unused local
11866 that was recently introduced.
11868 2011-07-23 Eli Zaretskii <eliz@gnu.org>
11870 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
11871 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
11873 * xdisp.c (move_it_in_display_line_to): Record the best matching
11874 position for TO_CHARPOS while scanning the line, and restore it on
11875 exit if none of the characters scanned was an exact match.
11876 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
11877 when exact match is impossible due to invisible text, and the
11878 lines are truncated.
11880 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
11882 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
11885 2011-07-22 Eli Zaretskii <eliz@gnu.org>
11887 Fix a significant slow-down of cursor motion with C-n, C-p,
11888 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
11889 auto-repeat under bidi redisplay in fontified buffers.
11890 * xdisp.c (compute_stop_pos_backwards): New function.
11891 (next_element_from_buffer): Call compute_stop_pos_backwards to
11892 find a suitable prev_stop when we find ourselves before
11894 (reseat): Don't look for prev_stop, as that could mean a very long
11896 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
11897 <cached_disp_overlay_modiff>: Cache for last found display string
11899 (compute_display_string_pos): Return the cached position if asked
11900 about the same buffer in the same area of character positions, and
11901 the buffer wasn't changed since the time the display string
11902 position was cached.
11904 2011-07-22 Eli Zaretskii <eliz@gnu.org>
11906 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
11907 is an integer, which is important for empty lines. (Bug#9149)
11909 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
11911 * frame.c (Fmodify_frame_parameters): In tty case, update the
11912 default face if necessary (Bug#4238).
11914 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
11916 * editfns.c (Fstring_to_char): No need to explain what a character
11917 is in the docstring (Bug#6576).
11919 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11921 * xml.c (parse_region): Make sure we always return a tree.
11923 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
11925 * xml.c (parse_region): If a document contains only comments,
11928 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11930 * xml.c (make_dom): Return comments, too.
11932 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
11935 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
11936 and the surrounding thread.
11937 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
11938 rather than fgets, and retry after EINTR. Otherwise, 'emacs
11939 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
11941 * s/openbsd.h (BROKEN_SIGIO): Define.
11942 * unexelf.c (unexec) [__OpenBSD__]:
11943 Don't update the .mdebug section of the Alpha COFF symbol table.
11945 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11947 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
11950 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
11952 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
11953 This fixes some race conditions on the permissions of any newly
11956 * alloc.c (valid_pointer_p): Use pipe, not open.
11957 This fixes some permissions issues when debugging.
11959 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
11960 If fchown fails to set both uid and gid, try to set just gid,
11961 as that is sometimes allowed. Adjust the file's mode to eliminate
11962 setuid or setgid bits that are inappropriate if fchown fails.
11964 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
11966 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
11967 to compare Lisp_Objects.
11968 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
11969 global_gnutls_log_level, don't mistake it for a Lisp_Object.
11970 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
11972 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
11974 * lread.c (read_integer): Unread even EOF character.
11975 (read1): Likewise. Properly record start position of symbol.
11977 * lread.c (read1): Read `#:' as empty uninterned symbol if no
11978 symbol character follows.
11980 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
11982 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
11983 This works around a problem with the previous change to Fcopy_file.
11984 Recent glibc declares fchown with __attribute__((warn_unused_result)),
11985 and without this change, GCC might complain about discarding
11986 fchown's return value.
11988 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
11990 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
11992 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
11994 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
11996 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
11998 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
11999 it's used from the C level.
12001 * process.c: Use the same condition for POLL_FOR_INPUT in both
12002 keyboard.c and process.c (bug#1858).
12004 2011-07-09 Lawrence Mitchell <wence@gmx.li>
12006 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
12007 (Fgnutls_boot): Use it.
12009 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
12011 * doc.c (Fsubstitute_command_keys): Revert last change.
12013 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12015 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
12016 quotes the next character, and doesn't affect other longer
12017 sequences (bug#8935).
12019 * lread.c (syms_of_lread): Clarify that is isn't only
12020 `eval-buffer' and `eval-defun' that's affected by
12021 `lexical-binding' (bug#8460).
12023 2011-07-15 Eli Zaretskii <eliz@gnu.org>
12025 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
12026 bidi redisplay when a line includes both an image and is truncated.
12028 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
12030 Fix minor problems found by static checking.
12031 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
12032 (elsz): Now a signed constant, not a size_t var. We prefer signed
12033 types to unsigned, to avoid integer comparison confusion. Without
12034 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
12035 "cannot optimize loop, the loop counter may overflow", a symptom
12037 * indent.c (Fvertical_motion): Mark locals as initialized.
12038 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
12040 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12042 * search.c (Fre_search_backward): Mention `case-fold-search' in
12043 all the re_search_* functions (bug#8138).
12045 * keyboard.c (Fopen_dribble_file): Document when the file is
12048 2011-07-14 Eli Zaretskii <eliz@gnu.org>
12050 * bidi.c (bidi_dump_cached_states): Fix format of displaying
12053 Support bidi reordering of display and overlay strings.
12054 * xdisp.c (compute_display_string_pos)
12055 (compute_display_string_end): Accept additional argument STRING.
12056 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
12057 (reseat_to_string): Initialize bidi_it->string.s and
12058 bidi_it->string.schars.
12059 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
12060 NULL (avoids a crash in bidi_paragraph_init).
12061 Initialize itb.string.lstring.
12062 (init_iterator): Call bidi_init_it only of a valid
12063 buffer position was specified. Initialize paragraph_embedding to
12065 (reseat_to_string): Initialize the bidi iterator.
12066 (display_string): If we need to ignore text properties of
12067 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
12068 original value of -1 will not work with bidi.)
12069 (compute_display_string_pos): First arg is now struct
12070 `text_pos *'; all callers changed. Support display properties on
12072 (compute_display_string_end): Support display properties on Lisp
12074 (init_iterator, reseat_1, reseat_to_string): Initialize the
12075 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
12076 when iterating on a string not from display properties).
12077 (compute_display_string_pos, compute_display_string_end):
12078 Fix calculation of the object to scan. Fixes an error when using
12080 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
12081 base_level_stop; instead, set base_level_stop to BEGV.
12082 Fixes crashes in vertical-motion.
12083 (next_element_from_buffer): Improve commentary for when
12084 the iterator is before prev_stop.
12085 (init_iterator): Initialize bidi_p from the default value of
12086 bidi-display-reordering, not from buffer-local value. Use the
12087 buffer-local value only if initializing for buffer iteration.
12088 (handle_invisible_prop): Support invisible properties on strings
12089 that are being bidi-reordered.
12090 (set_iterator_to_next): Support bidi reordering of C strings and
12092 (next_element_from_string): Support bidi reordering of Lisp
12094 (handle_stop_backwards): Support Lisp strings as well.
12095 (display_string): Support display of R2L glyph rows.
12096 Use IT_STRING_CHARPOS when displaying from a Lisp string.
12097 (init_iterator): Don't initialize it->bidi_p for strings
12099 (reseat_to_string): Initialize it->bidi_p for strings here.
12100 (next_element_from_string, next_element_from_c_string)
12101 (next_element_from_buffer): Add xassert's for correspondence
12102 between IT's object being iterated and it->bidi_it.string
12104 (face_before_or_after_it_pos): Support bidi iteration.
12105 (next_element_from_c_string): Handle the case of the first string
12106 character that is not the first one in the visual order.
12107 (get_visually_first_element): New function, refactored from common
12108 parts of next_element_from_buffer, next_element_from_string, and
12109 next_element_from_c_string.
12110 (tool_bar_lines_needed, redisplay_tool_bar)
12111 (display_menu_bar): Force left-to-right direction. Add a FIXME
12112 comment for making that be controlled by a user option.
12113 (push_it, pop_it): Save and restore the state of the
12114 bidi iterator. Save and restore the bidi_p flag.
12115 (pop_it): Iterate out of display property for string iteration as
12117 (iterate_out_of_display_property): Support iteration over strings.
12118 (handle_single_display_spec): Set up it->bidi_it for iteration
12119 over a display string, and call bidi_init_it.
12120 (handle_single_display_spec, next_overlay_string)
12121 (get_overlay_strings_1, push_display_prop): Set up the bidi
12122 iterator for displaying display or overlay strings.
12123 (forward_to_next_line_start): Don't use the shortcut if
12125 (back_to_previous_visible_line_start): If handle_display_prop
12126 pushed the iterator stack, restore the internal state of the bidi
12127 iterator by calling bidi_pop_it same number of times.
12128 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
12129 and we are bidi-iterating, don't decrement the iterator position;
12130 instead, set the first_elt flag in the bidi iterator, to produce
12132 (reseat_1): Remove redundant setting of string_from_display_prop_p.
12133 (push_display_prop): xassert that we are iterating a buffer.
12134 (push_it, pop_it): Save and restore paragraph_embedding member.
12135 (handle_single_display_spec, next_overlay_string)
12136 (get_overlay_strings_1, reseat_1, reseat_to_string)
12137 (push_display_prop): Set up the `unibyte' member of bidi_it.string
12138 correctly. Don't assume unibyte strings are not bidi-reordered.
12139 (compute_display_string_pos)
12140 (compute_display_string_end): Fix handling the case of C string.
12141 (push_it, pop_it): Save and restore from_disp_prop_p.
12142 (handle_single_display_spec, push_display_prop): Set the
12143 from_disp_prop_p flag.
12144 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
12145 (pop_it): Call iterate_out_of_display_property only if we are
12146 popping after iteration over a string that came from a display
12147 property. Fix a typo in popping stretch info. Add an assertion
12148 for verifying that the iterator position is in sync with the bidi
12150 (handle_single_display_spec, get_overlay_strings_1)
12151 (push_display_prop): Fix initialization of paragraph direction for
12152 string when that of the parent object is not yet determined.
12153 (reseat_1): Call bidi_init_it to resync the bidi
12154 iterator with IT's position. (Bug#7616)
12155 (find_row_edges): If ROW->start.pos gives position
12156 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
12157 (handle_stop, back_to_previous_visible_line_start, reseat_1):
12158 Reset the from_disp_prop_p flag.
12159 (SAVE_IT, RESTORE_IT): New macros.
12160 (pos_visible_p, face_before_or_after_it_pos)
12161 (back_to_previous_visible_line_start)
12162 (move_it_in_display_line_to, move_it_in_display_line)
12163 (move_it_to, move_it_vertically_backward, move_it_by_lines)
12164 (try_scrolling, redisplay_window, display_line): Use them when
12165 saving a temporary copy of the iterator and restoring it back.
12166 (back_to_previous_visible_line_start, reseat_1)
12167 (init_iterator): Empty the bidi cache "stack".
12168 (move_it_in_display_line_to): If iterator ended up at
12169 EOL, but we never saw any buffer positions smaller than
12170 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
12171 motion in bidi-reordered lines.
12172 (move_it_in_display_line_to): Record prev_method and prev_pos
12173 immediately before the call to set_iterator_to_next. Fixes cursor
12174 motion in bidi-reordered lines with stretch glyphs and strings
12175 displayed in margins. (Bug#8133) (Bug#8867)
12176 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
12178 (pos_visible_p): Support positions in bidi-reordered lines.
12179 Save and restore bidi cache.
12181 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
12182 (bidi_paragraph_info): Delete unused struct.
12183 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
12184 (bidi_cache_start): New variable.
12185 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
12187 (bidi_cache_fetch_state, bidi_cache_search)
12188 (bidi_cache_find_level_change, bidi_cache_iterator_state)
12189 (bidi_cache_find, bidi_peek_at_next_level)
12190 (bidi_level_of_next_char, bidi_find_other_level_edge)
12191 (bidi_move_to_visually_next): Compare cache index with
12192 bidi_cache_start rather than with zero.
12193 (bidi_fetch_char): Accept new argument STRING; all callers
12194 changed. Support iteration over a string. Support strings with
12195 display properties. Support unibyte strings. Fix the type of
12196 `len' according to what STRING_CHAR_AND_LENGTH expects.
12197 (bidi_paragraph_init, bidi_resolve_explicit_1)
12198 (bidi_resolve_explicit, bidi_resolve_weak)
12199 (bidi_level_of_next_char, bidi_move_to_visually_next):
12200 Support iteration over a string.
12201 (bidi_set_sor_type, bidi_resolve_explicit_1)
12202 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
12203 can now be zero (for strings); special values 0 and -1 were
12204 changed to -1 and -2, respectively.
12205 (bidi_char_at_pos): New function.
12206 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
12207 Call it instead of FETCH_MULTIBYTE_CHAR.
12208 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
12209 initialized to valid values.
12210 (bidi_init_it): Don't initialize charpos and bytepos with invalid
12212 (bidi_level_of_next_char): Allow the sentinel "position" to pass
12213 the test for valid cached positions. Fix the logic for looking up
12214 the sentinel state in the cache. GCPRO the Lisp string we are
12216 (bidi_push_it, bidi_pop_it): New functions.
12217 (bidi_initialize): Initialize the bidi cache start stack pointer.
12218 (bidi_cache_ensure_space): New function, refactored from part of
12219 bidi_cache_iterator_state. Don't assume the required size is just
12220 one BIDI_CACHE_CHUNK away.
12221 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
12222 (bidi_count_bytes, bidi_char_at_pos): New functions.
12223 (bidi_cache_search): Don't assume bidi_cache_last_idx is
12224 always valid if bidi_cache_idx is valid.
12225 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
12226 is valid if it's going to be used.
12227 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
12228 (bidi_cache_fetch_state, bidi_cache_search)
12229 (bidi_cache_find_level_change, bidi_cache_ensure_space)
12230 (bidi_cache_iterator_state, bidi_cache_find)
12231 (bidi_find_other_level_edge, bidi_cache_start_stack):
12232 All variables related to cache indices are now EMACS_INT.
12234 * dispextern.h (struct bidi_string_data): New structure.
12235 (struct bidi_it): New member `string'. Make flag members be 1-bit
12236 fields, and put them last in the struct.
12237 (compute_display_string_pos, compute_display_string_end):
12239 (bidi_push_it, bidi_pop_it): Add prototypes.
12240 (struct iterator_stack_entry): New members bidi_p,
12241 paragraph_embedding, and from_disp_prop_p.
12242 (struct it): Member bidi_p is now a bit field 1 bit wide.
12243 (bidi_shelve_cache, bidi_unshelve_cache):
12244 Declare prototypes.
12246 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
12247 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
12248 and vector-like objects.
12250 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
12251 cache around display iteration.
12253 * window.c (Fwindow_end, window_scroll_pixel_based)
12254 (displayed_window_lines, Frecenter): Save and restore the bidi
12255 cache around display iteration.
12257 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12259 * editfns.c (Fdelete_region): Clarify the use of the named
12260 parameters (bug#6788).
12262 2011-07-14 Martin Rudalics <rudalics@gmx.at>
12264 * indent.c (Fvertical_motion): Set and restore w->pointm when
12265 saving and restoring the window's buffer (Bug#9006).
12267 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12269 * editfns.c (Fstring_to_char): Clarify just what is returned
12270 (bug#6576). Text by Eli Zaretskii.
12272 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
12274 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
12276 2011-07-13 Eli Zaretskii <eliz@gnu.org>
12278 * buffer.c (mmap_find): Fix a typo.
12280 2011-07-13 Johan Bockgård <bojohan@gnu.org>
12282 Fix execution of x selection hooks.
12283 * xselect.c (Qx_lost_selection_functions)
12284 (Qx_sent_selection_functions): New vars.
12285 (syms_of_xselect): DEFSYM them.
12286 (x_handle_selection_request): Pass Qx_sent_selection_functions
12287 rather than Vx_sent_selection_functions to Frun_hook_with_args.
12288 (x_handle_selection_clear,x_clear_frame_selections):
12289 Pass Qx_lost_selection_functions rather than
12290 Vx_lost_selection_functions to Frun_hook_with_args.
12292 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
12294 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
12295 The old code sometimes used this field without initializing it.
12297 * alloc.c (gc_sweep): Don't read past end of array.
12298 In theory, the old code could also have corrupted Emacs internals,
12299 though it'd be very unlikely.
12301 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
12303 * character.c (Fcharacterp): Don't advertise optional ignored
12304 argument. (Bug#4026)
12306 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
12308 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
12311 * window.c (Fset_window_start): Doc fix (bug#4199).
12312 (Fset_window_hscroll): Ditto.
12314 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
12316 Fix minor new problems caught by GCC 4.6.1.
12317 * term.c (init_tty): Remove unused local.
12318 * xsettings.c (store_monospaced_changed): Define this function only
12319 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
12320 not used otherwise.
12322 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
12324 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
12326 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
12328 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
12329 are the mini-buffer and the echo area (bug#3320).
12331 * term.c (init_tty): Remove support for supdup, c10 and perq
12332 terminals, which are no longer supported (bug#1482).
12334 2011-07-10 Johan Bockgård <bojohan@gnu.org>
12336 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
12338 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
12340 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
12341 for non-popups (Bug#3642).
12343 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
12345 * alloc.c (reset_malloc_hooks): Protoize.
12346 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
12347 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
12348 * cm.c (losecursor): Likewise.
12349 * data.c (fmod): Likewise.
12350 * dispnew.c (swap_glyphs_in_rows): Likewise.
12351 * emacs.c (memory_warning_signal): Likewise.
12352 * floatfns.c (float_error): Likewise.
12353 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
12354 (otf_open, font_otf_capability, generate_otf_features)
12355 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
12357 * image.c (pbm_read_file): Likewise.
12358 * indent.c (string_display_width): Likewise.
12359 * intervals.c (check_for_interval, search_for_interval)
12360 (inc_interval_count, count_intervals, root_interval)
12361 (adjust_intervals_for_insertion, make_new_interval): Likewise.
12362 * lread.c (defalias): Likewise.
12363 * ralloc.c (r_alloc_check): Likewise.
12364 * regex.c (set_image_of_range_1, set_image_of_range)
12365 (regex_grow_registers): Likewise.
12366 * sysdep.c (strerror): Likewise.
12367 * termcap.c (valid_filename_p, tprint, main): Likewise.
12368 * tparam.c (main): Likewise.
12369 * unexhp9k800.c (run_time_remap, save_data_space)
12370 (update_file_ptrs, read_header, write_header, calculate_checksum)
12371 (copy_file, copy_rest, display_header): Likewise.
12372 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
12374 * xdisp.c (check_it): Likewise.
12375 * xfaces.c (register_color, unregister_color, unregister_colors):
12377 * xfns.c (print_fontset_result): Likewise.
12378 * xrdb.c (member, fatal, main): Likewise.
12380 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
12382 Fix minor problems found by static checking (Bug#9031).
12383 * chartab.c (char_table_set_range, map_sub_char_table):
12384 Remove unused locals.
12385 (uniprop_table): Now static.
12386 * composite.c (_work_char): Remove unused static var.
12388 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
12390 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
12392 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
12394 * gtkutil.c (qttip_cb): Remove code without function.
12396 2011-07-09 Eli Zaretskii <eliz@gnu.org>
12398 * w32.c (pthread_sigmask): New stub.
12400 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
12402 Use pthread_sigmask, not sigprocmask (Bug#9010).
12403 sigprocmask is portable only for single-threaded applications, and
12404 Emacs can be multi-threaded when it uses GTK.
12405 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
12407 * callproc.c (Fcall_process):
12408 * process.c (create_process):
12409 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
12410 Use pthread_sigmask, not sigprocmask.
12412 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
12414 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
12415 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
12418 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
12420 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
12421 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
12422 (xg_hide_tooltip): Fix comment.
12424 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
12425 in registerServicesMenuSendTypes.
12426 (validRequestorForSendType): Don't check ns_return_types.
12428 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
12431 2011-07-08 Jason Rumney <jasonr@gnu.org>
12433 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
12434 SH_SHOW for hidden windows (Bug#5482).
12436 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
12437 frame struct members of non-existent frames (Bug#6284).
12439 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
12441 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
12442 variable firstTime not needed on OSX >= 10.6.
12443 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
12444 >= 10.5. Use setKnobProportion, setDoubleValue.
12446 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
12447 (MAC_OS_X_VERSION_10_5): Define if not defined.
12448 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
12449 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
12450 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
12452 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
12453 cString and lossyCString on OSX >= 10.4.
12455 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
12456 sizeToFit on OSX >= 10.2.
12458 * nsimage.m (allocInitFromFile): Don't use deprecated method
12459 bestRepresentationForDevice on OSX >= 10.6.
12461 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
12464 * emacs.c: Declare unexec_init_emacs_zone.
12466 * nsgui.h: Fix compiler warning about gnulib redefining verify.
12468 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
12470 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
12471 on svcsMenu (Bug#8842).
12473 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
12475 (Fns_list_services): Just return Qnil on 10.6, code not working there.
12477 * nsterm.m (QUTF8_STRING): Declare.
12478 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
12479 (validRequestorForSendType): Return type is (id).
12480 Change indexOfObjectIdenticalTo to indexOfObject.
12481 Check if we have local selection before returning self (Bug#8842).
12482 (writeSelectionToPasteboard): Put local selection into paste board
12483 if we have a local selection (Bug#8842).
12484 (syms_of_nsterm): DEFSYM QUTF8_STRING.
12486 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
12487 (ns_get_local_selection): Declare.
12489 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
12491 * keymap.c (describe_map_tree): Don't insert a double newline at
12492 the end of the buffer (bug#1169) and return whether we inserted
12495 * callint.c (Fcall_interactively): Change "reading args" to
12496 "providing args" to try to clarify what it does (bug#1010).
12498 2011-07-07 Kenichi Handa <handa@m17n.org>
12500 * composite.c (composition_compute_stop_pos): Ignore a static
12501 composition starting before CHARPOS (Bug#8915).
12503 * xdisp.c (handle_composition_prop): Likewise.
12505 2011-07-07 Eli Zaretskii <eliz@gnu.org>
12507 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
12510 2011-07-07 Kenichi Handa <handa@m17n.org>
12512 * character.h (unicode_category_t): New enum type.
12514 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
12515 (Qchar_code_property_table): New variable.
12516 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
12517 (UNIPROP_COMPRESSED_FORM_P): New macros.
12518 (char_table_ascii): Uncompress the compressed values.
12519 (sub_char_table_ref): New arg is_uniprop. Callers changed.
12520 Uncompress the compressed values.
12521 (sub_char_table_ref_and_range): Likewise.
12522 (char_table_ref_and_range): Uncompress the compressed values.
12523 (sub_char_table_set): New arg is_uniprop. Callers changed.
12524 Uncompress the compressed values.
12525 (sub_char_table_set_range): Args changed. Callers changed.
12526 (char_table_set_range): Adjuted for the above change.
12527 (map_sub_char_table): Delete args default_val and parent. Add arg
12528 top. Give decoded values to a Lisp function.
12529 (map_char_table): Adjust for the above change. Give decoded
12530 values to a Lisp function. Gcpro more variables.
12531 (uniprop_table_uncompress)
12532 (uniprop_decode_value_run_length): New functions.
12533 (uniprop_decoder, uniprop_decoder_count): New variables.
12534 (uniprop_get_decoder, uniprop_encode_value_character)
12535 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
12537 (uniprop_encoder, uniprop_encoder_count): New variables.
12538 (uniprop_get_encoder, uniprop_table)
12539 (Funicode_property_table_internal, Fget_unicode_property_internal)
12540 (Fput_unicode_property_internal): New functions.
12541 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
12542 Sunicode_property_table_internal, Sget_unicode_property_internal,
12543 and Sput_unicode_property_internal. Defvar_lisp
12544 char-code-property-alist.
12546 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
12547 Vunicode_category_table.
12549 * font.c (font_range): Adjust for the change of
12550 Vunicode_category_table.
12552 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
12554 * m/iris4d.h: Remove file, move contents ...
12555 * s/irix6-5.h: ... here.
12557 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
12559 Remove unportable assumption about struct layout (Bug#8884).
12560 * alloc.c (mark_buffer):
12561 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
12562 (clone_per_buffer_values): Don't assume that
12563 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
12564 This isn't true in general, and it's particularly not true
12565 if Emacs is configured with --with-wide-int.
12566 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
12567 New macros, used in the buffer.c change.
12569 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
12571 * xsettings.c: Use both GConf and GSettings if both are available.
12572 (store_config_changed_event): Add comment.
12573 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
12574 (store_tool_bar_style_changed): New functions.
12575 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
12576 (struct xsettings): Move font inside HAVE_XFT.
12577 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
12578 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
12579 Move inside HAVE_XFT.
12580 (something_changed_gsettingsCB): Rename from something_changedCB.
12581 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
12583 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
12584 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
12585 (something_changed_gconfCB): Rename from something_changedCB.
12586 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
12587 (parse_settings): Move check for font inside HAVE_XFT.
12588 (read_settings, apply_xft_settings): Add comment.
12589 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
12590 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
12591 call store_font_name_changed.
12592 (xft_settings_event): Add comment.
12593 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
12594 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
12595 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
12596 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
12597 (xsettings_initialize): Call init_gsettings last.
12598 (xsettings_get_system_font, xsettings_get_system_normal_font):
12601 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
12603 Random fixes. E.g., (random) never returned negative values.
12604 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
12605 subseconds part to the entropy, as that's a bit more random.
12606 Prefer signed to unsigned, since the signedness doesn't matter and
12607 in general we prefer signed. When given a limit, use a
12608 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
12609 latter isn't right if USE_2_TAGS_FOR_INTS.
12610 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
12611 not 0..VALMASK. Don't discard "excess" bits that random () returns.
12613 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
12615 * textprop.c (text_property_stickiness):
12616 Obey Vtext_property_default_nonsticky.
12617 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
12618 * w32fns.c (syms_of_w32fns):
12619 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
12621 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
12623 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
12624 This is more efficient than Ffile_directory_p and avoids a minor race.
12626 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
12628 * buffer.c (Foverlay_put): Say what the return value is
12631 * fileio.c (barf_or_query_if_file_exists): Check first if the file
12632 is a directory before asking whether to use the file name
12634 (barf_or_query_if_file_exists): Make the "File is a directory"
12635 error be more correct.
12637 * fns.c (Frequire): Remove the mention of the .gz files, since
12638 that's installation-specific, but keep the mention of
12639 `get-load-suffixes'.
12641 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
12643 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
12644 Report string overflow if the output is too long.
12646 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
12648 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
12649 (syms_of_gnutls): Remove duplicate DEFSYM for
12650 Qgnutls_bootprop_verify_hostname_error, an error for
12651 Qgnutls_bootprop_verify_error (which is no longer used).
12653 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
12654 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
12655 Also (re)move comments that are misplaced or no longer relevant.
12657 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12659 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
12661 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
12663 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
12664 and background color parameters if they have been changed.
12666 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12668 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
12670 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
12672 * xsettings.c (SYSTEM_FONT): Define only when used.
12673 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
12675 * keymap.c (access_keymap_1): Now static.
12677 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
12679 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
12680 leave any prefix arg for the up event (Bug#1586).
12682 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
12684 * lread.c (syms_of_lread): Mention single symbols defined by
12685 `defvar' or `defconst' (bug#7154).
12687 * fns.c (Frequire): Mention .el.gz files (bug#7314).
12688 (Frequire): Mention get-load-suffixes.
12690 2011-07-02 Martin Rudalics <rudalics@gmx.at>
12692 * window.h (window): Remove clone_number slot.
12693 * window.c (Fwindow_clone_number, Fset_window_clone_number):
12695 (make_parent_window, make_window, saved_window)
12696 (Fset_window_configuration, save_window_save): Don't deal with
12698 * buffer.c (Qclone_number): Remove declaration.
12699 (sort_overlays, overlay_strings): Don't deal with clone numbers.
12701 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
12703 Add multiple inheritance to keymaps.
12704 * keymap.c (Fmake_composed_keymap): New function.
12705 (Fset_keymap_parent): Simplify.
12706 (fix_submap_inheritance): Remove.
12707 (access_keymap_1): New function extracted from access_keymap to handle
12708 embedded parents and handle lists of maps.
12709 (access_keymap): Use it.
12710 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
12711 (Fcopy_keymap): Handle embedded parents.
12712 (Fcommand_remapping, define_as_prefix): Simplify.
12713 (Fkey_binding): Simplify.
12714 (syms_of_keymap): Move minibuffer-local-completion-map,
12715 minibuffer-local-filename-completion-map,
12716 minibuffer-local-must-match-map, and
12717 minibuffer-local-filename-must-match-map to Elisp.
12718 (syms_of_keymap): Defsubr make-composed-keymap.
12719 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
12720 (parse_menu_item): Trivial simplification.
12722 2011-07-01 Glenn Morris <rgm@gnu.org>
12724 * Makefile.in (SETTINGS_LIBS): Fix typo.
12726 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
12728 * coding.c (Fencode_coding_string): Record the last coding system
12729 used, as the function doc string says (bug#8738).
12731 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
12733 * xsettings.c (store_monospaced_changed): Take new font as arg and
12734 check for change against current_mono_font.
12735 (EMACS_TYPE_SETTINGS): Remove this and related defines.
12736 (emacs_settings_constructor, emacs_settings_get_property)
12737 (emacs_settings_set_property, emacs_settings_class_init)
12738 (emacs_settings_init, gsettings_obj): Remove.
12739 (something_changedCB): New function for HAVE_GSETTINGS.
12740 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
12741 with value as argument.
12742 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
12743 g_settings_new (Bug#8967). Do not create gsettings_obj.
12744 Remove calls to g_settings_bind. Connect something_changedCB to
12747 * xgselect.c: Add defined (HAVE_GSETTINGS).
12748 (xgselect_initialize): Ditto.
12750 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
12751 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
12754 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
12756 * eval.c (struct backtrace): Simplify and port the data structure.
12757 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
12758 signed bit field, as this assumption is not portable and it makes
12759 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
12760 "char debug_on_exit : 1" as this is not portable either; instead,
12761 use the portable "unsigned int debug_on_exit : 1". Remove unused
12762 member evalargs. Remove obsolete comments about cc bombing out.
12764 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
12766 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
12767 Let HAVE_GSETTINGS override HAVE_GCONF.
12768 (store_monospaced_changed): New function.
12769 (EMACS_SETTINGS): A new type derived from GObject to handle
12770 GSettings notifications.
12771 (emacs_settings_constructor, emacs_settings_get_property)
12772 (emacs_settings_set_property, emacs_settings_class_init):
12774 (gsettings_client, gsettings_obj): New variables.
12775 (GSETTINGS_SCHEMA): New define.
12776 (something_changedCB): Call store_monospaced_changed.
12777 (init_gsettings): New function.
12778 (xsettings_initialize): Call init_gsettings.
12779 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
12782 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
12785 2011-06-29 Martin Rudalics <rudalics@gmx.at>
12787 * window.c (resize_root_window, grow_mini_window)
12788 (shrink_mini_window): Rename Qresize_root_window to
12789 Qwindow_resize_root_window and Qresize_root_window_vertically to
12790 Qwindow_resize_root_window_vertically.
12792 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
12794 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
12796 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
12798 * makefile.w32-in: Redesign dependencies so they reflect more
12799 clearly which files are directly included by each source file,
12800 and not through other includes.
12802 2011-06-27 Martin Rudalics <rudalics@gmx.at>
12804 * buffer.c (Qclone_number): Declare static and DEFSYM it.
12805 (sort_overlays, overlay_strings): When an overlay's clone number
12806 matches the window's clone number process the overlay even if
12807 the overlay's window property doesn't match the current window.
12809 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
12810 (Fwindow_hchild): Rename to Fwindow_left_child.
12811 (Fwindow_next): Rename to Fwindow_next_sibling.
12812 (Fwindow_prev): Rename to Fwindow_prev_sibling.
12813 (resize_window_check): Rename to window_resize_check.
12814 (resize_window_apply): Rename to window_resize_apply.
12815 (Fresize_window_apply): Rename to Fwindow_resize_apply.
12816 (Fdelete_other_windows_internal, resize_frame_windows)
12817 (Fsplit_window_internal, Fdelete_window_internal)
12818 (grow_mini_window, shrink_mini_window)
12819 (Fresize_mini_window_internal): Fix callers accordingly.
12821 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
12823 * emacsgtkfixed.h: State that this is only used with Gtk+3.
12824 (emacs_fixed_set_min_size): Remove.
12825 (emacs_fixed_new): Take frame as argument.
12827 * emacsgtkfixed.c: State that this is only used with Gtk+3.
12828 (_EmacsFixedPrivate): Remove minwidth/height.
12829 Add struct frame *f.
12830 (emacs_fixed_init): Initialize priv->f.
12831 (get_parent_class, emacs_fixed_set_min_size): Remove.
12832 (emacs_fixed_new): Set priv->f to argument.
12833 (emacs_fixed_get_preferred_width)
12834 (emacs_fixed_get_preferred_height): Use min_width/height from
12835 frames size_hint to set minimum and natural (Bug#8919).
12836 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
12837 and use min_width/height from frames size_hint to set
12838 min_width/height (Bug#8919).
12840 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
12841 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
12844 2011-06-26 Eli Zaretskii <eliz@gnu.org>
12846 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
12847 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
12850 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
12852 * process.c (wait_reading_process_output): Bypass select if
12853 waiting for a cell while ignoring keyboard input, and input is
12854 pending. Suggested by Jan Djärv (Bug#8869).
12856 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
12858 Use gnulib's dup2 module instead of rolling our own.
12859 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
12861 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12863 * dispnew.c (scrolling_window): Before scrolling, turn off a
12864 mouse-highlight in the window being scrolled.
12866 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
12868 Move DEFSYM to lisp.h and use everywhere.
12870 * character.h (DEFSYM): Move declaration...
12871 * lisp.h (DEFSYM): ...here.
12877 * w32select.c: Don't include character.h.
12879 * alloc.c (syms_of_alloc):
12880 * buffer.c (syms_of_buffer):
12881 * bytecode.c (syms_of_bytecode):
12882 * callint.c (syms_of_callint):
12883 * casefiddle.c (syms_of_casefiddle):
12884 * casetab.c (init_casetab_once):
12885 * category.c (init_category_once, syms_of_category):
12886 * ccl.c (syms_of_ccl):
12887 * cmds.c (syms_of_cmds):
12888 * composite.c (syms_of_composite):
12889 * dbusbind.c (syms_of_dbusbind):
12890 * dired.c (syms_of_dired):
12891 * dispnew.c (syms_of_display):
12892 * doc.c (syms_of_doc):
12893 * editfns.c (syms_of_editfns):
12894 * emacs.c (syms_of_emacs):
12895 * eval.c (syms_of_eval):
12896 * fileio.c (syms_of_fileio):
12897 * fns.c (syms_of_fns):
12898 * frame.c (syms_of_frame):
12899 * fringe.c (syms_of_fringe):
12900 * insdel.c (syms_of_insdel):
12901 * keymap.c (syms_of_keymap):
12902 * lread.c (init_obarray, syms_of_lread):
12903 * macros.c (syms_of_macros):
12904 * msdos.c (syms_of_msdos):
12905 * print.c (syms_of_print):
12906 * process.c (syms_of_process):
12907 * search.c (syms_of_search):
12908 * sound.c (syms_of_sound):
12909 * syntax.c (init_syntax_once, syms_of_syntax):
12910 * terminal.c (syms_of_terminal):
12911 * textprop.c (syms_of_textprop):
12912 * undo.c (syms_of_undo):
12913 * w32.c (globals_of_w32):
12914 * window.c (syms_of_window):
12915 * xdisp.c (syms_of_xdisp):
12916 * xfaces.c (syms_of_xfaces):
12917 * xfns.c (syms_of_xfns):
12918 * xmenu.c (syms_of_xmenu):
12919 * xsettings.c (syms_of_xsettings):
12920 * xterm.c (syms_of_xterm): Use DEFSYM.
12922 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
12924 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
12926 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
12928 Integer and buffer overflow fixes (Bug#8873).
12930 * print.c (printchar, strout): Check for string overflow.
12931 (PRINTPREPARE, printchar, strout):
12932 Don't set size unless allocation succeeds.
12934 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
12935 for sizes. Check for string overflow more accurately.
12936 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
12938 * macros.c: Integer and buffer overflow fixes.
12939 * keyboard.h (struct keyboard.kbd_macro_bufsize):
12940 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
12941 Use ptrdiff_t, not int, for sizes.
12942 Don't increment bufsize until after realloc succeeds.
12943 Check for size-calculation overflow.
12944 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
12946 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
12948 * lread.c: Integer overflow fixes.
12949 (read_integer): Radix is now EMACS_INT, not int,
12950 to improve quality of diagnostics for out-of-range radices.
12951 Calculate buffer size correctly for out-of-range radices.
12952 (read1): Check for integer overflow in radices, and in
12953 read-circle numbers.
12954 (read_escape): Avoid int overflow.
12955 (Fload, openp, read_buffer_size, read1)
12956 (substitute_object_recurse, read_vector, read_list, map_obarray):
12957 Use ptrdiff_t, not int, for sizes.
12958 (read1): Use EMACS_INT, not int, for sizes.
12959 Check for size overflow.
12961 * image.c (cache_image): Check for size arithmetic overflow.
12963 * lread.c: Integer overflow issues.
12964 (saved_doc_string_size, saved_doc_string_length)
12965 (prev_saved_doc_string_size, prev_saved_doc_string_length):
12966 Now ptrdiff_t, not int.
12967 (read1): Don't assume doc string length fits in int. Check for
12968 out-of-range doc string lengths.
12969 (read_list): Don't assume file position fits in int.
12970 (read_escape): Check for hex character overflow.
12972 2011-06-22 Leo Liu <sdl.web@gmail.com>
12974 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
12975 Move to minibuffer.el.
12977 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12979 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
12980 The following patches are for when GLYPH_DEBUG && !XASSERT.
12981 * dispextern.h (trace_redisplay_p, dump_glyph_string):
12982 * dispnew.c (flush_stdout):
12983 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
12984 Mark as externally visible.
12985 * dispnew.c (check_window_matrix_pointers): Now static.
12986 * dispnew.c (window_to_frame_vpos):
12987 * xfns.c (unwind_create_frame):
12988 * xterm.c (x_check_font): Remove unused local.
12989 * scroll.c (CHECK_BOUNDS):
12990 * xfaces.c (cache_fache): Rename local to avoid shadowing.
12991 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
12992 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
12993 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
12994 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
12996 (debug_method_add): Use va_list and vsprintf rather than relying
12997 on undefined behavior with wrong number of arguments.
12998 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
12999 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
13000 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
13001 since we're not interested in debugging glyphs with old libraries.
13002 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
13003 GCC 4.6.0's static checking.
13005 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
13007 Integer overflow and signedness fixes (Bug#8873).
13008 A few related buffer overrun fixes, too.
13010 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
13012 * dispextern.h (struct face.stipple):
13013 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
13014 (x_bitmap_mask, x_allocate_bitmap_record)
13015 (x_create_bitmap_from_data, x_create_bitmap_from_file)
13016 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
13017 (x_create_bitmap_from_xpm_data):
13018 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
13019 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
13021 * xfaces.c (load_pixmap):
13022 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
13023 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
13024 (.bitmaps_last, struct x_output.icon_bitmap):
13025 Use ptrdiff_t, not int, for bitmap indexes.
13026 (x_allocate_bitmap_record): Check for size overflow.
13027 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
13029 Use ptrdiff_t, not int, for overlay counts.
13030 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
13031 * editfns.c (overlays_around, get_pos_property):
13032 * textprop.c (get_char_property_and_overlay):
13033 * xdisp.c (next_overlay_change, note_mouse_highlight):
13034 * xfaces.c (face_at_buffer_position):
13035 * buffer.c (OVERLAY_COUNT_MAX): New macro.
13036 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
13037 (Fnext_overlay_change, Fprevious_overlay_change)
13038 (mouse_face_overlay_overlaps, Foverlays_in):
13039 Use ptrdiff_t, not int, for sizes.
13040 (overlays_at, overlays_in): Check for size-calculation overflow.
13042 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
13044 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
13045 (x_session_initialize): Do not assume string length fits in int.
13047 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
13048 This is unlikely, but can occur if DPI is outlandish.
13050 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
13051 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
13053 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
13054 * xrdb.c (magic_file_p, search_magic_path):
13055 Omit last arg SUFFIX; it was always 0. All callers changed.
13056 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
13058 * xfont.c (xfont_match): Avoid need for strlen.
13060 * xfns.c: Don't assume strlen fits in int.
13061 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
13063 * xdisp.c (message_log_check_duplicate): Return intmax_t,
13064 not unsigned long, as we prefer signed integers. All callers changed.
13065 Detect integer overflow in repeat count.
13066 (message_dolog): Don't assume print length fits in 39 bytes.
13067 (display_mode_element): Don't assume strlen fits in int.
13069 * termcap.c: Don't assume sizes fit in int and never overflow.
13070 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
13071 (gobble_line): Check for size-calculation overflow.
13073 * minibuf.c (Fread_buffer):
13074 * lread.c (intern, intern_c_string):
13075 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
13076 Don't assume string length fits in int.
13078 * keyboard.c (parse_tool_bar_item):
13079 * gtkutil.c (style_changed_cb): Avoid need for strlen.
13081 * font.c: Don't assume string length fits in int.
13082 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
13083 Use ptrdiff_t, not int.
13084 (font_intern_prop): Don't assume string length fits in int.
13085 Don't assume integer property fits in fixnum.
13086 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
13088 * filelock.c: Fix some buffer overrun and integer overflow issues.
13089 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
13090 Reformulate so as not to need the command string.
13091 Invoke gzip -cd rather than gunzip, as it's more portable.
13092 (lock_info_type, lock_file_1, lock_file):
13093 Don't assume pid_t and time_t fit in unsigned long.
13094 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
13095 (current_lock_owner): Prefer signed type for sizes.
13096 Use memcpy, not strncpy, where memcpy is what is really wanted.
13097 Don't assume (via atoi) that time_t and pid_t fit in int.
13098 Check for time_t and/or pid_t out of range, e.g., via a network share.
13099 Don't alloca where an auto var works fine.
13101 * fileio.c: Fix some integer overflow issues.
13102 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
13103 Don't assume string length fits in int.
13104 (directory_file_name): Don't assume string length fits in long.
13105 (make_temp_name): Don't assume pid fits in int, or that its print
13106 length is less than 20.
13108 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
13110 * coding.c (make_subsidiaries): Don't assume string length fits in int.
13112 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
13114 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
13115 We prefer signed integers, even for size calculations.
13117 * emacs.c: Don't assume string length fits in 'int'.
13118 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
13119 (main): Don't invoke strlen when not needed.
13121 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
13122 (XD_DEBUG_MESSAGE): Don't waste a byte.
13124 * callproc.c (getenv_internal_1, getenv_internal)
13125 (Fgetenv_internal):
13126 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
13128 * lread.c (invalid_syntax): Omit length argument.
13129 All uses changed. This doesn't fix a bug, but it simplifies the
13130 code away from its former Hollerith-constant appearance, and it's
13131 one less 'int' to worry about when looking at integer-overflow issues.
13132 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
13134 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
13135 This didn't break anything, but it didn't help either.
13136 It's confusing to put a bogus integer in a place where the actual
13137 value does not matter.
13138 (LIST_END_P): Remove unused macro and its bogus comment.
13139 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
13141 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
13142 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
13144 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
13145 We prefer signed types, and the value cannot exceed the EMACS_INT
13146 range anyway (because otherwise the length would not be representable).
13147 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
13148 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
13149 This avoids a GCC warning when WIDE_EMACS_INT.
13151 * indent.c (sane_tab_width): New function.
13152 (current_column, scan_for_column, Findent_to, position_indentation)
13153 (compute_motion): Use it. This is just for clarity.
13154 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
13156 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
13158 * lisp.h (lint_assume): New macro.
13159 * composite.c (composition_gstring_put_cache):
13160 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
13162 * editfns.c, insdel.c:
13163 Omit unnecessary forward decls, to simplify future changes.
13165 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
13167 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
13169 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
13170 Use much-faster test for byte-length change.
13171 Don't assume string byte-length fits in 'int'.
13172 Check that character arg fits in 'int'.
13173 (mapcar1): Declare byte as byte, for clarity.
13175 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
13177 * fns.c (concat): Catch string overflow earlier.
13178 Do not rely on integer wraparound.
13180 * dispextern.h (struct it.overlay_strings_charpos)
13181 (struct it.selective): Now EMACS_INT, not int.
13182 * xdisp.c (forward_to_next_line_start)
13183 (back_to_previous_visible_line_start)
13184 (reseat_at_next_visible_line_start, next_element_from_buffer):
13185 Don't arbitrarily truncate the value of 'selective' to int.
13187 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
13189 * composite.c: Don't truncate sizes to 'int'.
13190 (composition_gstring_p, composition_reseat_it)
13191 (composition_adjust_point): Use EMACS_INT, not int.
13192 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
13193 not EMACS_UINT, for indexes.
13195 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
13197 * buffer.c: Include <verify.h>.
13198 (struct sortvec.priority, struct sortstr.priority):
13199 Now EMACS_INT, not int.
13200 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
13201 (struct sortstr.size, record_overlay_string)
13202 (struct sortstrlist.size, struct sortlist.used):
13203 Don't truncate size to int.
13204 (record_overlay_string): Check for size-calculation overflow.
13205 (init_buffer_once): Check at compile-time, not run-time.
13207 2011-06-22 Jim Meyering <meyering@redhat.com>
13209 Don't leak an XBM-image-sized buffer
13210 * image.c (xbm_load): Free the image buffer after using it.
13212 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
13215 * composite.c (find_automatic_composition): Omit needless 'return 0;'
13216 that Sun C diagnosed.
13217 * fns.c (secure_hash): Fix pointer signedness issue.
13218 * intervals.c (static_offset_intervals): New function.
13219 (offset_intervals): Use it.
13221 2011-06-21 Leo Liu <sdl.web@gmail.com>
13224 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
13227 * fns.c (secure_hash): Rename from crypto_hash_function and change
13228 the first arg to accept symbols.
13229 (Fsecure_hash): New primitive.
13230 (syms_of_fns): New symbols.
13232 2011-06-20 Deniz Dogan <deniz@dogan.se>
13234 * process.c (Fset_process_buffer): Clarify return value in
13237 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
13239 * dispnew.c (add_window_display_history): Use BVAR.
13241 * xdisp.c (debug_method_add): Use BVAR.
13242 (check_window_end, dump_glyph_matrix, dump_glyph)
13243 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
13245 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
13248 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
13249 check till after the cache is created in init_frame_faces.
13251 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
13253 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
13255 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
13257 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
13258 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
13259 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
13261 Improve buffer-overflow checking (Bug#8873).
13262 * fileio.c (Finsert_file_contents):
13263 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
13264 Remove the old (too-loose) buffer overflow checks.
13265 They weren't needed, since make_gap checks for buffer overflow.
13266 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
13267 The old code merely checked for Emacs fixnum overflow, and relied
13268 on undefined (wraparound) behavior. The new code avoids undefined
13269 behavior, and also checks for ptrdiff_t and/or size_t overflow.
13271 * editfns.c (Finsert_char): Don't dump core with very negative counts.
13272 Tune. Don't use wider integers than needed. Don't use alloca.
13273 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
13275 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
13277 * insdel.c, lisp.h (buffer_overflow): New function.
13278 (insert_from_buffer_1, replace_range, replace_range_2):
13279 * insdel.c (make_gap_larger):
13280 * editfns.c (Finsert_char):
13281 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
13283 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
13285 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
13287 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
13289 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
13290 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
13292 * fileio.c: Don't assume EMACS_INT fits in off_t.
13293 (emacs_lseek): New static function.
13294 (Finsert_file_contents, Fwrite_region): Use it.
13295 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
13297 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
13299 * fns.c: Don't overflow int when computing a list length.
13300 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
13301 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
13302 truncation on 64-bit hosts. Check for QUIT every
13303 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
13304 faster and is responsive enough.
13305 (Flength): Report an error instead of overflowing an integer.
13306 (Fsafe_length): Return a float if the value is not representable
13307 as a fixnum. This shouldn't happen except in contrived situations.
13308 (Fnthcdr, Fsort): Don't assume list length fits in int.
13309 (Fcopy_sequence): Don't assume vector length fits in int.
13311 * alloc.c: Check that resized vectors' lengths fit in fixnums.
13312 (header_size, word_size): New constants.
13313 (allocate_vectorlike): Don't check size overflow here.
13314 (allocate_vector): Check it here instead, since this is the only
13315 caller of allocate_vectorlike that could cause overflow.
13316 Check that the new vector's length is representable as a fixnum.
13318 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
13319 The previous code was bogus. For example, next_almost_prime (32)
13320 returned 39, which is undesirable as it is a multiple of 3; and
13321 next_almost_prime (24) returned 25, which is a multiple of 5 so
13322 why was the code bothering to check for multiples of 7?
13324 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
13326 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
13328 Variadic C functions now count arguments with ptrdiff_t.
13329 This partly undoes my 2011-03-30 change, which replaced int with size_t.
13330 Back then I didn't know that the Emacs coding style prefers signed int.
13331 Also, in the meantime I found a few more instances where arguments
13332 were being counted with int, which may truncate counts on 64-bit
13333 machines, or EMACS_INT, which may be unnecessarily wide.
13334 * lisp.h (struct Lisp_Subr.function.aMANY)
13335 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
13336 Arg counts are now ptrdiff_t, not size_t.
13337 All variadic functions and their callers changed accordingly.
13338 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
13339 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
13340 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
13341 * callint.c (Fcall_interactively): Check arg count for overflow,
13342 to avoid potential buffer overrun. Use signed char, not 'int',
13343 for 'varies' array, so that we needn't bother to check its size
13344 calculation for overflow.
13345 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
13346 * eval.c (apply_lambda):
13347 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
13348 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
13349 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
13351 * callint.c (Fcall_interactively): Don't use index var as event count.
13353 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
13354 * mem-limits.h (SIZE): Remove; no longer used.
13356 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
13358 Remove unnecessary casts.
13359 * xterm.c (x_term_init):
13360 * xfns.c (x_set_border_pixel):
13361 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
13362 These aren't needed now that we assume ANSI C.
13364 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
13365 It's more likely to cause problems (due to unsigned overflow)
13368 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
13370 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
13372 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
13374 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
13376 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
13378 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
13380 GLYPH_CODE_FACE returns EMACS_INT, not int.
13381 * dispextern.h (merge_faces):
13382 * xfaces.c (merge_faces):
13383 * xdisp.c (get_next_display_element, next_element_from_display_vector):
13384 Don't assume EMACS_INT fits in int.
13386 * character.h (CHAR_VALID_P): Remove unused parameter.
13387 * fontset.c, lisp.h, xdisp.c: All uses changed.
13389 * editfns.c (Ftranslate_region_internal): Omit redundant test.
13391 * fns.c (concat): Minor tuning based on overflow analysis.
13392 This doesn't fix any bugs. Use int to hold character, instead
13393 of constantly refetching from Emacs object. Use XFASTINT, not
13394 XINT, for value known to be a character. Don't bother comparing
13395 a single byte to 0400, as it's always less.
13397 * floatfns.c (Fexpt):
13398 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
13400 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
13403 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
13405 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
13406 Without this fix, on a 64-bit host (aset S 0 4294967386) would
13407 incorrectly succeed when S was a string, because 4294967386 was
13408 truncated before it was used.
13410 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
13411 Otherwise, an out-of-range integer could cause undefined behavior
13414 * composite.c: Use int, not EMACS_INT, for characters.
13415 (fill_gstring_body, composition_compute_stop_pos): Use int, not
13416 EMACS_INT, for values that are known to be in character range.
13417 This doesn't fix any bugs but is the usual style inside Emacs and
13418 may generate better code on 32-bit machines.
13420 Make sure a 64-bit char is never passed to ENCODE_CHAR.
13421 This is for reasons similar to the recent CHAR_STRING fix.
13422 * charset.c (Fencode_char): Check that character arg is actually
13423 a character. Pass an int to ENCODE_CHAR.
13424 * charset.h (ENCODE_CHAR): Verify that the character argument is no
13425 wider than 'int', as a compile-time check to prevent future regressions
13428 * character.c (char_string): Remove unnecessary casts.
13430 Make sure a 64-bit char is never passed to CHAR_STRING.
13431 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
13432 by silently ignoring the top 32 bits, allowing some values
13433 that were far too large to be valid characters.
13434 * character.h: Include <verify.h>.
13435 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
13436 arguments are no wider than unsigned, as a compile-time check
13437 to prevent future regressions in this area.
13439 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13440 (Fsubst_char_in_region):
13442 * xdisp.c (decode_mode_spec_coding):
13443 Adjust to CHAR_STRING's new requirement.
13444 * editfns.c (Finsert_char, Fsubst_char_in_region):
13445 * fns.c (concat): Check that character args are actually
13446 characters. Without this test, these functions did the wrong
13447 thing with wildly out-of-range values on 64-bit hosts.
13449 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
13450 These casts should not be needed on 32-bit hosts, either.
13451 * keyboard.c (read_char):
13452 * lread.c (Fload): Remove casts to unsigned.
13454 * lisp.h (UNSIGNED_CMP): New macro.
13455 This fixes comparison bugs on 64-bit hosts.
13456 (ASCII_CHAR_P): Use it.
13457 * casefiddle.c (casify_object):
13458 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
13459 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
13460 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
13461 * dispextern.h (FACE_FROM_ID):
13462 * keyboard.c (read_char): Use UNSIGNED_CMP.
13464 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
13465 not to EMACS_INT, to avoid GCC warning.
13467 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
13469 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
13470 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
13471 isn't needed on 32-bit machines.
13473 * buffer.c (Fgenerate_new_buffer_name):
13474 Use EMACS_INT for count, not int.
13475 (advance_to_char_boundary): Return EMACS_INT, not int.
13477 * data.c (Qcompiled_function): Now static.
13479 * window.c (window_body_lines): Now static.
13481 * image.c (gif_load): Rename local to avoid shadowing.
13483 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
13484 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
13485 * alloc.c (make_save_value): Integer argument is now of type
13486 ptrdiff_t, not int.
13487 (mark_object): Use ptrdiff_t, not int.
13488 * lisp.h (pD): New macro.
13489 * print.c (print_object): Use it.
13491 * alloc.c: Use EMACS_INT, not int, to count objects.
13492 (total_conses, total_markers, total_symbols, total_vector_size)
13493 (total_free_conses, total_free_markers, total_free_symbols)
13494 (total_free_floats, total_floats, total_free_intervals)
13495 (total_intervals, total_strings, total_free_strings):
13496 Now EMACS_INT, not int. All uses changed.
13497 (Fgarbage_collect): Compute overall total using a double, so that
13498 integer overflow is less likely to be a problem. Check for overflow
13499 when converting back to an integer.
13500 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
13501 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
13502 These were 'int' variables that could overflow on 64-bit hosts;
13503 they were never used, so remove them instead of repairing them.
13504 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
13505 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
13506 Previously, this ceilinged at INT_MAX, but that doesn't work on
13508 (allocate_pseudovector): Don't use EMACS_INT when int would do.
13510 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
13511 (allocate_vectorlike): Check for ptrdiff_t overflow.
13512 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
13513 when a (possibly-narrower) signed value would do just as well.
13514 We prefer using signed arithmetic, to avoid comparison confusion.
13516 * alloc.c: Catch some string size overflows that we were missing.
13517 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
13518 for convenience in STRING_BYTES_MAX.
13519 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
13520 The definition here is exact; the one in lisp.h was approximate.
13521 (allocate_string_data): Check for string overflow. This catches
13522 some instances we weren't catching before. Also, it catches
13523 size_t overflow on (unusual) hosts where SIZE_MAX <= min
13524 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
13525 and ptrdiff_t and EMACS_INT are both 64 bits.
13527 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
13528 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
13529 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
13531 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
13533 * alloc.c (Fmake_string): Check for out-of-range init.
13535 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
13537 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
13539 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
13541 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
13542 xg_get_default_scrollbar_width.
13544 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
13545 (int_gtk_range_get_value): Move to the scroll bar part of the file.
13546 (style_changed_cb): Call update_theme_scrollbar_width and call
13547 x_set_scroll_bar_default_width and xg_frame_set_char_size for
13548 all frames (Bug#8505).
13549 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
13550 Call gtk_window_set_resizable if HAVE_GTK3.
13551 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
13552 and height if HAVE_GTK3 (Bug#8505).
13553 (scroll_bar_width_for_theme): New variable.
13554 (update_theme_scrollbar_width): New function.
13555 (xg_get_default_scrollbar_width): Move code to
13556 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
13557 (xg_initialize): Call update_theme_scrollbar_width.
13559 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
13561 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
13563 2011-06-12 Martin Rudalics <rudalics@gmx.at>
13565 * frame.c (make_frame): Call other_buffer_safely instead of
13568 * window.c (temp_output_buffer_show): Call display_buffer with
13569 second argument Vtemp_buffer_show_specifiers and reset latter
13570 immediately after the call.
13571 (Vtemp_buffer_show_specifiers): New variable.
13572 (auto_window_vscroll_p, next_screen_context_lines)
13573 (Vscroll_preserve_screen_position): Remove leading asterisks from
13576 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
13578 Fix minor problems found by GCC 4.6.0 static checking.
13579 * buffer.c (Qclone_number): Remove for now, as it's unused.
13580 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
13581 (record_buffer): Remove unused local.
13582 * frame.c (other_visible_frames, frame_buffer_list): Now static.
13583 (set_frame_buffer_list): Remove; unused.
13584 * frame.h (other_visible_frames): Remove decl.
13585 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
13586 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
13587 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
13589 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
13590 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
13591 Define only if HAVE_GPM.
13592 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
13593 (update_hints_inhibit): Remove; never set. All uses removed.
13594 * widgetprv.h (emacsFrameClassRec): Remove decl.
13595 * window.c (delete_deletable_window): Now returns void, since it
13596 wasn't returning anything.
13597 (compare_window_configurations): Remove unused locals.
13598 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
13599 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
13600 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
13601 the same widths as pointers. This follows up on the 2011-05-06 patch.
13602 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
13603 * xterm.h: Likewise.
13604 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
13606 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
13608 * makefile.w32-in: Update dependencies.
13609 (LISP_H): Add lib/intprops.h.
13611 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
13613 * image.c (gif_load): Add animation frame delay to the metadata.
13614 (syms_of_image): Use DEFSYM. New symbol `delay'.
13616 2011-06-11 Martin Rudalics <rudalics@gmx.at>
13618 * window.c (delete_deletable_window): Re-add.
13619 (Fset_window_configuration): Rewrite to handle dead buffers and
13620 consequently deletable windows.
13621 (window_tree, Fwindow_tree): Remove. Supply functionality in
13623 (compare_window_configurations): Simplify code.
13625 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
13627 * image.c (imagemagick_load_image): Fix type mismatch.
13628 (Fimagemagick_types): Likewise.
13630 * window.h (replace_buffer_in_windows): Declare.
13632 2011-06-11 Martin Rudalics <rudalics@gmx.at>
13634 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
13635 Qclone_number. Remove external declaration of Qdelete_window.
13636 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
13638 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
13639 Run Qbuffer_list_update_hook if allowed.
13640 (Fother_buffer): Rewrite doc-string. Major rewrite for new
13641 buffer list implementation.
13642 (other_buffer_safely): New function.
13643 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
13644 calls to replace_buffer_in_windows and
13645 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
13647 (record_buffer): Inhibit quitting and rewrite using quittable
13648 functions. Run Qbuffer_list_update_hook if allowed.
13649 (Frecord_buffer, Funrecord_buffer): New functions.
13650 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
13651 Move switch-to-buffer to window.el.
13652 (bury-buffer): Move to window.el.
13653 (Vbuffer_list_update_hook): New variable.
13655 * lisp.h (other_buffer_safely): Add prototype in buffer.c
13658 * window.h (resize_frame_windows): Move up in code.
13659 (Fwindow_frame): Remove EXFUN.
13660 (replace_buffer_in_all_windows): Remove prototype.
13661 (replace_buffer_in_windows_safely): Add prototype.
13663 * window.c: Declare Qdelete_window static again. Move down
13664 declaration of select_count.
13665 (Fnext_window, Fprevious_window): Rewrite doc-strings.
13666 (Fother_window): Move to window.el.
13667 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
13668 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
13669 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
13671 (replace_buffer_in_windows): Implement by calling
13672 Qreplace_buffer_in_windows.
13673 (replace_buffer_in_all_windows): Remove with some functionality
13674 moved into replace_buffer_in_windows_safely.
13675 (replace_buffer_in_windows_safely): New function.
13676 (select_window_norecord, select_frame_norecord): Move in front
13677 of run_window_configuration_change_hook. Remove now obsolete
13679 (Fset_window_buffer): Rewrite doc-string.
13680 Call Qrecord_window_buffer.
13681 (keys_of_window): Move binding for other-window to window.el.
13683 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
13685 * dispextern.h (struct image): Replace data member, whose int_val
13686 and ptr_val fields were not used by anything, with a single
13689 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
13690 (gif_clear_image, gif_load, imagemagick_load_image)
13691 (gs_clear_image, gs_load): Callers changed.
13693 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
13695 * buffer.h: Include <time.h>, for time_t.
13696 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
13698 Fix minor problems found by static checking.
13700 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
13702 Make identifiers static if they are not used in other modules.
13703 * data.c (Qcompiled_function, Qframe, Qvector):
13704 * image.c (QimageMagick, Qsvg):
13705 * minibuf.c (Qmetadata):
13706 * window.c (resize_window_check, resize_root_window): Now static.
13707 * window.h (resize_window_check, resize_root_window): Remove decls.
13709 * window.c (window_deletion_count, delete_deletable_window):
13711 (window_body_lines): Now static.
13712 (Fdelete_other_windows_internal): Mark vars as initialized.
13713 Make sure 'resize_failed' is initialized.
13714 (run_window_configuration_change_hook): Rename local to avoid shadowing.
13715 (resize_window_apply): Remove unused local.
13716 * window.h (delete_deletable_window): Remove decl.
13718 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
13719 (imagemagick_load_image): Fix pointer signedness problem by changing
13720 last arg from unsigned char * to char *. All uses changed.
13721 Also, fix a local for similar reasons.
13722 Remove unused locals. Remove locals to avoid shadowing.
13723 (fn_rsvg_handle_free): Remove; unused.
13724 (svg_load, svg_load_image): Fix pointer signedness problem.
13725 (imagemagick_load_image): Don't use garbage pointer image_wand.
13727 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
13729 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
13731 * image.c (gif_load): Fix omitted cast error introduced by
13734 2011-06-10 Martin Rudalics <rudalics@gmx.at>
13736 * window.h (resize_proportionally, orig_total_lines)
13737 (orig_top_line): Remove from window structure.
13738 (set_window_height, set_window_width, change_window_heights)
13739 (Fdelete_window): Remove prototypes.
13740 (resize_frame_windows): Remove duplicate declaration.
13742 2011-06-10 Eli Zaretskii <eliz@gnu.org>
13744 * window.h (resize_frame_windows, resize_window_check)
13745 (delete_deletable_window, resize_root_window)
13746 (resize_frame_windows): Declare prototypes.
13748 * window.c (resize_window_apply): Make definition be "static" to
13749 match the prototype.
13751 2011-06-10 Martin Rudalics <rudalics@gmx.at>
13753 * window.c: Remove declarations of Qwindow_size_fixed,
13754 window_min_size_1, window_min_size_2, window_min_size,
13755 size_window, window_fixed_size_p, enlarge_window, delete_window.
13756 Remove static from declaration of Qdelete_window, it's
13757 temporarily needed by Fbury_buffer.
13758 (replace_window): Don't assign orig_top_line and
13760 (Fdelete_window, delete_window): Remove. Window deletion is
13761 handled by window.el.
13762 (window_loop): Remove DELETE_OTHER_WINDOWS case.
13763 Replace Fdelete_window calls with calls to Qdelete_window.
13764 (Fdelete_other_windows): Remove. Deleting other windows is
13765 handled by window.el.
13766 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
13767 handled in window.el.
13768 (window_min_size_2, window_min_size_1, window_min_size): Remove.
13769 Window minimum sizes are handled in window.el.
13770 (shrink_windows, size_window, set_window_height)
13771 (set_window_width, change_window_heights, window_height)
13772 (window_width, CURBEG, CURSIZE, enlarge_window)
13773 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
13774 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
13775 handled in window.el.
13776 (make_dummy_parent): Rename to make_parent_window and give it a
13777 second argument horflag.
13778 (make_window): Don't set resize_proportionally any more.
13779 (Fsplit_window): Remove. Windows are split in window.el.
13780 (save_restore_action, save_restore_orig_size)
13781 (shrink_window_lowest_first, save_restore_orig_size): Remove.
13782 Resize mini windows in window.el.
13783 (grow_mini_window, shrink_mini_window): Implement by calling
13784 Qresize_root_window_vertically, resize_window_check and
13785 resize_window_apply.
13786 (saved_window, Fset_window_configuration, save_window_save):
13787 Do not handle orig_top_line, orig_total_lines, and
13788 resize_proportionally.
13789 (window_min_height, window_min_width): Move to window.el.
13790 (keys_of_window): Move bindings for delete-other-windows,
13791 split-window, delete-window and enlarge-window to window.el.
13793 * buffer.c: Temporarily extern Qdelete_window.
13794 (Fbury_buffer): Temporarily call Qdelete_window instead of
13795 Fdelete_window (Fbury_buffer will move to window.el soon).
13797 * frame.c (set_menu_bar_lines_1): Remove code handling
13798 orig_top_line and orig_total_lines.
13800 * dispnew.c (adjust_frame_glyphs_initially): Don't use
13801 set_window_height but set heights directly.
13802 (change_frame_size_1): Use resize_frame_windows.
13804 * xdisp.c (init_xdisp): Don't use set_window_height but set
13807 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
13808 Use resize_frame_windows instead of change_window_heights and run
13809 run_window_configuration_change_hook.
13811 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
13812 instead of change_window_heights and run
13813 run_window_configuration_change_hook.
13815 2011-06-09 Martin Rudalics <rudalics@gmx.at>
13817 * window.c (replace_window): Rename second argument REPLACEMENT to
13818 NEW. New third argument SETFLAG. Rewrite.
13819 (delete_window, make_dummy_parent): Call replace_window with
13821 (window_list_1): Move down in code.
13822 (run_window_configuration_change_hook): Move set_buffer part
13823 before select_frame_norecord part in order to unwind correctly.
13824 Rename count1 to count.
13825 (recombine_windows, delete_deletable_window, resize_root_window)
13826 (Fdelete_other_windows_internal)
13827 (Frun_window_configuration_change_hook, make_parent_window)
13828 (resize_window_check, resize_window_apply, Fresize_window_apply)
13829 (resize_frame_windows, Fsplit_window_internal)
13830 (Fdelete_window_internal, Fresize_mini_window_internal):
13832 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
13834 2011-06-08 Martin Rudalics <rudalics@gmx.at>
13836 * window.h (window): Add some new members to window structure -
13837 normal_lines, normal_cols, new_total, new_normal, clone_number,
13838 splits, nest, prev_buffers, next_buffers.
13839 (WINDOW_TOTAL_SIZE): Move here from window.c.
13840 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
13842 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
13844 (make_dummy_parent): Set new members of windows structure.
13845 (make_window): Move down in code. Handle new members of window
13847 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
13848 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
13849 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
13850 (Fset_window_prev_buffers, Fwindow_next_buffers)
13851 (Fset_window_next_buffers, Fset_window_clone_number):
13853 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
13854 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
13856 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
13857 Argument WINDOW can be now internal window too.
13858 (Fwindow_use_time): Move up in code.
13859 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
13860 Rewrite doc-string.
13861 (Fset_window_configuration, saved_window)
13862 (Fcurrent_window_configuration, save_window_save): Handle new
13863 members of window structure.
13864 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
13865 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
13866 (syms_of_window): New Lisp objects Qrecord_window_buffer,
13867 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
13868 Qget_mru_window, Qresize_root_window,
13869 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
13870 Qauto_buffer_name; staticpro them.
13872 2011-06-07 Martin Rudalics <rudalics@gmx.at>
13874 * window.c (Fwindow_total_size, Fwindow_left_column)
13875 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
13876 (Fwindow_list_1): New functions.
13877 (window_box_text_cols): Replace with window_body_cols.
13878 (Fwindow_width, Fscroll_left, Fscroll_right):
13879 Use window_body_cols instead of window_box_text_cols.
13880 (delete_window, Fset_window_configuration):
13881 Call delete_all_subwindows with window as argument.
13882 (delete_all_subwindows): Take a window as argument and not a
13883 structure. Rewrite.
13884 (window_loop): Remove handling of GET_LRU_WINDOW and
13885 GET_LARGEST_WINDOW.
13886 (Fget_lru_window, Fget_largest_window): Move to window.el.
13888 * window.h: Extern window_body_cols instead of
13889 window_box_text_cols. delete_all_subwindows now takes a
13890 Lisp_Object as argument.
13892 * indent.c (compute_motion, Fcompute_motion):
13893 Use window_body_cols instead of window_box_text_cols.
13895 * frame.c (delete_frame): Call delete_all_subwindows with root
13896 window as argument.
13898 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
13900 * fns.c (Fputhash): Document return value.
13902 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
13904 * image.c (gif_load): Implement gif89a spec "no disposal" method.
13906 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13908 Cons<->int and similar integer overflow fixes (Bug#8794).
13910 Check for overflow when converting integer to cons and back.
13911 * charset.c (Fdefine_charset_internal, Fdecode_char):
13912 Use cons_to_unsigned to catch overflow.
13913 (Fencode_char): Use INTEGER_TO_CONS.
13914 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
13915 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
13916 * data.c (long_to_cons, cons_to_long): Remove.
13917 (cons_to_unsigned, cons_to_signed): New functions.
13918 These signal an error for invalid or out-of-range values.
13919 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
13920 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
13921 * font.c (Ffont_variation_glyphs):
13922 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
13923 * lisp.h: Include <intprops.h>.
13924 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
13925 (cons_to_signed, cons_to_unsigned): New decls.
13926 (long_to_cons, cons_to_long): Remove decls.
13927 * undo.c (record_first_change): Use INTEGER_TO_CONS.
13928 (Fprimitive_undo): Use CONS_TO_INTEGER.
13929 * xfns.c (Fx_window_property): Likewise.
13930 * xselect.c: Include <limits.h>.
13931 (x_own_selection, selection_data_to_lisp_data):
13932 Use INTEGER_TO_CONS.
13933 (x_handle_selection_request, x_handle_selection_clear)
13934 (x_get_foreign_selection, Fx_disown_selection_internal)
13935 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
13936 (lisp_data_to_selection_data): Use cons_to_unsigned.
13937 (x_fill_property_data): Use cons_to_signed.
13938 Report values out of range.
13940 Check for buffer and string overflow more precisely.
13941 * buffer.h (BUF_BYTES_MAX): New macro.
13942 * lisp.h (STRING_BYTES_MAX): New macro.
13943 * alloc.c (Fmake_string):
13944 * character.c (string_escape_byte8):
13945 * coding.c (coding_alloc_by_realloc):
13946 * doprnt.c (doprnt):
13947 * editfns.c (Fformat):
13949 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
13950 since they may not be the same number.
13951 * editfns.c (Finsert_char):
13952 * fileio.c (Finsert_file_contents):
13953 Likewise for BUF_BYTES_MAX.
13955 * image.c: Use ptrdiff_t, not int, for sizes.
13956 (slurp_file): Switch from int to ptrdiff_t.
13958 (slurp_file): Check that file size fits in both size_t (for
13959 malloc) and ptrdiff_t (for sanity and safety).
13961 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
13962 if b->modtime has its maximal value.
13964 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
13966 Don't assume time_t can fit into int.
13967 * buffer.h (struct buffer.modtime): Now time_t, not int.
13968 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
13969 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
13971 Minor fixes for signed vs unsigned integers.
13972 * character.h (MAYBE_UNIFY_CHAR):
13973 * charset.c (maybe_unify_char):
13974 * keyboard.c (read_char, reorder_modifiers):
13975 XINT -> XFASTINT, since the integer must be nonnegative.
13976 * ftfont.c (ftfont_spec_pattern):
13977 * keymap.c (access_keymap, silly_event_symbol_error):
13978 XUINT -> XFASTINT, since the integer must be nonnegative.
13979 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
13980 since it makes no difference and we prefer signed.
13981 * keyboard.c (record_char): Use XUINT when all the neighbors do.
13982 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
13985 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
13987 * window.h (Fwindow_frame): Declare.
13989 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13991 * alloc.c: Simplify handling of large-request failures (Bug#8800).
13992 (SPARE_MEMORY): Always define.
13993 (LARGE_REQUEST): Remove.
13994 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
13996 2011-06-06 Martin Rudalics <rudalics@gmx.at>
13998 * lisp.h: Move EXFUNS for Fframe_root_window,
13999 Fframe_first_window and Fset_frame_selected_window to window.h.
14001 * window.h: Move EXFUNS for Fframe_root_window,
14002 Fframe_first_window and Fset_frame_selected_window here from
14005 * frame.c (Fwindow_frame, Fframe_first_window)
14006 (Fframe_root_window, Fframe_selected_window)
14007 (Fset_frame_selected_window): Move to window.c.
14008 (Factive_minibuffer_window): Move to minibuf.c.
14009 (Fother_visible_frames_p): New function.
14011 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
14013 * window.c (decode_window, decode_any_window): Move up in code.
14014 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
14015 (inhibit_frame_unsplittable): Remove unused variable.
14016 (Fwindow_buffer): Move up and rewrite doc-string.
14017 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
14018 (Fwindow_prev): New functions.
14019 (Fwindow_frame): Move here from frame.c. Accept any window as
14021 (Fframe_root_window, Fframe_first_window)
14022 (Fframe_selected_window): Move here from frame.c. Accept frame
14023 or arbitrary window as argument. Update doc-strings.
14024 (Fminibuffer_window): Move up in code.
14025 (Fwindow_minibuffer_p): Move up in code and simplify.
14026 (Fset_frame_selected_window): Move here from frame.c.
14028 (Fselected_window, select_window, Fselect_window): Move up in
14029 code. Minor doc-string fixes.
14031 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
14033 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
14034 Do not assume that spare memory exists; that assumption is valid
14035 only if SYSTEM_MALLOC.
14036 (LARGE_REQUEST): New macro, so that the issue of large requests
14037 is separated from the issue of spare memory.
14039 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
14041 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
14044 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
14046 * xfns.c (x_set_scroll_bar_default_width): Move declarations
14049 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
14051 * gtkutil.c (xg_get_default_scrollbar_width): New function.
14053 * gtkutil.h: Declare xg_get_default_scrollbar_width.
14055 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
14056 min width by calling x_set_scroll_bar_default_width (Bug#8505).
14058 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
14060 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
14062 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
14064 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
14065 (x_clipboard_manager_save): Add return value.
14066 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
14067 New error handlers.
14068 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
14069 Obey Vx_select_enable_clipboard_manager. Catch errors in
14070 x_clipboard_manager_save (Bug#8779).
14071 (Vx_select_enable_clipboard_manager): New variable.
14072 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
14074 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
14076 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
14078 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14080 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
14081 in the current matrix if keep_current_p is non-zero.
14083 2011-06-04 Eli Zaretskii <eliz@gnu.org>
14085 * bidi.c (bidi_level_of_next_char): Fix last change.
14087 2011-06-03 Eli Zaretskii <eliz@gnu.org>
14089 Support bidi reordering of text covered by display properties.
14091 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
14092 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
14093 (bidi_cache_search, bidi_cache_iterator_state)
14094 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
14095 (bidi_level_of_next_char, bidi_move_to_visually_next):
14096 Support character positions inside a run of characters covered by a
14098 (bidi_paragraph_init, bidi_resolve_explicit_1)
14099 (bidi_level_of_next_char): Call bidi_fetch_char and
14100 bidi_fetch_char_advance instead of FETCH_CHAR and
14101 FETCH_CHAR_ADVANCE.
14102 (bidi_init_it): Initialize new members.
14103 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
14105 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
14106 instead of using explicit *_CHAR codes.
14107 (bidi_resolve_explicit, bidi_resolve_weak):
14108 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
14109 bidirectional text is supported only in multibyte buffers.
14110 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
14111 it to initialize the frame_window_p member of struct bidi_it.
14112 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
14113 (bidi_resolve_explicit, bidi_resolve_weak)
14114 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
14115 bidi_it->nchars is non-positive.
14116 (bidi_level_of_next_char): Don't try to lookup the cache for the
14117 next/previous character if nothing is cached there yet, or if we
14118 were just reseat()'ed to a new position.
14120 * xdisp.c (set_cursor_from_row): Set start and stop points
14121 according to the row's direction when priming the loop that looks
14122 for the glyph on which to display cursor.
14123 (single_display_spec_intangible_p): Function deleted.
14124 (display_prop_intangible_p): Reimplement to call
14125 handle_display_spec instead of single_display_spec_intangible_p.
14126 Accept 3 additional arguments needed by handle_display_spec.
14127 This fixes incorrect cursor motion across display property with complex
14128 values: lists, `(when COND...)' forms, etc.
14129 (single_display_spec_string_p): Support property values that are
14130 lists with the argument STRING its top-level element.
14131 (display_prop_string_p): Fix the condition for processing a
14132 property that is a list to be consistent with handle_display_spec.
14133 (handle_display_spec): New function, refactored from the
14134 last portion of handle_display_prop.
14135 (compute_display_string_pos): Accept additional argument
14136 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
14137 value of a `display' property is a "replacing spec".
14138 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
14139 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
14140 the display property, but just return a value indicating whether
14141 the display property will replace the characters it covers.
14142 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
14143 frame_window_p members of struct bidi_it.
14144 (compute_display_string_pos, compute_display_string_end):
14146 (push_it): Accept second argument POSITION, where pop_it should
14147 jump to continue iteration.
14148 (reseat_1): Initialize bidi_it.disp_pos.
14150 * keyboard.c (adjust_point_for_property): Adjust the call to
14151 display_prop_intangible_p to its new signature.
14153 * dispextern.h (struct bidi_it): New member frame_window_p.
14154 (bidi_init_it): Update prototypes.
14155 (display_prop_intangible_p): Update prototype.
14156 (compute_display_string_pos, compute_display_string_end):
14157 Declare prototypes.
14158 (struct bidi_it): New members nchars and disp_pos. ch_len is now
14161 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
14163 Malloc failure behavior now depends on size of allocation.
14164 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
14165 * lisp.h: Change signatures accordingly.
14166 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
14167 All callers changed. (Bug#8762)
14169 * gnutls.c: Use Emacs's memory allocators.
14170 Without this change, the gnutls library would invoke malloc etc.
14171 directly, which causes problems on non-SYNC_INPUT hosts, and which
14172 runs afoul of improving memory_full behavior. (Bug#8761)
14173 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
14174 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
14175 xfree instead of the default malloc, realloc, free.
14176 (Fgnutls_boot): No need to check for memory allocation failure,
14177 since xmalloc does that for us.
14179 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
14180 * category.c (hash_get_category_set):
14181 * ccl.c (ccl_driver):
14182 * charset.c (Fdefine_charset_internal):
14183 * charset.h (struct charset.hash_index):
14184 * composite.c (get_composition_id, gstring_lookup_cache)
14185 (composition_gstring_put_cache):
14186 * composite.h (struct composition.hash_index):
14187 * dispextern.h (struct image.hash):
14188 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
14189 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
14190 (hashfn_equal, hashfn_user_defined, make_hash_table)
14191 (maybe_resize_hash_table, hash_lookup, hash_put)
14192 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
14193 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
14194 (Fsxhash, Fgethash, Fputhash, Fmaphash):
14195 * image.c (make_image, search_image_cache, lookup_image)
14196 (xpm_put_color_table_h):
14197 * lisp.h (struct Lisp_Hash_Table):
14198 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
14199 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
14200 for hashes and hash indexes, instead of 'unsigned' and 'int'.
14201 * alloc.c (allocate_vectorlike):
14202 Check for overflow in vector size calculations.
14203 * ccl.c (ccl_driver):
14204 Check for overflow when converting EMACS_INT to int.
14205 * fns.c, image.c: Remove unnecessary static decls that would otherwise
14206 need to be updated by these changes.
14207 * fns.c (make_hash_table, maybe_resize_hash_table):
14208 Check for integer overflow with large hash tables.
14209 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
14210 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
14211 (SXHASH_REDUCE): New macro.
14212 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
14213 Use it instead of discarding useful hash info with large hash values.
14214 (sxhash_float): New function.
14215 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
14216 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
14217 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
14218 Rewrite to use FIXNUM_BITS, as this simplifies things.
14219 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
14220 Adjust signatures to match updated version of code.
14221 (consing_since_gc): Now EMACS_INT, since a single hash table can
14222 use more than INT_MAX bytes.
14224 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
14226 Make it possible to build with GCC-4.6+ -O2 -flto.
14228 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
14230 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
14232 * minibuf.c (get_minibuffer, read_minibuf_unwind):
14233 Call minibuffer-inactive-mode.
14235 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
14237 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
14238 Update dependencies.
14240 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14242 * data.c (init_data): Remove code for UTS, this system is not
14245 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14247 Don't force ./temacs to start in terminal mode.
14249 * frame.c (make_initial_frame): Initialize faces in all cases, not
14250 only when CANNOT_DUMP is defined.
14251 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
14253 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14255 * dispnew.c (add_window_display_history): Use const for the string
14256 pointer. Remove declaration, not needed.
14258 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
14260 Use 'inline', not 'INLINE'.
14261 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
14262 * alloc.c, fontset.c (INLINE): Remove.
14263 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
14264 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
14265 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
14266 * gmalloc.c (register_heapinfo): Use inline unconditionally.
14267 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
14269 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
14271 Make it possible to run ./temacs.
14273 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
14274 syms_of_callproc does the same thing. Remove test for
14275 "initialized", do it in the caller.
14276 * emacs.c (main): Avoid calling set_initial_environment when dumping.
14278 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
14280 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
14281 (read_minibuf): Use get_minibuffer.
14282 (syms_of_minibuf): Use DEFSYM.
14283 (Qmetadata): New var.
14284 * data.c (Qbuffer): Don't make it static.
14285 (syms_of_data): Use DEFSYM.
14287 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
14289 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
14290 (CCL_CODE_MIN): New macro.
14292 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
14294 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
14296 * eval.c (Qdebug): Now static.
14297 * lisp.h (Qdebug): Remove decl. This reverts a part of the
14298 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
14299 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
14301 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
14303 * image.c: Various fixes to ImageMagick code comments.
14304 (Fimagemagick_types): Doc fix.
14306 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
14308 Minor fixes prompted by GCC 4.6.0 warnings.
14310 * xselect.c (converted_selections, conversion_fail_tag): Now static.
14312 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
14313 (x_clipboard_manager_save_all): Move extern decl to ...
14314 * xterm.h: ... here, so that it can be checked for consistency.
14316 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
14318 * xselect.c (x_clipboard_manager_save_frame)
14319 (x_clipboard_manager_save_all): New functions.
14320 (Fx_clipboard_manager_save): Lisp function deleted.
14322 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
14323 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
14325 * xterm.h: Update prototype.
14327 2011-05-28 William Xu <william.xwl@gmail.com>
14329 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
14330 exiting (Bug#8239).
14332 2011-05-28 Jim Meyering <meyering@redhat.com>
14334 Avoid a sign-extension bug in crypto_hash_function.
14335 * fns.c (to_uchar): Define.
14336 (crypto_hash_function): Use it to convert some newly-signed
14337 variables to unsigned, to avoid sign-extension bugs. For example,
14338 without this change, (md5 "truc") would evaluate to
14339 45723a2aff78ff4fff7fff1114760e62 rather than the expected
14340 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
14341 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
14343 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
14345 Integer overflow fixes.
14347 * dbusbind.c: Serial number integer overflow fixes.
14348 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
14349 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
14350 to hold a serial number that is too large for a fixnum.
14351 (Fdbus_method_return_internal, Fdbus_method_error_internal):
14352 Check for serial numbers out of range. Decode any serial number
14353 that was so large that it became a float. (Bug#8722)
14355 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
14356 (Fdbus_call_method, Fdbus_call_method_asynchronously):
14357 Use XFASTINT rather than XUINT when numbers are nonnegative.
14358 (xd_append_arg, Fdbus_method_return_internal):
14359 (Fdbus_method_error_internal): Likewise. Also, for unsigned
14360 arguments, check that Lisp number is nonnegative, rather than
14361 silently wrapping negative numbers around. (Bug#8722)
14362 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
14365 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
14367 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
14369 ccl: Add integer overflow checks.
14370 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
14371 (IN_INT_RANGE): New macros.
14372 (ccl_driver): Use them to check for integer overflow when
14373 decoding a CCL program. Many of the new checks are whether XINT (x)
14374 fits in int; it doesn't always, on 64-bit hosts. The new version
14375 doesn't catch all possible integer overflows, but it's an
14376 improvement. (Bug#8719)
14378 * alloc.c (make_event_array): Use XINT, not XUINT.
14379 There's no need for unsigned here.
14381 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
14382 This follows up to the 2011-05-06 change that substituted uintptr_t
14383 for EMACS_INT. This case wasn't caught back then.
14385 Rework Fformat to avoid integer overflow issues.
14386 * editfns.c: Include <float.h> unconditionally, as it's everywhere
14387 now (part of C89). Include <verify.h>.
14388 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
14389 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
14390 (Fformat): Avoid the prepass trying to compute sizes; it was only
14391 approximate and thus did not catch overflow reliably. Instead, walk
14392 through the format just once, formatting and computing sizes as we go,
14393 checking for integer overflow at every step, and allocating a larger
14394 buffer as needed. Keep track separately whether the format is
14395 multibyte. Keep only the most-recently calculated precision, rather
14396 than them all. Record whether each argument has been converted to
14397 string. Use EMACS_INT, not int, for byte and char and arg counts.
14398 Support field widths and precisions larger than INT_MAX. Avoid
14399 sprintf's undefined behavior with conversion specifications such as %#d
14400 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
14401 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
14402 formatting out-of-range floating point numbers with int
14403 formats. (Bug#8668)
14405 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
14407 * data.c: Avoid integer truncation in expressions involving floats.
14408 * data.c: Include <intprops.h>.
14409 (arith_driver): When there's an integer overflow in an expression
14410 involving floating point, convert the integers to floating point
14411 so that the resulting value does not suffer from catastrophic
14412 integer truncation. For example, on a 64-bit host (* 4
14413 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
14414 Do not rely on undefined behavior after integer overflow.
14416 merge count_size_as_multibyte, parse_str_to_multibyte
14417 * character.c, character.h (count_size_as_multibyte):
14418 Rename from parse_str_to_multibyte; all uses changed.
14419 Check for integer overflow.
14420 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
14421 since it's now a duplicate of the other. This is more of
14422 a character than a buffer op, so better that it's in character.c.
14423 * fns.c, print.c: Adjust to above changes.
14425 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
14427 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
14429 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
14431 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
14432 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
14433 (x_clipboard_manager_save): Now static.
14434 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
14436 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
14437 (crypto_hash_function): Now static.
14438 Fix pointer signedness problems. Avoid unnecessary initializations.
14440 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
14442 * termhooks.h (Vselection_alist): Make it terminal-local.
14444 * terminal.c (create_terminal): Initialize it.
14446 * xselect.c: Support for clipboard managers.
14447 (Vselection_alist): Move to termhooks.h as terminal-local var.
14448 (LOCAL_SELECTION): New macro.
14449 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
14450 (symbol_to_x_atom): Remove gratuitous arg.
14451 (x_handle_selection_request, lisp_data_to_selection_data)
14452 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
14453 (x_own_selection, x_get_local_selection, x_convert_selection):
14454 New arg, specifying work frame. Use terminal-local Vselection_alist.
14455 (some_frame_on_display): Delete unused function.
14456 (Fx_own_selection_internal, Fx_get_selection_internal)
14457 (Fx_disown_selection_internal, Fx_selection_owner_p)
14458 (Fx_selection_exists_p): New optional frame arg.
14459 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
14460 (x_handle_selection_clear): Don't treat other terminals with the
14461 same keyboard specially. Use the terminal-local Vselection_alist.
14462 (x_clear_frame_selections): Use Frun_hook_with_args.
14464 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
14466 * xterm.h: Add support for those atoms.
14468 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
14470 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
14471 (converted_selections, conversion_fail_tag): New global variables.
14472 (x_selection_request_lisp_error): Free the above.
14473 (x_get_local_selection): Remove unnecessary code.
14474 (x_reply_selection_request): Args changed; handle arbitrary array
14475 of converted selections stored in converted_selections.
14476 Separate the XChangeProperty and SelectionNotify steps.
14477 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
14478 (x_convert_selection): New function.
14479 (x_handle_selection_event): Simplify.
14480 (x_get_foreign_selection): Don't ignore incoming requests while
14481 waiting for an answer; this will fail when we implement
14482 SAVE_TARGETS, and seems unnecessary anyway.
14483 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
14484 (Vx_sent_selection_functions): Doc fix.
14486 2011-05-26 Leo Liu <sdl.web@gmail.com>
14488 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
14490 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14492 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
14494 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
14495 for fringe update if it has periodic bitmap.
14496 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
14497 and fringe_bitmap_periodic_p.
14499 * fringe.c (get_fringe_bitmap_data): New function.
14500 (draw_fringe_bitmap_1, update_window_fringes): Use it.
14501 (update_window_fringes): Record periodicity of fringe bitmap in glyph
14502 row. Mark glyph row for fringe update if periodicity changed.
14504 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
14505 for fringe update unless it has periodic bitmap.
14507 2011-05-25 Kenichi Handa <handa@m17n.org>
14509 * xdisp.c (get_next_display_element): Set correct it->face_id for
14510 a static composition.
14512 2011-05-24 Leo Liu <sdl.web@gmail.com>
14515 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
14517 * fns.c (crypto_hash_function, Fsha1): New function.
14518 (Fmd5): Use crypto_hash_function.
14519 (syms_of_fns): Add Ssha1.
14521 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
14523 * gnutls.c: Remove unused macros.
14524 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
14525 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
14526 Remove macros that are defined and never used.
14527 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
14529 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
14531 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
14532 (Fx_get_selection_internal): Minor cleanup.
14533 (Fx_own_selection_internal): Rename arguments for consistency with
14536 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
14538 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
14540 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
14542 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
14544 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14546 * dispnew.c (scrolling_window): Don't exclude the case that the
14547 last enabled row in the desired matrix touches the bottom boundary.
14549 2011-05-21 Glenn Morris <rgm@gnu.org>
14551 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
14552 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
14553 and add some more files.
14555 2011-05-20 Eli Zaretskii <eliz@gnu.org>
14557 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
14558 report_file_error introduced by the change from 2011-05-07.
14560 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
14562 * systime.h (Time): Define only if emacs is defined.
14563 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
14564 where the include path doesn't have X11/X.h by default. See
14565 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
14567 2011-05-20 Kenichi Handa <handa@m17n.org>
14569 * composite.c (find_automatic_composition): Fix previous change.
14571 2011-05-20 Glenn Morris <rgm@gnu.org>
14573 * lisp.mk: New file, split from Makefile.in.
14574 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
14575 (shortlisp): Remove.
14576 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
14578 2011-05-19 Glenn Morris <rgm@gnu.org>
14580 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
14581 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
14582 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
14583 (lisp): Set the order to that of loadup.el.
14584 (shortlisp): Make it a copy of $lisp.
14585 (SOME_MACHINE_LISP): Remove.
14586 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
14587 Use just $shortlisp, not $SOME_MACHINE_LISP too.
14589 2011-05-18 Kenichi Handa <handa@m17n.org>
14591 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
14592 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
14593 (find_automatic_composition): Mostly rewrite for efficiency.
14595 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
14597 * makefile.w32-in: Update dependencies.
14599 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
14601 * menu.c: Include limits.h (fixes the MS-Windows build broken by
14602 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
14604 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
14606 Fix some integer overflow issues, such as string length overflow.
14608 * insdel.c (count_size_as_multibyte): Check for string overflow.
14610 * character.c (lisp_string_width): Check for string overflow.
14611 Use EMACS_INT, not int, for string indexes and lengths; in
14612 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
14613 the resulting string length overflows an EMACS_INT; instead,
14614 report a string overflow if no precision given. When checking for
14615 precision exhaustion, use a check that cannot possibly have
14616 integer overflow. (Bug#8675)
14617 * character.h (lisp_string_width): Adjust to new signature.
14619 * alloc.c (string_overflow): New function.
14620 (Fmake_string): Use it. This doesn't change behavior, but saves
14621 a few bytes and will simplify future changes.
14622 * character.c (string_escape_byte8): Likewise.
14623 * lisp.h (string_overflow): New decl.
14625 Fixups, following up to the user-interface timestamp change.
14626 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
14627 for UI timestamps, instead of unsigned long.
14628 * msdos.c (mouse_get_pos): Likewise.
14629 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
14630 * w32gui.h (Time): Define by including "systime.h" rather than by
14631 declaring it ourselves. (Bug#8664)
14633 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
14634 * image.c (clear_image_cache): Likewise.
14636 * term.c (term_mouse_position): Don't assume time_t wraparound.
14638 Be more systematic about user-interface timestamps.
14639 Before, the code sometimes used 'Time', sometimes 'unsigned long',
14640 and sometimes 'EMACS_UINT', to represent these timestamps.
14641 This change causes it to use 'Time' uniformly, as that's what X uses.
14642 This makes the code easier to follow, and makes it easier to catch
14643 integer overflow bugs such as Bug#8664.
14644 * frame.c (Fmouse_position, Fmouse_pixel_position):
14645 Use Time, not unsigned long, for user-interface timestamps.
14646 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
14647 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
14648 * keyboard.h (last_event_timestamp): Likewise.
14649 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
14650 * menu.h (xmenu_show): Likewise.
14651 * term.c (term_mouse_position): Likewise.
14652 * termhooks.h (struct input_event.timestamp): Likewise.
14653 (struct terminal.mouse_position_hook): Likewise.
14654 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
14655 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
14656 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
14657 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
14658 what it was before.
14659 * menu.h, termhooks.h: Include "systime.h", for Time.
14661 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
14662 Don't assume that the difference between two unsigned long values
14663 can fit into an integer. At this point, we know button_down_time
14664 <= event->timestamp, so the difference must be nonnegative, so
14665 there's no need to cast the result if double-click-time is
14666 nonnegative, as it should be; check that it's nonnegative, just in
14667 case. This bug is triggered when events are more than 2**31 ms
14668 apart (about 25 days). (Bug#8664)
14670 * xselect.c (last_event_timestamp): Remove duplicate decl.
14671 (x_own_selection): Remove needless cast to unsigned long.
14673 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
14674 that always fit in int. Use a sentinel instead of a counter, to
14675 avoid a temp and to allay GCC's concerns about possible int overflow.
14676 * frame.h (struct frame): Use int for menu_bar_items_used
14677 instead of EMACS_INT, since it always fits in int.
14679 * menu.c (grow_menu_items): Check for int overflow.
14681 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
14683 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
14684 Before, the code was not consistent. These values cannot exceed
14685 2**31 - 1 so there's no need to make them unsigned.
14686 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
14687 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
14688 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
14690 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
14692 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
14693 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
14694 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
14695 presumably because the widths might not match.
14697 * window.c (size_window): Avoid needless test at loop start.
14699 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
14701 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
14703 2011-05-12 Drew Adams <drew.adams@oracle.com>
14705 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
14707 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14709 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
14710 `width' to `bar_area_x' and `bar_area_width', respectively.
14711 (x_scroll_run): Take account of fringe background extension.
14713 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
14714 Rename local vars `left' and `width' to `bar_area_x' and
14715 `bar_area_width', respectively.
14716 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
14717 background extension.
14719 2011-05-10 Jim Meyering <meyering@redhat.com>
14721 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
14723 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
14725 * image.c (Finit_image_library): Return t for built-in image types,
14726 like pbm and xbm. (Bug#8640)
14728 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
14730 * w32menu.c (set_frame_menubar): Fix submenu allocation.
14732 2011-05-07 Eli Zaretskii <eliz@gnu.org>
14734 * w32console.c (Fset_screen_color): Doc fix.
14735 (Fget_screen_color): New function.
14736 (syms_of_ntterm): Defsubr it.
14738 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
14739 unlink the temporary file if Fcall_process didn't create it in the
14741 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
14742 child process will be redirected to a file specified with `:file'.
14743 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
14744 cue to call_process_cleanup not to close that handle.
14746 2011-05-07 Ben Key <bkey76@gmail.com>
14748 * makefile.w32-in: The bootstrap-temacs rule now makes use of
14749 one of two shell specific rules, either bootstrap-temacs-CMD or
14750 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
14751 to the previous implementation of the bootstrap-temacs rule.
14752 The bootstrap-temacs-CMD rule is similar to the previous
14753 implementation of the bootstrap-temacs rule except that it
14754 makes use of the ESC_CFLAGS variable instead of the CFLAGS
14757 These changes, along with some changes to nt/configure.bat,
14758 nt/gmake.defs, and nt/nmake.defs, are required to extend my
14759 earlier fix to add support for --cflags and --ldflags options
14760 that include quotes so that it works whether make uses cmd or
14763 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
14765 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
14766 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
14768 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
14769 a string. Handle both cases.
14770 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
14771 (Fdbus_register_method): Use Qinvalid_function.
14773 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
14775 * makefile.w32-in: Update dependencies.
14776 (LISP_H): Add inttypes.h and stdin.h.
14777 (PROCESS_H): Add unistd.h.
14779 2011-05-06 Eli Zaretskii <eliz@gnu.org>
14781 * lread.c: Include limits.h (fixes the MS-Windows build broken by
14782 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
14784 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
14786 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
14788 * term.c (vfatal): Remove stray call to va_end.
14789 It's not needed and the C Standard doesn't allow it here anyway.
14791 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
14792 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
14794 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
14797 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
14799 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14801 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
14803 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
14805 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
14807 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
14808 * charset.c (Fdefine_charset_internal): Don't initialize
14809 charset.code_space[15]. The value was garbage, on hosts with
14810 32-bit int (Bug#8600).
14812 * lread.c (read_integer): Be more consistent with string-to-number.
14813 Use string_to_number to do the actual conversion; this avoids
14814 rounding errors and fixes some other screwups. Without this fix,
14815 for example, #x1fffffffffffffff was misread as -2305843009213693952.
14816 (digit_to_number): Move earlier, for benefit of read_integer.
14817 Return -1 if the digit is out of range for the base, -2 if it is
14818 not a digit in any supported base. (Bug#8602)
14820 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
14822 * dispnew.c (scrolling_window): Return 1 if we scrolled,
14823 to match comment at start of function. This also removes a
14824 GCC warning about overflow in a 32+64-bit port.
14826 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
14828 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
14829 Reported by Stefan Monnier in
14830 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
14831 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14832 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
14834 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
14835 (EMACS_UINTPTR): Likewise, with uintptr_t.
14837 * lisp.h: Prefer 64-bit EMACS_INT if available.
14838 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
14839 on 32-bit hosts that have 64-bit int, so that they can access
14841 However, temporarily disable this change unless the temporary
14842 symbol WIDE_EMACS_INT is defined.
14844 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
14846 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
14847 This removes an assumption that EMACS_INT and long are the same
14848 width as pointers. The assumption is true for Emacs porting targets
14849 now, but we want to make other targets possible.
14850 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
14851 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
14852 In the rest of the code, change types of integers that hold casted
14853 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
14854 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
14855 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
14856 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
14857 No need to cast type when ORing.
14858 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
14859 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
14860 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
14861 assume EMACS_INT is the same width as char *.
14862 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
14863 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
14864 Remove no-longer-needed casts.
14865 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
14866 (xg_tool_bar_help_callback, xg_make_tool_item):
14867 Use EMACS_INTPTR to hold an integer
14868 that will be cast to void *; this can avoid a GCC warning
14869 if EMACS_INT is not the same width as void *.
14870 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
14871 * xdisp.c (display_echo_area_1, resize_mini_window_1):
14872 (current_message_1, set_message_1):
14873 Use a local to convert to proper width without a cast.
14874 * xmenu.c (dialog_selection_callback): Likewise.
14876 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
14877 Also, don't assume VALBITS / RAND_BITS is less than 5,
14878 and don't rely on undefined behavior when shifting a 1 left into
14880 * lisp.h (get_random): Change signature to match.
14882 * lread.c (hash_string): Use size_t, not int, for hash computation.
14883 Normally we prefer signed values; but hashing is special, because
14884 it's better to use unsigned division on hash table sizes so that
14885 the remainder is nonnegative. Also, size_t is the natural width
14886 for hashing into memory. The previous code used 'int', which doesn't
14887 retain enough info to hash well into very large tables.
14888 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
14890 * dbusbind.c: Don't possibly lose pointer info when converting.
14891 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14892 Use XPNTR rather than XHASH, so that the high-order bits of
14893 the pointer aren't lost when converting through void *.
14895 * eval.c (Fautoload): Don't double-shift a pointer.
14897 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
14899 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
14901 * gnutls.c (DEF_GNUTLS_FN):
14902 * image.c (DEF_IMGLIB_FN): Make function pointers static.
14904 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
14906 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
14909 2011-05-05 Eli Zaretskii <eliz@gnu.org>
14911 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
14912 New version that can reserve upto 2GB of heap space.
14914 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
14916 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
14918 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
14920 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
14921 `gnutls_certificate_set_x509_key_file'.
14923 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
14925 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
14926 Update dependencies.
14928 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14930 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
14931 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
14932 Remove unused parameter `fildes'.
14933 * process.c (read_process_output, send_process): Don't pass it.
14935 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14937 Fix previous change: the library cache is defined in w32.c.
14938 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
14939 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
14941 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14943 Implement dynamic loading of GnuTLS on Windows.
14945 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
14946 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
14947 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14950 * gnutls.c (Qgnutls_dll): Define.
14951 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
14952 (gnutls_*): Declare function pointers.
14953 (init_gnutls_functions): New function to initialize function pointers.
14954 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
14955 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
14956 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14957 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
14958 (emacs_gnutls_write, emacs_gnutls_read)
14959 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
14960 (Fgnutls_available_p): New function.
14961 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
14962 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
14963 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
14965 * image.c: Include w32.h.
14966 (Vimage_type_cache): Delete.
14967 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
14968 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
14969 (w32_delayed_load): Move to w32.c.
14971 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
14973 * w32.c (QCloaded_from, Vlibrary_cache): Define.
14974 (w32_delayed_load): Move from image.c. When loading a library, record
14975 its filename in the :loaded-from property of the library id.
14976 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
14977 Initialize and staticpro them.
14978 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
14980 * process.c: Include lisp.h before w32.h, not after.
14981 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
14982 instead of gnutls_record_check_pending.
14984 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
14986 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
14988 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
14989 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
14992 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
14994 * xterm.c (x_set_frame_alpha): Do not set property on anything
14995 else than FRAME_X_OUTER_WINDOW (Bug#8608).
14997 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
14999 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
15001 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
15003 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
15004 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
15005 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
15006 (gnutls_global_initialized, Qgnutls_bootprop_priority)
15007 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
15008 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
15009 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
15010 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
15011 (Qgnutls_bootprop_callbacks_verify): Make static.
15013 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
15015 * callproc.c: Indentation fixup.
15017 * sysdep.c (wait_for_termination_1): Make static.
15018 (wait_for_termination, interruptible_wait_for_termination):
15019 Move after wait_for_termination_1.
15021 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
15023 * sysdep.c (interruptible_wait_for_termination): New function
15024 which is like wait_for_termination, but allows keyboard
15027 * callproc.c (Fcall_process): Add (:file "file") as an option for
15029 (Fcall_process_region): Ditto.
15031 2011-04-30 Eli Zaretskii <eliz@gnu.org>
15033 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
15034 rather than `XVECTOR (FOO)->size'.
15036 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
15037 inttypes.h, as a gnulib replacement is used if it not available in
15040 2011-04-21 Eli Zaretskii <eliz@gnu.org>
15042 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
15043 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
15044 of MOST_POSITIVE_FIXNUM. (Bug#8528)
15046 * coding.c (coding_alloc_by_realloc): Error out if destination
15047 will grow beyond MOST_POSITIVE_FIXNUM.
15048 (decode_coding_emacs_mule): Abort if there isn't enough place in
15049 charbuf for the composition carryover bytes. Reserve an extra
15050 space for up to 2 characters produced in a loop.
15051 (decode_coding_iso_2022): Abort if there isn't enough place in
15052 charbuf for the composition carryover bytes.
15054 2011-04-21 Eli Zaretskii <eliz@gnu.org>
15056 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
15057 aborting when %lld or %lll format is passed.
15058 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
15059 %llo or %llx format is passed. (Bug#8545)
15061 * window.c (window_scroll_line_based): Use a marker instead of
15062 simple variables to record original value of point. (Bug#7952)
15064 * doprnt.c (doprnt): Fix the case where a multibyte sequence
15065 produced by %s or %c overflows available buffer space. (Bug#8545)
15067 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
15069 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
15070 (SIZE_MAX): Move defn after all includes, as they might #define it.
15072 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
15074 * w32.c (init_environment): Warn about defaulting HOME to C:\.
15076 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
15078 * keyboard.c (Qdelayed_warnings_hook): Define.
15079 (command_loop_1): Run `delayed-warnings-hook'
15080 if Vdelayed_warnings_list is non-nil.
15081 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
15082 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
15084 2011-04-28 Eli Zaretskii <eliz@gnu.org>
15086 * doprnt.c (doprnt): Don't return value smaller than the buffer
15087 size if the message was truncated. (Bug#8545).
15089 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
15091 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
15092 (Fx_window_property): #if-0 the whole functions, not just the bodies.
15094 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
15096 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
15098 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
15100 * makefile.w32-in: Update dependencies.
15102 2011-04-27 Eli Zaretskii <eliz@gnu.org>
15104 Improve `doprnt' and its usage. (Bug#8545)
15105 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
15106 `format_end'. Remove support for %l as a conversion specifier.
15107 Don't use xrealloc. Improve diagnostics when the %l size modifier
15108 is used. Update the commentary.
15110 * eval.c (verror): Simplify calculation of size_t.
15112 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
15115 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
15117 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
15120 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
15122 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
15123 This makes this file independent of the recent pseudovector change.
15125 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
15127 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
15129 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
15130 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
15131 Remove unused local.
15132 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
15134 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
15135 GCC 4.6.0 optimizes based on type-based alias analysis.
15136 For example, if b is of type struct buffer * and v of type struct
15137 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
15138 != &v->size, and therefore "v->size = 1; b->size = 2; return
15139 v->size;" must therefore return 1. This assumption is incorrect
15140 for Emacs, since it type-puns struct Lisp_Vector * with many other
15141 types. To fix this problem, this patch adds a new type struct
15142 vectorlike_header that documents the constraints on layout of vectors
15143 and pseudovectors, and helps optimizing compilers not get fooled
15144 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
15145 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
15146 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
15148 (XSETPVECTYPE): Rewrite in terms of new macro.
15149 (XSETPVECTYPESIZE): New macro, specifying both type and size.
15150 This is a bit clearer, and further avoids the possibility of
15151 undesirable aliasing.
15152 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
15153 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
15154 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
15155 since Lisp_Subr is a special case (no "next" field).
15156 (ASIZE): Now uses header.size rather than size.
15157 All previous uses of XVECTOR (foo)->size replaced to use this macro,
15158 to avoid the hassle of writing XVECTOR (foo)->header.size.
15159 (struct vectorlike_header): New type.
15160 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
15161 object, to help avoid aliasing.
15162 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
15163 (SUBRP): Likewise, since Lisp_Subr is a special case.
15164 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
15165 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
15166 (struct Lisp_Hash_Table): Combine first two members into a single
15167 struct vectorlike_header member. All uses of "size" and "next" members
15168 changed to be "header.size" and "header.next".
15169 * buffer.h (struct buffer): Likewise.
15170 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
15171 * frame.h (struct frame): Likewise.
15172 * process.h (struct Lisp_Process): Likewise.
15173 * termhooks.h (struct terminal): Likewise.
15174 * window.c (struct save_window_data, struct saved_window): Likewise.
15175 * window.h (struct window): Likewise.
15176 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
15177 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
15178 * buffer.c (init_buffer_once): Likewise.
15179 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
15181 * process.c (Fformat_network_address): Use local var for size,
15184 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
15186 Make the Lisp reader and string-to-float more consistent (Bug#8525)
15187 * data.c (atof): Remove decl; no longer used or needed.
15188 (digit_to_number): Move to lread.c.
15189 (Fstring_to_number): Use new string_to_number function, to be
15190 consistent with how the Lisp reader treats infinities and NaNs.
15191 Do not assume that floating-point numbers represent EMACS_INT
15192 without losing information; this is not true on most 64-bit hosts.
15193 Avoid double-rounding errors, by insisting on integers when
15194 parsing non-base-10 numbers, as the documentation specifies.
15195 * lisp.h (string_to_number): New decl, replacing ...
15196 (isfloat_string): Remove.
15197 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
15198 (read1): Do not accept +. and -. as integers; this
15199 appears to have been a coding error. Similarly, do not accept
15200 strings like +-1e0 as floating point numbers. Do not report
15201 overflow for integer overflows unless the base is not 10 which
15202 means we have no simple and reliable way to continue.
15203 Break out the floating-point parsing into a new
15204 function string_to_number, so that Fstring_to_number parses
15205 floating point numbers consistently with the Lisp reader.
15206 (digit_to_number): Move here from data.c. Make it static inline.
15207 (E_CHAR, EXP_INT): Remove, replacing with ...
15208 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
15209 (string_to_number): New function, replacing isfloat_string.
15210 This function checks for valid syntax and produces the resulting
15211 Lisp float number too. Rework it so that string-to-number
15212 no longer mishandles examples like "1.0e+". Use strtoumax,
15213 so that overflow for non-base-10 numbers is reported only when
15214 there's no portable and simple way to convert to floating point.
15216 * textprop.c (set_text_properties_1): Rewrite for clarity,
15217 and to avoid GCC warning about integer overflow.
15219 * intervals.h (struct interval): Use EMACS_INT for members
15220 where EMACS_UINT might cause problems. See
15221 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
15222 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
15223 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
15225 (offset_intervals): Tell GCC not to worry about length overflow
15226 when negating a negative length.
15228 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
15229 (overrun_check_free): Likewise.
15231 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
15232 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
15235 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
15236 (gnutls_make_error): Rename local to avoid shadowing.
15237 (gnutls_emacs_global_deinit): ifdef out; not used.
15238 (Fgnutls_boot): Use const for pointer to readonly storage.
15239 Comment out unused local. Fix pointer signedness problems.
15241 * lread.c (openp): Don't stuff size_t into an 'int'.
15242 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
15243 about possible signed overflow.
15245 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
15246 (GDK_KEY_g): Don't define if already defined.
15247 (xg_prepare_tooltip): Avoid pointer signedness problem.
15248 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
15250 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
15251 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
15253 * xfns.c (Fx_window_property): Simplify a bit,
15254 to make a bit faster and to avoid GCC 4.6.0 warning.
15255 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
15257 * fns.c (internal_equal): Don't assume size_t fits in int.
15259 * alloc.c (compact_small_strings): Tighten assertion a little.
15261 Replace pEd with more-general pI, and fix some printf arg casts.
15262 * lisp.h (pI): New macro, generalizing old pEd macro to other
15263 conversion specifiers. For example, use "...%"pI"d..." rather
15264 than "...%"pEd"...".
15265 (pEd): Remove. All uses replaced with similar uses of pI.
15266 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
15267 * alloc.c (check_pure_size): Don't overflow by converting size to int.
15268 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
15269 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
15270 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
15271 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
15272 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
15274 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
15275 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
15276 * print.c (safe_debug_print, print_object): Likewise.
15277 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
15279 Use pI instead of if-then-else-abort. Use %p to avoid casts,
15280 avoiding the 0 flag, which is not portable.
15281 * process.c (Fmake_network_process): Use pI to avoid cast.
15282 * region-cache.c (pp_cache): Likewise.
15283 * xdisp.c (decode_mode_spec): Likewise.
15284 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
15285 behavior on 64-bit hosts with printf arg.
15286 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
15287 (x_stop_queuing_selection_requests): Likewise.
15288 (x_get_window_property): Don't truncate byte count to an 'int'
15291 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
15292 here, since it parses constructs like leading '-' and spaces,
15293 which are not wanted; and it overflows with large numbers.
15294 Instead, simply match F[0-9]+, which is what is wanted anyway.
15296 * alloc.c: Remove unportable assumptions about struct layout.
15297 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
15298 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
15299 (allocate_vectorlike, make_pure_vector): Use the new macros,
15300 plus offsetof, to remove unportable assumptions about struct layout.
15301 These assumptions hold on all porting targets that I know of, but
15302 they are not guaranteed, they're easy to remove, and removing them
15303 makes further changes easier.
15305 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
15306 This doesn't fix a bug but makes the code clearer.
15307 (string_overrun_cookie): Now const. Use initializers that
15308 don't formally overflow signed char, to avoid warnings.
15309 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
15310 can cause Emacs to crash when string overrun checking is enabled.
15311 (allocate_buffer): Don't assume sizeof (struct buffer) is a
15312 multiple of sizeof (EMACS_INT); it need not be, if
15313 alignof(EMACS_INT) < sizeof (EMACS_INT).
15314 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
15316 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
15318 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
15320 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
15322 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
15323 supposed to be handshaking. (Bug#8556)
15324 Reported by Paul Eggert <eggert@cs.ucla.edu>.
15326 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
15328 * lisp.h (Qdebug): List symbol.
15329 * eval.c (Qdebug): Restore global linkage.
15330 * keyboard.c (debug-on-event): New variable.
15331 (handle_user_signal): Break into debugger when debug-on-event
15332 matches the current signal symbol.
15334 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
15336 * alloc.c (check_sblock, check_string_bytes)
15337 (check_string_free_list): Convert to standard C.
15339 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
15341 * w32.c (emacs_gnutls_push): Fix typo.
15343 2011-04-25 Eli Zaretskii <eliz@gnu.org>
15345 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
15346 "cast to pointer from integer of different size".
15348 Improve doprnt and its use in verror. (Bug#8545)
15349 * doprnt.c (doprnt): Document the set of format control sequences
15350 supported by the function. Use SAFE_ALLOCA instead of always
15353 * eval.c (verror): Don't limit the buffer size at size_max-1, that
15354 is one byte too soon. Don't use xrealloc; instead xfree and
15357 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
15359 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
15362 * gnutls.c: Renamed global_initialized to
15363 gnutls_global_initialized. Added internals for the
15364 :verify-hostname-error, :verify-error, and :verify-flags
15365 parameters of `gnutls-boot' and documented those parameters in the
15366 docstring. Start callback support.
15367 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
15368 unless a fatal error occurred. Call gnutls_alert_send_appropriate
15369 on error. Return error code.
15370 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
15371 (emacs_gnutls_read): Likewise.
15372 (Fgnutls_boot): Return handshake error code.
15373 (emacs_gnutls_handle_error): New function.
15374 (wsaerror_to_errno): Likewise.
15376 * w32.h (emacs_gnutls_pull): Add prototype.
15377 (emacs_gnutls_push): Likewise.
15379 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
15380 (emacs_gnutls_push): Likewise.
15382 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
15384 * process.c (wait_reading_process_output): Check if GnuTLS
15385 buffered some data internally if no FDs are set for TLS
15388 * makefile.w32-in (OBJ2): Add gnutls.$(O).
15389 (LIBS): Link to USER_LIBS.
15390 ($(BLD)/gnutls.$(0)): New target.
15392 2011-04-24 Eli Zaretskii <eliz@gnu.org>
15394 * xdisp.c (handle_single_display_spec): Rename the
15395 display_replaced_before_p argument into display_replaced_p, to
15396 make it consistent with the commentary. Fix typos in the
15399 * textprop.c (syms_of_textprop): Remove dead code.
15400 (copy_text_properties): Delete obsolete commentary about an
15401 interface that was deleted long ago. Fix typos in the description
15404 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
15405 to changes in oldXMenu/XMenu.h from 2011-04-16.
15406 <menu_help_message, prev_menu_help_message>: Constify.
15407 (IT_menu_make_room): menu->help_text is now `const char **';
15410 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
15411 to changes in oldXMenu/XMenu.h from 2011-04-16.
15412 (struct XMenu): Declare `help_text' `const char **'.
15414 * xfaces.c <Qunspecified>: Make extern again.
15416 * syntax.c: Include sys/types.h before including regex.h, as
15419 * doc.c (get_doc_string): Improve the format passed to `error'.
15421 * doprnt.c (doprnt): Improve commentary.
15423 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
15425 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
15428 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
15429 changes in globals.h immediately force recompilation.
15430 (TAGS): Depend on $(CURDIR)/m/intel386.h and
15431 $(CURDIR)/s/ms-w32.h.
15432 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
15434 * character.c (Fchar_direction): Function deleted.
15435 (syms_of_character): Don't defsubr it.
15436 <char-direction-table>: Deleted.
15438 2011-04-23 Eli Zaretskii <eliz@gnu.org>
15440 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
15441 * doprnt.c: Include limits.h.
15442 (SIZE_MAX): New macro.
15443 (doprnt): Return a size_t value. 2nd arg is now size_t.
15444 Many local variables are now size_t instead of int or unsigned.
15445 Improve overflow protection. Support `l' modifier for integer
15446 conversions. Support %l conversion. Don't assume an EMACS_INT
15447 argument for integer conversions and for %c.
15449 * lisp.h (doprnt): Restore prototype.
15451 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
15452 $(SRC)/character.h.
15454 * Makefile.in (base_obj): Add back doprnt.o.
15456 * deps.mk (doprnt.o): Add back prerequisites.
15457 (callint.o): Depend on character.h.
15459 * eval.c (internal_lisp_condition_case): Include the handler
15460 representation in the error message.
15461 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
15462 when breaking from the loop.
15464 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
15466 * callint.c (Fcall_interactively): When displaying error message
15467 about invalid control letter, pass the character's codepoint, not
15468 a pointer to its multibyte form. Improve display of the character
15469 in octal and display also its hex code.
15471 * character.c (char_string): Use %x to display the (unsigned)
15472 codepoint of an invalid character, to avoid displaying a bogus
15475 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
15476 `error', not SYMBOL_NAME itself.
15478 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
15479 character arguments to `error'.
15481 * charset.c (check_iso_charset_parameter): Fix incorrect argument
15482 to `error' in error message about FINAL_CHAR argument. Make sure
15483 FINAL_CHAR is a character, and use %c when it is passed as
15484 argument to `error'.
15486 2011-04-23 Eli Zaretskii <eliz@gnu.org>
15488 * s/ms-w32.h (localtime): Redirect to sys_localtime.
15490 * w32.c: Include <time.h>.
15491 (sys_localtime): New function.
15493 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
15495 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
15497 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
15499 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
15501 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
15502 zombies (Bug#8467).
15504 2011-04-19 Eli Zaretskii <eliz@gnu.org>
15506 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
15507 gl_state.e_property when gl_state.object is Qt.
15509 * insdel.c (make_gap_larger): Remove limitation of buffer size
15512 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
15514 * xdisp.c (lookup_glyphless_char_display)
15515 (produce_glyphless_glyph): Handle cons cell entry in
15516 glyphless-char-display.
15517 (Vglyphless_char_display): Document it.
15519 * term.c (produce_glyphless_glyph): Handle cons cell entry in
15520 glyphless-char-display.
15522 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
15524 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
15526 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
15528 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
15529 definition for no-X builds.
15531 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
15533 Static checks with GCC 4.6.0 and non-default toolkits.
15535 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
15537 * process.c (keyboard_bit_set): Define only if SIGIO.
15538 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
15539 (send_process): Repair possible setjmp clobbering.
15541 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
15543 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
15545 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
15547 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
15548 Define only if needed.
15550 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
15551 by pacifying GCC about it. Maybe it's time to retire it?
15552 * xfaces.c (USG, __TIMEVAL__): Likewise.
15554 * dispextern.h (struct redisplay_interface): Rename param
15555 to avoid shadowing.
15556 * termhooks.h (struct terminal): Likewise.
15557 * xterm.c (xembed_send_message): Likewise.
15559 * insdel.c (make_gap_smaller): Define only if
15560 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
15562 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
15565 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
15566 so that we aren't warned about unused symbols.
15568 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
15570 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
15572 * xfns.c (x_real_positions): Mark locals as initialized.
15574 * xmenu.c (xmenu_show): Don't use uninitialized vars.
15576 * xterm.c: Fix problems found by static analysis with other toolkits.
15577 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
15578 (x_dispatch_event): Declare static if USE_GTK, and
15579 define if USE_GTK || USE_X_TOOLKIT.
15580 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
15581 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
15582 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
15583 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
15585 * xmenu.c (menu_help_callback): Pointer type fixes.
15586 Use const pointers when pointing at readonly data. Avoid pointer
15587 signedness clashes.
15588 (FALSE): Remove unused macro.
15589 (update_frame_menubar): Remove unused decl.
15591 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
15593 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
15594 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
15595 (single_menu_item): Rename local to avoid shadowing.
15597 * keyboard.c (make_lispy_event): Remove unused local var.
15599 * frame.c, frame.h (x_get_resource_string): Bring this back, but
15600 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
15602 * bitmaps: Change bitmaps from unsigned char back to the X11
15603 compatible char. Avoid the old compiler warnings about
15604 out-of-range initializers by using, for example, '\xab' rather
15607 * xgselect.c (xgselect_initialize): Check vs interface
15608 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
15610 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
15612 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
15613 to read-only memory.
15615 * fns.c (vector): Remove; this old hack is no longer needed.
15617 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
15619 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
15621 * xrdb.c (x_load_resources): Omit unused local.
15623 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
15624 (x_window): Rename locals to avoid shadowing.
15625 (USG): Use the kludged USG macro, to pacify gcc.
15627 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
15628 (x_term_init): Remove local to avoid shadowing.
15630 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
15632 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
15633 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
15635 2011-04-16 Eli Zaretskii <eliz@gnu.org>
15637 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
15639 Fix regex.c, syntax.c and friends for buffers > 2GB.
15640 * syntax.h (struct gl_state_s): Declare character position members
15643 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
15645 * textprop.c (verify_interval_modification, interval_of):
15646 Declare arguments EMACS_INT.
15648 * intervals.c (adjust_intervals_for_insertion): Declare arguments
15651 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
15653 * indent.c (Fvertical_motion): Local variable it_start is now
15656 * regex.c (re_match, re_match_2, re_match_2_internal)
15657 (bcmp_translate, regcomp, regexec, print_double_string)
15658 (group_in_compile_stack, re_search, re_search_2, regex_compile)
15659 (re_compile_pattern, re_exec): Declare arguments and local
15660 variables `size_t' and `ssize_t' and return values `regoff_t', as
15662 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
15663 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
15664 <compile_stack_type>: `size' and `avail' are now `size_t'.
15666 * regex.h <regoff_t>: Use ssize_t, not int.
15667 (re_search, re_search_2, re_match, re_match_2): Arguments that
15668 specify buffer/string position and length are now ssize_t and
15669 size_t. Return type is regoff_t.
15671 2011-04-16 Ben Key <bkey76@gmail.com>
15673 * nsfont.m: Fixed bugs in ns_get_family and
15674 ns_descriptor_to_entity that were caused by using free to
15675 deallocate memory blocks that were allocated by xmalloc (via
15676 xstrdup). This caused Emacs to crash when compiled with
15677 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
15678 --enable-checking=xmallocoverrun). xfree is now used to
15679 deallocate these memory blocks.
15681 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
15683 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
15685 emacs_write: Accept and return EMACS_INT for sizes.
15686 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
15688 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
15689 Accept and return EMACS_INT.
15690 (emacs_gnutls_write): Return the number of bytes written on
15692 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
15693 (emacs_read, emacs_write): Remove check for negative size, as the
15694 Emacs source code has been audited now.
15695 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
15696 (emacs_read, emacs_write): Use it.
15697 * process.c (send_process): Adjust to the new signatures of
15698 emacs_write and emacs_gnutls_write. Do not attempt to store
15699 a byte offset into an 'int'; it might overflow.
15700 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
15702 * sound.c: Don't assume sizes fit in 'int'.
15703 (struct sound_device.period_size, alsa_period_size):
15704 Return EMACS_INT, not int.
15705 (struct sound_device.write, vox_write, alsa_write):
15706 Accept EMACS_INT, not int.
15707 (wav_play, au_play): Use EMACS_INT to store sizes and to
15708 record read return values.
15710 2011-04-15 Ben Key <bkey76@gmail.com>
15712 * keyboard.c (Qundefined): Don't declare static since it is used
15714 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
15715 static since they are used in nsfont.m.
15717 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
15719 * process.c (Qprocessp): Don't declare static.
15720 * lisp.h (Qprocessp): Declare again.
15722 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
15724 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
15726 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
15728 Improve C-level modularity by making more things 'static'.
15730 Don't publish debugger-only interfaces to other modules.
15731 * lisp.h (safe_debug_print, debug_output_compilation_hack):
15732 (verify_bytepos, count_markers): Move decls to the only modules
15734 * region-cache.h (pp_cache): Likewise.
15735 * window.h (check_all_windows): Likewise.
15736 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
15738 * sysdep.c (croak): Now static, if
15739 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
15740 * syssignal.h (croak): Declare only if not static.
15742 * alloc.c (refill_memory_reserve): Now static if
15743 !defined REL_ALLOC || defined SYSTEM_MALLOC.
15744 * lisp.h (refill_memory_reserve): Declare only if not static.
15746 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
15747 Define only if USE_LUCID.
15749 * xrdb.c (x_customization_string, x_rm_string): Now static.
15751 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
15752 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
15754 * xdisp.c (draw_row_with_mouse_face): Now static.
15755 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
15757 * window.h (check_all_windows): Mark externally visible.
15759 * window.c (window_deletion_count): Now static.
15761 * undo.c: Make symbols static if they're not exported.
15762 (last_undo_buffer, last_boundary_position, pending_boundary):
15765 * textprop.c (interval_insert_behind_hooks): Now static.
15766 (interval_insert_in_front_hooks): Likewise.
15768 * term.c: Make symbols static if they're not exported.
15769 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
15770 (max_frame_lines, tty_set_terminal_modes):
15771 (tty_reset_terminal_modes, tty_turn_off_highlight):
15772 (get_tty_terminal): Now static.
15773 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
15774 * termhooks.h (term_mouse_moveto): Do not declare if
15775 HAVE_WINDOW_SYSTEM.
15776 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
15777 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
15779 * sysdep.c: Make symbols static if they're not exported.
15780 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
15782 (sigprocmask_set, full_mask): Remove; unused.
15783 (wait_debugging): Mark as visible.
15784 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
15785 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
15787 * syntax.c (syntax_temp): Define only if !__GNUC__.
15789 * sound.c (current_sound_device, current_sound): Now static.
15791 * search.c (searchbufs, searchbuf_head): Now static.
15793 * scroll.c (scroll_cost): Remove; unused.
15794 * dispextern.h (scroll_cost): Remove decl.
15796 * region-cache.h (pp_cache): Mark as externally visible.
15798 * process.c: Make symbols static if they're not exported.
15799 (process_tick, update_tick, create_process, chan_process):
15800 (Vprocess_alist, proc_buffered_char, datagram_access):
15801 (fd_callback_data, send_process_frame, process_sent_to): Now static.
15802 (deactivate_process): Mark defn as static, as well as decl.
15803 * lisp.h (create_process): Remove decl.
15804 * process.h (chan_process, Vprocess_alist): Remove decls.
15806 * print.c: Make symbols static if they're not exported.
15807 (print_depth, new_backquote_output, being_printed, print_buffer):
15808 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
15809 (print_interval, print_number_index, initial_stderr_stream):
15811 * lisp.h (Fprinc): Remove decl.
15812 (debug_output_compilation_hack): Mark as externally visible.
15814 * sysdep.c (croak): Move decl from here to syssignal.h.
15815 * syssignal.h (croak): Put it here, so the API can be checked when
15816 'croak' is called from dissociate_if_controlling_tty.
15818 * minibuf.c: Make symbols static if they're not exported.
15819 (minibuf_save_list, choose_minibuf_frame): Now static.
15820 * lisp.h (choose_minibuf_frame): Remove decl.
15822 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
15824 * lread.c: Make symbols static if they're not exported.
15825 (read_objects, initial_obarray, oblookup_last_bucket_number):
15827 (make_symbol): Remove; unused.
15828 * lisp.h (initial_obarray, make_symbol): Remove decls.
15830 * keyboard.c: Make symbols static if they're not exported.
15831 (single_kboard, recent_keys_index, total_keys, recent_keys):
15832 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
15833 (this_single_command_key_start, echoing, last_auto_save):
15834 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
15835 (command_loop, echo_now, keyboard_init_hook, help_char_p):
15836 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
15837 (Vlispy_mouse_stem, double_click_count):
15839 (force_auto_save_soon): Define only if SIGDANGER.
15840 (ignore_mouse_drag_p): Now static if
15841 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
15842 (print_help): Remove; unused.
15843 (stop_character, last_timer_event): Mark as externally visible.
15844 * keyboard.h (ignore_mouse_drag_p): Declare only if
15845 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
15846 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
15847 * lisp.h (echoing): Remove decl.
15848 (force_auto_save_soon): Declare only if SIGDANGER.
15849 * xdisp.c (redisplay_window): Simplify code, to make it more
15850 obvious that ignore_mouse_drag_p is not accessed if !defined
15851 USE_GTK && !defined HAVE_NS.
15853 * intervals.c: Make symbols static if they're not exported.
15854 (merge_properties_sticky, merge_interval_right, delete_interval):
15856 * intervals.h (merge_interval_right, delete_interval): Remove decls.
15858 * insdel.c: Make symbols static if they're not exported.
15859 However, leave prepare_to_modify_buffer alone. It's never
15860 called from outside this function, but that appears to be a bug.
15861 (combine_after_change_list, combine_after_change_buffer):
15862 (adjust_after_replace, signal_before_change): Now static.
15863 (adjust_after_replace_noundo): Remove; unused.
15864 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
15865 (signal_before_change): Remove decls.
15867 * indent.c (val_compute_motion, val_vmotion): Now static.
15869 * image.c: Make symbols static if they're not exported.
15870 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
15872 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
15873 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
15875 * fringe.c (standard_bitmaps): Now static.
15876 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
15878 * frame.c: Make symbols static if they're not exported.
15879 (x_report_frame_params, make_terminal_frame): Now static.
15880 (get_frame_param): Now static, unless HAVE_NS.
15881 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
15882 (x_get_resource_string): Remove; not used.
15883 * frame.h (make_terminal_frame, x_report_frame_params):
15884 (x_get_resource_string); Remove decls.
15885 (x_fullscreen_adjust): Declare only if WINDOWSNT.
15886 * lisp.h (get_frame_param): Declare only if HAVE_NS.
15888 * font.c, fontset.c: Make symbols static if they're not exported.
15889 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
15890 (FACE_SUITABLE_FOR_CHAR_P): Use it.
15891 * font.c (font_close_object): Now static.
15892 * font.h (font_close_object): Remove.
15893 * fontset.c (FONTSET_OBJLIST): Remove.
15894 (free_realized_fontset) #if-0 the body, which does nothing.
15895 (face_suitable_for_char_p): #if-0, as it's never called.
15896 * fontset.h (face_suitable_for_char_p): Remove decl.
15897 * xfaces.c (face_at_string_position):
15898 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
15899 since 0 is always ASCII.
15901 * fns.c (weak_hash_tables): Now static.
15903 * fileio.c: Make symbols static if they're not exported.
15904 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
15905 (Vwrite_region_annotation_buffers): Now static.
15907 * eval.c: Make symbols static if they're not exported.
15908 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
15909 * lisp.h (backtrace_list): Remove decl.
15911 * emacs.c: Make symbols static if they're not exported.
15912 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
15913 (fatal_error_code, fatal_error_signal_hook, standard_args):
15915 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
15916 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
15917 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
15918 * lisp.h (fatal_error_signal_hook): Remove decl.
15919 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
15921 * editfns.c: Move a (normally-unused) function to its only use.
15922 * editfns.c, lisp.h (get_operating_system_release): Remove.
15923 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
15924 worth the hassle of breaking this out.
15926 * xterm.c: Make symbols static if they're not exported.
15927 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
15928 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
15929 (x_destroy_window, x_delete_display):
15931 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
15932 (x_mouse_leave): Remove; unused.
15933 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
15934 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
15935 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
15937 (x_mouse_leave): Declare only if WINDOWSNT.
15938 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
15939 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
15942 * ftxfont.c: Make symbols static if they're not exported.
15943 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
15945 * font.h (ftxfont_driver): Likewise.
15947 * xfns.c: Make symbols static if they're not exported.
15948 (x_last_font_name, x_display_info_for_name):
15949 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
15950 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
15951 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
15952 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
15953 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
15954 (last_show_tip_args): Now static.
15955 (xic_defaut_fontset, xic_create_fontsetname): Define only if
15956 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
15957 (x_screen_planes): Remove; unused.
15958 * dispextern.h (x_screen_planes): Remove decl.
15960 * dispnew.c: Make symbols static if they're not exported.
15961 * dispextern.h (redraw_garbaged_frames, scrolling):
15962 (increment_row_positions): Remove.
15963 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
15964 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
15966 (redraw_garbaged_frames): Remove; unused.
15968 * xfaces.c: Make symbols static if they're not exported.
15969 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
15971 * xterm.h (defined_color): Remove decls.
15972 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
15973 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
15974 (menu_face_changed_default, defined_color, free_realized_face):
15975 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
15976 (ascii_face_of_lisp_face): Remove; unused.
15978 * xdisp.c: Make symbols static if they're not exported.
15979 * dispextern.h (scratch_glyph_row, window_box_edges):
15980 (glyph_to_pixel_coords, set_cursor_from_row):
15981 (get_next_display_element, set_iterator_to_next):
15982 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
15983 (show_mouse_face): Remove decls
15984 * frame.h (message_buf_print): Likewise.
15985 * lisp.h (pop_message, set_message, check_point_in_composition):
15987 * xterm.h (set_vertical_scroll_bar): Likewise.
15988 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
15989 (message_buf_print, scratch_glyph_row, displayed_buffer):
15990 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
15991 (get_next_display_element, show_mouse_face, window_box_edges):
15992 (frame_to_window_pixel_xy, check_point_in_composition):
15993 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
15994 (glyph_to_pixel_coords): Remove; unused.
15996 * dired.c (file_name_completion): Now static.
15998 * dbusbind.c (xd_in_read_queued_messages): Now static.
16000 * lisp.h (circular_list_error, FOREACH): Remove; unused.
16001 * data.c (circular_list_error): Remove.
16003 * commands.h (last_point_position, last_point_position_buffer):
16004 (last_point_position_window): Remove decls.
16005 * keyboard.c: Make these variables static.
16007 * coding.h (coding, code_convert_region, encode_coding_gap):
16009 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
16010 (iso_code_class, detect_coding, code_convert_region): Now static.
16011 (encode_coding_gap): Remove; unused.
16013 * chartab.c (chartab_chars, chartab_bits): Now static.
16015 * charset.h (charset_iso_8859_1): Remove decl.
16016 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
16019 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
16020 * ccl.c (Vccl_program_table): Now static.
16021 (check_ccl_update): Remove; unused.
16023 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
16024 * category.h: ... from here.
16025 * category.c (check_category_table, set_category_set): Now static.
16027 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
16028 * lisp.h: Remove these decls.
16030 * buffer.c (buffer_count): Remove unused var.
16032 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
16033 so that it's not optimized away.
16034 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
16035 * dispextern.h (bidi_dump_cached_states): Remove, since it's
16036 exported only to the debugger.
16038 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
16039 * atimer.h (run_all_atimers): Remove; not exported.
16041 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
16042 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
16043 was inaccessible from Lisp.
16044 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
16045 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
16047 alloc.c: Import and export fewer symbols, and remove unused items.
16048 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
16050 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
16051 it's not optimized away by whole-program optimization.
16052 (message_enable_multibyte, free_misc): Remove.
16053 (catchlist, handlerlist, mark_backtrace):
16054 Declare only if BYTE_MARK_STACK.
16055 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
16056 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
16057 (message_enable_multibyte): Remove decl.
16058 (free_misc, interval_free_list, float_block, float_block_index):
16059 (n_float_blocks, float_free_list, cons_block, cons_block_index):
16060 (cons_free_list, last_marked_index):
16062 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
16063 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
16064 (mark_backtrace): Define only if BYTE_MARK_STACK.
16065 * xdisp.c (message_enable_multibyte): Now static.
16067 Declare Lisp_Object Q* variables to be 'static' if not exported.
16068 This makes it easier for human readers (and static analyzers)
16069 to see whether these variables are used from other modules.
16070 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
16071 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
16072 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
16073 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
16074 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
16075 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
16076 * xmenu.c, xselect.c:
16077 Declare Q* vars static if they are not used in other modules.
16078 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
16079 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
16080 Remove decls of unexported vars.
16081 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
16083 * lisp.h (DEFINE_FUNC): Make sname 'static'.
16085 Make Emacs functions such as Fatom 'static' by default.
16086 This makes it easier for human readers (and static analyzers)
16087 to see whether these functions can be called from other modules.
16088 DEFUN now defines a static function. To make the function external
16089 so that it can be used in other C modules, use the new macro DEFUE.
16090 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
16091 (Finit_image_library):
16092 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
16093 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
16094 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
16095 Remove decls, since these functions are now static.
16096 (Funintern, Fget_internal_run_time): New decls, since these functions
16097 were already external.
16099 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
16100 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
16101 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
16102 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
16103 * keyboard.c, keymap.c, lread.c:
16104 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
16105 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
16106 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
16107 Mark functions with DEFUE instead of DEFUN,
16108 if they are used in other modules.
16109 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
16110 decls for now-static functions.
16111 * buffer.h (Fdelete_overlay): Remove decl.
16112 * callproc.c (Fgetenv_internal): Mark as internal.
16113 * composite.c (Fremove_list_of_text_properties): Remove decl.
16114 (Fcomposition_get_gstring): New forward static decl.
16115 * composite.h (Fcomposite_get_gstring): Remove decl.
16116 * dired.c (Ffile_attributes): New forward static decl.
16117 * doc.c (Fdocumntation_property): New forward static decl.
16118 * eval.c (Ffetch_bytecode): New forward static decl.
16119 (Funintern): Remove extern decl; now in .h file where it belongs.
16120 * fileio.c (Fmake_symbolic_link): New forward static decl.
16121 * image.c (Finit_image_library): New forward static decl.
16122 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
16123 * intervals.h (Fprevious_property_change):
16124 (Fremove_list_of_text_properties): Remove decls.
16125 * keyboard.c (Fthis_command_keys): Remove decl.
16126 (Fcommand_execute): New forward static decl.
16127 * keymap.c (Flookup_key): New forward static decl.
16128 (Fcopy_keymap): Now static.
16129 * keymap.h (Flookup_key): Remove decl.
16130 * process.c (Fget_process): New forward static decl.
16131 (Fprocess_datagram_address): Mark as internal.
16132 * syntax.c (Fsyntax_table_p): New forward static decl.
16133 (skip_chars): Remove duplicate decl.
16134 * textprop.c (Fprevious_property_change): New forward static decl.
16135 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
16137 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
16138 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
16140 * editfns.c (Fformat): Remove unreachable code.
16142 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
16144 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
16147 2011-04-13 Eli Zaretskii <eliz@gnu.org>
16149 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
16150 when at ZV. (Bug#8487)
16152 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
16154 * charset.c (Fclear_charset_maps): Use xfree instead of free.
16156 * keyboard.c (parse_tool_bar_item): Likewise.
16157 * sound.c (sound_cleanup, alsa_close): Likewise.
16158 * termcap.c (tgetent): Likewise.
16159 * xfns.c (x_default_font_parameter): Likewise.
16160 * xsettings.c (read_and_apply_settings): Likewise.
16162 * alloc.c (overrun_check_malloc, overrun_check_realloc)
16163 (overrun_check_free): Protoize.
16165 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
16167 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
16168 since callers should never pass a negative size.
16169 Change the signature to match that of plain 'read' and 'write'; see
16170 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
16171 * lisp.h: Update prototypes of emacs_write and emacs_read.
16173 2011-04-11 Eli Zaretskii <eliz@gnu.org>
16175 * xdisp.c (redisplay_window): Don't try to determine the character
16176 position of the scroll margin if the window start point w->startp
16177 is outside the buffer's accessible region. (Bug#8468)
16179 2011-04-10 Eli Zaretskii <eliz@gnu.org>
16181 Fix write-region and its subroutines for buffers > 2GB.
16182 * fileio.c (a_write, e_write): Modify declaration of arguments and
16183 local variables to support buffers larger than 2GB.
16184 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
16186 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
16187 argument, local variables, and return value.
16189 * lisp.h: Update prototypes of emacs_write and emacs_read.
16191 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
16193 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
16195 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
16197 Fix more problems found by GCC 4.6.0's static checks.
16199 * xdisp.c (vmessage): Use a better test for character truncation.
16201 * charset.c (load_charset_map): <, not <=, for optimization,
16202 and to avoid potential problems with integer overflow.
16203 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
16204 * casetab.c (set_identity, shuffle): Likewise.
16205 * editfns.c (Fformat): Likewise.
16206 * syntax.c (skip_chars): Likewise.
16208 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
16209 This also lets GCC 4.6.0 generate slightly better loop code.
16211 * callint.c (Fcall_interactively): <, not <=, for optimization.
16212 (Fcall_interactively): Count the number of arguments produced,
16213 not the number of arguments given. This is simpler and lets GCC
16214 4.6.0 generate slightly better code.
16216 * ftfont.c: Distingish more carefully between FcChar8 and char.
16217 The previous code passed unsigned char * to a functions like
16218 strlen and xstrcasecmp that expect char *, which does not
16219 conform to the C standard.
16220 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
16221 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
16222 char * when the C standard requires it.
16224 * keyboard.c (read_char): Remove unused var.
16226 * eval.c: Port to Windows vsnprintf (Bug#8435).
16227 Include <limits.h>.
16228 (SIZE_MAX): Define if the headers do not.
16229 (verror): Do not give up if vsnprintf returns a negative count.
16230 Instead, grow the buffer. This ports to Windows vsnprintf, which
16231 does not conform to C99. Problem reported by Eli Zaretskii.
16232 Also, simplify the allocation scheme, by avoiding the need for
16233 calling realloc, and removing the ALLOCATED variable.
16235 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
16237 Remove invocations of doprnt, as Emacs now uses vsnprintf.
16238 But keep the doprint source code for now, as we might revamp it
16239 and use it again (Bug#8435).
16240 * lisp.h (doprnt): Remove.
16241 * Makefile.in (base_obj): Remove doprnt.o.
16242 * deps.mk (doprnt.o): Remove.
16244 error: Print 32- and 64-bit integers portably (Bug#8435).
16245 Without this change, on typical 64-bit hosts error ("...%d...", N)
16246 was used to print both 32- and 64-bit integers N, which relied on
16247 undefined behavior.
16248 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
16249 * lisp.h (error, verror): Mark as printf-like functions.
16250 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
16251 Report overflow in size calculations when allocating printf buffer.
16252 Do not truncate output string at its first null byte.
16253 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
16254 Truncate the output at a character boundary, since vsnprintf does not
16256 * charset.c (check_iso_charset_parameter): Convert internal
16257 character to string before calling 'error', since %c now has the
16259 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
16260 overflow when computing char to be passed to 'error'. Do not
16261 pass Lisp_Object to 'error'; pass the integer instead.
16262 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
16263 formatted with plain %d.
16265 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
16267 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
16269 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
16271 * xterm.c (x_catch_errors): Remove duplicate declaration.
16273 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
16275 * xdisp.c, lisp.h (message_nolog): Remove; unused.
16277 2011-04-10 Jim Meyering <meyering@redhat.com>
16279 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
16280 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
16281 return ssize_t not "int", and use size_t as the buffer length.
16282 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
16283 * gnutls.h: Update declarations.
16284 * process.c (read_process_output): Use ssize_t, to match.
16285 (send_process): Likewise.
16287 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
16289 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
16291 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
16293 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
16294 Use unsigned char, to match FcChar8 type definition.
16296 * xterm.c (handle_one_xevent):
16297 * xmenu.c (create_and_show_popup_menu):
16298 * xselect.c (x_decline_selection_request)
16299 (x_reply_selection_request): Avoid type-punned deref of X events.
16301 2011-04-09 Eli Zaretskii <eliz@gnu.org>
16303 Fix some uses of `int' instead of EMACS_INT.
16304 * search.c (string_match_1, fast_string_match)
16305 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
16306 (scan_buffer, find_next_newline_no_quit)
16307 (find_before_next_newline, search_command, Freplace_match)
16308 (Fmatch_data): Make some `int' variables be EMACS_INT.
16310 * xdisp.c (display_count_lines): 3rd argument and return value now
16311 EMACS_INT. All callers changed.
16312 (pint2hrstr): Last argument is now EMACS_INT.
16314 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
16315 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
16316 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
16317 (decode_coding_utf_16, decode_coding_emacs_mule)
16318 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
16319 (decode_coding_ccl, decode_coding_charset)
16320 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
16321 (decode_coding_iso_2022, decode_coding_emacs_mule)
16322 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
16323 <char_offset, last_offset>: Declare EMACS_INT.
16324 (encode_coding_utf_8, encode_coding_utf_16)
16325 (encode_coding_emacs_mule, encode_invocation_designation)
16326 (encode_designation_at_bol, encode_coding_iso_2022)
16327 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
16328 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
16330 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
16331 (encode_invocation_designation): Last argument P_NCHARS is now
16333 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
16334 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
16336 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
16339 * ccl.c (Fccl_execute_on_string): Declare some variables
16342 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
16344 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
16346 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
16348 * process.c (Fformat_network_address): Doc fix.
16350 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
16352 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
16354 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
16356 * keyboard.c (read_char): Call Lisp function help-form-show,
16357 instead of using internal_with_output_to_temp_buffer.
16358 (Qhelp_form_show): New var.
16359 (syms_of_keyboard): Use DEFSYM macro.
16361 * print.c (internal_with_output_to_temp_buffer): Function deleted.
16363 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
16365 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
16367 * process.c (Flist_processes): Remove to Lisp.
16368 (list_processes_1): Delete.
16370 2011-04-06 Eli Zaretskii <eliz@gnu.org>
16372 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
16374 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
16376 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
16378 Fix more problems found by GCC 4.6.0's static checks.
16380 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
16382 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
16384 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
16386 * xdisp.c (vmessage): Mark as a printf-like function.
16388 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
16390 * sound.c (sound_warning): Don't crash if arg contains a printf format.
16392 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
16393 printf-like functions.
16394 (tiff_load): Add casts to remove these marks before passing them
16395 to system-supplied API.
16397 * eval.c (Fsignal): Remove excess argument to 'fatal'.
16399 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
16400 This avoids several warnings with gcc -Wstrict-overflow.
16401 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
16402 directly, rather than having caller test rule sign. This avoids
16403 some unnecessary tests.
16404 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
16405 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
16406 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
16408 * xfont.c (xfont_text_extents): Remove var that was set but not used.
16409 (xfont_open): Avoid unnecessary tests.
16411 * composite.c (composition_gstring_put_cache): Use unsigned integer.
16413 * composite.h, composite.c (composition_gstring_put_cache):
16414 Use EMACS_INT, not int, for length.
16416 * composite.h (COMPOSITION_DECODE_REFS): New macro,
16417 breaking out part of COMPOSITION_DECODE_RULE.
16418 (COMPOSITION_DECODE_RULE): Use it.
16419 * composite.c (get_composition_id): Remove unused local vars,
16420 by using the new macro.
16422 * textprop.c (set_text_properties_1): Change while to do-while,
16423 since the condition is always true at first.
16425 * intervals.c (graft_intervals_into_buffer): Mark var as used.
16426 (interval_deletion_adjustment): Return unsigned value.
16429 * process.c (list_processes_1, create_pty, read_process_output):
16430 (exec_sentinel): Remove vars that were set but not used.
16431 (create_pty): Remove unnecessary "volatile"s.
16432 (Fnetwork_interface_info): Avoid possibility of int overflow.
16433 (read_process_output): Do adaptive read buffering even if carryover.
16434 (read_process_output): Simplify nbytes computation if buffered.
16436 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
16438 * syntax.c (scan_words): Remove var that was set but not used.
16439 (update_syntax_table): Use unsigned instead of int.
16441 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
16442 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
16443 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
16445 * print.c (print_error_message): Avoid int overflow.
16447 * font.c (font_list_entities): Redo for clarity,
16448 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
16450 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
16451 (font_score): Avoid potential overflow in diff calculation.
16453 * fns.c (substring_both): Remove var that is set but not used.
16454 (sxhash): Redo loop for clarity and to avoid wraparound warning.
16456 * eval.c (funcall_lambda): Rename local to avoid shadowing.
16458 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
16459 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
16460 can always succeed if overflow has undefined behavior.
16462 * search.c (boyer_moore, wordify): Remove vars set but not used.
16463 (wordify): Omit three unnecessary tests.
16465 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
16466 All callers changed. This avoids the need for an unused var.
16468 * casefiddle.c (casify_region): Remove var that is set but not used.
16470 * dired.c (file_name_completion): Remove var that is set but not used.
16472 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
16474 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
16475 (Finsert_file_contents): Remove unnecessary code checking fd.
16477 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
16478 Check for integer overflow on size calculations.
16480 * buffer.c (Fprevious_overlay_change): Remove var that is set
16483 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
16484 Remove vars that are set but not used.
16485 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
16486 (timer_check_2): Mark vars as initialized.
16488 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
16490 * image.c (lookup_image): Remove var that is set but not used.
16491 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
16493 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
16494 that are set but not used.
16496 * xfns.c (make_invisible_cursor): Don't return garbage
16497 if XCreateBitmapFromData fails (Bug#8410).
16499 * xselect.c (x_get_local_selection, x_handle_property_notify):
16500 Remove vars that are set but not used.
16502 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
16503 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
16505 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
16506 Remove var that is set but not used.
16507 (scroll_bar_windows_size): Now size_t, not int.
16508 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
16509 Check for overflow.
16511 * xfaces.c (realize_named_face): Remove vars that are set but not used.
16512 (map_tty_color) [!defined MSDOS]: Likewise.
16514 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
16516 * coding.c: Remove vars that are set but not used.
16517 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
16518 All callers changed.
16519 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
16520 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
16521 (decode_coding_charset): Remove vars that are set but not used.
16523 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
16524 that is set but not used.
16526 * print.c (print_object): Remove var that is set but not used.
16528 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
16529 The gnulib version avoids calling malloc in the usual case,
16530 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
16531 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
16532 * filelock.c (current_lock_owner): Likewise.
16533 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
16534 * sysdep.c: Include allocator.h, careadlinkat.h.
16535 (emacs_no_realloc_allocator): New static constant.
16536 (emacs_readlink): New function.
16537 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
16538 ../lib/careadlinkat.h.
16540 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
16542 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
16543 first non-nil return value).
16545 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
16547 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
16548 if not defined (Bug#8403).
16550 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
16552 * xdisp.c (display_count_lines): Remove parameter `start',
16553 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16554 (get_char_face_and_encoding): Remove parameter `multibyte_p',
16555 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
16556 (fill_stretch_glyph_string): Remove parameters `row' and `area',
16557 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
16558 and thereabouts. All callers changed.
16559 (get_per_char_metric): Remove parameter `f', unused since
16560 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
16562 2011-04-02 Jim Meyering <meyering@redhat.com>
16564 do not dereference NULL upon failed strdup
16565 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
16566 (ns_get_family): Likewise.
16568 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
16570 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
16572 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
16574 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
16577 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
16579 Add lexical binding.
16581 * window.c (Ftemp_output_buffer_show): New fun.
16582 (Fsave_window_excursion):
16583 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
16585 * lread.c (lisp_file_lexically_bound_p): New function.
16586 (Fload): Bind Qlexical_binding.
16587 (readevalloop): Remove `evalfun' arg.
16588 Bind Qinternal_interpreter_environment.
16589 (Feval_buffer): Bind Qlexical_binding.
16590 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
16592 (syms_of_lread): Declare `lexical-binding'.
16594 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
16596 * keyboard.c (eval_dyn): New fun.
16597 (menu_item_eval_property): Use it.
16599 * image.c (parse_image_spec): Use Ffunctionp.
16601 * fns.c (concat, mapcar1): Accept byte-code-functions.
16603 * eval.c (Fsetq): Handle lexical vars.
16604 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
16605 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
16606 (FletX, Flet): Obey lexical binding.
16607 (Fcommandp): Handle closures.
16608 (Feval): New `lexical' arg.
16609 (eval_sub): New function extracted from Feval. Use it almost
16610 everywhere where Feval was used. Look up vars in lexical env.
16612 (Ffunctionp): Move from subr.el.
16613 (Ffuncall): Handle closures.
16614 (apply_lambda): Remove `eval_flags'.
16615 (funcall_lambda): Handle closures and new byte-code-functions.
16616 (Fspecial_variable_p): New function.
16617 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
16618 but without exporting it to Lisp.
16620 * doc.c (Fdocumentation, store_function_docstring):
16621 * data.c (Finteractive_form): Handle closures.
16623 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
16626 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
16628 (exec_byte_code): New function extracted from Fbyte_code to handle new
16629 calling convention for byte-code-functions. Add new byte-codes.
16631 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
16633 * alloc.c (Fmake_symbol): Init new `declared_special' field.
16635 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
16637 * xdisp.c (redisplay_internal): Fix prototype.
16639 2011-03-31 Eli Zaretskii <eliz@gnu.org>
16641 * xdisp.c (SCROLL_LIMIT): New macro.
16642 (try_scrolling): Use it when setting scroll_limit.
16643 Limit scrolling to 100 screen lines.
16644 (redisplay_window): Even when falling back on "recentering",
16645 position point in the window according to scroll-conservatively,
16646 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
16648 (try_scrolling): When point is above the window, allow searching
16649 as far as scroll_max, or one screenful, to compute vertical
16650 distance from PT to the scroll margin position. This prevents
16651 try_scrolling from unnecessarily failing when
16652 scroll-conservatively is set to a value slightly larger than the
16653 window height. Clean up the case of PT below the margin at bottom
16654 of window: scroll_max can no longer be INT_MAX. When aggressive
16655 scrolling is in use, don't let point enter the opposite scroll
16656 margin as result of the scroll.
16657 (syms_of_xdisp) <scroll-conservatively>: Document the
16658 threshold of 100 lines for never-recentering scrolling.
16660 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
16662 * dispextern.h (move_it_by_lines):
16663 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
16664 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
16665 (message_log_check_duplicate): Remove parameters `prev_bol' and
16666 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16667 (redisplay_internal): Remove parameter `preserve_echo_area',
16668 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
16670 * indent.c (Fvertical_motion):
16671 * window.c (window_scroll_pixel_based, Frecenter):
16672 Don't pass `need_y_p' to `move_it_by_lines'.
16674 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
16676 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
16677 steal a few bits to be more compact.
16678 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
16679 Remove unneeded casts.
16681 * bytecode.c (Fbyte_code): CAR and CDR can GC.
16683 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
16685 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
16686 binding" message (bug#7967).
16688 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
16690 Fix more problems found by GCC 4.6.0's static checks.
16692 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
16693 Remove unused local var.
16695 * editfns.c (Fmessage_box): Remove unused local var.
16697 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
16698 (note_mode_line_or_margin_highlight, note_mouse_highlight):
16699 Omit unused local vars.
16700 * window.c (shrink_windows): Omit unused local var.
16701 * menu.c (digest_single_submenu): Omit unused local var.
16702 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
16703 Omit unused local var.
16705 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
16706 Don't assume string length fits in int.
16707 (keyremap_step, read_key_sequence): Use size_t for sizes.
16708 (read_key_sequence): Don't check last_real_key_start redundantly.
16710 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
16711 instead of alloca (Bug#8344).
16713 * eval.c (Fbacktrace): Don't assume nargs fits in int.
16714 (Fbacktrace_frame): Don't assume nframes fits in int.
16716 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
16718 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
16721 * term.c (produce_glyphless_glyph): Remove unnecessary test.
16723 * cm.c (calccost): Turn while-do into do-while, for clarity.
16725 * keyboard.c (syms_of_keyboard): Use the same style as later
16726 in this function when indexing through an array. This also
16727 works around GCC bug 48267.
16729 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
16731 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
16733 * chartab.c (sub_char_table_ref_and_range): Redo for slight
16734 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
16736 * keyboard.c, keyboard.h (num_input_events): Now size_t.
16737 This avoids undefined behavior on integer overflow, and is a bit
16738 more convenient anyway since it is compared to a size_t variable.
16740 Variadic C functions now count arguments with size_t, not int.
16741 This avoids an unnecessary limitation on 64-bit machines, which
16742 caused (substring ...) to crash on large vectors (Bug#8344).
16743 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
16744 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
16745 All variadic functions and their callers changed accordingly.
16746 (struct gcpro.nvars): Now size_t, not int. All uses changed.
16747 * data.c (arith_driver, float_arith_driver): Likewise.
16748 * editfns.c (general_insert_function): Likewise.
16749 * eval.c (struct backtrace.nargs, interactive_p)
16750 (internal_condition_case_n, run_hook_with_args, apply_lambda)
16751 (funcall_lambda, mark_backtrace): Likewise.
16752 * fns.c (concat): Likewise.
16753 * frame.c (x_set_frame_parameters): Likewise.
16754 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
16755 0 if not found, not -1. All callers changed.
16757 * alloc.c (garbage_collect): Don't assume stack size fits in int.
16758 (stack_copy_size): Now size_t, not int.
16759 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
16761 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
16763 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
16764 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16765 All callers changed.
16767 * lisp.h (multibyte_char_to_unibyte):
16768 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
16769 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16770 * character.h (CHAR_TO_BYTE8):
16771 * cmds.c (internal_self_insert):
16772 * editfns.c (general_insert_function):
16773 * keymap.c (push_key_description):
16774 * search.c (Freplace_match):
16775 * xdisp.c (message_dolog, set_message_1): All callers changed.
16777 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16779 * keyboard.c (safe_run_hook_funcall): New function.
16780 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
16781 don't set the hook to nil, but remove the offending function instead.
16782 (Qcommand_hook_internal): Remove, unused.
16783 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
16784 Vcommand_hook_internal.
16786 * eval.c (enum run_hooks_condition): Remove.
16787 (funcall_nil, funcall_not): New functions.
16788 (run_hook_with_args): Call each function through a `funcall' argument.
16789 Remove `cond' argument, now redundant.
16790 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
16791 (Frun_hook_with_args_until_failure): Adjust accordingly.
16792 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
16794 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
16796 * dispextern.h (string_buffer_position): Remove declaration.
16798 * print.c (strout): Remove parameter `multibyte', unused since
16799 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
16801 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
16802 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
16803 All callers changed.
16805 * w32.c (_wsa_errlist): Use braces for struct initializers.
16807 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
16808 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
16809 All callers changed.
16810 (string_buffer_position): Likewise. Also, make static (it's never
16811 used outside xdisp.c).
16812 (cursor_row_p): Remove parameter `w', unused since
16813 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
16814 (decode_mode_spec): Remove parameter `precision', introduced during
16815 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
16816 All callers changed.
16818 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16820 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
16822 2011-03-27 Anders Lindgren <andlind@gmail.com>
16824 * nsterm.m (ns_menu_bar_is_hidden): New variable.
16825 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
16826 (ns_update_auto_hide_menu_bar): New functions.
16827 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
16828 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
16829 ns_constrain_all_frames.
16830 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
16831 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
16833 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16835 * nsmenu.m (runDialogAt): Remove argument to timer_check.
16837 2011-03-27 Glenn Morris <rgm@gnu.org>
16839 * syssignal.h: Replace RETSIGTYPE with void.
16840 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
16841 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
16842 Replace SIGTYPE with void everywhere.
16843 * s/usg5-4-common.h (SIGTYPE): Remove definition.
16844 * s/template.h (SIGTYPE): Remove commented out definition.
16846 2011-03-26 Eli Zaretskii <eliz@gnu.org>
16848 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
16849 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
16851 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
16853 * w32.c (read_unc_volume): Use parameter `henum', instead of
16854 global variable `wget_enum_handle'.
16856 * keymap.c (describe_vector): Remove parameters `indices' and
16857 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
16858 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
16860 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
16862 * keyboard.c (timer_check): Remove parameter `do_it_now',
16863 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
16864 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
16865 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
16867 * keyboard.c (read_char):
16868 * w32menu.c (w32_menu_display_help):
16869 * xmenu.c (show_help_event, menu_help_callback):
16870 Adjust calls to `show_help_echo'.
16872 * gtkutil.c (xg_maybe_add_timer):
16873 * keyboard.c (readable_events):
16874 * process.c (wait_reading_process_output):
16875 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
16877 * insdel.c (adjust_markers_gap_motion):
16878 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
16879 (gap_left, gap_right): Don't call it.
16881 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
16883 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
16884 incurred during fontification.
16886 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
16888 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
16889 (DEFVAR_PER_BUFFER): Don't pass it.
16891 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
16892 (scrolling_window): Don't pass it.
16894 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
16896 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
16898 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
16900 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
16901 of variables specific to SELinux and computation of `encoded_absname'.
16903 * image.c (XPutPixel): Remove unused variable `height'.
16905 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
16907 * unexw32.c (get_section_info): Remove unused variable `section'.
16909 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
16910 (system_process_attributes): Remove unused variable `sess'.
16911 (sys_read): Remove unused variable `err'.
16913 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
16914 (w32_wnd_proc): Remove unused variable `isdead'.
16915 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
16916 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
16917 (x_create_tip_frame): Remove unused variable `tem'.
16919 * w32inevt.c (w32_console_read_socket):
16920 Remove unused variable `no_events'.
16922 * w32term.c (x_draw_composite_glyph_string_foreground):
16923 Remove unused variable `width'.
16925 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
16927 * w32term.c (x_set_glyph_string_clipping):
16928 Don't pass uninitialized region to CombineRgn.
16930 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
16932 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
16933 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
16934 (Fx_close_connection): Remove unused variable `i'.
16936 * w32font.c (w32font_draw): Return number of glyphs.
16937 (w32font_open_internal): Remove unused variable `i'.
16938 (w32font_driver): Add missing initializer.
16940 * w32menu.c (utf8to16): Remove unused variable `utf16'.
16941 (fill_in_menu): Remove unused variable `items_added'.
16943 * w32term.c (last_mouse_press_frame): Remove static global variable.
16944 (w32_clip_to_row): Remove unused variable `f'.
16945 (x_delete_terminal): Remove unused variable `i'.
16947 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
16948 (NOTHING): Remove unused static global variable.
16949 (uniscribe_check_otf): Remove unused variable `table'.
16950 (uniscribe_font_driver): Add missing initializers.
16952 2011-03-23 Julien Danjou <julien@danjou.info>
16954 * term.c (Fsuspend_tty, Fresume_tty):
16955 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
16956 * window.c (temp_output_buffer_show):
16957 * insdel.c (signal_before_change):
16958 * frame.c (Fhandle_switch_frame):
16959 * fileio.c (Fdo_auto_save):
16960 * emacs.c (Fkill_emacs):
16961 * editfns.c (save_excursion_restore):
16962 * cmds.c (internal_self_insert):
16963 * callint.c (Fcall_interactively):
16964 * buffer.c (Fkill_all_local_variables):
16965 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
16967 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
16968 unconditionally since it does the check itself.
16970 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
16972 Fix more problems found by GCC 4.5.2's static checks.
16974 * coding.c (encode_coding_raw_text): Avoid unnecessary test
16975 the first time through the loop, since we know p0 < p1 then.
16976 This also avoids a gcc -Wstrict-overflow warning.
16978 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
16979 leading to a memory leak, possible in functions like
16980 load_charset_map_from_file that can allocate an unbounded number
16981 of objects (Bug#8318).
16983 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
16984 that could (at least in theory) be that large.
16986 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
16987 This is less likely to overflow, and avoids undefined behavior if
16988 overflow does occur. All callers changed. Use strtoul to scan
16989 for the unsigned long integer.
16990 (pint2hrstr): Simplify and tune code slightly.
16991 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
16993 * scroll.c (do_scrolling): Work around GCC bug 48228.
16994 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
16996 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
16997 This also avoids a warning with gcc -Wstrict-overflow.
16998 (validate_x_resource_name): Simplify count usage.
16999 This also avoids a warning with gcc -Wstrict-overflow.
17001 * fileio.c (Fcopy_file): Report error if fchown or fchmod
17004 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
17006 * process.c (Fmake_network_process): Use socklen_t, not int,
17007 where POSIX says socklen_t is required in portable programs.
17008 This fixes a porting bug on hosts like 64-bit HP-UX, where
17009 socklen_t is wider than int (Bug#8277).
17010 (Fmake_network_process, server_accept_connection):
17011 (wait_reading_process_output, read_process_output):
17014 * process.c: Rename or move locals to avoid shadowing.
17015 (list_processes_1, Fmake_network_process):
17016 (read_process_output_error_handler, exec_sentinel_error_handler):
17017 Rename or move locals.
17018 (Fmake_network_process): Define label "retry_connect" only if needed.
17019 (Fnetwork_interface_info): Fix pointer signedness.
17020 (process_send_signal): Add cast to avoid pointer signedness problem.
17021 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
17022 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
17024 Make tparam.h and terminfo.c consistent.
17025 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
17026 Include tparam.h instead, since it declares them.
17027 * cm.h (PC): Remove extern decl; tparam.h now does this.
17028 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
17029 * terminfo.c: Include tparam.h, to check interfaces.
17030 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
17031 (tparam): Adjust signature to match interface in tparam.h;
17032 this removes some undefined behavior. Check that outstring and len
17033 are zero, which they always are with Emacs.
17034 * tparam.h (PC, BC, UP): New extern decls.
17036 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
17037 (xftfont_open): Rename locals to avoid shadowing.
17039 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
17040 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
17041 (OTF_TAG_SYM): Omit macro if not needed.
17042 (ftfont_list): Remove unused local.
17043 (get_adstyle_property, ftfont_pattern_entity):
17044 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
17045 Rename locals to avoid shadowing.
17047 * xfont.c (xfont_list_family): Mark var as initialized.
17049 * xml.c (make_dom): Now static.
17051 * composite.c (composition_compute_stop_pos): Rename local to
17053 (composition_reseat_it): Remove unused locals.
17054 (find_automatic_composition, composition_adjust_point): Likewise.
17055 (composition_update_it): Mark var as initialized.
17056 (find_automatic_composition): Mark vars as initialized,
17057 with a FIXME (Bug#8290).
17059 character.h: Rename locals to avoid shadowing.
17060 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
17061 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
17062 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
17063 (BUF_DEC_POS): Be more systematic about renaming local temporaries
17064 to avoid shadowing.
17066 * textprop.c (property_change_between_p): Remove; unused.
17068 * intervals.c (interval_start_pos): Now static.
17070 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
17072 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
17073 Rename locals to avoid shadowing.
17075 * sound.c (wav_play, au_play, Fplay_sound_internal):
17076 Fix pointer signedness.
17077 (alsa_choose_format): Remove unused local var.
17078 (wav_play): Initialize a variable to 0, to prevent undefined
17079 behavior (Bug#8278).
17081 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
17083 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
17085 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
17086 clobbering (Bug#8298).
17087 * sysdep.c (sys_subshell): Likewise.
17088 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
17090 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
17091 This should get cleaned up, so that child_setup has the
17092 same signature on all platforms.
17094 * callproc.c (call_process_cleanup): Now static.
17095 (relocate_fd): Rename locals to avoid shadowing.
17097 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
17099 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
17100 not to be necessary, and produces flickering.
17102 2011-03-20 Glenn Morris <rgm@gnu.org>
17104 * config.in: Remove file.
17106 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
17108 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
17109 are now in src/globals.h.
17110 (syms_of_minibuf): Remove spurious & from previous change.
17112 2011-03-20 Leo Liu <sdl.web@gmail.com>
17114 * minibuf.c (completing-read-function): New variable.
17115 (completing-read-default): Rename from completing-read.
17116 (completing-read): Call completing-read-function.
17118 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
17120 * xfaces.c (Fx_load_color_file):
17121 Read color file from absolute filename (bug#8250).
17123 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
17125 * makefile.w32-in: Update dependencies.
17127 2011-03-17 Eli Zaretskii <eliz@gnu.org>
17129 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
17131 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
17133 Fix more problems found by GCC 4.5.2's static checks.
17135 * process.c (make_serial_process_unwind, send_process_trap):
17136 (sigchld_handler): Now static.
17138 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
17139 That way, the code declares only the vars that it needs.
17140 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
17141 * s/cygwin.h (PTY_ITERATION): Likewise.
17142 * s/darwin.h (PTY_ITERATION): Likewise.
17143 * s/gnu-linux.h (PTY_ITERATION): Likewise.
17145 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
17146 * process.c (allocate_pty): Don't declare stb unless it's needed.
17148 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
17149 (CONSTANTLIM): Remove; unused.
17150 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
17151 Define only if needed.
17153 * unexelf.c (unexec): Name an expression,
17154 to avoid gcc -Wbad-function-cast warning.
17155 Use a different way to cause a compilation error if anyone uses
17156 n rather than nn, a way that does not involve shadowing.
17157 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
17159 * deps.mk (unexalpha.o): Remove; unused.
17161 New file unexec.h, the (simple) interface for unexec (Bug#8267).
17162 * unexec.h: New file.
17163 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
17164 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
17165 Depend on unexec.h.
17166 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
17167 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
17168 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
17169 Change as necessary to match prototype in unexec.h.
17171 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
17173 (back_comment, skip_chars): Mark vars as initialized.
17175 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
17176 Rename locals to avoid shadowing.
17178 * lread.c (read1): Rewrite so as not to use empty "else".
17179 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
17181 * print.c (Fredirect_debugging_output): Fix pointer signedess.
17183 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
17184 warning when compiling print.c.
17186 * font.c (font_unparse_fcname): Abort in an "impossible" situation
17187 instead of using an uninitialized var.
17188 (font_sort_entities): Mark var as initialized.
17190 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
17192 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
17193 pointers to constants.
17194 (font_parse_fcname): Remove unused vars.
17195 (font_delete_unmatched): Now static.
17196 (font_get_spec): Remove; unused.
17197 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
17198 (font_update_drivers, Ffont_get_glyphs, font_add_log):
17199 Rename or move locals to avoid shadowing.
17201 * fns.c (require_nesting_list, require_unwind): Now static.
17202 (Ffillarray): Rename locals to avoid shadowing.
17204 * floatfns.c (domain_error2): Define only if needed.
17205 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
17207 * alloc.c (mark_backtrace): Move decl from here ...
17208 * lisp.h: ... to here, so that it can be checked.
17210 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
17211 (Fdefvar): Rewrite so as not to use empty "else".
17212 (lisp_indirect_variable): Name an expression,
17213 to avoid gcc -Wbad-function-cast warning.
17214 (Fdefvar): Rename locals to avoid shadowing.
17216 * callint.c (quotify_arg, quotify_args): Now static.
17217 (Fcall_interactively): Rename locals to avoid shadowing.
17218 Use const pointer when appropriate.
17220 * lisp.h (get_system_name, get_operating_system_release):
17221 Move decls here, to check interfaces.
17222 * process.c (get_operating_system_release): Move decl to lisp.h.
17223 * xrdb.c (get_system_name): Likewise.
17224 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
17225 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
17226 some of which prompt warnings from gcc -Wbad-function-cast.
17227 (Fformat_time_string, Fencode_time, Finsert_char):
17228 (Ftranslate_region_internal, Fformat):
17229 Rename or remove local vars to avoid shadowing.
17230 (Ftranslate_region_internal): Mark var as initialized.
17232 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
17235 * lisp.h (eassert): Check that the argument compiles, even if
17236 ENABLE_CHECKING is not defined.
17238 * data.c (Findirect_variable): Name an expression, to avoid
17239 gcc -Wbad-function-cast warning.
17240 (default_value, arithcompare, arith_driver, arith_error): Now static.
17241 (store_symval_forwarding): Rename local to avoid shadowing.
17242 (Fmake_variable_buffer_local, Fmake_local_variable):
17243 Mark variables as initialized.
17244 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
17246 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
17247 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
17248 Rename locals to avoid shadowing.
17249 (mark_stack): Move local variables into the #ifdef region where
17251 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
17252 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
17254 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
17255 (GC_STRING_CHARS): Remove; not used.
17256 (Fmemory_limit): Cast sbrk's returned value to char *.
17258 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
17259 avoids undefined behavior in theory.
17261 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
17263 Use functions, not macros, for up- and down-casing (Bug#8254).
17264 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
17265 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
17266 to use the following functions instead of these macros.
17267 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
17268 EMACS_INT, since callers assume the returned value fits in int.
17269 (upcase1): Likewise, for UPCASE_TABLE.
17270 (uppercasep, lowercasep, upcase): New static inline functions.
17271 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
17272 the race-condition problem in the old DOWNCASE.
17274 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
17275 Rename locals to avoid shadowing.
17276 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
17277 (regex_compile, re_search_2, re_match_2_internal):
17278 Remove unused local vars.
17279 (FREE_VAR): Rewrite so as not to use empty "else",
17280 which gcc can warn about.
17281 (regex_compile, re_match_2_internal): Mark locals as initialized.
17282 (RETALLOC_IF): Define only if needed.
17283 (WORDCHAR_P): Likewise. This one is never needed, but is used
17284 only in a comment talking about a compiler bug, so put inside
17285 the #if 0 of that comment.
17286 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
17287 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
17290 * search.c (boyer_moore): Rename locals to avoid shadowing.
17291 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
17292 (PREV_CHAR_BOUNDARY): Likewise.
17294 * search.c (simple_search): Remove unused var.
17296 * dired.c (compile_pattern): Move decl from here ...
17297 * lisp.h: ... to here, so that it can be checked.
17298 (struct re_registers): New forward decl.
17300 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
17302 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
17304 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
17305 Rename locals to avoid shadowing.
17306 (Fvertical_motion): Mark locals as initialized.
17308 * casefiddle.c (casify_object, casify_region): Now static.
17309 (casify_region): Mark local as initialized.
17311 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
17313 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
17314 New macros, so that the caller can use some names other than
17315 gcpro1, gcpro2, etc.
17316 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
17318 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
17319 argument, for consistency with GCPRO2_VAR, etc: it is now the
17320 prefix of the variable, not the variable itself. All uses
17322 * dired.c (directory_files_internal, file_name_completion):
17323 Rename locals to avoid shadowing.
17325 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
17326 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
17327 dired.c's scmp function, had undefined behavior.
17328 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
17329 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
17330 * buffer.h: ... to here, because these macros use current_buffer,
17331 and the new implementation with inline functions needs to have
17332 current_buffer in scope now, rather than later when the macros
17334 (downcase, upcase1): New static inline functions.
17335 (DOWNCASE, UPCASE1): Reimplement using these functions.
17336 This avoids undefined behavior in expressions like
17337 DOWNCASE (x) == DOWNCASE (y), which previously suffered
17338 from race conditions in accessing the global variables
17339 case_temp1 and case_temp2.
17340 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
17341 * lisp.h (case_temp1, case_temp2): Remove their decls.
17342 * character.h (ASCII_CHAR_P): Move from here ...
17343 * lisp.h: ... to here, so that the inline functions mentioned
17344 above can use them.
17346 * dired.c (directory_files_internal_unwind): Now static.
17348 * fileio.c (file_name_as_directory, directory_file_name):
17349 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
17351 (file_name_as_directory): Use const pointers when appropriate.
17352 (Fexpand_file_name): Likewise. In particular, newdir might
17353 point at constant storage, so make it a const pointer.
17354 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
17355 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
17357 (Fset_file_times, Finsert_file_contents, auto_save_error):
17358 Rename locals to avoid shadowing.
17360 * minibuf.c (choose_minibuf_frame_1): Now static.
17361 (Ftry_completion, Fall_completions): Rename or remove locals
17362 to avoid shadowing.
17364 * marker.c (bytepos_to_charpos): Remove; unused.
17366 * lisp.h (verify_bytepos, count_markers): New decls,
17367 so that gcc does not warn that these functions aren't declared.
17369 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
17370 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
17371 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
17372 (copy_text): Remove unused local var.
17374 * filelock.c (within_one_second): Now static.
17375 (lock_file_1): Rename local to avoid shadowing.
17377 * buffer.c (fix_overlays_before): Mark locals as initialized.
17378 (fix_start_end_in_overlays): Likewise. This function should be
17379 simplified by using pointers-to-pointers, but that's a different
17381 (switch_to_buffer_1): Now static.
17382 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
17383 (report_overlay_modification): Rename locals to avoid shadowing.
17385 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
17386 Fix pointer signedness issue.
17387 (sys_subshell): Mark local as volatile if checking for lint,
17388 to suppress a gcc -Wclobbered warning that does not seem to be right.
17389 (MAXPATHLEN): Define only if needed.
17391 * process.c (serial_open, serial_configure): Move decls from here ...
17392 * systty.h: ... to here, so that they can be checked.
17394 * fns.c (get_random, seed_random): Move extern decls from here ...
17395 * lisp.h: ... to here, so that they can be checked.
17397 * sysdep.c (reset_io): Now static.
17398 (wait_for_termination_signal): Remove; unused.
17400 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
17401 (copy_keymap_item, append_key, push_text_char_description):
17403 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
17404 (DENSE_TABLE_SIZE): Remove; unused.
17405 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
17406 (describe_map_tree):
17407 Rename locals to avoid shadowing.
17409 * keyboard.c: Declare functions static if they are not used elsewhere.
17410 (echo_char, echo_dash, cmd_error, top_level_2):
17411 (poll_for_input, handle_async_input): Now static.
17412 (read_char, kbd_buffer_get_event, make_lispy_position):
17413 (make_lispy_event, make_lispy_movement, apply_modifiers):
17414 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
17415 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
17416 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
17417 (read_key_sequence, read_char): Mark locals as initialized.
17418 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
17420 * keyboard.h (make_ctrl_char): New decl.
17421 (mark_kboards): Move decl here ...
17422 * alloc.c (mark_kboards): ... from here.
17424 * lisp.h (force_auto_save_soon): New decl.
17426 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
17427 (DEFINE_DUMMY_FUNCTION): New macro.
17428 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
17430 (main): Add casts to avoid warnings
17431 if GCC considers string literals to be constants.
17433 * lisp.h (fatal_error_signal): Add decl, since it's exported.
17435 * dbusbind.c: Pointer signedness fixes.
17436 (xd_signature, xd_append_arg, xd_initialize):
17437 (Fdbus_call_method, Fdbus_call_method_asynchronously):
17438 (Fdbus_method_return_internal, Fdbus_method_error_internal):
17439 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
17440 (Fdbus_register_signal): Use SSDATA when the context wants char *.
17442 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
17443 if GCC considers string literals to be constants.
17444 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
17446 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
17448 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
17449 (print_preprocess, print_object): New macro to fix last change.
17451 * print.c (print_preprocess): Don't forget font objects.
17453 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
17455 * emacs.c (USAGE3): Doc fixes.
17457 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
17459 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
17462 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
17464 * lisp.h (VWindow_system, Qfile_name_history):
17465 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
17466 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
17467 (w32_system_caret_x, w32_system_caret_y): Declare extern.
17469 * w32select.c: Don't #include "keyboard.h".
17470 (run_protected): Add extern declaration for waiting_for_input.
17472 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
17473 * w32console.c (detect_input_pending, read_input_pending)
17474 (encode_terminal_code):
17475 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
17476 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
17477 (w32_system_caret_y, Qfile_name_history):
17478 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
17479 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
17480 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
17481 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
17482 * w32proc.c (Qlocal, report_file_error):
17483 * w32term.c (Vwindow_system, updating_frame):
17484 * w32uniscribe.c (initialized, uniscribe_font_driver):
17485 Remove unneeded extern declarations.
17487 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
17489 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
17491 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
17493 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
17494 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
17495 These macros can no longer be used for assignment.
17497 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
17498 Assign struct members directly, instead of using BUF_BEGV etc.
17499 (record_buffer_markers, fetch_buffer_markers): New functions for
17500 recording and fetching special buffer markers.
17501 (set_buffer_internal_1, set_buffer_temp): Use them.
17503 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
17505 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
17507 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
17508 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
17510 * xdisp.c (hscroll_window_tree):
17511 (reconsider_clip_changes): Use PT instead of BUF_PT.
17513 2011-03-13 Eli Zaretskii <eliz@gnu.org>
17515 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
17516 $(EMACS_ROOT)/lib/intprops.h.
17518 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
17520 Fix more problems found by GCC 4.5.2's static checks.
17522 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
17523 to unsigned char * to avoid compiler diagnostic.
17524 (xg_free_frame_widgets): Make it clear that a local variable is
17525 needed only if USE_GTK_TOOLTIP.
17526 (gdk_window_get_screen): Make it clear that this macro is needed
17527 only if USE_GTK_TOOLTIP.
17528 (int_gtk_range_get_value): New function, which avoids a diagnostic
17529 from gcc -Wbad-function-cast.
17530 (xg_set_toolkit_scroll_bar_thumb): Use it.
17531 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
17532 diagnostic from gcc -Wbad-function-cast.
17533 (get_utf8_string, xg_get_file_with_chooser):
17534 Rename locals to avoid shadowing.
17535 (create_dialog): Move locals to avoid shadowing.
17537 * xgselect.c (xg_select): Remove unused var.
17539 * image.c (four_corners_best): Mark locals as initialized.
17540 (gif_load): Initialize transparent_p to zero (Bug#8238).
17541 Mark another local as initialized.
17542 (my_png_error, my_error_exit): Mark with NO_RETURN.
17544 * image.c (clear_image_cache): Now static.
17545 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
17546 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
17547 (x_edge_detection): Remove unnecessary cast that
17548 gcc -Wbad-function-cast diagnoses.
17549 (gif_load): Fix pointer signedness.
17550 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
17551 (jpeg_load, gif_load): Rename locals to avoid shadowing.
17553 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
17555 Improve quality of tests for time stamp overflow.
17556 For example, without this patch (encode-time 0 0 0 1 1
17557 1152921504606846976) returns the obviously-bogus value (-948597
17558 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
17559 reports time overflow. See
17560 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
17561 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
17562 * editfns.c: Include limits.h and intprops.h.
17563 (TIME_T_MIN, TIME_T_MAX): New macros.
17564 (time_overflow): Move earlier, to before first use.
17565 (hi_time, lo_time): New functions, for an accurate test for
17566 out-of-range times.
17567 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
17568 (Fget_internal_run_time): Don't assume time_t fits in int.
17569 (make_time): Use list2 instead of Fcons twice.
17570 (Fdecode_time): More accurate test for out-of-range times.
17571 (check_tm_member): New function.
17572 (Fencode_time): Use it, to test for out-of-range times.
17573 (lisp_time_argument): Don't rely on undefined left-shift and
17574 right-shift behavior when checking for time stamp overflow.
17576 * editfns.c (time_overflow): New function, refactoring common code.
17577 (Fformat_time_string, Fdecode_time, Fencode_time):
17578 (Fcurrent_time_string): Use it.
17580 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
17581 * dired.c (make_time): Move to ...
17582 * editfns.c (make_time): ... here.
17583 * systime.h: Note the move.
17585 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17587 * fringe.c (update_window_fringes): Remove unused variables.
17589 * unexmacosx.c (copy_data_segment): Also copy __got section.
17592 2011-03-12 Eli Zaretskii <eliz@gnu.org>
17594 * termcap.c [MSDOS]: Include "msdos.h".
17595 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
17596 Constify `char *' arguments and their references according to
17597 prototypes in tparam.h.
17599 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
17601 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
17602 Adapt all references accordingly.
17604 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
17606 2011-03-11 Tom Tromey <tromey@redhat.com>
17608 * buffer.c (syms_of_buffer): Remove obsolete comment.
17610 2011-03-11 Eli Zaretskii <eliz@gnu.org>
17612 * termhooks.h (encode_terminal_code): Declare prototype.
17614 * msdos.c (encode_terminal_code): Don't declare prototype.
17616 * term.c (encode_terminal_code): Now external again, used by
17617 w32console.c and msdos.c.
17619 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
17620 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
17622 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
17624 Fix some minor problems found by GCC 4.5.2's static checks.
17626 * fringe.c (update_window_fringes): Mark locals as initialized
17628 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
17630 * alloc.c (mark_fringe_data): Move decl from here ...
17631 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
17632 to check its interface.
17633 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
17635 * fontset.c (free_realized_fontset): Now static.
17636 (Fset_fontset_font): Rename local to avoid shadowing.
17637 (fontset_font): Mark local as initialized.
17638 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
17640 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
17642 * xselect.c (x_disown_buffer_selections): Remove; not used.
17643 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
17644 (x_own_selection, Fx_disown_selection_internal): Rename locals
17645 to avoid shadowing.
17646 (x_handle_dnd_message): Remove local to avoid shadowing.
17648 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
17649 so that the caller can use some name other than gcpro1.
17650 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
17651 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17652 (Fx_backspace_delete_keys_p):
17653 Use them to avoid shadowing, and rename vars to avoid shadowing.
17654 (x_decode_color, x_set_name, x_window): Now static.
17655 (Fx_create_frame): Add braces to silence GCC warning.
17656 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
17657 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
17658 Remove unused locals.
17659 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17660 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
17661 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
17664 * xterm.h (x_mouse_leave): New decl.
17666 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
17667 Remove unused functions.
17668 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
17669 (x_calc_absolute_position): Now static.
17670 (XTread_socket): Don't define label "out" unless it's used.
17671 Don't declare local "event" unless it's used.
17672 (x_iconify_frame, x_free_frame_resources): Don't declare locals
17673 unless they are used.
17674 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
17675 (x_fatal_error_signal): Remove; not used.
17676 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
17677 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
17678 (x_error_catcher, x_connection_closed, x_error_handler):
17679 (x_error_quitter, xembed_send_message, x_iconify_frame):
17680 (my_log_handler): Rename locals to avoid shadowing.
17681 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
17682 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
17684 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
17685 Rename or move locals to avoid shadowing.
17686 (tty_defined_color, merge_face_heights): Now static.
17687 (free_realized_faces_for_fontset): Remove; not used.
17688 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
17689 does not deduce is never used uninitialized.
17690 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
17691 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
17693 * terminal.c (store_terminal_param): Now static.
17695 * xmenu.c (menu_highlight_callback): Now static.
17696 (set_frame_menubar): Remove unused local.
17697 (xmenu_show): Rename parameter to avoid shadowing.
17698 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
17699 since they might point to immutable storage.
17700 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
17701 since it's unused otherwise.
17703 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
17704 Add a FIXME, since the code still doesn't look right. (Bug#8215)
17705 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
17706 avoids a gcc -Wuninitialized diagnostic.
17707 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
17708 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
17709 does not deduce are never used uninitialized.
17711 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
17713 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
17714 * window.c (window_loop, size_window):
17715 (run_window_configuration_change_hook, enlarge_window): Likewise.
17717 * window.c (display_buffer): Now static.
17718 (size_window): Mark variables that gcc -Wuninitialized
17719 does not deduce are never used uninitialized.
17720 * window.h (check_all_windows): New decl, to forestall
17721 gcc -Wmissing-prototypes diagnostic.
17722 * dispextern.h (bidi_dump_cached_states): Likewise.
17724 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
17726 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
17727 Include <limits.h>.
17728 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
17729 and to avoid gcc -Wuninitialized warning.
17730 (load_charset_map): Mark variables that gcc -Wuninitialized
17731 does not deduce are never used uninitialized.
17732 (load_charset): Abort instead of using uninitialized var (Bug#8229).
17734 * coding.c (coding_set_source, coding_set_destination):
17735 Use "else { /* comment */ }" rather than "else /* comment */;"
17736 for clarity, and to avoid gcc -Wempty-body warning.
17737 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
17738 a block, when the outer 'i' will do.
17739 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
17740 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
17741 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
17742 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
17743 (Fdecode_sjis_char, Fdefine_coding_system_internal):
17744 Rename locals to avoid shadowing.
17745 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
17746 * coding.c (emacs_mule_char, encode_invocation_designation):
17747 Now static, since they're not used elsewhere.
17748 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
17749 (decode_coding_object, encode_coding_object, detect_coding_system):
17750 (decode_coding_emacs_mule): Mark variables that gcc
17751 -Wuninitialized does not deduce are never used uninitialized.
17752 (detect_coding_iso_2022): Initialize a local variable that might
17753 be used uninitialized. Leave a FIXME because it's not clear that
17754 this initialization is needed. (Bug#8211)
17755 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
17756 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
17757 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
17758 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
17759 Remove unused macros.
17761 * category.c (hash_get_category_set): Remove unused local var.
17762 (copy_category_table): Now static, since it's not used elsewhere.
17763 * character.c (string_count_byte8): Likewise.
17765 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
17766 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
17768 * chartab.c (copy_sub_char_table): Now static, since it's not used
17770 (sub_char_table_ref_and_range, char_table_ref_and_range):
17771 Rename locals to avoid shadowing.
17772 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
17774 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
17775 (BIDI_BOB): Remove unused macro.
17777 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
17778 deduce are never used uninitialized.
17779 * term.c (encode_terminal_code): Likewise.
17781 * term.c (encode_terminal_code): Now static. Remove unused local.
17783 * tparam.h: New file.
17784 * term.c, tparam.h: Include it.
17785 * deps.mk (term.o, tparam.o): Depend on tparam.h.
17786 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
17787 Move these decls to tparam.h, and make them agree with what
17788 is actually in tparam.c. The previous trick of using incompatible
17789 decls in different modules does not conform to the C standard.
17790 All callers of tparam changed to use tparam's actual API.
17791 * tparam.c (tparam1, tparam, tgoto):
17792 Use const pointers where appropriate.
17794 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
17795 * cm.h (struct cm): Likewise.
17796 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
17797 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
17798 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
17799 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
17800 (turn_on_face, init_tty): Likewise.
17801 * termchar.h (struct tty_display_info): Likewise.
17803 * term.c (term_mouse_position): Rename local to avoid shadowing.
17805 * alloc.c (mark_ttys): Move decl from here ...
17806 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
17808 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
17810 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
17812 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
17814 * search.c (compile_pattern_1): Remove argument regp, unused since
17815 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
17816 (compile_pattern): Don't pass it.
17818 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
17820 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
17821 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
17823 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
17825 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
17827 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
17828 gdk_window_get_screen, gdk_window_get_geometry,
17829 gdk_x11_window_lookup_for_display and GDK_KEY_g.
17830 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
17831 (xg_get_pixbuf_from_pixmap): New function.
17832 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
17833 to Pixmap, take frame as parameter, remove GdkColormap parameter.
17834 Call xg_get_pixbuf_from_pixmap instead of
17835 gdk_pixbuf_get_from_drawable.
17836 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
17837 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
17838 (xg_check_special_colors): Use GtkStyleContext and its functions
17840 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
17841 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
17842 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
17843 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
17844 Call gtk_widget_get_preferred_size.
17845 (xg_frame_resized): gdk_window_get_geometry only takes 5
17847 (xg_win_to_widget, xg_event_is_for_menubar):
17848 Call gdk_x11_window_lookup_for_display.
17849 (xg_set_widget_bg): New function.
17850 (delete_cb): New function.
17851 (xg_create_frame_widgets): Connect delete-event to delete_cb.
17852 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
17853 (xg_set_background_color): Call xg_set_widget_bg.
17854 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
17855 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
17856 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
17857 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
17859 (update_frame_tool_bar): Call gtk_widget_hide.
17860 (xg_initialize): Use GDK_KEY_g.
17862 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
17864 (x_session_initialize): Call gdk_x11_set_sm_client_id.
17866 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
17867 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
17868 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
17870 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
17872 * w32xfns.c (select_palette): Check success of RealizePalette against
17873 GDI_ERROR, not zero.
17875 See ChangeLog.11 for earlier changes.
17877 ;; Local Variables:
17881 Copyright (C) 2011-2012 Free Software Foundation, Inc.
17883 This file is part of GNU Emacs.
17885 GNU Emacs is free software: you can redistribute it and/or modify
17886 it under the terms of the GNU General Public License as published by
17887 the Free Software Foundation, either version 3 of the License, or
17888 (at your option) any later version.
17890 GNU Emacs is distributed in the hope that it will be useful,
17891 but WITHOUT ANY WARRANTY; without even the implied warranty of
17892 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17893 GNU General Public License for more details.
17895 You should have received a copy of the GNU General Public License
17896 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.