1 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
3 * makefile.w32-in (ACL_H): New macro.
4 ($(BLD)/fileio.$(O)): Update dependencies.
6 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
8 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
9 * Makefile.in (LIB_ACL): New macro.
10 (LIBACL_LIBS): Remove.
11 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
12 * fileio.c: Include <acl.h>.
13 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
14 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
16 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
19 * unexelf.c: Don't assume ElfW (Half) fits in int.
20 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
21 when dealing with ElfW (Half) values, since they can exceed 2**31
22 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
23 (entry_address): Omit unused NUM arg. All uses changed.
25 2013-05-07 Juri Linkov <juri@jurta.org>
27 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
28 to the string converted from number with `Fnumber_to_string'.
31 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
33 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
34 This fixes a problem introduced by my previous change.
36 2013-05-07 Glenn Morris <rgm@gnu.org>
38 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
40 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
42 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
44 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
46 Static checking by GCC 4.8.0.
47 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
48 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
49 (x_get_monitor_attributes_fallback)
50 (x_get_monitor_attributes_xinerama)
51 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
52 Define only if USE_GTK.
53 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
54 (x_get_monitor_attributes_fallback): Omit unused locals.
55 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
56 Use double, not float, to avoid mixed-mode floating point arithmetic.
58 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
59 Jan Djärv <jan.h.d@swipnet.se>
61 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
62 (XINERAMA_CFLAGS): New macros.
63 (ALL_CFLAGS, LIBES): Use them.
65 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
66 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
67 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
68 (syms_of_xfns): DEFSYM them.
69 (struct MonitorInfo): New struct.
70 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
71 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
72 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
73 (x_get_monitor_attributes_xinerama): New functions.
74 (Fx_display_monitor_attributes_list): New primitive.
75 (syms_of_xfns): Defsubr it.
77 * xterm.h (x_display_info): Add Xatom_net_workarea and
78 Xatom_net_current_desktop.
80 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
81 and dpyinfo->Xatom_net_current_desktop.
83 2013-05-06 Eli Zaretskii <eliz@gnu.org>
85 * xdisp.c (pos_visible_p): Use the special code for finding the
86 beginning of a display property or overlay for any "replacing"
87 display property, not just for display strings. This solves
88 incorrect reporting of position by posn-at-point. (Bug#14241)
90 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
92 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
93 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
94 Verify that ElfW (Half) fits in int.
95 (fatal): Use same signature as lisp.h.
96 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
97 configure and build with -DUNEXELF_DEBUG without worrying about
98 other modules that use DEBUG.
99 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
100 possibly-wide integers now uses it instead of plain fprintf.
101 (entry_address): New function, which avoids problems with 32-bit
102 overflow on 64-bit hosts.
103 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
104 (round_up): Don't assume the remainder fits in int.
105 (find_section): Use bool for boolean. Simplify debug code.
106 (unexec): Don't assume file sizes fit in int or size_t.
107 Omit unnecessary trailing newline in 'fatal' format.
108 Use strerror rather than outputting decimal error number.
109 Remove unused code when emacs is not defined;
110 this file relies on Emacs now.
111 Don't assume e_phnum and e_shnum are positive.
113 * regex.c: Fix problems when DEBUG is defined.
114 (extract_number, extract_number_and_incr): Define regardless of
115 whether DEBUG is defined; that's simpler and makes the code less
116 likely to go stale in the normal case when DEBUG is not defined.
117 Return int rather than taking an int * arg. All callers changed.
118 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
119 Remove, replacing with ...
120 (DEBUG_PRINT): New macro. All callers changed.
121 (DEBUG_COMPILES_ARGUMENTS): New macro.
122 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
123 (print_compiled_pattern, print_double_string) [DEBUG]:
124 Use prototype rather than old-style definition.
125 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
126 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
127 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
128 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
129 Don't assume ptrdiff_t, size_t, and long are the same width as int.
130 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
131 This matters only when DEBUG is defined.
133 2013-05-05 Eli Zaretskii <eliz@gnu.org>
135 * xdisp.c (set_iterator_to_next): Set the
136 ignore_overlay_strings_at_pos_p flag only if we are _really_
137 iterating over an overlay string, as indicated by the
138 current.overlay_string_index member. (Bug#14306)
140 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
142 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
143 to where it is used, to avoid autorelease issues (Bug#14050).
145 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
147 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
148 * fileio.c (syms_of_fileio): Implement this.
149 * filelock.c (create_lock_file): If symbolic links don't work, so
150 we use a regular file as a lock file, do not fsync the lock file;
153 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
155 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
156 (syms_of_minibuf): Adjust accodingly.
158 * callint.c (Fcall_interactively): Adjust calls accordingly.
160 2013-05-04 Eli Zaretskii <eliz@gnu.org>
162 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
163 w->contents is a buffer before computing everything else.
164 Use parentheses to disambiguate last part of the condition.
166 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
167 assertion violations. (Bug#14062)
169 2013-05-01 David Reitter <david.reitter@gmail.com>
171 * nsfns.m (ns_tooltip): Initialize.
173 2013-04-28 Eli Zaretskii <eliz@gnu.org>
175 * coding.c (decode_coding_gap): Don't remove the character before
176 a newline unless it's a CR character. (Bug#14287)
178 2013-04-28 Dan Nicolaescu <dann@gnu.org>
180 * dispextern.h (struct face): Move enum face_underline_type
181 earlier so that bitfields can be in the same word.
183 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
185 * nsfns.m (handlePanelKeys): New function.
186 (EmacsOpenPanel:performKeyEquivalent:)
187 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
188 arrows/function/control and copy/paste keys (Bug#14296).
190 2013-04-27 Juri Linkov <juri@jurta.org>
192 * callint.c (Fcall_interactively): Call `Qread_number' for
193 interactive code letter `n' instead of using duplicate code.
196 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
198 * systime.h (make_timeval): Declare as 'const'.
200 2013-04-27 Kenichi Handa <handa@gnu.org>
202 * font.c (font_open_entity): Always open a font of manageable
205 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
207 Port better to AIX (Bug#14258).
208 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
211 2013-04-24 Kenichi Handa <handa@gnu.org>
213 * coding.c (decode_coding_iso_2022): When an invalid escape
214 sequence is encountered, reset the invocation and designation
215 status to the safest one.
217 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
219 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
220 Without this fix, "make distclean" leaves stamp-h1 behind.
222 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
224 * w32fns.c (w32_fullscreen_rect): New function to compute the
225 window rectangle for the given fullscreen mode.
226 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
227 longer tunes the window size. This keeps the window's edges flush
228 with the screen and allows the taskbar to hide itself in fullboth.
230 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
231 window decorations and uses the entire screen.
233 * w32term.h (w32_fullscreen_rect) Add prototype.
234 (struct w32_output): Replace normal_width, normal_height,
235 normal_top, and normal_left members with a single normal_placement
237 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
239 (FRAME_NORMAL_PLACEMENT): New macro.
241 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
243 * minibuf.c (Ftest_completion): Silence compiler warning.
245 2013-04-15 Eli Zaretskii <eliz@gnu.org>
247 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
250 * frame.h (WINDOW_FRAME): Protect macro and its argument with
253 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
254 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
255 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
256 parentheses where appropriate.
258 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
260 * keyboard.c (timer_start_idle): Remove no-longer-used local.
262 2013-04-14 Eli Zaretskii <eliz@gnu.org>
264 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>
265 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
266 Mention in the doc string that setting these variables takes
267 effect only after a call to set-window-buffer. (Bug#14200)
269 2013-04-13 Eli Zaretskii <eliz@gnu.org>
271 * indent.c (Fvertical_motion): Don't consider display strings on
272 overlay strings as display strings on the buffer position we
273 started from. This prevents vertical cursor motion from jumping
274 more than one line when there's an overlay string with a display
275 property at end of line.
276 Reported by Karl Chen <Karl.Chen@quarl.org> in
277 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
279 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
281 * window.c (select_window): `record_buffer' even if window is
282 already selected (bug#14191).
284 2013-04-11 Eli Zaretskii <eliz@gnu.org>
286 * window.c (Fwindow_end): Test more flags, including the buffer's
287 last_overlay_modified flag, to determine whether the window's
288 display is really up-to-date. Prevents the function from
289 returning a stale value. (Bug#14170)
290 (Fwindow_line_height): Fix the test for up-to-date-ness of the
293 2013-04-10 Eli Zaretskii <eliz@gnu.org>
295 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
296 garbaged only if it is not already the top frame on its TTY.
297 This prevents flickering due to constant redrawing of TTY frames when
298 there are GUI frames open in the same session. (Bug#13864)
300 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
302 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
303 of marking the idle timers directly.
305 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
307 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
310 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
312 * window.c (select_window): Don't record_buffer while the invariant is
313 temporarily broken (bug#14161).
315 * fns.c (Fdelq): Don't assume !NILP => CONSP.
317 2013-04-07 Eli Zaretskii <eliz@gnu.org>
319 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
321 2013-04-07 Romain Francoise <romain@orebokech.com>
323 Ignore additional platform-specific ACL errors (Bug#13702).
324 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
325 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
327 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
329 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
332 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
334 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
335 This bug was introduced by my 2013-02-25 change that simplified
336 data_start configuration. Without this change, on GNU/Linux
337 an Emacs configured with --enable-profiling fails immediately
338 due to a profiler signal.
339 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
340 with these flags. On platforms where special flags are needed
341 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
342 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
343 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
345 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
347 Get rid of some platform-specific functions examining window
348 system and its capabilities. This is a partial rework of the
350 * lisp.h (have_menus_p): Remove prototype. This function is
351 replaced with platform-independent window_system_available.
352 (check_window_system): Move to...
353 * frame.h (decode_window_system_frame, window_system_available):
354 ...here, add new prototypes.
355 * frame.c (window_system_available, decode_window_system_frame):
357 (check_window_system): Platform-independent now.
358 * xterm.h (x_in_use): Remove declaration.
360 * w32term.h (check_x_frame):
361 * nsterm.h (check_x_frame): Remove prototypes. This function
362 is replaced with platform-independent decode_window_system_frame.
363 * msdos.c (have_menus_p): Remove.
364 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
365 Remove platform-specific functions. Use check_window_system,
366 decode_window_system_frame and check_ns_display_info where
367 appropriate. Minor style and comment tweaks.
368 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
369 (check_x_frame): Likewise.
370 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
372 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
373 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
374 * xmenu.c, xselect.c: All related users changed.
376 2013-04-03 Kenichi Handa <handa@gnu.org>
378 The following changes is to optimize the code for reading UTF-8
381 * coding.c (check_ascii): Rename from detect_ascii. Return value
382 changed. Check EOL format. Do not call adjust_coding_eol_type
384 (check_utf_8): New function.
385 (adjust_coding_eol_type): Do nothing if already adjusted.
386 (detect_coding): Compare the return value of check_ascii with
387 coding->src_bytes. Call adjust_coding_eol_type if necessary.
388 (decode_coding_gap): Optimize for valid UTF-8.
390 2013-03-21 Kenichi Handa <handa@gnu.org>
392 * coding.c (syms_of_coding): Cancel previous change.
394 * insdel.c (insert_from_gap): Fix previous change.
396 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
398 Consistently use platform-specific function to detect window system.
399 * lisp.h (check_window_system): New prototype. This function is
400 going to replace check_x, check_w32 and check_ns.
401 (have_menus_p): Mention msdos.c in comment.
402 * fontset.c (check_window_system_func): Remove. Adjust all users.
403 * fontset.h (check_window_system_func): Remove prototype.
404 * nsterm.h (check_ns):
406 * w32term.h (check_w32): Likewise.
407 * menu.c (Fx_popup_menu): Use check_window_system.
408 * msdos.c (check_window_system): Define for MS-DOS.
409 * nsfns.m (check_window_system): Define for NS. Adjust all users.
410 * w32fns.c (check_window_system): Likewise for MS-Windows.
411 * xfns.c (check_window_system): Likewise for X.
412 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
413 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
415 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
417 Prefer < to > in range checks such as 0 <= i && i < N.
418 This makes it easier to visualize quantities on a number line.
419 This patch doesn't apply to all such range checks,
420 only to the range checks affected by the 2013-03-24 change.
421 This patch reverts most of the 2013-03-24 change.
422 * alloc.c (xpalloc, Fgarbage_collect):
423 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
424 * character.c (string_escape_byte8):
425 * charset.c (read_hex):
426 * data.c (cons_to_unsigned):
427 * dispnew.c (update_frame_1):
428 * doc.c (Fsubstitute_command_keys):
430 * editfns.c (hi_time, decode_time_components):
431 * fileio.c (file_offset):
432 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
433 * font.c (font_intern_prop):
434 * frame.c (x_set_alpha):
435 * gtkutil.c (get_utf8_string):
436 * indent.c (check_display_width):
437 * keymap.c (Fkey_description):
438 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
440 * minibuf.c (read_minibuf_noninteractive):
441 * process.c (wait_reading_process_output):
442 * search.c (Freplace_match):
443 * window.c (get_phys_cursor_glyph):
444 * xdisp.c (redisplay_internal):
445 * xsmfns.c (smc_save_yourself_CB):
446 Prefer < to > for range checks.
447 * dispnew.c (sit_for): Don't mishandle NaNs.
448 This fixes a bug introduced in the 2013-03-24 change.
449 * editfns.c (decode_time_components): Don't hoist comparison.
450 This fixes another bug introduced in the 2013-03-24 change.
452 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
454 * frame.h (struct frame): Drop scroll_bottom_vpos
455 member becaue all real users are dead long ago.
456 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
457 * xdisp.c (redisplay_internal): Adjust user.
459 2013-03-30 Darren Ho <darren.hoo@gmail.com> (tiny change)
461 * nsmenu.m (showAtX:Y:for:): setLevel to
462 NSPopUpMenuWindowLevel (Bug#13998).
464 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
466 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
467 (ns_check_pending_open_menu): Declare.
469 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
470 (x_activate_menubar): Update the menu with title that matches
471 ns_get_pending_menu_title, and call
472 ns_check_pending_openmenu (Bug#12698).
473 (menuWillOpen:): New method.
474 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
476 * nsterm.m (menu_will_open_state, menu_mouse_point)
477 (menu_pending_title): New varaibles.
478 (ns_get_pending_menu_title, ns_check_menu_open)
479 (ns_check_pending_open_menu): New functions.
481 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
483 * indent.c (current_column_bol_cache): Remove leftover which is not
484 used in Fmove_to_column any more.
485 (current_column, scan_for_column): Adjust users.
486 * keyboard.c (last_point_position_buffer, last_point_position_window):
487 Remove leftovers which are not used for recording undo any more.
488 (command_loop_1, syms_of_keyboard): Adjust users.
489 * xdisp.c (last_max_ascent): Remove leftover which is not used in
490 redisplay_window any more.
491 (move_it_to): Adjust user.
493 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
495 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
498 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
500 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
501 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
504 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
506 * window.h (struct window): Replace hchild, vchild and buffer slots
507 with the only contents slot. This is possible because each valid
508 window may have either the child window (in vertical or horizontal
509 combination) or buffer to display (for the leaf window). Using that,
510 a lof of operations to traverse and/or change window hierarchies may
511 be simplified. New member horizontal is used to distinguish between
512 horizontal and vertical combinations of internal windows.
513 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
514 (WINDOW_VERTICAL_COMBINATION_P): New macros.
515 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
516 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
517 Use contents slot, not buffer, where appropriate.
518 (wset_combination): New function.
519 (wset_buffer): Add eassert.
520 (Fframe_first_window): Simplify the loop reaching first window.
521 (Fwindow_buffer): Use WINDOW_LEAF_P.
522 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
523 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
524 (unshow_buffer): Convert initial debugging check to eassert.
525 (replace_window, recombine_windows, Fdelete_other_windows_internal)
526 (make_parent_window, window_resize_check, window_resize_apply)
527 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
528 (Fset_window_configuration, delete_all_child_windows, save_window_save):
529 Adjust to match struct window changes.
530 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
531 (mark_window_cursors_off, count_windows, get_leaf_windows)
532 (foreach_window_1): Simplify the loop.
533 * alloc.c (mark_object): Do not check for the leaf window because
534 internal windows has no glyph matrices anyway.
535 * dispnew.c (clear_window_matrices, showing_window_margins_p)
536 (allocate_matrices_for_window_redisplay, fake_current_matrices)
537 (allocate_matrices_for_frame_redisplay, free_window_matrices)
538 (build_frame_matrix_from_window_tree, mirror_make_current)
539 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
540 (update_window_tree, set_window_update_flags): Simplify the loop.
541 (sync_window_with_frame_matrix_rows): Enforce live window.
542 Use contents slot, not buffer, where appropriate.
543 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
544 and WINDOW_HORIZONTAL_COMBINATION_P.
545 (make_frame_visible_1): Simplify the loop.
546 Use contents slot, not buffer, where appropriate.
547 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
548 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
549 (expose_window_tree): Likewise.
550 Use contents slot, not buffer, where appropriate.
551 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
552 to avoid deleted windows. Use contents slot instead of buffer.
553 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
554 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
555 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
556 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
558 2013-03-28 Eli Zaretskii <eliz@gnu.org>
560 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
561 identify the reasons for assertion violations in bug#14062 and
563 (Fx_show_tip): Fix compilation error under
564 "--enable-check-lisp-object-type". (Bug#14073)
566 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
567 Reported by <rzl24ozi@gmail.com>.
569 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
571 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
573 (unwind_with_echo_area_buffer): ...to restore it here.
574 This is needed to ensure that...
575 (redisplay_window): ...both window markers are valid here,
576 which is verified by eassert.
577 * editfns.c (save_excursion_save): Do not assume that
578 selected_window always displays the buffer.
579 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
582 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
584 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
587 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
589 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
591 2013-03-27 Eli Zaretskii <eliz@gnu.org>
593 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
594 since MinGW's w32api headers do. This avoids compiler warnings.
596 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
599 2013-03-26 Eli Zaretskii <eliz@gnu.org>
601 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
603 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
605 * gtkutil.c (style_changed_cb): Check if frame is live and an
608 2013-03-26 Eli Zaretskii <eliz@gnu.org>
610 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
611 Define only for _WIN32_WINNT less than 0x0500.
612 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
614 Move inclusion of time.h before sys/time.h, so that MinGW64 could
615 see its own definitions of 'struct timeval' and 'struct timezone'.
617 Fix incompatibilities between MinGW.org and MinGW64 headers.
618 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
620 * w32.c (REPARSE_DATA_BUFFER): Guard with
621 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
623 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
625 * xterm.c: Include X11/XKBlib.h
626 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
628 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
630 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
632 * blockinput.h (input_blocked_p): Likewise.
633 * bytecode.c (exec_byte_code): Likewise.
634 * callproc.c (call_process_kill, call_process_cleanup)
635 (Fcall_process): Likewise.
636 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
637 (Fccl_execute_on_string): Likewise.
638 * character.c (string_escape_byte8): Likewise.
639 * charset.c (read_hex): Likewise.
640 * cm.c (calccost): Likewise.
641 * data.c (cons_to_unsigned): Likewise.
642 * dired.c (directory_files_internal, file_name_completion):
644 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
646 * doc.c (Fsubstitute_command_keys): Likewise.
647 * doprnt.c (doprnt): Likewise.
648 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
649 * emacsgtkfixed.c: Likewise.
650 * fileio.c (file_offset, Fwrite_region): Likewise.
651 * floatfns.c (Fexpt, fmod_float): Likewise.
652 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
654 * font.c (font_intern_prop): Likewise.
655 * frame.c (x_set_alpha): Likewise.
656 * gtkutil.c (get_utf8_string): Likewise.
657 * indent.c (check_display_width): Likewise.
658 * intervals.c (create_root_interval, rotate_right, rotate_left)
659 (split_interval_right, split_interval_left)
660 (adjust_intervals_for_insertion, delete_node)
661 (interval_deletion_adjustment, adjust_intervals_for_deletion)
662 (merge_interval_right, merge_interval_left, copy_intervals)
663 (set_intervals_multibyte_1): Likewise.
664 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
665 * keymap.c (Fkey_description): Likewise.
666 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
667 * lread.c (openp, read_integer, read1, string_to_number):
669 * menu.c (ensure_menu_items): Likewise.
670 * minibuf.c (read_minibuf_noninteractive): Likewise.
671 * print.c (printchar, strout): Likewise.
672 * process.c (create_process, Faccept_process_output)
673 (wait_reading_process_output, read_process_output, send_process)
674 (wait_reading_process_output): Likewise.
675 * profiler.c (make_log, handle_profiler_signal): Likewise.
676 * regex.c (re_exec): Likewise.
678 * search.c (looking_at_1, Freplace_match): Likewise.
679 * sysdep.c (get_child_status, procfs_ttyname)
680 (procfs_get_total_memory): Likewise.
681 * systime.h (EMACS_TIME_VALID_P): Likewise.
682 * term.c (dissociate_if_controlling_tty): Likewise.
683 * window.c (get_phys_cursor_glyph): Likewise.
684 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
685 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
687 * xfns.c (Fx_window_property): Likewise.
688 * xmenu.c (set_frame_menubar): Likewise.
689 * xselect.c (x_get_window_property, x_handle_dnd_message):
691 * xsmfns.c (smc_save_yourself_CB): Likewise.
692 * xterm.c (x_scroll_bar_set_handle): Likewise.
694 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
696 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
697 to be optional or nil. Adjust comment and convert it to docstring.
698 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
699 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
701 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
703 Static checking by GCC 4.8-20130319.
704 * image.c (gif_load): Assume pass < 3 to pacify GCC.
705 * process.c (Fset_process_datagram_address)
706 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
707 * xdisp.c (get_char_face_and_encoding):
708 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
709 (get_glyph_face_and_encoding): Prepare face before possibly using it.
710 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
712 2013-03-24 Ken Brown <kbrown@cornell.edu>
714 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
715 fix compilation on 64-bit Cygwin, where underscores are not
716 automatically prepended.
718 * w32term.c (w32_initialize): Silence compiler warning.
720 2013-03-23 Eli Zaretskii <eliz@gnu.org>
722 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
723 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
724 variables, to save and restore frame dimensions.
725 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
726 after returning from a 'fullscreen' configuration.
727 use SendMessage instead of PostMessage to send the SC_RESTORE message,
728 to avoid races between the main thread and the input thread.
730 * w32term.h (struct w32_output): New members normal_width,
731 normal_height, normal_top, normal_left, and prev_fsmode.
732 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
733 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
736 * w32term.c (w32fullscreen_hook): Record last value of the frame's
737 'fullscreen' parameter. Always record previous width and height
738 of the frame, except when switching out of maximized modes, so
739 that they could be restored correctly, instead of resetting to the
740 default frame dimensions. Send SC_RESTORE command to the frame,
741 unless we are going to send SC_MAXIMIZE, to restore the frame
742 resize hints in the mouse pointer shown by the window manager.
745 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
747 * lisp.h (get_frame_param): Adjust conditions for prototype
750 2013-03-22 Ken Brown <kbrown@cornell.edu>
752 * unexcw.c: Drop unneeded inclusion of w32common.h.
753 (report_sheap_usage): Declare.
754 (read_exe_header): Add magic numbers for x86_64.
755 (fixup_executable): Fix printf format specifier for unsigned long
758 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
760 * frame.h (struct frame): Put menu_bar_window under #ifdef
761 because this member is not needed when X toolkit is in use.
762 (fset_menu_bar_window):
763 * dispnew.c (clear_current_matrices, clear_desired_matrices)
764 (free_glyphs, update_frame):
765 * xdisp.c (expose_frame): Likewise.
766 (display_menu_bar): Likewise. Remove redundant eassert.
767 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
770 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
772 Use functions and constants to manipulate Lisp_Save_Value objects.
773 This replaces code that used macros and strings and token-pasting.
774 The change makes the C source a bit easier to follow,
775 and shrinks the Emacs executable a bit.
776 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
777 (make_save_value): Change 1st arg from string to enum. All callers
780 (mark_object): Use if, not #if, for GC_MARK_STACK.
781 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
782 (XSAVE_OBJECT): Now functions, not macros.
783 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
784 the constant was never used.
785 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
786 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
787 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
788 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
790 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
791 type3 with a single member save_type. All uses changed.
792 (save_type, set_save_pointer, set_save_integer): New functions.
793 * print.c (PRINTX): Remove.
795 * alloc.c: Remove redundant static declarations.
797 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
799 * window.h (struct window): Convert left_col, top_line, total_lines
800 and total_cols from Lisp_Objects to integers. Adjust comments.
801 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
803 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
804 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
805 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
806 Adjust users where appropriate.
808 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
810 * frame.h (struct frame): Drop resx and resy because the same data is
811 available from window system-specific output context. Adjust users.
812 (default_pixels_per_inch_x, default_pixels_per_inch_y):
813 New functions to provide defaults when no window system available.
814 (FRAME_RES_X, FRAME_RES_Y): New macros.
815 (NUMVAL): Move from xdisp.c.
816 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
817 (Ffont_face_attributes, Fopen_font):
819 * w32font.c (fill_in_logfont):
820 * xdisp.c (calc_pixel_width_or_height):
821 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
822 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
824 2013-03-20 Kenichi Handa <handa@gnu.org>
826 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
827 to 1 (temporary workaround until a bug related to ASCII
828 optimization is fixed).
830 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
832 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
833 Signal error if window is not internal. Adjust docstring.
834 (delete_all_child_windows): Use combination_limit to save the buffer.
835 (Fset_window_configuration): Adjust accordingly.
836 * print.c (syms_of_print): Initialize debugging output not here...
837 (init_print_once): ...but in a new function here.
838 * lisp.h (init_print_once): Add prototype.
839 * emacs.c (main): Add call to init_print_once. Adjust comments.
841 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
843 * window.c (window_resize_check, window_resize_apply)
844 (window_from_coordinates, recombine_windows, set_window_buffer)
845 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
846 (Fsplit_window_internal, Fdelete_window_internal)
847 (freeze_window_starts): Use bool for booleans.
848 * window.h (window_frame_coordinates, resize_frame_windows)
849 (freeze_window_starts, set_window_buffer): Adjust prototypes.
851 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
853 * dispnew.c (bitch_at_user): Use `user-error'.
855 2013-03-17 Ken Brown <kbrown@cornell.edu>
857 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
858 as return type of image_background. (Bug#13981)
859 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
861 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
863 * nsterm.m (updateFrameSize:): Change resize increments if needed.
864 (ns_select): Don't return with result uninitialized.
866 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
869 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
871 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
872 directories. If filename is nil, get directory name (Bug#13932).
873 Use getFilename and getDirectory.
874 (getFilename, getDirectory): New methods for EmacsSavePanel and
876 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
878 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
880 * coding.c (decode_coding_gap): Fix typo caught by static checking.
882 2013-03-15 Kenichi Handa <handa@gnu.org>
884 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
885 (adjust_after_replace): Make it back to static. Delete the third
886 arg text_at_gap_tail. Cancel the code for handling it.
888 * coding.h (struct coding_system): New member eol_seen.
890 * coding.c (detect_ascii): New function.
891 (detect_coding): Set coding->head_ascii and coding->eol_seen only
892 when the source bytes are actually scanned. On detecting for
893 coding_category_utf_8_auto, call detect_ascii instead of scanning
894 source bytes directly.
895 (produce_chars): Call insert_from_gap with the new arg 0.
896 (encode_coding): Likewise.
897 (decode_coding_gap): Control ASCII optimization by the variable
898 disable_ascii_optimization instead of #ifndef .. #endif.
899 Deccode EOL format according to coding->eol_seen.
900 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
903 * lisp.h (adjust_after_replace): Cancel externing it.
904 (insert_from_gap): Adjust prototype.
906 2013-03-15 Eli Zaretskii <eliz@gnu.org>
908 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
909 FULLSCREEN_MAXIMIZED. (Bug#13935)
911 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
913 * region-cache.c (find_cache_boundary, move_cache_gap)
914 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
915 Simplify debugging check and convert to eassert. Adjust comment.
916 (pp_cache): Put under ENABLE_CHECKING.
918 2013-03-14 Eli Zaretskii <eliz@gnu.org>
920 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
921 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
923 (w32fullscreen_hook): If the frame is visible, reset
924 f->want_fullscreen flag after changing the frame size. If the
925 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
928 2013-03-13 Daniel Colascione <dancol@dancol.org>
930 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
931 too so that these builds can use Cygwin's file conversion
932 functions. (We've been building and linking cygw32.o all along
933 and just not using it.)
935 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
937 File synchronization fixes (Bug#13944).
938 * Makefile.in (LIB_FDATASYNC): New macro.
940 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
941 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
942 Don't worry about HAVE_FSYNC, since a substitute fsync is
943 available if the system lacks one.
944 (Fwrite_regin): Retry fsync if interrupted.
946 2013-03-13 Eli Zaretskii <eliz@gnu.org>
948 * w32term.c (w32_read_socket): If the Emacs frame is being
949 activated, call w32fullscreen_hook, to make sure the new frame
950 dimensions are in effect. (Bug#13937)
952 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
954 * xdisp.c (init_iterator): Simplify because both character and byte
955 positions are either specified or -1. Add eassert. Adjust comment.
956 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
957 character and byte positions can be obtained from marker.
959 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
961 Static checking by Sun C 5.12.
962 * alloc.c (buffer_memory_full) [REL_ALLOC]:
963 * bytecode.c (exec_byte_code):
964 * dispnew.c (init_display):
966 * fileio.c (Fsubstitute_in_file_name):
967 * keyboard.c (Fevent_convert_list):
968 * keymap.c (Fsingle_key_description):
969 * term.c (maybe_fatal, fatal):
970 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
971 * xsmfns.c (Fhandle_save_session):
972 Omit unreachable code.
973 * keymap.c (map_keymap_char_table_item): Cast void * to
974 a function pointer type; the C Standard requires this.
976 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
977 Include <sys/param.h> unconditionally, as that works elsewhere and
978 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
979 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
982 2013-03-11 Paul Eggert <eggert@cs.ucla.edu>
984 * insdel.c (adjust_after_replace): Use bool for boolean.
986 2013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
988 * keyboard.c: Move keyboard decoding to read_key_sequence.
989 (decode_keyboard_code): Remove.
990 (tty_read_avail_input): Don't try to decode input.
991 (read_decoded_char): New function.
992 (read_key_sequence): Use it.
994 2013-03-10 Daniel Colascione <dancol@dancol.org>
996 * w32term.h (GUISTR, GUI_ENCODE_FILE, GUI_ENCODE_SYSTEM, GUI_FN)
997 (GUI_SDATA, guichar_t): Macros to abstract out differences between
998 NTGUI_UNICODE and !NTGUI_UNICODE builds, some moved out of
1001 * w32term.c (construct_drag_n_drop): Use the above macros to make
1002 drag-and-drop work for non-ASCII filenames in cygw32 builds.
1004 * w32fns.c (x_set_name, x_set_title): Use the above macros to
1005 properly display non-ASCII frame titles in cygw32 builds.
1007 * w32fns.c (Fw32_shell_execute): Use the above macros to properly
1008 call ShellExecute in cygw32 builds.
1010 * w32fn.c (Fx_file_dialog): Use the above macros to simplify the
1011 common file dialog code.
1013 * w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
1014 can just use du like other systems.
1016 * coding.c (from_unicode_buffer): Declare.
1017 * coding.c (from_unicode_buffer): Implement.
1019 2013-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
1021 * lread.c: Minor cleanup.
1022 (FROM_FILE_P): New macro.
1023 (skip_dyn_bytes, unreadchar, read1): Use it.
1024 (read_list): Consolidate duplicated code.
1026 * bytecode.c (struct byte_stack): Remove `constants' when unused.
1028 2013-03-10 Eli Zaretskii <eliz@gnu.org>
1030 * xdisp.c (display_tool_bar_line, redisplay_tool_bar)
1031 (redisplay_internal, set_cursor_from_row, try_window)
1032 (try_window_id, dump_glyph_row, extend_face_to_end_of_line)
1033 (display_line, notice_overwritten_cursor)
1034 (mouse_face_from_buffer_pos, note_mouse_highlight):
1035 Use MATRIX_ROW_DISPLAYS_TEXT_P.
1036 (note_mouse_highlight): Use MATRIX_ROW_GLYPH_START.
1037 (mouse_face_from_string_pos, fast_find_string_pos):
1038 Use MATRIX_ROW_VPOS.
1040 * xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
1042 * w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
1044 * xdisp.c (try_cursor_movement): Use MATRIX_ROW and
1045 MATRIX_MODE_LINE_ROW.
1047 * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW.
1049 2013-03-10 handa <handa@gnu.org>
1051 * lisp.h (adjust_after_replace): Extern it.
1053 * coding.c (detect_coding): Cound the heading ASCII bytes in the
1054 case of detection for coding_category_utf_8_auto.
1055 (decode_coding_gap) [not CODING_DISABLE_ASCII_OPTIMIZATION]:
1056 Skip decoding if all bytes are ASCII.
1058 * insdel.c (adjust_after_replace): Make it public. New arg
1060 (adjust_after_insert): Call adjust_after_replace with the new arg
1063 2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
1065 * keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN)
1066 (POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come
1067 from Elisp via unread-command-events.
1069 * keyboard.c (access_keymap_keyremap): Accept nil return value from
1070 functions to mean "no change".
1072 2013-03-08 Paul Eggert <eggert@cs.ucla.edu>
1074 region-cache.c, scroll.c, search.c: Use bool for booleans.
1075 * lisp.h (compile_pattern):
1076 * scroll.c (do_scrolling, do_direct_scrolling):
1077 * search.c (struct regexp_cache, compile_pattern_1)
1078 (compile_pattern, string_match_1, search_command)
1079 (trivial_regexp_p, search_buffer, Freplace_match, match_limit)
1080 (search_regs_saved, Fregexp_quote):
1081 Use bool for boolean.
1082 * region-cache.c (region_cache_forward, region_cache_backward):
1083 Fix comments to match code: these functions return int, not boolean.
1085 2013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
1087 * search.c (find_newline): Accept start and end byte positions
1088 as arguments and allow -1 if not known.
1089 (find_newline_no_quit): Likewise for start position.
1090 * lisp.h (find_newline, find_newline_no_quit): Adjust prototype.
1091 * bidi.c (bidi_find_paragraph_start): Pass byte position to
1092 find_newline_no_quit, thus eliminating CHAR_TO_BYTE.
1093 * editfns.c (Fconstrain_to_field): Break long line.
1094 Adjust call to find_newline.
1095 * indent.c (vmotion): Adjust calls to find_newline_no_quit.
1096 Use DEC_BOTH to start next search from the previous buffer
1097 position, where appropriate.
1098 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
1099 (get_visually_first_element, move_it_vertically_backward): Likewise.
1100 Obtain byte position from the display iterator, where appropriate.
1102 2013-03-08 Paul Eggert <eggert@cs.ucla.edu>
1104 print.c, process.c: Use bool for booleans.
1105 * lisp.h (wait_reading_process_output):
1106 * print.c (print_output_debug_flag, PRINTDECLARE, printchar)
1107 (strout, debug_output_compilation_hack, float_to_string, print)
1109 * process.c (kbd_is_on_hold, inhibit_sentinels, process_output_skip)
1110 (decode_status, status_message, create_process, create_pty)
1111 (Fmake_network_process, Fnetwork_interface_info)
1112 (wait_reading_process_output, read_process_output)
1113 (write_queue_push, write_queue_pop, process_send_signal)
1114 (handle_child_signal, keyboard_bit_set, kbd_on_hold_p):
1115 * process.h (struct Lisp_Process, inhibit_sentinels, kbd_on_hold_p):
1116 Use bool for booleans.
1117 * process.c (Fnetwork_interface_list): Remove unused local.
1118 (connect_counter): Now EMACS_INT, not int.
1120 2013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
1122 * bidi.c (bidi_fetch_char): Swap first and second arguments
1123 to match other functions accepting character and byte positions.
1125 (bidi_resolve_explicit_1, bidi_level_of_next_char): Adjust users.
1126 (bidi_paragraph_init): Likewise. Use DEC_BOTH which is faster
1127 when you need just to move to the previous buffer position.
1128 * xdisp.c (Fcurrent_bidi_paragraph_direction): Use DEC_BOTH.
1130 2013-03-07 Eli Zaretskii <eliz@gnu.org>
1132 * .gdbinit (prowlims): Display the enabled_p flag of the row.
1134 2013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
1136 Avoid character to byte conversions in motion subroutines.
1137 * indent.h (compute_motion, vmotion): Add byte position argument.
1138 * indent.c (compute_motion): Use it and avoid CHAR_TO_BYTE.
1140 (Fcompute_motion): Break long line. Adjust call to compute_motion.
1141 Use list5 for return value.
1142 (vmotion): Use byte position argument and avoid call to CHAR_TO_BYTE.
1143 Adjust comments, style and calls to compute_motion.
1144 (Fvertical_motion): Adjust call to vmotion.
1145 * window.c (Fdelete_other_windows_internal): Record window start
1146 byte position and adjust call to vmotion.
1147 (window_scroll_line_based): Likewise with call to compute_motion.
1149 (Frecenter): Adjust calls to vmotion.
1151 2013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
1153 * lisp.h (list2i, list3i): New functions.
1154 (list4i): Move from window.c and make LISP_INLINE.
1155 * editfns.c (make_lisp_time):
1156 * fns.c (Flocale_info):
1157 * keyboard.c (parse_modifiers):
1158 * xterm.c (x_ewmh_activate_frame): Use list2i.
1159 * instel.c (signal_after_change):
1160 * nsfns.m (Fx_server_version, Fxw_color_values):
1161 * w32fns.c (Fxw_color_values, Fx_server_version):
1162 * xfns.c (Fxw_color_values, Fx_server_version): Use list3i.
1163 * fileio.c (Fvisited_file_modtime):
1164 * nsfns.m (Fns_display_usable_bounds):
1165 * w32.c (ltime): Use list4i.
1167 2013-03-06 Eli Zaretskii <eliz@gnu.org>
1169 * search.c (find_newline_no_quit): Rename from find_next_newline.
1172 * lisp.h (find_newline_no_quit): Rename prototype.
1174 * xdisp.c (back_to_previous_line_start)
1175 (forward_to_next_line_start, get_visually_first_element)
1176 (move_it_vertically_backward): Callers of find_newline_no_quit changed.
1177 * indent.c (vmotion): Callers of find_newline_no_quit changed.
1178 * bidi.c (bidi_find_paragraph_start): Callers of
1179 find_newline_no_quit changed.
1181 * msdos.c: Change encoding to cp850. (Bug#13879)
1182 (fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
1184 2013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1186 Coding system support cleanup and minor refactoring.
1187 * coding.h (enum coding_result_code): Remove
1188 CODING_RESULT_INCONSISTENT_EOL and CODING_RESULT_INSUFFICIENT_MEM.
1189 (toplevel): Remove unused CODING_MODE_INHIBIT_INCONSISTENT_EOL.
1190 (CODING_MODE_LAST_BLOCK, CODING_MODE_SELECTIVE_DISPLAY)
1191 (CODING_MODE_DIRECTION, CODING_MODE_FIXED_DESTINATION)
1192 (CODING_MODE_SAFE_ENCODING): Rearrange bit values.
1193 (decode_coding_region, encode_coding_region, decode_coding_string):
1194 Remove unused compatibility macros.
1195 * coding.c (Qinconsistent_eol, Qinsufficient_memory): Remove.
1196 (record_conversion_result): Adjust user.
1197 (syms_of_coding): Likewise.
1198 (ALLOC_CONVERSION_WORK_AREA): Use SAFE_ALLOCA.
1199 (decode_coding, encode_coding): Add USE_SAFE_ALLOCA and SAFE_FREE.
1200 (decode_coding_object): Simplify since xrealloc never returns NULL.
1203 2013-03-06 Paul Eggert <eggert@cs.ucla.edu>
1205 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
1206 * sysdep.c (list_system_processes)
1207 [BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
1208 Make it a stub in this case; otherwise the build might fail,
1209 and this code hasn't been tested on such hosts anyway.
1210 Problem reported by Nelson H. F. Beebe in
1211 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
1212 and analyzed by Jérémie Courrèges-Anglas in
1213 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00062.html>.
1215 2013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
1217 * lisp.h (find_next_newline_no_quit): Rename to find_next_newline.
1218 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
1219 (get_visually_first_element, move_it_vertically_backward): Ajust users.
1220 * bidi.c (bidi_find_paragraph_start): Likewise.
1221 * indent.c (vmotion): Likewise.
1223 2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
1225 FILE's lock is now always .#FILE and may be a regular file (Bug#13807).
1226 * filelock.c: Include <c-ctype.h>.
1227 (MAX_LFINFO): New top-level constant.
1228 (lock_info_type): Remove members pid, boot_time. Add members at,
1229 dot, colon. Change user member to be the entire buffer, not a
1230 pointer. This allows us to handle the case where a foreign
1231 pid or boot time exceeds the local range. All uses changed.
1232 (LINKS_MIGHT_NOT_WORK): New constant.
1233 (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
1234 (defined_WINDOWSNT): Remove.
1235 (MAKE_LOCK_NAME, file_in_lock_file_name):
1236 Always use .#FILE (not .#-FILE) for the file lock,
1237 even if it is a regular file.
1238 (rename_lock_file): New function.
1239 (create_lock_file): Use it.
1240 (create_lock_file, read_lock_data):
1241 Prefer a symbolic link for the lock file, falling back on a
1242 regular file if symlinks don't work. Do not try to create
1243 symlinks on MS-Windows, due to security hassles. Stick with
1244 POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
1245 link, rename, unlink, mkstemp) when creating locks, as a GNUish
1246 host may be using a Windowsish file system, and cannot use
1247 MS-Windows-only system calls. Fall back on mktemp if mkstemp
1248 doesn't work. Don't fail merely because of a symlink-contents
1249 length limit in the current file system; fall back on regular
1250 files. Increase the symlink contents length limit to 8 KiB, this
1251 should be big enough for any real use and doesn't crunch the
1253 (create_lock_file, lock_file_1, read_lock_data):
1254 Simplify allocation of lock file buffers now that they fit in 8 KiB.
1255 (lock_file_1): Return error number, not bool. All callers changed.
1256 (ELOOP): New macro, if not already defined.
1257 (read_lock_data): Return size of lock file contents, not Lisp object.
1258 All callers changed. Handle a race condition if some other process
1259 replaces a regular-file lock with a symlink lock or vice versa,
1260 while we're trying to read the lock.
1261 (current_lock_owner): Parse contents more carefully, to help avoid
1262 confusing a regular-file lock with some other application's use
1263 of the file. Check for lock file contents being too long, or
1264 not parsing correctly.
1265 (current_lock_owner, lock_file):
1266 Allow foreign pid and boot times that exceed the local range.
1267 (current_lock_owner, lock_if_free, lock_file):
1268 Simplify allocation of lock file contents.
1269 * w32.c (sys_rename_replace): New function, containing most of
1270 the contents of the old sys_rename.
1271 (sys_rename): Use it.
1272 (fchmod): New dummy function.
1273 * w32.h (sys_rename_replace, fchmod): New decls.
1275 2013-03-05 Eli Zaretskii <eliz@gnu.org>
1277 * bidi.c (bidi_resolve_explicit_1): Don't call CHAR_TO_BYTE or
1278 bidi_count_bytes, as the callers now arrange for bidi_it->charpos
1279 to be in sync with bidi_it->bytepos. Suggested by Dmitry Antipov
1280 <dmantipov@yandex.ru>.
1282 2013-03-05 Dmitry Antipov <dmantipov@yandex.ru>
1284 * composite.c (get_composition_id, fill_gstring_header):
1285 Use make_uninit_vector where appropriate.
1286 * font.c (Ffont_get_glyphs, build_style_table): Likewise.
1287 * xselect.c (clean_local_selection_data): Likewise.
1289 2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
1291 Fix misuse of ImageMagick that caused core dump (Bug#13846).
1292 * image.c (imagemagick_load_image): Calculate height and width
1293 after flattening the image, not before.
1295 2013-03-04 Dmitry Antipov <dmantipov@yandex.ru>
1297 * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.
1298 * ftfont.c (ftfont_shape_by_flt): Likewise.
1299 * w32uniscribe.c (uniscribe_shape): Likewise.
1301 2013-03-02 Paul Eggert <eggert@cs.ucla.edu>
1303 The lock for FILE is now .#FILE or .#-FILE (Bug#13807).
1304 The old approach, which fell back on DIR/.#FILE.0 through
1305 DIR/.#FILE.9, had race conditions that could not be easily fixed.
1306 If DIR/.#FILE is a non-symlink file, Emacs now does not create a
1307 lock file for DIR/FILE; that is, DIR/FILE is no longer partly
1308 protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
1309 because the locking mechanism was never reliable in that case).
1310 This patch fixes this and other bugs discovered by a code
1311 inspection that was prompted by
1312 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
1313 Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
1314 to avoid interoperability problems between the MS-Windows and
1315 non-MS-Windows implementations. MS-Windows and non-MS-Windows
1316 instances of Emacs now ignore each others' locks.
1317 * filelock.c (defined_WINDOWSNT): New constant.
1318 (MAKE_LOCK_NAME, fill_in_lock_file_name):
1319 Don't create DIR/.#FILE.0 through DIR/.#FILE.9. Instead, create
1320 DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
1321 regular files on MS-Windows hosts.
1322 (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
1323 Use SAFE_ALLOCA to avoid problems with long file names.
1324 (MAX_LFINFO): Now a local constant, not a global macro.
1325 (IS_LOCK_FILE): Remove.
1326 (lock_file_1): Don't inspect errno if symlink call succeeds;
1327 that's not portable.
1328 (lock_file): Document that this function can return if lock
1330 (lock_file): Don't access freed storage.
1332 2013-03-02 Andreas Schwab <schwab@linux-m68k.org>
1334 * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren. (Bug#13734)
1336 2013-03-02 Paul Eggert <eggert@cs.ucla.edu>
1338 * textprop.c: Use bool for booleans.
1339 (validate_interval_range, Fadd_text_properties)
1340 (Fremove_text_properties): Prefer bool to int when either works.
1342 2013-03-02 Eli Zaretskii <eliz@gnu.org>
1344 * textprop.c (Fadd_text_properties, Fremove_text_properties):
1345 If the interval tree changes as a side effect of calling
1346 modify_region, re-do processing starting from the call to
1347 validate_interval_range. (Bug#13743)
1349 2013-02-28 Eli Zaretskii <eliz@gnu.org>
1351 * w32.c (sys_open): Don't reset the flags for FD in fd_info[].
1354 2013-02-27 Eli Zaretskii <eliz@gnu.org>
1356 * filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with
1357 _SH_DENYRW flag, instead of emacs_open, to deny any other process
1358 access to the lock file until it is written and closed.
1361 2013-02-27 Paul Eggert <eggert@cs.ucla.edu>
1363 * callint.c (Qcall_interactively):
1364 * macros.c (Qexecute_kbd_macro):
1367 2013-02-26 Bastien Guerry <bzg@gnu.org>
1369 * window.c (Frecenter): Tiny docstring enhancement.
1371 2013-02-26 Paul Eggert <eggert@cs.ucla.edu>
1373 Minor textprop integer cleanup.
1374 * intervals.h, textprop.c (add_text_properties_from_list):
1375 Return void, not int, since nobody uses the return value.
1376 * textprop.c (validate_plist, add_properties, remove_properties)
1377 (Fadd_text_properties):
1378 Don't assume list length fits in int.
1379 (interval_has_all_properties, interval_has_some_properties)
1380 (interval_has_some_properties_list, add_properties, remove_properties)
1381 (Fadd_text_properties, Fremove_text_properties)
1382 (Fremove_list_of_text_properties, text_property_stickiness):
1383 Use bool for booleans.
1384 (Fadd_text_properties, Fremove_text_properties):
1385 (Fremove_list_of_text_properties):
1386 Reindent do-while as per GNU style.
1388 2013-02-25 Eli Zaretskii <eliz@gnu.org>
1390 Implement CLASH_DETECTION for MS-Windows.
1392 * filelock.c [WINDOWSNT]: Include w32.h.
1393 (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
1394 function of that name. Up-case the macro arguments.
1395 (IS_LOCK_FILE): New macro.
1396 (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
1397 (create_lock_file): New function, with body extracted from
1399 [WINDOWSNT]: Implement lock files by writing a regular file with
1400 the lock information as its contents.
1401 (read_lock_data): New function, on Posix platforms just calls
1403 [WINDOWSNT]: Read the lock info from the file.
1404 (current_lock_owner): Call read_lock_data instead of calling
1405 emacs_readlinkat directly.
1406 (lock_file) [WINDOWSNT]: Run the file name through
1409 * w32proc.c (sys_kill): Support the case of SIG = 0, in which case
1410 just check if the process by that PID exists.
1412 * w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
1413 also present, as doing so will fail to error out if the file
1416 * makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
1418 * textprop.c (Fadd_text_properties, Fremove_text_properties)
1419 (Fremove_list_of_text_properties): Skip all of the intervals in
1420 the region between START and END that already have resp. don't
1421 have the requested properties, not just the first one.
1422 Add assertions that the loop afterwards always modifies the
1423 properties. (Bug#13743)
1425 2013-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
1427 * callint.c (Fcall_interactively): Use the right lexical environment
1428 for `interactive' specs (bug#13811).
1429 * eval.c (Feval): Accept a lexical environment.
1431 2013-02-25 Paul Eggert <eggert@cs.ucla.edu>
1433 Simplify data_start configuration (Bug#13783).
1434 This is a followon simplification to the fix for Bug#13650.
1435 * Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
1436 (START_FILES): Remove. All uses removed.
1437 (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
1438 (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
1439 (buildobj.h): Use it.
1440 ($(ALLOBJS)): Depend on globals.h.
1441 (temacs$(EXEEXT)): Use $(ALLOBJS).
1442 * autodeps.mk (ALLOBJS): Move to Makefile.in.
1443 * deps.mk (vm-limit.o):
1444 * makefile.w32-in ($(BLD)/vm-limit.$(O)):
1445 Do not depend on mem-limits.h.
1446 * emacs.c (__do_global_ctors, __do_global_ctors_aux)
1447 (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
1448 [__GNUC__ && !ORDINARY_LINK]: Remove.
1449 * mem-limits.h, pre-crt0.c: Remove.
1450 * unexaix.c, unexcoff.c: Don't include mem-limits.h.
1451 * unexcoff.c (etext): New decl.
1452 (make_hdr): Use DATA_START instead of start_of_data.
1453 * vm-limit.c: Move most of mem-limits.h's contents here.
1454 (data_start): New decl. It's OK if this is approximate,
1455 so simplify-away some unnecessary exactness.
1456 (POINTER): Remove; all uses removed.
1457 (data_space_start): Now char *, to avoid casts.
1458 (exceeds_lisp_ptr): New function, replacing the old
1459 EXCEEDS_LISP_PTR macro. All uses changed.
1460 (check_memory_limits): Simplify and remove casts.
1461 (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
1462 (memory_warnings): Use data_start instead of start_of_data.
1464 2013-02-24 Andreas Schwab <schwab@linux-m68k.org>
1466 * xdisp.c (set_message): Only check for debug-on-message if STRING
1467 is a string. (Bug#13797)
1469 2013-02-24 Paul Eggert <eggert@cs.ucla.edu>
1471 Fix regression introduced by July 10 filelock.c patch.
1472 * filelock.c (fill_in_lock_file_name): Fix crash caused by the
1473 2012-07-10 patch to this file. Reported by Eli Zaretskii in
1474 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html>
1475 and diagnosed by Andreas Schwab in
1476 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
1478 2013-02-22 Paul Eggert <eggert@cs.ucla.edu>
1480 Assume C89 or better.
1481 * ralloc.c (SIZE, POINTER, NIL):
1482 * vm-limit.c (POINTER):
1483 Remove, replacing all uses with C89 equivalents. These old
1484 symbols were present only for porting to pre-C89 platforms.
1486 2013-02-22 Claudio Bley <claudio.bley@gmail.com>
1488 * w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop.
1489 This avoids warning messages reported as part of Bug#13546.
1491 2013-02-21 Ken Brown <kbrown@cornell.edu>
1493 * sheap.c (report_sheap_usage): Fix arguments of message1_no_log.
1495 2013-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
1497 * sheap.c (report_sheap_usage): Prefer message1_nolog.
1499 * keyboard.c (Qcommand_execute): New var.
1500 (command_loop_1, read_char): Use it.
1501 (Fcommand_execute): Remove, replace by an Elisp implementation.
1502 (syms_of_keyboard): Adjust accordingly.
1504 2013-02-19 Daniel Colascione <dancol@dancol.org>
1506 * sheap.c (report_sheap_usage): Use message, not message1, so
1507 that we don't try to create a buffer while we're in the middle
1508 of dumping Emacs. Explain why.
1510 2013-02-20 Dmitry Antipov <dmantipov@yandex.ru>
1512 * search.c (find_newline): Return byte position in bytepos.
1514 (find_next_newline_no_quit, find_before_next_newline):
1515 Add bytepos argument.
1516 * lisp.h (find_newline, find_next_newline_no_quit)
1517 (find_before_next_newline): Adjust prototypes.
1518 * bidi.c (bidi_find_paragraph_start):
1519 * editfns.c (Fconstrain_to_field, Fline_end_position):
1520 * indent.c (compute_motion, vmotion):
1521 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start):
1522 (get_visually_first_element, move_it_vertically_backward):
1523 Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
1525 2013-02-19 Eli Zaretskii <eliz@gnu.org>
1527 * w32proc.c (new_child): Avoid leaking handles if the subprocess
1528 resources were not orderly released.
1530 2013-02-17 Eli Zaretskii <eliz@gnu.org>
1532 * xdisp.c (x_draw_vertical_border): For a window that is neither
1533 the leftmost nor the rightmost, redraw both the left and the right
1534 vertical borders. (Bug#13723)
1536 2013-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
1538 * xml.c (init_libxml2_functions):
1539 * sound.c (sound_warning):
1540 * sheap.c (report_sheap_usage):
1541 * process.c (wait_reading_process_output):
1542 * msdos.c (XMenuActivate):
1543 * macros.c (Fstart_kbd_macro, Fend_kbd_macro):
1544 * keyboard.c (top_level_1):
1545 * editfns.c (Fmessage, Fmessage_box):
1546 * callint.c (Fcall_interactively):
1547 * fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
1549 2013-02-17 Jan Djärv <jan.h.d@swipnet.se>
1551 * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
1552 * frame.c (syms_of_frame): ... to here.
1554 2013-02-16 Eli Zaretskii <eliz@gnu.org>
1556 * w32.c (sys_chown): Remove unused function.
1558 * w32term.c <input_signal_count>: Declare 'volatile'
1559 unconditionally. (Bug#9066)
1561 * w32.c (set_errno): Reset h_errno and don't set it to any other
1562 value. Set errno instead.
1563 (check_errno): Reset h_errno.
1564 (sys_socket, socket_to_fd, sys_bind, sys_connect)
1565 (sys_gethostname, sys_getservbyname, sys_getpeername)
1566 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
1567 (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set
1569 (sys_gethostbyname): Set h_errno only errors detected.
1571 2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
1573 * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
1575 2013-02-15 Eli Zaretskii <eliz@gnu.org>
1577 * keyboard.c (read_char): Fix calculation of auto-save time out
1578 when auto-save-timeout is less than 4. (Bug#13720)
1580 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
1581 time. Improve diagnostics in DebPrint. (Bug#13546)
1583 * w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname)
1584 (sys_gethostbyname, sys_getservbyname, sys_getpeername)
1585 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
1586 (sys_accept, sys_recvfrom, sys_sendto, fcntl): In case of failure,
1587 make sure errno is set to an appropriate value. (Bug#13546)
1588 (socket_to_fd): Add assertion against indexing fd_info[] with a
1589 value that is out of bounds.
1590 (sys_accept): If fd is negative, do not set up the child_process
1591 structure for reading.
1593 2013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
1595 * composite.c (fill_gstring_header): Remove useless prototype.
1597 * lisp.h (message_dolog, compile_pattern): Adjust prototype.
1598 * print.c (PRINTDECLARE, print_object):
1599 * search.c (compile_pattern, fast_looking_at, search_buffer):
1600 (simple_search, boyer_moore, Freplace_match):
1601 * xdisp.c (c_string_pos, number_of_chars, message_dolog):
1602 (get_overlay_arrow_glyph_row, display_mode_element):
1603 (decode_mode_spec_coding, message3):
1604 * xfaces.c (face_at_string_position): Use bool for booleans.
1607 2013-02-15 Paul Eggert <eggert@cs.ucla.edu>
1609 Fix AIX port (Bug#13650).
1610 * lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
1611 Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set,
1612 was #undeffed earlier, so it cannot be used as a macro here.
1613 Use the constant and not the macro.
1615 2013-02-15 Eli Zaretskii <eliz@gnu.org>
1617 * w32proc.c (new_child): If no vacant slots are found in
1618 child_procs[], make another pass looking for slots whose process
1619 has exited or died. (Bug#13546)
1621 * w32.c (sys_pipe): When failing due to file descriptors above
1622 MAXDESC, set errno to EMFILE.
1623 (_sys_read_ahead): Update cp->status when failing to read serial
1624 communications input, so that the status doesn't stay at
1625 STATUS_READ_IN_PROGRESS. (Bug#13546)
1627 2013-02-14 Jan Djärv <jan.h.d@swipnet.se>
1629 * gtkutil.c (tb_size_cb): New function.
1630 (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512).
1632 2013-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
1634 * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
1637 2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
1639 * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
1641 2013-02-13 Dmitry Antipov <dmantipov@yandex.ru>
1643 * font.c (font_range): Add pos_byte argument. Adjust comment
1644 and break long line.
1645 * font.h (font_range): Adjust prototype.
1646 * composite.c (autocmp_chars): Pass byte position to font_range.
1647 Break long line. Remove useless prototype and format comment.
1649 2013-02-13 Glenn Morris <rgm@gnu.org>
1651 * keyboard.c (input-decode-map, key-translation-map): Doc fixes.
1653 2013-02-13 Paul Eggert <eggert@cs.ucla.edu>
1655 Improve AIX port some more (Bug#13650).
1656 With this, it should be as good as it was in 23.3, though it's
1657 still pretty bad: the dumped emacs does not run. See Mark Fleishman in
1658 http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html
1659 * unexaix.c (start_of_text): Remove.
1660 (_data, _text): Declare as char[], not int, as AIX manual suggests.
1661 (bias, lnnoptr, text_scnptr, data_scnptr, load_scnptr)
1662 (orig_load_scnptr, orig_data_scnptr):
1663 Now off_t, not long, since they are file offsets.
1664 (make_hdr): Use _data, not start_of_data ().
1665 This is the key part of the fix.
1666 (make_hdr, unrelocate_symbols): Use off_t for file offsets.
1667 (unrelocate_symbols): Cast pointers to intptr_t, not to ulong.
1669 * pre-crt0.c (data_start): Initialize to 1.
1670 This ports to compilers that optimize the external declaration
1671 'int x = 0;' as if it were 'int x;' to shrink the executable.
1673 Improve AIX port (Bug#13650).
1674 This doesn't fix the bug, but it makes progress: Emacs builds now.
1675 * unexaix.c: Include inttypes.h, stdarg.h.
1676 (report_error, report_error_1): Mark as _Noreturn.
1677 (report_error): Don't report the wrong errno.
1678 (report_error_1): Now varargs. All callers changed.
1679 (make_hdr): Use uintptr_t, not unsigned, when converting pointers
1680 to unsigned. Don't use ADDR_CORRECT, as it no longer exists.
1681 (write_ptr): Use %p to print address rather than %lx and a cast
1682 to unsigned long. Grow buffer a bit, to be safer.
1684 2013-02-13 Eli Zaretskii <eliz@gnu.org>
1686 * bidi.c (bidi_resolve_neutral): After finding the next
1687 non-neutral character, accept NEUTRAL_ON type as well, because
1688 directional control characters, such as LRE and RLE, have their
1689 type converted to that by bidi_resolve_weak. This avoids aborts
1690 when LRE/RLE follows a run of neutrals.
1691 (bidi_move_to_visually_next): Assert that return value of
1692 bidi_peek_at_next_level is non-negative. Negative values will
1695 2013-02-13 Paul Eggert <eggert@cs.ucla.edu>
1697 Minor getenv-related fixes.
1698 * callproc.c (Fcall_process_region) [!DOS_NT]:
1699 Avoid unnecessary duplicate call to getenv.
1700 * callproc.c (init_callproc):
1701 * dispnew.c (init_display):
1702 * sysdep.c (sys_subshell):
1703 Omit unnecessary cast of getenv or egetenv.
1705 2013-02-13 Juanma Barranquero <lekktu@gmail.com>
1707 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/sysdep.$(O)):
1708 Update dependencies.
1710 2013-02-12 Eli Zaretskii <eliz@gnu.org>
1712 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
1714 (display_line): Set w->region_showing to the value of
1715 it->region_beg_charpos, not to -1. This fixes redisplay
1716 optimization when cursor is moved up after M->. (Bug#13623)
1718 (try_scrolling): Scroll text up more if point is too close to ZV
1719 and inside the scroll margin. This makes sure point is moved
1720 outside the scroll margin in these cases.
1722 * window.h (struct window): region_showing can no longer be
1725 2013-02-11 Paul Eggert <eggert@cs.ucla.edu>
1727 Tune by using memchr and memrchr.
1728 * doc.c (Fsnarf_documentation):
1729 * fileio.c (Fsubstitute_in_file_name):
1730 * search.c (find_newline, scan_newline):
1731 * xdisp.c (pos_visible_p, display_count_lines):
1732 Use memchr and memrchr rather than scanning byte-by-byte.
1733 * search.c (find_newline): Rename from scan_buffer.
1734 Omit first arg TARGET, as it's always '\n'. All callers changed.
1736 Clean up read_key_sequence a tiny bit more.
1737 * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
1738 (read_key_sequence): Remove unused locals.
1740 2013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
1742 Clean up read_key_sequence a bit; reread active keymaps after first event.
1743 * keyboard.c (read_char, read_char_x_menu_prompt)
1744 (read_char_minibuf_menu_prompt):
1745 Replace nmaps+maps with a single `map' arg.
1746 (follow_key): Operate on a single map.
1747 (active_maps): New function.
1748 (test_undefined): Also return true for nil bindings.
1749 (read_key_sequence): Use active_maps to replace the arrays of keymaps with
1750 a single (composed) keymap. Remember `first_event' to choose the right
1751 set of active keymaps. Recompute the set of keymaps after receiving
1752 the first event. Remove GOBBLE_FIRST_EVENT.
1753 (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
1754 * keyboard.h (read_char): Update declaration.
1755 * lread.c (read_filtered_event): Adjust call to read_char.
1757 2013-02-11 Eli Zaretskii <eliz@gnu.org>
1759 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
1760 Don't use the limitation on backwards movement when lines are truncated
1761 in the window. (Bug#13675)
1763 2013-02-11 Dmitry Antipov <dmantipov@yandex.ru>
1765 * marker.c (set_marker_internal): If desired position is passed
1766 as a marker, avoid call to buf_charpos_to_bytepos.
1767 * window.c (Fset_window_point): Omit redundant type checking.
1768 (Fset_window_start): Likewise. Format comment.
1769 (window_scroll_pixel_based): Use set_marker_restricted_both
1770 with character and byte positions obtained from an iterator.
1771 (Fset_window_configuration): Use set_marker_restricted_both.
1772 * xdisp.c (message_dolog): Likewise.
1774 2013-02-10 Eli Zaretskii <eliz@gnu.org>
1776 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
1777 When text lines are longer than window's screen lines, don't move back
1778 too far. This speeds up some redisplay operations. (Bug#13675)
1780 2013-02-10 Dmitry Antipov <dmantipov@yandex.ru>
1782 * syntax.c (scan_sexps_forward): Fix byte position calculation
1783 Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change.
1785 2013-02-10 Paul Eggert <eggert@cs.ucla.edu>
1787 * fileio.c (Fexpand_file_name): Omit confusing pointer comparison
1788 that was not needed.
1790 2013-02-09 Paul Eggert <eggert@cs.ucla.edu>
1792 Minor hashing refactoring.
1793 * fns.c (SXHASH_REDUCE): Move to lisp.h.
1794 (sxhash_float): Return EMACS_UINT, for consistency with the other
1796 * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
1797 non-static inline function and therefore can't use static vars.
1798 (SXHASH_REDUCE): Move here from fns.c, and make it inline.
1799 * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
1800 with the other hash functions.
1802 2013-02-09 Eli Zaretskii <eliz@gnu.org>
1804 * callproc.c (Fcall_process_region) [WINDOWSNT]: Make sure the
1805 XXXXXX part of the temporary file pattern is not downcased even
1806 when w32-downcase-file-names is non-nil. (Bug#13661)
1808 * xdisp.c (decode_mode_spec): Remove handling of %t.
1810 * msdos.c (careadlinkatcwd): Remove.
1812 2013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
1814 * lread.c (skip_dyn_bytes): New function (bug#12598).
1815 (read1): Use it. Use getc instead of READCHAR to read bytes.
1816 (load_each_byte): Remove. Update users.
1818 2013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
1820 * search.c (scan_buffer): Calculate end byte position just once.
1821 (scan_newline): Do not recalculate start_byte.
1822 (search_command): Use eassert.
1823 * syntax.c (struct lisp_parse_state): New member location_byte.
1824 (scan_sexps_forward): Record from_byte and avoid redundant
1825 character to byte position calculation ...
1826 (Fparse_partial_sexp): ... here. Break too long line.
1828 2013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
1830 * lisp.h (make_uninit_vector): New function.
1831 * alloc.c (Fvector, Fmake_byte_code):
1832 * ccl.c (Fregister_ccl_program):
1833 * charset.c (Fdefine_charset_internal, define_charset_internal):
1834 * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
1835 * composite.c (syms_of_composite):
1836 * font.c (Fquery_font, Ffont_info, syms_of_font):
1837 * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
1838 * ftfont.c (ftfont_shape_by_flt):
1839 * indent.c (recompute_width_table):
1840 * nsselect.m (clean_local_selection_data):
1841 * syntax.c (init_syntax_once):
1842 * w32unsubscribe.c (uniscribe_shape):
1843 * window.c (Fcurrent_window_configuration):
1844 * xfaces.c (Fx_family_fonts):
1845 * xselect.c (selection_data_to_lisp_data): Use it.
1847 2013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
1849 * coding.c (Fdefine_coding_system_internal): Use AREF where
1850 argument is known to be a vector.
1851 * fns.c (Flocale_info): Likewise for ASET.
1852 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
1853 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
1855 2013-02-05 Jan Djärv <jan.h.d@swipnet.se>
1857 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
1860 * nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
1861 (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
1862 updateCollectionBehaviour.
1864 * nsterm.m (NEW_STYLE_FS): Remove.
1865 (ns_last_use_native_fullscreen): New variable.
1866 (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
1867 (x_set_window_size): Do not take title bar and tool bar into account
1868 if isFullscreen returns YES.
1869 (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
1870 (check_native_fs): New function.
1871 (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
1872 (ns_term_init): Remove NEW_STYLE_FS.
1873 (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
1874 and tool bar if isFullscreen returns NO.
1875 (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
1876 (initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS
1877 with HAVE_NATIVE_FS.
1878 (window:willUseFullScreenPresentationOptions:): New method.
1879 (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
1880 Hide toolbar if not enabled (Bug#13444).
1881 (windowDidExitFullScreen:): Call updateCollectionBehaviour.
1882 Restore tool bar if enabled, hide it otherwise (Bug#13444).
1883 (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
1884 (toggleFullScreen:): If fs_is_native, call toggleFullScreen on
1885 window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
1886 Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
1887 FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs.
1888 (syms_of_nsterm): Add ns-use-native-fullscreen.
1890 2013-02-04 Paul Eggert <eggert@cs.ucla.edu>
1892 * fileio.c (Qchoose_write_coding_system): Now static.
1894 2013-02-04 Eli Zaretskii <eliz@gnu.org>
1896 * xdisp.c (window_buffer_changed): region_showing can be negative,
1897 which still means region is being displayed.
1898 (redisplay_internal): Resurrect code that forced redisplay of the
1899 whole window when showing region and the mark has changed.
1900 Record the new mark position to allow redisplay optimizations.
1901 (display_line): If it->region_beg_charpos is non-zero, set the
1902 window's region_showing member to -1. (Bug#13623) (Bug#13626)
1904 * window.h (struct window) <region_showing>: Declare ptrdiff_t,
1905 not bitfield of 1 bit.
1907 2013-02-03 Daniel Colascione <dancol@dancol.org>
1909 * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that
1910 daemon mode works on cygw32 when Emacs is installed and not just
1913 2013-02-02 Paul Eggert <eggert@cs.ucla.edu>
1915 Avoid file time stamp bug on MS-Windows (Bug#13149).
1916 * fileio.c (Fwrite_region): Don't use the heuristic on empty files,
1917 as FAT32 doesn't update time stamps when truncating them.
1918 Also, check that a file time stamp is not a multiple of 100 ns;
1919 this should catch all instances of the problem on MS-Windows,
1920 as its native file system resolution is 100 ns or worse, and
1921 checking for a non-multiple of 100 ns should impose only a small
1922 overhead on systems with ns resolution.
1924 2013-02-02 Eli Zaretskii <eliz@gnu.org>
1926 Avoid encoding file names on MS-Windows when they need to be run
1927 through dostounix_filename.
1928 * w32.c (normalize_filename): Accept an additional argument
1929 MULTIBYTE; if non-zero, traverse the file name by bytes and don't
1930 downcase it even if w32-downcase-file-names is non-nil.
1931 (dostounix_filename): Accept an additional argument MULTIBYTE and
1932 pass it to normalize_filename.
1933 (emacs_root_dir): Adjust.
1935 * msdos.h (dostounix_filename): Adjust prototype.
1937 * w32.h (dostounix_filename): Adjust prototype.
1939 * msdos.c (dostounix_filename): Accept an additional argument and
1941 (init_environment): Adjust callers of dostounix_filename.
1943 * fileio.c (Ffile_name_directory, file_name_as_directory)
1944 (directory_file_name, Fexpand_file_name)
1945 (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
1947 [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
1949 (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
1950 variables, as egetenv is case-insensitive for DOS_NT.
1952 * dired.c (file_name_completion): Don't call Fdirectory_file_name
1953 with an encoded file name.
1955 * w32proc.c (Fw32_short_file_name, Fw32_long_file_name):
1956 Adjust calls to dostounix_filename.
1958 * w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
1960 * unexw32.c (unexec): Adjust call to dostounix_filename.
1962 * termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
1964 * emacs.c (decode_env_path) [DOS_NT]: Adjust call to
1967 * callproc.c (Fcall_process) [MSDOS]: Adjust call to
1970 * callproc.c (Fcall_process): Make sure program name in PATH and
1971 new_argv[0] is encoded, if needed. Otherwise, un-encoded string
1972 is passed to exec/spawnve, which fails unless the file-name
1975 * w32proc.c (sys_spawnve): Make sure escape_char is initialized,
1976 even if w32-quote-process-args is nil.
1978 2013-02-01 Paul Eggert <eggert@cs.ucla.edu>
1980 Fix timestamp bug when write-region appends nothing (Bug#13149).
1981 * fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
1982 the file's time stamp doesn't change if Emacs happens to write nothing
1983 to the file, and on a buggy file system this could cause Emacs to
1984 incorrectly infer that the file system doesn't have the bug.
1985 Avoid this problem by inhibiting the inference in this case.
1987 2013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
1989 * window.h (struct window): Convert base_line_number, base_line_pos
1990 and column_number_displayed members from Lisp_Object to ptrdiff_t.
1991 Convert region_showing member from Lisp_Object to bitfield.
1992 Remove sequence_number member. Adjust comments.
1993 * window.c (sequence_number): Remove.
1994 (make_window): Initialize column_number_displayed.
1995 * print.c (print_object): Follow the printed representation of
1996 frames and print window pointer to distinguish between windows.
1997 (adjust_window_count): Invalidate base_line_pos. Adjust comment.
1998 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1999 (wset_column_number_displayed, wset_region_showing): Remove.
2000 (window_buffer_changed, mode_line_update_needed, redisplay_internal)
2001 (try_scrolling, try_cursor_movement, redisplay_window)
2002 (try_window_reusing_current_matrix, try_window_id, display_line)
2003 (display_mode_lines, decode_mode_spec): Adjust users.
2004 * .gdbinit (pwinx): Do not print sequence_number.
2006 2013-02-01 Paul Eggert <eggert@cs.ucla.edu>
2008 Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
2009 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): Remove.
2010 * dired.c: Include <fcntl.h>.
2011 (open_directory): New function, which uses open and fdopendir
2012 rather than opendir. DOS_NT platforms still use opendir, though.
2013 (directory_files_internal, file_name_completion): Use it.
2014 (file_attributes): New function, with most of the old Ffile_attributes.
2015 (directory_files_internal, Ffile_attributes): Use it.
2016 (file_attributes, file_name_completion_stat): First arg is now fd,
2017 not dir name. All uses changed. Use fstatat rather than lstat +
2019 (file_attributes): Use emacs_readlinkat rather than Ffile_symlink_p.
2020 * fileio.c: Include <allocator.h>, <careadlinkat.h>.
2021 (emacs_readlinkat): New function, with much of the old
2022 Ffile_symlink_p, but with an fd argument for speed.
2023 It uses readlinkat rather than careadlinkatcwd, so that it
2024 need not assume the working directory.
2025 (Ffile_symlink_p): Use it.
2026 * filelock.c (current_lock_owner): Use emacs_readlinkat
2027 rather than emacs_readlink.
2028 * lisp.h (emacs_readlinkat): New decl.
2029 (READLINK_BUFSIZE, emacs_readlink): Remove.
2030 * sysdep.c: Do not include <allocator.h>, <careadlinkat.h>.
2031 (emacs_norealloc_allocator, emacs_readlink): Remove.
2032 This stuff is moved to fileio.c.
2033 * w32.c (fstatat, readlinkat): New functions.
2034 (careadlinkat): Don't check that fd == AT_FDCWD.
2035 (careadlinkatcwd): Remove; no longer needed.
2037 2013-01-31 Glenn Morris <rgm@gnu.org>
2039 * fileio.c (choose_write_coding_system): Make it callable from Lisp.
2040 (Fwrite_region): Update for new choose_write_coding_system args.
2041 Move the last piece of choose_write_coding_system here. (Bug#13522)
2042 (syms_of_fileio): Add choose-write-coding-system.
2044 2013-01-30 Eli Zaretskii <eliz@gnu.org>
2046 * w32.c (sys_open): Zero out the flags for the new file descriptor.
2047 (sys_close): Zero out the flags for the file descriptor before
2048 closing it. (Bug#13546)
2050 * w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
2051 (logon_network_drive, stat_worker, symlink, chase_symlinks):
2052 Use CharNextExA and CharPrevExA to iterate over file names encoded in
2055 * w32.c (w32_get_long_filename, init_environment, readlink):
2056 Support file names encoded in DBCS codepages.
2057 (readlink): Use the current file-name-coding-system, not the ANSI
2058 codepage, to decode and handle targets of symlinks.
2060 2013-01-28 Eli Zaretskii <eliz@gnu.org>
2062 * w32.c (opendir): Now accepts a 'const char *'.
2064 2013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
2066 Remove obsolete redisplay code. See the discussion at
2067 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
2068 * dispnew.c (preemption_period, preemption_next_check): Remove.
2069 (Vredisplay_preemption_period): Likewise.
2070 (update_frame, update_single_window, update_window, update_frame_1):
2071 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
2072 used, following the 2012-06-22 change.
2074 2013-01-25 Eli Zaretskii <eliz@gnu.org>
2076 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
2078 2013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
2080 * font.c (num_fonts): Remove the leftover from old
2081 debugging code. Adjust comment style here and there.
2082 * insdel.c (insert_1): Remove.
2083 * lisp.h (insert_1): Remove prototype.
2084 * xdisp.c (message_dolog): Adjust users to call insert_1_both.
2086 2013-01-25 Eli Zaretskii <eliz@gnu.org>
2088 * w32.c (max_filename_mbslen): New function.
2089 (normalize_filename, readdir): Use it to detect locales where ANSI
2090 encoding of file names uses a double-byte character set (DBCS).
2091 If a DBCS encoding is used, advance by characters using
2092 CharNextExA, instead of incrementing a 'char *' pointer.
2093 Use _mbslwr instead of _strlwr. (Bug#13515)
2095 * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial
2096 request of memory reservation to 1.7GB. (Bug#13065)
2098 2013-01-25 Andreas Schwab <schwab@linux-m68k.org>
2100 * coding.c (detect_coding_iso_2022): Move back mis-reordered code
2101 at check_extra_latin label. (Bug#13505)
2103 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2105 * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script):
2106 Avoid redundant calls to strlen.
2108 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2110 Drop async_visible and async_iconified fields of struct frame.
2111 This is possible because async input is gone; for details, see
2112 http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
2113 * frame.h (struct frame): Remove async_visible and async_iconified
2114 members, convert garbaged to unsigned bitfield. Adjust comments.
2115 (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users.
2116 (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
2117 * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
2118 Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
2119 FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
2121 (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
2122 properly. Likewise for obscured.
2124 (handle_one_xevent): Save visible state to generate ICONIFY_EVENT
2127 (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
2129 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
2131 * insdel.c (prepare_to_modify_buffer): Revert last change as suggested
2132 in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html.
2134 2013-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
2136 * xdisp.c (message2, message2_nolog): Remove functions.
2137 (message3, message3_nolog): Extract nbytes and multibyteness directly
2138 from the string. Change all callers.
2139 (message3_nolog): Don't set message_enable_multibyte since set_message
2140 will reset it anyway.
2141 (message1, message1_nolog): Use message3.
2142 (vmessage): Use a stack allocated buffer rather than f->message_buf.
2143 (with_echo_area_buffer): Remove last two arguments. Update all callers.
2144 (set_message): Drop all but the second arg, which has to be a string.
2145 (set_message_1): Simplify now that we know that a1 is NULL and the
2146 second arg is a string.
2147 * frame.h (struct frame): Remove `message_buf' field.
2148 Use glyphs_initialized_p instead.
2149 (FRAME_MESSAGE_BUF): Remove macro.
2150 * w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
2151 * lisp.h (message2, message2_nolog): Remove declarations.
2152 (message3, message3_nolog): Update declarations.
2153 * keyboard.c (read_char_minibuf_menu_text)
2154 (read_char_minibuf_menu_width): Remove vars.
2155 (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
2156 to correctly handle multibyte strings.
2157 * frame.c (delete_frame): Don't free message_buf any more.
2158 * editfns.c (message_text, message_length): Remove vars.
2159 (Fmessage_box): Don't copy the Lisp string's bytes any longer.
2160 * fileio.c (auto_save_error): Use message3 instead of message2.
2161 * dispnew.c (adjust_frame_message_buffer): Remove function.
2163 2013-01-23 Eli Zaretskii <eliz@gnu.org>
2165 * w32term.c (w32fullscreen_hook): Account correctly for the screen
2166 real estate used for the tool bar and the menu bar.
2168 2013-01-23 Dmitry Antipov <dmantipov@yandex.ru>
2170 * insdel.c (prepare_to_modify_buffer): Force redisplay if
2171 hidden buffer is prepared to modification (Bug#13164).
2173 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2175 * window.h (struct window): Change window_end_valid member from
2176 Lisp_Object to a bitfield. Adjust comments.
2177 (wset_window_end_valid): Remove.
2178 * window.c (adjust_window_count): Clear window_end_valid.
2179 (Fwindow_end): Adjust user. Remove ancient #if 0 code.
2180 (Fwindow_line_height, set_window_buffer, Frecenter)
2181 (Fsplit_window_internal, Fdelete_other_windows_internal)
2182 (Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
2183 * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
2184 * xdisp.c (check_window_end, reconsider_clip_changes)
2185 (redisplay_internal, mark_window_display_accurate_1, redisplay_window)
2186 (try_window, try_window_reusing_current_matrix, note_mouse_highlight)
2187 (find_first_unchanged_at_end_row, try_window_id): Likewise.
2189 2013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
2191 * xdisp.c (mark_window_display_accurate): Simplify the loop
2192 assuming that the only one of vchild, hchild or buffer window
2193 slots is non-nil. Call mark_window_display_accurate_1 for
2194 the leaf windows only.
2195 (mark_window_display_accurate_1): Always assume leaf window.
2198 2013-01-22 Paul Eggert <eggert@cs.ucla.edu>
2200 * emacs.c (Qkill_emacs_hook): Now static.
2202 * fileio.c (Finsert_file_contents): Simplify.
2203 Remove unnecessary assignments and tests.
2205 2013-01-21 Eli Zaretskii <eliz@gnu.org>
2207 * w32.c (acl_set_file): Don't test for errors unless
2208 set_file_security returns FALSE. Avoids spurious errors when
2211 2013-01-21 Dmitry Antipov <dmantipov@yandex.ru>
2213 * fileio.c (Finsert_file_contents): Revert code introduced at
2214 2013-01-18 in favor of the simpler and generally better fix.
2215 Save stack space by removing 'buffer' and reusing 'read_buf'
2218 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2220 * lisp.h (eabs): Define unconditionally (Bug#13419).
2221 The old "#if !defined (eabs)" was an unnecessary revenant of back
2222 when this macro was called "abs". Document 'eabs' better.
2224 2013-01-19 Glenn Morris <rgm@gnu.org>
2226 * fns.c (Frandom): Doc fix.
2228 2013-01-19 Eli Zaretskii <eliz@gnu.org>
2230 * editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
2231 segfault when there are lots of overlays.
2233 * buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
2234 when there are lots of overlays.
2235 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
2236 for the details and a way to reproduce.
2238 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2240 * fileio.c: Use O_APPEND to append.
2241 This corresponds better to the natural interpretation of "append",
2242 and avoids the need to open the output file twice, or to invoke
2243 lseek when APPEND is neither nil nor a number.
2244 This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
2245 (Fwrite_region): Simplify. Use O_APPEND instead of opening the
2246 file possibly twice, and lseeking to its end; this avoids the
2247 need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
2248 at the same time: the combination is never needed and apparently
2249 it doesn't work with DOS_NT.
2251 Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149).
2252 * fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
2254 Allow floating-point file offsets.
2255 Problem reported by Vitalie Spinu in
2256 <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
2257 * fileio.c (emacs_lseek): Remove.
2258 (file_offset): New function.
2259 (Finsert_file_contents, Fwrite_region): Use it.
2261 2013-01-19 Chong Yidong <cyd@gnu.org>
2263 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
2264 aborting on Fsignal (Bug#13289).
2266 2013-01-19 Eli Zaretskii <eliz@gnu.org>
2268 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
2269 set_file_security as failure due to insufficient privileges.
2270 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2271 (fstat): Return owner and group like 'stat' and 'lstat' do.
2273 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2275 Work around bug in CIFS and vboxsf file systems (Bug#13149).
2276 The bug was observed on Ubuntu operating inside a virtual machine,
2277 editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
2278 The workaround introduces a race condition on non-buggy hosts,
2279 but it's an unlikely race and anyway there's a nearly identical
2280 nearby race that can't be fixed.
2281 * fileio.c (valid_timestamp_file_system, timestamp_file_system):
2283 (Fwrite_region): Test for file system time stamp bug.
2284 (init_fileio): New function.
2285 * lisp.h (init_fileio): Declare it.
2286 * emacs.c (main): Call it.
2288 * fileio.c (Finsert_file_contents): Simplify new diagnostic
2289 and make it more consistent with other stat-failure diagnostics.
2291 2013-01-18 Dmitry Antipov <dmantipov@yandex.ru>
2293 Fix crash when inserting data from non-regular files.
2294 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
2295 for the error description produced by valgrind.
2296 * fileio.c (read_non_regular): Rename to read_contents.
2297 Free Lisp_Save_Value object used to pass parameters.
2298 (read_non_regular_quit): Rename to read_contents_quit.
2299 (Finsert_file_contents): Redesign internal file reading loop to adjust
2300 gap and end positions after each read and so help make_gap to work
2301 properly. Do not signal an I/O error too early and so do not leave
2302 not yet decoded characters in a buffer, which was the reason of
2303 redisplay crash. Use list2 to build return value. Adjust comments.
2305 2013-01-17 Paul Eggert <eggert@cs.ucla.edu>
2307 Close a race when statting and reading files (Bug#13149).
2308 * fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
2309 This avoids a race if the file is renamed between stat and open.
2310 This race is not the problem originally noted in Bug#13149;
2311 see <http://bugs.gnu.org/13149#73> and later messages in the thread.
2313 2013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
2315 * lisp.h (toplevel): Add comment about using Lisp_Save_Value
2316 objects, related functions and macros.
2317 (make_save_value): Adjust prototype.
2318 (make_save_pointer): New prototype.
2319 (SAFE_NALLOCA): Fix indentation. Use make_save_pointer.
2320 (SAFE_ALLOCA_LISP): Adjust make_save_value usage.
2321 * alloc.c (format_save_value): Rename to make_save_value.
2322 (make_save_pointer): New function.
2323 (record_xmalloc): Use make_save_pointer.
2324 * dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
2325 * nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
2326 Change users of make_save_value to make_save_pointer.
2327 Likewise for format_save_value and make_save_value.
2329 2013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
2331 * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
2332 (DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
2333 * buffer.c (toplevel, syms_of_buffer): Drop old commented-out
2336 2013-01-15 Paul Eggert <eggert@cs.ucla.edu>
2338 * alloc.c (free_save_value): Now static.
2340 2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2342 * keymap.c (map_keymap_internal): Use format_save_value.
2343 (map_keymap_char_table_item): Adjust accordingly.
2344 * fileio.c (non_regular_fd, non_regular_inserted)
2345 (non_regular_nbytes): Remove.
2346 (Finsert_file_contents): Convert trytry to ptrdiff_t.
2347 Use format_save_value to pass parameters to read_non_regular.
2348 (read_non_regular): Use XSAVE_ macros to extract parameters.
2350 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
2352 (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]: Adjust user.
2354 2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2356 * lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow
2357 extraction from any Lisp_Save_Value slot. Add type checking.
2358 * alloc.c, dired.c, editfns.c, fileio.c, ftfont.c, gtkutil.c:
2359 * keymap.c, lread.c, nsterm.h, nsmenu.c, xfns.c, xmenu.c:
2360 * xselect.c: All users changed.
2362 2013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
2364 Some convenient bits to deal with Lisp_Save_Values.
2365 * lisp.h (XSAVE_OBJECT): New macro to extract saved objects.
2366 (allocate_misc): Remove prototype.
2367 (format_save_value): New prototype.
2368 * alloc.c (allocate_misc): Revert back to static.
2369 (format_save_value): New function to build Lisp_Save_Value
2370 object with the specified internal structure.
2371 (make_save_value): Reimplement using format_save_value.
2372 * editfns.c (save_excursion_save): Use format_save_value.
2373 (save_excursion_restore): Use XSAVE_OBJECT.
2375 2013-01-14 Paul Eggert <eggert@cs.ucla.edu>
2377 Avoid needless casts with XSAVE_POINTER.
2378 * alloc.c (mark_object) [GC_MARK_STACK]:
2379 * dired.c (directory_files_internal_unwind):
2380 * fileio.c (do_auto_save_unwind):
2381 * gtkutil.c (pop_down_dialog):
2382 * keymap.c (map_keymap_char_table_item):
2383 * lread.c (load_unwind):
2384 * nsmenu.m (pop_down_menu):
2385 * print.c (print_object) [GC_MARK_STACK]:
2386 * xfns.c (clean_up_file_dialog):
2387 * xmenu.c (cleanup_widget_value_tree):
2388 Omit casts between XSAVE_POINTER and a pointer type.
2390 2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2392 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
2393 * eval.c (eval_sub): Protect `form' from being GCed before its
2394 car and cdr becomes protected with the backtrace entry.
2396 2013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
2398 Make Lisp_Save_Value more versatile storage for up to four objects.
2399 * lisp.h (toplevel): Enumeration to describe types of saved objects.
2400 (struct Lisp_Save_Value): New layout. Adjust comments.
2401 (XSAVE_POINTER): New macro.
2402 (XSAVE_INTEGER): Likewise.
2403 (allocate_misc): Add prototype.
2404 (free_misc): Likewise.
2405 * alloc.c (allocate_misc): Now global.
2406 (free_misc): Likewise. Adjust comment.
2407 (make_save_value): Use new Lisp_Save_Value layout. Adjust comment.
2408 (free_save_value): Likewise.
2409 (mark_object): Likewise.
2410 * editfns.c (save_excursion_save): Pack everything within
2411 Lisp_Save_Value and so avoid xmalloc.
2412 (save_excursion_restore): Adjust to match new layout. Use free_misc
2413 because we do not allocate extra memory any more. Add eassert.
2414 * print.c (print_object): New code to print Lisp_Save_Value. Do not
2415 rely on valid_lisp_object_p if !GC_MARK_STACK. Adjust comments.
2416 * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c,
2417 * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c:
2418 Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
2420 2013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2422 * nsfont.m (LCD_SMOOTHING_MARGIN): New define.
2423 (nsfont_draw): Remove disabling of LCD smoothing.
2424 (ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
2425 Bug#11484 with LCD smoothing on.
2427 2013-01-13 Paul Eggert <eggert@cs.ucla.edu>
2429 Fix SIGDANGER handlers, for AIX (Bug#13408).
2430 * sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
2431 Move handlers here from emacs.c; they were out of place.
2433 2013-01-11 Jan Djärv <jan.h.d@swipnet.se>
2435 * xterm.c (syms_of_xterm): Adjust documentation for
2436 scroll-bar-adjust-thumb-portion.
2438 2012-12-31 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
2440 * xterm.c (scroll-bar-adjust-thumb-portion): New variable to
2441 determine whether scroll bar thumb size should be adjusted or
2442 not. Use variable for MOTIF.
2444 * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
2447 2013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2449 * nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
2451 (doCommandBySelector:): Set processingCompose to NO.
2453 * nsfont.m (ns_findfonts): Add block/unblock_input calls.
2454 Remove check for fkeys count > zero, block/unblock fixes the real bug.
2455 (nsfont_list_family): Add block/unblock_input calls.
2456 (nsfont_open): Move block_input earlier. Add unblock_input before early
2458 (nsfont_draw): Add block/unblock_input calls.
2460 2013-01-12 Dmitry Antipov <dmantipov@yandex.ru>
2462 * indent.c (Fvertical_motion): Remove now-incorrect GCPROs
2463 for old_charpos and old_bytepos.
2465 2013-01-12 Paul Eggert <eggert@cs.ucla.edu>
2467 Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415).
2468 * editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]:
2469 Clear tzvalbuf_in_environ if this workaround is in effect.
2470 Problem and fix reported by Kazuhiro Ito.
2472 2013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
2474 * insdel.c (Fcombine_after_change_execute, syms_of_insdel):
2475 Fix ambiguous doc string cross-reference(s).
2477 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
2478 doc string cross-reference(s).
2480 * window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
2481 string cross-reference(s).
2483 2013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
2485 Avoid unnecessary byte position calculation for the gap movement.
2486 Since all users of move_gap do CHAR_TO_BYTE for other purposes
2487 anyway, all of them should use move_gap_both instead.
2488 * lisp.h (move_gap): Remove prototype.
2489 * insdel.c (move_gap): Remove.
2490 (move_gap_both): Add eassert.
2491 * editfns.c (Ftranspose_regions): Tweak to use move_gap_both.
2492 * xml.c (parse_region): Likewise.
2494 2013-01-11 Paul Eggert <eggert@cs.ucla.edu>
2496 emacsclient -t should not suspend Emacs server (Bug#13387)
2497 * lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
2499 * term.c (init_tty): Use them instead of rolling our own code.
2500 * sysdep.c (tcsetpgrp_without_stopping): Likewise. Here, this
2501 switches from 'signal' to 'pthread_sigmask', which is safer in
2502 multithreaded applications.
2503 * term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
2504 which has already arranged for that.
2505 (dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
2506 This is the main part of the bug fix.
2508 2013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> (tiny change)
2510 * gtkutil.c (xg_initialize): Add ifdef HAVE_FREETYPE around
2511 x_last_font_name (Bug#13403).
2513 2013-01-10 Dmitry Antipov <dmantipov@yandex.ru>
2515 Omit buffer_slot_type_mismatch and use generic predicates to enforce
2516 the type of per-buffer values where appropriate.
2517 * lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
2518 predicate, which is how it's really used now. Adjust comment.
2519 * buffer.h (buffer_slot_type_mismatch): Remove prototype.
2520 * buffer.c (buffer_slot_type_mismatch): Remove.
2521 (DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
2522 predicate. Adjust comment.
2523 (syms_of_buffer): Use Qsymbolp for major-mode. Use Qintegerp for
2524 fill-column, left-margin, tab-width, buffer-saved-size,
2525 left-margin-width, right-margin-width, left-fringe-width,
2526 right-fringe-width, scroll-bar-width and buffer-display-count.
2527 Use Qstringp for default-directory, buffer-file-name,
2528 buffer-file-truename and buffer-auto-save-file-name. Use Qfloatp for
2529 scroll-up-aggressively and scroll-down-aggressively. Use Qnumberp for
2531 * data.c (store_symval_forwarding): Adjust to call the predicate.
2533 2013-01-09 Juanma Barranquero <lekktu@gmail.com>
2535 * w32.c (get_name_and_id, acl_set_file):
2536 * w32term.c (w32fullscreen_hook): Remove unused local variables.
2538 2013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
2540 * lisp.h (make_gap_1): New prototype.
2541 * buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
2543 * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
2545 (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code.
2546 * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. Adjust comment.
2547 (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment.
2548 (make_gap_1): New function to adjust the gap of any buffer.
2549 * coding.c (coding_alloc_by_making_gap): Use it.
2550 * buffer.c (compact_buffer): Likewise. Use BUF_Z_BYTE, BUF_GAP_SIZE,
2551 GAP_BYTES_DFL and GAP_BYTES_MIN. Adjust comment.
2553 2013-01-08 Juri Linkov <juri@jurta.org>
2555 * xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
2556 of (supports :underline (:style wave)). (Bug#13000)
2558 2013-01-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
2560 * undo.c (Fprimitive_undo): Move to simple.el.
2561 (syms_of_undo): Remove declarations for Sprimitive_undo.
2563 2013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
2565 * keyboard.c (echo_add_key): Rename from echo_add_char.
2567 2013-01-06 Chong Yidong <cyd@gnu.org>
2569 * keyboard.c (echo_add_char): New function, factored out from
2570 echo_char. Don't add a space if the previous echo string was
2572 (echo_char): Use it.
2573 (read_key_sequence): When echoing mock input, ensure that the
2574 trailing dash is properly added.
2576 2013-01-05 Eli Zaretskii <eliz@gnu.org>
2578 * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead
2579 of a non-portable "t" to print ptrdiff_t values. Allow up to 9
2580 digits for buffer positions, before misalignment starts.
2581 Display "0" for integer "object" field.
2582 (dump_glyph_row): Adapt the header line to changes in dump_glyph.
2583 Display the newline glyph more unambiguously.
2585 2013-01-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2587 * nsterm.m (ns_draw_underwave):
2588 * w32term.c (w32_draw_underwave):
2589 * xterm.c (x_draw_underwave): Make underwave look more triangular
2590 and also degrade gracefully for small fonts. (Bug#13000)
2592 * nsterm.m (ns_draw_text_decoration):
2593 * w32term.c (x_draw_glyph_string):
2594 * xterm.c (x_draw_glyph_string): Don't use previous underline
2595 thickness and position if previous underline type is underwave.
2597 2013-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
2599 * fileio.c (Ffile_acl): Undocument return format.
2601 2013-01-02 Glenn Morris <rgm@gnu.org>
2603 * keymap.c (Fkey_description): Doc fix. (Bug#13323)
2605 2013-01-02 Paul Eggert <eggert@cs.ucla.edu>
2608 * dired.c (file_name_completion):
2609 * doc.c (get_doc_string):
2610 * floatfns.c (round2):
2611 * font.c (font_score, font_delete_unmatched):
2612 * fringe.c (compute_fringe_widths):
2613 * lread.c (read_list):
2614 * minibuf.c (Ftry_completion):
2615 * term.c (tty_ins_del_lines):
2616 * xterm.c (x_draw_image_foreground, x_draw_image_foreground_1):
2617 Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).
2619 2012-12-31 Eli Zaretskii <eliz@gnu.org>
2621 * w32.c (unsetenv): Set up the string passed to _putenv
2623 See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00863.html
2624 for the bug this caused.
2626 2012-12-30 Paul Eggert <eggert@cs.ucla.edu>
2628 * coding.c (Qmac): Now static.
2630 2012-12-30 Jan Djärv <jan.h.d@swipnet.se>
2632 * gtkutil.c (TOOLBAR_TOP_WIDGET): New macro.
2633 (xg_pack_tool_bar): Use TOOLBAR_TOP_WIDGET, condition out use of
2634 handlebox_widget. Set toolbar_in_hbox to false/true, set
2635 toolbar_is_packed to true.
2636 (xg_update_tool_bar_sizes): Use widget returned by TOOLBAR_TOP_WIDGET.
2637 (update_frame_tool_bar): Check toolbar_is_packed for packing.
2638 Show all on TOOLBAR_TOP_WIDGET.
2639 (free_frame_tool_bar): Check toolbar_is_packed. Use widget returned
2640 by TOOLBAR_TOP_WIDGET.
2641 (xg_change_toolbar_position): Use widget returned by TOOLBAR_TOP_WIDGET.
2642 Check toolbar_is_packed.
2643 (xg_have_tear_offs, tearoff_remove, tearoff_activate): Condition on
2644 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2645 (xg_have_tear_offs): When ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW, return
2647 (create_menus): Create tearoff only if HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2648 (xg_update_menubar): Update title only if
2649 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2650 (xg_update_submenu): Skip tearoff only if
2651 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2652 (xg_initialize): Initialize xg_detached_menus only if
2653 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
2655 * xterm.h (struct x_output): Surround handlebox_widget with
2656 #ifdef HAVE_GTK_HANDLE_BOX_NEW. toolbar_is_packed is new,
2657 toolbar_in_hbox is bool.
2659 2012-12-30 Andreas Schwab <schwab@linux-m68k.org>
2661 * src/Makefile.in (TEMACS_LDFLAGS2): Remove.
2662 (LIBS_GNUSTEP): Define.
2663 (LIBES): Add $(LIBS_GNUSTEP).
2664 (temacs$(EXEEXT)): Use $(LDFLAGS) instead of $(TEMACS_LDFLAGS2).
2666 2012-12-30 Eli Zaretskii <eliz@gnu.org>
2668 * xdisp.c (set_cursor_from_row): Don't confuse a truncation or
2669 continuation glyph on a TTY with an indication of an empty line.
2672 2012-12-29 Eli Zaretskii <eliz@gnu.org>
2674 * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if
2675 file's SELinux context or ACLs successfully set, nil otherwise.
2677 (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails.
2679 * w32proc.c (reader_thread): Avoid passing NULL handles to
2680 SetEvent and WaitForSingleObject.
2682 2012-12-28 Paul Eggert <eggert@cs.ucla.edu>
2684 Port EXTERNALLY_VISIBLE to Clang 3.2.
2685 * conf_post.h (__has_attribute): New macro.
2686 (EXTERNALLY_VISIBLE): Use it. This ports to Clang 3.2.
2688 2012-12-27 Glenn Morris <rgm@gnu.org>
2690 * cygw32.c (Fcygwin_convert_file_name_to_windows)
2691 (Fcygwin_convert_file_name_from_windows): Doc fixes.
2693 2012-12-27 Eli Zaretskii <eliz@gnu.org>
2695 * fileio.c (file_name_as_directory, directory_file_name):
2696 Accept an additional argument MULTIBYTE to indicate whether the input C
2697 came from a multibyte or a unibyte Lisp string; all callers
2698 adjusted. Don't assume the input string is always multibyte.
2700 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
2701 don't ENCODE_FILE them, and return a unibyte string if the input
2703 (Fexpand_file_name): Don't mix unibyte with multibyte strings, and
2704 don't assume the input strings will always be multibyte. If the
2705 input strings are multibyte, decode strings obtained from C
2708 2012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2710 * lisp.h (toplevel): Add two notices to the comment about
2711 defining a new Lisp data type.
2712 * print.c (print_object): If Lisp_Save_Value object's pointer
2713 is the address of a memory area containing Lisp_Objects, try
2715 * alloc.c (valid_lisp_object_p): Adjust comment.
2717 2012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
2719 * keyboard.c (record_asynch_buffer_change): Initialize an event
2720 only if it's really needed.
2721 * frame.h (enum output_method): Remove output_mac member since
2722 it's a leftover from the deleted code.
2723 * frame.c (Fframep): Adjust user here ...
2724 * terminal.c (Fterminal_live_p): ... and here.
2725 * coding.c (Qmac): Now here because it's only used to denote
2726 end-of-line encoding type.
2727 (syms_of_coding): DEFSYM it.
2728 * frame.h (Qmac): Remove duplicated declaration.
2730 2012-12-26 Paul Eggert <eggert@cs.ucla.edu>
2732 * window.c (select_window_1): Now static, since it's used only here.
2734 2012-12-25 Eli Zaretskii <eliz@gnu.org>
2736 * window.c (window_body_cols): Subtract display margins from the
2737 window body width on TTYs as well. See
2738 http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
2739 for the original report.
2741 2012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
2743 * xdisp.c (redisplay_window): Remove inner local variable
2744 because the outer shadowed one has the same meaning.
2745 * xterm.h (struct x_output): Remove toolbar_detached member since it's
2747 * gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
2748 (xg_create_tool_bar): Adjust users.
2750 2012-12-24 Dmitry Antipov <dmantipov@yandex.ru>
2752 * buffer.h (BUF_COMPACT): New macro to follow the common style.
2753 * buffer.c (Fget_buffer_create): Use it to set compact field of
2754 struct buffer_text to avoid accessing an uninitialized value
2755 when compact_buffer is called for the first time.
2756 (compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
2757 (Fset_buffer_modified_p): Use buffer_window_count to check
2758 whether the buffer is displayed in some window.
2759 * xdisp.c (message_dolog): Likewise.
2761 2012-12-23 Eli Zaretskii <eliz@gnu.org>
2763 * w32.c (acl_set_file): If setting the file security descriptor
2764 fails, and the new DACL is identical to the existing one, silently
2765 return success. This fixes problems for users backing up their
2766 own files without having the necessary privileges for setting
2767 security descriptors.
2769 * w32proc.c (reader_thread): Do not index fd_info[] with negative
2771 (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
2772 after WaitForSingleObject returns normally. This expedites reader
2773 thread shutdown when delete_child triggers it.
2774 (reap_subprocess): More accurate commentary for why we call
2775 delete_child only when cp->fd is negative.
2777 * w32.c (sys_close): Do not call delete_child on a subprocess
2778 whose handle is not yet closed. Instead, set its file descriptor
2779 to a negative value, so that reap_subprocess will call
2780 delete_child on that subprocess when its SIGCHLD arrives.
2781 This avoids closing handles used for communications between sys_select
2782 and reader_thread, which doesn't give sys_select a chance to
2783 notice that the process exited and invoke the SIGCHLD handler for
2786 2012-12-23 Jan Djärv <jan.h.d@swipnet.se>
2788 * nsfns.m (Fns_do_applescript): Run event loop until script has
2789 been executed (Bug#12969).
2790 (ns_run_ascript): Chech as_script for nil, set to nil after
2793 2012-12-22 Martin Rudalics <rudalics@gmx.at>
2795 * window.c (Fselect_window): Reword doc-string (Bug#13248).
2797 2012-12-22 Eli Zaretskii <eliz@gnu.org>
2799 * w32term.c (w32fullscreen_hook): New function.
2800 (w32_create_terminal): Plug it into the terminal's fullscreen_hook.
2802 2012-12-21 Eli Zaretskii <eliz@gnu.org>
2804 * fileio.c (Finsert_file_contents): Doc fix.
2806 * w32proc.c (new_child, delete_child, find_child_pid): For a
2807 subprocess, consider its slot being in use as long as its process
2808 handle (procinfo.hProcess) is not NULL. This avoids reusing the
2809 slot when a new process is started immediately after killing
2810 another one, without waiting enough time for the first process to
2811 be reaped and resources allocated for it be orderly freed.
2813 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2815 2012-12-21 Chong Yidong <cyd@gnu.org>
2817 * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
2819 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
2821 2012-12-21 Eli Zaretskii <eliz@gnu.org>
2823 * w32.c (get_name_and_id): Always pass NULL as the first argument
2824 of lookup_account_sid. Avoids crashes with UNC file names that
2825 refer to DFS domains, not to specific machine names. (Bug#12621)
2826 Remove now unused argument FNAME; all callers changed.
2827 (get_file_owner_and_group): Remove now unused argument FNAME; all
2830 2012-12-21 Chong Yidong <cyd@gnu.org>
2832 * editfns.c (Finsert_char): Since read-char-by-name now signals an
2833 error for invalid chars, don't check for a nil return value.
2835 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
2837 Avoid calls to CHAR_TO_BYTE if byte position is known.
2838 * editfns.c (make_buffer_string_both): Use move_gap_both.
2839 (Fbuffer_string): Use make_buffer_string_both.
2840 * marker.c (buf_charpos_to_bytepos): Convert to eassert.
2842 (buf_bytepos_to_charpos): Likewise.
2843 (charpos_to_bytepos): Remove.
2844 * fileio.c (Finsert_file_contents): Use move_gap_both.
2845 * search.c (Freplace_match): Likewise.
2846 * process.c (process_send_region): Likewise. Use convenient
2847 names for byte positions.
2848 * lisp.h (charpos_to_bytepos): Remove prototype.
2849 * indent.c (scan_for_column): Use CHAR_TO_BYTE.
2850 * insdel.c (move_gap): Likewise.
2852 2012-12-20 Paul Eggert <eggert@cs.ucla.edu>
2854 * xdisp.c (redisplay_internal): Remove now-unused local.
2856 2012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
2858 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
2859 (redisplay_internal): Don't bother selecting the frame to get the
2860 proper value of frame-local variables (bug#13225).
2862 2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
2864 * textprop.c (set_text_properties_1): Do not allow NULL interval.
2865 Rename 4th argument since it may be buffer or string. Adjust comment.
2866 * intervals.c (graft_intervals_info_buffer): Find an interval here.
2868 2012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
2870 * coding.c (Fdetect_coding_region): Do not check start and end with
2871 CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
2872 (code_convert_region): Likewise.
2874 2012-12-18 Eli Zaretskii <eliz@gnu.org>
2876 * w32.c (acl_get_file, acl_set_file): Run the file name through
2877 map_w32_filename, and resolve any symlinks in the file name, like
2879 (acl_set_file): Call revert_to_self, if any privileges were
2882 2012-12-17 Juanma Barranquero <lekktu@gmail.com>
2884 * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
2885 ($(BLD)/w32.$(O)): Update dependencies.
2887 2012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
2889 * xdisp.c (select_frame_for_redisplay): Use select_window_1 to
2890 propagate redisplay's scrolling (if any) to the right window.
2891 (redisplay_internal): Use ensure_selected_frame.
2892 (display_mode_lines): Complete last fix.
2893 * window.c (select_window_1): New func, extracted from select_window.
2894 (select_window): Use it.
2895 * window.h (select_window_1): Declare.
2897 2012-12-17 Eli Zaretskii <eliz@gnu.org>
2899 Emulate Posix ACL APIs on MS-Windows.
2900 * w32.c: Include sddl.h and sys/acl.h.
2901 (SDDL_REVISION_1): Define if not already defined.
2902 (g_b_init_get_security_descriptor_dacl)
2903 (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
2904 (g_b_init_is_valid_security_descriptor)
2905 (g_b_init_set_file_security): New static flags.
2906 (globals_of_w32): Initialize them to zero.
2907 (SetFileSecurity_Name): New string constant.
2908 (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
2909 (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
2910 (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
2911 (IsValidSecurityDescriptor_Proc): New typedefs.
2912 (get_file_security, get_security_descriptor_owner)
2913 (get_security_descriptor_group): Set errno to ENOTSUP.
2914 (set_file_security, get_security_descriptor_dacl)
2915 (is_valid_security_descriptor, convert_sd_to_sddl)
2916 (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
2917 (acl_free, acl_get_file, acl_set_file): New functions.
2919 * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
2921 2012-12-17 Paul Eggert <eggert@cs.ucla.edu>
2923 Don't reraise SIGCHLD, as that can now lose (Bug#13192).
2924 With the 2012-12-03 fix for Bug#12980 in place, an old workaround
2925 for some of that bug's symptoms can now cause Emacs to abort.
2926 Remove the workaround.
2927 * process.c (wait_reading_process_output): Don't reraise SIGCHLD.
2928 The bug that caused SIGCHLD to get lost has been fixed, and the
2929 workaround for it can now cause Emacs to abort.
2931 2012-12-16 Paul Eggert <eggert@cs.ucla.edu>
2933 * sysdep.c (emacs_abort): Bump backtrace size to 40.
2934 Companion to the 2012-09-30 patch. Suggested by Eli Zaretskii in
2935 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
2937 2012-12-16 Romain Francoise <romain@orebokech.com>
2939 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
2940 (Fcopy_file): Change last arg to `preserve_extended_attributes'
2941 and copy ACL entries of file in addition to SELinux context if set.
2942 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
2944 * Makefile.in (LIBACL_LIBS): New macro.
2947 2012-12-15 Paul Eggert <eggert@cs.ucla.edu>
2949 * fileio.c (internal_delete_file): Use bool for boolean.
2951 2012-12-15 Eli Zaretskii <eliz@gnu.org>
2953 Fix bug #13079 on MS-Windows with temp files not being deleted.
2954 * w32.h (_child_process): New members input_file and
2956 (register_child): First argument is now pid_t.
2957 (record_infile, record_pending_deletion): New prototypes.
2959 * w32proc.c (new_child): Initialize input_file and
2960 pending_deletion members of the child.
2961 (delete_child): Delete the child's temporary input file, if any,
2962 that is pending deletion.
2963 (register_child): First argument is now pid_t.
2964 (record_infile, record_pending_deletion): New functions.
2965 (reap_subprocess): Fix a typo in DebPrint string.
2966 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
2968 * fileio.c (internal_delete_file): Return an int again: non-zero
2969 if delete-file succeeds, zero otherwise.
2971 * lisp.h (internal_delete_file): Adjust prototype.
2973 * callproc.c (Fcall_process): Don't overwrite infile with result
2975 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
2976 asynchronous subprocess, record the name of the input file name,
2978 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
2979 delete the file, record it as pending deletion when the subprocess
2982 2012-12-14 Eli Zaretskii <eliz@gnu.org>
2984 * editfns.c [HAVE_PWD_H]: Include grp.h.
2986 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
2988 2012-12-14 Paul Eggert <eggert@cs.ucla.edu>
2990 Fix permissions bugs with setgid directories etc. (Bug#13125)
2991 * dired.c (Ffile_attributes): Return t as the 9th attribute,
2992 to mark it as a placeholder. The old value was often wrong.
2993 The only user of this attribute has been changed to use
2994 file-ownership-preserved-p instead, with its new group arg.
2995 * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
2997 2012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
2999 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
3000 Keep selected_window and selected_frame in sync.
3002 2012-12-14 Eli Zaretskii <eliz@gnu.org>
3004 * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
3005 try to get accurate owner and group information from NT file
3006 security APIs. This is to make most callers of 'stat' and
3007 'lstat', which don't need that information, much faster.
3009 * dired.c (Ffile_attributes) [WINDOWSNT]:
3010 Set w32_stat_get_owner_group to a non-zero value, to request accurate
3011 owner and group information from 'lstat'.
3013 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3015 * fileio.c (Finsert_file_contents): Don't put tail into head area,
3016 as that confuses set-auto-coding, so insist on the head-read
3017 returning the full 1024 bytes. Let lseek compute the tail offset;
3018 less work for us. Do not ignore I/O errors when reading the tail.
3020 * xdisp.c: Minor style fixes.
3021 (init_iterator): Hoist assignment out of if-expression.
3022 (markpos_of_region): Callers now test for sign, not for -1.
3024 2012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
3026 Minor redisplay optimization when the region length is zero.
3027 * xdisp.c (markpos_of_region): New function.
3028 (init_iterator): Do not highlight the region of zero length.
3029 (redisplay_window): Check whether the region is of non-zero length.
3030 (try_cursor_movement): Allow if the region length is zero.
3031 (try_window_reusing_current_matrix, try_window_id): Likewise.
3033 2012-12-13 Eli Zaretskii <eliz@gnu.org>
3035 * search.c (search_buffer): Check the inverse translations of each
3036 character in pattern when the buffer being searched is unibyte.
3039 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3041 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
3042 files, fixing a regression from 24.2.
3043 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
3045 2012-12-13 Paul Eggert <eggert@cs.ucla.edu>
3047 * fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
3048 fstat shouldn't fail, and if it does fail copy-file should not proceed.
3049 Remove unnecessary S_ISLNK test, as (contra the comments) this
3050 function can't copy symlinks. Improve quality of error message
3051 when attempting to copy files that are neither regular files nor
3054 2012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
3056 * dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
3057 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
3058 * window.c (Frecenter):
3059 * xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
3060 * xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.
3062 2012-12-12 Daniel Colascione <dancol@dancol.org>
3064 * unexcw.c (fixup_executable): Use posix_fallocate to ensure that
3065 the dumped Emacs is not a sparse file, greatly improving Cygwin
3066 "make bootstrap" performance.
3068 2012-12-11 Michael Albinus <michael.albinus@gmx.de>
3070 * inotify.c (inotify_callback): Generate an Emacs event for every
3071 incoming inotify event.
3073 2012-12-11 Eli Zaretskii <eliz@gnu.org>
3075 * xdisp.c (handle_face_prop): Fix logic of computing
3076 it->start_of_box_run_p.
3077 (append_space_for_newline): If the glyph row is R2L, reset the
3078 iterator's end_of_box_run_p flag before prepending the space glyph.
3079 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
3080 iterator's start_of_box_run_p flag before prepending the stretch.
3081 (append_glyph, produce_image_glyph, append_composite_glyph)
3082 (append_stretch_glyph, append_glyphless_glyph): Reverse the
3083 left_box_line_p and right_box_line_p flags of the glyph for R2L
3084 glyph rows. (Bug#13011)
3086 2012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
3088 * buffer.c (Fset_buffer_multibyte): Do not force redisplay
3089 if changed buffer is not shown in a window.
3090 * insdel.c (prepare_to_modify_buffer): Likewise.
3091 * window.c (replace_buffer_in_windows_safely): Do nothing
3092 if buffer is not shown in a window.
3093 (Fforce_window_update): Likewise if string or buffer argument
3096 2012-12-11 Eli Zaretskii <eliz@gnu.org>
3098 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
3099 encoded_file_name, which is what it is.
3101 2012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
3103 Consistently use marker_position and marker_byte_position.
3104 * fringe.c (Ffringe_bitmaps_at_pos):
3105 * indent.c (Fvertical_motion):
3106 * insdel.c (prepare_to_modify_buffer):
3107 * keyboard.c (make_lispy_position):
3108 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
3109 (window_scroll_pixel_based, displayed_window_lines)
3110 (Fset_window_configuration):
3111 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
3112 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
3113 Replace direct access to marker fields with calls
3114 to marker_position and/or marker_byte_position.
3116 2012-12-11 Juanma Barranquero <lekktu@gmail.com>
3118 * makefile.w32-in (SIG2STR_H): New macro.
3119 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
3120 ($(BLD)/w32notify.$(O)): Update dependencies.
3122 2012-12-10 Daniel Colascione <dancol@dancol.org>
3124 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
3125 Windows file notification functionality unless WINDOWSNT.
3127 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
3130 * w32fns.c (cache_system_info): Initialize the global hinst
3131 variable here so various initialization calls DTRT.
3133 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
3134 (hinst): Remove unneeded extern declaration.
3135 (_start): Remove initialization of above variables; remove
3136 initialization of hinst, as cache_system_info now does that.
3138 * emacs.c (main): Call cache_system_info early in startup; we
3139 previously weren't calling it in Cygwin builds.
3141 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
3142 Teach the autoconf build system how to compile a Windows resource file
3143 and link it to Emacs.
3145 2012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
3147 Per-buffer window counters.
3148 * buffer.h (struct buffer): New member window_count.
3149 (buffer_window_count): New function.
3150 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
3151 Initialize window_count.
3152 (Fkill_buffer): Verify window_count for the buffer being killed.
3153 (modify_overlay): Do not force redisplay if buffer is not shown
3155 (init_buffer_once): Initialize window_count for buffer_defaults
3156 and buffer_local_symbols.
3157 * window.h (buffer_shared): Remove declaration.
3158 (wset_buffer): Convert from inline ...
3159 * window.c (wset_buffer): ... to an ordinary function.
3160 (adjust_window_count): New function.
3161 (make_parent_window): Use it.
3162 * xdisp.c (buffer_shared): Remove.
3163 (redisplay_internal, redisplay_window): Adjust users.
3164 (buffer_shared_and_changed): Use per-buffer window counter.
3166 2012-12-10 Eli Zaretskii <eliz@gnu.org>
3168 Support for filesystem notifications on MS-Windows.
3169 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
3170 and this is a TTY frame, signal the caller that keyboard input is
3173 * w32xfns.c (drain_message_queue): Now returns an int: an
3174 indication whether any WM_EMACS_FILENOTIFY messages were found in
3177 * w32inevt.c (handle_file_notifications): New function.
3178 (w32_console_read_socket): Call it to process file notifications.
3180 * w32console.c (initialize_w32_display): Record the main thread ID
3183 * deps.mk (inotify.o): New dependency list.
3185 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
3187 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
3188 (WM_EMACS_END): Bump value by 1.
3189 (notification_buffer_in_use, file_notifications)
3190 (notifications_size, notifications_desc): Declare.
3191 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
3194 * w32term.c (lispy_file_action, queue_notifications): New functions.
3195 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
3196 <Qrenamed_to>: New symbols.
3197 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
3199 * w32notify.c: New file, implements file event notifications for
3202 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
3203 by posting it to the w32_read_socket queue.
3205 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
3207 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
3208 (GLOBAL_SOURCES): Add w32notify.c
3209 ($(BLD)/w32notify.$(O)): New set of dependencies.
3211 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
3213 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
3214 Handle FILE_NOTIFY_EVENT.
3215 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
3216 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
3217 w32notify-handle-event by default.
3219 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
3222 2012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
3224 Support for filesystem notifications on GNU/Linux via inotify.
3225 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
3227 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
3229 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
3230 (syms_of_keyboard): DEFSYM it.
3231 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
3232 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
3233 Qfile_inotify events.
3234 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
3235 special-event-map to inotify-handle-event.
3237 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
3239 * Makefile.in (base_obj): Add inotify.o.
3241 * inotify.c: New file.
3243 2012-12-10 Jan Djärv <jan.h.d@swipnet.se>
3245 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
3247 2012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
3249 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
3250 DWORD_PTR, for compatibility with 64-bit builds.
3252 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
3253 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
3254 (system_process_attributes): Use SIZE_T rather than DWORD, for
3255 compatibility with 64-bit builds.
3257 2012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
3259 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
3261 2012-12-10 Eli Zaretskii <eliz@gnu.org>
3263 * indent.c (Fvertical_motion): If a display string will be
3264 displayed on the left or the right margin, don't consider it as a
3265 factor in cursor positioning. (Bug#13108)
3267 2012-12-10 Martin Rudalics <rudalics@gmx.at>
3269 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
3271 2012-12-10 Paul Eggert <eggert@cs.ucla.edu>
3273 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
3276 2012-12-08 Eli Zaretskii <eliz@gnu.org>
3278 * w32.c (unsetenv): Return 0 if the input string is too long.
3280 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
3282 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
3283 * alloc.c (xputenv): New function.
3284 * dbusbind.c (Fdbus_init_bus):
3286 * xterm.c (x_term_init):
3287 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
3288 * editfns.c (initial_tz): Move static var decl up.
3289 (tzvalbuf_in_environ): New static var.
3290 (init_editfns): Initialize these two static vars.
3291 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
3292 Save old TZ value on stack, if it's small.
3293 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
3294 instead, use xputenv+unsetenv to set and restore TZ.
3295 (environbuf): Remove static var. All uses removed.
3296 (Fset_time_zone_rule): Do not save TZ and environ;
3297 no longer needed here.
3298 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
3299 Move to inside set_time_zone_rule; they don't need file scope any more.
3300 (set_time_zone_rule): Maintain the TZ=value string separately.
3301 (syms_of_editfns): Don't initialize initial_tz;
3302 init_editfns now does it.
3303 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
3304 * lisp.h (xputenv): New decl.
3306 2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
3308 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
3310 2012-12-08 Eli Zaretskii <eliz@gnu.org>
3312 * w32.c (unsetenv, sys_putenv): New functions.
3314 2012-12-08 Chong Yidong <cyd@gnu.org>
3316 * editfns.c (Finsert_char): Make the error message more
3317 informative (Bug#12992).
3319 2012-12-08 Paul Eggert <eggert@cs.ucla.edu>
3321 Simplify get_lim_data.
3322 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
3323 Remove USG and vlimit methods; no longer used these days.
3324 Add #error catchall just in case.
3326 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
3327 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
3328 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
3329 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
3330 (deleted_pid_list, Fdelete_process, create_process)
3331 (record_child_status_change, handle_child_signal, deliver_child_signal)
3332 (init_process_emacs, syms_of_process):
3333 Assume SIGCHLD is defined.
3334 (parse_signal): Remove. All uses removed.
3335 (abbr_to_signal): New static function.
3336 (Fsignal_process): Use it to convert signal names to ints.
3337 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
3338 kill (getpgrp (), ...).
3339 (emacs_sigaction_init): Assume SIGCHLD is defined.
3340 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
3341 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
3342 * syssignal.h (EMACS_KILLPG): Remove.
3343 All uses replaced by 'kill' with a negative pid.
3344 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
3345 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
3347 2012-12-07 Paul Eggert <eggert@cs.ucla.edu>
3349 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
3350 This will cause a production Emacs to dump core instead of
3353 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
3355 * frame.c (make_frame): Do not set window's buffer to t.
3356 * window.c (Fsplit_window_internal): Likewise. Previously it was
3357 used to indicate that the window is being set up. Now we use
3358 set_window_buffer for all new windows, so the condition in ...
3359 (Fset_window_buffer): ... is always true and can be removed.
3361 2012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
3363 Convenient macro to check whether the buffer is hidden.
3364 * buffer.h (BUFFER_HIDDEN_P): New macro.
3365 * frame.c (make_frame): Use it. Adjust comment.
3366 * buffer.c (candidate_buffer): New function.
3367 (Fother_buffer, other_buffer_safely): Use it.
3369 2012-12-06 Eli Zaretskii <eliz@gnu.org>
3371 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
3372 if the child process is still running. Instead, exit the wait
3373 loop and return zero. (Bug#13086)
3375 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
3377 * frame.h (x_char_width, x_char_height): Remove prototypes.
3378 * w32term.h (x_char_width, x_char_height): Likewise.
3379 * xfns.c (x_char_width, x_char_height): Remove.
3380 * w32fns.c (x_char_width, x_char_height): Likewise.
3381 * nsfns.c (x_char_width, x_char_height): Likewise.
3382 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
3384 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
3385 * keyboard.c (command_loop_1): Remove prototype.
3386 (command_loop_2, top_level_1): Add static to match prototype.
3388 2012-12-06 Paul Eggert <eggert@cs.ucla.edu>
3390 Fix a recently-introduced delete-process race condition.
3391 * callproc.c, process.h (record_kill_process):
3392 New function, containing part of the old call_process_kill.
3393 (call_process_kill): Use it.
3394 This does not change call_process_kill's behavior.
3395 * process.c (Fdelete_process): Use record_kill_process to fix a
3396 race condition that could cause Emacs to lose track of a child.
3398 2012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
3400 Avoid code duplication between prev_frame and next_frame.
3401 * frame.c (candidate_frame): New function. Add comment.
3402 (prev_frame, next_frame): Use it. Adjust comment.
3404 2012-12-06 Eli Zaretskii <eliz@gnu.org>
3406 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
3407 fails, signal an error instead of continuing with an empty
3409 Encode expanded temp file pattern before passing it to mkstemp or
3412 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
3413 Encode the file name before passing it to dostounix_filename, in
3414 case it will downcase it (under w32-downcase-file-names).
3417 2012-12-05 Paul Eggert <eggert@cs.ucla.edu>
3419 Minor call-process cleanups.
3420 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
3421 at the same time as other platforms, to simplify analysis.
3422 No need for fd0_volatile since we have synch_process_fd.
3423 Avoid needless emacs_close; arg is always negative.
3425 2012-12-04 Andreas Schwab <schwab@linux-m68k.org>
3427 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
3430 2012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
3432 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
3433 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
3434 and mouse_face_hidden members to a bitfields.
3435 * frame.h (struct frame): Remove set-but-not-used space_width member.
3436 (FRAME_SPACE_WIDTH): Remove.
3437 * nsterm.m, w32term.c, xterm.c: Adjust users.
3438 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
3439 member. Adjust users. Convert term_initted, delete_in_insert_mode,
3440 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
3441 members to a bitfields.
3443 2012-12-03 Paul Eggert <eggert@cs.ucla.edu>
3445 Don't let call-process be a zombie factory (Bug#12980).
3446 Fixing this bug required some cleanup of the signal-handling code.
3447 As a side effect, this change also fixes a longstanding rare race
3448 condition whereby Emacs could mistakenly kill unrelated processes,
3449 and it fixes a bug where a second C-g does not kill a recalcitrant
3450 synchronous process in GNU/Linux and similar platforms.
3451 The patch should also fix the last vestiges of Bug#9488,
3452 a bug which has mostly been fixed on the trunk by other changes.
3453 * callproc.c, process.h (synch_process_alive, synch_process_death)
3454 (synch_process_termsig, sync_process_retcode):
3455 Remove. All uses removed, to simplify analysis and so that
3456 less consing is done inside critical sections.
3457 * callproc.c (call_process_exited): Remove. All uses replaced
3458 with !synch_process_pid.
3459 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
3460 These take the role of what used to be in unwind-protect arg.
3462 (block_child_signal, unblock_child_signal):
3463 New functions, to avoid races that could kill innocent-victim processes.
3464 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
3465 (call_process_kill): Record killed processes as deleted, so that
3466 zombies do not clutter up the system. Do this inside a critical
3467 section, to avoid a race that would allow the clutter.
3468 (call_process_cleanup): Fix code so that the second C-g works again
3469 on common platforms such as GNU/Linux.
3470 (Fcall_process): Create the child process in a critical section,
3471 to fix a race condition. If creating an asynchronous process,
3472 record it as deleted so that zombies do not clutter up the system.
3473 Do unwind-protect for WINDOWSNT too, as that's simpler in the
3474 light of these changes. Omit unnecessary call to emacs_close
3475 before failure, as the unwind-protect code does that.
3476 * callproc.c (call_process_cleanup):
3477 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
3478 * process.c (record_deleted_pid): New function, containing
3479 code refactored out of Fdelete_process.
3480 (Fdelete_process): Use it.
3481 (process_status_retrieved): Remove. All callers changed to use
3482 child_status_change.
3483 (record_child_status_change): Remove, folding its contents into ...
3484 (handle_child_signal): ... this signal handler. Now, this
3485 function is purely a handler for SIGCHLD, and is not called after
3486 a synchronous waitpid returns; the synchronous code is moved to
3487 wait_for_termination. There is no need to worry about reaping
3488 more than one child now.
3489 * sysdep.c (get_child_status, child_status_changed): New functions.
3490 (wait_for_termination): Now takes int * status and bool
3491 interruptible arguments, too. Do not record child status change;
3492 that's now the caller's responsibility. All callers changed.
3493 Reimplement in terms of get_child_status.
3494 (wait_for_termination_1, interruptible_wait_for_termination):
3495 Remove. All callers changed to use wait_for_termination.
3496 * syswait.h: Include <stdbool.h>, for bool.
3497 (record_child_status_change, interruptible_wait_for_termination):
3499 (record_deleted_pid, child_status_changed): New decls.
3500 (wait_for_termination): Adjust to API changes noted above.
3502 * bytecode.c, lisp.h (Qbytecode): Remove.
3503 No longer needed after 2012-11-20 interactive-p changes.
3505 2012-12-03 Eli Zaretskii <eliz@gnu.org>
3507 * xdisp.c (redisplay_window): If the cursor is visible, but inside
3508 the scroll margin, move point outside the margin. (Bug#13055)
3510 2012-12-03 Jan Djärv <jan.h.d@swipnet.se>
3512 * gtkutil.c (my_log_handler): New function.
3513 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
3515 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
3517 * lisp.h (modify_region): Rename to...
3518 (modify_region_1): ...new prototype.
3519 * textprop.c (modify_region): Now static. Adjust users.
3520 * insdel.c (modify_region): Rename to...
3521 (modify_region_1): ...new function to work with current buffer.
3522 Adjust comment and users. Use true and false for booleans.
3524 2012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
3526 * alloc.c (free_save_value): New function.
3527 (safe_alloca_unwind): Use it.
3528 * lisp.h (free_save_value): New prototype.
3529 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
3531 (save_excursion_restore): Adjust to match saved data structure.
3532 Use free_save_value to offload some work from GC. Drop obsolete
3535 2012-12-03 Chong Yidong <cyd@gnu.org>
3537 * fileio.c (Vauto_save_list_file_name): Doc fix.
3539 2012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
3541 * w32fns.c: Remove prototype of atof.
3542 (syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
3544 (file_dialog_callback): Make it UINT_PTR.
3546 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
3549 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
3550 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
3553 2012-12-03 Glenn Morris <rgm@gnu.org>
3555 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
3557 2012-12-02 Paul Eggert <eggert@cs.ucla.edu>
3559 Fix xpalloc confusion after memory is exhausted.
3560 * alloc.c (xpalloc): Comment fix.
3561 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
3562 and signals an error, do not clear charset_table_size, as
3563 charset_table is still valid.
3564 * doprnt.c (evxprintf): Clear *BUF after freeing it.
3566 Use execve to avoid need to munge environ (Bug#13054).
3567 * callproc.c (Fcall_process):
3568 * process.c (create_process):
3569 Don't save and restore environ; no longer needed.
3570 * callproc.c (child_setup):
3571 Use execve, not execvp, to preserve environ.
3573 2012-12-01 Paul Eggert <eggert@cs.ucla.edu>
3575 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
3577 2012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3579 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
3580 display for sliced images (Bug#10500).
3582 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
3584 2012-11-30 Juanma Barranquero <lekktu@gmail.com>
3586 * doc.c (Fdocumentation): Re-add handling of function-documentation,
3587 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
3589 2012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
3591 * xdisp.c (window_outdated): Remove eassert since it hits
3592 some suspicious corner cases (see Bug#13007 and Bug#13012).
3593 (mode_line_update_needed): New function.
3594 (redisplay_internal, redisplay_window): Use it.
3595 (ensure_selected_frame): New function.
3596 (redisplay_internal, unwind_redisplay): Use it.
3597 (redisplay_internal): Move comment about buffer_shared...
3598 (buffer_shared_and_changed): ...near to its real use.
3600 2012-11-29 Paul Eggert <eggert@cs.ucla.edu>
3602 * callproc.c (Fcall_process): Don't misreport vfork failure.
3604 2012-11-28 Paul Eggert <eggert@cs.ucla.edu>
3606 * callproc.c (Fcall_process): Fix vfork portability problems.
3607 Do not assume that fd[0], count, filefd, and save_environ survive
3608 vfork. Fix bug whereby wrong errno value could be reported for
3609 pipe failure. Some minor cleanups, too, as follows. Move buf and
3610 bufsize to the context where they're needed. Change new_argv to
3611 be of type char **, as this is more convenient and avoids casts.
3612 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
3613 Now local constants, not macros.
3615 2012-11-18 Kenichi Handa <handa@gnu.org>
3617 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
3618 for the variable "f".
3620 2012-11-13 Kenichi Handa <handa@gnu.org>
3622 * font.c (font_unparse_xlfd): Exclude special characters from the
3623 generating XLFD name.
3625 2012-11-27 Paul Eggert <eggert@cs.ucla.edu>
3627 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
3628 * dired.c (stat_uname, stat_gname):
3629 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
3631 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
3632 * dired.c (directory_files_internal, file_name_completion):
3633 Assume EAGAIN and EINTR are defined.
3635 * fileio.c (Fcopy_file): Assume EISDIR is defined.
3636 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
3637 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
3638 * lread.c (readbyte_from_file): Assume EINTR is defined.
3639 * process.c (wait_reading_process_output, send_process) [subprocesses]:
3640 Assume EIO and EAGAIN are defined.
3641 * unexcoff.c (write_segment): Assume EFAULT is defined.
3643 2012-11-27 Eli Zaretskii <eliz@gnu.org>
3645 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
3648 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
3649 highlighting on the frame was cleared. Prevents assertion
3650 violations when repeatedly clicking on the "Top" link of the
3651 "bread-crumbs" in Info buffers.
3653 2012-11-25 Paul Eggert <eggert@cs.ucla.edu>
3655 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
3657 2012-11-24 Ken Brown <kbrown@cornell.edu>
3659 * keyboard.c (HAVE_MOUSE):
3660 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
3661 were always defined.
3663 2012-11-24 Eli Zaretskii <eliz@gnu.org>
3665 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
3666 between bpos_covered and bpos_max. This fixes cursor display when
3667 several display strings follow each other.
3669 * .gdbinit (pgx): If the glyph's object is a string, display the
3670 pointer to string data, rather than the value of the string object
3671 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
3673 * indent.c (Fvertical_motion): If the starting position is covered
3674 by a display string, return to one position before that, to avoid
3675 overshooting it inside move_it_to. (Bug#12930)
3677 2012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
3679 * frame.h (struct frame): Remove display_preempted member
3680 since all users are dead long ago.
3681 * nsterm.h (struct x_output): Use the only dummy member.
3682 * w32menu.c (pending_menu_activation): Remove since not
3684 (set_frame_menubar): Adjust user.
3685 * w32term.h (struct x_output): Drop outdated #if 0 code.
3686 (struct w32_output): Use bitfields for explicit_parent,
3687 asked_for_visible and menubar_active members.
3688 Drop unused pending_menu_activation member.
3689 * xterm.h (struct x_output): Drop outdated #if 0 code.
3690 Use bitfields for explicit_parent, asked_for_visible,
3691 has_been_visible and net_wm_state_hidden_seen members.
3693 2012-11-23 Eli Zaretskii <eliz@gnu.org>
3695 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
3696 of a literal "/". (Bug#12955)
3697 (gl-stamp): Invoke fc.exe directly, not through cmd.
3699 2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
3701 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
3702 * dired.c: Assume HAVE_DIRENT_H.
3703 (NAMLEN): Remove, replacing with ...
3704 (dirent_namelen): New function. All uses changed. Use the GNU macro
3705 _D_EXACT_NAMELEN if available, as it's faster than strlen.
3706 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
3707 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
3708 * makefile.w32-in (DIR_H): Remove. All uses replaced with
3710 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
3711 * ndir.h: Rename to ../nt/inc/dirent.h.
3712 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
3713 Do not include <dirent.h>; no longer needed.
3714 * w32.c: Include <dirent.h> rather than "ndir.h".
3716 2012-11-23 Chong Yidong <cyd@gnu.org>
3718 * xftfont.c (xftfont_open): Remove duplicate assignment.
3720 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
3722 * alloc.c (Fgarbage_collect): Unblock input after clearing
3723 gc_in_progress to avoid note_mouse_highlight glitch with GC.
3724 * frame.h (FRAME_MOUSE_UPDATE): New macro.
3725 * msdos.c (IT_frame_up_to_date): Use it here...
3726 * w32term.c (w32_frame_up_to_date): ...here...
3727 * xterm.c (XTframe_up_to_date): ...and here...
3728 * nsterm.m (ns_frame_up_to_date): ...but not here.
3729 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
3731 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
3732 Do not check whether GC is in progress.
3734 2012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
3736 * xdisp.c (window_buffer_changed): New function.
3737 (update_menu_bar, update_tool_bar): Use it to
3738 simplify large 'if' statements.
3739 (redisplay_internal): Generalize commonly used
3740 'tail' and 'frame' local variables.
3742 2012-11-22 Eli Zaretskii <eliz@gnu.org>
3744 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
3745 with Windows system header.
3747 2012-11-21 Paul Eggert <eggert@cs.ucla.edu>
3749 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
3750 * alloc.c: Assume unistd.h exists.
3751 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
3752 * sysdep.c (get_current_dir_name): Assume getcwd exists.
3753 (getwd) [USG]: Remove; no longer needed.
3754 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
3755 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
3756 * w32.h (getcwd): Remove decl.
3758 2012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
3760 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
3761 Make it set selected_window as well.
3762 (update_tool_bar): Use it.
3764 2012-11-21 Ken Brown <kbrown@cornell.edu>
3766 * emacs.c (main): Set the G_SLICE environment variable for all
3767 Cygwin builds, not just GTK builds. See
3768 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
3770 2012-11-21 Eli Zaretskii <eliz@gnu.org>
3772 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
3773 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
3774 Define for the MSVC compiler.
3776 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
3778 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
3779 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
3780 dostounix_filename. Prevents crashes down the road, because
3781 dostounix_filename assumes it gets a unibyte string.
3782 Reported by Michel de Ruiter <michel@sentient.nl>, see
3783 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
3785 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
3787 Conflate Qnil and Qunbound for `symbol-function'.
3788 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
3789 * lread.c (init_obarray): Set `function' fields to Qnil.
3790 * eval.c (Fcommandp): Ignore Qunbound.
3791 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
3792 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
3793 Test NILP rather than Qunbound.
3794 (Ffmakunbound): Set to Qnil.
3795 (Fsymbol_function): Never signal an error.
3796 (Finteractive_form): Ignore Qunbound.
3798 2012-11-20 Paul Eggert <eggert@cs.ucla.edu>
3800 * eval.c (interactive_p): Remove no-longer-used decl.
3802 2012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
3804 * xdisp.c (buffer_shared): Adjust comment.
3805 (buffer_shared_and_changed): New function.
3806 (prepare_menu_bars, redisplay_internal): Use it to
3807 decide whether all windows or frames should be updated.
3808 (window_outdated): New function.
3809 (text_outside_line_unchanged_p, redisplay_window): Use it.
3810 (redisplay_internal): Likewise. Fix indentation.
3812 2012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
3814 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
3815 (syms_of_eval): Remove corresponding defsubr.
3816 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
3818 2012-11-19 Daniel Colascione <dancol@dancol.org>
3820 * w32fns.c (Fx_file_dialog):
3821 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
3822 cygwin_convert_file_name*.
3824 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
3825 Rename cygwin_convert_path* to cygwin_convert_file_name*.
3827 2012-11-18 Paul Eggert <eggert@cs.ucla.edu>
3829 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
3831 2012-11-18 Eli Zaretskii <eliz@gnu.org>
3833 * w32select.c: Include w32common.h before w32term.h, so that
3834 windows.h gets included before w32term.h uses some of its
3835 features, see below.
3837 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
3839 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
3841 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
3843 2012-11-18 Jan Djärv <jan.h.d@swipnet.se>
3845 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
3846 (ns_select): Return at once if events are held (Bug#12834).
3848 2012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
3850 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
3851 Needed following 2012-10-20 change. (Bug#12902)
3853 2012-11-18 Juanma Barranquero <lekktu@gmail.com>
3855 * w32proc.c (waitpid): Remove unused label get_result.
3857 2012-11-17 Juanma Barranquero <lekktu@gmail.com>
3859 * makefile.w32-in (SYSWAIT_H): New macro.
3860 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
3861 ($(BLD)/sysdep.$(O)): Update dependencies.
3863 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
3865 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
3866 * callproc.c (relocate_fd): Assume F_DUPFD.
3867 * emacs.c, term.c (O_RDWR): Remove.
3868 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
3869 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
3870 * nsterm.m: Assume <fcntl.h> exists.
3871 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
3872 (create_pty, Fmake_network_process, server_accept_connection)
3873 (wait_reading_process_output, init_process_emacs):
3875 (wait_reading_process_output): Put in a special case for WINDOWSNT
3876 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
3877 It's not clear this is needed, but it's a more-conservative change.
3878 (create_process): Assume FD_CLOEXEC.
3879 (create_process, create_pty): Assume O_NOCTTY.
3880 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
3881 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
3882 Omit if not DOS_NT, since F_GETFL is not defined there.
3883 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
3884 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
3886 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
3887 lack it, since gnulib guarantees this.
3888 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
3890 2012-11-17 Eli Zaretskii <eliz@gnu.org>
3892 * w32.c (faccessat): Pretend that directories have the execute bit
3893 set. Emacs expects that, e.g., in files.el:cd-absolute.
3895 * w32proc.c (create_child): Don't clip the PID of the child
3896 process to fit into an Emacs integer, as this is no longer a
3898 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
3899 reaping only the process specified by PID argument, if that is
3900 positive. Use PID instead of dead_child to know which process to
3901 reap. Wait for the child to die only if WNOHANG is not in
3903 (sys_select): Don't set dead_child.
3905 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
3906 as it is no longer needed.
3908 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
3910 (record_child_status_change): Remove the setting of
3911 record_at_most_one_child for the !WNOHANG case.
3913 2012-11-17 Paul Eggert <eggert@cs.ucla.edu>
3915 Fix problems in ns port found by static checking.
3916 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
3917 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
3918 not to process group.
3919 (ns_select): Use emacs_write, not write, as that's more robust
3920 in the presence of signals.
3921 (fd_handler:): Check for read errors.
3923 2012-11-16 Glenn Morris <rgm@gnu.org>
3925 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
3927 2012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
3929 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
3931 2012-11-16 Eli Zaretskii <eliz@gnu.org>
3933 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
3934 use the same value of thread handle.
3935 (start_timer_thread): If the timer thread exited (due to error),
3936 clean up by closing the two handles it used. Duplicate the caller
3937 thread's handle here, so it gets duplicated only once, when
3938 launching the timer thread. Set priority of the timer thread, not
3940 (getitimer): Don't duplicate the caller thread's handle here.
3943 2012-11-16 Jan Djärv <jan.h.d@swipnet.se>
3945 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
3948 2012-11-16 Paul Eggert <eggert@cs.ucla.edu>
3950 Remove no-longer-used pty_max_bytes variable.
3951 * process.c (pty_max_bytes): Remove; unused.
3952 (send_process): Do not set it.
3954 2012-11-15 Juanma Barranquero <lekktu@gmail.com>
3956 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
3957 Update dependencies.
3959 2012-11-15 Paul Eggert <eggert@cs.ucla.edu>
3961 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
3962 This follows up on the 2012-09-29 patch that removed indirection
3963 for the 'function' field. Reported by Sergey Vinokurov in
3964 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
3966 2012-11-14 Eli Zaretskii <eliz@gnu.org>
3968 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
3969 different name, as the MS runtime does not have such a function,
3970 and probably never will.) All callers changed. Ignore DIRFD
3971 value if PATH is an absolute file name, to match Posix spec
3972 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
3975 2012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
3977 * xdisp.c (echo_area_display, redisplay_internal):
3978 Omit redundant check whether frame_garbaged is set.
3980 2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
3982 Use faccessat, not access, when checking file permissions (Bug#12632).
3983 This fixes a bug that has been present in Emacs since its creation.
3984 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
3985 which must set some sort of record. (Torek's bug report was against
3986 a predecessor of GNU Emacs, but GNU Emacs happened to have the
3987 same common flaw.) See Torek's Usenet posting
3988 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
3989 Posted: Fri Apr 8 14:18:56 1983.
3990 * Makefile.in (LIB_EACCESS): New macro.
3992 * callproc.c (init_callproc):
3993 * charset.c (init_charset):
3994 * fileio.c (check_existing, check_executable, check_writable)
3996 * lread.c (openp, load_path_check):
3997 * process.c (allocate_pty):
3999 Use effective UID when checking permissions, not real UID.
4000 * callproc.c (init_callproc):
4001 * charset.c (init_charset):
4002 * lread.c (load_path_check, init_lread):
4003 Test whether directories are accessible, not merely whether they exist.
4004 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
4005 * fileio.c (check_existing, check_executable, check_writable)
4007 Use symbolic names instead of integers for the flags, as they're
4009 (check_writable): New arg AMODE. All uses changed.
4010 Set errno on failure.
4011 (Ffile_readable_p): Use faccessat, not stat + open + close.
4012 (Ffile_writable_p): No need to call check_existing + check_writable.
4013 Just call check_writable and then look at errno. This saves a syscall.
4014 dir should never be nil; replace an unnecessary runtime check
4015 with an eassert. When checking the parent directory of a nonexistent
4016 file, check that the directory is searchable as well as writable, as
4017 we can't create files in unsearchable directories.
4018 (file_directory_p): New function, which uses 'stat' on most platforms
4019 but faccessat with D_OK (for efficiency) if WINDOWSNT.
4020 (Ffile_directory_p, Fset_file_times): Use it.
4021 (file_accessible_directory_p): New function, which uses a single
4022 syscall for efficiency.
4023 (Ffile_accessible_directory_p): Use it.
4024 * xrdb.c (file_p): Use file_directory_p.
4025 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
4026 * lread.c (openp): When opening a file, use fstat rather than
4027 stat, as that avoids a permissions race. When not opening a file,
4028 use file_directory_p rather than stat.
4029 (dir_warning): First arg is now a usage string, not a format.
4030 Use errno. All uses changed.
4031 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
4032 that merely introduced a race.
4033 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
4034 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
4035 and similarly for the other O_* flags.
4036 * w32.c (sys_faccessat): Rename from sys_access and switch to
4037 faccessat's API. All uses changed.
4038 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
4039 (magic_db): Rename from magic_file_p.
4040 (magic_db, search_magic_path): Return an XrmDatabase rather than a
4041 char *, so that we don't have to test for file existence
4042 separately from opening the file for reading. This removes a race
4043 fixes a permission-checking problem, and simplifies the code.
4045 (file_p): Remove; no longer needed.
4047 2012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
4049 Omit glyphs initialization at startup.
4050 * dispnew.c (glyphs_initialized_initially_p): Remove.
4051 (adjust_frame_glyphs_initially): Likewise. Adjust users.
4052 (Fredraw_frame): Move actual code from here...
4053 (redraw_frame): ...to here. Add eassert. Adjust comment.
4054 (Fredraw_display): Use redraw_frame.
4055 * xdisp.c (clear_garbaged_frames): Likewise.
4057 2012-11-13 Eli Zaretskii <eliz@gnu.org>
4059 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
4060 passed to pint2str and pint2hrstr to be at most the size of the
4061 frame's decode_mode_spec_buffer. This avoids crashes with very
4062 large values of FIELD_WIDTH argument to decode_mode_spec.
4065 2012-11-13 Paul Eggert <eggert@cs.ucla.edu>
4067 Fix a race with verify-visited-file-modtime (Bug#12863).
4068 Since at least 1991 Emacs has ignored an mtime difference of no
4069 more than one second, but my guess is that this was to work around
4070 file system bugs that were fixed long ago. Since the race is
4071 causing problems now, let's remove that code.
4072 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
4073 whose time stamp is off by no more than a second. Insist that the
4074 file time stamps match exactly.
4076 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
4078 * frame.h (struct frame): Convert external_tool_bar member to
4079 1-bit unsigned bitfield.
4080 * termhooks.h (struct terminal): Remove mouse_moved member since
4081 all users are long dead. Adjust comment on mouse_position_hook.
4083 2012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
4085 Simplify by using FOR_EACH_FRAME here and there.
4086 * frame.c (next_frame, prev_frame, other_visible_frames)
4087 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
4088 * w32term.c (x_window_to_scroll_bar): Likewise.
4089 * window.c (window_list): Likewise.
4090 * xdisp.c (x_consider_frame_title): Likewise.
4091 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
4092 * xfns.c (x_window_to_frame, x_any_window_to_frame)
4093 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
4094 * xmenu.c (menubar_id_to_frame): Likewise.
4095 * xselect.c (frame_for_x_selection): Likewise.
4096 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
4097 (x_window_to_menu_bar): Likewise.
4098 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
4100 2012-11-12 Paul Eggert <eggert@cs.ucla.edu>
4102 * data.c (Qdefalias_fset_function): Now static.
4104 Another tweak to vectorlike_header change.
4105 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
4106 Remove, and replace all uses with ...
4107 (next_in_free_list, set_next_in_free_list):
4108 New functions, which respect C's aliasing rules better.
4110 2012-11-11 Paul Eggert <eggert@cs.ucla.edu>
4112 * window.c (list4i): Rename from 'quad'. All uses changed.
4113 Needed because <sys/types.h> defines 'quad' on Solaris 10.
4115 2012-11-11 Juanma Barranquero <lekktu@gmail.com>
4117 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
4118 warning about mixing declarations and code in ISO C90.
4120 2012-11-10 Martin Rudalics <rudalics@gmx.at>
4122 * window.c (Fsplit_window_internal): Set combination limit of
4123 new parent window to t iff Vwindow_combination_limit is t;
4124 fixing a regression introduced with the change from 2012-09-22.
4125 (Fset_window_combination_limit): Fix doc-string.
4127 2012-11-10 Eli Zaretskii <eliz@gnu.org>
4129 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
4130 amount when the scroll margins are too large. When scrolling
4131 backwards in the buffer, give up if cannot reach point or the
4132 scroll margin within a reasonable number of screen lines.
4133 Fixes point position in window under scroll-up/down-aggressively when
4134 point is positioned many lines beyond the window top/bottom.
4137 * ralloc.c (relinquish): If real_morecore fails to return memory
4138 to the system, don't crash; instead, leave the last heap
4139 unchanged and return. (Bug#12774)
4141 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
4143 * lisp.h (AUTOLOADP): New macro.
4144 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
4145 * data.c (Ffset): Remove special ad-advice-info handling.
4146 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
4148 (Finteractive_form): Simplify.
4149 (Fquo): Don't insist on having at least 2 arguments.
4150 (Qdefalias_fset_function): New var.
4152 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
4154 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
4156 * nsfont.m (Qcondensed, Qexpanded): New variables.
4157 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
4158 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
4160 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
4162 Fix recently introduced crash on MS-Windows (Bug#12839).
4163 * w32term.h (struct scroll_bar): Use convenient header.
4164 (SCROLL_BAR_VEC_SIZE): Remove.
4165 * w32term.c (x_scroll_bar_create): Use VECSIZE.
4167 2012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
4169 Tweak last vectorlike_header change.
4170 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
4171 vectorlike object on the free list. This is introduced to avoid
4172 some (but not all) pointer casting and aliasing problems, see
4173 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
4174 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
4176 (xvectype, xvecsize): Use them to examine Lisp_Object values.
4178 2012-11-09 Jan Djärv <jan.h.d@swipnet.se>
4180 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
4181 been removed, so remove them here also.
4183 2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
4185 * doc.c (Fdocumentation): Handle new property
4186 dynamic-docstring-function to replace the old ad-advice-info.
4188 2012-11-09 Paul Eggert <eggert@cs.ucla.edu>
4190 * fns.c (Qeql, hashtest_eq): Now static.
4192 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4194 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
4195 * fns.c (hashfn_eq, hashfn_eql, sxhash):
4196 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
4197 * buffer.c (compare_overlays): Use XLI rather than XHASH.
4199 2012-11-08 Paul Eggert <eggert@cs.ucla.edu>
4201 Use same hash function for hashfn_profiler as for hash_string etc.
4202 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
4203 * lisp.h (sxhash_combine): New inline function, with the contents
4204 of the old SXHASH_COMBINE.
4205 * profiler.c (hashfn_profiler): Use it, instead of having a
4206 special hash function containing a comparison that always yields 1.
4208 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4210 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
4211 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
4212 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
4215 2012-11-08 Jan Djärv <jan.h.d@swipnet.se>
4217 * image.c (xpm_make_color_table_h): Fix compiler error because
4218 make_hash_table changed.
4220 2012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
4222 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
4224 2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
4226 Use ad-hoc comparison function for the profiler's hash-tables.
4227 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
4228 (make_log): Use them.
4229 (handle_profiler_signal): Don't inhibit quit any longer since we don't
4230 call Fequal any more.
4231 (Ffunction_equal): New function.
4232 (cmpfn_profiler, hashfn_profiler): New functions.
4233 (syms_of_profiler): Initialize them.
4234 * lisp.h (struct hash_table_test): New struct.
4235 (struct Lisp_Hash_Table): Use it.
4236 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
4237 * fns.c (make_hash_table): Take a struct to describe the test.
4238 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
4239 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
4240 (hash_lookup, hash_remove_from_table): Move assertion checking of
4241 hashfn result here. Check hash-equality before calling cmpfn.
4242 (Fmake_hash_table): Adjust call to make_hash_table.
4243 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
4244 (syms_of_fns): Initialize them.
4245 * emacs.c (main): Move syms_of_fns earlier.
4246 * xterm.c (syms_of_xterm):
4247 * category.c (hash_get_category_set): Adjust call to make_hash_table.
4248 * print.c (print_object): Adjust to new hash-table struct.
4249 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
4251 2012-11-08 Eli Zaretskii <eliz@gnu.org>
4253 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
4254 value of w32-scroll-lock-modifier is neither nil nor one of the
4255 known key modifiers. (Bug#12806)
4257 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
4259 Shrink struct vectorlike_header to the only size field.
4260 * lisp.h (enum pvec_type): Avoid explicit enum member values.
4262 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
4263 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
4264 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
4265 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
4266 information from the vector header. Adjust comment.
4267 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
4268 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
4270 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
4271 (struct vectorlike_header): Remove next member. Adjust comment.
4272 (struct Lisp_Subr): Add convenient header. Adjust comment.
4273 (allocate_pseudovector): Adjust prototype.
4274 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
4275 (sweep_string, lisp_malloc): Remove useless prototypes.
4276 (enum mem_type): Adjust comment.
4277 (NEXT_IN_FREE_LIST): New macro.
4278 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
4279 (Fmake_bool_vector): Likewise.
4280 (struct large_vector): New type to represent allocation unit for
4281 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
4282 (large_vectors): Change type to struct large_vector.
4283 (allocate_vector_from_block): Simplify.
4284 (PSEUDOVECTOR_NBYTES): Replace with...
4285 (vector_nbytes): ...new function. Adjust users.
4286 (sweep_vectors): Adjust processing of large vectors.
4287 (allocate_vectorlike): Likewise.
4288 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
4289 Add easserts. Adjust XSETPVECTYPESIZE usage.
4290 (allocate_buffer): Use BUFFER_PVEC_INIT.
4291 (live_vector_p): Adjust to match large vector.
4292 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
4293 * buffer.h (struct buffer): Add next member.
4294 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
4296 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
4297 * fns.c (internal_equal): Adjust to match enum pvec_type change.
4298 (copy_hash_table): Adjust to match vector header change.
4299 * lread.c (defsubr): Use XSETPVECTYPE.
4300 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
4301 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
4302 (xvecsize): New command.
4304 2012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
4306 * keyboard.c (event_to_kboard): Do not dereference
4307 frame_or_window field of SELECTION_REQUEST_EVENT
4308 and SELECTION_CLEAR_EVENT events (Bug#12814).
4309 * xterm.h (struct selection_input_event): Adjust comment.
4311 2012-11-07 Eli Zaretskii <eliz@gnu.org>
4313 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
4314 such as Scroll Lock, if the respective keys are treated as
4315 function keys, not as modifiers. This avoids destroying non-ASCII
4316 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
4318 2012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
4320 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
4322 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
4324 Restore some duplicate definitions (Bug#12814).
4325 This undoes part of the 2012-11-03 changes. Some people build
4326 with plain -g rather than with -g3, and they need the duplicate
4327 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
4328 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
4329 Define as macros, as well as as enums or as constants.
4331 2012-11-06 Jan Djärv <jan.h.d@swipnet.se>
4333 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
4334 to keypad keys (Bug#12816).
4336 2012-11-06 Paul Eggert <eggert@cs.ucla.edu>
4338 Minor adjustments of recently-changed frame functions.
4339 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
4340 known to be a frame (we're in the FRAMEP branch).
4341 * lisp.h (Qframep): Remove decl. frame.h declares this.
4342 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
4343 since they're meant for Lisp fixnum values.
4345 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4347 * window.c (Fwindow_combination_limit): Revert to the only
4348 required argument and adjust docstring as suggested in
4349 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
4350 by Martin Rudalics <rudalics@gmx.at>.
4352 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4354 Widely used frame validity and checking functions.
4355 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
4356 * frame.c (decode_live_frame, decode_any_frame): New functions.
4357 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
4358 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
4359 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
4360 (Fframe_pointer_visible_p): Use decode_any_frame.
4361 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
4362 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
4363 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
4364 (Fframe_focus): Likewise. Allow zero number of arguments.
4366 (frame_buffer_list, frame_buffer_predicate): Remove.
4367 * lisp.h (frame_buffer_predicate): Remove prototype.
4368 * buffer.c (Fother_buffer): Use decode_any_frame.
4369 * xdisp.c (Ftool_bar_lines_needed): Likewise.
4370 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
4371 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
4372 (Fclose_font, Ffont_info): Use decode_live_frame.
4373 * fontset.c (check_fontset_name): Likewise.
4374 * terminal.c (Fframe_terminal): Likewise.
4375 * w32fns.c (check_x_frame): Likewise.
4376 * window.c (Fminibuffer_window, Fwindow_at)
4377 (Fcurrent_window_configuration): Likewise.
4378 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
4379 Likewise. Allow zero number of arguments. Adjust docstring.
4380 * dispnew.c (Fredraw_frame): Likewise.
4381 * xfaces.c (frame_or_selected_frame): Remove.
4382 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
4383 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
4384 (Fframe_face_alist): Use decode_live_frame.
4385 * xfns.c (check_x_frame): Likewise.
4387 2012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
4389 * window.c (quad): New function.
4390 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
4391 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
4392 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
4393 (Fwindow_line_height): Use it.
4394 (Fwindow_fringes): Use list3.
4395 (Fwindow_scroll_bars): Use list4.
4396 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
4397 (Fwindow_combination_limit): Allow zero number of arguments.
4399 2012-11-05 Eli Zaretskii <eliz@gnu.org>
4401 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
4403 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
4404 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
4405 file descriptor 2 for standard error. (Bug#12805)
4407 2012-11-05 Chong Yidong <cyd@gnu.org>
4409 * process.c (wait_reading_process_output): Revert previous change.
4411 2012-11-05 Paul Eggert <eggert@cs.ucla.edu>
4413 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
4414 This removes code that has been obsolete since around 1990.
4415 * callproc.c (Fcall_process):
4417 * process.c (create_process):
4418 * term.c (dissociate_if_controlling_tty):
4419 Assume setsid exists.
4420 * callproc.c (child_setup): Assume setpgid exists and behaves as
4421 per POSIX.1-1988 or later.
4422 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
4423 * emacs.c (shut_down_emacs):
4424 * sysdep.c (sys_suspend, init_foreground_group):
4425 Assume getpgrp behaves as per POSIX.1-1998 or later.
4426 * msdos.c (setpgrp): Remove.
4427 (tcgetpgrp, setpgid, setsid): New functions.
4428 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
4429 * term.c (no_controlling_tty): Remove; unused.
4430 * w32proc.c (setpgrp): Remove.
4431 (setsid, tcgetpgrp): New functions.
4433 Simplify by assuming __fpending.
4434 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
4435 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
4436 Do not assume that __fpending's result fits in int.
4438 2012-11-04 Paul Eggert <eggert@cs.ucla.edu>
4440 Remove EMACS_OUTQSIZE+sleep hack.
4441 * dispnew.c (update_frame_1): Remove hack for terminals slower
4442 than 2400 bps, which throttled Emacs by having it sleep.
4443 This code hasn't worked since at least 2007, when the multi-tty stuff
4444 was added, and anyway those old terminals are long dead.
4445 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
4446 without the dispnew.c change, as dispnew.c doesn't include systty.h.
4448 Fix data-loss with --version (Bug#9574).
4449 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
4450 as we can't assume that emacs_strerror is initialized, and strerror
4451 is good enough here.
4452 (main): Invoke atexit earlier, to catch earlier instances of
4453 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
4455 2012-11-04 Michael Marchionna <tralfaz@pacbell.net>
4457 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
4458 (keyDown): Remap keypad keys to X11 virtual key codes.
4460 2012-11-03 Paul Eggert <eggert@cs.ucla.edu>
4462 Fix data-loss with --batch (Bug#9574).
4463 * emacs.c: Include <close-stream.h>.
4464 (close_output_streams): New function.
4465 (main): Pass it to atexit, so that Emacs closes stdout and stderr
4466 and handles errors appropriately.
4467 (Fkill_emacs): Don't worry about flushing, as close_output_stream
4470 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
4471 The symptom is a diagnostic "GLib-WARNING **: In call to
4472 g_spawn_sync(), exit status of a child process was requested but
4473 SIGCHLD action was set to SIG_IGN and ECHILD was received by
4474 waitpid(), so exit status can't be returned." The diagnostic
4475 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
4476 The real bug is a race condition between Emacs and glib: Emacs
4477 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
4478 so that glib can't find it. Work around the bug by invoking
4479 waitpid only on subprocesses that Emacs itself creates.
4480 * process.c (create_process, record_child_status_change):
4481 Don't use special value -1 in pid field, as the caller now must
4482 know the pid rather than having the callee infer it.
4483 The inference was sometimes incorrect anyway, due to another race.
4484 (create_process): Set new 'alive' member if child is created.
4485 (process_status_retrieved): New function.
4486 (record_child_status_change): Use it.
4487 Accept negative 1st argument, which means to wait for the
4488 processes that Emacs already knows about. Move special-case code
4489 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
4490 processes that have already been waited for, by testing and
4491 clearing new 'alive' member.
4492 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
4493 now does this internally.
4494 (handle_child_signal): Let record_child_status_change do all
4495 the work, since we do not want to reap all exited child processes,
4496 only the child processes that Emacs itself created.
4497 * process.h (Lisp_Process): New boolean member 'alive'.
4499 Omit duplicate definitions no longer needed with gcc -g3.
4500 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
4501 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
4502 Define only as macros. There's no longer any need to also define
4503 these symbols as enums or as constants, since we now assume
4504 gcc -g3 when debugging.
4506 2012-11-03 Eli Zaretskii <eliz@gnu.org>
4508 * lisp.mk: Adjust comments to the fact that term/internal is now
4509 loaded from loadup.el.
4511 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
4512 (msdos_fatal_signal): New function.
4513 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
4516 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
4517 for GCC versions before 4.
4518 (emacs_raise): Define to call msdos_fatal_signal.
4520 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
4521 iterator when starting in the middle of a display or overlay
4524 2012-11-03 Chong Yidong <cyd@gnu.org>
4526 * process.c (wait_reading_process_output): Clean up the last
4529 2012-11-03 Jim Paris <jim@jtan.com> (tiny change)
4531 * process.c (wait_reading_process_output): Avoid a race condition
4532 with SIGIO delivery (Bug#11536).
4534 2012-11-03 Chong Yidong <cyd@gnu.org>
4536 * buffer.c (cursor_type): Untabify docstring.
4538 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
4540 * frame.h (struct frame): Drop can_have_scroll_bars member
4541 which is meaningless for a long time. Adjust comments.
4542 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
4543 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
4545 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
4547 * window.c (decode_next_window_args): Update window arg after
4548 calling decode_live_window and so fix crash reported at
4549 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
4550 by Juanma Barranquero <lekktu@gmail.com>.
4551 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
4552 * font.c (Ffont_at): Likewise.
4554 2012-11-01 Jan Djärv <jan.h.d@swipnet.se>
4556 * widget.c (resize_cb): New function.
4557 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
4558 (EmacsFrameResize): Check if all is up to date before changing frame
4561 2012-11-02 Eli Zaretskii <eliz@gnu.org>
4563 Implement backtrace output for fatal errors on MS-Windows.
4564 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
4565 (BACKTRACE_LIMIT_MAX): New macro.
4566 (w32_backtrace): New function.
4567 (emacs_abort): Use w32_backtrace when the user chooses not to
4568 attach a debugger. Update the text of the abort dialog.
4570 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
4572 Window-related stuff cleanup here and there.
4573 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
4574 Use decode_any_window.
4575 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
4576 * xdisp.c (Fformat_mode_line): Likewise.
4577 * font.c (Ffont_at): Use decode_live_window.
4578 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
4579 * window.c (decode_next_window_args): Likewise.
4580 (decode_any_window): Remove static.
4581 * window.h (decode_any_window): Add prototype.
4582 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
4583 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
4586 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
4588 Remove pad from struct input_event.
4589 * termhooks.h (struct input_event): Remove padding field.
4591 * keyboard.c (event_to_kboard): Simplify because frame_or_window
4592 member is never cons for a long time. Adjust comment.
4593 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
4594 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
4595 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
4596 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
4598 2012-11-01 Eli Zaretskii <eliz@gnu.org>
4600 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
4602 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
4604 Fix crash when using Emacs as commit editor for git (Bug#12697).
4605 * callproc.c (setpgrp): Remove macro, as we now use setpgid
4606 and it is configured in conf_post.h.
4607 (Fcall_process): Don't invoke both setsid and setpgid; the former
4608 is enough, if it exists.
4609 * callproc.c (Fcall_process, child_setup):
4610 * process.c (create_process): Use setpgid.
4611 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
4613 * dispnew.c (init_display): Initialize the foreground group
4614 if we are running a tty display.
4615 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
4616 * lisp.h (init_foreground_group): New decl.
4617 * sysdep.c (inherited_pgroup): New static var.
4618 (init_foreground_group, tcsetpgrp_without_stopping)
4619 (narrow_foreground_group, widen_foreground_group): New functions.
4620 (init_sys_modes): Narrow foreground group.
4621 (reset_sys_modes): Widen foreground group.
4623 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
4625 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
4627 2012-10-31 Martin Rudalics <rudalics@gmx.at>
4629 * minibuf.c (read_minibuf): Restore current buffer since
4630 choose_minibuf_frame calling Fset_frame_selected_window may
4631 change it (Bug#12766).
4633 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
4635 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
4637 2012-10-30 Kenichi Handa <handa@gnu.org>
4639 * font.c (Ffont_at): If WINDOW is specified and it is not
4640 displaying the current buffer, signal an error.
4642 2012-10-29 Daniel Colascione <dancol@dancol.org>
4644 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
4645 In preparation for fixing bug#12739, move these functions from
4648 * coding.h, coding.c: ... to here, and compile them only when
4649 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
4650 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
4652 2012-10-28 Eli Zaretskii <eliz@gnu.org>
4654 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
4655 (timer_loop, getitimer, setitimer): Use it instead of
4656 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
4658 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
4661 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
4663 * nsterm.m (NO_APPDEFINED_DATA): New define.
4664 (last_appdefined_event_data): New variable
4665 (last_appdefined_event): Remove.
4666 (ns_select): Initialize t from last_appdefined_event_data instead
4667 of [last_appdefined_event data1].
4668 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
4669 remove last_appdefined_event (Bug#12698).
4671 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
4673 * frame.c (x_set_font): Catch internal error.
4675 2012-10-27 Eli Zaretskii <eliz@gnu.org>
4677 Avoid overflow in w32 implementation of interval timers.
4678 When possible, for ITIMER_PROF count only times the main thread
4680 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
4681 'volatile ULONGLONG' types. All the other data which was
4682 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
4683 (GetThreadTimes_Proc): New typedef.
4684 (w32_get_timer_time): New function, returns a suitable time value
4686 (timer_loop): Enter critical section when accessing ULONGLONG
4687 values of the itimer_data struct, as these accesses are no longer
4688 atomic. Call 'w32_get_timer_time' instead of 'clock'.
4689 Remove unused variable.
4690 (init_timers): Initialize s_pfn_Get_Thread_Times.
4691 (start_timer_thread): Don't assign itimer->caller_thread here.
4692 (getitimer): Assign itimer->caller_thread here.
4693 (setitimer): Always call getitimer to get the value of ticks_now.
4694 (sys_spawnve): Avoid compiler warning about format mismatch.
4696 2012-10-26 Eli Zaretskii <eliz@gnu.org>
4698 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
4699 mouse movement events if the menu bar is active. This avoids
4700 producing a busy "hour-glass" cursor by Windows if the mouse
4701 pointer is positioned over a tooltip shown for some menu item.
4703 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
4705 Don't assume process IDs fit in int.
4706 * emacs.c (shut_down_emacs) [!DOS_NT]:
4707 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
4708 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
4709 Use pid_t, not int, to store process IDs, as 'int'
4710 is not wide enough on a few platforms (e.g., AIX and IRIX).
4712 2012-10-23 Kenichi Handa <handa@gnu.org>
4714 The following change is to make face-font-rescale-alist work
4715 correctly for non-ASCII fonts.
4717 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
4718 (font_open_for_lface): Handle Vface_font_rescale_alist.
4720 2012-10-23 Chong Yidong <cyd@gnu.org>
4722 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
4724 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
4726 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
4728 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
4730 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
4733 2012-10-21 Glenn Morris <rgm@gnu.org>
4735 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
4737 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
4739 Port to OpenBSD 5.1.
4740 * frame.c (Fmouse_position, Fmouse_pixel_position):
4741 * xdisp.c (produce_stretch_glyph):
4742 Declare local vars only when they're needed.
4743 This is clearer and avoids a warning on OpenBSD about unused vars.
4744 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
4745 This is safer, and avoids OpenBSD warnings about unused vars.
4746 * keyboard.c (record_menu_key): Remove unnecessary decl.
4747 (poll_timer): Define only if POLL_FOR_INPUT is defined.
4748 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
4749 as our definition clashes with OpenBSD's.
4750 * xfaces.c (load_face_colors, check_lface_attrs)
4751 (get_lface_attributes_no_remap, get_lface_attributes)
4752 (lface_fully_specified_p, x_supports_face_attributes_p)
4753 (tty_supports_face_attributes_p, face_fontset, realize_face)
4754 (realize_x_face, realize_tty_face):
4755 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
4756 merely Lisp_Object *. This is more informative and avoids
4757 a warning on OpenBSD about accessing beyond an object's size.
4759 2012-10-20 Chong Yidong <cyd@gnu.org>
4761 * lread.c (Fload): Doc fix (Bug#12592).
4763 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4765 * font.c (Ffont_at): Fix previous change.
4767 2012-10-19 Eli Zaretskii <eliz@gnu.org>
4769 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
4770 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
4773 * alloc.c (NSTATICS): Decrease to 0x800.
4775 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
4777 * fns.c (Fnreverse): Include the problem element when signaling an
4780 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
4782 * nsterm.m (ns_select): Check writefds before call to
4783 FD_ISSET (Bug#12668).
4785 2012-10-18 Daniel Colascione <dancol@dancol.org>
4787 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
4788 (staticpro): If we run out of staticpro slots, die with an
4789 informative error instead of just calling emacs_abort.
4791 2012-10-18 Martin Rudalics <rudalics@gmx.at>
4793 Fix two flaws reported by Dmitry Antipov.
4794 * window.c (Ftemp_output_buffer_show): Remove.
4795 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
4796 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
4798 2012-10-17 Eli Zaretskii <eliz@gnu.org>
4800 * makefile.w32-in ($(BLD)/w32.$(O)):
4801 ($(BLD)/vm-limit.$(O)):
4803 ($(BLD)/unexw32.$(O)):
4804 ($(BLD)/fileio.$(O)):
4805 ($(BLD)/dispnew.$(O)): Update dependencies.
4807 * w32term.h (w32_initialize_display_info, initialize_w32_display):
4810 * w32proc.c: Include ctype.h.
4812 * w32.h (init_environment, check_windows_init_file)
4813 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
4814 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
4815 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
4816 (sys_link): Add prototypes.
4818 * w32.c: Include w32select.h.
4819 (sys_access, e_malloc, sys_select): Add prototypes.
4820 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
4822 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
4824 * unexw32.c: Include lisp.h and w32.h.
4826 * term.c [WINDOWSNT]: Include w32term.h.
4828 * process.c [WINDOWSNT]: Add prototype of sys_select.
4830 * fileio.c [WINDOWSNT]: Include w32.h.
4832 * dispnew.c [WINDOWSNT]: Include w32.h.
4834 * cygw32.c (Fcygwin_convert_path_to_windows)
4835 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
4836 Lisp_Object values. (Bug#12661)
4838 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
4839 to Lisp_Object. (Bug#12661)
4841 2012-10-17 Kenichi Handa <handa@gnu.org>
4843 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
4846 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
4848 * buffer.c (Fkill_buffer): When unchaining the marker,
4849 reset its buffer pointer to NULL (Bug#12652).
4851 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
4853 Do not verify indirection counters of killed buffers (Bug#12579).
4854 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
4855 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
4857 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
4859 * alloc.c (Fmake_byte_code): Fix typo in comment.
4860 * print.c (print_interval): Define as static to match prototype.
4861 * indent.c (disptab_matches_widthtab, recompute_width_table):
4864 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
4866 * editfns.c (get_system_name): Remove.
4867 * lisp.h (get_system_name): Remove prototype.
4868 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
4869 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
4871 2012-10-15 Daniel Colascione <dancol@dancol.org>
4873 * dbusbind.c: Add comment explaining reason for previous change.
4875 2012-10-15 Martin Rudalics <rudalics@gmx.at>
4877 * window.c (Fwindow_end): Rewrite check whether cached position
4878 can be used (Bug#12600).
4879 (resize_frame_windows, grow_mini_window, shrink_mini_window):
4880 Set windows_or_buffers_changed.
4882 2012-10-15 Daniel Colascione <dancol@dancol.org>
4884 * dbusbind.c: Fix cygw32 build break when compiling with dbus
4885 enabled by undefining the symbol "interface", which the platform
4886 headers define to something incompatible.
4888 2012-10-14 Daniel Colascione <dancol@dancol.org>
4890 * image.c (init_tiff_functions, init_imagemagick_functions)
4891 (init_svg_functions): Fix cygw32 build break by using these
4892 functions only when WINDOWSNT _and_ HAVE_NTGUI.
4894 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
4896 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
4898 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
4900 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
4902 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
4904 * coding.c (detect_coding): Set coding->id before calling
4907 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
4909 * fileio.c: Formatting fixes.
4911 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
4913 Fix some stat-related races.
4914 * fileio.c (Fwrite_region): Avoid race condition if a file is
4915 removed or renamed by some other process immediately after Emacs
4916 writes it but before Emacs stats it. Do not assume that stat (or
4918 * image.c (slurp_file): Resolve the file name with fopen + fstat
4919 rather than stat + fopen.
4920 (pbm_read_file) [0]: Remove unused code with stat race.
4921 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
4922 Remove ineffective code with stat race.
4924 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
4926 * doc.c (get_doc_string): Don't signal an error if the file is missing.
4928 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
4930 * nsterm.m (hold_event_q): New static variable.
4931 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
4933 (hold_event): New function.
4934 (ns_read_socket): If hold_event_q have events, store them and
4936 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
4937 is zero (Bug#12384).
4939 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
4941 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
4943 2012-10-12 Eli Zaretskii <eliz@gnu.org>
4945 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
4947 * fileio.c (check_existing): New function.
4948 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
4949 instead of calling 'stat', when what's needed is to check whether
4950 a file exists. This avoids expensive system calls on MS-Windows.
4953 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
4955 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
4956 determine whether a file exists and is not a directory.
4958 * lisp.h (check_existing): Add prototype.
4960 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
4962 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
4964 2012-10-12 Glenn Morris <rgm@gnu.org>
4966 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
4968 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
4970 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
4972 * eval.c (Fautoload): Remember previous autoload status in load-history.
4974 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
4976 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
4977 * lread.c (load_each_byte, new_backquote_flag, readchar)
4978 (read_filtered_event, lisp_file_lexically_bound_p)
4979 (safe_to_load_version, Fload, complete_filename_p, openp)
4980 (build_load_history, readevalloop, read_escape, read1)
4981 (string_to_number, read_vector, read_list):
4982 * macros.c (Fstart_kbd_macro):
4983 * marker.c (CONSIDER):
4984 * menu.c (parse_single_submenu, digest_single_submenu)
4985 (find_and_return_menu_selection, Fx_popup_menu):
4986 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
4988 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
4990 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
4991 (xmenu_show, xdialog_show):
4992 Use bool for booleans.
4993 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
4994 as it's not a predicate. All uses changed. Omit unnecessary
4997 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4999 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
5000 (save_excursion_restore): Do not restore mark if it was not saved.
5002 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
5004 * marker.c (cached_modiff): EMACS_INT, not int.
5006 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
5007 instead of having a wrong decl.
5008 * nsmenu.m (waiting_for_input): Remove wrong decl.
5010 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5012 keyboard.c, keymap.c: Use bool for booleans.
5013 * dispnew.c (sit_for): Distinguish between 3-way display_option
5014 and boolean do_display.
5015 * keyboard.c (single_kboard, this_command_key_count_reset)
5016 (waiting_for_input, echoing, immediate_quit, input_pending)
5017 (interrupt_input, interrupts_deferred, pop_kboard)
5018 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
5019 (command_loop_1, adjust_point_for_property)
5020 (safe_run_hooks_error, input_polling_used, read_char):
5021 (help_char_p, readable_events, kbd_buffer_events_waiting)
5022 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
5023 (lucid_event_type_list_p, get_input_pending):
5024 (gobble_input, menu_separator_name_p, menu_bar_item)
5025 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
5026 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
5027 (keyremap_step, test_undefined, read_key_sequence)
5028 (detect_input_pending, detect_input_pending_ignore_squeezables)
5029 (detect_input_pending_run_timers, requeued_events_pending_p)
5030 (quit_throw_to_read_char, Fset_input_interrupt_mode):
5031 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
5032 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
5033 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
5034 (accessible_keymaps_1, Fkey_description, push_key_description):
5035 (shadow_lookup, struct where_is_internal_data)
5036 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
5037 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
5038 (describe_map, describe_vector):
5039 * menu.c (single_menu_item):
5040 * nsmenu.m (ns_update_menubar):
5041 * process.c (wait_reading_process_output):
5042 * search.c (scan_buffer, scan_newline):
5043 Use bool for boolean.
5044 * keyboard.c (timers_run, swallow_events)
5045 (detect_input_pending_run_timers):
5046 * process.c (wait_reading_process_output):
5047 Use unsigned for counter where wraparound-on-overflow is desired,
5048 since unsigned is guaranteed to have that behavior and signed is not.
5049 (read_char): Use ptrdiff_t for string length.
5050 (get_input_pending): Remove first argument, since it was always
5051 the same pointer-to-int (now pointer-to-boolean) &input_pending,
5052 and behave as if it had that value. Return new value of
5053 input_pending. All callers changed.
5054 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
5055 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
5057 * keymap.c (push_key_description): Omit last arg, which was always 1.
5058 All callers changed.
5060 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
5062 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
5064 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
5065 ($(BLD)/term.$(O)): Update dependencies.
5067 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
5069 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
5070 * lisp.h (enum pvec_type): Adjust comments and omit explicit
5071 initializer for PVEC_NORMAL_VECTOR.
5073 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5075 Clean out old termopts cruft.
5076 * termopts.h (flow_control, meta_key): Remove unused decls.
5077 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
5078 Don't include termopts.h.
5080 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
5082 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
5084 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
5086 * commands.h (immediate_quit): Remove duplicate decl.
5088 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
5090 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
5092 (nsfont_open): Remove setting of Vfonts_in_cache.
5093 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
5095 2012-10-09 Eli Zaretskii <eliz@gnu.org>
5097 * w32fns.c (w32_last_error): Change the return value to DWORD, to
5098 match what GetLastError returns. Explain why the function is
5101 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
5102 'is_tooltip_frame', to avoid confusion with its global namesake.
5104 2012-10-08 Daniel Colascione <dancol@dancol.org>
5106 * xdisp.c (start_hourglass): Call w32_note_current_window when
5107 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
5108 build that caused Emacs to display the hourglass cursor forever.
5110 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
5111 which is broken under remote desktop, calculate the number of
5112 colors available for a display based on the display's number of
5113 planes and number of bits per pixel per plane. (bug#10397).
5115 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
5117 * nsfont.m (Vfonts_in_cache): New variable.
5118 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
5119 are used. Add cached fonts to Vfonts_in_cache.
5120 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
5122 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
5124 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
5126 (FONT_H): Define after FRAME_H.
5127 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
5128 Update dependencies.
5130 * w32term.c: Remove leftover declaration of keyboard_codepage.
5132 2012-10-08 Eli Zaretskii <eliz@gnu.org>
5134 * makefile.w32-in (FONT_H): Add $(FRAME_H).
5135 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
5136 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
5137 (GLOBAL_SOURCES): Add cygw32.c.
5138 ($(BLD)/unexw32.$(O)):
5140 ($(BLD)/w32console.$(O)):
5141 ($(BLD)/w32fns.$(O)):
5142 ($(BLD)/w32heap.$(O)):
5143 ($(BLD)/w32menu.$(O)):
5144 ($(BLD)/w32proc.$(O)): Add w32common.h.
5146 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
5148 (x_to_w32_color): Don't modify the argument, modify a copy instead.
5150 2012-10-08 Daniel Colascione <dancol@dancol.org>
5152 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
5153 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
5154 accidental message numbering hole. Change other messages to
5157 * w32select.h (HAVE_W32SELECT): Remove.
5159 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
5160 w32common.h instead of w32heap.h.
5162 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
5163 (get_allocation_unit, get_processor_type, get_w32_major_version)
5164 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
5165 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
5166 (OS_NT, os_subtype, cache_system_info): Move declarations to
5169 * w32heap.c: Include w32common.h.
5170 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
5171 (w32_minor_version, w32_build_number, w32_subtype):
5172 Remove duplicate definitions.
5174 * w32fns.c: Include w32common.h; include w32heap.h only in
5177 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
5178 Use `report_file_error' instead of `error' in order to better
5179 inform users of what went wrong. Increase NTGUI_UNICODE file
5180 dialog box file name length to 32k, the maximum allowed by the NT
5183 * w32common.h: New file.
5184 (ROUND_UP, ROUND_DOWN, get_page_size)
5185 (get_allocation_unit, get_processor_type, get_w32_major_version)
5186 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
5187 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
5188 (OS_NT, os_subtype, cache_system_info): Move here.
5190 * unexw32.c, unexcw.c: Include w32common.h.
5192 * emacs.c (main): Use (defined (WINDOWSNT) || defined
5193 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
5194 to call syms_of_w32select.
5196 * cygw32.h: Remove obsolete EXFUN declarations.
5198 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
5200 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
5201 of w32inevt.o from SOME_MACHINE_OBJECTS.
5203 2012-10-08 Daniel Colascione <dancol@dancol.org>
5205 * image.c: Permanent fix for JPEG compilation issue --- limit
5206 jpeglib `boolean' redefinition to Cygwin builds.
5208 2012-10-08 Eli Zaretskii <eliz@gnu.org>
5210 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
5212 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
5215 2012-10-08 Daniel Colascione <dancol@dancol.org>
5217 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
5218 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
5219 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
5220 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
5221 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
5222 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
5223 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
5224 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
5225 now a supported configuration.
5227 * Makefile.in: consolidate image variables into LIBIMAGE; add
5228 W32_OBJ and W32_LIBS. Compile new files.
5231 (_DebPrint) declare tracing facility for W32 debugging. We need
5232 to unify tracing later.
5234 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
5235 unconditional use of W32 Unicode functions. Cygwin runs only on
5236 100% Unicode operating systems.
5238 * cygw32.c: New file. Define Cygwin-specific facilities.
5239 (Fcygwin_convert_path_to_windows)
5240 (Fcygwin_convert_path_from_windows): New user functions for
5241 accessing Cygwin path-munging routines.
5243 * cygw32.h: New file.
5244 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
5245 UTF-16LE strings temporarily inside non-Lisp-visible string
5248 (w32_strerror): Just what it says on the tin.
5250 * emacs.c: Make the NS fork-then-exec code for daemon-launching
5251 also run for Cygwin; both systems have the same problem with using
5252 GUI facilities in a forked child. Also call syms_of_cygw32,
5253 syms_of_w32select in correct places.
5255 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
5256 needs fork-then-exec for daemon launching.
5258 * font.h: Include frame.h.
5260 * image.c: Use the image library cache machinery only when we're
5261 compiling for native WINDOWSNT; Cygwin can use shared libraries
5262 like any other Unixlike system.
5264 * keyboard.c: Clarify a comment regarding the input loop.
5266 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
5267 functions directly instead of trying to detect at runtime that our
5268 host operating system supports them. We make this change for two
5269 reasons: Cygwin lacks support for the multibyte character
5270 conversion functions used by the legacy menu code, and Cygwin
5271 never needs to rely on non-Unicode APIs.
5273 * unexw32.c (hinst): Declare extern.
5275 * w32.c: Change header order;
5276 (w32_strerror): Move to w32fns.c because we need it for
5277 non-WINDOWSNT builds.
5279 * w32.h: Add #error macro to make sure we don't include w32.h for
5280 Cygwin builds. Remove w32select declarations.
5282 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
5283 w32fns.c. w32console.c is WINDOWSNT-only.
5285 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
5286 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
5288 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
5289 (w32_major_version, w32_minor_version, w32_build_number)
5290 (os_subtype, sound_type): Define here
5291 (w32_defined_color): Make color parameter const for consistency
5292 with other _defined_color functions.
5293 (w32_createwindow): Unconditionally call w32_init_class instead of
5294 doing so only when hprevinst is non-NULL. Plumbing hprevinst
5295 through the code is complex and unnecessary because class
5296 registration is practically free.
5297 (w32_name_of_message): New EMACSDEBUG-only function.
5298 (Fset_message_beep): Move here
5299 (Fx_open_connection): Require that the display name for Windows be
5300 "w32" for consistency, emacsclient disambiguation, and maybe, one
5301 day, multi-window-system support.
5302 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
5303 Cygwin files for W32 GUI facilities, since these clearly don't
5304 expect Cygwin names.
5305 (_DebPrint): Define.
5306 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
5307 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
5308 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
5309 (w32_last_error): Remove.
5311 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
5313 * w32heap.c (syspage_mask): Declare here.
5314 (cache_system_info): Remove.
5316 * w32inevt.c (faked_key): Define globally, not statically.
5317 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
5318 (w32_console_toggle_lock_key): Move to w32fns.c.
5320 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
5322 * w32proc.c (_DebPrint): Move to w32fns.c.
5323 * w32select.c: Include string.h, stdio.h for Cygwin.
5324 * w32select.h: New File.
5326 * w32term.c: Include io.h for non-CYGWIN builds; needed for
5328 (w32_message_fd): New variable. Under Cygwin, holds the file
5329 descriptor the system used to tell us about pending thread
5332 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
5333 that prevented compilation under non-WINDOWSNT systems.
5335 (w32_initialize): Open /dev/windows and assign it to
5336 w32_message_fd. Provide w32 feature.
5338 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
5339 (WM_EMACS_INPUT_READY): add.
5340 (prepend_msg, w32_message_fd): Declare globally.
5343 (keyboard_handle): Use only when WINDOWSNT.
5344 (notify_msg_ready): New function. Posts a message to the main
5345 thread's message queue under CYGWIN, which wakes up the main
5346 thread from select(2) by making the /dev/windows file descriptor
5347 ready. Under WINDOWSNT, it sets an event the same way the old
5350 (post, prepend_msg): Actually call notify_msg_ready instead of
5351 setting the input event directly.
5353 2012-10-07 Eli Zaretskii <eliz@gnu.org>
5355 * ralloc.c (relinquish): If a heap is ready to be relinquished,
5356 but it still has blocs in it, don't return it to the system,
5357 instead of aborting. (Bug#12402)
5359 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
5361 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
5363 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
5364 MAC_OS_X_VERSION_10_6.
5365 (syms_of_nsterm): Remove comment about Panther and above for
5367 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
5368 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
5369 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
5371 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
5372 MAC_OS_X_VERSION_10_4.
5374 * nsmenu.m (fillWithWidgetValue:): Remove code for <
5375 MAC_OS_X_VERSION_10_2.
5377 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
5379 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
5380 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
5382 * nsterm.m (ns_in_resize): Remove (Bug#12479).
5383 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
5384 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
5385 Remove ns_in_resize check.
5386 (ns_clear_frame_area): Remove resize handle code.
5388 * nsfns.m (ns_in_resize): Remove.
5389 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
5390 Remove ns_in_resize check.
5392 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
5394 Improve sys_siglist detection.
5395 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
5396 defined as a macro, as is done in Solaris.
5397 (sys_siglist_entries): New macro.
5398 (save_strsignal): Use it.
5399 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
5400 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
5402 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
5404 * nsfns.m (Fx_create_frame): Call x_default_parameter with
5405 fullscreen/Fullscreen.
5407 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
5408 tobar_height is new.
5410 * nsterm.m (x_make_frame_visible): Check for fullscreen.
5411 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
5412 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
5413 (windowDidResize:): Check for correct window if old style fullscreen.
5414 Capitalize word in comment. Remove incorrect comment.
5415 (initFrameFromEmacs:): tbar_height renamed tibar_height.
5416 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
5417 error in drawing background.
5418 (toggleFullScreen:): Remove comment. Rearrange calls.
5419 Set toolbar values to zero, save old height in tobar_height.
5420 Restore tool bar height when leaving fullscreen.
5421 (canBecomeMainWindow): New function.
5423 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
5425 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
5427 2012-10-05 Eli Zaretskii <eliz@gnu.org>
5429 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
5431 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
5432 that time stamps of directories could also be changed.
5433 Don't request the too broad GENERIC_WRITE, only the more restrictive
5434 FILE_WRITE_ATTRIBUTES access rights.
5436 * fileio.c (Fset_file_times): Special-case ignoring errors for
5437 directories only on MSDOS, not on MS-Windows.
5439 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
5441 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
5443 2012-10-04 Eli Zaretskii <eliz@gnu.org>
5445 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
5446 see whether CreateFile failed.
5448 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
5450 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
5451 to avoid similar races.
5452 * keyboard.c (pending_signals): Now bool, not int.
5454 Port timers to OpenBSD, plus check for timer failures.
5455 OpenBSD problem reported by Han Boetes.
5456 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
5458 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
5459 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
5460 like OpenBSD, which has timer_settime but does not declare it.
5461 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
5462 whether to use itimerspec-related primitives. All uses of
5463 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
5465 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
5467 * profiler.c (handle_profiler_signal): Fix a malloc race
5468 that caused Emacs to hang on Fedora 17 when profiling Lisp.
5470 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
5472 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
5474 2012-10-02 Eli Zaretskii <eliz@gnu.org>
5476 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
5477 consistent with the change in return value of 'safe_strsignal'.
5479 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
5481 Prefer plain 'static' to 'static inline' (Bug#12541).
5482 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
5483 (bidi_set_sor_type, bidi_push_embedding_level)
5484 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
5485 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
5486 (bidi_cache_search, bidi_cache_ensure_space)
5487 (bidi_cache_iterator_state, bidi_cache_find)
5488 (bidi_peek_at_next_level, bidi_set_paragraph_end)
5489 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
5490 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
5491 Now 'static', not 'static inline'.
5493 Count overruns when profiling; change units to ns.
5494 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
5495 Give extra weight to samples after overruns, to attempt to count
5496 the time more accurately.
5497 (setup_cpu_timer): Change sampling interval units from ms to ns, since
5498 the underlying primitives nominally do ns.
5499 (Fprofiler_cpu_start): Document the change. Mention that
5500 the sampling intervals are only approximate.
5502 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
5504 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
5506 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
5507 case for the special 0 coding-system.
5509 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
5510 (Fmake_overlay): Remove redundant tests.
5511 (fix_start_end_in_overlays): Remove redundant recentering.
5513 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
5515 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
5516 Update dependencies.
5518 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
5520 Fix a malloc race condition involving strsignal.
5521 A signal can arrive in the middle of a malloc, and Emacs's signal
5522 handler can invoke strsignal, which can invoke malloc, which is
5523 not portable. This race condition bug makes Emacs hang on GNU/Linux.
5524 Fix it by altering the signal handler so that it does not invoke
5526 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
5527 * process.c (status_message): Use const pointer, in case strsignal
5528 is #defined to safe_strsignal.
5529 * sysdep.c (sys_siglist, init_signals): Always define and
5530 initialize a substitute sys_siglist if the system does not define
5531 one, even if HAVE_STRSIGNAL.
5532 (safe_strsignal): Rename from strsignal. Always define,
5533 using sys_siglist. Return a const pointer.
5534 * syssignal.h (safe_strsignal): New decl.
5535 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
5537 2012-10-01 Eli Zaretskii <eliz@gnu.org>
5539 * w32proc.c (timer_loop): Fix code that waits for timer
5540 expiration, to avoid high CPU usage.
5542 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
5544 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
5545 (sweep_weak_table): Remove redundant prototypes.
5547 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
5549 * emacs.c: Move the inclusion of TERM_HEADER after including
5550 windows.h on WINDOWSNT. This avoids compilation problems with
5553 2012-10-01 Eli Zaretskii <eliz@gnu.org>
5555 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
5556 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
5557 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
5558 as the previous version used 'void *'.
5560 * ralloc.c (ROUNDUP): Fix last change.
5561 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
5564 * w32proc.c <disable_itimers>: New static flag.
5565 (init_timers): Initialize it to zero, after creating the critical
5566 sections used by the timer threads.
5567 (term_timers): Set to 1 before deleting the critical sections.
5568 (getitimer, setitimer): If disable_itimers is non-zero, return an
5569 error indication without doing anything. Reported by Fabrice
5570 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
5571 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
5573 [!HAVE_SETITIMER]: Behave as the previous version that didn't
5576 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
5577 term_ntproc after all the other bookkeeping, to get timers working
5578 as long as possible.
5580 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
5582 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
5583 Suggested by Juri Linkov in
5584 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
5586 Prefer plain 'static' to 'static inline' (Bug#12541).
5587 With static functions, modern compilers inline pretty well by
5588 themselves; advice from programmers often hurts as much as it helps.
5589 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
5590 this change shrinks the text size of the Emacs executable by 1.1%
5591 without affecting CPU significantly in my benchmark.
5592 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
5593 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
5594 (mark_maybe_object, mark_maybe_pointer, bounded_number):
5595 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
5596 (bset_auto_fill_function, bset_auto_save_file_format)
5597 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
5598 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
5599 (bset_cache_long_line_scans, bset_case_fold_search)
5600 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
5601 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
5602 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
5603 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
5604 (bset_header_line_format, bset_indicate_buffer_boundaries)
5605 (bset_indicate_empty_lines, bset_invisibility_spec)
5606 (bset_left_fringe_width, bset_major_mode, bset_mark)
5607 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
5608 (bset_name, bset_overwrite_mode, bset_pt_marker)
5609 (bset_right_fringe_width, bset_save_length)
5610 (bset_scroll_bar_width, bset_scroll_down_aggressively)
5611 (bset_scroll_up_aggressively, bset_selective_display)
5612 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
5613 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
5614 (set_buffer_overlays_after):
5615 * category.c (bset_category_table):
5616 * charset.c (read_hex):
5617 * coding.c (produce_composition, produce_charset)
5618 (handle_composition_annotation, handle_charset_annotation)
5620 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
5621 (assign_row, set_frame_matrix_frame, make_current)
5623 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
5624 * fns.c (maybe_resize_hash_table):
5625 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
5626 * gmalloc.c (register_heapinfo):
5627 * image.c (lookup_image_type):
5628 * intervals.c (set_interval_object, set_interval_left)
5629 (set_interval_right, copy_interval_parent, rotate_right)
5630 (rotate_left, balance_possible_root_interval):
5631 * keyboard.c (kset_echo_string, kset_kbd_queue)
5632 (kset_keyboard_translate_table, kset_last_prefix_arg)
5633 (kset_last_repeatable_command, kset_local_function_key_map)
5634 (kset_overriding_terminal_local_map, kset_real_last_command)
5635 (kset_system_key_syms, clear_event, set_prop):
5636 * lread.c (digit_to_number):
5637 * marker.c (attach_marker, live_buffer, set_marker_internal):
5638 * nsterm.m (ns_compute_glyph_string_overhangs):
5639 * process.c (pset_buffer, pset_command)
5640 (pset_decode_coding_system, pset_decoding_buf)
5641 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
5642 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
5643 (pset_status, pset_tty_name, pset_type, pset_write_queue):
5644 * syntax.c (bset_syntax_table, dec_bytepos):
5645 * terminal.c (tset_param_alist):
5646 * textprop.c (interval_has_some_properties)
5647 (interval_has_some_properties_list):
5648 * window.c (wset_combination_limit, wset_dedicated)
5649 (wset_display_table, wset_hchild, wset_left_fringe_width)
5650 (wset_left_margin_cols, wset_new_normal, wset_new_total)
5651 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
5652 (wset_right_fringe_width, wset_right_margin_cols)
5653 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
5654 (wset_vertical_scroll_bar_type, wset_window_parameters):
5655 * xdisp.c (wset_base_line_number, wset_base_line_pos)
5656 (wset_column_number_displayed, wset_region_showing)
5657 (window_box_edges, run_window_scroll_functions)
5658 (append_glyph_string_lists, prepend_glyph_string_lists)
5659 (append_glyph_string, set_glyph_string_background_width)
5660 (append_glyph, append_composite_glyph)
5661 (take_vertical_position_into_account):
5662 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
5663 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
5664 (lface_hash, lface_same_font_attributes_p, lookup_face):
5665 * xml.c (libxml2_loaded_p):
5666 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
5667 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
5668 Now 'static', not 'static inline'.
5671 (bidi_copy_it): Do the whole copy with a single memcpy.
5672 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
5674 Revert the FOLLOW-SYMLINKS change for file-attributes.
5675 Doing it right would require several changes to Tramp, and there's
5676 not enough time to get that tested before the freeze today.
5677 * dired.c (directory_files_internal, Ffile_attributes):
5680 * frame.c (x_report_frame_params): Port better to wider ints.
5681 Do not assume that EMACS_UINT is the same width as uprintmax_t,
5682 or that pointers can be printed in 15 decimal digits.
5683 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
5685 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
5687 Support x64 build on MS-Windows.
5688 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
5689 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
5690 compatibility with x64.
5691 (x_get_focus_frame): Add prototype.
5693 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
5694 defining an XRectangle structure.
5696 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
5697 arithmetics for compatibility with x64.
5699 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
5700 compatibility with x64.
5702 * w32heap.h: Adjust prototypes and declarations.
5704 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
5705 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
5706 DWORD, long, and unsigned long, for compatibility with x64.
5707 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
5708 (sbrk): Argument is now of type ptrdiff_t.
5710 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
5712 (w32_msg_pump): Use WPARAM type for 'result'.
5714 * w32.c (init_environment, get_emacs_configuration): Support AMD64
5716 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
5717 compatibility with x64.
5719 * vm-limit.c (lim_data): Now size_t.
5720 (check_memory_limits): Adjust prototypes of real_morecore and
5721 __morecore to receive argument of type ptrdiff_t. Use size_t for
5722 five_percent and data_size.
5724 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
5725 variables, for compatibility with x64.
5726 (rva_to_section, offset_to_section, relocate_offset)
5727 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
5728 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
5729 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
5730 for compatibility with x64.
5732 * sysdep.c (STDERR_FILENO): Define if not already defined.
5734 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
5735 (__morecore): Argument type is now ptrdiff_t.
5736 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
5737 (relinquish): Use ptrdiff_t type for 'excess'.
5738 (r_alloc_sbrk): Argument type is now ptrdiff_t.
5740 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
5741 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
5742 instead of a literal number.
5744 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
5745 (min): Define only if not already defined.
5747 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
5748 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
5751 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
5752 'bitmaps' is a pointer.
5754 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
5756 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
5758 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
5760 file-attributes has a new optional arg FOLLOW-SYMLINKS.
5761 * dired.c (directory_files_internal, Ffile_attributes):
5762 New arg follow_symlinks. All uses changed.
5764 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
5766 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
5768 2012-09-30 Eli Zaretskii <eliz@gnu.org>
5770 Support atimers and CPU profiler via profile.c on MS-Windows.
5771 * w32proc.c (sig_mask, crit_sig): New static variables.
5772 (sys_signal): Support SIGALRM and SIGPROF.
5773 (sigemptyset, sigaddset, sigfillset, sigprocmask)
5774 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
5775 sigfillset, and sigprocmask are no longer no-ops.
5776 (sigismember): New function.
5777 (struct itimer_data): New definition.
5778 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
5779 (crit_prof): New static variables.
5780 (MAX_SINGLE_SLEEP): New definition.
5781 (timer_loop, stop_timer_thread, term_timers, init_timers)
5782 (start_timer_thread, getitimer, setitimer): New functions.
5783 (alarm): No longer a no-op, calls setitimer.
5785 * w32.c (term_ntproc): Call term_timers.
5786 (init_ntproc): Make sure all signals are unblocked at startup, to
5787 erase any traces of dumping. Call init_timers.
5789 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
5790 Windows-specific code to display the hourglass mouse pointer is no
5792 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
5793 to hourglass timer expiration.
5794 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
5795 Remove, no longer used.
5796 (w32_note_current_window, show_hourglass, hide_hourglass):
5797 New functions, in support of hourglass cursor display similar to other
5799 (syms_of_w32fns): Don't initialize hourglass_timer.
5801 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
5803 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
5805 * w32.h (init_timers, term_timers): Add prototypes.
5807 2012-09-30 Kenichi Handa <handa@gnu.org>
5809 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
5810 to the buffer relocation which may be caused by ccl_driver.
5812 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
5814 * xfns.c (Fx_file_dialog): Update comment.
5816 * w32fns.c (Fx_file_dialog): Update comment.
5818 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
5819 Initialize panel name field if OSX >= 10.6.
5821 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
5823 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
5825 * nsterm.m (NEW_STYLE_FS): New define.
5826 (ns_fullscreen_hook, windowWillEnterFullScreen)
5827 (windowDidEnterFullScreen, windowWillExitFullScreen)
5828 (windowDidExitFullScreen, toggleFullScreen, handleFS)
5829 (setFSValue): New functions.
5830 (EmacsFSWindow): New implementation.
5831 (canBecomeKeyWindow): New function for EmacsFSWindow.
5832 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
5833 (dealloc): Release nonfs_window if in fullscreen.
5834 (updateFrameSize:): Call windowDidMove to update top/left.
5835 (windowWillResize:toSize:): Check if frame is still maximized.
5836 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
5837 next_maximized, maximized_width, maximized_height and nonfs_window.
5838 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
5840 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
5841 fullscreen. Set maximized_width/height. Act on next_maximized.
5843 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
5844 (EmacsView): Add variables for fullscreen.
5845 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
5846 (EmacsFSWindow): New interface for fullscreen.
5848 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
5850 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
5852 2012-09-30 Chong Yidong <cyd@gnu.org>
5854 * fns.c (Frandom): Doc fix.
5856 2012-09-30 Martin Rudalics <rudalics@gmx.at>
5858 * window.c (Vwindow_combination_limit): New default value.
5859 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
5861 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
5863 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
5864 Suggested by Eli Zaretskii in
5865 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
5867 2012-09-30 Eli Zaretskii <eliz@gnu.org>
5869 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
5870 HAVE_TIMER_SETTIME is defined.
5872 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
5874 Profiler improvements: more-accurate timers, overflow checks.
5875 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
5876 signal.h, setjmp.h. Include systime.h instead.
5877 (saturated_add): New function.
5878 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
5879 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
5880 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
5882 (enum profiler_cpu_running): New enum.
5883 (profiler_cpu_running): Now of that enum type, not bool.
5884 All uses changed to store the new value.
5885 (handle_profiler_signal): Rename from sigprof_handler_1,
5886 for consistency with other handlers. Do not check whether
5887 cpu_log is a hash-table if garbage collecting, since it
5888 doesn't matter in that case.
5889 (deliver_profiler_signal): Rename from sigprof_handler,
5890 for consistency with other handlers.
5891 (setup_cpu_timer): New function, with much of what used to be in
5892 Fprofiler_cpu_start. Check for out-of-range argument.
5893 Prefer timer_settime if available, and prefer
5894 thread cputime clocks, then process cputime clocks, then
5895 monotonic clocks, to the old realtime clock. Use make_timeval
5896 to round more-correctly when falling back to setitimer.
5897 (Fprofiler_cpu_start): Use it.
5898 (Fprofiler_cpu_stop): Prefer timer_settime if available.
5899 Don't assume that passing NULL as the 2nd argument of setitimer
5900 is the same as passing a pointer to all-zero storage.
5901 Ignore SIGPROF afterwards.
5902 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
5903 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
5904 non-fatal signal handlers. Ignore SIGPROF on startup.
5905 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
5906 in profiler.c, since sysdep.c now uses it.
5908 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
5909 Suggested by Eli Zaretskii in
5910 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
5912 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
5914 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
5916 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
5918 * lisp.h (struct backtrace): Remove indirection for `function' field.
5919 * xdisp.c (redisplay_internal):
5920 * profiler.c (record_backtrace, sigprof_handler_1):
5921 * alloc.c (Fgarbage_collect):
5922 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
5923 (Fbacktrace_frame): Adjust accordingly.
5925 2012-09-28 Glenn Morris <rgm@gnu.org>
5927 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
5928 (Frun_hook_with_args_until_failure): Doc fixes.
5930 2012-09-28 Eli Zaretskii <eliz@gnu.org>
5932 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
5933 Qautomatic_redisplay and change the symbol name. All users changed.
5935 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
5937 * profiler.c (sigprof_handler): Fix race condition.
5939 2012-09-28 Glenn Morris <rgm@gnu.org>
5941 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
5943 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
5945 Check more robustly for timer_settime.
5946 * Makefile.in (LIB_TIMER_TIME): New macro.
5948 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
5949 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
5952 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
5954 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
5956 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
5958 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
5960 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
5962 * character.h (MAYBE_UNIFY_CHAR): Remove.
5963 * charset.c, charset.h (maybe_unify_char): Now static.
5964 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
5965 Since this stuff is now private to charset.c, there's no need for
5966 a public macro and no need to inline by hand.
5968 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
5969 Stefan Monnier <monnier@iro.umontreal.ca>
5970 Juanma Barranquero <lekktu@gmail.com>
5972 * profiler.c: New file.
5973 * Makefile.in (base_obj): Add profiler.o.
5974 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
5975 ($(BLD)/profiler.$(O)): New target.
5976 * emacs.c (main): Call syms_of_profiler.
5977 * alloc.c (Qautomatic_gc): New constant.
5978 (MALLOC_PROBE): New macro.
5979 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
5980 (total_bytes_of_live_objects): New function.
5981 (Fgarbage_collect): Use it. Record itself in backtrace_list.
5982 Call malloc_probe for the memory profiler.
5983 (syms_of_alloc): Define Qautomatic_gc.
5984 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
5986 (struct backtrace): Move definition...
5987 * lisp.h (struct backtrace): ..here.
5988 (Qautomatic_gc, profiler_memory_running): Declare vars.
5989 (malloc_probe, syms_of_profiler): Declare functions.
5990 * xdisp.c (Qautomatic_redisplay): New constant.
5991 (redisplay_internal): Record itself in backtrace_list.
5992 (syms_of_xdisp): Define Qautomatic_redisplay.
5994 2012-09-25 Eli Zaretskii <eliz@gnu.org>
5995 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
5997 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
5999 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
6001 Prefer POSIX timers if available.
6002 They avoid a race if the timer is too close to the current time.
6003 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
6004 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
6005 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
6007 2012-09-25 Eli Zaretskii <eliz@gnu.org>
6009 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
6010 CHAR_STRING_ADVANCE.
6011 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
6012 STRING_CHAR_ADVANCE.
6014 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
6016 Move Vlibrary_cache to emacs.c and reset before dumping.
6018 * lisp.h (reset_image_types): Declare.
6019 [WINDOWSNT] (Vlibrary_cache): Declare.
6021 * image.c (reset_image_types): New function.
6023 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
6024 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
6025 (Fdump_emacs): Reset Vlibrary_cache and image_types.
6027 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
6028 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
6030 * w32.h (Vlibrary_cache): Do not declare.
6032 2012-09-25 Eli Zaretskii <eliz@gnu.org>
6034 * w32proc.c (sys_signal): Handle all signals defined by the
6035 MS-Windows runtime, not just SIGCHLD. Actually install the signal
6036 handlers for signals supported by Windows. Don't override
6037 term_ntproc as the handler for SIGABRT.
6038 (sigaction): Rewrite to call sys_signal instead of duplicating its
6040 (sys_kill): Improve commentary.
6042 * w32.c (term_ntproc): Accept (and ignore) one argument, for
6043 consistency with a signature of a signal handler. All callers
6045 (init_ntproc): Accept an argument DUMPING. If dumping, don't
6046 install term_ntproc as a signal handler for SIGABRT, as that
6047 should be done by the dumped Emacs.
6049 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
6051 * w32select.c (term_w32select): Protect against repeated
6052 invocation by setting clipboard_owner to NULL after calling
6055 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
6056 and term_ntproc to their modified signatures.
6058 * character.c (char_string, string_char): Remove calls to
6059 MAYBE_UNIFY_CHAR. See the discussion starting at
6060 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
6063 2012-09-25 Chong Yidong <cyd@gnu.org>
6065 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
6067 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
6069 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
6070 when encountering an unknown bytecode.
6072 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
6074 image.c, indent.c: Use bool for booleans.
6075 * dispextern.h (struct image_type): Members valid_p, load, init
6076 now return bool, not int. All uses changed.
6077 * image.c: Omit unnecessary static decls.
6078 (x_create_bitmap_mask, x_build_heuristic_mask):
6079 Return void, not int, since callers don't care about the return value.
6080 (x_create_bitmap_mask, define_image_type, valid_image_p)
6081 (struct image_keyword, parse_image_spec, image_spec_value)
6082 (check_image_size, image_background)
6083 (image_background_transparent, x_clear_image_1)
6084 (postprocess_image, lookup_image, x_check_image_size)
6085 (x_create_x_image_and_pixmap, xbm_image_p)
6086 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
6087 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
6088 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
6089 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
6090 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
6091 (png_image_p, init_png_functions, png_load_body, png_load)
6092 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
6093 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
6094 (init_gif_functions, gif_load, imagemagick_image_p)
6095 (imagemagick_load_image, imagemagick_load, svg_image_p)
6096 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
6098 * nsimage.m (ns_load_image):
6099 * nsterm.m (ns_defined_color):
6100 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
6101 * xfns.c (x_defined_color):
6102 * xterm.c (x_alloc_lighter_color_for_widget)
6103 (x_alloc_nearest_color_1, x_alloc_nearest_color)
6104 (x_alloc_lighter_color):
6105 * indent.c (disptab_matches_widthtab, current_column)
6106 (scan_for_column, string_display_width, indented_beyond_p)
6107 (compute_motion, vmotion, Fvertical_motion):
6108 Use bool for booleans.
6110 2012-09-24 Chong Yidong <cyd@gnu.org>
6112 * chartab.c (Fset_char_table_default): Obsolete function removed.
6114 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6116 Move pid_t related decls out of lisp.h.
6117 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
6118 (interruptible_wait_for_termination):
6119 Move these decls from lisp.h to syswait.h, since they use pid_t.
6120 Needed on FreeBSD; see Herbert J. Skuhra in
6121 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
6122 * callproc.c: Include syswait.h.
6124 gnutls.c, gtkutil.c: Use bool for boolean.
6125 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
6126 (emacs_gnutls_handle_error):
6127 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
6128 (xg_hide_tooltip, xg_create_frame_widgets)
6129 (create_dialog, xg_uses_old_file_dialog)
6130 (xg_get_file_with_chooser, xg_get_file_with_selection)
6131 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
6132 (xg_item_label_same_p, xg_update_menubar)
6133 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
6134 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
6135 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
6136 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
6137 (update_frame_tool_bar, free_frame_tool_bar):
6138 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
6139 * nsmenu.m (ns_update_menubar):
6140 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
6141 * xfns.c (Fx_show_tip) [USE_GTK]:
6142 Use bool for boolean.
6143 * gtkutil.c (xg_update_frame_menubar):
6144 * xmenu.c (update_frame_menubar):
6145 Return void, not int, since caller ignores return value.
6146 * gtkutil.c (xg_change_toolbar_position):
6149 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
6151 * makefile.w32-in (BLOCKINPUT_H): Remove.
6152 (SYSSIGNAL_H): New macro.
6153 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
6154 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
6155 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
6156 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
6157 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
6158 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
6159 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
6160 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
6161 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
6162 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
6163 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
6164 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
6165 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
6166 ($(BLD)/w32xfns.$(O)): Update dependencies.
6168 2012-09-23 Eli Zaretskii <eliz@gnu.org>
6170 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
6171 fatal_error_backtrace.
6173 * w32proc.c (sys_kill): Undo last change: don't do anything when
6174 invoked to deliver SIGABRT to our own process. This is now
6175 handled by emacs_raise.
6177 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
6179 * w32term.c (w32_read_socket): Remove leftover reference to
6180 interrupt_input_pending.
6182 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6184 Do not use SA_NODEFER.
6185 Problem reported by Dani Moncayo in
6186 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
6188 * sysdep.c (emacs_abort): Do not reset signal handler.
6189 * emacs.c (terminate_due_to_signal): Reset signal handler here.
6190 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
6191 wanted even on POSIXish hosts, and it doesn't work on Windows.
6193 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
6195 * xterm.c (x_term_init): Call fixup_locale before and after calling
6196 gtk_init (Bug#12392).
6198 2012-09-23 Chong Yidong <cyd@gnu.org>
6200 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
6201 Vdynamic_library_alist.
6203 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
6204 (Fgnutls_available_p): Caller changed.
6206 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
6207 (Flibxml_parse_xml_region): Likewise.
6209 * dispextern.h (struct image_type): Remove arg from init function.
6211 * image.c (Finit_image_library, lookup_image_type)
6212 (define_image_type): Remove now-unneeded second arg.
6213 (init_xpm_functions, init_png_functions, init_jpeg_functions)
6214 (init_tiff_functions, init_gif_functions, init_svg_functions):
6215 Arglist and w32_delayed_load calling convention changed.
6216 (gs_type): Remove init_gs_functions; there is no such function.
6217 (valid_image_p, make_image): Fix caller to lookup_image_type.
6219 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
6221 Simplify and avoid signal-handling races (Bug#12471).
6223 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
6224 Avoid recursive loop if there's a fatal error in the function itself.
6225 * atimer.c (pending_atimers):
6226 * blockinput.h: Don't include "atimer.h"; no longer needed.
6227 (interrupt_input_pending): Remove. All uses removed.
6228 pending_signals now counts both atimers and ordinary interrupts.
6229 This is less racy than having three separate pending-signal flags.
6230 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
6232 Rename from their upper-case counterparts BLOCK_INPUT,
6233 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
6234 INPUT_BLOCKED_P, and turn into functions. All uses changed.
6235 This makes it easier to access volatile variables more accurately.
6236 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
6237 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
6238 that's more reliable if the code is buggy and sets
6239 interrupt_input_blocked to a negative value. All uses changed.
6240 * atimer.c (deliver_alarm_signal):
6241 Remove. No need to deliver this to the parent; any thread can
6242 handle this signal now. All uses replaced by underlying handler.
6243 * atimer.c (turn_on_atimers):
6244 * dispnew.c (handle_window_change_signal):
6245 * emacs.c (handle_danger_signal):
6246 * keyboard.c (kbd_buffer_get_event):
6247 Don't reestablish signal handler; not needed with sigaction.
6248 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
6250 Rework to avoid unnecessary accesses to volatile variables.
6251 (UNBLOCK_INPUT_TO): Now a function.
6252 (totally_unblock_input, unblock_input): New decls.
6253 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
6254 (init_data): Remove. Necessary stuff now done in init_signal.
6255 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
6256 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
6257 (fatal_error_code): Remove; no longer needed.
6258 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
6259 it doesn't always backtrace. All uses changed. No need to reset
6260 signal to default, since sigaction and/or die does that for us now.
6261 Use emacs_raise (FOO), not kill (getpid (), FOO).
6262 (main): Check more-accurately whether we're dumping.
6263 Move fatal-error setup to sysdep.c
6264 * floatfns.c: Do not include "syssignal.h"; no longer needed.
6265 * gtkutil.c (xg_get_file_name, xg_get_font):
6266 Remove no-longer-needed signal-mask manipulation.
6267 * keyboard.c, process.c (POLL_FOR_INPUT):
6268 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
6269 * keyboard.c (read_avail_input): Remove.
6270 All uses replaced by gobble_input.
6271 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
6272 (kbd_buffer_store_event_hold, gobble_input):
6273 (record_asynch_buffer_change) [USABLE_SIGIO]:
6274 (store_user_signal_events):
6275 No need to mess with signal mask.
6276 (gobble_input): If blocking input and there are terminals, simply
6277 set pending_signals to 1 and return. All hooks changed to not
6278 worry about whether input is blocked.
6279 (process_pending_signals): Clear pending_signals before processing
6280 them, in case a signal comes in while we're processing.
6281 By convention callers now test pending_signals before calling us.
6282 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
6283 New functions, to support changes to blockinput.h.
6284 (handle_input_available_signal): Now extern.
6285 (reinvoke_input_signal): Remove. All uses replaced by
6287 (quit_count): Now volatile, since a signal handler uses it.
6288 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
6289 All callers changed. Block SIGINT only if not already blocked.
6290 Clear sigmask reliably, even if Fsignal returns, which it can.
6291 Omit unnecessary accesses to volatile var.
6292 (quit_throw_to_read_char): No need to restore sigmask.
6293 * keyboard.c (gobble_input, handle_user_signal):
6294 * process.c (wait_reading_process_output):
6295 Call signal-handling code rather than killing ourselves.
6296 * lisp.h: Include <float.h>, for...
6297 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
6298 (pending_signals): Now volatile.
6299 (syms_of_data): Now const if IEEE floating point.
6300 (handle_input_available_signal) [USABLE_SIGIO]:
6301 (terminate_due_to_signal, record_child_status_change): New decls.
6302 * process.c (create_process): Avoid disaster if memory is exhausted
6303 while we're processing a vfork, by tightening the critical section
6305 (send_process_frame, process_sent_to, handle_pipe_signal)
6306 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
6308 (send_process): No need for setjmp/longjmp any more, since the
6309 SIGPIPE stuff is now gone. Instead, report an error if errno
6311 (record_child_status_change): Now extern. PID and W are now args.
6312 Return void, not bool. All callers changed.
6313 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
6314 Remove. All uses removed. This bug should be fixed now in a
6316 (wait_for_termination_1): Use waitpid rather than sigsuspend,
6317 and record the child status change directly. This avoids the
6318 need to futz with the signal mask.
6319 (process_fatal_action): Move here from emacs.c.
6320 (emacs_sigaction_flags): New function, containing
6321 much of what used to be in emacs_sigaction_init.
6322 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
6323 caught by emacs, to make races less likely.
6324 (deliver_process_signal): Rename from handle_on_main_thread.
6326 (BACKTRACE_LIMIT_MAX): Now at top level.
6327 (thread_backtrace_buffer, threadback_backtrace_pointers):
6329 (deliver_thread_signal, deliver_fatal_thread_signal):
6330 New functions, for more-accurate delivery of thread-specific signals.
6331 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
6332 (deliver_arith_signal): Handle in this thread, not
6333 in the main thread, since it's triggered by this thread.
6334 (maybe_fatal_sig): New function.
6335 (init_signals): New arg DUMPING so that we can be more accurate
6336 about whether we're dumping. Caller changed.
6337 Treat thread-specific signals differently from process-general signals.
6338 Block all signals while handling fatal error; that's safer.
6339 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
6341 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
6342 Ignore SIGPIPE unless batch.
6343 (emacs_backtrace): Output backtrace for the appropriate thread,
6344 which is not necessarily the main thread.
6345 * syssignal.h: Include <stdbool.h>.
6346 (emacs_raise): New macro.
6347 * xterm.c (x_connection_signal): Remove; no longer needed
6348 now that we use sigaction.
6349 (x_connection_closed): No need to mess with sigmask now.
6350 (x_initialize): No need to reset SIGPIPE handler here, since
6351 init_signals does this for us now.
6353 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
6355 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
6356 background rect may be larger (Bug#12245).
6358 2012-09-23 Chong Yidong <cyd@gnu.org>
6360 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
6362 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
6364 * .gdbinit: Just stop at fatal_error_backtrace.
6365 See Stefan Monnier's request in
6366 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
6367 Remove no-longer-used query of system type.
6369 2012-09-22 Chong Yidong <cyd@gnu.org>
6371 * search.c (Freplace_match): Doc fix (Bug#12325).
6373 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
6375 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
6376 (Fline_end_position): Doc fix.
6378 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
6380 2012-09-22 Chong Yidong <cyd@gnu.org>
6382 * dispextern.h (struct image_type): Add new slot, storing a type
6383 initialization function.
6385 * image.c (define_image_type): Call the image initializer function
6386 if it is defined. Arguments and return value changed.
6387 (valid_image_p, make_image): Callers changed.
6388 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
6389 (gif_type, imagemagick_type, svg_type, gs_type):
6390 Add initialization functions.
6391 (Finit_image_library): Call lookup_image_type.
6392 (CHECK_LIB_AVAILABLE): Macro deleted.
6393 (lookup_image_type): Call define_image_type here, rather than via
6394 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
6395 (syms_of_image): Move define_image_type calls for xbm_type and
6396 pbm_type to lookup_image_type.
6398 2012-09-22 Eli Zaretskii <eliz@gnu.org>
6400 * keyboard.c (timer_check_2): Move calculation of 'timers' and
6401 'idle_timers' from here ...
6402 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
6403 lists, to avoid infloops when the timer does something stupid,
6404 like reinvoke itself with the same or smaller time-out.
6407 2012-09-22 Martin Rudalics <rudalics@gmx.at>
6409 * window.c (Fsplit_window_internal): Handle only Qt value of
6410 Vwindow_combination_limit separately.
6411 (Qtemp_buffer_resize): New symbol.
6412 (Vwindow_combination_limit): New default value.
6415 2012-09-22 Eli Zaretskii <eliz@gnu.org>
6417 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
6418 the new overlay string. (Bug#10159)
6420 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
6422 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
6423 or that fprintf is async-signal-safe. POSIX doesn't require
6426 2012-09-22 Chong Yidong <cyd@gnu.org>
6428 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
6431 2012-09-22 Kenichi Handa <handa@gnu.org>
6433 * composite.c (composition_reseat_it): Handle the case that a
6434 grapheme cluster is not covered by a single font (Bug#12352).
6436 2012-09-21 Chong Yidong <cyd@gnu.org>
6438 * image.c (define_image_type): Avoid adding duplicate types to
6439 image_types (Bug#12463). Suggested by Jörg Walter.
6441 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6443 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
6444 (print_load_command_name): Add case LC_DATA_IN_CODE.
6445 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
6447 2012-09-21 Glenn Morris <rgm@gnu.org>
6449 * eval.c (Frun_hook_with_args_until_success)
6450 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
6452 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
6454 * fileio.c (Ffile_selinux_context): Only call freecon when
6455 lgetfilecon succeeded.
6456 (Fset_file_selinux_context): Likewise. (Bug#12444)
6458 2012-09-21 Eli Zaretskii <eliz@gnu.org>
6460 * xdisp.c (try_window_reusing_current_matrix): Under bidi
6461 reordering, locate the cursor by calling set_cursor_from_row; if
6462 that fails, clear the desired glyph matrix before returning a
6463 failure indication to the caller. Fixes leaving garbled display
6464 when fast scrolling with a down-key. (Bug#12403)
6465 (compute_stop_pos_backwards): Fix a typo that caused crashes while
6466 scrolling through multibyte text.
6468 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
6470 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
6471 calling mark_vectorlike since that's the one that marks the window.
6472 (mark_discard_killed_buffers): Mark the final cdr.
6473 * window.h (struct window): Move prev/next_buffers to the
6474 non-standard fields.
6475 * window.c (make_window): Initialize prev/next_buffers manually.
6477 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
6479 Omit unused arg EXPECTED from socket hooks.
6480 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
6481 * nsterm.m (ns_term_init):
6482 * termhooks.h (struct terminal.read_socket_hook):
6483 * w32inevt.c (w32_console_read_socket):
6484 * w32term.c (w32_read_socket):
6485 * xterm.c (XTread_socket):
6486 Omit unused arg EXPECTED. All callers changed.
6487 (store_user_signal_events): Return void, not int, since callers no
6488 longer care about the return value. All uses changed.
6490 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
6492 * w32gui.h (XParseGeometry): Do not declare.
6494 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
6496 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
6497 Ignore 'expected'. See Eli Zaretskii in
6498 <http://bugs.gnu.org/12471#8> (last line).
6500 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
6501 (XParseGeometry): Now static. Substitute extremal values for
6502 values that are out of range.
6504 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
6506 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
6508 * nsfns.m (XParseGeometry): Remove.
6509 (Fx_create_frame): Call x_set_offset to correctly interpret
6510 top_pos in geometry.
6512 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
6513 (Fx_parse_geometry): If there is a space in string, call
6514 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
6516 2012-09-17 Eli Zaretskii <eliz@gnu.org>
6518 * search.c (scan_buffer): Use character positions in calls to
6519 region_cache_forward and region_cache_backward, not byte
6520 positions. (Bug#12196)
6522 * w32term.c (w32_read_socket): Set pending_signals to 1, like
6523 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
6525 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
6526 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
6527 emacs_blocked_malloc, now deleted.
6529 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
6531 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
6532 The workaround was for improving performance on Solaris 2.4, but
6533 is getting in the way now. Emacs will still work if someone is
6534 still running Solaris 2.4 in a museum somewhere; Sun dropped
6535 support for Solaris 2.4 in 2003.
6536 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
6537 * process.c (create_process) [HAVE_WORKING_VFORK]:
6538 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
6539 since Emacs no longer uses vfork on that platform.
6541 2012-09-17 Glenn Morris <rgm@gnu.org>
6543 * emacs.c: Use COPYRIGHT.
6545 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
6547 Remove configure's --without-sync-input option (Bug#12450).
6548 When auditing signal-handling in preparation for cleaning it up,
6549 I found that SYNC_INPUT has race conditions and would be a real
6550 pain to fix. Since it's an undocumented and deprecated
6551 configure-time option, now seems like a good time to remove it.
6552 Also see <http://bugs.gnu.org/11080#16>.
6553 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
6554 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
6555 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
6556 (malloc_hysteresis):
6557 (check_depth) [XMALLOC_OVERRUN_CHECK]:
6558 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
6559 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
6560 (dont_register_blocks, bytes_used_when_reconsidered)
6561 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
6562 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
6563 [!SYSTEM_MALLOC && !SYNC_INPUT]:
6564 Remove. All uses removed.
6565 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
6566 implementation, one that depends on whether the new macro
6567 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
6569 * atimer.c (run_timers, handle_alarm_signal):
6570 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
6571 (handle_async_input, process_pending_signals)
6572 (handle_input_available_signal, init_keyboard):
6573 * nsterm.m (ns_read_socket):
6574 * process.c (wait_reading_process_output):
6575 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
6576 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
6578 * xterm.c (XTread_socket):
6580 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
6581 * eval.c (handling_signal): Remove. All uses removed.
6582 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
6583 All uses replaced with the SYNC_INPUT version.
6584 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
6586 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
6589 * font.c (Ffont_shape_gstring): Remove unused local.
6591 2012-09-16 Glenn Morris <rgm@gnu.org>
6593 * Makefile.in (clean): No longer run nextstep's clean.
6595 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
6597 (ns-app): Move here from ns.mk, and simplify.
6598 (clean): Simplify nextstep entry.
6599 * ns.mk: Remove file.
6601 2012-09-17 Kenichi Handa <handa@gnu.org>
6603 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
6604 not covert the last few charactes.
6606 2012-09-16 Kenichi Handa <handa@gnu.org>
6608 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
6609 here, but just check the validity of glyphs in the glyph-string.
6611 2012-09-16 Martin Rudalics <rudalics@gmx.at>
6613 * window.c (Fwindow_parameter, Fset_window_parameter):
6614 Accept any window as argument (Bug#12452).
6616 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
6618 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
6619 to ns_term_init to avoid memory leak.
6621 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
6622 explicit retain/release.
6623 (ns_term_init): Only allow one display. Initialize outerpool and
6626 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
6628 Port _setjmp fix to POSIXish hosts as well as Microsoft.
6629 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
6630 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
6631 the Microsoft problem in a different way, by altering ../nt/config.nt.
6633 2012-09-15 Eli Zaretskii <eliz@gnu.org>
6648 * w16select.c: Remove inclusion of setjmp.h, as it is now included
6649 by lisp.h. This completes removal of setjmp.h inclusion
6650 erroneously announced in the previous commit. (Bug#12446)
6652 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
6655 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
6656 not defined as a macro. The latter happens on MS-Windows.
6659 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
6661 Port better to POSIX hosts lacking _setjmp (Bug#12446).
6662 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
6663 Some instances of '#include <setjmp.h>' removed, if the
6664 only reason for the instance was because "lisp.h" was included.
6665 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
6666 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
6667 and _longjmp with the new symbols. Emacs already uses _setjmp if
6668 available, so this change affects only POSIXish hosts that have
6669 sigsetjmp but not _setjmp, such as some versions of Solaris and
6670 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
6671 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
6672 (png_load_body) [HAVE_PNG]:
6673 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
6674 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
6675 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
6676 since PNG requires jmp_buf. This is the only exception to the
6677 general rule that we now use sys_setjmp and sys_longjmp.
6678 This exception is OK since this code does not change the signal
6679 mask or longjmp out of a signal handler.
6681 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
6683 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
6684 Include "syssignal.h", for 'main_thread'.
6686 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
6688 Avoid out-of-range marker position (Bug#12426).
6689 * insdel.c (replace_range, replace_range_2):
6690 Adjust markers before overlays, as suggested by comments.
6691 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
6692 Remove redundant check before calling offset_intervals.
6694 2012-09-14 Martin Rudalics <rudalics@gmx.at>
6696 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
6697 current buffer (Bug#12387).
6699 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
6701 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
6703 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
6705 Use a more backwards-compatible timer format (Bug#12430).
6706 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
6707 vector element, not from the 4th, since PSECS is now at the end.
6708 (Fcurrent_idle_time): Doc fix.
6710 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
6712 Function to mark objects and remove killed buffers at once.
6713 * alloc.c (discard_killed_buffers): Rename to ...
6714 (mark_discard_killed buffers) ... new name. Add marking
6715 of remaining objects. Fix comment. Adjust users.
6716 (mark_object): Do not touch frame buffer lists here.
6717 * frame.c (delete_frame): Reset frame buffer lists here.
6719 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
6721 Better workaround for GNOME bug when --enable-gcc-warnings.
6722 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
6723 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
6724 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
6726 Simplify SIGIO usage (Bug#12408).
6727 The code that dealt with SIGIO was crufty and confusing, e.g., it
6728 played tricks like "#undef SIGIO" but these tricks were not used
6729 consistently. Simplify mostly by not #undeffing standard symbols,
6730 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
6731 or not as we please) rather than "defined SIGIO" (standard symbol
6732 that we probably shouldn't #undef).
6733 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
6734 Modules that need it can include it.
6735 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
6736 * dispextern.h (ignore_sigio): New decl.
6737 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
6738 unconditionally, since it's now a no-op if !USABLE_SIGIO.
6739 * emacs.c (shut_down_emacs):
6740 * keyboard.c (kbd_buffer_store_event_hold):
6741 Use ignore_sigio rather than invoking 'signal' directly.
6742 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
6744 (FIONREAD, SIGIO): Do not #undef.
6745 (tty_read_avail_input): Use #error rather than a syntax error.
6746 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
6747 for I_PIPE, used by SETUP_SLAVE_PTY.
6748 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
6749 * sysdep.c (croak): Remove; no longer needed. This bit of
6750 temporary code, with Fred N. Fish's comment that it's temporary,
6751 has been in Emacs since at least 1992!
6752 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
6753 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
6754 * syssignal.h (croak): Remove decl.
6755 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
6756 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
6757 now that we're termios-only.
6758 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
6759 * term.c (dissociate_if_controlling_tty): Use #error rather than
6762 Work around GCC and GNOME bugs when --enable-gcc-warnings.
6763 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
6764 to work around GNOME bug 683906.
6765 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
6766 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
6767 This works around GCC bug 54561.
6769 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
6771 More fixes for 'volatile' and setjmp/longjmp.
6772 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
6773 * image.c (struct png_load_context) [HAVE_PNG]: New type.
6774 (png_load_body) [HAVE_PNG]:
6775 (jpeg_load_body) [HAVE_JPEG]:
6776 New function, with most of the old parent function's body.
6777 (png_load) [HAVE_PNG]:
6778 (jpeg_load) [HAVE_JPEG]:
6779 Invoke the new function, to avoid longjmp munging our locals.
6780 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
6781 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
6782 longjmp is passed 2, as the C standard doesn't guarantee this.
6783 Instead, store the failure code into mgr->failure_code.
6785 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6787 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
6788 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
6789 (syms_of_keyboard): Remove support for unread-command-char.
6791 2012-09-12 Eli Zaretskii <eliz@gnu.org>
6793 * w32proc.c (sys_kill): If PID is our process ID and the signal is
6794 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
6795 violation. (Bug#12426)
6797 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
6799 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
6801 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6803 * eval.c: Add `inhibit-debugger'.
6804 (Qinhibit_debugger): New symbol.
6805 (call_debugger): Bind it instead of Qdebug_on_error.
6806 (maybe_call_debugger): Test Vinhibit_debugger.
6807 (syms_of_eval): Define inhibit-debugger.
6808 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
6809 (syms_of_xdisp): Remove inhibit-debug-on-message.
6811 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
6813 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
6814 If a nonvolatile local variable is written before a _longjmp to
6815 the frame containing the variable, and is read after the _longjmp,
6816 the value read is indeterminate. Some local variables of type
6817 'struct handler' and 'struct catchtag' are used in this way, so
6818 mark each of their slots as volatile if the slot can be set before
6819 _longjmp and read afterwards.
6820 * lisp.h (struct handler): var and chosen_clause are now volatile.
6821 (struct catchtag): val, next, and pdlcount are now volatile.
6823 * bidi.c (bidi_push_it, bidi_pop_it):
6824 * fns.c (copy_hash_table):
6825 * image.c (define_image_type):
6826 * keyboard.c (kbd_buffer_store_event_hold):
6827 * process.c (Fprocess_send_eof):
6828 * xfaces.c (x_create_gc) [HAVE_NS]:
6829 * xgselect.c (xg_select):
6830 Prefer assignment to memcpy when either will do.
6832 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
6833 Use pointer-to-a-pointer to simplify and avoid a NILP check each
6834 time an item is removed. No need to mark this function 'inline';
6835 the compiler knows better than we do.
6837 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
6839 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
6840 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
6841 to change_frame_size (Bug#12388).
6842 (windowDidResize:): Pass YES to updateFrameSize.
6844 * nsterm.h: Add delay parameter to updateFrameSize.
6846 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
6848 Discard killed buffers from deleted window and frame objects.
6849 This reduces an amount of references to killed buffers and
6850 helps GC to reclaim them faster.
6851 * alloc.c (discard_killed_buffers): New function.
6852 (mark_object): Use it for deleted windows and frames.
6853 (mark_object): If symbol's value is set up for a killed buffer
6854 or deleted frame, restore its global binding.
6855 * data.c (swap_in_global_binding): Add GC notice.
6856 (swap_in_symval_forwarding): Use convenient set_blv_where.
6857 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
6858 * window.h: ... to here.
6860 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
6862 Convenient macro to check whether the buffer is live.
6863 * buffer.h (BUFFER_LIVE_P): New macro.
6864 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
6865 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
6867 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6869 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
6870 composition cases (Bug#12364).
6872 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
6873 overhang of succeeding glyphs overlapping box cursor.
6875 * w32term.c (x_draw_glyph_string): Likewise.
6877 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
6879 Simplify, document, and port floating-point (Bug#12381).
6880 The porting part of this patch fixes bugs on non-IEEE platforms
6881 with frexp, ldexp, logb.
6882 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
6884 * floatfns.c: Simplify discussion of functions that Emacs doesn't
6885 support, by removing commented-out code and briefly listing the
6886 C89 functions excluded. The commented-out stuff was confusing
6887 maintenance, e.g., we thought we needed cbrt but it was commented out.
6888 (logb): Remove decl; no longer needed.
6889 (isfinite): New macro, if not already supplied.
6890 (isnan): Don't replace any existing macro.
6891 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
6892 are present on all C89 platforms.
6893 (Ffrexp): Do not special-case zero, as frexp does the right thing
6895 (Flogb): Do not use logb, as it doesn't have the desired meaning
6896 on hosts that use non-base-2 floating point. Instead, stick with
6897 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
6898 frexp, to avoid getting an unspecified result.
6900 * xdisp.c (Qinhibit_debug_on_message): Now static.
6902 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
6904 * nsterm.m (ns_update_begin): Set clip path to whole view by using
6905 NSBezierPath (Bug#12131).
6907 2012-09-10 Chong Yidong <cyd@gnu.org>
6909 * fns.c (Fdelq, Fdelete): Doc fix.
6911 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
6913 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
6914 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
6916 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
6918 * lisp.h (make_lisp_ptr): New macro to replace XSET.
6919 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
6922 2012-09-09 Eli Zaretskii <eliz@gnu.org>
6924 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
6925 left fringe if the window has a left margin. This avoids leaving
6926 traces of the cursor because its leftmost pixel is not drawn over.
6928 * dispnew.c (update_window_line): When the left margin area of a
6929 screen line is updated, set the redraw_fringe_bitmaps_p flag of
6930 that screen line. (Bug#12277)
6932 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
6934 Assume C89 or later for math functions (Bug#12381).
6935 This simplifies the code, and makes it a bit smaller and faster,
6936 and (most important) makes it easier to clean up signal handling
6937 since we can stop worring about floating-point exceptions in
6938 library code. That was a problem before C89, but the problem
6939 went away many years ago on all practical Emacs targets.
6940 * data.c, image.c, lread.c, print.c:
6941 Don't include <math.h>; no longer needed.
6942 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
6943 might be autoconfigured, as that never happens.
6945 * doprnt.c (DBL_MAX_10_EXP):
6946 * print.c (DBL_DIG):
6947 Remove. C89 or later always defines these.
6948 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
6949 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
6950 (arith_error, domain_error, domain_error2):
6951 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
6952 no longer needed -- we simply return what C returns. All uses removed.
6953 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
6955 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
6956 Remove. All uses expanded, as these macros are no longer used
6957 more than once and are now more trouble than they're worth.
6958 (Ftan): Use tan, not sin / cos.
6959 (Flogb): Assume C89 frexp.
6960 (fmod_float): Assume C89 fmod.
6961 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
6962 (init_floatfns): Remove. All uses removed.
6964 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
6966 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
6967 compositeToPoint for OSX < 10.6 (Bug#12390).
6969 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
6971 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
6972 This produces more-accurate results.
6974 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
6976 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
6977 changes (Bug#12088).
6979 2012-09-08 Chong Yidong <cyd@gnu.org>
6981 * syntax.c (Fstring_to_syntax): Doc fix.
6983 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
6985 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
6986 in the internal border.
6987 (x_set_window_size): Remove static variables and their usage.
6988 (ns_redraw_scroll_bars): Fix NSTRACE arg.
6989 (ns_after_update_window_line, ns_draw_fringe_bitmap):
6990 Remove fringe/internal border adjustment (Bug#11052).
6991 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
6992 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
6993 (ns_fix_rect_ibw): Remove.
6994 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
6995 (ns_dumpglyphs_box_or_relief): Ditto.
6996 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
6998 (ns_dumpglyphs_image): Ditto.
6999 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
7001 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
7002 their usage. Add fringe_extended_p and its use as in other terms.
7003 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
7004 scroll bar was removed.
7005 (updateFrameSize): New function.
7006 (windowDidResize): Move code to updateFrameSize and call it.
7008 * nsterm.h (EmacsView): Add updateFrameSize.
7010 2012-09-07 Chong Yidong <cyd@gnu.org>
7012 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
7014 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
7016 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
7018 More signal-handler cleanup (Bug#12327).
7019 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
7020 Problem introduced when merging patches. Noted by Eli Zaretskii in
7021 <http://bugs.gnu.org/12327#67>.
7022 * floatfns.c: Comment fix.
7023 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
7024 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
7025 and anyway the declaration is harmless even if SIGDANGER is not defined.
7026 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
7027 defined BROKEN_FIONREAD). systty.h formerly did this, but other
7028 source files not surprisingly expected syssignal.h to define, or
7029 not define, SIGIO, and it's cleaner to do it that way, for consistency.
7030 Include <sys/ioctl.h>, for FIONREAD.
7031 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
7032 This eliminates a problem whereby other files mysteriously had
7033 to include "syssignal.h" before including "systty.h" if they
7034 wanted to use "#ifdef SIGIO".
7036 2012-09-07 Eli Zaretskii <eliz@gnu.org>
7038 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
7040 * w32.c (sigemptyset): Empty the set.
7041 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
7043 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
7045 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
7047 * alloc.c (mark_buffer): Revert unsafe marking optimization.
7048 (mark_object): Likewise for frame objects.
7050 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
7052 * syssignal.h (handle_on_main_thread): Always declare,
7053 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
7054 This ports to platforms without HAVE_PTHREAD.
7056 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
7058 Signal-handler cleanup (Bug#12327).
7059 Emacs's signal handlers were written in the old 4.2BSD style with
7060 sigblock and sigmask and so forth, and this led to some
7061 inefficiencies and confusion. Rewrite these to use
7062 pthread_sigmask etc. without copying signal sets around. Also,
7063 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
7064 'signal', and instead use functions that do not attempt to take
7065 over the system name space. This patch causes Emacs's text
7066 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
7067 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
7068 Do not include <signal.h> or "syssignal.h", as these
7069 modules do not use signals.
7070 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
7071 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
7072 Do not include <signal.h>, as "syssignal.h" does that for us now.
7073 * atimer.c (sigmask_atimers): New function.
7074 (block_atimers, unblock_atimers): New functions,
7075 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
7077 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
7078 no longer needed here.
7079 * emacs.c (main): Inspect existing signal handler with sigaction,
7080 so that there's no need to block and unblock SIGHUP.
7081 * sysdep.c (struct save_signal): New member 'action', replacing
7082 old member 'handler'.
7083 (save_signal_handlers, restore_signal_handlers):
7084 Use sigaction instead of 'signal' to save and restore.
7085 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
7086 New function. All users of 'signal' modified to use set_sighandler
7087 if they're writeonly, and to use sys_signal if they're read+write.
7088 (emacs_sigaction_init, forwarded_signal): New functions.
7089 (sys_signal): Remove. All uses replaced by calls to sigaction
7090 and emacs_sigaction_init, or by direct calls to 'signal'.
7091 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
7092 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
7093 all uses replaced by pthread_sigmask etc. calls.
7094 * syssignal.h: Include <signal.h>.
7095 (emacs_sigaction_init, forwarded_signal): New decls.
7096 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
7097 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
7098 (sigmask, sys_sigmask): Remove; no longer needed.
7099 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
7100 (sigblock, sigunblock, sigfree):
7101 (sigsetmask) [!defined sigsetmask]:
7102 Remove. All uses replaced by pthread_sigmask.
7103 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
7104 no longer need to be replaced, and its typical old uses
7105 are now done via emacs_sigaction_init and sigaction.
7106 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
7107 (sys_sigdel): Remove; unused.
7108 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
7110 2012-09-06 Eli Zaretskii <eliz@gnu.org>
7112 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
7113 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
7115 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
7117 Explicitly mark buffer_defaults and buffer_local_symbols.
7118 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
7119 mark_local_symbols here.
7120 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
7121 since special buffers aren't marked here any more.
7122 (allocate_buffer): Chain new buffer with all_buffers here...
7123 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
7125 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
7126 (syms_of_buffer): Remove staticpro of the above.
7127 (init_buffer_once): Set names for buffer_defaults and
7128 buffer_local_symbols.
7130 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
7132 Use bool for booleans in font-related modules.
7133 * font.c (font_intern_prop, font_style_to_value)
7134 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
7135 (generate_otf_features, font_check_otf_features, font_check_otf)
7136 (font_match_p, font_list_entities, font_at):
7137 * fontset.c (fontset_id_valid_p, reorder_font_vector
7138 (fontset_find_font, Fset_fontset_font)
7139 (face_suitable_for_char_p) [0]:
7140 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
7141 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
7142 (m17n_flt_initialized, ftfont_shape_by_flt):
7143 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
7144 * nsfont.m (nsfont_draw):
7145 * w32font.c (w32font_draw):
7146 * w32term.c (x_draw_glyphless_glyph_string_foreground):
7147 Use bool for booleans.
7148 * font.h: Adjust to above API changes.
7149 (struct font, struct font_driver, struct font_driver_list):
7150 Use bool for booleans.
7151 (struct font): Remove useless member encoding_type.
7153 * fontset.c, xftfont.c: Omit unnecessary static decls.
7155 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
7157 * alloc.c (mark_object): Revert window marking code
7158 since it's unsafe for the Fset_window_configuration.
7160 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
7162 Fix race conditions with signal handlers and errno (Bug#12327).
7163 Be more systematic about preserving errno whenever a signal
7164 handler returns, even if it's not in the main thread. Do this by
7165 renaming signal handlers to distinguish between signal delivery
7166 and signal handling. All uses changed.
7167 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
7168 * data.c (deliver_arith_signal): Rename from arith_error.
7169 * dispnew.c (deliver_window_change_signal): Rename from
7170 window_change_signal.
7171 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
7172 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
7173 * keyboard.c (deliver_input_available_signal): Rename from
7174 input_available_signal.
7175 (deliver_user_signal): Rename from handle_user_signal.
7176 (deliver_interrupt_signal): Rename from interrupt_signal.
7177 * process.c (deliver_pipe_signal): Rename from send_process_trap.
7178 (deliver_child_signal): Rename from sigchld_handler.
7179 * atimer.c (handle_alarm_signal):
7180 * data.c (handle_arith_signal):
7181 * dispnew.c (handle_window_change_signal):
7182 * emacs.c (handle_fatal_signal, handle_danger_signal):
7183 * keyboard.c (handle_input_available_signal):
7184 * keyboard.c (handle_user_signal, handle_interrupt_signal):
7185 * process.c (handle_pipe_signal, handle_child_signal):
7186 New functions, with the actual signal-handling code taken from the
7187 original respective signal handlers, sans the sporadic attempts to
7188 preserve errno, since that's now done by handle_on_main_thread.
7189 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
7190 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
7191 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
7193 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
7194 Move initialization of main_thread to sysdep.c's init_signals.
7195 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
7196 our usage, and simplifies the mainline code.
7197 (record_child_status_change): New static function, as a helper
7198 for handle_child_signal, and with most of the old child handler's
7200 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
7201 (handle_child_signal): Use the above.
7202 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
7203 Moved here from emacs.c.
7204 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
7205 code moved here from emacs.c's main function.
7206 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
7207 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
7208 This lets callers save and restore errno properly.
7210 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7212 Remove redundant or unused things here and there.
7213 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
7214 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
7215 * editfns.c (Fcompare_buffer_substrings): Likewise.
7216 * frame.h (struct terminal, struct font_driver_list):
7217 Remove redundant declarations.
7218 * window.h (Qleft, Qright): Likewise.
7220 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7222 Do not mark objects from deleted buffers, windows and frames.
7223 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
7224 (mark_object): Likewise for windows and frames.
7226 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
7228 * alloc.c (valid_lisp_object_p): Treat killed buffers,
7229 buffer_defaults and buffer_local_symbols as valid objects.
7230 Return special value to denote them.
7232 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
7234 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
7235 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
7236 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
7237 (file_name_absolute_p, Fsubstitute_in_file_name):
7238 (check_executable, check_writable, Ffile_accessible_directory_p)
7239 (Fset_file_selinux_context, Fdefault_file_modes)
7240 (Finsert_file_contents, choose_write_coding_system)
7241 (Fwrite_region, build_annotations, a_write, e_write)
7243 * filelock.c (boot_time_initialized, get_boot_time)
7244 (get_boot_time_1, lock_file_1, within_one_second):
7245 * floatfns.c (in_float):
7246 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
7247 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
7248 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
7249 * lisp.h (struct Lisp_Hash_Table.cmpfn):
7250 * window.c (compare_window_configurations):
7251 Use bool for booleans.
7252 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
7253 (Fdefault_file_modes): Now mode_t, not int, for modes.
7254 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
7255 (internal_delete_file): Now returns void, not a (boolean) int,
7256 since nobody was looking at the return value.
7257 * lisp.h, window.h: Adjust to above API changes.
7259 * xdisp.c (set_message): Simplify and reindent last change.
7261 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
7263 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
7265 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
7267 * eval.c (call_debugger): Make the function non-static so that we
7268 can call it from set_message.
7270 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
7271 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
7273 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7275 Give more-useful info on a fatal error (Bug#12328).
7276 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
7277 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
7278 of doing the work ourselves.
7279 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
7280 do most of the work.
7281 (fatal_error_backtrace): New function, taken from the guts
7282 of the old fatal_error_signal, but with a new option to output
7284 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
7285 info about the signal than just its number.
7286 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
7287 * sysdep.c: Include <execinfo.h>
7288 (emacs_backtrace): New function, taken partly from the previous
7289 code of the 'die' function.
7290 (emacs_abort): Call fatal_error_backtrace rather than abort.
7292 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
7294 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
7295 eager (load-time) macro-expansion.
7296 * lisp.mk (lisp): Add macroexp.
7298 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7300 Simplify redefinition of 'abort' (Bug#12316).
7301 Do not try to redefine the 'abort' function. Instead, redo
7302 the code so that it calls 'emacs_abort' rather than 'abort'.
7303 This removes the need for the NO_ABORT configure-time macro
7304 and makes it easier to change the abort code to do a backtrace.
7305 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
7306 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
7307 Remove; sysdep.c's emacs_abort now takes its place.
7308 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
7309 'abort' changed to use 'emacs_abort'.
7310 * msdos.c (dos_abort) [defined abort]: Remove; not used.
7311 (abort) [!defined abort]: Rename to ...
7312 (emacs_abort): ... new name.
7313 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
7314 the place of the old 'abort' in emacs.c.
7315 * w32.c, w32fns.c (abort): Do not #undef.
7316 * w32.c (emacs_abort): Rename from w32_abort.
7318 2012-09-04 Eli Zaretskii <eliz@gnu.org>
7320 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
7321 offsets[j].dv, since the y axis of the screen coordinates points
7322 down, while the y axis of the font definition coordinates points
7323 up. This fixes display of Arabic diacritics such as KASRA and
7324 KASRATAN. (Bug#11860)
7326 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
7328 Be more systematic about _setjmp vs setjmp.
7329 * alloc.c (test_setjmp, mark_stack):
7330 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
7331 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
7332 (png_load, my_error_exit, jpeg_load):
7333 * process.c (send_process_trap, send_process):
7334 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
7335 The underscored versions are up to 30x faster on some hosts.
7336 Formerly, the code used setjmp+longjmp sometimes and
7337 _setjmp+_longjmp at other times, with no particular reason to
7338 prefer setjmp+longjmp.
7340 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
7342 Fix minor problem found by static checking.
7343 * buffer.c (Fdelete_all_overlays): Return nil.
7345 2012-09-03 Martin Rudalics <rudalics@gmx.at>
7347 * buffer.c (Fdelete_all_overlays): New function.
7349 2012-09-03 Chong Yidong <cyd@gnu.org>
7351 * gtkutil.c: Add extern decl for Qxft.
7353 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
7355 * emacs.c, eval.c: Use bool for boolean.
7356 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
7357 (malloc_using_checking) [DOUG_LEA_MALLOC]:
7358 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
7359 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
7360 (main, decode_env_path, Fdaemon_initialized):
7361 * eval.c (call_debugger, Finteractive_p, interactive_p):
7362 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
7363 (maybe_call_debugger, Fbacktrace):
7364 * process.c (read_process_output, exec_sentinel):
7365 Use bool for booleans.
7366 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
7367 All callers changed.
7368 * eval.c (interactive_p): Omit always-true boolean argument
7369 EXCLUDE_SUBRS_P. All callers changed.
7370 * dispextern.h, lisp.h: Reflect above API changes.
7371 * firstfile.c (dummy): Use the address of 'main', whose signature
7372 won't change, instead of the address of 'initialize', whose
7373 signature just changed from int to bool.
7374 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
7375 * msdos.c (fatal_error_in_progress): ... from here.
7376 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
7378 (redisplay_internal, unwind_redisplay): Simply clear
7379 REDISPLAYING_P when unwinding, instead of saving its previous,
7380 always-false value and then restoring it.
7382 Clean up some extern decls.
7383 Mostly, this hoists extern decls out of .c files and into .h files.
7384 That way, we're more likely to catch errors if the interfaces change.
7385 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
7386 declare xg_mark_data.
7387 * dispextern.h (x_frame_parm_handlers):
7389 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
7390 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
7391 (Qultra_bold, Qoblique, Qitalic):
7392 Move extern decl here from .c file.
7393 * alloc.c (xg_mark_data) [USE_GTK]:
7395 * eval.c (Qlexical_binding):
7396 * fns.c (time) [!HAVE_UNISTD_H]:
7397 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
7398 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
7399 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
7400 * lread.c (Qinternal_interpreter_environment):
7401 * minibuf.c (Qbuffer):
7402 * process.c (QCfamily, QCfilter):
7403 * widget.c (free_frame_faces):
7404 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
7405 * xfont.c (x_clear_errors):
7406 * xterm.c (x_frame_parm_handlers):
7407 Remove now-redundant extern decls.
7408 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
7409 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
7411 * xfaces.c: Remove unnecessary static decls.
7412 * xterm.c (updating_frame): Remove decl of nonexistent object.
7414 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
7415 when building globals.h, as the objects that are not built on
7416 this host are not needed to compile C files on this host.
7418 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
7420 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
7422 * frame.h: Add missing prototype for x_wm_set_size_hint.
7424 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
7426 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
7427 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
7428 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
7429 (Fsubstitute_command_keys):
7430 * editfns.c (region_limit, find_field, Fconstrain_to_field)
7431 (save_excursion_save, save_excursion_restore)
7432 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
7433 (format_time_string, general_insert_function)
7434 (make_buffer_string, make_buffer_string_both)
7435 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
7436 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
7437 (copy_text, insert_1, insert_1_both, insert_from_string)
7438 (insert_from_string_before_markers, insert_from_string_1)
7439 (insert_from_buffer, insert_from_buffer_1, replace_range)
7440 (replace_range_2, del_range_1, del_range_byte, del_range_both)
7441 (del_range_2, modify_region):
7442 * intervals.c (intervals_equal, balance_possible_root_interval)
7443 (adjust_intervals_for_insertion, merge_properties_sticky)
7444 (graft_intervals_into_buffer, lookup_char_property)
7445 (adjust_for_invis_intang, set_point_both)
7446 (get_property_and_range, compare_string_intervals)
7447 (set_intervals_multibyte_1, set_intervals_multibyte):
7448 * keyboard.c (decode_timer):
7449 Use bool for boolean.
7450 * intervals.h, lisp.h, systime.h: Reflect above API changes.
7451 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
7453 2012-09-02 Chong Yidong <cyd@gnu.org>
7455 * keymap.c (push_key_description): Print M-TAB as C-M-i
7458 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
7460 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
7461 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
7462 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
7463 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
7464 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
7465 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
7466 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
7468 2012-09-01 Eli Zaretskii <eliz@gnu.org>
7470 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
7471 more than one grapheme cluster passed to the shaper: compute the
7472 offset adjustment values separately for each cluster. (Bug#11860)
7474 * image.c: Restore mistakenly removed inclusion of w32.h. Without
7475 it, GCC doesn't see prototypes of w32_delayed_load, and complains
7476 about implicit conversions from integer to pointer.
7478 2012-09-01 Daniel Colascione <dancol@dancol.org>
7480 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
7481 system used too early.
7483 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
7485 Better seed support for (random).
7486 * emacs.c (main): Call init_random.
7487 * fns.c (Frandom): Set the seed from a string argument, if given.
7488 Remove long-obsolete Gentzel cruft.
7489 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
7490 (init_random): New function.
7492 2012-09-01 Daniel Colascione <dancol@dancol.org>
7494 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
7495 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
7496 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
7497 x_wm_set_size_hint, x_query_colors, x_real_positions,
7498 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
7499 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
7500 all of which have been moved to common code.
7502 * xfaces.c: Include TERM_HEADER instead of listing all possible
7503 window-system headers.
7505 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
7508 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
7509 directly accessing frame internals.
7511 * w32font.h: Include font.h. Define syms_of_w32font and
7514 * process.c: Include TERM_HEADER instead of listing all possible
7515 window-system headers.
7517 * nsterm.h: Remove declarations now in frame.h.
7518 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
7520 * menu.c: Include TERM_HEADER instead of listing all possible
7521 window-system headers.
7523 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
7526 * keyboard.c: Include TERM_HEADER instead of listing all possible
7527 window-system headers.
7529 * image.c: Include TERM_HEADER instead of listing all possible
7530 window-system headers. Declare Vlibrary_cache when compiling for
7533 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
7534 window system declarations.
7536 * frame.h: Move common functions here: set_frame_menubar,
7537 x_set_window_size, x_sync, x_get_focus_frame,
7538 x_set_mouse_position, x_set_mouse_pixel_position,
7539 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
7540 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
7541 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
7542 x_activate_menubar, x_real_positions, x_bitmap_icon,
7543 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
7546 * frame.c: Include TERM_HEADER instead of listing all possible
7547 window-system headers.
7549 * font.c: Include TERM_HEADER instead of listing all possible
7550 window-system headers.
7552 * emacs.c: Include TERM_HEADER.
7554 * dispnew.c: Include TERM_HEADER instead of listing all possible
7555 window-system headers.
7557 * ccl.h: Include character.h.
7559 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
7560 the current window system; include in list of objects to link into
7563 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7565 Remove mark_ttys function and fix tty_display_info initialization.
7566 * lisp.h (mark_ttys): Remove prototype.
7567 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
7568 to mark_ttys because all possible values of 'top_frame' slot are
7569 the frames which are reachable from Vframe_list.
7570 * term.c (mark_ttys): Remove.
7571 (init_tty): Safely initialize 'top_frame' slot with Qnil.
7573 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7575 Change struct frame bitfields from unsigned char to unsigned.
7576 * frame.h (struct frame): Change type of 'display_preempted',
7577 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
7578 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
7579 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
7580 bitfields from unsigned char to unsigned.
7582 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
7584 Remove unused member of struct x_output and struct w32_output.
7585 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
7586 * w32term.h (struct w32_output): Likewise.
7588 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
7590 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
7591 does not become zero (Bug#12234).
7593 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
7595 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
7596 for GCC 4.7.1 x86-64.
7598 2012-08-30 Glenn Morris <rgm@gnu.org>
7600 * lread.c (init_lread): For out-of-tree builds, only add the
7601 source directory's site-lisp dir to the load-path if it exists,
7602 consistent with in-tree builds. (Bug#12302)
7604 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
7606 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
7607 button_values to NULL. Call setStykeMask so dialogs get a close button.
7608 (windowShouldClose:): Set window_closed.
7609 (dealloc): New member, free button_values.
7610 (process_dialog:): Make member function. Remove window argument,
7611 replace window with self. Count buttons and allocate and store values
7613 (addButton:value:row:): value is int with the name tag. Call setTag
7614 with tag. Remove return self, declare return value as void.
7615 (addString:row:): Remove return self, declare return value as void.
7616 (addSplit): Remove return self, declare return value as void.
7617 (clicked:): Remove return self, declare return value as void.
7618 Set dialog_return to button_values[seltag]. Code formatting change.
7619 (initFromContents:isQuestion:): Adjust call to process_dialog.
7620 Code formatting change.
7621 (timeout_handler:): Set timer_fired to YES.
7622 (runDialogAt:): Set timer_fired to NO.
7623 Handle click on close button as quit.
7625 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
7626 Add window_closed and button_values. Add void as return value for
7627 add(Button|String|Split). addButton takes int instead of Lisp_Object.
7628 Add process_dialog as new member.
7630 2012-08-28 Eli Zaretskii <eliz@gnu.org>
7632 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
7633 is not one of the heaps we manage. (Bug#12242)
7635 2012-08-28 Glenn Morris <rgm@gnu.org>
7637 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
7639 2012-08-28 Martin Rudalics <rudalics@gmx.at>
7641 * window.c (Fset_window_configuration): Remove handling of
7642 auto-buffer-name window parameter. Install revision of reverted
7645 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7647 Do not allow to set major mode for a dead buffer.
7648 * buffer.c (Fset_buffer_major_mode): Signal an error
7649 if the buffer is dead.
7650 (Fother_buffer, other_buffer_safely): Remove redundant
7653 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7655 Always use set_buffer_if_live to restore original buffer at unwind.
7656 * buffer.h (record_unwind_current_buffer): New function.
7657 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
7658 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
7659 * undo.c, window.c: Adjust users.
7660 * buffer.c (set_buffer_if_live): Fix comment.
7662 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
7664 Fix usage of set_buffer_internal.
7665 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
7666 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
7667 * coding.c (decode_coding): Omit redundant test.
7668 * fileio.c (decide_coding_unwind): Likewise.
7669 * fns.c (secure_hash): Likewise.
7670 * insdel.c (modify_region): Likewise.
7671 * keyboard.c (command_loop_1): Likewise.
7672 * print.c (PRINTFINISH): Likewise.
7673 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
7675 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
7677 * dispnew.c: Use bool for boolean.
7678 (frame_garbaged, display_completed, delayed_size_change)
7679 (fonts_changed_p, add_window_display_history)
7680 (add_frame_display_history, verify_row_hash)
7681 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
7682 (row_equal_p, realloc_glyph_pool)
7683 (allocate_matrices_for_frame_redisplay)
7684 (showing_window_margins_p)
7685 (adjust_frame_glyphs_for_frame_redisplay)
7686 (build_frame_matrix_from_leaf_window, make_current)
7687 (mirrored_line_dance, mirror_line_dance, update_frame)
7688 (update_window_tree, update_single_window)
7689 (check_current_matrix_flags, update_window, update_text_area)
7690 (update_window_line, set_window_update_flags, scrolling_window)
7691 (update_frame_1, scrolling, buffer_posn_from_coords)
7692 (do_pending_window_change, change_frame_size)
7693 (change_frame_size_1, sit_for):
7694 Use bool for boolean.
7695 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
7696 and remove last int (actually boolean) argument, which was always 0.
7697 All callers changed.
7698 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
7699 * dispextern.h (struct composition_it): Use bool for boolean.
7700 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
7701 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
7702 * dired.c (file_name_completion):
7703 Use bool for boolean. (This was missed in an earlier change.)
7705 2012-08-27 Martin Rudalics <rudalics@gmx.at>
7707 * window.c (Fset_window_configuration): Revert first part of
7710 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
7712 * nsterm.h (NSPanel): New class variable dialog_return.
7714 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
7715 Initialize dialog_return.
7716 (windowShouldClose:): Use stop instead of stopModalWithCode.
7717 (clicked:): Ditto, and also set dialog_return (Bug#12258).
7718 (timeout_handler:): Use stop instead of abortModal. Send a dummy
7720 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
7723 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
7725 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
7726 * composite.c (find_composition, composition_gstring_p)
7727 (composition_reseat_it, find_automatic_composition):
7728 * data.c (let_shadows_buffer_binding_p)
7729 (let_shadows_global_binding_p, set_internal, make_blv)
7730 (Fmake_variable_buffer_local, Fmake_local_variable)
7731 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
7732 (cons_to_signed, arith_driver):
7733 * dbusbind.c (xd_in_read_queued_messages):
7734 * dired.c (directory_files_internal, file_name_completion):
7735 Use bool for booleans.
7736 * dired.c (file_name_completion):
7737 * process.h (fd_callback):
7738 Omit int (actually boolean) argument. It wasn't being used.
7740 * composite.h, lisp.h: Reflect above API changes.
7742 * cmds.c, coding.c: Use bool for booleans.
7743 * cmds.c (move_point, Fself_insert_command):
7744 * coding.h (struct composition status, struct coding_system):
7745 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
7746 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
7747 (emacs_mule_char, decode_coding_emacs_mule)
7748 (encode_coding_emacs_mule, detect_coding_iso_2022)
7749 (decode_coding_iso_2022, encode_invocation_designation)
7750 (encode_designation_at_bol, encode_coding_iso_2022)
7751 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
7752 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
7753 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
7754 (encode_coding_raw_text, detect_coding_charset)
7755 (decode_coding_charset, encode_coding_charset, detect_eol)
7756 (detect_coding, get_translation_table, produce_chars)
7757 (consume_chars, reused_workbuf_in_use)
7758 (make_conversion_work_buffer, code_conversion_save)
7759 (decode_coding_object, encode_coding_object)
7760 (detect_coding_system, char_encodable_p)
7761 (Funencodable_char_position, code_convert_region)
7762 (code_convert_string, code_convert_string_norecord)
7763 (Fset_coding_system_priority):
7764 * fileio.c (Finsert_file_contents):
7765 Use bool for booleans.
7766 * coding.h, lisp.h: Reflect above API changes.
7767 * coding.c: Remove unnecessary static function decls.
7768 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
7769 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
7770 not a boolean 'int', since callers never look at the return value.
7771 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
7772 * coding.h (decoding_buffer_size, encoding_buffer_size)
7773 (emacs_mule_string_char): Remove unused extern decls.
7774 (struct iso_2022_spec, struct coding_system):
7775 Use 'unsigned int : 1' for boolean fields, since there's more than one.
7776 (struct emacs_mule_spec): Remove unused field 'full_support'.
7777 All initializations removed.
7778 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
7780 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
7782 Fix spare memory change (Bug#12286).
7783 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
7784 (valid_lisp_object_p): Likewise.
7786 2012-08-27 Martin Rudalics <rudalics@gmx.at>
7788 * window.c (Fset_window_configuration): Record any window's old
7789 buffer if it's replaced (see Bug#8789). If the new current
7790 buffer doesn't appear in the selected window, go to its old
7793 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
7795 Special MEM_TYPE_SPARE to denote reserved memory.
7796 * alloc.c (enum mem_type): New memory type.
7797 (refill_memory_reserve): Use new type for spare memory.
7798 This prevents live_cons_p and live_string_p from incorrect
7799 detection of uninitialized objects from spare memory as live.
7801 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
7804 * Makefile.in (.PHONY): versioclean -> versionclean.
7806 Remove unused external symbols.
7807 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
7808 * window.c (Qwindow_valid_p, decode_valid_window):
7809 Now static, not extern.
7810 * data.c (Qinterval): Remove; unused.
7811 (syms_of_data): Do not define 'interval'.
7812 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
7813 * window.h (decode_valid_window):
7816 * character.c, charset.c, chartab.c: Use bool for booleans.
7817 * character.c (lisp_string_width, string_count_byte8)
7818 (string_escape_byte8):
7819 * charset.c (charset_map_loaded, load_charset_map, read_hex):
7820 (load_charset_map_from_file, map_charset_chars)
7821 (Fdefine_charset_internal, define_charset_internal)
7822 (Fdeclare_equiv_charset, find_charsets_in_text)
7823 (Ffind_charset_region, char_charset, Fiso_charset):
7824 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
7825 (sub_char_table_set, sub_char_table_set_range)
7826 (char_table_set_range, optimize_sub_char_table)
7827 (map_sub_char_table):
7828 Use bool for boolean.
7829 * character.c (str_to_unibyte): Omit last boolean argument; it was
7830 always 0. All callers changed.
7831 * character.h, charset.h: Adjust to match previous changes.
7832 * character.h (char_printable_p): Remove decl of nonexistent function.
7833 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
7834 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
7835 are all boolean, so make them single-bit bitfields.
7837 * lisp.h (ASET): Remove attempt to detect side effects.
7838 It was meant to be temporary and it often doesn't work,
7839 because when IDX has side effects the behavior of IDX==IDX
7840 is undefined. See Stefan Monnier in
7841 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
7843 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
7845 * lisp.h (functionp): New function (extracted from Ffunctionp).
7846 (FUNCTIONP): Use it.
7847 * eval.c (Ffunctionp): Use it.
7849 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
7851 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
7852 as that's faster and simpler than static storage. Don't bother
7853 with the g_main_context_query overhead if g_main_context_pending
7854 says no events are pending.
7855 (gfds, gfds_size): Remove these static vars.
7856 (xgselect_initialize): Remove; no longer needed.
7857 All uses and decls removed.
7859 * emacs.c (fatal_error_signal_hook): Remove.
7860 All uses removed. This leftover from old code was always 0.
7862 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
7863 * casefiddle.c (casify_object, casify_region):
7864 * casetab.c (set_case_table):
7865 * category.c, category.h (word_boundary_p):
7866 * category.h (CHAR_HAS_CATEGORY):
7867 Use bool for booleans, instead of int.
7869 2012-08-25 Eli Zaretskii <eliz@gnu.org>
7871 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
7873 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
7875 On assertion failure, print backtrace if available.
7876 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
7877 (die) [ENABLE_CHECKING]: Print a backtrace if available.
7878 * Makefile.in (LIB_EXECINFO): New macro.
7881 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
7882 * bytecode.c (exec_byte_code):
7883 * callint.c (check_mark, Fcall_interactively):
7884 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
7885 (getenv_internal, sync_process_alive, call_process_exited):
7886 * lisp.h (USE_SAFE_ALLOCA):
7887 Use bool for booleans, instead of int.
7888 * lisp.h, process.h: Adjust prototypes to match above changes.
7889 * callint.c (Fcall_interactively): Don't assume the mark's
7890 offset fits in 'int'.
7892 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
7894 * buffer.c, buffer.h: Use bool for boolean.
7895 * buffer.c (reset_buffer_local_variables)
7896 (buffer_lisp_local_variables, Fset_buffer_modified_p)
7897 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
7898 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
7899 (overlay_touches_p, overlay_strings, Foverlay_put)
7900 (report_overlay_modification, call_overlay_mod_hooks):
7901 (mmap_enlarge, mmap_set_vars):
7902 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
7903 Use bool for booleans, instead of int.
7904 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
7905 since the 1-or-0 return value is always ignored anyway.
7906 (mmap_initialized_p):
7907 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
7908 * buffer.h, lisp.h: Adjust prototypes to match above changes.
7910 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
7912 * bidi.c: Use bool for boolean.
7913 This is a bit more readable, and makes the text segment of bidi.o
7914 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
7915 Presumably it's faster too.
7916 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
7918 (bidi_cache_find_level_change, bidi_cache_iterator_state)
7919 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
7920 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
7921 (bidi_explicit_dir_char, bidi_level_of_next_char)
7922 (bidi_find_other_level_edge, bidi_move_to_visually_next):
7923 Use bool for booleans, instead of int.
7924 * dispextern.h (bidi_init_it, bidi_paragraph_init)
7925 (bidi_unshelve_cache): Adjust decls to match code.
7927 2012-08-23 Martin Rudalics <rudalics@gmx.at>
7929 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
7932 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
7934 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
7935 * atimer.h: Include <stdbool.h>.
7937 2012-08-22 Dan Nicolaescu <dann@gnu.org>
7939 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
7940 compile time tests instead of run time tests on systems that do
7942 (FRAME_MAC_P): Remove leftover from deleted code.
7943 * frame.c (syms_of_frame): Remove leftover from deleted code.
7945 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
7947 * nsterm.m (insertText:): Don't clear modifiers if code is space.
7949 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
7951 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
7952 Otherwise, the compiler complains about (A?B:C) where B is void
7953 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
7954 (fontset_add): Return void, for FONTSET_ADD.
7956 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
7958 * alloc.c: Use bool for booleans.
7959 (gc_in_progress, abort_on_gc)
7960 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
7961 (dont_register_blocks) [GC_MALLOC_CHECK]:
7962 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
7963 (check_string_bytes, make_specified_string, memory_full)
7964 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
7965 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
7966 (mark_stack, valid_pointer_p, make_pure_string)
7967 (Fgarbage_collect, survives_gc_p, gc_sweep):
7968 Use bool for booleans, instead of int.
7969 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
7970 Remove unused local.
7971 * alloc.c (PURE_POINTER_P):
7972 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
7973 * editfns.c (Fformat):
7974 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
7976 * fns.c (sweep_weak_table):
7977 * lisp.h (suppress_checking, push_message, survives_gc_p)
7978 (make_pure_string, gc_in_progress, abort_on_gc):
7979 * lread.c (readchar, read1):
7980 * print.c (Fprin1_to_string):
7981 * xdisp.c (push_message):
7982 Use bool for booleans affected directly or indirectly by
7985 Make recently-introduced setters macros.
7986 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
7987 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
7988 (set_fontset_default, set_fontset_fallback): Rename from their
7989 upper-case counterparts, and make them functions rather than macros.
7990 This is more consistent with the other recently-introduced setters.
7991 These don't need to be inline, since they're local.
7993 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
7995 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
7996 the loop (Bug#12247).
7998 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8000 * lisp.h (vcopy): Use memcpy rather than our own loop.
8001 This fixes a performance regression introduced by the recent
8002 addition of vcopy. This means 'vcopy' will need to be modified
8003 for a copying collector, but that's OK. Also, tighten the
8004 checking in the assertion.
8006 2012-08-21 Eli Zaretskii <eliz@gnu.org>
8008 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
8009 components for RTL text (Bug#11860). Adjust X-OFFSET of each
8010 non-base glyph for the width of the base character, according to
8011 what x_draw_composite_glyph_string_foreground expects.
8012 Generate WADJUST value according to composition_gstring_width's
8013 expectations, to produce correct width of the composed character.
8014 Reverse the sign of the DU offset produced by ScriptPlace.
8016 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
8018 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
8020 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8022 Avoid direct writes to contents member of struct Lisp_Vector.
8023 * lisp.h (vcopy): New function to copy data into vector.
8024 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
8025 * fns.c (Ffillarray): Use ASET.
8026 * keyboard.c (timer_check_2): Use AREF and ASET.
8027 (append_tool_bar_item, Frecent_keys): Use vcopy.
8028 * lread.c (read_vector): Use ASET.
8029 * msdos.c (Frecent_doskeys): Use vcopy.
8030 * xface.c (Finternal_copy_lisp_face): Use vcopy.
8031 (Finternal_merge_in_global_face): Use ASET and vcopy.
8032 * xfont.c (xfont_list_pattern): Likewise.
8034 2012-08-21 Martin Rudalics <rudalics@gmx.at>
8036 * window.c (Fwindow_point): For the selected window always return
8037 the position of its buffer's point.
8038 (Fset_window_point): For the selected window always go in its
8039 buffer to the specified position.
8041 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
8043 Setter macros for fontsets.
8044 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
8045 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
8046 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
8049 2012-08-20 Glenn Morris <rgm@gnu.org>
8051 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
8052 Don't assume that `ln -f' works.
8054 2012-08-20 Eli Zaretskii <eliz@gnu.org>
8056 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
8057 and later about non-assignments with no effect. See discussion at
8058 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
8061 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8063 Inline setter functions for Lisp_Objects slots of struct specbinding.
8064 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
8067 2012-08-20 Martin Rudalics <rudalics@gmx.at>
8069 * window.c (select_window): Always make selected window's buffer
8072 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8074 Use AREF and ASET for docstrings of category tables.
8075 * category.h (CATEGORY_DOCSTRING): Use AREF.
8076 (SET_CATEGORY_DOCSTRING): Use ASET.
8077 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
8079 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8081 Inline setter functions for hash table members.
8082 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
8083 (set_hash_hash, set_hash_index): Rename with _slot suffix.
8084 (set_hash_key_and_value, set_hash_index, set_hash_next)
8085 (set_hash_hash): New functions.
8086 * charset.c, fns.c: Adjust users.
8088 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
8090 Inline getter and setter functions for per-buffer values.
8091 * buffer.h (per_buffer_default, set_per_buffer_default)
8092 (per_buffer_value, set_per_buffer_value): New functions.
8093 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
8094 * buffer.c, data.c: Adjust users.
8096 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
8098 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
8100 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
8102 Rely on <config.h> + <unistd.h> to declare 'environ',
8103 as gnulib does this if the system doesn't.
8104 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
8105 Remove declaration. MS-Windows declares it on stdlib.h which is
8106 included by conf_post.h.
8107 * emacs.c (environ) [DOUG_LEA_MALLOC]:
8108 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
8109 * vm-limit.c: Include <unistd.h>, for 'environ'.
8111 * unexaix.c, unexcoff.c: Include "mem-limits.h".
8112 (start_of_data): Remove decl; mem-limits.h provides it.
8114 * xdisp.c (handle_invisible_prop): Make it a bit faster
8115 and avoid a gcc -Wmaybe-uninitialized diagnostic.
8117 2012-08-19 Chong Yidong <cyd@gnu.org>
8119 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
8122 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
8124 * .gdbinit: Use call instead of set when calling a function in the
8127 * data.c (set_internal): Don't use set_blv_found.
8128 (Fkill_local_variable): Likewise.
8130 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
8132 * nsfont.m (ns_ascii_average_width): Ensure the string
8133 ascii_printable is initialized with a null-terminated character
8134 array. Otherwise, it can contain undesired extra characters.
8136 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
8138 port new setting code to Sun C 5.8 2005/10/13
8139 * chartab.c, lisp.h (char_table_set, char_table_set_range):
8140 Return void, not Lisp_Object. Otherwise, the compiler
8141 complains about (A?B:C) where B is void and C is Lisp_Object
8142 when compiling CHAR_TABLE_SET, due to the recent change to
8143 the API of sub_char_table_set_contents.
8145 2012-08-18 Chong Yidong <cyd@gnu.org>
8147 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
8148 for the string case (Bug#3874).
8150 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
8152 * buffer.h (BSET): Remove (Bug#12215).
8153 Replace all uses with calls to new setter functions.
8154 (bset_bidi_paragraph_direction, bset_case_canon_table)
8155 (bset_case_eqv_table, bset_directory, bset_display_count)
8156 (bset_display_time, bset_downcase_table)
8157 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
8158 (bset_last_selected_window, bset_local_var_alist)
8159 (bset_mark_active, bset_point_before_scroll, bset_read_only)
8160 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
8162 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
8163 (bset_auto_fill_function, bset_auto_save_file_format)
8164 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
8165 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
8166 (bset_cache_long_line_scans, bset_case_fold_search)
8167 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
8168 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
8169 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
8170 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
8171 (bset_header_line_format, bset_indicate_buffer_boundaries)
8172 (bset_indicate_empty_lines, bset_invisibility_spec)
8173 (bset_left_fringe_width, bset_major_mode, bset_mark)
8174 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
8175 (bset_name, bset_overwrite_mode, bset_pt_marker)
8176 (bset_right_fringe_width, bset_save_length)
8177 (bset_scroll_bar_width, bset_scroll_down_aggressively)
8178 (bset_scroll_up_aggressively, bset_selective_display)
8179 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
8180 (bset_word_wrap, bset_zv_marker):
8181 * category.c (bset_category_table):
8182 * syntax.c (bset_syntax_table):
8183 New setter functions.
8185 * process.h (PSET): Remove (Bug#12215).
8186 Replace all uses with calls to new setter functions.
8187 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8188 (PROCESS_INLINE): New macro.
8189 (pset_childp): New setter function.
8190 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
8191 * process.c (PROCESS_INLINE):
8192 Define to EXTERN_INLINE, so that the corresponding functions
8193 are compiled into code.
8194 (pset_buffer, pset_command, pset_decode_coding_system)
8195 (pset_decoding_buf, pset_encode_coding_system)
8196 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
8197 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
8198 (pset_type, pset_write_queue): New setter functions.
8200 * window.h (WSET): Remove (Bug#12215).
8201 Replace all uses with calls to new setter functions.
8202 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8203 (WINDOW_INLINE): New macro.
8204 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
8205 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
8206 (wset_total_lines, wset_vertical_scroll_bar)
8207 (wset_window_end_pos, wset_window_end_valid)
8208 (wset_window_end_vpos): New setter functions.
8209 * window.c (WINDOW_INLINE):
8210 Define to EXTERN_INLINE, so that the corresponding functions
8211 are compiled into code.
8212 (wset_combination_limit, wset_dedicated, wset_display_table)
8213 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
8214 (wset_new_normal, wset_new_total, wset_next_buffers)
8215 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
8216 (wset_prev_buffers, wset_right_fringe_width)
8217 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
8218 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
8219 (wset_window_parameters):
8220 * xdisp.c (wset_base_line_number, wset_base_line_pos)
8221 (wset_column_number_displayed, wset_region_showing):
8222 New setter functions.
8224 * termhooks.h (TSET): Remove (Bug#12215).
8225 Replace all uses with calls to new setter functions.
8226 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8227 (TERMHOOKS_INLINE): New macro.
8228 (tset_charset_list, tset_selection_alist): New setter functions.
8229 * terminal.c (TERMHOOKS_INLINE):
8230 Define to EXTERN_INLINE, so that the corresponding functions
8231 are compiled into code.
8232 (tset_param_alist): New setter function.
8234 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
8236 * keyboard.h (KSET): Remove (Bug#12215).
8237 Replace all uses with calls to new setter functions.
8238 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8239 (KEYBOARD_INLINE): New macro.
8240 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
8241 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
8242 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
8243 New setter functions.
8244 * keyboard.c (KEYBOARD_INLINE):
8245 Define to EXTERN_INLINE, so that the corresponding functions
8246 are compiled into code.
8247 (kset_echo_string, kset_kbd_queue)
8248 (kset_keyboard_translate_table, kset_last_prefix_arg)
8249 (kset_last_repeatable_command, kset_local_function_key_map)
8250 (kset_overriding_terminal_local_map, kset_real_last_command)
8251 (kset_system_key_syms): New setter functions.
8253 * frame.h (FSET): Remove (Bug#12215).
8254 Replace all uses with calls to new setter functions.
8255 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8256 (FRAME_INLINE): New macro.
8257 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
8258 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
8259 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
8260 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
8261 (fset_param_alist, fset_root_window, fset_scroll_bars)
8262 (fset_selected_window, fset_title, fset_tool_bar_items)
8263 (fset_tool_bar_position, fset_tool_bar_window): New functions.
8264 * frame.c (FRAME_INLINE):
8265 Define to EXTERN_INLINE, so that the corresponding functions
8266 are compiled into code.
8267 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
8269 A few more naming-convention fixes for getters and setters.
8270 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
8271 and rename from buffer_overlays_set_before.
8272 (set_buffer_overlays_after): Move here from buffer.h, and rename
8273 from buffer_overlays_set_after.
8274 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
8276 (set_buffer_intervals): Rename from buffer_set_intervals.
8277 * intervals.c (set_interval_object): Move here from intervals.h,
8278 and rename from interval_set_object.
8279 (set_interval_left): Move here from intervals.h, and rename from
8281 (set_interval_right): Move here from intervals.h, and rename from
8283 (copy_interval_parent): Move here from intervals.h, and rename from
8284 interval_copy_parent.
8285 * intervals.h (set_interval_parent): Rename from interval_set_parent.
8286 (set_interval_plist): Rename from interval_set_plist.
8287 Return void, not Lisp_Object, since no caller uses the result.
8288 * lisp.h (string_intervals): Rename from string_get_intervals.
8289 (set_string_intervals): Rename from string_set_intervals.
8291 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
8292 (set_char_table_contents): Rename from char_table_set_contents.
8293 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
8294 All uses changed. See the end of
8295 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
8297 * lisp.h (CSET): Remove (Bug#12215).
8298 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
8299 (set_char_table_purpose): New functions,
8300 replacing CSET. All uses changed. For example, replace
8301 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
8302 "set_char_table_parent (char_table, parent);".
8303 The old version was confusing because it used the same name
8304 'parent' for two different things.
8306 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
8308 Functions to get and set Lisp_Object fields of buffer-local variables.
8309 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
8310 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
8311 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
8312 * data.c, eval.c, frame.c: Adjust users.
8314 2012-08-17 Chong Yidong <cyd@gnu.org>
8316 * xfaces.c (merge_face_vectors): If the target font specfies a
8317 font spec, make the font's attributes take precedence over
8318 directly-specified attributes.
8319 (merge_face_ref): Recognize :font.
8321 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
8323 Do not use memcpy for copying intervals.
8324 * intervals.c (reproduce_interval): New function.
8325 (reproduce_tree, reproduce_tree_obj): Use it.
8326 (reproduce_tree_obj): Remove prototype.
8328 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
8330 * lisp.h (duration_to_sec_usec): Remove unused decl.
8332 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
8334 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
8335 to an allocated instance of NSString, not to the class itself.
8337 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
8339 * makefile.w32-in (C_CTYPE_H): New macro.
8340 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
8341 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
8342 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
8344 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
8346 Use ASCII tests for character types.
8347 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
8349 Don't include <ctype.h>; was not needed.
8350 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
8351 * sysdep.c, xfaces.c:
8352 Include <c-ctype.h> instead of <ctype.h>.
8353 * nsterm.m: Include <c-ctype.h>.
8354 * charset.c (read_hex):
8355 * doc.c (Fsnarf_documentation):
8356 * fileio.c (IS_DRIVE) [WINDOWSNT]:
8357 (DRIVE_LETTER) [DOS_NT]:
8358 (Ffile_name_directory, Fexpand_file_name)
8359 (Fsubstitute_in_file_name):
8360 * font.c (font_parse_xlfd, font_parse_fcname):
8361 * frame.c (x_set_font_backend):
8362 * gtkutil.c (xg_get_font):
8363 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
8364 * nsimage.m (hexchar):
8365 * nsterm.m (ns_xlfd_to_fontname):
8366 * sysdep.c (system_process_attributes):
8367 * xfaces.c (hash_string_case_insensitive):
8368 Use C-locale tests instead of locale-specific tests for character
8369 types, since we want the ASCII interpretation here, not the
8370 interpretation suitable for whatever happens to be the current locale.
8372 2012-08-16 Martin Rudalics <rudalics@gmx.at>
8374 Consistently check windows for validity/liveness
8375 (Bug#11984, Bug#12025, Bug#12026).
8376 * lisp.h (CHECK_VALID_WINDOW): New macro.
8377 * window.c (decode_window): Rename to decode_live_window.
8378 (decode_valid_window, Fwindow_valid_p): New functions.
8379 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
8380 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
8381 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
8382 (Fwindow_prev_sibling, Fwindow_combination_limit)
8383 (Fset_window_combination_limit, Fwindow_use_time)
8384 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
8385 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
8386 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
8387 (Fwindow_hscroll, Fset_window_hscroll)
8388 (Fwindow_redisplay_end_trigger)
8389 (Fset_window_redisplay_end_trigger, Fwindow_edges)
8390 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
8391 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
8392 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
8393 (Fwindow_end, Fset_window_point, Fset_window_start)
8394 (Fpos_visible_in_window_p, Fwindow_line_height)
8395 (Fwindow_dedicated_p, Fset_window_dedicated_p)
8396 (Fwindow_prev_buffers, Fset_window_prev_buffers)
8397 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
8398 (Fset_window_parameter, Fwindow_display_table)
8399 (Fset_window_display_table, Fdelete_other_windows_internal)
8400 (Fset_window_buffer, Fset_window_new_total)
8401 (Fset_window_new_normal, Fdelete_window_internal)
8402 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
8403 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
8404 (Fwindow_scroll_bars): Check whether argument window is a valid or
8405 live window. Update doc-strings.
8406 (syms_of_window): New symbol Qwindow_valid_p.
8407 * keyboard.c (Fposn_at_x_y): Check whether argument
8408 frame_or_window denotes a valid window.
8410 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
8412 Fix previous char table change.
8413 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
8414 * chartab.c (optimize_sub_char_table): Likewise.
8416 2012-08-16 Chong Yidong <cyd@gnu.org>
8418 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
8420 * xfont.c (xfont_open):
8421 * xftfont.c (xftfont_open): Set the font's max_width field.
8423 * nsfont.m (nsfont_open): Similar to the Xft backend, set
8424 min_width to space_width and average_width to the average over
8425 printable ASCII characters.
8426 (ns_char_width): Code cleanup.
8427 (ns_ascii_average_width): New utility function.
8429 * font.h (struct font): Update comments.
8431 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
8433 Simple interface to set Lisp_Object fields of character tables.
8434 * lisp.h (CSET): New macro.
8435 (char_table_set_extras, char_table_set_contents)
8436 (sub_char_table_set_contents): New function.
8437 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
8438 * syntax.c: Adjust users.
8440 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
8442 * eval.c (eval_sub): Bind lexical-binding.
8443 * lread.c (Qlexical_binding): Make non-static.
8445 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
8447 * nsmenu.m (popupSession): Remove.
8448 (pop_down_menu): Remove endModalSession.
8449 (timeout_handler:): New method.
8450 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
8451 Call runModalForWindow. Check timer_fired when it returns.
8452 If not set, cancel timer and break out of loop.
8453 Otherwise loop again, with a new timeout.
8455 * nsterm.m: Include fcntl.h if present.
8456 (fd_entry, t_readfds, inNsSelect): Remove.
8457 (select_writefds, select_valid, select_timeout, selfds)
8458 (select_mutex, apploopnr): Add.
8459 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
8460 Otherwise call kbd_buffer_store_event.
8461 (ns_send_appdefined): Remove release of fd_entry.
8462 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
8463 Increment and decrement apploopnr.
8464 (ns_select): If no file descriptors, just do a NSTimer.
8465 Otherwise copy read/write masks and start select thread (fd_handler).
8466 Start main loop and wait for application defined event.
8467 Inform select thread to stop selecting after main loop is exited.
8468 (ns_term_init): Create selfds pipe and set non-blocking.
8469 Initialize select_mutex. Start the select thread (fd_handler).
8470 (fd_handler:): Loop forever, wait for info from the main thread
8471 to either start or stop selecting. When select returns, send
8472 and appdefined event.
8473 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
8474 If not call kbd_buffer_store_event.
8476 * nsterm.h (EmacsApp): fd_handler takes id argument.
8477 (EmacsDialogPanel): Add timer_fired and timeout_handler.
8479 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
8481 2012-08-15 Eli Zaretskii <eliz@gnu.org>
8483 * region-cache.c (move_cache_gap): Update gap_len using the actual
8484 growth of the boundaries array. Do not change cache_len.
8487 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8489 Generalize and cleanup font subsystem checks.
8490 * font.h (FONT_DEBUG, font_assert): Remove.
8491 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
8492 Change font_assert to eassert. Use eassert where appropriate.
8494 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
8496 * gtkutil.c (xg_get_font): Use pango_units_to_double.
8498 2012-08-15 Chong Yidong <cyd@gnu.org>
8500 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
8501 When using the new font chooser, use gtk_font_chooser_get_font_desc to
8502 extract the font descriptor instead of just the font name.
8503 In that case, return a font spec instead of a string.
8504 (x_last_font_name): Move to this file from xfns.c.
8506 * xfns.c (Fx_select_font): The return value can also be a font
8507 spec. Move x_last_font_name management to gtkutil.c.
8509 * xfaces.c: Make font weight and style symbols non-static.
8511 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
8513 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
8516 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
8518 * alloc.c (Fgarbage_collect): Use plural form consistently.
8520 2012-08-14 Eli Zaretskii <eliz@gnu.org>
8522 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
8523 iteration through the command loop. Fixes a problem whereby mouse
8524 movements are ignored until the first mouse click.
8526 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8528 Use bool, not int, for Lisp booleans.
8529 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
8530 makes Emacs a bit smaller and presumably a bit faster.
8531 * lisp.h: Include <stdbool.h>.
8532 (struct Lisp_Boolfwd, defvar_bool):
8533 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
8534 * regex.c [!emacs]: Include <stdbool.h>.
8535 (false, true): Remove; <stdbool.h> does this for us now.
8537 2012-08-14 Chong Yidong <cyd@gnu.org>
8539 * character.c (Fcharacterp): Doc fix (Bug#12076).
8541 * data.c (Findirect_variable): Doc fix (Bug#11040).
8543 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
8545 * editfns.c (Fformat): Doc fix (Bug#12059).
8546 (Fsave_current_buffer): Doc fix (Bug#11542).
8548 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
8550 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
8553 2012-08-14 Martin Rudalics <rudalics@gmx.at>
8555 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
8556 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
8557 * minibuf.c (choose_minibuf_frame, read_minibuf):
8558 * w32fns.c (x_create_tip_frame):
8559 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
8560 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
8562 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8564 * intervals.c (offset_intervals): Remove obsolete comment.
8566 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
8568 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
8570 2012-08-14 Gergely Risko <gergely@risko.hu>
8572 * coding.c (decode_coding): Record buffer modification before
8573 disabling undo_list (Bug#11773).
8575 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8577 Revert and cleanup some recent overlay changes.
8578 * buffer.h (enum overlay_type): Remove.
8579 (buffer_get_overlays, buffer_set_overlays): Likewise.
8580 (buffer_set_overlays_before, buffer_set_overlays_after):
8581 New function. Adjust users.
8582 (unchain_both): Add eassert.
8584 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
8586 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
8588 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
8590 * gtkutil.c (xg_mark_data): Don't assume C99.
8592 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
8594 * gtkutil.c (xg_frame_tb_info): New struct.
8595 (TB_INFO_KEY): New define.
8596 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
8597 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
8598 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
8600 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
8601 is up to date. Otherwise store new data.
8602 (free_frame_tool_bar): Free xg_frame_tb_info if present.
8604 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
8606 Use KSET for write access to Lisp_Object members of struct kboard.
8607 * keyboard.h (KSET): New macro.
8608 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
8609 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
8610 * xterm.c: Adjust users.
8612 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
8614 Use BSET for write access to Lisp_Object members of struct buffer.
8615 * buffer.h (BSET): New macro.
8616 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
8617 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
8618 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
8619 * window.c, xdisp.c, xfns.c: Adjust users.
8621 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
8623 * lread.c (syms_of_lread): Initialize Vlexical_binding.
8625 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
8627 * nsterm.m (not_in_argv): New function.
8628 (application:openFile, application:openTempFile:):
8629 (application:openFileWithoutUI:, application:openFiles:): Open file
8630 if not_in_argv returns non-zero (bug#12171).
8632 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
8633 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
8634 Define for Gtk+ versions less than 3.2.
8635 (xg_get_font_name): Use those functions/macros here.
8636 Reported by Frans Oilinki <moilinki@gmail.com>.
8638 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8640 * unexmacosx.c (copy_data_segment): Copy initialized data in
8641 statically linked libraries from input file rather than memory.
8643 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
8644 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
8645 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
8647 2012-08-10 Glenn Morris <rgm@gnu.org>
8649 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
8650 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
8652 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8654 Fix last change to allow compilation with low optimization levels.
8655 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
8656 Reported by Jan Djärv <jan.h.d@swipnet.se>.
8658 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8660 Use common inline syntax in intervals.h.
8661 * intervals.h (INTERVALS_INLINE): New macro.
8662 Change all users from LISP_INLINE.
8664 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8666 Define Qnone once for all platforms.
8667 * frame.c (Qnone): Define here.
8668 (syms_of_frame): DEFSYM it.
8669 * lisp.h (Qnone): New declaration.
8670 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
8671 * xfns.c: Remove duplication. Adjust users.
8673 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
8675 Remove unused macros from intervals.h.
8676 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
8677 * intervals.c: Adjust comment.
8679 2012-08-10 Eli Zaretskii <eliz@gnu.org>
8681 * w32fns.c <w32_unicode_gui>: New static variable.
8682 (globals_of_w32fns): Initialize it according to os_subtype.
8683 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
8686 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
8687 Eli Zaretskii <eliz@gnu.org>
8689 Fix bug #10299 with Unicode characters sent by customized
8690 keyboards created by MSKLC.
8691 * w32fns.c (INIT_WINDOW_CLASS): New macro.
8692 (w32_init_class): Use it to initialize the Emacs class with either
8693 ANSI or Unicode API calls.
8694 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
8696 (w32_wnd_proc): If the character code sent by WM_CHAR or
8697 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
8698 original message. Call DefWindowProcW on NT and later.
8700 2012-08-10 Glenn Morris <rgm@gnu.org>
8702 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
8704 * lisp.h (DIRECTORY_SEP): Let configure set it.
8706 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
8708 Use TSET for write access to Lisp_Object slots of struct terminal.
8709 * termhooks.h (TSET): New macro.
8710 * coding.c, terminal.c, xselect.c: Adjust users.
8712 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
8714 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
8715 the failing expression, include them in the error message.
8716 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
8717 * lisp.h (internal_condition_case_n): Update declaration.
8719 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8721 Inline functions to examine and change buffer overlays.
8722 * buffer.c (unchain_both): New function.
8723 * buffer.h (buffer_get_overlays, buffer_set_overlays):
8724 (buffer_has_overlays): New function.
8725 (enum overlay_type): New enum.
8726 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
8727 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
8729 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8731 Inline functions to examine and change buffer intervals.
8732 * alloc.c (mark_interval_tree): Remove.
8733 (MARK_INTERVAL_TREE): Simplify.
8734 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
8735 * intervals.c (buffer_balance_intervals): New function.
8736 (graft_intervals_into_buffer): Adjust indentation.
8737 (set_intervals_multibyte): Simplify.
8738 * buffer.h (BUF_INTERVALS): Remove.
8739 (buffer_get_intervals, buffer_set_intervals): New function.
8740 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
8741 * intervals.c, textprop.c: Adjust users.
8743 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8745 Inline functions to examine and change string intervals.
8746 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
8747 (string_get_intervals, string_set_intervals): New function.
8748 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
8749 * lread.c, print.c, textprop.c: Adjust users.
8751 2012-08-08 Glenn Morris <rgm@gnu.org>
8753 * lisp.mk (lisp): Remove language/persian.elc.
8755 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8758 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
8759 (NULL_INTERVAL_P): Likewise. Adjust users.
8760 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
8761 Adjust comment. Move under #if 0.
8762 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
8763 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
8765 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
8767 Check total length of intervals with eassert.
8768 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
8769 * intervals.c: Change all users to eassert.
8771 2012-08-07 Eli Zaretskii <eliz@gnu.org>
8773 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
8774 Rename fields to match removal of FGET and WGET and disuse of
8775 INTERNAL_FIELD in Lisp_Cons.
8777 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8779 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
8780 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
8781 name since all xname users are fixed long time ago. Do not
8783 (set_symbol_name, set_symbol_function, set_symbol_plist):
8784 (set_symbol_next, set_overlay_plist): New function.
8785 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
8786 (struct Lisp_Overlay): Likewise.
8787 (CVAR, MVAR, SVAR): Remove.
8788 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
8789 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
8790 * xterm.c: Adjust users.
8791 * .gdbinit: Change to use name field of struct Lisp_Symbol
8794 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8796 Basic functions to set Lisp_Object and pointer slots of intervals.
8797 * intervals.h (interval_set_parent, interval_set_object):
8798 (interval_set_left, interval_set_right, interval_set_plist):
8799 (interval_copy_parent): New function.
8800 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
8801 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
8803 (INTERVAL_SIZE): Remove. Adjust users.
8804 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
8806 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8808 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
8809 * process.h (PGET): Remove.
8810 (struct Lisp_Process): Do not use INTERNAL_FIELD.
8811 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
8813 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8815 Drop WGET and revert read access to Lisp_Objects slots of struct window.
8816 * window.h (WGET): Remove.
8817 (struct window): Do not use INTERNAL_FIELD.
8818 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
8819 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
8820 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
8821 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
8822 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
8825 2012-08-07 Chong Yidong <cyd@gnu.org>
8827 * window.c (Fwindow_edges, Fwindow_pixel_edges)
8828 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
8829 (Fdelete_window_internal): Signal an error if the window is not on
8830 a live frame (Bug#12025).
8832 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
8834 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
8835 * frame.h (FGET): Remove.
8836 (struct frame): Do not use INTERNAL_FIELD.
8837 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
8838 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
8839 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
8840 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
8842 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
8844 * w32.c: Silence compiler warnings.
8845 (map_w32_filename): Remove unused variable `is_fat'.
8846 (chase_symlinks): Add parentheses around expression.
8848 2012-08-06 Glenn Morris <rgm@gnu.org>
8850 * sysdep.c: Respect BROKEN_GETWD.
8852 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
8853 Let configure handle it.
8854 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
8856 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8858 Use GCALIGNMENT where appropriate.
8859 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
8860 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
8861 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
8863 2012-08-06 Eli Zaretskii <eliz@gnu.org>
8865 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
8866 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
8868 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
8870 * buffer.h (struct buffer): Revert `indirections' to a simple int;
8871 that should be sufficient for everyone.
8873 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
8875 * keyboard.c (timer_check_2): Add break so timer_check returns next
8878 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8880 Fix Windows build errors introduced after converting to WGET and WSET.
8881 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
8882 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
8884 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
8886 * nsterm.m (ns_frame_rehighlight): Use FSET.
8888 * nsmenu.m (ns_update_menubar): Use FSET.
8890 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8892 Separate read and write access to Lisp_Object slots of Lisp_Process.
8893 * process.h (PGET, PSET): New macros similar to AREF and ASET.
8894 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
8896 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8898 Separate read and write access to Lisp_Object slots of struct window.
8899 * window.h (WGET, WSET): New macros similar to AREF and ASET.
8900 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
8901 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
8902 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
8903 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
8904 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
8907 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8909 Fix Windows build errors introduced after converting to FGET and FSET.
8910 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
8911 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
8912 (w32_judge_scroll_bars): Change to use FSET.
8913 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
8915 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8917 Fix replacement typo.
8918 * window.c (replace_window): Set root_window instead of
8919 selected_window. This fixes a total window subsystem
8920 malfunction reported by Bastien Guerry <bzg@gnu.org>.
8922 2012-08-06 Glenn Morris <rgm@gnu.org>
8924 * lisp.mk (lisp): Add language/persian.elc.
8926 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8928 Separate read and write access to Lisp_Object slots of struct frame.
8929 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
8930 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
8931 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
8932 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
8933 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
8935 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
8937 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
8939 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
8941 Generalize common compile-time constants.
8942 * lisp.h (header_size, bool_header_size, word_size): Now here.
8943 (struct Lisp_Vector): Add comment.
8944 (struct Lisp_Bool_Vector): Move up to define handy constants.
8945 (VECSIZE, PSEUDOVECSIZE): Simplify.
8946 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
8947 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
8948 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
8949 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
8950 * xfont.c, xmenu.c: Use word_size where appropriate.
8952 2012-08-05 Lawrence Mitchell <wence@gmx.li>
8954 * search.c (Freplace_match): Treat \? in the replacement text
8955 literally (Bug#8161).
8957 2012-08-05 Chong Yidong <cyd@gnu.org>
8959 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
8960 * frame.c (Vdelete_frame_functions):
8961 * emacs.c (Vkill_emacs_hook): Doc fix.
8963 2012-08-04 Eli Zaretskii <eliz@gnu.org>
8965 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
8966 --with-x-toolkit=no builds.
8967 Reported by Carsten Mattner <carstenmattner@gmail.com>.
8969 2012-08-04 Chong Yidong <cyd@gnu.org>
8971 * syntax.c (Fmodify_syntax_entry): Doc fix.
8973 2012-08-04 Eli Zaretskii <eliz@gnu.org>
8975 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
8976 * w32.c (init_environment): Change the default values of many
8977 environment variables in dflt_envvars[] to NULL, to avoid pushing
8978 them into environment when they were not already defined.
8979 Remove the code that deletes site-lisp subdirectories from the default
8980 value of EMACSLOADPATH, as it is no longer needed.
8981 (check_windows_init_file): Now external, not static.
8982 Use Vload_path as is, without adding anything, as this function is now
8983 called when Vload_path is already set up.
8985 * w32.h (check_windows_init_file): Add prototype.
8987 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
8988 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
8989 compatibility with Posix platforms.
8990 (main): Move the call to check_windows_init_file to here from
8992 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
8993 any, in the DEFALT argument into the root of the Emacs build or
8994 installation tree, as appropriate.
8996 * callproc.c (init_callproc_1): Call decode_env_path instead of
8997 doing its equivalent by hand.
8998 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
8999 the code that sets Vexec_path run on MS-Windows.
9001 * lread.c (init_lread): Add comments to #ifdef's.
9003 * msdos.c (dos_set_window_size, IT_update_begin)
9004 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
9005 instead of direct references.
9007 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
9009 Export DEFAULT_REHASH_* to GDB.
9010 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
9011 Now constants, not macros.
9013 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
9015 Remove unnecessary casts involving pointers.
9016 These casts are no longer needed now that we assume C89 or later,
9017 since they involve casting to or from void *.
9018 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
9019 (make_pure_float, make_pure_vector):
9020 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
9021 * macros.c (Fstart_kbd_macro):
9022 * menu.c (find_and_return_menu_selection):
9023 * minibuf.c (read_minibuf_noninteractive):
9024 * sysdep.c (closedir):
9025 * xdisp.c (x_produce_glyphs):
9026 * xfaces.c (compare_fonts_by_sort_order):
9027 * xfns.c (x_real_positions, select_visual):
9028 * xselect.c (x_stop_queuing_selection_requests)
9029 (x_get_window_property, x_get_window_property_as_lisp_data):
9030 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
9031 Remove unnecessary pointer casts.
9032 * alloc.c (record_xmalloc): New function.
9033 * lisp.h (record_xmalloc): New decl.
9034 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
9035 more like a function. This is because the pointer cast is not
9036 needed. All uses changed.
9037 * print.c (print_string, print_error_message): Avoid length recalc.
9039 Improve fix for macroexp crash with debugging (Bug#12118).
9040 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
9041 ARRAY_MARK_FLAG when checking subscripts, because ASET is
9042 not supposed to be invoked from the garbage collector.
9043 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
9044 (gc_aset): New function, which is like ASET but can be
9045 used in the garbage collector.
9046 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
9047 (set_hash_index): Use it instead of ASET.
9049 2012-08-03 Eli Zaretskii <eliz@gnu.org>
9051 Support symlinks on latest versions of MS-Windows.
9052 * w32.c: Include winioctl.h and aclapi.h.
9053 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
9054 (revert_to_self): Forward declarations of static functions.
9055 <static BOOL g_b_init_get_security_info>:
9056 <g_b_init_create_symbolic_link>: New static flags.
9057 (globals_of_w32): Initialize them to zero.
9058 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
9059 (map_w32_filename): Improve commentary. Simplify switch.
9060 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
9061 headers (most versions of MinGW w32api don't).
9062 (get_security_info, create_symbolic_link)
9063 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
9065 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
9066 in the argument file name.
9067 (sys_access): Call unc_volume_file_attributes only if
9068 GetFileAttributes fails with network-related error codes.
9069 (sys_rename): Diagnose renaming of a symlink when the user doesn't
9070 have the required privileges.
9071 (get_file_security_desc_by_name): Rename from
9072 get_file_security_desc.
9073 (stat_worker): New function, with most of the guts of 'stat', and
9074 with addition of handling of symlinks and support for 'lstat'.
9075 If possible, get file's attributes and security information by
9076 handle, not by name. Produce S_IFLNK bit for symlinks, when
9077 called from 'lstat'.
9078 (stat, lstat): New functions, call 'stat_worker'.
9079 (symlink, readlink, careadlinkat): Rewritten to create and resolve
9080 symlinks when the underlying filesystem supports them.
9082 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
9084 Fix macroexp crash on Windows with debugging (Bug#12118).
9085 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
9086 checking subscripts; problem introduced with the recent
9087 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
9088 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
9089 since it's used in non-static inline functions now.
9091 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
9092 Don't assume buffer size fits in 'int'. Remove unused local.
9094 Use C99-style 'extern inline' if available.
9095 * buffer.h (BUFFER_INLINE):
9096 * category.h (CATEGORY_INLINE):
9097 * character.h (CHARACTER_INLINE):
9098 * charset.h (CHARSET_INLINE):
9099 * composite.h (COMPOSITE_INLINE):
9100 * dispextern.h (DISPEXTERN_INLINE):
9101 * lisp.h (LISP_INLINE):
9102 * systime.h (SYSTIME_INLINE):
9103 New macro, replacing 'static inline' in this header.
9104 * buffer.h, category.h, character.h, charset.h, composite.h:
9105 * dispextern.h, lisp.h, systime.h:
9106 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
9107 * alloc.c (LISP_INLINE):
9108 * buffer.c (BUFFER_INLINE):
9109 * category.c (CATEGORY_INLINE):
9110 * character.c (CHARACTER_INLINE):
9111 * charset.c (CHARSET_INLINE):
9112 * composite.c (COMPOSITE_INLINE):
9113 * dispnew.c (DISPEXTERN_INLINE):
9114 * sysdep.c (SYSTIME_INLINE):
9115 Define to EXTERN_INLINE, so that the corresponding functions
9116 are compiled into code.
9117 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
9118 (INLINE_HEADER_END): New macros.
9119 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
9120 since it's used in non-static inline functions now.
9121 (VALMASK) [!USE_LSB_TAG]: Likewise.
9123 2012-08-02 Glenn Morris <rgm@gnu.org>
9125 * s/: Remove empty directory.
9127 * s/ms-w32.h: Move to ../nt/inc.
9128 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
9129 Update for new ms-w32.h location.
9131 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
9134 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
9136 2012-08-02 Glenn Morris <rgm@gnu.org>
9138 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
9139 hard-coding the path separator.
9141 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
9143 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
9144 This how ASET and AREF are supposed to work, and makes
9145 it easier to think about future improvements. See
9146 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
9147 * charset.h (set_charset_attr): New function.
9148 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
9149 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
9150 (aref_addr): New function. All uses of &AREF(...) changed.
9151 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
9152 (set_hash_index): New functions. All lvalue-style uses of
9153 HASH_KEY etc. changed.
9154 * keyboard.c (set_prop): New function. All lvalue-style uses
9157 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
9159 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
9160 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
9161 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
9162 * nsfns.m (ns_set_name_as_filename): Likewise.
9163 * nsmenu.m (ns_update_menubar): Likewise.
9164 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
9166 2012-08-01 Eli Zaretskii <eliz@gnu.org>
9168 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
9169 Adapt to latest changes in field names of the corresponding Lisp
9172 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
9174 2012-08-01 Glenn Morris <rgm@gnu.org>
9176 * s/msdos.h: Remove file.
9177 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
9178 * Makefile.in (S_FILE): Remove.
9179 (config_h): Remove S_FILE.
9181 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
9183 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
9184 Remove; moved to nt/config.nt.
9186 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9188 Use INTERNAL_FIELD for conses and overlays.
9189 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
9190 Remove obsolete comment.
9192 (struct Lisp_Overlay): Use INTERNAL_FIELD.
9193 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
9195 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9197 Use INTERNAL_FIELD for symbols.
9198 * lisp.h (SVAR): New macro. Adjust users.
9199 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
9200 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
9202 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9204 Use INTERNAL_FIELD for processes.
9205 * process.h (PVAR): New macro. Adjust style.
9206 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
9207 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
9209 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
9211 Use INTERNAL_FIELD for windows.
9212 * window.h (WVAR): New macro.
9213 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
9214 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
9215 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
9216 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
9217 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
9218 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
9220 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
9222 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
9224 2012-08-01 Glenn Morris <rgm@gnu.org>
9226 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
9227 Move to configure.ac.
9229 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
9231 * makefile.w32-in (CONFIG_H): Update dependencies.
9232 (CONF_POST_H): New macro.
9234 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
9236 2012-07-31 Glenn Morris <rgm@gnu.org>
9238 * Makefile.in (S_FILE): No longer set by configure.
9240 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
9242 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
9244 * process.h (NULL_DEVICE):
9245 * emacs.c (SEPCHAR):
9246 * editfns.c (USER_FULL_NAME): Let configure set them.
9248 * s/README, s/template.h: Remove files.
9250 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
9252 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
9253 Move to configure.ac.
9255 2012-07-31 Eli Zaretskii <eliz@gnu.org>
9257 * .gdbinit (xframe): Adapt to introduction of FVAR and the
9258 resulting renaming of 'struct frame' members.
9260 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
9262 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
9263 after introduction of FVAR.
9265 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
9267 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
9269 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
9270 instead of compositeToPoint.
9271 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
9273 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
9275 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9277 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
9278 * lisp.h (INTERNAL_FIELD): New macro.
9279 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
9280 (BVAR): Change to use INTERNAL_FIELD.
9281 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
9282 (KVAR): Change to use INTERNAL_FIELD.
9283 * frame.h (FVAR): New macro.
9284 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
9285 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
9286 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
9287 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
9288 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
9290 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
9292 Miscellaneous fixes for non-default X toolkits.
9293 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
9294 * xterm.c (x_frame_of_widget): Remove redundant prototype.
9295 Move under #ifdef USE_LUCID.
9296 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
9297 definition and usage to avoid warnings.
9299 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
9301 * nsterm.m (openFiles): Fix previous checkin.
9303 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
9305 * indent.c (compute_motion): Remove unused local.
9307 2012-07-31 Glenn Morris <rgm@gnu.org>
9309 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
9311 * conf_post.h [USG5_4]:
9312 Move remaining contents of s/usg5-4-common.h here.
9313 * s/usg5-4-common.h: Remove file.
9315 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
9316 * s/irix6-5.h: Remove file.
9318 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
9319 * s/darwin.h: Remove file.
9321 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
9322 * s/hpux10-20.h: Remove file, which is now empty.
9324 2012-07-30 Glenn Morris <rgm@gnu.org>
9326 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
9327 * Makefile.in (config_h): Add conf_post.h.
9328 * makefile.w32-in (CONFIG_H): Add conf_post.h.
9330 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
9332 * nsterm.m (ns_do_open_file): New variable.
9333 (ns_term_init): Set ns_do_open_file to YES after run returns.
9334 (openFile, openTempFile, openFileWithoutUI, openFiles):
9335 Open files only if ns_do_open_file.
9337 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9339 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
9340 This no-op macro hasn't been needed for many years.
9341 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
9343 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
9344 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
9345 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
9346 gdb_make_enums_visible.
9347 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
9348 (DIRECTORY_SEP): Now a constant, not a macro.
9350 2012-07-30 Eli Zaretskii <eliz@gnu.org>
9352 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
9353 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
9355 * w32term.c <w32_keyboard_codepage>: Renamed from
9356 keyboard_codepage and now external. All users changed.
9358 * w32term.h: Add declaration of w32_keyboard_codepage.
9360 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
9361 the codepage to translate keys to Unicode. If this argument is
9362 -1, use the value returned by GetConsoleCP. All callers changed.
9364 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9366 Update .PHONY listings in makefiles.
9367 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
9368 bootstrap-clean, distclean, maintainer-clean, versioclean,
9371 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
9372 This is a bit clearer. Fix some commentary typos.
9374 2012-07-30 Glenn Morris <rgm@gnu.org>
9376 * s/netbsd.h: Let configure include signal.h if needed.
9377 Remove file, which is now empty.
9379 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
9380 Let configure set them.
9381 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
9382 No more need to undefine.
9384 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
9386 * keymap.c (Fkey_description): Don't remove 0x80 bit from
9387 non-single-byte char when adding meta modifier. (Bug#12090)
9389 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9391 Convert safe_call to use variable number of arguments.
9392 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
9393 (safe_call2): Fix comment.
9394 * lisp.h (safe_call): Adjust prototype.
9395 * coding.c (encode_coding_object): Change to use safe_call2.
9396 * xfaces.c (merge_face_heights): Change to use safe_call1.
9398 2012-07-30 Glenn Morris <rgm@gnu.org>
9400 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
9401 does that unconditionally. Remove file, which is now empty.
9403 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
9406 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
9408 Export to GDB most of lisp.h's remaining object-like macros.
9409 * lisp.h (min, max): Move earlier, because they're used earlier now.
9410 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
9411 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
9412 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
9413 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
9414 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
9415 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
9416 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
9417 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
9418 Now constants, for GDB. They need not be macros.
9419 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
9420 Now constants, for GDB, as well as macros, for static initializers.
9421 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
9422 Move to after the definition of struct Lisp_Char_Table,
9423 since the former now needs that type defined.
9424 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
9425 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
9426 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
9427 New enums, for gdb_make_enums_visible.
9428 (GLYPH_MODE_LINE_FACE): Remove; unused.
9429 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
9430 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
9431 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
9432 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
9433 enum maxargs, enum MAX_ALLOCA.
9434 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
9435 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
9436 no longer needed, now that they are done in lisp.h.
9438 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
9440 Cleanup string bytes checking.
9441 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
9442 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
9443 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
9444 (check_sblock, compact_small_strings): Simplify.
9446 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9448 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
9449 These macros are confusing and no longer need to be defined, as
9450 the enum values now suffice. All uses replaced with definiens.
9451 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
9453 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
9455 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
9456 ($(BLD)/w32console.$(O)): Update dependencies.
9458 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9460 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
9461 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
9463 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
9465 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
9467 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
9468 setting sitelisp (Bug#12010).
9470 2012-07-29 Eli Zaretskii <eliz@gnu.org>
9472 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
9474 * w32heap.c (cache_system_info):
9475 * w32.c (sys_rename):
9476 * w32proc.c (find_child_console, sys_kill): All users changed.
9478 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9480 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
9482 2012-07-29 Eli Zaretskii <eliz@gnu.org>
9484 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
9486 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9488 Cleanup statistics calculation in Fgarbage_collect.
9489 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
9490 Fix zombies percentage calculation. Simplify elapsed time calculation.
9492 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
9494 Generalize marker debugging code under MARKER_DEBUG and use eassert.
9495 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
9496 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
9497 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
9498 (replace_range, replace_range_2, del_range_2): Change to eassert.
9499 * marker.c (byte_char_debug_check): Adjust style.
9501 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
9503 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
9504 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
9505 long-ago-commented-out code that talks about "WIN32".
9506 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
9509 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
9511 Use Gnulib stdalign module (Bug#9772, Bug#9960).
9512 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
9513 Simplify by using alignof.
9514 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
9515 * lisp.h: Include <stdalign.h>.
9516 (GCALIGNMENT): New macro and constant.
9517 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
9518 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
9519 (stdalign): New macro, if not already defined.
9521 2012-07-28 Eli Zaretskii <eliz@gnu.org>
9523 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
9524 * w32inevt.c: Include w32inevt.h.
9525 (w32_read_console_input): New inline function, calls either
9526 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
9527 w32_console_unicode_input.
9528 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
9529 (w32_kbd_patch_key, key_event): Use the codepage returned by
9530 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
9531 (key_event): use uChar.UnicodeChar only if
9532 w32_console_unicode_input is non-zero.
9534 * w32console.c: Include w32heap.h.
9535 <w32_console_unicode_input>: New global variable.
9536 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
9537 family of Windows, zero otherwise.
9539 * w32inevt.h: Declare w32_console_unicode_input.
9541 * xdisp.c (init_iterator): Don't reference tip_frame in a build
9542 --without-x. (Bug#11742)
9544 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
9546 Adjust GDB to reflect pvec_type changes (Bug#12036).
9547 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
9548 2012-07-04 changes to pseudovector representation.
9549 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
9551 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
9553 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
9555 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
9557 2012-07-27 Eli Zaretskii <eliz@gnu.org>
9559 * alloc.c (listn): Fix the order the arguments are consed onto the
9562 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
9563 enumeration constants, as PURE and HEAP are too general, and clash
9564 with other headers and sources, such as gmalloc.c and the
9565 MS-Windows system headers. All users changed.
9567 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9569 Revert last save_excursion_save and save_excursion_restore changes.
9570 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
9571 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
9573 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9575 Fix recently-introduced typos in Windows port.
9576 Reported by Martin Rudalics <rudalics@gmx.at>.
9577 * w32.c (init_environment): Replace comma with semicolon.
9578 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
9580 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
9582 Improve GDB symbol export (Bug#12036).
9583 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
9584 arms of an 'if', not using conditional expressions; otherwise GDB
9585 complains about the types in the unevaluated arm when the argument
9586 is an integer literal.
9587 (xgetint): Simplify expression.
9588 * alloc.c (gdb_make_enums_visible): New constant. This ports to
9589 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
9590 Zaretskii in <http://bugs.gnu.org/12036#13>.
9591 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
9592 needed now that we have gdb_make_enums_visible.
9593 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
9594 (enum enum_USE_LSB_TAG):
9595 New enum types, packaging up enums that need to be exported to GDB.
9597 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9599 Utility function to make a list from specified amount of objects.
9600 * lisp.h (enum constype): New datatype.
9601 (listn): New prototype.
9602 * alloc.c (listn): New function.
9603 (Fmemory_use_count, syms_of_alloc): Use it.
9604 * buffer.c (syms_of_buffer): Likewise.
9605 * callint.c (syms_of_callint): Likewise.
9606 * charset.c (define_charset_internal): Likewise.
9607 * coding.c (syms_of_coding): Likewise.
9608 * keymap.c (syms_of_keymap): Likewise.
9609 * search.c (syms_of_search): Likewise.
9610 * syntax.c (syms_of_syntax): Likewise.
9611 * w32.c (init_environment): Likewise.
9612 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
9613 * xdisp.c (syms_of_xdisp): Likewise.
9614 * xfns.c (syms_of_xfns): Likewise.
9616 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
9618 Fast save_excursion_save and save_excursion_restore.
9619 * lisp.h (struct Lisp_Excursion): New data type.
9620 (PVEC_EXCURSION): New pseudovector type.
9621 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
9622 to deal with it. Adjust comments.
9623 (init_marker, attach_marker): New prototype.
9624 (unchain_marker): Adjust prototype.
9625 * marker.c (attach_marker): Change to global.
9626 (init_marker): New function.
9627 * alloc.c (Fmake_marker, build_marker): Use it.
9628 (build_marker): More easserts.
9629 (mark_object): Handle struct Lisp_Excursion.
9630 * editfns.c (save_excursion_save, save_excursion_restore):
9631 Reimplement to use struct Lisp_Excursion. Add comments.
9633 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
9635 Fix export of symbols to GDB (Bug#12036).
9636 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
9637 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
9638 emacs.c, as this is a more-suitable home. Had this been done earlier
9639 the fix for 12036 would have avoided some of the problems noted in
9640 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
9641 would have been more obvious.
9642 * emacs.c: Do not include <verify.h>; no longer needed.
9643 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
9644 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
9645 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
9646 Remove; now done in lisp.h.
9647 * lisp.h (PUBLISH_TO_GDB): New macro.
9648 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
9649 (DATA_SEG_BITS): Use it.
9650 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
9651 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
9652 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
9653 not be usable in #if. This simplifies things.
9655 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
9657 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
9659 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
9661 Simplify export of symbols to GDB (Bug#12036).
9662 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
9663 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
9664 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
9665 Adjust to changes in lisp.h and emacs.c, by using
9666 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
9667 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
9668 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
9669 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
9670 instead of gdb_valbits.
9671 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
9672 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
9673 instead of gdb_array_mark_flag.
9674 (xboolvector): Get size from $->size, not $->header.size.
9675 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
9676 (xreload, hook-run, hookpost-run): Remove.
9677 * emacs.c: Include <verify.h>.
9678 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
9679 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
9681 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
9682 (gdb_USE_LSB_TAG): New enum constants.
9683 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
9684 Also define these as enum constants, so they're visible to GDB.
9685 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
9686 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
9687 as constants, so they're visible to GDB.
9688 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
9689 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
9690 Now enum constants, not macros, so they're visible to GDB.
9691 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
9692 more convenient now. All uses changed.
9693 (VALMASK) [USE_LSB_TAG]: Also define in this case.
9694 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
9696 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
9698 Explicitly free restriction data that are not needed anymore.
9699 * editfns.c (save_restriction_restore): Free restriction data.
9701 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
9703 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
9704 add argument, tune behavior, and adjust all callers.
9706 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
9708 Use typedef for EMACS_INT, EMACS_UINT.
9709 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
9710 than macros. This simplifies debugging in the usual case, since
9711 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
9712 and it allows expressions involving EMACS_INT casts.
9713 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
9715 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
9717 * nsterm.m (ns_read_socket): Return early if there is a modal
9720 2012-07-25 Martin Rudalics <rudalics@gmx.at>
9722 * frame.c (Fredirect_frame_focus): In doc-string don't mention
9723 that FOCUS-FRAME can be omitted.
9725 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
9727 Adjust buffer text indirection counters at the end of Fkill_buffer.
9728 * buffer.c (Fkill_buffer): Adjust indirection counters when the
9729 buffer is definitely dead. This should really fix an issue reported
9730 by Christoph Scholtes again. (Bug#12007).
9731 (init_buffer_once): Initialize indirection counters of
9732 buffer_defaults and buffer_local_symbols (for sanity and safety).
9734 2012-07-24 Eli Zaretskii <eliz@gnu.org>
9736 * xdisp.c (init_iterator): Don't compute dimensions of truncation
9737 and continuation glyphs on tooltip frames, leave them at zero.
9738 Avoids continued lines in tooltips. (Bug#11832)
9740 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
9742 Simplify copy_overlay.
9743 * buffer.c (copy_overlay): Simplify. Use build_marker.
9744 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
9746 2012-07-23 Eli Zaretskii <eliz@gnu.org>
9748 * print.c (print_object): Don't crash when a frame's name is nil
9749 or invalid. (Bug#12025)
9751 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
9752 it signals an error when a tooltip frame is being created.
9754 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
9756 Cleanup miscellaneous objects allocation and initialization.
9757 * alloc.c (allocate_misc): Change to static. Add argument to
9758 specify the subtype. Adjust comment and users.
9759 (build_overlay): New function.
9760 * buffer.c (copy_overlays, Fmake_overlay): Use it.
9761 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
9762 (allocate_misc): Remove prototype.
9763 (build_overlay): Add prototype.
9765 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
9767 Swap buffer text indirection counters in Fbuffer_swap_text.
9768 * buffer.c (Fbuffer_swap_text): Swap indirections too.
9769 This avoids crash reported by Christoph Scholtes at
9770 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
9772 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
9774 * nsmenu.m (Popdown_data): New struct.
9775 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
9777 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
9778 (initWithContentRect): Make imgView and contentView non-static
9779 and autorelease them. Also autorelease img and matrix (Bug#12005).
9780 (dealloc): Remove (Bug#12005).
9782 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
9784 Adjust consing_since_gc when objects are explicitly freed.
9785 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
9786 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
9787 (free_cons, free_misc): Subtract object size from consing_since_gc.
9789 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
9791 Simplify and cleanup markers positioning code.
9792 * marker.c (attach_marker): More useful eassert.
9793 (live_buffer, set_marker_internal): New function.
9794 (Fset_marker, set_marker_restricted): Use set_marker_internal.
9795 (set_marker_both, set_marker_restricted_both): Use live_buffer.
9797 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
9799 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
9800 as it's limited by the amount of memory, not by INT_MAX.
9802 2012-07-21 Eli Zaretskii <eliz@gnu.org>
9804 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
9805 in special-event-map. See the discussion at
9806 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
9809 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
9810 info.dwItemData. Fixes crashes on 64-bit Windows.
9811 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
9813 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
9815 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
9816 (conversationIdentifier): Return value is NSInteger.
9817 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
9819 2012-07-21 Chong Yidong <cyd@gnu.org>
9821 * window.c (decode_any_window): Signal an error if the window is
9822 on a dead frame (Bug#11984).
9824 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
9826 Add indirection counting to speed up Fkill_buffer.
9827 * buffer.h (struct buffer): New member.
9828 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
9829 (Fmake_indirect_buffer): Set indirection counter to -1, increment
9830 base buffer indirection counter.
9831 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
9832 (Fkill_buffer): Adjust indirection counters as needed, don't walk
9833 through buffer list if indirection counter is 0.
9835 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
9837 Extend the value returned by Fgarbage_collect with heap statistics.
9838 * alloc.c (Qheap): New symbol.
9839 (syms_of_alloc): DEFSYM it.
9840 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
9841 (Fmemory_free): Remove.
9842 (syms_of_alloc): Don't defsubr it.
9843 * buffer.c (Fcompact_buffer): Remove.
9844 (syms_of_buffer): Don't defsubr it.
9846 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
9848 Make maybe_gc inline.
9849 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
9850 * lisp.h (consing_since_gc, gc_relative_threshold)
9851 (memory_full_cons_threshold): Revert declaration.
9852 (maybe_gc): Remove prototype, define as inline.
9853 * alloc.c: Remove old commented-out code.
9854 (consing_since_gc, gc_relative_threshold)
9855 (memory_full_cons_threshold): Revert to global.
9858 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
9860 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
9861 * lisp.h (build_unibyte_string): New function.
9862 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
9863 * sysdep.c, w32fns.c, xfns.c: Use it.
9864 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
9865 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
9866 Adjust users accordingly.
9867 * font.h (font_open_by_name): Adjust prototype.
9869 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
9871 Cleanup calls to Fgarbage_collect.
9872 * lisp.h (maybe_gc): New prototype.
9873 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
9874 Remove declarations.
9875 * alloc.c (maybe_gc): New function.
9876 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
9878 * bytecode.c (MAYBE_GC): Use maybe_gc.
9879 * eval.c (eval_sub, Ffuncall): Likewise.
9880 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
9881 to avoid dependency from auto-save feature.
9883 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
9885 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
9886 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
9887 'for_each_per_buffer_object_at'.
9888 All uses changed. It's better to use upper-case for macros that
9889 cannot be implemented as functions, to give the reader a clue
9890 that they're special.
9892 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
9894 * alloc.c (Fgarbage_collect): Tweak docstring.
9896 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
9898 Tweak the value returned from Fgarbage_collect again.
9899 * alloc.c (Fgarbage_collect): New return value, as confirmed in
9900 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
9901 Adjust documentation.
9902 (total_vector_bytes): Rename to total_vector_slots, adjust
9904 (total_free_vector_bytes): Rename to total_free_vector_slots,
9906 (Qstring_bytes, Qvector_slots): New symbols.
9907 (syms_of_alloc): DEFSYM them.
9909 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
9911 Buffer compaction primitive which may be used from Lisp.
9912 * buffer.c (compact_buffer, Fcompact_buffer): New function.
9913 (syms_of_buffer): Register Fcompact_buffer.
9914 * alloc.c (Fgarbage_collect): Use compact_buffer.
9915 * buffer.h (compact_buffer): New prototype.
9916 (struct buffer_text): New member.
9918 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
9920 New macro to iterate over all buffers, miscellaneous cleanups.
9921 * lisp.h (all_buffers): Remove declaration.
9922 * buffer.h (all_buffers): Add declaration, with comment.
9923 (for_each_buffer): New macro.
9924 * alloc.c (Fgarbage_collect, mark_object): Use it.
9925 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
9926 (init_buffer): Likewise.
9927 * data.c (Fset_default): Likewise.
9928 * coding.c (code_conversion_restore): Remove redundant check
9930 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
9932 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
9934 Fix bug that created negative-length intervals.
9935 * intervals.c (merge_interval_right, merge_interval_left):
9936 Do not zero out this interval if it is absorbed by its children,
9937 as this interval's total length doesn't change in that case. See
9938 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
9940 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
9942 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
9943 when invoking (make-bool-vector N t) and N is a positive
9944 multiple of 8 -- the last 8 bits were mistakenly cleared.
9946 Remove some struct layout assumptions in bool vectors.
9947 * alloc.c (bool_header_size): New constant.
9948 (header_size, word_size): Move earlier, as they're now used earlier.
9949 Use 'word_size' in a few more places, where it's appropriate.
9950 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
9951 padding before the data member of a bool vector.
9952 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
9953 than doing the check by hand with an abort ().
9955 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
9957 * eval.c (Fdefvar): Don't check constants since we only set the var if
9958 it's not yet defined anyway (bug#11904).
9960 * lisp.h (last_undo_boundary): Declare new var.
9961 * keyboard.c (command_loop_1): Set it.
9962 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
9963 were auto-added by the command loop (bug#11774).
9965 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
9967 * w32font.c (Qsymbol): Remove local definition.
9968 (syms_of_w32font): Don't DEFSYM it.
9970 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
9972 Fix sweep_vectors to handle large bool vectors correctly.
9973 * alloc.c (sweep_vectors): Account total_vector_bytes for
9974 bool vectors larger than VBLOCK_BYTES_MAX.
9976 2012-07-18 Chong Yidong <cyd@gnu.org>
9978 * frame.c (x_set_frame_parameters): Revert bogus change introduced
9979 in 2012-05-25 commit by Paul Eggert (Bug#11738).
9981 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
9983 Return more descriptive data from Fgarbage_collect.
9984 Suggested by Stefan Monnier in
9985 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
9986 * alloc.c (bounded_number): New function.
9987 (total_buffers, total_vectors): New variable.
9988 (total_string_size): Rename to total_string_bytes, adjust users.
9989 (total_vector_size): Rename to total_vector_bytes, adjust users.
9990 (sweep_vectors): Account total_vectors and total_vector_bytes.
9991 (Fgarbage_collect): New return value. Adjust documentation.
9992 (gc_sweep): Account total_buffers.
9993 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
9994 (VECTOR_SIZE): Remove.
9995 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
9996 (Qinterval, Qmisc): New symbols.
9997 (syms_of_data): Initialize them.
9998 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
9999 (Qcons, Qbuffer): New declarations.
10001 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
10003 * alloc.c (Fmemory_free): Account for memory-free's own storage.
10004 Round up, not down. Improve doc.
10006 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10008 Restore old code in allocate_string_data to avoid Faset breakage.
10009 Reported by Julien Danjou <julien@danjou.info> in
10010 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
10011 * alloc.c (allocate_string_data): Restore old code with minor
10012 adjustments, fix comment to explain this subtle issue.
10014 2012-07-17 Eli Zaretskii <eliz@gnu.org>
10016 Remove FILE_SYSTEM_CASE.
10017 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
10019 * fileio.c (FILE_SYSTEM_CASE): Don't define.
10020 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
10021 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
10022 call-process-region passes it through expand-file-name.
10024 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
10026 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10028 Fix crash when creating indirect buffer (Bug#11917)
10029 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
10030 Don't handle unbound variables specially if non-zero.
10031 (Fbuffer_local_variables): Pass zero.
10032 (clone_per_buffer_values): Pass non-zero.
10034 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10036 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
10037 to make the loop interruptible.
10039 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
10041 * gnutls.c (emacs_gnutls_handshake): Only retry if
10042 GNUTLS_E_INTERRUPTED.
10044 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10046 Cleanup and convert miscellaneous checks to eassert.
10047 * alloc.c (mark_interval): Fix comment, partially rephrase
10048 old comment from intervals.h (see below).
10049 * intervals.c (find_interval, adjust_intervals_for_insertion)
10050 (delete_interval, adjust_intervals_for_deletion)
10051 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
10052 Convert to eassert.
10053 (adjust_intervals_for_insertion, make_new_interval):
10054 Remove obsolete and unused code.
10055 * intervals.h (struct interval): Remove obsolete comment.
10056 * textprotp.c (erase_properties): Remove unused code.
10057 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
10058 (Fremove_list_of_text_properties): Convert to eassert.
10060 2012-07-17 Chong Yidong <cyd@gnu.org>
10062 * editfns.c (Finsert_char): Doc fix.
10064 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10066 Fix previous change to make Fmemory_free always accurate.
10067 * alloc.c (make_interval): Update total_free_intervals.
10068 (make_float): Likewise for total_free_floats.
10069 (free_cons, Fcons): Likewise for total_free_conses.
10070 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
10071 Likewise for total_free_vector_bytes.
10072 (Fmake_symbol): Likewise for total_free_symbols.
10073 (bytes_free): Remove.
10075 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10077 Simple free memory accounting feature.
10078 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
10079 (sweep_vectors): Accumulate size of free vectors.
10080 (Fgarbage_collect): Setup bytes_free.
10081 (Fmemory_free): New function.
10082 (syms_of_alloc): Register it.
10084 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
10086 Cleanup overlays checking.
10087 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
10088 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
10089 eassert and OVERLAYP.
10090 (sort_overlays): Change to use OVERLAYP.
10092 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
10094 * editfns.c (Finsert_char): Make it interactive, and make the
10095 second arg optional. Copy interactive spec and docstring from
10098 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
10100 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
10101 Unlike the other wrapped functions, fabs has an unspecified
10104 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
10106 * nsterm.m (keyDown): Interpret flags without left/right bits
10107 as the left key (Bug#11670).
10109 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
10111 Remove empty and useless init functions.
10112 * lisp.h (init_character_once, init_fns, init_image)
10113 (init_filelock, init_sound): Remove prototype.
10114 * character.c (init_character_once): Remove.
10115 * filelock.c (init_filelock): Likewise.
10116 * fns.c (init_fns): Likewise.
10117 * image.c (init_image): Likewise.
10118 * sound.c (init_sound): Likewise.
10119 * emacs.c (main): Adjust accordingly.
10121 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
10123 * gtkutil.h: Tiny cleanups.
10124 (use_old_gtk_file_dialog): Remove useless declaration.
10125 (xg_uses_old_file_dialog): Add suggested const attribute.
10127 2012-07-15 Eli Zaretskii <eliz@gnu.org>
10129 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
10130 (bidi_paragraph_init): Use it to limit search forward for a strong
10131 directional character in abnormally large paragraphs full of
10132 neutral or weak characters. (Bug#11943)
10134 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
10136 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
10137 the toolbar (Bug#9451).
10138 (xg_make_tool_item): Give the widget event box a transparent
10141 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
10143 Cleanup basic allocation variables and functions.
10144 * alloc.c (ignore_warnings, init_intervals, init_float)
10145 (init_cons, init_symbol, init_marker): Remove.
10146 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
10147 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
10148 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
10149 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
10150 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
10151 (staticidx, init_alloc_once, init_strings, free_ablock):
10152 Remove redundant initialization.
10153 * fns.c (init_weak_hash_tables): Remove.
10154 * lisp.h (init_weak_hash_tables): Remove prototype.
10156 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
10158 Use zero_vector where appropriate.
10159 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
10161 * lisp.h (zero_vector): New declaration.
10162 * font.c (null_vector): Remove.
10163 (syms_of_font): Remove initialization and staticpro.
10164 (font_list_entities, font_find_for_lface): Change to use zero_vector.
10165 * keymap.c (Faccessible_keymaps): Likewise.
10167 2012-07-15 Leo Liu <sdl.web@gmail.com>
10169 * fringe.c: Fix typo in comments.
10171 2012-07-14 Leo Liu <sdl.web@gmail.com>
10173 * fringe.c: Add a new bitmap exclamation-mark.
10175 2012-07-14 Eli Zaretskii <eliz@gnu.org>
10177 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
10179 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
10180 (HAVE_MENUS): Don't define, defined by editing config.in with
10182 (GMALLOC_INHIBIT_VALLOC): Don't define.
10183 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
10185 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
10187 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
10189 2012-07-14 Glenn Morris <rgm@gnu.org>
10191 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
10192 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
10193 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
10195 2012-07-13 Glenn Morris <rgm@gnu.org>
10197 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
10199 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
10200 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
10202 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
10204 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
10205 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
10206 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
10207 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
10209 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
10210 as boolean expression.
10211 (x_set_window_size): Remove unused variable toolbar.
10212 (ns_get_color_default, ns_mod_to_lisp): Remove.
10213 (ns_mouse_position): Remove unused variables xchar and ychar.
10214 (ns_compute_glyph_string_overhangs): Remove unused variable face.
10215 (ns_set_vertical_scroll_bar): Remove unused variable count.
10216 (ns_delete_terminal): Remove unused variable i.
10217 (ns_term_init): Remove unused variables r, g and b.
10218 (mouseDown): Remove unused variable window.
10219 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
10220 (initFrameFromEmacs): Remove unused variable vbextra.
10221 (mouseEntered): Remove unused variables p and dpyinfo.
10222 (mouseExited): Remove unused variables p and r.
10223 (ns_define_frame_cursor, ns_clear_frame_area)
10224 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
10225 (menuDown): Assign [sender tag] to variable and cast the variable.
10227 * nsterm.h (menuDown): Add id as type to argument sender.
10228 (ns_display_info_for_name): Add Lisp_Object argument.
10229 (ns_term_init): Add Lisp_Object argument.
10230 (ns_map_event_to_object): Add void argument.
10231 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
10232 prototype with arguments and only declare if __OBJC__.
10233 (nxatoms_of_nsselect): Add void argument.
10234 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
10235 (ns_alloc_autorelease_pool): Add void argument.
10236 (ns_release_autorelease_pool): Add void* argument.
10237 (ns_get_defaults_value): Add const char* argument.
10239 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
10240 (initFromContents): Use SSDATA where appropriate.
10241 (ns_update_menubar): Add braces to ambigous if-else.
10242 (initWithTitle): Put () around assignment in if statement.
10243 (ns_menu_show): Remove unused variables window and keymap.
10244 (update_frame_tool_bar): Remove unused variable selected_p.
10245 (initWithContentRect): Remove unused variable this_cmd_name.
10247 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
10249 (setXBMColor): Remove unused variable len.
10250 (setPixmapData): Put () around assignment in loop statement.
10252 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
10253 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
10255 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
10256 around assignment in loop statement.
10257 (nsfont_open): Remove unused variable i.
10258 (nsfont_open): Remove unused variable len.
10259 (nsfont_draw): Remove unused variable cs.
10261 * nsfns.m (x_set_icon_name, ns_set_name_internal)
10262 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
10263 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
10264 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
10265 (Fns_font_name, Fns_perform_service)
10266 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
10267 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
10268 (ns_set_name): Remove unused variable view.
10269 (x_set_menu_bar_lines): Remove unused variable olines.
10270 (x_set_tool_bar_lines): Remove unused variable root_window.
10271 (Fns_list_colors): Put () around assignment in while statement.
10272 (Fns_perform_service): Remove unused variable len.
10273 (Fns_display_usable_bounds): Remove unused variable top.
10274 (syms_of_nsfns): Remove unused variable i.
10276 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
10277 memcpy (Bug#11907).
10279 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
10281 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
10282 and free it with DestroyExceptionInfo (Bug#11558).
10284 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
10286 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
10287 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
10288 Set here, not in nt/config.nt.
10290 2012-07-13 Eli Zaretskii <eliz@gnu.org>
10292 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
10293 cursor overflow into the last glyph on display line when the right
10294 fringe is off. (Bug#11832)
10296 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
10298 * xdisp.c (produce_special_glyphs): Now static.
10299 * dispextern.h (produce_special_glyphs): Remove decl.
10301 2012-07-13 Glenn Morris <rgm@gnu.org>
10303 * s/bsd-common.h, s/cygwin.h: Remove empty files.
10304 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
10306 * s/usg5-4-common.h (USG, USG5):
10307 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
10308 * s/sol2-6.h (SOLARIS2):
10309 * s/irix6-5.h (IRIX6_5):
10310 * s/hpux10-20.h (USG, USG5, HPUX):
10311 * s/gnu-linux.h (USG, GNU_LINUX):
10312 * s/freebsd.h (BSD_SYSTEM):
10313 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
10314 * s/cygwin.h (CYGWIN):
10315 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
10316 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
10318 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
10320 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
10322 2012-07-13 Glenn Morris <rgm@gnu.org>
10324 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
10326 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
10328 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
10329 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
10331 2012-07-12 Glenn Morris <rgm@gnu.org>
10333 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
10335 * process.c (init_process_emacs): Rename from init_process.
10336 The old name is also the name of a Mach system call.
10337 * lisp.h, emacs.c: Update for this name change.
10338 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
10341 2012-07-12 Eli Zaretskii <eliz@gnu.org>
10343 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
10344 memmove call that removes glyphs covered by the left truncation
10345 glyph. Improve commentary.
10346 (display_line): Fix display of continuation glyphs on GUI frames
10347 when the right fringe is turned off and variable-size fonts are
10348 used in the window. Move the code that appends a stretch glyph to
10349 produce_special_glyphs, so that it could be used for truncation
10350 and continuation glyphs alike.
10351 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
10352 glyph of a suitably computed width, to align the special glyphs at
10353 the window margin. Code moved from display_line. (Bug#11832)
10355 2012-07-12 Glenn Morris <rgm@gnu.org>
10357 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
10359 * s/gnu-linux.h, s/hpux10-20.h:
10360 Do not unconditionally define HAVE_XRMSETDATABASE.
10362 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
10364 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
10366 Fix typos that broke OS X build.
10367 Reported by Randal L. Schwartz in
10368 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
10369 * nsterm.m (ns_timeout): Add missing local decl.
10370 (ns_get_color): snprintf -> sprintf, to fix typo.
10372 2012-07-12 Glenn Morris <rgm@gnu.org>
10374 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
10375 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
10376 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
10377 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
10379 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
10380 Move PTY_OPEN to configure.
10382 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
10383 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
10384 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
10386 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
10388 Use empty_unibyte_string where applicable.
10389 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
10390 * lread.c (read1): Likewise.
10391 * xsettings.c (syms_of_xsettings): Likewise.
10393 2012-07-12 Glenn Morris <rgm@gnu.org>
10395 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
10396 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
10397 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
10398 * s/hpux10-20.h (RUN_TIME_REMAP):
10399 * s/bsd-common.h (TABDLY): Move to configure.
10401 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
10403 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
10405 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
10406 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
10408 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
10410 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
10411 * s/template.h: Move NARROWPROTO to configure.
10413 2012-07-11 Glenn Morris <rgm@gnu.org>
10415 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
10416 unused since 2011-01-17 change to systty.h.
10418 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
10419 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
10420 Move HAVE_PTYS and HAVE_SOCKETS to configure.
10422 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
10424 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
10426 2012-07-11 Glenn Morris <rgm@gnu.org>
10428 * s/darwin.h, s/gnu-linux.h, s/template.h:
10429 Move INTERRUPT_INPUT to configure.
10431 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10433 Minor adjustments to interning code.
10434 * lisp.h (intern, intern_c_string): Redefine as static inline
10435 wrappers for intern_1 and intern_c_string_1, respectively.
10436 (intern_1, intern_c_string_1): Rename prototypes.
10437 * lread.c (intern_1, intern_c_string_1, oblookup):
10438 Simplify Vobarray checking.
10439 * font.c (font_intern_prop): Likewise. Adjust comment.
10440 * w32font.c (intern_font_name): Likewise.
10442 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
10444 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
10446 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
10447 of Fcar/Fcdr if possible.
10448 * font.c (check_otf_features): Likewise.
10449 * fontset.c (Fnew_fontset): Likewise.
10450 * gnutls.c (Fgnutls_boot): Likewise.
10451 * minibuf.c (read_minibuf): Likewise.
10452 * msdos.c (IT_set_frame_parameters): Likewise.
10453 * xmenu.c (Fx_popup_dialog): Likewise.
10454 * w32menu.c (Fx_popup_dialog): Likewise.
10456 2012-07-11 Glenn Morris <rgm@gnu.org>
10458 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
10459 since nothing has defined it on these platforms.
10461 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
10462 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
10464 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
10465 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
10466 Move CLASH_DETECTION to configure.
10468 * s/gnu.h: Remove file, which is now empty.
10470 * s/gnu.h, s/gnu-linux.h:
10471 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
10473 2012-07-11 John Wiegley <johnw@newartisans.com>
10475 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
10476 function attribute, so we only use it if it exists in the
10479 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10481 Avoid call to strlen in fast_c_string_match_ignore_case.
10482 * search.c (fast_c_string_match_ignore_case): Change to use
10483 length argument. Adjust users accordingly.
10484 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
10486 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
10488 Assume mkdir, rmdir.
10489 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
10490 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
10493 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
10496 * s/hpux10-20.h (HAVE_PERROR): Remove.
10497 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
10498 Remove dummy definition, as this problem was obsolete long ago.
10501 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
10503 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
10505 Avoid calls to strlen in font processing functions.
10506 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
10507 (font_open_by_name): Change to use length argument.
10508 Adjust users accordingly.
10509 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
10511 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
10512 Change to return ptrdiff_t.
10513 (xfont_list_pattern, xfont_match): Use length returned by
10514 xfont_decode_coding_xlfd.
10515 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
10517 2012-07-11 Glenn Morris <rgm@gnu.org>
10519 * s/darwin.h, s/freebsd.h, s/netbsd.h:
10520 Move DONT_REOPEN_PTY to configure.
10522 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
10523 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
10525 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
10527 Remove "#define unix" that is no longer needed (Bug#11905).
10528 * s/aix4-2.h (unix): Remove; no longer needed.
10530 EMACS_TIME simplification (Bug#11875).
10531 This replaces macros (which typically do not work in GDB)
10532 with functions, typedefs and enums, making the code easier to debug.
10533 The functional style also makes code easier to read and maintain.
10534 * systime.h: Include <sys/time.h> on all hosts, not just if
10535 WINDOWSNT, since 'struct timeval' is needed in general.
10536 (EMACS_TIME): Now a typedef, not a macro.
10537 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
10539 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
10540 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
10541 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
10542 (EMACS_TIME_LE): Now functions, not macros.
10543 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
10544 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
10545 which are not functions. All uses rewritten to use:
10546 (make_emacs_time): New function.
10547 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
10548 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
10549 not functions. All uses rewritten to use the following, respectively:
10550 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
10551 (add_emacs_time, sub_emacs_time): New functions.
10552 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
10553 * fileio.c (Fcopy_file):
10554 * xterm.c (XTflash): Get the current time closer to when it's used.
10555 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
10557 * bytecode.c (targets): Suppress -Woverride-init warnings.
10559 Simplify by avoiding confusing use of strncpy etc.
10560 * doc.c (Fsnarf_documentation):
10561 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
10562 * frame.c (Fmake_terminal_frame):
10563 * gtkutil.c (get_utf8_string):
10565 * nsmenu.m (ns_update_menubar):
10566 * regex.c (regerror):
10567 Prefer memcpy to strncpy and strncat when either will do.
10568 * fileio.c (Fsubstitute_in_file_name):
10569 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
10570 (menu_separator_name_p):
10571 * nsmenu.m (ns_update_menubar):
10572 Prefer memcmp to strncmp when either will do.
10573 * nsterm.m: Include <ftoastr.h>.
10575 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
10576 Prefer snprintf to strncpy.
10577 * nsterm.m (ns_term_init):
10578 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
10579 * nsterm.m (ns_term_init):
10580 Avoid the need for strncpy, by using build_string or
10581 make_unibyte_string directly. Use dtoastr, not snprintf.
10582 * process.c (Fmake_network_process): Diagnose service names that
10583 are too long, rather than silently truncating them or creating
10584 non-null-terminated names.
10585 (Fnetwork_interface_info): Likewise, for interface names.
10586 * sysdep.c (system_process_attributes) [GNU_LINUX]:
10587 Prefer sprintf to strncat.
10588 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
10589 Prefer vsnprintf to vsprintf + strncpy.
10591 2012-07-10 Glenn Morris <rgm@gnu.org>
10593 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
10594 Clarify fallback case.
10596 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10598 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
10599 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
10600 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
10601 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
10602 where argument type is known to be a Lisp_Cons.
10604 2012-07-10 Tom Tromey <tromey@redhat.com>
10606 * bytecode.c (BYTE_CODE_THREADED): New macro.
10607 (BYTE_CODES): New macro. Replaces all old byte-code defines.
10608 (enum byte_code_op): New type.
10609 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
10610 (exec_byte_code): Use them. Use token threading when applicable.
10612 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10614 Optimize pure C strings initialization.
10615 * lisp.h (make_pure_string): Fix prototype.
10616 (build_pure_c_string): New function, defined as static inline. This
10617 provides a better opportunity to optimize away calls to strlen when
10618 the function is called with compile-time constant argument.
10619 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
10620 argument, adjust users accordingly. Use build_pure_c_string where
10622 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
10623 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
10624 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
10626 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10628 Avoid calls to strlen in miscellaneous functions.
10629 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
10630 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
10631 * lread.c (openp): Likewise.
10633 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
10635 Avoid calls to strlen in path processing functions.
10636 * fileio.c (file_name_as_directory): Add comment. Change to add
10637 srclen argument and return the length of result. Adjust users
10639 (directory_file_name): Fix comment. Change to add srclen argument,
10640 swap 1st and 2nd arguments to obey the common convention.
10641 Adjust users accordingly.
10642 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
10644 2012-07-10 Glenn Morris <rgm@gnu.org>
10646 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
10647 Move PENDING_OUTPUT_COUNT definition to configure.
10649 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
10650 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
10651 * s/gnu.h (DATA_START): Move definitions to configure.
10653 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
10654 We include usg5-4-common.h, which defines them both.
10656 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
10657 O_RDONLY already includes it).
10659 Stop ns builds setting the EMACSLOADPATH environment variable.
10660 * nsterm.m (ns_load_path): Rename from ns_init_paths.
10661 Now it does not set EMACSLOADPATH, just returns the load-path string.
10662 * nsterm.h: Update accordingly.
10663 * lread.c [HAVE_NS]: Include nsterm.h.
10664 (init_lread) [HAVE_NS]: Use ns_load_path.
10665 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
10667 2012-07-09 Glenn Morris <rgm@gnu.org>
10669 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
10670 since the included bsd-common.h does so.
10672 Stop ns builds setting the EMACSPATH environment variable.
10673 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
10674 (ns_init_paths): Do not set EMACSPATH.
10675 * nsterm.h (ns_exec_path): Add it.
10676 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
10679 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
10681 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
10683 * process.c (wait_reading_process_output): 'waitchannels' was unset
10684 when read_kbd || !NILP (wait_for_cell); fix this.
10686 Add GCC-style 'const' attribute to functions that can use it.
10687 * character.h (char_resolve_modifier_mask):
10688 * keyboard.h (make_ctrl_char):
10689 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
10690 (init_character_once, next_almost_prime, init_fns, init_image)
10691 (flush_pending_output, init_sound):
10692 * mem-limits.h (start_of_data):
10693 * menu.h (finish_menu_items):
10694 Add ATTRIBUTE_CONST.
10695 * emacs.c (DEFINE_DUMMY_FUNCTION):
10696 Declare the dummy function with ATTRIBUTE_CONST.
10697 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
10698 Add decls with ATTRIBUTE_CONST.
10700 Minor improvements to make_formatted_string.
10701 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
10702 where int is good enough, as vsprintf returns an int.
10703 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
10705 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
10707 Use make_formatted_string to avoid double length calculation.
10708 * lisp.h (make_formatted_string): New prototype.
10709 * alloc.c (make_formatted_string): New function.
10710 * buffer.c (Fgenerate_new_buffer_name): Use it.
10711 * dbusbind.c (syms_of_dbusbind): Likewise.
10712 * editfns.c (Fcurrent_time_zone): Likewise.
10713 * filelock.c (get_boot_time): Likewise.
10714 * frame.c (make_terminal_frame, set_term_frame_name)
10715 (x_report_frame_params): Likewise.
10716 * image.c (gs_load): Likewise.
10717 * minibuf.c (get_minibuffer): Likewise.
10718 * msdos.c (dos_set_window_size): Likewise.
10719 * process.c (make_process): Likewise.
10720 * xdisp.c (ensure_echo_area_buffers): Likewise.
10721 * xsettings.c (apply_xft_settings): Likewise.
10723 2012-07-09 Glenn Morris <rgm@gnu.org>
10725 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
10726 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
10727 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
10728 * nsterm.h (ns_etc_directory): Add it.
10729 * callproc.c [HAVE_NS]: Include nsterm.h.
10730 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
10732 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
10734 Move marker debugging code under MARKER_DEBUG.
10735 * marker.c (MARKER_DEBUG): Move marker debugging code under
10736 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
10737 for bootstrap with --enable-checking (~3x slowdown reported
10738 by Juanma Barranquero <lekktu@gmail.com>).
10739 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
10741 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
10743 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
10744 See <http://bugs.gnu.org/11825#29>.
10746 2012-07-08 Eli Zaretskii <eliz@gnu.org>
10748 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
10749 has no font, use the frame's font. (Bug#11813)
10750 (display_line): Add commentary about displaying truncation glyphs
10752 (produce_special_glyphs): Move here from term.c.
10754 * term.c (produce_special_glyphs): Move to xdisp.c.
10756 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
10759 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
10761 * xdisp.c (display_line): Avoid warning about implicit declaration
10764 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
10766 * lisp.h: Remove empty conditional.
10768 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
10770 * lread.c (load_path_check): Now static.
10772 Fix some minor --with-ns problems found by static checking.
10773 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
10774 (x_set_font) [!HAVE_X_WINDOWS]:
10775 * image.c (xpm_load_image) [HAVE_NS]:
10776 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
10777 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
10778 Remove unused local.
10779 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
10780 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
10781 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
10782 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
10783 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
10784 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
10785 Fix pointer signedness problem.
10786 * xfaces.c (FRAME_X_FONT_TABLE):
10787 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
10789 2012-07-07 Glenn Morris <rgm@gnu.org>
10791 * lread.c (load_path_check): New function, split from init_lread.
10792 (init_lread): Reorganize. Motivation:
10793 If EMACSLOADPATH is set, check/warn about that rather than the
10794 defaults, which we are not going to use. Hence we can remove
10795 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
10796 Don't warn if site-lisp directories are missing.
10797 If not installed, start from a blank load-path, since
10798 PATH_LOADSEARCH refers to the eventual installation directories.
10800 2012-07-07 Eli Zaretskii <eliz@gnu.org>
10802 Support truncation and continuation glyphs on GUI frames, when
10803 fringes are disabled. (Bug#11832)
10804 * xdisp.c (init_iterator): Get dimensions of truncation and
10805 continuation glyphs even if on GUI frames.
10806 Adjust it->last_visible_x on GUI frames when the left or right fringes,
10807 or both, are absent.
10808 (start_display, move_it_in_display_line_to): Handle the case of a
10809 GUI frame without a fringe to display continuation or truncation
10811 (insert_left_trunc_glyphs): Support GUI frames: make sure
10812 truncation glyphs overwrite enough glyphs from the current line to
10813 have sufficient space in pixels.
10814 (display_line): Support truncation and continuation glyphs on GUI
10815 frames. If some spare pixels are left on the line after inserting
10816 the truncation glyphs, fill that space with a stretch glyph of a
10817 suitably computed width.
10819 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
10820 produce_glyphs, to support GUI sessions.
10822 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
10824 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
10826 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
10828 Do not require float-time's arg to fit in time_t (Bug#11825).
10829 This works better on hosts where time_t is unsigned, and where
10830 float-time is applied to the (negative) difference between two times.
10831 * editfns.c (decode_time_components): Last arg is now double *,
10832 not int *, and means to store all the result as a double, without
10833 worrying about whether the seconds part fits in time_t.
10834 All callers changed.
10835 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
10836 All callers changed.
10837 (Ffloat_time): Do not fail merely because the specified time falls
10838 outside of time_t range.
10840 2012-07-07 Glenn Morris <rgm@gnu.org>
10842 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
10843 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
10844 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
10846 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
10848 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
10849 Update dependencies.
10851 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
10853 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
10855 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
10856 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
10857 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
10858 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
10859 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
10860 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
10862 * xfont.c (compare_font_names): Redo to omit the need for casts.
10864 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
10866 * xfns.c (Fx_change_window_property): Doc fix.
10867 * w32fns.c (Fx_change_window_property): Doc fix.
10869 * w32fns.c (Fx_window_property): Accept the same arguments as the
10870 X Windows version. Doc fix.
10871 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
10873 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
10874 Eli Zaretskii <eliz@gnu.org>
10876 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
10877 Windows-specific code from nt/config.nt moved here.
10878 Obsolete settings removed.
10880 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
10882 * process.c: Avoid unnecessary calls to gettime.
10883 (wait_reading_process_output): Don't get the time of day
10884 when gobbling data immediately and not waiting, as there's no need
10885 for it in that case. This removes a FIXME.
10887 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
10889 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
10890 is defined (Bug#11768).
10892 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10894 Fix marker debugging code.
10895 * marker.c (byte_char_debug_check): Do not perform the check
10896 if buffer is not multibyte.
10897 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
10898 Call byte_char_debug_check with correct arguments.
10900 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10902 Compile marker debugging code only if ENABLE_CHECKING is defined.
10903 * marker.c (byte_char_debug_check, count_markers):
10904 Use only if ENABLE_CHECKING is defined.
10905 (byte_debug_flag): Remove.
10906 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
10907 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
10909 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10911 Avoid code repetition in marker-related functions.
10912 * marker.c (attach_marker): New function.
10913 (Fset_marker, set_marker_restricted, set_marker_both)
10914 (set_marker_restricted_both): Use it.
10915 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
10916 Consistently rename charno to charpos.
10917 (marker_position): Add eassert.
10918 (marker_byte_position): Convert to eassert.
10920 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10922 Simplify list operations in unchain_overlay and unchain_marker.
10923 * buffer.c (unchain_overlay): Simplify. Add comment.
10924 * marker.c (unchain_marker): Simplify. Fix comments.
10926 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10928 Introduce fast path for the widely used marker operation.
10929 * alloc.c (build_marker): New function.
10930 * lisp.h (build_marker): New prototype.
10931 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
10932 * composite.c (autocmp_chars): Likewise.
10933 * editfns.c (buildmark): Remove.
10934 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
10935 (save_restriction_save): Use build_marker.
10936 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
10937 * window.c (save_window_save): Likewise.
10939 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10941 Do not use Fdelete_overlay in delete_all_overlays
10942 to avoid redundant calls to unchain_overlay.
10943 * buffer.c (drop_overlay): New function.
10944 (delete_all_overlays, Fdelete_overlay): Use it.
10945 * minibuf.c (get_minibuffer): Fix comment.
10947 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
10949 Port to OpenBSD 5.1 amd64.
10950 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
10951 This is needed for OpenBSD, and should be harmless on all BSD systems.
10952 Also, include <sys/sysctl.h>, as it should be available on all
10953 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
10954 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
10955 use p_pid member, not kp_proc.pid.
10957 2012-07-06 Glenn Morris <rgm@gnu.org>
10959 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
10961 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
10963 More xmalloc and related cleanup.
10964 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
10965 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
10966 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
10967 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
10968 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
10969 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
10970 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
10971 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
10972 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
10974 Omit needless casts involving void * pointers and allocation.
10975 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
10976 as the former is more robust if P's type is changed.
10977 Prefer xzalloc to xmalloc + memset 0.
10978 Simplify malloc-or-realloc to realloc.
10979 Don't worry about xmalloc returning a null pointer.
10980 Prefer xstrdup to xmalloc + strcpy.
10981 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
10983 * keyboard.c (apply_modifiers_uncached): Prefer local array to
10984 alloca of a constant.
10986 2012-07-05 Eli Zaretskii <eliz@gnu.org>
10988 * xdisp.c (display_line): Fix horizontal pixel coordinates when
10989 hscroll is larger than the line width. Fixes long and futile
10990 looping inside extend_face_to_end_of_line (on a TTY) producing
10991 glyphs that are not needed and thrown away.
10993 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
10995 * marker.c (set_marker_restricted_both): Simplify by using
10998 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11000 * editfns.c (region_limit): Simplify by using clip_to_bounds.
11002 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
11004 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
11005 not defined (Bug#11768).
11006 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
11007 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
11008 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
11009 followed by gtk_box_set_homogeneous (Bug#11768).
11010 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
11011 (update_theme_scrollbar_width, xg_create_scroll_bar):
11012 Use gtk_scrollbar_new (Bug#11768).
11013 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
11014 (is_box_type): New function (Bug#11768).
11015 (xg_tool_item_stale_p): Call is_box_type.
11016 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
11017 with default display (Bug#11768).
11019 2012-07-05 Eli Zaretskii <eliz@gnu.org>
11021 * xdisp.c (window_hscroll_limited): New function.
11022 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
11023 coordinates when window's hscroll is set to insanely large
11024 values. (Bug#11857)
11026 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
11028 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
11029 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
11031 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
11034 * lisp.h (xzalloc): New prototype. Omit needless casts.
11035 * alloc.c (xzalloc): New function. Omit needless casts.
11036 * charset.c: Omit needless casts. Convert all calls to
11037 xmalloc with following memset to xzalloc.
11038 * dispnew.c: Likewise.
11039 * fringe.c: Likewise.
11040 * image.c: Likewise.
11041 * sound.c: Likewise.
11042 * term.c: Likewise.
11043 * w32fns.c: Likewise.
11044 * w32font.c: Likewise.
11045 * w32term.c: Likewise.
11046 * xfaces.c: Likewise.
11047 * xfns.c: Likewise.
11048 * xterm.c: Likewise.
11049 * atimer.c: Omit needless casts.
11050 * buffer.c: Likewise.
11051 * callproc.c: Likewise.
11053 * coding.c: Likewise.
11054 * composite.c: Likewise.
11056 * doprnt.c: Likewise.
11057 * editfns.c: Likewise.
11058 * emacs.c: Likewise.
11059 * eval.c: Likewise.
11060 * filelock.c: Likewise.
11062 * gtkutil.c: Likewise.
11063 * keyboard.c: Likewise.
11064 * lisp.h: Likewise.
11065 * lread.c: Likewise.
11066 * minibuf.c: Likewise.
11067 * msdos.c: Likewise.
11068 * print.c: Likewise.
11069 * process.c: Likewise.
11070 * region-cache.c: Likewise.
11071 * search.c: Likewise.
11072 * sysdep.c: Likewise.
11073 * termcap.c: Likewise.
11074 * terminal.c: Likewise.
11075 * tparam.c: Likewise.
11076 * w16select.c: Likewise.
11078 * w32reg.c: Likewise.
11079 * w32select.c: Likewise.
11080 * w32uniscribe.c: Likewise.
11081 * widget.c: Likewise.
11082 * xdisp.c: Likewise.
11083 * xmenu.c: Likewise.
11084 * xrdb.c: Likewise.
11085 * xselect.c: Likewise.
11087 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
11089 * fileio.c (time_error_value): Check the right error number.
11090 Problem reported by Troels Nielsen in
11091 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
11093 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11095 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
11096 This should be fixed in a better way; see Eli Zaretskii in
11097 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
11098 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
11100 * fileio.c (time_error_value): Rename from special_mtime.
11101 The old name's problems were noted by Eli Zaretskii in
11102 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
11104 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
11105 This variable's comment says Emacs needs at least one GDB-visible
11106 symbol of type enum pvec_type, to work around GDB problems.
11107 The symbol's value doesn't matter.
11109 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
11110 that causes compilation to fail on pre-C99 compilers.
11112 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
11114 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
11115 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
11117 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11119 * buffer.c (init_buffer_once): Fix initialization of
11120 headers for buffer_defaults and buffer_local_symbols.
11121 Reported by Juanma Barranquero <lekktu@gmail.com>.
11123 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
11125 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
11126 * lisp.h (enum pvec_type): Use fewer bits.
11127 (PSEUDOVECTOR_SIZE_BITS): New constant.
11128 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
11129 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
11130 change in pvec_type.
11131 (PSEUDOVECTOR_TYPEP): New macro.
11132 (TYPED_PSEUDOVECTORP): Use it.
11133 * fns.c (internal_equal): Adapt code to extract pvectype.
11134 * emacs.c (gdb_pvec_type): Update type.
11135 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
11136 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
11137 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
11138 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
11139 (sweep_vectors): Use it. Use local var `total_bytes' instead of
11140 abusing vector->header.next.nbytes.
11141 (live_vector_p): Use PVEC_TYPE.
11142 (mark_object): Adapt code to extract pvectype. Use switch.
11144 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11146 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
11147 Tighten new eassert a bit.
11149 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11151 Fix compilation with --enable-gcc-warnings and -O1
11152 optimization level.
11153 * doprnt.c (doprnt): Change type of tem to int, initialize
11154 to avoid compiler warning. Add eassert.
11155 * search.c (simple_search): Initialize match_byte to avoid
11156 compiler warning. Add eassert.
11158 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11160 Avoid weird behavior with large horizontal scrolls.
11161 Without this change, for example, large hscroll values would
11162 mess up Emacs's display on Fedora 15 x86, presumably due to
11163 overflows in int calculations in the display code.
11164 Also, if buffers had long lines, Emacs would freeze.
11165 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
11166 (set_window_hscroll): New function, containing the old guts of
11167 Fset_window_hscroll. Return the clipped value.
11168 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
11169 This avoids the need to check against PTRDIFF_MAX.
11171 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
11173 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
11175 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
11177 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
11179 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
11180 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
11181 since GCC 4.4.6 issues a bogus warning for them.
11183 Fix bugs in file timestamp newness comparisons.
11184 * fileio.c (Ffile_newer_than_file_p):
11185 * lread.c (Fload): Use full timestamp resolution of files,
11186 not just the 1-second resolution, so that files that are only
11187 slightly newer still count as newer.
11188 * fileio.c (Ffile_newer_than_file_p): Don't assume file
11189 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
11191 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
11193 * fileio.c: Improve handling of file time marker. (Bug#11852)
11194 (special_mtime): New function.
11195 (Finsert_file_contents, Fverify_visited_file_modtime):
11196 Use it to set special mtime values consistently.
11198 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
11200 * fileio.c (Finsert_file_contents): Properly handle st_mtime
11201 marker for non-existing file. (Bug#11852)
11203 2012-07-03 Glenn Morris <rgm@gnu.org>
11205 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
11206 and did not make it into globals.h).
11208 2012-07-03 Tom Tromey <tromey@redhat.com>
11210 * window.c (Fset_window_margins, Fset_window_fringes)
11211 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
11212 * textprop.c (Fprevious_property_change): No longer static.
11213 * syntax.c (Fsyntax_table_p): No longer static.
11214 * process.c (Fget_process, Fprocess_datagram_address): No longer
11216 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
11217 * keyboard.c (Fcommand_execute): No longer static.
11219 * insdel.c (Fcombine_after_change_execute): No longer static.
11220 * image.c (Finit_image_library): No longer static.
11221 * fileio.c (Fmake_symbolic_link): No longer static.
11222 * eval.c (Ffetch_bytecode): No longer static.
11223 * editfns.c (Fuser_full_name): No longer static.
11224 * doc.c (Fdocumentation_property, Fsnarf_documentation):
11226 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
11228 * dired.c (Ffile_attributes): No longer static.
11229 * composite.c (Fcomposition_get_gstring): No longer static.
11230 * callproc.c (Fgetenv_internal): No longer static.
11232 * ccl.h: Remove EXFUNs.
11233 * buffer.h: Remove EXFUNs.
11234 * dispextern.h: Remove EXFUNs.
11235 * intervals.h: Remove EXFUNs.
11236 * fontset.h: Remove EXFUN.
11237 * font.h: Remove EXFUNs.
11238 * dosfns.c (system_process_attributes): Remove EXFUN.
11239 * keymap.h: Remove EXFUNs.
11240 * lisp.h: Remove EXFUNs.
11241 * w32term.h: Remove EXFUNs.
11242 * window.h: Remove EXFUNs.
11243 * xsettings.h: Remove EXFUN.
11244 * xterm.h: Remove EXFUN.
11246 2012-07-03 Glenn Morris <rgm@gnu.org>
11248 * lisp.h (Frandom): Make it visible to C.
11249 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
11250 buffer for invisible buffers. (Bug#1229)
11252 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11254 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
11255 values which aren't power of 2.
11256 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
11257 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
11260 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
11262 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
11264 * alloc.c (mark_object): Revert part of last patch to use `switch'.
11266 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11268 * alloc.c (allocate_vector_block): Remove redundant
11269 calls to mallopt if DOUG_LEA_MALLOC is defined.
11270 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
11271 avoid calls to mallopt if zero_vector is returned.
11273 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11275 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
11276 is enabled, avoid dereferencing NULL current_sblock if
11279 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
11281 Cleanup basic buffer management.
11282 * buffer.h (struct buffer): Change layout to use generic vector
11283 marking code. Fix some comments. Change type of 'clip_changed'
11284 to bitfield. Remove unused #ifndef old.
11285 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
11286 (GET_OVERLAYS_AT): Fix indentation.
11287 (for_each_per_buffer_object_at): New macro.
11288 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
11289 (Fbuffer_local_variables): Use it.
11290 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
11291 * alloc.c (allocate_buffer): Adjust to match new layout of
11292 struct buffer. Fix comment.
11293 (mark_overlay): New function.
11294 (mark_buffer): Use it. Use mark_vectorlike to mark normal
11295 Lisp area of struct buffer.
11296 (mark_object): Use it. Adjust marking of misc objects
11297 and related comments.
11299 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
11301 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
11302 wrapper that is not needed because the wrapped code is a no-op (zero
11303 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
11304 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
11306 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
11308 * alloc.c (mark_buffer): Simplify. Remove prototype.
11309 (mark_object): Add comment. Reorganize marking of vector-like
11310 objects. Use CHECK_LIVE for all vector-like objects except buffers
11311 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
11312 Avoid redundant calls to mark_vectorlike for bool vectors.
11314 2012-06-30 Glenn Morris <rgm@gnu.org>
11316 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
11318 * epaths.in (PATH_SITELOADSEARCH): New.
11319 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
11320 This is rather than relying on --enable-locallisppath elements
11321 having "site-lisp" in their names. (Bug#10208#25, 11658)
11323 2012-06-30 Eli Zaretskii <eliz@gnu.org>
11325 * w32proc.c (sys_select): Accept and ignore one more argument.
11327 * w32.c (emacs_gnutls_pull): Call select with one more argument.
11329 * sysselect.h [DOS_NT]: Don't include sys/select.h.
11330 (pselect) [!MS_DOS]: Redirect to sys_select.
11332 * sysdep.c: Don't include dos.h and dosfns.h.
11334 * process.c (sys_select):
11335 * msdos.c (sys_select): Accept one more argument and ignore it.
11337 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
11338 adapt data types and code to that.
11341 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
11342 which clashes with the gnulib function of the same name.
11344 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
11346 * font.c (font_style_to_value, font_style_symbolic)
11347 (font_prop_validate_style): Add type checks for values in
11350 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
11352 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
11355 2012-06-29 Eli Zaretskii <eliz@gnu.org>
11357 * xdisp.c (try_window_id): Undo last change.
11359 * w32.c (getwd): Adjust commentary about startup_dir.
11360 (init_environment): Always call sys_access, even in non-MSVC
11361 builds. Don't chdir to the directory of the Emacs executable.
11362 This undoes code from 1997 which was justified by the need to
11363 "avoid conflicts when removing and renaming directories". But its
11364 downside was that every relative file name was being interpreted
11365 relative to the directory of the Emacs executable, which can never
11366 be TRT. In particular, it broke sys_access when called with
11367 relative file names.
11368 (sys_access): Map GetLastError to errno.
11370 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11372 * window.h (struct window): Change type of 'fringes_outside_margins'
11373 to bitfield. Fix comment. Adjust users accordingly.
11374 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
11376 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
11379 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
11381 * gnutls.c (emacs_gnutls_handshake):
11382 Add QUIT to make the loop interruptible.
11384 2012-06-29 Glenn Morris <rgm@gnu.org>
11386 * charset.c (init_charset): Make lack of etc/charsets fatal.
11388 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11390 * editfns.c (region_limit): Fix type mismatch.
11392 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
11394 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
11395 undefined. Convert from xassert to eassert.
11396 * nsmenu.m: Convert from xassert to eassert.
11397 * nsterm.m: Likewise.
11399 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
11401 * editfns.c (region_limit): Clip to narrowing (bug#11770).
11403 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
11405 Avoid integer overflow on scroll-left and scroll-right.
11406 * window.c (HSCROLL_MAX): New macro.
11407 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
11408 overflow when requested scroll falls outside ptrdiff_t range.
11410 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11412 * window.h (struct window): Change type of 'hscroll',
11413 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
11414 'last_modified' and 'last_overlay_modified' to EMACS_INT.
11415 Adjust users accordingly.
11416 * xdisp.c (try_cursor_movement): Replace type check with eassert.
11417 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
11418 from EMACS_INT to ptrdiff_t.
11419 (make_window): Omit redundant initialization.
11421 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
11423 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
11425 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11427 * window.h (struct window): Change type of 'use_time' and
11428 'sequence_number' from Lisp_Object to int.
11429 * frame.c (make_frame): Adjust users accordingly.
11430 * print.c (print_object): Likewise.
11431 * window.c (select_window, Fwindow_use_time, make_parent_window)
11432 (make_window): Likewise.
11434 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11436 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
11437 enabled with --enable-checking=[all,glyphs] configure option.
11438 Fix GLYPH_DEBUG usage assuming that it may be undefined,
11439 adjust comments accordingly.
11440 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
11441 undefined, adjust comments accordingly.
11442 * image.c: Likewise.
11443 * scroll.c: Likewise.
11444 * w32fns.c: Likewise.
11445 * w32term.c: Likewise.
11446 * xdisp.c: Likewise.
11447 * xfaces.c: Likewise.
11448 * xfns.c: Likewise.
11449 * xterm.c: Likewise.
11451 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
11453 Generalize run-time debugging checks.
11454 * dispextern.h (XASSERTS): Remove.
11455 * fontset.c (xassert): Remove.
11456 Convert from xassert to eassert.
11457 * alloc.c: Convert from xassert to eassert.
11458 * bidi.c: Likewise.
11459 * dispnew.c: Likewise.
11461 * fringe.c: Likewise.
11462 * ftfont.c: Likewise.
11463 * gtkutil.c: Likewise.
11464 * image.c: Likewise.
11465 * keyboard.c: Likewise.
11466 * menu.c: Likewise.
11467 * process.c: Likewise.
11468 * scroll.c: Likewise.
11469 * sound.c: Likewise.
11470 * term.c: Likewise.
11471 * w32console.c: Likewise.
11472 * w32fns.c: Likewise.
11473 * w32term.c: Likewise.
11474 * window.c: Likewise.
11475 * xdisp.c: Likewise.
11476 * xfaces.c: Likewise.
11477 * xfns.c: Likewise.
11478 * xselect.c: Likewise.
11479 * xterm.c: Likewise.
11481 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
11483 * fns.c (maybe_resize_hash_table): Output message when growing the
11486 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11488 * alloc.c (allocate_string_data): Remove dead code.
11489 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
11490 avoid GCC warning about unused macro.
11492 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11494 * alloc.c (allocate_string): Omit intervals initialization.
11495 * alloc.c (make_uninit_multibyte_string): Initialize intervals
11496 as in make_pure_string and make_pure_c_string.
11498 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11500 * alloc.c (allocate_string): Fix last change.
11502 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
11504 * alloc.c (allocate_string): Remove two redundant calls
11505 to memset, add explicit initialization where appropriate.
11507 2012-06-27 Glenn Morris <rgm@gnu.org>
11509 * lisp.mk (lisp): Remove paths.elc.
11511 2012-06-27 Chong Yidong <cyd@gnu.org>
11513 * doc.c (Fsubstitute_command_keys): Fix punctuation.
11515 2012-06-26 John Wiegley <johnw@newartisans.com>
11517 * unexmacosx.c (copy_data_segment): Add two section names used
11518 on Mac OS X Lion: __mod_init_func and __mod_term_func.
11520 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
11521 when building with Clang.
11523 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
11525 * eval.c (Fapply): Allow calling it with a single argument.
11527 2012-06-26 Eli Zaretskii <eliz@gnu.org>
11529 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
11530 _stricmp and _strnicmp.
11531 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
11533 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11535 * alloc.c (allocate_window): Zero out non-Lisp part of newly
11537 (allocate_process): Likewise for new process.
11538 (allocate_terminal): Change to use offsetof.
11539 (allocate_frame): Likewise.
11540 * frame.c (make_frame): Omit redundant initialization.
11541 * window.c (make_parent_window): Use memset.
11542 (make_window): Omit redundant initialization.
11543 * process.c (make_process): Omit redundant initialization.
11544 * terminal.c (create_terminal): Likewise.
11546 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11548 * term.c (delete_tty): Remove redundant call to memset.
11550 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
11552 * alloc.c: Remove build_string.
11553 * lisp.h: Define build_string as static inline. This provides
11554 a better opportunity to optimize away calls to strlen when the
11555 function is called with compile-time constant argument.
11556 * image.c (imagemagick_error): Convert to build_string.
11557 * w32proc.c (sys_spawnve): Likewise.
11558 * xterm.c (x_term_init): Likewise.
11560 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
11562 Use sprintf return value instead of invoking strlen on result.
11563 In the old days this wasn't portable, since some sprintf
11564 implementations returned char *. But they died out years ago and
11565 Emacs already assumes sprintf returns int.
11566 Similarly for float_to_string.
11567 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
11568 * ccl.c (ccl_driver):
11569 * character.c (string_escape_byte8):
11570 * data.c (Fnumber_to_string):
11571 * doprnt.c (doprnt):
11572 * print.c (print_object):
11573 * xdisp.c (message_dolog):
11574 * xfns.c (syms_of_xfns):
11575 Use sprintf or float_to_string result to avoid need to call strlen.
11576 * data.c (Fnumber_to_string):
11577 Use make_unibyte_string, since the string must be ASCII.
11578 * lisp.h, print.c (float_to_string): Now returns int length.
11579 * term.c (produce_glyphless_glyph):
11580 Use sprintf result rather than recomputing it.
11582 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
11583 * Makefile.in (ALL_CFLAGS):
11584 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
11585 * gmalloc.c, regex.c: Include <config.h> unconditionally.
11587 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11589 * dispextern.h (xstrcasecmp): Define to library function
11590 strcasecmp if available.
11591 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
11593 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
11595 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
11596 Avoid comma operator.
11597 * menu.c (push_submenu_start, push_submenu_end)
11598 (push_left_right_boundary, push_menu_pane): Likewise.
11599 * msdos.c (dos_rawgetc): Likewise.
11601 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11603 * xfns.c (xic_create_fontsetname): Remove redundant calls
11606 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
11608 * gtkutil.c (get_utf8_string): Remove redundant assignment.
11609 sprintf already null-terminates its output.
11611 * xfns.c (x_window): Remove redundant cast.
11613 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
11615 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
11616 `const char *' to `char *' to avoid compiler warning.
11618 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11620 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
11621 instead of truncating it to 63 (admittedly a generous limit).
11623 * process.c: Fix spelling and caps in comments.
11625 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
11627 * emacs.c (setpgrp): Remove definition, unused.
11628 * sysdep.c (setpgrp): Remove definition, not used in this file.
11630 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
11632 * makefile.w32-in: Update dependencies.
11634 2012-06-24 Eli Zaretskii <eliz@gnu.org>
11636 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
11637 (SYSTIME_H): Add nt/inc/sys/time.h.
11639 * systime.h [WINDOWSNT]: Include sys/time.h.
11641 * s/ms-w32.h (struct timespec): Definition moved from
11642 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11644 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11646 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
11647 * buffer.h (buffer_slot_type_mismatch):
11648 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
11649 * eval.c (unwind_to_catch):
11650 * image.c (my_png_error, my_error_exit):
11651 * keyboard.c (quit_throw_to_read_char, user_error)
11652 (Fexit_recursive_edit, Fabort_recursive_edit):
11653 * lisp.h (die, args_out_of_range, args_out_of_range_3)
11654 (wrong_type_argument, buffer_overflow, __executable_start)
11655 (memory_full, buffer_memory_full, string_overflow, Fthrow)
11656 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
11657 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
11659 (child_setup) [!DOS_NT]:
11660 * lread.c (end_of_file_error, invalid_syntax):
11661 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
11662 * puresize.h (pure_write_error):
11663 * search.c (matcher_overflow):
11664 * sound.c (sound_perror, alsa_sound_perror):
11665 * sysdep.c, syssignal.h (croak):
11666 * term.c (maybe_fatal, vfatal):
11667 * textprop.c (text_read_only):
11668 * undo.c (user_error):
11669 * unexmacosx.c (unexec_error):
11670 * xterm.c (x_ins_del_lines, x_delete_glyphs):
11671 Use _Noreturn rather than NO_RETURN.
11672 No need for separate decl merely because of _Noreturn.
11673 * sound.c (sound_warning, parse_sound):
11674 Remove unnecessary forward decls.
11676 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
11678 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
11679 * lisp.h (WAIT_READING_MAX): New macro.
11680 * dispnew.c (Fsleep_for, sit_for):
11681 * keyboard.c (kbd_buffer_get_event):
11682 * process.c (Faccept_process_output):
11683 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
11684 This improves on the previous patch, which introduced a bug
11685 when time_t is unsigned and as wide as intmax_t.
11686 See <http://bugs.gnu.org/9000#51>.
11688 2012-06-23 Eli Zaretskii <eliz@gnu.org>
11690 * dispnew.c (sit_for, Fsleep_for):
11691 * keyboard.c (kbd_buffer_get_event):
11692 * process.c (Faccept_process_output): Avoid compiler warnings when
11693 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
11695 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
11697 * makefile.w32-in: Update dependencies.
11699 * w32.c (ltime): Add return type and declare static.
11700 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
11702 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
11704 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
11705 Privately reported by Herbert J. Skuhra.
11706 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
11708 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
11709 not make_lisp_timeval, when the argument is of type EMACS_TIME.
11711 2012-06-23 Eli Zaretskii <eliz@gnu.org>
11713 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
11714 last argument of make_unibyte_string.
11716 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
11717 language ID in the event parameters.
11719 * w32term.c (w32_read_socket): Put the new keyboard codepage into
11720 event.code, not the obscure "character set ID".
11722 2012-06-23 Chong Yidong <cyd@gnu.org>
11724 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
11726 2012-06-23 Eli Zaretskii <eliz@gnu.org>
11728 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
11729 * w32.c (fdutimens): New function.
11731 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
11733 * s/ms-w32.h (pselect): Redirect to sys_select.
11735 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
11737 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
11738 in the logic of incrementing and decrementing the value of
11739 use_relocatable_buffers.
11741 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
11743 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
11744 Privately reported by Herbert J. Skuhra.
11745 [__FreeBSD__]: Remove "*/" typo after "#include".
11746 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
11747 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
11748 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
11749 Don't assume EMACS_TIME and struct timeval are the same type.
11751 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
11753 Support higher-resolution time stamps (Bug#9000).
11754 The time stamps are only nanosecond-resolution at the C level,
11755 since that's the best that any real-world system supports now.
11756 But they are picosecond-resolution at the Lisp level, as that's
11757 easy, and leaves room for future OS improvements.
11759 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
11762 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
11763 Don't get current time unless it's needed.
11765 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
11766 now provides it if it's absent.
11767 (start_atimer): Port to higher-res time stamps.
11768 Check for time stamp overflow. Don't get current time more
11769 often than is needed.
11771 * buffer.h (struct buffer): Buffer modtime now has high resolution.
11772 Include systime.h, not time.h.
11773 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
11775 * dired.c: Include stat-time.h.
11776 (Ffile-attributes): File times now have higher resolution.
11778 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
11779 (struct image): Timestamp now has higher resolution.
11781 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
11782 has at least microseconds now. All uses removed.
11783 (update_frame, update_single_window, update_window, update_frame_1)
11784 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
11785 (duration_to_sec_usec): Remove; no longer needed.
11787 * editfns.c (time_overflow): Now extern.
11788 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
11789 (float-time, Fformat_time_string, Fcurrent_time_string)
11790 (Fcurrent_time_zone): Accept and generate higher-resolution
11792 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
11793 (decode_time_components, lisp_seconds_argument): New functions.
11794 (make_time): Now static.
11795 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
11796 Report an error if the time is invalid, rather than having the caller
11799 * fileio.c: Include <stat-time.h>
11800 (Fcopy_file): Copy higher-resolution time stamps.
11801 Prefer to set the time stamp via a file descriptor if that works.
11802 (Fset_file_times, Finsert_file_contents, Fwrite_region)
11803 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
11804 (Fvisited_file_modtime, Fset_visited_file_modtime):
11805 Support higher-resolution time stamps.
11807 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
11809 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
11811 * image.c (prepare_image_for_display, clear_image_cache)
11812 (lookup_image): Port to higer-resolution time stamps.
11814 * keyboard.c (start_polling, bind_polling_period):
11815 Check for time stamp overflow.
11816 (read_char, kbd_buffer_get_event, timer_start_idle)
11817 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
11818 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
11819 Port to higher-resolution time stamps. Do not assume time_t is signed.
11820 (decode_timer): New function. Timers are now vectors of length 9,
11821 not 8, to accommodate the picosecond component.
11822 (timer_check_2): Use it.
11824 * nsterm.m (select_timeout, timeval_subtract): Remove.
11825 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
11826 as they're a bit more accurate and handle overflow better.
11827 (ns_select): Change prototype to be compatible with pselect.
11828 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
11829 * nsterm.h (ns_select): Adjust prototype.
11831 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
11832 us-resolution time stamps.
11833 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
11835 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
11837 * lisp.h (time_overflow): New decl.
11838 (wait_reading_process_output): First arg is now intmax_t, not int,
11839 to accommodate larger waits.
11841 * process.h (struct Lisp_Process.read_output_delay):
11842 Now counts nanoseconds, not microseconds.
11843 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
11845 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
11846 (wait_reading_process_output):
11847 Port to ns-resolution time stamps.
11848 (Faccept_process_output, wait_reading_process_output):
11849 Check for time stamp overflow. Do not assume time_t is signed.
11850 (select_wrapper): Remove; we now use pselect.
11851 (Fprocess_attributes): Now generates ns-resolution time stamps.
11853 * sysdep.c: Include utimens.h. Don't include utime.h
11854 or worry about struct utimbuf; gnulib does that for us now.
11855 (gettimeofday): Remove; gnulib provides a substitute.
11856 (make_timeval): New function.
11857 (set_file_times): Now sets ns-resolution time stamps.
11858 New arg FD; all uses changed.
11859 (time_from_jiffies, ltime_from_jiffies, get_up_time)
11860 (system_process_attributes):
11861 Now returns ns-resolution time stamp. All uses changed.
11862 Check for time stamp overflow.
11864 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
11865 provides a substitute now.
11867 * systime.h: Include timespec.h rather than sys/time.h and time.h,
11868 since it guarantees struct timespec.
11869 (EMACS_TIME): Now struct timespec, so that we can support
11870 ns-resolution time stamps.
11871 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
11872 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
11873 (EMACS_USECS): Remove.
11874 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
11875 so multiply the arg by 1000 before storing it.
11876 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
11878 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
11879 Port to ns-resolution time stamps.
11880 (EMACS_TIME_NEG_P): Remove; replaced by....
11881 (EMACS_TIME_SIGN): New macro.
11882 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
11883 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
11884 (set_file_times, make_time, lisp_time_argument): Adjust signature.
11885 (make_timeval, make_lisp_time, decode_time_components): New decls.
11886 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
11887 that it mishandled time_t overflow. You can't compare by subtracting!
11888 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
11889 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
11891 * term.c: Include <sys/time.h>.
11892 (timeval_to_Time): New function, for proper overflow wraparound.
11893 (term_mouse_position, term_mouse_click): Use it.
11895 * undo.c (record_first_change): Support higher-resolution time stamps
11896 in the undo buffer.
11897 (Fprimitive_undo): Use them when restoring time stamps.
11899 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
11900 (w32_get_internal_run_time):
11901 Port to higher-resolution Emacs time stamps.
11902 (ltime): Now accepts single 64-bit integer, as that's more convenient
11905 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
11907 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
11908 for compatibility with pselect. Support ns-resolution time stamps.
11910 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
11912 * xselect.c (wait_for_property_change, x_get_foreign_selection):
11913 Check for time stamp overflow, and support ns-resolution time stamps.
11915 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
11916 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
11917 (timeval_subtract): Remove; no longer needed.
11918 (XTflash, XTring_bell, x_wait_for_event):
11919 Port to ns-resolution time stamps. Don't assume time_t is signed.
11921 2012-06-22 Chong Yidong <cyd@gnu.org>
11923 * xdisp.c (x_consider_frame_title): Revert last change.
11925 2012-06-22 Eli Zaretskii <eliz@gnu.org>
11927 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
11928 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
11929 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
11930 staticidx goes up to 1597 out of 1600 = 0x640.)
11932 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
11934 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
11935 Otherwise, the umask might be mistakenly 0 while handling input signals.
11937 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
11939 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
11941 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
11943 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
11944 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
11945 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
11946 access to `contents' member of Lisp_Vector objects with AREF and ASET
11949 2012-06-19 Chong Yidong <cyd@gnu.org>
11951 * frame.c (delete_frame): When selecting a frame on a different
11952 text terminal, do not alter the terminal's top-frame.
11954 * xdisp.c (format_mode_line_unwind_data): Record the target
11955 frame's selected window and its terminal's top-frame.
11956 (unwind_format_mode_line): Restore them.
11957 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
11959 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
11960 since tty frames can be explicitly named.
11961 (prepare_menu_bars): Likewise.
11963 * term.c (Ftty_top_frame): New function.
11965 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
11967 Port byte-code-meter to modern targets.
11968 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
11969 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
11970 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
11971 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
11972 (METER_1, METER_2): Simplify.
11974 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
11976 * data.c (Fdefalias): Return `symbol' (bug#11686).
11978 2012-06-18 Martin Rudalics <rudalics@gmx.at>
11980 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
11981 gets killed during executing of this function (Bug#11665).
11982 Try to always return Qt when the buffer has been actually killed.
11983 (Vkill_buffer_query_functions): In doc-string say that functions
11984 run by this hook should not change the current buffer.
11986 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
11988 Fix recently-introduced process.c problems found by static checking.
11989 * process.c (write_queue_push, write_queue_pop, send_process):
11990 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
11991 (write_queue_pop): Fix pointer signedness problem.
11992 (send_process): Remove unused local.
11994 2012-06-17 Chong Yidong <cyd@gnu.org>
11996 * xdisp.c (redisplay_internal): No need to redisplay terminal
11997 frames that are not on top.
11999 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
12001 * process.c (make_process): Initialize write_queue.
12002 (write_queue_push, write_queue_pop): New functions.
12003 (send_process): Use them to maintain correct ordering of process
12004 writes (Bug#10815).
12006 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
12008 * lisp.h (eassert): Assume C89 or later.
12009 This removes the need for CHECK.
12010 (CHECK): Remove. Its comments about always evaluating its
12011 argument were confusing, as 'eassert' typically does not evaluate
12014 * coding.c (produce_chars): Use ptrdiff_t, not int.
12016 * xterm.c (x_draw_underwave): Check for integer overflow.
12017 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
12019 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
12021 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
12022 referenced (Bug#11583).
12024 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
12026 Implement wave-style variant of underlining.
12027 * dispextern.h (face_underline_type): New enum.
12028 (face): Add field for underline type.
12029 * nsterm.m (ns_draw_underwave): New function.
12030 (ns_draw_text_decoration): Use it.
12031 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
12033 (x_draw_glyph_string): Use them.
12034 * xfaces.c (Qline, Qwave): New Lisp objects.
12035 (check_lface_attrs, merge_face_ref)
12036 (Finternal_set_lisp_face_attribute, realize_x_face):
12037 Handle wave-style underline face attributes.
12038 * xterm.c (x_draw_underwave): New function.
12039 (x_draw_glyph_string): Use it.
12041 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
12043 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
12044 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
12045 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
12046 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
12047 ($(BLD)/w32select.$(O)): Update dependencies.
12049 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
12051 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
12052 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
12053 * character.c (_fetch_multibyte_char_p): Remove.
12054 * alloc.c: Include "character.h" before "buffer.h".
12055 * bidi.c: Likewise.
12056 * buffer.c: Likewise.
12057 * bytecode.c: Likewise.
12058 * callint.c: Likewise.
12059 * callproc.c: Likewise.
12060 * casefiddle.c: Likewise.
12061 * casetab.c: Likewise.
12062 * category.c: Likewise.
12063 * cmds.c: Likewise.
12064 * coding.c: Likewise.
12065 * composite.c: Likewise.
12066 * dired.c: Likewise.
12067 * dispnew.c: Likewise.
12069 * dosfns.c: Likewise.
12070 * editfns.c: Likewise.
12071 * emacs.c: Likewise.
12072 * fileio.c: Likewise.
12073 * filelock.c: Likewise.
12074 * font.c: Likewise.
12075 * fontset.c: Likewise.
12076 * fringe.c: Likewise.
12077 * indent.c: Likewise.
12078 * insdel.c: Likewise.
12079 * intervals.c: Likewise.
12080 * keyboard.c: Likewise.
12081 * keymap.c: Likewise.
12082 * lread.c: Likewise.
12083 * macros.c: Likewise.
12084 * marker.c: Likewise.
12085 * minibuf.c: Likewise.
12086 * nsfns.m: Likewise.
12087 * nsmenu.m: Likewise.
12088 * print.c: Likewise.
12089 * process.c: Likewise.
12090 * regex.c: Likewise.
12091 * region-cache.c: Likewise.
12092 * search.c: Likewise.
12093 * syntax.c: Likewise.
12094 * term.c: Likewise.
12095 * textprop.c: Likewise.
12096 * undo.c: Likewise.
12097 * unexsol.c: Likewise.
12098 * w16select.c: Likewise.
12099 * w32fns.c: Likewise.
12100 * w32menu.c: Likewise.
12101 * window.c: Likewise.
12102 * xdisp.c: Likewise.
12103 * xfns.c: Likewise.
12104 * xmenu.c: Likewise.
12106 * xselect.c: Likewise.
12108 2012-06-16 Eli Zaretskii <eliz@gnu.org>
12110 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
12111 If all the glyphs of the glyph row came from strings, and we have no
12112 cursor positioning clues, put the cursor on the first glyph of the
12114 (handle_face_prop): Use chunk-relative overlay string index when
12115 indexing into it->string_overlays array. (Bug#11653)
12116 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
12117 the rightmost. (Bug#11720)
12119 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
12121 * category.h (CHAR_HAS_CATEGORY): Define as inline.
12122 (CATEGORY_MEMBER): Enforce 1/0 value.
12123 * category.c (_temp_category_set): Remove.
12125 2012-06-16 Eli Zaretskii <eliz@gnu.org>
12127 * window.c (Fdelete_other_windows_internal)
12128 (Fdelete_window_internal): Don't access frame's mouse highlight
12129 info of the initial frame. (Bug#11677)
12131 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
12133 * .gdbinit (xgetint): Fix recently-introduced paren typo.
12134 Assume USE_2_TAGS_FOR_INTS.
12135 (xreload): Adjust $tagmask width to match recent lisp.h change.
12137 Simplify lisp.h in minor ways that should not affect code.
12138 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
12139 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
12140 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
12141 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
12142 (INTTYPEBITS): New macro, for clarity.
12143 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
12144 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
12145 Simplify now that USE_LSB_TAG is always defined.
12146 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
12147 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
12149 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
12151 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
12153 2012-06-13 Glenn Morris <rgm@gnu.org>
12155 * s/bsd-common.h (BSD4_3):
12156 * s/usg5-4-common.h (USG5_4): No longer define; unused.
12158 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
12160 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
12162 (XLI, XIL): Define.
12163 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
12165 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
12166 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
12167 * alloc.c (widen_to_Lisp_Object): Remove.
12168 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
12169 * frame.c (delete_frame): Remove outdated comment.
12170 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
12171 USE_LISP_UNION_TYPE.
12172 (Fw32_unregister_hot_key): Likewise.
12173 (Fw32_toggle_lock_key): Likewise.
12174 * w32menu.c (add_menu_item): Likewise.
12175 (w32_menu_display_help): Use XIL instead of checking
12176 USE_LISP_UNION_TYPE.
12177 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
12178 (init_heap): Likewise.
12179 * w32term.c (w32_read_socket): Update comment.
12181 2012-06-13 Glenn Morris <rgm@gnu.org>
12183 * s/usg5-4-common.h, src/s/unixware.h:
12184 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
12186 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
12188 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
12190 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
12191 * alloc.c (make_number) [!defined make_number]:
12192 Remove, as lisp.h always defines this now.
12193 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
12194 (roundup_size): Verify that it is a power of 2.
12195 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
12196 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
12197 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
12198 -DUSE_LSB_TAG=0, to override the automatically-selected default.
12199 USE_LSB_TAG now is always defined to be either 0 or 1.
12201 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
12202 code works fine either way, and efficiency is not a concern here,
12203 as the union type is for debugging, not for production.
12204 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
12205 Use an inline function on all platforms when using the union type,
12206 since this is simpler and 'static inline' can be used portably
12208 (LISP_INITIALLY_ZERO): New macro.
12209 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
12210 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
12212 2012-06-12 Glenn Morris <rgm@gnu.org>
12214 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
12216 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
12218 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
12219 Move BROKEN_SIGIO to configure.
12221 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
12222 Move NO_TERMIO to configure.
12224 2012-06-12 Chong Yidong <cyd@gnu.org>
12226 * image.c (imagemagick_load_image): Use MagickFlattenImage if
12227 MagickMergeImageLayers is undefined. Use pixel pusher loop if
12228 MagickExportImagePixels is undefined.
12230 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
12232 * image.c (imagemagick_load_image): Remove unused label.
12234 2012-06-11 Glenn Morris <rgm@gnu.org>
12236 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
12237 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
12238 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
12239 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
12241 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
12243 * alloc.c (make_byte_code): New function.
12244 (Fmake_byte_code): Use it. Don't purify here.
12245 * lread.c (read1): Use it as well to avoid extra allocation.
12247 2012-06-11 Chong Yidong <cyd@gnu.org>
12249 * image.c (imagemagick_load_image): Implement transparency.
12251 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
12253 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
12254 account for preceding backslashes. (Bug#11663)
12256 2012-06-09 Chong Yidong <cyd@gnu.org>
12258 * term.c: Support italics in capable terminals (Bug#9652).
12259 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
12260 (turn_on_face): Output using TS_enter_italic_mode if available.
12261 Don't handle unused blinking and alt-charset cases.
12262 (turn_off_face): Handle italic case; discard unused tty_blinking_p
12263 and tty_alt_charset_p cases.
12264 (tty_capable_p, init_tty): Support italics.
12266 * termchar.h (struct tty_display_info): Add field for italics.
12267 Remove unused blink field.
12269 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
12272 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
12273 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
12274 tty_alt_charset_p. Add tty_italic_p.
12276 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
12278 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
12279 dbus_type_is_basic if available.
12280 (xd_extract_signed, xd_extract_unsigned): Rename from
12281 extract_signed and extract_unsigned, respectively. Adapt callers.
12283 2012-06-09 Chong Yidong <cyd@gnu.org>
12285 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
12287 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
12290 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
12292 * xdisp.c (vmessage): Treat frame message as multibyte.
12293 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
12294 would generate the diagnostic "Making \302\247 buffer-local while
12297 2012-06-08 Eli Zaretskii <eliz@gnu.org>
12299 * dispnew.c (showing_window_margins_p): Undo last change, which
12300 was done due to an inadvertent commit.
12301 (adjust_frame_glyphs_for_frame_redisplay): Do call
12302 showing_window_margins_p.
12304 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
12306 * eval.c (Fmake_var_non_special): New primitive.
12307 (syms_of_eval): Defsubr it.
12308 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
12310 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
12312 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
12313 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
12315 2012-06-08 Eli Zaretskii <eliz@gnu.org>
12317 * alloc.c (allocate_vectorlike): Fix last change.
12319 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
12321 Block-based vector allocation of small vectors.
12322 * lisp.h (struct vectorlike_header): New field `nbytes',
12323 adjust comment accordingly.
12324 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
12325 to denote vector blocks. Adjust users (live_vector_p,
12326 mark_maybe_pointer, valid_lisp_object_p) accordingly.
12327 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
12328 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES)
12329 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX)
12330 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST)
12331 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
12332 (roundup_size): New constant.
12333 (struct vector_block): New data type.
12334 (vector_blocks, vector_free_lists, zero_vector): New variables.
12335 (all_vectors): Rename to `large_vectors'.
12336 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
12337 (sweep_vectors): New functions.
12338 (allocate_vectorlike): Return `zero_vector' as the only vector of
12339 0 items. Allocate new vector from block if vector size is less than
12340 or equal to VBLOCK_BYTES_MAX.
12341 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
12342 (init_alloc_once): Add call to init_vectors.
12344 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
12346 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
12348 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
12350 * doprnt.c (doprnt): Truncate multibyte char correctly.
12351 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
12352 would mishandle a string argument "Xc" if X was a multibyte
12353 character of length 2: it would truncate after X's first byte
12354 rather than including all of X.
12356 2012-06-06 Chong Yidong <cyd@gnu.org>
12358 * buffer.c (word_wrap): Doc fix.
12360 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
12362 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
12364 2012-06-03 Glenn Morris <rgm@gnu.org>
12366 * xdisp.c (tool-bar-style): Doc fix.
12368 2012-06-03 Ulrich Müller <ulm@gentoo.org>
12370 * Makefile.in (PAXCTL): Define.
12371 (temacs$(EXEEXT)): Disable memory randomization for the temacs
12372 binary via PaX flags if the paxctl utility is available.
12373 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
12374 Restore PaX flags to their default. (Bug#11398)
12376 2012-06-03 Chong Yidong <cyd@gnu.org>
12378 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
12379 buffer (Bug#11226).
12381 2012-06-03 Chong Yidong <cyd@gnu.org>
12383 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
12384 (note_mode_line_or_margin_highlight): If there is no help echo,
12385 use mode-line-default-help-echo. Handle the case where the mouse
12386 position is past the end of the mode line string.
12388 * buffer.c (buffer_local_value_1): New function, split from
12389 Fbuffer_local_value; can return Qunbound.
12390 (Fbuffer_local_value): Use it.
12391 (Vmode_line_format): Docstring tweaks.
12393 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
12395 * sysdep.c (system_process_attributes): Improve comment.
12397 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
12399 * keyboard.c: Export real-this-command to Elisp.
12400 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
12401 and DEFVAR it. Update all users.
12403 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
12405 * minibuf.c (Fassoc_string): Remove duplicate declaration.
12407 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
12408 Convert pctcpu and pctmem to Lisp float properly.
12409 Let the compiler fold better, as 100.0/0x8000 is exact.
12411 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
12413 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
12416 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
12418 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
12420 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
12422 For a 'struct window', replace some Lisp_Object fields to
12423 bitfields where appropriate, remove unused fields.
12424 * window.h (struct window): Remove unused 'last_mark_x' and
12425 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
12426 change its type from Lisp_Object to bitfield.
12427 Change type of 'force_start', 'optional_new_start',
12428 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
12429 fields from Lisp_Object to bitfield. Adjust users accordingly.
12431 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
12433 Pacify gcc -Wdouble-precision when using Xaw.
12434 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
12435 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
12436 Use 'float' consistently, rather than 'float' in most places
12437 and 'double' in a couple of places.
12439 2012-05-31 Eli Zaretskii <eliz@gnu.org>
12441 * xdisp.c (handle_stop): Detect whether we have overlay strings
12442 loaded by testing it->current.overlay_string_index to be
12443 non-negative, instead of checking whether n_overlay_strings is
12444 positive. (Bug#11587)
12446 2012-05-31 Chong Yidong <cyd@gnu.org>
12448 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
12450 * doc.c (Fsubstitute_command_keys): Doc fix.
12452 2012-05-31 Eli Zaretskii <eliz@gnu.org>
12454 * search.c (search_buffer): Remove calls to
12455 r_alloc_inhibit_buffer_relocation, as it is now called by
12456 maybe_unify_char, which was the cause of relocation of buffer text
12459 2012-05-31 Eli Zaretskii <eliz@gnu.org>
12461 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
12462 for the duration of call to load_charset, to avoid problems with
12463 callers of maybe_unify_char that access buffer text through C
12466 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
12467 decrement the inhibition flag, instead of just setting or
12470 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
12472 Remove obsolete '#define static' cruft.
12473 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
12474 This #undef was "temporary" in 2000; it is no longer needed
12475 now that '#define static' has gone away.
12476 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
12477 (gray_bitmap_bits): Remove; no longer needed.
12478 All uses replaced with definiens.
12479 * xterm.c: Include "bitmaps/gray.xbm".
12481 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
12483 Clean up __executable_start, monstartup when --enable-profiling.
12484 The following changes affect the code only when profiling.
12485 * dispnew.c (__executable_start): Rename from safe_bcopy.
12486 Define only on platforms that need it.
12487 * emacs.c: Include <sys/gmon.h> when profiling.
12488 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
12489 (__executable_start): Remove decl, since lisp.h does it now.
12490 (safe_bcopy): Remove decl; no longer has that name.
12491 (main): Coalesce #if into single bit of code, for simplicity.
12492 Cast pointers to uintptr_t, since standard libraries want integers
12494 * lisp.h (__executable_start): New decl.
12496 2012-05-31 Glenn Morris <rgm@gnu.org>
12498 * image.c (Fimagemagick_types): Doc fix.
12500 2012-05-30 Jim Meyering <meyering@redhat.com>
12502 * callproc.c (Fcall_process_region): Include directory component
12503 in mkstemp error message (Bug#11586).
12505 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
12507 * alloc.c, lisp.h (make_pure_vector): Now static.
12509 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
12511 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
12512 Move to byte-run.el.
12513 (Fautoload): Do the hash-doc more carefully.
12514 * data.c (Fdefalias): Purify definition, except for keymaps.
12515 (Qdefun): Move from eval.c.
12516 * lisp.h (Qdefun): Remove.
12517 * lread.c (read1): Tiny simplification.
12519 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
12521 Do not create empty overlays with the evaporate property (Bug#9642).
12522 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
12523 Bug#9642, but explicitly check that the buffer the overlay would
12524 be moved to is live and rearrange lines to make sure that errors
12525 will not put the overlay in an inconsistent state.
12526 (Fdelete_overlay): Cosmetics.
12528 2012-05-28 Eli Zaretskii <eliz@gnu.org>
12530 * w32term.c (my_bring_window_to_top): New function.
12531 (x_raise_frame): Use handle returned by DeferWindowPos, which
12532 could be different from the original one.
12533 Call my_bring_window_to_top instead of my_set_foreground_window.
12536 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
12537 by calling BringWindowToTop.
12539 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
12540 (WM_EMACS_END): Increase by one.
12542 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
12544 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
12545 This avoids undefined behavior that might cause the eassert
12546 to not catch an out-of-range value.
12548 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
12550 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
12551 Update dependencies.
12553 2012-05-27 Eli Zaretskii <eliz@gnu.org>
12555 * bidi.c (bidi_mirror_char): Fix last change.
12557 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
12559 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
12560 when referring to sectname field in printf format.
12562 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
12564 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
12565 Only r_alloc_inhibit_buffer_relocation needed to be added;
12566 the others were already declared.
12568 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
12569 before checking whether it's out of range. Put the check inside
12571 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
12573 2012-05-27 Ken Brown <kbrown@cornell.edu>
12575 * callproc.c (Fcall_process): Restore a line that was accidentally
12576 commented out in the 2011-02-13 change (bug#11547).
12578 2012-05-27 Eli Zaretskii <eliz@gnu.org>
12580 * lisp.h [REL_ALLOC]: Add prototypes for external functions
12581 defined on ralloc.c.
12583 * buffer.c [REL_ALLOC]: Remove prototypes of
12584 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
12585 they are now on lisp.h.
12587 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
12589 * search.c (search_buffer): Use it to inhibit relocation of buffer
12590 text while re_search_2 is doing its job, because re_search_2 is
12591 passed C pointers to buffer text. (Bug#11519)
12593 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
12594 Update value to 24.
12596 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
12597 state after an additional call to move_it_in_display_line_to, keep
12598 the values of it->max_ascent and it->max_descent found for the
12600 (pos_visible_p): Revert the comparison against bottom_y to what it
12601 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
12604 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
12606 Fix coding-related core dumps with gcc -ftrapv.
12607 The code was computing A - B, where A and B are pointers, and B is
12608 random garbage. This can lead to core dumps on platforms that
12609 have special pointer registers, and it also leads to core dumps on
12610 x86-64 when compiled with gcc -ftrapv. The fix is to compute
12611 A - B only when B is initialized properly.
12612 * coding.c (coding_set_source, coding_set_destination): Return void.
12613 (coding_change_source, coding_change_destinations): New functions,
12614 with the old behaviors of coding_set_source and coding_set_destination.
12615 All callers that need an offset changed to use these new functions.
12617 2012-05-26 Glenn Morris <rgm@gnu.org>
12619 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
12621 2012-05-26 Eli Zaretskii <eliz@gnu.org>
12623 Extend mouse support on W32 text-mode console.
12624 * xdisp.c (draw_row_with_mouse_face):
12625 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
12627 * w32console.c: Include window.h.
12628 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
12630 (initialize_w32_display): Initialize mouse-highlight data.
12632 * w32inevt.c: Include termchar.h and window.h.
12633 (do_mouse_event): Support mouse-autoselect-window. When the mouse
12634 moves, call note_mouse_highlight. If help_echo changed, call
12635 gen_help_event to produce help-echo message in the echo area.
12636 Call clear_mouse_face if mouse_face_hidden is set in the mouse
12639 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
12641 * lread.c (read1): Simplify slightly to avoid an overflow warning
12642 with GCC 4.7.0 on x86-64.
12644 2012-05-26 Eli Zaretskii <eliz@gnu.org>
12646 * bidi.c (bidi_mirror_char): Revert last change: an int is
12647 definitely wide enough here.
12649 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
12651 Fix integer width and related bugs (Bug#9874).
12652 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
12653 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
12654 (string_bytes, check_sblock, allocate_string_data):
12655 (compact_small_strings, Fmake_bool_vector, make_string)
12656 (make_unibyte_string, make_multibyte_string)
12657 (make_string_from_bytes, make_specified_string)
12658 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
12659 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
12661 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12662 (allocate_pseudovector):
12663 Use int, not EMACS_INT, where int is wide enough.
12664 (inhibit_garbage_collection, Fgarbage_collect):
12665 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12666 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
12667 int might not be wide enough.
12668 (bidi_cache_search, bidi_cache_find, bidi_init_it)
12669 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
12670 (bidi_at_paragraph_end, bidi_find_paragraph_start)
12671 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
12672 (bidi_level_of_next_char, bidi_move_to_visually_next):
12673 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12674 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
12675 (Fkill_buffer, Fset_buffer_major_mode)
12676 (advance_to_char_boundary, Fbuffer_swap_text)
12677 (Fset_buffer_multibyte, overlays_at, overlays_in)
12678 (overlay_touches_p, struct sortvec, record_overlay_string)
12679 (overlay_strings, recenter_overlay_lists)
12680 (adjust_overlays_for_insert, adjust_overlays_for_delete)
12681 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
12682 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
12683 (Foverlay_recenter, last_overlay_modification_hooks_used)
12684 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
12685 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12686 (validate_region): Omit unnecessary test for b <= e,
12687 since that's guaranteed by the previous test.
12688 (adjust_overlays_for_delete): Avoid pos + length overflow.
12689 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
12690 (report_overlay_modification):
12691 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12692 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
12693 Omit pointer cast, which isn't needed anyway, and doesn't work
12694 after the EMACS_INT -> ptrdiff_t change.
12695 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
12696 * buffer.h: Adjust decls to match defn changes elsewhere.
12697 (struct buffer_text, struct buffer):
12698 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12699 Use EMACS_INT, not int, where int might not be wide enough.
12700 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
12701 not int, to avoid needless 32-bit limit on 64-bit hosts.
12702 (exec_byte_code): Use tighter memory-full test, one that checks
12703 for alloca overflow. Don't compute the address of the object just
12704 before an array, as that's not portable. Use EMACS_INT, not
12705 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
12706 * callint.c (Fcall_interactively):
12707 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12708 * callproc.c (call_process_kill, Fcall_process):
12709 Don't assume pid_t fits into an Emacs fixnum.
12710 (call_process_cleanup, Fcall_process, child_setup):
12711 Don't assume pid_t fits into int.
12712 (call_process_cleanup, Fcall_process, delete_temp_file)
12713 (Fcall_process_region):
12714 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12715 (Fcall_process): Simplify handling of volatile integers.
12716 Use int, not EMACS_INT, where int will do.
12717 * casefiddle.c (casify_object, casify_region, operate_on_word)
12718 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
12719 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12720 (casify_object): Avoid integer overflow when overallocating buffer.
12721 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
12722 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
12723 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
12724 * category.h (CATEGORYP): Don't assume arg is nonnegative.
12725 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
12726 integers are now checked earlier. All uses replaced with XINT.
12728 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12729 For CCL_MapSingle, check that content and value are in int range.
12730 (ccl_driver, Fregister_code_conversion_map):
12731 Check that Vcode_version_map_vector is a vector.
12732 (resolve_symbol_ccl_program): Check that vector header is in range.
12733 Always copy the vector, so that we can check its contents reliably
12734 now rather than having to recheck each instruction as it's being
12735 executed. Check that vector words fit in 'int'.
12736 (ccl_get_compiled_code, Fregister_ccl_program)
12737 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
12738 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
12739 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
12740 contents are in range.
12741 (Fccl_execute_on_string): Check that status is in range.
12742 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
12743 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
12744 Accept and return EMACS_INT, not int, because callers can pass values
12745 out of 'int' range.
12746 (c_string_width, strwidth, lisp_string_width, chars_in_text)
12747 (multibyte_chars_in_text, parse_str_as_multibyte)
12748 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
12749 (str_as_unibyte, str_to_unibyte, string_count_byte8)
12750 (string_escape_byte8, Fget_byte):
12751 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12752 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
12753 avoid mishandling large integers.
12754 * character.h: Adjust decls to match defn changes elsewhere.
12755 * charset.c (load_charset_map_from_file, find_charsets_in_text)
12756 (Ffind_charset_region):
12757 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12758 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
12759 (load_charset_map_from_vector, Fdefine_charset_internal):
12760 Don't assume fixnum fits in int.
12761 (load_charset_map_from_vector, Fmap_charset_chars):
12762 Remove now-unnecessary CHECK_NATNUMs.
12763 (Fdefine_charset_internal): Check ranges here, more carefully.
12764 Don't rely on undefined behavior with signed left shift overflow.
12765 Don't assume unsigned int fits into fixnum, or that fixnum fits
12766 into unsigned int. Don't require max_code to be a valid fixnum;
12767 that's not true for gb10830 4-byte on a 32-bit host. Allow
12768 invalid_code to be a cons, for the same reason. Require code_offset
12769 to be a character. Avoid int overflow if max_char is close
12771 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
12772 this is intended anyway and avoids some undefined behavior.
12773 (load_charset_map): Pass unsigned, not int, as 2nd arg of
12774 INDEX_TO_CODE_POINT, as that's what it expects.
12775 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
12776 * charset.h (DECODE_CHAR): Return int, not unsigned;
12777 this is what was intended anyway, and it avoids undefined behavior.
12778 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
12779 integer-overflow issues.
12780 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
12781 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
12782 where the argument is EMACS_INT, and this behavior is not intended.
12783 * chartab.c (Fmake_char_table, Fset_char_table_range)
12784 (uniprop_get_decoder, uniprop_get_encoder):
12785 Don't assume fixnum fits in int.
12786 * cmds.c (move_point): New function, that does the gist of
12787 Fforward_char and Fbackward_char, but does so while checking
12788 for integer overflow more accurately.
12789 (Fforward_char, Fbackward_char): Use it.
12790 (Fforward_line, Fend_of_line, internal_self_insert)
12791 (internal_self_insert):
12792 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12793 Fix a FIXME, by checking for integer overflow when calculating
12794 target_clm and actual_clm.
12795 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
12796 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
12797 (ASSURE_DESTINATION, coding_alloc_by_realloc)
12798 (coding_alloc_by_making_gap, alloc_destination)
12799 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
12800 (encode_coding_utf_16, detect_coding_emacs_mule)
12801 (decode_coding_emacs_mule, encode_coding_emacs_mule)
12802 (detect_coding_iso_2022, decode_coding_iso_2022)
12803 (encode_invocation_designation, encode_designation_at_bol)
12804 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
12805 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
12806 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
12807 (encode_coding_ccl, encode_coding_raw_text)
12808 (detect_coding_charset, decode_coding_charset)
12809 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
12810 (produce_composition, produce_charset, produce_annotation)
12811 (decode_coding, handle_composition_annotation)
12812 (handle_charset_annotation, consume_chars, decode_coding_gap)
12813 (decode_coding_object, encode_coding_object, detect_coding_system)
12814 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
12815 (code_convert_region, code_convert_string)
12816 (Fdefine_coding_system_internal)
12817 (coding_set_source, coding_set_destination):
12818 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12819 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
12820 (Fdefine_coding_system_internal):
12821 Don't assume fixnums fit in int.
12822 (decode_coding_gap, decode_coding_object, encode_coding_object)
12823 (Fread_coding_system, Fdetect_coding_region)
12824 (Funencodable_char_position, Fcheck_coding_systems_region)
12825 (get_translation, handle_composition_annotation, consume_chars):
12826 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12827 (consume_chars): Rewrite to not calculate an address outside buffer.
12828 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
12829 Don't access memory outside of the args array.
12830 (Fdefine_coding_system_internal): Check for charset-id overflow.
12831 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
12832 result of ENCODE_CHAR.
12833 * coding.h: Adjust decls to match defn changes elsewhere.
12834 (struct coding_system):
12835 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12836 * composite.c (get_composition_id, find_composition)
12837 (run_composition_function, update_compositions)
12838 (compose_text, composition_gstring_put_cache)
12839 (composition_gstring_p, composition_gstring_width)
12840 (fill_gstring_header, fill_gstring_body, autocmp_chars)
12841 (composition_compute_stop_pos, composition_reseat_it)
12842 (composition_update_it, struct position_record)
12843 (find_automatic_composition, composition_adjust_point)
12844 (Fcomposition_get_gstring, Ffind_composition_internal):
12845 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12846 (update_compositions):
12847 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12848 * composite.h: Adjust decls to match defn changes elsewhere.
12849 (struct composition):
12850 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12851 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
12852 Do not attempt to compute the address of the object just before a
12853 buffer; this is not portable.
12855 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12856 (Faset): Use int, not EMACS_INT, where int is wide enough.
12857 (Fstring_to_number): Don't assume fixnums fit in int.
12858 (Frem): Don't assume arg is nonnegative.
12859 * dbusbind.c (xd_append_arg): Check for integers out of range.
12860 (Fdbus_call_method): Don't overflow the timeout int.
12861 (extract_signed, extract_unsigned): New functions.
12862 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
12863 (xd_get_connection_references): Return ptrdiff_t, not int.
12865 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
12866 (xd_read_message_1):
12867 Use int, not unsigned, where the dbus API uses int.
12868 (Fdbus_message_internal): Don't overflow mtype.
12869 (syms_of_dbusbind): Allocate right-sized buffer for integers.
12870 * dired.c (directory_files_internal, file_name_completion, scmp)
12871 (file_name_completion_stat):
12872 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12873 (file_name_completion): Don't overflow matchcount.
12874 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
12875 * dispextern.h: Adjust decls to match defn changes elsewhere.
12876 (struct text_pos, struct glyph, struct bidi_saved_info)
12877 (struct bidi_string_data, struct bidi_it, struct composition_it)
12879 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12880 (struct display_pos, struct composition_it, struct it):
12881 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12882 * dispnew.c (increment_matrix_positions)
12883 (increment_row_positions, mode_line_string)
12884 (marginal_area_string):
12885 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12886 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
12887 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12888 (duration_to_sec_usec): New function, to check for overflow better.
12889 (Fsleep_for, sit_for): Use it.
12890 * doc.c (get_doc_string, store_function_docstring):
12891 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12892 (get_doc_string, Fsnarf_documentation):
12893 Use int, not EMACS_INT, where int is wide enough.
12895 Use SAFE_ALLOCA, not alloca.
12896 Check for overflow when converting EMACS_INT to off_t.
12897 * doprnt.c (doprnt):
12898 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12899 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
12900 Don't assume uid_t fits into fixnum.
12901 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
12902 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
12903 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
12904 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
12905 (general_insert_function)
12906 (Finsert_char, make_buffer_string, make_buffer_string_both)
12907 (update_buffer_properties, Fbuffer_substring)
12908 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
12909 (Fsubst_char_in_region, check_translation)
12910 (Ftranslate_region_internal, save_restriction_restore, Fformat)
12911 (transpose_markers, Ftranspose_regions):
12912 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12913 (clip_to_bounds): Move to lisp.h as an inline function).
12914 (Fconstrain_to_field): Don't assume integers are nonnegative.
12915 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
12916 (Fsubst_char_in_region, Fsave_restriction):
12917 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12918 (Femacs_pid): Don't assume pid_t fits into fixnum.
12919 (lo_time): Use int, not EMACS_INT, when int suffices.
12920 (lisp_time_argument): Check for usec out of range.
12921 (Fencode_time): Don't assume fixnum fits in int.
12922 (Fuser_login_name, Fuser_full_name): Signal an error
12923 if a uid argument is out of range, rather than relying on
12924 undefined behavior.
12925 (Fformat_time_string): Remove now-unnecessary check.
12926 lisp_time_argument checks for out-of-range usec now.
12927 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
12928 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
12929 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
12930 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
12931 (init_cmdargs, Fdump_emacs):
12932 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12933 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
12934 the bottom (typically) 32 bits of the fixnum.
12935 * eval.c (specpdl_size, call_debugger):
12936 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12937 (when_entered_debugger, Fbacktrace_debug):
12938 Don't assume fixnum can fit in int.
12939 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
12940 the object just before a buffer; this is not portable.
12941 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
12942 (grow_specpdl, unbind_to):
12943 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12944 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
12945 (grow_specpdl): Simplify allocation by using xpalloc.
12946 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
12947 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
12948 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
12949 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12950 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
12951 (a_write, e_write):
12952 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12953 (Fcopy_file, non_regular_nbytes, read_non_regular)
12954 (Finsert_file_contents):
12955 Use int, not EMACS_INT, where int is wide enough.
12956 (READ_BUF_SIZE): Verify that it fits in int.
12957 (Finsert_file_contents): Check that counts are in proper range,
12958 rather than assuming fixnums fit into ptrdiff_t etc.
12959 Don't assume fixnums fit into int.
12960 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
12961 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
12962 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
12963 (string_char_to_byte, string_byte_to_char)
12964 (string_make_multibyte, string_to_multibyte)
12965 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
12966 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
12967 (substring_both, Fdelete, internal_equal, Ffillarray)
12968 (Fclear_string, mapcar1)
12969 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
12970 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
12971 (larger_vector, make_hash_table, maybe_resize_hash_table)
12972 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
12973 (Fmaphash, secure_hash):
12974 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12975 (concat): Check for string index and length overflow.
12976 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
12978 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12979 (larger_vector): New API (vec, incr_min, size_max) replaces old
12980 one (vec, new_size, init). This catches size overflow.
12981 INIT was removed because it was always Qnil.
12982 All callers changed.
12983 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
12984 the upper bound on a hash table index size.
12985 (make_hash_table, maybe_resize_hash_table): Use it.
12986 (secure_hash): Computer start_byte and end_byte only after
12987 they're known to be in ptrdiff_t range.
12988 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
12989 (Ffont_get_glyphs, Ffont_at):
12990 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12991 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
12992 (Flist_fonts, Fopen_font):
12993 Don't assume fixnum can fit in int.
12994 (check_gstring): Don't assume index can fit in int.
12995 (font_match_p): Check that fixnum is a character, not a nonnegative
12996 fixnum, since the later code needs to stuff it into an int.
12997 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
12998 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
12999 conversion overflow issues.
13000 (Fopen_font): Check for integer out of range.
13001 (Ffont_get_glyphs): Don't assume index can fit in int.
13002 * font.h: Adjust decls to match defn changes elsewhere.
13003 * fontset.c (reorder_font_vector): Redo score calculation to avoid
13005 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
13006 printmax_t, where ptrdiff_t is wide enough.
13007 (Finternal_char_font):
13008 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13009 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
13010 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
13011 (Fset_frame_position, x_set_frame_parameters)
13012 (x_set_line_spacing, x_set_border_width)
13013 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
13014 Check that fixnums are in proper range for system types.
13015 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
13016 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13017 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
13018 Use SAFE_ALLOCA_LISP, not alloca.
13019 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
13020 intptr_t is wide enough.
13021 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
13022 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
13023 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
13024 Check for fixnum out of range.
13025 * ftfont.c (ftfont_list): Don't assume index fits in int.
13026 Check that fixnums are in proper range for system types.
13027 (ftfont_shape_by_flt):
13028 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13029 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
13030 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13031 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
13032 Check that fixnums are in proper range for system types.
13033 * gnutls.h: Adjust decls to match defn changes elsewhere.
13034 * gtkutil.c (xg_dialog_run):
13035 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13036 (update_frame_tool_bar):
13037 Check that fixnums are in proper range for system types.
13038 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
13039 (lookup_image): Check that fixnums are in range for system types.
13040 * indent.c (last_known_column, last_known_column_point):
13041 (current_column_bol_cache):
13042 (skip_invisible, current_column, check_display_width):
13043 (check_display_width, scan_for_column, current_column_1)
13044 (Findent_to, Fcurrent_indentation, position_indentation)
13045 (indented_beyond_p, Fmove_to_column, compute_motion):
13046 (Fcompute_motion, Fvertical_motion):
13047 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13048 (last_known_column_modified): Use EMACS_INT, not int.
13049 (check_display_width):
13051 Check that fixnums and floats are in proper range for system types.
13052 (compute_motion): Don't assume index or fixnum fits in int.
13053 (compute_motion, Fcompute_motion):
13054 Use int, not EMACS_INT, when it is wide enough.
13055 (vmotion): Omit local var start_hpos that is always 0; that way
13056 we don't need to worry about overflow in expressions involving it.
13057 * indent.h: Adjust decls to match defn changes elsewhere.
13059 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13060 Use int, not EMACS_INT, where int is wide enough.
13061 Remove unused members ovstring_chars_done and tab_offset;
13063 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
13064 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
13065 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
13066 (make_gap, copy_text, insert, insert_and_inherit)
13067 (insert_before_markers, insert_before_markers_and_inherit)
13068 (insert_1, count_combining_before, count_combining_after)
13069 (insert_1_both, insert_from_string)
13070 (insert_from_string_before_markers, insert_from_string_1)
13071 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
13072 (adjust_after_replace, adjust_after_insert, replace_range)
13073 (replace_range_2, del_range, del_range_1, del_range_byte)
13074 (del_range_both, del_range_2, modify_region)
13075 (prepare_to_modify_buffer, signal_before_change)
13076 (signal_after_change, Fcombine_after_change_execute):
13077 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13078 * intervals.c (traverse_intervals, rotate_right, rotate_left)
13079 (balance_an_interval, split_interval_right, split_interval_left)
13080 (find_interval, next_interval, update_interval)
13081 (adjust_intervals_for_insertion, delete_node, delete_interval)
13082 (interval_deletion_adjustment, adjust_intervals_for_deletion)
13083 (static_offset_intervals, offset_intervals)
13084 (merge_interval_right, merge_interval_left, make_new_interval)
13085 (graft_intervals_into_buffer, temp_set_point_both)
13086 (temp_set_point, set_point, adjust_for_invis_intang)
13087 (set_point_both, move_if_not_intangible, get_property_and_range)
13088 (get_local_map, copy_intervals, copy_intervals_to_string)
13089 (compare_string_intervals, set_intervals_multibyte_1):
13090 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13091 * intervals.h: Adjust decls to match defn changes elsewhere.
13093 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13094 * keyboard.c (this_command_key_count, this_single_command_key_start)
13095 (before_command_key_count, before_command_echo_length, echo_now)
13096 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
13097 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
13098 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
13099 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
13100 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13101 (last_non_minibuf_size, last_point_position, echo_truncate)
13102 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
13103 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
13104 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
13105 (stuff_buffered_input):
13106 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13107 (last_auto_save, command_loop_1, read_char):
13108 Use EMACS_INT, not int, to avoid integer overflow.
13109 (record_char): Avoid overflow in total_keys computation.
13110 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
13111 * keyboard.h: Adjust decls to match defn changes elsewhere.
13112 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
13113 (Fkey_description, Fdescribe_vector, Flookup_key):
13114 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13115 (click_position): New function, to check that positions are in range.
13116 (Fcurrent_active_maps):
13117 (describe_command):
13118 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13119 (Faccessible_keymaps, Fkey_description):
13120 (preferred_sequence_p):
13121 Don't assume fixnum can fit into int.
13122 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
13123 Check for integer overflow in size calculations.
13124 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
13125 avoid mishandling large integers.
13126 * lisp.h: Adjust decls to match defn changes elsewhere.
13127 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
13128 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
13129 (struct Lisp_Marker):
13130 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13131 (clip_to_bounds): Now an inline function, moved here from editfns.c.
13132 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
13133 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
13134 All callers changed.
13135 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
13136 Assume the arg has valid form, since it always does.
13137 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
13138 unsigned integer system type.
13139 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
13140 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
13141 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13142 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
13143 (duration_to_sec_usec): New decl.
13144 * lread.c (read_from_string_index, read_from_string_index_byte)
13145 (read_from_string_limit, readchar, unreadchar, openp)
13146 (read_internal_start, read1, oblookup):
13147 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13148 (Fload, readevalloop, Feval_buffer, Feval_region):
13149 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13150 (openp): Check for out-of-range argument to 'access'.
13151 (read1): Use int, not EMACS_INT, where int is wide enough.
13152 Don't assume fixnum fits into int.
13153 Fix off-by-one error that can read outside a buffer.
13154 (read_filtered_event): Use duration_to_sec_usec
13155 to do proper overflow checking on durations.
13156 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
13157 in size calculation.
13158 (Fexecute_kbd_macro):
13159 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13160 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
13161 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
13162 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
13163 (set_marker_both, set_marker_restricted_both, marker_position)
13164 (marker_byte_position, Fbuffer_has_markers_at):
13165 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13166 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
13167 * menu.c (ensure_menu_items): Rename from grow_menu_items.
13168 It now merely ensures that the menu is large enough, without
13169 necessarily growing it, as this avoids some integer overflow issues.
13170 All callers changed.
13171 (keymap_panes, parse_single_submenu, Fx_popup_menu):
13172 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13173 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
13174 Use SAFE_ALLOCA_LISP, not alloca.
13175 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
13176 to EMACS_INT. Check that fixnums are in proper range for system types.
13177 * minibuf.c (minibuf_prompt_width, string_to_object)
13178 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
13179 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
13180 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13181 (get_minibuffer, read_minibuf_unwind):
13182 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13183 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
13184 this simplifies overflow checking. All callers changed.
13185 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
13186 (Ftest_completion):
13187 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13188 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
13189 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
13190 Check that fixnums are in proper range for system types.
13191 (Fx_create_frame, Fx_show_tip):
13192 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13193 * nsfont.m (ns_findfonts, nsfont_list_family):
13194 Don't assume fixnum fits in long.
13195 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
13196 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13197 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
13199 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
13200 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13201 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
13202 (PRINTDECLARE, PRINTPREPARE):
13203 (strout, print_string):
13204 (print, print_preprocess, print_check_string_charset_prop)
13206 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13208 (temp_output_buffer_setup, Fprin1_to_string, print_object):
13209 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13210 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
13211 (printchar, strout): Use xpalloc to catch size calculation overflow.
13212 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
13213 (print_error_message): Use SAFE_ALLOCA, not alloca.
13214 (print_object): Use int, not EMACS_INT, where int is wide enough.
13215 (print_depth, new_backquote_output, print_number_index):
13216 Use ptrdiff_t, not int, where int might not be wide enough.
13217 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
13218 (Fset_process_window_size, Fformat_network_address)
13219 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
13221 Check that fixnums are in proper range for system types.
13222 (Fsignal_process): Simplify by avoiding a goto.
13223 Check for process-ids out of pid_t range rather than relying on
13224 undefined behavior.
13225 (process_tick, update_tick): Use EMACS_INT, not int.
13226 (Fformat_network_address, read_process_output, send_process)
13227 (Fprocess_send_region, status_notify):
13228 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13229 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
13230 (wait_reading_process_output, read_process_output, exec_sentinel):
13231 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13232 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
13233 (Faccept_process_output): Use duration_to_sec_usec to do proper
13234 overflow checking on durations.
13235 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
13236 Don't assume pid_t fits in int.
13237 * process.h (struct Lisp_Process): Members tick and update_tick
13238 are now of type EMACS_INT, not int.
13239 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
13240 configured --with-wide-int.
13241 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
13242 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
13243 * search.c (looking_at_1, string_match_1):
13244 (fast_string_match, fast_c_string_match_ignore_case)
13245 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
13246 (scan_newline, find_before_next_newline, search_command)
13247 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
13248 (set_search_regs, wordify):
13251 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13252 (string_match_1, search_buffer, set_search_regs):
13254 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13255 (wordify): Check for overflow in size calculation.
13256 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
13257 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
13258 Check that fixnums are in proper range for system types.
13259 * sound.c (struct sound_device)
13260 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
13261 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13262 (Fplay_sound_internal):
13263 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13264 * syntax.c (struct lisp_parse_state, find_start_modiff)
13265 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
13266 (Fparse_partial_sexp):
13267 Don't assume fixnums can fit in int.
13268 (struct lisp_parse_state, find_start_pos, find_start_value)
13269 (find_start_value_byte, find_start_begv)
13270 (update_syntax_table, char_quoted, dec_bytepos)
13271 (find_defun_start, prev_char_comend_first, back_comment):
13272 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
13273 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
13274 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13275 (Finternal_describe_syntax_value): Check that match_lisp is a
13276 character, not an integer, since the code stuffs it into int.
13277 (scan_words, scan_sexps_forward):
13278 Check that fixnums are in proper range for system types.
13280 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13281 (scan_sexps_forward):
13282 Use CHARACTERP, not INTEGERP, since the value must fit into int.
13283 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
13284 * syntax.h: Adjust decls to match defn changes elsewhere.
13285 (struct gl_state_s):
13286 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13287 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
13288 MOST_POSITIVE_FIXNUM.
13289 * sysdep.c (wait_for_termination_1, wait_for_termination)
13290 (interruptible_wait_for_termination, mkdir):
13291 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
13292 (emacs_read, emacs_write):
13293 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13294 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
13295 and double all fit in int.
13296 * term.c (set_tty_color_mode):
13297 Check that fixnums are in proper range for system types.
13298 * termhooks.h (struct input_event):
13299 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13300 * textprop.c (validate_interval_range, interval_of)
13301 (Fadd_text_properties, set_text_properties_1)
13302 (Fremove_text_properties, Fremove_list_of_text_properties)
13303 (Ftext_property_any, Ftext_property_not_all)
13304 (copy_text_properties, text_property_list, extend_property_ranges)
13305 (verify_interval_modification):
13306 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13307 (Fnext_single_char_property_change)
13308 (Fprevious_single_char_property_change):
13309 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13310 (copy_text_properties):
13311 Check for integer overflow in index calculation.
13312 * undo.c (last_boundary_position, record_point, record_insert)
13313 (record_delete, record_marker_adjustment, record_change)
13314 (record_property_change):
13315 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13316 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
13317 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13318 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
13319 (Fx_hide_tip, Fx_file_dialog):
13320 * w32menu.c (set_frame_menubar):
13321 Use ptrdiff_t, not int, for consistency with rest of code.
13322 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
13323 (select_window, Fdelete_other_windows_internal)
13324 (window_scroll_pixel_based, window_scroll_line_based)
13325 (Frecenter, Fset_window_configuration):
13326 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13327 (Fset_window_hscroll, run_window_configuration_change_hook)
13328 (set_window_buffer, temp_output_buffer_show, scroll_command)
13329 (Fscroll_other_window, Frecenter):
13330 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13331 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
13332 Don't assume fixnum fits in int.
13333 (Fset_window_scroll_bars):
13334 Check that fixnums are in proper range for system types.
13335 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
13336 (string_pos, c_string_pos, number_of_chars, init_iterator)
13337 (in_ellipses_for_invisible_text_p, init_from_display_pos)
13338 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
13339 (compute_display_string_end, handle_face_prop)
13340 (face_before_or_after_it_pos, handle_invisible_prop)
13341 (handle_display_prop, handle_display_spec, handle_single_display_spec)
13342 (display_prop_intangible_p, string_buffer_position_lim)
13343 (string_buffer_position, handle_composition_prop, load_overlay_strings)
13344 (get_overlay_strings_1, get_overlay_strings)
13345 (iterate_out_of_display_property, forward_to_next_line_start)
13346 (back_to_previous_visible_line_start, reseat, reseat_to_string)
13347 (get_next_display_element, set_iterator_to_next)
13348 (get_visually_first_element, compute_stop_pos_backwards)
13349 (handle_stop_backwards, next_element_from_buffer)
13350 (move_it_in_display_line_to, move_it_in_display_line)
13351 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13352 (add_to_log, message_dolog, message_log_check_duplicate)
13353 (message2, message2_nolog, message3, message3_nolog
13354 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
13355 (current_message_1, truncate_echo_area, truncate_message_1)
13356 (set_message, set_message_1, store_mode_line_noprop)
13357 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
13358 (text_outside_line_unchanged_p, check_point_in_composition)
13359 (reconsider_clip_changes)
13360 (redisplay_internal, set_cursor_from_row, try_scrolling)
13361 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
13362 (redisplay_window, find_last_unchanged_at_beg_row)
13363 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
13364 (trailing_whitespace_p, find_row_edges, display_line)
13365 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
13366 (display_mode_element, store_mode_line_string)
13367 (pint2str, pint2hrstr, decode_mode_spec)
13368 (display_count_lines, display_string, draw_glyphs)
13369 (x_produce_glyphs, x_insert_glyphs)
13370 (rows_from_pos_range, mouse_face_from_buffer_pos)
13371 (fast_find_string_pos, mouse_face_from_string_pos)
13372 (note_mode_line_or_margin_highlight, note_mouse_highlight):
13373 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13374 (safe_call, init_from_display_pos, handle_fontified_prop)
13375 (handle_single_display_spec, load_overlay_strings)
13376 (with_echo_area_buffer, setup_echo_area_for_printing)
13377 (display_echo_area, echo_area_display)
13378 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
13379 (update_tool_bar, hscroll_window_tree, redisplay_internal)
13380 (redisplay_window, dump_glyph_row, display_mode_line)
13381 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
13382 (handle_display_spec, display_prop_string_p):
13383 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13384 (handle_single_display_spec, build_desired_tool_bar_string)
13385 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
13386 (get_specified_cursor_type):
13387 Check that fixnums are in proper range for system types.
13388 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
13389 (Flookup_image_map):
13390 Don't assume fixnums fit in int.
13391 (compare_overlay_entries):
13392 Avoid mishandling comparisons due to subtraction overflow.
13393 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
13394 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
13395 (handle_tool_bar_click):
13396 Use int, not unsigned, since we prefer signed and the signedness
13397 doesn't matter here.
13398 (get_next_display_element, next_element_from_display_vector):
13399 Use int, not EMACS_INT, when int is wide enough.
13400 (start_hourglass): Use duration_to_sec_usec to do proper
13401 overflow checking on durations.
13402 * xfaces.c (Fbitmap_spec_p):
13403 Check that fixnums are in proper range for system types.
13404 (compare_fonts_by_sort_order):
13405 Avoid mishandling comparisons due to subtraction overflow.
13406 (Fx_family_fonts, realize_basic_faces):
13407 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13409 Don't assume fixnum fits in int.
13410 Use SAFE_ALLOCA_LISP, not alloca.
13411 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
13412 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
13413 (face_at_buffer_position, face_for_overlay_string)
13414 (face_at_string_position):
13415 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13416 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
13417 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
13419 Check that fixnums are in proper range for system types.
13420 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
13421 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
13422 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13423 (Fx_change_window_property): Don't assume fixnums fit in int.
13424 * xfont.c (xfont_chars_supported):
13425 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13426 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
13427 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
13428 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13429 * xml.c (parse_region):
13430 * xrdb.c (magic_file_p):
13431 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
13432 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
13433 (x_get_local_selection, x_reply_selection_request)
13434 (x_handle_selection_request, wait_for_property_change):
13435 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13436 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
13437 short is wide enough.
13438 (x_send_client_event): Don't assume fixnum fits in int.
13439 * xterm.c (x_x_to_emacs_modifiers):
13440 Don't assume EMACS_INT overflows nicely into int.
13441 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
13442 may come from Lisp.
13443 (handle_one_xevent): NATNUMP can eval its arg twice.
13444 (x_connection_closed):
13445 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
13446 * xterm.h: Adjust decls to match defn changes elsewhere.
13447 (struct scroll_bar): Use struct vectorlike_header
13448 rather than rolling our own approximation.
13449 (SCROLL_BAR_VEC_SIZE): Remove; not used.
13451 2012-05-25 Glenn Morris <rgm@gnu.org>
13453 * lisp.mk (lisp): Update for more files being compiled now.
13455 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
13457 * lread.c: Remove `read_pure' which makes no difference.
13458 (read_pure): Remove var.
13459 (unreadpure): Remove function.
13460 (readevalloop): Don't call read_list with -1 flag.
13461 (read1, read_vector): Don't test read_pure any more.
13462 (read_list): Simplify.
13464 * fileio.c, character.h: Minor style tweaks.
13466 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
13468 * window.h (clip_changed): Remove useless declaration.
13470 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
13472 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
13473 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
13475 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
13478 This directory predates autoconf and is no longer needed nowadays.
13479 Move its few remaining bits of functionality to where they're needed.
13480 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
13481 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
13482 * m/template.h: Remove.
13483 * Makefile.in (M_FILE): Remove. All uses removed.
13484 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
13485 * lisp.h (USE_LSB_TAG):
13486 * mem-limits.h (EXCEEDS_LISP_PTR):
13487 Use VAL_MAX, not VALBITS, in #if.
13488 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
13489 (EMACS_UINT): Define unconditionally now.
13490 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
13491 (BITS_PER_EMACS_INT): New constants, replacing
13492 what used to be in config.h, but not useful in #if.
13493 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
13494 define them any more.
13495 (VAL_MAX): New macro.
13497 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
13498 BITS_PER_EMACS_INT, in #if.
13499 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
13500 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
13501 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
13502 * s/ms-w32.h (DATA_START):
13503 Move here from removed file m/intel386.h.
13504 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
13505 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
13507 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
13509 Assume C89 or later.
13510 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
13511 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
13513 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
13514 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
13515 * textprop.c, tparam.c (NULL): Remove.
13516 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
13517 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
13518 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
13519 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
13520 * xterm.c (input_signal_count): Assume volatile works.
13522 2012-05-21 Ken Brown <kbrown@cornell.edu>
13524 * xgselect.c (xg_select): Fix first argument in call to 'select'
13527 2012-05-20 Ken Brown <kbrown@cornell.edu>
13529 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
13530 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
13532 2012-05-19 Ken Brown <kbrown@cornell.edu>
13534 * xfns.c (x_in_use): Remove `static' qualifier.
13535 * xterm.h (x_in_use): Declare.
13536 * xgselect.c: Include xterm.h.
13537 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
13538 and `display_arg' (bug#9754).
13540 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
13542 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
13544 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
13545 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
13547 2012-05-18 Eli Zaretskii <eliz@gnu.org>
13549 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
13551 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
13552 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
13554 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
13555 reference to image_cache->refcount.
13556 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
13558 2012-05-17 Juri Linkov <juri@jurta.org>
13560 * search.c (Fword_search_regexp, Fword_search_backward)
13561 (Fword_search_forward, Fword_search_backward_lax)
13562 (Fword_search_forward_lax): Move functions to isearch.el
13563 (bug#10145, bug#11381).
13565 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
13567 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
13569 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
13571 * lread.c (init_obarray): Declare Qt and Qnil as special.
13573 2012-05-14 Glenn Morris <rgm@gnu.org>
13575 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
13576 Put "libexec" before "bin", for the sake of init_callproc_1.
13578 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
13580 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
13582 * unexaix.c: Port to more-recent AIX compilers.
13583 (report_error, report_error_1, make_hdr, copy_sym)
13584 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
13585 Make arguments const char *, not char *, to avoid violations of C
13586 standard and to fix some AIX warnings reported by Gilles Pion.
13588 2012-05-14 Eli Zaretskii <eliz@gnu.org>
13590 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
13591 already have overlays loaded.
13592 (handle_single_display_spec): Before returning without displaying
13593 fringe bitmap, synchronize the bidi iterator with the main display
13594 iterator, by calling iterate_out_of_display_property.
13595 (iterate_out_of_display_property): Detect buffer iteration by
13596 testing that it->string is a Lisp string.
13597 (get_next_display_element): When the current object is exhausted,
13598 and there's something on it->stack, call set_iterator_to_next to
13599 proceed with what's on the stack, instead of returning zero.
13600 (set_iterator_to_next): If called at the end of a Lisp string,
13601 proceed to consider_string_end without incrementing string
13602 position. Don't increment display vector index past the end of
13603 the display vector. (Bug#11417)
13604 (pos_visible_p): Don't report a position visible when move_it_to
13605 stopped at the last line of window, which happens to be scanned
13606 backwards by the bidi iteration. (Bug#11464)
13608 2012-05-14 Eli Zaretskii <eliz@gnu.org>
13610 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
13611 and right-margin display specs even if the spec is invalid or we
13612 are on a TTY, and thus unable to display on the fringes.
13613 That's because the text with the property will not be displayed anyway,
13614 so we need to signal to the caller that this is a "replacing"
13615 display spec. This fixes display when the spec is invalid or we
13618 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
13620 * unexaix.c (make_hdr): Fix typo in prototype.
13621 This bug broke the build on AIX. Problem reported by Gilles Pion.
13623 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
13625 * keyboard.c (kbd_buffer_get_event): Read special events also in
13626 batch mode. (Bug#11415)
13628 2012-05-12 Glenn Morris <rgm@gnu.org>
13630 * ns.mk: Update for ns_appbindir no longer having trailing "/".
13632 2012-05-12 Eli Zaretskii <eliz@gnu.org>
13634 * lisp.mk (lisp): Add newcomment.elc.
13636 2012-05-12 Glenn Morris <rgm@gnu.org>
13638 * Makefile.in (MKDIR_P): New, set by configure.
13639 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
13641 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
13643 Remove unused function hourglass_started.
13644 * dispextern.h (hourglass_started):
13645 * w32fns.c (hourglass_started):
13646 * xdisp.c (hourglass_started): Remove.
13648 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
13650 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
13651 Update dependencies.
13653 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
13655 * xgselect.c (xg_select): Put maxfds+1 into a var.
13656 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
13658 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
13660 2012-05-10 Dave Abrahams <dave@boostpro.com>
13662 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
13663 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
13665 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
13667 * dbusbind.c (xd_registered_buses): New internal Lisp object.
13668 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
13669 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
13670 Initialize xd_registered_buses.
13672 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
13674 Untag more efficiently if USE_LSB_TAG.
13675 This is based on a proposal by YAMAMOTO Mitsuharu in
13676 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
13677 For an admittedly artificial (nth 8000 longlist) benchmark on
13678 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
13679 Emacs's overall text size by 1%.
13680 * lisp.h (XUNTAG): New macro.
13681 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
13682 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
13683 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
13684 * eval.c (Fautoload):
13685 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
13686 * frame.h (XFRAME): Use XUNTAG.
13688 Port recent dbusbind.c changes to 32-bit --with-wide-int.
13689 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
13690 Remove unportable assumptions about print widths of types like
13692 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
13693 intptr_t when converting between pointer and integer, to avoid GCC
13694 warnings about wrong width.
13696 2012-05-09 Eli Zaretskii <eliz@gnu.org>
13698 * w32proc.c (new_child): Force Windows to reserve only 64KB of
13699 stack for each reader_thread, instead of defaulting to 8MB
13700 determined by the linker. This avoids failures in creating
13701 subprocesses on Windows 7, see the discussion in this thread:
13702 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
13704 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
13706 Fix up display of the *Minibuf-0* buffer in the mini window.
13707 * keyboard.c (read_char): Don't clear the echo area if there's no
13709 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
13710 contents of *Minibuf-0*) if there's no message displayed in its stead.
13712 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
13714 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
13717 2012-05-06 Chong Yidong <cyd@gnu.org>
13719 * lisp.mk (lisp): Update.
13721 2012-05-05 Jim Meyering <meyering@redhat.com>
13723 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
13725 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
13727 * data.c (PUT_ERROR): New macro.
13728 (syms_of_data): Use it. Add new error type `user-error'.
13729 * undo.c (user_error): New function.
13730 (Fprimitive_undo): Use it.
13731 * print.c (print_error_message): Adjust print style for `user-error'.
13732 * keyboard.c (user_error): New function.
13733 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
13735 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
13737 Do not limit current-time-string to years 1000..9999.
13738 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
13739 (Fcurrent_time_string): Support any year that is supported by the
13740 underlying localtime representation. Don't use asctime, as it
13741 has undefined behavior for years outside the range -999..9999.
13743 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
13745 Fix race conditions involving setenv, gmtime, localtime, asctime.
13746 Without this fix, interrupts could mess up code that uses these
13747 nonreentrant functions, since setting TZ invalidates existing
13748 tm_zone or tzname values, and since most of these functions return
13749 pointers to static storage.
13750 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
13751 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
13752 Grow the critical sections to include not just invoking
13753 localtime/gmtime, but also accessing these functions' results
13754 including their tm_zone values if any, and any related TZ setting.
13755 (format_time_string): Last arg is now struct tm *, not struct tm **,
13756 so that the struct tm is saved in the critical section.
13757 All callers changed. Simplify allocation of initial buffer, partly
13758 motivated by the fact that memory allocation needs to be outside
13759 the critical section.
13761 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
13763 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
13764 with RESET_INTERVAL.
13766 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
13767 Remove duplicated buffer name initialization.
13769 2012-05-02 Jim Meyering <jim@meyering.net>
13771 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
13773 * xfns.c (x_window): Use xstrdup (Bug#11375).
13775 2012-05-02 Eli Zaretskii <eliz@gnu.org>
13777 * xdisp.c (pos_visible_p): If already at a newline from the
13778 display string before the 'while' loop, don't walk back the glyphs
13779 from it3.glyph_row. Solves assertion violation when the display
13780 string begins with a newline (egg.el). (Bug#11367)
13782 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
13784 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
13787 2012-05-01 Glenn Morris <rgm@gnu.org>
13789 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
13790 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
13791 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
13792 All were removed before 23.1.
13794 * dispnew.c: Remove HAVE_LIBNCURSES test;
13795 it is always true on relevant platforms.
13797 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
13798 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
13800 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
13802 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
13804 * .gdbinit (xpr): Remove checks for no longer existing misc types.
13805 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
13808 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
13810 Do not avoid creating empty evaporating overlays (Bug#9642).
13811 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
13812 That is, do not delete an evaporating overlay if it becomes
13813 empty after its bounds are adjusted to fit within its buffer.
13814 This fix caused other problems, and I'm reverting it until we get
13815 to the bottom of them.
13817 2012-04-27 Chong Yidong <cyd@gnu.org>
13819 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
13821 2012-04-27 Eli Zaretskii <eliz@gnu.org>
13823 * xdisp.c (pos_visible_p): If the window start position is beyond
13824 ZV, start the display from buffer beginning. Prevents assertion
13825 violation in init_iterator when the minibuffer window is scrolled
13826 via the scroll bar.
13828 * window.c (window_scroll_pixel_based): Likewise.
13830 2012-04-27 Chong Yidong <cyd@gnu.org>
13832 * keymap.c (where_is_internal): Doc fix (Bug#10872).
13834 2012-04-27 Glenn Morris <rgm@gnu.org>
13836 * fileio.c (Fcopy_file, Fset_file_selinux_context):
13837 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
13839 2012-04-27 Eli Zaretskii <eliz@gnu.org>
13841 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
13842 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
13844 2012-04-26 Eli Zaretskii <eliz@gnu.org>
13846 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
13847 display element, check also the underlying string or buffer
13848 character. (Bug#11341)
13850 * w32menu.c: Include w32heap.h.
13851 (add_menu_item): If the call to AppendMenuW (via
13852 unicode_append_menu) fails, disable Unicode menus only if we are
13853 running on Windows 9X/Me.
13855 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
13857 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
13858 (xgetint): Add missing shift for LSB tags.
13860 2012-04-24 Martin Rudalics <rudalics@gmx.at>
13862 * keyboard.c (read_char): Don't wipe echo area for select window
13863 events: These might get delayed via `mouse-autoselect-window'
13866 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
13868 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
13869 manipulation of :loaded-from data.
13871 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
13873 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
13874 now a cons (bug#11311).
13876 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
13878 Do not create empty overlays with the evaporate property (Bug#9642).
13879 * buffer.c (Fmove_overlay): Delete an evaporating overlay
13880 if it becomes empty after its bounds are adjusted to fit within
13881 its buffer. Without this fix, in a nonempty buffer (let ((o
13882 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
13883 yields an empty overlay that has the evaporate property, which is
13884 not supposed to happen.
13886 Fix minor GTK3 problems found by static checking.
13887 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
13888 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
13889 (struct _EmacsFixedClass, emacs_fixed_get_type):
13890 Move decls here from emacsgtkfixed.h, since they needn't be public.
13891 (emacs_fixed_get_type): Now static.
13892 (emacs_fixed_class_init): Omit unused local.
13893 (emacs_fixed_child_type): Remove; unused.
13894 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
13895 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
13896 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
13897 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
13898 (EMACS_FIXED_GET_CLASS): Remove; unused.
13899 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
13901 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
13902 Problem reported by Juanma Barranquero for Windows -Wunused-function.
13904 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
13906 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
13907 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
13908 (__malloc_size_t, __malloc_ptrdiff_t):
13909 Remove. All uses removed, replaced by the definiens if needed,
13910 since we can assume C89 or better now.
13911 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
13912 (protect_malloc_state, align, get_contiguous_space)
13913 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
13914 (malloc_atfork_handler_child, malloc_enable_thread)
13915 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
13916 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
13917 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
13918 (special_realloc, _realloc_internal_nolock, _realloc_internal)
13919 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
13920 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
13921 Define using prototypes, not old style.
13922 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
13923 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
13924 (align): Don't assume that signed integer overflow wraps around.
13925 Omit unused local var.
13926 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
13927 (_free_internal_nolock, memalign, mallochook, reallochook):
13928 Omit no-longer-needed casts.
13929 (valloc): Use getpagesize, not __getpagesize.
13930 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
13931 (struct hdr): The 'magic' member is now size_t, not unsigned long.
13933 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
13935 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
13937 Move functions from C to Lisp. Make non-blocking method calls
13938 the default. Implement further D-Bus standard interfaces.
13940 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
13941 (QCdbus_request_name_allow_replacement)
13942 (QCdbus_request_name_replace_existing)
13943 (QCdbus_request_name_do_not_queue)
13944 (QCdbus_request_name_reply_primary_owner)
13945 (QCdbus_request_name_reply_in_queue)
13946 (QCdbus_request_name_reply_exists)
13947 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
13948 (QCdbus_registered_serial, QCdbus_registered_method)
13949 (QCdbus_registered_signal): New Lisp objects.
13950 (XD_DEBUG_MESSAGE): Use sizeof.
13951 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
13952 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
13953 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
13954 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
13955 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
13956 (xd_signature, xd_append_arg): Allow float for integer types.
13957 (xd_get_connection_references): New function.
13958 (xd_get_connection_address): Rename from xd_initialize.
13959 Return cached address.
13960 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
13961 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
13963 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
13964 Return number of refcounts.
13965 (Fdbus_get_unique_name): Make stronger parameter check.
13966 (Fdbus_message_internal): New defun.
13967 (Fdbus_call_method, Fdbus_call_method_asynchronously)
13968 (Fdbus_method_return_internal, Fdbus_method_error_internal)
13969 (Fdbus_send_signal, Fdbus_register_service)
13970 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
13971 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
13972 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
13973 (Vdbus_compiled_version, Vdbus_runtime_version)
13974 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
13975 (Vdbus_message_type_method_return, Vdbus_message_type_error)
13976 (Vdbus_message_type_signal): New defvars.
13977 (Vdbus_registered_buses, Vdbus_registered_objects_table):
13980 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
13982 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
13983 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
13984 Do not assume ptrdiff_t is the same width as 'int'.
13986 * alloc.c: Handle unusual debugging option combinations.
13987 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
13988 since the two debugging options are incompatible.
13989 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
13991 (mem_init, mem_insert, mem_insert_fixup):
13992 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
13993 (NEED_MEM_INSERT): Remove; no longer needed.
13995 2012-04-22 Leo Liu <sdl.web@gmail.com>
13997 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
13999 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
14001 * sysdep.c [__FreeBSD__]: Minor cleanups.
14002 (list_system_processes, system_process_attributes) [__FreeBSD__]:
14003 Use Emacs indenting style more consistently. Avoid some casts.
14004 Use 'double' consistently rather than mixing 'float' and 'double'.
14006 2012-04-21 Eduard Wiebe <usenet@pusto.de>
14008 * sysdep.c (list_system_processes, system_process_attributes):
14009 Add implementation for FreeBSD (Bug#5243).
14011 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
14013 * lisp.mk (lisp): Update.
14015 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
14017 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
14018 It is never used otherwise.
14020 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
14022 * print.c (print_preprocess): Only check print_depth if print-circle
14024 (print_object): Check for cycles even when print-circle is nil and
14025 print-gensym is t, but only check print_depth if print-circle is nil.
14027 2012-04-20 Chong Yidong <cyd@gnu.org>
14029 * process.c (wait_reading_process_output): If EIO occurs on a pty,
14030 set the status to "failed" and ensure that sentinel is run.
14032 2012-04-20 Glenn Morris <rgm@gnu.org>
14034 * process.c (Fset_process_inherit_coding_system_flag)
14035 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
14036 (Fmake_network_process, Fmake_serial_process): Doc fix.
14038 2012-04-20 Eli Zaretskii <eliz@gnu.org>
14040 * xdisp.c (string_buffer_position_lim): Limit starting position to
14042 (set_cursor_from_row): If called for a mode-line or header-line
14043 row, return zero immediately.
14044 (try_cursor_movement): If inside continuation line, don't back up
14045 farther than the first row after the header line, if any.
14046 Don't consider the header-line row as "partially visible", even if
14047 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
14049 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
14051 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
14054 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
14055 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
14057 configure: new option --enable-gcc-warnings (Bug#11207)
14058 * Makefile.in (C_WARNINGS_SWITCH): Remove.
14059 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
14060 (ALL_CFLAGS): Use new macros rather than old.
14061 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
14062 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
14063 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
14064 -Wunused-result, -Wunused-variable. This should go away once
14065 the Emacs and Gnulib regex code is merged.
14066 (xmalloc, xrealloc): Now static.
14068 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
14070 * dired.c (Fsystem_groups): Remove unused local.
14072 2012-04-17 Glenn Morris <rgm@gnu.org>
14074 * dired.c (Fsystem_users): Doc fix.
14076 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
14078 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
14079 (syms_of_dired): Add them.
14081 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
14083 Fix minor alloc.c problems found by static checking.
14084 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
14085 New extern decls, to avoid calling undeclared functions.
14086 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
14087 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
14088 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
14089 (NEED_MEM_INSERT): New macro.
14090 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
14091 Remove one incorrect comment and fix another.
14093 Fix minor ralloc.c problems found by static checking.
14094 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
14095 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
14096 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
14097 (r_alloc_sbrk): Now static.
14099 Improve ralloc.c interface checking.
14100 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
14101 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
14102 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
14103 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
14104 [REL_ALLOC]: ... to here, to check interface.
14105 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
14106 Remove decls. This fixes an "It stinks!".
14108 * alloc.c (which_symbols): Fix alignment issue / type clash.
14110 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
14112 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
14113 (struct Lisp_Misc_Any): Likewise.
14114 (struct Lisp_Free): Likewise.
14115 * alloc.c (union aligned_Lisp_Symbol): Define.
14116 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
14117 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
14118 (union aligned_Lisp_Misc): Define.
14119 (MARKER_BLOCK_SIZE, struct marker_block): Use union
14120 aligned_Lisp_Misc instead of union Lisp_Misc.
14121 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
14123 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
14125 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
14126 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
14127 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
14128 * s/netbsd.h, s/sol2-6.h:
14129 Remove definition of GC_MARK_STACK, since the default now works.
14130 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
14131 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
14132 no longer the default.
14133 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
14135 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
14137 * lread.c (lisp_file_lexically_bound_p):
14138 Fix hang at ";-*-\n" (bug#11238).
14140 2012-04-14 Eli Zaretskii <eliz@gnu.org>
14142 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
14143 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
14145 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
14147 * nsterm.m (constrainFrameRect): Always constrain when there is only
14148 one screen (Bug#10962).
14150 2012-04-13 Ken Brown <kbrown@cornell.edu>
14152 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
14154 2012-04-13 Reuben Thomas <rrt@sc3d.org>
14156 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
14158 2012-04-11 Daniel Colascione <dancol@dancol.org>
14160 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
14161 against is gone. It's better to use vfork now so that when Cygwin
14162 gains a new, working vfork, we use it automatically (bug#10398).
14164 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
14166 * window.c (save_window_save): Obey window-point-insertion-type.
14168 2012-04-11 Glenn Morris <rgm@gnu.org>
14170 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
14172 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
14174 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
14176 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
14178 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
14179 (force_quit_count): New var.
14180 (handle_interrupt): Use it.
14182 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
14184 * w32.c (w32_delayed_load): Record the full path of the library
14185 being loaded (bug#10424).
14187 2012-04-09 Glenn Morris <rgm@gnu.org>
14189 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
14190 not just in the obarray, before snarfing them. (Bug#11036)
14192 * Makefile.in ($(leimdir)/leim-list.el):
14193 Pass EMACS rather than BUILT_EMACS.
14195 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
14197 * process.c (make_process):
14198 * process.h: Add integer `gnutls_handshakes_tried' member to
14201 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
14202 Add convenience `GNUTLS_LOG2i' macro.
14204 * gnutls.c (gnutls_log_function2i): Convenience log function.
14205 (emacs_gnutls_read): Use new log functions,
14206 `gnutls_handshakes_tried' process member, and
14207 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
14208 attempts per process (connection).
14210 2012-04-09 Chong Yidong <cyd@gnu.org>
14212 * eval.c (Fuser_variable_p, user_variable_p_eh)
14213 (lisp_indirect_variable): Functions deleted.
14214 (Fdefvar): Caller changed.
14216 * callint.c (Finteractive, Fcall_interactively):
14217 * minibuf.c (Fread_variable): Callers changed.
14219 2012-04-09 Eli Zaretskii <eliz@gnu.org>
14221 * xdisp.c (set_cursor_from_row): If the display string appears in
14222 the buffer at position that is closer to point than the position
14223 after the display string, display the cursor on the first glyph of
14224 the display string. Fixes cursor display when a 'display' text
14225 property immediately follows invisible text. (Bug#11094)
14227 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
14229 composite.c: use 'double' consistently
14230 * composite.c (get_composition_id): Use 'double' consistently
14231 instead of converting 'float' to 'double' and vice versa; this is
14232 easier to understand and avoids a GCC warning.
14234 2012-04-09 Glenn Morris <rgm@gnu.org>
14236 * Makefile.in: Generate leim-list with bootstrap-emacs, in
14237 preparation for dumping it with emacs. (Bug#4789)
14238 (leimdir): New variable.
14239 ($(leimdir)/leim-list.el): New rule.
14240 (emacs$(EXEEXT)): Depend on leim-list.el.
14242 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
14243 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
14244 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
14246 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
14248 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
14251 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
14253 * xml.c (init_libxml2_functions) [WINDOWSNT]:
14254 Remove unused local variable.
14256 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
14258 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
14259 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
14260 (mark_memory): Mark Lisp_Objects only if pointers might hide in
14261 objects, as mark_maybe_pointer will catch them otherwise.
14262 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
14263 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
14265 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
14267 Fix typo that broke non-Windows builds.
14268 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
14270 2012-04-07 Eli Zaretskii <eliz@gnu.org>
14272 Support building on MS-Windows with libxml2.
14274 * makefile.w32-in (OBJ2): Add xml.$(O).
14275 (GLOBAL_SOURCES): Add xml.c.
14276 ($(BLD)/xml.$(O)): New dependency list.
14278 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
14279 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
14280 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
14281 [!WINDOWSNT]: New macros.
14282 (init_libxml2_functions, libxml2_loaded_p): New functions.
14283 (parse_region): Call fn_xmlCheckVersion instead of using the macro
14284 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
14285 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
14286 Calls xmlCleanupParser only if libxml2 was loaded (or statically
14288 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
14289 Call init_libxml2_functions before calling libxml2 functions.
14290 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
14292 * emacs.c: Don't include libxml/parser.h.
14293 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
14294 xmlCleanupParser directly.
14296 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
14298 2012-04-07 Eli Zaretskii <eliz@gnu.org>
14300 * indent.c (Fvertical_motion): If there is a display string at
14301 point, use it.vpos to compute how many lines to backtrack after
14302 move_it_to point. (Bug#11133)
14304 2012-04-06 Eli Zaretskii <eliz@gnu.org>
14306 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
14307 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
14308 about subtle differences between FETCH_CHAR* and STRING_CHAR*
14309 macros related to unification of CJK characters. For the details,
14310 see the discussion following the message here:
14311 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
14313 2012-04-04 Chong Yidong <cyd@gnu.org>
14315 * keyboard.c (Vdelayed_warnings_list): Doc fix.
14317 2012-04-01 Eli Zaretskii <eliz@gnu.org>
14319 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
14320 instead of alloca. (Bug#11138)
14322 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
14324 * w32menu.c (is_simple_dialog): Properly check lisp types.
14327 2012-03-31 Eli Zaretskii <eliz@gnu.org>
14329 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
14330 position we get to after a call to move_it_to fails the
14331 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
14332 only if we wind up in a string from display property. (Bug#11063)
14334 * window.c (Fdelete_other_windows_internal): Invalidate the row
14335 and column information about mouse highlight, so that redisplay
14336 restores it after reallocating the glyph matrices. (Bug#7464)
14338 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
14339 string comes from a `display' text property, use the buffer
14340 position of that property as if we actually saw that position in
14342 (move_it_by_lines): Remove the assertion that
14343 "it->current_x == 0 && it->hpos == 0" which can be legitimately
14344 violated when there's a before-string at the beginning of a line.
14347 2012-03-30 Eli Zaretskii <eliz@gnu.org>
14349 * xdisp.c (append_space_for_newline): If the default face was
14350 remapped, use the remapped face for the appended newline.
14351 (extend_face_to_end_of_line): Use the remapped default face for
14352 extending the face to the end of the line.
14353 (display_line): Call extend_face_to_end_of_line when the default
14354 face was remapped. (Bug#11068)
14356 2012-03-29 Eli Zaretskii <eliz@gnu.org>
14358 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
14360 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
14362 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
14364 2012-03-27 Glenn Morris <rgm@gnu.org>
14366 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
14369 2012-03-26 Kenichi Handa <handa@m17n.org>
14371 * dispextern.h (struct glyph): Fix previous change. Change the
14372 bit length of glyphless.ch to 25 (Bug#11082).
14374 2012-03-26 Chong Yidong <cyd@gnu.org>
14376 * keyboard.c (Vselection_inhibit_update_commands): New variable.
14377 (command_loop_1): Use it; inhibit selection update for
14378 handle-select-window too (Bug#8996).
14380 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
14382 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
14384 2012-03-25 Kenichi Handa <handa@m17n.org>
14386 * dispextern.h (struct glyph): Change the bit length of
14387 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
14389 2012-03-24 Eli Zaretskii <eliz@gnu.org>
14391 * s/ms-w32.h (tzname): Include time.h before redirecting to
14392 _tzname. Fixes the MSVC build. (Bug#9960)
14394 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
14396 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
14399 * xterm.c (XTread_socket): Only modify handling_signal if
14400 !SYNC_INPUT. (Bug#11080)
14402 2012-03-23 Eli Zaretskii <eliz@gnu.org>
14404 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
14405 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
14406 when fetching a multibyte character consumes more bytes than
14407 CHAR_BYTES returns, due to unification of CJK characters in
14408 string_char. (Bug#11073)
14410 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
14412 * process.c (wait_reading_process_output): Handle pty disconnect
14413 by refraining from sending oneself a SIGCHLD (bug#10933).
14415 2012-03-22 Chong Yidong <cyd@gnu.org>
14417 * dispextern.h (struct it): New member string_from_prefix_prop_p.
14419 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
14420 Mark string as coming from a prefix property.
14421 (handle_face_prop): Use default face for prefix strings (Bug#4281).
14422 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
14424 2012-03-21 Chong Yidong <cyd@gnu.org>
14426 * xfaces.c (Vface_remapping_alist): Doc fix.
14428 2012-03-20 Eli Zaretskii <eliz@gnu.org>
14430 * w32proc.c (Fw32_set_console_codepage)
14431 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
14434 2012-03-20 Chong Yidong <cyd@gnu.org>
14436 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
14437 to reflect default non-nil value of redisplay-dont-pause.
14439 2012-03-19 Kenichi Handa <handa@m17n.org>
14441 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
14442 it fit in a valid range (Bug#11003).
14444 2012-03-18 Eli Zaretskii <eliz@gnu.org>
14446 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
14447 that is not from display property, accept the row as a "cursor
14448 row" if one of the string's character has a non-nil `cursor'
14449 property. Fixes cursor positioning when there are newlines in
14450 overlay strings, e.g. in icomplete.el. (Bug#11035)
14452 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
14454 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
14456 2012-03-12 Chong Yidong <cyd@gnu.org>
14458 * eval.c (inhibit_lisp_code): Rename from
14459 inhibit_window_configuration_change_hook; move from window.c.
14461 * xfns.c (unwind_create_frame_1, Fx_create_frame):
14462 * window.c (run_window_configuration_change_hook)
14463 (syms_of_window): Callers changed.
14465 2012-03-11 Chong Yidong <cyd@gnu.org>
14467 * keymap.c (Fkey_description): Doc fix (Bug#9700).
14469 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
14471 2012-03-10 Chong Yidong <cyd@gnu.org>
14473 * frame.c (other_visible_frames): Don't assume the selected frame
14474 is visible (Bug#10955).
14476 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
14478 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
14480 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
14482 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
14483 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
14486 2012-03-03 Glenn Morris <rgm@gnu.org>
14488 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
14490 2012-03-02 Eli Zaretskii <eliz@gnu.org>
14492 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
14493 position past the first glyph_row that ends at ZV. (Bug#10902)
14494 (redisplay_window, next_element_from_string): Fix typos in
14496 (redisplay_window): Pass to move_it_vertically the margin in
14497 pixels, not in screen lines.
14499 2012-03-02 Glenn Morris <rgm@gnu.org>
14501 * buffer.c (buffer-list-update-hook): Doc fix.
14503 2012-02-29 Eli Zaretskii <eliz@gnu.org>
14505 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
14506 push_it before setting up the iterator for the first overlay
14507 string, even if we have an empty string loaded.
14508 (next_overlay_string): If there's an empty string on the iterator
14509 stack, pop the stack. (Bug#10903)
14511 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
14513 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
14514 Suggested by Stefan Monnier in
14515 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
14516 * alloc.c (widen_to_Lisp_Object): New static function.
14517 (mark_memory): Also mark Lisp_Objects by fetching pointer words
14518 and widening them to Lisp_Objects. This would work even if
14519 USE_LSB_TAG is defined and wide integers are used, which might
14520 happen in a future version of Emacs.
14522 2012-02-25 Chong Yidong <cyd@gnu.org>
14524 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
14527 * xselect.c (Fx_selection_exists_p): Doc fix.
14528 (x_clipboard_manager_save_all): Print an informative message
14529 before saving to clipboard manager.
14531 2012-02-24 Chong Yidong <cyd@gnu.org>
14533 * keyboard.c (process_special_events): Handle all X selection
14534 requests in kbd_buffer, not just the next one (Bug#8869).
14536 2012-02-23 Chong Yidong <cyd@gnu.org>
14538 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
14539 call when setting menu-bar-lines and tool-bar-lines parameters.
14540 (unwind_create_frame_1): New helper function.
14542 * window.c (inhibit_window_configuration_change_hook): New var.
14543 (run_window_configuration_change_hook): Obey it.
14544 (syms_of_window): Initialize it.
14546 2012-02-22 Chong Yidong <cyd@gnu.org>
14548 * xterm.c (x_draw_image_relief): Add missing type check for
14549 Vtool_bar_button_margin (Bug#10743).
14551 2012-02-21 Chong Yidong <cyd@gnu.org>
14553 * fileio.c (Vfile_name_handler_alist): Doc fix.
14555 * buffer.c (Fget_file_buffer): Protect against invalid file
14556 handler return value.
14558 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
14560 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
14561 when computing $valmask.
14563 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
14564 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
14565 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
14566 It's useless in that case, and it can cause problems on hosts
14567 that allocate halves of EMACS_INT values separately.
14568 Reported by Dan Horák. Diagnosed by Andreas Schwab in
14569 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
14570 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
14571 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
14572 it avoids undefined behavior on hosts where shifting right by more
14573 than the word width has undefined behavior.
14575 2012-02-19 Chong Yidong <cyd@gnu.org>
14577 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
14578 (Funhandled_file_name_directory, Ffile_name_as_directory)
14579 (Fdirectory_file_name, Fexpand_file_name)
14580 (Fsubstitute_in_file_name): Protect against invalid file handler
14581 return values (Bug#10845).
14583 2012-02-18 Eli Zaretskii <eliz@gnu.org>
14585 * .gdbinit (pitx): Fix incorrect references to fields of the
14588 2012-02-17 Chong Yidong <cyd@gnu.org>
14590 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
14592 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
14594 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
14595 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
14597 2012-02-15 Chong Yidong <cyd@gnu.org>
14599 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
14600 marked as special. Also, starting docstrings with * is obsolete.
14602 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
14604 * gnutls.c (emacs_gnutls_write): Fix last change.
14606 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
14608 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
14611 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
14613 * keymap.c (Fsingle_key_description): Handle char ranges.
14615 2012-02-12 Chong Yidong <cyd@gnu.org>
14617 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
14618 as that creates a dangerous corner case.
14620 * window.c (Fdelete_window_internal): Invalidate the mouse
14621 highlight (Bug#9904).
14623 2012-02-12 Glenn Morris <rgm@gnu.org>
14625 * xselect.c (Fx_own_selection_internal)
14626 (Fx_get_selection_internal, Fx_disown_selection_internal)
14627 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
14628 * nsselect.m (Fx_own_selection_internal)
14629 (Fx_disown_selection_internal, Fx_selection_exists_p)
14630 (Fx_selection_owner_p, Fx_get_selection_internal):
14631 Sync docs and argument specs with the xselect.c versions.
14633 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
14635 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
14637 2012-02-11 Eli Zaretskii <eliz@gnu.org>
14639 * w32select.c (Fx_selection_exists_p): Sync doc string and
14640 argument list with xselect.c. (Bug#10783)
14642 * w16select.c (Fx_selection_exists_p): Sync doc string and
14643 argument list with xselect.c. (Bug#10783)
14645 2012-02-10 Glenn Morris <rgm@gnu.org>
14647 * fns.c (Fsecure_hash): Doc fix.
14649 2012-02-09 Kenichi Handa <handa@m17n.org>
14651 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
14653 2012-02-07 Chong Yidong <cyd@gnu.org>
14655 * buffer.c (Fbuffer_local_variables)
14656 (buffer_lisp_local_variables): Handle unbound vars correctly;
14657 don't let Qunbound leak into Lisp.
14659 2012-02-07 Glenn Morris <rgm@gnu.org>
14661 * image.c (Fimagemagick_types): Doc fix.
14663 * image.c (imagemagick-render-type): Change it from a lisp object
14664 to an integer. Move the doc here from the lisp manual.
14665 Treat all values not equal to 0 the same.
14667 2012-02-06 Chong Yidong <cyd@gnu.org>
14669 * doc.c (store_function_docstring): Avoid applying docstring of
14670 alias to base function (Bug#2603).
14672 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
14674 * .gdbinit (pp1, pv1): Remove redundant defines.
14677 2012-02-04 Chong Yidong <cyd@gnu.org>
14679 * nsterm.m: Declare a global (Bug#10694).
14681 2012-02-04 Eli Zaretskii <eliz@gnu.org>
14683 * w32.c (get_emacs_configuration_options):
14684 Include --enable-checking, if specified, in the return value.
14686 2012-02-04 Martin Rudalics <rudalics@gmx.at>
14688 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
14689 after rounding frame sizes. (Bug#9723)
14691 2012-02-04 Eli Zaretskii <eliz@gnu.org>
14693 * keyboard.c (adjust_point_for_property): Don't position point
14694 before BEGV. (Bug#10696)
14696 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
14698 Handle overflow when computing char display width (Bug#9496).
14699 * character.c (char_width): Return EMACS_INT, not int.
14700 (char_width, c_string_width): Check for overflow when
14701 computing the width; this is possible now that individual
14702 characters can have unbounded width. Problem introduced
14703 by merge from Emacs 23 on 2012-01-19.
14705 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
14707 * dbusbind.c (Fdbus_register_method): Mention the return value
14708 :ignore in the docstring.
14710 2012-02-02 Glenn Morris <rgm@gnu.org>
14712 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
14714 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
14715 Unconditionally set to t. (Bug#10673)
14716 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
14717 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
14718 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
14720 2012-02-02 Kenichi Handa <handa@m17n.org>
14722 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
14723 0, do not call append_composite_glyph.
14725 2012-02-02 Kenichi Handa <handa@m17n.org>
14727 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
14729 (x_produce_glyphs): If the component of a composition is a null
14730 string, set it->pixel_width to 1 to avoid zero-width glyph.
14732 2012-02-01 Eli Zaretskii <eliz@gnu.org>
14734 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
14735 first 2 arguments are identical. This makes inserting large
14736 output from a subprocess an order of magnitude faster on
14737 MS-Windows, where all sbrk'ed memory is always contiguous.
14739 2012-01-31 Glenn Morris <rgm@gnu.org>
14741 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
14742 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
14743 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
14745 2012-01-29 Glenn Morris <rgm@gnu.org>
14747 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
14749 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
14751 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
14753 2012-01-28 Chong Yidong <cyd@gnu.org>
14755 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
14757 2012-01-26 Chong Yidong <cyd@gnu.org>
14759 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
14761 * search.c (Fsearch_forward, Fsearch_backward): Document negative
14762 repeat counts (Bug#10507).
14764 2012-01-26 Glenn Morris <rgm@gnu.org>
14766 * lread.c (syms_of_lread): Doc fix.
14768 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
14770 * coding.c (encode_designation_at_bol): Change return value to
14773 2012-01-25 Chong Yidong <cyd@gnu.org>
14775 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
14777 2012-01-21 Chong Yidong <cyd@gnu.org>
14779 * floatfns.c (Fcopysign): Make the second argument non-optional,
14780 since nil is not allowed anyway.
14782 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
14784 * process.c (read_process_output): Use p instead of XPROCESS (proc).
14785 (send_process): Likewise.
14787 2012-01-19 Martin Rudalics <rudalics@gmx.at>
14789 * window.c (save_window_save, Fcurrent_window_configuration)
14790 (Vwindow_persistent_parameters): Do not use Qstate.
14791 Rewrite doc-strings.
14793 2012-01-19 Kenichi Handa <handa@m17n.org>
14795 * character.c (char_width): New function.
14796 (Fchar_width, c_string_width, lisp_string_width):
14797 Use char_width (Bug#9496).
14799 2012-01-16 Martin Rudalics <rudalics@gmx.at>
14801 * window.c (Vwindow_persistent_parameters): New variable.
14802 (Fset_window_configuration, save_window_save): Handle persistent
14805 2012-01-14 Eli Zaretskii <eliz@gnu.org>
14807 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
14808 thrashing the stack of the thread. (Bug#9087)
14810 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
14812 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
14814 2012-01-11 Eli Zaretskii <eliz@gnu.org>
14816 * xdisp.c (rows_from_pos_range): Handle the case where the
14817 highlight ends on a newline. (Bug#10464)
14818 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
14819 he end column for display of highlight that ends on a newline
14822 2012-01-11 Glenn Morris <rgm@gnu.org>
14824 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
14825 from load-path also when installation-directory is nil. (Bug#10208)
14827 2012-01-10 Glenn Morris <rgm@gnu.org>
14829 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
14831 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
14832 Update template values to be closer to their typical values these days.
14834 2012-01-09 Eli Zaretskii <eliz@gnu.org>
14836 * xdisp.c (rows_from_pos_range): Accept additional argument
14837 DISP_STRING, and accept any glyph in a row whose object is that
14838 string as eligible for mouse highlight. Fixes mouse highlight of
14839 display strings from overlays. (Bug#10464)
14841 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
14843 emacs: fix an auto-save permissions race condition (Bug#10400)
14844 * fileio.c (auto_saving_dir_umask): New static var.
14845 (Fmake_directory_internal): Use it.
14846 (do_auto_save_make_dir): Set it, instead of invoking chmod after
14847 creating the directory. The old code temporarily assigns
14848 too-generous permissions to the directory.
14849 (do_auto_save_eh): Clear it.
14850 (Fdo_auto_save): Catch all errors, not just file errors, so
14851 that the var is always cleared.
14853 2012-01-07 Eli Zaretskii <eliz@gnu.org>
14855 * search.c (scan_buffer): Pass character positions to
14856 know_region_cache, not byte positions. (Bug#6540)
14858 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
14860 * w32.c (sys_rename): Report EXDEV when rename of a directory
14861 fails because the target is on another logical disk. (Bug#10284)
14863 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
14865 * xterm.c (x_embed_request_focus): New function.
14867 * xterm.h: Add prototype.
14869 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
14871 2012-01-05 Glenn Morris <rgm@gnu.org>
14873 * emacs.c (emacs_copyright): Update short copyright year to 2012.
14875 2012-01-01 Eli Zaretskii <eliz@gnu.org>
14877 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
14878 Load gnutls_transport_set_lowat only if GnuTLS version is below
14880 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
14881 GnuTLS versions below 2.11.1.
14883 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
14885 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
14886 to the doc string advising against its use for altering the way
14887 windows are scrolled.
14889 2011-12-28 Kenichi Handa <handa@m17n.org>
14891 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
14892 coding-system ASCII compatible only when it does not produce BOM
14893 on encoding (Bug#10383).
14895 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
14897 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
14899 (create_and_show_popup_menu): Always use menu_position_func for
14902 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
14904 * callint.c (Fcall_interactively): Don't truncate prompt string.
14906 2011-12-23 Eli Zaretskii <eliz@gnu.org>
14908 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
14909 property that ends at ZV, so that the bidi iteration could be
14910 resumed from there (after widening). (Bug#10360)
14912 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
14914 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
14916 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
14918 * nsterm.m (x_free_frame_resources):
14919 Release f->output_data.ns->miniimage.
14920 (ns_index_color): Fix indentation. Do not retain
14921 color_table->colors[i].
14923 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
14926 * nsfns.m (x_set_background_color): Assign return value from
14927 ns_index_color to face-background instead of NSColor*.
14928 (ns_implicitly_set_icon_type): Fix indentation.
14929 Change assignment in for loop to comparison.
14931 * emacs.c (ns_pool): New variable.
14932 (main): Assign ns_pool.
14933 (Fkill_emacs): Call ns_release_autorelease_pool.
14935 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
14936 autorelease fdesc, release fdAttrs and tdict.
14937 (ns_get_covering_families): Release charset.
14938 (ns_findfonts): Release NSFontDescriptor created with new.
14939 (ns_uni_to_glyphs): Fix indentation.
14940 (setString): Release attrStr before assigning new value.
14942 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
14944 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
14946 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
14947 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
14949 2011-12-18 David Reitter <reitter@cmu.edu>
14951 * nsterm.m (ns_term_init): Subscribe for notifications
14952 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
14953 to method trackingNotification in EmacsMenu.
14955 * nsmenu.m (trackingMenu): New variable.
14956 (trackingNotification): New method (from Aquamacs).
14957 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
14958 from Aquamacs (Bug#7030).
14960 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
14962 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
14963 (symbol_to_nsstring): Fix indentation.
14964 (ns_symbol_to_pb): New function.
14965 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
14966 (Fns_rotate_cut_buffers_internal): Remove.
14967 (Fns_store_selection_internal): Rename from
14968 Fns_store_cut_buffer_internal.
14969 (ns_get_foreign_selection, Fx_own_selection_internal)
14970 (Fx_disown_selection_internal, Fx_selection_exists_p)
14971 (Fns_get_selection_internal, Fns_store_selection_internal):
14972 Use ns_symbol_to_pb and check if return value is nil.
14973 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
14974 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
14975 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
14976 renamed to Sns_store_selection_internal.
14977 (ns_handle_selection_request): Move code to Fx_own_selection_internal
14978 and remove this function.
14979 (ns_handle_selection_clear): Remove, never used.
14980 (Fx_own_selection_internal): Move code from ns_handle_selection_request
14983 2011-12-17 Ken Brown <kbrown@cornell.edu>
14985 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
14986 GID is unknown (Bug#10257).
14988 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
14990 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
14991 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
14992 which caused a build failure on GNU/Linux IA-64. This problem was
14993 introduced by my 2011-10-07 patch.
14995 2011-12-15 Juri Linkov <juri@jurta.org>
14997 * image.c (imagemagick_error): New function. (Bug#10112)
14998 (imagemagick_load_image): Comment out `MagickSetResolution' call.
14999 Use `imagemagick_error' where ImageMagick functions return
15001 (Fimagemagick_types): Add `Fnreverse' to return the list in the
15004 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15006 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
15007 fill background (Bug#8992).
15009 2011-12-13 Martin Rudalics <rudalics@gmx.at>
15011 * window.c (Vwindow_combination_resize)
15012 (Vwindow_combination_limit): Use t instead of non-nil in
15014 (Vrecenter_redisplay): Add first sentence of doc-string on
15016 (Frecenter): Fix doc-string typo.
15018 2011-12-11 Kenichi Handa <handa@m17n.org>
15020 * coding.c (Funencodable_char_position): Pay attention to the
15021 buffer text relocation (Bug#9389).
15023 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
15025 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
15026 gtk_init (Bug#10100).
15028 2011-12-10 Eli Zaretskii <eliz@gnu.org>
15030 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
15031 IT->string is nil. (Bug#10263)
15033 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
15035 * nsterm.h (x_free_frame_resources): Declare.
15037 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
15038 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
15040 * nsterm.h (ns_get_defaults_value): Declare.
15042 * nsterm.m (ns_default): Call ns_get_defaults_value.
15044 2011-12-09 Eli Zaretskii <eliz@gnu.org>
15046 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
15049 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15051 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
15052 that where the value of an _OBJC_* symbol points to is in the .bss
15053 section (Bug#10240).
15055 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15057 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
15058 after the loop to call ccl_driver at least once (Bug#8619).
15060 2011-12-08 Kenichi Handa <handa@m17n.org>
15062 * ftfont.c (get_adstyle_property): Fix previous change
15065 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
15067 * w32.c (init_environment): If no_site_lisp, remove site-lisp
15068 dirs from the default value of EMACSLOADPATH (bug#10208).
15070 2011-12-07 Glenn Morris <rgm@gnu.org>
15072 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
15073 installation and source directories as well. (Bug#10208)
15075 2011-12-06 Chong Yidong <cyd@gnu.org>
15077 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
15079 2011-12-06 Glenn Morris <rgm@gnu.org>
15081 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
15082 as an error, not just -1. (Bug#10217)
15084 2011-12-05 Chong Yidong <cyd@gnu.org>
15086 * keyboard.c (process_special_events): New function.
15087 (swallow_events, Finput_pending_p): Use it (Bug#10195).
15089 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
15091 * coding.c (encode_designation_at_bol): Don't use uninitialized
15092 local variable (Bug#9318).
15094 2011-12-05 Kenichi Handa <handa@m17n.org>
15096 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
15097 return Qnil (Bug#8046, Bug#10193).
15099 2011-12-05 Kenichi Handa <handa@m17n.org>
15101 * coding.c (encode_designation_at_bol): New args charbuf_end and
15102 dst. Return the number of produced bytes. Callers changed.
15103 (coding_set_source): Return how many bytes coding->source was
15105 (coding_set_destination): Return how many bytes
15106 coding->destination was relocated.
15107 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
15108 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
15110 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
15112 * coding.c (CODING_CHAR_CHARSET_P): New macro.
15113 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
15116 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
15118 The following changes are to fix Bug#9318.
15120 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
15121 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
15122 (encode_coding_iso_2022, encode_coding_sjis)
15123 (encode_coding_big5, encode_coding_charset): Use the above macros.
15125 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
15127 * lisp.h (process_quit_flag): Fix external declaration.
15129 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
15131 Don't macro-inline non-performance-critical code.
15132 * eval.c (process_quit_flag): New function.
15133 * lisp.h (QUIT): Use it.
15135 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
15137 * nsfns.m (get_geometry_from_preferences): New function.
15138 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
15140 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
15142 * emacs.c (Qkill_emacs): Define.
15143 (syms_of_emacs): Initialize it.
15144 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
15145 Qquit_flag to `kill-emacs' instead.
15146 (quit_throw_to_read_char): Add parameter `from_signal'.
15147 All callers changed. Call Fkill_emacs if requested and safe.
15148 * lisp.h (QUIT): Call Fkill_emacs if requested.
15150 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
15152 * widget.c (update_wm_hints): Return if wmshell is null.
15153 (widget_update_wm_size_hints): New function.
15155 * widget.h (widget_update_wm_size_hints): Declare.
15157 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
15158 widget_update_wm_size_hints (Bug#10104).
15160 2011-12-03 Eli Zaretskii <eliz@gnu.org>
15162 * xdisp.c (handle_invisible_prop): If the invisible text ends just
15163 before a newline, prepare the bidi iterator for consuming the
15164 newline, and keep the current paragraph direction. (Bug#10183)
15165 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
15167 2011-12-02 Juri Linkov <juri@jurta.org>
15169 * search.c (Fword_search_regexp): New Lisp function created from
15170 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
15171 (Fword_search_backward, Fword_search_forward)
15172 (Fword_search_backward_lax, Fword_search_forward_lax):
15173 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
15174 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
15176 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
15178 * fileio.c (Finsert_file_contents): Move after-change-function call
15179 to before the "handled:" label, since all "goto handled" appear in
15180 cases where the *-change-functions have already been properly called
15183 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
15185 * keyboard.c (interrupt_signal): Don't call kill-emacs when
15186 waiting for input. (Bug#10169)
15188 2011-11-30 Eli Zaretskii <eliz@gnu.org>
15190 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
15191 verifies glyph row's hash code--we have just reallocated the
15192 glyphs, so their contents can be complete garbage. (Bug#10164)
15194 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
15196 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
15198 2011-11-30 Eli Zaretskii <eliz@gnu.org>
15200 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
15201 attributes are tested _before_ calling verify_row_hash, to protect
15202 against GCC re-ordering of the tests. (Bug#10164)
15204 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
15206 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
15208 * xterm.c (handle_one_xevent): Only set async_visible and friends
15209 if net_wm_state_hidden_seen is non-zero (Bug#10002)
15210 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
15211 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
15213 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
15215 Remove GCPRO-related macros that exist only to avoid shadowing locals.
15216 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
15217 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
15218 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
15219 All uses changed to use GCPRO1 etc.
15220 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
15221 Revert to old implementation (i.e., before 2011-03-11).
15223 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15225 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
15226 of scroll runs so as to avoid assigning disabled bogus rows and
15227 unnecessary graphics copy operations.
15229 2011-11-27 Eli Zaretskii <eliz@gnu.org>
15231 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
15232 (snprintf) [_MSC_VER]: Redirect to _snprintf.
15233 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
15234 (malloc, free, realloc, calloc): Redirect to e_* only when
15237 * lisp.h (GCTYPEBITS): Move before first use.
15238 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
15239 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
15240 this macro definition.
15242 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
15245 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
15247 * gtkutil.c (xg_create_frame_widgets):
15248 Call gtk_window_set_has_resize_grip (FALSE) if that function is
15249 present with Gtk+ 2.0.
15251 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
15253 * fileio.c (Finsert_file_contents): Undo previous change; see
15254 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
15256 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
15258 Rename locals to avoid shadowing.
15259 * fileio.c (Finsert_file_contents):
15260 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
15261 * process.c (wait_reading_process_output):
15262 Rename inner 'proc' to 'p' to avoid shadowing.
15263 Indent for consistency with usual Emacs style.
15265 2011-11-25 Eli Zaretskii <eliz@gnu.org>
15267 * xdisp.c (redisplay_window): If cursor row is not fully visible
15268 after recentering, and scroll-conservatively is set to a large
15269 number, scroll window by a few more lines to make the cursor fully
15270 visible and out of scroll-margin. (Bug#10105)
15271 (start_display): Don't move to the next line if the display should
15272 start at a newline that is part of a display vector or an overlay
15273 string. (Bug#10119)
15275 2011-11-24 Juri Linkov <juri@jurta.org>
15277 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
15278 after the `MagickPingImage' call. (Bug#10112)
15280 2011-11-23 Chong Yidong <cyd@gnu.org>
15282 * window.c (Fcoordinates_in_window_p): Accept only live windows.
15284 2011-11-23 Martin Rudalics <rudalics@gmx.at>
15286 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
15287 making another buffer current. (Bug#10114)
15289 2011-11-23 Glenn Morris <rgm@gnu.org>
15291 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
15293 2011-11-23 Chong Yidong <cyd@gnu.org>
15295 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
15296 using it (Bug#5984).
15298 2011-11-22 Eli Zaretskii <eliz@gnu.org>
15300 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
15301 and header-lines, as they don't have one computed for them.
15304 * .gdbinit (prow): Make displayed values more self-explaining.
15305 Add row's hash code.
15307 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
15309 * process.c (wait_reading_process_output): Fix asynchrounous
15310 GnuTLS socket handling on some versions of the GnuTLS library.
15311 (wait_reading_process_output): Add comment and URL.
15313 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
15315 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
15317 2011-11-21 Chong Yidong <cyd@gnu.org>
15319 * window.c (Fnext_window, Fprevious_window): Doc fix.
15321 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
15323 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
15325 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
15327 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
15329 2011-11-20 Martin Rudalics <rudalics@gmx.at>
15331 * window.c (Fset_window_combination_limit): Rename argument
15333 (Vwindow_combination_limit): Remove "status" from doc-string.
15335 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
15337 * m/ibms390.h: Remove.
15338 * m/ibms390x.h: Don't include "ibms390.h".
15340 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
15342 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
15343 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
15345 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
15347 * casetab.c (Fset_case_table):
15348 * charset.c (Fcharset_after): Fix typos.
15350 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
15352 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
15353 Otherwise, valgrind does not work on some platforms.
15354 Problem reported by Andreas Schwab in
15355 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
15356 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
15357 is set, removing the need for VIRT_ADDRESS_VARIES.
15358 (PURE_P): Use a more-efficient implementation that needs just one
15359 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
15360 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
15361 to 4 (xorl, subq, cmpq, setbe).
15362 * alloc.c (pure): Always extern now, since that's the
15363 VIRT_ADDR_VARIES behavior.
15364 (PURE_POINTER_P): Use a single comparison, not two, for
15365 consistency with the new puresize.h.
15366 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
15367 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
15368 Remove VIRT_ADDR_VARIES no longer needed.
15370 2011-11-19 Eli Zaretskii <eliz@gnu.org>
15372 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
15373 (erase_phys_cursor, update_window_cursor, show_mouse_face)
15374 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
15375 behave as if the cursor position were at the window margin.
15377 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
15378 and the cursor position is out of bounds, behave as if the cursor
15379 position were at the window margin. (Bug#10075)
15381 2011-11-18 Chong Yidong <cyd@gnu.org>
15383 * window.c (Fwindow_combination_limit): Make first argument
15384 non-optional, since it is meaningless for live windows like the
15387 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
15389 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
15391 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
15393 * intervals.c: Fix grafting over the whole buffer (bug#10071).
15394 (graft_intervals_into_buffer): Simplify.
15396 2011-11-18 Eli Zaretskii <eliz@gnu.org>
15398 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
15399 hash values of the two rows.
15400 (copy_row_except_pointers): Preserve the used[] arrays and the
15401 hash values of the two rows. (Bug#10035)
15402 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
15404 * xdisp.c (row_hash): New function, body extracted from
15405 compute_line_metrics.
15406 (compute_line_metrics): Call row_hash, instead of computing the
15409 * dispnew.c (verify_row_hash): Call row_hash for computing the
15410 hash code of a row, instead of duplicating code from xdisp.c.
15412 * dispextern.h (row_hash): Add prototype.
15414 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
15416 * frame.c (delete_frame): Don't delete the terminal when the last
15417 X frame is closed if emacs is built with GTK toolkit.
15419 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
15421 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
15423 2011-11-17 Martin Rudalics <rudalics@gmx.at>
15425 * window.c (Vwindow_splits): Rename to
15426 Vwindow_combination_resize. Suggested by Juri Linkov.
15427 (Fsplit_window_internal): Use Vwindow_combination_resize instead
15430 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
15432 * nsfns.m (Fns_font_name):
15433 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
15435 2011-11-16 Martin Rudalics <rudalics@gmx.at>
15437 * window.h (window): Rename slot "nest" to "combination_limit".
15438 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
15439 (Fset_window_nest): Rename to Fset_window_combination_limit.
15440 (Vwindow_nest): Rename to Vwindow_combination_limit.
15441 (recombine_windows, make_parent_window, make_window)
15442 (Fsplit_window_internal, saved_window)
15443 (Fset_window_configuration, save_window_save): Rename all
15444 occurrences of window_nest to window_combination_limit.
15446 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
15448 * image.c (imagemagick_load_image): Fix typo.
15450 2011-11-14 Eli Zaretskii <eliz@gnu.org>
15452 * xdisp.c (display_line): Move the call to
15453 highlight_trailing_whitespace before the call to
15454 compute_line_metrics, since the latter needs to see the final
15455 faces of all the glyphs to compute ROW's hash value.
15456 Fixes assertion violations in row_equal_p. (Bug#10035)
15458 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
15460 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
15461 just return (bug#10044).
15463 2011-11-12 Eli Zaretskii <eliz@gnu.org>
15465 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
15466 with user-defined heap size. Bump the default size of the temacs
15467 heap to 27MB, to avoid memory warning when running temacs.
15468 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
15470 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
15471 current_matrix and desired_matrix. (Bug#9990)
15472 (verify_row_hash) [XASSERTS]: New function.
15473 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
15474 that the hash value of glyph rows is correct.
15476 2011-11-12 Martin Rudalics <rudalics@gmx.at>
15478 * window.h (window): Remove splits slot.
15479 * window.c (Fwindow_splits, Fset_window_splits): Remove.
15480 (Fdelete_other_windows_internal, make_parent_window)
15481 (make_window, Fsplit_window_internal, Fdelete_window_internal)
15482 (Fset_window_configuration, save_window_save): Don't deal with
15483 split status of windows.
15484 (saved_window): Remove splits slot.
15485 (Vwindow_splits): Rewrite doc-string.
15487 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
15489 * xfns.c (unwind_create_frame):
15490 * nsfns.m (unwind_create_frame):
15491 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
15492 Vframe_list (Bug#9999).
15494 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
15496 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
15498 2011-11-11 Kenichi Handa <handa@m17n.org>
15500 * callproc.c (Fcall_process): Set the member dst_multibyte of
15503 2011-11-11 Johan Bockgård <bojohan@gnu.org>
15505 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
15506 avoid a crash (bug#9496).
15508 2011-11-09 Chong Yidong <cyd@gnu.org>
15510 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
15511 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
15513 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
15515 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
15517 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
15519 Avoid some portability problems by eschewing 'extern inline' functions.
15520 The trivial performance wins aren't worth the portability hassles; see
15521 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
15523 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
15524 (window_box_width, window_box_left, window_box_left_offset)
15525 (window_box_right, window_box_right_offset): Undo previous change,
15526 by removing the "extern"s.
15527 * intervals.c (adjust_intervals_for_insertion)
15528 (adjust_intervals_for_deletion): Undo previous change,
15529 making these static again.
15530 (offset_intervals, temp_set_point_both, temp_set_point)
15531 (copy_intervals_to_string): No longer inline.
15532 * xdisp.c (window_text_bottom_y, window_box_width)
15533 (window_box_height, window_box_left_offset)
15534 (window_box_right_offset, window_box_left, window_box_right)
15535 (window_box): No longer inline.
15537 2011-11-08 Chong Yidong <cyd@gnu.org>
15539 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
15540 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
15541 Signal an error if not a live window.
15542 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
15543 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
15545 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
15547 * lisp.h (syms_of_abbrev): Remove declaration.
15548 Reported by CHENG Gao <chenggao@royau.me>.
15550 2011-11-07 Eli Zaretskii <eliz@gnu.org>
15552 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
15553 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
15554 of temacs in GUI mode.
15556 2011-11-07 Martin Rudalics <rudalics@gmx.at>
15558 * window.h: Declare delete_all_child_windows instead of
15559 delete_all_subwindows.
15560 * window.c (Fwindow_nest, Fset_window_nest)
15561 (Fset_window_new_total, Fset_window_new_normal)
15562 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
15563 (delete_all_subwindows): Rename to delete_all_child_windows.
15564 (Fdelete_other_windows_internal, Fset_window_configuration):
15565 Call delete_all_child_windows instead of delete_all_subwindows.
15566 * frame.c (delete_frame): Call delete_all_child_windows instead
15567 of delete_all_subwindows.
15569 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
15571 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
15572 This is also needed for porting to any host where GC_MARK_STACK is
15573 not GC_MAKE_GCPROS_NOOPS.
15574 (which_symbols): Use it.
15576 2011-11-07 Kenichi Handa <handa@m17n.org>
15578 * coding.c (coding_set_destination): Check coding->src_pos only
15579 when coding->src_object is a buffer (bug#9910).
15581 * process.c (send_process): Set the member src_multibyte of coding
15582 to 0 (bug#9911) when sending a unibyte text.
15584 * callproc.c (Fcall_process): Set the member src_multibyte of
15585 process_coding to 0 (bug#9912).
15587 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15589 * xmenu.c (cleanup_widget_value_tree): New function.
15590 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
15591 calling free_menubar_widget_value_tree directly (Bug#9830).
15593 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
15595 Fix some portability problems with 'inline'.
15596 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
15597 (window_box_width, window_box_left, window_box_left_offset)
15598 (window_box_right, window_box_right_offset): Declare extern.
15599 Otherwise, these inline functions do not conform to C99 and
15600 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
15601 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
15602 * intervals.c (adjust_intervals_for_insertion)
15603 (adjust_intervals_for_deletion): Now extern, because otherwise the
15604 extern inline functions 'offset_intervals' couldn't refer to it.
15605 (static_offset_intervals): Remove.
15606 (offset_intervals): Rewrite using the old contents of
15607 static_offset_intervals. The old version didn't conform to C99
15608 because an extern inline function contained a reference to an
15609 identifier with static linkage.
15611 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
15613 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
15616 2011-11-06 Eli Zaretskii <eliz@gnu.org>
15618 * xdisp.c (init_iterator, reseat_to_string): Don't set the
15619 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
15620 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
15621 return Qleft_to_right.
15623 2011-11-06 Chong Yidong <cyd@gnu.org>
15625 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
15626 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
15627 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
15628 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
15629 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
15630 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
15631 (Fwindow_vscroll): Doc fix.
15632 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
15633 argument, since it makes no sense to pass a live window and for
15634 consistency with window-child.
15636 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
15638 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
15641 2011-11-05 Jason Rumney <jasonr@gnu.org>
15643 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
15644 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
15646 (add_font_entity_to_list): Fix logic errors in mixed boolean and
15647 bitwise arithmetic preventing use of unicode-sip and non-truetype
15650 2011-11-05 Eli Zaretskii <eliz@gnu.org>
15652 * s/ms-w32.h (fstat, stat, utime): Move redirections to
15655 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
15656 initialization code to keep similarity to xfns.c after changes
15659 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
15661 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
15662 (unwind_create_frame): New function (Bug#9943).
15663 (Fx_create_frame): Restructure code to be more similar to the one in
15664 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
15665 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
15666 Move terminal->reference_count++ just before making the frame official
15669 * nsterm.m (x_free_frame_resources): New function.
15670 (x_destroy_window): Move code to x_free_frame_resources.
15672 * xfns.c (unwind_create_frame): Fix comment.
15673 (Fx_create_frame, x_create_tip_frame):
15674 Move terminal->reference_count++ just before making the frame
15675 official. Move initialization of image_cache_refcount and
15676 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
15678 2011-11-05 Eli Zaretskii <eliz@gnu.org>
15680 Support MSVC build with newer versions of Visual Studio.
15681 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
15682 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
15685 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
15686 which are not supported by MSVC.
15687 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
15688 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
15690 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
15691 types in bitfields.
15692 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
15694 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
15696 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
15698 Support MSVC build with newer versions of Visual Studio.
15699 * w32.c: Don't include w32api.h for MSVC.
15700 (init_environment) [_MSC_VER]: Call sys_access, not _access.
15702 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
15703 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
15704 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
15705 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
15707 (alloca) [_MSC_VER]: Define to _alloca.
15709 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
15711 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
15713 2011-11-04 Eli Zaretskii <eliz@gnu.org>
15715 * xdisp.c (note_mouse_highlight): If either of
15716 previous/next-single-property-change returns nil, treat that as
15717 the beginning or the end of the buffer. (Bug#9955)
15719 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
15721 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
15722 label is not null (Bug#9951).
15723 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
15726 2011-11-04 Eli Zaretskii <eliz@gnu.org>
15728 * window.c (Fwindow_body_size): Mention in the doc string that the
15729 return value is in frame's canonical units. (Bug#9949)
15731 2011-11-03 Eli Zaretskii <eliz@gnu.org>
15733 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
15735 * w32fns.c (unwind_create_frame): If needed, free the glyph
15736 matrices of the partially constructed frame. (Bug#9943)
15737 * xfns.c (unwind_create_frame): Likewise.
15739 2011-11-01 Eli Zaretskii <eliz@gnu.org>
15741 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
15742 Don't stop backward scan on the continuation glyph, even though
15743 its CHARPOS is positive.
15744 (mouse_face_from_buffer_pos, note_mouse_highlight):
15745 Rename cover_string to disp_string.
15747 2011-11-01 Martin Rudalics <rudalics@gmx.at>
15749 * window.c (temp_output_buffer_show): Don't use
15750 Vtemp_buffer_show_specifiers.
15751 (Vtemp_buffer_show_specifiers): Remove unused variable.
15753 2011-10-30 Eli Zaretskii <eliz@gnu.org>
15755 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
15756 past the beginning of the current glyph matrix.
15758 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
15760 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
15761 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
15762 HAVE_GTK3 (Bug#9869).
15764 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
15765 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
15767 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
15769 * xterm.c: Declare x_handle_net_wm_state to return int.
15770 (handle_one_xevent): Check if we are iconified but don't have
15771 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
15772 (get_current_wm_state): Return non-zero if not hidden,
15773 check for _NET_WM_STATE_HIDDEN (Bug#9893).
15774 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
15775 (x_handle_net_wm_state): Return what get_current_wm_state returns.
15776 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
15778 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
15780 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
15781 so that this new function doesn't get optimized away by a
15782 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
15784 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
15786 * frame.h (MOUSE_HL_INFO): Remove excess parens.
15788 2011-10-29 Eli Zaretskii <eliz@gnu.org>
15790 Fix the `xbytecode' command.
15791 * .gdbinit (xprintbytestr): New command.
15792 (xwhichsymbols): Rename from `which'; all callers changed.
15793 (xbytecode): Print the byte-code string as well.
15795 2011-10-29 Kim Storm <storm@cua.dk>
15797 * alloc.c (which_symbols): New function.
15799 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
15801 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
15804 2011-10-29 Glenn Morris <rgm@gnu.org>
15806 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
15807 Not clear what it was for, and it causes various bugs. (Bug#9839)
15809 2011-10-28 Eli Zaretskii <eliz@gnu.org>
15811 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
15812 possible random value that matches one of those tested as
15813 condition to clear the mouse face.
15815 2011-10-28 Chong Yidong <cyd@gnu.org>
15817 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
15819 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
15821 * window.c (make_window): Initialize phys_cursor_on_p.
15823 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
15825 * lisp.h (struct Lisp_Symbol): Update comments.
15827 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
15829 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
15831 2011-10-28 Eli Zaretskii <eliz@gnu.org>
15833 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
15834 <oslsachem@gmail.com> for helping to debug this.
15836 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
15837 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
15838 (g_b_init_get_glyph_outline_w): New static variables.
15839 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
15840 (GetGlyphOutlineW_Proc): New typedefs.
15841 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
15842 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
15844 (w32font_open_internal, compute_metrics):
15845 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
15846 instead of calling the "wide" APIs directly.
15848 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
15850 * w32.h (syms_of_w32font): Add prototype.
15852 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
15854 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
15855 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
15856 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
15857 (Fmove_to_window_line): Doc fix.
15859 2011-10-27 Chong Yidong <cyd@gnu.org>
15861 * process.c (make_process): Set gnutls_state to NULL.
15863 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
15864 non-NULL, regardless of GNUTLS_INITSTAGE.
15865 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
15866 an error. Set process slots as soon as we allocate them.
15868 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
15870 2011-10-27 Chong Yidong <cyd@gnu.org>
15872 * gnutls.c (emacs_gnutls_deinit): New function.
15873 Deallocate credentials structures as well as calling gnutls_deinit.
15874 (Fgnutls_deinit, Fgnutls_boot): Use it.
15876 * process.c (make_process): Initialize GnuTLS credentials to NULL.
15877 (deactivate_process): Call emacs_gnutls_deinit.
15879 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
15881 * image.c (x_create_x_image_and_pixmap):
15882 * w32.c (sys_rename, w32_delayed_load):
15883 * w32font.c (fill_in_logfont):
15884 * w32reg.c (x_get_string_resource): Silence compiler warnings.
15886 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
15888 * w32fns.c (w32_default_color_map): New function,
15889 extracted from Fw32_default_color_map.
15890 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
15892 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
15894 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
15896 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
15898 * keyboard.c (test_undefined): New function (bug#9751).
15899 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
15901 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
15903 * sysdep.c (init_sys_modes): Fix the check for the controlling
15904 terminal (Bug#6649).
15906 2011-10-20 Eli Zaretskii <eliz@gnu.org>
15908 * dispextern.h (struct bidi_it): New member next_en_type.
15910 * bidi.c (bidi_line_init): Initialize the next_en_type member.
15911 (bidi_resolve_explicit_1): When next_en_pos is valid for the
15912 current character, check also for next_en_type being WEAK_EN.
15913 (bidi_resolve_weak): Don't enter the expensive loop if the current
15914 position is before next_en_pos. Record the bidi type of the first
15915 non-ET, non-BN character we find, in addition to its position.
15916 (bidi_level_of_next_char): Invalidate next_en_type when
15917 next_en_pos is over-stepped.
15919 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
15921 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
15922 * editfns.c: Rewrite current-time-zone so that it invokes
15923 the equivalent of (format-time-string "%Z") to get the time zone name.
15924 This fixes a bug when the time zone name contains characters that
15925 need converting from the system time locale to Emacs internal format.
15926 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
15927 that patch fixed format-time-string to do the conversion, but
15928 I forgot to fix current-time-zone.
15929 (format_time_string): New function, containing most of
15930 what Fformat_time_string used to contain.
15931 (Fformat_time_string): Rewrite in terms of format_time_string.
15932 This doesn't change this function's behavior.
15933 (current-time-zone): Rewrite to use format_time_string.
15934 This fixes the bug reported by Michael Schierl in
15935 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
15936 Jason Rumney's 2007-06-07 change worked around this bug, but
15938 * systime.h (tzname, timezone): Remove no-longer-used declarations.
15940 2011-10-19 Eli Zaretskii <eliz@gnu.org>
15942 * xdisp.c (start_display): If the character at POS is displayed
15943 via a display vector, reset IT->current.dpvec_index to zero.
15944 (try_window_reusing_current_matrix): If a line ends in a display
15945 vector or the next line starts in a display vector, continue
15946 redrawing the window even though the character position of
15947 start_row was reached.
15950 2011-10-18 Chong Yidong <cyd@gnu.org>
15952 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
15953 with nobreak-char-display too.
15955 2011-10-18 Eli Zaretskii <eliz@gnu.org>
15957 Fix part 3 of bug#9771.
15958 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
15959 (bidi_resolve_neutral): Don't enter the expensive loop looking for
15960 non-neutral characters if the current character is a paragraph
15961 separator (a.k.a. Newline). This avoids running the same
15962 expensive loop twice, once when we consume the preceding newline
15963 and the other time when the line actually needs to be displayed.
15964 Avoid the loop when we see neutrals on the base embedding level
15965 following a character whose directionality is the same as the
15966 paragraph's. This avoids running the expensive loop when a line
15967 ends in a long sequence of neutrals, like control characters.
15968 Add assertion against STRONG_AL type. Slightly rearrange code
15969 that determines the type of a neutral given the first non-neutral
15971 (bidi_level_of_next_char): Set next_en_pos to zero when
15972 invalidating its info.
15974 2011-10-17 Eli Zaretskii <eliz@gnu.org>
15976 * xdisp.c (push_display_prop): Determine whether to record string
15977 or buffer position by IT->string, not by IT->method. Allow
15978 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
15979 (move_it_vertically_backward): Don't look for character position
15980 immediately after the newline when in a continuation line.
15983 2011-10-15 Martin Rudalics <rudalics@gmx.at>
15985 * window.c (coordinates_in_window): Rewrite and delabelize
15986 vertical border check. (Bug#5357) (Bug#9618)
15988 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
15990 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
15991 errors in XSetWindowBorder (bug#9310).
15993 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
15995 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
15996 avoid crash when xmalloc overrun checking is enabled.
15998 2011-10-13 Eli Zaretskii <eliz@gnu.org>
16000 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
16001 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
16002 cursor motion with <left> and <right> arrow keys.
16004 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
16005 some callers set that themselves.
16007 2011-10-12 Eli Zaretskii <eliz@gnu.org>
16009 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
16010 display string and the previous row comes from the same string and
16011 is empty. (Bug#9739) (Bug#9738)
16013 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
16015 * doc.c (get_doc_string): Encode file name (bug#9735).
16017 2011-10-12 Eli Zaretskii <eliz@gnu.org>
16019 * bidi.c (bidi_level_of_next_char):
16020 * xdisp.c (get_visually_first_element): Remove old incorrect
16021 comments regarding the Unicode Line Separator character.
16023 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
16025 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
16027 * alloc.c (Fgc_status): Do not access beyond zombies array
16028 boundary if nzombies > MAX_ZOMBIES.
16029 * alloc.c (dump_zombies): Add missing format specifier.
16031 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
16033 * xdisp.c (set_cursor_from_row): Simplify conditionals,
16034 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
16036 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
16037 Some packages use them to denote characters with modifiers.
16039 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
16041 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
16042 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
16043 matching a pp-number. Rename parameter var to var1.
16045 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
16047 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
16049 2011-10-08 Glenn Morris <rgm@gnu.org>
16051 * callint.c (Fcall_interactively): Give a more explicit error for the
16052 'c' case with a non-character input. (Bug#8479)
16054 2011-10-08 Eli Zaretskii <eliz@gnu.org>
16056 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
16058 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
16059 lines that are hscrolled on the left.
16061 * dispnew.c (buffer_posn_from_coords): Account for a possible
16062 presence of header-line. (Bug#4426)
16064 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
16066 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
16067 Don't advertise functionality which we discourage or doesn't work.
16069 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
16071 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
16072 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
16073 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
16074 this makes Emacs dump core during garbage collection on rare
16075 occasions. sizeof is obviously inferior to offsetof here, so
16076 stick with offsetof.
16077 (GC_POINTER_ALIGNMENT): New macro.
16078 (mark_memory): Omit 3rd (offset) arg; caller changed.
16079 Don't assume EMACS_INT alignment is the same as pointer alignment.
16081 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
16083 * keyboard.c (read_key_sequence_remapped): New var.
16084 (read_key_sequence): Compute remapping in the right buffer.
16085 (command_loop_1): Use read_key_sequence's remapping directly.
16087 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
16089 * dired.c (file_name_completion): Don't expand file name.
16090 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
16091 before checking file name handler.
16093 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
16094 they've been requested explicitly (bug#9591).
16096 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
16098 * keymap.c (Fsingle_key_description): Use make_specified_string
16099 instead of build_string to build string from push_key_description.
16102 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
16104 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
16105 This fixes a Y2038 bug on 64-bit hosts.
16106 * buffer.c (reset_buffer):
16107 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
16108 (Fclear_buffer_auto_save_failure):
16109 Use 0, not -1, to represent an unset failure time, since time_t
16110 might not be signed.
16112 Remove dependency on glibc malloc internals.
16113 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16114 Move back here from lisp.h, but with their new implementations.
16115 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
16116 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
16117 * charset.c (charset_table_init): New static var.
16118 (syms_of_charset): Use it instead of xmalloc. This removes a
16119 dependency on glibc malloc internals. See Eli Zaretskii's comment in
16120 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
16121 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16122 Move back to alloc.c.
16123 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
16124 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
16126 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
16128 * nsterm.m (windowDidResize): Call x_set_window_size only when
16129 ns_in_resize is true. Otherwise set pixelwidth/height and
16130 call change_frame_size (Bug#9628).
16132 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
16134 Port --enable-checking=all to Fedora 14 x86-64.
16135 * charset.c (syms_of_charset): Also account for glibc malloc's
16136 internal overhead when calculating the initial malloc maximum.
16138 Port --enable-checking=all to Fedora 14 x86.
16139 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16141 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
16142 (overrun_check_realloc, overrun_check_free):
16143 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
16144 That way, xmalloc returns a properly-aligned pointer even if
16145 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
16146 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
16147 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
16148 into account when calculating the initial malloc maximum.
16149 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
16150 Move here from alloc.c, so that charset.c can use it too.
16151 Properly align; the old code wasn't right for common 32-bit hosts
16152 when configured with --enable-checking=all.
16153 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
16154 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
16156 2011-09-29 Eli Zaretskii <eliz@gnu.org>
16158 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
16161 2011-09-28 Eli Zaretskii <eliz@gnu.org>
16163 * xdisp.c (compute_display_string_end): If there's no display
16164 string at CHARPOS, return -1.
16166 * bidi.c (bidi_fetch_char): When compute_display_string_end
16167 returns a negative value, treat the character as a normal
16168 character not covered by a display string. (Bug#9624)
16170 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
16172 * lread.c (Fread_from_string): Fix typo in docstring.
16174 2011-09-27 Eli Zaretskii <eliz@gnu.org>
16176 * xdisp.c (handle_invisible_prop): If invisible text ends on a
16177 newline, reseat the iterator instead of bidi-iterating there one
16178 character at a time. (Bug#9610)
16179 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
16180 TO_CHARPOS if the bidi iterator is at base embedding level.
16182 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
16184 * lread.c (readevalloop): Use correct code for NBSP.
16185 (read1): Likewise. (Bug#9608)
16187 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
16189 * dbusbind.c (Fdbus_register_signal): When service is not
16190 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
16192 2011-09-25 Glenn Morris <rgm@gnu.org>
16194 * buffer.c (truncate-lines): Doc fix.
16196 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
16198 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
16199 (Fset_window_next_buffers): Doc fix.
16201 2011-09-24 Glenn Morris <rgm@gnu.org>
16203 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
16205 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
16207 Fix minor problems found by static checking.
16208 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
16209 * indent.c (Fvertical_motion): Fix == vs = typo.
16211 2011-09-24 Eli Zaretskii <eliz@gnu.org>
16213 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
16214 Default value is now t. Doc fix.
16216 * indent.c (Fvertical_motion): Compute and apply the overshoot
16217 logic when moving up, not only when moving down. Fix the
16218 confusing name and values of the it_overshoot_expected variable;
16219 logic changes accordingly. (Bug#9254) (Bug#9549)
16221 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
16222 CHARPOS is covered by a display string which includes newlines.
16223 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
16224 is covered by a display string with embedded newlines.
16226 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
16228 * dbusbind.c (Fdbus_register_signal): Add match rule to
16229 Vdbus_registered_objects_table. (Bug#9581)
16230 (Fdbus_register_method, Vdbus_registered_objects_table):
16233 2011-09-24 Jim Meyering <meyering@redhat.com>
16235 do not ignore write error for any output size
16236 The previous change was incomplete.
16237 While it makes emacs --batch detect the vast majority of stdout
16238 write failures, errors were still ignored whenever the output size is
16239 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
16240 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
16241 && echo FAIL: ignored write error
16242 FAIL: ignored write error
16243 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
16244 && echo FAIL: ignored write error
16245 FAIL: ignored write error
16246 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
16248 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
16250 * emacs.c (Fkill_emacs): In noninteractive mode exit
16251 non-successfully if a write error occurred on stdout. (Bug#9574)
16253 2011-09-21 Eli Zaretskii <eliz@gnu.org>
16255 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
16258 * dispextern.h (struct it): Update the comment documenting what
16261 2011-09-20 Eli Zaretskii <eliz@gnu.org>
16263 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
16264 a display string, extend search for cursor position to end of row.
16265 (find_row_edges): If the row ends in a newline from a display
16266 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
16267 Handle the case of a display string with multiple newlines.
16268 (Fcurrent_bidi_paragraph_direction): Fix search for previous
16269 non-empty line. Fixes confusing cursor motion with arrow keys at
16270 the beginning of a line that starts with whitespace.
16272 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
16274 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
16277 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
16279 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
16280 boolean (Bug#9154).
16282 2011-09-18 Eli Zaretskii <eliz@gnu.org>
16284 * xdisp.c (display_line): Record maximum and minimum buffer
16285 positions even if no glyphs were produced (e.g., by a zero-width
16286 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
16287 buffer positions that will be removed from the glyph row because
16289 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
16290 column is beyond frame width: don't subtract 1 "pixel" when
16291 computing width of the stretch.
16292 (reseat_at_next_visible_line_start): Undo the change made on
16293 2011-09-17 that saved paragraph information and restored it after
16294 the call to `reseat'. (Bug#9545)
16296 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16298 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
16299 and turn window cursor on if cleared (Bug#9415).
16301 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
16303 * search.c (boyer_moore): Take unibyte characters from pattern
16304 literally. (Bug#9458)
16306 2011-09-18 Eli Zaretskii <eliz@gnu.org>
16308 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
16310 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
16312 Fix minor problem found by static checking.
16313 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
16314 initialized, to pacify gcc -Wuninitialized.
16316 * fileio.c: Report proper errno when syscall falls.
16317 (Finsert_file_contents): Save and restore errno,
16318 so that report_file_error outputs the correct diagnostic.
16319 (Fwrite_region) [CLASH_DETECTION]: Likewise.
16321 2011-09-18 Eli Zaretskii <eliz@gnu.org>
16323 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
16325 2011-09-17 Eli Zaretskii <eliz@gnu.org>
16327 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
16328 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
16330 2011-09-17 Eli Zaretskii <eliz@gnu.org>
16332 * xdisp.c (reseat_at_next_visible_line_start): Keep information
16333 about the current paragraph and restore it after the call to reseat.
16335 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
16336 (bidi_find_paragraph_start): Search back for paragraph beginning
16337 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
16338 (bidi_move_to_visually_next): Only trigger paragraph-related
16339 computations when the last character is a newline or at EOB, not
16340 just any NEUTRAL_B. (Bug#9470)
16342 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
16343 truncated lines if point is covered by a display string. (Bug#9524)
16345 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
16347 * xselect.c: Relax test for outgoing X longs (Bug#9498).
16348 (cons_to_x_long): New function.
16349 (lisp_data_to_selection_data): Use it. Correct the test for
16350 short-versus-long data; it was negated. Break out of vector
16351 loop, for efficiency, when a long datum is discovered.
16353 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
16355 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
16357 2011-09-16 Eli Zaretskii <eliz@gnu.org>
16359 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
16360 GCC PR/17406) by declaring this function with external scope.
16362 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
16364 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
16365 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
16367 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
16369 * editfns.c (Fformat): Correctly handle text properties on "%%".
16371 2011-09-15 Eli Zaretskii <eliz@gnu.org>
16373 * xterm.c (x_draw_composite_glyph_string_foreground):
16374 * w32term.c (x_draw_composite_glyph_string_foreground):
16375 * term.c (encode_terminal_code):
16376 * composite.c (composition_update_it, get_composition_id):
16377 * xdisp.c (get_next_display_element)
16378 (fill_composite_glyph_string): Add comments about special meaning
16379 of TAB characters in a composition.
16381 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
16383 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
16384 This occurs when processing a multibyte format.
16385 Problem reported by Wolfgang Jenker.
16387 2011-09-15 Johan Bockgård <bojohan@gnu.org>
16389 * xdisp.c (try_cursor_movement): Only check for exact match if
16390 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
16392 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
16394 Remove unused external symbols.
16395 * dispextern.h (calc_pixel_width_or_height): Remove decl.
16396 * xdisp.c (calc_pixel_width_or_height): Now static.
16397 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
16398 * indent.c (check_display_width):
16399 * w32term.c: Fix comment to match code.
16400 * xterm.c, xterm.h (x_catching_errors): Remove.
16402 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
16404 * xselect.c: Use signed conversions more consistently (Bug#9498).
16405 (selection_data_to_lisp_data): Assume incoming selection data are
16406 signed integers, not unsigned. This is to be consistent with
16407 outgoing selection data, which was modified to use signed integers
16408 in as part of the fix to Bug#9196 in response to Jan D.'s comment
16409 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
16410 expects long, not unsigned long.
16412 2011-09-14 Eli Zaretskii <eliz@gnu.org>
16414 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
16415 computation of loop end. Reported by Johan Bockgård
16418 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
16420 * frame.c (Fother_visible_frames_p): Function deleted.
16422 2011-09-12 Eli Zaretskii <eliz@gnu.org>
16424 * indent.c (compute_motion): Process display vector front to back
16425 rather than the other way around. (Bug#2496)
16427 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
16429 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
16431 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
16433 * minibuf.c (Fread_from_minibuffer): Doc fix.
16435 2011-09-11 Eli Zaretskii <eliz@gnu.org>
16437 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
16438 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
16440 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
16442 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
16443 value for non-existent files.
16445 2011-09-11 Eli Zaretskii <eliz@gnu.org>
16447 * fileio.c (Finsert_file_contents): If the file cannot be opened,
16448 set its "size" to -1. This will set the modtime_size field of
16449 the corresponding buffer to -1, which is what
16450 verify-visited-file-modtime expects for files that do not exist.
16453 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
16455 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
16457 * lisp.h: ... from here. push_key_description is no longer
16458 defined in keyboard.c, so its declaration should not be in
16459 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
16460 logically belongs with push_key_description.
16462 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
16464 * buffer.h: Include <sys/types.h> instead of <time.h>.
16465 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
16466 Problem reported by Herbert J. Skuhra.
16468 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
16470 * xml.c (parse_region): Make the parsing work for
16471 non-comment-starting XML files again (bug#9144).
16473 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
16475 * image.c (gif_load): Fix calculation of bottom and right corner.
16478 2011-09-10 Eli Zaretskii <eliz@gnu.org>
16480 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
16481 redisplay in small windows.
16483 2011-09-09 Eli Zaretskii <eliz@gnu.org>
16485 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
16487 2011-09-08 Martin Rudalics <rudalics@gmx.at>
16489 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
16490 Operate on live windows only.
16492 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
16494 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
16496 2011-09-07 Eli Zaretskii <eliz@gnu.org>
16498 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
16499 only under bidi iteration.
16501 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
16503 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
16505 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16507 isnan: Fix porting problem to Solaris 10 with bundled gcc.
16508 Without this fix, the command to link temacs failed due to an
16509 undefined symbol __builtin_isnan. This is because
16510 /usr/include/iso/math_c99.h #defines isnan(x) to
16511 __builtin_isnan(x), but the bundled gcc, which identifies itself
16512 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
16514 * floatfns.c (isnan): #undef, and then #define to a clone of
16516 (Fisnan): Always define, since it's always available now.
16517 (syms_of_floatfns): Always define isnan at the Lisp level.
16519 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16521 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
16523 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16525 * fileio.c: Fix bugs with large file offsets (Bug#9428).
16526 The previous code assumed that file offsets (off_t values) fit in
16527 EMACS_INT variables, which is not true on typical 32-bit hosts.
16528 The code messed up by falsely reporting buffer overflow in cases
16529 such as (insert-file-contents "big" nil 1 2) into an empty buffer
16530 when "big" contains more than 2**29 bytes, even though this
16531 inserts just one byte and does not overflow the buffer.
16532 (Finsert_file_contents): Store file offsets as off_t
16533 values, not as EMACS_INT values. Check for overflow when
16534 converting between EMACS_INT and off_t. When checking for
16535 buffer overflow or for overlap, take the offsets into account.
16536 Don't use EMACS_INT for small values where int suffices.
16537 When checking for overlap, fix a typo: ZV was used where
16538 ZV_BYTE was intended.
16539 (Fwrite_region): Don't assume off_t fits into 'long'.
16540 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
16542 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
16544 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
16546 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
16548 sprintf-related integer and memory overflow issues (Bug#9412).
16550 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
16551 (esprintf, exprintf, evxprintf): New functions.
16552 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
16553 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
16554 (modify_event_symbol): Do not assume that the length of
16555 name_alist_or_stem is safe to alloca and fits in int.
16556 (Fexecute_extended_command): Likewise for function name and binding.
16557 (Frecursion_depth): Wrap around reliably on integer overflow.
16558 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
16559 since some callers pass EMACS_INT values.
16560 (Fsingle_key_description): Don't crash if symbol name contains more
16561 than MAX_ALLOCA bytes.
16562 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
16563 (get_minibuffer): Arg is now EMACS_INT, not int.
16564 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
16565 (esprintf, exprintf, evxprintf): New decls.
16566 * window.h (command_loop_level, minibuf_level): Reflect API changes.
16568 * dbusbind.c (signature_cat): New function.
16569 (xd_signature, Fdbus_register_signal):
16570 Do not overrun buffer; instead, report string overflow.
16572 * dispnew.c (add_window_display_history): Don't overrun buffer.
16573 Truncate instead; this is OK since it's just a log.
16575 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
16576 even if the time zone offset is outlandishly large.
16577 Don't mishandle offset == INT_MIN.
16579 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
16580 when creating daemon; the previous buffer-overflow check was incorrect.
16582 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
16583 which has the guts of the old verror function.
16585 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
16586 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
16588 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
16589 (font_unparse_xlfd): Don't blindly alloca long strings.
16590 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
16591 fits in int, when using sprintf. Use single snprintf to count
16592 length of string rather than counting it via multiple sprintfs;
16593 that's simpler and more reliable.
16594 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
16595 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
16596 sprintf, in case result does not fit in int.
16598 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
16599 (fontset_from_font): Print it.
16601 * frame.c (tty_frame_count): Now printmax_t, not int.
16602 (make_terminal_frame, set_term_frame_name): Print it.
16603 (x_report_frame_params): In X, window IDs are unsigned long,
16604 not signed long, so print them as unsigned.
16605 (validate_x_resource_name): Check for implausibly long names,
16606 and don't assume name length fits in 'int'.
16607 (x_get_resource_string): Don't blindly alloca invocation name;
16608 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
16611 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
16612 (xg_check_special_colors, xg_set_geometry):
16613 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
16615 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
16616 Use esprintf, not sprintf, in case result does not fit in int.
16618 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
16619 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
16620 it as a large positive number.
16621 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
16622 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
16624 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
16625 in case result does not fit in int.
16627 * print.c (float_to_string): Detect width overflow more reliably.
16628 (print_object): Make sprintf buffer a bit bigger, to avoid potential
16629 buffer overrun. Don't assume list length fits in 'int'. Treat
16630 print length of 0 as 0, not as infinity; to be consistent with other
16631 uses of print length in this function. Don't overflow print length
16632 index. Don't assume hash table size fits in 'long', or that
16633 vectorlike size fits in 'unsigned long'.
16635 * process.c (make_process): Use printmax_t, not int, to format
16636 process-name gensyms.
16638 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
16640 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
16641 to avoid potential buffer overrun.
16643 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
16644 if X resource line is longer than 512 bytes.
16646 * xfns.c (x_window): Make sprintf buffer a bit bigger
16647 to avoid potential buffer overrun.
16649 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
16651 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
16653 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
16655 Integer overflow fixes for scrolling, etc.
16656 Without these, Emacs silently mishandles large integers sometimes.
16657 For example, "C-u 4294967297 M-x recenter" was treated as if
16658 it were "C-u 1 M-x recenter" on a typical 64-bit host.
16660 * xdisp.c (try_window_id): Check Emacs fixnum range before
16661 converting to 'int'.
16663 * window.c (window_scroll_line_based, Frecenter):
16664 Check that an Emacs fixnum is in range before assigning it to 'int'.
16665 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
16666 values converted from Emacs fixnums.
16667 (Frecenter): Don't wrap around a line count if it is out of 'int'
16668 range; instead, treat it as an extreme value.
16669 (Fset_window_configuration, compare_window_configurations):
16670 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
16672 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
16673 that can exceed INT_MAX. Check that EMACS_INT value is in range
16674 before assigning it to the (possibly-narrower) index.
16675 (match_limit): Don't assume that a fixnum can fit in 'int'.
16677 * print.c (print_object): Use ptrdiff_t, not int, for index that can
16680 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
16681 (Fvertical_motion): Don't wrap around LINES values that don't fit
16682 in 'int'. Instead, treat them as extreme values. This is good
16683 enough for windows, which can't have more than INT_MAX lines anyway.
16685 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
16687 * Require libxml/parser.h to avoid compilation warning.
16689 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
16691 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
16692 since this reportedly can destroy thread storage.
16694 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
16696 * syntax.c (find_defun_start): Update all cache variables if
16697 exiting early (Bug#9401).
16699 2011-08-30 Eli Zaretskii <eliz@gnu.org>
16701 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
16703 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
16704 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
16705 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
16707 * term.c (tty_append_glyph): New function.
16708 (produce_stretch_glyph): Static function and its prototype deleted.
16710 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
16713 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
16715 * image.c (parse_image_spec): Check for nonnegative, not for positive,
16716 when checking :margin (Bug#9390).
16717 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
16718 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
16719 so that the name doesn't mislead. All uses changed.
16721 2011-08-28 Johan Bockgård <bojohan@gnu.org>
16723 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
16726 2011-08-27 Eli Zaretskii <eliz@gnu.org>
16728 * xdisp.c (move_it_to): Don't bail out early when reaching
16729 position beyond to_charpos, if we are scanning backwards.
16730 (move_it_vertically_backward): When DY == 0, make sure we get to
16731 the first character in the line after the newline.
16733 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
16735 * ccl.c: Improve and simplify overflow checking (Bug#9196).
16736 (ccl_driver): Do not generate an out-of-range pointer.
16737 (Fccl_execute_on_string): Remove unnecessary check for
16738 integer overflow, noted by Stefan Monnier in
16739 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
16740 Remove a FIXME that didn't need fixing.
16741 Simplify the newly-introduced buffer reallocation code.
16743 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
16745 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
16747 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
16749 Integer and memory overflow issues (Bug#9196).
16751 * doc.c (get_doc_string): Rework so that
16752 get_doc_string_buffer_size is the actual buffer size, rather than
16753 being 1 less than the actual buffer size; this makes xpalloc more
16756 * image.c (x_allocate_bitmap_record, cache_image):
16757 * xselect.c (Fx_register_dnd_atom):
16758 Simplify previous changes by using xpalloc.
16760 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
16761 since either will do and ptrdiff_t is convenient with xpalloc.
16763 * charset.c (charset_table_size)
16764 (struct charset_sort_data.priority): Now ptrdiff_t.
16765 (charset_compare): Don't overflow if priorities differ greatly.
16766 (Fsort_charsets): Don't assume list length fits in int.
16767 Check for size-calculation overflow when allocating sort data.
16768 (syms_of_charset): Allocate an initial charset table that is
16769 just under 64 KiB, to avoid problems with glibc malloc and mmap.
16771 * cmds.c (internal_self_insert): Check for size-calculation overflow.
16773 * composite.h (struct composition.glyph_len): Now int, not unsigned.
16774 The actual value is always <= INT_MAX, and leaving it unsigned made
16775 overflow checking harder.
16777 * dispextern.h (struct glyph_matrix.rows_allocated)
16778 (struct face_cache.size): Now ptrdiff_t, for convenience in use
16779 with xpalloc. The values are still always <= INT_MAX.
16781 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
16783 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
16784 (SAFE_NALLOCA): New macro.
16786 * region-cache.c (struct boundary.pos, find_cache_boundary)
16787 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
16788 (set_cache_region, invalidate_region_cache)
16789 (revalidate_region_cache, know_region_cache, region_cache_forward)
16790 (region_cache_backward, pp_cache):
16791 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
16792 so that ptrdiff_t * can be passed to xpalloc.
16793 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
16794 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
16795 (pp_cache): Don't assume cache_len fits in int.
16796 * region-cache.h: Adjust extern decls to match.
16798 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
16799 EMACS_INT, since either will do, for xpalloc.
16801 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
16802 (xnmalloc, xnrealloc, xpalloc): New functions.
16804 * bidi.c (bidi_shelve_header_size): New constant.
16805 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
16806 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
16808 * bidi.c (bidi_cache_shrink):
16809 * buffer.c (overlays_at, overlays_in, record_overlay_string)
16811 Don't update size of array until after memory allocation succeeds,
16812 because xmalloc/xrealloc may not return.
16813 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
16814 now that we have proper integer overflow checking.
16815 (record_overlay_string, overlay_strings): Catch overflows when
16816 calculating size of overlay_str_buf.
16818 * callproc.c (Fcall_process): Check for size overflow when
16819 calculating size of args2.
16820 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
16821 Normally we prefer signed values, but sticking with ptrdiff_t would
16822 require adding more-complicated checks.
16824 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
16825 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
16826 Redo buffer-overflow calculations to avoid integer overflow.
16827 Add a FIXME comment where memory seems to be over-allocated.
16829 * character.c (Fstring): Check for size-calculation overflow.
16831 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
16832 unnecessary integer overflow. Check for size overflow.
16833 (encode_coding_object): Don't update size until xmalloc succeeds.
16835 * composite.c (get_composition_id): Check for overflow in glyph
16836 length calculations.
16838 Integer and memory overflow fixes for display code.
16839 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
16840 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
16841 (scrolling_window): Check for overflow in size calculations.
16842 (line_draw_cost, realloc_glyph_pool, add_row_entry):
16843 Don't assume glyph table len fits in int.
16844 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
16845 (row_table_size): Now ptrdiff_t, not int.
16846 (scrolling_window): Avoid overflow in size calculations.
16847 Don't update size until allocation succeeds.
16848 * fns.c (concat): Check for overflow in size calculations.
16849 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
16850 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
16851 (NEXT_ALMOST_PRIME_LIMIT): New constant.
16853 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
16854 (get_doc_string): Check for size calculation overflow.
16855 Don't update size until allocation succeeds.
16856 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
16857 EMACS_INT, where ptrdiff_t will do.
16858 (Fsubstitute_command_keys): Check for string overflow.
16860 * editfns.c (set_time_zone_rule): Don't assume environment length
16862 (message_length): Now ptrdiff_t, not int.
16863 (Fmessage_box): Don't update size until allocation succeeds.
16864 Don't assume message length fits in int.
16865 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
16867 * emacs.c (main): Do not reallocate argv, since there is a null at
16868 the end that can be overwritten, and this way there's no need to
16869 worry about size-calculation overflow.
16870 (sort_args): Check for size-calculation overflow.
16872 * eval.c (init_eval_once, grow_specpdl): Don't update size until
16874 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
16876 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
16877 (x_set_scroll_bar_width, x_figure_window_size):
16878 Check for integer overflow.
16879 (x_set_alpha): Do not assume XINT fits in int.
16881 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
16882 This is for the members text_lines, text_cols, total_lines, total_cols,
16883 where the system imposes an 'int' limit.
16885 * fringe.c (Fdefine_fringe_bitmap):
16886 Don't update size until alloc works.
16888 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
16889 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
16891 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
16892 Check for size-calculation overflow.
16893 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
16894 do, as we prefer signed integers.
16895 (id_to_widget.max_size, id_to_widget.used)
16896 (xg_store_widget_in_map, xg_remove_widget_from_map)
16897 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
16898 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
16899 Use and return ptrdiff_t, not int.
16900 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
16901 * gtkutil.h: Change prototypes to match the above.
16903 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
16904 are duplicate now that they've been promoted to lisp.h.
16905 (x_allocate_bitmap_record, x_alloc_image_color)
16906 (make_image_cache, cache_image, xpm_load):
16907 Don't update size until alloc is done.
16908 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
16910 Check for size calculation overflow.
16911 (ct_colors_allocated_max): New constant.
16912 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
16915 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
16916 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
16917 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
16918 Use ptrdiff_t, not int, to count maps.
16919 (read_char_minibuf_menu_prompt): Check for overflow in size
16920 calculations. Don't update size until allocation succeeds.
16921 Redo calculations to avoid overflow.
16922 * keyboard.h: Change prototypes to match the above.
16924 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
16926 (current_minor_maps): Check for size calculation overflow.
16927 * keymap.h: Change prototypes to match the above.
16929 * lread.c (read1, init_obarray): Don't update size until alloc done.
16931 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
16932 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
16934 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
16935 Now ptrdiff_t, not int.
16936 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
16937 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
16939 * process.c (Fnetwork_interface_list): Check for overflow
16940 in size calculation.
16942 * region-cache.c (move_cache_gap): Check for size calculation overflow.
16944 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
16945 overflow. Don't bother calling xmalloc when xrealloc will do.
16947 * search.c (Freplace_match): Check for size calculation overflow.
16948 (Fset_match_data): Don't assume list lengths fit in 'int'.
16950 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
16951 for command line length. Do not attempt to address one before the
16952 beginning of an array, as that's not portable.
16954 * term.c (max_frame_lines): Remove; unused.
16955 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
16957 (encode_terminal_code, calculate_costs): Check for size
16958 calculation overflow.
16959 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
16960 table lengths and related sizes. Don't update size until alloc
16961 done. Redo calculations to avoid overflow.
16962 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
16964 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
16965 subtracting pointers.
16966 (gobble_line): Check for overflow more carefully. Don't update size
16969 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
16970 Don't update size until alloc done.
16971 Redo size calculations to avoid overflow.
16972 Check for size calculation overflow.
16973 (main) [DEBUG]: Fix typo in invoking tparam1.
16975 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
16976 Use ptrdiff_t, not int, for sizes.
16977 (store_mode_line_noprop_char): Don't update size until alloc done.
16979 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
16980 Use ptrdiff_t, not int, for sizes.
16981 (Finternal_make_lisp_face, cache_face):
16982 Check for size calculation overflow.
16983 (cache_face): Treat size calculation overflows as if they were
16984 memory exhaustion (the usual treatment), rather than aborting.
16986 * xfns.c (x_encode_text, x_set_name_internal)
16987 (Fx_change_window_property): Use ptrdiff_t, not int, to count
16988 sizes, since they can exceed INT_MAX in size. Check for size
16989 calculation overflow.
16991 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
16992 (xg_select): Check for size calculation overflow.
16993 Don't update size until alloc done.
16995 * xrdb.c (get_environ_db): Don't assume path length fits in int,
16996 as sprintf is limited to int lengths.
16998 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
16999 (X_LONG_MIN): New macros.
17000 Use them to make the following changes clearer.
17001 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
17002 This change doesn't affect the value now, but it may help remind
17003 future maintainers not to raise the value too much later.
17004 (SELECTION_QUANTUM): Remove, replacing with ...
17005 (selection_quantum): ... new function, which avoids overflow.
17007 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
17008 assumption that selection length fits in 'int'.
17009 (x_reply_selection_request, x_handle_selection_request)
17010 (x_get_window_property, receive_incremental_selection)
17011 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
17012 (lisp_data_to_selection_data, clean_local_selection_data):
17013 Use ptrdiff_t, not int, to record length of selection.
17014 (x_reply_selection_request, x_get_window_property)
17015 (receive_incremental_selection, x_property_data_to_lisp):
17016 Redo calculations to avoid overflow.
17017 (x_reply_selection_request): When sending hint, ceiling it at
17018 X_LONG_MAX rather than relying on wraparound overflow to send
17020 (x_get_window_property, receive_incremental_selection)
17021 (lisp_data_to_selection_data, x_property_data_to_lisp):
17022 Check for size-calculation overflow.
17023 (x_get_window_property, receive_incremental_selection)
17024 (lisp_data_to_selection_data, Fx_register_dnd_atom):
17025 Don't store size until memory allocation succeeds.
17026 (x_get_window_property): Plug memory leak on memory exhaustion.
17027 Don't double-block input; malloc is safe here. Don't assume 2**34
17028 - 4 fits in unsigned long. Add an xassert to check
17029 XGetWindowProperty overflow. Be more careful about overflow
17030 calculations, and distinguish size from memory overflow better.
17031 (receive_incremental_selection): When tracing, don't assume
17032 unsigned int is less than INT_MAX.
17033 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
17034 harmful) conversions of unsigned short to int.
17035 (lisp_data_to_selection_data): Don't assume that integers
17036 in the range -65535 through -1 fit in an X unsigned short.
17037 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
17038 result parameters unless successful. Rely on cons_to_unsigned
17039 to report problems with elements; the old code wasn't right anyway.
17040 (x_check_property_data): Check for int overflow; we cannot use
17041 a wider type due to X limits.
17042 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
17044 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
17046 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
17047 (x_term_init): Check for size calculation overflow.
17048 (x_color_cells): Don't store size until memory allocation succeeds.
17049 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
17050 Don't assume alloca size is less than MAX_ALLOCA.
17051 (x_term_init): Don't assume length fits in int (sprintf is limited
17054 Use ptrdiff_t for composition IDs.
17055 * character.c (lisp_string_width):
17056 * composite.c (composition_table_size, n_compositions)
17057 (get_composition_id, composition_gstring_from_id):
17058 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
17059 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
17060 * window.c (Frecenter):
17061 Use ptrdiff_t, not int, for composition IDs.
17062 * composite.c (get_composition_id): Check for integer overflow.
17063 * composite.h: Adjust prototypes to match the above changes.
17065 Use ptrdiff_t for hash table indexes.
17066 * category.c (hash_get_category_set):
17067 * ccl.c (ccl_driver):
17068 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
17069 * coding.c (coding_system_charset_list, detect_coding_system):
17070 * coding.h (struct coding_system.id):
17071 * composite.c (get_composition_id, gstring_lookup_cache):
17072 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
17073 * image.c (xpm_get_color_table_h):
17074 * lisp.h (hash_lookup, hash_put):
17075 * minibuf.c (Ftest_completion):
17076 Use ptrdiff_t for hash table indexes, not int (which is too
17077 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
17078 32-bit --with-wide-int hosts).
17080 * charset.c (Fdefine_charset_internal): Check for integer overflow.
17081 Add a FIXME comment about memory leaks.
17082 (syms_of_charset): Don't assume xmalloc returns.
17084 Don't assume that stated character widths fit in int.
17085 * character.c (Fchar_width, c_string_width, lisp_string_width):
17086 * character.h (CHAR_WIDTH):
17087 * indent.c (MULTIBYTE_BYTES_WIDTH):
17088 Use sanitize_char_width to avoid undefined and/or bad behavior
17089 with outlandish widths.
17090 * character.h (sanitize_tab_width): Rename from sanitize_width,
17091 now that we have two such functions. All uses changed.
17092 (sanitize_char_width): New inline function.
17094 Don't assume that tab-width fits in int.
17095 * character.h (sanitize_width): New inline function.
17096 (SANE_TAB_WIDTH): New macro.
17097 (ASCII_CHAR_WIDTH): Use it.
17098 * indent.c (sane_tab_width): Remove. All uses replaced by
17099 SANE_TAB_WIDTH (current_buffer).
17100 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
17102 * fileio.c: Integer overflow issues with file modes.
17103 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
17105 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
17106 Remove unreachable code.
17107 (read_hex, load_charset_map_from_file): Check for integer overflow.
17109 * xterm.c: Don't go over XClientMessageEvent limit.
17110 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
17111 (x_send_scroll_bar_event): Likewise. Check that the size does not
17112 exceed limits imposed by XClientMessageEvent, as well as the usual
17113 ptrdiff_t and size_t limits.
17115 * keyboard.c: Overflow, signedness and related fixes.
17116 (make_lispy_movement): Use same integer type in forward decl
17117 that is used in the definition.
17118 (read_key_sequence, keyremap_step):
17119 Change bufsize argument back to int, undoing my 2011-03-30 change.
17120 We prefer signed types, and int is wide enough here.
17121 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
17122 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
17123 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
17124 length, not size_t. Use ptrdiff_t for index, not int.
17125 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
17126 possibility of integer overflow.
17128 Overflow, signedness and related fixes for images.
17130 * dispextern.h (struct it.stack[0].u.image.image_id)
17131 (struct_it.image_id, struct image.id, struct image_cache.size)
17132 (struct image_cache.used, struct image_cache.ref_count):
17133 * gtkutil.c (update_frame_tool_bar):
17134 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
17135 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
17136 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
17137 * nsmenu.m (update_frame_tool_bar):
17138 * xdisp.c (calc_pixel_width_or_height):
17139 * xfns.c (image_cache_refcount):
17140 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
17141 on typical 64-bit hosts.
17143 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
17144 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
17145 Omit unnecessary casts to int.
17146 (parse_image_spec): Check that integers fall into 'int' range
17147 when the callers expect that.
17148 (image_ascent): Redo ascent calculation to avoid int overflow.
17149 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
17150 (lookup_image): Remove unnecessary tests.
17151 (xbm_image_p): Locals are now of int, not EMACS_INT,
17152 since parse_image_check makes sure they fit into int.
17153 (png_load, gif_load, svg_load_image):
17154 Prefer int to unsigned where either will do.
17155 (tiff_handler): New function, combining the cores of the
17156 old tiff_error_handler and tiff_warning_handler.
17157 This function is rewritten to use vsnprintf and thereby avoid
17158 stack buffer overflows. It uses only the features of vsnprintf
17159 that are common to both POSIX and native Microsoft.
17160 (tiff_error_handler, tiff_warning_handler): Use it.
17161 (tiff_load, gif_load, imagemagick_load_image):
17162 Don't assume :index value fits in 'int'.
17163 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
17164 (imagemagick_load_image): Check that crop parameters fit into
17165 the integer types that MagickCropImage accepts. Don't assume
17166 Vimagemagick_render_type has a nonnegative value. Don't assume
17167 size_t fits in 'long'.
17168 (gs_load): Use printmax_t to print the widest integers possible.
17169 Check for integer overflow when computing image height and width.
17171 2011-08-26 Eli Zaretskii <eliz@gnu.org>
17173 * xdisp.c (redisplay_window): Don't force window start if point
17174 will be invisible in the resulting window. (Bug#9324)
17176 2011-08-25 Eli Zaretskii <eliz@gnu.org>
17178 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
17179 the display spec is of the form `(space ...)'.
17180 (handle_display_spec): Return the value returned by
17181 handle_single_display_spec, not just 1 or zero.
17182 (handle_single_display_spec): If the display spec is of the form
17183 `(space ...)', and specifies display in the text area, return 2
17185 (try_cursor_movement): Check for the need to scroll more
17186 accurately, and prefer exact match for point under bidi.
17187 Don't advance `row' beyond the last row of the window.
17189 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
17190 into disp_prop; all users changed.
17192 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
17193 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
17194 for the text covered by the display property.
17196 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
17198 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
17199 Change return value to nil.
17200 (Frecord_buffer): Delete unused function.
17202 2011-08-24 Eli Zaretskii <eliz@gnu.org>
17204 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
17205 buffers, return left-to-right.
17206 (set_cursor_from_row): Consider candidate row a win if its glyph
17207 represents a newline and point is on that newline. Fixes cursor
17208 positioning on the newline at EOL of R2L text within L2R
17209 paragraph, and vice versa.
17210 (try_cursor_movement): Check continued rows, in addition to
17211 continuation rows. Fixes unwarranted scroll when point enters a
17212 continued line of R2L text within an L2R paragraph, or vice versa.
17213 (cursor_row_p): Consider the case of point being equal to
17214 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
17215 from the end of a short line to the beginning of a continued line
17216 of R2L text within L2R paragraph.
17217 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
17218 composed characters.
17220 * bidi.c (bidi_check_type): Use xassert.
17221 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
17224 2011-08-23 Eli Zaretskii <eliz@gnu.org>
17226 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
17229 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
17231 * nsfont.m (ns_otf_to_script): Fix typo.
17233 2011-08-22 Kenichi Handa <handa@m17n.org>
17235 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
17236 extra slot even if the purpose is char-code-property-table.
17238 2011-08-23 Eli Zaretskii <eliz@gnu.org>
17240 * xdisp.c (redisplay_window): When computing centering_position,
17241 account for the height of the header line. (Bug#8874)
17243 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
17244 instead of CHAR_TO_BYTE. Fixes a crash when a completion
17245 candidate is selected by the mouse, and that candidate has a
17246 composed character under the mouse.
17248 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
17249 coordinates reported by pos-visible-in-window-p for a composed
17250 character in column zero.
17252 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
17254 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
17256 2011-08-22 Eli Zaretskii <eliz@gnu.org>
17258 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
17259 consider it a hit if to_charpos is anywhere in the range of the
17260 composed buffer positions.
17262 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
17264 * image.c (gif_load): Don't assume that each subimage has the same
17265 dimensions as the base image. Handle disposal method that is
17266 "undefined" by the gif spec (Bug#9335).
17268 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
17270 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
17271 (Fcondition_case): Document `debug' symbol in error handler.
17273 2011-08-19 Eli Zaretskii <eliz@gnu.org>
17275 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
17276 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
17277 from an Org mode buffer to a Speedbar frame.
17279 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
17280 a composition, take its buffer position from IT->cmp_it.charpos.
17281 Fixes cursor positioning at the beginning of a line that begins
17282 with a composed character.
17284 2011-08-18 Eli Zaretskii <eliz@gnu.org>
17286 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
17287 character bidirectional type, use STRONG_L instead. Fixes crashes
17288 in a buffer produced by `describe-categories'.
17290 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
17291 members before the level stack, so they would be saved and
17292 restored when copying iterator state. Fixes incorrect reordering
17293 around TABs covered by display properties.
17295 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
17297 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
17299 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
17301 * eval.c (internal_condition_case, internal_condition_case_1)
17302 (internal_condition_case_2, internal_condition_case_n):
17303 Remove unnecessary aborts (Bug#9081).
17305 2011-08-17 Eli Zaretskii <eliz@gnu.org>
17307 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
17308 has no `load' handler, try opening the file locally. (Bug#9311)
17310 2011-08-16 Ken Brown <kbrown@cornell.edu>
17312 * gmalloc.c: Expand comment.
17314 2011-08-16 Eli Zaretskii <eliz@gnu.org>
17316 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
17317 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
17319 2011-08-16 Ken Brown <kbrown@cornell.edu>
17321 Fix memory allocation problems in Cygwin build (Bug#9273).
17323 * unexcw.c ( __malloc_initialized): Declare external variable.
17324 (fixup_executable): Force the dumped emacs to reinitialize malloc.
17326 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
17328 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
17330 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
17331 in the static heap.
17332 [CYGWIN] (special_realloc): New function.
17333 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
17334 requests to realloc storage in the static heap.
17336 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
17338 * bidi.c (bidi_initialize): Remove unused local.
17340 2011-08-15 Eli Zaretskii <eliz@gnu.org>
17343 * biditype.h: Remove file.
17344 * makefile.w32-in ($(BLD)/bidi.$(O)):
17345 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
17347 * dispextern.h: Fix a typo in the comment to bidi_type_t.
17349 * chartab.c: Improve commentary for the uniprop_table API.
17351 * bidi.c (bidi_paragraph_init): Support zero value of
17352 bidi_ignore_explicit_marks_for_paragraph_level.
17353 (bidi_initialize): Use uniprop_table instead of including
17354 biditype.h and bidimirror.h.
17356 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
17357 coordinates of the iterator when restoring from ppos_it.
17360 2011-08-14 Kenichi Handa <handa@m17n.org>
17362 * process.c (create_process): Call setup_process_coding_systems
17363 after the pid of the process is set to -1 (Bug#8162).
17365 2011-08-14 Eli Zaretskii <eliz@gnu.org>
17367 * xdisp.c (move_it_in_display_line_to): Don't invoke
17368 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
17369 ppos_it. Fixes vertical cursor motion when line beginning is
17370 covered by an image. (Bug#9296)
17372 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
17374 * nsterm.h (ns_run_ascript): Declare.
17375 (NSAPP_DATA2_RUNASSCRIPT): Define.
17377 * nsfns.m (as_script, as_result, as_status): New static variables.
17378 (ns_run_ascript): New function.
17379 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
17380 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
17381 the event loop. Get status from as_status (Bug#7276).
17383 * nsterm.m (sendEvent): If event is NSApplicationDefined and
17384 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
17385 the event loop (Bug#7276).
17387 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
17389 * gnutls.c (QCgnutls_bootprop_priority)
17390 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
17391 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
17392 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
17393 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
17394 (QCgnutls_bootprop_verify_hostname_error)
17395 (QCgnutls_bootprop_callbacks_verify): Rename from
17396 Qgnutls_bootprop_..., all uses changed.
17398 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
17401 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
17403 * xfaces.c (Qframe_set_background_mode): Now static.
17404 * dispextern.h (Qframe_set_background_mode): Remove decl.
17406 * process.c (Fnetwork_interface_info): Declare local only if needed.
17408 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
17410 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
17411 (Fnetwork_interface_list): Allocate in increments of bytes instead
17412 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
17413 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
17415 (struct ifflag_def): notrailers is smart on OSX.
17416 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
17417 Get hardware address with getifaddrs if available.
17419 2011-08-12 Eli Zaretskii <eliz@gnu.org>
17421 * xdisp.c (iterate_out_of_display_property): xassert that
17422 IT->position is set to within IT->object's boundaries. Break from
17423 the loop as soon as EOB is reached; avoids infloops in redisplay
17424 when IT->position is set up wrongly due to some bug.
17425 Set IT->current to match the bidi iterator unconditionally.
17426 (push_display_prop): Allow GET_FROM_STRING as IT->method on
17427 entry. Force push_it to save on the stack the current
17428 buffer/string position, to be restored by pop_it. Fix flags in
17429 the iterator structure wrt the object coming from a display
17430 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
17431 properties. (Bug#9284)
17433 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
17435 * fontset.c (fontset_get_font_group): Add proper type checks.
17438 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17440 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
17441 and LC_VERSION_MIN_MACOSX.
17442 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
17443 (dump_it) [LC_FUNCTION_STARTS]: Use it.
17445 2011-08-08 Eli Zaretskii <eliz@gnu.org>
17447 * xdisp.c (forward_to_next_line_start): Allow to use the
17448 no-display-properties-and-no-overlays under bidi display.
17449 Set disp_pos in the bidi iterator to avoid searches for display
17450 properties and overlays.
17452 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
17454 * editfns.c (Fset_time_zone_rule): Document relationship with the
17457 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
17458 the font entity extracted from the cache (Bug#8109).
17460 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
17462 * composite.c (autocmp_chars): Don't reset point. That is done by
17463 restore_point_unwind (Bug#5984).
17465 2011-08-07 Juri Linkov <juri@jurta.org>
17467 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
17468 to show the arg `TIME' instead of `TIMEVAL'.
17470 2011-08-06 Eli Zaretskii <eliz@gnu.org>
17472 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
17473 display property strides EOL and includes a newline, as in
17474 longlines-mode. (Bug#9254)
17475 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
17476 word-wrap under bidirectional display. (Bug#9224)
17478 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
17479 is non-zero, even if the data buffer is NULL. Fixes a crash in
17480 vertical-motion with longlines-mode. (Bug#9254)
17482 2011-08-05 Eli Zaretskii <eliz@gnu.org>
17484 * bidi.c <bidi_cache_total_alloc>: Now static.
17485 (bidi_initialize): Initialize bidi_cache_total_alloc.
17487 * xdisp.c (display_line): Release buffer allocated for shelved bidi
17490 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
17491 amount allocated this far in `bidi_cache_total_alloc'.
17492 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
17493 non-zero, only free the data buffer without restoring the cache
17494 contents. All callers changed.
17496 * dispextern.h (bidi_unshelve_cache): Update prototype.
17498 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
17499 (move_it_in_display_line, move_it_to)
17500 (move_it_vertically_backward, move_it_by_lines): Replace the call
17501 to xfree to an equivalent call to bidi_unshelve_cache.
17502 (move_it_in_display_line_to): Fix logic of returning
17503 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
17505 2011-08-05 Eli Zaretskii <eliz@gnu.org>
17507 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
17508 came from a string character with a `cursor' property. (Bug#9229)
17510 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
17512 * Makefile.in (LIB_PTHREAD): New variable.
17513 (LIBES): Add LIB_PTHREAD (Bug#9216).
17515 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
17516 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
17518 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
17520 * regex.c (re_iswctype): Remove some redundant boolean conversions.
17522 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
17524 * xterm.c (x_find_topmost_parent): New function.
17525 (x_set_frame_alpha): Find topmost parent window with
17526 x_find_topmost_parent and set the property there also (bug#9181).
17527 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
17529 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
17531 * callproc.c (Fcall_process): Avoid vfork clobbering
17532 the local vars buffer, coding_systems, current_dir.
17534 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
17536 * keymap.c (Fmake_composed_keymap): Move to subr.el.
17538 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
17540 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
17541 so that it is not optimized away.
17543 * xdisp.c (compute_display_string_pos): Remove unused local.
17545 2011-08-02 Eli Zaretskii <eliz@gnu.org>
17547 Fix slow cursor motion and scrolling in large buffers with
17548 selective display, like Org Mode buffers. (Bug#9218)
17550 * dispextern.h (struct bidi_it): New member disp_prop_p.
17552 * xdisp.c: Remove one-slot cache of display string positions.
17553 (compute_display_string_pos): Accept an additional argument
17554 DISP_PROP_P; callers changed. Scan at most 5K characters forward
17555 for a display string or property. If found, set DISP_PROP_P
17558 * bidi.c (bidi_fetch_char): Accept an additional argument
17559 DISP_PROP_P, and pass it to compute_display_string_pos.
17560 Only handle text covered by a display string if DISP_PROP_P is returned
17561 non-zero. All callers of bidi_fetch_char changed.
17563 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
17565 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
17567 2010-12-03 Don March <don@ohspite.net>
17569 * keymap.c (Fdefine_key): Fix non-prefix key error message when
17570 last character M-[char] is translated to ESC [char] (bug#7541).
17572 2011-08-02 Kenichi Handa <handa@m17n.org>
17574 * lisp.h (uniprop_table): Extern it.
17576 * chartab.c (uniprop_table): Make it non-static.
17578 2011-08-01 Eli Zaretskii <eliz@gnu.org>
17580 * xdisp.c (forward_to_next_line_start): Accept additional argument
17581 BIDI_IT_PREV, and store into it the state of the bidi iterator had
17583 (reseat_at_next_visible_line_start): Use the bidi iterator state
17584 returned by forward_to_next_line_start to restore the state of
17585 it->bidi_it after backing up to previous newline. (Bug#9212)
17587 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
17589 * regex.c (re_comp): Protoize.
17590 (re_exec): Fix return type.
17591 (regexec): Fix type of `ret'. (Bug#9203)
17593 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17595 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
17596 This is needed if max-image-size is a floating-point number.
17598 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
17600 * print.c (print_object): Print empty symbol as ##.
17602 * lread.c (read1): Read ## as empty symbol.
17604 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
17606 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
17607 setting frame foreground color (Bug#9175).
17608 (x_set_background_color): Likewise.
17610 * nsmenu.m (-setText): Size tooltip dimensions precisely to
17611 contents (Bug#9176).
17612 (EmacsTooltip -init): Remove bezels and add shadows to
17615 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
17616 or scroll bar (Bug#8470).
17618 * nsfont.m (nsfont_open): Remove assignment to voffset and
17619 unnecessary vars hshink, expand, hd, full_height, min_height.
17620 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
17622 * nsterm.h (nsfont_info): Remove voffset field.
17624 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
17626 Implement strike-through and overline on NextStep (Bug#8863).
17628 * nsfont.m (nsfont_open): Use underline position provided by font,
17629 instead of hard-coded value of 2.
17630 (nsfont_draw): Call ns_draw_text_decoration instead.
17632 * nsterm.h: Add declaration for ns_draw_text_decoration.
17634 * nsterm.m (ns_draw_text_decoration): New function for drawing
17635 underline, overline, and strike-through.
17636 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
17637 ns_draw_text_decoration. Change treatment of cursor drawing to
17638 accommodate underlining, etc.
17640 2011-07-28 Eli Zaretskii <eliz@gnu.org>
17642 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
17645 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17647 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
17648 Without this fix, if a signal arrives just after memory fills up,
17649 'malloc' might be invoked reentrantly.
17651 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
17652 In other words, assume that every image size is allowed, on non-X
17653 hosts. This assumption is probably wrong, but it lets Emacs compile.
17655 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
17657 * regex.c (re_iswctype): Convert return values to boolean.
17659 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
17661 * xdisp.c (compute_display_string_pos): Don't use cached display
17662 string position if the buffer had its restriction changed.
17665 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17667 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
17669 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
17671 Integer signedness and overflow and related fixes. (Bug#9079)
17673 * bidi.c: Integer size and overflow fixes.
17674 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
17675 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
17676 (bidi_cache_find_level_change, bidi_cache_ensure_space)
17677 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
17678 (bidi_find_other_level_edge):
17679 Use ptrdiff_t instead of EMACS_INT where either will do.
17680 This works better on 32-bit hosts configured --with-wide-int.
17681 (bidi_cache_ensure_space): Check for size-calculation overflow.
17682 Use % rather than repeated addition, for better worst-case speed.
17683 Don't set bidi_cache_size until after xrealloc returns, because it
17685 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
17686 (bidi_cache_ensure_space): Also check that the bidi cache size
17687 does not exceed that of the largest Lisp string or buffer. See Eli
17688 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
17690 * alloc.c (__malloc_size_t): Remove.
17691 All uses replaced by size_t. See Andreas Schwab's note
17692 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
17694 * image.c: Improve checking for integer overflow.
17695 (check_image_size): Assume that f is nonnull, since
17696 it is always nonnull in practice. This is one less thing to
17697 worry about when checking for integer overflow later.
17698 (x_check_image_size): New function, which checks for integer
17699 overflow issues inside X.
17700 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
17701 This removes the need for a memory_full check.
17702 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
17703 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
17704 (xbm_read_bitmap_data): Change locals back to 'int', since
17705 their values must fit in 'int'.
17706 (xpm_load_image, png_load, tiff_load):
17707 Invoke x_create_x_image_and_pixmap earlier,
17708 to avoid much needless work if the image is too large.
17709 (tiff_load): Treat overly large images as if
17710 x_create_x_image_and_pixmap failed, not as malloc failures.
17711 (gs_load): Use x_check_image_size.
17713 * gtkutil.c: Omit integer casts.
17714 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
17715 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
17717 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
17719 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
17720 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
17721 would wrongly return t on a 64-bit host.
17723 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
17724 The plain *_OVERFLOW macros run afoul of GCC bug 49705
17725 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
17726 and therefore cause GCC to emit a bogus diagnostic in some cases.
17728 * image.c: Integer signedness and overflow and related fixes.
17729 This is not an exhaustive set of fixes, but it's time to
17730 record what I've got.
17731 (lookup_pixel_color, check_image_size): Remove redundant decls.
17732 (check_image_size): Don't assume that arbitrary EMACS_INT values
17733 fit in 'int', or that arbitrary 'double' values fit in 'int'.
17734 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
17735 (tiff_load, imagemagick_load_image):
17736 Check for overflow in size calculations.
17737 (x_create_x_image_and_pixmap): Remove unnecessary test for
17738 xmalloc returning NULL; that can't happen.
17739 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
17740 (xpm_color_bucket): Use better integer hashing function.
17741 (xpm_cache_color): Don't possibly over-allocate memory.
17742 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
17743 (gif_memory_source):
17744 Use ptrdiff_t, not int or size_t, to record sizes.
17745 (png_load): Don't assume values greater than 2**31 fit in 'int'.
17746 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
17747 either works, as we prefer signed integers.
17748 (tiff_read_from_memory, tiff_write_from_memory):
17749 Return tsize_t, not size_t, since that's what the TIFF API wants.
17750 (tiff_read_from_memory): Don't fail simply because the read would
17751 go past EOF; instead, return a short read.
17752 (tiff_load): Omit no-longer-needed casts.
17753 (Fimagemagick_types): Don't assume size fits into 'int'.
17755 Improve hashing quality when configured --with-wide-int.
17756 * fns.c (hash_string): New function, taken from sxhash_string.
17757 Do not discard information about ASCII character case; this
17758 discarding is no longer needed.
17759 (sxhash-string): Use it. Change sig to match it. Caller changed.
17760 * lisp.h: Declare it.
17761 * lread.c (hash_string): Remove, since we now use fns.c's version.
17762 The fns.c version returns a wider integer if --with-wide-int is
17763 specified, so this should help the quality of the hashing a bit.
17765 * emacs.c: Integer overflow minor fix.
17766 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
17767 Define only if GNU_LINUX.
17768 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
17770 * dispnew.c: Integer signedness and overflow fixes.
17771 Remove unnecessary forward decls, that were a maintenance hassle.
17772 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
17774 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
17775 (scrolling_window): Use ptrdiff_t, not int, for byte count.
17776 (prepare_desired_row, line_draw_cost):
17777 Use int, not unsigned, where either works.
17778 (save_current_matrix, restore_current_matrix):
17779 Use ptrdiff_t, not size_t, where either works.
17780 (init_display): Check for overflow more accurately, and without
17781 relying on undefined behavior.
17783 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
17784 Remove, replacing with the new symbols in lisp.h. All uses changed.
17785 * fileio.c (make_temp_name):
17786 * filelock.c (lock_file_1, lock_file):
17787 * xdisp.c (message_dolog):
17788 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
17789 Use pMd etc. instead.
17790 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
17791 replacing the pWIDE etc. symbols removed from editfns.c.
17793 * keyboard.h (num_input_events): Now uintmax_t.
17794 This is (very slightly) less likely to mess up due to wraparound.
17797 * buffer.c: Integer signedness fixes.
17798 (alloc_buffer_text, enlarge_buffer_text):
17799 Use ptrdiff_t rather than size_t when either will do, as we prefer
17802 * alloc.c: Integer signedness and overflow fixes.
17803 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
17804 (__malloc_size_t): Default to size_t, not to int.
17805 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
17806 (Fgarbage_collect, mark_object_loop_halt, mark_object):
17807 Prefer ptrdiff_t to size_t when either would do, as we prefer
17809 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
17810 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
17811 Now const. Initialize with values that are in range even if char
17813 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
17814 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
17815 These functions do the right thing with sizes > 2**32.
17816 (check_depth): Now ptrdiff_t, not int.
17817 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
17818 Adjust to new way of storing sizes. Check for size overflow bugs
17820 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
17821 slightly wrong anyway, as it missed one instance of
17822 XMALLOC_OVERRUN_CHECK_OVERHEAD.
17823 (refill_memory_reserve): Omit needless cast to size_t.
17824 (mark_object_loop_halt): Mark as externally visible.
17826 * xselect.c: Integer signedness and overflow fixes.
17827 (Fx_register_dnd_atom, x_handle_dnd_message):
17828 Use ptrdiff_t, not size_t, since we prefer signed.
17829 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
17830 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
17831 x_dnd_atoms_size and x_dnd_atoms_length.
17833 * doprnt.c: Prefer signed to unsigned when either works.
17835 * doprnt.c (doprnt):
17837 * xdisp.c (vmessage):
17838 Use ptrdiff_t, not size_t, when using or implementing doprnt,
17839 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
17840 prefer signed arithmetic to avoid comparison confusion.
17841 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
17842 but is a bit tricky.
17844 Assume freestanding C89 headers, string.h, stdlib.h.
17845 * data.c, doprnt.c, floatfns.c, print.c:
17846 Include float.h unconditionally.
17847 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
17848 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
17849 * regex.c: Likewise for stddef.h, string.h.
17850 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
17851 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
17852 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
17853 (STDC_HEADERS): Remove obsolete defines.
17854 * sysdep.c: Include limits.h unconditionally.
17856 Assume support for memcmp, memcpy, memmove, memset.
17857 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
17858 * regex.c (memcmp, memcpy):
17859 Remove; we assume C89 now.
17861 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
17862 (__malloc_safe_bcopy): Remove; no longer needed.
17864 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
17865 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
17866 well either way, and we prefer signed to unsigned.
17868 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
17870 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
17871 closes the connection while we're reading (bug#9182).
17873 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
17875 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
17876 are specified (Bug#9168).
17878 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
17880 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
17881 Found by GCC static checking and --with-wide-int on a 32-bit host.
17883 2011-07-25 Eli Zaretskii <eliz@gnu.org>
17885 * xdisp.c (compute_display_string_pos): Fix logic of caching
17886 previous display string position. Initialize cached_prev_pos to
17887 -1. Fixes slow-down at the beginning of a buffer.
17889 2011-07-24 Eli Zaretskii <eliz@gnu.org>
17891 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
17892 for attrs[LFACE_FONTSET_INDEX].
17894 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
17896 * xml.c (parse_region): Remove unused local
17897 that was recently introduced.
17899 2011-07-23 Eli Zaretskii <eliz@gnu.org>
17901 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
17902 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
17904 * xdisp.c (move_it_in_display_line_to): Record the best matching
17905 position for TO_CHARPOS while scanning the line, and restore it on
17906 exit if none of the characters scanned was an exact match.
17907 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
17908 when exact match is impossible due to invisible text, and the
17909 lines are truncated.
17911 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
17913 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
17916 2011-07-22 Eli Zaretskii <eliz@gnu.org>
17918 Fix a significant slow-down of cursor motion with C-n, C-p,
17919 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
17920 auto-repeat under bidi redisplay in fontified buffers.
17921 * xdisp.c (compute_stop_pos_backwards): New function.
17922 (next_element_from_buffer): Call compute_stop_pos_backwards to
17923 find a suitable prev_stop when we find ourselves before
17925 (reseat): Don't look for prev_stop, as that could mean a very long
17927 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
17928 <cached_disp_overlay_modiff>: Cache for last found display string
17930 (compute_display_string_pos): Return the cached position if asked
17931 about the same buffer in the same area of character positions, and
17932 the buffer wasn't changed since the time the display string
17933 position was cached.
17935 2011-07-22 Eli Zaretskii <eliz@gnu.org>
17937 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
17938 is an integer, which is important for empty lines. (Bug#9149)
17940 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
17942 * frame.c (Fmodify_frame_parameters): In tty case, update the
17943 default face if necessary (Bug#4238).
17945 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
17947 * editfns.c (Fstring_to_char): No need to explain what a character
17948 is in the docstring (Bug#6576).
17950 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
17952 * xml.c (parse_region): Make sure we always return a tree.
17954 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
17956 * xml.c (parse_region): If a document contains only comments,
17959 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
17961 * xml.c (make_dom): Return comments, too.
17963 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
17966 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
17967 and the surrounding thread.
17968 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
17969 rather than fgets, and retry after EINTR. Otherwise, 'emacs
17970 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
17972 * s/openbsd.h (BROKEN_SIGIO): Define.
17973 * unexelf.c (unexec) [__OpenBSD__]:
17974 Don't update the .mdebug section of the Alpha COFF symbol table.
17976 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
17978 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
17981 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
17983 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
17984 This fixes some race conditions on the permissions of any newly
17987 * alloc.c (valid_pointer_p): Use pipe, not open.
17988 This fixes some permissions issues when debugging.
17990 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
17991 If fchown fails to set both uid and gid, try to set just gid,
17992 as that is sometimes allowed. Adjust the file's mode to eliminate
17993 setuid or setgid bits that are inappropriate if fchown fails.
17995 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
17997 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
17998 to compare Lisp_Objects.
17999 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
18000 global_gnutls_log_level, don't mistake it for a Lisp_Object.
18001 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
18003 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
18005 * lread.c (read_integer): Unread even EOF character.
18006 (read1): Likewise. Properly record start position of symbol.
18008 * lread.c (read1): Read `#:' as empty uninterned symbol if no
18009 symbol character follows.
18011 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
18013 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
18014 This works around a problem with the previous change to Fcopy_file.
18015 Recent glibc declares fchown with __attribute__((warn_unused_result)),
18016 and without this change, GCC might complain about discarding
18017 fchown's return value.
18019 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
18021 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
18023 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
18025 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
18027 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
18029 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
18030 it's used from the C level.
18032 * process.c: Use the same condition for POLL_FOR_INPUT in both
18033 keyboard.c and process.c (bug#1858).
18035 2011-07-09 Lawrence Mitchell <wence@gmx.li>
18037 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
18038 (Fgnutls_boot): Use it.
18040 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
18042 * doc.c (Fsubstitute_command_keys): Revert last change.
18044 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
18046 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
18047 quotes the next character, and doesn't affect other longer
18048 sequences (bug#8935).
18050 * lread.c (syms_of_lread): Clarify that is isn't only
18051 `eval-buffer' and `eval-defun' that's affected by
18052 `lexical-binding' (bug#8460).
18054 2011-07-15 Eli Zaretskii <eliz@gnu.org>
18056 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
18057 bidi redisplay when a line includes both an image and is truncated.
18059 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
18061 Fix minor problems found by static checking.
18062 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
18063 (elsz): Now a signed constant, not a size_t var. We prefer signed
18064 types to unsigned, to avoid integer comparison confusion. Without
18065 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
18066 "cannot optimize loop, the loop counter may overflow", a symptom
18068 * indent.c (Fvertical_motion): Mark locals as initialized.
18069 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
18071 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
18073 * search.c (Fre_search_backward): Mention `case-fold-search' in
18074 all the re_search_* functions (bug#8138).
18076 * keyboard.c (Fopen_dribble_file): Document when the file is
18079 2011-07-14 Eli Zaretskii <eliz@gnu.org>
18081 * bidi.c (bidi_dump_cached_states): Fix format of displaying
18084 Support bidi reordering of display and overlay strings.
18085 * xdisp.c (compute_display_string_pos)
18086 (compute_display_string_end): Accept additional argument STRING.
18087 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
18088 (reseat_to_string): Initialize bidi_it->string.s and
18089 bidi_it->string.schars.
18090 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
18091 NULL (avoids a crash in bidi_paragraph_init).
18092 Initialize itb.string.lstring.
18093 (init_iterator): Call bidi_init_it only of a valid
18094 buffer position was specified. Initialize paragraph_embedding to
18096 (reseat_to_string): Initialize the bidi iterator.
18097 (display_string): If we need to ignore text properties of
18098 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
18099 original value of -1 will not work with bidi.)
18100 (compute_display_string_pos): First arg is now struct
18101 `text_pos *'; all callers changed. Support display properties on
18103 (compute_display_string_end): Support display properties on Lisp
18105 (init_iterator, reseat_1, reseat_to_string): Initialize the
18106 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
18107 when iterating on a string not from display properties).
18108 (compute_display_string_pos, compute_display_string_end):
18109 Fix calculation of the object to scan. Fixes an error when using
18111 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
18112 base_level_stop; instead, set base_level_stop to BEGV.
18113 Fixes crashes in vertical-motion.
18114 (next_element_from_buffer): Improve commentary for when
18115 the iterator is before prev_stop.
18116 (init_iterator): Initialize bidi_p from the default value of
18117 bidi-display-reordering, not from buffer-local value. Use the
18118 buffer-local value only if initializing for buffer iteration.
18119 (handle_invisible_prop): Support invisible properties on strings
18120 that are being bidi-reordered.
18121 (set_iterator_to_next): Support bidi reordering of C strings and
18123 (next_element_from_string): Support bidi reordering of Lisp
18125 (handle_stop_backwards): Support Lisp strings as well.
18126 (display_string): Support display of R2L glyph rows.
18127 Use IT_STRING_CHARPOS when displaying from a Lisp string.
18128 (init_iterator): Don't initialize it->bidi_p for strings
18130 (reseat_to_string): Initialize it->bidi_p for strings here.
18131 (next_element_from_string, next_element_from_c_string)
18132 (next_element_from_buffer): Add xassert's for correspondence
18133 between IT's object being iterated and it->bidi_it.string
18135 (face_before_or_after_it_pos): Support bidi iteration.
18136 (next_element_from_c_string): Handle the case of the first string
18137 character that is not the first one in the visual order.
18138 (get_visually_first_element): New function, refactored from common
18139 parts of next_element_from_buffer, next_element_from_string, and
18140 next_element_from_c_string.
18141 (tool_bar_lines_needed, redisplay_tool_bar)
18142 (display_menu_bar): Force left-to-right direction. Add a FIXME
18143 comment for making that be controlled by a user option.
18144 (push_it, pop_it): Save and restore the state of the
18145 bidi iterator. Save and restore the bidi_p flag.
18146 (pop_it): Iterate out of display property for string iteration as
18148 (iterate_out_of_display_property): Support iteration over strings.
18149 (handle_single_display_spec): Set up it->bidi_it for iteration
18150 over a display string, and call bidi_init_it.
18151 (handle_single_display_spec, next_overlay_string)
18152 (get_overlay_strings_1, push_display_prop): Set up the bidi
18153 iterator for displaying display or overlay strings.
18154 (forward_to_next_line_start): Don't use the shortcut if
18156 (back_to_previous_visible_line_start): If handle_display_prop
18157 pushed the iterator stack, restore the internal state of the bidi
18158 iterator by calling bidi_pop_it same number of times.
18159 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
18160 and we are bidi-iterating, don't decrement the iterator position;
18161 instead, set the first_elt flag in the bidi iterator, to produce
18163 (reseat_1): Remove redundant setting of string_from_display_prop_p.
18164 (push_display_prop): xassert that we are iterating a buffer.
18165 (push_it, pop_it): Save and restore paragraph_embedding member.
18166 (handle_single_display_spec, next_overlay_string)
18167 (get_overlay_strings_1, reseat_1, reseat_to_string)
18168 (push_display_prop): Set up the `unibyte' member of bidi_it.string
18169 correctly. Don't assume unibyte strings are not bidi-reordered.
18170 (compute_display_string_pos)
18171 (compute_display_string_end): Fix handling the case of C string.
18172 (push_it, pop_it): Save and restore from_disp_prop_p.
18173 (handle_single_display_spec, push_display_prop): Set the
18174 from_disp_prop_p flag.
18175 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
18176 (pop_it): Call iterate_out_of_display_property only if we are
18177 popping after iteration over a string that came from a display
18178 property. Fix a typo in popping stretch info. Add an assertion
18179 for verifying that the iterator position is in sync with the bidi
18181 (handle_single_display_spec, get_overlay_strings_1)
18182 (push_display_prop): Fix initialization of paragraph direction for
18183 string when that of the parent object is not yet determined.
18184 (reseat_1): Call bidi_init_it to resync the bidi
18185 iterator with IT's position. (Bug#7616)
18186 (find_row_edges): If ROW->start.pos gives position
18187 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
18188 (handle_stop, back_to_previous_visible_line_start, reseat_1):
18189 Reset the from_disp_prop_p flag.
18190 (SAVE_IT, RESTORE_IT): New macros.
18191 (pos_visible_p, face_before_or_after_it_pos)
18192 (back_to_previous_visible_line_start)
18193 (move_it_in_display_line_to, move_it_in_display_line)
18194 (move_it_to, move_it_vertically_backward, move_it_by_lines)
18195 (try_scrolling, redisplay_window, display_line): Use them when
18196 saving a temporary copy of the iterator and restoring it back.
18197 (back_to_previous_visible_line_start, reseat_1)
18198 (init_iterator): Empty the bidi cache "stack".
18199 (move_it_in_display_line_to): If iterator ended up at
18200 EOL, but we never saw any buffer positions smaller than
18201 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
18202 motion in bidi-reordered lines.
18203 (move_it_in_display_line_to): Record prev_method and prev_pos
18204 immediately before the call to set_iterator_to_next. Fixes cursor
18205 motion in bidi-reordered lines with stretch glyphs and strings
18206 displayed in margins. (Bug#8133) (Bug#8867)
18207 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
18209 (pos_visible_p): Support positions in bidi-reordered lines.
18210 Save and restore bidi cache.
18212 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
18213 (bidi_paragraph_info): Delete unused struct.
18214 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
18215 (bidi_cache_start): New variable.
18216 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
18218 (bidi_cache_fetch_state, bidi_cache_search)
18219 (bidi_cache_find_level_change, bidi_cache_iterator_state)
18220 (bidi_cache_find, bidi_peek_at_next_level)
18221 (bidi_level_of_next_char, bidi_find_other_level_edge)
18222 (bidi_move_to_visually_next): Compare cache index with
18223 bidi_cache_start rather than with zero.
18224 (bidi_fetch_char): Accept new argument STRING; all callers
18225 changed. Support iteration over a string. Support strings with
18226 display properties. Support unibyte strings. Fix the type of
18227 `len' according to what STRING_CHAR_AND_LENGTH expects.
18228 (bidi_paragraph_init, bidi_resolve_explicit_1)
18229 (bidi_resolve_explicit, bidi_resolve_weak)
18230 (bidi_level_of_next_char, bidi_move_to_visually_next):
18231 Support iteration over a string.
18232 (bidi_set_sor_type, bidi_resolve_explicit_1)
18233 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
18234 can now be zero (for strings); special values 0 and -1 were
18235 changed to -1 and -2, respectively.
18236 (bidi_char_at_pos): New function.
18237 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
18238 Call it instead of FETCH_MULTIBYTE_CHAR.
18239 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
18240 initialized to valid values.
18241 (bidi_init_it): Don't initialize charpos and bytepos with invalid
18243 (bidi_level_of_next_char): Allow the sentinel "position" to pass
18244 the test for valid cached positions. Fix the logic for looking up
18245 the sentinel state in the cache. GCPRO the Lisp string we are
18247 (bidi_push_it, bidi_pop_it): New functions.
18248 (bidi_initialize): Initialize the bidi cache start stack pointer.
18249 (bidi_cache_ensure_space): New function, refactored from part of
18250 bidi_cache_iterator_state. Don't assume the required size is just
18251 one BIDI_CACHE_CHUNK away.
18252 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
18253 (bidi_count_bytes, bidi_char_at_pos): New functions.
18254 (bidi_cache_search): Don't assume bidi_cache_last_idx is
18255 always valid if bidi_cache_idx is valid.
18256 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
18257 is valid if it's going to be used.
18258 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
18259 (bidi_cache_fetch_state, bidi_cache_search)
18260 (bidi_cache_find_level_change, bidi_cache_ensure_space)
18261 (bidi_cache_iterator_state, bidi_cache_find)
18262 (bidi_find_other_level_edge, bidi_cache_start_stack):
18263 All variables related to cache indices are now EMACS_INT.
18265 * dispextern.h (struct bidi_string_data): New structure.
18266 (struct bidi_it): New member `string'. Make flag members be 1-bit
18267 fields, and put them last in the struct.
18268 (compute_display_string_pos, compute_display_string_end):
18270 (bidi_push_it, bidi_pop_it): Add prototypes.
18271 (struct iterator_stack_entry): New members bidi_p,
18272 paragraph_embedding, and from_disp_prop_p.
18273 (struct it): Member bidi_p is now a bit field 1 bit wide.
18274 (bidi_shelve_cache, bidi_unshelve_cache):
18275 Declare prototypes.
18277 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
18278 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
18279 and vector-like objects.
18281 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
18282 cache around display iteration.
18284 * window.c (Fwindow_end, window_scroll_pixel_based)
18285 (displayed_window_lines, Frecenter): Save and restore the bidi
18286 cache around display iteration.
18288 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
18290 * editfns.c (Fdelete_region): Clarify the use of the named
18291 parameters (bug#6788).
18293 2011-07-14 Martin Rudalics <rudalics@gmx.at>
18295 * indent.c (Fvertical_motion): Set and restore w->pointm when
18296 saving and restoring the window's buffer (Bug#9006).
18298 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
18300 * editfns.c (Fstring_to_char): Clarify just what is returned
18301 (bug#6576). Text by Eli Zaretskii.
18303 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
18305 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
18307 2011-07-13 Eli Zaretskii <eliz@gnu.org>
18309 * buffer.c (mmap_find): Fix a typo.
18311 2011-07-13 Johan Bockgård <bojohan@gnu.org>
18313 Fix execution of x selection hooks.
18314 * xselect.c (Qx_lost_selection_functions)
18315 (Qx_sent_selection_functions): New vars.
18316 (syms_of_xselect): DEFSYM them.
18317 (x_handle_selection_request): Pass Qx_sent_selection_functions
18318 rather than Vx_sent_selection_functions to Frun_hook_with_args.
18319 (x_handle_selection_clear,x_clear_frame_selections):
18320 Pass Qx_lost_selection_functions rather than
18321 Vx_lost_selection_functions to Frun_hook_with_args.
18323 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
18325 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
18326 The old code sometimes used this field without initializing it.
18328 * alloc.c (gc_sweep): Don't read past end of array.
18329 In theory, the old code could also have corrupted Emacs internals,
18330 though it'd be very unlikely.
18332 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
18334 * character.c (Fcharacterp): Don't advertise optional ignored
18335 argument. (Bug#4026)
18337 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
18339 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
18342 * window.c (Fset_window_start): Doc fix (bug#4199).
18343 (Fset_window_hscroll): Ditto.
18345 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
18347 Fix minor new problems caught by GCC 4.6.1.
18348 * term.c (init_tty): Remove unused local.
18349 * xsettings.c (store_monospaced_changed): Define this function only
18350 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
18351 not used otherwise.
18353 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
18355 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
18357 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
18359 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
18360 are the mini-buffer and the echo area (bug#3320).
18362 * term.c (init_tty): Remove support for supdup, c10 and perq
18363 terminals, which are no longer supported (bug#1482).
18365 2011-07-10 Johan Bockgård <bojohan@gnu.org>
18367 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
18369 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
18371 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
18372 for non-popups (Bug#3642).
18374 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
18376 * alloc.c (reset_malloc_hooks): Protoize.
18377 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
18378 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
18379 * cm.c (losecursor): Likewise.
18380 * data.c (fmod): Likewise.
18381 * dispnew.c (swap_glyphs_in_rows): Likewise.
18382 * emacs.c (memory_warning_signal): Likewise.
18383 * floatfns.c (float_error): Likewise.
18384 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
18385 (otf_open, font_otf_capability, generate_otf_features)
18386 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
18388 * image.c (pbm_read_file): Likewise.
18389 * indent.c (string_display_width): Likewise.
18390 * intervals.c (check_for_interval, search_for_interval)
18391 (inc_interval_count, count_intervals, root_interval)
18392 (adjust_intervals_for_insertion, make_new_interval): Likewise.
18393 * lread.c (defalias): Likewise.
18394 * ralloc.c (r_alloc_check): Likewise.
18395 * regex.c (set_image_of_range_1, set_image_of_range)
18396 (regex_grow_registers): Likewise.
18397 * sysdep.c (strerror): Likewise.
18398 * termcap.c (valid_filename_p, tprint, main): Likewise.
18399 * tparam.c (main): Likewise.
18400 * unexhp9k800.c (run_time_remap, save_data_space)
18401 (update_file_ptrs, read_header, write_header, calculate_checksum)
18402 (copy_file, copy_rest, display_header): Likewise.
18403 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
18405 * xdisp.c (check_it): Likewise.
18406 * xfaces.c (register_color, unregister_color, unregister_colors):
18408 * xfns.c (print_fontset_result): Likewise.
18409 * xrdb.c (member, fatal, main): Likewise.
18411 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
18413 Fix minor problems found by static checking (Bug#9031).
18414 * chartab.c (char_table_set_range, map_sub_char_table):
18415 Remove unused locals.
18416 (uniprop_table): Now static.
18417 * composite.c (_work_char): Remove unused static var.
18419 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
18421 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
18423 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
18425 * gtkutil.c (qttip_cb): Remove code without function.
18427 2011-07-09 Eli Zaretskii <eliz@gnu.org>
18429 * w32.c (pthread_sigmask): New stub.
18431 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
18433 Use pthread_sigmask, not sigprocmask (Bug#9010).
18434 sigprocmask is portable only for single-threaded applications, and
18435 Emacs can be multi-threaded when it uses GTK.
18436 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
18438 * callproc.c (Fcall_process):
18439 * process.c (create_process):
18440 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
18441 Use pthread_sigmask, not sigprocmask.
18443 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18445 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
18446 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
18449 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18451 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
18452 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
18453 (xg_hide_tooltip): Fix comment.
18455 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
18456 in registerServicesMenuSendTypes.
18457 (validRequestorForSendType): Don't check ns_return_types.
18459 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
18462 2011-07-08 Jason Rumney <jasonr@gnu.org>
18464 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
18465 SH_SHOW for hidden windows (Bug#5482).
18467 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
18468 frame struct members of non-existent frames (Bug#6284).
18470 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
18472 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
18473 variable firstTime not needed on OSX >= 10.6.
18474 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
18475 >= 10.5. Use setKnobProportion, setDoubleValue.
18477 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
18478 (MAC_OS_X_VERSION_10_5): Define if not defined.
18479 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
18480 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
18481 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
18483 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
18484 cString and lossyCString on OSX >= 10.4.
18486 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
18487 sizeToFit on OSX >= 10.2.
18489 * nsimage.m (allocInitFromFile): Don't use deprecated method
18490 bestRepresentationForDevice on OSX >= 10.6.
18492 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
18495 * emacs.c: Declare unexec_init_emacs_zone.
18497 * nsgui.h: Fix compiler warning about gnulib redefining verify.
18499 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
18501 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
18502 on svcsMenu (Bug#8842).
18504 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
18506 (Fns_list_services): Just return Qnil on 10.6, code not working there.
18508 * nsterm.m (QUTF8_STRING): Declare.
18509 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
18510 (validRequestorForSendType): Return type is (id).
18511 Change indexOfObjectIdenticalTo to indexOfObject.
18512 Check if we have local selection before returning self (Bug#8842).
18513 (writeSelectionToPasteboard): Put local selection into paste board
18514 if we have a local selection (Bug#8842).
18515 (syms_of_nsterm): DEFSYM QUTF8_STRING.
18517 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
18518 (ns_get_local_selection): Declare.
18520 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
18522 * keymap.c (describe_map_tree): Don't insert a double newline at
18523 the end of the buffer (bug#1169) and return whether we inserted
18526 * callint.c (Fcall_interactively): Change "reading args" to
18527 "providing args" to try to clarify what it does (bug#1010).
18529 2011-07-07 Kenichi Handa <handa@m17n.org>
18531 * composite.c (composition_compute_stop_pos): Ignore a static
18532 composition starting before CHARPOS (Bug#8915).
18534 * xdisp.c (handle_composition_prop): Likewise.
18536 2011-07-07 Eli Zaretskii <eliz@gnu.org>
18538 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
18541 2011-07-07 Kenichi Handa <handa@m17n.org>
18543 * character.h (unicode_category_t): New enum type.
18545 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
18546 (Qchar_code_property_table): New variable.
18547 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
18548 (UNIPROP_COMPRESSED_FORM_P): New macros.
18549 (char_table_ascii): Uncompress the compressed values.
18550 (sub_char_table_ref): New arg is_uniprop. Callers changed.
18551 Uncompress the compressed values.
18552 (sub_char_table_ref_and_range): Likewise.
18553 (char_table_ref_and_range): Uncompress the compressed values.
18554 (sub_char_table_set): New arg is_uniprop. Callers changed.
18555 Uncompress the compressed values.
18556 (sub_char_table_set_range): Args changed. Callers changed.
18557 (char_table_set_range): Adjuted for the above change.
18558 (map_sub_char_table): Delete args default_val and parent. Add arg
18559 top. Give decoded values to a Lisp function.
18560 (map_char_table): Adjust for the above change. Give decoded
18561 values to a Lisp function. Gcpro more variables.
18562 (uniprop_table_uncompress)
18563 (uniprop_decode_value_run_length): New functions.
18564 (uniprop_decoder, uniprop_decoder_count): New variables.
18565 (uniprop_get_decoder, uniprop_encode_value_character)
18566 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
18568 (uniprop_encoder, uniprop_encoder_count): New variables.
18569 (uniprop_get_encoder, uniprop_table)
18570 (Funicode_property_table_internal, Fget_unicode_property_internal)
18571 (Fput_unicode_property_internal): New functions.
18572 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
18573 Sunicode_property_table_internal, Sget_unicode_property_internal,
18574 and Sput_unicode_property_internal. Defvar_lisp
18575 char-code-property-alist.
18577 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
18578 Vunicode_category_table.
18580 * font.c (font_range): Adjust for the change of
18581 Vunicode_category_table.
18583 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
18585 * m/iris4d.h: Remove file, move contents ...
18586 * s/irix6-5.h: ... here.
18588 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
18590 Remove unportable assumption about struct layout (Bug#8884).
18591 * alloc.c (mark_buffer):
18592 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
18593 (clone_per_buffer_values): Don't assume that
18594 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
18595 This isn't true in general, and it's particularly not true
18596 if Emacs is configured with --with-wide-int.
18597 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
18598 New macros, used in the buffer.c change.
18600 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
18602 * xsettings.c: Use both GConf and GSettings if both are available.
18603 (store_config_changed_event): Add comment.
18604 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
18605 (store_tool_bar_style_changed): New functions.
18606 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
18607 (struct xsettings): Move font inside HAVE_XFT.
18608 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
18609 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
18610 Move inside HAVE_XFT.
18611 (something_changed_gsettingsCB): Rename from something_changedCB.
18612 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
18614 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
18615 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
18616 (something_changed_gconfCB): Rename from something_changedCB.
18617 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
18618 (parse_settings): Move check for font inside HAVE_XFT.
18619 (read_settings, apply_xft_settings): Add comment.
18620 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
18621 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
18622 call store_font_name_changed.
18623 (xft_settings_event): Add comment.
18624 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
18625 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
18626 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
18627 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
18628 (xsettings_initialize): Call init_gsettings last.
18629 (xsettings_get_system_font, xsettings_get_system_normal_font):
18632 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
18634 Random fixes. E.g., (random) never returned negative values.
18635 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
18636 subseconds part to the entropy, as that's a bit more random.
18637 Prefer signed to unsigned, since the signedness doesn't matter and
18638 in general we prefer signed. When given a limit, use a
18639 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
18640 latter isn't right if USE_2_TAGS_FOR_INTS.
18641 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
18642 not 0..VALMASK. Don't discard "excess" bits that random () returns.
18644 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
18646 * textprop.c (text_property_stickiness):
18647 Obey Vtext_property_default_nonsticky.
18648 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
18649 * w32fns.c (syms_of_w32fns):
18650 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
18652 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
18654 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
18655 This is more efficient than Ffile_directory_p and avoids a minor race.
18657 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
18659 * buffer.c (Foverlay_put): Say what the return value is
18662 * fileio.c (barf_or_query_if_file_exists): Check first if the file
18663 is a directory before asking whether to use the file name
18665 (barf_or_query_if_file_exists): Make the "File is a directory"
18666 error be more correct.
18668 * fns.c (Frequire): Remove the mention of the .gz files, since
18669 that's installation-specific, but keep the mention of
18670 `get-load-suffixes'.
18672 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
18674 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
18675 Report string overflow if the output is too long.
18677 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
18679 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
18680 (syms_of_gnutls): Remove duplicate DEFSYM for
18681 Qgnutls_bootprop_verify_hostname_error, an error for
18682 Qgnutls_bootprop_verify_error (which is no longer used).
18684 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
18685 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
18686 Also (re)move comments that are misplaced or no longer relevant.
18688 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
18690 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
18692 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
18694 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
18695 and background color parameters if they have been changed.
18697 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
18699 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
18701 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
18703 * xsettings.c (SYSTEM_FONT): Define only when used.
18704 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
18706 * keymap.c (access_keymap_1): Now static.
18708 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
18710 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
18711 leave any prefix arg for the up event (Bug#1586).
18713 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
18715 * lread.c (syms_of_lread): Mention single symbols defined by
18716 `defvar' or `defconst' (bug#7154).
18718 * fns.c (Frequire): Mention .el.gz files (bug#7314).
18719 (Frequire): Mention get-load-suffixes.
18721 2011-07-02 Martin Rudalics <rudalics@gmx.at>
18723 * window.h (window): Remove clone_number slot.
18724 * window.c (Fwindow_clone_number, Fset_window_clone_number):
18726 (make_parent_window, make_window, saved_window)
18727 (Fset_window_configuration, save_window_save): Don't deal with
18729 * buffer.c (Qclone_number): Remove declaration.
18730 (sort_overlays, overlay_strings): Don't deal with clone numbers.
18732 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
18734 Add multiple inheritance to keymaps.
18735 * keymap.c (Fmake_composed_keymap): New function.
18736 (Fset_keymap_parent): Simplify.
18737 (fix_submap_inheritance): Remove.
18738 (access_keymap_1): New function extracted from access_keymap to handle
18739 embedded parents and handle lists of maps.
18740 (access_keymap): Use it.
18741 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
18742 (Fcopy_keymap): Handle embedded parents.
18743 (Fcommand_remapping, define_as_prefix): Simplify.
18744 (Fkey_binding): Simplify.
18745 (syms_of_keymap): Move minibuffer-local-completion-map,
18746 minibuffer-local-filename-completion-map,
18747 minibuffer-local-must-match-map, and
18748 minibuffer-local-filename-must-match-map to Elisp.
18749 (syms_of_keymap): Defsubr make-composed-keymap.
18750 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
18751 (parse_menu_item): Trivial simplification.
18753 2011-07-01 Glenn Morris <rgm@gnu.org>
18755 * Makefile.in (SETTINGS_LIBS): Fix typo.
18757 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
18759 * coding.c (Fencode_coding_string): Record the last coding system
18760 used, as the function doc string says (bug#8738).
18762 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
18764 * xsettings.c (store_monospaced_changed): Take new font as arg and
18765 check for change against current_mono_font.
18766 (EMACS_TYPE_SETTINGS): Remove this and related defines.
18767 (emacs_settings_constructor, emacs_settings_get_property)
18768 (emacs_settings_set_property, emacs_settings_class_init)
18769 (emacs_settings_init, gsettings_obj): Remove.
18770 (something_changedCB): New function for HAVE_GSETTINGS.
18771 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
18772 with value as argument.
18773 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
18774 g_settings_new (Bug#8967). Do not create gsettings_obj.
18775 Remove calls to g_settings_bind. Connect something_changedCB to
18778 * xgselect.c: Add defined (HAVE_GSETTINGS).
18779 (xgselect_initialize): Ditto.
18781 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
18782 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
18785 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
18787 * eval.c (struct backtrace): Simplify and port the data structure.
18788 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
18789 signed bit field, as this assumption is not portable and it makes
18790 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
18791 "char debug_on_exit : 1" as this is not portable either; instead,
18792 use the portable "unsigned int debug_on_exit : 1". Remove unused
18793 member evalargs. Remove obsolete comments about cc bombing out.
18795 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
18797 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
18798 Let HAVE_GSETTINGS override HAVE_GCONF.
18799 (store_monospaced_changed): New function.
18800 (EMACS_SETTINGS): A new type derived from GObject to handle
18801 GSettings notifications.
18802 (emacs_settings_constructor, emacs_settings_get_property)
18803 (emacs_settings_set_property, emacs_settings_class_init):
18805 (gsettings_client, gsettings_obj): New variables.
18806 (GSETTINGS_SCHEMA): New define.
18807 (something_changedCB): Call store_monospaced_changed.
18808 (init_gsettings): New function.
18809 (xsettings_initialize): Call init_gsettings.
18810 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
18813 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
18816 2011-06-29 Martin Rudalics <rudalics@gmx.at>
18818 * window.c (resize_root_window, grow_mini_window)
18819 (shrink_mini_window): Rename Qresize_root_window to
18820 Qwindow_resize_root_window and Qresize_root_window_vertically to
18821 Qwindow_resize_root_window_vertically.
18823 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
18825 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
18827 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
18829 * makefile.w32-in: Redesign dependencies so they reflect more
18830 clearly which files are directly included by each source file,
18831 and not through other includes.
18833 2011-06-27 Martin Rudalics <rudalics@gmx.at>
18835 * buffer.c (Qclone_number): Declare static and DEFSYM it.
18836 (sort_overlays, overlay_strings): When an overlay's clone number
18837 matches the window's clone number process the overlay even if
18838 the overlay's window property doesn't match the current window.
18840 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
18841 (Fwindow_hchild): Rename to Fwindow_left_child.
18842 (Fwindow_next): Rename to Fwindow_next_sibling.
18843 (Fwindow_prev): Rename to Fwindow_prev_sibling.
18844 (resize_window_check): Rename to window_resize_check.
18845 (resize_window_apply): Rename to window_resize_apply.
18846 (Fresize_window_apply): Rename to Fwindow_resize_apply.
18847 (Fdelete_other_windows_internal, resize_frame_windows)
18848 (Fsplit_window_internal, Fdelete_window_internal)
18849 (grow_mini_window, shrink_mini_window)
18850 (Fresize_mini_window_internal): Fix callers accordingly.
18852 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
18854 * emacsgtkfixed.h: State that this is only used with Gtk+3.
18855 (emacs_fixed_set_min_size): Remove.
18856 (emacs_fixed_new): Take frame as argument.
18858 * emacsgtkfixed.c: State that this is only used with Gtk+3.
18859 (_EmacsFixedPrivate): Remove minwidth/height.
18860 Add struct frame *f.
18861 (emacs_fixed_init): Initialize priv->f.
18862 (get_parent_class, emacs_fixed_set_min_size): Remove.
18863 (emacs_fixed_new): Set priv->f to argument.
18864 (emacs_fixed_get_preferred_width)
18865 (emacs_fixed_get_preferred_height): Use min_width/height from
18866 frames size_hint to set minimum and natural (Bug#8919).
18867 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
18868 and use min_width/height from frames size_hint to set
18869 min_width/height (Bug#8919).
18871 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
18872 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
18875 2011-06-26 Eli Zaretskii <eliz@gnu.org>
18877 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
18878 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
18881 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
18883 * process.c (wait_reading_process_output): Bypass select if
18884 waiting for a cell while ignoring keyboard input, and input is
18885 pending. Suggested by Jan Djärv (Bug#8869).
18887 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
18889 Use gnulib's dup2 module instead of rolling our own.
18890 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
18892 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
18894 * dispnew.c (scrolling_window): Before scrolling, turn off a
18895 mouse-highlight in the window being scrolled.
18897 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
18899 Move DEFSYM to lisp.h and use everywhere.
18901 * character.h (DEFSYM): Move declaration...
18902 * lisp.h (DEFSYM): ...here.
18908 * w32select.c: Don't include character.h.
18910 * alloc.c (syms_of_alloc):
18911 * buffer.c (syms_of_buffer):
18912 * bytecode.c (syms_of_bytecode):
18913 * callint.c (syms_of_callint):
18914 * casefiddle.c (syms_of_casefiddle):
18915 * casetab.c (init_casetab_once):
18916 * category.c (init_category_once, syms_of_category):
18917 * ccl.c (syms_of_ccl):
18918 * cmds.c (syms_of_cmds):
18919 * composite.c (syms_of_composite):
18920 * dbusbind.c (syms_of_dbusbind):
18921 * dired.c (syms_of_dired):
18922 * dispnew.c (syms_of_display):
18923 * doc.c (syms_of_doc):
18924 * editfns.c (syms_of_editfns):
18925 * emacs.c (syms_of_emacs):
18926 * eval.c (syms_of_eval):
18927 * fileio.c (syms_of_fileio):
18928 * fns.c (syms_of_fns):
18929 * frame.c (syms_of_frame):
18930 * fringe.c (syms_of_fringe):
18931 * insdel.c (syms_of_insdel):
18932 * keymap.c (syms_of_keymap):
18933 * lread.c (init_obarray, syms_of_lread):
18934 * macros.c (syms_of_macros):
18935 * msdos.c (syms_of_msdos):
18936 * print.c (syms_of_print):
18937 * process.c (syms_of_process):
18938 * search.c (syms_of_search):
18939 * sound.c (syms_of_sound):
18940 * syntax.c (init_syntax_once, syms_of_syntax):
18941 * terminal.c (syms_of_terminal):
18942 * textprop.c (syms_of_textprop):
18943 * undo.c (syms_of_undo):
18944 * w32.c (globals_of_w32):
18945 * window.c (syms_of_window):
18946 * xdisp.c (syms_of_xdisp):
18947 * xfaces.c (syms_of_xfaces):
18948 * xfns.c (syms_of_xfns):
18949 * xmenu.c (syms_of_xmenu):
18950 * xsettings.c (syms_of_xsettings):
18951 * xterm.c (syms_of_xterm): Use DEFSYM.
18953 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
18955 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
18957 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
18959 Integer and buffer overflow fixes (Bug#8873).
18961 * print.c (printchar, strout): Check for string overflow.
18962 (PRINTPREPARE, printchar, strout):
18963 Don't set size unless allocation succeeds.
18965 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
18966 for sizes. Check for string overflow more accurately.
18967 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
18969 * macros.c: Integer and buffer overflow fixes.
18970 * keyboard.h (struct keyboard.kbd_macro_bufsize):
18971 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
18972 Use ptrdiff_t, not int, for sizes.
18973 Don't increment bufsize until after realloc succeeds.
18974 Check for size-calculation overflow.
18975 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
18977 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
18979 * lread.c: Integer overflow fixes.
18980 (read_integer): Radix is now EMACS_INT, not int,
18981 to improve quality of diagnostics for out-of-range radices.
18982 Calculate buffer size correctly for out-of-range radices.
18983 (read1): Check for integer overflow in radices, and in
18984 read-circle numbers.
18985 (read_escape): Avoid int overflow.
18986 (Fload, openp, read_buffer_size, read1)
18987 (substitute_object_recurse, read_vector, read_list, map_obarray):
18988 Use ptrdiff_t, not int, for sizes.
18989 (read1): Use EMACS_INT, not int, for sizes.
18990 Check for size overflow.
18992 * image.c (cache_image): Check for size arithmetic overflow.
18994 * lread.c: Integer overflow issues.
18995 (saved_doc_string_size, saved_doc_string_length)
18996 (prev_saved_doc_string_size, prev_saved_doc_string_length):
18997 Now ptrdiff_t, not int.
18998 (read1): Don't assume doc string length fits in int. Check for
18999 out-of-range doc string lengths.
19000 (read_list): Don't assume file position fits in int.
19001 (read_escape): Check for hex character overflow.
19003 2011-06-22 Leo Liu <sdl.web@gmail.com>
19005 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
19006 Move to minibuffer.el.
19008 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
19010 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
19011 The following patches are for when GLYPH_DEBUG && !XASSERT.
19012 * dispextern.h (trace_redisplay_p, dump_glyph_string):
19013 * dispnew.c (flush_stdout):
19014 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
19015 Mark as externally visible.
19016 * dispnew.c (check_window_matrix_pointers): Now static.
19017 * dispnew.c (window_to_frame_vpos):
19018 * xfns.c (unwind_create_frame):
19019 * xterm.c (x_check_font): Remove unused local.
19020 * scroll.c (CHECK_BOUNDS):
19021 * xfaces.c (cache_fache): Rename local to avoid shadowing.
19022 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
19023 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
19024 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
19025 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
19027 (debug_method_add): Use va_list and vsprintf rather than relying
19028 on undefined behavior with wrong number of arguments.
19029 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
19030 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
19031 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
19032 since we're not interested in debugging glyphs with old libraries.
19033 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
19034 GCC 4.6.0's static checking.
19036 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
19038 Integer overflow and signedness fixes (Bug#8873).
19039 A few related buffer overrun fixes, too.
19041 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
19043 * dispextern.h (struct face.stipple):
19044 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
19045 (x_bitmap_mask, x_allocate_bitmap_record)
19046 (x_create_bitmap_from_data, x_create_bitmap_from_file)
19047 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
19048 (x_create_bitmap_from_xpm_data):
19049 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
19050 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
19052 * xfaces.c (load_pixmap):
19053 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
19054 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
19055 (.bitmaps_last, struct x_output.icon_bitmap):
19056 Use ptrdiff_t, not int, for bitmap indexes.
19057 (x_allocate_bitmap_record): Check for size overflow.
19058 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
19060 Use ptrdiff_t, not int, for overlay counts.
19061 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
19062 * editfns.c (overlays_around, get_pos_property):
19063 * textprop.c (get_char_property_and_overlay):
19064 * xdisp.c (next_overlay_change, note_mouse_highlight):
19065 * xfaces.c (face_at_buffer_position):
19066 * buffer.c (OVERLAY_COUNT_MAX): New macro.
19067 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
19068 (Fnext_overlay_change, Fprevious_overlay_change)
19069 (mouse_face_overlay_overlaps, Foverlays_in):
19070 Use ptrdiff_t, not int, for sizes.
19071 (overlays_at, overlays_in): Check for size-calculation overflow.
19073 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
19075 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
19076 (x_session_initialize): Do not assume string length fits in int.
19078 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
19079 This is unlikely, but can occur if DPI is outlandish.
19081 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
19082 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
19084 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
19085 * xrdb.c (magic_file_p, search_magic_path):
19086 Omit last arg SUFFIX; it was always 0. All callers changed.
19087 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
19089 * xfont.c (xfont_match): Avoid need for strlen.
19091 * xfns.c: Don't assume strlen fits in int.
19092 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
19094 * xdisp.c (message_log_check_duplicate): Return intmax_t,
19095 not unsigned long, as we prefer signed integers. All callers changed.
19096 Detect integer overflow in repeat count.
19097 (message_dolog): Don't assume print length fits in 39 bytes.
19098 (display_mode_element): Don't assume strlen fits in int.
19100 * termcap.c: Don't assume sizes fit in int and never overflow.
19101 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
19102 (gobble_line): Check for size-calculation overflow.
19104 * minibuf.c (Fread_buffer):
19105 * lread.c (intern, intern_c_string):
19106 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
19107 Don't assume string length fits in int.
19109 * keyboard.c (parse_tool_bar_item):
19110 * gtkutil.c (style_changed_cb): Avoid need for strlen.
19112 * font.c: Don't assume string length fits in int.
19113 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
19114 Use ptrdiff_t, not int.
19115 (font_intern_prop): Don't assume string length fits in int.
19116 Don't assume integer property fits in fixnum.
19117 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
19119 * filelock.c: Fix some buffer overrun and integer overflow issues.
19120 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
19121 Reformulate so as not to need the command string.
19122 Invoke gzip -cd rather than gunzip, as it's more portable.
19123 (lock_info_type, lock_file_1, lock_file):
19124 Don't assume pid_t and time_t fit in unsigned long.
19125 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
19126 (current_lock_owner): Prefer signed type for sizes.
19127 Use memcpy, not strncpy, where memcpy is what is really wanted.
19128 Don't assume (via atoi) that time_t and pid_t fit in int.
19129 Check for time_t and/or pid_t out of range, e.g., via a network share.
19130 Don't alloca where an auto var works fine.
19132 * fileio.c: Fix some integer overflow issues.
19133 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
19134 Don't assume string length fits in int.
19135 (directory_file_name): Don't assume string length fits in long.
19136 (make_temp_name): Don't assume pid fits in int, or that its print
19137 length is less than 20.
19139 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
19141 * coding.c (make_subsidiaries): Don't assume string length fits in int.
19143 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
19145 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
19146 We prefer signed integers, even for size calculations.
19148 * emacs.c: Don't assume string length fits in 'int'.
19149 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
19150 (main): Don't invoke strlen when not needed.
19152 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
19153 (XD_DEBUG_MESSAGE): Don't waste a byte.
19155 * callproc.c (getenv_internal_1, getenv_internal)
19156 (Fgetenv_internal):
19157 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
19159 * lread.c (invalid_syntax): Omit length argument.
19160 All uses changed. This doesn't fix a bug, but it simplifies the
19161 code away from its former Hollerith-constant appearance, and it's
19162 one less 'int' to worry about when looking at integer-overflow issues.
19163 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
19165 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
19166 This didn't break anything, but it didn't help either.
19167 It's confusing to put a bogus integer in a place where the actual
19168 value does not matter.
19169 (LIST_END_P): Remove unused macro and its bogus comment.
19170 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
19172 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
19173 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
19175 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
19176 We prefer signed types, and the value cannot exceed the EMACS_INT
19177 range anyway (because otherwise the length would not be representable).
19178 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
19179 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
19180 This avoids a GCC warning when WIDE_EMACS_INT.
19182 * indent.c (sane_tab_width): New function.
19183 (current_column, scan_for_column, Findent_to, position_indentation)
19184 (compute_motion): Use it. This is just for clarity.
19185 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
19187 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
19189 * lisp.h (lint_assume): New macro.
19190 * composite.c (composition_gstring_put_cache):
19191 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
19193 * editfns.c, insdel.c:
19194 Omit unnecessary forward decls, to simplify future changes.
19196 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
19198 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
19200 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
19201 Use much-faster test for byte-length change.
19202 Don't assume string byte-length fits in 'int'.
19203 Check that character arg fits in 'int'.
19204 (mapcar1): Declare byte as byte, for clarity.
19206 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
19208 * fns.c (concat): Catch string overflow earlier.
19209 Do not rely on integer wraparound.
19211 * dispextern.h (struct it.overlay_strings_charpos)
19212 (struct it.selective): Now EMACS_INT, not int.
19213 * xdisp.c (forward_to_next_line_start)
19214 (back_to_previous_visible_line_start)
19215 (reseat_at_next_visible_line_start, next_element_from_buffer):
19216 Don't arbitrarily truncate the value of 'selective' to int.
19218 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
19220 * composite.c: Don't truncate sizes to 'int'.
19221 (composition_gstring_p, composition_reseat_it)
19222 (composition_adjust_point): Use EMACS_INT, not int.
19223 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
19224 not EMACS_UINT, for indexes.
19226 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
19228 * buffer.c: Include <verify.h>.
19229 (struct sortvec.priority, struct sortstr.priority):
19230 Now EMACS_INT, not int.
19231 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
19232 (struct sortstr.size, record_overlay_string)
19233 (struct sortstrlist.size, struct sortlist.used):
19234 Don't truncate size to int.
19235 (record_overlay_string): Check for size-calculation overflow.
19236 (init_buffer_once): Check at compile-time, not run-time.
19238 2011-06-22 Jim Meyering <meyering@redhat.com>
19240 Don't leak an XBM-image-sized buffer
19241 * image.c (xbm_load): Free the image buffer after using it.
19243 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
19246 * composite.c (find_automatic_composition): Omit needless 'return 0;'
19247 that Sun C diagnosed.
19248 * fns.c (secure_hash): Fix pointer signedness issue.
19249 * intervals.c (static_offset_intervals): New function.
19250 (offset_intervals): Use it.
19252 2011-06-21 Leo Liu <sdl.web@gmail.com>
19255 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
19258 * fns.c (secure_hash): Rename from crypto_hash_function and change
19259 the first arg to accept symbols.
19260 (Fsecure_hash): New primitive.
19261 (syms_of_fns): New symbols.
19263 2011-06-20 Deniz Dogan <deniz@dogan.se>
19265 * process.c (Fset_process_buffer): Clarify return value in
19268 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
19270 * dispnew.c (add_window_display_history): Use BVAR.
19272 * xdisp.c (debug_method_add): Use BVAR.
19273 (check_window_end, dump_glyph_matrix, dump_glyph)
19274 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
19276 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
19279 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
19280 check till after the cache is created in init_frame_faces.
19282 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
19284 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
19286 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
19288 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
19289 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
19290 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
19292 Improve buffer-overflow checking (Bug#8873).
19293 * fileio.c (Finsert_file_contents):
19294 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
19295 Remove the old (too-loose) buffer overflow checks.
19296 They weren't needed, since make_gap checks for buffer overflow.
19297 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
19298 The old code merely checked for Emacs fixnum overflow, and relied
19299 on undefined (wraparound) behavior. The new code avoids undefined
19300 behavior, and also checks for ptrdiff_t and/or size_t overflow.
19302 * editfns.c (Finsert_char): Don't dump core with very negative counts.
19303 Tune. Don't use wider integers than needed. Don't use alloca.
19304 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
19306 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
19308 * insdel.c, lisp.h (buffer_overflow): New function.
19309 (insert_from_buffer_1, replace_range, replace_range_2):
19310 * insdel.c (make_gap_larger):
19311 * editfns.c (Finsert_char):
19312 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
19314 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
19316 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
19318 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
19320 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
19321 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
19323 * fileio.c: Don't assume EMACS_INT fits in off_t.
19324 (emacs_lseek): New static function.
19325 (Finsert_file_contents, Fwrite_region): Use it.
19326 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
19328 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
19330 * fns.c: Don't overflow int when computing a list length.
19331 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
19332 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
19333 truncation on 64-bit hosts. Check for QUIT every
19334 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
19335 faster and is responsive enough.
19336 (Flength): Report an error instead of overflowing an integer.
19337 (Fsafe_length): Return a float if the value is not representable
19338 as a fixnum. This shouldn't happen except in contrived situations.
19339 (Fnthcdr, Fsort): Don't assume list length fits in int.
19340 (Fcopy_sequence): Don't assume vector length fits in int.
19342 * alloc.c: Check that resized vectors' lengths fit in fixnums.
19343 (header_size, word_size): New constants.
19344 (allocate_vectorlike): Don't check size overflow here.
19345 (allocate_vector): Check it here instead, since this is the only
19346 caller of allocate_vectorlike that could cause overflow.
19347 Check that the new vector's length is representable as a fixnum.
19349 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
19350 The previous code was bogus. For example, next_almost_prime (32)
19351 returned 39, which is undesirable as it is a multiple of 3; and
19352 next_almost_prime (24) returned 25, which is a multiple of 5 so
19353 why was the code bothering to check for multiples of 7?
19355 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
19357 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
19359 Variadic C functions now count arguments with ptrdiff_t.
19360 This partly undoes my 2011-03-30 change, which replaced int with size_t.
19361 Back then I didn't know that the Emacs coding style prefers signed int.
19362 Also, in the meantime I found a few more instances where arguments
19363 were being counted with int, which may truncate counts on 64-bit
19364 machines, or EMACS_INT, which may be unnecessarily wide.
19365 * lisp.h (struct Lisp_Subr.function.aMANY)
19366 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
19367 Arg counts are now ptrdiff_t, not size_t.
19368 All variadic functions and their callers changed accordingly.
19369 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
19370 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
19371 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
19372 * callint.c (Fcall_interactively): Check arg count for overflow,
19373 to avoid potential buffer overrun. Use signed char, not 'int',
19374 for 'varies' array, so that we needn't bother to check its size
19375 calculation for overflow.
19376 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
19377 * eval.c (apply_lambda):
19378 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
19379 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
19380 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
19382 * callint.c (Fcall_interactively): Don't use index var as event count.
19384 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
19385 * mem-limits.h (SIZE): Remove; no longer used.
19387 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
19389 Remove unnecessary casts.
19390 * xterm.c (x_term_init):
19391 * xfns.c (x_set_border_pixel):
19392 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
19393 These aren't needed now that we assume ANSI C.
19395 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
19396 It's more likely to cause problems (due to unsigned overflow)
19399 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
19401 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
19403 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
19405 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
19407 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
19409 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
19411 GLYPH_CODE_FACE returns EMACS_INT, not int.
19412 * dispextern.h (merge_faces):
19413 * xfaces.c (merge_faces):
19414 * xdisp.c (get_next_display_element, next_element_from_display_vector):
19415 Don't assume EMACS_INT fits in int.
19417 * character.h (CHAR_VALID_P): Remove unused parameter.
19418 * fontset.c, lisp.h, xdisp.c: All uses changed.
19420 * editfns.c (Ftranslate_region_internal): Omit redundant test.
19422 * fns.c (concat): Minor tuning based on overflow analysis.
19423 This doesn't fix any bugs. Use int to hold character, instead
19424 of constantly refetching from Emacs object. Use XFASTINT, not
19425 XINT, for value known to be a character. Don't bother comparing
19426 a single byte to 0400, as it's always less.
19428 * floatfns.c (Fexpt):
19429 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
19431 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
19434 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
19436 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
19437 Without this fix, on a 64-bit host (aset S 0 4294967386) would
19438 incorrectly succeed when S was a string, because 4294967386 was
19439 truncated before it was used.
19441 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
19442 Otherwise, an out-of-range integer could cause undefined behavior
19445 * composite.c: Use int, not EMACS_INT, for characters.
19446 (fill_gstring_body, composition_compute_stop_pos): Use int, not
19447 EMACS_INT, for values that are known to be in character range.
19448 This doesn't fix any bugs but is the usual style inside Emacs and
19449 may generate better code on 32-bit machines.
19451 Make sure a 64-bit char is never passed to ENCODE_CHAR.
19452 This is for reasons similar to the recent CHAR_STRING fix.
19453 * charset.c (Fencode_char): Check that character arg is actually
19454 a character. Pass an int to ENCODE_CHAR.
19455 * charset.h (ENCODE_CHAR): Verify that the character argument is no
19456 wider than 'int', as a compile-time check to prevent future regressions
19459 * character.c (char_string): Remove unnecessary casts.
19461 Make sure a 64-bit char is never passed to CHAR_STRING.
19462 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
19463 by silently ignoring the top 32 bits, allowing some values
19464 that were far too large to be valid characters.
19465 * character.h: Include <verify.h>.
19466 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
19467 arguments are no wider than unsigned, as a compile-time check
19468 to prevent future regressions in this area.
19470 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
19471 (Fsubst_char_in_region):
19473 * xdisp.c (decode_mode_spec_coding):
19474 Adjust to CHAR_STRING's new requirement.
19475 * editfns.c (Finsert_char, Fsubst_char_in_region):
19476 * fns.c (concat): Check that character args are actually
19477 characters. Without this test, these functions did the wrong
19478 thing with wildly out-of-range values on 64-bit hosts.
19480 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
19481 These casts should not be needed on 32-bit hosts, either.
19482 * keyboard.c (read_char):
19483 * lread.c (Fload): Remove casts to unsigned.
19485 * lisp.h (UNSIGNED_CMP): New macro.
19486 This fixes comparison bugs on 64-bit hosts.
19487 (ASCII_CHAR_P): Use it.
19488 * casefiddle.c (casify_object):
19489 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
19490 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
19491 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
19492 * dispextern.h (FACE_FROM_ID):
19493 * keyboard.c (read_char): Use UNSIGNED_CMP.
19495 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
19496 not to EMACS_INT, to avoid GCC warning.
19498 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
19500 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
19501 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
19502 isn't needed on 32-bit machines.
19504 * buffer.c (Fgenerate_new_buffer_name):
19505 Use EMACS_INT for count, not int.
19506 (advance_to_char_boundary): Return EMACS_INT, not int.
19508 * data.c (Qcompiled_function): Now static.
19510 * window.c (window_body_lines): Now static.
19512 * image.c (gif_load): Rename local to avoid shadowing.
19514 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
19515 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
19516 * alloc.c (make_save_value): Integer argument is now of type
19517 ptrdiff_t, not int.
19518 (mark_object): Use ptrdiff_t, not int.
19519 * lisp.h (pD): New macro.
19520 * print.c (print_object): Use it.
19522 * alloc.c: Use EMACS_INT, not int, to count objects.
19523 (total_conses, total_markers, total_symbols, total_vector_size)
19524 (total_free_conses, total_free_markers, total_free_symbols)
19525 (total_free_floats, total_floats, total_free_intervals)
19526 (total_intervals, total_strings, total_free_strings):
19527 Now EMACS_INT, not int. All uses changed.
19528 (Fgarbage_collect): Compute overall total using a double, so that
19529 integer overflow is less likely to be a problem. Check for overflow
19530 when converting back to an integer.
19531 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
19532 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
19533 These were 'int' variables that could overflow on 64-bit hosts;
19534 they were never used, so remove them instead of repairing them.
19535 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
19536 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
19537 Previously, this ceilinged at INT_MAX, but that doesn't work on
19539 (allocate_pseudovector): Don't use EMACS_INT when int would do.
19541 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
19542 (allocate_vectorlike): Check for ptrdiff_t overflow.
19543 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
19544 when a (possibly-narrower) signed value would do just as well.
19545 We prefer using signed arithmetic, to avoid comparison confusion.
19547 * alloc.c: Catch some string size overflows that we were missing.
19548 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
19549 for convenience in STRING_BYTES_MAX.
19550 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
19551 The definition here is exact; the one in lisp.h was approximate.
19552 (allocate_string_data): Check for string overflow. This catches
19553 some instances we weren't catching before. Also, it catches
19554 size_t overflow on (unusual) hosts where SIZE_MAX <= min
19555 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
19556 and ptrdiff_t and EMACS_INT are both 64 bits.
19558 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
19559 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
19560 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
19562 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
19564 * alloc.c (Fmake_string): Check for out-of-range init.
19566 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
19568 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
19570 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
19572 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
19573 xg_get_default_scrollbar_width.
19575 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
19576 (int_gtk_range_get_value): Move to the scroll bar part of the file.
19577 (style_changed_cb): Call update_theme_scrollbar_width and call
19578 x_set_scroll_bar_default_width and xg_frame_set_char_size for
19579 all frames (Bug#8505).
19580 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
19581 Call gtk_window_set_resizable if HAVE_GTK3.
19582 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
19583 and height if HAVE_GTK3 (Bug#8505).
19584 (scroll_bar_width_for_theme): New variable.
19585 (update_theme_scrollbar_width): New function.
19586 (xg_get_default_scrollbar_width): Move code to
19587 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
19588 (xg_initialize): Call update_theme_scrollbar_width.
19590 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
19592 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
19594 2011-06-12 Martin Rudalics <rudalics@gmx.at>
19596 * frame.c (make_frame): Call other_buffer_safely instead of
19599 * window.c (temp_output_buffer_show): Call display_buffer with
19600 second argument Vtemp_buffer_show_specifiers and reset latter
19601 immediately after the call.
19602 (Vtemp_buffer_show_specifiers): New variable.
19603 (auto_window_vscroll_p, next_screen_context_lines)
19604 (Vscroll_preserve_screen_position): Remove leading asterisks from
19607 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
19609 Fix minor problems found by GCC 4.6.0 static checking.
19610 * buffer.c (Qclone_number): Remove for now, as it's unused.
19611 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
19612 (record_buffer): Remove unused local.
19613 * frame.c (other_visible_frames, frame_buffer_list): Now static.
19614 (set_frame_buffer_list): Remove; unused.
19615 * frame.h (other_visible_frames): Remove decl.
19616 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
19617 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
19618 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
19620 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
19621 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
19622 Define only if HAVE_GPM.
19623 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
19624 (update_hints_inhibit): Remove; never set. All uses removed.
19625 * widgetprv.h (emacsFrameClassRec): Remove decl.
19626 * window.c (delete_deletable_window): Now returns void, since it
19627 wasn't returning anything.
19628 (compare_window_configurations): Remove unused locals.
19629 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
19630 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
19631 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
19632 the same widths as pointers. This follows up on the 2011-05-06 patch.
19633 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
19634 * xterm.h: Likewise.
19635 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
19637 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
19639 * makefile.w32-in: Update dependencies.
19640 (LISP_H): Add lib/intprops.h.
19642 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
19644 * image.c (gif_load): Add animation frame delay to the metadata.
19645 (syms_of_image): Use DEFSYM. New symbol `delay'.
19647 2011-06-11 Martin Rudalics <rudalics@gmx.at>
19649 * window.c (delete_deletable_window): Re-add.
19650 (Fset_window_configuration): Rewrite to handle dead buffers and
19651 consequently deletable windows.
19652 (window_tree, Fwindow_tree): Remove. Supply functionality in
19654 (compare_window_configurations): Simplify code.
19656 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
19658 * image.c (imagemagick_load_image): Fix type mismatch.
19659 (Fimagemagick_types): Likewise.
19661 * window.h (replace_buffer_in_windows): Declare.
19663 2011-06-11 Martin Rudalics <rudalics@gmx.at>
19665 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
19666 Qclone_number. Remove external declaration of Qdelete_window.
19667 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
19669 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
19670 Run Qbuffer_list_update_hook if allowed.
19671 (Fother_buffer): Rewrite doc-string. Major rewrite for new
19672 buffer list implementation.
19673 (other_buffer_safely): New function.
19674 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
19675 calls to replace_buffer_in_windows and
19676 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
19678 (record_buffer): Inhibit quitting and rewrite using quittable
19679 functions. Run Qbuffer_list_update_hook if allowed.
19680 (Frecord_buffer, Funrecord_buffer): New functions.
19681 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
19682 Move switch-to-buffer to window.el.
19683 (bury-buffer): Move to window.el.
19684 (Vbuffer_list_update_hook): New variable.
19686 * lisp.h (other_buffer_safely): Add prototype in buffer.c
19689 * window.h (resize_frame_windows): Move up in code.
19690 (Fwindow_frame): Remove EXFUN.
19691 (replace_buffer_in_all_windows): Remove prototype.
19692 (replace_buffer_in_windows_safely): Add prototype.
19694 * window.c: Declare Qdelete_window static again. Move down
19695 declaration of select_count.
19696 (Fnext_window, Fprevious_window): Rewrite doc-strings.
19697 (Fother_window): Move to window.el.
19698 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
19699 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
19700 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
19702 (replace_buffer_in_windows): Implement by calling
19703 Qreplace_buffer_in_windows.
19704 (replace_buffer_in_all_windows): Remove with some functionality
19705 moved into replace_buffer_in_windows_safely.
19706 (replace_buffer_in_windows_safely): New function.
19707 (select_window_norecord, select_frame_norecord): Move in front
19708 of run_window_configuration_change_hook. Remove now obsolete
19710 (Fset_window_buffer): Rewrite doc-string.
19711 Call Qrecord_window_buffer.
19712 (keys_of_window): Move binding for other-window to window.el.
19714 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
19716 * dispextern.h (struct image): Replace data member, whose int_val
19717 and ptr_val fields were not used by anything, with a single
19720 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
19721 (gif_clear_image, gif_load, imagemagick_load_image)
19722 (gs_clear_image, gs_load): Callers changed.
19724 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
19726 * buffer.h: Include <time.h>, for time_t.
19727 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
19729 Fix minor problems found by static checking.
19731 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
19733 Make identifiers static if they are not used in other modules.
19734 * data.c (Qcompiled_function, Qframe, Qvector):
19735 * image.c (QimageMagick, Qsvg):
19736 * minibuf.c (Qmetadata):
19737 * window.c (resize_window_check, resize_root_window): Now static.
19738 * window.h (resize_window_check, resize_root_window): Remove decls.
19740 * window.c (window_deletion_count, delete_deletable_window):
19742 (window_body_lines): Now static.
19743 (Fdelete_other_windows_internal): Mark vars as initialized.
19744 Make sure 'resize_failed' is initialized.
19745 (run_window_configuration_change_hook): Rename local to avoid shadowing.
19746 (resize_window_apply): Remove unused local.
19747 * window.h (delete_deletable_window): Remove decl.
19749 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
19750 (imagemagick_load_image): Fix pointer signedness problem by changing
19751 last arg from unsigned char * to char *. All uses changed.
19752 Also, fix a local for similar reasons.
19753 Remove unused locals. Remove locals to avoid shadowing.
19754 (fn_rsvg_handle_free): Remove; unused.
19755 (svg_load, svg_load_image): Fix pointer signedness problem.
19756 (imagemagick_load_image): Don't use garbage pointer image_wand.
19758 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
19760 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
19762 * image.c (gif_load): Fix omitted cast error introduced by
19765 2011-06-10 Martin Rudalics <rudalics@gmx.at>
19767 * window.h (resize_proportionally, orig_total_lines)
19768 (orig_top_line): Remove from window structure.
19769 (set_window_height, set_window_width, change_window_heights)
19770 (Fdelete_window): Remove prototypes.
19771 (resize_frame_windows): Remove duplicate declaration.
19773 2011-06-10 Eli Zaretskii <eliz@gnu.org>
19775 * window.h (resize_frame_windows, resize_window_check)
19776 (delete_deletable_window, resize_root_window)
19777 (resize_frame_windows): Declare prototypes.
19779 * window.c (resize_window_apply): Make definition be "static" to
19780 match the prototype.
19782 2011-06-10 Martin Rudalics <rudalics@gmx.at>
19784 * window.c: Remove declarations of Qwindow_size_fixed,
19785 window_min_size_1, window_min_size_2, window_min_size,
19786 size_window, window_fixed_size_p, enlarge_window, delete_window.
19787 Remove static from declaration of Qdelete_window, it's
19788 temporarily needed by Fbury_buffer.
19789 (replace_window): Don't assign orig_top_line and
19791 (Fdelete_window, delete_window): Remove. Window deletion is
19792 handled by window.el.
19793 (window_loop): Remove DELETE_OTHER_WINDOWS case.
19794 Replace Fdelete_window calls with calls to Qdelete_window.
19795 (Fdelete_other_windows): Remove. Deleting other windows is
19796 handled by window.el.
19797 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
19798 handled in window.el.
19799 (window_min_size_2, window_min_size_1, window_min_size): Remove.
19800 Window minimum sizes are handled in window.el.
19801 (shrink_windows, size_window, set_window_height)
19802 (set_window_width, change_window_heights, window_height)
19803 (window_width, CURBEG, CURSIZE, enlarge_window)
19804 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
19805 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
19806 handled in window.el.
19807 (make_dummy_parent): Rename to make_parent_window and give it a
19808 second argument horflag.
19809 (make_window): Don't set resize_proportionally any more.
19810 (Fsplit_window): Remove. Windows are split in window.el.
19811 (save_restore_action, save_restore_orig_size)
19812 (shrink_window_lowest_first, save_restore_orig_size): Remove.
19813 Resize mini windows in window.el.
19814 (grow_mini_window, shrink_mini_window): Implement by calling
19815 Qresize_root_window_vertically, resize_window_check and
19816 resize_window_apply.
19817 (saved_window, Fset_window_configuration, save_window_save):
19818 Do not handle orig_top_line, orig_total_lines, and
19819 resize_proportionally.
19820 (window_min_height, window_min_width): Move to window.el.
19821 (keys_of_window): Move bindings for delete-other-windows,
19822 split-window, delete-window and enlarge-window to window.el.
19824 * buffer.c: Temporarily extern Qdelete_window.
19825 (Fbury_buffer): Temporarily call Qdelete_window instead of
19826 Fdelete_window (Fbury_buffer will move to window.el soon).
19828 * frame.c (set_menu_bar_lines_1): Remove code handling
19829 orig_top_line and orig_total_lines.
19831 * dispnew.c (adjust_frame_glyphs_initially): Don't use
19832 set_window_height but set heights directly.
19833 (change_frame_size_1): Use resize_frame_windows.
19835 * xdisp.c (init_xdisp): Don't use set_window_height but set
19838 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
19839 Use resize_frame_windows instead of change_window_heights and run
19840 run_window_configuration_change_hook.
19842 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
19843 instead of change_window_heights and run
19844 run_window_configuration_change_hook.
19846 2011-06-09 Martin Rudalics <rudalics@gmx.at>
19848 * window.c (replace_window): Rename second argument REPLACEMENT to
19849 NEW. New third argument SETFLAG. Rewrite.
19850 (delete_window, make_dummy_parent): Call replace_window with
19852 (window_list_1): Move down in code.
19853 (run_window_configuration_change_hook): Move set_buffer part
19854 before select_frame_norecord part in order to unwind correctly.
19855 Rename count1 to count.
19856 (recombine_windows, delete_deletable_window, resize_root_window)
19857 (Fdelete_other_windows_internal)
19858 (Frun_window_configuration_change_hook, make_parent_window)
19859 (resize_window_check, resize_window_apply, Fresize_window_apply)
19860 (resize_frame_windows, Fsplit_window_internal)
19861 (Fdelete_window_internal, Fresize_mini_window_internal):
19863 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
19865 2011-06-08 Martin Rudalics <rudalics@gmx.at>
19867 * window.h (window): Add some new members to window structure -
19868 normal_lines, normal_cols, new_total, new_normal, clone_number,
19869 splits, nest, prev_buffers, next_buffers.
19870 (WINDOW_TOTAL_SIZE): Move here from window.c.
19871 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
19873 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
19875 (make_dummy_parent): Set new members of windows structure.
19876 (make_window): Move down in code. Handle new members of window
19878 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
19879 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
19880 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
19881 (Fset_window_prev_buffers, Fwindow_next_buffers)
19882 (Fset_window_next_buffers, Fset_window_clone_number):
19884 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
19885 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
19887 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
19888 Argument WINDOW can be now internal window too.
19889 (Fwindow_use_time): Move up in code.
19890 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
19891 Rewrite doc-string.
19892 (Fset_window_configuration, saved_window)
19893 (Fcurrent_window_configuration, save_window_save): Handle new
19894 members of window structure.
19895 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
19896 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
19897 (syms_of_window): New Lisp objects Qrecord_window_buffer,
19898 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
19899 Qget_mru_window, Qresize_root_window,
19900 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
19901 Qauto_buffer_name; staticpro them.
19903 2011-06-07 Martin Rudalics <rudalics@gmx.at>
19905 * window.c (Fwindow_total_size, Fwindow_left_column)
19906 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
19907 (Fwindow_list_1): New functions.
19908 (window_box_text_cols): Replace with window_body_cols.
19909 (Fwindow_width, Fscroll_left, Fscroll_right):
19910 Use window_body_cols instead of window_box_text_cols.
19911 (delete_window, Fset_window_configuration):
19912 Call delete_all_subwindows with window as argument.
19913 (delete_all_subwindows): Take a window as argument and not a
19914 structure. Rewrite.
19915 (window_loop): Remove handling of GET_LRU_WINDOW and
19916 GET_LARGEST_WINDOW.
19917 (Fget_lru_window, Fget_largest_window): Move to window.el.
19919 * window.h: Extern window_body_cols instead of
19920 window_box_text_cols. delete_all_subwindows now takes a
19921 Lisp_Object as argument.
19923 * indent.c (compute_motion, Fcompute_motion):
19924 Use window_body_cols instead of window_box_text_cols.
19926 * frame.c (delete_frame): Call delete_all_subwindows with root
19927 window as argument.
19929 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
19931 * fns.c (Fputhash): Document return value.
19933 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
19935 * image.c (gif_load): Implement gif89a spec "no disposal" method.
19937 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
19939 Cons<->int and similar integer overflow fixes (Bug#8794).
19941 Check for overflow when converting integer to cons and back.
19942 * charset.c (Fdefine_charset_internal, Fdecode_char):
19943 Use cons_to_unsigned to catch overflow.
19944 (Fencode_char): Use INTEGER_TO_CONS.
19945 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
19946 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
19947 * data.c (long_to_cons, cons_to_long): Remove.
19948 (cons_to_unsigned, cons_to_signed): New functions.
19949 These signal an error for invalid or out-of-range values.
19950 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
19951 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
19952 * font.c (Ffont_variation_glyphs):
19953 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
19954 * lisp.h: Include <intprops.h>.
19955 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
19956 (cons_to_signed, cons_to_unsigned): New decls.
19957 (long_to_cons, cons_to_long): Remove decls.
19958 * undo.c (record_first_change): Use INTEGER_TO_CONS.
19959 (Fprimitive_undo): Use CONS_TO_INTEGER.
19960 * xfns.c (Fx_window_property): Likewise.
19961 * xselect.c: Include <limits.h>.
19962 (x_own_selection, selection_data_to_lisp_data):
19963 Use INTEGER_TO_CONS.
19964 (x_handle_selection_request, x_handle_selection_clear)
19965 (x_get_foreign_selection, Fx_disown_selection_internal)
19966 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
19967 (lisp_data_to_selection_data): Use cons_to_unsigned.
19968 (x_fill_property_data): Use cons_to_signed.
19969 Report values out of range.
19971 Check for buffer and string overflow more precisely.
19972 * buffer.h (BUF_BYTES_MAX): New macro.
19973 * lisp.h (STRING_BYTES_MAX): New macro.
19974 * alloc.c (Fmake_string):
19975 * character.c (string_escape_byte8):
19976 * coding.c (coding_alloc_by_realloc):
19977 * doprnt.c (doprnt):
19978 * editfns.c (Fformat):
19980 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
19981 since they may not be the same number.
19982 * editfns.c (Finsert_char):
19983 * fileio.c (Finsert_file_contents):
19984 Likewise for BUF_BYTES_MAX.
19986 * image.c: Use ptrdiff_t, not int, for sizes.
19987 (slurp_file): Switch from int to ptrdiff_t.
19989 (slurp_file): Check that file size fits in both size_t (for
19990 malloc) and ptrdiff_t (for sanity and safety).
19992 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
19993 if b->modtime has its maximal value.
19995 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
19997 Don't assume time_t can fit into int.
19998 * buffer.h (struct buffer.modtime): Now time_t, not int.
19999 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
20000 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
20002 Minor fixes for signed vs unsigned integers.
20003 * character.h (MAYBE_UNIFY_CHAR):
20004 * charset.c (maybe_unify_char):
20005 * keyboard.c (read_char, reorder_modifiers):
20006 XINT -> XFASTINT, since the integer must be nonnegative.
20007 * ftfont.c (ftfont_spec_pattern):
20008 * keymap.c (access_keymap, silly_event_symbol_error):
20009 XUINT -> XFASTINT, since the integer must be nonnegative.
20010 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
20011 since it makes no difference and we prefer signed.
20012 * keyboard.c (record_char): Use XUINT when all the neighbors do.
20013 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
20016 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
20018 * window.h (Fwindow_frame): Declare.
20020 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20022 * alloc.c: Simplify handling of large-request failures (Bug#8800).
20023 (SPARE_MEMORY): Always define.
20024 (LARGE_REQUEST): Remove.
20025 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
20027 2011-06-06 Martin Rudalics <rudalics@gmx.at>
20029 * lisp.h: Move EXFUNS for Fframe_root_window,
20030 Fframe_first_window and Fset_frame_selected_window to window.h.
20032 * window.h: Move EXFUNS for Fframe_root_window,
20033 Fframe_first_window and Fset_frame_selected_window here from
20036 * frame.c (Fwindow_frame, Fframe_first_window)
20037 (Fframe_root_window, Fframe_selected_window)
20038 (Fset_frame_selected_window): Move to window.c.
20039 (Factive_minibuffer_window): Move to minibuf.c.
20040 (Fother_visible_frames_p): New function.
20042 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
20044 * window.c (decode_window, decode_any_window): Move up in code.
20045 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
20046 (inhibit_frame_unsplittable): Remove unused variable.
20047 (Fwindow_buffer): Move up and rewrite doc-string.
20048 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
20049 (Fwindow_prev): New functions.
20050 (Fwindow_frame): Move here from frame.c. Accept any window as
20052 (Fframe_root_window, Fframe_first_window)
20053 (Fframe_selected_window): Move here from frame.c. Accept frame
20054 or arbitrary window as argument. Update doc-strings.
20055 (Fminibuffer_window): Move up in code.
20056 (Fwindow_minibuffer_p): Move up in code and simplify.
20057 (Fset_frame_selected_window): Move here from frame.c.
20059 (Fselected_window, select_window, Fselect_window): Move up in
20060 code. Minor doc-string fixes.
20062 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
20064 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
20065 Do not assume that spare memory exists; that assumption is valid
20066 only if SYSTEM_MALLOC.
20067 (LARGE_REQUEST): New macro, so that the issue of large requests
20068 is separated from the issue of spare memory.
20070 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
20072 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
20075 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
20077 * xfns.c (x_set_scroll_bar_default_width): Move declarations
20080 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
20082 * gtkutil.c (xg_get_default_scrollbar_width): New function.
20084 * gtkutil.h: Declare xg_get_default_scrollbar_width.
20086 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
20087 min width by calling x_set_scroll_bar_default_width (Bug#8505).
20089 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
20091 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
20093 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
20095 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
20096 (x_clipboard_manager_save): Add return value.
20097 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
20098 New error handlers.
20099 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
20100 Obey Vx_select_enable_clipboard_manager. Catch errors in
20101 x_clipboard_manager_save (Bug#8779).
20102 (Vx_select_enable_clipboard_manager): New variable.
20103 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
20105 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
20107 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
20109 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20111 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
20112 in the current matrix if keep_current_p is non-zero.
20114 2011-06-04 Eli Zaretskii <eliz@gnu.org>
20116 * bidi.c (bidi_level_of_next_char): Fix last change.
20118 2011-06-03 Eli Zaretskii <eliz@gnu.org>
20120 Support bidi reordering of text covered by display properties.
20122 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
20123 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
20124 (bidi_cache_search, bidi_cache_iterator_state)
20125 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
20126 (bidi_level_of_next_char, bidi_move_to_visually_next):
20127 Support character positions inside a run of characters covered by a
20129 (bidi_paragraph_init, bidi_resolve_explicit_1)
20130 (bidi_level_of_next_char): Call bidi_fetch_char and
20131 bidi_fetch_char_advance instead of FETCH_CHAR and
20132 FETCH_CHAR_ADVANCE.
20133 (bidi_init_it): Initialize new members.
20134 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
20136 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
20137 instead of using explicit *_CHAR codes.
20138 (bidi_resolve_explicit, bidi_resolve_weak):
20139 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
20140 bidirectional text is supported only in multibyte buffers.
20141 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
20142 it to initialize the frame_window_p member of struct bidi_it.
20143 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
20144 (bidi_resolve_explicit, bidi_resolve_weak)
20145 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
20146 bidi_it->nchars is non-positive.
20147 (bidi_level_of_next_char): Don't try to lookup the cache for the
20148 next/previous character if nothing is cached there yet, or if we
20149 were just reseat()'ed to a new position.
20151 * xdisp.c (set_cursor_from_row): Set start and stop points
20152 according to the row's direction when priming the loop that looks
20153 for the glyph on which to display cursor.
20154 (single_display_spec_intangible_p): Function deleted.
20155 (display_prop_intangible_p): Reimplement to call
20156 handle_display_spec instead of single_display_spec_intangible_p.
20157 Accept 3 additional arguments needed by handle_display_spec.
20158 This fixes incorrect cursor motion across display property with complex
20159 values: lists, `(when COND...)' forms, etc.
20160 (single_display_spec_string_p): Support property values that are
20161 lists with the argument STRING its top-level element.
20162 (display_prop_string_p): Fix the condition for processing a
20163 property that is a list to be consistent with handle_display_spec.
20164 (handle_display_spec): New function, refactored from the
20165 last portion of handle_display_prop.
20166 (compute_display_string_pos): Accept additional argument
20167 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
20168 value of a `display' property is a "replacing spec".
20169 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
20170 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
20171 the display property, but just return a value indicating whether
20172 the display property will replace the characters it covers.
20173 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
20174 frame_window_p members of struct bidi_it.
20175 (compute_display_string_pos, compute_display_string_end):
20177 (push_it): Accept second argument POSITION, where pop_it should
20178 jump to continue iteration.
20179 (reseat_1): Initialize bidi_it.disp_pos.
20181 * keyboard.c (adjust_point_for_property): Adjust the call to
20182 display_prop_intangible_p to its new signature.
20184 * dispextern.h (struct bidi_it): New member frame_window_p.
20185 (bidi_init_it): Update prototypes.
20186 (display_prop_intangible_p): Update prototype.
20187 (compute_display_string_pos, compute_display_string_end):
20188 Declare prototypes.
20189 (struct bidi_it): New members nchars and disp_pos. ch_len is now
20192 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
20194 Malloc failure behavior now depends on size of allocation.
20195 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
20196 * lisp.h: Change signatures accordingly.
20197 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
20198 All callers changed. (Bug#8762)
20200 * gnutls.c: Use Emacs's memory allocators.
20201 Without this change, the gnutls library would invoke malloc etc.
20202 directly, which causes problems on non-SYNC_INPUT hosts, and which
20203 runs afoul of improving memory_full behavior. (Bug#8761)
20204 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
20205 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
20206 xfree instead of the default malloc, realloc, free.
20207 (Fgnutls_boot): No need to check for memory allocation failure,
20208 since xmalloc does that for us.
20210 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
20211 * category.c (hash_get_category_set):
20212 * ccl.c (ccl_driver):
20213 * charset.c (Fdefine_charset_internal):
20214 * charset.h (struct charset.hash_index):
20215 * composite.c (get_composition_id, gstring_lookup_cache)
20216 (composition_gstring_put_cache):
20217 * composite.h (struct composition.hash_index):
20218 * dispextern.h (struct image.hash):
20219 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
20220 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
20221 (hashfn_equal, hashfn_user_defined, make_hash_table)
20222 (maybe_resize_hash_table, hash_lookup, hash_put)
20223 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
20224 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
20225 (Fsxhash, Fgethash, Fputhash, Fmaphash):
20226 * image.c (make_image, search_image_cache, lookup_image)
20227 (xpm_put_color_table_h):
20228 * lisp.h (struct Lisp_Hash_Table):
20229 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
20230 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
20231 for hashes and hash indexes, instead of 'unsigned' and 'int'.
20232 * alloc.c (allocate_vectorlike):
20233 Check for overflow in vector size calculations.
20234 * ccl.c (ccl_driver):
20235 Check for overflow when converting EMACS_INT to int.
20236 * fns.c, image.c: Remove unnecessary static decls that would otherwise
20237 need to be updated by these changes.
20238 * fns.c (make_hash_table, maybe_resize_hash_table):
20239 Check for integer overflow with large hash tables.
20240 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
20241 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
20242 (SXHASH_REDUCE): New macro.
20243 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
20244 Use it instead of discarding useful hash info with large hash values.
20245 (sxhash_float): New function.
20246 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
20247 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
20248 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
20249 Rewrite to use FIXNUM_BITS, as this simplifies things.
20250 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
20251 Adjust signatures to match updated version of code.
20252 (consing_since_gc): Now EMACS_INT, since a single hash table can
20253 use more than INT_MAX bytes.
20255 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
20257 Make it possible to build with GCC-4.6+ -O2 -flto.
20259 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
20261 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
20263 * minibuf.c (get_minibuffer, read_minibuf_unwind):
20264 Call minibuffer-inactive-mode.
20266 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
20268 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
20269 Update dependencies.
20271 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20273 * data.c (init_data): Remove code for UTS, this system is not
20276 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20278 Don't force ./temacs to start in terminal mode.
20280 * frame.c (make_initial_frame): Initialize faces in all cases, not
20281 only when CANNOT_DUMP is defined.
20282 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
20284 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20286 * dispnew.c (add_window_display_history): Use const for the string
20287 pointer. Remove declaration, not needed.
20289 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
20291 Use 'inline', not 'INLINE'.
20292 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
20293 * alloc.c, fontset.c (INLINE): Remove.
20294 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
20295 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
20296 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
20297 * gmalloc.c (register_heapinfo): Use inline unconditionally.
20298 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
20300 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
20302 Make it possible to run ./temacs.
20304 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
20305 syms_of_callproc does the same thing. Remove test for
20306 "initialized", do it in the caller.
20307 * emacs.c (main): Avoid calling set_initial_environment when dumping.
20309 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
20311 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
20312 (read_minibuf): Use get_minibuffer.
20313 (syms_of_minibuf): Use DEFSYM.
20314 (Qmetadata): New var.
20315 * data.c (Qbuffer): Don't make it static.
20316 (syms_of_data): Use DEFSYM.
20318 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
20320 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
20321 (CCL_CODE_MIN): New macro.
20323 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
20325 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
20327 * eval.c (Qdebug): Now static.
20328 * lisp.h (Qdebug): Remove decl. This reverts a part of the
20329 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
20330 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
20332 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
20334 * image.c: Various fixes to ImageMagick code comments.
20335 (Fimagemagick_types): Doc fix.
20337 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
20339 Minor fixes prompted by GCC 4.6.0 warnings.
20341 * xselect.c (converted_selections, conversion_fail_tag): Now static.
20343 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
20344 (x_clipboard_manager_save_all): Move extern decl to ...
20345 * xterm.h: ... here, so that it can be checked for consistency.
20347 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
20349 * xselect.c (x_clipboard_manager_save_frame)
20350 (x_clipboard_manager_save_all): New functions.
20351 (Fx_clipboard_manager_save): Lisp function deleted.
20353 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
20354 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
20356 * xterm.h: Update prototype.
20358 2011-05-28 William Xu <william.xwl@gmail.com>
20360 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
20361 exiting (Bug#8239).
20363 2011-05-28 Jim Meyering <meyering@redhat.com>
20365 Avoid a sign-extension bug in crypto_hash_function.
20366 * fns.c (to_uchar): Define.
20367 (crypto_hash_function): Use it to convert some newly-signed
20368 variables to unsigned, to avoid sign-extension bugs. For example,
20369 without this change, (md5 "truc") would evaluate to
20370 45723a2aff78ff4fff7fff1114760e62 rather than the expected
20371 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
20372 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
20374 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
20376 Integer overflow fixes.
20378 * dbusbind.c: Serial number integer overflow fixes.
20379 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
20380 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
20381 to hold a serial number that is too large for a fixnum.
20382 (Fdbus_method_return_internal, Fdbus_method_error_internal):
20383 Check for serial numbers out of range. Decode any serial number
20384 that was so large that it became a float. (Bug#8722)
20386 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
20387 (Fdbus_call_method, Fdbus_call_method_asynchronously):
20388 Use XFASTINT rather than XUINT when numbers are nonnegative.
20389 (xd_append_arg, Fdbus_method_return_internal):
20390 (Fdbus_method_error_internal): Likewise. Also, for unsigned
20391 arguments, check that Lisp number is nonnegative, rather than
20392 silently wrapping negative numbers around. (Bug#8722)
20393 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
20396 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
20398 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
20400 ccl: Add integer overflow checks.
20401 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
20402 (IN_INT_RANGE): New macros.
20403 (ccl_driver): Use them to check for integer overflow when
20404 decoding a CCL program. Many of the new checks are whether XINT (x)
20405 fits in int; it doesn't always, on 64-bit hosts. The new version
20406 doesn't catch all possible integer overflows, but it's an
20407 improvement. (Bug#8719)
20409 * alloc.c (make_event_array): Use XINT, not XUINT.
20410 There's no need for unsigned here.
20412 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
20413 This follows up to the 2011-05-06 change that substituted uintptr_t
20414 for EMACS_INT. This case wasn't caught back then.
20416 Rework Fformat to avoid integer overflow issues.
20417 * editfns.c: Include <float.h> unconditionally, as it's everywhere
20418 now (part of C89). Include <verify.h>.
20419 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
20420 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
20421 (Fformat): Avoid the prepass trying to compute sizes; it was only
20422 approximate and thus did not catch overflow reliably. Instead, walk
20423 through the format just once, formatting and computing sizes as we go,
20424 checking for integer overflow at every step, and allocating a larger
20425 buffer as needed. Keep track separately whether the format is
20426 multibyte. Keep only the most-recently calculated precision, rather
20427 than them all. Record whether each argument has been converted to
20428 string. Use EMACS_INT, not int, for byte and char and arg counts.
20429 Support field widths and precisions larger than INT_MAX. Avoid
20430 sprintf's undefined behavior with conversion specifications such as %#d
20431 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
20432 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
20433 formatting out-of-range floating point numbers with int
20434 formats. (Bug#8668)
20436 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
20438 * data.c: Avoid integer truncation in expressions involving floats.
20439 * data.c: Include <intprops.h>.
20440 (arith_driver): When there's an integer overflow in an expression
20441 involving floating point, convert the integers to floating point
20442 so that the resulting value does not suffer from catastrophic
20443 integer truncation. For example, on a 64-bit host (* 4
20444 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
20445 Do not rely on undefined behavior after integer overflow.
20447 merge count_size_as_multibyte, parse_str_to_multibyte
20448 * character.c, character.h (count_size_as_multibyte):
20449 Rename from parse_str_to_multibyte; all uses changed.
20450 Check for integer overflow.
20451 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
20452 since it's now a duplicate of the other. This is more of
20453 a character than a buffer op, so better that it's in character.c.
20454 * fns.c, print.c: Adjust to above changes.
20456 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
20458 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
20460 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
20462 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
20463 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
20464 (x_clipboard_manager_save): Now static.
20465 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
20467 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
20468 (crypto_hash_function): Now static.
20469 Fix pointer signedness problems. Avoid unnecessary initializations.
20471 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
20473 * termhooks.h (Vselection_alist): Make it terminal-local.
20475 * terminal.c (create_terminal): Initialize it.
20477 * xselect.c: Support for clipboard managers.
20478 (Vselection_alist): Move to termhooks.h as terminal-local var.
20479 (LOCAL_SELECTION): New macro.
20480 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
20481 (symbol_to_x_atom): Remove gratuitous arg.
20482 (x_handle_selection_request, lisp_data_to_selection_data)
20483 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
20484 (x_own_selection, x_get_local_selection, x_convert_selection):
20485 New arg, specifying work frame. Use terminal-local Vselection_alist.
20486 (some_frame_on_display): Delete unused function.
20487 (Fx_own_selection_internal, Fx_get_selection_internal)
20488 (Fx_disown_selection_internal, Fx_selection_owner_p)
20489 (Fx_selection_exists_p): New optional frame arg.
20490 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
20491 (x_handle_selection_clear): Don't treat other terminals with the
20492 same keyboard specially. Use the terminal-local Vselection_alist.
20493 (x_clear_frame_selections): Use Frun_hook_with_args.
20495 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
20497 * xterm.h: Add support for those atoms.
20499 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
20501 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
20502 (converted_selections, conversion_fail_tag): New global variables.
20503 (x_selection_request_lisp_error): Free the above.
20504 (x_get_local_selection): Remove unnecessary code.
20505 (x_reply_selection_request): Args changed; handle arbitrary array
20506 of converted selections stored in converted_selections.
20507 Separate the XChangeProperty and SelectionNotify steps.
20508 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
20509 (x_convert_selection): New function.
20510 (x_handle_selection_event): Simplify.
20511 (x_get_foreign_selection): Don't ignore incoming requests while
20512 waiting for an answer; this will fail when we implement
20513 SAVE_TARGETS, and seems unnecessary anyway.
20514 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
20515 (Vx_sent_selection_functions): Doc fix.
20517 2011-05-26 Leo Liu <sdl.web@gmail.com>
20519 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
20521 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20523 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
20525 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
20526 for fringe update if it has periodic bitmap.
20527 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
20528 and fringe_bitmap_periodic_p.
20530 * fringe.c (get_fringe_bitmap_data): New function.
20531 (draw_fringe_bitmap_1, update_window_fringes): Use it.
20532 (update_window_fringes): Record periodicity of fringe bitmap in glyph
20533 row. Mark glyph row for fringe update if periodicity changed.
20535 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
20536 for fringe update unless it has periodic bitmap.
20538 2011-05-25 Kenichi Handa <handa@m17n.org>
20540 * xdisp.c (get_next_display_element): Set correct it->face_id for
20541 a static composition.
20543 2011-05-24 Leo Liu <sdl.web@gmail.com>
20546 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
20548 * fns.c (crypto_hash_function, Fsha1): New function.
20549 (Fmd5): Use crypto_hash_function.
20550 (syms_of_fns): Add Ssha1.
20552 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
20554 * gnutls.c: Remove unused macros.
20555 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
20556 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
20557 Remove macros that are defined and never used.
20558 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
20560 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
20562 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
20563 (Fx_get_selection_internal): Minor cleanup.
20564 (Fx_own_selection_internal): Rename arguments for consistency with
20567 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
20569 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
20571 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
20573 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
20575 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20577 * dispnew.c (scrolling_window): Don't exclude the case that the
20578 last enabled row in the desired matrix touches the bottom boundary.
20580 2011-05-21 Glenn Morris <rgm@gnu.org>
20582 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
20583 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
20584 and add some more files.
20586 2011-05-20 Eli Zaretskii <eliz@gnu.org>
20588 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
20589 report_file_error introduced by the change from 2011-05-07.
20591 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
20593 * systime.h (Time): Define only if emacs is defined.
20594 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
20595 where the include path doesn't have X11/X.h by default. See
20596 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
20598 2011-05-20 Kenichi Handa <handa@m17n.org>
20600 * composite.c (find_automatic_composition): Fix previous change.
20602 2011-05-20 Glenn Morris <rgm@gnu.org>
20604 * lisp.mk: New file, split from Makefile.in.
20605 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
20606 (shortlisp): Remove.
20607 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
20609 2011-05-19 Glenn Morris <rgm@gnu.org>
20611 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
20612 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
20613 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
20614 (lisp): Set the order to that of loadup.el.
20615 (shortlisp): Make it a copy of $lisp.
20616 (SOME_MACHINE_LISP): Remove.
20617 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
20618 Use just $shortlisp, not $SOME_MACHINE_LISP too.
20620 2011-05-18 Kenichi Handa <handa@m17n.org>
20622 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
20623 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
20624 (find_automatic_composition): Mostly rewrite for efficiency.
20626 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
20628 * makefile.w32-in: Update dependencies.
20630 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
20632 * menu.c: Include limits.h (fixes the MS-Windows build broken by
20633 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
20635 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
20637 Fix some integer overflow issues, such as string length overflow.
20639 * insdel.c (count_size_as_multibyte): Check for string overflow.
20641 * character.c (lisp_string_width): Check for string overflow.
20642 Use EMACS_INT, not int, for string indexes and lengths; in
20643 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
20644 the resulting string length overflows an EMACS_INT; instead,
20645 report a string overflow if no precision given. When checking for
20646 precision exhaustion, use a check that cannot possibly have
20647 integer overflow. (Bug#8675)
20648 * character.h (lisp_string_width): Adjust to new signature.
20650 * alloc.c (string_overflow): New function.
20651 (Fmake_string): Use it. This doesn't change behavior, but saves
20652 a few bytes and will simplify future changes.
20653 * character.c (string_escape_byte8): Likewise.
20654 * lisp.h (string_overflow): New decl.
20656 Fixups, following up to the user-interface timestamp change.
20657 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
20658 for UI timestamps, instead of unsigned long.
20659 * msdos.c (mouse_get_pos): Likewise.
20660 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
20661 * w32gui.h (Time): Define by including "systime.h" rather than by
20662 declaring it ourselves. (Bug#8664)
20664 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
20665 * image.c (clear_image_cache): Likewise.
20667 * term.c (term_mouse_position): Don't assume time_t wraparound.
20669 Be more systematic about user-interface timestamps.
20670 Before, the code sometimes used 'Time', sometimes 'unsigned long',
20671 and sometimes 'EMACS_UINT', to represent these timestamps.
20672 This change causes it to use 'Time' uniformly, as that's what X uses.
20673 This makes the code easier to follow, and makes it easier to catch
20674 integer overflow bugs such as Bug#8664.
20675 * frame.c (Fmouse_position, Fmouse_pixel_position):
20676 Use Time, not unsigned long, for user-interface timestamps.
20677 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
20678 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
20679 * keyboard.h (last_event_timestamp): Likewise.
20680 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
20681 * menu.h (xmenu_show): Likewise.
20682 * term.c (term_mouse_position): Likewise.
20683 * termhooks.h (struct input_event.timestamp): Likewise.
20684 (struct terminal.mouse_position_hook): Likewise.
20685 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
20686 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
20687 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
20688 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
20689 what it was before.
20690 * menu.h, termhooks.h: Include "systime.h", for Time.
20692 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
20693 Don't assume that the difference between two unsigned long values
20694 can fit into an integer. At this point, we know button_down_time
20695 <= event->timestamp, so the difference must be nonnegative, so
20696 there's no need to cast the result if double-click-time is
20697 nonnegative, as it should be; check that it's nonnegative, just in
20698 case. This bug is triggered when events are more than 2**31 ms
20699 apart (about 25 days). (Bug#8664)
20701 * xselect.c (last_event_timestamp): Remove duplicate decl.
20702 (x_own_selection): Remove needless cast to unsigned long.
20704 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
20705 that always fit in int. Use a sentinel instead of a counter, to
20706 avoid a temp and to allay GCC's concerns about possible int overflow.
20707 * frame.h (struct frame): Use int for menu_bar_items_used
20708 instead of EMACS_INT, since it always fits in int.
20710 * menu.c (grow_menu_items): Check for int overflow.
20712 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
20714 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
20715 Before, the code was not consistent. These values cannot exceed
20716 2**31 - 1 so there's no need to make them unsigned.
20717 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
20718 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
20719 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
20721 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
20723 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
20724 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
20725 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
20726 presumably because the widths might not match.
20728 * window.c (size_window): Avoid needless test at loop start.
20730 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
20732 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
20734 2011-05-12 Drew Adams <drew.adams@oracle.com>
20736 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
20738 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
20740 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
20741 `width' to `bar_area_x' and `bar_area_width', respectively.
20742 (x_scroll_run): Take account of fringe background extension.
20744 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
20745 Rename local vars `left' and `width' to `bar_area_x' and
20746 `bar_area_width', respectively.
20747 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
20748 background extension.
20750 2011-05-10 Jim Meyering <meyering@redhat.com>
20752 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
20754 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
20756 * image.c (Finit_image_library): Return t for built-in image types,
20757 like pbm and xbm. (Bug#8640)
20759 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
20761 * w32menu.c (set_frame_menubar): Fix submenu allocation.
20763 2011-05-07 Eli Zaretskii <eliz@gnu.org>
20765 * w32console.c (Fset_screen_color): Doc fix.
20766 (Fget_screen_color): New function.
20767 (syms_of_ntterm): Defsubr it.
20769 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
20770 unlink the temporary file if Fcall_process didn't create it in the
20772 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
20773 child process will be redirected to a file specified with `:file'.
20774 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
20775 cue to call_process_cleanup not to close that handle.
20777 2011-05-07 Ben Key <bkey76@gmail.com>
20779 * makefile.w32-in: The bootstrap-temacs rule now makes use of
20780 one of two shell specific rules, either bootstrap-temacs-CMD or
20781 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
20782 to the previous implementation of the bootstrap-temacs rule.
20783 The bootstrap-temacs-CMD rule is similar to the previous
20784 implementation of the bootstrap-temacs rule except that it
20785 makes use of the ESC_CFLAGS variable instead of the CFLAGS
20788 These changes, along with some changes to nt/configure.bat,
20789 nt/gmake.defs, and nt/nmake.defs, are required to extend my
20790 earlier fix to add support for --cflags and --ldflags options
20791 that include quotes so that it works whether make uses cmd or
20794 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
20796 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
20797 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
20799 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
20800 a string. Handle both cases.
20801 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
20802 (Fdbus_register_method): Use Qinvalid_function.
20804 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
20806 * makefile.w32-in: Update dependencies.
20807 (LISP_H): Add inttypes.h and stdin.h.
20808 (PROCESS_H): Add unistd.h.
20810 2011-05-06 Eli Zaretskii <eliz@gnu.org>
20812 * lread.c: Include limits.h (fixes the MS-Windows build broken by
20813 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
20815 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
20817 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
20819 * term.c (vfatal): Remove stray call to va_end.
20820 It's not needed and the C Standard doesn't allow it here anyway.
20822 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
20823 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
20825 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
20828 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
20830 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
20832 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
20834 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
20836 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
20838 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
20839 * charset.c (Fdefine_charset_internal): Don't initialize
20840 charset.code_space[15]. The value was garbage, on hosts with
20841 32-bit int (Bug#8600).
20843 * lread.c (read_integer): Be more consistent with string-to-number.
20844 Use string_to_number to do the actual conversion; this avoids
20845 rounding errors and fixes some other screwups. Without this fix,
20846 for example, #x1fffffffffffffff was misread as -2305843009213693952.
20847 (digit_to_number): Move earlier, for benefit of read_integer.
20848 Return -1 if the digit is out of range for the base, -2 if it is
20849 not a digit in any supported base. (Bug#8602)
20851 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
20853 * dispnew.c (scrolling_window): Return 1 if we scrolled,
20854 to match comment at start of function. This also removes a
20855 GCC warning about overflow in a 32+64-bit port.
20857 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
20859 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
20860 Reported by Stefan Monnier in
20861 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
20862 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
20863 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
20865 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
20866 (EMACS_UINTPTR): Likewise, with uintptr_t.
20868 * lisp.h: Prefer 64-bit EMACS_INT if available.
20869 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
20870 on 32-bit hosts that have 64-bit int, so that they can access
20872 However, temporarily disable this change unless the temporary
20873 symbol WIDE_EMACS_INT is defined.
20875 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
20877 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
20878 This removes an assumption that EMACS_INT and long are the same
20879 width as pointers. The assumption is true for Emacs porting targets
20880 now, but we want to make other targets possible.
20881 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
20882 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
20883 In the rest of the code, change types of integers that hold casted
20884 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
20885 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
20886 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
20887 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
20888 No need to cast type when ORing.
20889 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
20890 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
20891 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
20892 assume EMACS_INT is the same width as char *.
20893 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
20894 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
20895 Remove no-longer-needed casts.
20896 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
20897 (xg_tool_bar_help_callback, xg_make_tool_item):
20898 Use EMACS_INTPTR to hold an integer
20899 that will be cast to void *; this can avoid a GCC warning
20900 if EMACS_INT is not the same width as void *.
20901 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
20902 * xdisp.c (display_echo_area_1, resize_mini_window_1):
20903 (current_message_1, set_message_1):
20904 Use a local to convert to proper width without a cast.
20905 * xmenu.c (dialog_selection_callback): Likewise.
20907 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
20908 Also, don't assume VALBITS / RAND_BITS is less than 5,
20909 and don't rely on undefined behavior when shifting a 1 left into
20911 * lisp.h (get_random): Change signature to match.
20913 * lread.c (hash_string): Use size_t, not int, for hash computation.
20914 Normally we prefer signed values; but hashing is special, because
20915 it's better to use unsigned division on hash table sizes so that
20916 the remainder is nonnegative. Also, size_t is the natural width
20917 for hashing into memory. The previous code used 'int', which doesn't
20918 retain enough info to hash well into very large tables.
20919 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
20921 * dbusbind.c: Don't possibly lose pointer info when converting.
20922 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
20923 Use XPNTR rather than XHASH, so that the high-order bits of
20924 the pointer aren't lost when converting through void *.
20926 * eval.c (Fautoload): Don't double-shift a pointer.
20928 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
20930 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
20932 * gnutls.c (DEF_GNUTLS_FN):
20933 * image.c (DEF_IMGLIB_FN): Make function pointers static.
20935 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
20937 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
20940 2011-05-05 Eli Zaretskii <eliz@gnu.org>
20942 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
20943 New version that can reserve upto 2GB of heap space.
20945 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
20947 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
20949 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
20951 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
20952 `gnutls_certificate_set_x509_key_file'.
20954 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
20956 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
20957 Update dependencies.
20959 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
20961 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
20962 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
20963 Remove unused parameter `fildes'.
20964 * process.c (read_process_output, send_process): Don't pass it.
20966 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
20968 Fix previous change: the library cache is defined in w32.c.
20969 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
20970 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
20972 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
20974 Implement dynamic loading of GnuTLS on Windows.
20976 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
20977 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
20978 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
20981 * gnutls.c (Qgnutls_dll): Define.
20982 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
20983 (gnutls_*): Declare function pointers.
20984 (init_gnutls_functions): New function to initialize function pointers.
20985 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
20986 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
20987 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
20988 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
20989 (emacs_gnutls_write, emacs_gnutls_read)
20990 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
20991 (Fgnutls_available_p): New function.
20992 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
20993 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
20994 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
20996 * image.c: Include w32.h.
20997 (Vimage_type_cache): Delete.
20998 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
20999 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
21000 (w32_delayed_load): Move to w32.c.
21002 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
21004 * w32.c (QCloaded_from, Vlibrary_cache): Define.
21005 (w32_delayed_load): Move from image.c. When loading a library, record
21006 its filename in the :loaded-from property of the library id.
21007 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
21008 Initialize and staticpro them.
21009 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
21011 * process.c: Include lisp.h before w32.h, not after.
21012 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
21013 instead of gnutls_record_check_pending.
21015 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
21017 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
21019 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
21020 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
21023 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
21025 * xterm.c (x_set_frame_alpha): Do not set property on anything
21026 else than FRAME_X_OUTER_WINDOW (Bug#8608).
21028 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
21030 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
21032 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
21034 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
21035 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
21036 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
21037 (gnutls_global_initialized, Qgnutls_bootprop_priority)
21038 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
21039 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
21040 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
21041 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
21042 (Qgnutls_bootprop_callbacks_verify): Make static.
21044 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
21046 * callproc.c: Indentation fixup.
21048 * sysdep.c (wait_for_termination_1): Make static.
21049 (wait_for_termination, interruptible_wait_for_termination):
21050 Move after wait_for_termination_1.
21052 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
21054 * sysdep.c (interruptible_wait_for_termination): New function
21055 which is like wait_for_termination, but allows keyboard
21058 * callproc.c (Fcall_process): Add (:file "file") as an option for
21060 (Fcall_process_region): Ditto.
21062 2011-04-30 Eli Zaretskii <eliz@gnu.org>
21064 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
21065 rather than `XVECTOR (FOO)->size'.
21067 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
21068 inttypes.h, as a gnulib replacement is used if it not available in
21071 2011-04-21 Eli Zaretskii <eliz@gnu.org>
21073 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
21074 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
21075 of MOST_POSITIVE_FIXNUM. (Bug#8528)
21077 * coding.c (coding_alloc_by_realloc): Error out if destination
21078 will grow beyond MOST_POSITIVE_FIXNUM.
21079 (decode_coding_emacs_mule): Abort if there isn't enough place in
21080 charbuf for the composition carryover bytes. Reserve an extra
21081 space for up to 2 characters produced in a loop.
21082 (decode_coding_iso_2022): Abort if there isn't enough place in
21083 charbuf for the composition carryover bytes.
21085 2011-04-21 Eli Zaretskii <eliz@gnu.org>
21087 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
21088 aborting when %lld or %lll format is passed.
21089 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
21090 %llo or %llx format is passed. (Bug#8545)
21092 * window.c (window_scroll_line_based): Use a marker instead of
21093 simple variables to record original value of point. (Bug#7952)
21095 * doprnt.c (doprnt): Fix the case where a multibyte sequence
21096 produced by %s or %c overflows available buffer space. (Bug#8545)
21098 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
21100 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
21101 (SIZE_MAX): Move defn after all includes, as they might #define it.
21103 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
21105 * w32.c (init_environment): Warn about defaulting HOME to C:\.
21107 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
21109 * keyboard.c (Qdelayed_warnings_hook): Define.
21110 (command_loop_1): Run `delayed-warnings-hook'
21111 if Vdelayed_warnings_list is non-nil.
21112 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
21113 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
21115 2011-04-28 Eli Zaretskii <eliz@gnu.org>
21117 * doprnt.c (doprnt): Don't return value smaller than the buffer
21118 size if the message was truncated. (Bug#8545).
21120 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
21122 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
21123 (Fx_window_property): #if-0 the whole functions, not just the bodies.
21125 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
21127 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
21129 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
21131 * makefile.w32-in: Update dependencies.
21133 2011-04-27 Eli Zaretskii <eliz@gnu.org>
21135 Improve `doprnt' and its usage. (Bug#8545)
21136 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
21137 `format_end'. Remove support for %l as a conversion specifier.
21138 Don't use xrealloc. Improve diagnostics when the %l size modifier
21139 is used. Update the commentary.
21141 * eval.c (verror): Simplify calculation of size_t.
21143 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
21146 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
21148 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
21151 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
21153 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
21154 This makes this file independent of the recent pseudovector change.
21156 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
21158 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
21160 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
21161 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
21162 Remove unused local.
21163 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
21165 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
21166 GCC 4.6.0 optimizes based on type-based alias analysis.
21167 For example, if b is of type struct buffer * and v of type struct
21168 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
21169 != &v->size, and therefore "v->size = 1; b->size = 2; return
21170 v->size;" must therefore return 1. This assumption is incorrect
21171 for Emacs, since it type-puns struct Lisp_Vector * with many other
21172 types. To fix this problem, this patch adds a new type struct
21173 vectorlike_header that documents the constraints on layout of vectors
21174 and pseudovectors, and helps optimizing compilers not get fooled
21175 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
21176 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
21177 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
21179 (XSETPVECTYPE): Rewrite in terms of new macro.
21180 (XSETPVECTYPESIZE): New macro, specifying both type and size.
21181 This is a bit clearer, and further avoids the possibility of
21182 undesirable aliasing.
21183 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
21184 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
21185 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
21186 since Lisp_Subr is a special case (no "next" field).
21187 (ASIZE): Now uses header.size rather than size.
21188 All previous uses of XVECTOR (foo)->size replaced to use this macro,
21189 to avoid the hassle of writing XVECTOR (foo)->header.size.
21190 (struct vectorlike_header): New type.
21191 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
21192 object, to help avoid aliasing.
21193 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
21194 (SUBRP): Likewise, since Lisp_Subr is a special case.
21195 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
21196 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
21197 (struct Lisp_Hash_Table): Combine first two members into a single
21198 struct vectorlike_header member. All uses of "size" and "next" members
21199 changed to be "header.size" and "header.next".
21200 * buffer.h (struct buffer): Likewise.
21201 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
21202 * frame.h (struct frame): Likewise.
21203 * process.h (struct Lisp_Process): Likewise.
21204 * termhooks.h (struct terminal): Likewise.
21205 * window.c (struct save_window_data, struct saved_window): Likewise.
21206 * window.h (struct window): Likewise.
21207 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
21208 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
21209 * buffer.c (init_buffer_once): Likewise.
21210 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
21212 * process.c (Fformat_network_address): Use local var for size,
21215 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
21217 Make the Lisp reader and string-to-float more consistent (Bug#8525)
21218 * data.c (atof): Remove decl; no longer used or needed.
21219 (digit_to_number): Move to lread.c.
21220 (Fstring_to_number): Use new string_to_number function, to be
21221 consistent with how the Lisp reader treats infinities and NaNs.
21222 Do not assume that floating-point numbers represent EMACS_INT
21223 without losing information; this is not true on most 64-bit hosts.
21224 Avoid double-rounding errors, by insisting on integers when
21225 parsing non-base-10 numbers, as the documentation specifies.
21226 * lisp.h (string_to_number): New decl, replacing ...
21227 (isfloat_string): Remove.
21228 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
21229 (read1): Do not accept +. and -. as integers; this
21230 appears to have been a coding error. Similarly, do not accept
21231 strings like +-1e0 as floating point numbers. Do not report
21232 overflow for integer overflows unless the base is not 10 which
21233 means we have no simple and reliable way to continue.
21234 Break out the floating-point parsing into a new
21235 function string_to_number, so that Fstring_to_number parses
21236 floating point numbers consistently with the Lisp reader.
21237 (digit_to_number): Move here from data.c. Make it static inline.
21238 (E_CHAR, EXP_INT): Remove, replacing with ...
21239 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
21240 (string_to_number): New function, replacing isfloat_string.
21241 This function checks for valid syntax and produces the resulting
21242 Lisp float number too. Rework it so that string-to-number
21243 no longer mishandles examples like "1.0e+". Use strtoumax,
21244 so that overflow for non-base-10 numbers is reported only when
21245 there's no portable and simple way to convert to floating point.
21247 * textprop.c (set_text_properties_1): Rewrite for clarity,
21248 and to avoid GCC warning about integer overflow.
21250 * intervals.h (struct interval): Use EMACS_INT for members
21251 where EMACS_UINT might cause problems. See
21252 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
21253 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
21254 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
21256 (offset_intervals): Tell GCC not to worry about length overflow
21257 when negating a negative length.
21259 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
21260 (overrun_check_free): Likewise.
21262 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
21263 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
21266 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
21267 (gnutls_make_error): Rename local to avoid shadowing.
21268 (gnutls_emacs_global_deinit): ifdef out; not used.
21269 (Fgnutls_boot): Use const for pointer to readonly storage.
21270 Comment out unused local. Fix pointer signedness problems.
21272 * lread.c (openp): Don't stuff size_t into an 'int'.
21273 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
21274 about possible signed overflow.
21276 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
21277 (GDK_KEY_g): Don't define if already defined.
21278 (xg_prepare_tooltip): Avoid pointer signedness problem.
21279 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
21281 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
21282 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
21284 * xfns.c (Fx_window_property): Simplify a bit,
21285 to make a bit faster and to avoid GCC 4.6.0 warning.
21286 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
21288 * fns.c (internal_equal): Don't assume size_t fits in int.
21290 * alloc.c (compact_small_strings): Tighten assertion a little.
21292 Replace pEd with more-general pI, and fix some printf arg casts.
21293 * lisp.h (pI): New macro, generalizing old pEd macro to other
21294 conversion specifiers. For example, use "...%"pI"d..." rather
21295 than "...%"pEd"...".
21296 (pEd): Remove. All uses replaced with similar uses of pI.
21297 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
21298 * alloc.c (check_pure_size): Don't overflow by converting size to int.
21299 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
21300 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
21301 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
21302 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
21303 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
21305 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
21306 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
21307 * print.c (safe_debug_print, print_object): Likewise.
21308 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
21310 Use pI instead of if-then-else-abort. Use %p to avoid casts,
21311 avoiding the 0 flag, which is not portable.
21312 * process.c (Fmake_network_process): Use pI to avoid cast.
21313 * region-cache.c (pp_cache): Likewise.
21314 * xdisp.c (decode_mode_spec): Likewise.
21315 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
21316 behavior on 64-bit hosts with printf arg.
21317 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
21318 (x_stop_queuing_selection_requests): Likewise.
21319 (x_get_window_property): Don't truncate byte count to an 'int'
21322 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
21323 here, since it parses constructs like leading '-' and spaces,
21324 which are not wanted; and it overflows with large numbers.
21325 Instead, simply match F[0-9]+, which is what is wanted anyway.
21327 * alloc.c: Remove unportable assumptions about struct layout.
21328 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
21329 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
21330 (allocate_vectorlike, make_pure_vector): Use the new macros,
21331 plus offsetof, to remove unportable assumptions about struct layout.
21332 These assumptions hold on all porting targets that I know of, but
21333 they are not guaranteed, they're easy to remove, and removing them
21334 makes further changes easier.
21336 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
21337 This doesn't fix a bug but makes the code clearer.
21338 (string_overrun_cookie): Now const. Use initializers that
21339 don't formally overflow signed char, to avoid warnings.
21340 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
21341 can cause Emacs to crash when string overrun checking is enabled.
21342 (allocate_buffer): Don't assume sizeof (struct buffer) is a
21343 multiple of sizeof (EMACS_INT); it need not be, if
21344 alignof(EMACS_INT) < sizeof (EMACS_INT).
21345 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
21347 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
21349 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
21351 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
21353 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
21354 supposed to be handshaking. (Bug#8556)
21355 Reported by Paul Eggert <eggert@cs.ucla.edu>.
21357 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
21359 * lisp.h (Qdebug): List symbol.
21360 * eval.c (Qdebug): Restore global linkage.
21361 * keyboard.c (debug-on-event): New variable.
21362 (handle_user_signal): Break into debugger when debug-on-event
21363 matches the current signal symbol.
21365 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
21367 * alloc.c (check_sblock, check_string_bytes)
21368 (check_string_free_list): Convert to standard C.
21370 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
21372 * w32.c (emacs_gnutls_push): Fix typo.
21374 2011-04-25 Eli Zaretskii <eliz@gnu.org>
21376 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
21377 "cast to pointer from integer of different size".
21379 Improve doprnt and its use in verror. (Bug#8545)
21380 * doprnt.c (doprnt): Document the set of format control sequences
21381 supported by the function. Use SAFE_ALLOCA instead of always
21384 * eval.c (verror): Don't limit the buffer size at size_max-1, that
21385 is one byte too soon. Don't use xrealloc; instead xfree and
21388 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
21390 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
21393 * gnutls.c: Renamed global_initialized to
21394 gnutls_global_initialized. Added internals for the
21395 :verify-hostname-error, :verify-error, and :verify-flags
21396 parameters of `gnutls-boot' and documented those parameters in the
21397 docstring. Start callback support.
21398 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
21399 unless a fatal error occurred. Call gnutls_alert_send_appropriate
21400 on error. Return error code.
21401 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
21402 (emacs_gnutls_read): Likewise.
21403 (Fgnutls_boot): Return handshake error code.
21404 (emacs_gnutls_handle_error): New function.
21405 (wsaerror_to_errno): Likewise.
21407 * w32.h (emacs_gnutls_pull): Add prototype.
21408 (emacs_gnutls_push): Likewise.
21410 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
21411 (emacs_gnutls_push): Likewise.
21413 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
21415 * process.c (wait_reading_process_output): Check if GnuTLS
21416 buffered some data internally if no FDs are set for TLS
21419 * makefile.w32-in (OBJ2): Add gnutls.$(O).
21420 (LIBS): Link to USER_LIBS.
21421 ($(BLD)/gnutls.$(0)): New target.
21423 2011-04-24 Eli Zaretskii <eliz@gnu.org>
21425 * xdisp.c (handle_single_display_spec): Rename the
21426 display_replaced_before_p argument into display_replaced_p, to
21427 make it consistent with the commentary. Fix typos in the
21430 * textprop.c (syms_of_textprop): Remove dead code.
21431 (copy_text_properties): Delete obsolete commentary about an
21432 interface that was deleted long ago. Fix typos in the description
21435 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
21436 to changes in oldXMenu/XMenu.h from 2011-04-16.
21437 <menu_help_message, prev_menu_help_message>: Constify.
21438 (IT_menu_make_room): menu->help_text is now `const char **';
21441 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
21442 to changes in oldXMenu/XMenu.h from 2011-04-16.
21443 (struct XMenu): Declare `help_text' `const char **'.
21445 * xfaces.c <Qunspecified>: Make extern again.
21447 * syntax.c: Include sys/types.h before including regex.h, as
21450 * doc.c (get_doc_string): Improve the format passed to `error'.
21452 * doprnt.c (doprnt): Improve commentary.
21454 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
21456 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
21459 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
21460 changes in globals.h immediately force recompilation.
21461 (TAGS): Depend on $(CURDIR)/m/intel386.h and
21462 $(CURDIR)/s/ms-w32.h.
21463 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
21465 * character.c (Fchar_direction): Function deleted.
21466 (syms_of_character): Don't defsubr it.
21467 <char-direction-table>: Deleted.
21469 2011-04-23 Eli Zaretskii <eliz@gnu.org>
21471 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
21472 * doprnt.c: Include limits.h.
21473 (SIZE_MAX): New macro.
21474 (doprnt): Return a size_t value. 2nd arg is now size_t.
21475 Many local variables are now size_t instead of int or unsigned.
21476 Improve overflow protection. Support `l' modifier for integer
21477 conversions. Support %l conversion. Don't assume an EMACS_INT
21478 argument for integer conversions and for %c.
21480 * lisp.h (doprnt): Restore prototype.
21482 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
21483 $(SRC)/character.h.
21485 * Makefile.in (base_obj): Add back doprnt.o.
21487 * deps.mk (doprnt.o): Add back prerequisites.
21488 (callint.o): Depend on character.h.
21490 * eval.c (internal_lisp_condition_case): Include the handler
21491 representation in the error message.
21492 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
21493 when breaking from the loop.
21495 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
21497 * callint.c (Fcall_interactively): When displaying error message
21498 about invalid control letter, pass the character's codepoint, not
21499 a pointer to its multibyte form. Improve display of the character
21500 in octal and display also its hex code.
21502 * character.c (char_string): Use %x to display the (unsigned)
21503 codepoint of an invalid character, to avoid displaying a bogus
21506 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
21507 `error', not SYMBOL_NAME itself.
21509 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
21510 character arguments to `error'.
21512 * charset.c (check_iso_charset_parameter): Fix incorrect argument
21513 to `error' in error message about FINAL_CHAR argument. Make sure
21514 FINAL_CHAR is a character, and use %c when it is passed as
21515 argument to `error'.
21517 2011-04-23 Eli Zaretskii <eliz@gnu.org>
21519 * s/ms-w32.h (localtime): Redirect to sys_localtime.
21521 * w32.c: Include <time.h>.
21522 (sys_localtime): New function.
21524 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
21526 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
21528 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
21530 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
21532 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
21533 zombies (Bug#8467).
21535 2011-04-19 Eli Zaretskii <eliz@gnu.org>
21537 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
21538 gl_state.e_property when gl_state.object is Qt.
21540 * insdel.c (make_gap_larger): Remove limitation of buffer size
21543 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
21545 * xdisp.c (lookup_glyphless_char_display)
21546 (produce_glyphless_glyph): Handle cons cell entry in
21547 glyphless-char-display.
21548 (Vglyphless_char_display): Document it.
21550 * term.c (produce_glyphless_glyph): Handle cons cell entry in
21551 glyphless-char-display.
21553 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
21555 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
21557 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
21559 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
21560 definition for no-X builds.
21562 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
21564 Static checks with GCC 4.6.0 and non-default toolkits.
21566 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
21568 * process.c (keyboard_bit_set): Define only if SIGIO.
21569 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
21570 (send_process): Repair possible setjmp clobbering.
21572 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
21574 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
21576 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
21578 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
21579 Define only if needed.
21581 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
21582 by pacifying GCC about it. Maybe it's time to retire it?
21583 * xfaces.c (USG, __TIMEVAL__): Likewise.
21585 * dispextern.h (struct redisplay_interface): Rename param
21586 to avoid shadowing.
21587 * termhooks.h (struct terminal): Likewise.
21588 * xterm.c (xembed_send_message): Likewise.
21590 * insdel.c (make_gap_smaller): Define only if
21591 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
21593 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
21596 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
21597 so that we aren't warned about unused symbols.
21599 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
21601 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
21603 * xfns.c (x_real_positions): Mark locals as initialized.
21605 * xmenu.c (xmenu_show): Don't use uninitialized vars.
21607 * xterm.c: Fix problems found by static analysis with other toolkits.
21608 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
21609 (x_dispatch_event): Declare static if USE_GTK, and
21610 define if USE_GTK || USE_X_TOOLKIT.
21611 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
21612 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
21613 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
21614 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
21616 * xmenu.c (menu_help_callback): Pointer type fixes.
21617 Use const pointers when pointing at readonly data. Avoid pointer
21618 signedness clashes.
21619 (FALSE): Remove unused macro.
21620 (update_frame_menubar): Remove unused decl.
21622 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
21624 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
21625 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
21626 (single_menu_item): Rename local to avoid shadowing.
21628 * keyboard.c (make_lispy_event): Remove unused local var.
21630 * frame.c, frame.h (x_get_resource_string): Bring this back, but
21631 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
21633 * bitmaps: Change bitmaps from unsigned char back to the X11
21634 compatible char. Avoid the old compiler warnings about
21635 out-of-range initializers by using, for example, '\xab' rather
21638 * xgselect.c (xgselect_initialize): Check vs interface
21639 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
21641 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
21643 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
21644 to read-only memory.
21646 * fns.c (vector): Remove; this old hack is no longer needed.
21648 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
21650 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
21652 * xrdb.c (x_load_resources): Omit unused local.
21654 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
21655 (x_window): Rename locals to avoid shadowing.
21656 (USG): Use the kludged USG macro, to pacify gcc.
21658 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
21659 (x_term_init): Remove local to avoid shadowing.
21661 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
21663 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
21664 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
21666 2011-04-16 Eli Zaretskii <eliz@gnu.org>
21668 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
21670 Fix regex.c, syntax.c and friends for buffers > 2GB.
21671 * syntax.h (struct gl_state_s): Declare character position members
21674 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
21676 * textprop.c (verify_interval_modification, interval_of):
21677 Declare arguments EMACS_INT.
21679 * intervals.c (adjust_intervals_for_insertion): Declare arguments
21682 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
21684 * indent.c (Fvertical_motion): Local variable it_start is now
21687 * regex.c (re_match, re_match_2, re_match_2_internal)
21688 (bcmp_translate, regcomp, regexec, print_double_string)
21689 (group_in_compile_stack, re_search, re_search_2, regex_compile)
21690 (re_compile_pattern, re_exec): Declare arguments and local
21691 variables `size_t' and `ssize_t' and return values `regoff_t', as
21693 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
21694 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
21695 <compile_stack_type>: `size' and `avail' are now `size_t'.
21697 * regex.h <regoff_t>: Use ssize_t, not int.
21698 (re_search, re_search_2, re_match, re_match_2): Arguments that
21699 specify buffer/string position and length are now ssize_t and
21700 size_t. Return type is regoff_t.
21702 2011-04-16 Ben Key <bkey76@gmail.com>
21704 * nsfont.m: Fixed bugs in ns_get_family and
21705 ns_descriptor_to_entity that were caused by using free to
21706 deallocate memory blocks that were allocated by xmalloc (via
21707 xstrdup). This caused Emacs to crash when compiled with
21708 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
21709 --enable-checking=xmallocoverrun). xfree is now used to
21710 deallocate these memory blocks.
21712 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
21714 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
21716 emacs_write: Accept and return EMACS_INT for sizes.
21717 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
21719 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
21720 Accept and return EMACS_INT.
21721 (emacs_gnutls_write): Return the number of bytes written on
21723 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
21724 (emacs_read, emacs_write): Remove check for negative size, as the
21725 Emacs source code has been audited now.
21726 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
21727 (emacs_read, emacs_write): Use it.
21728 * process.c (send_process): Adjust to the new signatures of
21729 emacs_write and emacs_gnutls_write. Do not attempt to store
21730 a byte offset into an 'int'; it might overflow.
21731 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
21733 * sound.c: Don't assume sizes fit in 'int'.
21734 (struct sound_device.period_size, alsa_period_size):
21735 Return EMACS_INT, not int.
21736 (struct sound_device.write, vox_write, alsa_write):
21737 Accept EMACS_INT, not int.
21738 (wav_play, au_play): Use EMACS_INT to store sizes and to
21739 record read return values.
21741 2011-04-15 Ben Key <bkey76@gmail.com>
21743 * keyboard.c (Qundefined): Don't declare static since it is used
21745 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
21746 static since they are used in nsfont.m.
21748 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
21750 * process.c (Qprocessp): Don't declare static.
21751 * lisp.h (Qprocessp): Declare again.
21753 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
21755 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
21757 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
21759 Improve C-level modularity by making more things 'static'.
21761 Don't publish debugger-only interfaces to other modules.
21762 * lisp.h (safe_debug_print, debug_output_compilation_hack):
21763 (verify_bytepos, count_markers): Move decls to the only modules
21765 * region-cache.h (pp_cache): Likewise.
21766 * window.h (check_all_windows): Likewise.
21767 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
21769 * sysdep.c (croak): Now static, if
21770 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
21771 * syssignal.h (croak): Declare only if not static.
21773 * alloc.c (refill_memory_reserve): Now static if
21774 !defined REL_ALLOC || defined SYSTEM_MALLOC.
21775 * lisp.h (refill_memory_reserve): Declare only if not static.
21777 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
21778 Define only if USE_LUCID.
21780 * xrdb.c (x_customization_string, x_rm_string): Now static.
21782 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
21783 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
21785 * xdisp.c (draw_row_with_mouse_face): Now static.
21786 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
21788 * window.h (check_all_windows): Mark externally visible.
21790 * window.c (window_deletion_count): Now static.
21792 * undo.c: Make symbols static if they're not exported.
21793 (last_undo_buffer, last_boundary_position, pending_boundary):
21796 * textprop.c (interval_insert_behind_hooks): Now static.
21797 (interval_insert_in_front_hooks): Likewise.
21799 * term.c: Make symbols static if they're not exported.
21800 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
21801 (max_frame_lines, tty_set_terminal_modes):
21802 (tty_reset_terminal_modes, tty_turn_off_highlight):
21803 (get_tty_terminal): Now static.
21804 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
21805 * termhooks.h (term_mouse_moveto): Do not declare if
21806 HAVE_WINDOW_SYSTEM.
21807 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
21808 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
21810 * sysdep.c: Make symbols static if they're not exported.
21811 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
21813 (sigprocmask_set, full_mask): Remove; unused.
21814 (wait_debugging): Mark as visible.
21815 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
21816 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
21818 * syntax.c (syntax_temp): Define only if !__GNUC__.
21820 * sound.c (current_sound_device, current_sound): Now static.
21822 * search.c (searchbufs, searchbuf_head): Now static.
21824 * scroll.c (scroll_cost): Remove; unused.
21825 * dispextern.h (scroll_cost): Remove decl.
21827 * region-cache.h (pp_cache): Mark as externally visible.
21829 * process.c: Make symbols static if they're not exported.
21830 (process_tick, update_tick, create_process, chan_process):
21831 (Vprocess_alist, proc_buffered_char, datagram_access):
21832 (fd_callback_data, send_process_frame, process_sent_to): Now static.
21833 (deactivate_process): Mark defn as static, as well as decl.
21834 * lisp.h (create_process): Remove decl.
21835 * process.h (chan_process, Vprocess_alist): Remove decls.
21837 * print.c: Make symbols static if they're not exported.
21838 (print_depth, new_backquote_output, being_printed, print_buffer):
21839 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
21840 (print_interval, print_number_index, initial_stderr_stream):
21842 * lisp.h (Fprinc): Remove decl.
21843 (debug_output_compilation_hack): Mark as externally visible.
21845 * sysdep.c (croak): Move decl from here to syssignal.h.
21846 * syssignal.h (croak): Put it here, so the API can be checked when
21847 'croak' is called from dissociate_if_controlling_tty.
21849 * minibuf.c: Make symbols static if they're not exported.
21850 (minibuf_save_list, choose_minibuf_frame): Now static.
21851 * lisp.h (choose_minibuf_frame): Remove decl.
21853 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
21855 * lread.c: Make symbols static if they're not exported.
21856 (read_objects, initial_obarray, oblookup_last_bucket_number):
21858 (make_symbol): Remove; unused.
21859 * lisp.h (initial_obarray, make_symbol): Remove decls.
21861 * keyboard.c: Make symbols static if they're not exported.
21862 (single_kboard, recent_keys_index, total_keys, recent_keys):
21863 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
21864 (this_single_command_key_start, echoing, last_auto_save):
21865 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
21866 (command_loop, echo_now, keyboard_init_hook, help_char_p):
21867 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
21868 (Vlispy_mouse_stem, double_click_count):
21870 (force_auto_save_soon): Define only if SIGDANGER.
21871 (ignore_mouse_drag_p): Now static if
21872 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
21873 (print_help): Remove; unused.
21874 (stop_character, last_timer_event): Mark as externally visible.
21875 * keyboard.h (ignore_mouse_drag_p): Declare only if
21876 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
21877 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
21878 * lisp.h (echoing): Remove decl.
21879 (force_auto_save_soon): Declare only if SIGDANGER.
21880 * xdisp.c (redisplay_window): Simplify code, to make it more
21881 obvious that ignore_mouse_drag_p is not accessed if !defined
21882 USE_GTK && !defined HAVE_NS.
21884 * intervals.c: Make symbols static if they're not exported.
21885 (merge_properties_sticky, merge_interval_right, delete_interval):
21887 * intervals.h (merge_interval_right, delete_interval): Remove decls.
21889 * insdel.c: Make symbols static if they're not exported.
21890 However, leave prepare_to_modify_buffer alone. It's never
21891 called from outside this function, but that appears to be a bug.
21892 (combine_after_change_list, combine_after_change_buffer):
21893 (adjust_after_replace, signal_before_change): Now static.
21894 (adjust_after_replace_noundo): Remove; unused.
21895 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
21896 (signal_before_change): Remove decls.
21898 * indent.c (val_compute_motion, val_vmotion): Now static.
21900 * image.c: Make symbols static if they're not exported.
21901 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
21903 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
21904 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
21906 * fringe.c (standard_bitmaps): Now static.
21907 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
21909 * frame.c: Make symbols static if they're not exported.
21910 (x_report_frame_params, make_terminal_frame): Now static.
21911 (get_frame_param): Now static, unless HAVE_NS.
21912 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
21913 (x_get_resource_string): Remove; not used.
21914 * frame.h (make_terminal_frame, x_report_frame_params):
21915 (x_get_resource_string); Remove decls.
21916 (x_fullscreen_adjust): Declare only if WINDOWSNT.
21917 * lisp.h (get_frame_param): Declare only if HAVE_NS.
21919 * font.c, fontset.c: Make symbols static if they're not exported.
21920 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
21921 (FACE_SUITABLE_FOR_CHAR_P): Use it.
21922 * font.c (font_close_object): Now static.
21923 * font.h (font_close_object): Remove.
21924 * fontset.c (FONTSET_OBJLIST): Remove.
21925 (free_realized_fontset) #if-0 the body, which does nothing.
21926 (face_suitable_for_char_p): #if-0, as it's never called.
21927 * fontset.h (face_suitable_for_char_p): Remove decl.
21928 * xfaces.c (face_at_string_position):
21929 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
21930 since 0 is always ASCII.
21932 * fns.c (weak_hash_tables): Now static.
21934 * fileio.c: Make symbols static if they're not exported.
21935 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
21936 (Vwrite_region_annotation_buffers): Now static.
21938 * eval.c: Make symbols static if they're not exported.
21939 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
21940 * lisp.h (backtrace_list): Remove decl.
21942 * emacs.c: Make symbols static if they're not exported.
21943 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
21944 (fatal_error_code, fatal_error_signal_hook, standard_args):
21946 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
21947 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
21948 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
21949 * lisp.h (fatal_error_signal_hook): Remove decl.
21950 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
21952 * editfns.c: Move a (normally-unused) function to its only use.
21953 * editfns.c, lisp.h (get_operating_system_release): Remove.
21954 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
21955 worth the hassle of breaking this out.
21957 * xterm.c: Make symbols static if they're not exported.
21958 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
21959 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
21960 (x_destroy_window, x_delete_display):
21962 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
21963 (x_mouse_leave): Remove; unused.
21964 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
21965 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
21966 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
21968 (x_mouse_leave): Declare only if WINDOWSNT.
21969 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
21970 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
21973 * ftxfont.c: Make symbols static if they're not exported.
21974 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
21976 * font.h (ftxfont_driver): Likewise.
21978 * xfns.c: Make symbols static if they're not exported.
21979 (x_last_font_name, x_display_info_for_name):
21980 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
21981 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
21982 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
21983 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
21984 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
21985 (last_show_tip_args): Now static.
21986 (xic_defaut_fontset, xic_create_fontsetname): Define only if
21987 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
21988 (x_screen_planes): Remove; unused.
21989 * dispextern.h (x_screen_planes): Remove decl.
21991 * dispnew.c: Make symbols static if they're not exported.
21992 * dispextern.h (redraw_garbaged_frames, scrolling):
21993 (increment_row_positions): Remove.
21994 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
21995 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
21997 (redraw_garbaged_frames): Remove; unused.
21999 * xfaces.c: Make symbols static if they're not exported.
22000 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
22002 * xterm.h (defined_color): Remove decls.
22003 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
22004 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
22005 (menu_face_changed_default, defined_color, free_realized_face):
22006 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
22007 (ascii_face_of_lisp_face): Remove; unused.
22009 * xdisp.c: Make symbols static if they're not exported.
22010 * dispextern.h (scratch_glyph_row, window_box_edges):
22011 (glyph_to_pixel_coords, set_cursor_from_row):
22012 (get_next_display_element, set_iterator_to_next):
22013 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
22014 (show_mouse_face): Remove decls
22015 * frame.h (message_buf_print): Likewise.
22016 * lisp.h (pop_message, set_message, check_point_in_composition):
22018 * xterm.h (set_vertical_scroll_bar): Likewise.
22019 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
22020 (message_buf_print, scratch_glyph_row, displayed_buffer):
22021 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
22022 (get_next_display_element, show_mouse_face, window_box_edges):
22023 (frame_to_window_pixel_xy, check_point_in_composition):
22024 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
22025 (glyph_to_pixel_coords): Remove; unused.
22027 * dired.c (file_name_completion): Now static.
22029 * dbusbind.c (xd_in_read_queued_messages): Now static.
22031 * lisp.h (circular_list_error, FOREACH): Remove; unused.
22032 * data.c (circular_list_error): Remove.
22034 * commands.h (last_point_position, last_point_position_buffer):
22035 (last_point_position_window): Remove decls.
22036 * keyboard.c: Make these variables static.
22038 * coding.h (coding, code_convert_region, encode_coding_gap):
22040 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
22041 (iso_code_class, detect_coding, code_convert_region): Now static.
22042 (encode_coding_gap): Remove; unused.
22044 * chartab.c (chartab_chars, chartab_bits): Now static.
22046 * charset.h (charset_iso_8859_1): Remove decl.
22047 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
22050 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
22051 * ccl.c (Vccl_program_table): Now static.
22052 (check_ccl_update): Remove; unused.
22054 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
22055 * category.h: ... from here.
22056 * category.c (check_category_table, set_category_set): Now static.
22058 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
22059 * lisp.h: Remove these decls.
22061 * buffer.c (buffer_count): Remove unused var.
22063 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
22064 so that it's not optimized away.
22065 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
22066 * dispextern.h (bidi_dump_cached_states): Remove, since it's
22067 exported only to the debugger.
22069 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
22070 * atimer.h (run_all_atimers): Remove; not exported.
22072 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
22073 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
22074 was inaccessible from Lisp.
22075 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
22076 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
22078 alloc.c: Import and export fewer symbols, and remove unused items.
22079 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
22081 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
22082 it's not optimized away by whole-program optimization.
22083 (message_enable_multibyte, free_misc): Remove.
22084 (catchlist, handlerlist, mark_backtrace):
22085 Declare only if BYTE_MARK_STACK.
22086 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
22087 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
22088 (message_enable_multibyte): Remove decl.
22089 (free_misc, interval_free_list, float_block, float_block_index):
22090 (n_float_blocks, float_free_list, cons_block, cons_block_index):
22091 (cons_free_list, last_marked_index):
22093 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
22094 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
22095 (mark_backtrace): Define only if BYTE_MARK_STACK.
22096 * xdisp.c (message_enable_multibyte): Now static.
22098 Declare Lisp_Object Q* variables to be 'static' if not exported.
22099 This makes it easier for human readers (and static analyzers)
22100 to see whether these variables are used from other modules.
22101 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
22102 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
22103 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
22104 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
22105 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
22106 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
22107 * xmenu.c, xselect.c:
22108 Declare Q* vars static if they are not used in other modules.
22109 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
22110 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
22111 Remove decls of unexported vars.
22112 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
22114 * lisp.h (DEFINE_FUNC): Make sname 'static'.
22116 Make Emacs functions such as Fatom 'static' by default.
22117 This makes it easier for human readers (and static analyzers)
22118 to see whether these functions can be called from other modules.
22119 DEFUN now defines a static function. To make the function external
22120 so that it can be used in other C modules, use the new macro DEFUE.
22121 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
22122 (Finit_image_library):
22123 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
22124 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
22125 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
22126 Remove decls, since these functions are now static.
22127 (Funintern, Fget_internal_run_time): New decls, since these functions
22128 were already external.
22130 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
22131 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
22132 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
22133 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
22134 * keyboard.c, keymap.c, lread.c:
22135 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
22136 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
22137 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
22138 Mark functions with DEFUE instead of DEFUN,
22139 if they are used in other modules.
22140 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
22141 decls for now-static functions.
22142 * buffer.h (Fdelete_overlay): Remove decl.
22143 * callproc.c (Fgetenv_internal): Mark as internal.
22144 * composite.c (Fremove_list_of_text_properties): Remove decl.
22145 (Fcomposition_get_gstring): New forward static decl.
22146 * composite.h (Fcomposite_get_gstring): Remove decl.
22147 * dired.c (Ffile_attributes): New forward static decl.
22148 * doc.c (Fdocumntation_property): New forward static decl.
22149 * eval.c (Ffetch_bytecode): New forward static decl.
22150 (Funintern): Remove extern decl; now in .h file where it belongs.
22151 * fileio.c (Fmake_symbolic_link): New forward static decl.
22152 * image.c (Finit_image_library): New forward static decl.
22153 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
22154 * intervals.h (Fprevious_property_change):
22155 (Fremove_list_of_text_properties): Remove decls.
22156 * keyboard.c (Fthis_command_keys): Remove decl.
22157 (Fcommand_execute): New forward static decl.
22158 * keymap.c (Flookup_key): New forward static decl.
22159 (Fcopy_keymap): Now static.
22160 * keymap.h (Flookup_key): Remove decl.
22161 * process.c (Fget_process): New forward static decl.
22162 (Fprocess_datagram_address): Mark as internal.
22163 * syntax.c (Fsyntax_table_p): New forward static decl.
22164 (skip_chars): Remove duplicate decl.
22165 * textprop.c (Fprevious_property_change): New forward static decl.
22166 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
22168 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
22169 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
22171 * editfns.c (Fformat): Remove unreachable code.
22173 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
22175 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
22178 2011-04-13 Eli Zaretskii <eliz@gnu.org>
22180 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
22181 when at ZV. (Bug#8487)
22183 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
22185 * charset.c (Fclear_charset_maps): Use xfree instead of free.
22187 * keyboard.c (parse_tool_bar_item): Likewise.
22188 * sound.c (sound_cleanup, alsa_close): Likewise.
22189 * termcap.c (tgetent): Likewise.
22190 * xfns.c (x_default_font_parameter): Likewise.
22191 * xsettings.c (read_and_apply_settings): Likewise.
22193 * alloc.c (overrun_check_malloc, overrun_check_realloc)
22194 (overrun_check_free): Protoize.
22196 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
22198 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
22199 since callers should never pass a negative size.
22200 Change the signature to match that of plain 'read' and 'write'; see
22201 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
22202 * lisp.h: Update prototypes of emacs_write and emacs_read.
22204 2011-04-11 Eli Zaretskii <eliz@gnu.org>
22206 * xdisp.c (redisplay_window): Don't try to determine the character
22207 position of the scroll margin if the window start point w->startp
22208 is outside the buffer's accessible region. (Bug#8468)
22210 2011-04-10 Eli Zaretskii <eliz@gnu.org>
22212 Fix write-region and its subroutines for buffers > 2GB.
22213 * fileio.c (a_write, e_write): Modify declaration of arguments and
22214 local variables to support buffers larger than 2GB.
22215 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
22217 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
22218 argument, local variables, and return value.
22220 * lisp.h: Update prototypes of emacs_write and emacs_read.
22222 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
22224 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
22226 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
22228 Fix more problems found by GCC 4.6.0's static checks.
22230 * xdisp.c (vmessage): Use a better test for character truncation.
22232 * charset.c (load_charset_map): <, not <=, for optimization,
22233 and to avoid potential problems with integer overflow.
22234 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
22235 * casetab.c (set_identity, shuffle): Likewise.
22236 * editfns.c (Fformat): Likewise.
22237 * syntax.c (skip_chars): Likewise.
22239 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
22240 This also lets GCC 4.6.0 generate slightly better loop code.
22242 * callint.c (Fcall_interactively): <, not <=, for optimization.
22243 (Fcall_interactively): Count the number of arguments produced,
22244 not the number of arguments given. This is simpler and lets GCC
22245 4.6.0 generate slightly better code.
22247 * ftfont.c: Distingish more carefully between FcChar8 and char.
22248 The previous code passed unsigned char * to a functions like
22249 strlen and xstrcasecmp that expect char *, which does not
22250 conform to the C standard.
22251 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
22252 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
22253 char * when the C standard requires it.
22255 * keyboard.c (read_char): Remove unused var.
22257 * eval.c: Port to Windows vsnprintf (Bug#8435).
22258 Include <limits.h>.
22259 (SIZE_MAX): Define if the headers do not.
22260 (verror): Do not give up if vsnprintf returns a negative count.
22261 Instead, grow the buffer. This ports to Windows vsnprintf, which
22262 does not conform to C99. Problem reported by Eli Zaretskii.
22263 Also, simplify the allocation scheme, by avoiding the need for
22264 calling realloc, and removing the ALLOCATED variable.
22266 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
22268 Remove invocations of doprnt, as Emacs now uses vsnprintf.
22269 But keep the doprint source code for now, as we might revamp it
22270 and use it again (Bug#8435).
22271 * lisp.h (doprnt): Remove.
22272 * Makefile.in (base_obj): Remove doprnt.o.
22273 * deps.mk (doprnt.o): Remove.
22275 error: Print 32- and 64-bit integers portably (Bug#8435).
22276 Without this change, on typical 64-bit hosts error ("...%d...", N)
22277 was used to print both 32- and 64-bit integers N, which relied on
22278 undefined behavior.
22279 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
22280 * lisp.h (error, verror): Mark as printf-like functions.
22281 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
22282 Report overflow in size calculations when allocating printf buffer.
22283 Do not truncate output string at its first null byte.
22284 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
22285 Truncate the output at a character boundary, since vsnprintf does not
22287 * charset.c (check_iso_charset_parameter): Convert internal
22288 character to string before calling 'error', since %c now has the
22290 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
22291 overflow when computing char to be passed to 'error'. Do not
22292 pass Lisp_Object to 'error'; pass the integer instead.
22293 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
22294 formatted with plain %d.
22296 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
22298 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
22300 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
22302 * xterm.c (x_catch_errors): Remove duplicate declaration.
22304 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
22306 * xdisp.c, lisp.h (message_nolog): Remove; unused.
22308 2011-04-10 Jim Meyering <meyering@redhat.com>
22310 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
22311 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
22312 return ssize_t not "int", and use size_t as the buffer length.
22313 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
22314 * gnutls.h: Update declarations.
22315 * process.c (read_process_output): Use ssize_t, to match.
22316 (send_process): Likewise.
22318 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
22320 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
22322 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
22324 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
22325 Use unsigned char, to match FcChar8 type definition.
22327 * xterm.c (handle_one_xevent):
22328 * xmenu.c (create_and_show_popup_menu):
22329 * xselect.c (x_decline_selection_request)
22330 (x_reply_selection_request): Avoid type-punned deref of X events.
22332 2011-04-09 Eli Zaretskii <eliz@gnu.org>
22334 Fix some uses of `int' instead of EMACS_INT.
22335 * search.c (string_match_1, fast_string_match)
22336 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
22337 (scan_buffer, find_next_newline_no_quit)
22338 (find_before_next_newline, search_command, Freplace_match)
22339 (Fmatch_data): Make some `int' variables be EMACS_INT.
22341 * xdisp.c (display_count_lines): 3rd argument and return value now
22342 EMACS_INT. All callers changed.
22343 (pint2hrstr): Last argument is now EMACS_INT.
22345 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
22346 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
22347 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
22348 (decode_coding_utf_16, decode_coding_emacs_mule)
22349 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
22350 (decode_coding_ccl, decode_coding_charset)
22351 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
22352 (decode_coding_iso_2022, decode_coding_emacs_mule)
22353 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
22354 <char_offset, last_offset>: Declare EMACS_INT.
22355 (encode_coding_utf_8, encode_coding_utf_16)
22356 (encode_coding_emacs_mule, encode_invocation_designation)
22357 (encode_designation_at_bol, encode_coding_iso_2022)
22358 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
22359 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
22361 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
22362 (encode_invocation_designation): Last argument P_NCHARS is now
22364 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
22365 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
22367 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
22370 * ccl.c (Fccl_execute_on_string): Declare some variables
22373 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
22375 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
22377 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
22379 * process.c (Fformat_network_address): Doc fix.
22381 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
22383 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
22385 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
22387 * keyboard.c (read_char): Call Lisp function help-form-show,
22388 instead of using internal_with_output_to_temp_buffer.
22389 (Qhelp_form_show): New var.
22390 (syms_of_keyboard): Use DEFSYM macro.
22392 * print.c (internal_with_output_to_temp_buffer): Function deleted.
22394 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
22396 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
22398 * process.c (Flist_processes): Remove to Lisp.
22399 (list_processes_1): Delete.
22401 2011-04-06 Eli Zaretskii <eliz@gnu.org>
22403 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
22405 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
22407 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
22409 Fix more problems found by GCC 4.6.0's static checks.
22411 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
22413 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
22415 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
22417 * xdisp.c (vmessage): Mark as a printf-like function.
22419 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
22421 * sound.c (sound_warning): Don't crash if arg contains a printf format.
22423 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
22424 printf-like functions.
22425 (tiff_load): Add casts to remove these marks before passing them
22426 to system-supplied API.
22428 * eval.c (Fsignal): Remove excess argument to 'fatal'.
22430 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
22431 This avoids several warnings with gcc -Wstrict-overflow.
22432 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
22433 directly, rather than having caller test rule sign. This avoids
22434 some unnecessary tests.
22435 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
22436 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
22437 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
22439 * xfont.c (xfont_text_extents): Remove var that was set but not used.
22440 (xfont_open): Avoid unnecessary tests.
22442 * composite.c (composition_gstring_put_cache): Use unsigned integer.
22444 * composite.h, composite.c (composition_gstring_put_cache):
22445 Use EMACS_INT, not int, for length.
22447 * composite.h (COMPOSITION_DECODE_REFS): New macro,
22448 breaking out part of COMPOSITION_DECODE_RULE.
22449 (COMPOSITION_DECODE_RULE): Use it.
22450 * composite.c (get_composition_id): Remove unused local vars,
22451 by using the new macro.
22453 * textprop.c (set_text_properties_1): Change while to do-while,
22454 since the condition is always true at first.
22456 * intervals.c (graft_intervals_into_buffer): Mark var as used.
22457 (interval_deletion_adjustment): Return unsigned value.
22460 * process.c (list_processes_1, create_pty, read_process_output):
22461 (exec_sentinel): Remove vars that were set but not used.
22462 (create_pty): Remove unnecessary "volatile"s.
22463 (Fnetwork_interface_info): Avoid possibility of int overflow.
22464 (read_process_output): Do adaptive read buffering even if carryover.
22465 (read_process_output): Simplify nbytes computation if buffered.
22467 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
22469 * syntax.c (scan_words): Remove var that was set but not used.
22470 (update_syntax_table): Use unsigned instead of int.
22472 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
22473 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
22474 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
22476 * print.c (print_error_message): Avoid int overflow.
22478 * font.c (font_list_entities): Redo for clarity,
22479 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
22481 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
22482 (font_score): Avoid potential overflow in diff calculation.
22484 * fns.c (substring_both): Remove var that is set but not used.
22485 (sxhash): Redo loop for clarity and to avoid wraparound warning.
22487 * eval.c (funcall_lambda): Rename local to avoid shadowing.
22489 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
22490 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
22491 can always succeed if overflow has undefined behavior.
22493 * search.c (boyer_moore, wordify): Remove vars set but not used.
22494 (wordify): Omit three unnecessary tests.
22496 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
22497 All callers changed. This avoids the need for an unused var.
22499 * casefiddle.c (casify_region): Remove var that is set but not used.
22501 * dired.c (file_name_completion): Remove var that is set but not used.
22503 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
22505 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
22506 (Finsert_file_contents): Remove unnecessary code checking fd.
22508 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
22509 Check for integer overflow on size calculations.
22511 * buffer.c (Fprevious_overlay_change): Remove var that is set
22514 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
22515 Remove vars that are set but not used.
22516 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
22517 (timer_check_2): Mark vars as initialized.
22519 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
22521 * image.c (lookup_image): Remove var that is set but not used.
22522 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
22524 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
22525 that are set but not used.
22527 * xfns.c (make_invisible_cursor): Don't return garbage
22528 if XCreateBitmapFromData fails (Bug#8410).
22530 * xselect.c (x_get_local_selection, x_handle_property_notify):
22531 Remove vars that are set but not used.
22533 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
22534 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
22536 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
22537 Remove var that is set but not used.
22538 (scroll_bar_windows_size): Now size_t, not int.
22539 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
22540 Check for overflow.
22542 * xfaces.c (realize_named_face): Remove vars that are set but not used.
22543 (map_tty_color) [!defined MSDOS]: Likewise.
22545 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
22547 * coding.c: Remove vars that are set but not used.
22548 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
22549 All callers changed.
22550 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
22551 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
22552 (decode_coding_charset): Remove vars that are set but not used.
22554 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
22555 that is set but not used.
22557 * print.c (print_object): Remove var that is set but not used.
22559 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
22560 The gnulib version avoids calling malloc in the usual case,
22561 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
22562 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
22563 * filelock.c (current_lock_owner): Likewise.
22564 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
22565 * sysdep.c: Include allocator.h, careadlinkat.h.
22566 (emacs_no_realloc_allocator): New static constant.
22567 (emacs_readlink): New function.
22568 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
22569 ../lib/careadlinkat.h.
22571 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
22573 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
22574 first non-nil return value).
22576 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
22578 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
22579 if not defined (Bug#8403).
22581 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
22583 * xdisp.c (display_count_lines): Remove parameter `start',
22584 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
22585 (get_char_face_and_encoding): Remove parameter `multibyte_p',
22586 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
22587 (fill_stretch_glyph_string): Remove parameters `row' and `area',
22588 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
22589 and thereabouts. All callers changed.
22590 (get_per_char_metric): Remove parameter `f', unused since
22591 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
22593 2011-04-02 Jim Meyering <meyering@redhat.com>
22595 do not dereference NULL upon failed strdup
22596 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
22597 (ns_get_family): Likewise.
22599 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
22601 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
22603 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
22605 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
22608 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
22610 Add lexical binding.
22612 * window.c (Ftemp_output_buffer_show): New fun.
22613 (Fsave_window_excursion):
22614 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
22616 * lread.c (lisp_file_lexically_bound_p): New function.
22617 (Fload): Bind Qlexical_binding.
22618 (readevalloop): Remove `evalfun' arg.
22619 Bind Qinternal_interpreter_environment.
22620 (Feval_buffer): Bind Qlexical_binding.
22621 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
22623 (syms_of_lread): Declare `lexical-binding'.
22625 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
22627 * keyboard.c (eval_dyn): New fun.
22628 (menu_item_eval_property): Use it.
22630 * image.c (parse_image_spec): Use Ffunctionp.
22632 * fns.c (concat, mapcar1): Accept byte-code-functions.
22634 * eval.c (Fsetq): Handle lexical vars.
22635 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
22636 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
22637 (FletX, Flet): Obey lexical binding.
22638 (Fcommandp): Handle closures.
22639 (Feval): New `lexical' arg.
22640 (eval_sub): New function extracted from Feval. Use it almost
22641 everywhere where Feval was used. Look up vars in lexical env.
22643 (Ffunctionp): Move from subr.el.
22644 (Ffuncall): Handle closures.
22645 (apply_lambda): Remove `eval_flags'.
22646 (funcall_lambda): Handle closures and new byte-code-functions.
22647 (Fspecial_variable_p): New function.
22648 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
22649 but without exporting it to Lisp.
22651 * doc.c (Fdocumentation, store_function_docstring):
22652 * data.c (Finteractive_form): Handle closures.
22654 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
22657 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
22659 (exec_byte_code): New function extracted from Fbyte_code to handle new
22660 calling convention for byte-code-functions. Add new byte-codes.
22662 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
22664 * alloc.c (Fmake_symbol): Init new `declared_special' field.
22666 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
22668 * xdisp.c (redisplay_internal): Fix prototype.
22670 2011-03-31 Eli Zaretskii <eliz@gnu.org>
22672 * xdisp.c (SCROLL_LIMIT): New macro.
22673 (try_scrolling): Use it when setting scroll_limit.
22674 Limit scrolling to 100 screen lines.
22675 (redisplay_window): Even when falling back on "recentering",
22676 position point in the window according to scroll-conservatively,
22677 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
22679 (try_scrolling): When point is above the window, allow searching
22680 as far as scroll_max, or one screenful, to compute vertical
22681 distance from PT to the scroll margin position. This prevents
22682 try_scrolling from unnecessarily failing when
22683 scroll-conservatively is set to a value slightly larger than the
22684 window height. Clean up the case of PT below the margin at bottom
22685 of window: scroll_max can no longer be INT_MAX. When aggressive
22686 scrolling is in use, don't let point enter the opposite scroll
22687 margin as result of the scroll.
22688 (syms_of_xdisp) <scroll-conservatively>: Document the
22689 threshold of 100 lines for never-recentering scrolling.
22691 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
22693 * dispextern.h (move_it_by_lines):
22694 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
22695 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
22696 (message_log_check_duplicate): Remove parameters `prev_bol' and
22697 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
22698 (redisplay_internal): Remove parameter `preserve_echo_area',
22699 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
22701 * indent.c (Fvertical_motion):
22702 * window.c (window_scroll_pixel_based, Frecenter):
22703 Don't pass `need_y_p' to `move_it_by_lines'.
22705 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
22707 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
22708 steal a few bits to be more compact.
22709 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
22710 Remove unneeded casts.
22712 * bytecode.c (Fbyte_code): CAR and CDR can GC.
22714 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
22716 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
22717 binding" message (bug#7967).
22719 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
22721 Fix more problems found by GCC 4.6.0's static checks.
22723 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
22724 Remove unused local var.
22726 * editfns.c (Fmessage_box): Remove unused local var.
22728 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
22729 (note_mode_line_or_margin_highlight, note_mouse_highlight):
22730 Omit unused local vars.
22731 * window.c (shrink_windows): Omit unused local var.
22732 * menu.c (digest_single_submenu): Omit unused local var.
22733 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
22734 Omit unused local var.
22736 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
22737 Don't assume string length fits in int.
22738 (keyremap_step, read_key_sequence): Use size_t for sizes.
22739 (read_key_sequence): Don't check last_real_key_start redundantly.
22741 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
22742 instead of alloca (Bug#8344).
22744 * eval.c (Fbacktrace): Don't assume nargs fits in int.
22745 (Fbacktrace_frame): Don't assume nframes fits in int.
22747 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
22749 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
22752 * term.c (produce_glyphless_glyph): Remove unnecessary test.
22754 * cm.c (calccost): Turn while-do into do-while, for clarity.
22756 * keyboard.c (syms_of_keyboard): Use the same style as later
22757 in this function when indexing through an array. This also
22758 works around GCC bug 48267.
22760 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
22762 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
22764 * chartab.c (sub_char_table_ref_and_range): Redo for slight
22765 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
22767 * keyboard.c, keyboard.h (num_input_events): Now size_t.
22768 This avoids undefined behavior on integer overflow, and is a bit
22769 more convenient anyway since it is compared to a size_t variable.
22771 Variadic C functions now count arguments with size_t, not int.
22772 This avoids an unnecessary limitation on 64-bit machines, which
22773 caused (substring ...) to crash on large vectors (Bug#8344).
22774 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
22775 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
22776 All variadic functions and their callers changed accordingly.
22777 (struct gcpro.nvars): Now size_t, not int. All uses changed.
22778 * data.c (arith_driver, float_arith_driver): Likewise.
22779 * editfns.c (general_insert_function): Likewise.
22780 * eval.c (struct backtrace.nargs, interactive_p)
22781 (internal_condition_case_n, run_hook_with_args, apply_lambda)
22782 (funcall_lambda, mark_backtrace): Likewise.
22783 * fns.c (concat): Likewise.
22784 * frame.c (x_set_frame_parameters): Likewise.
22785 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
22786 0 if not found, not -1. All callers changed.
22788 * alloc.c (garbage_collect): Don't assume stack size fits in int.
22789 (stack_copy_size): Now size_t, not int.
22790 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
22792 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
22794 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
22795 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
22796 All callers changed.
22798 * lisp.h (multibyte_char_to_unibyte):
22799 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
22800 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
22801 * character.h (CHAR_TO_BYTE8):
22802 * cmds.c (internal_self_insert):
22803 * editfns.c (general_insert_function):
22804 * keymap.c (push_key_description):
22805 * search.c (Freplace_match):
22806 * xdisp.c (message_dolog, set_message_1): All callers changed.
22808 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
22810 * keyboard.c (safe_run_hook_funcall): New function.
22811 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
22812 don't set the hook to nil, but remove the offending function instead.
22813 (Qcommand_hook_internal): Remove, unused.
22814 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
22815 Vcommand_hook_internal.
22817 * eval.c (enum run_hooks_condition): Remove.
22818 (funcall_nil, funcall_not): New functions.
22819 (run_hook_with_args): Call each function through a `funcall' argument.
22820 Remove `cond' argument, now redundant.
22821 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
22822 (Frun_hook_with_args_until_failure): Adjust accordingly.
22823 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
22825 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
22827 * dispextern.h (string_buffer_position): Remove declaration.
22829 * print.c (strout): Remove parameter `multibyte', unused since
22830 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
22832 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
22833 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
22834 All callers changed.
22836 * w32.c (_wsa_errlist): Use braces for struct initializers.
22838 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
22839 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
22840 All callers changed.
22841 (string_buffer_position): Likewise. Also, make static (it's never
22842 used outside xdisp.c).
22843 (cursor_row_p): Remove parameter `w', unused since
22844 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
22845 (decode_mode_spec): Remove parameter `precision', introduced during
22846 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
22847 All callers changed.
22849 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
22851 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
22853 2011-03-27 Anders Lindgren <andlind@gmail.com>
22855 * nsterm.m (ns_menu_bar_is_hidden): New variable.
22856 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
22857 (ns_update_auto_hide_menu_bar): New functions.
22858 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
22859 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
22860 ns_constrain_all_frames.
22861 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
22862 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
22864 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
22866 * nsmenu.m (runDialogAt): Remove argument to timer_check.
22868 2011-03-27 Glenn Morris <rgm@gnu.org>
22870 * syssignal.h: Replace RETSIGTYPE with void.
22871 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
22872 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
22873 Replace SIGTYPE with void everywhere.
22874 * s/usg5-4-common.h (SIGTYPE): Remove definition.
22875 * s/template.h (SIGTYPE): Remove commented out definition.
22877 2011-03-26 Eli Zaretskii <eliz@gnu.org>
22879 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
22880 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
22882 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
22884 * w32.c (read_unc_volume): Use parameter `henum', instead of
22885 global variable `wget_enum_handle'.
22887 * keymap.c (describe_vector): Remove parameters `indices' and
22888 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
22889 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
22891 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
22893 * keyboard.c (timer_check): Remove parameter `do_it_now',
22894 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
22895 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
22896 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
22898 * keyboard.c (read_char):
22899 * w32menu.c (w32_menu_display_help):
22900 * xmenu.c (show_help_event, menu_help_callback):
22901 Adjust calls to `show_help_echo'.
22903 * gtkutil.c (xg_maybe_add_timer):
22904 * keyboard.c (readable_events):
22905 * process.c (wait_reading_process_output):
22906 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
22908 * insdel.c (adjust_markers_gap_motion):
22909 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
22910 (gap_left, gap_right): Don't call it.
22912 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
22914 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
22915 incurred during fontification.
22917 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
22919 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
22920 (DEFVAR_PER_BUFFER): Don't pass it.
22922 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
22923 (scrolling_window): Don't pass it.
22925 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
22927 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
22929 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
22931 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
22932 of variables specific to SELinux and computation of `encoded_absname'.
22934 * image.c (XPutPixel): Remove unused variable `height'.
22936 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
22938 * unexw32.c (get_section_info): Remove unused variable `section'.
22940 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
22941 (system_process_attributes): Remove unused variable `sess'.
22942 (sys_read): Remove unused variable `err'.
22944 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
22945 (w32_wnd_proc): Remove unused variable `isdead'.
22946 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
22947 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
22948 (x_create_tip_frame): Remove unused variable `tem'.
22950 * w32inevt.c (w32_console_read_socket):
22951 Remove unused variable `no_events'.
22953 * w32term.c (x_draw_composite_glyph_string_foreground):
22954 Remove unused variable `width'.
22956 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
22958 * w32term.c (x_set_glyph_string_clipping):
22959 Don't pass uninitialized region to CombineRgn.
22961 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
22963 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
22964 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
22965 (Fx_close_connection): Remove unused variable `i'.
22967 * w32font.c (w32font_draw): Return number of glyphs.
22968 (w32font_open_internal): Remove unused variable `i'.
22969 (w32font_driver): Add missing initializer.
22971 * w32menu.c (utf8to16): Remove unused variable `utf16'.
22972 (fill_in_menu): Remove unused variable `items_added'.
22974 * w32term.c (last_mouse_press_frame): Remove static global variable.
22975 (w32_clip_to_row): Remove unused variable `f'.
22976 (x_delete_terminal): Remove unused variable `i'.
22978 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
22979 (NOTHING): Remove unused static global variable.
22980 (uniscribe_check_otf): Remove unused variable `table'.
22981 (uniscribe_font_driver): Add missing initializers.
22983 2011-03-23 Julien Danjou <julien@danjou.info>
22985 * term.c (Fsuspend_tty, Fresume_tty):
22986 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
22987 * window.c (temp_output_buffer_show):
22988 * insdel.c (signal_before_change):
22989 * frame.c (Fhandle_switch_frame):
22990 * fileio.c (Fdo_auto_save):
22991 * emacs.c (Fkill_emacs):
22992 * editfns.c (save_excursion_restore):
22993 * cmds.c (internal_self_insert):
22994 * callint.c (Fcall_interactively):
22995 * buffer.c (Fkill_all_local_variables):
22996 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
22998 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
22999 unconditionally since it does the check itself.
23001 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
23003 Fix more problems found by GCC 4.5.2's static checks.
23005 * coding.c (encode_coding_raw_text): Avoid unnecessary test
23006 the first time through the loop, since we know p0 < p1 then.
23007 This also avoids a gcc -Wstrict-overflow warning.
23009 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
23010 leading to a memory leak, possible in functions like
23011 load_charset_map_from_file that can allocate an unbounded number
23012 of objects (Bug#8318).
23014 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
23015 that could (at least in theory) be that large.
23017 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
23018 This is less likely to overflow, and avoids undefined behavior if
23019 overflow does occur. All callers changed. Use strtoul to scan
23020 for the unsigned long integer.
23021 (pint2hrstr): Simplify and tune code slightly.
23022 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
23024 * scroll.c (do_scrolling): Work around GCC bug 48228.
23025 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
23027 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
23028 This also avoids a warning with gcc -Wstrict-overflow.
23029 (validate_x_resource_name): Simplify count usage.
23030 This also avoids a warning with gcc -Wstrict-overflow.
23032 * fileio.c (Fcopy_file): Report error if fchown or fchmod
23035 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
23037 * process.c (Fmake_network_process): Use socklen_t, not int,
23038 where POSIX says socklen_t is required in portable programs.
23039 This fixes a porting bug on hosts like 64-bit HP-UX, where
23040 socklen_t is wider than int (Bug#8277).
23041 (Fmake_network_process, server_accept_connection):
23042 (wait_reading_process_output, read_process_output):
23045 * process.c: Rename or move locals to avoid shadowing.
23046 (list_processes_1, Fmake_network_process):
23047 (read_process_output_error_handler, exec_sentinel_error_handler):
23048 Rename or move locals.
23049 (Fmake_network_process): Define label "retry_connect" only if needed.
23050 (Fnetwork_interface_info): Fix pointer signedness.
23051 (process_send_signal): Add cast to avoid pointer signedness problem.
23052 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
23053 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
23055 Make tparam.h and terminfo.c consistent.
23056 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
23057 Include tparam.h instead, since it declares them.
23058 * cm.h (PC): Remove extern decl; tparam.h now does this.
23059 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
23060 * terminfo.c: Include tparam.h, to check interfaces.
23061 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
23062 (tparam): Adjust signature to match interface in tparam.h;
23063 this removes some undefined behavior. Check that outstring and len
23064 are zero, which they always are with Emacs.
23065 * tparam.h (PC, BC, UP): New extern decls.
23067 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
23068 (xftfont_open): Rename locals to avoid shadowing.
23070 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
23071 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
23072 (OTF_TAG_SYM): Omit macro if not needed.
23073 (ftfont_list): Remove unused local.
23074 (get_adstyle_property, ftfont_pattern_entity):
23075 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
23076 Rename locals to avoid shadowing.
23078 * xfont.c (xfont_list_family): Mark var as initialized.
23080 * xml.c (make_dom): Now static.
23082 * composite.c (composition_compute_stop_pos): Rename local to
23084 (composition_reseat_it): Remove unused locals.
23085 (find_automatic_composition, composition_adjust_point): Likewise.
23086 (composition_update_it): Mark var as initialized.
23087 (find_automatic_composition): Mark vars as initialized,
23088 with a FIXME (Bug#8290).
23090 character.h: Rename locals to avoid shadowing.
23091 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
23092 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
23093 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
23094 (BUF_DEC_POS): Be more systematic about renaming local temporaries
23095 to avoid shadowing.
23097 * textprop.c (property_change_between_p): Remove; unused.
23099 * intervals.c (interval_start_pos): Now static.
23101 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
23103 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
23104 Rename locals to avoid shadowing.
23106 * sound.c (wav_play, au_play, Fplay_sound_internal):
23107 Fix pointer signedness.
23108 (alsa_choose_format): Remove unused local var.
23109 (wav_play): Initialize a variable to 0, to prevent undefined
23110 behavior (Bug#8278).
23112 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
23114 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
23116 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
23117 clobbering (Bug#8298).
23118 * sysdep.c (sys_subshell): Likewise.
23119 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
23121 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
23122 This should get cleaned up, so that child_setup has the
23123 same signature on all platforms.
23125 * callproc.c (call_process_cleanup): Now static.
23126 (relocate_fd): Rename locals to avoid shadowing.
23128 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
23130 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
23131 not to be necessary, and produces flickering.
23133 2011-03-20 Glenn Morris <rgm@gnu.org>
23135 * config.in: Remove file.
23137 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
23139 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
23140 are now in src/globals.h.
23141 (syms_of_minibuf): Remove spurious & from previous change.
23143 2011-03-20 Leo Liu <sdl.web@gmail.com>
23145 * minibuf.c (completing-read-function): New variable.
23146 (completing-read-default): Rename from completing-read.
23147 (completing-read): Call completing-read-function.
23149 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
23151 * xfaces.c (Fx_load_color_file):
23152 Read color file from absolute filename (bug#8250).
23154 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
23156 * makefile.w32-in: Update dependencies.
23158 2011-03-17 Eli Zaretskii <eliz@gnu.org>
23160 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
23162 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
23164 Fix more problems found by GCC 4.5.2's static checks.
23166 * process.c (make_serial_process_unwind, send_process_trap):
23167 (sigchld_handler): Now static.
23169 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
23170 That way, the code declares only the vars that it needs.
23171 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
23172 * s/cygwin.h (PTY_ITERATION): Likewise.
23173 * s/darwin.h (PTY_ITERATION): Likewise.
23174 * s/gnu-linux.h (PTY_ITERATION): Likewise.
23176 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
23177 * process.c (allocate_pty): Don't declare stb unless it's needed.
23179 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
23180 (CONSTANTLIM): Remove; unused.
23181 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
23182 Define only if needed.
23184 * unexelf.c (unexec): Name an expression,
23185 to avoid gcc -Wbad-function-cast warning.
23186 Use a different way to cause a compilation error if anyone uses
23187 n rather than nn, a way that does not involve shadowing.
23188 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
23190 * deps.mk (unexalpha.o): Remove; unused.
23192 New file unexec.h, the (simple) interface for unexec (Bug#8267).
23193 * unexec.h: New file.
23194 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
23195 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
23196 Depend on unexec.h.
23197 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
23198 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
23199 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
23200 Change as necessary to match prototype in unexec.h.
23202 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
23204 (back_comment, skip_chars): Mark vars as initialized.
23206 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
23207 Rename locals to avoid shadowing.
23209 * lread.c (read1): Rewrite so as not to use empty "else".
23210 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
23212 * print.c (Fredirect_debugging_output): Fix pointer signedess.
23214 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
23215 warning when compiling print.c.
23217 * font.c (font_unparse_fcname): Abort in an "impossible" situation
23218 instead of using an uninitialized var.
23219 (font_sort_entities): Mark var as initialized.
23221 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
23223 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
23224 pointers to constants.
23225 (font_parse_fcname): Remove unused vars.
23226 (font_delete_unmatched): Now static.
23227 (font_get_spec): Remove; unused.
23228 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
23229 (font_update_drivers, Ffont_get_glyphs, font_add_log):
23230 Rename or move locals to avoid shadowing.
23232 * fns.c (require_nesting_list, require_unwind): Now static.
23233 (Ffillarray): Rename locals to avoid shadowing.
23235 * floatfns.c (domain_error2): Define only if needed.
23236 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
23238 * alloc.c (mark_backtrace): Move decl from here ...
23239 * lisp.h: ... to here, so that it can be checked.
23241 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
23242 (Fdefvar): Rewrite so as not to use empty "else".
23243 (lisp_indirect_variable): Name an expression,
23244 to avoid gcc -Wbad-function-cast warning.
23245 (Fdefvar): Rename locals to avoid shadowing.
23247 * callint.c (quotify_arg, quotify_args): Now static.
23248 (Fcall_interactively): Rename locals to avoid shadowing.
23249 Use const pointer when appropriate.
23251 * lisp.h (get_system_name, get_operating_system_release):
23252 Move decls here, to check interfaces.
23253 * process.c (get_operating_system_release): Move decl to lisp.h.
23254 * xrdb.c (get_system_name): Likewise.
23255 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
23256 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
23257 some of which prompt warnings from gcc -Wbad-function-cast.
23258 (Fformat_time_string, Fencode_time, Finsert_char):
23259 (Ftranslate_region_internal, Fformat):
23260 Rename or remove local vars to avoid shadowing.
23261 (Ftranslate_region_internal): Mark var as initialized.
23263 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
23266 * lisp.h (eassert): Check that the argument compiles, even if
23267 ENABLE_CHECKING is not defined.
23269 * data.c (Findirect_variable): Name an expression, to avoid
23270 gcc -Wbad-function-cast warning.
23271 (default_value, arithcompare, arith_driver, arith_error): Now static.
23272 (store_symval_forwarding): Rename local to avoid shadowing.
23273 (Fmake_variable_buffer_local, Fmake_local_variable):
23274 Mark variables as initialized.
23275 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
23277 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
23278 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
23279 Rename locals to avoid shadowing.
23280 (mark_stack): Move local variables into the #ifdef region where
23282 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
23283 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
23285 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
23286 (GC_STRING_CHARS): Remove; not used.
23287 (Fmemory_limit): Cast sbrk's returned value to char *.
23289 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
23290 avoids undefined behavior in theory.
23292 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
23294 Use functions, not macros, for up- and down-casing (Bug#8254).
23295 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
23296 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
23297 to use the following functions instead of these macros.
23298 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
23299 EMACS_INT, since callers assume the returned value fits in int.
23300 (upcase1): Likewise, for UPCASE_TABLE.
23301 (uppercasep, lowercasep, upcase): New static inline functions.
23302 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
23303 the race-condition problem in the old DOWNCASE.
23305 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
23306 Rename locals to avoid shadowing.
23307 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
23308 (regex_compile, re_search_2, re_match_2_internal):
23309 Remove unused local vars.
23310 (FREE_VAR): Rewrite so as not to use empty "else",
23311 which gcc can warn about.
23312 (regex_compile, re_match_2_internal): Mark locals as initialized.
23313 (RETALLOC_IF): Define only if needed.
23314 (WORDCHAR_P): Likewise. This one is never needed, but is used
23315 only in a comment talking about a compiler bug, so put inside
23316 the #if 0 of that comment.
23317 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
23318 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
23321 * search.c (boyer_moore): Rename locals to avoid shadowing.
23322 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
23323 (PREV_CHAR_BOUNDARY): Likewise.
23325 * search.c (simple_search): Remove unused var.
23327 * dired.c (compile_pattern): Move decl from here ...
23328 * lisp.h: ... to here, so that it can be checked.
23329 (struct re_registers): New forward decl.
23331 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
23333 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
23335 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
23336 Rename locals to avoid shadowing.
23337 (Fvertical_motion): Mark locals as initialized.
23339 * casefiddle.c (casify_object, casify_region): Now static.
23340 (casify_region): Mark local as initialized.
23342 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
23344 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
23345 New macros, so that the caller can use some names other than
23346 gcpro1, gcpro2, etc.
23347 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
23349 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
23350 argument, for consistency with GCPRO2_VAR, etc: it is now the
23351 prefix of the variable, not the variable itself. All uses
23353 * dired.c (directory_files_internal, file_name_completion):
23354 Rename locals to avoid shadowing.
23356 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
23357 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
23358 dired.c's scmp function, had undefined behavior.
23359 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
23360 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
23361 * buffer.h: ... to here, because these macros use current_buffer,
23362 and the new implementation with inline functions needs to have
23363 current_buffer in scope now, rather than later when the macros
23365 (downcase, upcase1): New static inline functions.
23366 (DOWNCASE, UPCASE1): Reimplement using these functions.
23367 This avoids undefined behavior in expressions like
23368 DOWNCASE (x) == DOWNCASE (y), which previously suffered
23369 from race conditions in accessing the global variables
23370 case_temp1 and case_temp2.
23371 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
23372 * lisp.h (case_temp1, case_temp2): Remove their decls.
23373 * character.h (ASCII_CHAR_P): Move from here ...
23374 * lisp.h: ... to here, so that the inline functions mentioned
23375 above can use them.
23377 * dired.c (directory_files_internal_unwind): Now static.
23379 * fileio.c (file_name_as_directory, directory_file_name):
23380 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
23382 (file_name_as_directory): Use const pointers when appropriate.
23383 (Fexpand_file_name): Likewise. In particular, newdir might
23384 point at constant storage, so make it a const pointer.
23385 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
23386 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
23388 (Fset_file_times, Finsert_file_contents, auto_save_error):
23389 Rename locals to avoid shadowing.
23391 * minibuf.c (choose_minibuf_frame_1): Now static.
23392 (Ftry_completion, Fall_completions): Rename or remove locals
23393 to avoid shadowing.
23395 * marker.c (bytepos_to_charpos): Remove; unused.
23397 * lisp.h (verify_bytepos, count_markers): New decls,
23398 so that gcc does not warn that these functions aren't declared.
23400 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
23401 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
23402 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
23403 (copy_text): Remove unused local var.
23405 * filelock.c (within_one_second): Now static.
23406 (lock_file_1): Rename local to avoid shadowing.
23408 * buffer.c (fix_overlays_before): Mark locals as initialized.
23409 (fix_start_end_in_overlays): Likewise. This function should be
23410 simplified by using pointers-to-pointers, but that's a different
23412 (switch_to_buffer_1): Now static.
23413 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
23414 (report_overlay_modification): Rename locals to avoid shadowing.
23416 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
23417 Fix pointer signedness issue.
23418 (sys_subshell): Mark local as volatile if checking for lint,
23419 to suppress a gcc -Wclobbered warning that does not seem to be right.
23420 (MAXPATHLEN): Define only if needed.
23422 * process.c (serial_open, serial_configure): Move decls from here ...
23423 * systty.h: ... to here, so that they can be checked.
23425 * fns.c (get_random, seed_random): Move extern decls from here ...
23426 * lisp.h: ... to here, so that they can be checked.
23428 * sysdep.c (reset_io): Now static.
23429 (wait_for_termination_signal): Remove; unused.
23431 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
23432 (copy_keymap_item, append_key, push_text_char_description):
23434 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
23435 (DENSE_TABLE_SIZE): Remove; unused.
23436 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
23437 (describe_map_tree):
23438 Rename locals to avoid shadowing.
23440 * keyboard.c: Declare functions static if they are not used elsewhere.
23441 (echo_char, echo_dash, cmd_error, top_level_2):
23442 (poll_for_input, handle_async_input): Now static.
23443 (read_char, kbd_buffer_get_event, make_lispy_position):
23444 (make_lispy_event, make_lispy_movement, apply_modifiers):
23445 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
23446 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
23447 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
23448 (read_key_sequence, read_char): Mark locals as initialized.
23449 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
23451 * keyboard.h (make_ctrl_char): New decl.
23452 (mark_kboards): Move decl here ...
23453 * alloc.c (mark_kboards): ... from here.
23455 * lisp.h (force_auto_save_soon): New decl.
23457 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
23458 (DEFINE_DUMMY_FUNCTION): New macro.
23459 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
23461 (main): Add casts to avoid warnings
23462 if GCC considers string literals to be constants.
23464 * lisp.h (fatal_error_signal): Add decl, since it's exported.
23466 * dbusbind.c: Pointer signedness fixes.
23467 (xd_signature, xd_append_arg, xd_initialize):
23468 (Fdbus_call_method, Fdbus_call_method_asynchronously):
23469 (Fdbus_method_return_internal, Fdbus_method_error_internal):
23470 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
23471 (Fdbus_register_signal): Use SSDATA when the context wants char *.
23473 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
23474 if GCC considers string literals to be constants.
23475 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
23477 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
23479 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
23480 (print_preprocess, print_object): New macro to fix last change.
23482 * print.c (print_preprocess): Don't forget font objects.
23484 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
23486 * emacs.c (USAGE3): Doc fixes.
23488 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
23490 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
23493 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
23495 * lisp.h (VWindow_system, Qfile_name_history):
23496 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
23497 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
23498 (w32_system_caret_x, w32_system_caret_y): Declare extern.
23500 * w32select.c: Don't #include "keyboard.h".
23501 (run_protected): Add extern declaration for waiting_for_input.
23503 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
23504 * w32console.c (detect_input_pending, read_input_pending)
23505 (encode_terminal_code):
23506 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
23507 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
23508 (w32_system_caret_y, Qfile_name_history):
23509 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
23510 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
23511 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
23512 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
23513 * w32proc.c (Qlocal, report_file_error):
23514 * w32term.c (Vwindow_system, updating_frame):
23515 * w32uniscribe.c (initialized, uniscribe_font_driver):
23516 Remove unneeded extern declarations.
23518 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
23520 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
23522 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
23524 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
23525 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
23526 These macros can no longer be used for assignment.
23528 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
23529 Assign struct members directly, instead of using BUF_BEGV etc.
23530 (record_buffer_markers, fetch_buffer_markers): New functions for
23531 recording and fetching special buffer markers.
23532 (set_buffer_internal_1, set_buffer_temp): Use them.
23534 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
23536 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
23538 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
23539 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
23541 * xdisp.c (hscroll_window_tree):
23542 (reconsider_clip_changes): Use PT instead of BUF_PT.
23544 2011-03-13 Eli Zaretskii <eliz@gnu.org>
23546 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
23547 $(EMACS_ROOT)/lib/intprops.h.
23549 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
23551 Fix more problems found by GCC 4.5.2's static checks.
23553 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
23554 to unsigned char * to avoid compiler diagnostic.
23555 (xg_free_frame_widgets): Make it clear that a local variable is
23556 needed only if USE_GTK_TOOLTIP.
23557 (gdk_window_get_screen): Make it clear that this macro is needed
23558 only if USE_GTK_TOOLTIP.
23559 (int_gtk_range_get_value): New function, which avoids a diagnostic
23560 from gcc -Wbad-function-cast.
23561 (xg_set_toolkit_scroll_bar_thumb): Use it.
23562 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
23563 diagnostic from gcc -Wbad-function-cast.
23564 (get_utf8_string, xg_get_file_with_chooser):
23565 Rename locals to avoid shadowing.
23566 (create_dialog): Move locals to avoid shadowing.
23568 * xgselect.c (xg_select): Remove unused var.
23570 * image.c (four_corners_best): Mark locals as initialized.
23571 (gif_load): Initialize transparent_p to zero (Bug#8238).
23572 Mark another local as initialized.
23573 (my_png_error, my_error_exit): Mark with NO_RETURN.
23575 * image.c (clear_image_cache): Now static.
23576 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
23577 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
23578 (x_edge_detection): Remove unnecessary cast that
23579 gcc -Wbad-function-cast diagnoses.
23580 (gif_load): Fix pointer signedness.
23581 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
23582 (jpeg_load, gif_load): Rename locals to avoid shadowing.
23584 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
23586 Improve quality of tests for time stamp overflow.
23587 For example, without this patch (encode-time 0 0 0 1 1
23588 1152921504606846976) returns the obviously-bogus value (-948597
23589 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
23590 reports time overflow. See
23591 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
23592 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
23593 * editfns.c: Include limits.h and intprops.h.
23594 (TIME_T_MIN, TIME_T_MAX): New macros.
23595 (time_overflow): Move earlier, to before first use.
23596 (hi_time, lo_time): New functions, for an accurate test for
23597 out-of-range times.
23598 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
23599 (Fget_internal_run_time): Don't assume time_t fits in int.
23600 (make_time): Use list2 instead of Fcons twice.
23601 (Fdecode_time): More accurate test for out-of-range times.
23602 (check_tm_member): New function.
23603 (Fencode_time): Use it, to test for out-of-range times.
23604 (lisp_time_argument): Don't rely on undefined left-shift and
23605 right-shift behavior when checking for time stamp overflow.
23607 * editfns.c (time_overflow): New function, refactoring common code.
23608 (Fformat_time_string, Fdecode_time, Fencode_time):
23609 (Fcurrent_time_string): Use it.
23611 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
23612 * dired.c (make_time): Move to ...
23613 * editfns.c (make_time): ... here.
23614 * systime.h: Note the move.
23616 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
23618 * fringe.c (update_window_fringes): Remove unused variables.
23620 * unexmacosx.c (copy_data_segment): Also copy __got section.
23623 2011-03-12 Eli Zaretskii <eliz@gnu.org>
23625 * termcap.c [MSDOS]: Include "msdos.h".
23626 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
23627 Constify `char *' arguments and their references according to
23628 prototypes in tparam.h.
23630 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
23632 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
23633 Adapt all references accordingly.
23635 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
23637 2011-03-11 Tom Tromey <tromey@redhat.com>
23639 * buffer.c (syms_of_buffer): Remove obsolete comment.
23641 2011-03-11 Eli Zaretskii <eliz@gnu.org>
23643 * termhooks.h (encode_terminal_code): Declare prototype.
23645 * msdos.c (encode_terminal_code): Don't declare prototype.
23647 * term.c (encode_terminal_code): Now external again, used by
23648 w32console.c and msdos.c.
23650 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
23651 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
23653 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
23655 Fix some minor problems found by GCC 4.5.2's static checks.
23657 * fringe.c (update_window_fringes): Mark locals as initialized
23659 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
23661 * alloc.c (mark_fringe_data): Move decl from here ...
23662 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
23663 to check its interface.
23664 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
23666 * fontset.c (free_realized_fontset): Now static.
23667 (Fset_fontset_font): Rename local to avoid shadowing.
23668 (fontset_font): Mark local as initialized.
23669 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
23671 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
23673 * xselect.c (x_disown_buffer_selections): Remove; not used.
23674 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
23675 (x_own_selection, Fx_disown_selection_internal): Rename locals
23676 to avoid shadowing.
23677 (x_handle_dnd_message): Remove local to avoid shadowing.
23679 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
23680 so that the caller can use some name other than gcpro1.
23681 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
23682 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
23683 (Fx_backspace_delete_keys_p):
23684 Use them to avoid shadowing, and rename vars to avoid shadowing.
23685 (x_decode_color, x_set_name, x_window): Now static.
23686 (Fx_create_frame): Add braces to silence GCC warning.
23687 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
23688 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
23689 Remove unused locals.
23690 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
23691 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
23692 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
23695 * xterm.h (x_mouse_leave): New decl.
23697 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
23698 Remove unused functions.
23699 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
23700 (x_calc_absolute_position): Now static.
23701 (XTread_socket): Don't define label "out" unless it's used.
23702 Don't declare local "event" unless it's used.
23703 (x_iconify_frame, x_free_frame_resources): Don't declare locals
23704 unless they are used.
23705 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
23706 (x_fatal_error_signal): Remove; not used.
23707 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
23708 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
23709 (x_error_catcher, x_connection_closed, x_error_handler):
23710 (x_error_quitter, xembed_send_message, x_iconify_frame):
23711 (my_log_handler): Rename locals to avoid shadowing.
23712 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
23713 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
23715 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
23716 Rename or move locals to avoid shadowing.
23717 (tty_defined_color, merge_face_heights): Now static.
23718 (free_realized_faces_for_fontset): Remove; not used.
23719 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
23720 does not deduce is never used uninitialized.
23721 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
23722 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
23724 * terminal.c (store_terminal_param): Now static.
23726 * xmenu.c (menu_highlight_callback): Now static.
23727 (set_frame_menubar): Remove unused local.
23728 (xmenu_show): Rename parameter to avoid shadowing.
23729 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
23730 since they might point to immutable storage.
23731 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
23732 since it's unused otherwise.
23734 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
23735 Add a FIXME, since the code still doesn't look right. (Bug#8215)
23736 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
23737 avoids a gcc -Wuninitialized diagnostic.
23738 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
23739 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
23740 does not deduce are never used uninitialized.
23742 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
23744 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
23745 * window.c (window_loop, size_window):
23746 (run_window_configuration_change_hook, enlarge_window): Likewise.
23748 * window.c (display_buffer): Now static.
23749 (size_window): Mark variables that gcc -Wuninitialized
23750 does not deduce are never used uninitialized.
23751 * window.h (check_all_windows): New decl, to forestall
23752 gcc -Wmissing-prototypes diagnostic.
23753 * dispextern.h (bidi_dump_cached_states): Likewise.
23755 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
23757 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
23758 Include <limits.h>.
23759 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
23760 and to avoid gcc -Wuninitialized warning.
23761 (load_charset_map): Mark variables that gcc -Wuninitialized
23762 does not deduce are never used uninitialized.
23763 (load_charset): Abort instead of using uninitialized var (Bug#8229).
23765 * coding.c (coding_set_source, coding_set_destination):
23766 Use "else { /* comment */ }" rather than "else /* comment */;"
23767 for clarity, and to avoid gcc -Wempty-body warning.
23768 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
23769 a block, when the outer 'i' will do.
23770 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
23771 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
23772 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
23773 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
23774 (Fdecode_sjis_char, Fdefine_coding_system_internal):
23775 Rename locals to avoid shadowing.
23776 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
23777 * coding.c (emacs_mule_char, encode_invocation_designation):
23778 Now static, since they're not used elsewhere.
23779 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
23780 (decode_coding_object, encode_coding_object, detect_coding_system):
23781 (decode_coding_emacs_mule): Mark variables that gcc
23782 -Wuninitialized does not deduce are never used uninitialized.
23783 (detect_coding_iso_2022): Initialize a local variable that might
23784 be used uninitialized. Leave a FIXME because it's not clear that
23785 this initialization is needed. (Bug#8211)
23786 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
23787 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
23788 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
23789 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
23790 Remove unused macros.
23792 * category.c (hash_get_category_set): Remove unused local var.
23793 (copy_category_table): Now static, since it's not used elsewhere.
23794 * character.c (string_count_byte8): Likewise.
23796 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
23797 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
23799 * chartab.c (copy_sub_char_table): Now static, since it's not used
23801 (sub_char_table_ref_and_range, char_table_ref_and_range):
23802 Rename locals to avoid shadowing.
23803 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
23805 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
23806 (BIDI_BOB): Remove unused macro.
23808 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
23809 deduce are never used uninitialized.
23810 * term.c (encode_terminal_code): Likewise.
23812 * term.c (encode_terminal_code): Now static. Remove unused local.
23814 * tparam.h: New file.
23815 * term.c, tparam.h: Include it.
23816 * deps.mk (term.o, tparam.o): Depend on tparam.h.
23817 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
23818 Move these decls to tparam.h, and make them agree with what
23819 is actually in tparam.c. The previous trick of using incompatible
23820 decls in different modules does not conform to the C standard.
23821 All callers of tparam changed to use tparam's actual API.
23822 * tparam.c (tparam1, tparam, tgoto):
23823 Use const pointers where appropriate.
23825 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
23826 * cm.h (struct cm): Likewise.
23827 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
23828 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
23829 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
23830 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
23831 (turn_on_face, init_tty): Likewise.
23832 * termchar.h (struct tty_display_info): Likewise.
23834 * term.c (term_mouse_position): Rename local to avoid shadowing.
23836 * alloc.c (mark_ttys): Move decl from here ...
23837 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
23839 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
23841 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
23843 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
23845 * search.c (compile_pattern_1): Remove argument regp, unused since
23846 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
23847 (compile_pattern): Don't pass it.
23849 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
23851 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
23852 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
23854 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
23856 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
23858 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
23859 gdk_window_get_screen, gdk_window_get_geometry,
23860 gdk_x11_window_lookup_for_display and GDK_KEY_g.
23861 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
23862 (xg_get_pixbuf_from_pixmap): New function.
23863 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
23864 to Pixmap, take frame as parameter, remove GdkColormap parameter.
23865 Call xg_get_pixbuf_from_pixmap instead of
23866 gdk_pixbuf_get_from_drawable.
23867 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
23868 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
23869 (xg_check_special_colors): Use GtkStyleContext and its functions
23871 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
23872 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
23873 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
23874 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
23875 Call gtk_widget_get_preferred_size.
23876 (xg_frame_resized): gdk_window_get_geometry only takes 5
23878 (xg_win_to_widget, xg_event_is_for_menubar):
23879 Call gdk_x11_window_lookup_for_display.
23880 (xg_set_widget_bg): New function.
23881 (delete_cb): New function.
23882 (xg_create_frame_widgets): Connect delete-event to delete_cb.
23883 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
23884 (xg_set_background_color): Call xg_set_widget_bg.
23885 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
23886 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
23887 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
23888 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
23890 (update_frame_tool_bar): Call gtk_widget_hide.
23891 (xg_initialize): Use GDK_KEY_g.
23893 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
23895 (x_session_initialize): Call gdk_x11_set_sm_client_id.
23897 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
23898 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
23899 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
23901 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
23903 * w32xfns.c (select_palette): Check success of RealizePalette against
23904 GDI_ERROR, not zero.
23906 See ChangeLog.11 for earlier changes.
23908 ;; Local Variables:
23912 Copyright (C) 2011-2013 Free Software Foundation, Inc.
23914 This file is part of GNU Emacs.
23916 GNU Emacs is free software: you can redistribute it and/or modify
23917 it under the terms of the GNU General Public License as published by
23918 the Free Software Foundation, either version 3 of the License, or
23919 (at your option) any later version.
23921 GNU Emacs is distributed in the hope that it will be useful,
23922 but WITHOUT ANY WARRANTY; without even the implied warranty of
23923 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23924 GNU General Public License for more details.
23926 You should have received a copy of the GNU General Public License
23927 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.