1 2012-10-08 Eli Zaretskii <eliz@gnu.org>
3 * makefile.w32-in (FONT_H): Add $(FRAME_H).
4 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
5 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
6 (GLOBAL_SOURCES): Add cygw32.c.
8 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
10 (x_to_w32_color): Don't modify the argument, modify a copy instead.
12 2012-10-08 Daniel Colascione <dancol@dancol.org>
14 * image.c: Permanent fix for JPEG compilation issue --- limit
15 jpeglib `boolean' redefinition to Cygwin builds.
17 2012-10-08 Eli Zaretskii <eliz@gnu.org>
19 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
21 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
24 2012-10-08 Daniel Colascione <dancol@dancol.org>
26 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
27 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
28 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
29 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
30 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
31 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
32 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
33 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
34 now a supported configuration.
36 * Makefile.in: consolidate image variables into LIBIMAGE; add
37 W32_OBJ and W32_LIBS. Compile new files.
40 (_DebPrint) declare tracing facility for W32 debugging. We need
41 to unify tracing later.
43 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
44 unconditional use of W32 Unicode functions. Cygwin runs only on
45 100% Unicode operating systems.
47 * cygw32.c: New file. Define Cygwin-specific facilities.
48 (Fcygwin_convert_path_to_windows)
49 (Fcygwin_convert_path_from_windows): New user functions for
50 accessing Cygwin path-munging routines.
53 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
54 UTF-16LE strings temporarily inside non-Lisp-visible string
57 (w32_strerror): Just what it says on the tin.
59 * emacs.c: Make the NS fork-then-exec code for daemon-launching
60 also run for Cygwin; both systems have the same problem with using
61 GUI facilities in a forked child. Also call syms_of_cygw32,
62 syms_of_w32select in correct places.
64 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
65 needs fork-then-exec for daemon launching.
67 * font.h: Include frame.h.
69 * image.c: Use the image library cache machinery only when we're
70 compiling for native WINDOWSNT; Cygwin can use shared libraries
71 like any other Unixlike system.
73 * keyboard.c: Clarify a comment regarding the input loop.
75 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
76 functions directly instead of trying to detect at runtime that our
77 host operating system supports them. We make this change for two
78 reasons: Cygwin lacks support for the multibyte character
79 conversion functions used by the legacy menu code, and Cygwin
80 never needs to rely on non-Unicode APIs.
82 * unexw32.c (hinst): Declare extern.
84 * w32.c: Change header order;
85 (w32_strerror): Move to w32fns.c because we need it for
88 * w32.h: Add #error macro to make sure we don't include w32.h for
89 Cygwin builds. Remove w32select declarations.
91 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
92 w32fns.c. w32console.c is WINDOWSNT-only.
94 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
95 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
97 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
98 (w32_major_version, w32_minor_version, w32_build_number)
99 (os_subtype, sound_type): Define here
100 (w32_defined_color): Make color parameter const for consistency
101 with other _defined_color functions.
102 (w32_createwindow): Unconditionally call w32_init_class instead of
103 doing so only when hprevinst is non-NULL. Plumbing hprevinst
104 through the code is complex and unnecessary because class
105 registration is practically free.
106 (w32_name_of_message): New EMACSDEBUG-only function.
107 (Fset_message_beep): Move here
108 (Fx_open_connection): Require that the display name for Windows be
109 "w32" for consistency, emacsclient disambiguation, and maybe, one
110 day, multi-window-system support.
111 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
112 Cygwin files for W32 GUI facilities, since these clearly don't
115 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
116 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
117 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
118 (w32_last_error): Remove.
120 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
122 * w32heap.c (syspage_mask): Declare here.
123 (cache_system_info): Remove.
125 * w32inevt.c (faked_key): Define globally, not statically.
126 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
127 (w32_console_toggle_lock_key): Move to w32fns.c.
129 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
131 * w32proc.c (_DebPrint): Move to w32fns.c.
132 * w32select.c: Include string.h, stdio.h for Cygwin.
133 * w32select.h: New File.
135 * w32term.c: Include io.h for non-CYGWIN builds; needed for
137 (w32_message_fd): New variable. Under Cygwin, holds the file
138 descriptor the system used to tell us about pending thread
141 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
142 that prevented compilation under non-WINDOWSNT systems.
144 (w32_initialize): Open /dev/windows and assign it to
145 w32_message_fd. Provide w32 feature.
147 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
148 (WM_EMACS_INPUT_READY): add.
149 (prepend_msg, w32_message_fd): Declare globally.
152 (keyboard_handle): Use only when WINDOWSNT.
153 (notify_msg_ready): New function. Posts a message to the main
154 thread's message queue under CYGWIN, which wakes up the main
155 thread from select(2) by making the /dev/windows file descriptor
156 ready. Under WINDOWSNT, it sets an event the same way the old
159 (post, prepend_msg): Actually call notify_msg_ready instead of
160 setting the input event directly.
162 2012-10-07 Eli Zaretskii <eliz@gnu.org>
164 * ralloc.c (relinquish): If a heap is ready to be relinquished,
165 but it still has blocs in it, don't return it to the system,
166 instead of aborting. (Bug#12402)
168 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
170 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
172 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
173 MAC_OS_X_VERSION_10_6.
174 (syms_of_nsterm): Remove comment about Panther and above for
176 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
177 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
178 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
180 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
181 MAC_OS_X_VERSION_10_4.
183 * nsmenu.m (fillWithWidgetValue:): Remove code for <
184 MAC_OS_X_VERSION_10_2.
186 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
188 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
189 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
191 * nsterm.m (ns_in_resize): Remove (Bug#12479).
192 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
193 (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove
195 (ns_clear_frame_area): Remove resize handle code.
197 * nsfns.m (ns_in_resize): Remove.
198 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
201 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
203 Improve sys_siglist detection.
204 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
205 defined as a macro, as is done in Solaris.
206 (sys_siglist_entries): New macro.
207 (save_strsignal): Use it.
208 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
209 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
211 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
213 * nsfns.m (Fx_create_frame): Call x_default_parameter with
214 fullscreen/Fullscreen.
216 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
219 * nsterm.m (x_make_frame_visible): Check for fullscreen.
220 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
221 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
222 (windowDidResize:): Check for correct window if old style fullscreen.
223 Capitalize word in comment. Remove incorrect comment.
224 (initFrameFromEmacs:): tbar_height renamed tibar_height.
225 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
226 error in drawing background.
227 (toggleFullScreen:): Remove comment. Rearrange calls.
228 Set toolbar values to zero, save old height in tobar_height.
229 Restore tool bar height when leaving fullscreen.
230 (canBecomeMainWindow): New function.
232 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
234 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
236 2012-10-05 Eli Zaretskii <eliz@gnu.org>
238 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
240 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
241 that time stamps of directories could also be changed. Don't
242 request the too broad GENERIC_WRITE, only the more restrictive
243 FILE_WRITE_ATTRIBUTES access rights.
245 * fileio.c (Fset_file_times): Special-case ignoring errors for
246 directories only on MSDOS, not on MS-Windows.
248 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
250 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
252 2012-10-04 Eli Zaretskii <eliz@gnu.org>
254 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
255 see whether CreateFile failed.
257 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
259 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
260 to avoid similar races.
261 * keyboard.c (pending_signals): Now bool, not int.
263 Port timers to OpenBSD, plus check for timer failures.
264 OpenBSD problem reported by Han Boetes.
265 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
267 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
268 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
269 like OpenBSD, which has timer_settime but does not declare it.
270 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
271 whether to use itimerspec-related primitives. All uses of
272 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
274 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
276 * profiler.c (handle_profiler_signal): Fix a malloc race
277 that caused Emacs to hang on Fedora 17 when profiling Lisp.
279 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
281 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
283 2012-10-02 Eli Zaretskii <eliz@gnu.org>
285 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
286 consistent with the change in return value of 'safe_strsignal'.
288 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
290 Prefer plain 'static' to 'static inline' (Bug#12541).
291 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
292 (bidi_set_sor_type, bidi_push_embedding_level)
293 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
294 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
295 (bidi_cache_search, bidi_cache_ensure_space)
296 (bidi_cache_iterator_state, bidi_cache_find)
297 (bidi_peek_at_next_level, bidi_set_paragraph_end)
298 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
299 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
300 Now 'static', not 'static inline'.
302 Count overruns when profiling; change units to ns.
303 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
304 Give extra weight to samples after overruns, to attempt to count
305 the time more accurately.
306 (setup_cpu_timer): Change sampling interval units from ms to ns, since
307 the underlying primitives nominally do ns.
308 (Fprofiler_cpu_start): Document the change. Mention that
309 the sampling intervals are only approximate.
311 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
313 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
315 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
316 case for the special 0 coding-system.
318 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
319 (Fmake_overlay): Remove redundant tests.
320 (fix_start_end_in_overlays): Remove redundant recentering.
322 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
324 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
327 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
329 Fix a malloc race condition involving strsignal.
330 A signal can arrive in the middle of a malloc, and Emacs's signal
331 handler can invoke strsignal, which can invoke malloc, which is
332 not portable. This race condition bug makes Emacs hang on GNU/Linux.
333 Fix it by altering the signal handler so that it does not invoke
335 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
336 * process.c (status_message): Use const pointer, in case strsignal
337 is #defined to safe_strsignal.
338 * sysdep.c (sys_siglist, init_signals): Always define and
339 initialize a substitute sys_siglist if the system does not define
340 one, even if HAVE_STRSIGNAL.
341 (safe_strsignal): Rename from strsignal. Always define,
342 using sys_siglist. Return a const pointer.
343 * syssignal.h (safe_strsignal): New decl.
344 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
346 2012-10-01 Eli Zaretskii <eliz@gnu.org>
348 * w32proc.c (timer_loop): Fix code that waits for timer
349 expiration, to avoid high CPU usage.
351 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
353 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
354 (sweep_weak_table): Remove redundant prototypes.
356 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
358 * emacs.c: Move the inclusion of TERM_HEADER after including
359 windows.h on WINDOWSNT. This avoids compilation problems with
362 2012-10-01 Eli Zaretskii <eliz@gnu.org>
364 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
365 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
366 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
367 as the previous version used 'void *'.
369 * ralloc.c (ROUNDUP): Fix last change.
370 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
373 * w32proc.c <disable_itimers>: New static flag.
374 (init_timers): Initialize it to zero, after creating the critical
375 sections used by the timer threads.
376 (term_timers): Set to 1 before deleting the critical sections.
377 (getitimer, setitimer): If disable_itimers is non-zero, return an
378 error indication without doing anything. Reported by Fabrice
379 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
380 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
382 [!HAVE_SETITIMER]: Behave as the previous version that didn't
385 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
386 term_ntproc after all the other bookkeeping, to get timers working
389 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
391 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
392 Suggested by Juri Linkov in
393 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
395 Prefer plain 'static' to 'static inline' (Bug#12541).
396 With static functions, modern compilers inline pretty well by
397 themselves; advice from programmers often hurts as much as it helps.
398 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
399 this change shrinks the text size of the Emacs executable by 1.1%
400 without affecting CPU significantly in my benchmark.
401 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
402 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
403 (mark_maybe_object, mark_maybe_pointer, bounded_number):
404 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
405 (bset_auto_fill_function, bset_auto_save_file_format)
406 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
407 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
408 (bset_cache_long_line_scans, bset_case_fold_search)
409 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
410 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
411 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
412 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
413 (bset_header_line_format, bset_indicate_buffer_boundaries)
414 (bset_indicate_empty_lines, bset_invisibility_spec)
415 (bset_left_fringe_width, bset_major_mode, bset_mark)
416 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
417 (bset_name, bset_overwrite_mode, bset_pt_marker)
418 (bset_right_fringe_width, bset_save_length)
419 (bset_scroll_bar_width, bset_scroll_down_aggressively)
420 (bset_scroll_up_aggressively, bset_selective_display)
421 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
422 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
423 (set_buffer_overlays_after):
424 * category.c (bset_category_table):
425 * charset.c (read_hex):
426 * coding.c (produce_composition, produce_charset)
427 (handle_composition_annotation, handle_charset_annotation)
429 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
430 (assign_row, set_frame_matrix_frame, make_current)
432 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
433 * fns.c (maybe_resize_hash_table):
434 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
435 * gmalloc.c (register_heapinfo):
436 * image.c (lookup_image_type):
437 * intervals.c (set_interval_object, set_interval_left)
438 (set_interval_right, copy_interval_parent, rotate_right)
439 (rotate_left, balance_possible_root_interval):
440 * keyboard.c (kset_echo_string, kset_kbd_queue)
441 (kset_keyboard_translate_table, kset_last_prefix_arg)
442 (kset_last_repeatable_command, kset_local_function_key_map)
443 (kset_overriding_terminal_local_map, kset_real_last_command)
444 (kset_system_key_syms, clear_event, set_prop):
445 * lread.c (digit_to_number):
446 * marker.c (attach_marker, live_buffer, set_marker_internal):
447 * nsterm.m (ns_compute_glyph_string_overhangs):
448 * process.c (pset_buffer, pset_command)
449 (pset_decode_coding_system, pset_decoding_buf)
450 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
451 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
452 (pset_status, pset_tty_name, pset_type, pset_write_queue):
453 * syntax.c (bset_syntax_table, dec_bytepos):
454 * terminal.c (tset_param_alist):
455 * textprop.c (interval_has_some_properties)
456 (interval_has_some_properties_list):
457 * window.c (wset_combination_limit, wset_dedicated)
458 (wset_display_table, wset_hchild, wset_left_fringe_width)
459 (wset_left_margin_cols, wset_new_normal, wset_new_total)
460 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
461 (wset_right_fringe_width, wset_right_margin_cols)
462 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
463 (wset_vertical_scroll_bar_type, wset_window_parameters):
464 * xdisp.c (wset_base_line_number, wset_base_line_pos)
465 (wset_column_number_displayed, wset_region_showing)
466 (window_box_edges, run_window_scroll_functions)
467 (append_glyph_string_lists, prepend_glyph_string_lists)
468 (append_glyph_string, set_glyph_string_background_width)
469 (append_glyph, append_composite_glyph)
470 (take_vertical_position_into_account):
471 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
472 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
473 (lface_hash, lface_same_font_attributes_p, lookup_face):
474 * xml.c (libxml2_loaded_p):
475 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
476 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
477 Now 'static', not 'static inline'.
480 (bidi_copy_it): Do the whole copy with a single memcpy.
481 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
483 Revert the FOLLOW-SYMLINKS change for file-attributes.
484 Doing it right would require several changes to Tramp, and there's
485 not enough time to get that tested before the freeze today.
486 * dired.c (directory_files_internal, Ffile_attributes):
489 * frame.c (x_report_frame_params): Port better to wider ints.
490 Do not assume that EMACS_UINT is the same width as uprintmax_t,
491 or that pointers can be printed in 15 decimal digits.
492 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
494 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
496 Support x64 build on MS-Windows.
497 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
498 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
499 compatibility with x64.
500 (x_get_focus_frame): Add prototype.
502 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
503 defining an XRectangle structure.
505 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
506 arithmetics for compatibility with x64.
508 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
509 compatibility with x64.
511 * w32heap.h: Adjust prototypes and declarations.
513 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
514 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
515 DWORD, long, and unsigned long, for compatibility with x64.
516 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
517 (sbrk): Argument is now of type ptrdiff_t.
519 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
521 (w32_msg_pump): Use WPARAM type for 'result'.
523 * w32.c (init_environment, get_emacs_configuration): Support AMD64
525 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
526 compatibility with x64.
528 * vm-limit.c (lim_data): Now size_t.
529 (check_memory_limits): Adjust prototypes of real_morecore and
530 __morecore to receive argument of type ptrdiff_t. Use size_t for
531 five_percent and data_size.
533 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
534 variables, for compatibility with x64.
535 (rva_to_section, offset_to_section, relocate_offset)
536 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
537 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
538 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
539 for compatibility with x64.
541 * sysdep.c (STDERR_FILENO): Define if not already defined.
543 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
544 (__morecore): Argument type is now ptrdiff_t.
545 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
546 (relinquish): Use ptrdiff_t type for 'excess'.
547 (r_alloc_sbrk): Argument type is now ptrdiff_t.
549 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
550 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
551 instead of a literal number.
553 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
554 (min): Define only if not already defined.
556 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
557 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
560 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
561 'bitmaps' is a pointer.
563 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
565 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
567 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
569 file-attributes has a new optional arg FOLLOW-SYMLINKS.
570 * dired.c (directory_files_internal, Ffile_attributes):
571 New arg follow_symlinks. All uses changed.
573 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
575 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
577 2012-09-30 Eli Zaretskii <eliz@gnu.org>
579 Support atimers and CPU profiler via profile.c on MS-Windows.
580 * w32proc.c (sig_mask, crit_sig): New static variables.
581 (sys_signal): Support SIGALRM and SIGPROF.
582 (sigemptyset, sigaddset, sigfillset, sigprocmask)
583 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
584 sigfillset, and sigprocmask are no longer no-ops.
585 (sigismember): New function.
586 (struct itimer_data): New definition.
587 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
588 (crit_prof): New static variables.
589 (MAX_SINGLE_SLEEP): New definition.
590 (timer_loop, stop_timer_thread, term_timers, init_timers)
591 (start_timer_thread, getitimer, setitimer): New functions.
592 (alarm): No longer a no-op, calls setitimer.
594 * w32.c (term_ntproc): Call term_timers.
595 (init_ntproc): Make sure all signals are unblocked at startup, to
596 erase any traces of dumping. Call init_timers.
598 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
599 Windows-specific code to display the hourglass mouse pointer is no
601 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
602 to hourglass timer expiration.
603 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
604 Remove, no longer used.
605 (w32_note_current_window, show_hourglass, hide_hourglass):
606 New functions, in support of hourglass cursor display similar to other
608 (syms_of_w32fns): Don't initialize hourglass_timer.
610 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
612 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
614 * w32.h (init_timers, term_timers): Add prototypes.
616 2012-09-30 Kenichi Handa <handa@gnu.org>
618 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
619 to the buffer relocation which may be caused by ccl_driver.
621 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
623 * xfns.c (Fx_file_dialog): Update comment.
625 * w32fns.c (Fx_file_dialog): Update comment.
627 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
628 Initialize panel name field if OSX >= 10.6.
630 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
632 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
634 * nsterm.m (NEW_STYLE_FS): New define.
635 (ns_fullscreen_hook, windowWillEnterFullScreen)
636 (windowDidEnterFullScreen, windowWillExitFullScreen)
637 (windowDidExitFullScreen, toggleFullScreen, handleFS)
638 (setFSValue): New functions.
639 (EmacsFSWindow): New implementation.
640 (canBecomeKeyWindow): New function for EmacsFSWindow.
641 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
642 (dealloc): Release nonfs_window if in fullscreen.
643 (updateFrameSize:): Call windowDidMove to update top/left.
644 (windowWillResize:toSize:): Check if frame is still maximized.
645 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
646 next_maximized, maximized_width, maximized_height and nonfs_window.
647 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
649 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
650 fullscreen. Set maximized_width/height. Act on next_maximized.
652 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
653 (EmacsView): Add variables for fullscreen.
654 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
655 (EmacsFSWindow): New interface for fullscreen.
657 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
659 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
661 2012-09-30 Chong Yidong <cyd@gnu.org>
663 * fns.c (Frandom): Doc fix.
665 2012-09-30 Martin Rudalics <rudalics@gmx.at>
667 * window.c (Vwindow_combination_limit): New default value.
668 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
670 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
672 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
673 Suggested by Eli Zaretskii in
674 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
676 2012-09-30 Eli Zaretskii <eliz@gnu.org>
678 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
679 HAVE_TIMER_SETTIME is defined.
681 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
683 Profiler improvements: more-accurate timers, overflow checks.
684 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
685 signal.h, setjmp.h. Include systime.h instead.
686 (saturated_add): New function.
687 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
688 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
689 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
691 (enum profiler_cpu_running): New enum.
692 (profiler_cpu_running): Now of that enum type, not bool.
693 All uses changed to store the new value.
694 (handle_profiler_signal): Rename from sigprof_handler_1,
695 for consistency with other handlers. Do not check whether
696 cpu_log is a hash-table if garbage collecting, since it
697 doesn't matter in that case.
698 (deliver_profiler_signal): Rename from sigprof_handler,
699 for consistency with other handlers.
700 (setup_cpu_timer): New function, with much of what used to be in
701 Fprofiler_cpu_start. Check for out-of-range argument.
702 Prefer timer_settime if available, and prefer
703 thread cputime clocks, then process cputime clocks, then
704 monotonic clocks, to the old realtime clock. Use make_timeval
705 to round more-correctly when falling back to setitimer.
706 (Fprofiler_cpu_start): Use it.
707 (Fprofiler_cpu_stop): Prefer timer_settime if available.
708 Don't assume that passing NULL as the 2nd argument of setitimer
709 is the same as passing a pointer to all-zero storage.
710 Ignore SIGPROF afterwards.
711 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
712 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
713 non-fatal signal handlers. Ignore SIGPROF on startup.
714 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
715 in profiler.c, since sysdep.c now uses it.
717 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
718 Suggested by Eli Zaretskii in
719 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
721 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
723 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
725 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
727 * lisp.h (struct backtrace): Remove indirection for `function' field.
728 * xdisp.c (redisplay_internal):
729 * profiler.c (record_backtrace, sigprof_handler_1):
730 * alloc.c (Fgarbage_collect):
731 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
732 (Fbacktrace_frame): Adjust accordingly.
734 2012-09-28 Glenn Morris <rgm@gnu.org>
736 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
737 (Frun_hook_with_args_until_failure): Doc fixes.
739 2012-09-28 Eli Zaretskii <eliz@gnu.org>
741 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
742 Qautomatic_redisplay and change the symbol name. All users changed.
744 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
746 * profiler.c (sigprof_handler): Fix race condition.
748 2012-09-28 Glenn Morris <rgm@gnu.org>
750 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
752 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
754 Check more robustly for timer_settime.
755 * Makefile.in (LIB_TIMER_TIME): New macro.
757 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
758 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
761 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
763 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
765 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
767 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
769 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
771 * character.h (MAYBE_UNIFY_CHAR): Remove.
772 * charset.c, charset.h (maybe_unify_char): Now static.
773 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
774 Since this stuff is now private to charset.c, there's no need for
775 a public macro and no need to inline by hand.
777 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
778 Stefan Monnier <monnier@iro.umontreal.ca>
779 Juanma Barranquero <lekktu@gmail.com>
781 * profiler.c: New file.
782 * Makefile.in (base_obj): Add profiler.o.
783 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
784 ($(BLD)/profiler.$(O)): New target.
785 * emacs.c (main): Call syms_of_profiler.
786 * alloc.c (Qautomatic_gc): New constant.
787 (MALLOC_PROBE): New macro.
788 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
789 (total_bytes_of_live_objects): New function.
790 (Fgarbage_collect): Use it. Record itself in backtrace_list.
791 Call malloc_probe for the memory profiler.
792 (syms_of_alloc): Define Qautomatic_gc.
793 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
795 (struct backtrace): Move definition...
796 * lisp.h (struct backtrace): ..here.
797 (Qautomatic_gc, profiler_memory_running): Declare vars.
798 (malloc_probe, syms_of_profiler): Declare functions.
799 * xdisp.c (Qautomatic_redisplay): New constant.
800 (redisplay_internal): Record itself in backtrace_list.
801 (syms_of_xdisp): Define Qautomatic_redisplay.
803 2012-09-25 Eli Zaretskii <eliz@gnu.org>
804 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
806 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
808 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
810 Prefer POSIX timers if available.
811 They avoid a race if the timer is too close to the current time.
812 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
813 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
814 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
816 2012-09-25 Eli Zaretskii <eliz@gnu.org>
818 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
820 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
823 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
825 Move Vlibrary_cache to emacs.c and reset before dumping.
827 * lisp.h (reset_image_types): Declare.
828 [WINDOWSNT] (Vlibrary_cache): Declare.
830 * image.c (reset_image_types): New function.
832 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
833 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
834 (Fdump_emacs): Reset Vlibrary_cache and image_types.
836 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
837 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
839 * w32.h (Vlibrary_cache): Do not declare.
841 2012-09-25 Eli Zaretskii <eliz@gnu.org>
843 * w32proc.c (sys_signal): Handle all signals defined by the
844 MS-Windows runtime, not just SIGCHLD. Actually install the signal
845 handlers for signals supported by Windows. Don't override
846 term_ntproc as the handler for SIGABRT.
847 (sigaction): Rewrite to call sys_signal instead of duplicating its
849 (sys_kill): Improve commentary.
851 * w32.c (term_ntproc): Accept (and ignore) one argument, for
852 consistency with a signature of a signal handler. All callers
854 (init_ntproc): Accept an argument DUMPING. If dumping, don't
855 install term_ntproc as a signal handler for SIGABRT, as that
856 should be done by the dumped Emacs.
858 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
860 * w32select.c (term_w32select): Protect against repeated
861 invocation by setting clipboard_owner to NULL after calling
864 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
865 and term_ntproc to their modified signatures.
867 * character.c (char_string, string_char): Remove calls to
868 MAYBE_UNIFY_CHAR. See the discussion starting at
869 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
872 2012-09-25 Chong Yidong <cyd@gnu.org>
874 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
876 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
878 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
879 when encountering an unknown bytecode.
881 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
883 image.c, indent.c: Use bool for booleans.
884 * dispextern.h (struct image_type): Members valid_p, load, init
885 now return bool, not int. All uses changed.
886 * image.c: Omit unnecessary static decls.
887 (x_create_bitmap_mask, x_build_heuristic_mask):
888 Return void, not int, since callers don't care about the return value.
889 (x_create_bitmap_mask, define_image_type, valid_image_p)
890 (struct image_keyword, parse_image_spec, image_spec_value)
891 (check_image_size, image_background)
892 (image_background_transparent, x_clear_image_1)
893 (postprocess_image, lookup_image, x_check_image_size)
894 (x_create_x_image_and_pixmap, xbm_image_p)
895 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
896 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
897 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
898 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
899 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
900 (png_image_p, init_png_functions, png_load_body, png_load)
901 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
902 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
903 (init_gif_functions, gif_load, imagemagick_image_p)
904 (imagemagick_load_image, imagemagick_load, svg_image_p)
905 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
907 * nsimage.m (ns_load_image):
908 * nsterm.m (ns_defined_color):
909 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
910 * xfns.c (x_defined_color):
911 * xterm.c (x_alloc_lighter_color_for_widget)
912 (x_alloc_nearest_color_1, x_alloc_nearest_color)
913 (x_alloc_lighter_color):
914 * indent.c (disptab_matches_widthtab, current_column)
915 (scan_for_column, string_display_width, indented_beyond_p)
916 (compute_motion, vmotion, Fvertical_motion):
917 Use bool for booleans.
919 2012-09-24 Chong Yidong <cyd@gnu.org>
921 * chartab.c (Fset_char_table_default): Obsolete function removed.
923 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
925 Move pid_t related decls out of lisp.h.
926 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
927 (interruptible_wait_for_termination):
928 Move these decls from lisp.h to syswait.h, since they use pid_t.
929 Needed on FreeBSD; see Herbert J. Skuhra in
930 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
931 * callproc.c: Include syswait.h.
933 gnutls.c, gtkutil.c: Use bool for boolean.
934 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
935 (emacs_gnutls_handle_error):
936 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
937 (xg_hide_tooltip, xg_create_frame_widgets)
938 (create_dialog, xg_uses_old_file_dialog)
939 (xg_get_file_with_chooser, xg_get_file_with_selection)
940 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
941 (xg_item_label_same_p, xg_update_menubar)
942 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
943 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
944 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
945 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
946 (update_frame_tool_bar, free_frame_tool_bar):
947 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
948 * nsmenu.m (ns_update_menubar):
949 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
950 * xfns.c (Fx_show_tip) [USE_GTK]:
951 Use bool for boolean.
952 * gtkutil.c (xg_update_frame_menubar):
953 * xmenu.c (update_frame_menubar):
954 Return void, not int, since caller ignores return value.
955 * gtkutil.c (xg_change_toolbar_position):
958 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
960 * makefile.w32-in (BLOCKINPUT_H): Remove.
961 (SYSSIGNAL_H): New macro.
962 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
963 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
964 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
965 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
966 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
967 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
968 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
969 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
970 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
971 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
972 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
973 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
974 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
975 ($(BLD)/w32xfns.$(O)): Update dependencies.
977 2012-09-23 Eli Zaretskii <eliz@gnu.org>
979 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
980 fatal_error_backtrace.
982 * w32proc.c (sys_kill): Undo last change: don't do anything when
983 invoked to deliver SIGABRT to our own process. This is now
984 handled by emacs_raise.
986 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
988 * w32term.c (w32_read_socket): Remove leftover reference to
989 interrupt_input_pending.
991 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
993 Do not use SA_NODEFER.
994 Problem reported by Dani Moncayo in
995 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
997 * sysdep.c (emacs_abort): Do not reset signal handler.
998 * emacs.c (terminate_due_to_signal): Reset signal handler here.
999 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1000 wanted even on POSIXish hosts, and it doesn't work on Windows.
1002 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1004 * xterm.c (x_term_init): Call fixup_locale before and after calling
1005 gtk_init (Bug#12392).
1007 2012-09-23 Chong Yidong <cyd@gnu.org>
1009 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1010 Vdynamic_library_alist.
1012 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1013 (Fgnutls_available_p): Caller changed.
1015 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1016 (Flibxml_parse_xml_region): Likewise.
1018 * dispextern.h (struct image_type): Remove arg from init function.
1020 * image.c (Finit_image_library, lookup_image_type)
1021 (define_image_type): Remove now-unneeded second arg.
1022 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1023 (init_tiff_functions, init_gif_functions, init_svg_functions):
1024 Arglist and w32_delayed_load calling convention changed.
1025 (gs_type): Remove init_gs_functions; there is no such function.
1026 (valid_image_p, make_image): Fix caller to lookup_image_type.
1028 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1030 Simplify and avoid signal-handling races (Bug#12471).
1032 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1033 Avoid recursive loop if there's a fatal error in the function itself.
1034 * atimer.c (pending_atimers):
1035 * blockinput.h: Don't include "atimer.h"; no longer needed.
1036 (interrupt_input_pending): Remove. All uses removed.
1037 pending_signals now counts both atimers and ordinary interrupts.
1038 This is less racy than having three separate pending-signal flags.
1039 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1041 Rename from their upper-case counterparts BLOCK_INPUT,
1042 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1043 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1044 This makes it easier to access volatile variables more accurately.
1045 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1046 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1047 that's more reliable if the code is buggy and sets
1048 interrupt_input_blocked to a negative value. All uses changed.
1049 * atimer.c (deliver_alarm_signal):
1050 Remove. No need to deliver this to the parent; any thread can
1051 handle this signal now. All uses replaced by underlying handler.
1052 * atimer.c (turn_on_atimers):
1053 * dispnew.c (handle_window_change_signal):
1054 * emacs.c (handle_danger_signal):
1055 * keyboard.c (kbd_buffer_get_event):
1056 Don't reestablish signal handler; not needed with sigaction.
1057 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1059 Rework to avoid unnecessary accesses to volatile variables.
1060 (UNBLOCK_INPUT_TO): Now a function.
1061 (totally_unblock_input, unblock_input): New decls.
1062 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1063 (init_data): Remove. Necessary stuff now done in init_signal.
1064 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1065 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1066 (fatal_error_code): Remove; no longer needed.
1067 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1068 it doesn't always backtrace. All uses changed. No need to reset
1069 signal to default, since sigaction and/or die does that for us now.
1070 Use emacs_raise (FOO), not kill (getpid (), FOO).
1071 (main): Check more-accurately whether we're dumping.
1072 Move fatal-error setup to sysdep.c
1073 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1074 * gtkutil.c (xg_get_file_name, xg_get_font):
1075 Remove no-longer-needed signal-mask manipulation.
1076 * keyboard.c, process.c (POLL_FOR_INPUT):
1077 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1078 * keyboard.c (read_avail_input): Remove.
1079 All uses replaced by gobble_input.
1080 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1081 (kbd_buffer_store_event_hold, gobble_input):
1082 (record_asynch_buffer_change) [USABLE_SIGIO]:
1083 (store_user_signal_events):
1084 No need to mess with signal mask.
1085 (gobble_input): If blocking input and there are terminals, simply
1086 set pending_signals to 1 and return. All hooks changed to not
1087 worry about whether input is blocked.
1088 (process_pending_signals): Clear pending_signals before processing
1089 them, in case a signal comes in while we're processing.
1090 By convention callers now test pending_signals before calling us.
1091 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1092 New functions, to support changes to blockinput.h.
1093 (handle_input_available_signal): Now extern.
1094 (reinvoke_input_signal): Remove. All uses replaced by
1096 (quit_count): Now volatile, since a signal handler uses it.
1097 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1098 All callers changed. Block SIGINT only if not already blocked.
1099 Clear sigmask reliably, even if Fsignal returns, which it can.
1100 Omit unnecessary accesses to volatile var.
1101 (quit_throw_to_read_char): No need to restore sigmask.
1102 * keyboard.c (gobble_input, handle_user_signal):
1103 * process.c (wait_reading_process_output):
1104 Call signal-handling code rather than killing ourselves.
1105 * lisp.h: Include <float.h>, for...
1106 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1107 (pending_signals): Now volatile.
1108 (syms_of_data): Now const if IEEE floating point.
1109 (handle_input_available_signal) [USABLE_SIGIO]:
1110 (terminate_due_to_signal, record_child_status_change): New decls.
1111 * process.c (create_process): Avoid disaster if memory is exhausted
1112 while we're processing a vfork, by tightening the critical section
1114 (send_process_frame, process_sent_to, handle_pipe_signal)
1115 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1117 (send_process): No need for setjmp/longjmp any more, since the
1118 SIGPIPE stuff is now gone. Instead, report an error if errno
1120 (record_child_status_change): Now extern. PID and W are now args.
1121 Return void, not bool. All callers changed.
1122 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1123 Remove. All uses removed. This bug should be fixed now in a
1125 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1126 and record the child status change directly. This avoids the
1127 need to futz with the signal mask.
1128 (process_fatal_action): Move here from emacs.c.
1129 (emacs_sigaction_flags): New function, containing
1130 much of what used to be in emacs_sigaction_init.
1131 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1132 caught by emacs, to make races less likely.
1133 (deliver_process_signal): Rename from handle_on_main_thread.
1135 (BACKTRACE_LIMIT_MAX): Now at top level.
1136 (thread_backtrace_buffer, threadback_backtrace_pointers):
1138 (deliver_thread_signal, deliver_fatal_thread_signal):
1139 New functions, for more-accurate delivery of thread-specific signals.
1140 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1141 (deliver_arith_signal): Handle in this thread, not
1142 in the main thread, since it's triggered by this thread.
1143 (maybe_fatal_sig): New function.
1144 (init_signals): New arg DUMPING so that we can be more accurate
1145 about whether we're dumping. Caller changed.
1146 Treat thread-specific signals differently from process-general signals.
1147 Block all signals while handling fatal error; that's safer.
1148 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1150 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1151 Ignore SIGPIPE unless batch.
1152 (emacs_backtrace): Output backtrace for the appropriate thread,
1153 which is not necessarily the main thread.
1154 * syssignal.h: Include <stdbool.h>.
1155 (emacs_raise): New macro.
1156 * xterm.c (x_connection_signal): Remove; no longer needed
1157 now that we use sigaction.
1158 (x_connection_closed): No need to mess with sigmask now.
1159 (x_initialize): No need to reset SIGPIPE handler here, since
1160 init_signals does this for us now.
1162 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1164 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
1165 background rect may be larger (Bug#12245).
1167 2012-09-23 Chong Yidong <cyd@gnu.org>
1169 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1171 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1173 * .gdbinit: Just stop at fatal_error_backtrace.
1174 See Stefan Monnier's request in
1175 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1176 Remove no-longer-used query of system type.
1178 2012-09-22 Chong Yidong <cyd@gnu.org>
1180 * search.c (Freplace_match): Doc fix (Bug#12325).
1182 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1184 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1185 (Fline_end_position): Doc fix.
1187 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1189 2012-09-22 Chong Yidong <cyd@gnu.org>
1191 * dispextern.h (struct image_type): Add new slot, storing a type
1192 initialization function.
1194 * image.c (define_image_type): Call the image initializer function
1195 if it is defined. Arguments and return value changed.
1196 (valid_image_p, make_image): Callers changed.
1197 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
1198 (gif_type, imagemagick_type, svg_type, gs_type):
1199 Add initialization functions.
1200 (Finit_image_library): Call lookup_image_type.
1201 (CHECK_LIB_AVAILABLE): Macro deleted.
1202 (lookup_image_type): Call define_image_type here, rather than via
1203 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1204 (syms_of_image): Move define_image_type calls for xbm_type and
1205 pbm_type to lookup_image_type.
1207 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1209 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1210 'idle_timers' from here ...
1211 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1212 lists, to avoid infloops when the timer does something stupid,
1213 like reinvoke itself with the same or smaller time-out.
1216 2012-09-22 Martin Rudalics <rudalics@gmx.at>
1218 * window.c (Fsplit_window_internal): Handle only Qt value of
1219 Vwindow_combination_limit separately.
1220 (Qtemp_buffer_resize): New symbol.
1221 (Vwindow_combination_limit): New default value.
1224 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1226 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1227 the new overlay string. (Bug#10159)
1229 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1231 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1232 or that fprintf is async-signal-safe. POSIX doesn't require
1235 2012-09-22 Chong Yidong <cyd@gnu.org>
1237 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1240 2012-09-22 Kenichi Handa <handa@gnu.org>
1242 * composite.c (composition_reseat_it): Handle the case that a
1243 grapheme cluster is not covered by a single font (Bug#12352).
1245 2012-09-21 Chong Yidong <cyd@gnu.org>
1247 * image.c (define_image_type): Avoid adding duplicate types to
1248 image_types (Bug#12463). Suggested by Jörg Walter.
1250 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1252 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1253 (print_load_command_name): Add case LC_DATA_IN_CODE.
1254 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1256 2012-09-21 Glenn Morris <rgm@gnu.org>
1258 * eval.c (Frun_hook_with_args_until_success)
1259 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1261 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
1263 * fileio.c (Ffile_selinux_context): Only call freecon when
1264 lgetfilecon succeeded.
1265 (Fset_file_selinux_context): Likewise. (Bug#12444)
1267 2012-09-21 Eli Zaretskii <eliz@gnu.org>
1269 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1270 reordering, locate the cursor by calling set_cursor_from_row; if
1271 that fails, clear the desired glyph matrix before returning a
1272 failure indication to the caller. Fixes leaving garbled display
1273 when fast scrolling with a down-key. (Bug#12403)
1274 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1275 scrolling through multibyte text.
1277 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1279 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1280 calling mark_vectorlike since that's the one that marks the window.
1281 (mark_discard_killed_buffers): Mark the final cdr.
1282 * window.h (struct window): Move prev/next_buffers to the
1283 non-standard fields.
1284 * window.c (make_window): Initialize prev/next_buffers manually.
1286 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1288 Omit unused arg EXPECTED from socket hooks.
1289 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1290 * nsterm.m (ns_term_init):
1291 * termhooks.h (struct terminal.read_socket_hook):
1292 * w32inevt.c (w32_console_read_socket):
1293 * w32term.c (w32_read_socket):
1294 * xterm.c (XTread_socket):
1295 Omit unused arg EXPECTED. All callers changed.
1296 (store_user_signal_events): Return void, not int, since callers no
1297 longer care about the return value. All uses changed.
1299 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
1301 * w32gui.h (XParseGeometry): Do not declare.
1303 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1305 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1306 Ignore 'expected'. See Eli Zaretskii in
1307 <http://bugs.gnu.org/12471#8> (last line).
1309 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1310 (XParseGeometry): Now static. Substitute extremal values for
1311 values that are out of range.
1313 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1315 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1317 * nsfns.m (XParseGeometry): Remove.
1318 (Fx_create_frame): Call x_set_offset to correctly interpret
1319 top_pos in geometry.
1321 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
1322 (Fx_parse_geometry): If there is a space in string, call
1323 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
1325 2012-09-17 Eli Zaretskii <eliz@gnu.org>
1327 * search.c (scan_buffer): Use character positions in calls to
1328 region_cache_forward and region_cache_backward, not byte
1329 positions. (Bug#12196)
1331 * w32term.c (w32_read_socket): Set pending_signals to 1, like
1332 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
1334 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
1335 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
1336 emacs_blocked_malloc, now deleted.
1338 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
1340 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
1341 The workaround was for improving performance on Solaris 2.4, but
1342 is getting in the way now. Emacs will still work if someone is
1343 still running Solaris 2.4 in a museum somewhere; Sun dropped
1344 support for Solaris 2.4 in 2003.
1345 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
1346 * process.c (create_process) [HAVE_WORKING_VFORK]:
1347 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
1348 since Emacs no longer uses vfork on that platform.
1350 2012-09-17 Glenn Morris <rgm@gnu.org>
1352 * emacs.c: Use COPYRIGHT.
1354 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
1356 Remove configure's --without-sync-input option (Bug#12450).
1357 When auditing signal-handling in preparation for cleaning it up,
1358 I found that SYNC_INPUT has race conditions and would be a real
1359 pain to fix. Since it's an undocumented and deprecated
1360 configure-time option, now seems like a good time to remove it.
1361 Also see <http://bugs.gnu.org/11080#16>.
1362 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
1363 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
1364 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1365 (malloc_hysteresis):
1366 (check_depth) [XMALLOC_OVERRUN_CHECK]:
1367 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
1368 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
1369 (dont_register_blocks, bytes_used_when_reconsidered)
1370 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1371 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1372 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1373 Remove. All uses removed.
1374 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1375 implementation, one that depends on whether the new macro
1376 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
1378 * atimer.c (run_timers, handle_alarm_signal):
1379 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
1380 (handle_async_input, process_pending_signals)
1381 (handle_input_available_signal, init_keyboard):
1382 * nsterm.m (ns_read_socket):
1383 * process.c (wait_reading_process_output):
1384 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
1385 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
1387 * xterm.c (XTread_socket):
1389 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
1390 * eval.c (handling_signal): Remove. All uses removed.
1391 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
1392 All uses replaced with the SYNC_INPUT version.
1393 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
1395 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1398 * font.c (Ffont_shape_gstring): Remove unused local.
1400 2012-09-16 Glenn Morris <rgm@gnu.org>
1402 * Makefile.in (clean): No longer run nextstep's clean.
1404 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
1406 (ns-app): Move here from ns.mk, and simplify.
1407 (clean): Simplify nextstep entry.
1408 * ns.mk: Remove file.
1410 2012-09-17 Kenichi Handa <handa@gnu.org>
1412 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
1413 not covert the last few charactes.
1415 2012-09-16 Kenichi Handa <handa@gnu.org>
1417 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
1418 here, but just check the validity of glyphs in the glyph-string.
1420 2012-09-16 Martin Rudalics <rudalics@gmx.at>
1422 * window.c (Fwindow_parameter, Fset_window_parameter):
1423 Accept any window as argument (Bug#12452).
1425 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
1427 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
1428 to ns_term_init to avoid memory leak.
1430 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
1431 explicit retain/release.
1432 (ns_term_init): Only allow one display. Initialize outerpool and
1435 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1437 Port _setjmp fix to POSIXish hosts as well as Microsoft.
1438 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
1439 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
1440 the Microsoft problem in a different way, by altering ../nt/config.nt.
1442 2012-09-15 Eli Zaretskii <eliz@gnu.org>
1457 * w16select.c: Remove inclusion of setjmp.h, as it is now included
1458 by lisp.h. This completes removal of setjmp.h inclusion
1459 erroneously announced in the previous commit. (Bug#12446)
1461 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
1464 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
1465 not defined as a macro. The latter happens on MS-Windows.
1468 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1470 Port better to POSIX hosts lacking _setjmp (Bug#12446).
1471 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
1472 Some instances of '#include <setjmp.h>' removed, if the
1473 only reason for the instance was because "lisp.h" was included.
1474 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
1475 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
1476 and _longjmp with the new symbols. Emacs already uses _setjmp if
1477 available, so this change affects only POSIXish hosts that have
1478 sigsetjmp but not _setjmp, such as some versions of Solaris and
1479 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
1480 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
1481 (png_load_body) [HAVE_PNG]:
1482 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
1483 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
1484 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
1485 since PNG requires jmp_buf. This is the only exception to the
1486 general rule that we now use sys_setjmp and sys_longjmp.
1487 This exception is OK since this code does not change the signal
1488 mask or longjmp out of a signal handler.
1490 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
1492 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1493 Include "syssignal.h", for 'main_thread'.
1495 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
1497 Avoid out-of-range marker position (Bug#12426).
1498 * insdel.c (replace_range, replace_range_2):
1499 Adjust markers before overlays, as suggested by comments.
1500 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
1501 Remove redundant check before calling offset_intervals.
1503 2012-09-14 Martin Rudalics <rudalics@gmx.at>
1505 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
1506 current buffer (Bug#12387).
1508 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
1510 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
1512 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1514 Use a more backwards-compatible timer format (Bug#12430).
1515 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
1516 vector element, not from the 4th, since PSECS is now at the end.
1517 (Fcurrent_idle_time): Doc fix.
1519 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
1521 Function to mark objects and remove killed buffers at once.
1522 * alloc.c (discard_killed_buffers): Rename to ...
1523 (mark_discard_killed buffers) ... new name. Add marking
1524 of remaining objects. Fix comment. Adjust users.
1525 (mark_object): Do not touch frame buffer lists here.
1526 * frame.c (delete_frame): Reset frame buffer lists here.
1528 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1530 Better workaround for GNOME bug when --enable-gcc-warnings.
1531 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
1532 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
1533 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
1535 Simplify SIGIO usage (Bug#12408).
1536 The code that dealt with SIGIO was crufty and confusing, e.g., it
1537 played tricks like "#undef SIGIO" but these tricks were not used
1538 consistently. Simplify mostly by not #undeffing standard symbols,
1539 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
1540 or not as we please) rather than "defined SIGIO" (standard symbol
1541 that we probably shouldn't #undef).
1542 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
1543 Modules that need it can include it.
1544 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
1545 * dispextern.h (ignore_sigio): New decl.
1546 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
1547 unconditionally, since it's now a no-op if !USABLE_SIGIO.
1548 * emacs.c (shut_down_emacs):
1549 * keyboard.c (kbd_buffer_store_event_hold):
1550 Use ignore_sigio rather than invoking 'signal' directly.
1551 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
1553 (FIONREAD, SIGIO): Do not #undef.
1554 (tty_read_avail_input): Use #error rather than a syntax error.
1555 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
1556 for I_PIPE, used by SETUP_SLAVE_PTY.
1557 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
1558 * sysdep.c (croak): Remove; no longer needed. This bit of
1559 temporary code, with Fred N. Fish's comment that it's temporary,
1560 has been in Emacs since at least 1992!
1561 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
1562 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
1563 * syssignal.h (croak): Remove decl.
1564 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
1565 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
1566 now that we're termios-only.
1567 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
1568 * term.c (dissociate_if_controlling_tty): Use #error rather than
1571 Work around GCC and GNOME bugs when --enable-gcc-warnings.
1572 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
1573 to work around GNOME bug 683906.
1574 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
1575 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
1576 This works around GCC bug 54561.
1578 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
1580 More fixes for 'volatile' and setjmp/longjmp.
1581 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
1582 * image.c (struct png_load_context) [HAVE_PNG]: New type.
1583 (png_load_body) [HAVE_PNG]:
1584 (jpeg_load_body) [HAVE_JPEG]:
1585 New function, with most of the old parent function's body.
1586 (png_load) [HAVE_PNG]:
1587 (jpeg_load) [HAVE_JPEG]:
1588 Invoke the new function, to avoid longjmp munging our locals.
1589 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
1590 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
1591 longjmp is passed 2, as the C standard doesn't guarantee this.
1592 Instead, store the failure code into mgr->failure_code.
1594 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
1596 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
1597 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
1598 (syms_of_keyboard): Remove support for unread-command-char.
1600 2012-09-12 Eli Zaretskii <eliz@gnu.org>
1602 * w32proc.c (sys_kill): If PID is our process ID and the signal is
1603 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
1604 violation. (Bug#12426)
1606 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
1608 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
1610 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
1612 * eval.c: Add `inhibit-debugger'.
1613 (Qinhibit_debugger): New symbol.
1614 (call_debugger): Bind it instead of Qdebug_on_error.
1615 (maybe_call_debugger): Test Vinhibit_debugger.
1616 (syms_of_eval): Define inhibit-debugger.
1617 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
1618 (syms_of_xdisp): Remove inhibit-debug-on-message.
1620 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
1622 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
1623 If a nonvolatile local variable is written before a _longjmp to
1624 the frame containing the variable, and is read after the _longjmp,
1625 the value read is indeterminate. Some local variables of type
1626 'struct handler' and 'struct catchtag' are used in this way, so
1627 mark each of their slots as volatile if the slot can be set before
1628 _longjmp and read afterwards.
1629 * lisp.h (struct handler): var and chosen_clause are now volatile.
1630 (struct catchtag): val, next, and pdlcount are now volatile.
1632 * bidi.c (bidi_push_it, bidi_pop_it):
1633 * fns.c (copy_hash_table):
1634 * image.c (define_image_type):
1635 * keyboard.c (kbd_buffer_store_event_hold):
1636 * process.c (Fprocess_send_eof):
1637 * xfaces.c (x_create_gc) [HAVE_NS]:
1638 * xgselect.c (xg_select):
1639 Prefer assignment to memcpy when either will do.
1641 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
1642 Use pointer-to-a-pointer to simplify and avoid a NILP check each
1643 time an item is removed. No need to mark this function 'inline';
1644 the compiler knows better than we do.
1646 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
1648 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
1649 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
1650 to change_frame_size (Bug#12388).
1651 (windowDidResize:): Pass YES to updateFrameSize.
1653 * nsterm.h: Add delay parameter to updateFrameSize.
1655 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
1657 Discard killed buffers from deleted window and frame objects.
1658 This reduces an amount of references to killed buffers and
1659 helps GC to reclaim them faster.
1660 * alloc.c (discard_killed_buffers): New function.
1661 (mark_object): Use it for deleted windows and frames.
1662 (mark_object): If symbol's value is set up for a killed buffer
1663 or deleted frame, restore it's global binding.
1664 * data.c (swap_in_global_binding): Add GC notice.
1665 (swap_in_symval_forwarding): Use convenient set_blv_where.
1666 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
1667 * window.h: ... to here.
1669 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
1671 Convenient macro to check whether the buffer is live.
1672 * buffer.h (BUFFER_LIVE_P): New macro.
1673 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
1674 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
1676 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1678 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
1679 composition cases (Bug#12364).
1681 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
1682 overhang of succeeding glyphs overlapping box cursor.
1684 * w32term.c (x_draw_glyph_string): Likewise.
1686 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
1688 Simplify, document, and port floating-point (Bug#12381).
1689 The porting part of this patch fixes bugs on non-IEEE platforms
1690 with frexp, ldexp, logb.
1691 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
1693 * floatfns.c: Simplify discussion of functions that Emacs doesn't
1694 support, by removing commented-out code and briefly listing the
1695 C89 functions excluded. The commented-out stuff was confusing
1696 maintenance, e.g., we thought we needed cbrt but it was commented out.
1697 (logb): Remove decl; no longer needed.
1698 (isfinite): New macro, if not already supplied.
1699 (isnan): Don't replace any existing macro.
1700 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
1701 are present on all C89 platforms.
1702 (Ffrexp): Do not special-case zero, as frexp does the right thing
1704 (Flogb): Do not use logb, as it doesn't have the desired meaning
1705 on hosts that use non-base-2 floating point. Instead, stick with
1706 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
1707 frexp, to avoid getting an unspecified result.
1709 * xdisp.c (Qinhibit_debug_on_message): Now static.
1711 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
1713 * nsterm.m (ns_update_begin): Set clip path to whole view by using
1714 NSBezierPath (Bug#12131).
1716 2012-09-10 Chong Yidong <cyd@gnu.org>
1718 * fns.c (Fdelq, Fdelete): Doc fix.
1720 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
1722 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
1723 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
1725 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
1727 * lisp.h (make_lisp_ptr): New macro to replace XSET.
1728 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
1731 2012-09-09 Eli Zaretskii <eliz@gnu.org>
1733 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
1734 left fringe if the window has a left margin. This avoids leaving
1735 traces of the cursor because its leftmost pixel is not drawn over.
1737 * dispnew.c (update_window_line): When the left margin area of a
1738 screen line is updated, set the redraw_fringe_bitmaps_p flag of
1739 that screen line. (Bug#12277)
1741 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
1743 Assume C89 or later for math functions (Bug#12381).
1744 This simplifies the code, and makes it a bit smaller and faster,
1745 and (most important) makes it easier to clean up signal handling
1746 since we can stop worring about floating-point exceptions in
1747 library code. That was a problem before C89, but the problem
1748 went away many years ago on all practical Emacs targets.
1749 * data.c, image.c, lread.c, print.c:
1750 Don't include <math.h>; no longer needed.
1751 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
1752 might be autoconfigured, as that never happens.
1754 * doprnt.c (DBL_MAX_10_EXP):
1755 * print.c (DBL_DIG):
1756 Remove. C89 or later always defines these.
1757 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
1758 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
1759 (arith_error, domain_error, domain_error2):
1760 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
1761 no longer needed -- we simply return what C returns. All uses removed.
1762 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
1764 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
1765 Remove. All uses expanded, as these macros are no longer used
1766 more than once and are now more trouble than they're worth.
1767 (Ftan): Use tan, not sin / cos.
1768 (Flogb): Assume C89 frexp.
1769 (fmod_float): Assume C89 fmod.
1770 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
1771 (init_floatfns): Remove. All uses removed.
1773 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
1775 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
1776 compositeToPoint for OSX < 10.6 (Bug#12390).
1778 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
1780 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
1781 This produces more-accurate results.
1783 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
1785 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
1786 changes (Bug#12088).
1788 2012-09-08 Chong Yidong <cyd@gnu.org>
1790 * syntax.c (Fstring_to_syntax): Doc fix.
1792 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
1794 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
1795 in the internal border.
1796 (x_set_window_size): Remove static variables and their usage.
1797 (ns_redraw_scroll_bars): Fix NSTRACE arg.
1798 (ns_after_update_window_line, ns_draw_fringe_bitmap):
1799 Remove fringe/internal border adjustment (Bug#11052).
1800 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
1801 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
1802 (ns_fix_rect_ibw): Remove.
1803 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
1804 (ns_dumpglyphs_box_or_relief): Ditto.
1805 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
1807 (ns_dumpglyphs_image): Ditto.
1808 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
1810 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
1811 their usage. Add fringe_extended_p and its use as in other terms.
1812 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
1813 scroll bar was removed.
1814 (updateFrameSize): New function.
1815 (windowDidResize): Move code to updateFrameSize and call it.
1817 * nsterm.h (EmacsView): Add updateFrameSize.
1819 2012-09-07 Chong Yidong <cyd@gnu.org>
1821 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
1823 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
1825 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
1827 More signal-handler cleanup (Bug#12327).
1828 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
1829 Problem introduced when merging patches. Noted by Eli Zaretskii in
1830 <http://bugs.gnu.org/12327#67>.
1831 * floatfns.c: Comment fix.
1832 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
1833 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
1834 and anyway the declaration is harmless even if SIGDANGER is not defined.
1835 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
1836 defined BROKEN_FIONREAD). systty.h formerly did this, but other
1837 source files not surprisingly expected syssignal.h to define, or
1838 not define, SIGIO, and it's cleaner to do it that way, for consistency.
1839 Include <sys/ioctl.h>, for FIONREAD.
1840 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
1841 This eliminates a problem whereby other files mysteriously had
1842 to include "syssignal.h" before including "systty.h" if they
1843 wanted to use "#ifdef SIGIO".
1845 2012-09-07 Eli Zaretskii <eliz@gnu.org>
1847 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
1849 * w32.c (sigemptyset): Empty the set.
1850 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
1852 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
1854 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
1856 * alloc.c (mark_buffer): Revert unsafe marking optimization.
1857 (mark_object): Likewise for frame objects.
1859 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
1861 * syssignal.h (handle_on_main_thread): Always declare,
1862 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
1863 This ports to platforms without HAVE_PTHREAD.
1865 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
1867 Signal-handler cleanup (Bug#12327).
1868 Emacs's signal handlers were written in the old 4.2BSD style with
1869 sigblock and sigmask and so forth, and this led to some
1870 inefficiencies and confusion. Rewrite these to use
1871 pthread_sigmask etc. without copying signal sets around. Also,
1872 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
1873 'signal', and instead use functions that do not attempt to take
1874 over the system name space. This patch causes Emacs's text
1875 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
1876 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
1877 Do not include <signal.h> or "syssignal.h", as these
1878 modules do not use signals.
1879 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
1880 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
1881 Do not include <signal.h>, as "syssignal.h" does that for us now.
1882 * atimer.c (sigmask_atimers): New function.
1883 (block_atimers, unblock_atimers): New functions,
1884 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
1886 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
1887 no longer needed here.
1888 * emacs.c (main): Inspect existing signal handler with sigaction,
1889 so that there's no need to block and unblock SIGHUP.
1890 * sysdep.c (struct save_signal): New member 'action', replacing
1891 old member 'handler'.
1892 (save_signal_handlers, restore_signal_handlers):
1893 Use sigaction instead of 'signal' to save and restore.
1894 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
1895 New function. All users of 'signal' modified to use set_sighandler
1896 if they're writeonly, and to use sys_signal if they're read+write.
1897 (emacs_sigaction_init, forwarded_signal): New functions.
1898 (sys_signal): Remove. All uses replaced by calls to sigaction
1899 and emacs_sigaction_init, or by direct calls to 'signal'.
1900 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
1901 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
1902 all uses replaced by pthread_sigmask etc. calls.
1903 * syssignal.h: Include <signal.h>.
1904 (emacs_sigaction_init, forwarded_signal): New decls.
1905 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
1906 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
1907 (sigmask, sys_sigmask): Remove; no longer needed.
1908 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
1909 (sigblock, sigunblock, sigfree):
1910 (sigsetmask) [!defined sigsetmask]:
1911 Remove. All uses replaced by pthread_sigmask.
1912 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
1913 no longer need to be replaced, and its typical old uses
1914 are now done via emacs_sigaction_init and sigaction.
1915 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
1916 (sys_sigdel): Remove; unused.
1917 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
1919 2012-09-06 Eli Zaretskii <eliz@gnu.org>
1921 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
1922 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
1924 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
1926 Explicitly mark buffer_defaults and buffer_local_symbols.
1927 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
1928 mark_local_symbols here.
1929 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
1930 since special buffers aren't marked here any more.
1931 (allocate_buffer): Chain new buffer with all_buffers here...
1932 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
1934 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
1935 (syms_of_buffer): Remove staticpro of the above.
1936 (init_buffer_once): Set names for buffer_defaults and
1937 buffer_local_symbols.
1939 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
1941 Use bool for booleans in font-related modules.
1942 * font.c (font_intern_prop, font_style_to_value)
1943 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
1944 (generate_otf_features, font_check_otf_features, font_check_otf)
1945 (font_match_p, font_list_entities, font_at):
1946 * fontset.c (fontset_id_valid_p, reorder_font_vector
1947 (fontset_find_font, Fset_fontset_font)
1948 (face_suitable_for_char_p) [0]:
1949 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
1950 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
1951 (m17n_flt_initialized, ftfont_shape_by_flt):
1952 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
1953 * nsfont.m (nsfont_draw):
1954 * w32font.c (w32font_draw):
1955 * w32term.c (x_draw_glyphless_glyph_string_foreground):
1956 Use bool for booleans.
1957 * font.h: Adjust to above API changes.
1958 (struct font, struct font_driver, struct font_driver_list):
1959 Use bool for booleans.
1960 (struct font): Remove useless member encoding_type.
1962 * fontset.c, xftfont.c: Omit unnecessary static decls.
1964 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
1966 * alloc.c (mark_object): Revert window marking code
1967 since it's unsafe for the Fset_window_configuration.
1969 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
1971 Fix race conditions with signal handlers and errno (Bug#12327).
1972 Be more systematic about preserving errno whenever a signal
1973 handler returns, even if it's not in the main thread. Do this by
1974 renaming signal handlers to distinguish between signal delivery
1975 and signal handling. All uses changed.
1976 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
1977 * data.c (deliver_arith_signal): Rename from arith_error.
1978 * dispnew.c (deliver_window_change_signal): Rename from
1979 window_change_signal.
1980 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
1981 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
1982 * keyboard.c (deliver_input_available_signal): Rename from
1983 input_available_signal.
1984 (deliver_user_signal): Rename from handle_user_signal.
1985 (deliver_interrupt_signal): Rename from interrupt_signal.
1986 * process.c (deliver_pipe_signal): Rename from send_process_trap.
1987 (deliver_child_signal): Rename from sigchld_handler.
1988 * atimer.c (handle_alarm_signal):
1989 * data.c (handle_arith_signal):
1990 * dispnew.c (handle_window_change_signal):
1991 * emacs.c (handle_fatal_signal, handle_danger_signal):
1992 * keyboard.c (handle_input_available_signal):
1993 * keyboard.c (handle_user_signal, handle_interrupt_signal):
1994 * process.c (handle_pipe_signal, handle_child_signal):
1995 New functions, with the actual signal-handling code taken from the
1996 original respective signal handlers, sans the sporadic attempts to
1997 preserve errno, since that's now done by handle_on_main_thread.
1998 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
1999 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2000 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2002 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2003 Move initialization of main_thread to sysdep.c's init_signals.
2004 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2005 our usage, and simplifies the mainline code.
2006 (record_child_status_change): New static function, as a helper
2007 for handle_child_signal, and with most of the old child handler's
2009 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2010 (handle_child_signal): Use the above.
2011 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2012 Moved here from emacs.c.
2013 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2014 code moved here from emacs.c's main function.
2015 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2016 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2017 This lets callers save and restore errno properly.
2019 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2021 Remove redundant or unused things here and there.
2022 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2023 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2024 * editfns.c (Fcompare_buffer_substrings): Likewise.
2025 * frame.h (struct terminal, struct font_driver_list):
2026 Remove redundant declarations.
2027 * window.h (Qleft, Qright): Likewise.
2029 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2031 Do not mark objects from deleted buffers, windows and frames.
2032 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2033 (mark_object): Likewise for windows and frames.
2035 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2037 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2038 buffer_defaults and buffer_local_symbols as valid objects.
2039 Return special value to denote them.
2041 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2043 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2044 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2045 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2046 (file_name_absolute_p, Fsubstitute_in_file_name):
2047 (check_executable, check_writable, Ffile_accessible_directory_p)
2048 (Fset_file_selinux_context, Fdefault_file_modes)
2049 (Finsert_file_contents, choose_write_coding_system)
2050 (Fwrite_region, build_annotations, a_write, e_write)
2052 * filelock.c (boot_time_initialized, get_boot_time)
2053 (get_boot_time_1, lock_file_1, within_one_second):
2054 * floatfns.c (in_float):
2055 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2056 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2057 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2058 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2059 * window.c (compare_window_configurations):
2060 Use bool for booleans.
2061 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2062 (Fdefault_file_modes): Now mode_t, not int, for modes.
2063 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2064 (internal_delete_file): Now returns void, not a (boolean) int,
2065 since nobody was looking at the return value.
2066 * lisp.h, window.h: Adjust to above API changes.
2068 * xdisp.c (set_message): Simplify and reindent last change.
2070 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2072 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2074 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2076 * eval.c (call_debugger): Make the function non-static so that we
2077 can call it from set_message.
2079 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2080 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2082 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2084 Give more-useful info on a fatal error (Bug#12328).
2085 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2086 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2087 of doing the work ourselves.
2088 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2089 do most of the work.
2090 (fatal_error_backtrace): New function, taken from the guts
2091 of the old fatal_error_signal, but with a new option to output
2093 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2094 info about the signal than just its number.
2095 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2096 * sysdep.c: Include <execinfo.h>
2097 (emacs_backtrace): New function, taken partly from the previous
2098 code of the 'die' function.
2099 (emacs_abort): Call fatal_error_backtrace rather than abort.
2101 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2103 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2104 eager (load-time) macro-expansion.
2105 * lisp.mk (lisp): Add macroexp.
2107 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2109 Simplify redefinition of 'abort' (Bug#12316).
2110 Do not try to redefine the 'abort' function. Instead, redo
2111 the code so that it calls 'emacs_abort' rather than 'abort'.
2112 This removes the need for the NO_ABORT configure-time macro
2113 and makes it easier to change the abort code to do a backtrace.
2114 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2115 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2116 Remove; sysdep.c's emacs_abort now takes its place.
2117 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2118 'abort' changed to use 'emacs_abort'.
2119 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2120 (abort) [!defined abort]: Rename to ...
2121 (emacs_abort): ... new name.
2122 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2123 the place of the old 'abort' in emacs.c.
2124 * w32.c, w32fns.c (abort): Do not #undef.
2125 * w32.c (emacs_abort): Rename from w32_abort.
2127 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2129 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2130 offsets[j].dv, since the y axis of the screen coordinates points
2131 down, while the y axis of the font definition coordinates points
2132 up. This fixes display of Arabic diacritics such as KASRA and
2133 KASRATAN. (Bug#11860)
2135 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2137 Be more systematic about _setjmp vs setjmp.
2138 * alloc.c (test_setjmp, mark_stack):
2139 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2140 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2141 (png_load, my_error_exit, jpeg_load):
2142 * process.c (send_process_trap, send_process):
2143 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2144 The underscored versions are up to 30x faster on some hosts.
2145 Formerly, the code used setjmp+longjmp sometimes and
2146 _setjmp+_longjmp at other times, with no particular reason to
2147 prefer setjmp+longjmp.
2149 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2151 Fix minor problem found by static checking.
2152 * buffer.c (Fdelete_all_overlays): Return nil.
2154 2012-09-03 Martin Rudalics <rudalics@gmx.at>
2156 * buffer.c (Fdelete_all_overlays): New function.
2158 2012-09-03 Chong Yidong <cyd@gnu.org>
2160 * gtkutil.c: Add extern decl for Qxft.
2162 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2164 * emacs.c, eval.c: Use bool for boolean.
2165 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2166 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2167 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2168 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2169 (main, decode_env_path, Fdaemon_initialized):
2170 * eval.c (call_debugger, Finteractive_p, interactive_p):
2171 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2172 (maybe_call_debugger, Fbacktrace):
2173 * process.c (read_process_output, exec_sentinel):
2174 Use bool for booleans.
2175 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2176 All callers changed.
2177 * eval.c (interactive_p): Omit always-true boolean argument
2178 EXCLUDE_SUBRS_P. All callers changed.
2179 * dispextern.h, lisp.h: Reflect above API changes.
2180 * firstfile.c (dummy): Use the address of 'main', whose signature
2181 won't change, instead of the address of 'initialize', whose
2182 signature just changed from int to bool.
2183 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2184 * msdos.c (fatal_error_in_progress): ... from here.
2185 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2187 (redisplay_internal, unwind_redisplay): Simply clear
2188 REDISPLAYING_P when unwinding, instead of saving its previous,
2189 always-false value and then restoring it.
2191 Clean up some extern decls.
2192 Mostly, this hoists extern decls out of .c files and into .h files.
2193 That way, we're more likely to catch errors if the interfaces change.
2194 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2195 declare xg_mark_data.
2196 * dispextern.h (x_frame_parm_handlers):
2198 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2199 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2200 (Qultra_bold, Qoblique, Qitalic):
2201 Move extern decl here from .c file.
2202 * alloc.c (xg_mark_data) [USE_GTK]:
2204 * eval.c (Qlexical_binding):
2205 * fns.c (time) [!HAVE_UNISTD_H]:
2206 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2207 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2208 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2209 * lread.c (Qinternal_interpreter_environment):
2210 * minibuf.c (Qbuffer):
2211 * process.c (QCfamily, QCfilter):
2212 * widget.c (free_frame_faces):
2213 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2214 * xfont.c (x_clear_errors):
2215 * xterm.c (x_frame_parm_handlers):
2216 Remove now-redundant extern decls.
2217 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2218 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2220 * xfaces.c: Remove unnecessary static decls.
2221 * xterm.c (updating_frame): Remove decl of nonexistent object.
2223 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2224 when building globals.h, as the objects that are not built on
2225 this host are not needed to compile C files on this host.
2227 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2229 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2231 * frame.h: Add missing prototype for x_wm_set_size_hint.
2233 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2235 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2236 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2237 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2238 (Fsubstitute_command_keys):
2239 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2240 (save_excursion_save, save_excursion_restore)
2241 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2242 (format_time_string, general_insert_function)
2243 (make_buffer_string, make_buffer_string_both)
2244 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2245 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2246 (copy_text, insert_1, insert_1_both, insert_from_string)
2247 (insert_from_string_before_markers, insert_from_string_1)
2248 (insert_from_buffer, insert_from_buffer_1, replace_range)
2249 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2250 (del_range_2, modify_region):
2251 * intervals.c (intervals_equal, balance_possible_root_interval)
2252 (adjust_intervals_for_insertion, merge_properties_sticky)
2253 (graft_intervals_into_buffer, lookup_char_property)
2254 (adjust_for_invis_intang, set_point_both)
2255 (get_property_and_range, compare_string_intervals)
2256 (set_intervals_multibyte_1, set_intervals_multibyte):
2257 * keyboard.c (decode_timer):
2258 Use bool for boolean.
2259 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2260 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2262 2012-09-02 Chong Yidong <cyd@gnu.org>
2264 * keymap.c (push_key_description): Print M-TAB as C-M-i
2267 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
2269 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2270 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2271 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2272 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2273 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2274 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2275 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2277 2012-09-01 Eli Zaretskii <eliz@gnu.org>
2279 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2280 more than one grapheme cluster passed to the shaper: compute the
2281 offset adjustment values separately for each cluster. (Bug#11860)
2283 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2284 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2285 about implicit conversions from integer to pointer.
2287 2012-09-01 Daniel Colascione <dancol@dancol.org>
2289 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2290 system used too early.
2292 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2294 Better seed support for (random).
2295 * emacs.c (main): Call init_random.
2296 * fns.c (Frandom): Set the seed from a string argument, if given.
2297 Remove long-obsolete Gentzel cruft.
2298 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2299 (init_random): New function.
2301 2012-09-01 Daniel Colascione <dancol@dancol.org>
2303 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2304 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2305 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2306 x_wm_set_size_hint, x_query_colors, x_real_positions,
2307 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2308 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2309 all of which have been moved to common code.
2311 * xfaces.c: Include TERM_HEADER instead of listing all possible
2312 window-system headers.
2314 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2317 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2318 directly accessing frame internals.
2320 * w32font.h: Include font.h. Define syms_of_w32font and
2323 * process.c: Include TERM_HEADER instead of listing all possible
2324 window-system headers.
2326 * nsterm.h: Remove declarations now in frame.h.
2327 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
2329 * menu.c: Include TERM_HEADER instead of listing all possible
2330 window-system headers.
2332 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
2335 * keyboard.c: Include TERM_HEADER instead of listing all possible
2336 window-system headers.
2338 * image.c: Include TERM_HEADER instead of listing all possible
2339 window-system headers. Declare Vlibrary_cache when compiling for
2342 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
2343 window system declarations.
2345 * frame.h: Move common functions here: set_frame_menubar,
2346 x_set_window_size, x_sync, x_get_focus_frame,
2347 x_set_mouse_position, x_set_mouse_pixel_position,
2348 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
2349 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
2350 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
2351 x_activate_menubar, x_real_positions, x_bitmap_icon,
2352 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
2355 * frame.c: Include TERM_HEADER instead of listing all possible
2356 window-system headers.
2358 * font.c: Include TERM_HEADER instead of listing all possible
2359 window-system headers.
2361 * emacs.c: Include TERM_HEADER.
2363 * dispnew.c: Include TERM_HEADER instead of listing all possible
2364 window-system headers.
2366 * ccl.h: Include character.h.
2368 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
2369 the current window system; include in list of objects to link into
2372 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2374 Remove mark_ttys function and fix tty_display_info initialization.
2375 * lisp.h (mark_ttys): Remove prototype.
2376 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
2377 to mark_ttys because all possible values of 'top_frame' slot are
2378 the frames which are reachable from Vframe_list.
2379 * term.c (mark_ttys): Remove.
2380 (init_tty): Safely initialize 'top_frame' slot with Qnil.
2382 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2384 Change struct frame bitfields from unsigned char to unsigned.
2385 * frame.h (struct frame): Change type of 'display_preempted',
2386 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
2387 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
2388 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
2389 bitfields from unsigned char to unsigned.
2391 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2393 Remove unused member of struct x_output and struct w32_output.
2394 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
2395 * w32term.h (struct w32_output): Likewise.
2397 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
2399 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
2400 does not become zero (Bug#12234).
2402 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
2404 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
2405 for GCC 4.7.1 x86-64.
2407 2012-08-30 Glenn Morris <rgm@gnu.org>
2409 * lread.c (init_lread): For out-of-tree builds, only add the
2410 source directory's site-lisp dir to the load-path if it exists,
2411 consistent with in-tree builds. (Bug#12302)
2413 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
2415 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
2416 button_values to NULL. Call setStykeMask so dialogs get a close button.
2417 (windowShouldClose:): Set window_closed.
2418 (dealloc): New member, free button_values.
2419 (process_dialog:): Make member function. Remove window argument,
2420 replace window with self. Count buttons and allocate and store values
2422 (addButton:value:row:): value is int with the name tag. Call setTag
2423 with tag. Remove return self, declare return value as void.
2424 (addString:row:): Remove return self, declare return value as void.
2425 (addSplit): Remove return self, declare return value as void.
2426 (clicked:): Remove return self, declare return value as void.
2427 Set dialog_return to button_values[seltag]. Code formatting change.
2428 (initFromContents:isQuestion:): Adjust call to process_dialog.
2429 Code formatting change.
2430 (timeout_handler:): Set timer_fired to YES.
2431 (runDialogAt:): Set timer_fired to NO.
2432 Handle click on close button as quit.
2434 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
2435 Add window_closed and button_values. Add void as return value for
2436 add(Button|String|Split). addButton takes int instead of Lisp_Object.
2437 Add process_dialog as new member.
2439 2012-08-28 Eli Zaretskii <eliz@gnu.org>
2441 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
2442 is not one of the heaps we manage. (Bug#12242)
2444 2012-08-28 Glenn Morris <rgm@gnu.org>
2446 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
2448 2012-08-28 Martin Rudalics <rudalics@gmx.at>
2450 * window.c (Fset_window_configuration): Remove handling of
2451 auto-buffer-name window parameter. Install revision of reverted
2454 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2456 Do not allow to set major mode for a dead buffer.
2457 * buffer.c (Fset_buffer_major_mode): Signal an error
2458 if the buffer is dead.
2459 (Fother_buffer, other_buffer_safely): Remove redundant
2462 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2464 Always use set_buffer_if_live to restore original buffer at unwind.
2465 * buffer.h (record_unwind_current_buffer): New function.
2466 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
2467 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
2468 * undo.c, window.c: Adjust users.
2469 * buffer.c (set_buffer_if_live): Fix comment.
2471 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2473 Fix usage of set_buffer_internal.
2474 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
2475 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
2476 * coding.c (decode_coding): Omit redundant test.
2477 * fileio.c (decide_coding_unwind): Likewise.
2478 * fns.c (secure_hash): Likewise.
2479 * insdel.c (modify_region): Likewise.
2480 * keyboard.c (command_loop_1): Likewise.
2481 * print.c (PRINTFINISH): Likewise.
2482 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
2484 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2486 * dispnew.c: Use bool for boolean.
2487 (frame_garbaged, display_completed, delayed_size_change)
2488 (fonts_changed_p, add_window_display_history)
2489 (add_frame_display_history, verify_row_hash)
2490 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
2491 (row_equal_p, realloc_glyph_pool)
2492 (allocate_matrices_for_frame_redisplay)
2493 (showing_window_margins_p)
2494 (adjust_frame_glyphs_for_frame_redisplay)
2495 (build_frame_matrix_from_leaf_window, make_current)
2496 (mirrored_line_dance, mirror_line_dance, update_frame)
2497 (update_window_tree, update_single_window)
2498 (check_current_matrix_flags, update_window, update_text_area)
2499 (update_window_line, set_window_update_flags, scrolling_window)
2500 (update_frame_1, scrolling, buffer_posn_from_coords)
2501 (do_pending_window_change, change_frame_size)
2502 (change_frame_size_1, sit_for):
2503 Use bool for boolean.
2504 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
2505 and remove last int (actually boolean) argument, which was always 0.
2506 All callers changed.
2507 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
2508 * dispextern.h (struct composition_it): Use bool for boolean.
2509 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
2510 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
2511 * dired.c (file_name_completion):
2512 Use bool for boolean. (This was missed in an earlier change.)
2514 2012-08-27 Martin Rudalics <rudalics@gmx.at>
2516 * window.c (Fset_window_configuration): Revert first part of
2519 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
2521 * nsterm.h (NSPanel): New class variable dialog_return.
2523 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
2524 Initialize dialog_return.
2525 (windowShouldClose:): Use stop instead of stopModalWithCode.
2526 (clicked:): Ditto, and also set dialog_return (Bug#12258).
2527 (timeout_handler:): Use stop instead of abortModal. Send a dummy
2529 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
2532 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2534 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
2535 * composite.c (find_composition, composition_gstring_p)
2536 (composition_reseat_it, find_automatic_composition):
2537 * data.c (let_shadows_buffer_binding_p)
2538 (let_shadows_global_binding_p, set_internal, make_blv)
2539 (Fmake_variable_buffer_local, Fmake_local_variable)
2540 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
2541 (cons_to_signed, arith_driver):
2542 * dbusbind.c (xd_in_read_queued_messages):
2543 * dired.c (directory_files_internal, file_name_completion):
2544 Use bool for booleans.
2545 * dired.c (file_name_completion):
2546 * process.h (fd_callback):
2547 Omit int (actually boolean) argument. It wasn't being used.
2549 * composite.h, lisp.h: Reflect above API changes.
2551 * cmds.c, coding.c: Use bool for booleans.
2552 * cmds.c (move_point, Fself_insert_command):
2553 * coding.h (struct composition status, struct coding_system):
2554 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
2555 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
2556 (emacs_mule_char, decode_coding_emacs_mule)
2557 (encode_coding_emacs_mule, detect_coding_iso_2022)
2558 (decode_coding_iso_2022, encode_invocation_designation)
2559 (encode_designation_at_bol, encode_coding_iso_2022)
2560 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
2561 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
2562 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
2563 (encode_coding_raw_text, detect_coding_charset)
2564 (decode_coding_charset, encode_coding_charset, detect_eol)
2565 (detect_coding, get_translation_table, produce_chars)
2566 (consume_chars, reused_workbuf_in_use)
2567 (make_conversion_work_buffer, code_conversion_save)
2568 (decode_coding_object, encode_coding_object)
2569 (detect_coding_system, char_encodable_p)
2570 (Funencodable_char_position, code_convert_region)
2571 (code_convert_string, code_convert_string_norecord)
2572 (Fset_coding_system_priority):
2573 * fileio.c (Finsert_file_contents):
2574 Use bool for booleans.
2575 * coding.h, lisp.h: Reflect above API changes.
2576 * coding.c: Remove unnecessary static function decls.
2577 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
2578 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
2579 not a boolean 'int', since callers never look at the return value.
2580 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
2581 * coding.h (decoding_buffer_size, encoding_buffer_size)
2582 (emacs_mule_string_char): Remove unused extern decls.
2583 (struct iso_2022_spec, struct coding_system):
2584 Use 'unsigned int : 1' for boolean fields, since there's more than one.
2585 (struct emacs_mule_spec): Remove unused field 'full_support'.
2586 All initializations removed.
2587 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
2589 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2591 Fix spare memory change (Bug#12286).
2592 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
2593 (valid_lisp_object_p): Likewise.
2595 2012-08-27 Martin Rudalics <rudalics@gmx.at>
2597 * window.c (Fset_window_configuration): Record any window's old
2598 buffer if it's replaced (see Bug#8789). If the new current
2599 buffer doesn't appear in the selected window, go to its old
2602 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2604 Special MEM_TYPE_SPARE to denote reserved memory.
2605 * alloc.c (enum mem_type): New memory type.
2606 (refill_memory_reserve): Use new type for spare memory.
2607 This prevents live_cons_p and live_string_p from incorrect
2608 detection of uninitialized objects from spare memory as live.
2610 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
2613 * Makefile.in (.PHONY): versioclean -> versionclean.
2615 Remove unused external symbols.
2616 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
2617 * window.c (Qwindow_valid_p, decode_valid_window):
2618 Now static, not extern.
2619 * data.c (Qinterval): Remove; unused.
2620 (syms_of_data): Do not define 'interval'.
2621 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
2622 * window.h (decode_valid_window):
2625 * character.c, charset.c, chartab.c: Use bool for booleans.
2626 * character.c (lisp_string_width, string_count_byte8)
2627 (string_escape_byte8):
2628 * charset.c (charset_map_loaded, load_charset_map, read_hex):
2629 (load_charset_map_from_file, map_charset_chars)
2630 (Fdefine_charset_internal, define_charset_internal)
2631 (Fdeclare_equiv_charset, find_charsets_in_text)
2632 (Ffind_charset_region, char_charset, Fiso_charset):
2633 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
2634 (sub_char_table_set, sub_char_table_set_range)
2635 (char_table_set_range, optimize_sub_char_table)
2636 (map_sub_char_table):
2637 Use bool for boolean.
2638 * character.c (str_to_unibyte): Omit last boolean argument; it was
2639 always 0. All callers changed.
2640 * character.h, charset.h: Adjust to match previous changes.
2641 * character.h (char_printable_p): Remove decl of nonexistent function.
2642 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
2643 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
2644 are all boolean, so make them single-bit bitfields.
2646 * lisp.h (ASET): Remove attempt to detect side effects.
2647 It was meant to be temporary and it often doesn't work,
2648 because when IDX has side effects the behavior of IDX==IDX
2649 is undefined. See Stefan Monnier in
2650 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
2652 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2654 * lisp.h (functionp): New function (extracted from Ffunctionp).
2655 (FUNCTIONP): Use it.
2656 * eval.c (Ffunctionp): Use it.
2658 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
2660 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
2661 as that's faster and simpler than static storage. Don't bother
2662 with the g_main_context_query overhead if g_main_context_pending
2663 says no events are pending.
2664 (gfds, gfds_size): Remove these static vars.
2665 (xgselect_initialize): Remove; no longer needed.
2666 All uses and decls removed.
2668 * emacs.c (fatal_error_signal_hook): Remove.
2669 All uses removed. This leftover from old code was always 0.
2671 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
2672 * casefiddle.c (casify_object, casify_region):
2673 * casetab.c (set_case_table):
2674 * category.c, category.h (word_boundary_p):
2675 * category.h (CHAR_HAS_CATEGORY):
2676 Use bool for booleans, instead of int.
2678 2012-08-25 Eli Zaretskii <eliz@gnu.org>
2680 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
2682 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
2684 On assertion failure, print backtrace if available.
2685 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
2686 (die) [ENABLE_CHECKING]: Print a backtrace if available.
2687 * Makefile.in (LIB_EXECINFO): New macro.
2690 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
2691 * bytecode.c (exec_byte_code):
2692 * callint.c (check_mark, Fcall_interactively):
2693 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
2694 (getenv_internal, sync_process_alive, call_process_exited):
2695 * lisp.h (USE_SAFE_ALLOCA):
2696 Use bool for booleans, instead of int.
2697 * lisp.h, process.h: Adjust prototypes to match above changes.
2698 * callint.c (Fcall_interactively): Don't assume the mark's
2699 offset fits in 'int'.
2701 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
2703 * buffer.c, buffer.h: Use bool for boolean.
2704 * buffer.c (reset_buffer_local_variables)
2705 (buffer_lisp_local_variables, Fset_buffer_modified_p)
2706 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
2707 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
2708 (overlay_touches_p, overlay_strings, Foverlay_put)
2709 (report_overlay_modification, call_overlay_mod_hooks):
2710 (mmap_enlarge, mmap_set_vars):
2711 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
2712 Use bool for booleans, instead of int.
2713 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
2714 since the 1-or-0 return value is always ignored anyway.
2715 (mmap_initialized_p):
2716 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
2717 * buffer.h, lisp.h: Adjust prototypes to match above changes.
2719 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
2721 * bidi.c: Use bool for boolean.
2722 This is a bit more readable, and makes the text segment of bidi.o
2723 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
2724 Presumably it's faster too.
2725 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
2727 (bidi_cache_find_level_change, bidi_cache_iterator_state)
2728 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
2729 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
2730 (bidi_explicit_dir_char, bidi_level_of_next_char)
2731 (bidi_find_other_level_edge, bidi_move_to_visually_next):
2732 Use bool for booleans, instead of int.
2733 * dispextern.h (bidi_init_it, bidi_paragraph_init)
2734 (bidi_unshelve_cache): Adjust decls to match code.
2736 2012-08-23 Martin Rudalics <rudalics@gmx.at>
2738 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
2741 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
2743 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
2744 * atimer.h: Include <stdbool.h>.
2746 2012-08-22 Dan Nicolaescu <dann@gnu.org>
2748 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
2749 compile time tests instead of run time tests on systems that do
2751 (FRAME_MAC_P): Remove leftover from deleted code.
2752 * frame.c (syms_of_frame): Remove leftover from deleted code.
2754 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
2756 * nsterm.m (insertText:): Don't clear modifiers if code is space.
2758 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
2760 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
2761 Otherwise, the compiler complains about (A?B:C) where B is void
2762 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
2763 (fontset_add): Return void, for FONTSET_ADD.
2765 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
2767 * alloc.c: Use bool for booleans.
2768 (gc_in_progress, abort_on_gc)
2769 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
2770 (dont_register_blocks) [GC_MALLOC_CHECK]:
2771 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
2772 (check_string_bytes, make_specified_string, memory_full)
2773 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
2774 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
2775 (mark_stack, valid_pointer_p, make_pure_string)
2776 (Fgarbage_collect, survives_gc_p, gc_sweep):
2777 Use bool for booleans, instead of int.
2778 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
2779 Remove unused local.
2780 * alloc.c (PURE_POINTER_P):
2781 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
2782 * editfns.c (Fformat):
2783 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
2785 * fns.c (sweep_weak_table):
2786 * lisp.h (suppress_checking, push_message, survives_gc_p)
2787 (make_pure_string, gc_in_progress, abort_on_gc):
2788 * lread.c (readchar, read1):
2789 * print.c (Fprin1_to_string):
2790 * xdisp.c (push_message):
2791 Use bool for booleans affected directly or indirectly by
2794 Make recently-introduced setters macros.
2795 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
2796 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
2797 (set_fontset_default, set_fontset_fallback): Rename from their
2798 upper-case counterparts, and make them functions rather than macros.
2799 This is more consistent with the other recently-introduced setters.
2800 These don't need to be inline, since they're local.
2802 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
2804 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
2805 the loop (Bug#12247).
2807 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
2809 * lisp.h (vcopy): Use memcpy rather than our own loop.
2810 This fixes a performance regression introduced by the recent
2811 addition of vcopy. This means 'vcopy' will need to be modified
2812 for a copying collector, but that's OK. Also, tighten the
2813 checking in the assertion.
2815 2012-08-21 Eli Zaretskii <eliz@gnu.org>
2817 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
2818 components for RTL text (Bug#11860). Adjust X-OFFSET of each
2819 non-base glyph for the width of the base character, according to
2820 what x_draw_composite_glyph_string_foreground expects.
2821 Generate WADJUST value according to composition_gstring_width's
2822 expectations, to produce correct width of the composed character.
2823 Reverse the sign of the DU offset produced by ScriptPlace.
2825 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
2827 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
2829 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
2831 Avoid direct writes to contents member of struct Lisp_Vector.
2832 * lisp.h (vcopy): New function to copy data into vector.
2833 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
2834 * fns.c (Ffillarray): Use ASET.
2835 * keyboard.c (timer_check_2): Use AREF and ASET.
2836 (append_tool_bar_item, Frecent_keys): Use vcopy.
2837 * lread.c (read_vector): Use ASET.
2838 * msdos.c (Frecent_doskeys): Use vcopy.
2839 * xface.c (Finternal_copy_lisp_face): Use vcopy.
2840 (Finternal_merge_in_global_face): Use ASET and vcopy.
2841 * xfont.c (xfont_list_pattern): Likewise.
2843 2012-08-21 Martin Rudalics <rudalics@gmx.at>
2845 * window.c (Fwindow_point): For the selected window always return
2846 the position of its buffer's point.
2847 (Fset_window_point): For the selected window always go in its
2848 buffer to the specified position.
2850 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
2852 Setter macros for fontsets.
2853 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
2854 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
2855 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
2858 2012-08-20 Glenn Morris <rgm@gnu.org>
2860 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
2861 Don't assume that `ln -f' works.
2863 2012-08-20 Eli Zaretskii <eliz@gnu.org>
2865 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
2866 and later about non-assignments with no effect. See discussion at
2867 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
2870 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2872 Inline setter functions for Lisp_Objects slots of struct specbinding.
2873 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
2876 2012-08-20 Martin Rudalics <rudalics@gmx.at>
2878 * window.c (select_window): Always make selected window's buffer
2881 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2883 Use AREF and ASET for docstrings of category tables.
2884 * category.h (CATEGORY_DOCSTRING): Use AREF.
2885 (SET_CATEGORY_DOCSTRING): Use ASET.
2886 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
2888 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2890 Inline setter functions for hash table members.
2891 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
2892 (set_hash_hash, set_hash_index): Rename with _slot suffix.
2893 (set_hash_key_and_value, set_hash_index, set_hash_next)
2894 (set_hash_hash): New functions.
2895 * charset.c, fns.c: Adjust users.
2897 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
2899 Inline getter and setter functions for per-buffer values.
2900 * buffer.h (per_buffer_default, set_per_buffer_default)
2901 (per_buffer_value, set_per_buffer_value): New functions.
2902 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
2903 * buffer.c, data.c: Adjust users.
2905 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
2907 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
2909 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
2911 Rely on <config.h> + <unistd.h> to declare 'environ',
2912 as gnulib does this if the system doesn't.
2913 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
2914 Remove declaration. MS-Windows declares it on stdlib.h which is
2915 included by conf_post.h.
2916 * emacs.c (environ) [DOUG_LEA_MALLOC]:
2917 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
2918 * vm-limit.c: Include <unistd.h>, for 'environ'.
2920 * unexaix.c, unexcoff.c: Include "mem-limits.h".
2921 (start_of_data): Remove decl; mem-limits.h provides it.
2923 * xdisp.c (handle_invisible_prop): Make it a bit faster
2924 and avoid a gcc -Wmaybe-uninitialized diagnostic.
2926 2012-08-19 Chong Yidong <cyd@gnu.org>
2928 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
2931 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
2933 * .gdbinit: Use call instead of set when calling a function in the
2936 * data.c (set_internal): Don't use set_blv_found.
2937 (Fkill_local_variable): Likewise.
2939 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
2941 * nsfont.m (ns_ascii_average_width): Ensure the string
2942 ascii_printable is initialized with a null-terminated character
2943 array. Otherwise, it can contain undesired extra characters.
2945 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
2947 port new setting code to Sun C 5.8 2005/10/13
2948 * chartab.c, lisp.h (char_table_set, char_table_set_range):
2949 Return void, not Lisp_Object. Otherwise, the compiler
2950 complains about (A?B:C) where B is void and C is Lisp_Object
2951 when compiling CHAR_TABLE_SET, due to the recent change to
2952 the API of sub_char_table_set_contents.
2954 2012-08-18 Chong Yidong <cyd@gnu.org>
2956 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
2957 for the string case (Bug#3874).
2959 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
2961 * buffer.h (BSET): Remove (Bug#12215).
2962 Replace all uses with calls to new setter functions.
2963 (bset_bidi_paragraph_direction, bset_case_canon_table)
2964 (bset_case_eqv_table, bset_directory, bset_display_count)
2965 (bset_display_time, bset_downcase_table)
2966 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
2967 (bset_last_selected_window, bset_local_var_alist)
2968 (bset_mark_active, bset_point_before_scroll, bset_read_only)
2969 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
2971 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
2972 (bset_auto_fill_function, bset_auto_save_file_format)
2973 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
2974 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
2975 (bset_cache_long_line_scans, bset_case_fold_search)
2976 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
2977 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
2978 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
2979 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
2980 (bset_header_line_format, bset_indicate_buffer_boundaries)
2981 (bset_indicate_empty_lines, bset_invisibility_spec)
2982 (bset_left_fringe_width, bset_major_mode, bset_mark)
2983 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
2984 (bset_name, bset_overwrite_mode, bset_pt_marker)
2985 (bset_right_fringe_width, bset_save_length)
2986 (bset_scroll_bar_width, bset_scroll_down_aggressively)
2987 (bset_scroll_up_aggressively, bset_selective_display)
2988 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
2989 (bset_word_wrap, bset_zv_marker):
2990 * category.c (bset_category_table):
2991 * syntax.c (bset_syntax_table):
2992 New setter functions.
2994 * process.h (PSET): Remove (Bug#12215).
2995 Replace all uses with calls to new setter functions.
2996 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2997 (PROCESS_INLINE): New macro.
2998 (pset_childp): New setter function.
2999 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3000 * process.c (PROCESS_INLINE):
3001 Define to EXTERN_INLINE, so that the corresponding functions
3002 are compiled into code.
3003 (pset_buffer, pset_command, pset_decode_coding_system)
3004 (pset_decoding_buf, pset_encode_coding_system)
3005 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3006 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3007 (pset_type, pset_write_queue): New setter functions.
3009 * window.h (WSET): Remove (Bug#12215).
3010 Replace all uses with calls to new setter functions.
3011 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3012 (WINDOW_INLINE): New macro.
3013 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3014 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3015 (wset_total_lines, wset_vertical_scroll_bar)
3016 (wset_window_end_pos, wset_window_end_valid)
3017 (wset_window_end_vpos): New setter functions.
3018 * window.c (WINDOW_INLINE):
3019 Define to EXTERN_INLINE, so that the corresponding functions
3020 are compiled into code.
3021 (wset_combination_limit, wset_dedicated, wset_display_table)
3022 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3023 (wset_new_normal, wset_new_total, wset_next_buffers)
3024 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3025 (wset_prev_buffers, wset_right_fringe_width)
3026 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3027 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3028 (wset_window_parameters):
3029 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3030 (wset_column_number_displayed, wset_region_showing):
3031 New setter functions.
3033 * termhooks.h (TSET): Remove (Bug#12215).
3034 Replace all uses with calls to new setter functions.
3035 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3036 (TERMHOOKS_INLINE): New macro.
3037 (tset_charset_list, tset_selection_alist): New setter functions.
3038 * terminal.c (TERMHOOKS_INLINE):
3039 Define to EXTERN_INLINE, so that the corresponding functions
3040 are compiled into code.
3041 (tset_param_alist): New setter function.
3043 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3045 * keyboard.h (KSET): Remove (Bug#12215).
3046 Replace all uses with calls to new setter functions.
3047 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3048 (KEYBOARD_INLINE): New macro.
3049 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3050 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3051 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3052 New setter functions.
3053 * keyboard.c (KEYBOARD_INLINE):
3054 Define to EXTERN_INLINE, so that the corresponding functions
3055 are compiled into code.
3056 (kset_echo_string, kset_kbd_queue)
3057 (kset_keyboard_translate_table, kset_last_prefix_arg)
3058 (kset_last_repeatable_command, kset_local_function_key_map)
3059 (kset_overriding_terminal_local_map, kset_real_last_command)
3060 (kset_system_key_syms): New setter functions.
3062 * frame.h (FSET): Remove (Bug#12215).
3063 Replace all uses with calls to new setter functions.
3064 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3065 (FRAME_INLINE): New macro.
3066 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3067 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3068 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3069 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3070 (fset_param_alist, fset_root_window, fset_scroll_bars)
3071 (fset_selected_window, fset_title, fset_tool_bar_items)
3072 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3073 * frame.c (FRAME_INLINE):
3074 Define to EXTERN_INLINE, so that the corresponding functions
3075 are compiled into code.
3076 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3078 A few more naming-convention fixes for getters and setters.
3079 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3080 and rename from buffer_overlays_set_before.
3081 (set_buffer_overlays_after): Move here from buffer.h, and rename
3082 from buffer_overlays_set_after.
3083 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3085 (set_buffer_intervals): Rename from buffer_set_intervals.
3086 * intervals.c (set_interval_object): Move here from intervals.h,
3087 and rename from interval_set_object.
3088 (set_interval_left): Move here from intervals.h, and rename from
3090 (set_interval_right): Move here from intervals.h, and rename from
3092 (copy_interval_parent): Move here from intervals.h, and rename from
3093 interval_copy_parent.
3094 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3095 (set_interval_plist): Rename from interval_set_plist.
3096 Return void, not Lisp_Object, since no caller uses the result.
3097 * lisp.h (string_intervals): Rename from string_get_intervals.
3098 (set_string_intervals): Rename from string_set_intervals.
3100 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3101 (set_char_table_contents): Rename from char_table_set_contents.
3102 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3103 All uses changed. See the end of
3104 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3106 * lisp.h (CSET): Remove (Bug#12215).
3107 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3108 (set_char_table_purpose): New functions,
3109 replacing CSET. All uses changed. For example, replace
3110 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3111 "set_char_table_parent (char_table, parent);".
3112 The old version was confusing because it used the same name
3113 'parent' for two different things.
3115 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3117 Functions to get and set Lisp_Object fields of buffer-local variables.
3118 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3119 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3120 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3121 * data.c, eval.c, frame.c: Adjust users.
3123 2012-08-17 Chong Yidong <cyd@gnu.org>
3125 * xfaces.c (merge_face_vectors): If the target font specfies a
3126 font spec, make the font's attributes take precedence over
3127 directly-specified attributes.
3128 (merge_face_ref): Recognize :font.
3130 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3132 Do not use memcpy for copying intervals.
3133 * intervals.c (reproduce_interval): New function.
3134 (reproduce_tree, reproduce_tree_obj): Use it.
3135 (reproduce_tree_obj): Remove prototype.
3137 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3139 * lisp.h (duration_to_sec_usec): Remove unused decl.
3141 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3143 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3144 to an allocated instance of NSString, not to the class itself.
3146 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
3148 * makefile.w32-in (C_CTYPE_H): New macro.
3149 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3150 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3151 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3153 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3155 Use ASCII tests for character types.
3156 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3158 Don't include <ctype.h>; was not needed.
3159 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3160 * sysdep.c, xfaces.c:
3161 Include <c-ctype.h> instead of <ctype.h>.
3162 * nsterm.m: Include <c-ctype.h>.
3163 * charset.c (read_hex):
3164 * doc.c (Fsnarf_documentation):
3165 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3166 (DRIVE_LETTER) [DOS_NT]:
3167 (Ffile_name_directory, Fexpand_file_name)
3168 (Fsubstitute_in_file_name):
3169 * font.c (font_parse_xlfd, font_parse_fcname):
3170 * frame.c (x_set_font_backend):
3171 * gtkutil.c (xg_get_font):
3172 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3173 * nsimage.m (hexchar):
3174 * nsterm.m (ns_xlfd_to_fontname):
3175 * sysdep.c (system_process_attributes):
3176 * xfaces.c (hash_string_case_insensitive):
3177 Use C-locale tests instead of locale-specific tests for character
3178 types, since we want the ASCII interpretation here, not the
3179 interpretation suitable for whatever happens to be the current locale.
3181 2012-08-16 Martin Rudalics <rudalics@gmx.at>
3183 Consistently check windows for validity/liveness
3184 (Bug#11984, Bug#12025, Bug#12026).
3185 * lisp.h (CHECK_VALID_WINDOW): New macro.
3186 * window.c (decode_window): Rename to decode_live_window.
3187 (decode_valid_window, Fwindow_valid_p): New functions.
3188 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3189 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3190 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3191 (Fwindow_prev_sibling, Fwindow_combination_limit)
3192 (Fset_window_combination_limit, Fwindow_use_time)
3193 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3194 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3195 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3196 (Fwindow_hscroll, Fset_window_hscroll)
3197 (Fwindow_redisplay_end_trigger)
3198 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3199 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3200 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3201 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3202 (Fwindow_end, Fset_window_point, Fset_window_start)
3203 (Fpos_visible_in_window_p, Fwindow_line_height)
3204 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3205 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3206 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3207 (Fset_window_parameter, Fwindow_display_table)
3208 (Fset_window_display_table, Fdelete_other_windows_internal)
3209 (Fset_window_buffer, Fset_window_new_total)
3210 (Fset_window_new_normal, Fdelete_window_internal)
3211 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3212 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3213 (Fwindow_scroll_bars): Check whether argument window is a valid or
3214 live window. Update doc-strings.
3215 (syms_of_window): New symbol Qwindow_valid_p.
3216 * keyboard.c (Fposn_at_x_y): Check whether argument
3217 frame_or_window denotes a valid window.
3219 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3221 Fix previous char table change.
3222 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3223 * chartab.c (optimize_sub_char_table): Likewise.
3225 2012-08-16 Chong Yidong <cyd@gnu.org>
3227 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3229 * xfont.c (xfont_open):
3230 * xftfont.c (xftfont_open): Set the font's max_width field.
3232 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3233 min_width to space_width and average_width to the average over
3234 printable ASCII characters.
3235 (ns_char_width): Code cleanup.
3236 (ns_ascii_average_width): New utility function.
3238 * font.h (struct font): Update comments.
3240 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3242 Simple interface to set Lisp_Object fields of character tables.
3243 * lisp.h (CSET): New macro.
3244 (char_table_set_extras, char_table_set_contents)
3245 (sub_char_table_set_contents): New function.
3246 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3247 * syntax.c: Adjust users.
3249 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3251 * eval.c (eval_sub): Bind lexical-binding.
3252 * lread.c (Qlexical_binding): Make non-static.
3254 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3256 * nsmenu.m (popupSession): Remove.
3257 (pop_down_menu): Remove endModalSession.
3258 (timeout_handler:): New method.
3259 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3260 Call runModalForWindow. Check timer_fired when it returns.
3261 If not set, cancel timer and break out of loop.
3262 Otherwise loop again, with a new timeout.
3264 * nsterm.m: Include fcntl.h if present.
3265 (fd_entry, t_readfds, inNsSelect): Remove.
3266 (select_writefds, select_valid, select_timeout, selfds)
3267 (select_mutex, apploopnr): Add.
3268 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3269 Otherwise call kbd_buffer_store_event.
3270 (ns_send_appdefined): Remove release of fd_entry.
3271 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3272 Increment and decrement apploopnr.
3273 (ns_select): If no file descriptors, just do a NSTimer.
3274 Otherwise copy read/write masks and start select thread (fd_handler).
3275 Start main loop and wait for application defined event.
3276 Inform select thread to stop selecting after main loop is exited.
3277 (ns_term_init): Create selfds pipe and set non-blocking.
3278 Initialize select_mutex. Start the select thread (fd_handler).
3279 (fd_handler:): Loop forever, wait for info from the main thread
3280 to either start or stop selecting. When select returns, send
3281 and appdefined event.
3282 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3283 If not call kbd_buffer_store_event.
3285 * nsterm.h (EmacsApp): fd_handler takes id argument.
3286 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3288 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3290 2012-08-15 Eli Zaretskii <eliz@gnu.org>
3292 * region-cache.c (move_cache_gap): Update gap_len using the actual
3293 growth of the boundaries array. Do not change cache_len.
3296 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3298 Generalize and cleanup font subsystem checks.
3299 * font.h (FONT_DEBUG, font_assert): Remove.
3300 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3301 Change font_assert to eassert. Use eassert where appropriate.
3303 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3305 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3307 2012-08-15 Chong Yidong <cyd@gnu.org>
3309 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3310 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3311 extract the font descriptor instead of just the font name.
3312 In that case, return a font spec instead of a string.
3313 (x_last_font_name): Move to this file from xfns.c.
3315 * xfns.c (Fx_select_font): The return value can also be a font
3316 spec. Move x_last_font_name management to gtkutil.c.
3318 * xfaces.c: Make font weight and style symbols non-static.
3320 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
3322 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
3325 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
3327 * alloc.c (Fgarbage_collect): Use plural form consistently.
3329 2012-08-14 Eli Zaretskii <eliz@gnu.org>
3331 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
3332 iteration through the command loop. Fixes a problem whereby mouse
3333 movements are ignored until the first mouse click.
3335 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3337 Use bool, not int, for Lisp booleans.
3338 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
3339 makes Emacs a bit smaller and presumably a bit faster.
3340 * lisp.h: Include <stdbool.h>.
3341 (struct Lisp_Boolfwd, defvar_bool):
3342 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
3343 * regex.c [!emacs]: Include <stdbool.h>.
3344 (false, true): Remove; <stdbool.h> does this for us now.
3346 2012-08-14 Chong Yidong <cyd@gnu.org>
3348 * character.c (Fcharacterp): Doc fix (Bug#12076).
3350 * data.c (Findirect_variable): Doc fix (Bug#11040).
3352 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
3354 * editfns.c (Fformat): Doc fix (Bug#12059).
3355 (Fsave_current_buffer): Doc fix (Bug#11542).
3357 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3359 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
3362 2012-08-14 Martin Rudalics <rudalics@gmx.at>
3364 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
3365 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
3366 * minibuf.c (choose_minibuf_frame, read_minibuf):
3367 * w32fns.c (x_create_tip_frame):
3368 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
3369 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
3371 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3373 * intervals.c (offset_intervals): Remove obsolete comment.
3375 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
3377 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
3379 2012-08-14 Gergely Risko <gergely@risko.hu>
3381 * coding.c (decode_coding): Record buffer modification before
3382 disabling undo_list (Bug#11773).
3384 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3386 Revert and cleanup some recent overlay changes.
3387 * buffer.h (enum overlay_type): Remove.
3388 (buffer_get_overlays, buffer_set_overlays): Likewise.
3389 (buffer_set_overlays_before, buffer_set_overlays_after):
3390 New function. Adjust users.
3391 (unchain_both): Add eassert.
3393 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3395 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
3397 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3399 * gtkutil.c (xg_mark_data): Don't assume C99.
3401 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
3403 * gtkutil.c (xg_frame_tb_info): New struct.
3404 (TB_INFO_KEY): New define.
3405 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
3406 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
3407 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
3409 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
3410 is up to date. Otherwise store new data.
3411 (free_frame_tool_bar): Free xg_frame_tb_info if present.
3413 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3415 Use KSET for write access to Lisp_Object members of struct kboard.
3416 * keyboard.h (KSET): New macro.
3417 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
3418 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
3419 * xterm.c: Adjust users.
3421 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3423 Use BSET for write access to Lisp_Object members of struct buffer.
3424 * buffer.h (BSET): New macro.
3425 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
3426 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
3427 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
3428 * window.c, xdisp.c, xfns.c: Adjust users.
3430 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
3432 * lread.c (syms_of_lread): Initialize Vlexical_binding.
3434 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
3436 * nsterm.m (not_in_argv): New function.
3437 (application:openFile, application:openTempFile:):
3438 (application:openFileWithoutUI:, application:openFiles:): Open file
3439 if not_in_argv returns non-zero (bug#12171).
3441 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
3442 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
3443 Define for Gtk+ versions less than 3.2.
3444 (xg_get_font_name): Use those functions/macros here.
3445 Reported by Frans Oilinki <moilinki@gmail.com>.
3447 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3449 * unexmacosx.c (copy_data_segment): Copy initialized data in
3450 statically linked libraries from input file rather than memory.
3452 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
3453 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
3454 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
3456 2012-08-10 Glenn Morris <rgm@gnu.org>
3458 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
3459 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
3461 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3463 Fix last change to allow compilation with low optimization levels.
3464 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
3465 Reported by Jan Djärv <jan.h.d@swipnet.se>.
3467 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3469 Use common inline syntax in intervals.h.
3470 * intervals.h (INTERVALS_INLINE): New macro.
3471 Change all users from LISP_INLINE.
3473 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3475 Define Qnone once for all platforms.
3476 * frame.c (Qnone): Define here.
3477 (syms_of_frame): DEFSYM it.
3478 * lisp.h (Qnone): New declaration.
3479 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
3480 * xfns.c: Remove duplication. Adjust users.
3482 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3484 Remove unused macros from intervals.h.
3485 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
3486 * intervals.c: Adjust comment.
3488 2012-08-10 Eli Zaretskii <eliz@gnu.org>
3490 * w32fns.c <w32_unicode_gui>: New static variable.
3491 (globals_of_w32fns): Initialize it according to os_subtype.
3492 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
3495 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
3496 Eli Zaretskii <eliz@gnu.org>
3498 Fix bug #10299 with Unicode characters sent by customized
3499 keyboards created by MSKLC.
3500 * w32fns.c (INIT_WINDOW_CLASS): New macro.
3501 (w32_init_class): Use it to initialize the Emacs class with either
3502 ANSI or Unicode API calls.
3503 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
3505 (w32_wnd_proc): If the character code sent by WM_CHAR or
3506 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
3507 original message. Call DefWindowProcW on NT and later.
3509 2012-08-10 Glenn Morris <rgm@gnu.org>
3511 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
3513 * lisp.h (DIRECTORY_SEP): Let configure set it.
3515 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
3517 Use TSET for write access to Lisp_Object slots of struct terminal.
3518 * termhooks.h (TSET): New macro.
3519 * coding.c, terminal.c, xselect.c: Adjust users.
3521 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
3523 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
3524 the failing expression, include them in the error message.
3525 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
3526 * lisp.h (internal_condition_case_n): Update declaration.
3528 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3530 Inline functions to examine and change buffer overlays.
3531 * buffer.c (unchain_both): New function.
3532 * buffer.h (buffer_get_overlays, buffer_set_overlays):
3533 (buffer_has_overlays): New function.
3534 (enum overlay_type): New enum.
3535 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
3536 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
3538 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3540 Inline functions to examine and change buffer intervals.
3541 * alloc.c (mark_interval_tree): Remove.
3542 (MARK_INTERVAL_TREE): Simplify.
3543 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
3544 * intervals.c (buffer_balance_intervals): New function.
3545 (graft_intervals_into_buffer): Adjust indentation.
3546 (set_intervals_multibyte): Simplify.
3547 * buffer.h (BUF_INTERVALS): Remove.
3548 (buffer_get_intervals, buffer_set_intervals): New function.
3549 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
3550 * intervals.c, textprop.c: Adjust users.
3552 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3554 Inline functions to examine and change string intervals.
3555 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
3556 (string_get_intervals, string_set_intervals): New function.
3557 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
3558 * lread.c, print.c, textprop.c: Adjust users.
3560 2012-08-08 Glenn Morris <rgm@gnu.org>
3562 * lisp.mk (lisp): Remove language/persian.elc.
3564 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3567 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
3568 (NULL_INTERVAL_P): Likewise. Adjust users.
3569 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
3570 Adjust comment. Move under #if 0.
3571 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
3572 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
3574 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3576 Check total length of intervals with eassert.
3577 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
3578 * intervals.c: Change all users to eassert.
3580 2012-08-07 Eli Zaretskii <eliz@gnu.org>
3582 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
3583 Rename fields to match removal of FGET and WGET and disuse of
3584 INTERNAL_FIELD in Lisp_Cons.
3586 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3588 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
3589 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
3590 name since all xname users are fixed long time ago. Do not
3592 (set_symbol_name, set_symbol_function, set_symbol_plist):
3593 (set_symbol_next, set_overlay_plist): New function.
3594 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
3595 (struct Lisp_Overlay): Likewise.
3596 (CVAR, MVAR, SVAR): Remove.
3597 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
3598 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
3599 * xterm.c: Adjust users.
3600 * .gdbinit: Change to use name field of struct Lisp_Symbol
3603 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3605 Basic functions to set Lisp_Object and pointer slots of intervals.
3606 * intervals.h (interval_set_parent, interval_set_object):
3607 (interval_set_left, interval_set_right, interval_set_plist):
3608 (interval_copy_parent): New function.
3609 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
3610 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
3612 (INTERVAL_SIZE): Remove. Adjust users.
3613 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
3615 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3617 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
3618 * process.h (PGET): Remove.
3619 (struct Lisp_Process): Do not use INTERNAL_FIELD.
3620 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
3622 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3624 Drop WGET and revert read access to Lisp_Objects slots of struct window.
3625 * window.h (WGET): Remove.
3626 (struct window): Do not use INTERNAL_FIELD.
3627 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
3628 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
3629 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
3630 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
3631 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
3634 2012-08-07 Chong Yidong <cyd@gnu.org>
3636 * window.c (Fwindow_edges, Fwindow_pixel_edges)
3637 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
3638 (Fdelete_window_internal): Signal an error if the window is not on
3639 a live frame (Bug#12025).
3641 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3643 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
3644 * frame.h (FGET): Remove.
3645 (struct frame): Do not use INTERNAL_FIELD.
3646 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
3647 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
3648 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
3649 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
3651 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
3653 * w32.c: Silence compiler warnings.
3654 (map_w32_filename): Remove unused variable `is_fat'.
3655 (chase_symlinks): Add parentheses around expression.
3657 2012-08-06 Glenn Morris <rgm@gnu.org>
3659 * sysdep.c: Respect BROKEN_GETWD.
3661 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
3662 Let configure handle it.
3663 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
3665 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3667 Use GCALIGNMENT where appropriate.
3668 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
3669 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
3670 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
3672 2012-08-06 Eli Zaretskii <eliz@gnu.org>
3674 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
3675 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
3677 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
3679 * buffer.h (struct buffer): Revert `indirections' to a simple int;
3680 that should be sufficient for everyone.
3682 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
3684 * keyboard.c (timer_check_2): Add break so timer_check returns next
3687 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3689 Fix Windows build errors introduced after converting to WGET and WSET.
3690 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
3691 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
3693 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
3695 * nsterm.m (ns_frame_rehighlight): Use FSET.
3697 * nsmenu.m (ns_update_menubar): Use FSET.
3699 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3701 Separate read and write access to Lisp_Object slots of Lisp_Process.
3702 * process.h (PGET, PSET): New macros similar to AREF and ASET.
3703 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
3705 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3707 Separate read and write access to Lisp_Object slots of struct window.
3708 * window.h (WGET, WSET): New macros similar to AREF and ASET.
3709 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
3710 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
3711 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
3712 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
3713 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
3716 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3718 Fix Windows build errors introduced after converting to FGET and FSET.
3719 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
3720 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
3721 (w32_judge_scroll_bars): Change to use FSET.
3722 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
3724 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3726 Fix replacement typo.
3727 * window.c (replace_window): Set root_window instead of
3728 selected_window. This fixes a total window subsystem
3729 malfunction reported by Bastien Guerry <bzg@gnu.org>.
3731 2012-08-06 Glenn Morris <rgm@gnu.org>
3733 * lisp.mk (lisp): Add language/persian.elc.
3735 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3737 Separate read and write access to Lisp_Object slots of struct frame.
3738 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
3739 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
3740 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
3741 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
3742 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
3744 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
3746 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
3748 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
3750 Generalize common compile-time constants.
3751 * lisp.h (header_size, bool_header_size, word_size): Now here.
3752 (struct Lisp_Vector): Add comment.
3753 (struct Lisp_Bool_Vector): Move up to define handy constants.
3754 (VECSIZE, PSEUDOVECSIZE): Simplify.
3755 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
3756 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
3757 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
3758 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
3759 * xfont.c, xmenu.c: Use word_size where appropriate.
3761 2012-08-05 Lawrence Mitchell <wence@gmx.li>
3763 * search.c (Freplace_match): Treat \? in the replacement text
3764 literally (Bug#8161).
3766 2012-08-05 Chong Yidong <cyd@gnu.org>
3768 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
3769 * frame.c (Vdelete_frame_functions):
3770 * emacs.c (Vkill_emacs_hook): Doc fix.
3772 2012-08-04 Eli Zaretskii <eliz@gnu.org>
3774 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
3775 --with-x-toolkit=no builds.
3776 Reported by Carsten Mattner <carstenmattner@gmail.com>.
3778 2012-08-04 Chong Yidong <cyd@gnu.org>
3780 * syntax.c (Fmodify_syntax_entry): Doc fix.
3782 2012-08-04 Eli Zaretskii <eliz@gnu.org>
3784 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
3785 * w32.c (init_environment): Change the default values of many
3786 environment variables in dflt_envvars[] to NULL, to avoid pushing
3787 them into environment when they were not already defined.
3788 Remove the code that deletes site-lisp subdirectories from the default
3789 value of EMACSLOADPATH, as it is no longer needed.
3790 (check_windows_init_file): Now external, not static.
3791 Use Vload_path as is, without adding anything, as this function is now
3792 called when Vload_path is already set up.
3794 * w32.h (check_windows_init_file): Add prototype.
3796 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
3797 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
3798 compatibility with Posix platforms.
3799 (main): Move the call to check_windows_init_file to here from
3801 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
3802 any, in the DEFALT argument into the root of the Emacs build or
3803 installation tree, as appropriate.
3805 * callproc.c (init_callproc_1): Call decode_env_path instead of
3806 doing its equivalent by hand.
3807 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
3808 the code that sets Vexec_path run on MS-Windows.
3810 * lread.c (init_lread): Add comments to #ifdef's.
3812 * msdos.c (dos_set_window_size, IT_update_begin)
3813 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
3814 instead of direct references.
3816 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
3818 Export DEFAULT_REHASH_* to GDB.
3819 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
3820 Now constants, not macros.
3822 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
3824 Remove unnecessary casts involving pointers.
3825 These casts are no longer needed now that we assume C89 or later,
3826 since they involve casting to or from void *.
3827 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
3828 (make_pure_float, make_pure_vector):
3829 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
3830 * macros.c (Fstart_kbd_macro):
3831 * menu.c (find_and_return_menu_selection):
3832 * minibuf.c (read_minibuf_noninteractive):
3833 * sysdep.c (closedir):
3834 * xdisp.c (x_produce_glyphs):
3835 * xfaces.c (compare_fonts_by_sort_order):
3836 * xfns.c (x_real_positions, select_visual):
3837 * xselect.c (x_stop_queuing_selection_requests)
3838 (x_get_window_property, x_get_window_property_as_lisp_data):
3839 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
3840 Remove unnecessary pointer casts.
3841 * alloc.c (record_xmalloc): New function.
3842 * lisp.h (record_xmalloc): New decl.
3843 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
3844 more like a function. This is because the pointer cast is not
3845 needed. All uses changed.
3846 * print.c (print_string, print_error_message): Avoid length recalc.
3848 Improve fix for macroexp crash with debugging (Bug#12118).
3849 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
3850 ARRAY_MARK_FLAG when checking subscripts, because ASET is
3851 not supposed to be invoked from the garbage collector.
3852 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
3853 (gc_aset): New function, which is like ASET but can be
3854 used in the garbage collector.
3855 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
3856 (set_hash_index): Use it instead of ASET.
3858 2012-08-03 Eli Zaretskii <eliz@gnu.org>
3860 Support symlinks on latest versions of MS-Windows.
3861 * w32.c: Include winioctl.h and aclapi.h.
3862 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
3863 (revert_to_self): Forward declarations of static functions.
3864 <static BOOL g_b_init_get_security_info>:
3865 <g_b_init_create_symbolic_link>: New static flags.
3866 (globals_of_w32): Initialize them to zero.
3867 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
3868 (map_w32_filename): Improve commentary. Simplify switch.
3869 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
3870 headers (most versions of MinGW w32api don't).
3871 (get_security_info, create_symbolic_link)
3872 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
3874 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
3875 in the argument file name.
3876 (sys_access): Call unc_volume_file_attributes only if
3877 GetFileAttributes fails with network-related error codes.
3878 (sys_rename): Diagnose renaming of a symlink when the user doesn't
3879 have the required privileges.
3880 (get_file_security_desc_by_name): Rename from
3881 get_file_security_desc.
3882 (stat_worker): New function, with most of the guts of 'stat', and
3883 with addition of handling of symlinks and support for 'lstat'.
3884 If possible, get file's attributes and security information by
3885 handle, not by name. Produce S_IFLNK bit for symlinks, when
3886 called from 'lstat'.
3887 (stat, lstat): New functions, call 'stat_worker'.
3888 (symlink, readlink, careadlinkat): Rewritten to create and resolve
3889 symlinks when the underlying filesystem supports them.
3891 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
3893 Fix macroexp crash on Windows with debugging (Bug#12118).
3894 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
3895 checking subscripts; problem introduced with the recent
3896 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
3897 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
3898 since it's used in non-static inline functions now.
3900 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
3901 Don't assume buffer size fits in 'int'. Remove unused local.
3903 Use C99-style 'extern inline' if available.
3904 * buffer.h (BUFFER_INLINE):
3905 * category.h (CATEGORY_INLINE):
3906 * character.h (CHARACTER_INLINE):
3907 * charset.h (CHARSET_INLINE):
3908 * composite.h (COMPOSITE_INLINE):
3909 * dispextern.h (DISPEXTERN_INLINE):
3910 * lisp.h (LISP_INLINE):
3911 * systime.h (SYSTIME_INLINE):
3912 New macro, replacing 'static inline' in this header.
3913 * buffer.h, category.h, character.h, charset.h, composite.h:
3914 * dispextern.h, lisp.h, systime.h:
3915 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3916 * alloc.c (LISP_INLINE):
3917 * buffer.c (BUFFER_INLINE):
3918 * category.c (CATEGORY_INLINE):
3919 * character.c (CHARACTER_INLINE):
3920 * charset.c (CHARSET_INLINE):
3921 * composite.c (COMPOSITE_INLINE):
3922 * dispnew.c (DISPEXTERN_INLINE):
3923 * sysdep.c (SYSTIME_INLINE):
3924 Define to EXTERN_INLINE, so that the corresponding functions
3925 are compiled into code.
3926 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
3927 (INLINE_HEADER_END): New macros.
3928 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
3929 since it's used in non-static inline functions now.
3930 (VALMASK) [!USE_LSB_TAG]: Likewise.
3932 2012-08-02 Glenn Morris <rgm@gnu.org>
3934 * s/: Remove empty directory.
3936 * s/ms-w32.h: Move to ../nt/inc.
3937 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
3938 Update for new ms-w32.h location.
3940 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
3943 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
3945 2012-08-02 Glenn Morris <rgm@gnu.org>
3947 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
3948 hard-coding the path separator.
3950 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
3952 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
3953 This how ASET and AREF are supposed to work, and makes
3954 it easier to think about future improvements. See
3955 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
3956 * charset.h (set_charset_attr): New function.
3957 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
3958 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
3959 (aref_addr): New function. All uses of &AREF(...) changed.
3960 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
3961 (set_hash_index): New functions. All lvalue-style uses of
3962 HASH_KEY etc. changed.
3963 * keyboard.c (set_prop): New function. All lvalue-style uses
3966 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
3968 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
3969 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
3970 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
3971 * nsfns.m (ns_set_name_as_filename): Likewise.
3972 * nsmenu.m (ns_update_menubar): Likewise.
3973 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
3975 2012-08-01 Eli Zaretskii <eliz@gnu.org>
3977 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
3978 Adapt to latest changes in field names of the corresponding Lisp
3981 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
3983 2012-08-01 Glenn Morris <rgm@gnu.org>
3985 * s/msdos.h: Remove file.
3986 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
3987 * Makefile.in (S_FILE): Remove.
3988 (config_h): Remove S_FILE.
3990 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
3992 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
3993 Remove; moved to nt/config.nt.
3995 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3997 Use INTERNAL_FIELD for conses and overlays.
3998 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
3999 Remove obsolete comment.
4001 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4002 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4004 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4006 Use INTERNAL_FIELD for symbols.
4007 * lisp.h (SVAR): New macro. Adjust users.
4008 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4009 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4011 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4013 Use INTERNAL_FIELD for processes.
4014 * process.h (PVAR): New macro. Adjust style.
4015 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4016 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4018 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4020 Use INTERNAL_FIELD for windows.
4021 * window.h (WVAR): New macro.
4022 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4023 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4024 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4025 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4026 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4027 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4029 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4031 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4033 2012-08-01 Glenn Morris <rgm@gnu.org>
4035 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4036 Move to configure.ac.
4038 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4040 * makefile.w32-in (CONFIG_H): Update dependencies.
4041 (CONF_POST_H): New macro.
4043 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4045 2012-07-31 Glenn Morris <rgm@gnu.org>
4047 * Makefile.in (S_FILE): No longer set by configure.
4049 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4051 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4053 * process.h (NULL_DEVICE):
4054 * emacs.c (SEPCHAR):
4055 * editfns.c (USER_FULL_NAME): Let configure set them.
4057 * s/README, s/template.h: Remove files.
4059 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4061 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4062 Move to configure.ac.
4064 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4066 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4067 resulting renaming of 'struct frame' members.
4069 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4071 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4072 after introduction of FVAR.
4074 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4076 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4078 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4079 instead of compositeToPoint.
4080 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4082 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4084 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4086 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4087 * lisp.h (INTERNAL_FIELD): New macro.
4088 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4089 (BVAR): Change to use INTERNAL_FIELD.
4090 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4091 (KVAR): Change to use INTERNAL_FIELD.
4092 * frame.h (FVAR): New macro.
4093 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4094 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4095 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4096 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4097 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4099 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4101 Miscellaneous fixes for non-default X toolkits.
4102 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4103 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4104 Move under #ifdef USE_LUCID.
4105 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4106 definition and usage to avoid warnings.
4108 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4110 * nsterm.m (openFiles): Fix previous checkin.
4112 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4114 * indent.c (compute_motion): Remove unused local.
4116 2012-07-31 Glenn Morris <rgm@gnu.org>
4118 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4120 * conf_post.h [USG5_4]:
4121 Move remaining contents of s/usg5-4-common.h here.
4122 * s/usg5-4-common.h: Remove file.
4124 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4125 * s/irix6-5.h: Remove file.
4127 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4128 * s/darwin.h: Remove file.
4130 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4131 * s/hpux10-20.h: Remove file, which is now empty.
4133 2012-07-30 Glenn Morris <rgm@gnu.org>
4135 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4136 * Makefile.in (config_h): Add conf_post.h.
4137 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4139 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4141 * nsterm.m (ns_do_open_file): New variable.
4142 (ns_term_init): Set ns_do_open_file to YES after run returns.
4143 (openFile, openTempFile, openFileWithoutUI, openFiles):
4144 Open files only if ns_do_open_file.
4146 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4148 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4149 This no-op macro hasn't been needed for many years.
4150 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4152 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4153 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4154 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4155 gdb_make_enums_visible.
4156 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4157 (DIRECTORY_SEP): Now a constant, not a macro.
4159 2012-07-30 Eli Zaretskii <eliz@gnu.org>
4161 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4162 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4164 * w32term.c <w32_keyboard_codepage>: Renamed from
4165 keyboard_codepage and now external. All users changed.
4167 * w32term.h: Add declaration of w32_keyboard_codepage.
4169 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4170 the codepage to translate keys to Unicode. If this argument is
4171 -1, use the value returned by GetConsoleCP. All callers changed.
4173 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4175 Update .PHONY listings in makefiles.
4176 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4177 bootstrap-clean, distclean, maintainer-clean, versioclean,
4180 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4181 This is a bit clearer. Fix some commentary typos.
4183 2012-07-30 Glenn Morris <rgm@gnu.org>
4185 * s/netbsd.h: Let configure include signal.h if needed.
4186 Remove file, which is now empty.
4188 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4189 Let configure set them.
4190 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4191 No more need to undefine.
4193 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4195 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4196 non-single-byte char when adding meta modifier. (Bug#12090)
4198 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4200 Convert safe_call to use variable number of arguments.
4201 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4202 (safe_call2): Fix comment.
4203 * lisp.h (safe_call): Adjust prototype.
4204 * coding.c (encode_coding_object): Change to use safe_call2.
4205 * xfaces.c (merge_face_heights): Change to use safe_call1.
4207 2012-07-30 Glenn Morris <rgm@gnu.org>
4209 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
4210 does that unconditionally. Remove file, which is now empty.
4212 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4215 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4217 Export to GDB most of lisp.h's remaining object-like macros.
4218 * lisp.h (min, max): Move earlier, because they're used earlier now.
4219 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4220 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4221 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4222 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4223 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4224 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4225 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4226 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4227 Now constants, for GDB. They need not be macros.
4228 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4229 Now constants, for GDB, as well as macros, for static initializers.
4230 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4231 Move to after the definition of struct Lisp_Char_Table,
4232 since the former now needs that type defined.
4233 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4234 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4235 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4236 New enums, for gdb_make_enums_visible.
4237 (GLYPH_MODE_LINE_FACE): Remove; unused.
4238 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
4239 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4240 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4241 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4242 enum maxargs, enum MAX_ALLOCA.
4243 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4244 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4245 no longer needed, now that they are done in lisp.h.
4247 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4249 Cleanup string bytes checking.
4250 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4251 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4252 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4253 (check_sblock, compact_small_strings): Simplify.
4255 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4257 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4258 These macros are confusing and no longer need to be defined, as
4259 the enum values now suffice. All uses replaced with definiens.
4260 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4262 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
4264 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4265 ($(BLD)/w32console.$(O)): Update dependencies.
4267 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4269 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4270 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4272 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4274 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4276 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4277 setting sitelisp (Bug#12010).
4279 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4281 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
4283 * w32heap.c (cache_system_info):
4284 * w32.c (sys_rename):
4285 * w32proc.c (find_child_console, sys_kill): All users changed.
4287 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4289 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4291 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4293 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4295 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4297 Cleanup statistics calculation in Fgarbage_collect.
4298 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4299 Fix zombies percentage calculation. Simplify elapsed time calculation.
4301 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4303 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4304 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4305 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4306 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4307 (replace_range, replace_range_2, del_range_2): Change to eassert.
4308 * marker.c (byte_char_debug_check): Adjust style.
4310 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4312 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4313 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4314 long-ago-commented-out code that talks about "WIN32".
4315 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4318 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
4320 Use Gnulib stdalign module (Bug#9772, Bug#9960).
4321 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
4322 Simplify by using alignof.
4323 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
4324 * lisp.h: Include <stdalign.h>.
4325 (GCALIGNMENT): New macro and constant.
4326 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
4327 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
4328 (stdalign): New macro, if not already defined.
4330 2012-07-28 Eli Zaretskii <eliz@gnu.org>
4332 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
4333 * w32inevt.c: Include w32inevt.h.
4334 (w32_read_console_input): New inline function, calls either
4335 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
4336 w32_console_unicode_input.
4337 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
4338 (w32_kbd_patch_key, key_event): Use the codepage returned by
4339 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
4340 (key_event): use uChar.UnicodeChar only if
4341 w32_console_unicode_input is non-zero.
4343 * w32console.c: Include w32heap.h.
4344 <w32_console_unicode_input>: New global variable.
4345 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
4346 family of Windows, zero otherwise.
4348 * w32inevt.h: Declare w32_console_unicode_input.
4350 * xdisp.c (init_iterator): Don't reference tip_frame in a build
4351 --without-x. (Bug#11742)
4353 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4355 Adjust GDB to reflect pvec_type changes (Bug#12036).
4356 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
4357 2012-07-04 changes to pseudovector representation.
4358 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
4360 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
4362 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
4364 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
4366 2012-07-27 Eli Zaretskii <eliz@gnu.org>
4368 * alloc.c (listn): Fix the order the arguments are consed onto the
4371 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
4372 enumeration constants, as PURE and HEAP are too general, and clash
4373 with other headers and sources, such as gmalloc.c and the
4374 MS-Windows system headers. All users changed.
4376 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4378 Revert last save_excursion_save and save_excursion_restore changes.
4379 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
4380 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
4382 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4384 Fix recently-introduced typos in Windows port.
4385 Reported by Martin Rudalics <rudalics@gmx.at>.
4386 * w32.c (init_environment): Replace comma with semicolon.
4387 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
4389 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4391 Improve GDB symbol export (Bug#12036).
4392 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
4393 arms of an 'if', not using conditional expressions; otherwise GDB
4394 complains about the types in the unevaluated arm when the argument
4395 is an integer literal.
4396 (xgetint): Simplify expression.
4397 * alloc.c (gdb_make_enums_visible): New constant. This ports to
4398 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
4399 Zaretskii in <http://bugs.gnu.org/12036#13>.
4400 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
4401 needed now that we have gdb_make_enums_visible.
4402 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
4403 (enum enum_USE_LSB_TAG):
4404 New enum types, packaging up enums that need to be exported to GDB.
4406 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4408 Utility function to make a list from specified amount of objects.
4409 * lisp.h (enum constype): New datatype.
4410 (listn): New prototype.
4411 * alloc.c (listn): New function.
4412 (Fmemory_use_count, syms_of_alloc): Use it.
4413 * buffer.c (syms_of_buffer): Likewise.
4414 * callint.c (syms_of_callint): Likewise.
4415 * charset.c (define_charset_internal): Likewise.
4416 * coding.c (syms_of_coding): Likewise.
4417 * keymap.c (syms_of_keymap): Likewise.
4418 * search.c (syms_of_search): Likewise.
4419 * syntax.c (syms_of_syntax): Likewise.
4420 * w32.c (init_environment): Likewise.
4421 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
4422 * xdisp.c (syms_of_xdisp): Likewise.
4423 * xfns.c (syms_of_xfns): Likewise.
4425 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4427 Fast save_excursion_save and save_excursion_restore.
4428 * lisp.h (struct Lisp_Excursion): New data type.
4429 (PVEC_EXCURSION): New pseudovector type.
4430 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
4431 to deal with it. Adjust comments.
4432 (init_marker, attach_marker): New prototype.
4433 (unchain_marker): Adjust prototype.
4434 * marker.c (attach_marker): Change to global.
4435 (init_marker): New function.
4436 * alloc.c (Fmake_marker, build_marker): Use it.
4437 (build_marker): More easserts.
4438 (mark_object): Handle struct Lisp_Excursion.
4439 * editfns.c (save_excursion_save, save_excursion_restore):
4440 Reimplement to use struct Lisp_Excursion. Add comments.
4442 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4444 Fix export of symbols to GDB (Bug#12036).
4445 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
4446 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
4447 emacs.c, as this is a more-suitable home. Had this been done earlier
4448 the fix for 12036 would have avoided some of the problems noted in
4449 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
4450 would have been more obvious.
4451 * emacs.c: Do not include <verify.h>; no longer needed.
4452 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
4453 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
4454 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4455 Remove; now done in lisp.h.
4456 * lisp.h (PUBLISH_TO_GDB): New macro.
4457 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
4458 (DATA_SEG_BITS): Use it.
4459 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
4460 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
4461 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
4462 not be usable in #if. This simplifies things.
4464 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
4466 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
4468 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4470 Simplify export of symbols to GDB (Bug#12036).
4471 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
4472 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
4473 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
4474 Adjust to changes in lisp.h and emacs.c, by using
4475 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
4476 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
4477 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
4478 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
4479 instead of gdb_valbits.
4480 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
4481 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
4482 instead of gdb_array_mark_flag.
4483 (xboolvector): Get size from $->size, not $->header.size.
4484 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
4485 (xreload, hook-run, hookpost-run): Remove.
4486 * emacs.c: Include <verify.h>.
4487 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
4488 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
4490 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
4491 (gdb_USE_LSB_TAG): New enum constants.
4492 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4493 Also define these as enum constants, so they're visible to GDB.
4494 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
4495 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
4496 as constants, so they're visible to GDB.
4497 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
4498 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
4499 Now enum constants, not macros, so they're visible to GDB.
4500 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
4501 more convenient now. All uses changed.
4502 (VALMASK) [USE_LSB_TAG]: Also define in this case.
4503 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
4505 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4507 Explicitly free restriction data that are not needed anymore.
4508 * editfns.c (save_restriction_restore): Free restriction data.
4510 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
4512 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
4513 add argument, tune behavior, and adjust all callers.
4515 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
4517 Use typedef for EMACS_INT, EMACS_UINT.
4518 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
4519 than macros. This simplifies debugging in the usual case, since
4520 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
4521 and it allows expressions involving EMACS_INT casts.
4522 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
4524 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
4526 * nsterm.m (ns_read_socket): Return early if there is a modal
4529 2012-07-25 Martin Rudalics <rudalics@gmx.at>
4531 * frame.c (Fredirect_frame_focus): In doc-string don't mention
4532 that FOCUS-FRAME can be omitted.
4534 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4536 Adjust buffer text indirection counters at the end of Fkill_buffer.
4537 * buffer.c (Fkill_buffer): Adjust indirection counters when the
4538 buffer is definitely dead. This should really fix an issue reported
4539 by Christoph Scholtes again. (Bug#12007).
4540 (init_buffer_once): Initialize indirection counters of
4541 buffer_defaults and buffer_local_symbols (for sanity and safety).
4543 2012-07-24 Eli Zaretskii <eliz@gnu.org>
4545 * xdisp.c (init_iterator): Don't compute dimensions of truncation
4546 and continuation glyphs on tooltip frames, leave them at zero.
4547 Avoids continued lines in tooltips. (Bug#11832)
4549 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4551 Simplify copy_overlay.
4552 * buffer.c (copy_overlay): Simplify. Use build_marker.
4553 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
4555 2012-07-23 Eli Zaretskii <eliz@gnu.org>
4557 * print.c (print_object): Don't crash when a frame's name is nil
4558 or invalid. (Bug#12025)
4560 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
4561 it signals an error when a tooltip frame is being created.
4563 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4565 Cleanup miscellaneous objects allocation and initialization.
4566 * alloc.c (allocate_misc): Change to static. Add argument to
4567 specify the subtype. Adjust comment and users.
4568 (build_overlay): New function.
4569 * buffer.c (copy_overlays, Fmake_overlay): Use it.
4570 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
4571 (allocate_misc): Remove prototype.
4572 (build_overlay): Add prototype.
4574 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4576 Swap buffer text indirection counters in Fbuffer_swap_text.
4577 * buffer.c (Fbuffer_swap_text): Swap indirections too.
4578 This avoids crash reported by Christoph Scholtes at
4579 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
4581 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
4583 * nsmenu.m (Popdown_data): New struct.
4584 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
4586 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
4587 (initWithContentRect): Make imgView and contentView non-static
4588 and autorelease them. Also autorelease img and matrix (Bug#12005).
4589 (dealloc): Remove (Bug#12005).
4591 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4593 Adjust consing_since_gc when objects are explicitly freed.
4594 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
4595 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
4596 (free_cons, free_misc): Subtract object size from consing_since_gc.
4598 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4600 Simplify and cleanup markers positioning code.
4601 * marker.c (attach_marker): More useful eassert.
4602 (live_buffer, set_marker_internal): New function.
4603 (Fset_marker, set_marker_restricted): Use set_marker_internal.
4604 (set_marker_both, set_marker_restricted_both): Use live_buffer.
4606 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
4608 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
4609 as it's limited by the amount of memory, not by INT_MAX.
4611 2012-07-21 Eli Zaretskii <eliz@gnu.org>
4613 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
4614 in special-event-map. See the discussion at
4615 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
4618 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
4619 info.dwItemData. Fixes crashes on 64-bit Windows.
4620 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
4622 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
4624 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4625 (conversationIdentifier): Return value is NSInteger.
4626 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
4628 2012-07-21 Chong Yidong <cyd@gnu.org>
4630 * window.c (decode_any_window): Signal an error if the window is
4631 on a dead frame (Bug#11984).
4633 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4635 Add indirection counting to speed up Fkill_buffer.
4636 * buffer.h (struct buffer): New member.
4637 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
4638 (Fmake_indirect_buffer): Set indirection counter to -1, increment
4639 base buffer indirection counter.
4640 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
4641 (Fkill_buffer): Adjust indirection counters as needed, don't walk
4642 through buffer list if indirection counter is 0.
4644 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4646 Extend the value returned by Fgarbage_collect with heap statistics.
4647 * alloc.c (Qheap): New symbol.
4648 (syms_of_alloc): DEFSYM it.
4649 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
4650 (Fmemory_free): Remove.
4651 (syms_of_alloc): Don't defsubr it.
4652 * buffer.c (Fcompact_buffer): Remove.
4653 (syms_of_buffer): Don't defsubr it.
4655 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4657 Make maybe_gc inline.
4658 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
4659 * lisp.h (consing_since_gc, gc_relative_threshold)
4660 (memory_full_cons_threshold): Revert declaration.
4661 (maybe_gc): Remove prototype, define as inline.
4662 * alloc.c: Remove old commented-out code.
4663 (consing_since_gc, gc_relative_threshold)
4664 (memory_full_cons_threshold): Revert to global.
4667 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4669 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
4670 * lisp.h (build_unibyte_string): New function.
4671 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
4672 * sysdep.c, w32fns.c, xfns.c: Use it.
4673 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
4674 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
4675 Adjust users accordingly.
4676 * font.h (font_open_by_name): Adjust prototype.
4678 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4680 Cleanup calls to Fgarbage_collect.
4681 * lisp.h (maybe_gc): New prototype.
4682 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
4683 Remove declarations.
4684 * alloc.c (maybe_gc): New function.
4685 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
4687 * bytecode.c (MAYBE_GC): Use maybe_gc.
4688 * eval.c (eval_sub, Ffuncall): Likewise.
4689 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
4690 to avoid dependency from auto-save feature.
4692 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
4694 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
4695 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
4696 'for_each_per_buffer_object_at'.
4697 All uses changed. It's better to use upper-case for macros that
4698 cannot be implemented as functions, to give the reader a clue
4699 that they're special.
4701 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
4703 * alloc.c (Fgarbage_collect): Tweak docstring.
4705 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
4707 Tweak the value returned from Fgarbage_collect again.
4708 * alloc.c (Fgarbage_collect): New return value, as confirmed in
4709 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
4710 Adjust documentation.
4711 (total_vector_bytes): Rename to total_vector_slots, adjust
4713 (total_free_vector_bytes): Rename to total_free_vector_slots,
4715 (Qstring_bytes, Qvector_slots): New symbols.
4716 (syms_of_alloc): DEFSYM them.
4718 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
4720 Buffer compaction primitive which may be used from Lisp.
4721 * buffer.c (compact_buffer, Fcompact_buffer): New function.
4722 (syms_of_buffer): Register Fcompact_buffer.
4723 * alloc.c (Fgarbage_collect): Use compact_buffer.
4724 * buffer.h (compact_buffer): New prototype.
4725 (struct buffer_text): New member.
4727 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
4729 New macro to iterate over all buffers, miscellaneous cleanups.
4730 * lisp.h (all_buffers): Remove declaration.
4731 * buffer.h (all_buffers): Add declaration, with comment.
4732 (for_each_buffer): New macro.
4733 * alloc.c (Fgarbage_collect, mark_object): Use it.
4734 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
4735 (init_buffer): Likewise.
4736 * data.c (Fset_default): Likewise.
4737 * coding.c (code_conversion_restore): Remove redundant check
4739 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
4741 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
4743 Fix bug that created negative-length intervals.
4744 * intervals.c (merge_interval_right, merge_interval_left):
4745 Do not zero out this interval if it is absorbed by its children,
4746 as this interval's total length doesn't change in that case. See
4747 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
4749 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
4751 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
4752 when invoking (make-bool-vector N t) and N is a positive
4753 multiple of 8 -- the last 8 bits were mistakenly cleared.
4755 Remove some struct layout assumptions in bool vectors.
4756 * alloc.c (bool_header_size): New constant.
4757 (header_size, word_size): Move earlier, as they're now used earlier.
4758 Use 'word_size' in a few more places, where it's appropriate.
4759 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
4760 padding before the data member of a bool vector.
4761 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
4762 than doing the check by hand with an abort ().
4764 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
4766 * eval.c (Fdefvar): Don't check constants since we only set the var if
4767 it's not yet defined anyway (bug#11904).
4769 * lisp.h (last_undo_boundary): Declare new var.
4770 * keyboard.c (command_loop_1): Set it.
4771 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
4772 were auto-added by the command loop (bug#11774).
4774 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
4776 * w32font.c (Qsymbol): Remove local definition.
4777 (syms_of_w32font): Don't DEFSYM it.
4779 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
4781 Fix sweep_vectors to handle large bool vectors correctly.
4782 * alloc.c (sweep_vectors): Account total_vector_bytes for
4783 bool vectors larger than VBLOCK_BYTES_MAX.
4785 2012-07-18 Chong Yidong <cyd@gnu.org>
4787 * frame.c (x_set_frame_parameters): Revert bogus change introduced
4788 in 2012-05-25 commit by Paul Eggert (Bug#11738).
4790 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
4792 Return more descriptive data from Fgarbage_collect.
4793 Suggested by Stefan Monnier in
4794 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
4795 * alloc.c (bounded_number): New function.
4796 (total_buffers, total_vectors): New variable.
4797 (total_string_size): Rename to total_string_bytes, adjust users.
4798 (total_vector_size): Rename to total_vector_bytes, adjust users.
4799 (sweep_vectors): Account total_vectors and total_vector_bytes.
4800 (Fgarbage_collect): New return value. Adjust documentation.
4801 (gc_sweep): Account total_buffers.
4802 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
4803 (VECTOR_SIZE): Remove.
4804 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
4805 (Qinterval, Qmisc): New symbols.
4806 (syms_of_data): Initialize them.
4807 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
4808 (Qcons, Qbuffer): New declarations.
4810 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
4812 * alloc.c (Fmemory_free): Account for memory-free's own storage.
4813 Round up, not down. Improve doc.
4815 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4817 Restore old code in allocate_string_data to avoid Faset breakage.
4818 Reported by Julien Danjou <julien@danjou.info> in
4819 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
4820 * alloc.c (allocate_string_data): Restore old code with minor
4821 adjustments, fix comment to explain this subtle issue.
4823 2012-07-17 Eli Zaretskii <eliz@gnu.org>
4825 Remove FILE_SYSTEM_CASE.
4826 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
4828 * fileio.c (FILE_SYSTEM_CASE): Don't define.
4829 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
4830 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
4831 call-process-region passes it through expand-file-name.
4833 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
4835 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
4837 Fix crash when creating indirect buffer (Bug#11917)
4838 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
4839 Don't handle unbound variables specially if non-zero.
4840 (Fbuffer_local_variables): Pass zero.
4841 (clone_per_buffer_values): Pass non-zero.
4843 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
4845 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
4846 to make the loop interruptible.
4848 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
4850 * gnutls.c (emacs_gnutls_handshake): Only retry if
4851 GNUTLS_E_INTERRUPTED.
4853 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4855 Cleanup and convert miscellaneous checks to eassert.
4856 * alloc.c (mark_interval): Fix comment, partially rephrase
4857 old comment from intervals.h (see below).
4858 * intervals.c (find_interval, adjust_intervals_for_insertion)
4859 (delete_interval, adjust_intervals_for_deletion)
4860 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
4862 (adjust_intervals_for_insertion, make_new_interval):
4863 Remove obsolete and unused code.
4864 * intervals.h (struct interval): Remove obsolete comment.
4865 * textprotp.c (erase_properties): Remove unused code.
4866 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
4867 (Fremove_list_of_text_properties): Convert to eassert.
4869 2012-07-17 Chong Yidong <cyd@gnu.org>
4871 * editfns.c (Finsert_char): Doc fix.
4873 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4875 Fix previous change to make Fmemory_free always accurate.
4876 * alloc.c (make_interval): Update total_free_intervals.
4877 (make_float): Likewise for total_free_floats.
4878 (free_cons, Fcons): Likewise for total_free_conses.
4879 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
4880 Likewise for total_free_vector_bytes.
4881 (Fmake_symbol): Likewise for total_free_symbols.
4882 (bytes_free): Remove.
4884 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4886 Simple free memory accounting feature.
4887 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
4888 (sweep_vectors): Accumulate size of free vectors.
4889 (Fgarbage_collect): Setup bytes_free.
4890 (Fmemory_free): New function.
4891 (syms_of_alloc): Register it.
4893 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4895 Cleanup overlays checking.
4896 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
4897 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
4898 eassert and OVERLAYP.
4899 (sort_overlays): Change to use OVERLAYP.
4901 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
4903 * editfns.c (Finsert_char): Make it interactive, and make the
4904 second arg optional. Copy interactive spec and docstring from
4907 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
4909 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
4910 Unlike the other wrapped functions, fabs has an unspecified
4913 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
4915 * nsterm.m (keyDown): Interpret flags without left/right bits
4916 as the left key (Bug#11670).
4918 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4920 Remove empty and useless init functions.
4921 * lisp.h (init_character_once, init_fns, init_image)
4922 (init_filelock, init_sound): Remove prototype.
4923 * character.c (init_character_once): Remove.
4924 * filelock.c (init_filelock): Likewise.
4925 * fns.c (init_fns): Likewise.
4926 * image.c (init_image): Likewise.
4927 * sound.c (init_sound): Likewise.
4928 * emacs.c (main): Adjust accordingly.
4930 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4932 * gtkutil.h: Tiny cleanups.
4933 (use_old_gtk_file_dialog): Remove useless declaration.
4934 (xg_uses_old_file_dialog): Add suggested const attribute.
4936 2012-07-15 Eli Zaretskii <eliz@gnu.org>
4938 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
4939 (bidi_paragraph_init): Use it to limit search forward for a strong
4940 directional character in abnormally large paragraphs full of
4941 neutral or weak characters. (Bug#11943)
4943 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
4945 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
4946 the toolbar (Bug#9451).
4947 (xg_make_tool_item): Give the widget event box a transparent
4950 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4952 Cleanup basic allocation variables and functions.
4953 * alloc.c (ignore_warnings, init_intervals, init_float)
4954 (init_cons, init_symbol, init_marker): Remove.
4955 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
4956 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
4957 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
4958 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
4959 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
4960 (staticidx, init_alloc_once, init_strings, free_ablock):
4961 Remove redundant initialization.
4962 * fns.c (init_weak_hash_tables): Remove.
4963 * lisp.h (init_weak_hash_tables): Remove prototype.
4965 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4967 Use zero_vector where appropriate.
4968 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
4970 * lisp.h (zero_vector): New declaration.
4971 * font.c (null_vector): Remove.
4972 (syms_of_font): Remove initialization and staticpro.
4973 (font_list_entities, font_find_for_lface): Change to use zero_vector.
4974 * keymap.c (Faccessible_keymaps): Likewise.
4976 2012-07-15 Leo Liu <sdl.web@gmail.com>
4978 * fringe.c: Fix typo in comments.
4980 2012-07-14 Leo Liu <sdl.web@gmail.com>
4982 * fringe.c: Add a new bitmap exclamation-mark.
4984 2012-07-14 Eli Zaretskii <eliz@gnu.org>
4986 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
4988 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
4989 (HAVE_MENUS): Don't define, defined by editing config.in with
4991 (GMALLOC_INHIBIT_VALLOC): Don't define.
4992 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
4994 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
4996 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
4998 2012-07-14 Glenn Morris <rgm@gnu.org>
5000 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5001 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5002 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5004 2012-07-13 Glenn Morris <rgm@gnu.org>
5006 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5008 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5009 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5011 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5013 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5014 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5015 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5016 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5018 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5019 as boolean expression.
5020 (x_set_window_size): Remove unused variable toolbar.
5021 (ns_get_color_default, ns_mod_to_lisp): Remove.
5022 (ns_mouse_position): Remove unused variables xchar and ychar.
5023 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5024 (ns_set_vertical_scroll_bar): Remove unused variable count.
5025 (ns_delete_terminal): Remove unused variable i.
5026 (ns_term_init): Remove unused variables r, g and b.
5027 (mouseDown): Remove unused variable window.
5028 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5029 (initFrameFromEmacs): Remove unused variable vbextra.
5030 (mouseEntered): Remove unused variables p and dpyinfo.
5031 (mouseExited): Remove unused variables p and r.
5032 (ns_define_frame_cursor, ns_clear_frame_area)
5033 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5034 (menuDown): Assign [sender tag] to variable and cast the variable.
5036 * nsterm.h (menuDown): Add id as type to argument sender.
5037 (ns_display_info_for_name): Add Lisp_Object argument.
5038 (ns_term_init): Add Lisp_Object argument.
5039 (ns_map_event_to_object): Add void argument.
5040 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5041 prototype with arguments and only declare if __OBJC__.
5042 (nxatoms_of_nsselect): Add void argument.
5043 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5044 (ns_alloc_autorelease_pool): Add void argument.
5045 (ns_release_autorelease_pool): Add void* argument.
5046 (ns_get_defaults_value): Add const char* argument.
5048 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5049 (initFromContents): Use SSDATA where appropriate.
5050 (ns_update_menubar): Add braces to ambigous if-else.
5051 (initWithTitle): Put () around assignment in if statement.
5052 (ns_menu_show): Remove unused variables window and keymap.
5053 (update_frame_tool_bar): Remove unused variable selected_p.
5054 (initWithContentRect): Remove unused variable this_cmd_name.
5056 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5058 (setXBMColor): Remove unused variable len.
5059 (setPixmapData): Put () around assignment in loop statement.
5061 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5062 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5064 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5065 around assignment in loop statement.
5066 (nsfont_open): Remove unused variable i.
5067 (nsfont_open): Remove unused variable len.
5068 (nsfont_draw): Remove unused variable cs.
5070 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5071 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5072 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5073 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5074 (Fns_font_name, Fns_perform_service)
5075 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5076 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5077 (ns_set_name): Remove unused variable view.
5078 (x_set_menu_bar_lines): Remove unused variable olines.
5079 (x_set_tool_bar_lines): Remove unused variable root_window.
5080 (Fns_list_colors): Put () around assignment in while statement.
5081 (Fns_perform_service): Remove unused variable len.
5082 (Fns_display_usable_bounds): Remove unused variable top.
5083 (syms_of_nsfns): Remove unused variable i.
5085 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5088 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5090 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5091 and free it with DestroyExceptionInfo (Bug#11558).
5093 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5095 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5096 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5097 Set here, not in nt/config.nt.
5099 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5101 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5102 cursor overflow into the last glyph on display line when the right
5103 fringe is off. (Bug#11832)
5105 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5107 * xdisp.c (produce_special_glyphs): Now static.
5108 * dispextern.h (produce_special_glyphs): Remove decl.
5110 2012-07-13 Glenn Morris <rgm@gnu.org>
5112 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5113 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5115 * s/usg5-4-common.h (USG, USG5):
5116 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5117 * s/sol2-6.h (SOLARIS2):
5118 * s/irix6-5.h (IRIX6_5):
5119 * s/hpux10-20.h (USG, USG5, HPUX):
5120 * s/gnu-linux.h (USG, GNU_LINUX):
5121 * s/freebsd.h (BSD_SYSTEM):
5122 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5123 * s/cygwin.h (CYGWIN):
5124 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5125 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5127 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5129 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5131 2012-07-13 Glenn Morris <rgm@gnu.org>
5133 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5135 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5137 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5138 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5140 2012-07-12 Glenn Morris <rgm@gnu.org>
5142 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
5144 * process.c (init_process_emacs): Rename from init_process.
5145 The old name is also the name of a Mach system call.
5146 * lisp.h, emacs.c: Update for this name change.
5147 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5150 2012-07-12 Eli Zaretskii <eliz@gnu.org>
5152 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5153 memmove call that removes glyphs covered by the left truncation
5154 glyph. Improve commentary.
5155 (display_line): Fix display of continuation glyphs on GUI frames
5156 when the right fringe is turned off and variable-size fonts are
5157 used in the window. Move the code that appends a stretch glyph to
5158 produce_special_glyphs, so that it could be used for truncation
5159 and continuation glyphs alike.
5160 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5161 glyph of a suitably computed width, to align the special glyphs at
5162 the window margin. Code moved from display_line. (Bug#11832)
5164 2012-07-12 Glenn Morris <rgm@gnu.org>
5166 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5168 * s/gnu-linux.h, s/hpux10-20.h:
5169 Do not unconditionally define HAVE_XRMSETDATABASE.
5171 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5173 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5175 Fix typos that broke OS X build.
5176 Reported by Randal L. Schwartz in
5177 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5178 * nsterm.m (ns_timeout): Add missing local decl.
5179 (ns_get_color): snprintf -> sprintf, to fix typo.
5181 2012-07-12 Glenn Morris <rgm@gnu.org>
5183 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5184 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5185 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5186 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5188 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5189 Move PTY_OPEN to configure.
5191 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5192 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5193 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5195 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5197 Use empty_unibyte_string where applicable.
5198 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5199 * lread.c (read1): Likewise.
5200 * xsettings.c (syms_of_xsettings): Likewise.
5202 2012-07-12 Glenn Morris <rgm@gnu.org>
5204 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5205 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
5206 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5207 * s/hpux10-20.h (RUN_TIME_REMAP):
5208 * s/bsd-common.h (TABDLY): Move to configure.
5210 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5212 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5214 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5215 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
5217 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
5219 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5220 * s/template.h: Move NARROWPROTO to configure.
5222 2012-07-11 Glenn Morris <rgm@gnu.org>
5224 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5225 unused since 2011-01-17 change to systty.h.
5227 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5228 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5229 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5231 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5233 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5235 2012-07-11 Glenn Morris <rgm@gnu.org>
5237 * s/darwin.h, s/gnu-linux.h, s/template.h:
5238 Move INTERRUPT_INPUT to configure.
5240 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5242 Minor adjustments to interning code.
5243 * lisp.h (intern, intern_c_string): Redefine as static inline
5244 wrappers for intern_1 and intern_c_string_1, respectively.
5245 (intern_1, intern_c_string_1): Rename prototypes.
5246 * lread.c (intern_1, intern_c_string_1, oblookup):
5247 Simplify Vobarray checking.
5248 * font.c (font_intern_prop): Likewise. Adjust comment.
5249 * w32font.c (intern_font_name): Likewise.
5251 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5253 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5255 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5256 of Fcar/Fcdr if possible.
5257 * font.c (check_otf_features): Likewise.
5258 * fontset.c (Fnew_fontset): Likewise.
5259 * gnutls.c (Fgnutls_boot): Likewise.
5260 * minibuf.c (read_minibuf): Likewise.
5261 * msdos.c (IT_set_frame_parameters): Likewise.
5262 * xmenu.c (Fx_popup_dialog): Likewise.
5263 * w32menu.c (Fx_popup_dialog): Likewise.
5265 2012-07-11 Glenn Morris <rgm@gnu.org>
5267 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5268 since nothing has defined it on these platforms.
5270 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5271 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5273 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5274 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5275 Move CLASH_DETECTION to configure.
5277 * s/gnu.h: Remove file, which is now empty.
5279 * s/gnu.h, s/gnu-linux.h:
5280 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5282 2012-07-11 John Wiegley <johnw@newartisans.com>
5284 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5285 function attribute, so we only use it if it exists in the
5288 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5290 Avoid call to strlen in fast_c_string_match_ignore_case.
5291 * search.c (fast_c_string_match_ignore_case): Change to use
5292 length argument. Adjust users accordingly.
5293 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5295 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5297 Assume mkdir, rmdir.
5298 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5299 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5302 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5305 * s/hpux10-20.h (HAVE_PERROR): Remove.
5306 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5307 Remove dummy definition, as this problem was obsolete long ago.
5310 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5312 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5314 Avoid calls to strlen in font processing functions.
5315 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
5316 (font_open_by_name): Change to use length argument.
5317 Adjust users accordingly.
5318 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
5320 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
5321 Change to return ptrdiff_t.
5322 (xfont_list_pattern, xfont_match): Use length returned by
5323 xfont_decode_coding_xlfd.
5324 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
5326 2012-07-11 Glenn Morris <rgm@gnu.org>
5328 * s/darwin.h, s/freebsd.h, s/netbsd.h:
5329 Move DONT_REOPEN_PTY to configure.
5331 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
5332 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
5334 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
5336 Remove "#define unix" that is no longer needed (Bug#11905).
5337 * s/aix4-2.h (unix): Remove; no longer needed.
5339 EMACS_TIME simplification (Bug#11875).
5340 This replaces macros (which typically do not work in GDB)
5341 with functions, typedefs and enums, making the code easier to debug.
5342 The functional style also makes code easier to read and maintain.
5343 * systime.h: Include <sys/time.h> on all hosts, not just if
5344 WINDOWSNT, since 'struct timeval' is needed in general.
5345 (EMACS_TIME): Now a typedef, not a macro.
5346 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
5348 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
5349 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
5350 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
5351 (EMACS_TIME_LE): Now functions, not macros.
5352 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
5353 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
5354 which are not functions. All uses rewritten to use:
5355 (make_emacs_time): New function.
5356 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
5357 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
5358 not functions. All uses rewritten to use the following, respectively:
5359 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
5360 (add_emacs_time, sub_emacs_time): New functions.
5361 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
5362 * fileio.c (Fcopy_file):
5363 * xterm.c (XTflash): Get the current time closer to when it's used.
5364 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
5366 * bytecode.c (targets): Suppress -Woverride-init warnings.
5368 Simplify by avoiding confusing use of strncpy etc.
5369 * doc.c (Fsnarf_documentation):
5370 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
5371 * frame.c (Fmake_terminal_frame):
5372 * gtkutil.c (get_utf8_string):
5374 * nsmenu.m (ns_update_menubar):
5375 * regex.c (regerror):
5376 Prefer memcpy to strncpy and strncat when either will do.
5377 * fileio.c (Fsubstitute_in_file_name):
5378 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
5379 (menu_separator_name_p):
5380 * nsmenu.m (ns_update_menubar):
5381 Prefer memcmp to strncmp when either will do.
5382 * nsterm.m: Include <ftoastr.h>.
5384 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
5385 Prefer snprintf to strncpy.
5386 * nsterm.m (ns_term_init):
5387 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
5388 * nsterm.m (ns_term_init):
5389 Avoid the need for strncpy, by using build_string or
5390 make_unibyte_string directly. Use dtoastr, not snprintf.
5391 * process.c (Fmake_network_process): Diagnose service names that
5392 are too long, rather than silently truncating them or creating
5393 non-null-terminated names.
5394 (Fnetwork_interface_info): Likewise, for interface names.
5395 * sysdep.c (system_process_attributes) [GNU_LINUX]:
5396 Prefer sprintf to strncat.
5397 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
5398 Prefer vsnprintf to vsprintf + strncpy.
5400 2012-07-10 Glenn Morris <rgm@gnu.org>
5402 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
5403 Clarify fallback case.
5405 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5407 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
5408 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
5409 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
5410 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
5411 where argument type is known to be a Lisp_Cons.
5413 2012-07-10 Tom Tromey <tromey@redhat.com>
5415 * bytecode.c (BYTE_CODE_THREADED): New macro.
5416 (BYTE_CODES): New macro. Replaces all old byte-code defines.
5417 (enum byte_code_op): New type.
5418 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
5419 (exec_byte_code): Use them. Use token threading when applicable.
5421 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5423 Optimize pure C strings initialization.
5424 * lisp.h (make_pure_string): Fix prototype.
5425 (build_pure_c_string): New function, defined as static inline. This
5426 provides a better opportunity to optimize away calls to strlen when
5427 the function is called with compile-time constant argument.
5428 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
5429 argument, adjust users accordingly. Use build_pure_c_string where
5431 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
5432 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
5433 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
5435 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5437 Avoid calls to strlen in miscellaneous functions.
5438 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
5439 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
5440 * lread.c (openp): Likewise.
5442 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5444 Avoid calls to strlen in path processing functions.
5445 * fileio.c (file_name_as_directory): Add comment. Change to add
5446 srclen argument and return the length of result. Adjust users
5448 (directory_file_name): Fix comment. Change to add srclen argument,
5449 swap 1st and 2nd arguments to obey the common convention.
5450 Adjust users accordingly.
5451 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
5453 2012-07-10 Glenn Morris <rgm@gnu.org>
5455 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
5456 Move PENDING_OUTPUT_COUNT definition to configure.
5458 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
5459 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
5460 * s/gnu.h (DATA_START): Move definitions to configure.
5462 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
5463 We include usg5-4-common.h, which defines them both.
5465 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
5466 O_RDONLY already includes it).
5468 Stop ns builds setting the EMACSLOADPATH environment variable.
5469 * nsterm.m (ns_load_path): Rename from ns_init_paths.
5470 Now it does not set EMACSLOADPATH, just returns the load-path string.
5471 * nsterm.h: Update accordingly.
5472 * lread.c [HAVE_NS]: Include nsterm.h.
5473 (init_lread) [HAVE_NS]: Use ns_load_path.
5474 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
5476 2012-07-09 Glenn Morris <rgm@gnu.org>
5478 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
5479 since the included bsd-common.h does so.
5481 Stop ns builds setting the EMACSPATH environment variable.
5482 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
5483 (ns_init_paths): Do not set EMACSPATH.
5484 * nsterm.h (ns_exec_path): Add it.
5485 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
5488 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
5490 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
5492 * process.c (wait_reading_process_output): 'waitchannels' was unset
5493 when read_kbd || !NILP (wait_for_cell); fix this.
5495 Add GCC-style 'const' attribute to functions that can use it.
5496 * character.h (char_resolve_modifier_mask):
5497 * keyboard.h (make_ctrl_char):
5498 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
5499 (init_character_once, next_almost_prime, init_fns, init_image)
5500 (flush_pending_output, init_sound):
5501 * mem-limits.h (start_of_data):
5502 * menu.h (finish_menu_items):
5503 Add ATTRIBUTE_CONST.
5504 * emacs.c (DEFINE_DUMMY_FUNCTION):
5505 Declare the dummy function with ATTRIBUTE_CONST.
5506 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
5507 Add decls with ATTRIBUTE_CONST.
5509 Minor improvements to make_formatted_string.
5510 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
5511 where int is good enough, as vsprintf returns an int.
5512 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
5514 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5516 Use make_formatted_string to avoid double length calculation.
5517 * lisp.h (make_formatted_string): New prototype.
5518 * alloc.c (make_formatted_string): New function.
5519 * buffer.c (Fgenerate_new_buffer_name): Use it.
5520 * dbus.c (syms_of_dbusbind): Likewise.
5521 * editfns.c (Fcurrent_time_zone): Likewise.
5522 * filelock.c (get_boot_time): Likewise.
5523 * frame.c (make_terminal_frame, set_term_frame_name)
5524 (x_report_frame_params): Likewise.
5525 * image.c (gs_load): Likewise.
5526 * minibuf.c (get_minibuffer): Likewise.
5527 * msdos.c (dos_set_window_size): Likewise.
5528 * process.c (make_process): Likewise.
5529 * xdisp.c (ensure_echo_area_buffers): Likewise.
5530 * xsettings.c (apply_xft_settings): Likewise.
5532 2012-07-09 Glenn Morris <rgm@gnu.org>
5534 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
5535 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
5536 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
5537 * nsterm.h (ns_etc_directory): Add it.
5538 * callproc.c [HAVE_NS]: Include nsterm.h.
5539 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
5541 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5543 Move marker debugging code under MARKER_DEBUG.
5544 * marker.c (MARKER_DEBUG): Move marker debugging code under
5545 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
5546 for bootstrap with --enable-checking (~3x slowdown reported
5547 by Juanma Barranquero <lekktu@gmail.com>).
5548 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
5550 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
5552 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
5553 See <http://bugs.gnu.org/11825#29>.
5555 2012-07-08 Eli Zaretskii <eliz@gnu.org>
5557 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
5558 has no font, use the frame's font. (Bug#11813)
5559 (display_line): Add commentary about displaying truncation glyphs
5561 (produce_special_glyphs): Move here from term.c.
5563 * term.c (produce_special_glyphs): Move to xdisp.c.
5565 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
5568 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
5570 * xdisp.c (display_line): Avoid warning about implicit declaration
5573 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
5575 * lisp.h: Remove empty conditional.
5577 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
5579 * lread.c (load_path_check): Now static.
5581 Fix some minor --with-ns problems found by static checking.
5582 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
5583 (x_set_font) [!HAVE_X_WINDOWS]:
5584 * image.c (xpm_load_image) [HAVE_NS]:
5585 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
5586 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
5587 Remove unused local.
5588 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
5589 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
5590 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
5591 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
5592 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
5593 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
5594 Fix pointer signedness problem.
5595 * xfaces.c (FRAME_X_FONT_TABLE):
5596 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
5598 2012-07-07 Glenn Morris <rgm@gnu.org>
5600 * lread.c (load_path_check): New function, split from init_lread.
5601 (init_lread): Reorganize. Motivation:
5602 If EMACSLOADPATH is set, check/warn about that rather than the
5603 defaults, which we are not going to use. Hence we can remove
5604 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
5605 Don't warn if site-lisp directories are missing.
5606 If not installed, start from a blank load-path, since
5607 PATH_LOADSEARCH refers to the eventual installation directories.
5609 2012-07-07 Eli Zaretskii <eliz@gnu.org>
5611 Support truncation and continuation glyphs on GUI frames, when
5612 fringes are disabled. (Bug#11832)
5613 * xdisp.c (init_iterator): Get dimensions of truncation and
5614 continuation glyphs even if on GUI frames.
5615 Adjust it->last_visible_x on GUI frames when the left or right fringes,
5616 or both, are absent.
5617 (start_display, move_it_in_display_line_to): Handle the case of a
5618 GUI frame without a fringe to display continuation or truncation
5620 (insert_left_trunc_glyphs): Support GUI frames: make sure
5621 truncation glyphs overwrite enough glyphs from the current line to
5622 have sufficient space in pixels.
5623 (display_line): Support truncation and continuation glyphs on GUI
5624 frames. If some spare pixels are left on the line after inserting
5625 the truncation glyphs, fill that space with a stretch glyph of a
5626 suitably computed width.
5628 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
5629 produce_glyphs, to support GUI sessions.
5631 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
5633 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
5635 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
5637 Do not require float-time's arg to fit in time_t (Bug#11825).
5638 This works better on hosts where time_t is unsigned, and where
5639 float-time is applied to the (negative) difference between two times.
5640 * editfns.c (decode_time_components): Last arg is now double *,
5641 not int *, and means to store all the result as a double, without
5642 worrying about whether the seconds part fits in time_t.
5643 All callers changed.
5644 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
5645 All callers changed.
5646 (Ffloat_time): Do not fail merely because the specified time falls
5647 outside of time_t range.
5649 2012-07-07 Glenn Morris <rgm@gnu.org>
5651 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
5652 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
5653 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
5655 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
5657 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
5658 Update dependencies.
5660 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
5662 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
5664 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
5665 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
5666 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
5667 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
5668 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
5669 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
5671 * xfont.c (compare_font_names): Redo to omit the need for casts.
5673 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
5675 * xfns.c (Fx_change_window_property): Doc fix.
5676 * w32fns.c (Fx_change_window_property): Doc fix.
5678 * w32fns.c (Fx_window_property): Accept the same arguments as the
5679 X Windows version. Doc fix.
5680 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
5682 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
5683 Eli Zaretskii <eliz@gnu.org>
5685 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
5686 Windows-specific code from nt/config.nt moved here.
5687 Obsolete settings removed.
5689 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
5691 * process.c: Avoid unnecessary calls to gettime.
5692 (wait_reading_process_output): Don't get the time of day
5693 when gobbling data immediately and not waiting, as there's no need
5694 for it in that case. This removes a FIXME.
5696 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
5698 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
5699 is defined (Bug#11768).
5701 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
5703 Fix marker debugging code.
5704 * marker.c (byte_char_debug_check): Do not perform the check
5705 if buffer is not multibyte.
5706 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
5707 Call byte_char_debug_check with correct arguments.
5709 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
5711 Compile marker debugging code only if ENABLE_CHECKING is defined.
5712 * marker.c (byte_char_debug_check, count_markers):
5713 Use only if ENABLE_CHECKING is defined.
5714 (byte_debug_flag): Remove.
5715 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
5716 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
5718 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
5720 Avoid code repetition in marker-related functions.
5721 * marker.c (attach_marker): New function.
5722 (Fset_marker, set_marker_restricted, set_marker_both)
5723 (set_marker_restricted_both): Use it.
5724 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
5725 Consistently rename charno to charpos.
5726 (marker_position): Add eassert.
5727 (marker_byte_position): Convert to eassert.
5729 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
5731 Simplify list operations in unchain_overlay and unchain_marker.
5732 * buffer.c (unchain_overlay): Simplify. Add comment.
5733 * marker.c (unchain_marker): Simplify. Fix comments.
5735 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
5737 Introduce fast path for the widely used marker operation.
5738 * alloc.c (build_marker): New function.
5739 * lisp.h (build_marker): New prototype.
5740 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
5741 * composite.c (autocmp_chars): Likewise.
5742 * editfns.c (buildmark): Remove.
5743 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
5744 (save_restriction_save): Use build_marker.
5745 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
5746 * window.c (save_window_save): Likewise.
5748 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
5750 Do not use Fdelete_overlay in delete_all_overlays
5751 to avoid redundant calls to unchain_overlay.
5752 * buffer.c (drop_overlay): New function.
5753 (delete_all_overlays, Fdelete_overlay): Use it.
5754 * minibuf.c (get_minibuffer): Fix comment.
5756 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
5758 Port to OpenBSD 5.1 amd64.
5759 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
5760 This is needed for OpenBSD, and should be harmless on all BSD systems.
5761 Also, include <sys/sysctl.h>, as it should be available on all
5762 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
5763 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
5764 use p_pid member, not kp_proc.pid.
5766 2012-07-06 Glenn Morris <rgm@gnu.org>
5768 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
5770 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
5772 More xmalloc and related cleanup.
5773 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
5774 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
5775 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
5776 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
5777 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
5778 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
5779 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
5780 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
5781 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
5783 Omit needless casts involving void * pointers and allocation.
5784 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
5785 as the former is more robust if P's type is changed.
5786 Prefer xzalloc to xmalloc + memset 0.
5787 Simplify malloc-or-realloc to realloc.
5788 Don't worry about xmalloc returning a null pointer.
5789 Prefer xstrdup to xmalloc + strcpy.
5790 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
5792 * keyboard.c (apply_modifiers_uncached): Prefer local array to
5793 alloca of a constant.
5795 2012-07-05 Eli Zaretskii <eliz@gnu.org>
5797 * xdisp.c (display_line): Fix horizontal pixel coordinates when
5798 hscroll is larger than the line width. Fixes long and futile
5799 looping inside extend_face_to_end_of_line (on a TTY) producing
5800 glyphs that are not needed and thrown away.
5802 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
5804 * marker.c (set_marker_restricted_both): Simplify by using
5807 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
5809 * editfns.c (region_limit): Simplify by using clip_to_bounds.
5811 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
5813 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
5814 not defined (Bug#11768).
5815 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
5816 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
5817 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
5818 followed by gtk_box_set_homogeneous (Bug#11768).
5819 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
5820 (update_theme_scrollbar_width, xg_create_scroll_bar):
5821 Use gtk_scrollbar_new (Bug#11768).
5822 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
5823 (is_box_type): New function (Bug#11768).
5824 (xg_tool_item_stale_p): Call is_box_type.
5825 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
5826 with default display (Bug#11768).
5828 2012-07-05 Eli Zaretskii <eliz@gnu.org>
5830 * xdisp.c (window_hscroll_limited): New function.
5831 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
5832 coordinates when window's hscroll is set to insanely large
5835 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
5837 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
5838 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
5840 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
5843 * lisp.h (xzalloc): New prototype. Omit needless casts.
5844 * alloc.c (xzalloc): New function. Omit needless casts.
5845 * charset.c: Omit needless casts. Convert all calls to
5846 xmalloc with following memset to xzalloc.
5847 * dispnew.c: Likewise.
5848 * fringe.c: Likewise.
5849 * image.c: Likewise.
5850 * sound.c: Likewise.
5852 * w32fns.c: Likewise.
5853 * w32font.c: Likewise.
5854 * w32term.c: Likewise.
5855 * xfaces.c: Likewise.
5857 * xterm.c: Likewise.
5858 * atimer.c: Omit needless casts.
5859 * buffer.c: Likewise.
5860 * callproc.c: Likewise.
5862 * coding.c: Likewise.
5863 * composite.c: Likewise.
5865 * doprnt.c: Likewise.
5866 * editfns.c: Likewise.
5867 * emacs.c: Likewise.
5869 * filelock.c: Likewise.
5871 * gtkutil.c: Likewise.
5872 * keyboard.c: Likewise.
5874 * lread.c: Likewise.
5875 * minibuf.c: Likewise.
5876 * msdos.c: Likewise.
5877 * print.c: Likewise.
5878 * process.c: Likewise.
5879 * region-cache.c: Likewise.
5880 * search.c: Likewise.
5881 * sysdep.c: Likewise.
5882 * termcap.c: Likewise.
5883 * terminal.c: Likewise.
5884 * tparam.c: Likewise.
5885 * w16select.c: Likewise.
5887 * w32reg.c: Likewise.
5888 * w32select.c: Likewise.
5889 * w32uniscribe.c: Likewise.
5890 * widget.c: Likewise.
5891 * xdisp.c: Likewise.
5892 * xmenu.c: Likewise.
5894 * xselect.c: Likewise.
5896 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
5898 * fileio.c (time_error_value): Check the right error number.
5899 Problem reported by Troels Nielsen in
5900 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
5902 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5904 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
5905 This should be fixed in a better way; see Eli Zaretskii in
5906 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
5907 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
5909 * fileio.c (time_error_value): Rename from special_mtime.
5910 The old name's problems were noted by Eli Zaretskii in
5911 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
5913 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
5914 This variable's comment says Emacs needs at least one GDB-visible
5915 symbol of type enum pvec_type, to work around GDB problems.
5916 The symbol's value doesn't matter.
5918 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
5919 that causes compilation to fail on pre-C99 compilers.
5921 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
5923 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
5924 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
5926 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5928 * buffer.c (init_buffer_once): Fix initialization of
5929 headers for buffer_defaults and buffer_local_symbols.
5930 Reported by Juanma Barranquero <lekktu@gmail.com>.
5932 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
5934 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
5935 * lisp.h (enum pvec_type): Use fewer bits.
5936 (PSEUDOVECTOR_SIZE_BITS): New constant.
5937 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
5938 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
5939 change in pvec_type.
5940 (PSEUDOVECTOR_TYPEP): New macro.
5941 (TYPED_PSEUDOVECTORP): Use it.
5942 * fns.c (internal_equal): Adapt code to extract pvectype.
5943 * emacs.c (gdb_pvec_type): Update type.
5944 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
5945 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
5946 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
5947 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
5948 (sweep_vectors): Use it. Use local var `total_bytes' instead of
5949 abusing vector->header.next.nbytes.
5950 (live_vector_p): Use PVEC_TYPE.
5951 (mark_object): Adapt code to extract pvectype. Use switch.
5953 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5955 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
5956 Tighten new eassert a bit.
5958 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5960 Fix compilation with --enable-gcc-warnings and -O1
5962 * doprnt.c (doprnt): Change type of tem to int, initialize
5963 to avoid compiler warning. Add eassert.
5964 * search.c (simple_search): Initialize match_byte to avoid
5965 compiler warning. Add eassert.
5967 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5969 Avoid weird behavior with large horizontal scrolls.
5970 Without this change, for example, large hscroll values would
5971 mess up Emacs's display on Fedora 15 x86, presumably due to
5972 overflows in int calculations in the display code.
5973 Also, if buffers had long lines, Emacs would freeze.
5974 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
5975 (set_window_hscroll): New function, containing the old guts of
5976 Fset_window_hscroll. Return the clipped value.
5977 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
5978 This avoids the need to check against PTRDIFF_MAX.
5980 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
5982 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5984 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
5986 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
5988 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
5989 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
5990 since GCC 4.4.6 issues a bogus warning for them.
5992 Fix bugs in file timestamp newness comparisons.
5993 * fileio.c (Ffile_newer_than_file_p):
5994 * lread.c (Fload): Use full timestamp resolution of files,
5995 not just the 1-second resolution, so that files that are only
5996 slightly newer still count as newer.
5997 * fileio.c (Ffile_newer_than_file_p): Don't assume file
5998 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6000 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6002 * fileio.c: Improve handling of file time marker. (Bug#11852)
6003 (special_mtime): New function.
6004 (Finsert_file_contents, Fverify_visited_file_modtime):
6005 Use it to set special mtime values consistently.
6007 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6009 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6010 marker for non-existing file. (Bug#11852)
6012 2012-07-03 Glenn Morris <rgm@gnu.org>
6014 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6015 and did not make it into globals.h).
6017 2012-07-03 Tom Tromey <tromey@redhat.com>
6019 * window.c (Fset_window_margins, Fset_window_fringes)
6020 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6021 * textprop.c (Fprevious_property_change): No longer static.
6022 * syntax.c (Fsyntax_table_p): No longer static.
6023 * process.c (Fget_process, Fprocess_datagram_address): No longer
6025 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6026 * keyboard.c (Fcommand_execute): No longer static.
6028 * insdel.c (Fcombine_after_change_execute): No longer static.
6029 * image.c (Finit_image_library): No longer static.
6030 * fileio.c (Fmake_symbolic_link): No longer static.
6031 * eval.c (Ffetch_bytecode): No longer static.
6032 * editfns.c (Fuser_full_name): No longer static.
6033 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6035 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6037 * dired.c (Ffile_attributes): No longer static.
6038 * composite.c (Fcomposition_get_gstring): No longer static.
6039 * callproc.c (Fgetenv_internal): No longer static.
6041 * ccl.h: Remove EXFUNs.
6042 * buffer.h: Remove EXFUNs.
6043 * dispextern.h: Remove EXFUNs.
6044 * intervals.h: Remove EXFUNs.
6045 * fontset.h: Remove EXFUN.
6046 * font.h: Remove EXFUNs.
6047 * dosfns.c (system_process_attributes): Remove EXFUN.
6048 * keymap.h: Remove EXFUNs.
6049 * lisp.h: Remove EXFUNs.
6050 * w32term.h: Remove EXFUNs.
6051 * window.h: Remove EXFUNs.
6052 * xsettings.h: Remove EXFUN.
6053 * xterm.h: Remove EXFUN.
6055 2012-07-03 Glenn Morris <rgm@gnu.org>
6057 * lisp.h (Frandom): Make it visible to C.
6058 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6059 buffer for invisible buffers. (Bug#1229)
6061 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6063 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6064 values which aren't power of 2.
6065 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6066 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
6069 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6071 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6073 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6075 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6077 * alloc.c (allocate_vector_block): Remove redundant
6078 calls to mallopt if DOUG_LEA_MALLOC is defined.
6079 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6080 avoid calls to mallopt if zero_vector is returned.
6082 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6084 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6085 is enabled, avoid dereferencing NULL current_sblock if
6088 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6090 Cleanup basic buffer management.
6091 * buffer.h (struct buffer): Change layout to use generic vector
6092 marking code. Fix some comments. Change type of 'clip_changed'
6093 to bitfield. Remove unused #ifndef old.
6094 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6095 (GET_OVERLAYS_AT): Fix indentation.
6096 (for_each_per_buffer_object_at): New macro.
6097 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6098 (Fbuffer_local_variables): Use it.
6099 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6100 * alloc.c (allocate_buffer): Adjust to match new layout of
6101 struct buffer. Fix comment.
6102 (mark_overlay): New function.
6103 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6104 Lisp area of struct buffer.
6105 (mark_object): Use it. Adjust marking of misc objects
6106 and related comments.
6108 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6110 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6111 wrapper that is not needed because the wrapped code is a no-op (zero
6112 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6113 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6115 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6117 * alloc.c (mark_buffer): Simplify. Remove prototype.
6118 (mark_object): Add comment. Reorganize marking of vector-like
6119 objects. Use CHECK_LIVE for all vector-like objects except buffers
6120 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6121 Avoid redundant calls to mark_vectorlike for bool vectors.
6123 2012-06-30 Glenn Morris <rgm@gnu.org>
6125 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6127 * epaths.in (PATH_SITELOADSEARCH): New.
6128 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6129 This is rather than relying on --enable-locallisppath elements
6130 having "site-lisp" in their names. (Bug#10208#25, 11658)
6132 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6134 * w32proc.c (sys_select): Accept and ignore one more argument.
6136 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6138 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6139 (pselect) [!MS_DOS]: Redirect to sys_select.
6141 * sysdep.c: Don't include dos.h and dosfns.h.
6143 * process.c (sys_select):
6144 * msdos.c (sys_select): Accept one more argument and ignore it.
6146 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6147 adapt data types and code to that.
6150 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6151 which clashes with the gnulib function of the same name.
6153 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6155 * font.c (font_style_to_value, font_style_symbolic)
6156 (font_prop_validate_style): Add type checks for values in
6159 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6161 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6164 2012-06-29 Eli Zaretskii <eliz@gnu.org>
6166 * xdisp.c (try_window_id): Undo last change.
6168 * w32.c (getwd): Adjust commentary about startup_dir.
6169 (init_environment): Always call sys_access, even in non-MSVC
6170 builds. Don't chdir to the directory of the Emacs executable.
6171 This undoes code from 1997 which was justified by the need to
6172 "avoid conflicts when removing and renaming directories". But its
6173 downside was that every relative file name was being interpreted
6174 relative to the directory of the Emacs executable, which can never
6175 be TRT. In particular, it broke sys_access when called with
6176 relative file names.
6177 (sys_access): Map GetLastError to errno.
6179 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6181 * window.h (struct window): Change type of 'fringes_outside_margins'
6182 to bitfield. Fix comment. Adjust users accordingly.
6183 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
6185 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6188 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
6190 * gnutls.c (emacs_gnutls_handshake):
6191 Add QUIT to make the loop interruptible.
6193 2012-06-29 Glenn Morris <rgm@gnu.org>
6195 * charset.c (init_charset): Make lack of etc/charsets fatal.
6197 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6199 * editfns.c (region_limit): Fix type mismatch.
6201 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6203 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6204 undefined. Convert from xassert to eassert.
6205 * nsmenu.m: Convert from xassert to eassert.
6206 * nsterm.m: Likewise.
6208 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6210 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6212 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6214 Avoid integer overflow on scroll-left and scroll-right.
6215 * window.c (HSCROLL_MAX): New macro.
6216 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6217 overflow when requested scroll falls outside ptrdiff_t range.
6219 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6221 * window.h (struct window): Change type of 'hscroll',
6222 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6223 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6224 Adjust users accordingly.
6225 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6226 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6227 from EMACS_INT to ptrdiff_t.
6228 (make_window): Omit redundant initialization.
6230 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
6232 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6234 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6236 * window.h (struct window): Change type of 'use_time' and
6237 'sequence_number' from Lisp_Object to int.
6238 * frame.c (make_frame): Adjust users accordingly.
6239 * print.c (print_object): Likewise.
6240 * window.c (select_window, Fwindow_use_time, make_parent_window)
6241 (make_window): Likewise.
6243 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6245 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6246 enabled with --enable-checking=[all,glyphs] configure option.
6247 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6248 adjust comments accordingly.
6249 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6250 undefined, adjust comments accordingly.
6251 * image.c: Likewise.
6252 * scroll.c: Likewise.
6253 * w32fns.c: Likewise.
6254 * w32term.c: Likewise.
6255 * xdisp.c: Likewise.
6256 * xfaces.c: Likewise.
6258 * xterm.c: Likewise.
6260 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6262 Generalize run-time debugging checks.
6263 * dispextern.h (XASSERTS): Remove.
6264 * fontset.c (xassert): Remove.
6265 Convert from xassert to eassert.
6266 * alloc.c: Convert from xassert to eassert.
6268 * dispnew.c: Likewise.
6270 * fringe.c: Likewise.
6271 * ftfont.c: Likewise.
6272 * gtkutil.c: Likewise.
6273 * image.c: Likewise.
6274 * keyboard.c: Likewise.
6276 * process.c: Likewise.
6277 * scroll.c: Likewise.
6278 * sound.c: Likewise.
6280 * w32console.c: Likewise.
6281 * w32fns.c: Likewise.
6282 * w32term.c: Likewise.
6283 * window.c: Likewise.
6284 * xdisp.c: Likewise.
6285 * xfaces.c: Likewise.
6287 * xselect.c: Likewise.
6288 * xterm.c: Likewise.
6290 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6292 * fns.c (maybe_resize_hash_table): Output message when growing the
6295 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6297 * alloc.c (allocate_string_data): Remove dead code.
6298 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6299 avoid GCC warning about unused macro.
6301 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6303 * alloc.c (allocate_string): Omit intervals initialization.
6304 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6305 as in make_pure_string and make_pure_c_string.
6307 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6309 * alloc.c (allocate_string): Fix last change.
6311 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6313 * alloc.c (allocate_string): Remove two redundant calls
6314 to memset, add explicit initialization where appropriate.
6316 2012-06-27 Glenn Morris <rgm@gnu.org>
6318 * lisp.mk (lisp): Remove paths.elc.
6320 2012-06-27 Chong Yidong <cyd@gnu.org>
6322 * doc.c (Fsubstitute_command_keys): Fix punctuation.
6324 2012-06-26 John Wiegley <johnw@newartisans.com>
6326 * unexmacosx.c (copy_data_segment): Add two section names used
6327 on Mac OS X Lion: __mod_init_func and __mod_term_func.
6329 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
6330 when building with Clang.
6332 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
6334 * eval.c (Fapply): Allow calling it with a single argument.
6336 2012-06-26 Eli Zaretskii <eliz@gnu.org>
6338 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
6339 _stricmp and _strnicmp.
6340 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
6342 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6344 * alloc.c (allocate_window): Zero out non-Lisp part of newly
6346 (allocate_process): Likewise for new process.
6347 (allocate_terminal): Change to use offsetof.
6348 (allocate_frame): Likewise.
6349 * frame.c (make_frame): Omit redundant initialization.
6350 * window.c (make_parent_window): Use memset.
6351 (make_window): Omit redundant initialization.
6352 * process.c (make_process): Omit redundant initialization.
6353 * terminal.c (create_terminal): Likewise.
6355 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6357 * term.c (delete_tty): Remove redundant call to memset.
6359 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6361 * alloc.c: Remove build_string.
6362 * lisp.h: Define build_string as static inline. This provides
6363 a better opportunity to optimize away calls to strlen when the
6364 function is called with compile-time constant argument.
6365 * image.c (imagemagick_error): Convert to build_string.
6366 * w32proc.c (sys_spawnve): Likewise.
6367 * xterm.c (x_term_init): Likewise.
6369 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
6371 Use sprintf return value instead of invoking strlen on result.
6372 In the old days this wasn't portable, since some sprintf
6373 implementations returned char *. But they died out years ago and
6374 Emacs already assumes sprintf returns int.
6375 Similarly for float_to_string.
6376 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
6377 * ccl.c (ccl_driver):
6378 * character.c (string_escape_byte8):
6379 * data.c (Fnumber_to_string):
6380 * doprnt.c (doprnt):
6381 * print.c (print_object):
6382 * xdisp.c (message_dolog):
6383 * xfns.c (syms_of_xfns):
6384 Use sprintf or float_to_string result to avoid need to call strlen.
6385 * data.c (Fnumber_to_string):
6386 Use make_unibyte_string, since the string must be ASCII.
6387 * lisp.h, print.c (float_to_string): Now returns int length.
6388 * term.c (produce_glyphless_glyph):
6389 Use sprintf result rather than recomputing it.
6391 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
6392 * Makefile.in (ALL_CFLAGS):
6393 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
6394 * gmalloc.c, regex.c: Include <config.h> unconditionally.
6396 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6398 * dispextern.h (xstrcasecmp): Define to library function
6399 strcasecmp if available.
6400 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
6402 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
6404 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
6405 Avoid comma operator.
6406 * menu.c (push_submenu_start, push_submenu_end)
6407 (push_left_right_boundary, push_menu_pane): Likewise.
6408 * msdos.c (dos_rawgetc): Likewise.
6410 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6412 * xfns.c (xic_create_fontsetname): Remove redundant calls
6415 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
6417 * gtkutil.c (get_utf8_string): Remove redundant assignment.
6418 sprintf already null-terminates its output.
6420 * xfns.c (x_window): Remove redundant cast.
6422 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6424 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
6425 `const char *' to `char *' to avoid compiler warning.
6427 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6429 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
6430 instead of truncating it to 63 (admittedly a generous limit).
6432 * process.c: Fix spelling and caps in comments.
6434 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
6436 * emacs.c (setpgrp): Remove definition, unused.
6437 * sysdep.c (setpgrp): Remove definition, not used in this file.
6439 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
6441 * makefile.w32-in: Update dependencies.
6443 2012-06-24 Eli Zaretskii <eliz@gnu.org>
6445 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
6446 (SYSTIME_H): Add nt/inc/sys/time.h.
6448 * systime.h [WINDOWSNT]: Include sys/time.h.
6450 * s/ms-w32.h (struct timespec): Definition moved from
6451 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
6453 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6455 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
6456 * buffer.h (buffer_slot_type_mismatch):
6457 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6458 * eval.c (unwind_to_catch):
6459 * image.c (my_png_error, my_error_exit):
6460 * keyboard.c (quit_throw_to_read_char, user_error)
6461 (Fexit_recursive_edit, Fabort_recursive_edit):
6462 * lisp.h (die, args_out_of_range, args_out_of_range_3)
6463 (wrong_type_argument, buffer_overflow, __executable_start)
6464 (memory_full, buffer_memory_full, string_overflow, Fthrow)
6465 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
6466 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
6468 (child_setup) [!DOS_NT]:
6469 * lread.c (end_of_file_error, invalid_syntax):
6470 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6471 * puresize.h (pure_write_error):
6472 * search.c (matcher_overflow):
6473 * sound.c (sound_perror, alsa_sound_perror):
6474 * sysdep.c, syssignal.h (croak):
6475 * term.c (maybe_fatal, vfatal):
6476 * textprop.c (text_read_only):
6477 * undo.c (user_error):
6478 * unexmacosx.c (unexec_error):
6479 * xterm.c (x_ins_del_lines, x_delete_glyphs):
6480 Use _Noreturn rather than NO_RETURN.
6481 No need for separate decl merely because of _Noreturn.
6482 * sound.c (sound_warning, parse_sound):
6483 Remove unnecessary forward decls.
6485 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6487 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
6488 * lisp.h (WAIT_READING_MAX): New macro.
6489 * dispnew.c (Fsleep_for, sit_for):
6490 * keyboard.c (kbd_buffer_get_event):
6491 * process.c (Faccept_process_output):
6492 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
6493 This improves on the previous patch, which introduced a bug
6494 when time_t is unsigned and as wide as intmax_t.
6495 See <http://bugs.gnu.org/9000#51>.
6497 2012-06-23 Eli Zaretskii <eliz@gnu.org>
6499 * dispnew.c (sit_for, Fsleep_for):
6500 * keyboard.c (kbd_buffer_get_event):
6501 * process.c (Faccept_process_output): Avoid compiler warnings when
6502 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
6504 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
6506 * makefile.w32-in: Update dependencies.
6508 * w32.c (ltime): Add return type and declare static.
6509 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
6511 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6513 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
6514 Privately reported by Herbert J. Skuhra.
6515 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
6517 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
6518 not make_lisp_timeval, when the argument is of type EMACS_TIME.
6520 2012-06-23 Eli Zaretskii <eliz@gnu.org>
6522 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
6523 last argument of make_unibyte_string.
6525 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
6526 language ID in the event parameters.
6528 * w32term.c (w32_read_socket): Put the new keyboard codepage into
6529 event.code, not the obscure "character set ID".
6531 2012-06-23 Chong Yidong <cyd@gnu.org>
6533 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
6535 2012-06-23 Eli Zaretskii <eliz@gnu.org>
6537 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
6538 * w32.c (fdutimens): New function.
6540 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
6542 * s/ms-w32.h (pselect): Redirect to sys_select.
6544 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
6546 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
6547 in the logic of incrementing and decrementing the value of
6548 use_relocatable_buffers.
6550 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6552 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
6553 Privately reported by Herbert J. Skuhra.
6554 [__FreeBSD__]: Remove "*/" typo after "#include".
6555 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
6556 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
6557 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
6558 Don't assume EMACS_TIME and struct timeval are the same type.
6560 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
6562 Support higher-resolution time stamps (Bug#9000).
6563 The time stamps are only nanosecond-resolution at the C level,
6564 since that's the best that any real-world system supports now.
6565 But they are picosecond-resolution at the Lisp level, as that's
6566 easy, and leaves room for future OS improvements.
6568 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
6571 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
6572 Don't get current time unless it's needed.
6574 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
6575 now provides it if it's absent.
6576 (start_atimer): Port to higher-res time stamps.
6577 Check for time stamp overflow. Don't get current time more
6578 often than is needed.
6580 * buffer.h (struct buffer): Buffer modtime now has high resolution.
6581 Include systime.h, not time.h.
6582 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
6584 * dired.c: Include stat-time.h.
6585 (Ffile-attributes): File times now have higher resolution.
6587 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
6588 (struct image): Timestamp now has higher resolution.
6590 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
6591 has at least microseconds now. All uses removed.
6592 (update_frame, update_single_window, update_window, update_frame_1)
6593 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
6594 (duration_to_sec_usec): Remove; no longer needed.
6596 * editfns.c (time_overflow): Now extern.
6597 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
6598 (float-time, Fformat_time_string, Fcurrent_time_string)
6599 (Fcurrent_time_zone): Accept and generate higher-resolution
6601 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
6602 (decode_time_components, lisp_seconds_argument): New functions.
6603 (make_time): Now static.
6604 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
6605 Report an error if the time is invalid, rather than having the caller
6608 * fileio.c: Include <stat-time.h>
6609 (Fcopy_file): Copy higher-resolution time stamps.
6610 Prefer to set the time stamp via a file descriptor if that works.
6611 (Fset_file_times, Finsert_file_contents, Fwrite_region)
6612 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
6613 (Fvisited_file_modtime, Fset_visited_file_modtime):
6614 Support higher-resolution time stamps.
6616 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
6618 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
6620 * image.c (prepare_image_for_display, clear_image_cache)
6621 (lookup_image): Port to higer-resolution time stamps.
6623 * keyboard.c (start_polling, bind_polling_period):
6624 Check for time stamp overflow.
6625 (read_char, kbd_buffer_get_event, timer_start_idle)
6626 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
6627 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
6628 Port to higher-resolution time stamps. Do not assume time_t is signed.
6629 (decode_timer): New function. Timers are now vectors of length 9,
6630 not 8, to accommodate the picosecond component.
6631 (timer_check_2): Use it.
6633 * nsterm.m (select_timeout, timeval_subtract): Remove.
6634 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
6635 as they're a bit more accurate and handle overflow better.
6636 (ns_select): Change prototype to be compatible with pselect.
6637 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
6638 * nsterm.h (ns_select): Adjust prototype.
6640 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
6641 us-resolution time stamps.
6642 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
6644 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
6646 * lisp.h (time_overflow): New decl.
6647 (wait_reading_process_output): First arg is now intmax_t, not int,
6648 to accommodate larger waits.
6650 * process.h (struct Lisp_Process.read_output_delay):
6651 Now counts nanoseconds, not microseconds.
6652 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
6654 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
6655 (wait_reading_process_output):
6656 Port to ns-resolution time stamps.
6657 (Faccept_process_output, wait_reading_process_output):
6658 Check for time stamp overflow. Do not assume time_t is signed.
6659 (select_wrapper): Remove; we now use pselect.
6660 (Fprocess_attributes): Now generates ns-resolution time stamps.
6662 * sysdep.c: Include utimens.h. Don't include utime.h
6663 or worry about struct utimbuf; gnulib does that for us now.
6664 (gettimeofday): Remove; gnulib provides a substitute.
6665 (make_timeval): New function.
6666 (set_file_times): Now sets ns-resolution time stamps.
6667 New arg FD; all uses changed.
6668 (time_from_jiffies, ltime_from_jiffies, get_up_time)
6669 (system_process_attributes):
6670 Now returns ns-resolution time stamp. All uses changed.
6671 Check for time stamp overflow.
6673 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
6674 provides a substitute now.
6676 * systime.h: Include timespec.h rather than sys/time.h and time.h,
6677 since it guarantees struct timespec.
6678 (EMACS_TIME): Now struct timespec, so that we can support
6679 ns-resolution time stamps.
6680 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
6681 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
6682 (EMACS_USECS): Remove.
6683 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
6684 so multiply the arg by 1000 before storing it.
6685 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
6687 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
6688 Port to ns-resolution time stamps.
6689 (EMACS_TIME_NEG_P): Remove; replaced by....
6690 (EMACS_TIME_SIGN): New macro.
6691 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
6692 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
6693 (set_file_times, make_time, lisp_time_argument): Adjust signature.
6694 (make_timeval, make_lisp_time, decode_time_components): New decls.
6695 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
6696 that it mishandled time_t overflow. You can't compare by subtracting!
6697 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
6698 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
6700 * term.c: Include <sys/time.h>.
6701 (timeval_to_Time): New function, for proper overflow wraparound.
6702 (term_mouse_position, term_mouse_click): Use it.
6704 * undo.c (record_first_change): Support higher-resolution time stamps
6706 (Fprimitive_undo): Use them when restoring time stamps.
6708 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
6709 (w32_get_internal_run_time):
6710 Port to higher-resolution Emacs time stamps.
6711 (ltime): Now accepts single 64-bit integer, as that's more convenient
6714 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
6716 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
6717 for compatibility with pselect. Support ns-resolution time stamps.
6719 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
6721 * xselect.c (wait_for_property_change, x_get_foreign_selection):
6722 Check for time stamp overflow, and support ns-resolution time stamps.
6724 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
6725 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
6726 (timeval_subtract): Remove; no longer needed.
6727 (XTflash, XTring_bell, x_wait_for_event):
6728 Port to ns-resolution time stamps. Don't assume time_t is signed.
6730 2012-06-22 Chong Yidong <cyd@gnu.org>
6732 * xdisp.c (x_consider_frame_title): Revert last change.
6734 2012-06-22 Eli Zaretskii <eliz@gnu.org>
6736 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
6737 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
6738 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
6739 staticidx goes up to 1597 out of 1600 = 0x640.)
6741 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
6743 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
6744 Otherwise, the umask might be mistakenly 0 while handling input signals.
6746 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
6748 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
6750 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
6752 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
6753 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
6754 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
6755 access to `contents' member of Lisp_Vector objects with AREF and ASET
6758 2012-06-19 Chong Yidong <cyd@gnu.org>
6760 * frame.c (delete_frame): When selecting a frame on a different
6761 text terminal, do not alter the terminal's top-frame.
6763 * xdisp.c (format_mode_line_unwind_data): Record the target
6764 frame's selected window and its terminal's top-frame.
6765 (unwind_format_mode_line): Restore them.
6766 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
6768 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
6769 since tty frames can be explicitly named.
6770 (prepare_menu_bars): Likewise.
6772 * term.c (Ftty_top_frame): New function.
6774 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
6776 Port byte-code-meter to modern targets.
6777 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
6778 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
6779 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
6780 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
6781 (METER_1, METER_2): Simplify.
6783 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
6785 * data.c (Fdefalias): Return `symbol' (bug#11686).
6787 2012-06-18 Martin Rudalics <rudalics@gmx.at>
6789 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
6790 gets killed during executing of this function (Bug#11665).
6791 Try to always return Qt when the buffer has been actually killed.
6792 (Vkill_buffer_query_functions): In doc-string say that functions
6793 run by this hook should not change the current buffer.
6795 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
6797 Fix recently-introduced process.c problems found by static checking.
6798 * process.c (write_queue_push, write_queue_pop, send_process):
6799 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
6800 (write_queue_pop): Fix pointer signedness problem.
6801 (send_process): Remove unused local.
6803 2012-06-17 Chong Yidong <cyd@gnu.org>
6805 * xdisp.c (redisplay_internal): No need to redisplay terminal
6806 frames that are not on top.
6808 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
6810 * process.c (make_process): Initialize write_queue.
6811 (write_queue_push, write_queue_pop): New functions.
6812 (send_process): Use them to maintain correct ordering of process
6815 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
6817 * lisp.h (eassert): Assume C89 or later.
6818 This removes the need for CHECK.
6819 (CHECK): Remove. Its comments about always evaluating its
6820 argument were confusing, as 'eassert' typically does not evaluate
6823 * coding.c (produce_chars): Use ptrdiff_t, not int.
6825 * xterm.c (x_draw_underwave): Check for integer overflow.
6826 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
6828 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
6830 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
6831 referenced (Bug#11583).
6833 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
6835 Implement wave-style variant of underlining.
6836 * dispextern.h (face_underline_type): New enum.
6837 (face): Add field for underline type.
6838 * nsterm.m (ns_draw_underwave): New function.
6839 (ns_draw_text_decoration): Use it.
6840 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
6842 (x_draw_glyph_string): Use them.
6843 * xfaces.c (Qline, Qwave): New Lisp objects.
6844 (check_lface_attrs, merge_face_ref)
6845 (Finternal_set_lisp_face_attribute, realize_x_face):
6846 Handle wave-style underline face attributes.
6847 * xterm.c (x_draw_underwave): New function.
6848 (x_draw_glyph_string): Use it.
6850 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
6852 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
6853 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
6854 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
6855 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
6856 ($(BLD)/w32select.$(O)): Update dependencies.
6858 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
6860 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
6861 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
6862 * character.c (_fetch_multibyte_char_p): Remove.
6863 * alloc.c: Include "character.h" before "buffer.h".
6865 * buffer.c: Likewise.
6866 * bytecode.c: Likewise.
6867 * callint.c: Likewise.
6868 * callproc.c: Likewise.
6869 * casefiddle.c: Likewise.
6870 * casetab.c: Likewise.
6871 * category.c: Likewise.
6873 * coding.c: Likewise.
6874 * composite.c: Likewise.
6875 * dired.c: Likewise.
6876 * dispnew.c: Likewise.
6878 * dosfns.c: Likewise.
6879 * editfns.c: Likewise.
6880 * emacs.c: Likewise.
6881 * fileio.c: Likewise.
6882 * filelock.c: Likewise.
6884 * fontset.c: Likewise.
6885 * fringe.c: Likewise.
6886 * indent.c: Likewise.
6887 * insdel.c: Likewise.
6888 * intervals.c: Likewise.
6889 * keyboard.c: Likewise.
6890 * keymap.c: Likewise.
6891 * lread.c: Likewise.
6892 * macros.c: Likewise.
6893 * marker.c: Likewise.
6894 * minibuf.c: Likewise.
6895 * nsfns.m: Likewise.
6896 * nsmenu.m: Likewise.
6897 * print.c: Likewise.
6898 * process.c: Likewise.
6899 * regex.c: Likewise.
6900 * region-cache.c: Likewise.
6901 * search.c: Likewise.
6902 * syntax.c: Likewise.
6904 * textprop.c: Likewise.
6906 * unexsol.c: Likewise.
6907 * w16select.c: Likewise.
6908 * w32fns.c: Likewise.
6909 * w32menu.c: Likewise.
6910 * window.c: Likewise.
6911 * xdisp.c: Likewise.
6913 * xmenu.c: Likewise.
6915 * xselect.c: Likewise.
6917 2012-06-16 Eli Zaretskii <eliz@gnu.org>
6919 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
6920 If all the glyphs of the glyph row came from strings, and we have no
6921 cursor positioning clues, put the cursor on the first glyph of the
6923 (handle_face_prop): Use chunk-relative overlay string index when
6924 indexing into it->string_overlays array. (Bug#11653)
6925 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
6926 the rightmost. (Bug#11720)
6928 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
6930 * category.h (CHAR_HAS_CATEGORY): Define as inline.
6931 (CATEGORY_MEMBER): Enforce 1/0 value.
6932 * category.c (_temp_category_set): Remove.
6934 2012-06-16 Eli Zaretskii <eliz@gnu.org>
6936 * window.c (Fdelete_other_windows_internal)
6937 (Fdelete_window_internal): Don't access frame's mouse highlight
6938 info of the initial frame. (Bug#11677)
6940 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
6942 * .gdbinit (xgetint): Fix recently-introduced paren typo.
6943 Assume USE_2_TAGS_FOR_INTS.
6944 (xreload): Adjust $tagmask width to match recent lisp.h change.
6946 Simplify lisp.h in minor ways that should not affect code.
6947 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
6948 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
6949 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
6950 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
6951 (INTTYPEBITS): New macro, for clarity.
6952 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
6953 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
6954 Simplify now that USE_LSB_TAG is always defined.
6955 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
6956 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
6958 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
6960 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
6962 2012-06-13 Glenn Morris <rgm@gnu.org>
6964 * s/bsd-common.h (BSD4_3):
6965 * s/usg5-4-common.h (USG5_4): No longer define; unused.
6967 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
6969 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
6972 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
6974 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
6975 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
6976 * alloc.c (widen_to_Lisp_Object): Remove.
6977 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
6978 * frame.c (delete_frame): Remove outdated comment.
6979 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
6980 USE_LISP_UNION_TYPE.
6981 (Fw32_unregister_hot_key): Likewise.
6982 (Fw32_toggle_lock_key): Likewise.
6983 * w32menu.c (add_menu_item): Likewise.
6984 (w32_menu_display_help): Use XIL instead of checking
6985 USE_LISP_UNION_TYPE.
6986 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
6987 (init_heap): Likewise.
6988 * w32term.c (w32_read_socket): Update comment.
6990 2012-06-13 Glenn Morris <rgm@gnu.org>
6992 * s/usg5-4-common.h, src/s/unixware.h:
6993 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
6995 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
6997 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
6999 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7000 * alloc.c (make_number) [!defined make_number]:
7001 Remove, as lisp.h always defines this now.
7002 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7003 (roundup_size): Verify that it is a power of 2.
7004 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7005 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7006 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7007 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7008 USE_LSB_TAG now is always defined to be either 0 or 1.
7010 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7011 code works fine either way, and efficiency is not a concern here,
7012 as the union type is for debugging, not for production.
7013 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7014 Use an inline function on all platforms when using the union type,
7015 since this is simpler and 'static inline' can be used portably
7017 (LISP_INITIALLY_ZERO): New macro.
7018 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7019 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7021 2012-06-12 Glenn Morris <rgm@gnu.org>
7023 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7025 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7027 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7028 Move BROKEN_SIGIO to configure.
7030 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7031 Move NO_TERMIO to configure.
7033 2012-06-12 Chong Yidong <cyd@gnu.org>
7035 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7036 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7037 MagickExportImagePixels is undefined.
7039 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7041 * image.c (imagemagick_load_image): Remove unused label.
7043 2012-06-11 Glenn Morris <rgm@gnu.org>
7045 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7046 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7047 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7048 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7050 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7052 * alloc.c (make_byte_code): New function.
7053 (Fmake_byte_code): Use it. Don't purify here.
7054 * lread.c (read1): Use it as well to avoid extra allocation.
7056 2012-06-11 Chong Yidong <cyd@gnu.org>
7058 * image.c (imagemagick_load_image): Implement transparency.
7060 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7062 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7063 account for preceding backslashes. (Bug#11663)
7065 2012-06-09 Chong Yidong <cyd@gnu.org>
7067 * term.c: Support italics in capable terminals (Bug#9652).
7068 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7069 (turn_on_face): Output using TS_enter_italic_mode if available.
7070 Don't handle unused blinking and alt-charset cases.
7071 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7072 and tty_alt_charset_p cases.
7073 (tty_capable_p, init_tty): Support italics.
7075 * termchar.h (struct tty_display_info): Add field for italics.
7076 Remove unused blink field.
7078 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7081 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7082 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7083 tty_alt_charset_p. Add tty_italic_p.
7085 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7087 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7088 dbus_type_is_basic if available.
7089 (xd_extract_signed, xd_extract_unsigned): Rename from
7090 extract_signed and extract_unsigned, respectively. Adapt callers.
7092 2012-06-09 Chong Yidong <cyd@gnu.org>
7094 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7096 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7099 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7101 * xdisp.c (vmessage): Treat frame message as multibyte.
7102 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7103 would generate the diagnostic "Making \302\247 buffer-local while
7106 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7108 * dispnew.c (showing_window_margins_p): Undo last change, which
7109 was done due to an inadvertent commit.
7110 (adjust_frame_glyphs_for_frame_redisplay): Do call
7111 showing_window_margins_p.
7113 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7115 * eval.c (Fmake_var_non_special): New primitive.
7116 (syms_of_eval): Defsubr it.
7117 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7119 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7121 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7122 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7124 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7126 * alloc.c (allocate_vectorlike): Fix last change.
7128 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7130 Block-based vector allocation of small vectors.
7131 * lisp.h (struct vectorlike_header): New field `nbytes',
7132 adjust comment accordingly.
7133 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7134 to denote vector blocks. Adjust users (live_vector_p,
7135 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7136 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7137 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7138 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7139 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7140 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7141 (roundup_size): New constant.
7142 (struct vector_block): New data type.
7143 (vector_blocks, vector_free_lists, zero_vector): New variables.
7144 (all_vectors): Rename to `large_vectors'.
7145 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7146 (sweep_vectors): New functions.
7147 (allocate_vectorlike): Return `zero_vector' as the only vector of
7148 0 items. Allocate new vector from block if vector size is less than
7149 or equal to VBLOCK_BYTES_MAX.
7150 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7151 (init_alloc_once): Add call to init_vectors.
7153 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7155 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7157 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7159 * doprnt.c (doprnt): Truncate multibyte char correctly.
7160 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7161 would mishandle a string argument "Xc" if X was a multibyte
7162 character of length 2: it would truncate after X's first byte
7163 rather than including all of X.
7165 2012-06-06 Chong Yidong <cyd@gnu.org>
7167 * buffer.c (word_wrap): Doc fix.
7169 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7171 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7173 2012-06-03 Glenn Morris <rgm@gnu.org>
7175 * xdisp.c (tool-bar-style): Doc fix.
7177 2012-06-03 Ulrich Müller <ulm@gentoo.org>
7179 * Makefile.in (PAXCTL): Define.
7180 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7181 binary via PaX flags if the paxctl utility is available.
7182 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7183 Restore PaX flags to their default. (Bug#11398)
7185 2012-06-03 Chong Yidong <cyd@gnu.org>
7187 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7190 2012-06-03 Chong Yidong <cyd@gnu.org>
7192 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7193 (note_mode_line_or_margin_highlight): If there is no help echo,
7194 use mode-line-default-help-echo. Handle the case where the mouse
7195 position is past the end of the mode line string.
7197 * buffer.c (buffer_local_value_1): New function, split from
7198 Fbuffer_local_value; can return Qunbound.
7199 (Fbuffer_local_value): Use it.
7200 (Vmode_line_format): Docstring tweaks.
7202 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7204 * sysdep.c (system_process_attributes): Improve comment.
7206 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7208 * keyboard.c: Export real-this-command to Elisp.
7209 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7210 and DEFVAR it. Update all users.
7212 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7214 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7216 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7217 Convert pctcpu and pctmem to Lisp float properly.
7218 Let the compiler fold better, as 100.0/0x8000 is exact.
7220 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7222 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7225 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7227 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7229 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7231 For a 'struct window', replace some Lisp_Object fields to
7232 bitfields where appropriate, remove unused fields.
7233 * window.h (struct window): Remove unused 'last_mark_x' and
7234 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7235 change it's type from Lisp_Object to bitfield.
7236 Change type of 'force_start', 'optional_new_start',
7237 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7238 fields from Lisp_Object to bitfield. Adjust users accordingly.
7240 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7242 Pacify gcc -Wdouble-precision when using Xaw.
7243 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7244 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7245 Use 'float' consistently, rather than 'float' in most places
7246 and 'double' in a couple of places.
7248 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7250 * xdisp.c (handle_stop): Detect whether we have overlay strings
7251 loaded by testing it->current.overlay_string_index to be
7252 non-negative, instead of checking whether n_overlay_strings is
7253 positive. (Bug#11587)
7255 2012-05-31 Chong Yidong <cyd@gnu.org>
7257 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7259 * doc.c (Fsubstitute_command_keys): Doc fix.
7261 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7263 * search.c (search_buffer): Remove calls to
7264 r_alloc_inhibit_buffer_relocation, as it is now called by
7265 maybe_unify_char, which was the cause of relocation of buffer text
7268 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7270 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7271 for the duration of call to load_charset, to avoid problems with
7272 callers of maybe_unify_char that access buffer text through C
7275 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7276 decrement the inhibition flag, instead of just setting or
7279 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7281 Remove obsolete '#define static' cruft.
7282 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7283 This #undef was "temporary" in 2000; it is no longer needed
7284 now that '#define static' has gone away.
7285 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7286 (gray_bitmap_bits): Remove; no longer needed.
7287 All uses replaced with definiens.
7288 * xterm.c: Include "bitmaps/gray.xbm".
7290 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7292 Clean up __executable_start, monstartup when --enable-profiling.
7293 The following changes affect the code only when profiling.
7294 * dispnew.c (__executable_start): Rename from safe_bcopy.
7295 Define only on platforms that need it.
7296 * emacs.c: Include <sys/gmon.h> when profiling.
7297 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7298 (__executable_start): Remove decl, since lisp.h does it now.
7299 (safe_bcopy): Remove decl; no longer has that name.
7300 (main): Coalesce #if into single bit of code, for simplicity.
7301 Cast pointers to uintptr_t, since standard libraries want integers
7303 * lisp.h (__executable_start): New decl.
7305 2012-05-31 Glenn Morris <rgm@gnu.org>
7307 * image.c (Fimagemagick_types): Doc fix.
7309 2012-05-30 Jim Meyering <meyering@redhat.com>
7311 * callproc.c (Fcall_process_region): Include directory component
7312 in mkstemp error message (Bug#11586).
7314 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7316 * alloc.c, lisp.h (make_pure_vector): Now static.
7318 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
7320 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
7321 Move to byte-run.el.
7322 (Fautoload): Do the hash-doc more carefully.
7323 * data.c (Fdefalias): Purify definition, except for keymaps.
7324 (Qdefun): Move from eval.c.
7325 * lisp.h (Qdefun): Remove.
7326 * lread.c (read1): Tiny simplification.
7328 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
7330 Do not create empty overlays with the evaporate property (Bug#9642).
7331 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
7332 Bug#9642, but explicitly check that the buffer the overlay would
7333 be moved to is live and rearrange lines to make sure that errors
7334 will not put the overlay in an inconsistent state.
7335 (Fdelete_overlay): Cosmetics.
7337 2012-05-28 Eli Zaretskii <eliz@gnu.org>
7339 * w32term.c (my_bring_window_to_top): New function.
7340 (x_raise_frame): Use handle returned by DeferWindowPos, which
7341 could be different from the original one.
7342 Call my_bring_window_to_top instead of my_set_foreground_window.
7345 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
7346 by calling BringWindowToTop.
7348 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
7349 (WM_EMACS_END): Increase by one.
7351 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
7353 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
7354 This avoids undefined behavior that might cause the eassert
7355 to not catch an out-of-range value.
7357 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
7359 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
7360 Update dependencies.
7362 2012-05-27 Eli Zaretskii <eliz@gnu.org>
7364 * bidi.c (bidi_mirror_char): Fix last change.
7366 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
7368 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
7369 when referring to sectname field in printf format.
7371 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
7373 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
7374 Only r_alloc_inhibit_buffer_relocation needed to be added;
7375 the others were already declared.
7377 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
7378 before checking whether it's out of range. Put the check inside
7380 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
7382 2012-05-27 Ken Brown <kbrown@cornell.edu>
7384 * callproc.c (Fcall_process): Restore a line that was accidentally
7385 commented out in the 2011-02-13 change (bug#11547).
7387 2012-05-27 Eli Zaretskii <eliz@gnu.org>
7389 * lisp.h [REL_ALLOC]: Add prototypes for external functions
7390 defined on ralloc.c.
7392 * buffer.c [REL_ALLOC]: Remove prototypes of
7393 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
7394 they are now on lisp.h.
7396 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
7398 * search.c (search_buffer): Use it to inhibit relocation of buffer
7399 text while re_search_2 is doing its job, because re_search_2 is
7400 passed C pointers to buffer text. (Bug#11519)
7402 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
7405 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
7406 state after an additional call to move_it_in_display_line_to, keep
7407 the values of it->max_ascent and it->max_descent found for the
7409 (pos_visible_p): Revert the comparison against bottom_y to what it
7410 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
7413 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7415 Fix coding-related core dumps with gcc -ftrapv.
7416 The code was computing A - B, where A and B are pointers, and B is
7417 random garbage. This can lead to core dumps on platforms that
7418 have special pointer registers, and it also leads to core dumps on
7419 x86-64 when compiled with gcc -ftrapv. The fix is to compute
7420 A - B only when B is initialized properly.
7421 * coding.c (coding_set_source, coding_set_destination): Return void.
7422 (coding_change_source, coding_change_destinations): New functions,
7423 with the old behaviors of coding_set_source and coding_set_destination.
7424 All callers that need an offset changed to use these new functions.
7426 2012-05-26 Glenn Morris <rgm@gnu.org>
7428 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
7430 2012-05-26 Eli Zaretskii <eliz@gnu.org>
7432 Extend mouse support on W32 text-mode console.
7433 * xdisp.c (draw_row_with_mouse_face):
7434 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
7436 * w32console.c: Include window.h.
7437 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
7439 (initialize_w32_display): Initialize mouse-highlight data.
7441 * w32inevt.c: Include termchar.h and window.h.
7442 (do_mouse_event): Support mouse-autoselect-window. When the mouse
7443 moves, call note_mouse_highlight. If help_echo changed, call
7444 gen_help_event to produce help-echo message in the echo area.
7445 Call clear_mouse_face if mouse_face_hidden is set in the mouse
7448 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7450 * lread.c (read1): Simplify slightly to avoid an overflow warning
7451 with GCC 4.7.0 on x86-64.
7453 2012-05-26 Eli Zaretskii <eliz@gnu.org>
7455 * bidi.c (bidi_mirror_char): Revert last change: an int is
7456 definitely wide enough here.
7458 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
7460 Fix integer width and related bugs (Bug#9874).
7461 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
7462 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
7463 (string_bytes, check_sblock, allocate_string_data):
7464 (compact_small_strings, Fmake_bool_vector, make_string)
7465 (make_unibyte_string, make_multibyte_string)
7466 (make_string_from_bytes, make_specified_string)
7467 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
7468 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
7470 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7471 (allocate_pseudovector):
7472 Use int, not EMACS_INT, where int is wide enough.
7473 (inhibit_garbage_collection, Fgarbage_collect):
7474 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7475 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
7476 int might not be wide enough.
7477 (bidi_cache_search, bidi_cache_find, bidi_init_it)
7478 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
7479 (bidi_at_paragraph_end, bidi_find_paragraph_start)
7480 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
7481 (bidi_level_of_next_char, bidi_move_to_visually_next):
7482 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7483 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
7484 (Fkill_buffer, Fset_buffer_major_mode)
7485 (advance_to_char_boundary, Fbuffer_swap_text)
7486 (Fset_buffer_multibyte, overlays_at, overlays_in)
7487 (overlay_touches_p, struct sortvec, record_overlay_string)
7488 (overlay_strings, recenter_overlay_lists)
7489 (adjust_overlays_for_insert, adjust_overlays_for_delete)
7490 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
7491 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
7492 (Foverlay_recenter, last_overlay_modification_hooks_used)
7493 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
7494 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7495 (validate_region): Omit unnecessary test for b <= e,
7496 since that's guaranteed by the previous test.
7497 (adjust_overlays_for_delete): Avoid pos + length overflow.
7498 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
7499 (report_overlay_modification):
7500 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7501 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
7502 Omit pointer cast, which isn't needed anyway, and doesn't work
7503 after the EMACS_INT -> ptrdiff_t change.
7504 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
7505 * buffer.h: Adjust decls to match defn changes elsewhere.
7506 (struct buffer_text, struct buffer):
7507 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7508 Use EMACS_INT, not int, where int might not be wide enough.
7509 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
7510 not int, to avoid needless 32-bit limit on 64-bit hosts.
7511 (exec_byte_code): Use tighter memory-full test, one that checks
7512 for alloca overflow. Don't compute the address of the object just
7513 before an array, as that's not portable. Use EMACS_INT, not
7514 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
7515 * callint.c (Fcall_interactively):
7516 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7517 * callproc.c (call_process_kill, Fcall_process):
7518 Don't assume pid_t fits into an Emacs fixnum.
7519 (call_process_cleanup, Fcall_process, child_setup):
7520 Don't assume pid_t fits into int.
7521 (call_process_cleanup, Fcall_process, delete_temp_file)
7522 (Fcall_process_region):
7523 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7524 (Fcall_process): Simplify handling of volatile integers.
7525 Use int, not EMACS_INT, where int will do.
7526 * casefiddle.c (casify_object, casify_region, operate_on_word)
7527 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
7528 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7529 (casify_object): Avoid integer overflow when overallocating buffer.
7530 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
7531 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
7532 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
7533 * category.h (CATEGORYP): Don't assume arg is nonnegative.
7534 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
7535 integers are now checked earlier. All uses replaced with XINT.
7537 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7538 For CCL_MapSingle, check that content and value are in int range.
7539 (ccl_driver, Fregister_code_conversion_map):
7540 Check that Vcode_version_map_vector is a vector.
7541 (resolve_symbol_ccl_program): Check that vector header is in range.
7542 Always copy the vector, so that we can check its contents reliably
7543 now rather than having to recheck each instruction as it's being
7544 executed. Check that vector words fit in 'int'.
7545 (ccl_get_compiled_code, Fregister_ccl_program)
7546 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
7547 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
7548 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
7549 contents are in range.
7550 (Fccl_execute_on_string): Check that status is in range.
7551 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
7552 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
7553 Accept and return EMACS_INT, not int, because callers can pass values
7555 (c_string_width, strwidth, lisp_string_width, chars_in_text)
7556 (multibyte_chars_in_text, parse_str_as_multibyte)
7557 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
7558 (str_as_unibyte, str_to_unibyte, string_count_byte8)
7559 (string_escape_byte8, Fget_byte):
7560 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7561 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
7562 avoid mishandling large integers.
7563 * character.h: Adjust decls to match defn changes elsewhere.
7564 * charset.c (load_charset_map_from_file, find_charsets_in_text)
7565 (Ffind_charset_region):
7566 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7567 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
7568 (load_charset_map_from_vector, Fdefine_charset_internal):
7569 Don't assume fixnum fits in int.
7570 (load_charset_map_from_vector, Fmap_charset_chars):
7571 Remove now-unnecessary CHECK_NATNUMs.
7572 (Fdefine_charset_internal): Check ranges here, more carefully.
7573 Don't rely on undefined behavior with signed left shift overflow.
7574 Don't assume unsigned int fits into fixnum, or that fixnum fits
7575 into unsigned int. Don't require max_code to be a valid fixnum;
7576 that's not true for gb10830 4-byte on a 32-bit host. Allow
7577 invalid_code to be a cons, for the same reason. Require code_offset
7578 to be a character. Avoid int overflow if max_char is close
7580 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
7581 this is intended anyway and avoids some undefined behavior.
7582 (load_charset_map): Pass unsigned, not int, as 2nd arg of
7583 INDEX_TO_CODE_POINT, as that's what it expects.
7584 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
7585 * charset.h (DECODE_CHAR): Return int, not unsigned;
7586 this is what was intended anyway, and it avoids undefined behavior.
7587 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
7588 integer-overflow issues.
7589 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
7590 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
7591 where the argument is EMACS_INT, and this behavior is not intended.
7592 * chartab.c (Fmake_char_table, Fset_char_table_range)
7593 (uniprop_get_decoder, uniprop_get_encoder):
7594 Don't assume fixnum fits in int.
7595 * cmds.c (move_point): New function, that does the gist of
7596 Fforward_char and Fbackward_char, but does so while checking
7597 for integer overflow more accurately.
7598 (Fforward_char, Fbackward_char): Use it.
7599 (Fforward_line, Fend_of_line, internal_self_insert)
7600 (internal_self_insert):
7601 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7602 Fix a FIXME, by checking for integer overflow when calculating
7603 target_clm and actual_clm.
7604 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
7605 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
7606 (ASSURE_DESTINATION, coding_alloc_by_realloc)
7607 (coding_alloc_by_making_gap, alloc_destination)
7608 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
7609 (encode_coding_utf_16, detect_coding_emacs_mule)
7610 (decode_coding_emacs_mule, encode_coding_emacs_mule)
7611 (detect_coding_iso_2022, decode_coding_iso_2022)
7612 (encode_invocation_designation, encode_designation_at_bol)
7613 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
7614 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
7615 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
7616 (encode_coding_ccl, encode_coding_raw_text)
7617 (detect_coding_charset, decode_coding_charset)
7618 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
7619 (produce_composition, produce_charset, produce_annotation)
7620 (decode_coding, handle_composition_annotation)
7621 (handle_charset_annotation, consume_chars, decode_coding_gap)
7622 (decode_coding_object, encode_coding_object, detect_coding_system)
7623 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
7624 (code_convert_region, code_convert_string)
7625 (Fdefine_coding_system_internal)
7626 (coding_set_source, coding_set_destination):
7627 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7628 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
7629 (Fdefine_coding_system_internal):
7630 Don't assume fixnums fit in int.
7631 (decode_coding_gap, decode_coding_object, encode_coding_object)
7632 (Fread_coding_system, Fdetect_coding_region)
7633 (Funencodable_char_position, Fcheck_coding_systems_region)
7634 (get_translation, handle_composition_annotation, consume_chars):
7635 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7636 (consume_chars): Rewrite to not calculate an address outside buffer.
7637 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7638 Don't access memory outside of the args array.
7639 (Fdefine_coding_system_internal): Check for charset-id overflow.
7640 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
7641 result of ENCODE_CHAR.
7642 * coding.h: Adjust decls to match defn changes elsewhere.
7643 (struct coding_system):
7644 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7645 * composite.c (get_composition_id, find_composition)
7646 (run_composition_function, update_compositions)
7647 (compose_text, composition_gstring_put_cache)
7648 (composition_gstring_p, composition_gstring_width)
7649 (fill_gstring_header, fill_gstring_body, autocmp_chars)
7650 (composition_compute_stop_pos, composition_reseat_it)
7651 (composition_update_it, struct position_record)
7652 (find_automatic_composition, composition_adjust_point)
7653 (Fcomposition_get_gstring, Ffind_composition_internal):
7654 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7655 (update_compositions):
7656 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7657 * composite.h: Adjust decls to match defn changes elsewhere.
7658 (struct composition):
7659 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7660 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
7661 Do not attempt to compute the address of the object just before a
7662 buffer; this is not portable.
7664 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7665 (Faset): Use int, not EMACS_INT, where int is wide enough.
7666 (Fstring_to_number): Don't assume fixnums fit in int.
7667 (Frem): Don't assume arg is nonnegative.
7668 * dbusbind.c (xd_append_arg): Check for integers out of range.
7669 (Fdbus_call_method): Don't overflow the timeout int.
7670 (extract_signed, extract_unsigned): New functions.
7671 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
7672 (xd_get_connection_references): Return ptrdiff_t, not int.
7674 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
7675 (xd_read_message_1):
7676 Use int, not unsigned, where the dbus API uses int.
7677 (Fdbus_message_internal): Don't overflow mtype.
7678 (syms_of_dbusbind): Allocate right-sized buffer for integers.
7679 * dired.c (directory_files_internal, file_name_completion, scmp)
7680 (file_name_completion_stat):
7681 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7682 (file_name_completion): Don't overflow matchcount.
7683 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
7684 * dispextern.h: Adjust decls to match defn changes elsewhere.
7685 (struct text_pos, struct glyph, struct bidi_saved_info)
7686 (struct bidi_string_data, struct bidi_it, struct composition_it)
7688 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7689 (struct display_pos, struct composition_it, struct it):
7690 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7691 * dispnew.c (increment_matrix_positions)
7692 (increment_row_positions, mode_line_string)
7693 (marginal_area_string):
7694 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7695 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
7696 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7697 (duration_to_sec_usec): New function, to check for overflow better.
7698 (Fsleep_for, sit_for): Use it.
7699 * doc.c (get_doc_string, store_function_docstring):
7700 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7701 (get_doc_string, Fsnarf_documentation):
7702 Use int, not EMACS_INT, where int is wide enough.
7704 Use SAFE_ALLOCA, not alloca.
7705 Check for overflow when converting EMACS_INT to off_t.
7706 * doprnt.c (doprnt):
7707 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7708 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
7709 Don't assume uid_t fits into fixnum.
7710 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
7711 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
7712 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
7713 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
7714 (general_insert_function)
7715 (Finsert_char, make_buffer_string, make_buffer_string_both)
7716 (update_buffer_properties, Fbuffer_substring)
7717 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
7718 (Fsubst_char_in_region, check_translation)
7719 (Ftranslate_region_internal, save_restriction_restore, Fformat)
7720 (transpose_markers, Ftranspose_regions):
7721 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7722 (clip_to_bounds): Move to lisp.h as an inline function).
7723 (Fconstrain_to_field): Don't assume integers are nonnegative.
7724 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
7725 (Fsubst_char_in_region, Fsave_restriction):
7726 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7727 (Femacs_pid): Don't assume pid_t fits into fixnum.
7728 (lo_time): Use int, not EMACS_INT, when int suffices.
7729 (lisp_time_argument): Check for usec out of range.
7730 (Fencode_time): Don't assume fixnum fits in int.
7731 (Fuser_login_name, Fuser_full_name): Signal an error
7732 if a uid argument is out of range, rather than relying on
7734 (Fformat_time_string): Remove now-unnecessary check.
7735 lisp_time_argument checks for out-of-range usec now.
7736 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
7737 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
7738 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
7739 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
7740 (init_cmdargs, Fdump_emacs):
7741 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7742 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
7743 the bottom (typically) 32 bits of the fixnum.
7744 * eval.c (specpdl_size, call_debugger):
7745 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7746 (when_entered_debugger, Fbacktrace_debug):
7747 Don't assume fixnum can fit in int.
7748 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
7749 the object just before a buffer; this is not portable.
7750 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
7751 (grow_specpdl, unbind_to):
7752 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7753 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
7754 (grow_specpdl): Simplify allocation by using xpalloc.
7755 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
7756 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
7757 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
7758 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7759 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
7761 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7762 (Fcopy_file, non_regular_nbytes, read_non_regular)
7763 (Finsert_file_contents):
7764 Use int, not EMACS_INT, where int is wide enough.
7765 (READ_BUF_SIZE): Verify that it fits in int.
7766 (Finsert_file_contents): Check that counts are in proper range,
7767 rather than assuming fixnums fit into ptrdiff_t etc.
7768 Don't assume fixnums fit into int.
7769 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
7770 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
7771 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
7772 (string_char_to_byte, string_byte_to_char)
7773 (string_make_multibyte, string_to_multibyte)
7774 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
7775 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
7776 (substring_both, Fdelete, internal_equal, Ffillarray)
7777 (Fclear_string, mapcar1)
7778 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
7779 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
7780 (larger_vector, make_hash_table, maybe_resize_hash_table)
7781 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
7782 (Fmaphash, secure_hash):
7783 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7784 (concat): Check for string index and length overflow.
7785 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
7787 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7788 (larger_vector): New API (vec, incr_min, size_max) replaces old
7789 one (vec, new_size, init). This catches size overflow.
7790 INIT was removed because it was always Qnil.
7791 All callers changed.
7792 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
7793 the upper bound on a hash table index size.
7794 (make_hash_table, maybe_resize_hash_table): Use it.
7795 (secure_hash): Computer start_byte and end_byte only after
7796 they're known to be in ptrdiff_t range.
7797 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
7798 (Ffont_get_glyphs, Ffont_at):
7799 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7800 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
7801 (Flist_fonts, Fopen_font):
7802 Don't assume fixnum can fit in int.
7803 (check_gstring): Don't assume index can fit in int.
7804 (font_match_p): Check that fixnum is a character, not a nonnegative
7805 fixnum, since the later code needs to stuff it into an int.
7806 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
7807 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
7808 conversion overflow issues.
7809 (Fopen_font): Check for integer out of range.
7810 (Ffont_get_glyphs): Don't assume index can fit in int.
7811 * font.h: Adjust decls to match defn changes elsewhere.
7812 * fontset.c (reorder_font_vector): Redo score calculation to avoid
7814 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
7815 printmax_t, where ptrdiff_t is wide enough.
7816 (Finternal_char_font):
7817 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7818 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
7819 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
7820 (Fset_frame_position, x_set_frame_parameters)
7821 (x_set_line_spacing, x_set_border_width)
7822 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
7823 Check that fixnums are in proper range for system types.
7824 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
7825 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7826 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
7827 Use SAFE_ALLOCA_LISP, not alloca.
7828 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
7829 intptr_t is wide enough.
7830 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
7831 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
7832 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
7833 Check for fixnum out of range.
7834 * ftfont.c (ftfont_list): Don't assume index fits in int.
7835 Check that fixnums are in proper range for system types.
7836 (ftfont_shape_by_flt):
7837 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7838 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
7839 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7840 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
7841 Check that fixnums are in proper range for system types.
7842 * gnutls.h: Adjust decls to match defn changes elsewhere.
7843 * gtkutil.c (xg_dialog_run):
7844 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7845 (update_frame_tool_bar):
7846 Check that fixnums are in proper range for system types.
7847 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
7848 (lookup_image): Check that fixnums are in range for system types.
7849 * indent.c (last_known_column, last_known_column_point):
7850 (current_column_bol_cache):
7851 (skip_invisible, current_column, check_display_width):
7852 (check_display_width, scan_for_column, current_column_1)
7853 (Findent_to, Fcurrent_indentation, position_indentation)
7854 (indented_beyond_p, Fmove_to_column, compute_motion):
7855 (Fcompute_motion, Fvertical_motion):
7856 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7857 (last_known_column_modified): Use EMACS_INT, not int.
7858 (check_display_width):
7860 Check that fixnums and floats are in proper range for system types.
7861 (compute_motion): Don't assume index or fixnum fits in int.
7862 (compute_motion, Fcompute_motion):
7863 Use int, not EMACS_INT, when it is wide enough.
7864 (vmotion): Omit local var start_hpos that is always 0; that way
7865 we don't need to worry about overflow in expressions involving it.
7866 * indent.h: Adjust decls to match defn changes elsewhere.
7868 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7869 Use int, not EMACS_INT, where int is wide enough.
7870 Remove unused members ovstring_chars_done and tab_offset;
7872 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
7873 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
7874 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
7875 (make_gap, copy_text, insert, insert_and_inherit)
7876 (insert_before_markers, insert_before_markers_and_inherit)
7877 (insert_1, count_combining_before, count_combining_after)
7878 (insert_1_both, insert_from_string)
7879 (insert_from_string_before_markers, insert_from_string_1)
7880 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
7881 (adjust_after_replace, adjust_after_insert, replace_range)
7882 (replace_range_2, del_range, del_range_1, del_range_byte)
7883 (del_range_both, del_range_2, modify_region)
7884 (prepare_to_modify_buffer, signal_before_change)
7885 (signal_after_change, Fcombine_after_change_execute):
7886 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7887 * intervals.c (traverse_intervals, rotate_right, rotate_left)
7888 (balance_an_interval, split_interval_right, split_interval_left)
7889 (find_interval, next_interval, update_interval)
7890 (adjust_intervals_for_insertion, delete_node, delete_interval)
7891 (interval_deletion_adjustment, adjust_intervals_for_deletion)
7892 (static_offset_intervals, offset_intervals)
7893 (merge_interval_right, merge_interval_left, make_new_interval)
7894 (graft_intervals_into_buffer, temp_set_point_both)
7895 (temp_set_point, set_point, adjust_for_invis_intang)
7896 (set_point_both, move_if_not_intangible, get_property_and_range)
7897 (get_local_map, copy_intervals, copy_intervals_to_string)
7898 (compare_string_intervals, set_intervals_multibyte_1):
7899 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7900 * intervals.h: Adjust decls to match defn changes elsewhere.
7902 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7903 * keyboard.c (this_command_key_count, this_single_command_key_start)
7904 (before_command_key_count, before_command_echo_length, echo_now)
7905 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
7906 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
7907 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
7908 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
7909 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7910 (last_non_minibuf_size, last_point_position, echo_truncate)
7911 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
7912 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
7913 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
7914 (stuff_buffered_input):
7915 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7916 (last_auto_save, command_loop_1, read_char):
7917 Use EMACS_INT, not int, to avoid integer overflow.
7918 (record_char): Avoid overflow in total_keys computation.
7919 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
7920 * keyboard.h: Adjust decls to match defn changes elsewhere.
7921 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
7922 (Fkey_description, Fdescribe_vector, Flookup_key):
7923 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7924 (click_position): New function, to check that positions are in range.
7925 (Fcurrent_active_maps):
7927 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7928 (Faccessible_keymaps, Fkey_description):
7929 (preferred_sequence_p):
7930 Don't assume fixnum can fit into int.
7931 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
7932 Check for integer overflow in size calculations.
7933 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
7934 avoid mishandling large integers.
7935 * lisp.h: Adjust decls to match defn changes elsewhere.
7936 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
7937 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
7938 (struct Lisp_Marker):
7939 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7940 (clip_to_bounds): Now an inline function, moved here from editfns.c.
7941 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
7942 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
7943 All callers changed.
7944 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
7945 Assume the arg has valid form, since it always does.
7946 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
7947 unsigned integer system type.
7948 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
7949 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
7950 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7951 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
7952 (duration_to_sec_usec): New decl.
7953 * lread.c (read_from_string_index, read_from_string_index_byte)
7954 (read_from_string_limit, readchar, unreadchar, openp)
7955 (read_internal_start, read1, oblookup):
7956 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7957 (Fload, readevalloop, Feval_buffer, Feval_region):
7958 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7959 (openp): Check for out-of-range argument to 'access'.
7960 (read1): Use int, not EMACS_INT, where int is wide enough.
7961 Don't assume fixnum fits into int.
7962 Fix off-by-one error that can read outside a buffer.
7963 (read_filtered_event): Use duration_to_sec_usec
7964 to do proper overflow checking on durations.
7965 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
7966 in size calculation.
7967 (Fexecute_kbd_macro):
7968 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7969 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
7970 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
7971 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
7972 (set_marker_both, set_marker_restricted_both, marker_position)
7973 (marker_byte_position, Fbuffer_has_markers_at):
7974 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7975 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
7976 * menu.c (ensure_menu_items): Rename from grow_menu_items.
7977 It now merely ensures that the menu is large enough, without
7978 necessarily growing it, as this avoids some integer overflow issues.
7979 All callers changed.
7980 (keymap_panes, parse_single_submenu, Fx_popup_menu):
7981 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7982 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
7983 Use SAFE_ALLOCA_LISP, not alloca.
7984 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
7985 to EMACS_INT. Check that fixnums are in proper range for system types.
7986 * minibuf.c (minibuf_prompt_width, string_to_object)
7987 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
7988 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
7989 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7990 (get_minibuffer, read_minibuf_unwind):
7991 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7992 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
7993 this simplifies overflow checking. All callers changed.
7994 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
7996 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7997 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
7998 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
7999 Check that fixnums are in proper range for system types.
8000 (Fx_create_frame, Fx_show_tip):
8001 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8002 * nsfont.m (ns_findfonts, nsfont_list_family):
8003 Don't assume fixnum fits in long.
8004 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8005 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8006 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8008 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8009 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8010 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8011 (PRINTDECLARE, PRINTPREPARE):
8012 (strout, print_string):
8013 (print, print_preprocess, print_check_string_charset_prop)
8015 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8017 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8018 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8019 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8020 (printchar, strout): Use xpalloc to catch size calculation overflow.
8021 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8022 (print_error_message): Use SAFE_ALLOCA, not alloca.
8023 (print_object): Use int, not EMACS_INT, where int is wide enough.
8024 (print_depth, new_backquote_output, print_number_index):
8025 Use ptrdiff_t, not int, where int might not be wide enough.
8026 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8027 (Fset_process_window_size, Fformat_network_address)
8028 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8030 Check that fixnums are in proper range for system types.
8031 (Fsignal_process): Simplify by avoiding a goto.
8032 Check for process-ids out of pid_t range rather than relying on
8034 (process_tick, update_tick): Use EMACS_INT, not int.
8035 (Fformat_network_address, read_process_output, send_process)
8036 (Fprocess_send_region, status_notify):
8037 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8038 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8039 (wait_reading_process_output, read_process_output, exec_sentinel):
8040 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8041 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8042 (Faccept_process_output): Use duration_to_sec_usec to do proper
8043 overflow checking on durations.
8044 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8045 Don't assume pid_t fits in int.
8046 * process.h (struct Lisp_Process): Members tick and update_tick
8047 are now of type EMACS_INT, not int.
8048 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8049 configured --with-wide-int.
8050 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8051 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8052 * search.c (looking_at_1, string_match_1):
8053 (fast_string_match, fast_c_string_match_ignore_case)
8054 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8055 (scan_newline, find_before_next_newline, search_command)
8056 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8057 (set_search_regs, wordify):
8060 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8061 (string_match_1, search_buffer, set_search_regs):
8063 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8064 (wordify): Check for overflow in size calculation.
8065 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8066 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8067 Check that fixnums are in proper range for system types.
8068 * sound.c (struct sound_device)
8069 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8070 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8071 (Fplay_sound_internal):
8072 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8073 * syntax.c (struct lisp_parse_state, find_start_modiff)
8074 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8075 (Fparse_partial_sexp):
8076 Don't assume fixnums can fit in int.
8077 (struct lisp_parse_state, find_start_pos, find_start_value)
8078 (find_start_value_byte, find_start_begv)
8079 (update_syntax_table, char_quoted, dec_bytepos)
8080 (find_defun_start, prev_char_comend_first, back_comment):
8081 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8082 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8083 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8084 (Finternal_describe_syntax_value): Check that match_lisp is a
8085 character, not an integer, since the code stuffs it into int.
8086 (scan_words, scan_sexps_forward):
8087 Check that fixnums are in proper range for system types.
8089 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8090 (scan_sexps_forward):
8091 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8092 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8093 * syntax.h: Adjust decls to match defn changes elsewhere.
8094 (struct gl_state_s):
8095 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8096 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8097 MOST_POSITIVE_FIXNUM.
8098 * sysdep.c (wait_for_termination_1, wait_for_termination)
8099 (interruptible_wait_for_termination, mkdir):
8100 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8101 (emacs_read, emacs_write):
8102 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8103 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8104 and double all fit in int.
8105 * term.c (set_tty_color_mode):
8106 Check that fixnums are in proper range for system types.
8107 * termhooks.h (struct input_event):
8108 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8109 * textprop.c (validate_interval_range, interval_of)
8110 (Fadd_text_properties, set_text_properties_1)
8111 (Fremove_text_properties, Fremove_list_of_text_properties)
8112 (Ftext_property_any, Ftext_property_not_all)
8113 (copy_text_properties, text_property_list, extend_property_ranges)
8114 (verify_interval_modification):
8115 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8116 (Fnext_single_char_property_change)
8117 (Fprevious_single_char_property_change):
8118 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8119 (copy_text_properties):
8120 Check for integer overflow in index calculation.
8121 * undo.c (last_boundary_position, record_point, record_insert)
8122 (record_delete, record_marker_adjustment, record_change)
8123 (record_property_change):
8124 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8125 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8126 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8127 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8128 (Fx_hide_tip, Fx_file_dialog):
8129 * w32menu.c (set_frame_menubar):
8130 Use ptrdiff_t, not int, for consistency with rest of code.
8131 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8132 (select_window, Fdelete_other_windows_internal)
8133 (window_scroll_pixel_based, window_scroll_line_based)
8134 (Frecenter, Fset_window_configuration):
8135 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8136 (Fset_window_hscroll, run_window_configuration_change_hook)
8137 (set_window_buffer, temp_output_buffer_show, scroll_command)
8138 (Fscroll_other_window, Frecenter):
8139 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8140 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8141 Don't assume fixnum fits in int.
8142 (Fset_window_scroll_bars):
8143 Check that fixnums are in proper range for system types.
8144 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8145 (string_pos, c_string_pos, number_of_chars, init_iterator)
8146 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8147 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8148 (compute_display_string_end, handle_face_prop)
8149 (face_before_or_after_it_pos, handle_invisible_prop)
8150 (handle_display_prop, handle_display_spec, handle_single_display_spec)
8151 (display_prop_intangible_p, string_buffer_position_lim)
8152 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8153 (get_overlay_strings_1, get_overlay_strings)
8154 (iterate_out_of_display_property, forward_to_next_line_start)
8155 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8156 (get_next_display_element, set_iterator_to_next)
8157 (get_visually_first_element, compute_stop_pos_backwards)
8158 (handle_stop_backwards, next_element_from_buffer)
8159 (move_it_in_display_line_to, move_it_in_display_line)
8160 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8161 (add_to_log, message_dolog, message_log_check_duplicate)
8162 (message2, message2_nolog, message3, message3_nolog
8163 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8164 (current_message_1, truncate_echo_area, truncate_message_1)
8165 (set_message, set_message_1, store_mode_line_noprop)
8166 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8167 (text_outside_line_unchanged_p, check_point_in_composition)
8168 (reconsider_clip_changes)
8169 (redisplay_internal, set_cursor_from_row, try_scrolling)
8170 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8171 (redisplay_window, find_last_unchanged_at_beg_row)
8172 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8173 (trailing_whitespace_p, find_row_edges, display_line)
8174 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8175 (display_mode_element, store_mode_line_string)
8176 (pint2str, pint2hrstr, decode_mode_spec)
8177 (display_count_lines, display_string, draw_glyphs)
8178 (x_produce_glyphs, x_insert_glyphs)
8179 (rows_from_pos_range, mouse_face_from_buffer_pos)
8180 (fast_find_string_pos, mouse_face_from_string_pos)
8181 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8182 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8183 (safe_call, init_from_display_pos, handle_fontified_prop)
8184 (handle_single_display_spec, load_overlay_strings)
8185 (with_echo_area_buffer, setup_echo_area_for_printing)
8186 (display_echo_area, echo_area_display)
8187 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8188 (update_tool_bar, hscroll_window_tree, redisplay_internal)
8189 (redisplay_window, dump_glyph_row, display_mode_line)
8190 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
8191 (handle_display_spec, display_prop_string_p):
8192 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8193 (handle_single_display_spec, build_desired_tool_bar_string)
8194 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8195 (get_specified_cursor_type):
8196 Check that fixnums are in proper range for system types.
8197 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8198 (Flookup_image_map):
8199 Don't assume fixnums fit in int.
8200 (compare_overlay_entries):
8201 Avoid mishandling comparisons due to subtraction overflow.
8202 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8203 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8204 (handle_tool_bar_click):
8205 Use int, not unsigned, since we prefer signed and the signedness
8206 doesn't matter here.
8207 (get_next_display_element, next_element_from_display_vector):
8208 Use int, not EMACS_INT, when int is wide enough.
8209 (start_hourglass): Use duration_to_sec_usec to do proper
8210 overflow checking on durations.
8211 * xfaces.c (Fbitmap_spec_p):
8212 Check that fixnums are in proper range for system types.
8213 (compare_fonts_by_sort_order):
8214 Avoid mishandling comparisons due to subtraction overflow.
8215 (Fx_family_fonts, realize_basic_faces):
8216 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8218 Don't assume fixnum fits in int.
8219 Use SAFE_ALLOCA_LISP, not alloca.
8220 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8221 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8222 (face_at_buffer_position, face_for_overlay_string)
8223 (face_at_string_position):
8224 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8225 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8226 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8228 Check that fixnums are in proper range for system types.
8229 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8230 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8231 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8232 (Fx_change_window_property): Don't assume fixnums fit in int.
8233 * xfont.c (xfont_chars_supported):
8234 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8235 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8236 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8237 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8238 * xml.c (parse_region):
8239 * xrdb.c (magic_file_p):
8240 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8241 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8242 (x_get_local_selection, x_reply_selection_request)
8243 (x_handle_selection_request, wait_for_property_change):
8244 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8245 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8246 short is wide enough.
8247 (x_send_client_event): Don't assume fixnum fits in int.
8248 * xterm.c (x_x_to_emacs_modifiers):
8249 Don't assume EMACS_INT overflows nicely into int.
8250 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8252 (handle_one_xevent): NATNUMP can eval its arg twice.
8253 (x_connection_closed):
8254 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8255 * xterm.h: Adjust decls to match defn changes elsewhere.
8256 (struct scroll_bar): Use struct vectorlike_header
8257 rather than rolling our own approximation.
8258 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8260 2012-05-25 Glenn Morris <rgm@gnu.org>
8262 * lisp.mk (lisp): Update for more files being compiled now.
8264 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8266 * lread.c: Remove `read_pure' which makes no difference.
8267 (read_pure): Remove var.
8268 (unreadpure): Remove function.
8269 (readevalloop): Don't call read_list with -1 flag.
8270 (read1, read_vector): Don't test read_pure any more.
8271 (read_list): Simplify.
8273 * fileio.c, character.h: Minor style tweaks.
8275 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8277 * window.h (clip_changed): Remove useless declaration.
8279 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
8281 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8282 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8284 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8287 This directory predates autoconf and is no longer needed nowadays.
8288 Move its few remaining bits of functionality to where they're needed.
8289 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8290 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8291 * m/template.h: Remove.
8292 * Makefile.in (M_FILE): Remove. All uses removed.
8293 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8294 * lisp.h (USE_LSB_TAG):
8295 * mem-limits.h (EXCEEDS_LISP_PTR):
8296 Use VAL_MAX, not VALBITS, in #if.
8297 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8298 (EMACS_UINT): Define unconditionally now.
8299 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8300 (BITS_PER_EMACS_INT): New constants, replacing
8301 what used to be in config.h, but not useful in #if.
8302 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8303 define them any more.
8304 (VAL_MAX): New macro.
8306 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8307 BITS_PER_EMACS_INT, in #if.
8308 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8309 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8310 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8311 * s/ms-w32.h (DATA_START):
8312 Move here from removed file m/intel386.h.
8313 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8314 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8316 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8318 Assume C89 or later.
8319 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
8320 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
8322 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
8323 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
8324 * textprop.c, tparam.c (NULL): Remove.
8325 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
8326 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
8327 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
8328 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
8329 * xterm.c (input_signal_count): Assume volatile works.
8331 2012-05-21 Ken Brown <kbrown@cornell.edu>
8333 * xgselect.c (xg_select): Fix first argument in call to 'select'
8336 2012-05-20 Ken Brown <kbrown@cornell.edu>
8338 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
8339 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
8341 2012-05-19 Ken Brown <kbrown@cornell.edu>
8343 * xfns.c (x_in_use): Remove `static' qualifier.
8344 * xterm.h (x_in_use): Declare.
8345 * xgselect.c: Include xterm.h.
8346 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
8347 and `display_arg' (bug#9754).
8349 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
8351 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
8353 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
8354 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
8356 2012-05-18 Eli Zaretskii <eliz@gnu.org>
8358 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
8360 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
8361 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
8363 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
8364 reference to image_cache->refcount.
8365 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
8367 2012-05-17 Juri Linkov <juri@jurta.org>
8369 * search.c (Fword_search_regexp, Fword_search_backward)
8370 (Fword_search_forward, Fword_search_backward_lax)
8371 (Fword_search_forward_lax): Move functions to isearch.el
8372 (bug#10145, bug#11381).
8374 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
8376 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
8378 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8380 * lread.c (init_obarray): Declare Qt and Qnil as special.
8382 2012-05-14 Glenn Morris <rgm@gnu.org>
8384 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
8385 Put "libexec" before "bin", for the sake of init_callproc_1.
8387 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8389 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
8391 * unexaix.c: Port to more-recent AIX compilers.
8392 (report_error, report_error_1, make_hdr, copy_sym)
8393 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
8394 Make arguments const char *, not char *, to avoid violations of C
8395 standard and to fix some AIX warnings reported by Gilles Pion.
8397 2012-05-14 Eli Zaretskii <eliz@gnu.org>
8399 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
8400 already have overlays loaded.
8401 (handle_single_display_spec): Before returning without displaying
8402 fringe bitmap, synchronize the bidi iterator with the main display
8403 iterator, by calling iterate_out_of_display_property.
8404 (iterate_out_of_display_property): Detect buffer iteration by
8405 testing that it->string is a Lisp string.
8406 (get_next_display_element): When the current object is exhausted,
8407 and there's something on it->stack, call set_iterator_to_next to
8408 proceed with what's on the stack, instead of returning zero.
8409 (set_iterator_to_next): If called at the end of a Lisp string,
8410 proceed to consider_string_end without incrementing string
8411 position. Don't increment display vector index past the end of
8412 the display vector. (Bug#11417)
8413 (pos_visible_p): Don't report a position visible when move_it_to
8414 stopped at the last line of window, which happens to be scanned
8415 backwards by the bidi iteration. (Bug#11464)
8417 2012-05-14 Eli Zaretskii <eliz@gnu.org>
8419 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
8420 and right-margin display specs even if the spec is invalid or we
8421 are on a TTY, and thus unable to display on the fringes.
8422 That's because the text with the property will not be displayed anyway,
8423 so we need to signal to the caller that this is a "replacing"
8424 display spec. This fixes display when the spec is invalid or we
8427 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8429 * unexaix.c (make_hdr): Fix typo in prototype.
8430 This bug broke the build on AIX. Problem reported by Gilles Pion.
8432 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
8434 * keyboard.c (kbd_buffer_get_event): Read special events also in
8435 batch mode. (Bug#11415)
8437 2012-05-12 Glenn Morris <rgm@gnu.org>
8439 * ns.mk: Update for ns_appbindir no longer having trailing "/".
8441 2012-05-12 Eli Zaretskii <eliz@gnu.org>
8443 * lisp.mk (lisp): Add newcomment.elc.
8445 2012-05-12 Glenn Morris <rgm@gnu.org>
8447 * Makefile.in (MKDIR_P): New, set by configure.
8448 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
8450 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
8452 Remove unused function hourglass_started.
8453 * dispextern.h (hourglass_started):
8454 * w32fns.c (hourglass_started):
8455 * xdisp.c (hourglass_started): Remove.
8457 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
8459 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
8460 Update dependencies.
8462 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
8464 * xgselect.c (xg_select): Put maxfds+1 into a var.
8465 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
8467 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
8469 2012-05-10 Dave Abrahams <dave@boostpro.com>
8471 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
8472 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
8474 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
8476 * dbusbind.c (xd_registered_buses): New internal Lisp object.
8477 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
8478 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
8479 Initialize xd_registered_buses.
8481 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
8483 Untag more efficiently if USE_LSB_TAG.
8484 This is based on a proposal by YAMAMOTO Mitsuharu in
8485 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
8486 For an admittedly artificial (nth 8000 longlist) benchmark on
8487 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
8488 Emacs's overall text size by 1%.
8489 * lisp.h (XUNTAG): New macro.
8490 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
8491 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
8492 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
8493 * eval.c (Fautoload):
8494 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
8495 * frame.h (XFRAME): Use XUNTAG.
8497 Port recent dbusbind.c changes to 32-bit --with-wide-int.
8498 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
8499 Remove unportable assumptions about print widths of types like
8501 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
8502 intptr_t when converting between pointer and integer, to avoid GCC
8503 warnings about wrong width.
8505 2012-05-09 Eli Zaretskii <eliz@gnu.org>
8507 * w32proc.c (new_child): Force Windows to reserve only 64KB of
8508 stack for each reader_thread, instead of defaulting to 8MB
8509 determined by the linker. This avoids failures in creating
8510 subprocesses on Windows 7, see the discussion in this thread:
8511 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
8513 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
8515 Fix up display of the *Minibuf-0* buffer in the mini window.
8516 * keyboard.c (read_char): Don't clear the echo area if there's no
8518 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
8519 contents of *Minibuf-0*) if there's no message displayed in its stead.
8521 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
8523 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
8526 2012-05-06 Chong Yidong <cyd@gnu.org>
8528 * lisp.mk (lisp): Update.
8530 2012-05-05 Jim Meyering <meyering@redhat.com>
8532 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
8534 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
8536 * data.c (PUT_ERROR): New macro.
8537 (syms_of_data): Use it. Add new error type `user-error'.
8538 * undo.c (user_error): New function.
8539 (Fprimitive_undo): Use it.
8540 * print.c (print_error_message): Adjust print style for `user-error'.
8541 * keyboard.c (user_error): New function.
8542 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
8544 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
8546 Do not limit current-time-string to years 1000..9999.
8547 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
8548 (Fcurrent_time_string): Support any year that is supported by the
8549 underlying localtime representation. Don't use asctime, as it
8550 has undefined behavior for years outside the range -999..9999.
8552 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
8554 Fix race conditions involving setenv, gmtime, localtime, asctime.
8555 Without this fix, interrupts could mess up code that uses these
8556 nonreentrant functions, since setting TZ invalidates existing
8557 tm_zone or tzname values, and since most of these functions return
8558 pointers to static storage.
8559 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
8560 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
8561 Grow the critical sections to include not just invoking
8562 localtime/gmtime, but also accessing these functions' results
8563 including their tm_zone values if any, and any related TZ setting.
8564 (format_time_string): Last arg is now struct tm *, not struct tm **,
8565 so that the struct tm is saved in the critical section.
8566 All callers changed. Simplify allocation of initial buffer, partly
8567 motivated by the fact that memory allocation needs to be outside
8568 the critical section.
8570 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
8572 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
8573 with RESET_INTERVAL.
8575 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
8576 Remove duplicated buffer name initialization.
8578 2012-05-02 Jim Meyering <jim@meyering.net>
8580 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
8582 * xfns.c (x_window): Use xstrdup (Bug#11375).
8584 2012-05-02 Eli Zaretskii <eliz@gnu.org>
8586 * xdisp.c (pos_visible_p): If already at a newline from the
8587 display string before the 'while' loop, don't walk back the glyphs
8588 from it3.glyph_row. Solves assertion violation when the display
8589 string begins with a newline (egg.el). (Bug#11367)
8591 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
8593 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
8596 2012-05-01 Glenn Morris <rgm@gnu.org>
8598 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
8599 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
8600 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
8601 All were removed before 23.1.
8603 * dispnew.c: Remove HAVE_LIBNCURSES test;
8604 it is always true on relevant platforms.
8606 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
8607 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
8609 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
8611 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
8613 * .gdbinit (xpr): Remove checks for no longer existing misc types.
8614 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
8617 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
8619 Do not avoid creating empty evaporating overlays (Bug#9642).
8620 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
8621 That is, do not delete an evaporating overlay if it becomes
8622 empty after its bounds are adjusted to fit within its buffer.
8623 This fix caused other problems, and I'm reverting it until we get
8624 to the bottom of them.
8626 2012-04-27 Chong Yidong <cyd@gnu.org>
8628 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
8630 2012-04-27 Eli Zaretskii <eliz@gnu.org>
8632 * xdisp.c (pos_visible_p): If the window start position is beyond
8633 ZV, start the display from buffer beginning. Prevents assertion
8634 violation in init_iterator when the minibuffer window is scrolled
8637 * window.c (window_scroll_pixel_based): Likewise.
8639 2012-04-27 Chong Yidong <cyd@gnu.org>
8641 * keymap.c (where_is_internal): Doc fix (Bug#10872).
8643 2012-04-27 Glenn Morris <rgm@gnu.org>
8645 * fileio.c (Fcopy_file, Fset_file_selinux_context):
8646 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
8648 2012-04-27 Eli Zaretskii <eliz@gnu.org>
8650 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
8651 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
8653 2012-04-26 Eli Zaretskii <eliz@gnu.org>
8655 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
8656 display element, check also the underlying string or buffer
8657 character. (Bug#11341)
8659 * w32menu.c: Include w32heap.h.
8660 (add_menu_item): If the call to AppendMenuW (via
8661 unicode_append_menu) fails, disable Unicode menus only if we are
8662 running on Windows 9X/Me.
8664 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
8666 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
8667 (xgetint): Add missing shift for LSB tags.
8669 2012-04-24 Martin Rudalics <rudalics@gmx.at>
8671 * keyboard.c (read_char): Don't wipe echo area for select window
8672 events: These might get delayed via `mouse-autoselect-window'
8675 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
8677 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
8678 manipulation of :loaded-from data.
8680 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
8682 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
8683 now a cons (bug#11311).
8685 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
8687 Do not create empty overlays with the evaporate property (Bug#9642).
8688 * buffer.c (Fmove_overlay): Delete an evaporating overlay
8689 if it becomes empty after its bounds are adjusted to fit within
8690 its buffer. Without this fix, in a nonempty buffer (let ((o
8691 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
8692 yields an empty overlay that has the evaporate property, which is
8693 not supposed to happen.
8695 Fix minor GTK3 problems found by static checking.
8696 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
8697 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
8698 (struct _EmacsFixedClass, emacs_fixed_get_type):
8699 Move decls here from emacsgtkfixed.h, since they needn't be public.
8700 (emacs_fixed_get_type): Now static.
8701 (emacs_fixed_class_init): Omit unused local.
8702 (emacs_fixed_child_type): Remove; unused.
8703 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
8704 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
8705 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
8706 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
8707 (EMACS_FIXED_GET_CLASS): Remove; unused.
8708 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
8710 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
8711 Problem reported by Juanma Barranquero for Windows -Wunused-function.
8713 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
8715 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
8716 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
8717 (__malloc_size_t, __malloc_ptrdiff_t):
8718 Remove. All uses removed, replaced by the definiens if needed,
8719 since we can assume C89 or better now.
8720 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
8721 (protect_malloc_state, align, get_contiguous_space)
8722 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
8723 (malloc_atfork_handler_child, malloc_enable_thread)
8724 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
8725 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
8726 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
8727 (special_realloc, _realloc_internal_nolock, _realloc_internal)
8728 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
8729 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
8730 Define using prototypes, not old style.
8731 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
8732 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
8733 (align): Don't assume that signed integer overflow wraps around.
8734 Omit unused local var.
8735 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
8736 (_free_internal_nolock, memalign, mallochook, reallochook):
8737 Omit no-longer-needed casts.
8738 (valloc): Use getpagesize, not __getpagesize.
8739 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
8740 (struct hdr): The 'magic' member is now size_t, not unsigned long.
8742 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
8744 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
8746 Move functions from C to Lisp. Make non-blocking method calls
8747 the default. Implement further D-Bus standard interfaces.
8749 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
8750 (QCdbus_request_name_allow_replacement)
8751 (QCdbus_request_name_replace_existing)
8752 (QCdbus_request_name_do_not_queue)
8753 (QCdbus_request_name_reply_primary_owner)
8754 (QCdbus_request_name_reply_in_queue)
8755 (QCdbus_request_name_reply_exists)
8756 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
8757 (QCdbus_registered_serial, QCdbus_registered_method)
8758 (QCdbus_registered_signal): New Lisp objects.
8759 (XD_DEBUG_MESSAGE): Use sizeof.
8760 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
8761 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
8762 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
8763 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
8764 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
8765 (xd_signature, xd_append_arg): Allow float for integer types.
8766 (xd_get_connection_references): New function.
8767 (xd_get_connection_address): Rename from xd_initialize.
8768 Return cached address.
8769 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
8770 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
8772 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
8773 Return number of refcounts.
8774 (Fdbus_get_unique_name): Make stronger parameter check.
8775 (Fdbus_message_internal): New defun.
8776 (Fdbus_call_method, Fdbus_call_method_asynchronously)
8777 (Fdbus_method_return_internal, Fdbus_method_error_internal)
8778 (Fdbus_send_signal, Fdbus_register_service)
8779 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
8780 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
8781 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
8782 (Vdbus_compiled_version, Vdbus_runtime_version)
8783 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
8784 (Vdbus_message_type_method_return, Vdbus_message_type_error)
8785 (Vdbus_message_type_signal): New defvars.
8786 (Vdbus_registered_buses, Vdbus_registered_objects_table):
8789 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
8791 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
8792 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
8793 Do not assume ptrdiff_t is the same width as 'int'.
8795 * alloc.c: Handle unusual debugging option combinations.
8796 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
8797 since the two debugging options are incompatible.
8798 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
8800 (mem_init, mem_insert, mem_insert_fixup):
8801 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
8802 (NEED_MEM_INSERT): Remove; no longer needed.
8804 2012-04-22 Leo Liu <sdl.web@gmail.com>
8806 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
8808 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
8810 * sysdep.c [__FreeBSD__]: Minor cleanups.
8811 (list_system_processes, system_process_attributes) [__FreeBSD__]:
8812 Use Emacs indenting style more consistently. Avoid some casts.
8813 Use 'double' consistently rather than mixing 'float' and 'double'.
8815 2012-04-21 Eduard Wiebe <usenet@pusto.de>
8817 * sysdep.c (list_system_processes, system_process_attributes):
8818 Add implementation for FreeBSD (Bug#5243).
8820 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
8822 * lisp.mk (lisp): Update.
8824 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
8826 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
8827 It is never used otherwise.
8829 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
8831 * print.c (print_preprocess): Only check print_depth if print-circle
8833 (print_object): Check for cycles even when print-circle is nil and
8834 print-gensym is t, but only check print_depth if print-circle is nil.
8836 2012-04-20 Chong Yidong <cyd@gnu.org>
8838 * process.c (wait_reading_process_output): If EIO occurs on a pty,
8839 set the status to "failed" and ensure that sentinel is run.
8841 2012-04-20 Glenn Morris <rgm@gnu.org>
8843 * process.c (Fset_process_inherit_coding_system_flag)
8844 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
8845 (Fmake_network_process, Fmake_serial_process): Doc fix.
8847 2012-04-20 Eli Zaretskii <eliz@gnu.org>
8849 * xdisp.c (string_buffer_position_lim): Limit starting position to
8851 (set_cursor_from_row): If called for a mode-line or header-line
8852 row, return zero immediately.
8853 (try_cursor_movement): If inside continuation line, don't back up
8854 farther than the first row after the header line, if any.
8855 Don't consider the header-line row as "partially visible", even if
8856 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
8858 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
8860 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
8863 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
8864 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
8866 configure: new option --enable-gcc-warnings (Bug#11207)
8867 * Makefile.in (C_WARNINGS_SWITCH): Remove.
8868 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
8869 (ALL_CFLAGS): Use new macros rather than old.
8870 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
8871 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
8872 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
8873 -Wunused-result, -Wunused-variable. This should go away once
8874 the Emacs and Gnulib regex code is merged.
8875 (xmalloc, xrealloc): Now static.
8877 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
8879 * dired.c (Fsystem_groups): Remove unused local.
8881 2012-04-17 Glenn Morris <rgm@gnu.org>
8883 * dired.c (Fsystem_users): Doc fix.
8885 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
8887 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
8888 (syms_of_dired): Add them.
8890 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
8892 Fix minor alloc.c problems found by static checking.
8893 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
8894 New extern decls, to avoid calling undeclared functions.
8895 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
8896 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
8897 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
8898 (NEED_MEM_INSERT): New macro.
8899 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
8900 Remove one incorrect comment and fix another.
8902 Fix minor ralloc.c problems found by static checking.
8903 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
8904 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
8905 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
8906 (r_alloc_sbrk): Now static.
8908 Improve ralloc.c interface checking.
8909 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
8910 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
8911 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
8912 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
8913 [REL_ALLOC]: ... to here, to check interface.
8914 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
8915 Remove decls. This fixes an "It stinks!".
8917 * alloc.c (which_symbols): Fix alignment issue / type clash.
8919 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
8921 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
8922 (struct Lisp_Misc_Any): Likewise.
8923 (struct Lisp_Free): Likewise.
8924 * alloc.c (union aligned_Lisp_Symbol): Define.
8925 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
8926 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
8927 (union aligned_Lisp_Misc): Define.
8928 (MARKER_BLOCK_SIZE, struct marker_block): Use union
8929 aligned_Lisp_Misc instead of union Lisp_Misc.
8930 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
8932 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
8934 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
8935 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
8936 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
8937 * s/netbsd.h, s/sol2-6.h:
8938 Remove definition of GC_MARK_STACK, since the default now works.
8939 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
8940 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
8941 no longer the default.
8942 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
8944 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
8946 * lread.c (lisp_file_lexically_bound_p):
8947 Fix hang at ";-*-\n" (bug#11238).
8949 2012-04-14 Eli Zaretskii <eliz@gnu.org>
8951 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
8952 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
8954 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
8956 * nsterm.m (constrainFrameRect): Always constrain when there is only
8957 one screen (Bug#10962).
8959 2012-04-13 Ken Brown <kbrown@cornell.edu>
8961 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
8963 2012-04-13 Reuben Thomas <rrt@sc3d.org>
8965 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
8967 2012-04-11 Daniel Colascione <dancol@dancol.org>
8969 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
8970 against is gone. It's better to use vfork now so that when Cygwin
8971 gains a new, working vfork, we use it automatically (bug#10398).
8973 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
8975 * window.c (save_window_save): Obey window-point-insertion-type.
8977 2012-04-11 Glenn Morris <rgm@gnu.org>
8979 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
8981 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
8983 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
8985 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
8987 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
8988 (force_quit_count): New var.
8989 (handle_interrupt): Use it.
8991 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
8993 * w32.c (w32_delayed_load): Record the full path of the library
8994 being loaded (bug#10424).
8996 2012-04-09 Glenn Morris <rgm@gnu.org>
8998 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
8999 not just in the obarray, before snarfing them. (Bug#11036)
9001 * Makefile.in ($(leimdir)/leim-list.el):
9002 Pass EMACS rather than BUILT_EMACS.
9004 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9006 * process.c (make_process):
9007 * process.h: Add integer `gnutls_handshakes_tried' member to
9010 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9011 Add convenience `GNUTLS_LOG2i' macro.
9013 * gnutls.c (gnutls_log_function2i): Convenience log function.
9014 (emacs_gnutls_read): Use new log functions,
9015 `gnutls_handshakes_tried' process member, and
9016 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9017 attempts per process (connection).
9019 2012-04-09 Chong Yidong <cyd@gnu.org>
9021 * eval.c (Fuser_variable_p, user_variable_p_eh)
9022 (lisp_indirect_variable): Functions deleted.
9023 (Fdefvar): Caller changed.
9025 * callint.c (Finteractive, Fcall_interactively):
9026 * minibuf.c (Fread_variable): Callers changed.
9028 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9030 * xdisp.c (set_cursor_from_row): If the display string appears in
9031 the buffer at position that is closer to point than the position
9032 after the display string, display the cursor on the first glyph of
9033 the display string. Fixes cursor display when a 'display' text
9034 property immediately follows invisible text. (Bug#11094)
9036 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9038 composite.c: use 'double' consistently
9039 * composite.c (get_composition_id): Use 'double' consistently
9040 instead of converting 'float' to 'double' and vice versa; this is
9041 easier to understand and avoids a GCC warning.
9043 2012-04-09 Glenn Morris <rgm@gnu.org>
9045 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9046 preparation for dumping it with emacs. (Bug#4789)
9047 (leimdir): New variable.
9048 ($(leimdir)/leim-list.el): New rule.
9049 (emacs$(EXEEXT)): Depend on leim-list.el.
9051 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9052 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9053 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9055 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9057 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9060 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9062 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9063 Remove unused local variable.
9065 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9067 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9068 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9069 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9070 objects, as mark_maybe_pointer will catch them otherwise.
9071 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9072 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9074 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9076 Fix typo that broke non-Windows builds.
9077 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9079 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9081 Support building on MS-Windows with libxml2.
9083 * makefile.w32-in (OBJ2): Add xml.$(O).
9084 (GLOBAL_SOURCES): Add xml.c.
9085 ($(BLD)/xml.$(O)): New dependency list.
9087 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9088 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9089 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9090 [!WINDOWSNT]: New macros.
9091 (init_libxml2_functions, libxml2_loaded_p): New functions.
9092 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9093 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9094 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9095 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9097 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9098 Call init_libxml2_functions before calling libxml2 functions.
9099 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9101 * emacs.c: Don't include libxml/parser.h.
9102 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9103 xmlCleanupParser directly.
9105 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9107 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9109 * indent.c (Fvertical_motion): If there is a display string at
9110 point, use it.vpos to compute how many lines to backtrack after
9111 move_it_to point. (Bug#11133)
9113 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9115 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9116 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9117 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9118 macros related to unification of CJK characters. For the details,
9119 see the discussion following the message here:
9120 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9122 2012-04-04 Chong Yidong <cyd@gnu.org>
9124 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9126 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9128 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9129 instead of alloca. (Bug#11138)
9131 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9133 * w32menu.c (is_simple_dialog): Properly check lisp types.
9136 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9138 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9139 position we get to after a call to move_it_to fails the
9140 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9141 only if we wind up in a string from display property. (Bug#11063)
9143 * window.c (Fdelete_other_windows_internal): Invalidate the row
9144 and column information about mouse highlight, so that redisplay
9145 restores it after reallocating the glyph matrices. (Bug#7464)
9147 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9148 string comes from a `display' text property, use the buffer
9149 position of that property as if we actually saw that position in
9151 (move_it_by_lines): Remove the assertion that
9152 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9153 violated when there's a before-string at the beginning of a line.
9156 2012-03-30 Eli Zaretskii <eliz@gnu.org>
9158 * xdisp.c (append_space_for_newline): If the default face was
9159 remapped, use the remapped face for the appended newline.
9160 (extend_face_to_end_of_line): Use the remapped default face for
9161 extending the face to the end of the line.
9162 (display_line): Call extend_face_to_end_of_line when the default
9163 face was remapped. (Bug#11068)
9165 2012-03-29 Eli Zaretskii <eliz@gnu.org>
9167 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9169 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9171 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9173 2012-03-27 Glenn Morris <rgm@gnu.org>
9175 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9178 2012-03-26 Kenichi Handa <handa@m17n.org>
9180 * dispextern.h (struct glyph): Fix previous change. Change the
9181 bit length of glyphless.ch to 25 (Bug#11082).
9183 2012-03-26 Chong Yidong <cyd@gnu.org>
9185 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9186 (command_loop_1): Use it; inhibit selection update for
9187 handle-select-window too (Bug#8996).
9189 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9191 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
9193 2012-03-25 Kenichi Handa <handa@m17n.org>
9195 * dispextern.h (struct glyph): Change the bit length of
9196 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9198 2012-03-24 Eli Zaretskii <eliz@gnu.org>
9200 * s/ms-w32.h (tzname): Include time.h before redirecting to
9201 _tzname. Fixes the MSVC build. (Bug#9960)
9203 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9205 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9208 * xterm.c (XTread_socket): Only modify handling_signal if
9209 !SYNC_INPUT. (Bug#11080)
9211 2012-03-23 Eli Zaretskii <eliz@gnu.org>
9213 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9214 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9215 when fetching a multibyte character consumes more bytes than
9216 CHAR_BYTES returns, due to unification of CJK characters in
9217 string_char. (Bug#11073)
9219 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9221 * process.c (wait_reading_process_output): Handle pty disconnect
9222 by refraining from sending oneself a SIGCHLD (bug#10933).
9224 2012-03-22 Chong Yidong <cyd@gnu.org>
9226 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9228 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9229 Mark string as coming from a prefix property.
9230 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9231 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9233 2012-03-21 Chong Yidong <cyd@gnu.org>
9235 * xfaces.c (Vface_remapping_alist): Doc fix.
9237 2012-03-20 Eli Zaretskii <eliz@gnu.org>
9239 * w32proc.c (Fw32_set_console_codepage)
9240 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9243 2012-03-20 Chong Yidong <cyd@gnu.org>
9245 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9246 to reflect default non-nil value of redisplay-dont-pause.
9248 2012-03-19 Kenichi Handa <handa@m17n.org>
9250 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9251 it fit in a valid range (Bug#11003).
9253 2012-03-18 Eli Zaretskii <eliz@gnu.org>
9255 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9256 that is not from display property, accept the row as a "cursor
9257 row" if one of the string's character has a non-nil `cursor'
9258 property. Fixes cursor positioning when there are newlines in
9259 overlay strings, e.g. in icomplete.el. (Bug#11035)
9261 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9263 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9265 2012-03-12 Chong Yidong <cyd@gnu.org>
9267 * eval.c (inhibit_lisp_code): Rename from
9268 inhibit_window_configuration_change_hook; move from window.c.
9270 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9271 * window.c (run_window_configuration_change_hook)
9272 (syms_of_window): Callers changed.
9274 2012-03-11 Chong Yidong <cyd@gnu.org>
9276 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9278 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9280 2012-03-10 Chong Yidong <cyd@gnu.org>
9282 * frame.c (other_visible_frames): Don't assume the selected frame
9283 is visible (Bug#10955).
9285 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9287 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9289 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9291 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9292 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9295 2012-03-03 Glenn Morris <rgm@gnu.org>
9297 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
9299 2012-03-02 Eli Zaretskii <eliz@gnu.org>
9301 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9302 position past the first glyph_row that ends at ZV. (Bug#10902)
9303 (redisplay_window, next_element_from_string): Fix typos in
9305 (redisplay_window): Pass to move_it_vertically the margin in
9306 pixels, not in screen lines.
9308 2012-03-02 Glenn Morris <rgm@gnu.org>
9310 * buffer.c (buffer-list-update-hook): Doc fix.
9312 2012-02-29 Eli Zaretskii <eliz@gnu.org>
9314 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9315 push_it before setting up the iterator for the first overlay
9316 string, even if we have an empty string loaded.
9317 (next_overlay_string): If there's an empty string on the iterator
9318 stack, pop the stack. (Bug#10903)
9320 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
9322 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
9323 Suggested by Stefan Monnier in
9324 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
9325 * alloc.c (widen_to_Lisp_Object): New static function.
9326 (mark_memory): Also mark Lisp_Objects by fetching pointer words
9327 and widening them to Lisp_Objects. This would work even if
9328 USE_LSB_TAG is defined and wide integers are used, which might
9329 happen in a future version of Emacs.
9331 2012-02-25 Chong Yidong <cyd@gnu.org>
9333 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
9336 * xselect.c (Fx_selection_exists_p): Doc fix.
9337 (x_clipboard_manager_save_all): Print an informative message
9338 before saving to clipboard manager.
9340 2012-02-24 Chong Yidong <cyd@gnu.org>
9342 * keyboard.c (process_special_events): Handle all X selection
9343 requests in kbd_buffer, not just the next one (Bug#8869).
9345 2012-02-23 Chong Yidong <cyd@gnu.org>
9347 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
9348 call when setting menu-bar-lines and tool-bar-lines parameters.
9349 (unwind_create_frame_1): New helper function.
9351 * window.c (inhibit_window_configuration_change_hook): New var.
9352 (run_window_configuration_change_hook): Obey it.
9353 (syms_of_window): Initialize it.
9355 2012-02-22 Chong Yidong <cyd@gnu.org>
9357 * xterm.c (x_draw_image_relief): Add missing type check for
9358 Vtool_bar_button_margin (Bug#10743).
9360 2012-02-21 Chong Yidong <cyd@gnu.org>
9362 * fileio.c (Vfile_name_handler_alist): Doc fix.
9364 * buffer.c (Fget_file_buffer): Protect against invalid file
9365 handler return value.
9367 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
9369 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
9370 when computing $valmask.
9372 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
9373 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
9374 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
9375 It's useless in that case, and it can cause problems on hosts
9376 that allocate halves of EMACS_INT values separately.
9377 Reported by Dan Horák. Diagnosed by Andreas Schwab in
9378 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
9379 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
9380 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
9381 it avoids undefined behavior on hosts where shifting right by more
9382 than the word width has undefined behavior.
9384 2012-02-19 Chong Yidong <cyd@gnu.org>
9386 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
9387 (Funhandled_file_name_directory, Ffile_name_as_directory)
9388 (Fdirectory_file_name, Fexpand_file_name)
9389 (Fsubstitute_in_file_name): Protect against invalid file handler
9390 return values (Bug#10845).
9392 2012-02-18 Eli Zaretskii <eliz@gnu.org>
9394 * .gdbinit (pitx): Fix incorrect references to fields of the
9397 2012-02-17 Chong Yidong <cyd@gnu.org>
9399 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
9401 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
9403 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
9404 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
9406 2012-02-15 Chong Yidong <cyd@gnu.org>
9408 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
9409 marked as special. Also, starting docstrings with * is obsolete.
9411 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
9413 * gnutls.c (emacs_gnutls_write): Fix last change.
9415 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
9417 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
9420 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
9422 * keymap.c (Fsingle_key_description): Handle char ranges.
9424 2012-02-12 Chong Yidong <cyd@gnu.org>
9426 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
9427 as that creates a dangerous corner case.
9429 * window.c (Fdelete_window_internal): Invalidate the mouse
9430 highlight (Bug#9904).
9432 2012-02-12 Glenn Morris <rgm@gnu.org>
9434 * xselect.c (Fx_own_selection_internal)
9435 (Fx_get_selection_internal, Fx_disown_selection_internal)
9436 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
9437 * nsselect.m (Fx_own_selection_internal)
9438 (Fx_disown_selection_internal, Fx_selection_exists_p)
9439 (Fx_selection_owner_p, Fx_get_selection_internal):
9440 Sync docs and argument specs with the xselect.c versions.
9442 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
9444 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
9446 2012-02-11 Eli Zaretskii <eliz@gnu.org>
9448 * w32select.c (Fx_selection_exists_p): Sync doc string and
9449 argument list with xselect.c. (Bug#10783)
9451 * w16select.c (Fx_selection_exists_p): Sync doc string and
9452 argument list with xselect.c. (Bug#10783)
9454 2012-02-10 Glenn Morris <rgm@gnu.org>
9456 * fns.c (Fsecure_hash): Doc fix.
9458 2012-02-09 Kenichi Handa <handa@m17n.org>
9460 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
9462 2012-02-07 Chong Yidong <cyd@gnu.org>
9464 * buffer.c (Fbuffer_local_variables)
9465 (buffer_lisp_local_variables): Handle unbound vars correctly;
9466 don't let Qunbound leak into Lisp.
9468 2012-02-07 Glenn Morris <rgm@gnu.org>
9470 * image.c (Fimagemagick_types): Doc fix.
9472 * image.c (imagemagick-render-type): Change it from a lisp object
9473 to an integer. Move the doc here from the lisp manual.
9474 Treat all values not equal to 0 the same.
9476 2012-02-06 Chong Yidong <cyd@gnu.org>
9478 * doc.c (store_function_docstring): Avoid applying docstring of
9479 alias to base function (Bug#2603).
9481 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
9483 * .gdbinit (pp1, pv1): Remove redundant defines.
9486 2012-02-04 Chong Yidong <cyd@gnu.org>
9488 * nsterm.m: Declare a global (Bug#10694).
9490 2012-02-04 Eli Zaretskii <eliz@gnu.org>
9492 * w32.c (get_emacs_configuration_options):
9493 Include --enable-checking, if specified, in the return value.
9495 2012-02-04 Martin Rudalics <rudalics@gmx.at>
9497 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
9498 after rounding frame sizes. (Bug#9723)
9500 2012-02-04 Eli Zaretskii <eliz@gnu.org>
9502 * keyboard.c (adjust_point_for_property): Don't position point
9503 before BEGV. (Bug#10696)
9505 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
9507 Handle overflow when computing char display width (Bug#9496).
9508 * character.c (char_width): Return EMACS_INT, not int.
9509 (char_width, c_string_width): Check for overflow when
9510 computing the width; this is possible now that individual
9511 characters can have unbounded width. Problem introduced
9512 by merge from Emacs 23 on 2012-01-19.
9514 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
9516 * dbusbind.c (Fdbus_register_method): Mention the return value
9517 :ignore in the docstring.
9519 2012-02-02 Glenn Morris <rgm@gnu.org>
9521 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
9523 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9524 Unconditionally set to t. (Bug#10673)
9525 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9526 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
9527 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
9529 2012-02-02 Kenichi Handa <handa@m17n.org>
9531 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
9532 0, do not call append_composite_glyph.
9534 2012-02-02 Kenichi Handa <handa@m17n.org>
9536 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
9538 (x_produce_glyphs): If the component of a composition is a null
9539 string, set it->pixel_width to 1 to avoid zero-width glyph.
9541 2012-02-01 Eli Zaretskii <eliz@gnu.org>
9543 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
9544 first 2 arguments are identical. This makes inserting large
9545 output from a subprocess an order of magnitude faster on
9546 MS-Windows, where all sbrk'ed memory is always contiguous.
9548 2012-01-31 Glenn Morris <rgm@gnu.org>
9550 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9551 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
9552 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
9554 2012-01-29 Glenn Morris <rgm@gnu.org>
9556 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
9558 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
9560 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
9562 2012-01-28 Chong Yidong <cyd@gnu.org>
9564 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
9566 2012-01-26 Chong Yidong <cyd@gnu.org>
9568 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
9570 * search.c (Fsearch_forward, Fsearch_backward): Document negative
9571 repeat counts (Bug#10507).
9573 2012-01-26 Glenn Morris <rgm@gnu.org>
9575 * lread.c (syms_of_lread): Doc fix.
9577 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
9579 * coding.c (encode_designation_at_bol): Change return value to
9582 2012-01-25 Chong Yidong <cyd@gnu.org>
9584 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
9586 2012-01-21 Chong Yidong <cyd@gnu.org>
9588 * floatfns.c (Fcopysign): Make the second argument non-optional,
9589 since nil is not allowed anyway.
9591 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
9593 * process.c (read_process_output): Use p instead of XPROCESS (proc).
9594 (send_process): Likewise.
9596 2012-01-19 Martin Rudalics <rudalics@gmx.at>
9598 * window.c (save_window_save, Fcurrent_window_configuration)
9599 (Vwindow_persistent_parameters): Do not use Qstate.
9600 Rewrite doc-strings.
9602 2012-01-19 Kenichi Handa <handa@m17n.org>
9604 * character.c (char_width): New function.
9605 (Fchar_width, c_string_width, lisp_string_width):
9606 Use char_width (Bug#9496).
9608 2012-01-16 Martin Rudalics <rudalics@gmx.at>
9610 * window.c (Vwindow_persistent_parameters): New variable.
9611 (Fset_window_configuration, save_window_save): Handle persistent
9614 2012-01-14 Eli Zaretskii <eliz@gnu.org>
9616 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
9617 thrashing the stack of the thread. (Bug#9087)
9619 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
9621 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
9623 2012-01-11 Eli Zaretskii <eliz@gnu.org>
9625 * xdisp.c (rows_from_pos_range): Handle the case where the
9626 highlight ends on a newline. (Bug#10464)
9627 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
9628 he end column for display of highlight that ends on a newline
9631 2012-01-11 Glenn Morris <rgm@gnu.org>
9633 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
9634 from load-path also when installation-directory is nil. (Bug#10208)
9636 2012-01-10 Glenn Morris <rgm@gnu.org>
9638 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
9640 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
9641 Update template values to be closer to their typical values these days.
9643 2012-01-09 Eli Zaretskii <eliz@gnu.org>
9645 * xdisp.c (rows_from_pos_range): Accept additional argument
9646 DISP_STRING, and accept any glyph in a row whose object is that
9647 string as eligible for mouse highlight. Fixes mouse highlight of
9648 display strings from overlays. (Bug#10464)
9650 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
9652 emacs: fix an auto-save permissions race condition (Bug#10400)
9653 * fileio.c (auto_saving_dir_umask): New static var.
9654 (Fmake_directory_internal): Use it.
9655 (do_auto_save_make_dir): Set it, instead of invoking chmod after
9656 creating the directory. The old code temporarily assigns
9657 too-generous permissions to the directory.
9658 (do_auto_save_eh): Clear it.
9659 (Fdo_auto_save): Catch all errors, not just file errors, so
9660 that the var is always cleared.
9662 2012-01-07 Eli Zaretskii <eliz@gnu.org>
9664 * search.c (scan_buffer): Pass character positions to
9665 know_region_cache, not byte positions. (Bug#6540)
9667 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
9669 * w32.c (sys_rename): Report EXDEV when rename of a directory
9670 fails because the target is on another logical disk. (Bug#10284)
9672 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
9674 * xterm.c (x_embed_request_focus): New function.
9676 * xterm.h: Add prototype.
9678 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
9680 2012-01-05 Glenn Morris <rgm@gnu.org>
9682 * emacs.c (emacs_copyright): Update short copyright year to 2012.
9684 2012-01-01 Eli Zaretskii <eliz@gnu.org>
9686 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
9687 Load gnutls_transport_set_lowat only if GnuTLS version is below
9689 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
9690 GnuTLS versions below 2.11.1.
9692 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
9694 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
9695 to the doc string advising against its use for altering the way
9696 windows are scrolled.
9698 2011-12-28 Kenichi Handa <handa@m17n.org>
9700 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
9701 coding-system ASCII compatible only when it does not produce BOM
9702 on encoding (Bug#10383).
9704 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
9706 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
9708 (create_and_show_popup_menu): Always use menu_position_func for
9711 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
9713 * callint.c (Fcall_interactively): Don't truncate prompt string.
9715 2011-12-23 Eli Zaretskii <eliz@gnu.org>
9717 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
9718 property that ends at ZV, so that the bidi iteration could be
9719 resumed from there (after widening). (Bug#10360)
9721 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
9723 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
9725 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
9727 * nsterm.m (x_free_frame_resources):
9728 Release f->output_data.ns->miniimage.
9729 (ns_index_color): Fix indentation. Do not retain
9730 color_table->colors[i].
9732 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
9735 * nsfns.m (x_set_background_color): Assign return value from
9736 ns_index_color to face-background instead of NSColor*.
9737 (ns_implicitly_set_icon_type): Fix indentation.
9738 Change assignment in for loop to comparison.
9740 * emacs.c (ns_pool): New variable.
9741 (main): Assign ns_pool.
9742 (Fkill_emacs): Call ns_release_autorelease_pool.
9744 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
9745 autorelease fdesc, release fdAttrs and tdict.
9746 (ns_get_covering_families): Release charset.
9747 (ns_findfonts): Release NSFontDescriptor created with new.
9748 (ns_uni_to_glyphs): Fix indentation.
9749 (setString): Release attrStr before assigning new value.
9751 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
9753 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
9755 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
9756 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
9758 2011-12-18 David Reitter <reitter@cmu.edu>
9760 * nsterm.m (ns_term_init): Subscribe for notifications
9761 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
9762 to method trackingNotification in EmacsMenu.
9764 * nsmenu.m (trackingMenu): New variable.
9765 (trackingNotification): New method (from Aquamacs).
9766 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
9767 from Aquamacs (Bug#7030).
9769 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
9771 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
9772 (symbol_to_nsstring): Fix indentation.
9773 (ns_symbol_to_pb): New function.
9774 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
9775 (Fns_rotate_cut_buffers_internal): Remove.
9776 (Fns_store_selection_internal): Rename from
9777 Fns_store_cut_buffer_internal.
9778 (ns_get_foreign_selection, Fx_own_selection_internal)
9779 (Fx_disown_selection_internal, Fx_selection_exists_p)
9780 (Fns_get_selection_internal, Fns_store_selection_internal):
9781 Use ns_symbol_to_pb and check if return value is nil.
9782 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
9783 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
9784 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
9785 renamed to Sns_store_selection_internal.
9786 (ns_handle_selection_request): Move code to Fx_own_selection_internal
9787 and remove this function.
9788 (ns_handle_selection_clear): Remove, never used.
9789 (Fx_own_selection_internal): Move code from ns_handle_selection_request
9792 2011-12-17 Ken Brown <kbrown@cornell.edu>
9794 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
9795 GID is unknown (Bug#10257).
9797 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
9799 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
9800 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
9801 which caused a build failure on GNU/Linux IA-64. This problem was
9802 introduced by my 2011-10-07 patch.
9804 2011-12-15 Juri Linkov <juri@jurta.org>
9806 * image.c (imagemagick_error): New function. (Bug#10112)
9807 (imagemagick_load_image): Comment out `MagickSetResolution' call.
9808 Use `imagemagick_error' where ImageMagick functions return
9810 (Fimagemagick_types): Add `Fnreverse' to return the list in the
9813 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9815 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
9816 fill background (Bug#8992).
9818 2011-12-13 Martin Rudalics <rudalics@gmx.at>
9820 * window.c (Vwindow_combination_resize)
9821 (Vwindow_combination_limit): Use t instead of non-nil in
9823 (Vrecenter_redisplay): Add first sentence of doc-string on
9825 (Frecenter): Fix doc-string typo.
9827 2011-12-11 Kenichi Handa <handa@m17n.org>
9829 * coding.c (Funencodable_char_position): Pay attention to the
9830 buffer text relocation (Bug#9389).
9832 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
9834 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
9835 gtk_init (Bug#10100).
9837 2011-12-10 Eli Zaretskii <eliz@gnu.org>
9839 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
9840 IT->string is nil. (Bug#10263)
9842 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
9844 * nsterm.h (x_free_frame_resources): Declare.
9846 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
9847 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
9849 * nsterm.h (ns_get_defaults_value): Declare.
9851 * nsterm.m (ns_default): Call ns_get_defaults_value.
9853 2011-12-09 Eli Zaretskii <eliz@gnu.org>
9855 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
9858 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9860 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
9861 that where the value of an _OBJC_* symbol points to is in the .bss
9862 section (Bug#10240).
9864 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9866 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
9867 after the loop to call ccl_driver at least once (Bug#8619).
9869 2011-12-08 Kenichi Handa <handa@m17n.org>
9871 * ftfont.c (get_adstyle_property): Fix previous change
9874 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
9876 * w32.c (init_environment): If no_site_lisp, remove site-lisp
9877 dirs from the default value of EMACSLOADPATH (bug#10208).
9879 2011-12-07 Glenn Morris <rgm@gnu.org>
9881 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
9882 installation and source directories as well. (Bug#10208)
9884 2011-12-06 Chong Yidong <cyd@gnu.org>
9886 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
9888 2011-12-06 Glenn Morris <rgm@gnu.org>
9890 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
9891 as an error, not just -1. (Bug#10217)
9893 2011-12-05 Chong Yidong <cyd@gnu.org>
9895 * keyboard.c (process_special_events): New function.
9896 (swallow_events, Finput_pending_p): Use it (Bug#10195).
9898 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
9900 * coding.c (encode_designation_at_bol): Don't use uninitialized
9901 local variable (Bug#9318).
9903 2011-12-05 Kenichi Handa <handa@m17n.org>
9905 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
9906 return Qnil (Bug#8046, Bug#10193).
9908 2011-12-05 Kenichi Handa <handa@m17n.org>
9910 * coding.c (encode_designation_at_bol): New args charbuf_end and
9911 dst. Return the number of produced bytes. Callers changed.
9912 (coding_set_source): Return how many bytes coding->source was
9914 (coding_set_destination): Return how many bytes
9915 coding->destination was relocated.
9916 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
9917 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
9919 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9921 * coding.c (CODING_CHAR_CHARSET_P): New macro.
9922 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
9925 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
9927 The following changes are to fix Bug#9318.
9929 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
9930 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
9931 (encode_coding_iso_2022, encode_coding_sjis)
9932 (encode_coding_big5, encode_coding_charset): Use the above macros.
9934 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
9936 * lisp.h (process_quit_flag): Fix external declaration.
9938 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9940 Don't macro-inline non-performance-critical code.
9941 * eval.c (process_quit_flag): New function.
9942 * lisp.h (QUIT): Use it.
9944 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
9946 * nsfns.m (get_geometry_from_preferences): New function.
9947 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
9949 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
9951 * emacs.c (Qkill_emacs): Define.
9952 (syms_of_emacs): Initialize it.
9953 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
9954 Qquit_flag to `kill-emacs' instead.
9955 (quit_throw_to_read_char): Add parameter `from_signal'.
9956 All callers changed. Call Fkill_emacs if requested and safe.
9957 * lisp.h (QUIT): Call Fkill_emacs if requested.
9959 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
9961 * widget.c (update_wm_hints): Return if wmshell is null.
9962 (widget_update_wm_size_hints): New function.
9964 * widget.h (widget_update_wm_size_hints): Declare.
9966 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
9967 widget_update_wm_size_hints (Bug#10104).
9969 2011-12-03 Eli Zaretskii <eliz@gnu.org>
9971 * xdisp.c (handle_invisible_prop): If the invisible text ends just
9972 before a newline, prepare the bidi iterator for consuming the
9973 newline, and keep the current paragraph direction. (Bug#10183)
9974 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9976 2011-12-02 Juri Linkov <juri@jurta.org>
9978 * search.c (Fword_search_regexp): New Lisp function created from
9979 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
9980 (Fword_search_backward, Fword_search_forward)
9981 (Fword_search_backward_lax, Fword_search_forward_lax):
9982 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
9983 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
9985 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
9987 * fileio.c (Finsert_file_contents): Move after-change-function call
9988 to before the "handled:" label, since all "goto handled" appear in
9989 cases where the *-change-functions have already been properly called
9992 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
9994 * keyboard.c (interrupt_signal): Don't call kill-emacs when
9995 waiting for input. (Bug#10169)
9997 2011-11-30 Eli Zaretskii <eliz@gnu.org>
9999 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10000 verifies glyph row's hash code--we have just reallocated the
10001 glyphs, so their contents can be complete garbage. (Bug#10164)
10003 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10005 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10007 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10009 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10010 attributes are tested _before_ calling verify_row_hash, to protect
10011 against GCC re-ordering of the tests. (Bug#10164)
10013 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10015 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10017 * xterm.c (handle_one_xevent): Only set async_visible and friends
10018 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10019 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10020 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10022 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10024 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10025 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10026 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10027 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10028 All uses changed to use GCPRO1 etc.
10029 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10030 Revert to old implementation (i.e., before 2011-03-11).
10032 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10034 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10035 of scroll runs so as to avoid assigning disabled bogus rows and
10036 unnecessary graphics copy operations.
10038 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10040 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10041 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10042 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10043 (malloc, free, realloc, calloc): Redirect to e_* only when
10046 * lisp.h (GCTYPEBITS): Move before first use.
10047 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10048 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10049 this macro definition.
10051 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10054 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10056 * gtkutil.c (xg_create_frame_widgets):
10057 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10058 present with Gtk+ 2.0.
10060 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10062 * fileio.c (Finsert_file_contents): Undo previous change; see
10063 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10065 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10067 Rename locals to avoid shadowing.
10068 * fileio.c (Finsert_file_contents):
10069 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10070 * process.c (wait_reading_process_output):
10071 Rename inner 'proc' to 'p' to avoid shadowing.
10072 Indent for consistency with usual Emacs style.
10074 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10076 * xdisp.c (redisplay_window): If cursor row is not fully visible
10077 after recentering, and scroll-conservatively is set to a large
10078 number, scroll window by a few more lines to make the cursor fully
10079 visible and out of scroll-margin. (Bug#10105)
10080 (start_display): Don't move to the next line if the display should
10081 start at a newline that is part of a display vector or an overlay
10082 string. (Bug#10119)
10084 2011-11-24 Juri Linkov <juri@jurta.org>
10086 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10087 after the `MagickPingImage' call. (Bug#10112)
10089 2011-11-23 Chong Yidong <cyd@gnu.org>
10091 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10093 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10095 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10096 making another buffer current. (Bug#10114)
10098 2011-11-23 Glenn Morris <rgm@gnu.org>
10100 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10102 2011-11-23 Chong Yidong <cyd@gnu.org>
10104 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10105 using it (Bug#5984).
10107 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10109 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10110 and header-lines, as they don't have one computed for them.
10113 * .gdbinit (prow): Make displayed values more self-explaining.
10114 Add row's hash code.
10116 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10118 * process.c (wait_reading_process_output): Fix asynchrounous
10119 GnuTLS socket handling on some versions of the GnuTLS library.
10120 (wait_reading_process_output): Add comment and URL.
10122 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10124 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10126 2011-11-21 Chong Yidong <cyd@gnu.org>
10128 * window.c (Fnext_window, Fprevious_window): Doc fix.
10130 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10132 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10134 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10136 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10138 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10140 * window.c (Fset_window_combination_limit): Rename argument
10142 (Vwindow_combination_limit): Remove "status" from doc-string.
10144 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10146 * m/ibms390.h: Remove.
10147 * m/ibms390x.h: Don't include "ibms390.h".
10149 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10151 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10152 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10154 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10156 * casetab.c (Fset_case_table):
10157 * charset.c (Fcharset_after): Fix typos.
10159 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
10161 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10162 Otherwise, valgrind does not work on some platforms.
10163 Problem reported by Andreas Schwab in
10164 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10165 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10166 is set, removing the need for VIRT_ADDRESS_VARIES.
10167 (PURE_P): Use a more-efficient implementation that needs just one
10168 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10169 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10170 to 4 (xorl, subq, cmpq, setbe).
10171 * alloc.c (pure): Always extern now, since that's the
10172 VIRT_ADDR_VARIES behavior.
10173 (PURE_POINTER_P): Use a single comparison, not two, for
10174 consistency with the new puresize.h.
10175 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10176 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10177 Remove VIRT_ADDR_VARIES no longer needed.
10179 2011-11-19 Eli Zaretskii <eliz@gnu.org>
10181 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10182 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10183 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10184 behave as if the cursor position were at the window margin.
10186 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10187 and the cursor position is out of bounds, behave as if the cursor
10188 position were at the window margin. (Bug#10075)
10190 2011-11-18 Chong Yidong <cyd@gnu.org>
10192 * window.c (Fwindow_combination_limit): Make first argument
10193 non-optional, since it is meaningless for live windows like the
10196 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10198 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10200 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10202 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10203 (graft_intervals_into_buffer): Simplify.
10205 2011-11-18 Eli Zaretskii <eliz@gnu.org>
10207 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10208 hash values of the two rows.
10209 (copy_row_except_pointers): Preserve the used[] arrays and the
10210 hash values of the two rows. (Bug#10035)
10211 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
10213 * xdisp.c (row_hash): New function, body extracted from
10214 compute_line_metrics.
10215 (compute_line_metrics): Call row_hash, instead of computing the
10218 * dispnew.c (verify_row_hash): Call row_hash for computing the
10219 hash code of a row, instead of duplicating code from xdisp.c.
10221 * dispextern.h (row_hash): Add prototype.
10223 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10225 * frame.c (delete_frame): Don't delete the terminal when the last
10226 X frame is closed if emacs is built with GTK toolkit.
10228 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
10230 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10232 2011-11-17 Martin Rudalics <rudalics@gmx.at>
10234 * window.c (Vwindow_splits): Rename to
10235 Vwindow_combination_resize. Suggested by Juri Linkov.
10236 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10239 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
10241 * nsfns.m (Fns_font_name):
10242 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
10244 2011-11-16 Martin Rudalics <rudalics@gmx.at>
10246 * window.h (window): Rename slot "nest" to "combination_limit".
10247 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10248 (Fset_window_nest): Rename to Fset_window_combination_limit.
10249 (Vwindow_nest): Rename to Vwindow_combination_limit.
10250 (recombine_windows, make_parent_window, make_window)
10251 (Fsplit_window_internal, saved_window)
10252 (Fset_window_configuration, save_window_save): Rename all
10253 occurrences of window_nest to window_combination_limit.
10255 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
10257 * image.c (imagemagick_load_image): Fix typo.
10259 2011-11-14 Eli Zaretskii <eliz@gnu.org>
10261 * xdisp.c (display_line): Move the call to
10262 highlight_trailing_whitespace before the call to
10263 compute_line_metrics, since the latter needs to see the final
10264 faces of all the glyphs to compute ROW's hash value.
10265 Fixes assertion violations in row_equal_p. (Bug#10035)
10267 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
10269 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10270 just return (bug#10044).
10272 2011-11-12 Eli Zaretskii <eliz@gnu.org>
10274 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10275 with user-defined heap size. Bump the default size of the temacs
10276 heap to 27MB, to avoid memory warning when running temacs.
10277 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10279 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10280 current_matrix and desired_matrix. (Bug#9990)
10281 (verify_row_hash) [XASSERTS]: New function.
10282 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10283 that the hash value of glyph rows is correct.
10285 2011-11-12 Martin Rudalics <rudalics@gmx.at>
10287 * window.h (window): Remove splits slot.
10288 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10289 (Fdelete_other_windows_internal, make_parent_window)
10290 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10291 (Fset_window_configuration, save_window_save): Don't deal with
10292 split status of windows.
10293 (saved_window): Remove splits slot.
10294 (Vwindow_splits): Rewrite doc-string.
10296 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10298 * xfns.c (unwind_create_frame):
10299 * nsfns.m (unwind_create_frame):
10300 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10301 Vframe_list (Bug#9999).
10303 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10305 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
10307 2011-11-11 Kenichi Handa <handa@m17n.org>
10309 * callproc.c (Fcall_process): Set the member dst_multibyte of
10312 2011-11-11 Johan Bockgård <bojohan@gnu.org>
10314 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10315 avoid a crash (bug#9496).
10317 2011-11-09 Chong Yidong <cyd@gnu.org>
10319 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
10320 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
10322 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10324 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
10326 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10328 Avoid some portability problems by eschewing 'extern inline' functions.
10329 The trivial performance wins aren't worth the portability hassles; see
10330 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
10332 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10333 (window_box_width, window_box_left, window_box_left_offset)
10334 (window_box_right, window_box_right_offset): Undo previous change,
10335 by removing the "extern"s.
10336 * intervals.c (adjust_intervals_for_insertion)
10337 (adjust_intervals_for_deletion): Undo previous change,
10338 making these static again.
10339 (offset_intervals, temp_set_point_both, temp_set_point)
10340 (copy_intervals_to_string): No longer inline.
10341 * xdisp.c (window_text_bottom_y, window_box_width)
10342 (window_box_height, window_box_left_offset)
10343 (window_box_right_offset, window_box_left, window_box_right)
10344 (window_box): No longer inline.
10346 2011-11-08 Chong Yidong <cyd@gnu.org>
10348 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
10349 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
10350 Signal an error if not a live window.
10351 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
10352 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
10354 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
10356 * lisp.h (syms_of_abbrev): Remove declaration.
10357 Reported by CHENG Gao <chenggao@royau.me>.
10359 2011-11-07 Eli Zaretskii <eliz@gnu.org>
10361 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
10362 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
10363 of temacs in GUI mode.
10365 2011-11-07 Martin Rudalics <rudalics@gmx.at>
10367 * window.h: Declare delete_all_child_windows instead of
10368 delete_all_subwindows.
10369 * window.c (Fwindow_nest, Fset_window_nest)
10370 (Fset_window_new_total, Fset_window_new_normal)
10371 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
10372 (delete_all_subwindows): Rename to delete_all_child_windows.
10373 (Fdelete_other_windows_internal, Fset_window_configuration):
10374 Call delete_all_child_windows instead of delete_all_subwindows.
10375 * frame.c (delete_frame): Call delete_all_child_windows instead
10376 of delete_all_subwindows.
10378 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
10380 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
10381 This is also needed for porting to any host where GC_MARK_STACK is
10382 not GC_MAKE_GCPROS_NOOPS.
10383 (which_symbols): Use it.
10385 2011-11-07 Kenichi Handa <handa@m17n.org>
10387 * coding.c (coding_set_destination): Check coding->src_pos only
10388 when coding->src_object is a buffer (bug#9910).
10390 * process.c (send_process): Set the member src_multibyte of coding
10391 to 0 (bug#9911) when sending a unibyte text.
10393 * callproc.c (Fcall_process): Set the member src_multibyte of
10394 process_coding to 0 (bug#9912).
10396 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10398 * xmenu.c (cleanup_widget_value_tree): New function.
10399 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
10400 calling free_menubar_widget_value_tree directly (Bug#9830).
10402 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
10404 Fix some portability problems with 'inline'.
10405 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10406 (window_box_width, window_box_left, window_box_left_offset)
10407 (window_box_right, window_box_right_offset): Declare extern.
10408 Otherwise, these inline functions do not conform to C99 and
10409 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
10410 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
10411 * intervals.c (adjust_intervals_for_insertion)
10412 (adjust_intervals_for_deletion): Now extern, because otherwise the
10413 extern inline functions 'offset_intervals' couldn't refer to it.
10414 (static_offset_intervals): Remove.
10415 (offset_intervals): Rewrite using the old contents of
10416 static_offset_intervals. The old version didn't conform to C99
10417 because an extern inline function contained a reference to an
10418 identifier with static linkage.
10420 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
10422 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
10425 2011-11-06 Eli Zaretskii <eliz@gnu.org>
10427 * xdisp.c (init_iterator, reseat_to_string): Don't set the
10428 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
10429 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
10430 return Qleft_to_right.
10432 2011-11-06 Chong Yidong <cyd@gnu.org>
10434 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
10435 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
10436 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
10437 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
10438 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
10439 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
10440 (Fwindow_vscroll): Doc fix.
10441 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
10442 argument, since it makes no sense to pass a live window and for
10443 consistency with window-child.
10445 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
10447 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
10450 2011-11-05 Jason Rumney <jasonr@gnu.org>
10452 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
10453 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
10455 (add_font_entity_to_list): Fix logic errors in mixed boolean and
10456 bitwise arithmetic preventing use of unicode-sip and non-truetype
10459 2011-11-05 Eli Zaretskii <eliz@gnu.org>
10461 * s/ms-w32.h (fstat, stat, utime): Move redirections to
10464 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
10465 initialization code to keep similarity to xfns.c after changes
10468 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
10470 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
10471 (unwind_create_frame): New function (Bug#9943).
10472 (Fx_create_frame): Restructure code to be more similar to the one in
10473 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
10474 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
10475 Move terminal->reference_count++ just before making the frame official
10478 * nsterm.m (x_free_frame_resources): New function.
10479 (x_destroy_window): Move code to x_free_frame_resources.
10481 * xfns.c (unwind_create_frame): Fix comment.
10482 (Fx_create_frame, x_create_tip_frame):
10483 Move terminal->reference_count++ just before making the frame
10484 official. Move initialization of image_cache_refcount and
10485 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
10487 2011-11-05 Eli Zaretskii <eliz@gnu.org>
10489 Support MSVC build with newer versions of Visual Studio.
10490 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
10491 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
10494 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
10495 which are not supported by MSVC.
10496 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
10497 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
10499 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
10500 types in bitfields.
10501 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
10503 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
10505 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
10507 Support MSVC build with newer versions of Visual Studio.
10508 * w32.c: Don't include w32api.h for MSVC.
10509 (init_environment) [_MSC_VER]: Call sys_access, not _access.
10511 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
10512 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
10513 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
10514 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
10516 (alloca) [_MSC_VER]: Define to _alloca.
10518 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
10520 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
10522 2011-11-04 Eli Zaretskii <eliz@gnu.org>
10524 * xdisp.c (note_mouse_highlight): If either of
10525 previous/next-single-property-change returns nil, treat that as
10526 the beginning or the end of the buffer. (Bug#9955)
10528 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
10530 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
10531 label is not null (Bug#9951).
10532 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
10535 2011-11-04 Eli Zaretskii <eliz@gnu.org>
10537 * window.c (Fwindow_body_size): Mention in the doc string that the
10538 return value is in frame's canonical units. (Bug#9949)
10540 2011-11-03 Eli Zaretskii <eliz@gnu.org>
10542 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
10544 * w32fns.c (unwind_create_frame): If needed, free the glyph
10545 matrices of the partially constructed frame. (Bug#9943)
10546 * xfns.c (unwind_create_frame): Likewise.
10548 2011-11-01 Eli Zaretskii <eliz@gnu.org>
10550 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
10551 Don't stop backward scan on the continuation glyph, even though
10552 its CHARPOS is positive.
10553 (mouse_face_from_buffer_pos, note_mouse_highlight):
10554 Rename cover_string to disp_string.
10556 2011-11-01 Martin Rudalics <rudalics@gmx.at>
10558 * window.c (temp_output_buffer_show): Don't use
10559 Vtemp_buffer_show_specifiers.
10560 (Vtemp_buffer_show_specifiers): Remove unused variable.
10562 2011-10-30 Eli Zaretskii <eliz@gnu.org>
10564 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
10565 past the beginning of the current glyph matrix.
10567 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
10569 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
10570 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
10571 HAVE_GTK3 (Bug#9869).
10573 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
10574 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
10576 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
10578 * xterm.c: Declare x_handle_net_wm_state to return int.
10579 (handle_one_xevent): Check if we are iconified but don't have
10580 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
10581 (get_current_wm_state): Return non-zero if not hidden,
10582 check for _NET_WM_STATE_HIDDEN (Bug#9893).
10583 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
10584 (x_handle_net_wm_state): Return what get_current_wm_state returns.
10585 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
10587 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
10589 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
10590 so that this new function doesn't get optimized away by a
10591 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
10593 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
10595 * frame.h (MOUSE_HL_INFO): Remove excess parens.
10597 2011-10-29 Eli Zaretskii <eliz@gnu.org>
10599 Fix the `xbytecode' command.
10600 * .gdbinit (xprintbytestr): New command.
10601 (xwhichsymbols): Rename from `which'; all callers changed.
10602 (xbytecode): Print the byte-code string as well.
10604 2011-10-29 Kim Storm <storm@cua.dk>
10606 * alloc.c (which_symbols): New function.
10608 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
10610 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
10613 2011-10-29 Glenn Morris <rgm@gnu.org>
10615 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
10616 Not clear what it was for, and it causes various bugs. (Bug#9839)
10618 2011-10-28 Eli Zaretskii <eliz@gnu.org>
10620 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
10621 possible random value that matches one of those tested as
10622 condition to clear the mouse face.
10624 2011-10-28 Chong Yidong <cyd@gnu.org>
10626 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
10628 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
10630 * window.c (make_window): Initialize phys_cursor_on_p.
10632 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
10634 * lisp.h (struct Lisp_Symbol): Update comments.
10636 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
10638 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
10640 2011-10-28 Eli Zaretskii <eliz@gnu.org>
10642 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
10643 <oslsachem@gmail.com> for helping to debug this.
10645 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
10646 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
10647 (g_b_init_get_glyph_outline_w): New static variables.
10648 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
10649 (GetGlyphOutlineW_Proc): New typedefs.
10650 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
10651 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
10653 (w32font_open_internal, compute_metrics):
10654 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
10655 instead of calling the "wide" APIs directly.
10657 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
10659 * w32.h (syms_of_w32font): Add prototype.
10661 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
10663 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
10664 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
10665 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
10666 (Fmove_to_window_line): Doc fix.
10668 2011-10-27 Chong Yidong <cyd@gnu.org>
10670 * process.c (make_process): Set gnutls_state to NULL.
10672 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
10673 non-NULL, regardless of GNUTLS_INITSTAGE.
10674 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
10675 an error. Set process slots as soon as we allocate them.
10677 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
10679 2011-10-27 Chong Yidong <cyd@gnu.org>
10681 * gnutls.c (emacs_gnutls_deinit): New function.
10682 Deallocate credentials structures as well as calling gnutls_deinit.
10683 (Fgnutls_deinit, Fgnutls_boot): Use it.
10685 * process.c (make_process): Initialize GnuTLS credentials to NULL.
10686 (deactivate_process): Call emacs_gnutls_deinit.
10688 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
10690 * image.c (x_create_x_image_and_pixmap):
10691 * w32.c (sys_rename, w32_delayed_load):
10692 * w32font.c (fill_in_logfont):
10693 * w32reg.c (x_get_string_resource): Silence compiler warnings.
10695 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
10697 * w32fns.c (w32_default_color_map): New function,
10698 extracted from Fw32_default_color_map.
10699 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
10701 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
10703 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
10705 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
10707 * keyboard.c (test_undefined): New function (bug#9751).
10708 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
10710 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
10712 * sysdep.c (init_sys_modes): Fix the check for the controlling
10713 terminal (Bug#6649).
10715 2011-10-20 Eli Zaretskii <eliz@gnu.org>
10717 * dispextern.h (struct bidi_it): New member next_en_type.
10719 * bidi.c (bidi_line_init): Initialize the next_en_type member.
10720 (bidi_resolve_explicit_1): When next_en_pos is valid for the
10721 current character, check also for next_en_type being WEAK_EN.
10722 (bidi_resolve_weak): Don't enter the expensive loop if the current
10723 position is before next_en_pos. Record the bidi type of the first
10724 non-ET, non-BN character we find, in addition to its position.
10725 (bidi_level_of_next_char): Invalidate next_en_type when
10726 next_en_pos is over-stepped.
10728 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
10730 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
10731 * editfns.c: Rewrite current-time-zone so that it invokes
10732 the equivalent of (format-time-string "%Z") to get the time zone name.
10733 This fixes a bug when the time zone name contains characters that
10734 need converting from the system time locale to Emacs internal format.
10735 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
10736 that patch fixed format-time-string to do the conversion, but
10737 I forgot to fix current-time-zone.
10738 (format_time_string): New function, containing most of
10739 what Fformat_time_string used to contain.
10740 (Fformat_time_string): Rewrite in terms of format_time_string.
10741 This doesn't change this function's behavior.
10742 (current-time-zone): Rewrite to use format_time_string.
10743 This fixes the bug reported by Michael Schierl in
10744 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
10745 Jason Rumney's 2007-06-07 change worked around this bug, but
10747 * systime.h (tzname, timezone): Remove no-longer-used declarations.
10749 2011-10-19 Eli Zaretskii <eliz@gnu.org>
10751 * xdisp.c (start_display): If the character at POS is displayed
10752 via a display vector, reset IT->current.dpvec_index to zero.
10753 (try_window_reusing_current_matrix): If a line ends in a display
10754 vector or the next line starts in a display vector, continue
10755 redrawing the window even though the character position of
10756 start_row was reached.
10759 2011-10-18 Chong Yidong <cyd@gnu.org>
10761 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
10762 with nobreak-char-display too.
10764 2011-10-18 Eli Zaretskii <eliz@gnu.org>
10766 Fix part 3 of bug#9771.
10767 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
10768 (bidi_resolve_neutral): Don't enter the expensive loop looking for
10769 non-neutral characters if the current character is a paragraph
10770 separator (a.k.a. Newline). This avoids running the same
10771 expensive loop twice, once when we consume the preceding newline
10772 and the other time when the line actually needs to be displayed.
10773 Avoid the loop when we see neutrals on the base embedding level
10774 following a character whose directionality is the same as the
10775 paragraph's. This avoids running the expensive loop when a line
10776 ends in a long sequence of neutrals, like control characters.
10777 Add assertion against STRONG_AL type. Slightly rearrange code
10778 that determines the type of a neutral given the first non-neutral
10780 (bidi_level_of_next_char): Set next_en_pos to zero when
10781 invalidating its info.
10783 2011-10-17 Eli Zaretskii <eliz@gnu.org>
10785 * xdisp.c (push_display_prop): Determine whether to record string
10786 or buffer position by IT->string, not by IT->method. Allow
10787 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
10788 (move_it_vertically_backward): Don't look for character position
10789 immediately after the newline when in a continuation line.
10792 2011-10-15 Martin Rudalics <rudalics@gmx.at>
10794 * window.c (coordinates_in_window): Rewrite and delabelize
10795 vertical border check. (Bug#5357) (Bug#9618)
10797 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
10799 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
10800 errors in XSetWindowBorder (bug#9310).
10802 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
10804 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
10805 avoid crash when xmalloc overrun checking is enabled.
10807 2011-10-13 Eli Zaretskii <eliz@gnu.org>
10809 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
10810 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
10811 cursor motion with <left> and <right> arrow keys.
10813 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
10814 some callers set that themselves.
10816 2011-10-12 Eli Zaretskii <eliz@gnu.org>
10818 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
10819 display string and the previous row comes from the same string and
10820 is empty. (Bug#9739) (Bug#9738)
10822 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
10824 * doc.c (get_doc_string): Encode file name (bug#9735).
10826 2011-10-12 Eli Zaretskii <eliz@gnu.org>
10828 * bidi.c (bidi_level_of_next_char):
10829 * xdisp.c (get_visually_first_element): Remove old incorrect
10830 comments regarding the Unicode Line Separator character.
10832 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
10834 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
10836 * alloc.c (Fgc_status): Do not access beyond zombies array
10837 boundary if nzombies > MAX_ZOMBIES.
10838 * alloc.c (dump_zombies): Add missing format specifier.
10840 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
10842 * xdisp.c (set_cursor_from_row): Simplify conditionals,
10843 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
10845 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
10846 Some packages use them to denote characters with modifiers.
10848 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
10850 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
10851 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
10852 matching a pp-number. Rename parameter var to var1.
10854 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
10856 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
10858 2011-10-08 Glenn Morris <rgm@gnu.org>
10860 * callint.c (Fcall_interactively): Give a more explicit error for the
10861 'c' case with a non-character input. (Bug#8479)
10863 2011-10-08 Eli Zaretskii <eliz@gnu.org>
10865 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
10867 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
10868 lines that are hscrolled on the left.
10870 * dispnew.c (buffer_posn_from_coords): Account for a possible
10871 presence of header-line. (Bug#4426)
10873 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
10875 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
10876 Don't advertise functionality which we discourage or doesn't work.
10878 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
10880 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
10881 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
10882 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
10883 this makes Emacs dump core during garbage collection on rare
10884 occasions. sizeof is obviously inferior to offsetof here, so
10885 stick with offsetof.
10886 (GC_POINTER_ALIGNMENT): New macro.
10887 (mark_memory): Omit 3rd (offset) arg; caller changed.
10888 Don't assume EMACS_INT alignment is the same as pointer alignment.
10890 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10892 * keyboard.c (read_key_sequence_remapped): New var.
10893 (read_key_sequence): Compute remapping in the right buffer.
10894 (command_loop_1): Use read_key_sequence's remapping directly.
10896 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
10898 * dired.c (file_name_completion): Don't expand file name.
10899 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
10900 before checking file name handler.
10902 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
10903 they've been requested explicitly (bug#9591).
10905 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
10907 * keymap.c (Fsingle_key_description): Use make_specified_string
10908 instead of build_string to build string from push_key_description.
10911 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
10913 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
10914 This fixes a Y2038 bug on 64-bit hosts.
10915 * buffer.c (reset_buffer):
10916 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
10917 (Fclear_buffer_auto_save_failure):
10918 Use 0, not -1, to represent an unset failure time, since time_t
10919 might not be signed.
10921 Remove dependency on glibc malloc internals.
10922 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10923 Move back here from lisp.h, but with their new implementations.
10924 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10925 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
10926 * charset.c (charset_table_init): New static var.
10927 (syms_of_charset): Use it instead of xmalloc. This removes a
10928 dependency on glibc malloc internals. See Eli Zaretskii's comment in
10929 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
10930 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10931 Move back to alloc.c.
10932 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10933 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
10935 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
10937 * nsterm.m (windowDidResize): Call x_set_window_size only when
10938 ns_in_resize is true. Otherwise set pixelwidth/height and
10939 call change_frame_size (Bug#9628).
10941 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
10943 Port --enable-checking=all to Fedora 14 x86-64.
10944 * charset.c (syms_of_charset): Also account for glibc malloc's
10945 internal overhead when calculating the initial malloc maximum.
10947 Port --enable-checking=all to Fedora 14 x86.
10948 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10950 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
10951 (overrun_check_realloc, overrun_check_free):
10952 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
10953 That way, xmalloc returns a properly-aligned pointer even if
10954 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
10955 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
10956 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
10957 into account when calculating the initial malloc maximum.
10958 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
10959 Move here from alloc.c, so that charset.c can use it too.
10960 Properly align; the old code wasn't right for common 32-bit hosts
10961 when configured with --enable-checking=all.
10962 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
10963 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
10965 2011-09-29 Eli Zaretskii <eliz@gnu.org>
10967 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
10970 2011-09-28 Eli Zaretskii <eliz@gnu.org>
10972 * xdisp.c (compute_display_string_end): If there's no display
10973 string at CHARPOS, return -1.
10975 * bidi.c (bidi_fetch_char): When compute_display_string_end
10976 returns a negative value, treat the character as a normal
10977 character not covered by a display string. (Bug#9624)
10979 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
10981 * lread.c (Fread_from_string): Fix typo in docstring.
10983 2011-09-27 Eli Zaretskii <eliz@gnu.org>
10985 * xdisp.c (handle_invisible_prop): If invisible text ends on a
10986 newline, reseat the iterator instead of bidi-iterating there one
10987 character at a time. (Bug#9610)
10988 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
10989 TO_CHARPOS if the bidi iterator is at base embedding level.
10991 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
10993 * lread.c (readevalloop): Use correct code for NBSP.
10994 (read1): Likewise. (Bug#9608)
10996 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
10998 * dbusbind.c (Fdbus_register_signal): When service is not
10999 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11001 2011-09-25 Glenn Morris <rgm@gnu.org>
11003 * buffer.c (truncate-lines): Doc fix.
11005 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11007 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11008 (Fset_window_next_buffers): Doc fix.
11010 2011-09-24 Glenn Morris <rgm@gnu.org>
11012 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11014 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11016 Fix minor problems found by static checking.
11017 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11018 * indent.c (Fvertical_motion): Fix == vs = typo.
11020 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11022 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11023 Default value is now t. Doc fix.
11025 * indent.c (Fvertical_motion): Compute and apply the overshoot
11026 logic when moving up, not only when moving down. Fix the
11027 confusing name and values of the it_overshoot_expected variable;
11028 logic changes accordingly. (Bug#9254) (Bug#9549)
11030 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11031 CHARPOS is covered by a display string which includes newlines.
11032 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11033 is covered by a display string with embedded newlines.
11035 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11037 * dbusbind.c (Fdbus_register_signal): Add match rule to
11038 Vdbus_registered_objects_table. (Bug#9581)
11039 (Fdbus_register_method, Vdbus_registered_objects_table):
11042 2011-09-24 Jim Meyering <meyering@redhat.com>
11044 do not ignore write error for any output size
11045 The previous change was incomplete.
11046 While it makes emacs --batch detect the vast majority of stdout
11047 write failures, errors were still ignored whenever the output size is
11048 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11049 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11050 && echo FAIL: ignored write error
11051 FAIL: ignored write error
11052 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11053 && echo FAIL: ignored write error
11054 FAIL: ignored write error
11055 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11057 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11059 * emacs.c (Fkill_emacs): In noninteractive mode exit
11060 non-successfully if a write error occurred on stdout. (Bug#9574)
11062 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11064 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11067 * dispextern.h (struct it): Update the comment documenting what
11070 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11072 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11073 a display string, extend search for cursor position to end of row.
11074 (find_row_edges): If the row ends in a newline from a display
11075 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11076 Handle the case of a display string with multiple newlines.
11077 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11078 non-empty line. Fixes confusing cursor motion with arrow keys at
11079 the beginning of a line that starts with whitespace.
11081 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11083 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11086 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11088 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11089 boolean (Bug#9154).
11091 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11093 * xdisp.c (display_line): Record maximum and minimum buffer
11094 positions even if no glyphs were produced (e.g., by a zero-width
11095 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11096 buffer positions that will be removed from the glyph row because
11098 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11099 column is beyond frame width: don't subtract 1 "pixel" when
11100 computing width of the stretch.
11101 (reseat_at_next_visible_line_start): Undo the change made on
11102 2011-09-17 that saved paragraph information and restored it after
11103 the call to `reseat'. (Bug#9545)
11105 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11107 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11108 and turn window cursor on if cleared (Bug#9415).
11110 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11112 * search.c (boyer_moore): Take unibyte characters from pattern
11113 literally. (Bug#9458)
11115 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11117 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11119 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11121 Fix minor problem found by static checking.
11122 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11123 initialized, to pacify gcc -Wuninitialized.
11125 * fileio.c: Report proper errno when syscall falls.
11126 (Finsert_file_contents): Save and restore errno,
11127 so that report_file_error outputs the correct diagnostic.
11128 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11130 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11132 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11134 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11136 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11137 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11139 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11141 * xdisp.c (reseat_at_next_visible_line_start): Keep information
11142 about the current paragraph and restore it after the call to reseat.
11144 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11145 (bidi_find_paragraph_start): Search back for paragraph beginning
11146 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11147 (bidi_move_to_visually_next): Only trigger paragraph-related
11148 computations when the last character is a newline or at EOB, not
11149 just any NEUTRAL_B. (Bug#9470)
11151 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11152 truncated lines if point is covered by a display string. (Bug#9524)
11154 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11156 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11157 (cons_to_x_long): New function.
11158 (lisp_data_to_selection_data): Use it. Correct the test for
11159 short-versus-long data; it was negated. Break out of vector
11160 loop, for efficiency, when a long datum is discovered.
11162 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11164 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11166 2011-09-16 Eli Zaretskii <eliz@gnu.org>
11168 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11169 GCC PR/17406) by declaring this function with external scope.
11171 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11173 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11174 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11176 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11178 * editfns.c (Fformat): Correctly handle text properties on "%%".
11180 2011-09-15 Eli Zaretskii <eliz@gnu.org>
11182 * xterm.c (x_draw_composite_glyph_string_foreground):
11183 * w32term.c (x_draw_composite_glyph_string_foreground):
11184 * term.c (encode_terminal_code):
11185 * composite.c (composition_update_it, get_composition_id):
11186 * xdisp.c (get_next_display_element)
11187 (fill_composite_glyph_string): Add comments about special meaning
11188 of TAB characters in a composition.
11190 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11192 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
11193 This occurs when processing a multibyte format.
11194 Problem reported by Wolfgang Jenker.
11196 2011-09-15 Johan Bockgård <bojohan@gnu.org>
11198 * xdisp.c (try_cursor_movement): Only check for exact match if
11199 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11201 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11203 Remove unused external symbols.
11204 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11205 * xdisp.c (calc_pixel_width_or_height): Now static.
11206 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11207 * indent.c (check_display_width):
11208 * w32term.c: Fix comment to match code.
11209 * xterm.c, xterm.h (x_catching_errors): Remove.
11211 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11213 * xselect.c: Use signed conversions more consistently (Bug#9498).
11214 (selection_data_to_lisp_data): Assume incoming selection data are
11215 signed integers, not unsigned. This is to be consistent with
11216 outgoing selection data, which was modified to use signed integers
11217 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11218 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11219 expects long, not unsigned long.
11221 2011-09-14 Eli Zaretskii <eliz@gnu.org>
11223 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11224 computation of loop end. Reported by Johan Bockgård
11227 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
11229 * frame.c (Fother_visible_frames_p): Function deleted.
11231 2011-09-12 Eli Zaretskii <eliz@gnu.org>
11233 * indent.c (compute_motion): Process display vector front to back
11234 rather than the other way around. (Bug#2496)
11236 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11238 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11240 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
11242 * minibuf.c (Fread_from_minibuffer): Doc fix.
11244 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11246 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11247 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11249 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11251 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11252 value for non-existent files.
11254 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11256 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11257 set its "size" to -1. This will set the modtime_size field of
11258 the corresponding buffer to -1, which is what
11259 verify-visited-file-modtime expects for files that do not exist.
11262 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11264 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11266 * lisp.h: ... from here. push_key_description is no longer
11267 defined in keyboard.c, so its declaration should not be in
11268 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11269 logically belongs with push_key_description.
11271 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11273 * buffer.h: Include <sys/types.h> instead of <time.h>.
11274 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11275 Problem reported by Herbert J. Skuhra.
11277 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11279 * xml.c (parse_region): Make the parsing work for
11280 non-comment-starting XML files again (bug#9144).
11282 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11284 * image.c (gif_load): Fix calculation of bottom and right corner.
11287 2011-09-10 Eli Zaretskii <eliz@gnu.org>
11289 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11290 redisplay in small windows.
11292 2011-09-09 Eli Zaretskii <eliz@gnu.org>
11294 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11296 2011-09-08 Martin Rudalics <rudalics@gmx.at>
11298 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11299 Operate on live windows only.
11301 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
11303 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11305 2011-09-07 Eli Zaretskii <eliz@gnu.org>
11307 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11308 only under bidi iteration.
11310 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11312 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11314 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11316 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11317 Without this fix, the command to link temacs failed due to an
11318 undefined symbol __builtin_isnan. This is because
11319 /usr/include/iso/math_c99.h #defines isnan(x) to
11320 __builtin_isnan(x), but the bundled gcc, which identifies itself
11321 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
11323 * floatfns.c (isnan): #undef, and then #define to a clone of
11325 (Fisnan): Always define, since it's always available now.
11326 (syms_of_floatfns): Always define isnan at the Lisp level.
11328 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11330 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
11332 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11334 * fileio.c: Fix bugs with large file offsets (Bug#9428).
11335 The previous code assumed that file offsets (off_t values) fit in
11336 EMACS_INT variables, which is not true on typical 32-bit hosts.
11337 The code messed up by falsely reporting buffer overflow in cases
11338 such as (insert-file-contents "big" nil 1 2) into an empty buffer
11339 when "big" contains more than 2**29 bytes, even though this
11340 inserts just one byte and does not overflow the buffer.
11341 (Finsert_file_contents): Store file offsets as off_t
11342 values, not as EMACS_INT values. Check for overflow when
11343 converting between EMACS_INT and off_t. When checking for
11344 buffer overflow or for overlap, take the offsets into account.
11345 Don't use EMACS_INT for small values where int suffices.
11346 When checking for overlap, fix a typo: ZV was used where
11347 ZV_BYTE was intended.
11348 (Fwrite_region): Don't assume off_t fits into 'long'.
11349 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
11351 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
11353 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
11355 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11357 sprintf-related integer and memory overflow issues (Bug#9412).
11359 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
11360 (esprintf, exprintf, evxprintf): New functions.
11361 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
11362 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
11363 (modify_event_symbol): Do not assume that the length of
11364 name_alist_or_stem is safe to alloca and fits in int.
11365 (Fexecute_extended_command): Likewise for function name and binding.
11366 (Frecursion_depth): Wrap around reliably on integer overflow.
11367 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
11368 since some callers pass EMACS_INT values.
11369 (Fsingle_key_description): Don't crash if symbol name contains more
11370 than MAX_ALLOCA bytes.
11371 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
11372 (get_minibuffer): Arg is now EMACS_INT, not int.
11373 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
11374 (esprintf, exprintf, evxprintf): New decls.
11375 * window.h (command_loop_level, minibuf_level): Reflect API changes.
11377 * dbusbind.c (signature_cat): New function.
11378 (xd_signature, Fdbus_register_signal):
11379 Do not overrun buffer; instead, report string overflow.
11381 * dispnew.c (add_window_display_history): Don't overrun buffer.
11382 Truncate instead; this is OK since it's just a log.
11384 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
11385 even if the time zone offset is outlandishly large.
11386 Don't mishandle offset == INT_MIN.
11388 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
11389 when creating daemon; the previous buffer-overflow check was incorrect.
11391 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
11392 which has the guts of the old verror function.
11394 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
11395 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
11397 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
11398 (font_unparse_xlfd): Don't blindly alloca long strings.
11399 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
11400 fits in int, when using sprintf. Use single snprintf to count
11401 length of string rather than counting it via multiple sprintfs;
11402 that's simpler and more reliable.
11403 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
11404 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
11405 sprintf, in case result does not fit in int.
11407 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
11408 (fontset_from_font): Print it.
11410 * frame.c (tty_frame_count): Now printmax_t, not int.
11411 (make_terminal_frame, set_term_frame_name): Print it.
11412 (x_report_frame_params): In X, window IDs are unsigned long,
11413 not signed long, so print them as unsigned.
11414 (validate_x_resource_name): Check for implausibly long names,
11415 and don't assume name length fits in 'int'.
11416 (x_get_resource_string): Don't blindly alloca invocation name;
11417 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
11420 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
11421 (xg_check_special_colors, xg_set_geometry):
11422 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
11424 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
11425 Use esprintf, not sprintf, in case result does not fit in int.
11427 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11428 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
11429 it as a large positive number.
11430 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
11431 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11433 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
11434 in case result does not fit in int.
11436 * print.c (float_to_string): Detect width overflow more reliably.
11437 (print_object): Make sprintf buffer a bit bigger, to avoid potential
11438 buffer overrun. Don't assume list length fits in 'int'. Treat
11439 print length of 0 as 0, not as infinity; to be consistent with other
11440 uses of print length in this function. Don't overflow print length
11441 index. Don't assume hash table size fits in 'long', or that
11442 vectorlike size fits in 'unsigned long'.
11444 * process.c (make_process): Use printmax_t, not int, to format
11445 process-name gensyms.
11447 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
11449 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
11450 to avoid potential buffer overrun.
11452 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
11453 if X resource line is longer than 512 bytes.
11455 * xfns.c (x_window): Make sprintf buffer a bit bigger
11456 to avoid potential buffer overrun.
11458 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
11460 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
11462 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11464 Integer overflow fixes for scrolling, etc.
11465 Without these, Emacs silently mishandles large integers sometimes.
11466 For example, "C-u 4294967297 M-x recenter" was treated as if
11467 it were "C-u 1 M-x recenter" on a typical 64-bit host.
11469 * xdisp.c (try_window_id): Check Emacs fixnum range before
11470 converting to 'int'.
11472 * window.c (window_scroll_line_based, Frecenter):
11473 Check that an Emacs fixnum is in range before assigning it to 'int'.
11474 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
11475 values converted from Emacs fixnums.
11476 (Frecenter): Don't wrap around a line count if it is out of 'int'
11477 range; instead, treat it as an extreme value.
11478 (Fset_window_configuration, compare_window_configurations):
11479 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
11481 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
11482 that can exceed INT_MAX. Check that EMACS_INT value is in range
11483 before assigning it to the (possibly-narrower) index.
11484 (match_limit): Don't assume that a fixnum can fit in 'int'.
11486 * print.c (print_object): Use ptrdiff_t, not int, for index that can
11489 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
11490 (Fvertical_motion): Don't wrap around LINES values that don't fit
11491 in 'int'. Instead, treat them as extreme values. This is good
11492 enough for windows, which can't have more than INT_MAX lines anyway.
11494 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11496 * Require libxml/parser.h to avoid compilation warning.
11498 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
11500 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
11501 since this reportedly can destroy thread storage.
11503 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
11505 * syntax.c (find_defun_start): Update all cache variables if
11506 exiting early (Bug#9401).
11508 2011-08-30 Eli Zaretskii <eliz@gnu.org>
11510 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
11512 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
11513 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
11514 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
11516 * term.c (tty_append_glyph): New function.
11517 (produce_stretch_glyph): Static function and its prototype deleted.
11519 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
11522 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
11524 * image.c (parse_image_spec): Check for nonnegative, not for positive,
11525 when checking :margin (Bug#9390).
11526 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
11527 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
11528 so that the name doesn't mislead. All uses changed.
11530 2011-08-28 Johan Bockgård <bojohan@gnu.org>
11532 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
11535 2011-08-27 Eli Zaretskii <eliz@gnu.org>
11537 * xdisp.c (move_it_to): Don't bail out early when reaching
11538 position beyond to_charpos, if we are scanning backwards.
11539 (move_it_vertically_backward): When DY == 0, make sure we get to
11540 the first character in the line after the newline.
11542 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
11544 * ccl.c: Improve and simplify overflow checking (Bug#9196).
11545 (ccl_driver): Do not generate an out-of-range pointer.
11546 (Fccl_execute_on_string): Remove unnecessary check for
11547 integer overflow, noted by Stefan Monnier in
11548 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
11549 Remove a FIXME that didn't need fixing.
11550 Simplify the newly-introduced buffer reallocation code.
11552 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
11554 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
11556 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
11558 Integer and memory overflow issues (Bug#9196).
11560 * doc.c (get_doc_string): Rework so that
11561 get_doc_string_buffer_size is the actual buffer size, rather than
11562 being 1 less than the actual buffer size; this makes xpalloc more
11565 * image.c (x_allocate_bitmap_record, cache_image):
11566 * xselect.c (Fx_register_dnd_atom):
11567 Simplify previous changes by using xpalloc.
11569 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
11570 since either will do and ptrdiff_t is convenient with xpalloc.
11572 * charset.c (charset_table_size)
11573 (struct charset_sort_data.priority): Now ptrdiff_t.
11574 (charset_compare): Don't overflow if priorities differ greatly.
11575 (Fsort_charsets): Don't assume list length fits in int.
11576 Check for size-calculation overflow when allocating sort data.
11577 (syms_of_charset): Allocate an initial charset table that is
11578 just under 64 KiB, to avoid problems with glibc malloc and mmap.
11580 * cmds.c (internal_self_insert): Check for size-calculation overflow.
11582 * composite.h (struct composition.glyph_len): Now int, not unsigned.
11583 The actual value is always <= INT_MAX, and leaving it unsigned made
11584 overflow checking harder.
11586 * dispextern.h (struct glyph_matrix.rows_allocated)
11587 (struct face_cache.size): Now ptrdiff_t, for convenience in use
11588 with xpalloc. The values are still always <= INT_MAX.
11590 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
11592 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
11593 (SAFE_NALLOCA): New macro.
11595 * region-cache.c (struct boundary.pos, find_cache_boundary)
11596 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
11597 (set_cache_region, invalidate_region_cache)
11598 (revalidate_region_cache, know_region_cache, region_cache_forward)
11599 (region_cache_backward, pp_cache):
11600 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
11601 so that ptrdiff_t * can be passed to xpalloc.
11602 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
11603 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
11604 (pp_cache): Don't assume cache_len fits in int.
11605 * region-cache.h: Adjust extern decls to match.
11607 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
11608 EMACS_INT, since either will do, for xpalloc.
11610 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
11611 (xnmalloc, xnrealloc, xpalloc): New functions.
11613 * bidi.c (bidi_shelve_header_size): New constant.
11614 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
11615 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
11617 * bidi.c (bidi_cache_shrink):
11618 * buffer.c (overlays_at, overlays_in, record_overlay_string)
11620 Don't update size of array until after memory allocation succeeds,
11621 because xmalloc/xrealloc may not return.
11622 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
11623 now that we have proper integer overflow checking.
11624 (record_overlay_string, overlay_strings): Catch overflows when
11625 calculating size of overlay_str_buf.
11627 * callproc.c (Fcall_process): Check for size overflow when
11628 calculating size of args2.
11629 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
11630 Normally we prefer signed values, but sticking with ptrdiff_t would
11631 require adding more-complicated checks.
11633 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
11634 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
11635 Redo buffer-overflow calculations to avoid integer overflow.
11636 Add a FIXME comment where memory seems to be over-allocated.
11638 * character.c (Fstring): Check for size-calculation overflow.
11640 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
11641 unnecessary integer overflow. Check for size overflow.
11642 (encode_coding_object): Don't update size until xmalloc succeeds.
11644 * composite.c (get_composition_id): Check for overflow in glyph
11645 length calculations.
11647 Integer and memory overflow fixes for display code.
11648 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
11649 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
11650 (scrolling_window): Check for overflow in size calculations.
11651 (line_draw_cost, realloc_glyph_pool, add_row_entry):
11652 Don't assume glyph table len fits in int.
11653 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
11654 (row_table_size): Now ptrdiff_t, not int.
11655 (scrolling_window): Avoid overflow in size calculations.
11656 Don't update size until allocation succeeds.
11657 * fns.c (concat): Check for overflow in size calculations.
11658 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
11659 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
11660 (NEXT_ALMOST_PRIME_LIMIT): New constant.
11662 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
11663 (get_doc_string): Check for size calculation overflow.
11664 Don't update size until allocation succeeds.
11665 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
11666 EMACS_INT, where ptrdiff_t will do.
11667 (Fsubstitute_command_keys): Check for string overflow.
11669 * editfns.c (set_time_zone_rule): Don't assume environment length
11671 (message_length): Now ptrdiff_t, not int.
11672 (Fmessage_box): Don't update size until allocation succeeds.
11673 Don't assume message length fits in int.
11674 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
11676 * emacs.c (main): Do not reallocate argv, since there is a null at
11677 the end that can be overwritten, and this way there's no need to
11678 worry about size-calculation overflow.
11679 (sort_args): Check for size-calculation overflow.
11681 * eval.c (init_eval_once, grow_specpdl): Don't update size until
11683 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
11685 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
11686 (x_set_scroll_bar_width, x_figure_window_size):
11687 Check for integer overflow.
11688 (x_set_alpha): Do not assume XINT fits in int.
11690 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
11691 This is for the members text_lines, text_cols, total_lines, total_cols,
11692 where the system imposes an 'int' limit.
11694 * fringe.c (Fdefine_fringe_bitmap):
11695 Don't update size until alloc works.
11697 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
11698 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
11700 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
11701 Check for size-calculation overflow.
11702 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
11703 do, as we prefer signed integers.
11704 (id_to_widget.max_size, id_to_widget.used)
11705 (xg_store_widget_in_map, xg_remove_widget_from_map)
11706 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
11707 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
11708 Use and return ptrdiff_t, not int.
11709 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
11710 * gtkutil.h: Change prototypes to match the above.
11712 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
11713 are duplicate now that they've been promoted to lisp.h.
11714 (x_allocate_bitmap_record, x_alloc_image_color)
11715 (make_image_cache, cache_image, xpm_load):
11716 Don't update size until alloc is done.
11717 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
11719 Check for size calculation overflow.
11720 (ct_colors_allocated_max): New constant.
11721 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
11724 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
11725 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
11726 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
11727 Use ptrdiff_t, not int, to count maps.
11728 (read_char_minibuf_menu_prompt): Check for overflow in size
11729 calculations. Don't update size until allocation succeeds.
11730 Redo calculations to avoid overflow.
11731 * keyboard.h: Change prototypes to match the above.
11733 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
11735 (current_minor_maps): Check for size calculation overflow.
11736 * keymap.h: Change prototypes to match the above.
11738 * lread.c (read1, init_obarray): Don't update size until alloc done.
11740 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
11741 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
11743 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
11744 Now ptrdiff_t, not int.
11745 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
11746 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
11748 * process.c (Fnetwork_interface_list): Check for overflow
11749 in size calculation.
11751 * region-cache.c (move_cache_gap): Check for size calculation overflow.
11753 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
11754 overflow. Don't bother calling xmalloc when xrealloc will do.
11756 * search.c (Freplace_match): Check for size calculation overflow.
11757 (Fset_match_data): Don't assume list lengths fit in 'int'.
11759 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
11760 for command line length. Do not attempt to address one before the
11761 beginning of an array, as that's not portable.
11763 * term.c (max_frame_lines): Remove; unused.
11764 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
11766 (encode_terminal_code, calculate_costs): Check for size
11767 calculation overflow.
11768 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
11769 table lengths and related sizes. Don't update size until alloc
11770 done. Redo calculations to avoid overflow.
11771 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
11773 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
11774 subtracting pointers.
11775 (gobble_line): Check for overflow more carefully. Don't update size
11778 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
11779 Don't update size until alloc done.
11780 Redo size calculations to avoid overflow.
11781 Check for size calculation overflow.
11782 (main) [DEBUG]: Fix typo in invoking tparam1.
11784 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
11785 Use ptrdiff_t, not int, for sizes.
11786 (store_mode_line_noprop_char): Don't update size until alloc done.
11788 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
11789 Use ptrdiff_t, not int, for sizes.
11790 (Finternal_make_lisp_face, cache_face):
11791 Check for size calculation overflow.
11792 (cache_face): Treat size calculation overflows as if they were
11793 memory exhaustion (the usual treatment), rather than aborting.
11795 * xfns.c (x_encode_text, x_set_name_internal)
11796 (Fx_change_window_property): Use ptrdiff_t, not int, to count
11797 sizes, since they can exceed INT_MAX in size. Check for size
11798 calculation overflow.
11800 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
11801 (xg_select): Check for size calculation overflow.
11802 Don't update size until alloc done.
11804 * xrdb.c (get_environ_db): Don't assume path length fits in int,
11805 as sprintf is limited to int lengths.
11807 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
11808 (X_LONG_MIN): New macros.
11809 Use them to make the following changes clearer.
11810 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
11811 This change doesn't affect the value now, but it may help remind
11812 future maintainers not to raise the value too much later.
11813 (SELECTION_QUANTUM): Remove, replacing with ...
11814 (selection_quantum): ... new function, which avoids overflow.
11816 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
11817 assumption that selection length fits in 'int'.
11818 (x_reply_selection_request, x_handle_selection_request)
11819 (x_get_window_property, receive_incremental_selection)
11820 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
11821 (lisp_data_to_selection_data, clean_local_selection_data):
11822 Use ptrdiff_t, not int, to record length of selection.
11823 (x_reply_selection_request, x_get_window_property)
11824 (receive_incremental_selection, x_property_data_to_lisp):
11825 Redo calculations to avoid overflow.
11826 (x_reply_selection_request): When sending hint, ceiling it at
11827 X_LONG_MAX rather than relying on wraparound overflow to send
11829 (x_get_window_property, receive_incremental_selection)
11830 (lisp_data_to_selection_data, x_property_data_to_lisp):
11831 Check for size-calculation overflow.
11832 (x_get_window_property, receive_incremental_selection)
11833 (lisp_data_to_selection_data, Fx_register_dnd_atom):
11834 Don't store size until memory allocation succeeds.
11835 (x_get_window_property): Plug memory leak on memory exhaustion.
11836 Don't double-block input; malloc is safe here. Don't assume 2**34
11837 - 4 fits in unsigned long. Add an xassert to check
11838 XGetWindowProperty overflow. Be more careful about overflow
11839 calculations, and distinguish size from memory overflow better.
11840 (receive_incremental_selection): When tracing, don't assume
11841 unsigned int is less than INT_MAX.
11842 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
11843 harmful) conversions of unsigned short to int.
11844 (lisp_data_to_selection_data): Don't assume that integers
11845 in the range -65535 through -1 fit in an X unsigned short.
11846 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
11847 result parameters unless successful. Rely on cons_to_unsigned
11848 to report problems with elements; the old code wasn't right anyway.
11849 (x_check_property_data): Check for int overflow; we cannot use
11850 a wider type due to X limits.
11851 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
11853 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
11855 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
11856 (x_term_init): Check for size calculation overflow.
11857 (x_color_cells): Don't store size until memory allocation succeeds.
11858 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
11859 Don't assume alloca size is less than MAX_ALLOCA.
11860 (x_term_init): Don't assume length fits in int (sprintf is limited
11863 Use ptrdiff_t for composition IDs.
11864 * character.c (lisp_string_width):
11865 * composite.c (composition_table_size, n_compositions)
11866 (get_composition_id, composition_gstring_from_id):
11867 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
11868 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
11869 * window.c (Frecenter):
11870 Use ptrdiff_t, not int, for composition IDs.
11871 * composite.c (get_composition_id): Check for integer overflow.
11872 * composite.h: Adjust prototypes to match the above changes.
11874 Use ptrdiff_t for hash table indexes.
11875 * category.c (hash_get_category_set):
11876 * ccl.c (ccl_driver):
11877 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
11878 * coding.c (coding_system_charset_list, detect_coding_system):
11879 * coding.h (struct coding_system.id):
11880 * composite.c (get_composition_id, gstring_lookup_cache):
11881 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
11882 * image.c (xpm_get_color_table_h):
11883 * lisp.h (hash_lookup, hash_put):
11884 * minibuf.c (Ftest_completion):
11885 Use ptrdiff_t for hash table indexes, not int (which is too
11886 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
11887 32-bit --with-wide-int hosts).
11889 * charset.c (Fdefine_charset_internal): Check for integer overflow.
11890 Add a FIXME comment about memory leaks.
11891 (syms_of_charset): Don't assume xmalloc returns.
11893 Don't assume that stated character widths fit in int.
11894 * character.c (Fchar_width, c_string_width, lisp_string_width):
11895 * character.h (CHAR_WIDTH):
11896 * indent.c (MULTIBYTE_BYTES_WIDTH):
11897 Use sanitize_char_width to avoid undefined and/or bad behavior
11898 with outlandish widths.
11899 * character.h (sanitize_tab_width): Rename from sanitize_width,
11900 now that we have two such functions. All uses changed.
11901 (sanitize_char_width): New inline function.
11903 Don't assume that tab-width fits in int.
11904 * character.h (sanitize_width): New inline function.
11905 (SANE_TAB_WIDTH): New macro.
11906 (ASCII_CHAR_WIDTH): Use it.
11907 * indent.c (sane_tab_width): Remove. All uses replaced by
11908 SANE_TAB_WIDTH (current_buffer).
11909 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
11911 * fileio.c: Integer overflow issues with file modes.
11912 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
11914 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
11915 Remove unreachable code.
11916 (read_hex, load_charset_map_from_file): Check for integer overflow.
11918 * xterm.c: Don't go over XClientMessageEvent limit.
11919 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
11920 (x_send_scroll_bar_event): Likewise. Check that the size does not
11921 exceed limits imposed by XClientMessageEvent, as well as the usual
11922 ptrdiff_t and size_t limits.
11924 * keyboard.c: Overflow, signedness and related fixes.
11925 (make_lispy_movement): Use same integer type in forward decl
11926 that is used in the definition.
11927 (read_key_sequence, keyremap_step):
11928 Change bufsize argument back to int, undoing my 2011-03-30 change.
11929 We prefer signed types, and int is wide enough here.
11930 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
11931 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
11932 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
11933 length, not size_t. Use ptrdiff_t for index, not int.
11934 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
11935 possibility of integer overflow.
11937 Overflow, signedness and related fixes for images.
11939 * dispextern.h (struct it.stack[0].u.image.image_id)
11940 (struct_it.image_id, struct image.id, struct image_cache.size)
11941 (struct image_cache.used, struct image_cache.ref_count):
11942 * gtkutil.c (update_frame_tool_bar):
11943 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
11944 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
11945 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
11946 * nsmenu.m (update_frame_tool_bar):
11947 * xdisp.c (calc_pixel_width_or_height):
11948 * xfns.c (image_cache_refcount):
11949 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
11950 on typical 64-bit hosts.
11952 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
11953 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
11954 Omit unnecessary casts to int.
11955 (parse_image_spec): Check that integers fall into 'int' range
11956 when the callers expect that.
11957 (image_ascent): Redo ascent calculation to avoid int overflow.
11958 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
11959 (lookup_image): Remove unnecessary tests.
11960 (xbm_image_p): Locals are now of int, not EMACS_INT,
11961 since parse_image_check makes sure they fit into int.
11962 (png_load, gif_load, svg_load_image):
11963 Prefer int to unsigned where either will do.
11964 (tiff_handler): New function, combining the cores of the
11965 old tiff_error_handler and tiff_warning_handler.
11966 This function is rewritten to use vsnprintf and thereby avoid
11967 stack buffer overflows. It uses only the features of vsnprintf
11968 that are common to both POSIX and native Microsoft.
11969 (tiff_error_handler, tiff_warning_handler): Use it.
11970 (tiff_load, gif_load, imagemagick_load_image):
11971 Don't assume :index value fits in 'int'.
11972 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
11973 (imagemagick_load_image): Check that crop parameters fit into
11974 the integer types that MagickCropImage accepts. Don't assume
11975 Vimagemagick_render_type has a nonnegative value. Don't assume
11976 size_t fits in 'long'.
11977 (gs_load): Use printmax_t to print the widest integers possible.
11978 Check for integer overflow when computing image height and width.
11980 2011-08-26 Eli Zaretskii <eliz@gnu.org>
11982 * xdisp.c (redisplay_window): Don't force window start if point
11983 will be invisible in the resulting window. (Bug#9324)
11985 2011-08-25 Eli Zaretskii <eliz@gnu.org>
11987 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
11988 the display spec is of the form `(space ...)'.
11989 (handle_display_spec): Return the value returned by
11990 handle_single_display_spec, not just 1 or zero.
11991 (handle_single_display_spec): If the display spec is of the form
11992 `(space ...)', and specifies display in the text area, return 2
11994 (try_cursor_movement): Check for the need to scroll more
11995 accurately, and prefer exact match for point under bidi.
11996 Don't advance `row' beyond the last row of the window.
11998 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
11999 into disp_prop; all users changed.
12001 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12002 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12003 for the text covered by the display property.
12005 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12007 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12008 Change return value to nil.
12009 (Frecord_buffer): Delete unused function.
12011 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12013 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12014 buffers, return left-to-right.
12015 (set_cursor_from_row): Consider candidate row a win if its glyph
12016 represents a newline and point is on that newline. Fixes cursor
12017 positioning on the newline at EOL of R2L text within L2R
12018 paragraph, and vice versa.
12019 (try_cursor_movement): Check continued rows, in addition to
12020 continuation rows. Fixes unwarranted scroll when point enters a
12021 continued line of R2L text within an L2R paragraph, or vice versa.
12022 (cursor_row_p): Consider the case of point being equal to
12023 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12024 from the end of a short line to the beginning of a continued line
12025 of R2L text within L2R paragraph.
12026 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12027 composed characters.
12029 * bidi.c (bidi_check_type): Use xassert.
12030 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12033 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12035 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12038 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12040 * nsfont.m (ns_otf_to_script): Fix typo.
12042 2011-08-22 Kenichi Handa <handa@m17n.org>
12044 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12045 extra slot even if the purpose is char-code-property-table.
12047 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12049 * xdisp.c (redisplay_window): When computing centering_position,
12050 account for the height of the header line. (Bug#8874)
12052 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12053 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12054 candidate is selected by the mouse, and that candidate has a
12055 composed character under the mouse.
12057 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12058 coordinates reported by pos-visible-in-window-p for a composed
12059 character in column zero.
12061 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12063 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12065 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12067 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12068 consider it a hit if to_charpos is anywhere in the range of the
12069 composed buffer positions.
12071 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12073 * image.c (gif_load): Don't assume that each subimage has the same
12074 dimensions as the base image. Handle disposal method that is
12075 "undefined" by the gif spec (Bug#9335).
12077 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12079 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12080 (Fcondition_case): Document `debug' symbol in error handler.
12082 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12084 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12085 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12086 from an Org mode buffer to a Speedbar frame.
12088 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12089 a composition, take its buffer position from IT->cmp_it.charpos.
12090 Fixes cursor positioning at the beginning of a line that begins
12091 with a composed character.
12093 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12095 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12096 character bidirectional type, use STRONG_L instead. Fixes crashes
12097 in a buffer produced by `describe-categories'.
12099 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12100 members before the level stack, so they would be saved and
12101 restored when copying iterator state. Fixes incorrect reordering
12102 around TABs covered by display properties.
12104 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12106 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12108 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12110 * eval.c (internal_condition_case, internal_condition_case_1)
12111 (internal_condition_case_2, internal_condition_case_n):
12112 Remove unnecessary aborts (Bug#9081).
12114 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12116 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12117 has no `load' handler, try opening the file locally. (Bug#9311)
12119 2011-08-16 Ken Brown <kbrown@cornell.edu>
12121 * gmalloc.c: Expand comment.
12123 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12125 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12126 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12128 2011-08-16 Ken Brown <kbrown@cornell.edu>
12130 Fix memory allocation problems in Cygwin build (Bug#9273).
12132 * unexcw.c ( __malloc_initialized): Declare external variable.
12133 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12135 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12137 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12139 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12140 in the static heap.
12141 [CYGWIN] (special_realloc): New function.
12142 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12143 requests to realloc storage in the static heap.
12145 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12147 * bidi.c (bidi_initialize): Remove unused local.
12149 2011-08-15 Eli Zaretskii <eliz@gnu.org>
12152 * biditype.h: Remove file.
12153 * makefile.w32-in ($(BLD)/bidi.$(O)):
12154 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
12156 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12158 * chartab.c: Improve commentary for the uniprop_table API.
12160 * bidi.c (bidi_paragraph_init): Support zero value of
12161 bidi_ignore_explicit_marks_for_paragraph_level.
12162 (bidi_initialize): Use uniprop_table instead of including
12163 biditype.h and bidimirror.h.
12165 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12166 coordinates of the iterator when restoring from ppos_it.
12169 2011-08-14 Kenichi Handa <handa@m17n.org>
12171 * process.c (create_process): Call setup_process_coding_systems
12172 after the pid of the process is set to -1 (Bug#8162).
12174 2011-08-14 Eli Zaretskii <eliz@gnu.org>
12176 * xdisp.c (move_it_in_display_line_to): Don't invoke
12177 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12178 ppos_it. Fixes vertical cursor motion when line beginning is
12179 covered by an image. (Bug#9296)
12181 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12183 * nsterm.h (ns_run_ascript): Declare.
12184 (NSAPP_DATA2_RUNASSCRIPT): Define.
12186 * nsfns.m (as_script, as_result, as_status): New static variables.
12187 (ns_run_ascript): New function.
12188 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
12189 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12190 the event loop. Get status from as_status (Bug#7276).
12192 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12193 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12194 the event loop (Bug#7276).
12196 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12198 * gnutls.c (QCgnutls_bootprop_priority)
12199 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12200 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12201 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12202 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12203 (QCgnutls_bootprop_verify_hostname_error)
12204 (QCgnutls_bootprop_callbacks_verify): Rename from
12205 Qgnutls_bootprop_..., all uses changed.
12207 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12210 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12212 * xfaces.c (Qframe_set_background_mode): Now static.
12213 * dispextern.h (Qframe_set_background_mode): Remove decl.
12215 * process.c (Fnetwork_interface_info): Declare local only if needed.
12217 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12219 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12220 (Fnetwork_interface_list): Allocate in increments of bytes instead
12221 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12222 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12224 (struct ifflag_def): notrailers is smart on OSX.
12225 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12226 Get hardware address with getifaddrs if available.
12228 2011-08-12 Eli Zaretskii <eliz@gnu.org>
12230 * xdisp.c (iterate_out_of_display_property): xassert that
12231 IT->position is set to within IT->object's boundaries. Break from
12232 the loop as soon as EOB is reached; avoids infloops in redisplay
12233 when IT->position is set up wrongly due to some bug.
12234 Set IT->current to match the bidi iterator unconditionally.
12235 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12236 entry. Force push_it to save on the stack the current
12237 buffer/string position, to be restored by pop_it. Fix flags in
12238 the iterator structure wrt the object coming from a display
12239 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12240 properties. (Bug#9284)
12242 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
12244 * fontset.c (fontset_get_font_group): Add proper type checks.
12247 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12249 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12250 and LC_VERSION_MIN_MACOSX.
12251 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12252 (dump_it) [LC_FUNCTION_STARTS]: Use it.
12254 2011-08-08 Eli Zaretskii <eliz@gnu.org>
12256 * xdisp.c (forward_to_next_line_start): Allow to use the
12257 no-display-properties-and-no-overlays under bidi display.
12258 Set disp_pos in the bidi iterator to avoid searches for display
12259 properties and overlays.
12261 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
12263 * editfns.c (Fset_time_zone_rule): Document relationship with the
12266 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12267 the font entity extracted from the cache (Bug#8109).
12269 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
12271 * composite.c (autocmp_chars): Don't reset point. That is done by
12272 restore_point_unwind (Bug#5984).
12274 2011-08-07 Juri Linkov <juri@jurta.org>
12276 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12277 to show the arg `TIME' instead of `TIMEVAL'.
12279 2011-08-06 Eli Zaretskii <eliz@gnu.org>
12281 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12282 display property strides EOL and includes a newline, as in
12283 longlines-mode. (Bug#9254)
12284 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12285 word-wrap under bidirectional display. (Bug#9224)
12287 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12288 is non-zero, even if the data buffer is NULL. Fixes a crash in
12289 vertical-motion with longlines-mode. (Bug#9254)
12291 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12293 * bidi.c <bidi_cache_total_alloc>: Now static.
12294 (bidi_initialize): Initialize bidi_cache_total_alloc.
12296 * xdisp.c (display_line): Release buffer allocated for shelved bidi
12299 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12300 amount allocated this far in `bidi_cache_total_alloc'.
12301 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12302 non-zero, only free the data buffer without restoring the cache
12303 contents. All callers changed.
12305 * dispextern.h (bidi_unshelve_cache): Update prototype.
12307 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12308 (move_it_in_display_line, move_it_to)
12309 (move_it_vertically_backward, move_it_by_lines): Replace the call
12310 to xfree to an equivalent call to bidi_unshelve_cache.
12311 (move_it_in_display_line_to): Fix logic of returning
12312 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
12314 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12316 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12317 came from a string character with a `cursor' property. (Bug#9229)
12319 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12321 * Makefile.in (LIB_PTHREAD): New variable.
12322 (LIBES): Add LIB_PTHREAD (Bug#9216).
12324 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
12325 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
12327 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
12329 * regex.c (re_iswctype): Remove some redundant boolean conversions.
12331 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12333 * xterm.c (x_find_topmost_parent): New function.
12334 (x_set_frame_alpha): Find topmost parent window with
12335 x_find_topmost_parent and set the property there also (bug#9181).
12336 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
12338 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
12340 * callproc.c (Fcall_process): Avoid vfork clobbering
12341 the local vars buffer, coding_systems, current_dir.
12343 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
12345 * keymap.c (Fmake_composed_keymap): Move to subr.el.
12347 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
12349 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
12350 so that it is not optimized away.
12352 * xdisp.c (compute_display_string_pos): Remove unused local.
12354 2011-08-02 Eli Zaretskii <eliz@gnu.org>
12356 Fix slow cursor motion and scrolling in large buffers with
12357 selective display, like Org Mode buffers. (Bug#9218)
12359 * dispextern.h (struct bidi_it): New member disp_prop_p.
12361 * xdisp.c: Remove one-slot cache of display string positions.
12362 (compute_display_string_pos): Accept an additional argument
12363 DISP_PROP_P; callers changed. Scan at most 5K characters forward
12364 for a display string or property. If found, set DISP_PROP_P
12367 * bidi.c (bidi_fetch_char): Accept an additional argument
12368 DISP_PROP_P, and pass it to compute_display_string_pos.
12369 Only handle text covered by a display string if DISP_PROP_P is returned
12370 non-zero. All callers of bidi_fetch_char changed.
12372 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12374 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
12376 2010-12-03 Don March <don@ohspite.net>
12378 * keymap.c (Fdefine_key): Fix non-prefix key error message when
12379 last character M-[char] is translated to ESC [char] (bug#7541).
12381 2011-08-02 Kenichi Handa <handa@m17n.org>
12383 * lisp.h (uniprop_table): Extern it.
12385 * chartab.c (uniprop_table): Make it non-static.
12387 2011-08-01 Eli Zaretskii <eliz@gnu.org>
12389 * xdisp.c (forward_to_next_line_start): Accept additional argument
12390 BIDI_IT_PREV, and store into it the state of the bidi iterator had
12392 (reseat_at_next_visible_line_start): Use the bidi iterator state
12393 returned by forward_to_next_line_start to restore the state of
12394 it->bidi_it after backing up to previous newline. (Bug#9212)
12396 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
12398 * regex.c (re_comp): Protoize.
12399 (re_exec): Fix return type.
12400 (regexec): Fix type of `ret'. (Bug#9203)
12402 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12404 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
12405 This is needed if max-image-size is a floating-point number.
12407 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12409 * print.c (print_object): Print empty symbol as ##.
12411 * lread.c (read1): Read ## as empty symbol.
12413 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12415 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
12416 setting frame foreground color (Bug#9175).
12417 (x_set_background_color): Likewise.
12419 * nsmenu.m (-setText): Size tooltip dimensions precisely to
12420 contents (Bug#9176).
12421 (EmacsTooltip -init): Remove bezels and add shadows to
12424 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
12425 or scroll bar (Bug#8470).
12427 * nsfont.m (nsfont_open): Remove assignment to voffset and
12428 unnecessary vars hshink, expand, hd, full_height, min_height.
12429 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
12431 * nsterm.h (nsfont_info): Remove voffset field.
12433 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12435 Implement strike-through and overline on NextStep (Bug#8863).
12437 * nsfont.m (nsfont_open): Use underline position provided by font,
12438 instead of hard-coded value of 2.
12439 (nsfont_draw): Call ns_draw_text_decoration instead.
12441 * nsterm.h: Add declaration for ns_draw_text_decoration.
12443 * nsterm.m (ns_draw_text_decoration): New function for drawing
12444 underline, overline, and strike-through.
12445 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
12446 ns_draw_text_decoration. Change treatment of cursor drawing to
12447 accommodate underlining, etc.
12449 2011-07-28 Eli Zaretskii <eliz@gnu.org>
12451 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
12454 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12456 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
12457 Without this fix, if a signal arrives just after memory fills up,
12458 'malloc' might be invoked reentrantly.
12460 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
12461 In other words, assume that every image size is allowed, on non-X
12462 hosts. This assumption is probably wrong, but it lets Emacs compile.
12464 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12466 * regex.c (re_iswctype): Convert return values to boolean.
12468 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
12470 * xdisp.c (compute_display_string_pos): Don't use cached display
12471 string position if the buffer had its restriction changed.
12474 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12476 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
12478 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12480 Integer signedness and overflow and related fixes. (Bug#9079)
12482 * bidi.c: Integer size and overflow fixes.
12483 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
12484 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
12485 (bidi_cache_find_level_change, bidi_cache_ensure_space)
12486 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
12487 (bidi_find_other_level_edge):
12488 Use ptrdiff_t instead of EMACS_INT where either will do.
12489 This works better on 32-bit hosts configured --with-wide-int.
12490 (bidi_cache_ensure_space): Check for size-calculation overflow.
12491 Use % rather than repeated addition, for better worst-case speed.
12492 Don't set bidi_cache_size until after xrealloc returns, because it
12494 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
12495 (bidi_cache_ensure_space): Also check that the bidi cache size
12496 does not exceed that of the largest Lisp string or buffer. See Eli
12497 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
12499 * alloc.c (__malloc_size_t): Remove.
12500 All uses replaced by size_t. See Andreas Schwab's note
12501 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
12503 * image.c: Improve checking for integer overflow.
12504 (check_image_size): Assume that f is nonnull, since
12505 it is always nonnull in practice. This is one less thing to
12506 worry about when checking for integer overflow later.
12507 (x_check_image_size): New function, which checks for integer
12508 overflow issues inside X.
12509 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
12510 This removes the need for a memory_full check.
12511 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
12512 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
12513 (xbm_read_bitmap_data): Change locals back to 'int', since
12514 their values must fit in 'int'.
12515 (xpm_load_image, png_load, tiff_load):
12516 Invoke x_create_x_image_and_pixmap earlier,
12517 to avoid much needless work if the image is too large.
12518 (tiff_load): Treat overly large images as if
12519 x_create_x_image_and_pixmap failed, not as malloc failures.
12520 (gs_load): Use x_check_image_size.
12522 * gtkutil.c: Omit integer casts.
12523 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
12524 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
12526 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
12528 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
12529 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
12530 would wrongly return t on a 64-bit host.
12532 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
12533 The plain *_OVERFLOW macros run afoul of GCC bug 49705
12534 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
12535 and therefore cause GCC to emit a bogus diagnostic in some cases.
12537 * image.c: Integer signedness and overflow and related fixes.
12538 This is not an exhaustive set of fixes, but it's time to
12539 record what I've got.
12540 (lookup_pixel_color, check_image_size): Remove redundant decls.
12541 (check_image_size): Don't assume that arbitrary EMACS_INT values
12542 fit in 'int', or that arbitrary 'double' values fit in 'int'.
12543 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
12544 (tiff_load, imagemagick_load_image):
12545 Check for overflow in size calculations.
12546 (x_create_x_image_and_pixmap): Remove unnecessary test for
12547 xmalloc returning NULL; that can't happen.
12548 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
12549 (xpm_color_bucket): Use better integer hashing function.
12550 (xpm_cache_color): Don't possibly over-allocate memory.
12551 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
12552 (gif_memory_source):
12553 Use ptrdiff_t, not int or size_t, to record sizes.
12554 (png_load): Don't assume values greater than 2**31 fit in 'int'.
12555 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
12556 either works, as we prefer signed integers.
12557 (tiff_read_from_memory, tiff_write_from_memory):
12558 Return tsize_t, not size_t, since that's what the TIFF API wants.
12559 (tiff_read_from_memory): Don't fail simply because the read would
12560 go past EOF; instead, return a short read.
12561 (tiff_load): Omit no-longer-needed casts.
12562 (Fimagemagick_types): Don't assume size fits into 'int'.
12564 Improve hashing quality when configured --with-wide-int.
12565 * fns.c (hash_string): New function, taken from sxhash_string.
12566 Do not discard information about ASCII character case; this
12567 discarding is no longer needed.
12568 (sxhash-string): Use it. Change sig to match it. Caller changed.
12569 * lisp.h: Declare it.
12570 * lread.c (hash_string): Remove, since we now use fns.c's version.
12571 The fns.c version returns a wider integer if --with-wide-int is
12572 specified, so this should help the quality of the hashing a bit.
12574 * emacs.c: Integer overflow minor fix.
12575 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
12576 Define only if GNU_LINUX.
12577 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
12579 * dispnew.c: Integer signedness and overflow fixes.
12580 Remove unnecessary forward decls, that were a maintenance hassle.
12581 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
12583 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
12584 (scrolling_window): Use ptrdiff_t, not int, for byte count.
12585 (prepare_desired_row, line_draw_cost):
12586 Use int, not unsigned, where either works.
12587 (save_current_matrix, restore_current_matrix):
12588 Use ptrdiff_t, not size_t, where either works.
12589 (init_display): Check for overflow more accurately, and without
12590 relying on undefined behavior.
12592 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
12593 Remove, replacing with the new symbols in lisp.h. All uses changed.
12594 * fileio.c (make_temp_name):
12595 * filelock.c (lock_file_1, lock_file):
12596 * xdisp.c (message_dolog):
12597 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
12598 Use pMd etc. instead.
12599 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
12600 replacing the pWIDE etc. symbols removed from editfns.c.
12602 * keyboard.h (num_input_events): Now uintmax_t.
12603 This is (very slightly) less likely to mess up due to wraparound.
12606 * buffer.c: Integer signedness fixes.
12607 (alloc_buffer_text, enlarge_buffer_text):
12608 Use ptrdiff_t rather than size_t when either will do, as we prefer
12611 * alloc.c: Integer signedness and overflow fixes.
12612 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
12613 (__malloc_size_t): Default to size_t, not to int.
12614 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
12615 (Fgarbage_collect, mark_object_loop_halt, mark_object):
12616 Prefer ptrdiff_t to size_t when either would do, as we prefer
12618 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
12619 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
12620 Now const. Initialize with values that are in range even if char
12622 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
12623 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
12624 These functions do the right thing with sizes > 2**32.
12625 (check_depth): Now ptrdiff_t, not int.
12626 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
12627 Adjust to new way of storing sizes. Check for size overflow bugs
12629 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
12630 slightly wrong anyway, as it missed one instance of
12631 XMALLOC_OVERRUN_CHECK_OVERHEAD.
12632 (refill_memory_reserve): Omit needless cast to size_t.
12633 (mark_object_loop_halt): Mark as externally visible.
12635 * xselect.c: Integer signedness and overflow fixes.
12636 (Fx_register_dnd_atom, x_handle_dnd_message):
12637 Use ptrdiff_t, not size_t, since we prefer signed.
12638 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
12639 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
12640 x_dnd_atoms_size and x_dnd_atoms_length.
12642 * doprnt.c: Prefer signed to unsigned when either works.
12644 * doprnt.c (doprnt):
12646 * xdisp.c (vmessage):
12647 Use ptrdiff_t, not size_t, when using or implementing doprnt,
12648 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
12649 prefer signed arithmetic to avoid comparison confusion.
12650 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
12651 but is a bit tricky.
12653 Assume freestanding C89 headers, string.h, stdlib.h.
12654 * data.c, doprnt.c, floatfns.c, print.c:
12655 Include float.h unconditionally.
12656 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
12657 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
12658 * regex.c: Likewise for stddef.h, string.h.
12659 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
12660 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
12661 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
12662 (STDC_HEADERS): Remove obsolete defines.
12663 * sysdep.c: Include limits.h unconditionally.
12665 Assume support for memcmp, memcpy, memmove, memset.
12666 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
12667 * regex.c (memcmp, memcpy):
12668 Remove; we assume C89 now.
12670 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
12671 (__malloc_safe_bcopy): Remove; no longer needed.
12673 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
12674 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
12675 well either way, and we prefer signed to unsigned.
12677 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
12679 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
12680 closes the connection while we're reading (bug#9182).
12682 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
12684 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
12685 are specified (Bug#9168).
12687 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
12689 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
12690 Found by GCC static checking and --with-wide-int on a 32-bit host.
12692 2011-07-25 Eli Zaretskii <eliz@gnu.org>
12694 * xdisp.c (compute_display_string_pos): Fix logic of caching
12695 previous display string position. Initialize cached_prev_pos to
12696 -1. Fixes slow-down at the beginning of a buffer.
12698 2011-07-24 Eli Zaretskii <eliz@gnu.org>
12700 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
12701 for attrs[LFACE_FONTSET_INDEX].
12703 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
12705 * xml.c (parse_region): Remove unused local
12706 that was recently introduced.
12708 2011-07-23 Eli Zaretskii <eliz@gnu.org>
12710 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
12711 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
12713 * xdisp.c (move_it_in_display_line_to): Record the best matching
12714 position for TO_CHARPOS while scanning the line, and restore it on
12715 exit if none of the characters scanned was an exact match.
12716 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
12717 when exact match is impossible due to invisible text, and the
12718 lines are truncated.
12720 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
12722 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
12725 2011-07-22 Eli Zaretskii <eliz@gnu.org>
12727 Fix a significant slow-down of cursor motion with C-n, C-p,
12728 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
12729 auto-repeat under bidi redisplay in fontified buffers.
12730 * xdisp.c (compute_stop_pos_backwards): New function.
12731 (next_element_from_buffer): Call compute_stop_pos_backwards to
12732 find a suitable prev_stop when we find ourselves before
12734 (reseat): Don't look for prev_stop, as that could mean a very long
12736 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
12737 <cached_disp_overlay_modiff>: Cache for last found display string
12739 (compute_display_string_pos): Return the cached position if asked
12740 about the same buffer in the same area of character positions, and
12741 the buffer wasn't changed since the time the display string
12742 position was cached.
12744 2011-07-22 Eli Zaretskii <eliz@gnu.org>
12746 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
12747 is an integer, which is important for empty lines. (Bug#9149)
12749 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
12751 * frame.c (Fmodify_frame_parameters): In tty case, update the
12752 default face if necessary (Bug#4238).
12754 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
12756 * editfns.c (Fstring_to_char): No need to explain what a character
12757 is in the docstring (Bug#6576).
12759 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
12761 * xml.c (parse_region): Make sure we always return a tree.
12763 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
12765 * xml.c (parse_region): If a document contains only comments,
12768 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
12770 * xml.c (make_dom): Return comments, too.
12772 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
12775 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
12776 and the surrounding thread.
12777 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
12778 rather than fgets, and retry after EINTR. Otherwise, 'emacs
12779 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
12781 * s/openbsd.h (BROKEN_SIGIO): Define.
12782 * unexelf.c (unexec) [__OpenBSD__]:
12783 Don't update the .mdebug section of the Alpha COFF symbol table.
12785 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
12787 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
12790 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
12792 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
12793 This fixes some race conditions on the permissions of any newly
12796 * alloc.c (valid_pointer_p): Use pipe, not open.
12797 This fixes some permissions issues when debugging.
12799 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
12800 If fchown fails to set both uid and gid, try to set just gid,
12801 as that is sometimes allowed. Adjust the file's mode to eliminate
12802 setuid or setgid bits that are inappropriate if fchown fails.
12804 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
12806 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
12807 to compare Lisp_Objects.
12808 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
12809 global_gnutls_log_level, don't mistake it for a Lisp_Object.
12810 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
12812 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
12814 * lread.c (read_integer): Unread even EOF character.
12815 (read1): Likewise. Properly record start position of symbol.
12817 * lread.c (read1): Read `#:' as empty uninterned symbol if no
12818 symbol character follows.
12820 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
12822 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
12823 This works around a problem with the previous change to Fcopy_file.
12824 Recent glibc declares fchown with __attribute__((warn_unused_result)),
12825 and without this change, GCC might complain about discarding
12826 fchown's return value.
12828 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
12830 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
12832 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
12834 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
12836 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
12838 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
12839 it's used from the C level.
12841 * process.c: Use the same condition for POLL_FOR_INPUT in both
12842 keyboard.c and process.c (bug#1858).
12844 2011-07-09 Lawrence Mitchell <wence@gmx.li>
12846 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
12847 (Fgnutls_boot): Use it.
12849 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
12851 * doc.c (Fsubstitute_command_keys): Revert last change.
12853 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12855 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
12856 quotes the next character, and doesn't affect other longer
12857 sequences (bug#8935).
12859 * lread.c (syms_of_lread): Clarify that is isn't only
12860 `eval-buffer' and `eval-defun' that's affected by
12861 `lexical-binding' (bug#8460).
12863 2011-07-15 Eli Zaretskii <eliz@gnu.org>
12865 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
12866 bidi redisplay when a line includes both an image and is truncated.
12868 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
12870 Fix minor problems found by static checking.
12871 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
12872 (elsz): Now a signed constant, not a size_t var. We prefer signed
12873 types to unsigned, to avoid integer comparison confusion. Without
12874 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
12875 "cannot optimize loop, the loop counter may overflow", a symptom
12877 * indent.c (Fvertical_motion): Mark locals as initialized.
12878 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
12880 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12882 * search.c (Fre_search_backward): Mention `case-fold-search' in
12883 all the re_search_* functions (bug#8138).
12885 * keyboard.c (Fopen_dribble_file): Document when the file is
12888 2011-07-14 Eli Zaretskii <eliz@gnu.org>
12890 * bidi.c (bidi_dump_cached_states): Fix format of displaying
12893 Support bidi reordering of display and overlay strings.
12894 * xdisp.c (compute_display_string_pos)
12895 (compute_display_string_end): Accept additional argument STRING.
12896 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
12897 (reseat_to_string): Initialize bidi_it->string.s and
12898 bidi_it->string.schars.
12899 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
12900 NULL (avoids a crash in bidi_paragraph_init).
12901 Initialize itb.string.lstring.
12902 (init_iterator): Call bidi_init_it only of a valid
12903 buffer position was specified. Initialize paragraph_embedding to
12905 (reseat_to_string): Initialize the bidi iterator.
12906 (display_string): If we need to ignore text properties of
12907 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
12908 original value of -1 will not work with bidi.)
12909 (compute_display_string_pos): First arg is now struct
12910 `text_pos *'; all callers changed. Support display properties on
12912 (compute_display_string_end): Support display properties on Lisp
12914 (init_iterator, reseat_1, reseat_to_string): Initialize the
12915 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
12916 when iterating on a string not from display properties).
12917 (compute_display_string_pos, compute_display_string_end):
12918 Fix calculation of the object to scan. Fixes an error when using
12920 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
12921 base_level_stop; instead, set base_level_stop to BEGV.
12922 Fixes crashes in vertical-motion.
12923 (next_element_from_buffer): Improve commentary for when
12924 the iterator is before prev_stop.
12925 (init_iterator): Initialize bidi_p from the default value of
12926 bidi-display-reordering, not from buffer-local value. Use the
12927 buffer-local value only if initializing for buffer iteration.
12928 (handle_invisible_prop): Support invisible properties on strings
12929 that are being bidi-reordered.
12930 (set_iterator_to_next): Support bidi reordering of C strings and
12932 (next_element_from_string): Support bidi reordering of Lisp
12934 (handle_stop_backwards): Support Lisp strings as well.
12935 (display_string): Support display of R2L glyph rows.
12936 Use IT_STRING_CHARPOS when displaying from a Lisp string.
12937 (init_iterator): Don't initialize it->bidi_p for strings
12939 (reseat_to_string): Initialize it->bidi_p for strings here.
12940 (next_element_from_string, next_element_from_c_string)
12941 (next_element_from_buffer): Add xassert's for correspondence
12942 between IT's object being iterated and it->bidi_it.string
12944 (face_before_or_after_it_pos): Support bidi iteration.
12945 (next_element_from_c_string): Handle the case of the first string
12946 character that is not the first one in the visual order.
12947 (get_visually_first_element): New function, refactored from common
12948 parts of next_element_from_buffer, next_element_from_string, and
12949 next_element_from_c_string.
12950 (tool_bar_lines_needed, redisplay_tool_bar)
12951 (display_menu_bar): Force left-to-right direction. Add a FIXME
12952 comment for making that be controlled by a user option.
12953 (push_it, pop_it): Save and restore the state of the
12954 bidi iterator. Save and restore the bidi_p flag.
12955 (pop_it): Iterate out of display property for string iteration as
12957 (iterate_out_of_display_property): Support iteration over strings.
12958 (handle_single_display_spec): Set up it->bidi_it for iteration
12959 over a display string, and call bidi_init_it.
12960 (handle_single_display_spec, next_overlay_string)
12961 (get_overlay_strings_1, push_display_prop): Set up the bidi
12962 iterator for displaying display or overlay strings.
12963 (forward_to_next_line_start): Don't use the shortcut if
12965 (back_to_previous_visible_line_start): If handle_display_prop
12966 pushed the iterator stack, restore the internal state of the bidi
12967 iterator by calling bidi_pop_it same number of times.
12968 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
12969 and we are bidi-iterating, don't decrement the iterator position;
12970 instead, set the first_elt flag in the bidi iterator, to produce
12972 (reseat_1): Remove redundant setting of string_from_display_prop_p.
12973 (push_display_prop): xassert that we are iterating a buffer.
12974 (push_it, pop_it): Save and restore paragraph_embedding member.
12975 (handle_single_display_spec, next_overlay_string)
12976 (get_overlay_strings_1, reseat_1, reseat_to_string)
12977 (push_display_prop): Set up the `unibyte' member of bidi_it.string
12978 correctly. Don't assume unibyte strings are not bidi-reordered.
12979 (compute_display_string_pos)
12980 (compute_display_string_end): Fix handling the case of C string.
12981 (push_it, pop_it): Save and restore from_disp_prop_p.
12982 (handle_single_display_spec, push_display_prop): Set the
12983 from_disp_prop_p flag.
12984 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
12985 (pop_it): Call iterate_out_of_display_property only if we are
12986 popping after iteration over a string that came from a display
12987 property. Fix a typo in popping stretch info. Add an assertion
12988 for verifying that the iterator position is in sync with the bidi
12990 (handle_single_display_spec, get_overlay_strings_1)
12991 (push_display_prop): Fix initialization of paragraph direction for
12992 string when that of the parent object is not yet determined.
12993 (reseat_1): Call bidi_init_it to resync the bidi
12994 iterator with IT's position. (Bug#7616)
12995 (find_row_edges): If ROW->start.pos gives position
12996 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
12997 (handle_stop, back_to_previous_visible_line_start, reseat_1):
12998 Reset the from_disp_prop_p flag.
12999 (SAVE_IT, RESTORE_IT): New macros.
13000 (pos_visible_p, face_before_or_after_it_pos)
13001 (back_to_previous_visible_line_start)
13002 (move_it_in_display_line_to, move_it_in_display_line)
13003 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13004 (try_scrolling, redisplay_window, display_line): Use them when
13005 saving a temporary copy of the iterator and restoring it back.
13006 (back_to_previous_visible_line_start, reseat_1)
13007 (init_iterator): Empty the bidi cache "stack".
13008 (move_it_in_display_line_to): If iterator ended up at
13009 EOL, but we never saw any buffer positions smaller than
13010 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13011 motion in bidi-reordered lines.
13012 (move_it_in_display_line_to): Record prev_method and prev_pos
13013 immediately before the call to set_iterator_to_next. Fixes cursor
13014 motion in bidi-reordered lines with stretch glyphs and strings
13015 displayed in margins. (Bug#8133) (Bug#8867)
13016 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13018 (pos_visible_p): Support positions in bidi-reordered lines.
13019 Save and restore bidi cache.
13021 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13022 (bidi_paragraph_info): Delete unused struct.
13023 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13024 (bidi_cache_start): New variable.
13025 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13027 (bidi_cache_fetch_state, bidi_cache_search)
13028 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13029 (bidi_cache_find, bidi_peek_at_next_level)
13030 (bidi_level_of_next_char, bidi_find_other_level_edge)
13031 (bidi_move_to_visually_next): Compare cache index with
13032 bidi_cache_start rather than with zero.
13033 (bidi_fetch_char): Accept new argument STRING; all callers
13034 changed. Support iteration over a string. Support strings with
13035 display properties. Support unibyte strings. Fix the type of
13036 `len' according to what STRING_CHAR_AND_LENGTH expects.
13037 (bidi_paragraph_init, bidi_resolve_explicit_1)
13038 (bidi_resolve_explicit, bidi_resolve_weak)
13039 (bidi_level_of_next_char, bidi_move_to_visually_next):
13040 Support iteration over a string.
13041 (bidi_set_sor_type, bidi_resolve_explicit_1)
13042 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13043 can now be zero (for strings); special values 0 and -1 were
13044 changed to -1 and -2, respectively.
13045 (bidi_char_at_pos): New function.
13046 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13047 Call it instead of FETCH_MULTIBYTE_CHAR.
13048 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13049 initialized to valid values.
13050 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13052 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13053 the test for valid cached positions. Fix the logic for looking up
13054 the sentinel state in the cache. GCPRO the Lisp string we are
13056 (bidi_push_it, bidi_pop_it): New functions.
13057 (bidi_initialize): Initialize the bidi cache start stack pointer.
13058 (bidi_cache_ensure_space): New function, refactored from part of
13059 bidi_cache_iterator_state. Don't assume the required size is just
13060 one BIDI_CACHE_CHUNK away.
13061 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13062 (bidi_count_bytes, bidi_char_at_pos): New functions.
13063 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13064 always valid if bidi_cache_idx is valid.
13065 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13066 is valid if it's going to be used.
13067 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13068 (bidi_cache_fetch_state, bidi_cache_search)
13069 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13070 (bidi_cache_iterator_state, bidi_cache_find)
13071 (bidi_find_other_level_edge, bidi_cache_start_stack):
13072 All variables related to cache indices are now EMACS_INT.
13074 * dispextern.h (struct bidi_string_data): New structure.
13075 (struct bidi_it): New member `string'. Make flag members be 1-bit
13076 fields, and put them last in the struct.
13077 (compute_display_string_pos, compute_display_string_end):
13079 (bidi_push_it, bidi_pop_it): Add prototypes.
13080 (struct iterator_stack_entry): New members bidi_p,
13081 paragraph_embedding, and from_disp_prop_p.
13082 (struct it): Member bidi_p is now a bit field 1 bit wide.
13083 (bidi_shelve_cache, bidi_unshelve_cache):
13084 Declare prototypes.
13086 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13087 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13088 and vector-like objects.
13090 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13091 cache around display iteration.
13093 * window.c (Fwindow_end, window_scroll_pixel_based)
13094 (displayed_window_lines, Frecenter): Save and restore the bidi
13095 cache around display iteration.
13097 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13099 * editfns.c (Fdelete_region): Clarify the use of the named
13100 parameters (bug#6788).
13102 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13104 * indent.c (Fvertical_motion): Set and restore w->pointm when
13105 saving and restoring the window's buffer (Bug#9006).
13107 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13109 * editfns.c (Fstring_to_char): Clarify just what is returned
13110 (bug#6576). Text by Eli Zaretskii.
13112 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13114 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13116 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13118 * buffer.c (mmap_find): Fix a typo.
13120 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13122 Fix execution of x selection hooks.
13123 * xselect.c (Qx_lost_selection_functions)
13124 (Qx_sent_selection_functions): New vars.
13125 (syms_of_xselect): DEFSYM them.
13126 (x_handle_selection_request): Pass Qx_sent_selection_functions
13127 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13128 (x_handle_selection_clear,x_clear_frame_selections):
13129 Pass Qx_lost_selection_functions rather than
13130 Vx_lost_selection_functions to Frun_hook_with_args.
13132 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13134 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13135 The old code sometimes used this field without initializing it.
13137 * alloc.c (gc_sweep): Don't read past end of array.
13138 In theory, the old code could also have corrupted Emacs internals,
13139 though it'd be very unlikely.
13141 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13143 * character.c (Fcharacterp): Don't advertise optional ignored
13144 argument. (Bug#4026)
13146 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13148 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13151 * window.c (Fset_window_start): Doc fix (bug#4199).
13152 (Fset_window_hscroll): Ditto.
13154 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13156 Fix minor new problems caught by GCC 4.6.1.
13157 * term.c (init_tty): Remove unused local.
13158 * xsettings.c (store_monospaced_changed): Define this function only
13159 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
13160 not used otherwise.
13162 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
13164 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13166 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13168 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13169 are the mini-buffer and the echo area (bug#3320).
13171 * term.c (init_tty): Remove support for supdup, c10 and perq
13172 terminals, which are no longer supported (bug#1482).
13174 2011-07-10 Johan Bockgård <bojohan@gnu.org>
13176 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13178 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13180 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13181 for non-popups (Bug#3642).
13183 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13185 * alloc.c (reset_malloc_hooks): Protoize.
13186 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
13187 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13188 * cm.c (losecursor): Likewise.
13189 * data.c (fmod): Likewise.
13190 * dispnew.c (swap_glyphs_in_rows): Likewise.
13191 * emacs.c (memory_warning_signal): Likewise.
13192 * floatfns.c (float_error): Likewise.
13193 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13194 (otf_open, font_otf_capability, generate_otf_features)
13195 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13197 * image.c (pbm_read_file): Likewise.
13198 * indent.c (string_display_width): Likewise.
13199 * intervals.c (check_for_interval, search_for_interval)
13200 (inc_interval_count, count_intervals, root_interval)
13201 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13202 * lread.c (defalias): Likewise.
13203 * ralloc.c (r_alloc_check): Likewise.
13204 * regex.c (set_image_of_range_1, set_image_of_range)
13205 (regex_grow_registers): Likewise.
13206 * sysdep.c (strerror): Likewise.
13207 * termcap.c (valid_filename_p, tprint, main): Likewise.
13208 * tparam.c (main): Likewise.
13209 * unexhp9k800.c (run_time_remap, save_data_space)
13210 (update_file_ptrs, read_header, write_header, calculate_checksum)
13211 (copy_file, copy_rest, display_header): Likewise.
13212 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13214 * xdisp.c (check_it): Likewise.
13215 * xfaces.c (register_color, unregister_color, unregister_colors):
13217 * xfns.c (print_fontset_result): Likewise.
13218 * xrdb.c (member, fatal, main): Likewise.
13220 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13222 Fix minor problems found by static checking (Bug#9031).
13223 * chartab.c (char_table_set_range, map_sub_char_table):
13224 Remove unused locals.
13225 (uniprop_table): Now static.
13226 * composite.c (_work_char): Remove unused static var.
13228 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
13230 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13232 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13234 * gtkutil.c (qttip_cb): Remove code without function.
13236 2011-07-09 Eli Zaretskii <eliz@gnu.org>
13238 * w32.c (pthread_sigmask): New stub.
13240 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
13242 Use pthread_sigmask, not sigprocmask (Bug#9010).
13243 sigprocmask is portable only for single-threaded applications, and
13244 Emacs can be multi-threaded when it uses GTK.
13245 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13247 * callproc.c (Fcall_process):
13248 * process.c (create_process):
13249 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13250 Use pthread_sigmask, not sigprocmask.
13252 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13254 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13255 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13258 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13260 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13261 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13262 (xg_hide_tooltip): Fix comment.
13264 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13265 in registerServicesMenuSendTypes.
13266 (validRequestorForSendType): Don't check ns_return_types.
13268 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13271 2011-07-08 Jason Rumney <jasonr@gnu.org>
13273 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13274 SH_SHOW for hidden windows (Bug#5482).
13276 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13277 frame struct members of non-existent frames (Bug#6284).
13279 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13281 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13282 variable firstTime not needed on OSX >= 10.6.
13283 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13284 >= 10.5. Use setKnobProportion, setDoubleValue.
13286 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13287 (MAC_OS_X_VERSION_10_5): Define if not defined.
13288 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13289 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13290 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13292 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
13293 cString and lossyCString on OSX >= 10.4.
13295 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
13296 sizeToFit on OSX >= 10.2.
13298 * nsimage.m (allocInitFromFile): Don't use deprecated method
13299 bestRepresentationForDevice on OSX >= 10.6.
13301 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13304 * emacs.c: Declare unexec_init_emacs_zone.
13306 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13308 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13310 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13311 on svcsMenu (Bug#8842).
13313 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13315 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13317 * nsterm.m (QUTF8_STRING): Declare.
13318 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
13319 (validRequestorForSendType): Return type is (id).
13320 Change indexOfObjectIdenticalTo to indexOfObject.
13321 Check if we have local selection before returning self (Bug#8842).
13322 (writeSelectionToPasteboard): Put local selection into paste board
13323 if we have a local selection (Bug#8842).
13324 (syms_of_nsterm): DEFSYM QUTF8_STRING.
13326 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
13327 (ns_get_local_selection): Declare.
13329 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
13331 * keymap.c (describe_map_tree): Don't insert a double newline at
13332 the end of the buffer (bug#1169) and return whether we inserted
13335 * callint.c (Fcall_interactively): Change "reading args" to
13336 "providing args" to try to clarify what it does (bug#1010).
13338 2011-07-07 Kenichi Handa <handa@m17n.org>
13340 * composite.c (composition_compute_stop_pos): Ignore a static
13341 composition starting before CHARPOS (Bug#8915).
13343 * xdisp.c (handle_composition_prop): Likewise.
13345 2011-07-07 Eli Zaretskii <eliz@gnu.org>
13347 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
13350 2011-07-07 Kenichi Handa <handa@m17n.org>
13352 * character.h (unicode_category_t): New enum type.
13354 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
13355 (Qchar_code_property_table): New variable.
13356 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
13357 (UNIPROP_COMPRESSED_FORM_P): New macros.
13358 (char_table_ascii): Uncompress the compressed values.
13359 (sub_char_table_ref): New arg is_uniprop. Callers changed.
13360 Uncompress the compressed values.
13361 (sub_char_table_ref_and_range): Likewise.
13362 (char_table_ref_and_range): Uncompress the compressed values.
13363 (sub_char_table_set): New arg is_uniprop. Callers changed.
13364 Uncompress the compressed values.
13365 (sub_char_table_set_range): Args changed. Callers changed.
13366 (char_table_set_range): Adjuted for the above change.
13367 (map_sub_char_table): Delete args default_val and parent. Add arg
13368 top. Give decoded values to a Lisp function.
13369 (map_char_table): Adjust for the above change. Give decoded
13370 values to a Lisp function. Gcpro more variables.
13371 (uniprop_table_uncompress)
13372 (uniprop_decode_value_run_length): New functions.
13373 (uniprop_decoder, uniprop_decoder_count): New variables.
13374 (uniprop_get_decoder, uniprop_encode_value_character)
13375 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
13377 (uniprop_encoder, uniprop_encoder_count): New variables.
13378 (uniprop_get_encoder, uniprop_table)
13379 (Funicode_property_table_internal, Fget_unicode_property_internal)
13380 (Fput_unicode_property_internal): New functions.
13381 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
13382 Sunicode_property_table_internal, Sget_unicode_property_internal,
13383 and Sput_unicode_property_internal. Defvar_lisp
13384 char-code-property-alist.
13386 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
13387 Vunicode_category_table.
13389 * font.c (font_range): Adjust for the change of
13390 Vunicode_category_table.
13392 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
13394 * m/iris4d.h: Remove file, move contents ...
13395 * s/irix6-5.h: ... here.
13397 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
13399 Remove unportable assumption about struct layout (Bug#8884).
13400 * alloc.c (mark_buffer):
13401 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
13402 (clone_per_buffer_values): Don't assume that
13403 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
13404 This isn't true in general, and it's particularly not true
13405 if Emacs is configured with --with-wide-int.
13406 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
13407 New macros, used in the buffer.c change.
13409 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
13411 * xsettings.c: Use both GConf and GSettings if both are available.
13412 (store_config_changed_event): Add comment.
13413 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
13414 (store_tool_bar_style_changed): New functions.
13415 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
13416 (struct xsettings): Move font inside HAVE_XFT.
13417 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
13418 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
13419 Move inside HAVE_XFT.
13420 (something_changed_gsettingsCB): Rename from something_changedCB.
13421 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
13423 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
13424 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
13425 (something_changed_gconfCB): Rename from something_changedCB.
13426 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
13427 (parse_settings): Move check for font inside HAVE_XFT.
13428 (read_settings, apply_xft_settings): Add comment.
13429 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
13430 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
13431 call store_font_name_changed.
13432 (xft_settings_event): Add comment.
13433 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
13434 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
13435 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
13436 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
13437 (xsettings_initialize): Call init_gsettings last.
13438 (xsettings_get_system_font, xsettings_get_system_normal_font):
13441 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
13443 Random fixes. E.g., (random) never returned negative values.
13444 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
13445 subseconds part to the entropy, as that's a bit more random.
13446 Prefer signed to unsigned, since the signedness doesn't matter and
13447 in general we prefer signed. When given a limit, use a
13448 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
13449 latter isn't right if USE_2_TAGS_FOR_INTS.
13450 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
13451 not 0..VALMASK. Don't discard "excess" bits that random () returns.
13453 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
13455 * textprop.c (text_property_stickiness):
13456 Obey Vtext_property_default_nonsticky.
13457 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
13458 * w32fns.c (syms_of_w32fns):
13459 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
13461 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13463 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
13464 This is more efficient than Ffile_directory_p and avoids a minor race.
13466 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
13468 * buffer.c (Foverlay_put): Say what the return value is
13471 * fileio.c (barf_or_query_if_file_exists): Check first if the file
13472 is a directory before asking whether to use the file name
13474 (barf_or_query_if_file_exists): Make the "File is a directory"
13475 error be more correct.
13477 * fns.c (Frequire): Remove the mention of the .gz files, since
13478 that's installation-specific, but keep the mention of
13479 `get-load-suffixes'.
13481 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13483 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
13484 Report string overflow if the output is too long.
13486 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
13488 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
13489 (syms_of_gnutls): Remove duplicate DEFSYM for
13490 Qgnutls_bootprop_verify_hostname_error, an error for
13491 Qgnutls_bootprop_verify_error (which is no longer used).
13493 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
13494 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
13495 Also (re)move comments that are misplaced or no longer relevant.
13497 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13499 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
13501 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
13503 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
13504 and background color parameters if they have been changed.
13506 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13508 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
13510 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
13512 * xsettings.c (SYSTEM_FONT): Define only when used.
13513 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
13515 * keymap.c (access_keymap_1): Now static.
13517 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
13519 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
13520 leave any prefix arg for the up event (Bug#1586).
13522 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
13524 * lread.c (syms_of_lread): Mention single symbols defined by
13525 `defvar' or `defconst' (bug#7154).
13527 * fns.c (Frequire): Mention .el.gz files (bug#7314).
13528 (Frequire): Mention get-load-suffixes.
13530 2011-07-02 Martin Rudalics <rudalics@gmx.at>
13532 * window.h (window): Remove clone_number slot.
13533 * window.c (Fwindow_clone_number, Fset_window_clone_number):
13535 (make_parent_window, make_window, saved_window)
13536 (Fset_window_configuration, save_window_save): Don't deal with
13538 * buffer.c (Qclone_number): Remove declaration.
13539 (sort_overlays, overlay_strings): Don't deal with clone numbers.
13541 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
13543 Add multiple inheritance to keymaps.
13544 * keymap.c (Fmake_composed_keymap): New function.
13545 (Fset_keymap_parent): Simplify.
13546 (fix_submap_inheritance): Remove.
13547 (access_keymap_1): New function extracted from access_keymap to handle
13548 embedded parents and handle lists of maps.
13549 (access_keymap): Use it.
13550 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
13551 (Fcopy_keymap): Handle embedded parents.
13552 (Fcommand_remapping, define_as_prefix): Simplify.
13553 (Fkey_binding): Simplify.
13554 (syms_of_keymap): Move minibuffer-local-completion-map,
13555 minibuffer-local-filename-completion-map,
13556 minibuffer-local-must-match-map, and
13557 minibuffer-local-filename-must-match-map to Elisp.
13558 (syms_of_keymap): Defsubr make-composed-keymap.
13559 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
13560 (parse_menu_item): Trivial simplification.
13562 2011-07-01 Glenn Morris <rgm@gnu.org>
13564 * Makefile.in (SETTINGS_LIBS): Fix typo.
13566 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
13568 * coding.c (Fencode_coding_string): Record the last coding system
13569 used, as the function doc string says (bug#8738).
13571 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
13573 * xsettings.c (store_monospaced_changed): Take new font as arg and
13574 check for change against current_mono_font.
13575 (EMACS_TYPE_SETTINGS): Remove this and related defines.
13576 (emacs_settings_constructor, emacs_settings_get_property)
13577 (emacs_settings_set_property, emacs_settings_class_init)
13578 (emacs_settings_init, gsettings_obj): Remove.
13579 (something_changedCB): New function for HAVE_GSETTINGS.
13580 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
13581 with value as argument.
13582 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
13583 g_settings_new (Bug#8967). Do not create gsettings_obj.
13584 Remove calls to g_settings_bind. Connect something_changedCB to
13587 * xgselect.c: Add defined (HAVE_GSETTINGS).
13588 (xgselect_initialize): Ditto.
13590 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
13591 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
13594 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
13596 * eval.c (struct backtrace): Simplify and port the data structure.
13597 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
13598 signed bit field, as this assumption is not portable and it makes
13599 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
13600 "char debug_on_exit : 1" as this is not portable either; instead,
13601 use the portable "unsigned int debug_on_exit : 1". Remove unused
13602 member evalargs. Remove obsolete comments about cc bombing out.
13604 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
13606 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
13607 Let HAVE_GSETTINGS override HAVE_GCONF.
13608 (store_monospaced_changed): New function.
13609 (EMACS_SETTINGS): A new type derived from GObject to handle
13610 GSettings notifications.
13611 (emacs_settings_constructor, emacs_settings_get_property)
13612 (emacs_settings_set_property, emacs_settings_class_init):
13614 (gsettings_client, gsettings_obj): New variables.
13615 (GSETTINGS_SCHEMA): New define.
13616 (something_changedCB): Call store_monospaced_changed.
13617 (init_gsettings): New function.
13618 (xsettings_initialize): Call init_gsettings.
13619 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
13622 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
13625 2011-06-29 Martin Rudalics <rudalics@gmx.at>
13627 * window.c (resize_root_window, grow_mini_window)
13628 (shrink_mini_window): Rename Qresize_root_window to
13629 Qwindow_resize_root_window and Qresize_root_window_vertically to
13630 Qwindow_resize_root_window_vertically.
13632 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
13634 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
13636 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
13638 * makefile.w32-in: Redesign dependencies so they reflect more
13639 clearly which files are directly included by each source file,
13640 and not through other includes.
13642 2011-06-27 Martin Rudalics <rudalics@gmx.at>
13644 * buffer.c (Qclone_number): Declare static and DEFSYM it.
13645 (sort_overlays, overlay_strings): When an overlay's clone number
13646 matches the window's clone number process the overlay even if
13647 the overlay's window property doesn't match the current window.
13649 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
13650 (Fwindow_hchild): Rename to Fwindow_left_child.
13651 (Fwindow_next): Rename to Fwindow_next_sibling.
13652 (Fwindow_prev): Rename to Fwindow_prev_sibling.
13653 (resize_window_check): Rename to window_resize_check.
13654 (resize_window_apply): Rename to window_resize_apply.
13655 (Fresize_window_apply): Rename to Fwindow_resize_apply.
13656 (Fdelete_other_windows_internal, resize_frame_windows)
13657 (Fsplit_window_internal, Fdelete_window_internal)
13658 (grow_mini_window, shrink_mini_window)
13659 (Fresize_mini_window_internal): Fix callers accordingly.
13661 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
13663 * emacsgtkfixed.h: State that this is only used with Gtk+3.
13664 (emacs_fixed_set_min_size): Remove.
13665 (emacs_fixed_new): Take frame as argument.
13667 * emacsgtkfixed.c: State that this is only used with Gtk+3.
13668 (_EmacsFixedPrivate): Remove minwidth/height.
13669 Add struct frame *f.
13670 (emacs_fixed_init): Initialize priv->f.
13671 (get_parent_class, emacs_fixed_set_min_size): Remove.
13672 (emacs_fixed_new): Set priv->f to argument.
13673 (emacs_fixed_get_preferred_width)
13674 (emacs_fixed_get_preferred_height): Use min_width/height from
13675 frames size_hint to set minimum and natural (Bug#8919).
13676 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
13677 and use min_width/height from frames size_hint to set
13678 min_width/height (Bug#8919).
13680 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
13681 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
13684 2011-06-26 Eli Zaretskii <eliz@gnu.org>
13686 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
13687 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
13690 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
13692 * process.c (wait_reading_process_output): Bypass select if
13693 waiting for a cell while ignoring keyboard input, and input is
13694 pending. Suggested by Jan Djärv (Bug#8869).
13696 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
13698 Use gnulib's dup2 module instead of rolling our own.
13699 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
13701 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13703 * dispnew.c (scrolling_window): Before scrolling, turn off a
13704 mouse-highlight in the window being scrolled.
13706 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
13708 Move DEFSYM to lisp.h and use everywhere.
13710 * character.h (DEFSYM): Move declaration...
13711 * lisp.h (DEFSYM): ...here.
13717 * w32select.c: Don't include character.h.
13719 * alloc.c (syms_of_alloc):
13720 * buffer.c (syms_of_buffer):
13721 * bytecode.c (syms_of_bytecode):
13722 * callint.c (syms_of_callint):
13723 * casefiddle.c (syms_of_casefiddle):
13724 * casetab.c (init_casetab_once):
13725 * category.c (init_category_once, syms_of_category):
13726 * ccl.c (syms_of_ccl):
13727 * cmds.c (syms_of_cmds):
13728 * composite.c (syms_of_composite):
13729 * dbusbind.c (syms_of_dbusbind):
13730 * dired.c (syms_of_dired):
13731 * dispnew.c (syms_of_display):
13732 * doc.c (syms_of_doc):
13733 * editfns.c (syms_of_editfns):
13734 * emacs.c (syms_of_emacs):
13735 * eval.c (syms_of_eval):
13736 * fileio.c (syms_of_fileio):
13737 * fns.c (syms_of_fns):
13738 * frame.c (syms_of_frame):
13739 * fringe.c (syms_of_fringe):
13740 * insdel.c (syms_of_insdel):
13741 * keymap.c (syms_of_keymap):
13742 * lread.c (init_obarray, syms_of_lread):
13743 * macros.c (syms_of_macros):
13744 * msdos.c (syms_of_msdos):
13745 * print.c (syms_of_print):
13746 * process.c (syms_of_process):
13747 * search.c (syms_of_search):
13748 * sound.c (syms_of_sound):
13749 * syntax.c (init_syntax_once, syms_of_syntax):
13750 * terminal.c (syms_of_terminal):
13751 * textprop.c (syms_of_textprop):
13752 * undo.c (syms_of_undo):
13753 * w32.c (globals_of_w32):
13754 * window.c (syms_of_window):
13755 * xdisp.c (syms_of_xdisp):
13756 * xfaces.c (syms_of_xfaces):
13757 * xfns.c (syms_of_xfns):
13758 * xmenu.c (syms_of_xmenu):
13759 * xsettings.c (syms_of_xsettings):
13760 * xterm.c (syms_of_xterm): Use DEFSYM.
13762 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
13764 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
13766 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
13768 Integer and buffer overflow fixes (Bug#8873).
13770 * print.c (printchar, strout): Check for string overflow.
13771 (PRINTPREPARE, printchar, strout):
13772 Don't set size unless allocation succeeds.
13774 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
13775 for sizes. Check for string overflow more accurately.
13776 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
13778 * macros.c: Integer and buffer overflow fixes.
13779 * keyboard.h (struct keyboard.kbd_macro_bufsize):
13780 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
13781 Use ptrdiff_t, not int, for sizes.
13782 Don't increment bufsize until after realloc succeeds.
13783 Check for size-calculation overflow.
13784 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
13786 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
13788 * lread.c: Integer overflow fixes.
13789 (read_integer): Radix is now EMACS_INT, not int,
13790 to improve quality of diagnostics for out-of-range radices.
13791 Calculate buffer size correctly for out-of-range radices.
13792 (read1): Check for integer overflow in radices, and in
13793 read-circle numbers.
13794 (read_escape): Avoid int overflow.
13795 (Fload, openp, read_buffer_size, read1)
13796 (substitute_object_recurse, read_vector, read_list, map_obarray):
13797 Use ptrdiff_t, not int, for sizes.
13798 (read1): Use EMACS_INT, not int, for sizes.
13799 Check for size overflow.
13801 * image.c (cache_image): Check for size arithmetic overflow.
13803 * lread.c: Integer overflow issues.
13804 (saved_doc_string_size, saved_doc_string_length)
13805 (prev_saved_doc_string_size, prev_saved_doc_string_length):
13806 Now ptrdiff_t, not int.
13807 (read1): Don't assume doc string length fits in int. Check for
13808 out-of-range doc string lengths.
13809 (read_list): Don't assume file position fits in int.
13810 (read_escape): Check for hex character overflow.
13812 2011-06-22 Leo Liu <sdl.web@gmail.com>
13814 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
13815 Move to minibuffer.el.
13817 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
13819 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
13820 The following patches are for when GLYPH_DEBUG && !XASSERT.
13821 * dispextern.h (trace_redisplay_p, dump_glyph_string):
13822 * dispnew.c (flush_stdout):
13823 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
13824 Mark as externally visible.
13825 * dispnew.c (check_window_matrix_pointers): Now static.
13826 * dispnew.c (window_to_frame_vpos):
13827 * xfns.c (unwind_create_frame):
13828 * xterm.c (x_check_font): Remove unused local.
13829 * scroll.c (CHECK_BOUNDS):
13830 * xfaces.c (cache_fache): Rename local to avoid shadowing.
13831 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
13832 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
13833 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
13834 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
13836 (debug_method_add): Use va_list and vsprintf rather than relying
13837 on undefined behavior with wrong number of arguments.
13838 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
13839 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
13840 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
13841 since we're not interested in debugging glyphs with old libraries.
13842 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
13843 GCC 4.6.0's static checking.
13845 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
13847 Integer overflow and signedness fixes (Bug#8873).
13848 A few related buffer overrun fixes, too.
13850 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
13852 * dispextern.h (struct face.stipple):
13853 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
13854 (x_bitmap_mask, x_allocate_bitmap_record)
13855 (x_create_bitmap_from_data, x_create_bitmap_from_file)
13856 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
13857 (x_create_bitmap_from_xpm_data):
13858 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
13859 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
13861 * xfaces.c (load_pixmap):
13862 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
13863 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
13864 (.bitmaps_last, struct x_output.icon_bitmap):
13865 Use ptrdiff_t, not int, for bitmap indexes.
13866 (x_allocate_bitmap_record): Check for size overflow.
13867 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
13869 Use ptrdiff_t, not int, for overlay counts.
13870 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
13871 * editfns.c (overlays_around, get_pos_property):
13872 * textprop.c (get_char_property_and_overlay):
13873 * xdisp.c (next_overlay_change, note_mouse_highlight):
13874 * xfaces.c (face_at_buffer_position):
13875 * buffer.c (OVERLAY_COUNT_MAX): New macro.
13876 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
13877 (Fnext_overlay_change, Fprevious_overlay_change)
13878 (mouse_face_overlay_overlaps, Foverlays_in):
13879 Use ptrdiff_t, not int, for sizes.
13880 (overlays_at, overlays_in): Check for size-calculation overflow.
13882 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
13884 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
13885 (x_session_initialize): Do not assume string length fits in int.
13887 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
13888 This is unlikely, but can occur if DPI is outlandish.
13890 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
13891 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
13893 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
13894 * xrdb.c (magic_file_p, search_magic_path):
13895 Omit last arg SUFFIX; it was always 0. All callers changed.
13896 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
13898 * xfont.c (xfont_match): Avoid need for strlen.
13900 * xfns.c: Don't assume strlen fits in int.
13901 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
13903 * xdisp.c (message_log_check_duplicate): Return intmax_t,
13904 not unsigned long, as we prefer signed integers. All callers changed.
13905 Detect integer overflow in repeat count.
13906 (message_dolog): Don't assume print length fits in 39 bytes.
13907 (display_mode_element): Don't assume strlen fits in int.
13909 * termcap.c: Don't assume sizes fit in int and never overflow.
13910 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
13911 (gobble_line): Check for size-calculation overflow.
13913 * minibuf.c (Fread_buffer):
13914 * lread.c (intern, intern_c_string):
13915 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
13916 Don't assume string length fits in int.
13918 * keyboard.c (parse_tool_bar_item):
13919 * gtkutil.c (style_changed_cb): Avoid need for strlen.
13921 * font.c: Don't assume string length fits in int.
13922 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
13923 Use ptrdiff_t, not int.
13924 (font_intern_prop): Don't assume string length fits in int.
13925 Don't assume integer property fits in fixnum.
13926 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
13928 * filelock.c: Fix some buffer overrun and integer overflow issues.
13929 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
13930 Reformulate so as not to need the command string.
13931 Invoke gzip -cd rather than gunzip, as it's more portable.
13932 (lock_info_type, lock_file_1, lock_file):
13933 Don't assume pid_t and time_t fit in unsigned long.
13934 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
13935 (current_lock_owner): Prefer signed type for sizes.
13936 Use memcpy, not strncpy, where memcpy is what is really wanted.
13937 Don't assume (via atoi) that time_t and pid_t fit in int.
13938 Check for time_t and/or pid_t out of range, e.g., via a network share.
13939 Don't alloca where an auto var works fine.
13941 * fileio.c: Fix some integer overflow issues.
13942 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
13943 Don't assume string length fits in int.
13944 (directory_file_name): Don't assume string length fits in long.
13945 (make_temp_name): Don't assume pid fits in int, or that its print
13946 length is less than 20.
13948 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
13950 * coding.c (make_subsidiaries): Don't assume string length fits in int.
13952 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
13954 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
13955 We prefer signed integers, even for size calculations.
13957 * emacs.c: Don't assume string length fits in 'int'.
13958 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
13959 (main): Don't invoke strlen when not needed.
13961 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
13962 (XD_DEBUG_MESSAGE): Don't waste a byte.
13964 * callproc.c (getenv_internal_1, getenv_internal)
13965 (Fgetenv_internal):
13966 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
13968 * lread.c (invalid_syntax): Omit length argument.
13969 All uses changed. This doesn't fix a bug, but it simplifies the
13970 code away from its former Hollerith-constant appearance, and it's
13971 one less 'int' to worry about when looking at integer-overflow issues.
13972 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
13974 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
13975 This didn't break anything, but it didn't help either.
13976 It's confusing to put a bogus integer in a place where the actual
13977 value does not matter.
13978 (LIST_END_P): Remove unused macro and its bogus comment.
13979 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
13981 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
13982 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
13984 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
13985 We prefer signed types, and the value cannot exceed the EMACS_INT
13986 range anyway (because otherwise the length would not be representable).
13987 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
13988 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
13989 This avoids a GCC warning when WIDE_EMACS_INT.
13991 * indent.c (sane_tab_width): New function.
13992 (current_column, scan_for_column, Findent_to, position_indentation)
13993 (compute_motion): Use it. This is just for clarity.
13994 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
13996 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
13998 * lisp.h (lint_assume): New macro.
13999 * composite.c (composition_gstring_put_cache):
14000 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14002 * editfns.c, insdel.c:
14003 Omit unnecessary forward decls, to simplify future changes.
14005 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14007 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14009 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14010 Use much-faster test for byte-length change.
14011 Don't assume string byte-length fits in 'int'.
14012 Check that character arg fits in 'int'.
14013 (mapcar1): Declare byte as byte, for clarity.
14015 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14017 * fns.c (concat): Catch string overflow earlier.
14018 Do not rely on integer wraparound.
14020 * dispextern.h (struct it.overlay_strings_charpos)
14021 (struct it.selective): Now EMACS_INT, not int.
14022 * xdisp.c (forward_to_next_line_start)
14023 (back_to_previous_visible_line_start)
14024 (reseat_at_next_visible_line_start, next_element_from_buffer):
14025 Don't arbitrarily truncate the value of 'selective' to int.
14027 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14029 * composite.c: Don't truncate sizes to 'int'.
14030 (composition_gstring_p, composition_reseat_it)
14031 (composition_adjust_point): Use EMACS_INT, not int.
14032 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14033 not EMACS_UINT, for indexes.
14035 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14037 * buffer.c: Include <verify.h>.
14038 (struct sortvec.priority, struct sortstr.priority):
14039 Now EMACS_INT, not int.
14040 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14041 (struct sortstr.size, record_overlay_string)
14042 (struct sortstrlist.size, struct sortlist.used):
14043 Don't truncate size to int.
14044 (record_overlay_string): Check for size-calculation overflow.
14045 (init_buffer_once): Check at compile-time, not run-time.
14047 2011-06-22 Jim Meyering <meyering@redhat.com>
14049 Don't leak an XBM-image-sized buffer
14050 * image.c (xbm_load): Free the image buffer after using it.
14052 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14055 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14056 that Sun C diagnosed.
14057 * fns.c (secure_hash): Fix pointer signedness issue.
14058 * intervals.c (static_offset_intervals): New function.
14059 (offset_intervals): Use it.
14061 2011-06-21 Leo Liu <sdl.web@gmail.com>
14064 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14067 * fns.c (secure_hash): Rename from crypto_hash_function and change
14068 the first arg to accept symbols.
14069 (Fsecure_hash): New primitive.
14070 (syms_of_fns): New symbols.
14072 2011-06-20 Deniz Dogan <deniz@dogan.se>
14074 * process.c (Fset_process_buffer): Clarify return value in
14077 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14079 * dispnew.c (add_window_display_history): Use BVAR.
14081 * xdisp.c (debug_method_add): Use BVAR.
14082 (check_window_end, dump_glyph_matrix, dump_glyph)
14083 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14085 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14088 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14089 check till after the cache is created in init_frame_faces.
14091 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14093 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14095 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14097 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14098 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14099 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14101 Improve buffer-overflow checking (Bug#8873).
14102 * fileio.c (Finsert_file_contents):
14103 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14104 Remove the old (too-loose) buffer overflow checks.
14105 They weren't needed, since make_gap checks for buffer overflow.
14106 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14107 The old code merely checked for Emacs fixnum overflow, and relied
14108 on undefined (wraparound) behavior. The new code avoids undefined
14109 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14111 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14112 Tune. Don't use wider integers than needed. Don't use alloca.
14113 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14115 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14117 * insdel.c, lisp.h (buffer_overflow): New function.
14118 (insert_from_buffer_1, replace_range, replace_range_2):
14119 * insdel.c (make_gap_larger):
14120 * editfns.c (Finsert_char):
14121 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14123 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14125 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14127 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14129 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14130 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14132 * fileio.c: Don't assume EMACS_INT fits in off_t.
14133 (emacs_lseek): New static function.
14134 (Finsert_file_contents, Fwrite_region): Use it.
14135 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14137 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14139 * fns.c: Don't overflow int when computing a list length.
14140 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14141 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14142 truncation on 64-bit hosts. Check for QUIT every
14143 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14144 faster and is responsive enough.
14145 (Flength): Report an error instead of overflowing an integer.
14146 (Fsafe_length): Return a float if the value is not representable
14147 as a fixnum. This shouldn't happen except in contrived situations.
14148 (Fnthcdr, Fsort): Don't assume list length fits in int.
14149 (Fcopy_sequence): Don't assume vector length fits in int.
14151 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14152 (header_size, word_size): New constants.
14153 (allocate_vectorlike): Don't check size overflow here.
14154 (allocate_vector): Check it here instead, since this is the only
14155 caller of allocate_vectorlike that could cause overflow.
14156 Check that the new vector's length is representable as a fixnum.
14158 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14159 The previous code was bogus. For example, next_almost_prime (32)
14160 returned 39, which is undesirable as it is a multiple of 3; and
14161 next_almost_prime (24) returned 25, which is a multiple of 5 so
14162 why was the code bothering to check for multiples of 7?
14164 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14166 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14168 Variadic C functions now count arguments with ptrdiff_t.
14169 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14170 Back then I didn't know that the Emacs coding style prefers signed int.
14171 Also, in the meantime I found a few more instances where arguments
14172 were being counted with int, which may truncate counts on 64-bit
14173 machines, or EMACS_INT, which may be unnecessarily wide.
14174 * lisp.h (struct Lisp_Subr.function.aMANY)
14175 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14176 Arg counts are now ptrdiff_t, not size_t.
14177 All variadic functions and their callers changed accordingly.
14178 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14179 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14180 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14181 * callint.c (Fcall_interactively): Check arg count for overflow,
14182 to avoid potential buffer overrun. Use signed char, not 'int',
14183 for 'varies' array, so that we needn't bother to check its size
14184 calculation for overflow.
14185 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14186 * eval.c (apply_lambda):
14187 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14188 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14189 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14191 * callint.c (Fcall_interactively): Don't use index var as event count.
14193 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14194 * mem-limits.h (SIZE): Remove; no longer used.
14196 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
14198 Remove unnecessary casts.
14199 * xterm.c (x_term_init):
14200 * xfns.c (x_set_border_pixel):
14201 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14202 These aren't needed now that we assume ANSI C.
14204 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14205 It's more likely to cause problems (due to unsigned overflow)
14208 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14210 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14212 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14214 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14216 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14218 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14220 GLYPH_CODE_FACE returns EMACS_INT, not int.
14221 * dispextern.h (merge_faces):
14222 * xfaces.c (merge_faces):
14223 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14224 Don't assume EMACS_INT fits in int.
14226 * character.h (CHAR_VALID_P): Remove unused parameter.
14227 * fontset.c, lisp.h, xdisp.c: All uses changed.
14229 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14231 * fns.c (concat): Minor tuning based on overflow analysis.
14232 This doesn't fix any bugs. Use int to hold character, instead
14233 of constantly refetching from Emacs object. Use XFASTINT, not
14234 XINT, for value known to be a character. Don't bother comparing
14235 a single byte to 0400, as it's always less.
14237 * floatfns.c (Fexpt):
14238 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14240 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14243 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14245 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14246 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14247 incorrectly succeed when S was a string, because 4294967386 was
14248 truncated before it was used.
14250 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14251 Otherwise, an out-of-range integer could cause undefined behavior
14254 * composite.c: Use int, not EMACS_INT, for characters.
14255 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14256 EMACS_INT, for values that are known to be in character range.
14257 This doesn't fix any bugs but is the usual style inside Emacs and
14258 may generate better code on 32-bit machines.
14260 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14261 This is for reasons similar to the recent CHAR_STRING fix.
14262 * charset.c (Fencode_char): Check that character arg is actually
14263 a character. Pass an int to ENCODE_CHAR.
14264 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14265 wider than 'int', as a compile-time check to prevent future regressions
14268 * character.c (char_string): Remove unnecessary casts.
14270 Make sure a 64-bit char is never passed to CHAR_STRING.
14271 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14272 by silently ignoring the top 32 bits, allowing some values
14273 that were far too large to be valid characters.
14274 * character.h: Include <verify.h>.
14275 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14276 arguments are no wider than unsigned, as a compile-time check
14277 to prevent future regressions in this area.
14279 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
14280 (Fsubst_char_in_region):
14282 * xdisp.c (decode_mode_spec_coding):
14283 Adjust to CHAR_STRING's new requirement.
14284 * editfns.c (Finsert_char, Fsubst_char_in_region):
14285 * fns.c (concat): Check that character args are actually
14286 characters. Without this test, these functions did the wrong
14287 thing with wildly out-of-range values on 64-bit hosts.
14289 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14290 These casts should not be needed on 32-bit hosts, either.
14291 * keyboard.c (read_char):
14292 * lread.c (Fload): Remove casts to unsigned.
14294 * lisp.h (UNSIGNED_CMP): New macro.
14295 This fixes comparison bugs on 64-bit hosts.
14296 (ASCII_CHAR_P): Use it.
14297 * casefiddle.c (casify_object):
14298 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
14299 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14300 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14301 * dispextern.h (FACE_FROM_ID):
14302 * keyboard.c (read_char): Use UNSIGNED_CMP.
14304 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14305 not to EMACS_INT, to avoid GCC warning.
14307 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14309 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14310 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14311 isn't needed on 32-bit machines.
14313 * buffer.c (Fgenerate_new_buffer_name):
14314 Use EMACS_INT for count, not int.
14315 (advance_to_char_boundary): Return EMACS_INT, not int.
14317 * data.c (Qcompiled_function): Now static.
14319 * window.c (window_body_lines): Now static.
14321 * image.c (gif_load): Rename local to avoid shadowing.
14323 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
14324 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
14325 * alloc.c (make_save_value): Integer argument is now of type
14326 ptrdiff_t, not int.
14327 (mark_object): Use ptrdiff_t, not int.
14328 * lisp.h (pD): New macro.
14329 * print.c (print_object): Use it.
14331 * alloc.c: Use EMACS_INT, not int, to count objects.
14332 (total_conses, total_markers, total_symbols, total_vector_size)
14333 (total_free_conses, total_free_markers, total_free_symbols)
14334 (total_free_floats, total_floats, total_free_intervals)
14335 (total_intervals, total_strings, total_free_strings):
14336 Now EMACS_INT, not int. All uses changed.
14337 (Fgarbage_collect): Compute overall total using a double, so that
14338 integer overflow is less likely to be a problem. Check for overflow
14339 when converting back to an integer.
14340 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
14341 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
14342 These were 'int' variables that could overflow on 64-bit hosts;
14343 they were never used, so remove them instead of repairing them.
14344 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
14345 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
14346 Previously, this ceilinged at INT_MAX, but that doesn't work on
14348 (allocate_pseudovector): Don't use EMACS_INT when int would do.
14350 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
14351 (allocate_vectorlike): Check for ptrdiff_t overflow.
14352 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
14353 when a (possibly-narrower) signed value would do just as well.
14354 We prefer using signed arithmetic, to avoid comparison confusion.
14356 * alloc.c: Catch some string size overflows that we were missing.
14357 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
14358 for convenience in STRING_BYTES_MAX.
14359 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
14360 The definition here is exact; the one in lisp.h was approximate.
14361 (allocate_string_data): Check for string overflow. This catches
14362 some instances we weren't catching before. Also, it catches
14363 size_t overflow on (unusual) hosts where SIZE_MAX <= min
14364 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
14365 and ptrdiff_t and EMACS_INT are both 64 bits.
14367 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
14368 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
14369 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
14371 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
14373 * alloc.c (Fmake_string): Check for out-of-range init.
14375 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
14377 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
14379 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
14381 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
14382 xg_get_default_scrollbar_width.
14384 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
14385 (int_gtk_range_get_value): Move to the scroll bar part of the file.
14386 (style_changed_cb): Call update_theme_scrollbar_width and call
14387 x_set_scroll_bar_default_width and xg_frame_set_char_size for
14388 all frames (Bug#8505).
14389 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
14390 Call gtk_window_set_resizable if HAVE_GTK3.
14391 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
14392 and height if HAVE_GTK3 (Bug#8505).
14393 (scroll_bar_width_for_theme): New variable.
14394 (update_theme_scrollbar_width): New function.
14395 (xg_get_default_scrollbar_width): Move code to
14396 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
14397 (xg_initialize): Call update_theme_scrollbar_width.
14399 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
14401 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
14403 2011-06-12 Martin Rudalics <rudalics@gmx.at>
14405 * frame.c (make_frame): Call other_buffer_safely instead of
14408 * window.c (temp_output_buffer_show): Call display_buffer with
14409 second argument Vtemp_buffer_show_specifiers and reset latter
14410 immediately after the call.
14411 (Vtemp_buffer_show_specifiers): New variable.
14412 (auto_window_vscroll_p, next_screen_context_lines)
14413 (Vscroll_preserve_screen_position): Remove leading asterisks from
14416 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
14418 Fix minor problems found by GCC 4.6.0 static checking.
14419 * buffer.c (Qclone_number): Remove for now, as it's unused.
14420 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
14421 (record_buffer): Remove unused local.
14422 * frame.c (other_visible_frames, frame_buffer_list): Now static.
14423 (set_frame_buffer_list): Remove; unused.
14424 * frame.h (other_visible_frames): Remove decl.
14425 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
14426 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
14427 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
14429 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
14430 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
14431 Define only if HAVE_GPM.
14432 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
14433 (update_hints_inhibit): Remove; never set. All uses removed.
14434 * widgetprv.h (emacsFrameClassRec): Remove decl.
14435 * window.c (delete_deletable_window): Now returns void, since it
14436 wasn't returning anything.
14437 (compare_window_configurations): Remove unused locals.
14438 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
14439 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
14440 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
14441 the same widths as pointers. This follows up on the 2011-05-06 patch.
14442 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
14443 * xterm.h: Likewise.
14444 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
14446 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
14448 * makefile.w32-in: Update dependencies.
14449 (LISP_H): Add lib/intprops.h.
14451 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
14453 * image.c (gif_load): Add animation frame delay to the metadata.
14454 (syms_of_image): Use DEFSYM. New symbol `delay'.
14456 2011-06-11 Martin Rudalics <rudalics@gmx.at>
14458 * window.c (delete_deletable_window): Re-add.
14459 (Fset_window_configuration): Rewrite to handle dead buffers and
14460 consequently deletable windows.
14461 (window_tree, Fwindow_tree): Remove. Supply functionality in
14463 (compare_window_configurations): Simplify code.
14465 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
14467 * image.c (imagemagick_load_image): Fix type mismatch.
14468 (Fimagemagick_types): Likewise.
14470 * window.h (replace_buffer_in_windows): Declare.
14472 2011-06-11 Martin Rudalics <rudalics@gmx.at>
14474 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
14475 Qclone_number. Remove external declaration of Qdelete_window.
14476 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
14478 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
14479 Run Qbuffer_list_update_hook if allowed.
14480 (Fother_buffer): Rewrite doc-string. Major rewrite for new
14481 buffer list implementation.
14482 (other_buffer_safely): New function.
14483 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
14484 calls to replace_buffer_in_windows and
14485 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
14487 (record_buffer): Inhibit quitting and rewrite using quittable
14488 functions. Run Qbuffer_list_update_hook if allowed.
14489 (Frecord_buffer, Funrecord_buffer): New functions.
14490 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
14491 Move switch-to-buffer to window.el.
14492 (bury-buffer): Move to window.el.
14493 (Vbuffer_list_update_hook): New variable.
14495 * lisp.h (other_buffer_safely): Add prototype in buffer.c
14498 * window.h (resize_frame_windows): Move up in code.
14499 (Fwindow_frame): Remove EXFUN.
14500 (replace_buffer_in_all_windows): Remove prototype.
14501 (replace_buffer_in_windows_safely): Add prototype.
14503 * window.c: Declare Qdelete_window static again. Move down
14504 declaration of select_count.
14505 (Fnext_window, Fprevious_window): Rewrite doc-strings.
14506 (Fother_window): Move to window.el.
14507 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
14508 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
14509 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
14511 (replace_buffer_in_windows): Implement by calling
14512 Qreplace_buffer_in_windows.
14513 (replace_buffer_in_all_windows): Remove with some functionality
14514 moved into replace_buffer_in_windows_safely.
14515 (replace_buffer_in_windows_safely): New function.
14516 (select_window_norecord, select_frame_norecord): Move in front
14517 of run_window_configuration_change_hook. Remove now obsolete
14519 (Fset_window_buffer): Rewrite doc-string.
14520 Call Qrecord_window_buffer.
14521 (keys_of_window): Move binding for other-window to window.el.
14523 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
14525 * dispextern.h (struct image): Replace data member, whose int_val
14526 and ptr_val fields were not used by anything, with a single
14529 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
14530 (gif_clear_image, gif_load, imagemagick_load_image)
14531 (gs_clear_image, gs_load): Callers changed.
14533 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
14535 * buffer.h: Include <time.h>, for time_t.
14536 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
14538 Fix minor problems found by static checking.
14540 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
14542 Make identifiers static if they are not used in other modules.
14543 * data.c (Qcompiled_function, Qframe, Qvector):
14544 * image.c (QimageMagick, Qsvg):
14545 * minibuf.c (Qmetadata):
14546 * window.c (resize_window_check, resize_root_window): Now static.
14547 * window.h (resize_window_check, resize_root_window): Remove decls.
14549 * window.c (window_deletion_count, delete_deletable_window):
14551 (window_body_lines): Now static.
14552 (Fdelete_other_windows_internal): Mark vars as initialized.
14553 Make sure 'resize_failed' is initialized.
14554 (run_window_configuration_change_hook): Rename local to avoid shadowing.
14555 (resize_window_apply): Remove unused local.
14556 * window.h (delete_deletable_window): Remove decl.
14558 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
14559 (imagemagick_load_image): Fix pointer signedness problem by changing
14560 last arg from unsigned char * to char *. All uses changed.
14561 Also, fix a local for similar reasons.
14562 Remove unused locals. Remove locals to avoid shadowing.
14563 (fn_rsvg_handle_free): Remove; unused.
14564 (svg_load, svg_load_image): Fix pointer signedness problem.
14565 (imagemagick_load_image): Don't use garbage pointer image_wand.
14567 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
14569 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
14571 * image.c (gif_load): Fix omitted cast error introduced by
14574 2011-06-10 Martin Rudalics <rudalics@gmx.at>
14576 * window.h (resize_proportionally, orig_total_lines)
14577 (orig_top_line): Remove from window structure.
14578 (set_window_height, set_window_width, change_window_heights)
14579 (Fdelete_window): Remove prototypes.
14580 (resize_frame_windows): Remove duplicate declaration.
14582 2011-06-10 Eli Zaretskii <eliz@gnu.org>
14584 * window.h (resize_frame_windows, resize_window_check)
14585 (delete_deletable_window, resize_root_window)
14586 (resize_frame_windows): Declare prototypes.
14588 * window.c (resize_window_apply): Make definition be "static" to
14589 match the prototype.
14591 2011-06-10 Martin Rudalics <rudalics@gmx.at>
14593 * window.c: Remove declarations of Qwindow_size_fixed,
14594 window_min_size_1, window_min_size_2, window_min_size,
14595 size_window, window_fixed_size_p, enlarge_window, delete_window.
14596 Remove static from declaration of Qdelete_window, it's
14597 temporarily needed by Fbury_buffer.
14598 (replace_window): Don't assign orig_top_line and
14600 (Fdelete_window, delete_window): Remove. Window deletion is
14601 handled by window.el.
14602 (window_loop): Remove DELETE_OTHER_WINDOWS case.
14603 Replace Fdelete_window calls with calls to Qdelete_window.
14604 (Fdelete_other_windows): Remove. Deleting other windows is
14605 handled by window.el.
14606 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
14607 handled in window.el.
14608 (window_min_size_2, window_min_size_1, window_min_size): Remove.
14609 Window minimum sizes are handled in window.el.
14610 (shrink_windows, size_window, set_window_height)
14611 (set_window_width, change_window_heights, window_height)
14612 (window_width, CURBEG, CURSIZE, enlarge_window)
14613 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
14614 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
14615 handled in window.el.
14616 (make_dummy_parent): Rename to make_parent_window and give it a
14617 second argument horflag.
14618 (make_window): Don't set resize_proportionally any more.
14619 (Fsplit_window): Remove. Windows are split in window.el.
14620 (save_restore_action, save_restore_orig_size)
14621 (shrink_window_lowest_first, save_restore_orig_size): Remove.
14622 Resize mini windows in window.el.
14623 (grow_mini_window, shrink_mini_window): Implement by calling
14624 Qresize_root_window_vertically, resize_window_check and
14625 resize_window_apply.
14626 (saved_window, Fset_window_configuration, save_window_save):
14627 Do not handle orig_top_line, orig_total_lines, and
14628 resize_proportionally.
14629 (window_min_height, window_min_width): Move to window.el.
14630 (keys_of_window): Move bindings for delete-other-windows,
14631 split-window, delete-window and enlarge-window to window.el.
14633 * buffer.c: Temporarily extern Qdelete_window.
14634 (Fbury_buffer): Temporarily call Qdelete_window instead of
14635 Fdelete_window (Fbury_buffer will move to window.el soon).
14637 * frame.c (set_menu_bar_lines_1): Remove code handling
14638 orig_top_line and orig_total_lines.
14640 * dispnew.c (adjust_frame_glyphs_initially): Don't use
14641 set_window_height but set heights directly.
14642 (change_frame_size_1): Use resize_frame_windows.
14644 * xdisp.c (init_xdisp): Don't use set_window_height but set
14647 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
14648 Use resize_frame_windows instead of change_window_heights and run
14649 run_window_configuration_change_hook.
14651 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
14652 instead of change_window_heights and run
14653 run_window_configuration_change_hook.
14655 2011-06-09 Martin Rudalics <rudalics@gmx.at>
14657 * window.c (replace_window): Rename second argument REPLACEMENT to
14658 NEW. New third argument SETFLAG. Rewrite.
14659 (delete_window, make_dummy_parent): Call replace_window with
14661 (window_list_1): Move down in code.
14662 (run_window_configuration_change_hook): Move set_buffer part
14663 before select_frame_norecord part in order to unwind correctly.
14664 Rename count1 to count.
14665 (recombine_windows, delete_deletable_window, resize_root_window)
14666 (Fdelete_other_windows_internal)
14667 (Frun_window_configuration_change_hook, make_parent_window)
14668 (resize_window_check, resize_window_apply, Fresize_window_apply)
14669 (resize_frame_windows, Fsplit_window_internal)
14670 (Fdelete_window_internal, Fresize_mini_window_internal):
14672 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
14674 2011-06-08 Martin Rudalics <rudalics@gmx.at>
14676 * window.h (window): Add some new members to window structure -
14677 normal_lines, normal_cols, new_total, new_normal, clone_number,
14678 splits, nest, prev_buffers, next_buffers.
14679 (WINDOW_TOTAL_SIZE): Move here from window.c.
14680 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
14682 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
14684 (make_dummy_parent): Set new members of windows structure.
14685 (make_window): Move down in code. Handle new members of window
14687 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
14688 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
14689 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
14690 (Fset_window_prev_buffers, Fwindow_next_buffers)
14691 (Fset_window_next_buffers, Fset_window_clone_number):
14693 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
14694 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
14696 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
14697 Argument WINDOW can be now internal window too.
14698 (Fwindow_use_time): Move up in code.
14699 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
14700 Rewrite doc-string.
14701 (Fset_window_configuration, saved_window)
14702 (Fcurrent_window_configuration, save_window_save): Handle new
14703 members of window structure.
14704 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
14705 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
14706 (syms_of_window): New Lisp objects Qrecord_window_buffer,
14707 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
14708 Qget_mru_window, Qresize_root_window,
14709 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
14710 Qauto_buffer_name; staticpro them.
14712 2011-06-07 Martin Rudalics <rudalics@gmx.at>
14714 * window.c (Fwindow_total_size, Fwindow_left_column)
14715 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
14716 (Fwindow_list_1): New functions.
14717 (window_box_text_cols): Replace with window_body_cols.
14718 (Fwindow_width, Fscroll_left, Fscroll_right):
14719 Use window_body_cols instead of window_box_text_cols.
14720 (delete_window, Fset_window_configuration):
14721 Call delete_all_subwindows with window as argument.
14722 (delete_all_subwindows): Take a window as argument and not a
14723 structure. Rewrite.
14724 (window_loop): Remove handling of GET_LRU_WINDOW and
14725 GET_LARGEST_WINDOW.
14726 (Fget_lru_window, Fget_largest_window): Move to window.el.
14728 * window.h: Extern window_body_cols instead of
14729 window_box_text_cols. delete_all_subwindows now takes a
14730 Lisp_Object as argument.
14732 * indent.c (compute_motion, Fcompute_motion):
14733 Use window_body_cols instead of window_box_text_cols.
14735 * frame.c (delete_frame): Call delete_all_subwindows with root
14736 window as argument.
14738 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
14740 * fns.c (Fputhash): Document return value.
14742 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
14744 * image.c (gif_load): Implement gif89a spec "no disposal" method.
14746 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
14748 Cons<->int and similar integer overflow fixes (Bug#8794).
14750 Check for overflow when converting integer to cons and back.
14751 * charset.c (Fdefine_charset_internal, Fdecode_char):
14752 Use cons_to_unsigned to catch overflow.
14753 (Fencode_char): Use INTEGER_TO_CONS.
14754 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
14755 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
14756 * data.c (long_to_cons, cons_to_long): Remove.
14757 (cons_to_unsigned, cons_to_signed): New functions.
14758 These signal an error for invalid or out-of-range values.
14759 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
14760 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
14761 * font.c (Ffont_variation_glyphs):
14762 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
14763 * lisp.h: Include <intprops.h>.
14764 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
14765 (cons_to_signed, cons_to_unsigned): New decls.
14766 (long_to_cons, cons_to_long): Remove decls.
14767 * undo.c (record_first_change): Use INTEGER_TO_CONS.
14768 (Fprimitive_undo): Use CONS_TO_INTEGER.
14769 * xfns.c (Fx_window_property): Likewise.
14770 * xselect.c: Include <limits.h>.
14771 (x_own_selection, selection_data_to_lisp_data):
14772 Use INTEGER_TO_CONS.
14773 (x_handle_selection_request, x_handle_selection_clear)
14774 (x_get_foreign_selection, Fx_disown_selection_internal)
14775 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
14776 (lisp_data_to_selection_data): Use cons_to_unsigned.
14777 (x_fill_property_data): Use cons_to_signed.
14778 Report values out of range.
14780 Check for buffer and string overflow more precisely.
14781 * buffer.h (BUF_BYTES_MAX): New macro.
14782 * lisp.h (STRING_BYTES_MAX): New macro.
14783 * alloc.c (Fmake_string):
14784 * character.c (string_escape_byte8):
14785 * coding.c (coding_alloc_by_realloc):
14786 * doprnt.c (doprnt):
14787 * editfns.c (Fformat):
14789 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
14790 since they may not be the same number.
14791 * editfns.c (Finsert_char):
14792 * fileio.c (Finsert_file_contents):
14793 Likewise for BUF_BYTES_MAX.
14795 * image.c: Use ptrdiff_t, not int, for sizes.
14796 (slurp_file): Switch from int to ptrdiff_t.
14798 (slurp_file): Check that file size fits in both size_t (for
14799 malloc) and ptrdiff_t (for sanity and safety).
14801 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
14802 if b->modtime has its maximal value.
14804 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
14806 Don't assume time_t can fit into int.
14807 * buffer.h (struct buffer.modtime): Now time_t, not int.
14808 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
14809 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
14811 Minor fixes for signed vs unsigned integers.
14812 * character.h (MAYBE_UNIFY_CHAR):
14813 * charset.c (maybe_unify_char):
14814 * keyboard.c (read_char, reorder_modifiers):
14815 XINT -> XFASTINT, since the integer must be nonnegative.
14816 * ftfont.c (ftfont_spec_pattern):
14817 * keymap.c (access_keymap, silly_event_symbol_error):
14818 XUINT -> XFASTINT, since the integer must be nonnegative.
14819 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
14820 since it makes no difference and we prefer signed.
14821 * keyboard.c (record_char): Use XUINT when all the neighbors do.
14822 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
14825 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
14827 * window.h (Fwindow_frame): Declare.
14829 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
14831 * alloc.c: Simplify handling of large-request failures (Bug#8800).
14832 (SPARE_MEMORY): Always define.
14833 (LARGE_REQUEST): Remove.
14834 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
14836 2011-06-06 Martin Rudalics <rudalics@gmx.at>
14838 * lisp.h: Move EXFUNS for Fframe_root_window,
14839 Fframe_first_window and Fset_frame_selected_window to window.h.
14841 * window.h: Move EXFUNS for Fframe_root_window,
14842 Fframe_first_window and Fset_frame_selected_window here from
14845 * frame.c (Fwindow_frame, Fframe_first_window)
14846 (Fframe_root_window, Fframe_selected_window)
14847 (Fset_frame_selected_window): Move to window.c.
14848 (Factive_minibuffer_window): Move to minibuf.c.
14849 (Fother_visible_frames_p): New function.
14851 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
14853 * window.c (decode_window, decode_any_window): Move up in code.
14854 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
14855 (inhibit_frame_unsplittable): Remove unused variable.
14856 (Fwindow_buffer): Move up and rewrite doc-string.
14857 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
14858 (Fwindow_prev): New functions.
14859 (Fwindow_frame): Move here from frame.c. Accept any window as
14861 (Fframe_root_window, Fframe_first_window)
14862 (Fframe_selected_window): Move here from frame.c. Accept frame
14863 or arbitrary window as argument. Update doc-strings.
14864 (Fminibuffer_window): Move up in code.
14865 (Fwindow_minibuffer_p): Move up in code and simplify.
14866 (Fset_frame_selected_window): Move here from frame.c.
14868 (Fselected_window, select_window, Fselect_window): Move up in
14869 code. Minor doc-string fixes.
14871 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
14873 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
14874 Do not assume that spare memory exists; that assumption is valid
14875 only if SYSTEM_MALLOC.
14876 (LARGE_REQUEST): New macro, so that the issue of large requests
14877 is separated from the issue of spare memory.
14879 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
14881 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
14884 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
14886 * xfns.c (x_set_scroll_bar_default_width): Move declarations
14889 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
14891 * gtkutil.c (xg_get_default_scrollbar_width): New function.
14893 * gtkutil.h: Declare xg_get_default_scrollbar_width.
14895 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
14896 min width by calling x_set_scroll_bar_default_width (Bug#8505).
14898 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
14900 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
14902 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
14904 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
14905 (x_clipboard_manager_save): Add return value.
14906 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
14907 New error handlers.
14908 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
14909 Obey Vx_select_enable_clipboard_manager. Catch errors in
14910 x_clipboard_manager_save (Bug#8779).
14911 (Vx_select_enable_clipboard_manager): New variable.
14912 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
14914 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
14916 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
14918 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14920 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
14921 in the current matrix if keep_current_p is non-zero.
14923 2011-06-04 Eli Zaretskii <eliz@gnu.org>
14925 * bidi.c (bidi_level_of_next_char): Fix last change.
14927 2011-06-03 Eli Zaretskii <eliz@gnu.org>
14929 Support bidi reordering of text covered by display properties.
14931 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
14932 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
14933 (bidi_cache_search, bidi_cache_iterator_state)
14934 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
14935 (bidi_level_of_next_char, bidi_move_to_visually_next):
14936 Support character positions inside a run of characters covered by a
14938 (bidi_paragraph_init, bidi_resolve_explicit_1)
14939 (bidi_level_of_next_char): Call bidi_fetch_char and
14940 bidi_fetch_char_advance instead of FETCH_CHAR and
14941 FETCH_CHAR_ADVANCE.
14942 (bidi_init_it): Initialize new members.
14943 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
14945 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
14946 instead of using explicit *_CHAR codes.
14947 (bidi_resolve_explicit, bidi_resolve_weak):
14948 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
14949 bidirectional text is supported only in multibyte buffers.
14950 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
14951 it to initialize the frame_window_p member of struct bidi_it.
14952 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
14953 (bidi_resolve_explicit, bidi_resolve_weak)
14954 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
14955 bidi_it->nchars is non-positive.
14956 (bidi_level_of_next_char): Don't try to lookup the cache for the
14957 next/previous character if nothing is cached there yet, or if we
14958 were just reseat()'ed to a new position.
14960 * xdisp.c (set_cursor_from_row): Set start and stop points
14961 according to the row's direction when priming the loop that looks
14962 for the glyph on which to display cursor.
14963 (single_display_spec_intangible_p): Function deleted.
14964 (display_prop_intangible_p): Reimplement to call
14965 handle_display_spec instead of single_display_spec_intangible_p.
14966 Accept 3 additional arguments needed by handle_display_spec.
14967 This fixes incorrect cursor motion across display property with complex
14968 values: lists, `(when COND...)' forms, etc.
14969 (single_display_spec_string_p): Support property values that are
14970 lists with the argument STRING its top-level element.
14971 (display_prop_string_p): Fix the condition for processing a
14972 property that is a list to be consistent with handle_display_spec.
14973 (handle_display_spec): New function, refactored from the
14974 last portion of handle_display_prop.
14975 (compute_display_string_pos): Accept additional argument
14976 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
14977 value of a `display' property is a "replacing spec".
14978 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
14979 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
14980 the display property, but just return a value indicating whether
14981 the display property will replace the characters it covers.
14982 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
14983 frame_window_p members of struct bidi_it.
14984 (compute_display_string_pos, compute_display_string_end):
14986 (push_it): Accept second argument POSITION, where pop_it should
14987 jump to continue iteration.
14988 (reseat_1): Initialize bidi_it.disp_pos.
14990 * keyboard.c (adjust_point_for_property): Adjust the call to
14991 display_prop_intangible_p to its new signature.
14993 * dispextern.h (struct bidi_it): New member frame_window_p.
14994 (bidi_init_it): Update prototypes.
14995 (display_prop_intangible_p): Update prototype.
14996 (compute_display_string_pos, compute_display_string_end):
14997 Declare prototypes.
14998 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15001 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15003 Malloc failure behavior now depends on size of allocation.
15004 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15005 * lisp.h: Change signatures accordingly.
15006 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15007 All callers changed. (Bug#8762)
15009 * gnutls.c: Use Emacs's memory allocators.
15010 Without this change, the gnutls library would invoke malloc etc.
15011 directly, which causes problems on non-SYNC_INPUT hosts, and which
15012 runs afoul of improving memory_full behavior. (Bug#8761)
15013 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15014 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15015 xfree instead of the default malloc, realloc, free.
15016 (Fgnutls_boot): No need to check for memory allocation failure,
15017 since xmalloc does that for us.
15019 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15020 * category.c (hash_get_category_set):
15021 * ccl.c (ccl_driver):
15022 * charset.c (Fdefine_charset_internal):
15023 * charset.h (struct charset.hash_index):
15024 * composite.c (get_composition_id, gstring_lookup_cache)
15025 (composition_gstring_put_cache):
15026 * composite.h (struct composition.hash_index):
15027 * dispextern.h (struct image.hash):
15028 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15029 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15030 (hashfn_equal, hashfn_user_defined, make_hash_table)
15031 (maybe_resize_hash_table, hash_lookup, hash_put)
15032 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15033 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15034 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15035 * image.c (make_image, search_image_cache, lookup_image)
15036 (xpm_put_color_table_h):
15037 * lisp.h (struct Lisp_Hash_Table):
15038 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15039 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15040 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15041 * alloc.c (allocate_vectorlike):
15042 Check for overflow in vector size calculations.
15043 * ccl.c (ccl_driver):
15044 Check for overflow when converting EMACS_INT to int.
15045 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15046 need to be updated by these changes.
15047 * fns.c (make_hash_table, maybe_resize_hash_table):
15048 Check for integer overflow with large hash tables.
15049 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15050 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15051 (SXHASH_REDUCE): New macro.
15052 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15053 Use it instead of discarding useful hash info with large hash values.
15054 (sxhash_float): New function.
15055 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15056 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15057 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15058 Rewrite to use FIXNUM_BITS, as this simplifies things.
15059 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15060 Adjust signatures to match updated version of code.
15061 (consing_since_gc): Now EMACS_INT, since a single hash table can
15062 use more than INT_MAX bytes.
15064 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15066 Make it possible to build with GCC-4.6+ -O2 -flto.
15068 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15070 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15072 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15073 Call minibuffer-inactive-mode.
15075 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15077 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15078 Update dependencies.
15080 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15082 * data.c (init_data): Remove code for UTS, this system is not
15085 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15087 Don't force ./temacs to start in terminal mode.
15089 * frame.c (make_initial_frame): Initialize faces in all cases, not
15090 only when CANNOT_DUMP is defined.
15091 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15093 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15095 * dispnew.c (add_window_display_history): Use const for the string
15096 pointer. Remove declaration, not needed.
15098 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15100 Use 'inline', not 'INLINE'.
15101 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15102 * alloc.c, fontset.c (INLINE): Remove.
15103 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15104 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15105 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15106 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15107 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15109 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15111 Make it possible to run ./temacs.
15113 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15114 syms_of_callproc does the same thing. Remove test for
15115 "initialized", do it in the caller.
15116 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15118 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15120 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15121 (read_minibuf): Use get_minibuffer.
15122 (syms_of_minibuf): Use DEFSYM.
15123 (Qmetadata): New var.
15124 * data.c (Qbuffer): Don't make it static.
15125 (syms_of_data): Use DEFSYM.
15127 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15129 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15130 (CCL_CODE_MIN): New macro.
15132 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15134 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15136 * eval.c (Qdebug): Now static.
15137 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15138 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15139 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15141 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15143 * image.c: Various fixes to ImageMagick code comments.
15144 (Fimagemagick_types): Doc fix.
15146 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15148 Minor fixes prompted by GCC 4.6.0 warnings.
15150 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15152 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15153 (x_clipboard_manager_save_all): Move extern decl to ...
15154 * xterm.h: ... here, so that it can be checked for consistency.
15156 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15158 * xselect.c (x_clipboard_manager_save_frame)
15159 (x_clipboard_manager_save_all): New functions.
15160 (Fx_clipboard_manager_save): Lisp function deleted.
15162 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15163 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15165 * xterm.h: Update prototype.
15167 2011-05-28 William Xu <william.xwl@gmail.com>
15169 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15170 exiting (Bug#8239).
15172 2011-05-28 Jim Meyering <meyering@redhat.com>
15174 Avoid a sign-extension bug in crypto_hash_function.
15175 * fns.c (to_uchar): Define.
15176 (crypto_hash_function): Use it to convert some newly-signed
15177 variables to unsigned, to avoid sign-extension bugs. For example,
15178 without this change, (md5 "truc") would evaluate to
15179 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15180 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
15181 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
15183 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15185 Integer overflow fixes.
15187 * dbusbind.c: Serial number integer overflow fixes.
15188 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
15189 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15190 to hold a serial number that is too large for a fixnum.
15191 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15192 Check for serial numbers out of range. Decode any serial number
15193 that was so large that it became a float. (Bug#8722)
15195 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15196 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15197 Use XFASTINT rather than XUINT when numbers are nonnegative.
15198 (xd_append_arg, Fdbus_method_return_internal):
15199 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15200 arguments, check that Lisp number is nonnegative, rather than
15201 silently wrapping negative numbers around. (Bug#8722)
15202 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
15205 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15207 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15209 ccl: Add integer overflow checks.
15210 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15211 (IN_INT_RANGE): New macros.
15212 (ccl_driver): Use them to check for integer overflow when
15213 decoding a CCL program. Many of the new checks are whether XINT (x)
15214 fits in int; it doesn't always, on 64-bit hosts. The new version
15215 doesn't catch all possible integer overflows, but it's an
15216 improvement. (Bug#8719)
15218 * alloc.c (make_event_array): Use XINT, not XUINT.
15219 There's no need for unsigned here.
15221 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15222 This follows up to the 2011-05-06 change that substituted uintptr_t
15223 for EMACS_INT. This case wasn't caught back then.
15225 Rework Fformat to avoid integer overflow issues.
15226 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15227 now (part of C89). Include <verify.h>.
15228 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15229 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15230 (Fformat): Avoid the prepass trying to compute sizes; it was only
15231 approximate and thus did not catch overflow reliably. Instead, walk
15232 through the format just once, formatting and computing sizes as we go,
15233 checking for integer overflow at every step, and allocating a larger
15234 buffer as needed. Keep track separately whether the format is
15235 multibyte. Keep only the most-recently calculated precision, rather
15236 than them all. Record whether each argument has been converted to
15237 string. Use EMACS_INT, not int, for byte and char and arg counts.
15238 Support field widths and precisions larger than INT_MAX. Avoid
15239 sprintf's undefined behavior with conversion specifications such as %#d
15240 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15241 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15242 formatting out-of-range floating point numbers with int
15243 formats. (Bug#8668)
15245 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15247 * data.c: Avoid integer truncation in expressions involving floats.
15248 * data.c: Include <intprops.h>.
15249 (arith_driver): When there's an integer overflow in an expression
15250 involving floating point, convert the integers to floating point
15251 so that the resulting value does not suffer from catastrophic
15252 integer truncation. For example, on a 64-bit host (* 4
15253 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15254 Do not rely on undefined behavior after integer overflow.
15256 merge count_size_as_multibyte, parse_str_to_multibyte
15257 * character.c, character.h (count_size_as_multibyte):
15258 Rename from parse_str_to_multibyte; all uses changed.
15259 Check for integer overflow.
15260 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15261 since it's now a duplicate of the other. This is more of
15262 a character than a buffer op, so better that it's in character.c.
15263 * fns.c, print.c: Adjust to above changes.
15265 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15267 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15269 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15271 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15272 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15273 (x_clipboard_manager_save): Now static.
15274 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15276 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15277 (crypto_hash_function): Now static.
15278 Fix pointer signedness problems. Avoid unnecessary initializations.
15280 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
15282 * termhooks.h (Vselection_alist): Make it terminal-local.
15284 * terminal.c (create_terminal): Initialize it.
15286 * xselect.c: Support for clipboard managers.
15287 (Vselection_alist): Move to termhooks.h as terminal-local var.
15288 (LOCAL_SELECTION): New macro.
15289 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15290 (symbol_to_x_atom): Remove gratuitous arg.
15291 (x_handle_selection_request, lisp_data_to_selection_data)
15292 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
15293 (x_own_selection, x_get_local_selection, x_convert_selection):
15294 New arg, specifying work frame. Use terminal-local Vselection_alist.
15295 (some_frame_on_display): Delete unused function.
15296 (Fx_own_selection_internal, Fx_get_selection_internal)
15297 (Fx_disown_selection_internal, Fx_selection_owner_p)
15298 (Fx_selection_exists_p): New optional frame arg.
15299 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15300 (x_handle_selection_clear): Don't treat other terminals with the
15301 same keyboard specially. Use the terminal-local Vselection_alist.
15302 (x_clear_frame_selections): Use Frun_hook_with_args.
15304 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15306 * xterm.h: Add support for those atoms.
15308 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
15310 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15311 (converted_selections, conversion_fail_tag): New global variables.
15312 (x_selection_request_lisp_error): Free the above.
15313 (x_get_local_selection): Remove unnecessary code.
15314 (x_reply_selection_request): Args changed; handle arbitrary array
15315 of converted selections stored in converted_selections.
15316 Separate the XChangeProperty and SelectionNotify steps.
15317 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15318 (x_convert_selection): New function.
15319 (x_handle_selection_event): Simplify.
15320 (x_get_foreign_selection): Don't ignore incoming requests while
15321 waiting for an answer; this will fail when we implement
15322 SAVE_TARGETS, and seems unnecessary anyway.
15323 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
15324 (Vx_sent_selection_functions): Doc fix.
15326 2011-05-26 Leo Liu <sdl.web@gmail.com>
15328 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
15330 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15332 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
15334 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
15335 for fringe update if it has periodic bitmap.
15336 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
15337 and fringe_bitmap_periodic_p.
15339 * fringe.c (get_fringe_bitmap_data): New function.
15340 (draw_fringe_bitmap_1, update_window_fringes): Use it.
15341 (update_window_fringes): Record periodicity of fringe bitmap in glyph
15342 row. Mark glyph row for fringe update if periodicity changed.
15344 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
15345 for fringe update unless it has periodic bitmap.
15347 2011-05-25 Kenichi Handa <handa@m17n.org>
15349 * xdisp.c (get_next_display_element): Set correct it->face_id for
15350 a static composition.
15352 2011-05-24 Leo Liu <sdl.web@gmail.com>
15355 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
15357 * fns.c (crypto_hash_function, Fsha1): New function.
15358 (Fmd5): Use crypto_hash_function.
15359 (syms_of_fns): Add Ssha1.
15361 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15363 * gnutls.c: Remove unused macros.
15364 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
15365 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
15366 Remove macros that are defined and never used.
15367 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
15369 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
15371 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
15372 (Fx_get_selection_internal): Minor cleanup.
15373 (Fx_own_selection_internal): Rename arguments for consistency with
15376 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15378 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
15380 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
15382 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
15384 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15386 * dispnew.c (scrolling_window): Don't exclude the case that the
15387 last enabled row in the desired matrix touches the bottom boundary.
15389 2011-05-21 Glenn Morris <rgm@gnu.org>
15391 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
15392 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
15393 and add some more files.
15395 2011-05-20 Eli Zaretskii <eliz@gnu.org>
15397 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
15398 report_file_error introduced by the change from 2011-05-07.
15400 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
15402 * systime.h (Time): Define only if emacs is defined.
15403 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
15404 where the include path doesn't have X11/X.h by default. See
15405 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
15407 2011-05-20 Kenichi Handa <handa@m17n.org>
15409 * composite.c (find_automatic_composition): Fix previous change.
15411 2011-05-20 Glenn Morris <rgm@gnu.org>
15413 * lisp.mk: New file, split from Makefile.in.
15414 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
15415 (shortlisp): Remove.
15416 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
15418 2011-05-19 Glenn Morris <rgm@gnu.org>
15420 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
15421 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
15422 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
15423 (lisp): Set the order to that of loadup.el.
15424 (shortlisp): Make it a copy of $lisp.
15425 (SOME_MACHINE_LISP): Remove.
15426 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
15427 Use just $shortlisp, not $SOME_MACHINE_LISP too.
15429 2011-05-18 Kenichi Handa <handa@m17n.org>
15431 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
15432 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
15433 (find_automatic_composition): Mostly rewrite for efficiency.
15435 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
15437 * makefile.w32-in: Update dependencies.
15439 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
15441 * menu.c: Include limits.h (fixes the MS-Windows build broken by
15442 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
15444 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
15446 Fix some integer overflow issues, such as string length overflow.
15448 * insdel.c (count_size_as_multibyte): Check for string overflow.
15450 * character.c (lisp_string_width): Check for string overflow.
15451 Use EMACS_INT, not int, for string indexes and lengths; in
15452 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
15453 the resulting string length overflows an EMACS_INT; instead,
15454 report a string overflow if no precision given. When checking for
15455 precision exhaustion, use a check that cannot possibly have
15456 integer overflow. (Bug#8675)
15457 * character.h (lisp_string_width): Adjust to new signature.
15459 * alloc.c (string_overflow): New function.
15460 (Fmake_string): Use it. This doesn't change behavior, but saves
15461 a few bytes and will simplify future changes.
15462 * character.c (string_escape_byte8): Likewise.
15463 * lisp.h (string_overflow): New decl.
15465 Fixups, following up to the user-interface timestamp change.
15466 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
15467 for UI timestamps, instead of unsigned long.
15468 * msdos.c (mouse_get_pos): Likewise.
15469 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
15470 * w32gui.h (Time): Define by including "systime.h" rather than by
15471 declaring it ourselves. (Bug#8664)
15473 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
15474 * image.c (clear_image_cache): Likewise.
15476 * term.c (term_mouse_position): Don't assume time_t wraparound.
15478 Be more systematic about user-interface timestamps.
15479 Before, the code sometimes used 'Time', sometimes 'unsigned long',
15480 and sometimes 'EMACS_UINT', to represent these timestamps.
15481 This change causes it to use 'Time' uniformly, as that's what X uses.
15482 This makes the code easier to follow, and makes it easier to catch
15483 integer overflow bugs such as Bug#8664.
15484 * frame.c (Fmouse_position, Fmouse_pixel_position):
15485 Use Time, not unsigned long, for user-interface timestamps.
15486 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
15487 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
15488 * keyboard.h (last_event_timestamp): Likewise.
15489 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
15490 * menu.h (xmenu_show): Likewise.
15491 * term.c (term_mouse_position): Likewise.
15492 * termhooks.h (struct input_event.timestamp): Likewise.
15493 (struct terminal.mouse_position_hook): Likewise.
15494 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
15495 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
15496 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
15497 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
15498 what it was before.
15499 * menu.h, termhooks.h: Include "systime.h", for Time.
15501 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
15502 Don't assume that the difference between two unsigned long values
15503 can fit into an integer. At this point, we know button_down_time
15504 <= event->timestamp, so the difference must be nonnegative, so
15505 there's no need to cast the result if double-click-time is
15506 nonnegative, as it should be; check that it's nonnegative, just in
15507 case. This bug is triggered when events are more than 2**31 ms
15508 apart (about 25 days). (Bug#8664)
15510 * xselect.c (last_event_timestamp): Remove duplicate decl.
15511 (x_own_selection): Remove needless cast to unsigned long.
15513 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
15514 that always fit in int. Use a sentinel instead of a counter, to
15515 avoid a temp and to allay GCC's concerns about possible int overflow.
15516 * frame.h (struct frame): Use int for menu_bar_items_used
15517 instead of EMACS_INT, since it always fits in int.
15519 * menu.c (grow_menu_items): Check for int overflow.
15521 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
15523 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
15524 Before, the code was not consistent. These values cannot exceed
15525 2**31 - 1 so there's no need to make them unsigned.
15526 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
15527 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
15528 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
15530 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
15532 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
15533 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
15534 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
15535 presumably because the widths might not match.
15537 * window.c (size_window): Avoid needless test at loop start.
15539 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
15541 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
15543 2011-05-12 Drew Adams <drew.adams@oracle.com>
15545 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
15547 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15549 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
15550 `width' to `bar_area_x' and `bar_area_width', respectively.
15551 (x_scroll_run): Take account of fringe background extension.
15553 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
15554 Rename local vars `left' and `width' to `bar_area_x' and
15555 `bar_area_width', respectively.
15556 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
15557 background extension.
15559 2011-05-10 Jim Meyering <meyering@redhat.com>
15561 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
15563 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
15565 * image.c (Finit_image_library): Return t for built-in image types,
15566 like pbm and xbm. (Bug#8640)
15568 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
15570 * w32menu.c (set_frame_menubar): Fix submenu allocation.
15572 2011-05-07 Eli Zaretskii <eliz@gnu.org>
15574 * w32console.c (Fset_screen_color): Doc fix.
15575 (Fget_screen_color): New function.
15576 (syms_of_ntterm): Defsubr it.
15578 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
15579 unlink the temporary file if Fcall_process didn't create it in the
15581 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
15582 child process will be redirected to a file specified with `:file'.
15583 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
15584 cue to call_process_cleanup not to close that handle.
15586 2011-05-07 Ben Key <bkey76@gmail.com>
15588 * makefile.w32-in: The bootstrap-temacs rule now makes use of
15589 one of two shell specific rules, either bootstrap-temacs-CMD or
15590 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
15591 to the previous implementation of the bootstrap-temacs rule.
15592 The bootstrap-temacs-CMD rule is similar to the previous
15593 implementation of the bootstrap-temacs rule except that it
15594 makes use of the ESC_CFLAGS variable instead of the CFLAGS
15597 These changes, along with some changes to nt/configure.bat,
15598 nt/gmake.defs, and nt/nmake.defs, are required to extend my
15599 earlier fix to add support for --cflags and --ldflags options
15600 that include quotes so that it works whether make uses cmd or
15603 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
15605 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
15606 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
15608 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
15609 a string. Handle both cases.
15610 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
15611 (Fdbus_register_method): Use Qinvalid_function.
15613 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
15615 * makefile.w32-in: Update dependencies.
15616 (LISP_H): Add inttypes.h and stdin.h.
15617 (PROCESS_H): Add unistd.h.
15619 2011-05-06 Eli Zaretskii <eliz@gnu.org>
15621 * lread.c: Include limits.h (fixes the MS-Windows build broken by
15622 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
15624 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
15626 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
15628 * term.c (vfatal): Remove stray call to va_end.
15629 It's not needed and the C Standard doesn't allow it here anyway.
15631 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
15632 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
15634 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
15637 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
15639 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
15641 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
15643 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
15645 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
15647 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
15648 * charset.c (Fdefine_charset_internal): Don't initialize
15649 charset.code_space[15]. The value was garbage, on hosts with
15650 32-bit int (Bug#8600).
15652 * lread.c (read_integer): Be more consistent with string-to-number.
15653 Use string_to_number to do the actual conversion; this avoids
15654 rounding errors and fixes some other screwups. Without this fix,
15655 for example, #x1fffffffffffffff was misread as -2305843009213693952.
15656 (digit_to_number): Move earlier, for benefit of read_integer.
15657 Return -1 if the digit is out of range for the base, -2 if it is
15658 not a digit in any supported base. (Bug#8602)
15660 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
15662 * dispnew.c (scrolling_window): Return 1 if we scrolled,
15663 to match comment at start of function. This also removes a
15664 GCC warning about overflow in a 32+64-bit port.
15666 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
15668 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
15669 Reported by Stefan Monnier in
15670 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
15671 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
15672 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
15674 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
15675 (EMACS_UINTPTR): Likewise, with uintptr_t.
15677 * lisp.h: Prefer 64-bit EMACS_INT if available.
15678 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
15679 on 32-bit hosts that have 64-bit int, so that they can access
15681 However, temporarily disable this change unless the temporary
15682 symbol WIDE_EMACS_INT is defined.
15684 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
15686 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
15687 This removes an assumption that EMACS_INT and long are the same
15688 width as pointers. The assumption is true for Emacs porting targets
15689 now, but we want to make other targets possible.
15690 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
15691 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
15692 In the rest of the code, change types of integers that hold casted
15693 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
15694 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
15695 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
15696 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
15697 No need to cast type when ORing.
15698 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
15699 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
15700 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
15701 assume EMACS_INT is the same width as char *.
15702 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
15703 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
15704 Remove no-longer-needed casts.
15705 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
15706 (xg_tool_bar_help_callback, xg_make_tool_item):
15707 Use EMACS_INTPTR to hold an integer
15708 that will be cast to void *; this can avoid a GCC warning
15709 if EMACS_INT is not the same width as void *.
15710 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
15711 * xdisp.c (display_echo_area_1, resize_mini_window_1):
15712 (current_message_1, set_message_1):
15713 Use a local to convert to proper width without a cast.
15714 * xmenu.c (dialog_selection_callback): Likewise.
15716 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
15717 Also, don't assume VALBITS / RAND_BITS is less than 5,
15718 and don't rely on undefined behavior when shifting a 1 left into
15720 * lisp.h (get_random): Change signature to match.
15722 * lread.c (hash_string): Use size_t, not int, for hash computation.
15723 Normally we prefer signed values; but hashing is special, because
15724 it's better to use unsigned division on hash table sizes so that
15725 the remainder is nonnegative. Also, size_t is the natural width
15726 for hashing into memory. The previous code used 'int', which doesn't
15727 retain enough info to hash well into very large tables.
15728 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
15730 * dbusbind.c: Don't possibly lose pointer info when converting.
15731 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
15732 Use XPNTR rather than XHASH, so that the high-order bits of
15733 the pointer aren't lost when converting through void *.
15735 * eval.c (Fautoload): Don't double-shift a pointer.
15737 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
15739 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
15741 * gnutls.c (DEF_GNUTLS_FN):
15742 * image.c (DEF_IMGLIB_FN): Make function pointers static.
15744 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
15746 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
15749 2011-05-05 Eli Zaretskii <eliz@gnu.org>
15751 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
15752 New version that can reserve upto 2GB of heap space.
15754 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
15756 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
15758 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
15760 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
15761 `gnutls_certificate_set_x509_key_file'.
15763 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
15765 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
15766 Update dependencies.
15768 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
15770 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
15771 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
15772 Remove unused parameter `fildes'.
15773 * process.c (read_process_output, send_process): Don't pass it.
15775 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
15777 Fix previous change: the library cache is defined in w32.c.
15778 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
15779 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
15781 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
15783 Implement dynamic loading of GnuTLS on Windows.
15785 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
15786 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
15787 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
15790 * gnutls.c (Qgnutls_dll): Define.
15791 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
15792 (gnutls_*): Declare function pointers.
15793 (init_gnutls_functions): New function to initialize function pointers.
15794 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
15795 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
15796 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
15797 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
15798 (emacs_gnutls_write, emacs_gnutls_read)
15799 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
15800 (Fgnutls_available_p): New function.
15801 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
15802 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
15803 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
15805 * image.c: Include w32.h.
15806 (Vimage_type_cache): Delete.
15807 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
15808 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
15809 (w32_delayed_load): Move to w32.c.
15811 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
15813 * w32.c (QCloaded_from, Vlibrary_cache): Define.
15814 (w32_delayed_load): Move from image.c. When loading a library, record
15815 its filename in the :loaded-from property of the library id.
15816 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
15817 Initialize and staticpro them.
15818 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
15820 * process.c: Include lisp.h before w32.h, not after.
15821 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
15822 instead of gnutls_record_check_pending.
15824 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
15826 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
15828 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
15829 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
15832 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
15834 * xterm.c (x_set_frame_alpha): Do not set property on anything
15835 else than FRAME_X_OUTER_WINDOW (Bug#8608).
15837 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
15839 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
15841 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
15843 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
15844 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
15845 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
15846 (gnutls_global_initialized, Qgnutls_bootprop_priority)
15847 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
15848 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
15849 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
15850 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
15851 (Qgnutls_bootprop_callbacks_verify): Make static.
15853 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
15855 * callproc.c: Indentation fixup.
15857 * sysdep.c (wait_for_termination_1): Make static.
15858 (wait_for_termination, interruptible_wait_for_termination):
15859 Move after wait_for_termination_1.
15861 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
15863 * sysdep.c (interruptible_wait_for_termination): New function
15864 which is like wait_for_termination, but allows keyboard
15867 * callproc.c (Fcall_process): Add (:file "file") as an option for
15869 (Fcall_process_region): Ditto.
15871 2011-04-30 Eli Zaretskii <eliz@gnu.org>
15873 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
15874 rather than `XVECTOR (FOO)->size'.
15876 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
15877 inttypes.h, as a gnulib replacement is used if it not available in
15880 2011-04-21 Eli Zaretskii <eliz@gnu.org>
15882 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
15883 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
15884 of MOST_POSITIVE_FIXNUM. (Bug#8528)
15886 * coding.c (coding_alloc_by_realloc): Error out if destination
15887 will grow beyond MOST_POSITIVE_FIXNUM.
15888 (decode_coding_emacs_mule): Abort if there isn't enough place in
15889 charbuf for the composition carryover bytes. Reserve an extra
15890 space for up to 2 characters produced in a loop.
15891 (decode_coding_iso_2022): Abort if there isn't enough place in
15892 charbuf for the composition carryover bytes.
15894 2011-04-21 Eli Zaretskii <eliz@gnu.org>
15896 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
15897 aborting when %lld or %lll format is passed.
15898 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
15899 %llo or %llx format is passed. (Bug#8545)
15901 * window.c (window_scroll_line_based): Use a marker instead of
15902 simple variables to record original value of point. (Bug#7952)
15904 * doprnt.c (doprnt): Fix the case where a multibyte sequence
15905 produced by %s or %c overflows available buffer space. (Bug#8545)
15907 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
15909 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
15910 (SIZE_MAX): Move defn after all includes, as they might #define it.
15912 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
15914 * w32.c (init_environment): Warn about defaulting HOME to C:\.
15916 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
15918 * keyboard.c (Qdelayed_warnings_hook): Define.
15919 (command_loop_1): Run `delayed-warnings-hook'
15920 if Vdelayed_warnings_list is non-nil.
15921 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
15922 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
15924 2011-04-28 Eli Zaretskii <eliz@gnu.org>
15926 * doprnt.c (doprnt): Don't return value smaller than the buffer
15927 size if the message was truncated. (Bug#8545).
15929 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
15931 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
15932 (Fx_window_property): #if-0 the whole functions, not just the bodies.
15934 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
15936 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
15938 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
15940 * makefile.w32-in: Update dependencies.
15942 2011-04-27 Eli Zaretskii <eliz@gnu.org>
15944 Improve `doprnt' and its usage. (Bug#8545)
15945 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
15946 `format_end'. Remove support for %l as a conversion specifier.
15947 Don't use xrealloc. Improve diagnostics when the %l size modifier
15948 is used. Update the commentary.
15950 * eval.c (verror): Simplify calculation of size_t.
15952 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
15955 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
15957 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
15960 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
15962 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
15963 This makes this file independent of the recent pseudovector change.
15965 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
15967 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
15969 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
15970 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
15971 Remove unused local.
15972 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
15974 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
15975 GCC 4.6.0 optimizes based on type-based alias analysis.
15976 For example, if b is of type struct buffer * and v of type struct
15977 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
15978 != &v->size, and therefore "v->size = 1; b->size = 2; return
15979 v->size;" must therefore return 1. This assumption is incorrect
15980 for Emacs, since it type-puns struct Lisp_Vector * with many other
15981 types. To fix this problem, this patch adds a new type struct
15982 vectorlike_header that documents the constraints on layout of vectors
15983 and pseudovectors, and helps optimizing compilers not get fooled
15984 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
15985 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
15986 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
15988 (XSETPVECTYPE): Rewrite in terms of new macro.
15989 (XSETPVECTYPESIZE): New macro, specifying both type and size.
15990 This is a bit clearer, and further avoids the possibility of
15991 undesirable aliasing.
15992 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
15993 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
15994 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
15995 since Lisp_Subr is a special case (no "next" field).
15996 (ASIZE): Now uses header.size rather than size.
15997 All previous uses of XVECTOR (foo)->size replaced to use this macro,
15998 to avoid the hassle of writing XVECTOR (foo)->header.size.
15999 (struct vectorlike_header): New type.
16000 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16001 object, to help avoid aliasing.
16002 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16003 (SUBRP): Likewise, since Lisp_Subr is a special case.
16004 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16005 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16006 (struct Lisp_Hash_Table): Combine first two members into a single
16007 struct vectorlike_header member. All uses of "size" and "next" members
16008 changed to be "header.size" and "header.next".
16009 * buffer.h (struct buffer): Likewise.
16010 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16011 * frame.h (struct frame): Likewise.
16012 * process.h (struct Lisp_Process): Likewise.
16013 * termhooks.h (struct terminal): Likewise.
16014 * window.c (struct save_window_data, struct saved_window): Likewise.
16015 * window.h (struct window): Likewise.
16016 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16017 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16018 * buffer.c (init_buffer_once): Likewise.
16019 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16021 * process.c (Fformat_network_address): Use local var for size,
16024 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16026 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16027 * data.c (atof): Remove decl; no longer used or needed.
16028 (digit_to_number): Move to lread.c.
16029 (Fstring_to_number): Use new string_to_number function, to be
16030 consistent with how the Lisp reader treats infinities and NaNs.
16031 Do not assume that floating-point numbers represent EMACS_INT
16032 without losing information; this is not true on most 64-bit hosts.
16033 Avoid double-rounding errors, by insisting on integers when
16034 parsing non-base-10 numbers, as the documentation specifies.
16035 * lisp.h (string_to_number): New decl, replacing ...
16036 (isfloat_string): Remove.
16037 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16038 (read1): Do not accept +. and -. as integers; this
16039 appears to have been a coding error. Similarly, do not accept
16040 strings like +-1e0 as floating point numbers. Do not report
16041 overflow for integer overflows unless the base is not 10 which
16042 means we have no simple and reliable way to continue.
16043 Break out the floating-point parsing into a new
16044 function string_to_number, so that Fstring_to_number parses
16045 floating point numbers consistently with the Lisp reader.
16046 (digit_to_number): Move here from data.c. Make it static inline.
16047 (E_CHAR, EXP_INT): Remove, replacing with ...
16048 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16049 (string_to_number): New function, replacing isfloat_string.
16050 This function checks for valid syntax and produces the resulting
16051 Lisp float number too. Rework it so that string-to-number
16052 no longer mishandles examples like "1.0e+". Use strtoumax,
16053 so that overflow for non-base-10 numbers is reported only when
16054 there's no portable and simple way to convert to floating point.
16056 * textprop.c (set_text_properties_1): Rewrite for clarity,
16057 and to avoid GCC warning about integer overflow.
16059 * intervals.h (struct interval): Use EMACS_INT for members
16060 where EMACS_UINT might cause problems. See
16061 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16062 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16063 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16065 (offset_intervals): Tell GCC not to worry about length overflow
16066 when negating a negative length.
16068 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16069 (overrun_check_free): Likewise.
16071 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16072 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16075 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16076 (gnutls_make_error): Rename local to avoid shadowing.
16077 (gnutls_emacs_global_deinit): ifdef out; not used.
16078 (Fgnutls_boot): Use const for pointer to readonly storage.
16079 Comment out unused local. Fix pointer signedness problems.
16081 * lread.c (openp): Don't stuff size_t into an 'int'.
16082 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16083 about possible signed overflow.
16085 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16086 (GDK_KEY_g): Don't define if already defined.
16087 (xg_prepare_tooltip): Avoid pointer signedness problem.
16088 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16090 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16091 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16093 * xfns.c (Fx_window_property): Simplify a bit,
16094 to make a bit faster and to avoid GCC 4.6.0 warning.
16095 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16097 * fns.c (internal_equal): Don't assume size_t fits in int.
16099 * alloc.c (compact_small_strings): Tighten assertion a little.
16101 Replace pEd with more-general pI, and fix some printf arg casts.
16102 * lisp.h (pI): New macro, generalizing old pEd macro to other
16103 conversion specifiers. For example, use "...%"pI"d..." rather
16104 than "...%"pEd"...".
16105 (pEd): Remove. All uses replaced with similar uses of pI.
16106 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16107 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16108 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16109 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16110 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16111 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16112 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16114 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16115 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16116 * print.c (safe_debug_print, print_object): Likewise.
16117 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16119 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16120 avoiding the 0 flag, which is not portable.
16121 * process.c (Fmake_network_process): Use pI to avoid cast.
16122 * region-cache.c (pp_cache): Likewise.
16123 * xdisp.c (decode_mode_spec): Likewise.
16124 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16125 behavior on 64-bit hosts with printf arg.
16126 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16127 (x_stop_queuing_selection_requests): Likewise.
16128 (x_get_window_property): Don't truncate byte count to an 'int'
16131 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16132 here, since it parses constructs like leading '-' and spaces,
16133 which are not wanted; and it overflows with large numbers.
16134 Instead, simply match F[0-9]+, which is what is wanted anyway.
16136 * alloc.c: Remove unportable assumptions about struct layout.
16137 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16138 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16139 (allocate_vectorlike, make_pure_vector): Use the new macros,
16140 plus offsetof, to remove unportable assumptions about struct layout.
16141 These assumptions hold on all porting targets that I know of, but
16142 they are not guaranteed, they're easy to remove, and removing them
16143 makes further changes easier.
16145 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16146 This doesn't fix a bug but makes the code clearer.
16147 (string_overrun_cookie): Now const. Use initializers that
16148 don't formally overflow signed char, to avoid warnings.
16149 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16150 can cause Emacs to crash when string overrun checking is enabled.
16151 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16152 multiple of sizeof (EMACS_INT); it need not be, if
16153 alignof(EMACS_INT) < sizeof (EMACS_INT).
16154 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
16156 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
16158 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16160 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16162 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
16163 supposed to be handshaking. (Bug#8556)
16164 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16166 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
16168 * lisp.h (Qdebug): List symbol.
16169 * eval.c (Qdebug): Restore global linkage.
16170 * keyboard.c (debug-on-event): New variable.
16171 (handle_user_signal): Break into debugger when debug-on-event
16172 matches the current signal symbol.
16174 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16176 * alloc.c (check_sblock, check_string_bytes)
16177 (check_string_free_list): Convert to standard C.
16179 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16181 * w32.c (emacs_gnutls_push): Fix typo.
16183 2011-04-25 Eli Zaretskii <eliz@gnu.org>
16185 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16186 "cast to pointer from integer of different size".
16188 Improve doprnt and its use in verror. (Bug#8545)
16189 * doprnt.c (doprnt): Document the set of format control sequences
16190 supported by the function. Use SAFE_ALLOCA instead of always
16193 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16194 is one byte too soon. Don't use xrealloc; instead xfree and
16197 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16199 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16202 * gnutls.c: Renamed global_initialized to
16203 gnutls_global_initialized. Added internals for the
16204 :verify-hostname-error, :verify-error, and :verify-flags
16205 parameters of `gnutls-boot' and documented those parameters in the
16206 docstring. Start callback support.
16207 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16208 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16209 on error. Return error code.
16210 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16211 (emacs_gnutls_read): Likewise.
16212 (Fgnutls_boot): Return handshake error code.
16213 (emacs_gnutls_handle_error): New function.
16214 (wsaerror_to_errno): Likewise.
16216 * w32.h (emacs_gnutls_pull): Add prototype.
16217 (emacs_gnutls_push): Likewise.
16219 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16220 (emacs_gnutls_push): Likewise.
16222 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16224 * process.c (wait_reading_process_output): Check if GnuTLS
16225 buffered some data internally if no FDs are set for TLS
16228 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16229 (LIBS): Link to USER_LIBS.
16230 ($(BLD)/gnutls.$(0)): New target.
16232 2011-04-24 Eli Zaretskii <eliz@gnu.org>
16234 * xdisp.c (handle_single_display_spec): Rename the
16235 display_replaced_before_p argument into display_replaced_p, to
16236 make it consistent with the commentary. Fix typos in the
16239 * textprop.c (syms_of_textprop): Remove dead code.
16240 (copy_text_properties): Delete obsolete commentary about an
16241 interface that was deleted long ago. Fix typos in the description
16244 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16245 to changes in oldXMenu/XMenu.h from 2011-04-16.
16246 <menu_help_message, prev_menu_help_message>: Constify.
16247 (IT_menu_make_room): menu->help_text is now `const char **';
16250 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16251 to changes in oldXMenu/XMenu.h from 2011-04-16.
16252 (struct XMenu): Declare `help_text' `const char **'.
16254 * xfaces.c <Qunspecified>: Make extern again.
16256 * syntax.c: Include sys/types.h before including regex.h, as
16259 * doc.c (get_doc_string): Improve the format passed to `error'.
16261 * doprnt.c (doprnt): Improve commentary.
16263 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16265 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16268 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16269 changes in globals.h immediately force recompilation.
16270 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16271 $(CURDIR)/s/ms-w32.h.
16272 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
16274 * character.c (Fchar_direction): Function deleted.
16275 (syms_of_character): Don't defsubr it.
16276 <char-direction-table>: Deleted.
16278 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16280 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16281 * doprnt.c: Include limits.h.
16282 (SIZE_MAX): New macro.
16283 (doprnt): Return a size_t value. 2nd arg is now size_t.
16284 Many local variables are now size_t instead of int or unsigned.
16285 Improve overflow protection. Support `l' modifier for integer
16286 conversions. Support %l conversion. Don't assume an EMACS_INT
16287 argument for integer conversions and for %c.
16289 * lisp.h (doprnt): Restore prototype.
16291 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16292 $(SRC)/character.h.
16294 * Makefile.in (base_obj): Add back doprnt.o.
16296 * deps.mk (doprnt.o): Add back prerequisites.
16297 (callint.o): Depend on character.h.
16299 * eval.c (internal_lisp_condition_case): Include the handler
16300 representation in the error message.
16301 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16302 when breaking from the loop.
16304 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16306 * callint.c (Fcall_interactively): When displaying error message
16307 about invalid control letter, pass the character's codepoint, not
16308 a pointer to its multibyte form. Improve display of the character
16309 in octal and display also its hex code.
16311 * character.c (char_string): Use %x to display the (unsigned)
16312 codepoint of an invalid character, to avoid displaying a bogus
16315 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16316 `error', not SYMBOL_NAME itself.
16318 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
16319 character arguments to `error'.
16321 * charset.c (check_iso_charset_parameter): Fix incorrect argument
16322 to `error' in error message about FINAL_CHAR argument. Make sure
16323 FINAL_CHAR is a character, and use %c when it is passed as
16324 argument to `error'.
16326 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16328 * s/ms-w32.h (localtime): Redirect to sys_localtime.
16330 * w32.c: Include <time.h>.
16331 (sys_localtime): New function.
16333 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
16335 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
16337 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
16339 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
16341 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
16342 zombies (Bug#8467).
16344 2011-04-19 Eli Zaretskii <eliz@gnu.org>
16346 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
16347 gl_state.e_property when gl_state.object is Qt.
16349 * insdel.c (make_gap_larger): Remove limitation of buffer size
16352 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
16354 * xdisp.c (lookup_glyphless_char_display)
16355 (produce_glyphless_glyph): Handle cons cell entry in
16356 glyphless-char-display.
16357 (Vglyphless_char_display): Document it.
16359 * term.c (produce_glyphless_glyph): Handle cons cell entry in
16360 glyphless-char-display.
16362 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
16364 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
16366 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
16368 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
16369 definition for no-X builds.
16371 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
16373 Static checks with GCC 4.6.0 and non-default toolkits.
16375 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
16377 * process.c (keyboard_bit_set): Define only if SIGIO.
16378 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
16379 (send_process): Repair possible setjmp clobbering.
16381 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
16383 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
16385 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
16387 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
16388 Define only if needed.
16390 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
16391 by pacifying GCC about it. Maybe it's time to retire it?
16392 * xfaces.c (USG, __TIMEVAL__): Likewise.
16394 * dispextern.h (struct redisplay_interface): Rename param
16395 to avoid shadowing.
16396 * termhooks.h (struct terminal): Likewise.
16397 * xterm.c (xembed_send_message): Likewise.
16399 * insdel.c (make_gap_smaller): Define only if
16400 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
16402 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
16405 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
16406 so that we aren't warned about unused symbols.
16408 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
16410 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
16412 * xfns.c (x_real_positions): Mark locals as initialized.
16414 * xmenu.c (xmenu_show): Don't use uninitialized vars.
16416 * xterm.c: Fix problems found by static analysis with other toolkits.
16417 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
16418 (x_dispatch_event): Declare static if USE_GTK, and
16419 define if USE_GTK || USE_X_TOOLKIT.
16420 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
16421 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
16422 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
16423 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
16425 * xmenu.c (menu_help_callback): Pointer type fixes.
16426 Use const pointers when pointing at readonly data. Avoid pointer
16427 signedness clashes.
16428 (FALSE): Remove unused macro.
16429 (update_frame_menubar): Remove unused decl.
16431 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
16433 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
16434 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
16435 (single_menu_item): Rename local to avoid shadowing.
16437 * keyboard.c (make_lispy_event): Remove unused local var.
16439 * frame.c, frame.h (x_get_resource_string): Bring this back, but
16440 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
16442 * bitmaps: Change bitmaps from unsigned char back to the X11
16443 compatible char. Avoid the old compiler warnings about
16444 out-of-range initializers by using, for example, '\xab' rather
16447 * xgselect.c (xgselect_initialize): Check vs interface
16448 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
16450 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
16452 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
16453 to read-only memory.
16455 * fns.c (vector): Remove; this old hack is no longer needed.
16457 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
16459 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
16461 * xrdb.c (x_load_resources): Omit unused local.
16463 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
16464 (x_window): Rename locals to avoid shadowing.
16465 (USG): Use the kludged USG macro, to pacify gcc.
16467 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
16468 (x_term_init): Remove local to avoid shadowing.
16470 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
16472 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
16473 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
16475 2011-04-16 Eli Zaretskii <eliz@gnu.org>
16477 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
16479 Fix regex.c, syntax.c and friends for buffers > 2GB.
16480 * syntax.h (struct gl_state_s): Declare character position members
16483 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
16485 * textprop.c (verify_interval_modification, interval_of):
16486 Declare arguments EMACS_INT.
16488 * intervals.c (adjust_intervals_for_insertion): Declare arguments
16491 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
16493 * indent.c (Fvertical_motion): Local variable it_start is now
16496 * regex.c (re_match, re_match_2, re_match_2_internal)
16497 (bcmp_translate, regcomp, regexec, print_double_string)
16498 (group_in_compile_stack, re_search, re_search_2, regex_compile)
16499 (re_compile_pattern, re_exec): Declare arguments and local
16500 variables `size_t' and `ssize_t' and return values `regoff_t', as
16502 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
16503 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
16504 <compile_stack_type>: `size' and `avail' are now `size_t'.
16506 * regex.h <regoff_t>: Use ssize_t, not int.
16507 (re_search, re_search_2, re_match, re_match_2): Arguments that
16508 specify buffer/string position and length are now ssize_t and
16509 size_t. Return type is regoff_t.
16511 2011-04-16 Ben Key <bkey76@gmail.com>
16513 * nsfont.m: Fixed bugs in ns_get_family and
16514 ns_descriptor_to_entity that were caused by using free to
16515 deallocate memory blocks that were allocated by xmalloc (via
16516 xstrdup). This caused Emacs to crash when compiled with
16517 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
16518 --enable-checking=xmallocoverrun). xfree is now used to
16519 deallocate these memory blocks.
16521 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
16523 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
16525 emacs_write: Accept and return EMACS_INT for sizes.
16526 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
16528 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
16529 Accept and return EMACS_INT.
16530 (emacs_gnutls_write): Return the number of bytes written on
16532 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
16533 (emacs_read, emacs_write): Remove check for negative size, as the
16534 Emacs source code has been audited now.
16535 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
16536 (emacs_read, emacs_write): Use it.
16537 * process.c (send_process): Adjust to the new signatures of
16538 emacs_write and emacs_gnutls_write. Do not attempt to store
16539 a byte offset into an 'int'; it might overflow.
16540 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
16542 * sound.c: Don't assume sizes fit in 'int'.
16543 (struct sound_device.period_size, alsa_period_size):
16544 Return EMACS_INT, not int.
16545 (struct sound_device.write, vox_write, alsa_write):
16546 Accept EMACS_INT, not int.
16547 (wav_play, au_play): Use EMACS_INT to store sizes and to
16548 record read return values.
16550 2011-04-15 Ben Key <bkey76@gmail.com>
16552 * keyboard.c (Qundefined): Don't declare static since it is used
16554 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
16555 static since they are used in nsfont.m.
16557 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
16559 * process.c (Qprocessp): Don't declare static.
16560 * lisp.h (Qprocessp): Declare again.
16562 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
16564 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
16566 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
16568 Improve C-level modularity by making more things 'static'.
16570 Don't publish debugger-only interfaces to other modules.
16571 * lisp.h (safe_debug_print, debug_output_compilation_hack):
16572 (verify_bytepos, count_markers): Move decls to the only modules
16574 * region-cache.h (pp_cache): Likewise.
16575 * window.h (check_all_windows): Likewise.
16576 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
16578 * sysdep.c (croak): Now static, if
16579 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
16580 * syssignal.h (croak): Declare only if not static.
16582 * alloc.c (refill_memory_reserve): Now static if
16583 !defined REL_ALLOC || defined SYSTEM_MALLOC.
16584 * lisp.h (refill_memory_reserve): Declare only if not static.
16586 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
16587 Define only if USE_LUCID.
16589 * xrdb.c (x_customization_string, x_rm_string): Now static.
16591 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
16592 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
16594 * xdisp.c (draw_row_with_mouse_face): Now static.
16595 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
16597 * window.h (check_all_windows): Mark externally visible.
16599 * window.c (window_deletion_count): Now static.
16601 * undo.c: Make symbols static if they're not exported.
16602 (last_undo_buffer, last_boundary_position, pending_boundary):
16605 * textprop.c (interval_insert_behind_hooks): Now static.
16606 (interval_insert_in_front_hooks): Likewise.
16608 * term.c: Make symbols static if they're not exported.
16609 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
16610 (max_frame_lines, tty_set_terminal_modes):
16611 (tty_reset_terminal_modes, tty_turn_off_highlight):
16612 (get_tty_terminal): Now static.
16613 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
16614 * termhooks.h (term_mouse_moveto): Do not declare if
16615 HAVE_WINDOW_SYSTEM.
16616 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
16617 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
16619 * sysdep.c: Make symbols static if they're not exported.
16620 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
16622 (sigprocmask_set, full_mask): Remove; unused.
16623 (wait_debugging): Mark as visible.
16624 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
16625 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
16627 * syntax.c (syntax_temp): Define only if !__GNUC__.
16629 * sound.c (current_sound_device, current_sound): Now static.
16631 * search.c (searchbufs, searchbuf_head): Now static.
16633 * scroll.c (scroll_cost): Remove; unused.
16634 * dispextern.h (scroll_cost): Remove decl.
16636 * region-cache.h (pp_cache): Mark as externally visible.
16638 * process.c: Make symbols static if they're not exported.
16639 (process_tick, update_tick, create_process, chan_process):
16640 (Vprocess_alist, proc_buffered_char, datagram_access):
16641 (fd_callback_data, send_process_frame, process_sent_to): Now static.
16642 (deactivate_process): Mark defn as static, as well as decl.
16643 * lisp.h (create_process): Remove decl.
16644 * process.h (chan_process, Vprocess_alist): Remove decls.
16646 * print.c: Make symbols static if they're not exported.
16647 (print_depth, new_backquote_output, being_printed, print_buffer):
16648 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
16649 (print_interval, print_number_index, initial_stderr_stream):
16651 * lisp.h (Fprinc): Remove decl.
16652 (debug_output_compilation_hack): Mark as externally visible.
16654 * sysdep.c (croak): Move decl from here to syssignal.h.
16655 * syssignal.h (croak): Put it here, so the API can be checked when
16656 'croak' is called from dissociate_if_controlling_tty.
16658 * minibuf.c: Make symbols static if they're not exported.
16659 (minibuf_save_list, choose_minibuf_frame): Now static.
16660 * lisp.h (choose_minibuf_frame): Remove decl.
16662 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
16664 * lread.c: Make symbols static if they're not exported.
16665 (read_objects, initial_obarray, oblookup_last_bucket_number):
16667 (make_symbol): Remove; unused.
16668 * lisp.h (initial_obarray, make_symbol): Remove decls.
16670 * keyboard.c: Make symbols static if they're not exported.
16671 (single_kboard, recent_keys_index, total_keys, recent_keys):
16672 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
16673 (this_single_command_key_start, echoing, last_auto_save):
16674 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
16675 (command_loop, echo_now, keyboard_init_hook, help_char_p):
16676 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
16677 (Vlispy_mouse_stem, double_click_count):
16679 (force_auto_save_soon): Define only if SIGDANGER.
16680 (ignore_mouse_drag_p): Now static if
16681 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
16682 (print_help): Remove; unused.
16683 (stop_character, last_timer_event): Mark as externally visible.
16684 * keyboard.h (ignore_mouse_drag_p): Declare only if
16685 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
16686 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
16687 * lisp.h (echoing): Remove decl.
16688 (force_auto_save_soon): Declare only if SIGDANGER.
16689 * xdisp.c (redisplay_window): Simplify code, to make it more
16690 obvious that ignore_mouse_drag_p is not accessed if !defined
16691 USE_GTK && !defined HAVE_NS.
16693 * intervals.c: Make symbols static if they're not exported.
16694 (merge_properties_sticky, merge_interval_right, delete_interval):
16696 * intervals.h (merge_interval_right, delete_interval): Remove decls.
16698 * insdel.c: Make symbols static if they're not exported.
16699 However, leave prepare_to_modify_buffer alone. It's never
16700 called from outside this function, but that appears to be a bug.
16701 (combine_after_change_list, combine_after_change_buffer):
16702 (adjust_after_replace, signal_before_change): Now static.
16703 (adjust_after_replace_noundo): Remove; unused.
16704 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
16705 (signal_before_change): Remove decls.
16707 * indent.c (val_compute_motion, val_vmotion): Now static.
16709 * image.c: Make symbols static if they're not exported.
16710 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
16712 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
16713 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
16715 * fringe.c (standard_bitmaps): Now static.
16716 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
16718 * frame.c: Make symbols static if they're not exported.
16719 (x_report_frame_params, make_terminal_frame): Now static.
16720 (get_frame_param): Now static, unless HAVE_NS.
16721 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
16722 (x_get_resource_string): Remove; not used.
16723 * frame.h (make_terminal_frame, x_report_frame_params):
16724 (x_get_resource_string); Remove decls.
16725 (x_fullscreen_adjust): Declare only if WINDOWSNT.
16726 * lisp.h (get_frame_param): Declare only if HAVE_NS.
16728 * font.c, fontset.c: Make symbols static if they're not exported.
16729 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
16730 (FACE_SUITABLE_FOR_CHAR_P): Use it.
16731 * font.c (font_close_object): Now static.
16732 * font.h (font_close_object): Remove.
16733 * fontset.c (FONTSET_OBJLIST): Remove.
16734 (free_realized_fontset) #if-0 the body, which does nothing.
16735 (face_suitable_for_char_p): #if-0, as it's never called.
16736 * fontset.h (face_suitable_for_char_p): Remove decl.
16737 * xfaces.c (face_at_string_position):
16738 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
16739 since 0 is always ASCII.
16741 * fns.c (weak_hash_tables): Now static.
16743 * fileio.c: Make symbols static if they're not exported.
16744 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
16745 (Vwrite_region_annotation_buffers): Now static.
16747 * eval.c: Make symbols static if they're not exported.
16748 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
16749 * lisp.h (backtrace_list): Remove decl.
16751 * emacs.c: Make symbols static if they're not exported.
16752 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
16753 (fatal_error_code, fatal_error_signal_hook, standard_args):
16755 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
16756 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
16757 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
16758 * lisp.h (fatal_error_signal_hook): Remove decl.
16759 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
16761 * editfns.c: Move a (normally-unused) function to its only use.
16762 * editfns.c, lisp.h (get_operating_system_release): Remove.
16763 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
16764 worth the hassle of breaking this out.
16766 * xterm.c: Make symbols static if they're not exported.
16767 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
16768 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
16769 (x_destroy_window, x_delete_display):
16771 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
16772 (x_mouse_leave): Remove; unused.
16773 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
16774 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
16775 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
16777 (x_mouse_leave): Declare only if WINDOWSNT.
16778 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
16779 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
16782 * ftxfont.c: Make symbols static if they're not exported.
16783 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
16785 * font.h (ftxfont_driver): Likewise.
16787 * xfns.c: Make symbols static if they're not exported.
16788 (x_last_font_name, x_display_info_for_name):
16789 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
16790 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
16791 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
16792 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
16793 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
16794 (last_show_tip_args): Now static.
16795 (xic_defaut_fontset, xic_create_fontsetname): Define only if
16796 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
16797 (x_screen_planes): Remove; unused.
16798 * dispextern.h (x_screen_planes): Remove decl.
16800 * dispnew.c: Make symbols static if they're not exported.
16801 * dispextern.h (redraw_garbaged_frames, scrolling):
16802 (increment_row_positions): Remove.
16803 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
16804 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
16806 (redraw_garbaged_frames): Remove; unused.
16808 * xfaces.c: Make symbols static if they're not exported.
16809 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
16811 * xterm.h (defined_color): Remove decls.
16812 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
16813 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
16814 (menu_face_changed_default, defined_color, free_realized_face):
16815 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
16816 (ascii_face_of_lisp_face): Remove; unused.
16818 * xdisp.c: Make symbols static if they're not exported.
16819 * dispextern.h (scratch_glyph_row, window_box_edges):
16820 (glyph_to_pixel_coords, set_cursor_from_row):
16821 (get_next_display_element, set_iterator_to_next):
16822 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
16823 (show_mouse_face): Remove decls
16824 * frame.h (message_buf_print): Likewise.
16825 * lisp.h (pop_message, set_message, check_point_in_composition):
16827 * xterm.h (set_vertical_scroll_bar): Likewise.
16828 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
16829 (message_buf_print, scratch_glyph_row, displayed_buffer):
16830 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
16831 (get_next_display_element, show_mouse_face, window_box_edges):
16832 (frame_to_window_pixel_xy, check_point_in_composition):
16833 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
16834 (glyph_to_pixel_coords): Remove; unused.
16836 * dired.c (file_name_completion): Now static.
16838 * dbusbind.c (xd_in_read_queued_messages): Now static.
16840 * lisp.h (circular_list_error, FOREACH): Remove; unused.
16841 * data.c (circular_list_error): Remove.
16843 * commands.h (last_point_position, last_point_position_buffer):
16844 (last_point_position_window): Remove decls.
16845 * keyboard.c: Make these variables static.
16847 * coding.h (coding, code_convert_region, encode_coding_gap):
16849 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
16850 (iso_code_class, detect_coding, code_convert_region): Now static.
16851 (encode_coding_gap): Remove; unused.
16853 * chartab.c (chartab_chars, chartab_bits): Now static.
16855 * charset.h (charset_iso_8859_1): Remove decl.
16856 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
16859 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
16860 * ccl.c (Vccl_program_table): Now static.
16861 (check_ccl_update): Remove; unused.
16863 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
16864 * category.h: ... from here.
16865 * category.c (check_category_table, set_category_set): Now static.
16867 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
16868 * lisp.h: Remove these decls.
16870 * buffer.c (buffer_count): Remove unused var.
16872 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
16873 so that it's not optimized away.
16874 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
16875 * dispextern.h (bidi_dump_cached_states): Remove, since it's
16876 exported only to the debugger.
16878 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
16879 * atimer.h (run_all_atimers): Remove; not exported.
16881 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
16882 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
16883 was inaccessible from Lisp.
16884 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
16885 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
16887 alloc.c: Import and export fewer symbols, and remove unused items.
16888 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
16890 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
16891 it's not optimized away by whole-program optimization.
16892 (message_enable_multibyte, free_misc): Remove.
16893 (catchlist, handlerlist, mark_backtrace):
16894 Declare only if BYTE_MARK_STACK.
16895 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
16896 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
16897 (message_enable_multibyte): Remove decl.
16898 (free_misc, interval_free_list, float_block, float_block_index):
16899 (n_float_blocks, float_free_list, cons_block, cons_block_index):
16900 (cons_free_list, last_marked_index):
16902 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
16903 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
16904 (mark_backtrace): Define only if BYTE_MARK_STACK.
16905 * xdisp.c (message_enable_multibyte): Now static.
16907 Declare Lisp_Object Q* variables to be 'static' if not exported.
16908 This makes it easier for human readers (and static analyzers)
16909 to see whether these variables are used from other modules.
16910 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
16911 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
16912 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
16913 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
16914 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
16915 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
16916 * xmenu.c, xselect.c:
16917 Declare Q* vars static if they are not used in other modules.
16918 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
16919 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
16920 Remove decls of unexported vars.
16921 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
16923 * lisp.h (DEFINE_FUNC): Make sname 'static'.
16925 Make Emacs functions such as Fatom 'static' by default.
16926 This makes it easier for human readers (and static analyzers)
16927 to see whether these functions can be called from other modules.
16928 DEFUN now defines a static function. To make the function external
16929 so that it can be used in other C modules, use the new macro DEFUE.
16930 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
16931 (Finit_image_library):
16932 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
16933 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
16934 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
16935 Remove decls, since these functions are now static.
16936 (Funintern, Fget_internal_run_time): New decls, since these functions
16937 were already external.
16939 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
16940 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
16941 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
16942 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
16943 * keyboard.c, keymap.c, lread.c:
16944 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
16945 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
16946 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
16947 Mark functions with DEFUE instead of DEFUN,
16948 if they are used in other modules.
16949 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
16950 decls for now-static functions.
16951 * buffer.h (Fdelete_overlay): Remove decl.
16952 * callproc.c (Fgetenv_internal): Mark as internal.
16953 * composite.c (Fremove_list_of_text_properties): Remove decl.
16954 (Fcomposition_get_gstring): New forward static decl.
16955 * composite.h (Fcomposite_get_gstring): Remove decl.
16956 * dired.c (Ffile_attributes): New forward static decl.
16957 * doc.c (Fdocumntation_property): New forward static decl.
16958 * eval.c (Ffetch_bytecode): New forward static decl.
16959 (Funintern): Remove extern decl; now in .h file where it belongs.
16960 * fileio.c (Fmake_symbolic_link): New forward static decl.
16961 * image.c (Finit_image_library): New forward static decl.
16962 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
16963 * intervals.h (Fprevious_property_change):
16964 (Fremove_list_of_text_properties): Remove decls.
16965 * keyboard.c (Fthis_command_keys): Remove decl.
16966 (Fcommand_execute): New forward static decl.
16967 * keymap.c (Flookup_key): New forward static decl.
16968 (Fcopy_keymap): Now static.
16969 * keymap.h (Flookup_key): Remove decl.
16970 * process.c (Fget_process): New forward static decl.
16971 (Fprocess_datagram_address): Mark as internal.
16972 * syntax.c (Fsyntax_table_p): New forward static decl.
16973 (skip_chars): Remove duplicate decl.
16974 * textprop.c (Fprevious_property_change): New forward static decl.
16975 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
16977 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
16978 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
16980 * editfns.c (Fformat): Remove unreachable code.
16982 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
16984 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
16987 2011-04-13 Eli Zaretskii <eliz@gnu.org>
16989 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
16990 when at ZV. (Bug#8487)
16992 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
16994 * charset.c (Fclear_charset_maps): Use xfree instead of free.
16996 * keyboard.c (parse_tool_bar_item): Likewise.
16997 * sound.c (sound_cleanup, alsa_close): Likewise.
16998 * termcap.c (tgetent): Likewise.
16999 * xfns.c (x_default_font_parameter): Likewise.
17000 * xsettings.c (read_and_apply_settings): Likewise.
17002 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17003 (overrun_check_free): Protoize.
17005 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17007 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17008 since callers should never pass a negative size.
17009 Change the signature to match that of plain 'read' and 'write'; see
17010 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17011 * lisp.h: Update prototypes of emacs_write and emacs_read.
17013 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17015 * xdisp.c (redisplay_window): Don't try to determine the character
17016 position of the scroll margin if the window start point w->startp
17017 is outside the buffer's accessible region. (Bug#8468)
17019 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17021 Fix write-region and its subroutines for buffers > 2GB.
17022 * fileio.c (a_write, e_write): Modify declaration of arguments and
17023 local variables to support buffers larger than 2GB.
17024 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17026 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17027 argument, local variables, and return value.
17029 * lisp.h: Update prototypes of emacs_write and emacs_read.
17031 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17033 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17035 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17037 Fix more problems found by GCC 4.6.0's static checks.
17039 * xdisp.c (vmessage): Use a better test for character truncation.
17041 * charset.c (load_charset_map): <, not <=, for optimization,
17042 and to avoid potential problems with integer overflow.
17043 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17044 * casetab.c (set_identity, shuffle): Likewise.
17045 * editfns.c (Fformat): Likewise.
17046 * syntax.c (skip_chars): Likewise.
17048 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17049 This also lets GCC 4.6.0 generate slightly better loop code.
17051 * callint.c (Fcall_interactively): <, not <=, for optimization.
17052 (Fcall_interactively): Count the number of arguments produced,
17053 not the number of arguments given. This is simpler and lets GCC
17054 4.6.0 generate slightly better code.
17056 * ftfont.c: Distingish more carefully between FcChar8 and char.
17057 The previous code passed unsigned char * to a functions like
17058 strlen and xstrcasecmp that expect char *, which does not
17059 conform to the C standard.
17060 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17061 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17062 char * when the C standard requires it.
17064 * keyboard.c (read_char): Remove unused var.
17066 * eval.c: Port to Windows vsnprintf (Bug#8435).
17067 Include <limits.h>.
17068 (SIZE_MAX): Define if the headers do not.
17069 (verror): Do not give up if vsnprintf returns a negative count.
17070 Instead, grow the buffer. This ports to Windows vsnprintf, which
17071 does not conform to C99. Problem reported by Eli Zaretskii.
17072 Also, simplify the allocation scheme, by avoiding the need for
17073 calling realloc, and removing the ALLOCATED variable.
17075 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17077 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17078 But keep the doprint source code for now, as we might revamp it
17079 and use it again (Bug#8435).
17080 * lisp.h (doprnt): Remove.
17081 * Makefile.in (base_obj): Remove doprnt.o.
17082 * deps.mk (doprnt.o): Remove.
17084 error: Print 32- and 64-bit integers portably (Bug#8435).
17085 Without this change, on typical 64-bit hosts error ("...%d...", N)
17086 was used to print both 32- and 64-bit integers N, which relied on
17087 undefined behavior.
17088 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17089 * lisp.h (error, verror): Mark as printf-like functions.
17090 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17091 Report overflow in size calculations when allocating printf buffer.
17092 Do not truncate output string at its first null byte.
17093 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17094 Truncate the output at a character boundary, since vsnprintf does not
17096 * charset.c (check_iso_charset_parameter): Convert internal
17097 character to string before calling 'error', since %c now has the
17099 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17100 overflow when computing char to be passed to 'error'. Do not
17101 pass Lisp_Object to 'error'; pass the integer instead.
17102 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17103 formatted with plain %d.
17105 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17107 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17109 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17111 * xterm.c (x_catch_errors): Remove duplicate declaration.
17113 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17115 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17117 2011-04-10 Jim Meyering <meyering@redhat.com>
17119 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17120 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17121 return ssize_t not "int", and use size_t as the buffer length.
17122 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17123 * gnutls.h: Update declarations.
17124 * process.c (read_process_output): Use ssize_t, to match.
17125 (send_process): Likewise.
17127 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17129 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17131 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17133 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17134 Use unsigned char, to match FcChar8 type definition.
17136 * xterm.c (handle_one_xevent):
17137 * xmenu.c (create_and_show_popup_menu):
17138 * xselect.c (x_decline_selection_request)
17139 (x_reply_selection_request): Avoid type-punned deref of X events.
17141 2011-04-09 Eli Zaretskii <eliz@gnu.org>
17143 Fix some uses of `int' instead of EMACS_INT.
17144 * search.c (string_match_1, fast_string_match)
17145 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17146 (scan_buffer, find_next_newline_no_quit)
17147 (find_before_next_newline, search_command, Freplace_match)
17148 (Fmatch_data): Make some `int' variables be EMACS_INT.
17150 * xdisp.c (display_count_lines): 3rd argument and return value now
17151 EMACS_INT. All callers changed.
17152 (pint2hrstr): Last argument is now EMACS_INT.
17154 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17155 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17156 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17157 (decode_coding_utf_16, decode_coding_emacs_mule)
17158 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17159 (decode_coding_ccl, decode_coding_charset)
17160 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17161 (decode_coding_iso_2022, decode_coding_emacs_mule)
17162 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17163 <char_offset, last_offset>: Declare EMACS_INT.
17164 (encode_coding_utf_8, encode_coding_utf_16)
17165 (encode_coding_emacs_mule, encode_invocation_designation)
17166 (encode_designation_at_bol, encode_coding_iso_2022)
17167 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17168 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17170 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17171 (encode_invocation_designation): Last argument P_NCHARS is now
17173 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17174 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17176 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17179 * ccl.c (Fccl_execute_on_string): Declare some variables
17182 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
17184 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17186 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17188 * process.c (Fformat_network_address): Doc fix.
17190 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17192 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
17194 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
17196 * keyboard.c (read_char): Call Lisp function help-form-show,
17197 instead of using internal_with_output_to_temp_buffer.
17198 (Qhelp_form_show): New var.
17199 (syms_of_keyboard): Use DEFSYM macro.
17201 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17203 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17205 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
17207 * process.c (Flist_processes): Remove to Lisp.
17208 (list_processes_1): Delete.
17210 2011-04-06 Eli Zaretskii <eliz@gnu.org>
17212 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17214 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17216 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
17218 Fix more problems found by GCC 4.6.0's static checks.
17220 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17222 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17224 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
17226 * xdisp.c (vmessage): Mark as a printf-like function.
17228 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17230 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17232 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17233 printf-like functions.
17234 (tiff_load): Add casts to remove these marks before passing them
17235 to system-supplied API.
17237 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17239 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17240 This avoids several warnings with gcc -Wstrict-overflow.
17241 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17242 directly, rather than having caller test rule sign. This avoids
17243 some unnecessary tests.
17244 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17245 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17246 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
17248 * xfont.c (xfont_text_extents): Remove var that was set but not used.
17249 (xfont_open): Avoid unnecessary tests.
17251 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17253 * composite.h, composite.c (composition_gstring_put_cache):
17254 Use EMACS_INT, not int, for length.
17256 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17257 breaking out part of COMPOSITION_DECODE_RULE.
17258 (COMPOSITION_DECODE_RULE): Use it.
17259 * composite.c (get_composition_id): Remove unused local vars,
17260 by using the new macro.
17262 * textprop.c (set_text_properties_1): Change while to do-while,
17263 since the condition is always true at first.
17265 * intervals.c (graft_intervals_into_buffer): Mark var as used.
17266 (interval_deletion_adjustment): Return unsigned value.
17269 * process.c (list_processes_1, create_pty, read_process_output):
17270 (exec_sentinel): Remove vars that were set but not used.
17271 (create_pty): Remove unnecessary "volatile"s.
17272 (Fnetwork_interface_info): Avoid possibility of int overflow.
17273 (read_process_output): Do adaptive read buffering even if carryover.
17274 (read_process_output): Simplify nbytes computation if buffered.
17276 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17278 * syntax.c (scan_words): Remove var that was set but not used.
17279 (update_syntax_table): Use unsigned instead of int.
17281 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
17282 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
17283 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
17285 * print.c (print_error_message): Avoid int overflow.
17287 * font.c (font_list_entities): Redo for clarity,
17288 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17290 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
17291 (font_score): Avoid potential overflow in diff calculation.
17293 * fns.c (substring_both): Remove var that is set but not used.
17294 (sxhash): Redo loop for clarity and to avoid wraparound warning.
17296 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17298 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17299 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17300 can always succeed if overflow has undefined behavior.
17302 * search.c (boyer_moore, wordify): Remove vars set but not used.
17303 (wordify): Omit three unnecessary tests.
17305 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17306 All callers changed. This avoids the need for an unused var.
17308 * casefiddle.c (casify_region): Remove var that is set but not used.
17310 * dired.c (file_name_completion): Remove var that is set but not used.
17312 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17314 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
17315 (Finsert_file_contents): Remove unnecessary code checking fd.
17317 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17318 Check for integer overflow on size calculations.
17320 * buffer.c (Fprevious_overlay_change): Remove var that is set
17323 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
17324 Remove vars that are set but not used.
17325 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
17326 (timer_check_2): Mark vars as initialized.
17328 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
17330 * image.c (lookup_image): Remove var that is set but not used.
17331 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
17333 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
17334 that are set but not used.
17336 * xfns.c (make_invisible_cursor): Don't return garbage
17337 if XCreateBitmapFromData fails (Bug#8410).
17339 * xselect.c (x_get_local_selection, x_handle_property_notify):
17340 Remove vars that are set but not used.
17342 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
17343 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
17345 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
17346 Remove var that is set but not used.
17347 (scroll_bar_windows_size): Now size_t, not int.
17348 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
17349 Check for overflow.
17351 * xfaces.c (realize_named_face): Remove vars that are set but not used.
17352 (map_tty_color) [!defined MSDOS]: Likewise.
17354 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
17356 * coding.c: Remove vars that are set but not used.
17357 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
17358 All callers changed.
17359 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
17360 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
17361 (decode_coding_charset): Remove vars that are set but not used.
17363 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
17364 that is set but not used.
17366 * print.c (print_object): Remove var that is set but not used.
17368 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
17369 The gnulib version avoids calling malloc in the usual case,
17370 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
17371 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
17372 * filelock.c (current_lock_owner): Likewise.
17373 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
17374 * sysdep.c: Include allocator.h, careadlinkat.h.
17375 (emacs_no_realloc_allocator): New static constant.
17376 (emacs_readlink): New function.
17377 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
17378 ../lib/careadlinkat.h.
17380 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17382 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
17383 first non-nil return value).
17385 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
17387 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
17388 if not defined (Bug#8403).
17390 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
17392 * xdisp.c (display_count_lines): Remove parameter `start',
17393 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17394 (get_char_face_and_encoding): Remove parameter `multibyte_p',
17395 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17396 (fill_stretch_glyph_string): Remove parameters `row' and `area',
17397 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
17398 and thereabouts. All callers changed.
17399 (get_per_char_metric): Remove parameter `f', unused since
17400 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17402 2011-04-02 Jim Meyering <meyering@redhat.com>
17404 do not dereference NULL upon failed strdup
17405 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
17406 (ns_get_family): Likewise.
17408 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
17410 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
17412 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
17414 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
17417 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
17419 Add lexical binding.
17421 * window.c (Ftemp_output_buffer_show): New fun.
17422 (Fsave_window_excursion):
17423 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
17425 * lread.c (lisp_file_lexically_bound_p): New function.
17426 (Fload): Bind Qlexical_binding.
17427 (readevalloop): Remove `evalfun' arg.
17428 Bind Qinternal_interpreter_environment.
17429 (Feval_buffer): Bind Qlexical_binding.
17430 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
17432 (syms_of_lread): Declare `lexical-binding'.
17434 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
17436 * keyboard.c (eval_dyn): New fun.
17437 (menu_item_eval_property): Use it.
17439 * image.c (parse_image_spec): Use Ffunctionp.
17441 * fns.c (concat, mapcar1): Accept byte-code-functions.
17443 * eval.c (Fsetq): Handle lexical vars.
17444 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
17445 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
17446 (FletX, Flet): Obey lexical binding.
17447 (Fcommandp): Handle closures.
17448 (Feval): New `lexical' arg.
17449 (eval_sub): New function extracted from Feval. Use it almost
17450 everywhere where Feval was used. Look up vars in lexical env.
17452 (Ffunctionp): Move from subr.el.
17453 (Ffuncall): Handle closures.
17454 (apply_lambda): Remove `eval_flags'.
17455 (funcall_lambda): Handle closures and new byte-code-functions.
17456 (Fspecial_variable_p): New function.
17457 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
17458 but without exporting it to Lisp.
17460 * doc.c (Fdocumentation, store_function_docstring):
17461 * data.c (Finteractive_form): Handle closures.
17463 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
17466 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
17468 (exec_byte_code): New function extracted from Fbyte_code to handle new
17469 calling convention for byte-code-functions. Add new byte-codes.
17471 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
17473 * alloc.c (Fmake_symbol): Init new `declared_special' field.
17475 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
17477 * xdisp.c (redisplay_internal): Fix prototype.
17479 2011-03-31 Eli Zaretskii <eliz@gnu.org>
17481 * xdisp.c (SCROLL_LIMIT): New macro.
17482 (try_scrolling): Use it when setting scroll_limit.
17483 Limit scrolling to 100 screen lines.
17484 (redisplay_window): Even when falling back on "recentering",
17485 position point in the window according to scroll-conservatively,
17486 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
17488 (try_scrolling): When point is above the window, allow searching
17489 as far as scroll_max, or one screenful, to compute vertical
17490 distance from PT to the scroll margin position. This prevents
17491 try_scrolling from unnecessarily failing when
17492 scroll-conservatively is set to a value slightly larger than the
17493 window height. Clean up the case of PT below the margin at bottom
17494 of window: scroll_max can no longer be INT_MAX. When aggressive
17495 scrolling is in use, don't let point enter the opposite scroll
17496 margin as result of the scroll.
17497 (syms_of_xdisp) <scroll-conservatively>: Document the
17498 threshold of 100 lines for never-recentering scrolling.
17500 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
17502 * dispextern.h (move_it_by_lines):
17503 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
17504 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
17505 (message_log_check_duplicate): Remove parameters `prev_bol' and
17506 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17507 (redisplay_internal): Remove parameter `preserve_echo_area',
17508 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
17510 * indent.c (Fvertical_motion):
17511 * window.c (window_scroll_pixel_based, Frecenter):
17512 Don't pass `need_y_p' to `move_it_by_lines'.
17514 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
17516 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
17517 steal a few bits to be more compact.
17518 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
17519 Remove unneeded casts.
17521 * bytecode.c (Fbyte_code): CAR and CDR can GC.
17523 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
17525 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
17526 binding" message (bug#7967).
17528 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
17530 Fix more problems found by GCC 4.6.0's static checks.
17532 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
17533 Remove unused local var.
17535 * editfns.c (Fmessage_box): Remove unused local var.
17537 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
17538 (note_mode_line_or_margin_highlight, note_mouse_highlight):
17539 Omit unused local vars.
17540 * window.c (shrink_windows): Omit unused local var.
17541 * menu.c (digest_single_submenu): Omit unused local var.
17542 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
17543 Omit unused local var.
17545 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
17546 Don't assume string length fits in int.
17547 (keyremap_step, read_key_sequence): Use size_t for sizes.
17548 (read_key_sequence): Don't check last_real_key_start redundantly.
17550 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
17551 instead of alloca (Bug#8344).
17553 * eval.c (Fbacktrace): Don't assume nargs fits in int.
17554 (Fbacktrace_frame): Don't assume nframes fits in int.
17556 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
17558 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
17561 * term.c (produce_glyphless_glyph): Remove unnecessary test.
17563 * cm.c (calccost): Turn while-do into do-while, for clarity.
17565 * keyboard.c (syms_of_keyboard): Use the same style as later
17566 in this function when indexing through an array. This also
17567 works around GCC bug 48267.
17569 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
17571 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
17573 * chartab.c (sub_char_table_ref_and_range): Redo for slight
17574 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
17576 * keyboard.c, keyboard.h (num_input_events): Now size_t.
17577 This avoids undefined behavior on integer overflow, and is a bit
17578 more convenient anyway since it is compared to a size_t variable.
17580 Variadic C functions now count arguments with size_t, not int.
17581 This avoids an unnecessary limitation on 64-bit machines, which
17582 caused (substring ...) to crash on large vectors (Bug#8344).
17583 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
17584 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
17585 All variadic functions and their callers changed accordingly.
17586 (struct gcpro.nvars): Now size_t, not int. All uses changed.
17587 * data.c (arith_driver, float_arith_driver): Likewise.
17588 * editfns.c (general_insert_function): Likewise.
17589 * eval.c (struct backtrace.nargs, interactive_p)
17590 (internal_condition_case_n, run_hook_with_args, apply_lambda)
17591 (funcall_lambda, mark_backtrace): Likewise.
17592 * fns.c (concat): Likewise.
17593 * frame.c (x_set_frame_parameters): Likewise.
17594 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
17595 0 if not found, not -1. All callers changed.
17597 * alloc.c (garbage_collect): Don't assume stack size fits in int.
17598 (stack_copy_size): Now size_t, not int.
17599 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
17601 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
17603 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
17604 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
17605 All callers changed.
17607 * lisp.h (multibyte_char_to_unibyte):
17608 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
17609 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
17610 * character.h (CHAR_TO_BYTE8):
17611 * cmds.c (internal_self_insert):
17612 * editfns.c (general_insert_function):
17613 * keymap.c (push_key_description):
17614 * search.c (Freplace_match):
17615 * xdisp.c (message_dolog, set_message_1): All callers changed.
17617 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
17619 * keyboard.c (safe_run_hook_funcall): New function.
17620 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
17621 don't set the hook to nil, but remove the offending function instead.
17622 (Qcommand_hook_internal): Remove, unused.
17623 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
17624 Vcommand_hook_internal.
17626 * eval.c (enum run_hooks_condition): Remove.
17627 (funcall_nil, funcall_not): New functions.
17628 (run_hook_with_args): Call each function through a `funcall' argument.
17629 Remove `cond' argument, now redundant.
17630 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
17631 (Frun_hook_with_args_until_failure): Adjust accordingly.
17632 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
17634 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
17636 * dispextern.h (string_buffer_position): Remove declaration.
17638 * print.c (strout): Remove parameter `multibyte', unused since
17639 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
17641 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
17642 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
17643 All callers changed.
17645 * w32.c (_wsa_errlist): Use braces for struct initializers.
17647 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
17648 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
17649 All callers changed.
17650 (string_buffer_position): Likewise. Also, make static (it's never
17651 used outside xdisp.c).
17652 (cursor_row_p): Remove parameter `w', unused since
17653 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
17654 (decode_mode_spec): Remove parameter `precision', introduced during
17655 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
17656 All callers changed.
17658 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
17660 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
17662 2011-03-27 Anders Lindgren <andlind@gmail.com>
17664 * nsterm.m (ns_menu_bar_is_hidden): New variable.
17665 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
17666 (ns_update_auto_hide_menu_bar): New functions.
17667 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
17668 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
17669 ns_constrain_all_frames.
17670 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
17671 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
17673 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
17675 * nsmenu.m (runDialogAt): Remove argument to timer_check.
17677 2011-03-27 Glenn Morris <rgm@gnu.org>
17679 * syssignal.h: Replace RETSIGTYPE with void.
17680 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
17681 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
17682 Replace SIGTYPE with void everywhere.
17683 * s/usg5-4-common.h (SIGTYPE): Remove definition.
17684 * s/template.h (SIGTYPE): Remove commented out definition.
17686 2011-03-26 Eli Zaretskii <eliz@gnu.org>
17688 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
17689 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
17691 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
17693 * w32.c (read_unc_volume): Use parameter `henum', instead of
17694 global variable `wget_enum_handle'.
17696 * keymap.c (describe_vector): Remove parameters `indices' and
17697 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
17698 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
17700 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
17702 * keyboard.c (timer_check): Remove parameter `do_it_now',
17703 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
17704 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
17705 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
17707 * keyboard.c (read_char):
17708 * w32menu.c (w32_menu_display_help):
17709 * xmenu.c (show_help_event, menu_help_callback):
17710 Adjust calls to `show_help_echo'.
17712 * gtkutil.c (xg_maybe_add_timer):
17713 * keyboard.c (readable_events):
17714 * process.c (wait_reading_process_output):
17715 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
17717 * insdel.c (adjust_markers_gap_motion):
17718 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
17719 (gap_left, gap_right): Don't call it.
17721 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
17723 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
17724 incurred during fontification.
17726 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
17728 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
17729 (DEFVAR_PER_BUFFER): Don't pass it.
17731 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
17732 (scrolling_window): Don't pass it.
17734 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
17736 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
17738 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
17740 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
17741 of variables specific to SELinux and computation of `encoded_absname'.
17743 * image.c (XPutPixel): Remove unused variable `height'.
17745 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
17747 * unexw32.c (get_section_info): Remove unused variable `section'.
17749 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
17750 (system_process_attributes): Remove unused variable `sess'.
17751 (sys_read): Remove unused variable `err'.
17753 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
17754 (w32_wnd_proc): Remove unused variable `isdead'.
17755 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
17756 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
17757 (x_create_tip_frame): Remove unused variable `tem'.
17759 * w32inevt.c (w32_console_read_socket):
17760 Remove unused variable `no_events'.
17762 * w32term.c (x_draw_composite_glyph_string_foreground):
17763 Remove unused variable `width'.
17765 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
17767 * w32term.c (x_set_glyph_string_clipping):
17768 Don't pass uninitialized region to CombineRgn.
17770 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
17772 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
17773 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
17774 (Fx_close_connection): Remove unused variable `i'.
17776 * w32font.c (w32font_draw): Return number of glyphs.
17777 (w32font_open_internal): Remove unused variable `i'.
17778 (w32font_driver): Add missing initializer.
17780 * w32menu.c (utf8to16): Remove unused variable `utf16'.
17781 (fill_in_menu): Remove unused variable `items_added'.
17783 * w32term.c (last_mouse_press_frame): Remove static global variable.
17784 (w32_clip_to_row): Remove unused variable `f'.
17785 (x_delete_terminal): Remove unused variable `i'.
17787 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
17788 (NOTHING): Remove unused static global variable.
17789 (uniscribe_check_otf): Remove unused variable `table'.
17790 (uniscribe_font_driver): Add missing initializers.
17792 2011-03-23 Julien Danjou <julien@danjou.info>
17794 * term.c (Fsuspend_tty, Fresume_tty):
17795 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
17796 * window.c (temp_output_buffer_show):
17797 * insdel.c (signal_before_change):
17798 * frame.c (Fhandle_switch_frame):
17799 * fileio.c (Fdo_auto_save):
17800 * emacs.c (Fkill_emacs):
17801 * editfns.c (save_excursion_restore):
17802 * cmds.c (internal_self_insert):
17803 * callint.c (Fcall_interactively):
17804 * buffer.c (Fkill_all_local_variables):
17805 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
17807 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
17808 unconditionally since it does the check itself.
17810 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
17812 Fix more problems found by GCC 4.5.2's static checks.
17814 * coding.c (encode_coding_raw_text): Avoid unnecessary test
17815 the first time through the loop, since we know p0 < p1 then.
17816 This also avoids a gcc -Wstrict-overflow warning.
17818 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
17819 leading to a memory leak, possible in functions like
17820 load_charset_map_from_file that can allocate an unbounded number
17821 of objects (Bug#8318).
17823 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
17824 that could (at least in theory) be that large.
17826 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
17827 This is less likely to overflow, and avoids undefined behavior if
17828 overflow does occur. All callers changed. Use strtoul to scan
17829 for the unsigned long integer.
17830 (pint2hrstr): Simplify and tune code slightly.
17831 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
17833 * scroll.c (do_scrolling): Work around GCC bug 48228.
17834 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
17836 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
17837 This also avoids a warning with gcc -Wstrict-overflow.
17838 (validate_x_resource_name): Simplify count usage.
17839 This also avoids a warning with gcc -Wstrict-overflow.
17841 * fileio.c (Fcopy_file): Report error if fchown or fchmod
17844 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
17846 * process.c (Fmake_network_process): Use socklen_t, not int,
17847 where POSIX says socklen_t is required in portable programs.
17848 This fixes a porting bug on hosts like 64-bit HP-UX, where
17849 socklen_t is wider than int (Bug#8277).
17850 (Fmake_network_process, server_accept_connection):
17851 (wait_reading_process_output, read_process_output):
17854 * process.c: Rename or move locals to avoid shadowing.
17855 (list_processes_1, Fmake_network_process):
17856 (read_process_output_error_handler, exec_sentinel_error_handler):
17857 Rename or move locals.
17858 (Fmake_network_process): Define label "retry_connect" only if needed.
17859 (Fnetwork_interface_info): Fix pointer signedness.
17860 (process_send_signal): Add cast to avoid pointer signedness problem.
17861 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
17862 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
17864 Make tparam.h and terminfo.c consistent.
17865 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
17866 Include tparam.h instead, since it declares them.
17867 * cm.h (PC): Remove extern decl; tparam.h now does this.
17868 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
17869 * terminfo.c: Include tparam.h, to check interfaces.
17870 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
17871 (tparam): Adjust signature to match interface in tparam.h;
17872 this removes some undefined behavior. Check that outstring and len
17873 are zero, which they always are with Emacs.
17874 * tparam.h (PC, BC, UP): New extern decls.
17876 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
17877 (xftfont_open): Rename locals to avoid shadowing.
17879 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
17880 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
17881 (OTF_TAG_SYM): Omit macro if not needed.
17882 (ftfont_list): Remove unused local.
17883 (get_adstyle_property, ftfont_pattern_entity):
17884 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
17885 Rename locals to avoid shadowing.
17887 * xfont.c (xfont_list_family): Mark var as initialized.
17889 * xml.c (make_dom): Now static.
17891 * composite.c (composition_compute_stop_pos): Rename local to
17893 (composition_reseat_it): Remove unused locals.
17894 (find_automatic_composition, composition_adjust_point): Likewise.
17895 (composition_update_it): Mark var as initialized.
17896 (find_automatic_composition): Mark vars as initialized,
17897 with a FIXME (Bug#8290).
17899 character.h: Rename locals to avoid shadowing.
17900 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
17901 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
17902 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
17903 (BUF_DEC_POS): Be more systematic about renaming local temporaries
17904 to avoid shadowing.
17906 * textprop.c (property_change_between_p): Remove; unused.
17908 * intervals.c (interval_start_pos): Now static.
17910 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
17912 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
17913 Rename locals to avoid shadowing.
17915 * sound.c (wav_play, au_play, Fplay_sound_internal):
17916 Fix pointer signedness.
17917 (alsa_choose_format): Remove unused local var.
17918 (wav_play): Initialize a variable to 0, to prevent undefined
17919 behavior (Bug#8278).
17921 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
17923 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
17925 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
17926 clobbering (Bug#8298).
17927 * sysdep.c (sys_subshell): Likewise.
17928 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
17930 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
17931 This should get cleaned up, so that child_setup has the
17932 same signature on all platforms.
17934 * callproc.c (call_process_cleanup): Now static.
17935 (relocate_fd): Rename locals to avoid shadowing.
17937 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
17939 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
17940 not to be necessary, and produces flickering.
17942 2011-03-20 Glenn Morris <rgm@gnu.org>
17944 * config.in: Remove file.
17946 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
17948 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
17949 are now in src/globals.h.
17950 (syms_of_minibuf): Remove spurious & from previous change.
17952 2011-03-20 Leo Liu <sdl.web@gmail.com>
17954 * minibuf.c (completing-read-function): New variable.
17955 (completing-read-default): Rename from completing-read.
17956 (completing-read): Call completing-read-function.
17958 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
17960 * xfaces.c (Fx_load_color_file):
17961 Read color file from absolute filename (bug#8250).
17963 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
17965 * makefile.w32-in: Update dependencies.
17967 2011-03-17 Eli Zaretskii <eliz@gnu.org>
17969 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
17971 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
17973 Fix more problems found by GCC 4.5.2's static checks.
17975 * process.c (make_serial_process_unwind, send_process_trap):
17976 (sigchld_handler): Now static.
17978 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
17979 That way, the code declares only the vars that it needs.
17980 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
17981 * s/cygwin.h (PTY_ITERATION): Likewise.
17982 * s/darwin.h (PTY_ITERATION): Likewise.
17983 * s/gnu-linux.h (PTY_ITERATION): Likewise.
17985 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
17986 * process.c (allocate_pty): Don't declare stb unless it's needed.
17988 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
17989 (CONSTANTLIM): Remove; unused.
17990 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
17991 Define only if needed.
17993 * unexelf.c (unexec): Name an expression,
17994 to avoid gcc -Wbad-function-cast warning.
17995 Use a different way to cause a compilation error if anyone uses
17996 n rather than nn, a way that does not involve shadowing.
17997 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
17999 * deps.mk (unexalpha.o): Remove; unused.
18001 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18002 * unexec.h: New file.
18003 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18004 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18005 Depend on unexec.h.
18006 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18007 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18008 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18009 Change as necessary to match prototype in unexec.h.
18011 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18013 (back_comment, skip_chars): Mark vars as initialized.
18015 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18016 Rename locals to avoid shadowing.
18018 * lread.c (read1): Rewrite so as not to use empty "else".
18019 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18021 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18023 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18024 warning when compiling print.c.
18026 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18027 instead of using an uninitialized var.
18028 (font_sort_entities): Mark var as initialized.
18030 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18032 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18033 pointers to constants.
18034 (font_parse_fcname): Remove unused vars.
18035 (font_delete_unmatched): Now static.
18036 (font_get_spec): Remove; unused.
18037 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18038 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18039 Rename or move locals to avoid shadowing.
18041 * fns.c (require_nesting_list, require_unwind): Now static.
18042 (Ffillarray): Rename locals to avoid shadowing.
18044 * floatfns.c (domain_error2): Define only if needed.
18045 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18047 * alloc.c (mark_backtrace): Move decl from here ...
18048 * lisp.h: ... to here, so that it can be checked.
18050 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18051 (Fdefvar): Rewrite so as not to use empty "else".
18052 (lisp_indirect_variable): Name an expression,
18053 to avoid gcc -Wbad-function-cast warning.
18054 (Fdefvar): Rename locals to avoid shadowing.
18056 * callint.c (quotify_arg, quotify_args): Now static.
18057 (Fcall_interactively): Rename locals to avoid shadowing.
18058 Use const pointer when appropriate.
18060 * lisp.h (get_system_name, get_operating_system_release):
18061 Move decls here, to check interfaces.
18062 * process.c (get_operating_system_release): Move decl to lisp.h.
18063 * xrdb.c (get_system_name): Likewise.
18064 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18065 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18066 some of which prompt warnings from gcc -Wbad-function-cast.
18067 (Fformat_time_string, Fencode_time, Finsert_char):
18068 (Ftranslate_region_internal, Fformat):
18069 Rename or remove local vars to avoid shadowing.
18070 (Ftranslate_region_internal): Mark var as initialized.
18072 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18075 * lisp.h (eassert): Check that the argument compiles, even if
18076 ENABLE_CHECKING is not defined.
18078 * data.c (Findirect_variable): Name an expression, to avoid
18079 gcc -Wbad-function-cast warning.
18080 (default_value, arithcompare, arith_driver, arith_error): Now static.
18081 (store_symval_forwarding): Rename local to avoid shadowing.
18082 (Fmake_variable_buffer_local, Fmake_local_variable):
18083 Mark variables as initialized.
18084 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18086 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18087 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18088 Rename locals to avoid shadowing.
18089 (mark_stack): Move local variables into the #ifdef region where
18091 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18092 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18094 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18095 (GC_STRING_CHARS): Remove; not used.
18096 (Fmemory_limit): Cast sbrk's returned value to char *.
18098 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18099 avoids undefined behavior in theory.
18101 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18103 Use functions, not macros, for up- and down-casing (Bug#8254).
18104 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18105 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18106 to use the following functions instead of these macros.
18107 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18108 EMACS_INT, since callers assume the returned value fits in int.
18109 (upcase1): Likewise, for UPCASE_TABLE.
18110 (uppercasep, lowercasep, upcase): New static inline functions.
18111 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18112 the race-condition problem in the old DOWNCASE.
18114 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18115 Rename locals to avoid shadowing.
18116 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18117 (regex_compile, re_search_2, re_match_2_internal):
18118 Remove unused local vars.
18119 (FREE_VAR): Rewrite so as not to use empty "else",
18120 which gcc can warn about.
18121 (regex_compile, re_match_2_internal): Mark locals as initialized.
18122 (RETALLOC_IF): Define only if needed.
18123 (WORDCHAR_P): Likewise. This one is never needed, but is used
18124 only in a comment talking about a compiler bug, so put inside
18125 the #if 0 of that comment.
18126 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18127 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18130 * search.c (boyer_moore): Rename locals to avoid shadowing.
18131 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18132 (PREV_CHAR_BOUNDARY): Likewise.
18134 * search.c (simple_search): Remove unused var.
18136 * dired.c (compile_pattern): Move decl from here ...
18137 * lisp.h: ... to here, so that it can be checked.
18138 (struct re_registers): New forward decl.
18140 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18142 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18144 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18145 Rename locals to avoid shadowing.
18146 (Fvertical_motion): Mark locals as initialized.
18148 * casefiddle.c (casify_object, casify_region): Now static.
18149 (casify_region): Mark local as initialized.
18151 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18153 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18154 New macros, so that the caller can use some names other than
18155 gcpro1, gcpro2, etc.
18156 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18158 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18159 argument, for consistency with GCPRO2_VAR, etc: it is now the
18160 prefix of the variable, not the variable itself. All uses
18162 * dired.c (directory_files_internal, file_name_completion):
18163 Rename locals to avoid shadowing.
18165 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18166 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18167 dired.c's scmp function, had undefined behavior.
18168 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18169 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18170 * buffer.h: ... to here, because these macros use current_buffer,
18171 and the new implementation with inline functions needs to have
18172 current_buffer in scope now, rather than later when the macros
18174 (downcase, upcase1): New static inline functions.
18175 (DOWNCASE, UPCASE1): Reimplement using these functions.
18176 This avoids undefined behavior in expressions like
18177 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18178 from race conditions in accessing the global variables
18179 case_temp1 and case_temp2.
18180 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18181 * lisp.h (case_temp1, case_temp2): Remove their decls.
18182 * character.h (ASCII_CHAR_P): Move from here ...
18183 * lisp.h: ... to here, so that the inline functions mentioned
18184 above can use them.
18186 * dired.c (directory_files_internal_unwind): Now static.
18188 * fileio.c (file_name_as_directory, directory_file_name):
18189 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18191 (file_name_as_directory): Use const pointers when appropriate.
18192 (Fexpand_file_name): Likewise. In particular, newdir might
18193 point at constant storage, so make it a const pointer.
18194 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
18195 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18197 (Fset_file_times, Finsert_file_contents, auto_save_error):
18198 Rename locals to avoid shadowing.
18200 * minibuf.c (choose_minibuf_frame_1): Now static.
18201 (Ftry_completion, Fall_completions): Rename or remove locals
18202 to avoid shadowing.
18204 * marker.c (bytepos_to_charpos): Remove; unused.
18206 * lisp.h (verify_bytepos, count_markers): New decls,
18207 so that gcc does not warn that these functions aren't declared.
18209 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18210 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
18211 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
18212 (copy_text): Remove unused local var.
18214 * filelock.c (within_one_second): Now static.
18215 (lock_file_1): Rename local to avoid shadowing.
18217 * buffer.c (fix_overlays_before): Mark locals as initialized.
18218 (fix_start_end_in_overlays): Likewise. This function should be
18219 simplified by using pointers-to-pointers, but that's a different
18221 (switch_to_buffer_1): Now static.
18222 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18223 (report_overlay_modification): Rename locals to avoid shadowing.
18225 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
18226 Fix pointer signedness issue.
18227 (sys_subshell): Mark local as volatile if checking for lint,
18228 to suppress a gcc -Wclobbered warning that does not seem to be right.
18229 (MAXPATHLEN): Define only if needed.
18231 * process.c (serial_open, serial_configure): Move decls from here ...
18232 * systty.h: ... to here, so that they can be checked.
18234 * fns.c (get_random, seed_random): Move extern decls from here ...
18235 * lisp.h: ... to here, so that they can be checked.
18237 * sysdep.c (reset_io): Now static.
18238 (wait_for_termination_signal): Remove; unused.
18240 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18241 (copy_keymap_item, append_key, push_text_char_description):
18243 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
18244 (DENSE_TABLE_SIZE): Remove; unused.
18245 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18246 (describe_map_tree):
18247 Rename locals to avoid shadowing.
18249 * keyboard.c: Declare functions static if they are not used elsewhere.
18250 (echo_char, echo_dash, cmd_error, top_level_2):
18251 (poll_for_input, handle_async_input): Now static.
18252 (read_char, kbd_buffer_get_event, make_lispy_position):
18253 (make_lispy_event, make_lispy_movement, apply_modifiers):
18254 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18255 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18256 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
18257 (read_key_sequence, read_char): Mark locals as initialized.
18258 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
18260 * keyboard.h (make_ctrl_char): New decl.
18261 (mark_kboards): Move decl here ...
18262 * alloc.c (mark_kboards): ... from here.
18264 * lisp.h (force_auto_save_soon): New decl.
18266 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
18267 (DEFINE_DUMMY_FUNCTION): New macro.
18268 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18270 (main): Add casts to avoid warnings
18271 if GCC considers string literals to be constants.
18273 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18275 * dbusbind.c: Pointer signedness fixes.
18276 (xd_signature, xd_append_arg, xd_initialize):
18277 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18278 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18279 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18280 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18282 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18283 if GCC considers string literals to be constants.
18284 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
18286 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18288 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18289 (print_preprocess, print_object): New macro to fix last change.
18291 * print.c (print_preprocess): Don't forget font objects.
18293 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
18295 * emacs.c (USAGE3): Doc fixes.
18297 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18299 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18302 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
18304 * lisp.h (VWindow_system, Qfile_name_history):
18305 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18306 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18307 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18309 * w32select.c: Don't #include "keyboard.h".
18310 (run_protected): Add extern declaration for waiting_for_input.
18312 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18313 * w32console.c (detect_input_pending, read_input_pending)
18314 (encode_terminal_code):
18315 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18316 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18317 (w32_system_caret_y, Qfile_name_history):
18318 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
18319 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
18320 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
18321 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
18322 * w32proc.c (Qlocal, report_file_error):
18323 * w32term.c (Vwindow_system, updating_frame):
18324 * w32uniscribe.c (initialized, uniscribe_font_driver):
18325 Remove unneeded extern declarations.
18327 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
18329 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
18331 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
18333 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
18334 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
18335 These macros can no longer be used for assignment.
18337 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
18338 Assign struct members directly, instead of using BUF_BEGV etc.
18339 (record_buffer_markers, fetch_buffer_markers): New functions for
18340 recording and fetching special buffer markers.
18341 (set_buffer_internal_1, set_buffer_temp): Use them.
18343 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
18345 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
18347 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
18348 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
18350 * xdisp.c (hscroll_window_tree):
18351 (reconsider_clip_changes): Use PT instead of BUF_PT.
18353 2011-03-13 Eli Zaretskii <eliz@gnu.org>
18355 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
18356 $(EMACS_ROOT)/lib/intprops.h.
18358 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
18360 Fix more problems found by GCC 4.5.2's static checks.
18362 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
18363 to unsigned char * to avoid compiler diagnostic.
18364 (xg_free_frame_widgets): Make it clear that a local variable is
18365 needed only if USE_GTK_TOOLTIP.
18366 (gdk_window_get_screen): Make it clear that this macro is needed
18367 only if USE_GTK_TOOLTIP.
18368 (int_gtk_range_get_value): New function, which avoids a diagnostic
18369 from gcc -Wbad-function-cast.
18370 (xg_set_toolkit_scroll_bar_thumb): Use it.
18371 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
18372 diagnostic from gcc -Wbad-function-cast.
18373 (get_utf8_string, xg_get_file_with_chooser):
18374 Rename locals to avoid shadowing.
18375 (create_dialog): Move locals to avoid shadowing.
18377 * xgselect.c (xg_select): Remove unused var.
18379 * image.c (four_corners_best): Mark locals as initialized.
18380 (gif_load): Initialize transparent_p to zero (Bug#8238).
18381 Mark another local as initialized.
18382 (my_png_error, my_error_exit): Mark with NO_RETURN.
18384 * image.c (clear_image_cache): Now static.
18385 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
18386 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
18387 (x_edge_detection): Remove unnecessary cast that
18388 gcc -Wbad-function-cast diagnoses.
18389 (gif_load): Fix pointer signedness.
18390 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
18391 (jpeg_load, gif_load): Rename locals to avoid shadowing.
18393 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
18395 Improve quality of tests for time stamp overflow.
18396 For example, without this patch (encode-time 0 0 0 1 1
18397 1152921504606846976) returns the obviously-bogus value (-948597
18398 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
18399 reports time overflow. See
18400 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
18401 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
18402 * editfns.c: Include limits.h and intprops.h.
18403 (TIME_T_MIN, TIME_T_MAX): New macros.
18404 (time_overflow): Move earlier, to before first use.
18405 (hi_time, lo_time): New functions, for an accurate test for
18406 out-of-range times.
18407 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
18408 (Fget_internal_run_time): Don't assume time_t fits in int.
18409 (make_time): Use list2 instead of Fcons twice.
18410 (Fdecode_time): More accurate test for out-of-range times.
18411 (check_tm_member): New function.
18412 (Fencode_time): Use it, to test for out-of-range times.
18413 (lisp_time_argument): Don't rely on undefined left-shift and
18414 right-shift behavior when checking for time stamp overflow.
18416 * editfns.c (time_overflow): New function, refactoring common code.
18417 (Fformat_time_string, Fdecode_time, Fencode_time):
18418 (Fcurrent_time_string): Use it.
18420 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
18421 * dired.c (make_time): Move to ...
18422 * editfns.c (make_time): ... here.
18423 * systime.h: Note the move.
18425 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
18427 * fringe.c (update_window_fringes): Remove unused variables.
18429 * unexmacosx.c (copy_data_segment): Also copy __got section.
18432 2011-03-12 Eli Zaretskii <eliz@gnu.org>
18434 * termcap.c [MSDOS]: Include "msdos.h".
18435 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
18436 Constify `char *' arguments and their references according to
18437 prototypes in tparam.h.
18439 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
18441 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
18442 Adapt all references accordingly.
18444 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
18446 2011-03-11 Tom Tromey <tromey@redhat.com>
18448 * buffer.c (syms_of_buffer): Remove obsolete comment.
18450 2011-03-11 Eli Zaretskii <eliz@gnu.org>
18452 * termhooks.h (encode_terminal_code): Declare prototype.
18454 * msdos.c (encode_terminal_code): Don't declare prototype.
18456 * term.c (encode_terminal_code): Now external again, used by
18457 w32console.c and msdos.c.
18459 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
18460 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
18462 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
18464 Fix some minor problems found by GCC 4.5.2's static checks.
18466 * fringe.c (update_window_fringes): Mark locals as initialized
18468 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
18470 * alloc.c (mark_fringe_data): Move decl from here ...
18471 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
18472 to check its interface.
18473 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
18475 * fontset.c (free_realized_fontset): Now static.
18476 (Fset_fontset_font): Rename local to avoid shadowing.
18477 (fontset_font): Mark local as initialized.
18478 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
18480 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
18482 * xselect.c (x_disown_buffer_selections): Remove; not used.
18483 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
18484 (x_own_selection, Fx_disown_selection_internal): Rename locals
18485 to avoid shadowing.
18486 (x_handle_dnd_message): Remove local to avoid shadowing.
18488 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
18489 so that the caller can use some name other than gcpro1.
18490 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
18491 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18492 (Fx_backspace_delete_keys_p):
18493 Use them to avoid shadowing, and rename vars to avoid shadowing.
18494 (x_decode_color, x_set_name, x_window): Now static.
18495 (Fx_create_frame): Add braces to silence GCC warning.
18496 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
18497 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
18498 Remove unused locals.
18499 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18500 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
18501 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
18504 * xterm.h (x_mouse_leave): New decl.
18506 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
18507 Remove unused functions.
18508 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
18509 (x_calc_absolute_position): Now static.
18510 (XTread_socket): Don't define label "out" unless it's used.
18511 Don't declare local "event" unless it's used.
18512 (x_iconify_frame, x_free_frame_resources): Don't declare locals
18513 unless they are used.
18514 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
18515 (x_fatal_error_signal): Remove; not used.
18516 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
18517 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
18518 (x_error_catcher, x_connection_closed, x_error_handler):
18519 (x_error_quitter, xembed_send_message, x_iconify_frame):
18520 (my_log_handler): Rename locals to avoid shadowing.
18521 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
18522 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
18524 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
18525 Rename or move locals to avoid shadowing.
18526 (tty_defined_color, merge_face_heights): Now static.
18527 (free_realized_faces_for_fontset): Remove; not used.
18528 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
18529 does not deduce is never used uninitialized.
18530 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
18531 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
18533 * terminal.c (store_terminal_param): Now static.
18535 * xmenu.c (menu_highlight_callback): Now static.
18536 (set_frame_menubar): Remove unused local.
18537 (xmenu_show): Rename parameter to avoid shadowing.
18538 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
18539 since they might point to immutable storage.
18540 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
18541 since it's unused otherwise.
18543 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
18544 Add a FIXME, since the code still doesn't look right. (Bug#8215)
18545 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
18546 avoids a gcc -Wuninitialized diagnostic.
18547 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
18548 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
18549 does not deduce are never used uninitialized.
18551 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
18553 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
18554 * window.c (window_loop, size_window):
18555 (run_window_configuration_change_hook, enlarge_window): Likewise.
18557 * window.c (display_buffer): Now static.
18558 (size_window): Mark variables that gcc -Wuninitialized
18559 does not deduce are never used uninitialized.
18560 * window.h (check_all_windows): New decl, to forestall
18561 gcc -Wmissing-prototypes diagnostic.
18562 * dispextern.h (bidi_dump_cached_states): Likewise.
18564 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
18566 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
18567 Include <limits.h>.
18568 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
18569 and to avoid gcc -Wuninitialized warning.
18570 (load_charset_map): Mark variables that gcc -Wuninitialized
18571 does not deduce are never used uninitialized.
18572 (load_charset): Abort instead of using uninitialized var (Bug#8229).
18574 * coding.c (coding_set_source, coding_set_destination):
18575 Use "else { /* comment */ }" rather than "else /* comment */;"
18576 for clarity, and to avoid gcc -Wempty-body warning.
18577 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
18578 a block, when the outer 'i' will do.
18579 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
18580 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
18581 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
18582 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
18583 (Fdecode_sjis_char, Fdefine_coding_system_internal):
18584 Rename locals to avoid shadowing.
18585 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
18586 * coding.c (emacs_mule_char, encode_invocation_designation):
18587 Now static, since they're not used elsewhere.
18588 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
18589 (decode_coding_object, encode_coding_object, detect_coding_system):
18590 (decode_coding_emacs_mule): Mark variables that gcc
18591 -Wuninitialized does not deduce are never used uninitialized.
18592 (detect_coding_iso_2022): Initialize a local variable that might
18593 be used uninitialized. Leave a FIXME because it's not clear that
18594 this initialization is needed. (Bug#8211)
18595 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
18596 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
18597 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
18598 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
18599 Remove unused macros.
18601 * category.c (hash_get_category_set): Remove unused local var.
18602 (copy_category_table): Now static, since it's not used elsewhere.
18603 * character.c (string_count_byte8): Likewise.
18605 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
18606 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
18608 * chartab.c (copy_sub_char_table): Now static, since it's not used
18610 (sub_char_table_ref_and_range, char_table_ref_and_range):
18611 Rename locals to avoid shadowing.
18612 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
18614 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
18615 (BIDI_BOB): Remove unused macro.
18617 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
18618 deduce are never used uninitialized.
18619 * term.c (encode_terminal_code): Likewise.
18621 * term.c (encode_terminal_code): Now static. Remove unused local.
18623 * tparam.h: New file.
18624 * term.c, tparam.h: Include it.
18625 * deps.mk (term.o, tparam.o): Depend on tparam.h.
18626 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
18627 Move these decls to tparam.h, and make them agree with what
18628 is actually in tparam.c. The previous trick of using incompatible
18629 decls in different modules does not conform to the C standard.
18630 All callers of tparam changed to use tparam's actual API.
18631 * tparam.c (tparam1, tparam, tgoto):
18632 Use const pointers where appropriate.
18634 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
18635 * cm.h (struct cm): Likewise.
18636 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
18637 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
18638 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
18639 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
18640 (turn_on_face, init_tty): Likewise.
18641 * termchar.h (struct tty_display_info): Likewise.
18643 * term.c (term_mouse_position): Rename local to avoid shadowing.
18645 * alloc.c (mark_ttys): Move decl from here ...
18646 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
18648 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
18650 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
18652 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
18654 * search.c (compile_pattern_1): Remove argument regp, unused since
18655 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
18656 (compile_pattern): Don't pass it.
18658 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
18660 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
18661 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
18663 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
18665 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
18667 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
18668 gdk_window_get_screen, gdk_window_get_geometry,
18669 gdk_x11_window_lookup_for_display and GDK_KEY_g.
18670 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
18671 (xg_get_pixbuf_from_pixmap): New function.
18672 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
18673 to Pixmap, take frame as parameter, remove GdkColormap parameter.
18674 Call xg_get_pixbuf_from_pixmap instead of
18675 gdk_pixbuf_get_from_drawable.
18676 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
18677 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
18678 (xg_check_special_colors): Use GtkStyleContext and its functions
18680 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
18681 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
18682 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
18683 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
18684 Call gtk_widget_get_preferred_size.
18685 (xg_frame_resized): gdk_window_get_geometry only takes 5
18687 (xg_win_to_widget, xg_event_is_for_menubar):
18688 Call gdk_x11_window_lookup_for_display.
18689 (xg_set_widget_bg): New function.
18690 (delete_cb): New function.
18691 (xg_create_frame_widgets): Connect delete-event to delete_cb.
18692 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
18693 (xg_set_background_color): Call xg_set_widget_bg.
18694 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
18695 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
18696 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
18697 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
18699 (update_frame_tool_bar): Call gtk_widget_hide.
18700 (xg_initialize): Use GDK_KEY_g.
18702 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
18704 (x_session_initialize): Call gdk_x11_set_sm_client_id.
18706 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
18707 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
18708 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
18710 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
18712 * w32xfns.c (select_palette): Check success of RealizePalette against
18713 GDI_ERROR, not zero.
18715 See ChangeLog.11 for earlier changes.
18717 ;; Local Variables:
18721 Copyright (C) 2011-2012 Free Software Foundation, Inc.
18723 This file is part of GNU Emacs.
18725 GNU Emacs is free software: you can redistribute it and/or modify
18726 it under the terms of the GNU General Public License as published by
18727 the Free Software Foundation, either version 3 of the License, or
18728 (at your option) any later version.
18730 GNU Emacs is distributed in the hope that it will be useful,
18731 but WITHOUT ANY WARRANTY; without even the implied warranty of
18732 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18733 GNU General Public License for more details.
18735 You should have received a copy of the GNU General Public License
18736 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.