X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a98a91ac4697c50b3ebb188c279b08b7799e6e3d..970d21e8e6aa7e5bafd3f025f66d694b5ae06ba5:/src/ChangeLog diff --git a/src/ChangeLog b/src/ChangeLog index 93c27a6e56..acb8eed472 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,720 @@ -2014-08-02 Paul Eggert +2014-09-07 Eli Zaretskii + + * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if + 'alloca' gets passed arguments larger than MAX_ALLOCA. + + * font.c (MAX): Define if not defined elsewhere. + +2014-09-07 Paul Eggert + + * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca + here for destination buffer, to work around what appears to be a + bug in decode_coding_c_string when the source and destination are + both C strings. + + Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410). + This follows up on the recent thread in emacs-devel on alloca; see: + http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html + This patch also cleans up alloca-related glitches noted while + examining the code looking for unbounded alloca. + * alloc.c (listn): + * callproc.c (init_callproc): + Rewrite to avoid need for alloca. + * buffer.c (mouse_face_overlay_overlaps) + (report_overlay_modification): + * buffer.h (GET_OVERLAYS_AT): + * coding.c (make_subsidiaries): + * doc.c (Fsnarf_documentation): + * editfns.c (Fuser_full_name): + * fileio.c (Ffile_name_directory, Fexpand_file_name) + (search_embedded_absfilename, Fsubstitute_in_file_name): + * fns.c (Fmake_hash_table): + * font.c (font_vconcat_entity_vectors, font_update_drivers): + * fontset.c (fontset_pattern_regexp, Ffontset_info): + * frame.c (Fmake_terminal_frame, x_set_frame_parameters) + (xrdb_get_resource, x_get_resource_string): + * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf): + * ftxfont.c (ftxfont_draw): + * image.c (xbm_load, xpm_load, jpeg_load_body): + * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items) + + * keymap.c (Fdescribe_buffer_bindings, describe_map): + * lread.c (openp): + * menu.c (digest_single_submenu, find_and_call_menu_selection) + (find_and_return_menu_selection): + * print.c (PRINTFINISH): + * process.c (Fformat_network_address): + * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1): + * search.c (search_buffer, Fmatch_data, Fregexp_quote): + * sound.c (wav_play, au_play): + * syntax.c (skip_chars): + * term.c (tty_menu_activate, tty_menu_show): + * textprop.c (get_char_property_and_overlay): + * window.c (Fset_window_configuration): + * xdisp.c (safe__call, next_overlay_change, vmessage) + (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight): + * xfaces.c (face_at_buffer_position): + * xmenu.c (x_menu_show): + Use SAFE_ALLOCA etc. instead of plain alloca, since the + allocation size isn't bounded. + * callint.c (Fcall_interactively): Redo memory_full check + so that it can be done at compile-time on some platforms. + * coding.c (MAX_LOOKUP_MAX): New constant. + (get_translation_table): Use it. + * callproc.c (call_process): Use SAFE_NALLOCA instead of + SAFE_ALLOCA, to catch integer overflows on size calculation. + (exec_failed) [!DOS_NT]: New function. + (child_setup) [!DOS_NT]: Use it. + * editfns.c (Ftranspose_regions): + Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'. + * editfns.c (check_translation): + Allocate larger buffers on the heap. + * eval.c (internal_lisp_condition_case): + Check for MAX_ALLOCA overflow. + * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector. + (Fbase64_encode_region, Fbase64_decode_region): + Avoid unnecessary calls to SAFE_FREE before 'error'. + * buffer.c (mouse_face_overlay_overlaps): + * editfns.c (Fget_pos_property, check_translation): + * eval.c (Ffuncall): + * font.c (font_unparse_xlfd, font_find_for_lface): + * ftfont.c (ftfont_drive_otf): + * keyboard.c (echo_add_key, read_decoded_event_from_main_queue) + (menu_bar_items, tool_bar_items): + * sound.c (Fplay_sound_internal): + * xdisp.c (load_overlay_strings, dump_glyph_row): + Use an ordinary auto buffer rather than alloca, since the + allocation size is fixed and small. + * ftfont.c: Include . + (matching_prefix): New function. + (get_adstyle_property): Use it, to avoid need for alloca. + * keyboard.c (echo_add_key): + * keymap.c (describe_map): Use ptrdiff_t, not int. + * keyboard.c (echo_add_key): Prefer sizeof to strlen. + * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS, + when counting bytes. + * lisp.h (xlispstrdupa): Remove, replacing with ... + (SAFE_ALLOCA_STRING): ... new macro with different API. + This fixes a portability problem, namely, alloca result + passed to another function. All uses changed. + (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA, + not MAX_ALLOCA - 1. + * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE) + (REGEX_ALLOCATE): New macros. + (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK) + (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal): + Use them. + * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it + by hand. + (decode_mode_spec_coding): Store directly into buf rather than + into an alloca temporary and copying the temporary to the buf. + +2014-09-06 Eli Zaretskii + + * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416) + +2014-09-04 Jan D + + * xterm.c (x_term_init): Don't call x_session_initialize if running + as a daemon (Bug#18375). + + * xsmfns.c: Initialize ice_fd. + +2014-09-04 Paul Eggert + + Less chatter in 'make' output. + * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at) + (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake. + ($(etc)/DOC, buildobj.h, gl-stamp): Use them. + +2014-09-03 Martin Rudalics + + * buffer.c (scroll-bar-height): Fix typo in doc-string. + * frame.c (Vdefault_frame_horizontal_scroll_bars): Remove + variable. + * nsfns.m (Fx_create_frame): + * w32fns.c (Fx_create_frame): + * xfns.c (Fx_create_frame): Default horizontal scroll bars to + nil. + +2014-09-03 Eli Zaretskii + + * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in + the reported row in the case of a window with a header line, by + improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org + eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384) + +2014-09-03 Paul Eggert + + * eval.c (internal_lisp_condition_case): Don't overrun the stack + when configured --with-wide-int on typical 32-bit platforms. + +2014-09-03 Eli Zaretskii + + * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also + when HPOS is negative, for the benefit of R2L glyph rows whose + newline overflows into the fringe. + +2014-09-03 Ken Brown + + * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366) + +2014-09-02 Paul Eggert + + Minor cleanup of recent strlen-avoiding patch. + * fileio.c (CHECK_LENGTH): Remove. + Rewrite callers so that they don't need it. + (Fexpand_file_name) [DOS_NT]: Fix a case where directory length + variable wasn't set. + +2014-09-02 Dmitry Antipov + + * fileio.c (CHECK_LENGTH): New macro. + (Fexpand_file_name): Use it and get rid of a few more calls + to strlen and strcat. + * callproc.c (egetenv_internal): Add arg and rename from egetenv ... + * lisp.h (egetenv): ... because of a new inline function used to + avoid calls to strlen for a compile-time constants. + + * buffer.h (decode_buffer): New function. + * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer) + (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick) + (Fbuffer_chars_modified_tick, Fdelete_all_overlays): + * data.c (Flocal_variables_p): + * fileio.c (Fverify_visited_file_modtime): + * marker.c (live_buffer): Use it. + +2014-09-01 Dmitry Antipov + + Avoid extra calls to strlen in filesystem I/O routines. + * fileio.c (Fexpand_file_name): Avoid calls to strlen if + the length of 'newdir' is known or may be precalculated. + (file_accessible_directory_p): Prefer to pass Lisp_Object, + not 'char *', and so use precalculated length. + (Ffile_accessible_directory_p): + * callproc.c (encode_current_directory, init_callproc): + * charset.c (init_charset): + * lread.c (load_path_check, load_path_default): Adjust users. + * lisp.h (file_accessible_directory_p): Tweak prototype. + +2014-09-01 Eli Zaretskii + + * w32proc.c (w32_compare_strings): Support "C" and "POSIX" + locales. + +2014-09-01 Paul Eggert + + --enable-silent-rules now suppresses more chatter. + * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_) + (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0) + (am__v_CCLD_1): New macros, taken from Automake. + (.c.o, .m.o, temacs$(EXEEXT)): Use them. + + Clean up extern decls a bit. + * bytecode.c: Include blockinput.h and keyboard.h rather + than rolling their APIs by hand. + * emacs.c: Include regex.h and rely on its and lisp.h's API + rather than rolling them by hand. + * lastfile.c: Include lisp.h, to check this file's API. + * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static): + New decls. + * regex.h (re_max_failures): New decl. + * unexcw.c, unexmacosx.c, unexw32.c: + Rely on lisp.h's API rather than rolling it by hand. + * vm-limit.c (__after_morecore_hook, __morecore, real_morecore): + Declare at top level, to pacify GCC -Wnested-externs. + +2014-08-31 Eli Zaretskii + + * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a + clipping rectangle become negative (i.e. large positive, since + it's an unsigned data type). This can happen in R2L hscrolled + glyph rows, and caused us to draw the cursor glyph on the fringe. + For the details, see + http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html. + +2014-08-31 Ken Brown + + * gmalloc.c: Don't include . Declare system malloc and + friends before defining hybrid_malloc and friends if HYBRID_MALLOC + is defined. (Bug#18368) + +2014-08-30 Paul Eggert + + Vector-sorting fixes (Bug#18361). + It's not safe to call qsort or qsort_r, since they have undefined + behavior if the user-specified predicate is not a total order. + Also, watch out for garbage-collection while sorting vectors. + * fns.c: Include . + (sort_vector_predicate) [!HAVE_QSORT_R]: Remove. + (sort_vector_compare): Remove, replacing with .... + (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy): + ... these new functions. + (sort_vector): Rewrite to use the new functions. + GCPRO locals, since the predicate can invoke the GC. + Since it's in-place return void; caller changed. + (merge): Use 'inorder', for clarity. + + * sysdep.c (str_collate): Clear errno just before wcscoll(_l). + One can't hoist this out of the 'if', because intervening calls to + newlocale, twolower, etc. can change errno. + +2014-08-30 Eli Zaretskii + + * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the + wording of the error messages. + (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings + sets errno. + + * w32proc.c (get_lcid_callback): Accept locale specifications + without the country part, as in "enu" vs "enu_USA". + (w32_compare_strings): Signal an error if a locale was specified, + but couldn't be translated into a valid LCID. + +2014-08-29 Michael Albinus + + * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno. + +2014-08-29 Paul Eggert + + * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at + errno after towlower_l. errno's value is not specified after + towlower_l. Instead, assume that towlower_l returns its argument + on failure, which is portable in practice. + +2014-08-29 Eli Zaretskii + + * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix. + + * w32proc.c (w32_compare_strings): Accept additional argument + IGNORE_CASE. Set up the flags for CompareStringW to ignore case + if requested. If w32-collate-ignore-punctuation is non-nil, add + NORM_IGNORESYMBOLS to the flags. + (LINGUISTIC_IGNORECASE): Define if not already defined. + (syms_of_ntproc) : New variable. + + * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface + change. + +2014-08-29 Michael Albinus + + * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l): + Define substitutes for platforms that lack them. + (str_collate): Add arguments locale and ignore_case. + + * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): + Add optional arguments LOCALE and IGNORE-CASE. + + * lisp.h (str_collate): Adapt argument list. + +2014-08-29 Dmitry Antipov + + Add vectors support to Fsort. + * fns.c (sort_vector, sort_vector_compare): New functions. + (sort_list): Likewise, refactored out of ... + (Fsort): ... adjusted user. Mention vectors in docstring. + (sort_vector_predicate) [!HAVE_QSORT_R]: New variable. + * alloc.c (make_save_int_obj): New function. + * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ. + (make_save_int_obj): Add prototype. + + Fix last change to support Darwin/OSX and FreeBSD (Bug#18354). + * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]: + Conditionally define to match system's qsort_r signature. + (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r. + +2014-08-28 Ken Brown + + Add support for HYBRID_MALLOC, allowing the use of gmalloc before + dumping and the system malloc after dumping. (Bug#18222) + + * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]: + Define as macros, expanding to hybrid_malloc, etc. + (HYBRID_GET_CURRENT_DIR_NAME): New macro. + (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as + macro. + * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a + full implementation on Cygwin. Remove Cygwin-specific code that + is no longer needed. + (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]: + Redefine as macros expanding to gmalloc, grealloc, etc. + (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros. + (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine. + (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define. + (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc) + [HYBRID_MALLOC]: + (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: + (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC || + HAVE_POSIX_MEMALIGN)]: New functions. + * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC || + HAVE_POSIX_MEMALIGN)]: Define as macro expanding to + hybrid_aligned_alloc; declare. + (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC || + HAVE_POSIX_MEMALIGN)]: Define. + (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing. + * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: + Define as macro, expanding to gget_current_dir_name, and define + the latter. + * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or + malloc_enable_thread(). Don't initialize malloc. + * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is + no longer defined on Cygwin). + (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare. + * sheap.c (bss_sbrk_buffer_end): New variable. + * unexcw.c (__malloc_initialized): Remove variable. + * ralloc.c: Throughout, treat HYBRID_MALLOC the same as + SYSTEM_MALLOC. + * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check + Vmemory_full. + +2014-08-28 Martin Rudalics + + * w32term.c (w32_horizontal_scroll_bar_handle_click): In + `event->y' return entire range (the size of the scroll bar minus + that of the thumb). + * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole' + return entire range (the scaled size of the scroll bar minus + that of the slider). In `portion' return the scaled position of + the slider. + (xaw_jump_callback): Restore part of code for vertical scroll + bar broken in change from 2014-07-27. + (xaw_scroll_callback): Provide incremental scrolling with + horizontal scroll bars. + +2014-08-28 Eli Zaretskii + + * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define. + + * indent.c (Fvertical_motion): Fix vertical motion up through a + display property after a newline. (Bug#18276) + + * xdisp.c (display_line): Don't assume that the call to + reseat_at_next_visible_line_start ends up at a character + immediately following the newline on the previous line. Avoids + setting the ends_at_zv_p flag on screen lines that are not at or + beyond ZV, which causes infloop in redisplay. For the details, see + http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html. + + * dispnew.c (buffer_posn_from_coords): Fix mirroring of X + coordinate for hscrolled R2L screen lines. (Bug#18277) + +2014-08-28 Paul Eggert + + * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults + (Bug#18051). + +2014-08-27 Eli Zaretskii + + * syntax.c (scan_lists): Don't examine positions before BEGV. + (Bug#18339) + +2014-08-27 Paul Eggert + + Improve robustness of new string-collation code (Bug#18051). + * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t) + (newlocale, wcscoll_l): Define substitutes for platforms that + lack them, so as to simplify the mainline code. + (str_collate): Simplify the code by assuming the above definitions. + Use wcscoll_l, not uselocale, as uselocale is too fragile. For + example, the old version left the Emacs in the wrong locale if + wcscoll reported an error. Use 'int', not ptrdiff_t, for the int + result. Report an error if newlocale fails. + +2014-08-27 Michael Albinus + + * lisp.h (str_collate): + * sysdep.c (str_collate): Return int. + (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll. + +2014-08-27 Dmitry Antipov + + Fix some glitches in previous change. + * sysdep.c (stack_direction): Replace stack_grows_down + to simplify calculation of stack boundaries. + (handle_sigsegv): Check whether we really crash somewhere near + to stack boundary, and handle fatal signal as usual if not. + (init_sigsegv): Adjust accordingly. + * keyboard.c (Vtop_level_message): Rename to + Vinternal__top_level_message, as suggested by Stefan Monnier in + http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html + All related users changed. + +2014-08-26 Dmitry Antipov + + Handle C stack overflow caused by too nested Lisp evaluation. + * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare + siglongjmp point to transfer control from SIGSEGV handler. + * keyboard.c (return_to_command_loop, recover_top_level_message) + [HAVE_STACK_OVERFLOW_HANDLING]: New variables. + (regular_top_level_message): New variable. + (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local + exit from SIGSEGV handler and adjust message displayed by Vtop_level + if appropriate. + (syms_of_keyboard): DEFVAR Vtop_level_message and initialize + new variables described above. + * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such. + (stack_grows_down, sigsegv_stack, handle_sigsegv) + [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function. + (init_sigsegv): New function. + (init_signals): Use it. + +2014-08-25 Ken Brown + + * emacs.c (main): Remove use of obsolete macro + G_SLICE_ALWAYS_MALLOC. + +2014-08-25 Eli Zaretskii + + Implement locale-sensitive string collation for MS-Windows. + * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings): + New functions. (Bug#18051) + + * w32.h (w32_compare_strings): Add prototype. + + * w32.c : New global flag. + (globals_of_w32): Initialize it. + + * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows. + + * fns.c (Fstring_collate_lessp, Fstring_collate_equalp) + [WINDOWSNT]: Call str_collate on MS-Windows. + +2014-08-25 Dmitry Antipov + + One more minor cleanup of font subsystem. + * font.h (struct font_driver): Convert text_extents to + return void because returned value is never actually used. + * macfont.m (macfont_text_extents): + * w32font.c (w32font_text_extents): + * xftfont.c (xftfont_text_extents): Adjust to return void + and assume that 'metrics' argument is always non-NULL. + * ftfont.c (ftfont_text_extents): + * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset. + +2014-08-25 Paul Eggert + + Minor cleanups of str_collate fix (Bug#18051). + * fns.c (str_collate): Move decl from here ... + * lisp.h (str_collate): ... to here. + * sysdep.c (str_collate): Prune away some of the forest of ifdefs. + Remove unnecessary casts. Use SAFE_NALLOCA to avoid + potential problems with integer overflow. Don't assume + setlocale succeeds. Remove unnecessary test before restoring + locale via setlocale, and free the copied setlocale string + when done with it. + +2014-08-24 Michael Albinus + + * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs. + + * sysdep.c (str_collate): New function. (Bug#18051) + +2014-08-23 Karol Ostrovsky (tiny change) + + * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs + if the initial "rm -f" fails. This is for MinGW builds, where + MS-Windows will not allow deleting the executable file of a + running program. + +2014-08-20 Eli Zaretskii + + * w32term.c (w32_scroll_bar_handle_click) + (w32_horizontal_scroll_bar_handle_click) + (x_scroll_bar_report_motion) + (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and + SB_THUMBTRACK, use the 32-bit position information returned by + GetScrollInfo, not the 16-bit information returned in the Windows + message sent to us. + +2014-08-19 Eli Zaretskii + + * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the + second coordinate ('y') reported for dragging the horizontal + scroll bar thumb. + +2014-08-19 YAMAMOTO Mitsuharu + + * xdisp.c (erase_phys_cursor): Fix confusion between window-relative + and text area-relative x-coordinates. + +2014-08-17 Eli Zaretskii + + Avoid overwriting the reversed_p flags in the glyph matrices when + init_iterator or start_display are called. + * xdisp.c (init_iterator): Don't initialize the reversed_p flag of + the glyph row here. + (tool_bar_height, redisplay_tool_bar, try_window) + (try_window_reusing_current_matrix, try_window_id) + (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the + reversed_p flag of the iterator's glyph row where the glyph row + is going to be redrawn. + +2014-08-16 Paul Eggert + + * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local. + +2014-08-16 Martin Rudalics + + * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part + of emacs_event return length from si.nPage to si.nMax. + * xdisp.c (set_horizontal_scroll_bar): For right-to-left text + interchange start and end of thumb. + +2014-08-15 Ken Brown + + * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use + ERRORCHECK mutexes. (Bug#18222) + +2014-08-12 Martin Rudalics + + * frame.c (set_menu_bar_lines_1): Remove. + (set_menu_bar_lines): Call change_frame_size instead of + set_menu_bar_lines_1. + +2014-08-11 Jan Djärv + + * nsfns.m (Fx_create_frame): Call adjust_frame_size, + set f->official. + +2014-08-11 Glenn Morris + + * fileio.c: Revert 2013-01-31 change, which chose coding system for + writing before backing up, since it causes a more serious problem + than the one it solves. (Closes Bug#18141, reopens Bug#13522.) + (choose_write_coding_system): No longer callable from Lisp. + Move last piece back here from Fwrite_region. + (Fwrite_region, syms_of_fileio): Update for above changes. + +2014-08-11 Martin Rudalics + + * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194). + (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal) + (Fwindow_new_pixel, Fset_window_new_pixel) + (Fset_window_new_total, Fset_window_new_normal) + (Fwindow_resize_apply): Fix doc-strings (see Bug#18112). + See also: + http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html + +2014-08-11 Eli Zaretskii + + * fontset.c (Finternal_char_font): Recompute basic faces if the + frame's face cache was cleared. (Bug#18162) + +2014-08-11 Dmitry Antipov + + Fix bug with uninitialized undo list of an indirect buffer (Bug#18180). + * buffer.c (Fmake_indirect_buffer): Initialize undo list with the + base buffer's undo list. + +2014-08-10 Reuben Thomas + + Fix a couple of recent inadvertent breaks of the MSDOS port. + * msdos.c: include required menu.h + * term.c: set correct menu_show_hook on MSDOS. + +2014-08-10 Martin Rudalics + + Fix handling of menu bar line on TTY frames (Bug#18136) + (Bug#18196). + * dispnew.c (handle_window_change_signal): + * keyboard.c (Fsuspend_emacs): Call change_frame_size with + frame's menu bar lines subtracted from height. + * frame.c (frame_inhibit_resize): Inhibit resizing of TTY + frames. + (adjust_frame_size): Count in menu bar when setting FrameRows. + (make_terminal_frame): When setting up the frame's lines and + text height don't count in the menu bar. + (Fmake_terminal_frame): Call adjust_frame_size with menu bar + lines subtracted from height. + (do_switch_frame): Set tty's FrameRows to number of total lines + of frame. + (Fframe_pixel_height, Fframe_pixel_width): If no window system + is used, return total number of lines and columns. + * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead + of FRAME_LINES. + * term.c (OUTPUT, tty_set_terminal_modes) + (tty_set_terminal_window, tty_set_scroll_region) + (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face) + (tty_ins_del_lines, tty_menu_display, tty_menu_activate): Use + FRAME_TOTAL_LINES instead of FRAME_LINES. + (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES. + Call change_frame_size with frame's menu bar lines subtracted + from height. + * w32console.c (w32con_clear_to_end, w32con_clear_frame) + (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of + FRAME_LINES. + +2014-08-09 Reuben Thomas + + * alloc.c (Fmemory_info): Remove a stray brace. + + * process.c: Fix a comment typo. + + * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02. + +2014-08-09 Jan Djärv + + * widgetprv.h (EmacsFramePart): Remove font. + + * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs) + (resources, setup_frame_cursor_bits): Remove unused variables and + functions, esp. wrt. font (Bug#18227). + +2014-08-07 Paul Eggert + + * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691). + +2014-08-07 Reuben Thomas + + Refer to MS-DOS using the same name everywhere. + + * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous + commit. + * xfaces.c: ditto. + +2014-08-05 Martin Rudalics + + * w32term.c (w32_redeem_scroll_bar): + * xterm.c (XTredeem_scroll_bar): Revert part of last change by + not redeeming scroll bars that have been turned off. + +2014-08-05 Dmitry Antipov + + * keyboard.c (safe_run_hooks): Follow the convenient style to bind + inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See + . + (safe_run_hook_funcall): Adjust accordingly. + +2014-08-04 Martin Rudalics + + * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): Condition + correctly according to toolkit used. + * frame.c (make_initial_frame, make_terminal_frame) + (x_set_horizontal_scroll_bars, x_set_scroll_bar_height) + (Vdefault_frame_horizontal_scroll_bars): Correctly condition + assignments according to presence of toolkit scrollbars. + * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Condition + correctly according to toolkit used. + * window.c (set_window_scroll_bars): Set horizontal scroll bar + only if toolkit supports it. + * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if + present. + * xterm.c (x_scroll_bar_create): Initialize horizontal slot for + non-toolkit builds. + (XTredeem_scroll_bar): Always redeem scroll bar if present. + +2014-08-04 Dmitry Antipov + + * keyboard.c (safe_run_hook_funcall): Avoid consing around + Vinhibit_quit and prefer internal_condition_case_n to pass args. + (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly. + (safe_run_hooks): Remove comment which is not relevant any more. + +2014-08-03 Paul Eggert + + Don't let big frames overrun the stack. + * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling): + Use SAFE_NALLOCA, not alloca. Fix bug with clang + directory_files_internal + GC (Bug#16986). * dired.c (directory_files_internal): Use a volatile variable @@ -11,6 +727,42 @@ so that x_delete_terminal has a file descriptor to pass to delete_keyboard_wait_descriptor. + Don't mishandle year-9999 dates (Bug#18176). + * editfns.c (decode_time_components): Store an invalid timespec + on overflow, instead of returning false, so that the caller can + distinguish overflow from other errors. + (lisp_time_argument, lisp_seconds_argument): If the time is out + of range, signal a time overflow instead of an invalid time spec. + * keyboard.c (decode_timer): Treat time overflow like other + timespec errors. + + Avoid undefined behavior with signed left shift. + Caught by 'gcc -fsanitize=undefined'. + * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1): + * dispnew.c (line_hash_code, scrolling): + * scroll.c (calculate_scrolling, calculate_direct_scrolling): + Use 'unsigned', not 'int', for line hashes. + (scrolling_max_lines_saved): Avoid mystery constants for hash sizes. + +2014-08-02 Paul Eggert + + Make compare-strings more compatible with old behavior (Bug#17903). + * fns.c (Fcompare_strings): Silently bring too-large ends into range. + +2014-08-02 Jan Djärv + + * gtkutil.c (create_dialog): Force min spacing 10 between buttons. + Don't add label between left and right buttons (Bug#18129). + +2014-08-01 Paul Eggert + + Make functions static that no longer need to be extern. + * frame.c, frame.h (set_menu_bar_lines): + * keyboard.c (Qleftmost, Qrightmost): + * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines) + (x_set_internal_border_width): + Now static. + 2014-08-01 Eli Zaretskii Fix display of R2L lines when the last character fits only partially. @@ -24,30 +776,600 @@ line. When the last glyph fits only partially, give the row a negative x offset. -2014-07-29 Eli Zaretskii - Fix hscroll of R2L lines that begin with a TAB or another wide glyph. * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the pixel width of the first glyph that is hscrolled from display. (display_line): In R2L glyph rows, don't give a negative offset to row->x when the first glyph begins before first_visible_x. -2014-07-29 Andreas Schwab + * xdisp.c (display_line): If called with iterator set up to write + to a marginal area, delay the call to handle_line_prefix until we + switch back to the text area. (Bug#18035) + + * .gdbinit (xwindow): The members total_cols, total_lines, + left_col, and top_line are C integers (and has been so for the + last 1.5 years). + +2014-08-01 Andreas Schwab * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and kbd_macro_end together with kbd_macro_buffer. (Bug#18140) -2014-07-28 Eli Zaretskii +2014-08-01 Dmitry Antipov - * xdisp.c (display_line): If called with iterator set up to write - to a marginal area, delay the call to handle_line_prefix until we - switch back to the text area. (Bug#18035) + * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h. + (timerfd_callback): Ignore weird events with no data. Add tight + assertions and comments. + (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally + disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor. + +2014-08-01 Paul Eggert + + * frame.c (x_set_frame_parameters): Fix typo in previous patch. + I had confused && with ||. + +2014-07-31 Paul Eggert + + Simplify timerfd configuration and fix some minor glitches. + * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC. + (alarm_timer, alarm_timer_ok, set_alarm, init_atimer): + Fall back on timer_create if timerfd_create fails at runtime. + (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the + kernel primitives to do resolution. All uses removed. + (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience. + (turn_on_atimers): Clear timer_create-based timers too, + for consistency. + + * frame.c (x_set_frame_parameters): Don't use uninitialized locals. + Without this change, the code can access the local variable 'width' + even when it has not been initialized, and likewise for 'height'; + in either case this leads to undefined behavior. + +2014-07-30 Dmitry Antipov + + * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly + necessary, put horizontal scroll bar resources as well. See + . + * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s. + +2014-07-29 Dmitry Antipov + + * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar + background value to match the resource of its vertical counterpart. + +2014-07-29 Martin Rudalics + + * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of + FRAME_X_WINDOW when calling x_set_window_size (Bug#18138). + +2014-07-28 Martin Rudalics + + * frame.c (x_set_frame_parameters): Revert part of 2014-07-24 + change that added the top margin height to the requested height + and revert (undocumented) part of 2014-07-28 change that changed + the logic of whether a size change occurred. + +2014-07-28 Eli Zaretskii * .gdbinit (xwindow): The members total_cols, total_lines, left_col, and top_line are C integers (and has been so for the last 1.5 years). -2014-07-20 Jan Djärv + * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are + now C integers. + +2014-07-28 Dmitry Antipov + + On GNU/Linux, use timerfd for asynchronous timers. + * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h. + (toplevel): Rename alarm_timer_ok to special_timer_available. + [HAVE_TIMERFD]: Declare timerfd. + [HAVE_CLOCK_GETRES]: Declare resolution. + (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to + system timer resolution. + (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime. + (timerfd_callback) [HAVE_TIMERFD]: New function. + (atimer_result, debug_timer_callback, Fdebug_timer_check) + [ENABLE_CHECKING]: New function for the sake of automated tests. + (init_atimer) [HAVE_TIMERFD]: Setup timerfd. + [HAVE_CLOCK_GETRES]: Likewise for system timer resolution. + [ENABLE_CHECKING]: Defsubr test function. + * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype. + * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise. + * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function. + + Fix --without-x build and pacify --enable-gcc-warnings. + Problems reported in Bug#18122 and Bug#18124. + * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM. + (frame_windows_min_size): Now static. + * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]: + Define as no-op. + (adjust_frame_size): Always declare prototype. + + Fix Gnus-related issues reported by David Kastrup in + . + * atimer.c (timerfd_callback): Always read expiration data. + Add comment. + (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer. + * process.c (add_timer_wait_descriptor): Add timer descriptor + to input_wait_mask and non_process_wait_mask as well. + +2014-07-28 Paul Eggert + + * frame.c (x_set_frame_parameters): Don't use uninitialized locals. + +2014-07-27 Jan Djärv + + * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange): + Reinstate code removed by the prevoius commit to this file. + +2014-07-27 Martin Rudalics + + * buffer.h (struct buffer): New fields scroll_bar_height and + horizontal_scroll_bar_type. + * buffer.c (bset_scroll_bar_height) + (bset_horizontal_scroll_bar_type): New functions. + (Fbuffer_swap_text): Handle old_pointm field. + (init_buffer_once): Set defaults for scroll_bar_height and + horizontal_scroll_bar_type. + (syms_of_buffer): New variables scroll_bar_height and + horizontal_scroll_bar_type. + * dispextern.h (window_part): Rename ON_SCROLL_BAR to + ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR. + (set_vertical_scroll_bar): Remove prototype. + (x_change_tool_bar_height): Add prototype. + * dispnew.c (adjust_frame_glyphs_for_frame_redisplay) + (window_to_frame_vpos, update_frame_1, scrolling, init_display): + Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS + and FRAME_LINES. + (adjust_frame_glyphs_for_window_redisplay): Rearrange lines. + (update_window): Start mode_line_row->y after horizontal scroll + bar. + (change_frame_size_1): Call adjust_frame_size. + (init_display): When changing the size of a tty frame do not + pass height of menu bar. + (Qframe_windows_min_size): New symbol. + * frame.h (struct frame): List tool bar fields after menu bar + fields. Add official, total_lines, horizontal_scroll_bars, + config_scroll_bar_height and config_scroll_bar_lines fields. + (FRAME_HAS_HORIZONTAL_SCROLL_BARS) + (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES) + (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS) + (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES) + (FRAME_WINDOWS_HEIGHT): New macros. + (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT) + (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES) + (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and + horizontal scroll bar. + (frame_inhibit_resize, adjust_frame_size) + (frame_windows_min_size): Add declarations. + (Qscroll_bar_height, Qhorizontal_scroll_bars) + (x_set_scroll_bar_default_height, x_set_left_fringe) + (x_set_right_fringe, x_set_vertical_scroll_bars) + (x_set_horizontal_scroll_bars, x_set_scroll_bar_width) + (x_set_scroll_bar_height): Add external declarations. + * frame.c: (frame_inhibit_resize, frame_windows_min_size) + (adjust_frame_size): New functions. + (make_frame): Initial horizontal_scroll_bars field. Use + SET_FRAME_LINES. Don't allow horizontal scroll bar in + minibuffer window. + (make_initial_frame, make_terminal_frame): No horizontal scroll + bar in initial and terminal frames. Use adjust_frame_size. + (Fframe_total_cols): Fix doc-string. + (Fframe_total_lines, Fscroll_bar_height): New Lisp functions. + (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite + using adjust_frame_size. + (Qscroll_bar_height, Qhorizontal_scroll_bars) + (Qframe_windows_min_size): New symbols. + (x_set_frame_parameters): Remove call of check_frame_size. + (x_report_frame_params): Return scroll_bar_height value. + (x_set_left_fringe, x_set_right_fringe): New functions. + (adjust_frame_height, x_set_internal_border_width) + (x_set_fringe_width): Remove. + (x_set_internal_border_width, x_set_vertical_scroll_bars) + (x_set_scroll_bar_width, x_set_right_divider_width) + (x_set_bottom_divider_width): Rewrite using adjust_frame_size. + (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New + functions. + (x_figure_window_size): Rewrite to make frame display the + expected number of lines. + (Vdefault_frame_scroll_bars): Rewrite doc-string. + (Vdefault_frame_horizontal_scroll_bars) + (Vframe_initial_frame_tool_bar_height) + (frame_inhibit_implied_resize): New variables. + * fringe.c (compute_fringe_widths): Remove. + * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define. + (xg_create_horizontal_scroll_bar) + (xg_update_horizontal_scrollbar_pos) + (xg_set_toolkit_horizontal_scroll_bar_thumb) + (xg_get_default_scrollbar_height) + (xg_clear_under_internal_border): Extern. + * gtkutil.c (xg_frame_resized): Don't call + do_pending_window_change. + (xg_frame_set_char_size): Use adjust_frame_size. + (style_changed_cb): Call update_theme_scrollbar_height and + x_set_scroll_bar_default_height. + (x_wm_set_size_hint): Don't call check_frame_size. + (update_theme_scrollbar_height) + (xg_get_default_scrollbar_height) + (xg_create_horizontal_scroll_bar) + (xg_update_horizontal_scrollbar_pos) + (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions. + (xg_create_scroll_bar): Set horizontal slot of bar. + (xg_initialize): Call update_theme_scrollbar_height. + (xg_clear_under_internal_border): No more static. + * insdel.c (adjust_suspend_auto_hscroll): New function. + (adjust_markers_for_delete, adjust_markers_for_insert) + (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll. + * keyboard.c (readable_events, discard_mouse_events) + (make_lispy_event): Handle horizontal scroll bar click events. + (Fsuspend_emacs): When changing the size of a tty frame do not + pass height of menu bar. + (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft) + (Qright, Qleftmost, Qrightmost): New symbols. + * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of + FRAME_LINES. + * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll. + * nsfns.m (x_set_internal_border_width): New function. + * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar): + Remove extended fringe code. + (x_set_window_size, x_new_font): Don't call + compute_fringe_widths. + * term.c (Fresume_tty): When changing the size of a tty frame do + not pass height of menu bar. + (clear_tty_hooks, set_tty_hooks): Clear + horizontal_scroll_bar_hook. + (init_tty): Frame has no horizontal scroll bars. + * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio, + scroll_bar_before_handle, scroll_bar_horizontal_handle, + scroll_bar_after_handle, scroll_bar_left_arrow, + scroll_bar_right_arrow, scroll_bar_to_leftmost and + scroll_bar_to_rightmost entries. + (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT + (struct terminal): Add set_horizontal_scroll_bar_hook. + * w32console.c (initialize_w32_display): Clear + horizontal_scroll_bar_hook. + * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of + FRAME_X_DISPLAY. + (x_clear_under_internal_border, x_set_internal_border_width): + New functions. + (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. Set + windows_or_buffers_changed when adding the menu bar. + (x_set_tool_bar_lines): Rewrite using adjust_frame_size. + (x_change_tool_bar_height, x_set_scroll_bar_default_height) + (w32_createhscrollbar): New functions. + (w32_createscrollbar): Rename to w32_createvscrollbar. + (w32_createwindow): Init WND_HSCROLLBAR_INDEX. + (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by + WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. Add + WM_EMACS_SHOWCURSOR. + (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING + case do not artificially impose WM size hints. Handle + WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case + by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR + cases. + (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by + WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX. + (unwind_create_frame_1): Remove. + (Fx_create_frame): Make both scrollbars the system standard + width and height. Use official field of frame structure to + inhibit running window-configuration-change-hook. + (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size + pixelwise. Handle frame's official field. + (w32_frame_parm_handlers): Remove x_set_fringe_width + entries. Add x_set_scroll_bar_height, + x_set_horizontal_scroll_bars, x_set_left_fringe and + x_set_right_fringe. + * w32inevt.c (resize_event, maybe_generate_resize_event): Do not + pass height of menu bar to change_frame_size. + * w32menu.c (set_frame_menubar): Rewrite using + frame_inhibit_resize. + * w32term.h (struct w32_display_info): Add + horizontal_scroll_bar_cursor and cursor_display_counter. + (struct scroll_bar): Add horizontal. + (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) + (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) + (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH) + (HORIZONTAL_SCROLL_BAR_LEFT_BORDER) + (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER) + (HORIZONTAL_SCROLL_BAR_TOP_BORDER) + (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) + (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros. + (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define + instead of WM_EMACS_CREATESCROLLBAR. + (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of + WND_SCROLLBAR_INDEX. + * w32term.c (horizontal_scroll_bar_min_handle) + (horizontal_scroll_bar_left_border) + (horizontal_scroll_bar_right_border): New integers. + (x_set_frame_alpha): Replace x_highlight_frame by + w32_focus_frame. + (x_window_to_scroll_bar): New argument "type". Update callers + accordingly. + (w32_set_horizontal_scroll_bar_thumb) + (x_horizontal_scroll_bar_report_motion) + (w32_set_horizontal_scroll_bar) + (w32_horizontal_scroll_bar_handle_click) + (x_horizontal_scroll_bar_report_motion): New functions. + (w32_mouse_position): Discriminate horizontal and vertical + scrollbar cases. + (my_create_scrollbar): Replace with two new functions + my_create_vscrollbar and my_create_hscrollbar. + (x_scroll_bar_create): New argument "horizontal". Update + callers accordingly. + (x_scroll_bar_remove, w32_condemn_scroll_bars) + (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal + scroll bar case. + (w32_read_socket): Handle WM_HSCROLL cae. + (x_new_font): Don't recompute fringe widths. Use + frame_inhibit_resize. Calculate new menu bar height iff we + build without toolkit. Always clear under internal border. + (x_set_window_size): Don't check frame size or recompute + fringes. Reset fullscreen status before applying sizes. Always + resize as requested by pixelwise argument. Don't call + do_pending_window_change. + (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT. + (w32_initialize_display_info): Initialize dpyinfo's + horizontal_scroll_bar_cursor entry. + (w32_create_terminal): Add set_horizontal_scroll_bar_hook. + (w32_initialize): Init horizontal_scroll_bar_min_handle and + horizontal_scroll_bar_left_border. + (w32fullscreen_hook): Intermittently resize window to normal + when switching from fullscreen to maximized state. + (run_window_configuration_change_hook): Don't run it if frame is + not official yet. + (unwind_change_frame): Remove. + (Fset_window_configuration): Rewrite using frame's official field. + * widget.c (set_frame_size): Don't call compute_fringe_widths. + (EmacsFrameSetCharSize): Obey frame_inhibit_resize. + * window.h (struct window): New fields old_pointm, + horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole, + scroll_bar_height and suspend_auto_hscroll. + (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type): + New functions. + (sanitize_window_sizes): Extern. + (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P) + (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR) + (WINDOW_CONFIG_SCROLL_BAR_HEIGHT) + (WINDOW_CONFIG_SCROLL_BAR_LINES) + (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New + macros. + (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS) + (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros. + (WINDOW_VERTICAL_SCROLL_BAR_TYPE) + (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT) + (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT) + (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite. + (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT) + (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height. + * window.c (wset_old_pointm, Fwindow_scroll_bar_height) + (Fwindow_old_point, sanitize_window_sizes): New functions. + (Qwindow_sanitize_window_sizes): New symbol. + (window_body_height): Count in horizontal scroll bar. + (set_window_hscroll, Fscroll_left, Fscroll_right): Set + suspend_auto_hscroll slot. + (Fwindow_inside_edges): Count fringes pixelwise. + (coordinates_in_window, Fcoordinates_in_window_p): Consider + horizontal scroll bar. + (check_frame_size, adjust_window_margins): Remove functions and + corresponding calls. + (set_window_buffer): Initialize old_pointm and horizontal scroll + bars. + (temp_output_buffer_show): Reset hscroll related fields. + Initialize old_pointm. + (make_parent_window): Initialize old_pointm. + (make_window): Initialize old_pointm, horizontal scroll bar type, + and scroll bar height. + (resize_frame_windows): Don't count top margin in new sizes. + Don't use safe sizes when shrinking a frame; let the window + manager do the clipping. + (Fsplit_window_internal): Inherit horizontal scroll bar type and + height. + (Fdelete_window_internal): Unchain old_pointm marker. + (window_scroll_pixel_based, Fscroll_other_window): Adjust + old_pointm. + (Fwindow_text_width, Fwindow_text_height): New argument + "pixelwise". + (struct saved_window): New fields, old_pointm, hscroll_whole, + suspend_auto_hscroll, scroll_bar_height and + horizontal_scroll_bar_type. + (Fset_window_configuration, save_window_save): Set new fields of + saved_window. + (apply_window_adjustment): Don't call adjust_window_margins. + (set_window_margins): Don't change margins if new sizes don't + fit into window. + (set_window_scroll_bars): New argument "horizontal_type". + Handle horizontal scroll bars. Don't change scroll bars if they + don't fit into window. + (Fset_window_scroll_bars): New argument "horizontal_type". + (Fwindow_scroll_bars): Return values for horizontal scroll bars. + (compare_window_configurations): Compare horizontal scroll bar + settings. + * xdisp.c (window_text_bottom_y, window_box_height): Count in + horizontal scroll bar height. + (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES + instead of FRAME_LINES. + (remember_mouse_glyph): Case ON_SCROLL_BAR changed to + ON_VERTICAL_SCROLL_BAR. + (with_echo_area_buffer): Initialize old_pointm. + (with_echo_area_buffer_unwind_data): Store old_pointm values in + vector. + (unwind_with_echo_area_buffer): Handle old_pointm. + (update_tool_bar): Set do_update when the tool bar window has at + least one line (since this is what the user sets). + (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro. + (redisplay_tool_bar): Return early when toolbar has zero lines. + Call x_change_tool_bar_height. Don't use max_tool_bar_height. + (hscroll_window_tree): Handle suspension of auto_hscroll and + old_pointm. + (set_horizontal_scroll_bar): New function. + (redisplay_window): Set ignore_mouse_drag_p when tool bar has + more than one line. Handle horizontal scroll bars. + (note_mouse_highlight): Handle horizontal scrol bars. + (expose_frame): Set dimensions of XRectangle from frame's text + sizes. + (Vvoid_text_area_pointer): Update doc-string. + * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size. + (x_change_tool_bar_height, x_set_scroll_bar_default_height) + (x_set_internal_border_width): New functions. + (x_set_tool_bar_lines): Call x_change_tool_bar_height. + (unwind_create_frame_1): Remove. + (Fx_create_frame): Handle horizontal scroll bars. Use official + field of frame structure to inhibit running + window-configuration-change-hook. + (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size + pixelwise. Handle frame's official field. + (x_frame_parm_handlers): Add x_set_scroll_bar_height, + x_set_horizontal_scroll_bars, x_set_left_fringe, + x_set_right_fringe. + * xmenu.c (update_frame_menubar, free_frame_menubar): Use + adjust_frame_size. + * xterm.h (struct x_display_info): Add + horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar + slots. + (struct scroll_bar): Add horizontal slot. + (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) + (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) + (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros. + (HORIZONTAL_SCROLL_BAR_LEFT_BORDER) + (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER) + (HORIZONTAL_SCROLL_BAR_TOP_BORDER) + (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) + (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define. + (x_clear_under_internal_border): Remove. + * xterm.c (XTmouse_position): Handle horizontal scroll bars. + (x_window_to_scroll_bar): New argument TYPE. Update callers. + (x_send_scroll_bar_event, x_scroll_bar_create): New arguments + HORIZONTAL. Update callers. + (horizontal_action_hook_id): New action hook id. + (x_horizontal_scroll_bar_to_input_event) + (x_create_horizontal_toolkit_scroll_bar) + (xt_horizontal_action_hook) + (x_set_toolkit_horizontal_scroll_bar_thumb) + (XTset_horizontal_scroll_bar, x_net_wm_state) + (x_horizontal_scroll_bar_report_motion): New functions. + (xg_scroll_callback, x_scroll_bar_handle_click): Handle + horizontal scroll bars. + (SCROLL_BAR_HORIZONTAL_NAME): Define. + (XTset_vertical_scroll_bar): Attempt to clear areas not covered + by scroll bar. + (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. Handle + horizontal scroll bars. + (handle_one_xevent): Handle horizontal scroll bar events. Call + x_net_wm_state. + (x_set_window_size_1, x_wm_set_size_hint): Don't call + check_frame_size. + (x_set_window_size): Don't call check_frame_size and + do_pending_window_change. + (x_term_init): Init horizontal_scroll_bar_cursor display info. + (x_create_terminal): Add set_horizontal_scroll_bar_hook. + (x_scroll_bar_set_handle): Add some checks when calling + x_clear_area. + +2014-07-26 Paul Eggert + + Revert previous change. + There is certainly nothing wrong with writing code like 'lo <= i + && i <= hi', even if LO happens to a constant. There isn't even + anything wrong in general with writing 'a <= b' if A happens to + be a constant. At any rate stylistic changes shouldn't + be done like this without discussion. + +2014-07-26 Andreas Schwab + + * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value) + (Fgarbage_collect): Reorder conditions that are written backwards. + * data.c (cons_to_unsigned): Likewise. + * dispnew.c (update_frame_1, sit_for): Likewise. + * fileio.c (file_offset): Likewise. + * filelock.c (read_lock_data, lock_file): Likewise. + * fns.c (larger_vector, make_hash_table, Fmake_hash_table): + Likewise. + * font.c (font_intern_prop, font_style_symbolic): Likewise. + * lisp.h (FIXNUM_OVERFLOW_P): Likewise. + * lread.c (read1): Likewise. + * minibuf.c (read_minibuf_noninteractive): Likewise. + * nsterm.m (x_set_frame_alpha): Likewise. + * process.c (wait_reading_process_output): Likewise. + * region-cache.c (delete_cache_boundaries): Likewise. + * xterm.c (x_set_frame_alpha): Likewise. + +2014-07-25 Paul Eggert + + * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer): + Now static. + +2014-07-26 Dmitry Antipov + + * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME + because atimer expiration is absolute rather than relative. + +2014-07-25 Eli Zaretskii + + * w32term.h (current_popup_menu, menubar_in_use): Move + declarations from w32term.c. + +2014-07-25 Martin Rudalics + + * w32fns.c (menubar_in_use): No more static. + * w32term.c (current_popup_menu, menubar_in_use): Declare. + +2014-07-25 Dmitry Antipov + + Move hourglass machinery to RIF. + * dispextern.h (struct redisplay_interface): New members + show_hourglass and hide_hourglass. Indent comments. + (show_hourglass, hide_hourglass): Remove prototypes. + * nsterm.m (show_hourgass, hide_hourglass): Refactor to ... + (ns_show_hourglass, ns_hide_hourglass): ... new no-ops. + (ns_redisplay_interface): Add them. + * w32fns.c (show_hourglass, hide_hourglass): Refactor to ... + * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these. + (w32_arrow_cursor): New function to hack around non-GUI frames. + (w32_redisplay_interface): Add new functions. + * w32term.h (w32_arror_cursor): Add prototype. + * xdisp.c (show_hourglass): New function, refactored out from + platform-dependent code. + (cancel_hourglass): Now call to RIF function. + * xfns.c (show_hourglass, hide_hourglass): Refactor to ... + * xterm.c (x_show_hourglass, x_hide_hourglass): ... these. + (x_redisplay_interface): Add new functions. + +2014-07-24 Dmitry Antipov + + Fix error reported by Angelo Graziosi in + + and complete previous change. + * frame.c (adjust_frame_height): New function. + (Fset_frame_height, Fset_frame_size): Use it. + (x_set_frame_parameters): Take frame top margin into account. + +2014-07-23 Dmitry Antipov + + * frame.c (Fset_frame_height): Take frame top margin into account. + Incorrect behavior was reported by Martin Rudalics in + + +2014-07-22 Dmitry Antipov + + * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define + menubar_height as such. Tweak comment. + [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for + scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel. + All related users changed. + (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op. + * xterm.c (handle_one_xevent): + * gtkutil.c (xg_event_is_for_menubar): + * xfns.c (x_window) [USE_X_TOOLKIT]: + * xmenu.c (set_frame_menubar, free_frame_menubar): Prefer + to use FRAME_MENUBAR_HEIGHT. + +2014-07-21 Dmitry Antipov + + * frame.c (Fframe_parameters): Always report frame height without + menu and tool bar lines. + +2014-07-21 Jan Djärv * nsterm.m (applicationDidFinishLaunching:): Call antialiasThresholdDidChange, register for antialias changes (Bug#17534). @@ -59,7 +1381,7 @@ * macfont.h (macfont_update_antialias_threshold): Declare. -2014-07-17 Eli Zaretskii +2014-07-21 Eli Zaretskii * w32select.c (setup_windows_coding_system): Apply CODING_ANNOTATION_MASK to the common_flags member of struct @@ -77,17 +1399,180 @@ row has zero buffer position as their start position. Reported by martin rudalics . -2014-07-16 Eli Zaretskii - * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent infinite looping in redisplay when display lines don't have enough space to display even a single character. (Bug#18036) -2014-07-13 Eli Zaretskii +2014-07-20 Dmitry Antipov + + * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position. + * xfns.c (x_window): Use it to allow xfree later. + (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users + where appropriate. Use bool for booleans and remove redundant checks. + (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why. + * xterm.c (x_free_frame_resources): Free shell_position. + +2014-07-19 K. Handa + + * xfaces.c (realize_x_face): Call font_load_for_lface with no + mandatory font spec (Bug#17973). + +2014-07-19 Stefan Monnier + + * font.c (font_score): Return the worst score if the size of + ENTITY is wrong by more than a factor 2 (Bug#17973). + +2014-07-18 Dmitry Antipov + + * frame.c (frame_unspecified_color): New function + refactored out from ... + (Fframe_parameters, Fframe_parameter): ... adjusted users. + (x_fullscreen_adjust, set_frame_param): Move Windows-specific + function to ... + * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here. + * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]: + * lisp.h (set_frame_param): Remove prototype. + * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ... + * xterm.h (x_display_pixel_width, x_display_pixel_height): ... + inlined from here. + + Prefer 'x_display_info *' to 'Display *' in X selection code. + This helps to avoid unneeded calls to x_display_info_for_display. + * xterm.h (struct selection_input_event): Record 'x_display_info *' + instead of 'Display *'. + (SELECTION_EVENT_DPYINFO): New macro. + (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using + it as an lvalue. Mention this in comment. + * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO. + * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol) + (selection_data_to_lisp_data, receive_incremental_selection): + Convert to use 'x_display_info *'. Adjust users where appropriate. + (lisp_data_to_selection_data): Likewise. Also pass 'struct + selection data *' as last arg to not return values in args. + (unexpect_property_change): Use common removal technique. + +2014-07-17 Dmitry Antipov + + * print.c (print_preprocess): Adjust to match changed + sub char-table structure and avoid crash (Bug#18038). + + * data.c (wrong_choice): Not static any more. + * lisp.h (wrong_choice): Add prototype. + * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]: + Declare namebuf as such. Tweak comment. + [USE_GTK]: Likewise for tool_bar_position. + (fset_tool_bar_position) [USE_GTK]: Ditto. + (FRAME_TOOL_BAR_POSITION): New macro. + * frame.c (x_report_frame_params): + * gtkutil.c (update_frame_tool_bar): + * xfns.c (Fx_create_frame): Use it. + (x_set_tool_bar_position): Add meaningful diagnostic messages. + +2014-07-16 Eli Zaretskii * xdisp.c (decode_mode_spec): Call file-remote-p on the current buffer's default-directory only if it is a string. (Bug#17986) +2014-07-16 Dmitry Antipov + + More precise control over values of some buffer-local variables. + * keyboard.c (Qvertical_scroll_bar): + * frame.c (Qleft, Qright): Move to ... + * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here. + * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols. + (syms_of_buffer): DEFSYM all of the above, attach special properties. + Use special symbols to DEFVAR_PER_BUFFER overwrite-mode, + vertical-scroll-bar, scroll-up-aggressively + and scroll-down-aggressively. + * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar): + Add declarations. + * nsfns.m, frame.h (Qleft, Qright): + * nsterm.m (Qleft): Remove declarations. + * gtkutil.c (toplevel): Include buffer.h. + * data.c (wrong_choice, wrong_range): New functions. + (store_symval_forwarding): Handle special properties of buffer-local + variables and use functions from the above to signal error, if any. + + * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural + values. Add comment. + (struct frame): Re-arrange layout to avoid extra padding and use bit + fields for output_method, want_fullscreen and vertical_scroll_bar_type. + (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS) + (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT) + (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]: + Define as no-ops because there are no scroll bars anyway. + * frame.c (make_frame, make_terminal_frame, make_initial_frame): + Adjust users. + + * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]: + Add convenient setter. + (font_put_frame_data, font_get_frame_data): Use it. + +2014-07-15 Daiki Ueno + + * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around + pointer argument, before dereferencing. + (XCHAR2B_BYTE2): Likewise. + +2014-07-15 Dmitry Antipov + + * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id. + (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg. + (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]: + Use record_unwind_protect_int and avoid consing. + (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START. + + * regex.c (re_search_2): Use ssize_t to avoid integer overflow. + +2014-07-14 Paul Eggert + + Use binary-io module, O_BINARY, and "b" flag (Bug#18006). + * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag. + * emacs.c [MSDOS]: + * emacs.c (main) [DOS_NT]: Don't mess with _fmode. + (main) [MSDOS]: Use SET_BINARY instead of setmode. + * minibuf.c: Include binary-io.h instead of fcntl.h. + (read_minibuf_noninteractive): + Use set_binary_mode instead of handcrafted code. + Don't call emacs_set_tty if emacs_get_tty failed. + * sysdep.c, systty.h (emacs_get_tty): Return int, not void. + * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY. + * w32.c (pipe2): Adjust eassert to include O_BINARY. + + * macros.c (Fstart_kbd_macro): Avoid need for overflow check. + This works around a GCC compiler bug when Emacs is configured with + --enable-gcc-warnings. + +2014-07-14 Dmitry Antipov + + * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements + or characters in string, respectively. Add comment. + * fringe.c (Fdefine_fringe_bitmap): + * fns.c (Fsubstring, substring_both): Use it. + * keymap.c (Fdefine_key, Flookup_key): + * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength. + + * term.c (tty_menu_add_pane, tty_menu_add_selection): + Use menu_item_width. + (tty_menu_show): Simplify because tty_menu_create never return NULL. + +2014-07-13 Paul Eggert + + Improve behavior of 'bzr up; cd src; make -k'. + * Makefile.in (top_srcdir): New var. + (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res): + Use '$(top_srcdir)' instead of '$(srcdir)/..'; + its expansion is a bit shorter. + (../config.status): Actually build config.status instead of + just complaining. + (ACLOCAL_INPUTS, AUTOCONF_INPUTS): + New macros, copied and relocated from ../Makefile.in. + ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in) + (../config.status, Makefile): New dependencies and rules, + copied with relocation from ../Makefile.in. This should be more + likely to rebuild the build machinery properly if you do a 'make' + in the src directory. + 2014-07-12 Eli Zaretskii * xdisp.c (display_line): Don't call FETCH_BYTE with argument less @@ -100,39 +1585,134 @@ * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc string to match the one in w32fns.c. -2014-07-08 Eli Zaretskii + * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch + stdin to binary mode only if it is connected to a terminal. + +2014-07-11 Paul Eggert + + Coalesce extern decls. + * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty): + * sysdep.c (emacs_get_tty, emacs_set_tty): + Move duplicate extern decls from here ... + * systty.h: ... to here, so that there's just one copy. + +2014-07-11 Jan Djärv + + * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA. + + * nsfns.m (Fns_popup_font_panel): Ditto. + +2014-07-11 Eli Zaretskii + + * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r', + not only on '\n'. + [WINDOWSNT]: Switch stdin to binary mode when not echoing input. + + * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty) + [DOS_NT]: Implement for WINDOWSNT. + + * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now + unsigned. + +2014-07-11 Michael Albinus + + * sysdep.c (suppress_echo_on_tty): New function. + * minibuf.c (read_minibuf_noninteractive): Use it. + +2014-07-11 Dmitry Antipov + + * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if + sysinfo failed. Adjust docstring. + +2014-07-11 Eli Zaretskii + + Implement memory-info for MS-DOS. + * dosfns.c (dos_memory_info): New function. + * dosfns.h (dos_memory_info): Add prototype. + * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info. + * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead + of doing some of its job. + + * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't + reference termios structure members. + +2014-07-11 Michael Albinus + + * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible. + + * minibuf.c (top): Include systty.h. Declare external + emacs_get_tty and emacs_set_tty. + (Vread_hide_char): New lisp variable. + (read_minibuf_noninteractive): Hide characters with + Vread_hide_char if it is a character. (Bug#17839) + +2014-07-10 Eli Zaretskii + + Implement memory-info for MS-Windows. + * w32.c (w32_memory_info): New function. + * w32.h (w32_memory_info): Prototype it. + * alloc.c (Fmemory_info) [WINDOWSNT]: Call it. + +2014-07-10 Dmitry Antipov + + * coding.h (struct coding_system): Remove 'error_positions' (unused) + and 'errors' (set but unused) fields. Use bitfields for 'eol_seen', + 'mode', 'common_flags' and 'result' fields, adjust layout to avoid + extra padding and shrink struct coding_system by 56 bytes (x86_64). + * coding.c (decode_coding_utf_8, decode_coding_utf_16) + (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis) + (decode_coding_big5, decode_coding_charset, decode_coding) + (encode_coding): Adjust users. + + * alloc.c (Fmemory_info): New function. + +2014-07-09 Paul Eggert + + * syntax.c (back_comment): Use more-natural location for label. + + * font.c, font.h (font_unparse_fcname): Now static. + Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS. + +2014-07-09 Dmitry Antipov + + Next minor cleanup of font subsystem. + * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no + users) and FONT_FORMAT_INDEX (set by a few font drivers but never + really used). + (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove; + unused. + * ftfont.h (ftfont_font_format): Remove prototype. + * ftfont.c (ftfont_font_format): Remove; now unused. + (ftfont_open): + * nsfont.m (nsfont_open): + * w32font.c (w32font_open_internal): + * w32uniscribe.c (uniscribe_open): + * xfont.c (xfont_open): + * xftfont.c (xftfont_open): All users changed. + + * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and + so avoid integer overflow if decoded gap size exceeds INT_MAX bytes. + +2014-07-09 Eli Zaretskii * xdisp.c (move_it_to): Adjust calculation of line_start_x to what x_produce_glyphs does when it generates a stretch glyph that represents a TAB. (Bug#17969) -2014-07-05 Eli Zaretskii - * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window, and there is a display property at that position, don't call move_it_to to move to a position before window start. (Bug#17942) Fix condition for finding CHARPOS by the first call to move_it_to. (Bug#17944) -2014-07-05 Stefan Monnier +2014-07-09 Stefan Monnier * syntax.c (find_defun_start): Try the cache even if !open_paren_in_column_0_is_defun_start. (back_comment): If find_defun_start was pessimistic, use the scan_sexps_forward result to improve the cache (bug#16526). -2014-07-04 Daniel Colascione - - Backport from trunk. - * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC - only if xic_style calls for it. This change allows Emacs to work - with ibus. Also, don't leak resources if create_frame_xic fails, - and stop caching xic_style across different displays (Bug#17928). - (supported_xim_styles): Make const. - (best_xim_style): Remove first parameter: it's always just - supported_xim_styles. Change to look at supported_xim_styles directly. - -2014-07-04 Eli Zaretskii +2014-07-09 Eli Zaretskii * xdisp.c (redisplay_window): If redisplay of a window ends up with point in a partially visible line at end of the window, make @@ -147,7 +1727,109 @@ * w32.c (network_interface_info): Make sure the argument is a Lisp string. -2014-07-01 Eli Zaretskii +2014-07-08 Paul Eggert + + * process.c (read_and_dispose_of_process_output): Fix typo + in previous patch: we want nonnegative fds, not nonzero fds. + +2014-07-08 Dmitry Antipov + + * chartab.c (char_table_translate): Move to... + * character.h (char_table_translate): ... inline function here. + Avoid Faref and assume that args are always valid. This helps to + speedup search, which is especially important for a huge buffers. + * lisp.h (char_table_translate): Remove prototype. + + * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well. + * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]: + New function, with an intention to avoid code duplication between + a few font drivers. + * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]: + Add prototype. + * ftfont.c (ftfont_open): + * macfont.m (macfont_open): + * xftfont.c (xftfont_open): Use it. + +2014-07-08 Paul Eggert + + * process.c: Add sanity checks for file descriptors (Bug#17844). + (wait_reading_process_output, Fprocess_filter_multibyte_p): + Check that infd is nonnegative before using it as an fd. + (read_and_dispose_of_process_output, Fprocess_send_eof): + Likewise, for outfd. + (wait_reading_process_output): Omit unnecessary check of infd. + +2014-07-07 Paul Eggert + + Minor fixups related to usage of the 'long' type. + * gnutls.c (emacs_gnutls_handshake): + * xfaces.c (dump_realized_face): + Work even if 'long' is narrower than 'void *'. + * termcap.c (scan_file): + * xselect.c (x_decline_selection_request) + (x_reply_selection_request, x_get_window_property): + * xterm.c (x_set_frame_alpha): + Remove unnecessary 'L' suffixes of integer constants. + * xfns.c (hack_wm_protocols): + * xselect.c (x_fill_property_data): + * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible): + Remove unnecessary casts to 'long'. + (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits. + + Minor ImageMagick safety fixes. + * image.c (imagemagick_compute_animated_image): + Remove useless assignment to local. Avoid problems if dest_width is 0. + (imagemagick_load_image): Use int for pixel counts that can't + exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns + a row width greater than the image width (or greater than LONG_MAX!). + +2014-07-04 K. Handa + + * coding.c (MIN_CHARBUF_SIZE): Delete it. + (MAX_CHARBUF_EXTRA_SIZE): New macro. + (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE. + +2014-07-04 Dmitry Antipov + + * font.h (struct font_driver): Remove get_outline and free_outline; + not used by any font driver. + * ftfont.c (ftfont_driver): + * macfont.m (macfont_driver): + * nsfont.m (nsfont_driver): + * w32font.c (w32font_driver): + * w32uniscribe.c (uniscribe_font_driver): + * xfont.c (xfont_driver): Related users changed. + * xselect.c (x_get_window_property): Use convenient xmalloc. + Call to xfree only if some data was really allocated. + +2014-07-03 Dmitry Antipov + + On MS-Windows, display busy cursor on all GUI frames. + This is similar to what we have on X. Quickly tested by Dani Moncayo. + * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used. + (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window): + Likewise. + (hide_hourglass, show_hourglass): Redesign to match X counterparts. + * xdisp.c (start_hourglass): Remove Windows-specific bits. + +2014-07-03 Dmitry Antipov + + Use convenient alists to manage per-frame font driver-specific data. + * frame.h (struct frame): Rename font_data_list to... + [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now. + * font.h (struct font_data_list): Remove; no longer need a special + data type. + (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]: + Adjust prototypes. + * font.c (font_put_frame_data, font_get_frame_data) + [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list + management. + * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame): + Related users changed. + * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise. + Prefer convenient xmalloc and xfree. + +2014-07-03 Eli Zaretskii * dispnew.c (prepare_desired_row): Accept 2 additional arguments: the window whose glyph row is being prepared and a flag whether it @@ -160,26 +1842,168 @@ * dispextern.h (prepare_desired_row): Adjust prototype. -2014-07-01 Dmitry Antipov +2014-07-03 Dmitry Antipov * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889). * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash caused by xw_popup_dialog in daemon mode (Bug#17891). -2014-06-30 Eli Zaretskii +2014-07-03 Eli Zaretskii * frame.c (do_switch_frame): When switching to another TTY frame, make sure FrameCols and FrameRows are in sync with the new frame's data. (Bug#17875) +2014-07-02 Dmitry Antipov + + Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects. + * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and + min_char slots. Adjust comment. + (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS. + Add SUB_CHAR_TABLE_OFFSET member. + (make_uninit_sub_char_table): New function. + (toplevel): Add compile-time assert to verify suitable member layout + in Lisp_Sub_Char_Table. + * alloc.c (mark_char_table): Add extra argument to denote char table + subtype. Adjust to match new layout of sub char-table. + (mark_object): Always mark sub char-tables with mark_char_table. + * chartab.c (make_sub_char_table, copy_sub_char_table) + (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set) + (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table) + (map_sub_char_table_for_charset, uniprop_table_uncompress): + All related users changed. + * lread.c (read1): Adjust to match new layout of sub char-table. + * print.c (print_object): Likewise (Bug#17898). + +2014-07-02 Stefan Monnier + + * keymap.c (get_keyelt): Simplify. + (copy_keymap_item): Remove left-over code for when we had + key-shortcut caches. + +2014-06-30 Jan Djärv + + * nsterm.m (judge): EmacsScroller: Move dealloc code here. + (dealloc): Remove for EmacsScroller. + + * nsterm.h (EmacsScroller): Remove dealloc. + +2014-06-30 Eli Zaretskii + + * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881) + +2014-06-30 Jan Djärv + + * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO + when setNeedsDisplay is called so we don't trigger redisplay for every + tool bar update. + + * nsterm.m (any_help_event_p): New variable. + (mouseMoved:): Set any_help_event_p to YES if help event is + generated. Remove else with empty help event that triggered redisplay + for every mouse move. + (windowDidResignKey:): If any_help_event_p, generate empty help event. + +2014-06-29 Dmitry Antipov + + * xfns.c (Qsuppress_icon): Remove; no real users. + (syms_of_xfns): Don't DEFSYM it. Remove ancient comments. + * w32fns.c (Qsuppress_icon): Remove, for the same reason. + (syms_of_w32fns): Don't DEFSYM it. + +2014-06-29 Glenn Morris + + * Makefile.in (ns-app): Mark as PHONY. + +2014-06-28 Glenn Morris + + * Makefile.in (mostlyclean): There are no libXMenu11.a, + liblw.a in this directory. + 2014-06-28 Andreas Schwab * coding.c (encode_coding_utf_8): Correctly count produced_chars also in unibyte case. (Bug#17865) -2014-06-25 Glenn Morris +2014-06-28 K. Handa + + * coding.c (MAX_CHARBUF_SIZE): Renamed from CHARBUF_SIZE. + (MIN_CHARBUF_SIZE): New macro. + (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed. + +2014-06-27 Glenn Morris + + * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand + with an order-only dependence on bootstrap-emacs. (Bug#2151) + (.el.elc): Replace suffix rule with pattern rule. + (%.elc): New pattern rule, with order-only prerequisite. + ($(lisp)): No more need to depend on BOOTSTRAPEMACS. + ($(lispsource)/loaddefs.el): Use an order-only prerequisite + in place of BOOTSTRAPEMACS. + +2014-06-26 Dmitry Antipov + + * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE. - * puresize.h (BASE_PURESIZE): Increase a bit. (Bug#17846) +2014-06-25 Dmitry Antipov + + Consistently use validate_subarray to verify substring. + * fns.c (validate_substring): Not static any more. Adjust to + use ptrdiff_t, not EMACS_INT, because string and vector limits + can't exceed ptrdiff_t even if EMACS_INT is wider. + (Fcompare_strings, Fsubstring, Fsubstring_no_properties) + (secure_hash): Adjust user. + * lisp.h (validate_subarray): Add prototype. + * coding.c (Fundecodable_char_position): + * composite.c (Fcomposition_get_gstring, Fcompose_string_internal): + Use validate_subarray. Adjust comment to mention substring. + +2014-06-25 Dmitry Antipov + + Do not allow out-of-range character position in Fcompare_strings. + * fns.c (validate_subarray): Add prototype. + (Fcompare_substring): Use validate_subarray to check ranges. + Adjust comment to mention that the semantics was changed. Also see + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html. + +2014-06-24 Paul Eggert + + Be more consistent about the 'Qfoo' naming convention. + * image.c (Fimagemagick_types): + * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY): + * process.c (Fmake_network_process): + Rename C local identifier 'Qfoo to avoid giving the false + impression that it stands for the symbol 'foo'. + +2014-06-23 Dmitry Antipov + + Simplify and cleanup character conversion stuff. + * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe): + Remove prototypes. + * character.c (multibyte_char_to_unibyte) + (multibyte_char_to_unibyte_safe): Remove; no longer used. + * character.h (make_char): Remove; unused. + (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify. + (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing. + * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c: + * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c: + * search.c, term.c, xdisp.c, xterm.c: Related users changed. + +2014-06-22 Mario Lang + + * w32fns.c (Fw32_shell_execute): The the -> the. + +2014-06-22 Dmitry Antipov + + * xmenu.c (mouse_position_for_popup): + * xselect.c (mouse_position_for_drop): Do not duplicate ... + * xfns.c (x_relative_mouse_position): ... and prefer this function. + * menu.c (Fx_popup_menu): + * xselect.c (x_handle_dnd_message): Adjust users. + * menu.h (mouse_position_for_popup): Remove prototype. + * xterm.h (x_relative_mouse_position): Add prototype. + * xterm.c (x_find_topmost_parent): Break from the loop and do not + call XFree if XQueryTree returns zero. 2014-06-21 Eli Zaretskii @@ -195,17 +2019,17 @@ * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (..., ACL_TYPE_ACCESS) doesn't work. -2014-06-19 Stefan Monnier +2014-06-21 Stefan Monnier * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command before checking key-translation-map (bug#17659). -2014-06-19 Dmitry Antipov +2014-06-21 Dmitry Antipov * font.c (font_make_object): Avoid dangling pointer which may crash GC (Bug#17771). -2014-06-18 Eli Zaretskii +2014-06-21 Eli Zaretskii * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the prototype of DGifCloseFile as appropriate for older and newer @@ -215,157 +2039,741 @@ (gif_load): Call gif_close instead of DGifCloseFile. Divulge the error string where appropriate. (Bug#17790) -2014-06-16 Eli Zaretskii - * xdisp.c (Fmove_point_visually): Instead of testing for keyboard macro execution, make sure point didn't move since last complete redisplay, as the condition for using the glyph matrix information. (Bug#17777) -2014-06-14 Eli Zaretskii +2014-06-19 Dmitry Antipov + + Minor cleanup of fonset code. + * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME) + (set_fontset_name, FONTSET_ASCII, set_fontset_ascii) + (FONTSET_BASE, set_fontset_base, FONTSET_FRAME) + (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face) + (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK) + (set_fontset_fallback): Reorder extra slots and avoid unused slots. + (free_realized_fontset): Remove because a no-op since 2008. + (free_face_fontset): Adjust user. + (syms_of_fontset): Shrink fontset by one extra slot. + +2014-06-17 Paul Eggert + + Omit redundant extern decls. + Most of this patch is from Dmitry Antipov, in: + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html + * commands.h (update_mode_lines): + * frame.h (Qbackground_color, Qforeground_color) + (x_set_menu_bar_lines): + * ftfont.c (ftfont_font_format): + * intervals.h (Qkeymap, Qfont): + * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function): + * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump) + (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp) + (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p) + (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object) + (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite) + (Fidentity, extract_float, init_display, syms_of_display, Qdisplay): + (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref) + (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop) + (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio) + (Qtool_bar, Qheader_line): + * macros.c (Fexecute_kbd_macro): + * xdisp.c (Ftool_bar_height, Ftool_bar_height): + * xterm.c (x_delete_terminal, XSetIMValues): + * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame) + (x_implicitly_set_name, popup_activated) + (widget_store_internal_border): + Remove redundant decls. + * frame.c [USE_X_TOOLKIT]: Include widget.h. + * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit): + Remove _Noreturn, as make-docfile now does that for us. + * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile. + (Qregion_extract_function): New decl. + * window.c, xfns.c: Include menu.h. + +2014-06-17 Stefan Monnier + + * callint.c (Fcall_interactively): Fix up last change (bug#17701). + +2014-06-17 Dmitry Antipov + + * fileio.c (Fread_file_name): Do not pass redundant args and ... + * callint.c (read_file_name): ... convert to static here. + * lisp.h (Fread_file_name): Do not EXFUN it. + (STRING_COPYIN): Remove; unused. + * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ... + (char_composable_p): ... static function. All users changed. + * eval.c (toplevel): Remove redundant #include directives. + * xterm.c (x_initialize): Add static to match prototype. + * ccl.c (Fccl_execute_on_string): + * font.c (fon_intern_prop): Use make_specified_string. + +2014-06-16 Paul Eggert + + * Makefile.in (ns-app): Fix typo that broke build on OS X. + Reported by David Caldwell in: + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html + +2014-06-16 Dmitry Antipov + + Do not ask for XRender extension each time XFT font is opened. + * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ... + * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment. + +2014-06-15 Glenn Morris + + * Makefile.in: Use `make -C' rather than `cd && make' throughout. + +2014-06-15 Eli Zaretskii * xdisp.c (Fmove_point_visually): Don't use the glyph matrix information if we are in the middle of executing a keyboard macro, since redisplay doesn't update the screen until the macro is finished. (Bug#17777) -2014-06-13 Eli Zaretskii - * alloc.c (cleanup_vector): Don't dereference a font driver pointer if it is NULL. (Bug#17771) +2014-06-13 Glenn Morris + + * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h) + ($(lispsource)/international/charprop.el) + ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a) + ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc) + ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)): + GNU make automatically passes command-line arguments to sub-makes. + +2014-06-13 Paul Eggert + + Avoid hangs in accept-process-output (Bug#17647). + * lisp.h, process.c (wait_reading_process_input): + Return int, not bool. All uses changed. + * process.c (SELECT_CANT_DO_WRITE_MASK): + Remove macro, replacing with ... + (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense. + All uses changed. + (status_notify): New arg WAIT_PROC. Return int, not void. + All uses changed. + +2014-06-13 Eli Zaretskii + + * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if + the frame is the initial frame, because the hook is not set up + then, and Emacs crashes. + Reported by Fabrice Popineau . + +2014-06-12 Stefan Monnier + + * keymap.c (silly_event_symbol_error): Don't recommend the use + of strings. + 2014-06-11 Eli Zaretskii * xdisp.c (set_cursor_from_row): Fix an off-by-one error when matching overlay strings with 'cursor' property against buffer positions traversed in the glyph row. (Bug#17744) -2014-06-08 Glenn Morris +2014-06-11 Jan Djärv + + * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst + on Cocoa. + + * nsterm.m (run): Always compile for Cocoa. Use runtime check to + determine 10.9 (Bug#17751). + + * macfont.m (macfont_draw): Positions were not freed. + +2014-06-10 Dmitry Antipov + + * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ... + * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this + function. Also adjust comment. + * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed. + + * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member. + * font.c (font_done_for_face): + * xfaces.c (realize_non_ascii_face): Adjust user. + * font.h (struct font_driver): Convert 'prepare_face' to return + void because its return value is never used anyway. + * xfont.c (xfont_prepare_face): Return void. + * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc. + (xftfont_done_face): Use xfree. + + * dispextern.h (last_tool_bar_item): Remove declaration. + * frame.h (struct frame): New member last_tool_bar_item. + * frame.c (make_frame): Initialize it. + * xdisp.c (toplevel): Remove last_tool_bar_item. + (handle_tool_bar_click, note_tool_bar_highlight): + * w32term.c (w32_read_socket, w32_initialize): + * xterm.c (handle_one_xevent, x_initialize): Adjust users. + + * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false. + * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here. + +2014-06-09 Paul Eggert + + Say (accept-process-output P)'s result pertains to P if P is non-nil. + * process.c (Faccept_process_output) + (wait_reading_process_output): Mention that if PROCESS is non-nil, + the return value is about PROCESS, not about other processes. + +2014-06-09 Dmitry Antipov + + Further adjustments to mark_object and friends. + Now the mark_object's stack is just 32 bytes on a 64-bit + system, which means extra 20% off the stack usage. + * alloc.c (mark_save_value): As before, refactored out from ... + (mark_object): ... adjusted user. Also add comment. + +2014-06-09 Paul Eggert + + Fix core dump after a dropped X connection (Bug#17704). + * sysdep.c (stuff_char): Don't abort merely because the selected frame + is dead, as we may be shutting down. + +2014-06-08 Glenn Morris + + * fileio.c (write-region-inhibit-fsync): Doc tweak. + + * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks. + +2014-06-08 Paul Eggert + + If a C name must be extern on some platforms, make it extern on all. + * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor) + (load_color): + * font.h (ftxfont_driver) [HAVE_XFT]: + * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char): + * lisp.h (get_frame_param): + * menu.h (tty_menu_show): + * process.h (conv_sockaddr_to_lisp, catch_child_signal): + * termhooks.h (encode_terminal_code): + * xterm.h (x_menu_wait_for_event): + Always declare. + * frame.c (get_frame_param): + * fringe.c (max_used_fringe_bitmap): + * ftxfont.c (ftxfont_driver): + * keyboard.c (ignore_mouse_drag_p, make_ctrl_char): + * menu.c (menu_items_inuse): + * process.c (conv_sockaddr_to_lisp, catch_child_signal): + * term.c (encode_terminal_code, tty_menu_show): + * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor): + * xfaces.c (load_color): + * xmenu.c (x_menu_wait_for_event): + Now always extern. + +2014-06-08 Dmitry Antipov + + Change object marking routines to minimize stack usage. + This change moves a few cold paths from mark_object to NO_INLINE + functions and adjusts symbol marking loop. According to GCC 4.8.2 + -Wstack-usage, this reduces mark_object's stack usage from 80 to + 48 bytes on a 64-bit system. For a long byte-force-recompile runs, + stack usage at the mark phase is reduced up to 28%. Surprisingly, + it also gains up to 3% in speed (with default '-O2 -g3' flags). + * alloc.c (mark_compiled, mark_localized_symbol): New functions, + refactored out from ... + (mark_object): ... adjusted user. Also mark symbols in a tight + inner loop. + (mark_face_cache): Add NO_INLINE. + +2014-06-08 Eli Zaretskii + + * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter + contains garbage on WINDOWSNT (which could potentially infloop at + exit). + + Minimize cursor motion during TTY menu updates. + * term.c (tty_menu_display): Don't position cursor here. + Instead, pass the cursor coordinates to update_frame_with_menu. + (tty_menu_activate): Send the hide cursor command only once in an + iteration through the outer 'while' loop. + + * dispnew.c (update_frame_1): Accept an additional argument + SET_CURSOR_P, and position the cursor at the end of the frame + update only if that argument is non-zero. All callers changed to + provide the additional argument as non-zero, except for + update_frame_with_menu. + (update_frame_with_menu): Accept 2 additional arguments ROW and + COL; if they are non-negative, instruct update_frame_1 not to + position the cursor, and instead position it according to ROW and COL. + + * dispextern.h (update_frame_with_menu): Update prototype. + +2014-06-08 Stefan Monnier + + * callproc.c (call_process): Don't check read-only if we don't insert + anything (bug#17666). + +2014-06-08 Eli Zaretskii + + * dispnew.c (update_frame_with_menu): Set display_completed. + +2014-06-07 Eli Zaretskii + + * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern + only for WINDOWSNT. + * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT. + +2014-06-06 Paul Eggert + + * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static. + * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl. + +2014-06-06 Stefan Monnier + + * window.c (Frecenter): Signal an error if window-buffer is not + current-buffer. + + * keyboard.c (make_lispy_position): Don't include a buffer position in + mode/header-line mouse events. + + * keyboard.c (read_char): Handle (t . ) in the second use of + Vunread_command_events (bug#17650). + +2014-06-06 Dmitry Antipov + + * xterm.c (x_setup_pointer_blanking): + Conditionally probe Xfixes until this stuff is stabilized (Bug#17609). + +2014-06-05 Dmitry Antipov + + * keyboard.c, process.c: Do not define POLL_FOR_INPUT here + because it will be defined in generated config.h if needed. + +2014-06-04 Dmitry Antipov + + Use terminal-specific hooks to display popup dialogs. + * termhooks.h (struct terminal): New field popup_dialog_hook. + * menu.c (emulate_dialog_with_menu): New function, refactored from ... + (Fx_popup_dialog): ... adjusted user. Also remove old #if 0 + code and use popup_dialog_hook. + * nsmenu.m (ns_popup_dialog): Make hook-compatible. + * nsterm.h (ns_popup_dialog): Adjust prototype. + * nsterm.m (ns_create_terminal): + * w32term.c (w32_create_terminal): + * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]: + Setup popup_dialog_hook. + +2014-06-04 Eli Zaretskii + + * w32heap.c (report_temacs_memory_usage): Improve the report by + reporting the large blocks that are actually occupied at dump time. + + * w32console.c (initialize_w32_display): Set the console + menu_show_hook, otherwise TTY menus are broken on w32. + +2014-06-04 Dmitry Antipov + + Use terminal-specific hooks to display menus. + * termhooks.h (struct terminal): New field menu_show_hook. + * menu.h (): Bit flags for menu hooks. + (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show): + Adjust prototypes. + * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook. + * nsmenu.m (ns_menu_show): + * w32menu.c (w32_menu_show): + * xmenu.c (x_menu_show): + * term.c (tty_menu_show): Adjust to use bit flags. + (set_tty_hooks): Set menu_show_hook. + * xterm.c (x_create_terminal): + * nsterm.m (ns_create_terminal): + * msdos.c (initialize_msdos_display): + * w32term.c (w32_create_terminal): Likewise. + +2014-06-03 Juanma Barranquero + + * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB. + +2014-06-03 Eli Zaretskii + + * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET) + (FD_SET): Don't define on WINDOWSNT. + +2014-06-03 Paul Eggert + + * emacs.c: Include "sysselect.h", to define its inline functions. + Problem reported by Glenn Morris in: + http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html + + Do not require libXt-devel when building with gtk. + * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid + dependency on libXt-devel. + * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too. + (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as + lwlib-widget.h now does this. + * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo. + +2014-06-03 Paul Eggert + + If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET. + * process.c (add_read_fd, delete_read_fd, add_write_fd) + (delete_write_fd, wait_reading_process_output): + Remove now-redundant easserts. + * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes. + Use INLINE_HEADER_BEGIN, INLINE_HEADER_END. + (fd_CLR, fd_ISSET, fd_SET): New inline functions. + (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions. + +2014-06-03 Eli Zaretskii + + * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use + HEAPSIZE; instead, define separate values for the 32- and 64-bit builds. + (calloc): Don't undef, it is never defined. + (HEAP_ENTRY_SHIFT): Remove unused macro. + + * Makefile.in (C_HEAP_SWITCH): Remove. + (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH). + + Fix MS-Windows build broken by menu changes on 2014-06-02. + * w32menu.c (w32_menu_show): Fix a typo that broke compilation. + + * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]: + Define instead of including ../lwlib/lwlib.h, which causes + compilation errors due to missing X11 headers. + +2014-06-03 Paul Eggert + + * process.c (wait_reading_process_output): Omit incorrect test of + p->infd against zero. Add easserts for infd having a plausible value. + +2014-06-02 Dmitry Antipov + + Adjust to match recent lwlib changes. + * menu.h (xmalloc_widget_value): Replace by ... + (make_widget_value): ... new prototype. + * menu.c (xmalloc_widget_value): Replace by ... + (make_widget_value): ... new function. + (free_menubar_widget_value_tree, digest_single_submenu): Adjust users. + * gtkutil.c (malloc_widget_value, free_widget_value): + (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code. + * keyboard.h (enum button_type, struct _widget_value): + * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value): + Likewise. + * nsmenu.m (ns_update_menubar, ns_menu_show): + * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show): + * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users. + * xterm.h (XtParent) [USE_GTK]: Remove unused macro. + +2014-06-02 Dmitry Antipov + + * image.c (x_query_frame_background_color) + [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]: + Fix --enable-gcc-warnings compilation without image libraries. + +2014-06-02 Eli Zaretskii + + * w32heap.c (malloc_after_dump, realloc_after_dump): Update the + emulated break value only if it goes up. + (sbrk): Add assertion that the INCREMENT argument is strictly + zero. Improve and correct the commentary. + +2014-06-02 Paul Eggert + + Improve AIX-related merge from emacs-24. + * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment. + * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're + not on AIX; since we're on the trunk we can use enums more broadly. + + * frame.c (x_set_frame_parameters): Don't read uninitialized storage. + +2014-06-02 Jan Djärv + + * xterm.c (xg_scroll_callback): Remove position, for jump set portion + to min(value, whole). + +2014-06-02 Paul Eggert + + Bring back the changes to GDB-visible symbols, but only on AIX. + And only if it's not pre-4.2 GCC. + * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros. + (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. + (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): + New macros. + +2014-06-02 Eli Zaretskii + + * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer + with PT, not GPT. (Bug#16433) + + Revert last changes to GDB-visible symbols. + * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros. + (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them. + (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): + Delete macros. + +2014-06-02 Glenn Morris + + * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649) + +2014-06-02 Paul Eggert + + Fix port to 32-bit AIX with xlc (Bug#17598). + * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE. + * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty. + * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum, + to work around a compiler bug in IBM xlc 12.1. + +2014-06-02 Eli Zaretskii + + * xterm.c (x_update_window_end): Don't invalidate the entire + mouse-highlight info, just signal frame_up_to_date_hook that mouse + highlight needs to be redisplayed. (Bug#17588) + +2014-06-02 Paul Eggert + + Port the GDB-visible symbols to AIX. + Without them, GDB doesn't work to debug Emacs, since the AIX linker + optimizes away the relevant external symbols. Use enums instead; + this suffices for the AIX port, which is 32-bit-only anyway. + * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros. + (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. + (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): + New macros. + + Include sources used to create macuvs.h. + * Makefile.in ($(srcdir)/macuvs.h): New rule. + * macuvs.h: Use automatically-generated header. + +2014-06-01 Paul Eggert + + Port signal-handling to DragonFly BSD (Bug#17646). + * callproc.c, sysdep.c (block_child_signal, unblock_child_signal): + Move implementations from callproc.c to sysdep.c. + * process.h, syssignal.h (block_child_signal, unblock_child_signal): + Move declarations from process.h to syssignal.h. + +2014-06-01 Juanma Barranquero + + * callint.c (Ffuncall_interactively): Add usage. + +2014-06-01 Jan Djärv + + * nsfns.m (ns_appkit_version_str): Add os version for Cocoa. + +2014-05-30 Eli Zaretskii + + * w32heap.c (malloc_before_dump, malloc_after_dump) + (malloc_before_dump, realloc_after_dump, realloc_before_dump) + (mmap_alloc, mmap_realloc): Check for errors more thoroughly and + set errno where appropriate to emulate CRT functions. + +2014-05-30 Dmitry Antipov + + Debugging facility to check whether 'const char *' points to + relocatable data of non-pure Lisp string. + * alloc.c (maybe_lisp_pointer): New function, refactored out of ... + (mark_maybe_pointer): ... adjusted user. + (relocatable_string_data_p): New function. + * lisp.h (relocatable_string_data_p): Add prototype. + * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure + the pointer to relocatable Lisp data is not used. + +2014-05-30 Paul Eggert + + Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561). + * atimer.c (block_atimers): + * callproc.c (block_child_signal): Block SIGINT too; + otherwise, its handler might now unblock signals that it shouldn't. + * keyboard.c (read_char): Clear signal mask, since we may + be in a SIGINT handler, and many signals may be masked. + * keyboard.c (handle_interrupt): + * sysdep.c (handle_arith_signal): + Clear signal mask instead of just unblocking the signal that + was received, since several signals may be blocked at this point. + +2014-05-29 Eli Zaretskii + + * Makefile.in (TEMACS_POST_LINK): Remove target. + (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites. + (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe. + +2014-05-29 Dmitry Antipov + + * xmenu.c (xdialog_show): Remove prototype, rename to + x_dialog_show, remove 2nd arg because it's always zero + and simplify accordingly. + (xw_popup_dialog): Adjust user. + * w32menu.c (w32_dialog_show): Adjust prototype, remove + 2nd arg because it's always zero and simplify accordingly. + (w32_popup_dialog): Adjust user. + +2014-05-29 Eli Zaretskii + + * w32heap.c (report_temacs_memory_usage): New function. + + * unexw32.c (unexec) [ENABLE_CHECKING]: + Call report_temacs_memory_usage. + + * w32heap.h (report_temacs_memory_usage): Add prototype. + +2014-05-29 Paul Eggert + + Don't substitute sigprocmask for pthread_sigmask (Bug#17561). + * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed. + +2014-05-29 Eli Zaretskii + + * buffer.c (init_buffer): Accept an argument 'initialized'. + [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset + mmap_regions and mmap_fd, to avoid referencing stale data from the + dump phase. Add an assertion for buffer text of buffers created + in temacs before this function is called. (Bug#17622) + (mmap_regions_1, mmap_fd_1): Remove unused variables. + + * lisp.h (init_buffer): Update prototype. + + * emacs.c (main): Pass 'initialized' as the argument to init_buffer. + +2014-05-29 Dmitry Antipov + + * alloc.c (Fgarbage_collect): Fix compilation with + GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. + +2014-05-29 Paul Eggert + + * frame.c, frame.h (frame_char_to_pixel_position) + (frame_set_mouse_position): Now static, and made private in + frame.c rather than public in frame.h. - * fileio.c (write-region-inhibit-fsync): Doc tweak. +2014-05-28 Dmitry Antipov - * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks. + Refactor mouse positioning stuff to avoid code duplication. + * frame.h (frame_char_to_pixel_position): New function. + (x_set_mouse_position): Rename to... + (frame_set_mouse_position): ...new function. + (frame_set_mouse_pixel_position): Add prototype. + * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position): + Rename to frame_set_mouse_pixel_position. + * frame.c (Fset_mouse_pixel_position, Fset_mouse_position): + Adjust users. + * xterm.h, w32term.h ( x_set_mouse_position) + (x_set_mouse_pixel_position): Remove prototypes. -2014-06-04 Eli Zaretskii +2014-05-28 Dmitry Antipov - * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter - contains garbage on WINDOWSNT (which could potentially infloop at - exit). + On X, always make pointer visible when deleting frame (Bug#17609). + * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible): + Pass frame as arg. + * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible): + Adjust prototypes. + * cmds.c (Fself_insert_command): Use SELECTED_FRAME. + * keyboard.c (gobble_input): If there is no terminal input error, + make sure the pointer is visible for all frames on this terminal. + * xterm.c (x_free_frame_resources): Enable pointer visibility if + it was previously disabled. - Minimize cursor motion during TTY menu updates. - * term.c (tty_menu_display): Don't position cursor here. Instead, - pass the cursor coordinates to update_frame_with_menu. - (tty_menu_activate): Send the hide cursor command only once in an - iteration through the outer 'while' loop. +2014-05-28 Stefan Monnier - * dispnew.c (update_frame_1): Accept an additional argument - SET_CURSOR_P, and position the cursor at the end of the frame - update only if that argument is non-zero. All callers changed to - provide the additional argument as non-zero, except for - update_frame_with_menu. - (update_frame_with_menu): Accept 2 additional arguments ROW and - COL; if they are non-negative, instruct update_frame_1 not to - position the cursor, and instead position it according to ROW and - COL. + * data.c (Fzerop): Move to Elisp. + (syms_of_data): Don't defsubr it. + * keyboard.c (echo_keystrokes_p): New function. + (read_char, record_menu_key, read_key_sequence): Use it. - * dispextern.h (update_frame_with_menu): Update prototype. + * callint.c (Qfuncall_interactively): New var. + (Qcall_interactively): Remove. + (Ffuncall_interactively): New function. + (Fcall_interactively): Use it. + (syms_of_callint): Defsubr it. -2014-06-02 Stefan Monnier +2014-05-27 Stefan Monnier - * callproc.c (call_process): Don't check read-only if we don't insert - anything (bug#17666). + * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't + relocated from under us. -2014-06-02 Eli Zaretskii +2014-05-27 Fabrice Popineau - * dispnew.c (update_frame_with_menu): Set display_completed. + Use mmap(2) emulation for allocating buffer text on MS-Windows. + * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from + configure, not from HEAPSIZE. + (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used. -2014-06-01 Paul Eggert + * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero + for MinGW, since it no longer uses gmalloc. - * frame.c (x_set_frame_parameters): Don't read uninitialized storage. + * buffer.c: Do not define mmap allocations functions for Windows. + Remove mmap_find which is unused. Remove mmap_set_vars which does + nothing useful. + [WINDOWSNT]: Include w32heap.h. + (init_buffer): Always allocate new memory for buffers. -2014-06-01 Jan Djärv + * emacs.c: Remove mmap_set_vars calls. - * xterm.c (xg_scroll_callback): Remove position, for jump set portion - to min(value, whole). + * image.c (free_image): Undef free for Windows because it is + redirected to our private version. -2014-06-01 Paul Eggert + * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility. + (copy_executable_and_dump_data): Remove dumping the heap section. + (unexec): Restore using_dynamic_heap after dumping. - Bring back the changes to GDB-visible symbols, but only on AIX. - And only if it's not pre-4.2 GCC. - * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros. - (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. - (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): - New macros. + * w32heap.c (dumped_data_commit, malloc_after_dump) + (malloc_before_dump, realloc_after_dump, realloc_before_dump) + (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc) + (mmap_free): New functions. -2014-05-31 Eli Zaretskii + * w32heap.h: Declare dumped_data and mmap_* function prototypes. - * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer - with PT, not GPT. (Bug#16433) +2014-05-27 Paul Eggert - Revert last changes to GDB-visible symbols. - * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros. - (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them. - (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): - Delete macros. + * image.c (imagemagick_load_image): Use MagickRealType for local + 'color_scale', instead of double, to avoid a GCC warning about + double promotion. -2014-05-31 Glenn Morris + * xfns.c (Fx_window_property): Remove unused local. - * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649) + Don't kill already-reaped process (Bug#17561). + * process.c (process_send_signal): Fix race condition where a + subprocess was reaped by a signal handler between the check for + liveness and calling 'kill', which meant that Emacs could in + theory kill an innocent bystander process. Do the fix by blocking + SIGCHLD in a critical section that checks liveness before killing. -2014-05-30 Paul Eggert +2014-05-26 Eli Zaretskii - Fix port to 32-bit AIX with xlc (Bug#17598). - * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE. - * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty. - * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum, - to work around a compiler bug in IBM xlc 12.1. + * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined. -2014-05-29 Eli Zaretskii +2014-05-26 Ken Brown - * xterm.c (x_update_window_end): Don't invalidate the entire - mouse-highlight info, just signal frame_up_to_date_hook that mouse - highlight needs to be redisplayed. (Bug#17588) + * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name, + even if !CYGWIN (see bug#17510). -2014-05-29 Paul Eggert +2014-05-26 Jan Djärv - Port the GDB-visible symbols to AIX. - Without them, GDB doesn't work to debug Emacs, since the AIX linker - optimizes away the relevant external symbols. Use enums instead; - this suffices for the AIX port, which is 32-bit-only anyway. - * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros. - (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them. - (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val): - New macros. + * nsfns.m (Fns_do_applescript): Surround NSApp run + with calls to ns_init_events, ns_finish_events (Bug#17424). -2014-05-26 Paul Eggert + * nsterm.h (ns_init_events, ns_finish_events): Declare. - Include sources used to create macuvs.h. - * Makefile.in ($(srcdir)/macuvs.h): New rule. - * macuvs.h: Use automatically-generated header. + * nsterm.m (ns_init_events, ns_finish_events): New functions. + (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events. -2014-05-25 Eli Zaretskii + * nsfns.m (ns_do_applescript): Surround executeAndReturnError + with calls to ns_init_events, ns_finish_events (Bug#17424). + +2014-05-26 Eli Zaretskii * xdisp.c (move_it_in_display_line_to): Don't record wrap position if we are iterating over an object that generates glyphs for marginal areas. (Bug#17585) -2014-05-24 Paul Eggert +2014-05-26 Paul Eggert * xdisp.c (safe__call1, safe__eval): Now static. -2014-05-24 Eli Zaretskii +2014-05-26 Eli Zaretskii * xdisp.c (safe__call): Accept va_list argument instead of '...'. (safe_call, safe__call1): Construct a va_list argument for safe_call. (safe_call1): Call safe_call instead of safe__call directly. -2014-05-24 Ken Brown +2014-05-26 Ken Brown * w32term.c (x_delete_display) [CYGWIN]: Don't free dpyinfo->w32_id_name, to make sure it doesn't get freed more than once. (Bug#17510) -2014-05-24 Stefan Monnier +2014-05-26 Stefan Monnier * xdisp.c: Bind inhibit-quit during pre-redisplay-function. (safe__call, safe__call1, safe__eval): New functions. @@ -373,67 +2781,215 @@ (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577). (display_mode_element): Same for `:eval'. -2014-05-22 Paul Eggert +2014-05-26 Paul Eggert Fix port to 32-bit AIX (Bug#17540). * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr twice. _text already includes this offset. (unrelocate_symbols): Don't cast 64-bit integer to pointer. -2014-05-21 Eli Zaretskii +2014-05-26 Eli Zaretskii * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion: when closest_pos is identical to to_charpos, don't recurse, since we already tried that, and failed. (Bug#17539) -2014-05-20 Eli Zaretskii - * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are unwinding when frame's faces were not initialized yet, increment the frame's image-cache reference count before calling x_free_frame_resources. Don't dereference dpyinfo->terminal->image_cache if it is NULL. (Bug#17524) -2014-05-11 Glenn Morris +2014-05-25 Jan Djärv + + * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in + nsterm.m now. + + * nsterm.m (ns_draw_glyph_string): Move isComposite and end from + macfont.m, call draw with adjusted arguments so font drivers + don't need to do that. + + * macfont.m (macfont_draw): Merge changes from Macport. + +2014-05-24 Eli Zaretskii + + * alloc.c (garbage_collect_1): New function, with all of the guts + of Fgarbage_collect. + (mark_stack): Accept an argument END and don't mark Lisp objects + on the stack beyond the address given by END. Calculation of END + was moved to Fgarbage_collect. + (Fgarbage_collect): Calculate the end address of the stack portion + that needs to be examined by mark_stack, and pass that address to + garbage_collect_1, which will pass it to mark_stack. + See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html + for more details about the underlying problems. In particular, + this avoids dumping Emacs with the large hash-table whose value is + held in purify-flag for most of the time loadup.el runs. + +2014-05-24 Jan Djärv + + * xfns.c (x_window_property_intern): New function (code from + x_window_property). + (Fx_window_property): Call x_window_property_intern. If property + not found and NILP (source) and outer window != inner window, + check outer window for property (Bug#17537). + +2014-05-22 Paul Eggert + + Supply malloc and alloc_size attributes for extern allocators. + This documents the C API, and helps GCC generate a bit better code. + * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE) + (ATTRIBUTE_MALLOC_SIZE): New macros. + * gmalloc.c (malloc, realloc, calloc): + * gtkutil.h (malloc_widget_value): + * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc) + (xnrealloc, xstrdup, xlispstrdup, record_xmalloc): + Use them. + +2014-05-21 Paul Eggert + + Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519). + * image.c (imagemagick_load_image): Port to hosts that do not use + a 16-bit quantum, i.e., QuantumRange does not equal 65535. + +2014-05-21 Leo Liu + + * fns.c (Fnreverse): Accept strings for SEQ and update doc-string. + +2014-05-20 Michael Albinus + + * dbusbind.c (xd_signature): Revert last 2 patches. + +2014-05-19 Paul Eggert + + Allow any non-nil value to count as true in bool-vector. + Likewise for xd_signature in dbusbind.c. + This is more consistent with the usual practice in Emacs, which is + that any non-nil value counts as true. + * alloc.c (Fbool_vector): Don't require args to be t or nil. + * dbusbind.c (xd_signature): Likewise, for booleans. + * data.c, lisp.h (Qbooleanp): + * lisp.h (CHECK_BOOLEAN): Remove. All uses removed. + +2014-05-19 Dmitry Antipov + + * lisp.h (CHECK_BOOLEAN): New function. + * alloc.c (Fbool_vector): New function. + (syms_of_alloc): Defsubr it. + * data.c (Qbooleanp): New symbol. + (syms_of_data): DEFSYM it. + * dbusbind.c (xd_signature): Use CHECK_BOOLEAN. + + * font.c (font_matching_entity): Extract font-entity object + from the vector of matching entities (Bug#17486). + +2014-05-17 Paul Eggert + + Assume C99 or later (Bug#17487). + * bytecode.c (B__dummy__): Remove. + * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool. + (FLEXIBLE_ARRAY_MEMBER): Now always empty. + * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]: + * regex.c (DEBUG_PRINT): Assume varargs macros. + * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99. + +2014-05-17 Fabrice Popineau + + * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new + memory for every buffer that was dumped. + +2014-05-15 Dmitry Antipov + + * fns.c (Freverse): Allow vectors, bool vectors and strings. + (Fnreverse): Allow vectors and bool vectors. + +2014-05-14 Dmitry Antipov + + Minor cleanup for terminal setup. + * termhooks.h (create_terminal): Adjust prototype. + * terminal.c (create_terminal): Pass output method and RIF as args. + (init_initial_terminal): + * nsterm.m (ns_create_terminal): + * term.c (init_tty): + * w32term.c (w32_create_terminal): + * xterm.c (x_create_terminal): Adjust users. + Avoid redundant NULL initializers and add comments. + +2014-05-13 Paul Eggert + + * keyboard.c (Qdeactivate_mark): Now static. + +2014-05-13 Dmitry Antipov + + If available, use Xfixes extension to do pointer blanking. + * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var. + * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here. + (make_invisible_cursor): Move to... + * xterm.c (make_invisible_cursor): ...here. + (x_probe_xfixes_extension, xfixes_toggle_visible_pointer) + (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions. + (x_term_init): Call to x_setup_pointer_blanking. + (XTtoggle_invisible_pointer): Use blanking specific to this display. + * xterm.h (struct x_display_info): New member toggle_visible_pointer. + +2014-05-12 YAMAMOTO Mitsuharu + + * xdisp.c (draw_glyphs): Set clipping to highlight boundaries. + +2014-05-12 Glenn Morris * fileio.c (Ffile_executable_p): Doc tweak. -2014-05-10 Jan Djärv +2014-05-12 Jan Djärv * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup instead of deprecated g_settings_list_schemas if possible (Bug#17434). -2014-05-07 Paul Eggert +2014-05-08 Paul Eggert * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430). -2014-05-07 Jarek Czekalski +2014-05-08 Jarek Czekalski Fix initialization of minibuffer history variable (Bug#17430). * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound. Move the initialization up to prevent any "value void" message. -2014-05-06 Samuel Bronson +2014-05-08 Samuel Bronson * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level are matched (bug#17413). -2014-05-06 Jarek Czekalski +2014-05-08 Jarek Czekalski Stop tooltips pulling Emacs window to front (Bug#17408). * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to SetWindowPos invocations. -2014-05-05 Jan Djärv +2014-05-08 Jan Djärv * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system not initialized (Bug#17398). +2014-05-07 Paul Eggert + + * image.c: Include before (Bug#17429). + +2014-05-06 Paul Eggert + + * image.c: Do not use libpng if HAVE_NS, as NS does its own thing. + [HAVE_NS]: Do not include png.h. + (x_query_frame_background_color): New function. + (png_load_body, imagemagick_load_image, svg_load_image): Use it. + (png_load_body): Coalesce duplicate code. + 2014-05-04 Paul Eggert - Revert recent libpng changes (Bug#17339). - * Makefile.in (PNG_CFLAGS): Remove; all uses removed. - * image.c [HAVE_LIBPNG_PNG_H]: Include , not . + Consult libpng-config more consistently (Bug#17339). + * Makefile.in (PNG_CFLAGS): New var. + (ALL_CFLAGS): Use it. + * image.c [HAVE_PNG]: Don't worry about , as + CFLAGS now handles this. 2014-05-03 Paul Eggert @@ -446,14 +3002,6 @@ * buffer.c (overlay_strings): Fix the wording of the commentary. -2014-05-02 Paul Eggert - - Consult libpng-config more consistently (Bug#17339). - * Makefile.in (PNG_CFLAGS): New var. - (ALL_CFLAGS): Use it. - * image.c [HAVE_PNG]: Don't worry about , as - CFLAGS now handles this. - 2014-05-01 Glenn Morris * floatfns.c (Fisnan): @@ -486,26 +3034,66 @@ GCC 4.9.0 warned about this, and I couldn't easily prove to my own satisfaction that they would always be initialized. -2014-04-29 Eli Zaretskii +2014-04-30 Eli Zaretskii - * term.c (tty_menu_display): Move the cursor to the active menu - item. + * term.c (tty_menu_display): Move the cursor to the active menu item. (tty_menu_activate): Return the cursor to the active menu item - after displaying the menu and after displaying help-echo. See - http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html + after displaying the menu and after displaying help-echo. + See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html for the details of why this is needed by screen readers and Braille displays. -2014-04-29 Glenn Morris +2014-04-30 Glenn Morris * process.c (handle_child_signal): Handle systems without WCONTINUED. (Bug#15110, 17339) -2014-04-23 Eli Zaretskii +2014-04-29 Stefan Monnier + + * window.c (struct saved_window): Remove mark. + (Fset_window_configuration, save_window_save) + (compare_window_configurations): Don't touch marks any more. + +2014-04-28 Paul Eggert + + Use bits_word for gcmarkbits. + * alloc.c (struct cons_block, struct float_block): On 64-bit hosts, + bits_word is typically a tad more efficient for mark bits than + unsigned is, so use bits_word. All uses changed. + * lisp.h (BITS_PER_INT): Remove; no longer used. + + Avoid undefined behavior in signed left shift. + This ports to GCC 4.9.0 with -fsanitize=undefined. + * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT): + * data.c (Fash): + * regex.c (extract_number): + * lisp.h (make_number, XINT): + Do not shift a 1 bit left into a sign bit. + * alloc.c (struct cons_block, struct float_block): Use unsigned, + not int, for gcmarkbits. All uses changed. + +2014-04-25 Eli Zaretskii * search.c (Fnewline_cache_check): Don't try to count newlines outside the buffer's restriction, as find_newline doesn't support that. +2014-04-24 Stefan Monnier + + * window.c (Fset_window_configuration): Deactivate the mark before + unsetting the mark. + (set_window_buffer): Ignore window_initialized. + (window_initialized): Remove. + * keyboard.c (Qdeactivate_mark): Not static any more. + * buffer.c (buffer_local_value): Rename from buffer_local_value_1. + Update all callers. + +2014-04-23 Paul Eggert + + * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0 + and to clang 3.4, which have fixed the bug. This should let us + run a bit faster on these platforms when address sanitization is + in effect. + 2014-04-22 Paul Eggert Port to GCC 4.9.0 with --enable-gcc-warnings. @@ -522,42 +3110,61 @@ (Fnewline_cache_check): New function. (syms_of_search): Defsubr it. -2014-04-21 Jarek Czekalski +2014-04-22 Jarek Czekalski Fix freezing with scroll bars of GTK3 Toolkit (bug#15801). * keyboard.c (unblock_input): Add comment. * xgselect.c (xg_select): Prevent Glib main loop recursion. +2014-04-22 Daniel Colascione + + * lread.c (readevalloop_eager_expand_eval): New function + that can recurse into toplevel forms. + (readevalloop): Call it. + * lisp.h: Declare Qprogn. + * callint.c (Qprogn): No longer static. + 2014-04-19 Stefan Monnier * intervals.c (rotate_right, rotate_left): Fix up length computation. Also change identifiers to match the comments, and add more assertions (bug#16234). -2014-04-18 Eli Zaretskii - - * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation - glyph is written to TEXT_AREA of the temporary glyph_row. - (Bug#17288) - 2014-04-18 Paul Eggert * emacs.c (close_output_streams): Don't clear and restore errno. -2014-04-17 Jan Djärv +2014-04-18 Jan Djärv * xterm.c (x_make_frame_visible): Prevent endless loop when frame never becomes visible, i.e. using XMonad (Bug#17237). -2014-04-17 Eli Zaretskii +2014-04-18 Eli Zaretskii - * xdisp.c (Fline_pixel_height): Don't assume that the current - buffer and the selected window's buffer are one and the same. - (Bug#17281) + * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation + glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288) + (Fline_pixel_height): Don't assume that the current buffer and the + selected window's buffer are one and the same. (Bug#17281) * insdel.c (invalidate_buffer_caches): Invalidate the bidi paragraph-start cache before the newline cache. (Bug#17269) +2014-04-17 Paul Eggert + + * term.c (tty_send_additional_strings): No need to fflush here, + as callers fflush. + (tty_set_terminal_modes): fflush after sending additional strings, + not before. + +2014-04-17 Daniel Colascione + + * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings): + New symbols. + (tty_send_additional_strings): New function. + (tty_set_terminal_modes, tty_reset_terminal_modes): Use it. + (syms_of_term): Intern tty-mode-set-strings and + tty-mode-reset-strings. + 2014-04-16 Stefan Monnier * window.c (save_window_save): Lookup window_point_insertion_type in @@ -625,44 +3232,57 @@ Move vfork-related portions under #ifndef MSDOS. (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT. -2014-04-15 Stefan Monnier +2014-04-16 Stefan Monnier * buffer.c (Foverlays_at): Add argument `sorted'. -2014-04-14 Eli Zaretskii +2014-04-16 Eli Zaretskii * insdel.c (invalidate_buffer_caches): When deleting or replacing text, invalidate the bidi_paragraph_cache upto and including the preceding newline. -2014-04-13 Paul Eggert +2014-04-16 Paul Eggert Port to IRIX 6.5 (Bug#9684). - * alloc.c (TAGGABLE_NULL): New constant, - for porting to hosts with nontrivial DATA_SEG_BITS settings. - (next_vector, set_next_vector): Use it. * conf_post.h (INET6) [IRIX6_5]: Define. (HAVE_GETADDRINFO) [IRIX6_5]: Undef. * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined. - * lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out, - for consistency with how TAGGABLE_NULL is computed. -2014-04-13 Eli Zaretskii +2014-04-16 Eli Zaretskii * keyboard.c (Fopen_dribble_file): Encode the dribble file-name before passing it to system APIs. - * puresize.h (BASE_PURESIZE): Bump by 1K. (Bug#17255) - -2014-04-13 Stefan Monnier +2014-04-16 Stefan Monnier * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly, make sure stack.byte_string_start is not de-adjusted by pushhandler. -2014-04-12 Paul Eggert +2014-04-16 Paul Eggert * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187) +2014-04-15 Paul Eggert + + Remove DATA_SEG_BITS. + The DATA_SEG_BITS hack was needed for older 32 bit platforms. + As a result of this change, Emacs won't work on IRIX 6.5 with IRIX + cc, but that platform is so old that SGI itself stopped supporting + it in December 2013. If you still need Emacs on IRIX, please + either compile with GCC and port the undumping code, or run + './configure --with-wide-int'. + * alloc.c (gdb_make_enums_visible): Update to match lisp.h. + * lisp.h (GCTYPEBITS): Move definition up, and switch to the + DEFINE_GDB_SYMBOL_START way to define it. + (NONPOINTER_BITS): New macro. + (EMACS_INT): Use it. + [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting + the problem and/or configuring --with-wide-int. + (USE_LSB_TAG): Simplify, based on above changes. + (gdb_DATA_SEG_BITS): Remove. All uses removed. + * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed. + 2014-04-12 Eli Zaretskii * xdisp.c (move_it_by_lines): If a large portion of buffer text is @@ -673,8 +3293,6 @@ * indent.c (Fvertical_motion): Handle correctly the case when the display string is preceded by an empty line. -2014-04-11 Eli Zaretskii - * w32.c (sys_umask) : Remove redundant constant, and use S_IWRITE instead. @@ -682,10 +3300,33 @@ * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187) -2014-04-09 Ken Brown +2014-04-11 Ken Brown * Makefile.in (EMACS_MANIFEST): Revert last change. +2014-04-10 Daniel Colascione + + * puresize.h (BASE_PURESIZE): Increase. + +2014-04-09 Stefan Monnier + + * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local. + + * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and + region handling (and don't call signal_before_change) if + inhibit_modification_hooks is set. + (signal_before_change): Don't check inhibit_modification_hooks any more. + +2014-04-08 Daniel Colascione + + * alloc.c (sweep_symbols, mark_object): Assert that symbol + function cells contain valid lisp objects. (Modified version of + patch from Dmitry). + + * alloc.c (detect_suspicious_free): Split actual stack capturing + out into new function for easier breakpoint setting. + (note_suspicious_free): New function. + 2014-04-07 Stefan Monnier * lisp.h (struct Lisp_Symbol): New bitfield `pinned'. @@ -701,58 +3342,183 @@ (Fgarbage_collect): Use it. (gc_sweep): Remove hack made unnecessary. -2014-04-05 Glenn Morris +2014-04-07 Glenn Morris * keyboard.c (Fopen_dribble_file): Doc tweak. -2014-04-04 Jan Djärv +2014-04-07 Ken Brown - Backport from trunk. - * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool - bar is zero height, just return (Bug#16976). - (initFrameFromEmacs:): Initialize wait_for_tool_bar. - * nsterm.h (EmacsView): Add wait_for_tool_bar. - * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar - is nil. If waiting for toolbar to complete, force a redraw. - (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976). + * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176) -2014-04-03 Ken Brown +2014-04-07 Paul Eggert - * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176) + * alloc.c: Simplify by removing use of HAVE_EXECINFO_H. + We have a substitute execinfo.h on hosts that lack it. + (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it + isn't optimized away. + +2014-04-05 Paul Eggert + + Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'. + * alloc.c (memory_full): + * charset.c (syms_of_charset): + * doc.c (Fsnarf_documentation): + * emacs.c (main): + * font.c (BUILD_STYLE_TABLE): + * keyboard.c (make_lispy_event): + * profiler.c (setup_cpu_timer): + * xgselect.c (xg_select): + * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG): + Use ARRAYELTS. + * font.c (FONT_PROPERTY_TABLE_SIZE): Remove. + Replace the only use with ARRAYELTS (font_property_table). + * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS. + +2014-04-03 Daniel Colascione + + * xterm.c (x_term_init): + * xfns.c (best_xim_style): + * xfaces.c (Fdump_colors): + * w32fns.c (w32_default_color_map): + * w32.c (init_environment, N_ENV_VARS): + * unexcw.c (read_exe_header): + * term.c (term_get_fkeys_1): + * sysdep.c (init_baud_rate): + * nsterm.m (ns_convert_key): + * nsfns.m (get_geometry_from_preferences): + * msdos.c (dos_set_window_size, init_environment): + * macfont.m (mac_font_get_glyph_for_cid) + (macfont_store_descriptor_attributes) + (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid): + * keyboard.c (command_loop_1, read_menu_command, make_lispy_event) + (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode) + (syms_of_keyboard): + * image.c (xpm_str_to_color_key): + * fringe.c (MAX_STANDARD_FRINGE_BITMAPS): + * frame.c (x_set_frame_parameters): + * fileio.c (Ffile_selinux_context): + * emacs.c (sort_args): + * dosfns.c (msdos_stdcolor_name): + * dired.c (file_attributes): + * chartab.c (uniprop_decoder_count, uniprop_encode_count): + Change expressions of the form sizeof(arr) / sizeof(arr[0]) + to ARRAYELTS (arr). + +2014-04-02 Daniel Colascione + + * data.c (Ffset): Abort if we're trying to set a function call to + a dead lisp object. + + * lisp.h (ARRAYELTS): New macro. + + * alloc.c: Include execinfo.h if available. + (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally. + (suspicious_free_record): New structure. + (suspicious_objects, suspicious_object_index) + (suspicious_free_history, suspicious_free_history_index): + New variables. + (find_suspicious_object_in_range, detect_suspicious_free) + (Fsuspicious_object): New functions. + (cleanup_vector): Call find_suspicious_object_in_range. 2014-04-02 Martin Rudalics * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar width from font width (Bug#17163). -2014-03-30 Martin Rudalics - * frame.c (x_set_frame_parameters): Calculate default values of new frame sizes only after all other frame parameters have been processed (Bug#17142). -2014-03-28 Ken Brown +2014-04-02 Ken Brown * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000. (Bug#17112) -2014-03-28 YAMAMOTO Mitsuharu +2014-04-02 YAMAMOTO Mitsuharu * xterm.c (x_draw_image_glyph_string): Adjust image background width accordingly when its x position is adjusted. (Bug#17115) +2014-04-02 Dmitry Antipov + + * font.c (font_list_entities): Do not add empty vector to font cache. + (font_matching_entity): Likewise. If matching entity is found, insert + 1-item vector with this entity instead of entity itself (Bug#17125). + + * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak. + +2014-04-01 Paul Eggert + + * fns.c (validate_subarray): Rename from validate_substring, + since it works for vectors too. New arg ARRAY. Optimize for the + non-nil case. Instead of returning bool, throw an error if out of + range, so that the caller needn't do that. All uses changed. + Report original values if out of range. + (Fsubstring, Fsubstring_no_properties, secure_hash): + Also optimize the case where FROM is 0 or TO is the size. + +2014-03-31 Dmitry Antipov + + * search.c (Freplace_match): Use make_specified_string. + * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort + to catch bogus override face of glyph strings. + * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash): + Move common substring range checking code to... + (validate_substring): ...this function. + +2014-03-31 Jan Djärv + + * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976) + +2014-03-30 Jan Djärv + + * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool + bar is zero height, just return (Bug#16976). + (initFrameFromEmacs:): Initialize wait_for_tool_bar. + + * nsterm.h (EmacsView): Add wait_for_tool_bar. + + * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar + is nil. If waiting for toolbar to complete, force a redraw. + +2014-03-28 Glenn Morris + + * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION. + (emacs_bugreport): New variable. + (usage_message): Use PACKAGE_BUGREPORT. + (syms_of_emacs) : New variable. + + * emacs.c (syms_of_emacs) : New var. + +2014-03-27 Paul Eggert + + Port recent signal-related changes to FreeBSD. + Problem reported by Herbert J. Skuhra. + * lisp.h (block_tty_out_signal, unblock_tty_out_signal): + Move decls from here ... + * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h. + 2014-03-27 YAMAMOTO Mitsuharu * w32term.c (x_draw_image_glyph_string): Fix computation of height and width of image background when it is displayed with a 'box' face. (Bug#17115) -2014-03-26 Paul Eggert +2014-03-27 Paul Eggert More backward-compatible fix to char-equal core dump (Bug#17011). * editfns.c (Fchar_equal): In unibyte buffers, assume values in range 128-255 are raw bytes. Suggested by Eli Zaretskii. +2014-03-27 Juanma Barranquero + + * image.c (init_svg_functions): When loading SVG-related libraries, + free already loaded libraries if the initialization fails. + (rsvg_handle_set_size_callback): Remove declaration, unused. + +2014-03-26 Paul Eggert + Fix core dump in char-equal (Bug#17011). * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in unibyte buffers, as we can't tell whether the characters are @@ -760,7 +3526,7 @@ * insdel.c (adjust_markers_for_delete): Remove unused local. -2014-03-24 Barry O'Reilly +2014-03-26 Barry O'Reilly Have (MARKER . ADJUSTMENT) undo records always be immediately after their corresponding (TEXT . POS) record in undo list. @@ -788,38 +3554,134 @@ (record_point): at_boundary calculation no longer needs to account for marker adjustments. -2014-03-24 Martin Rudalics +2014-03-26 Martin Rudalics * w32term.c (x_set_window_size): Refine fix from 2014-03-14 (Bug#17077). -2014-03-23 Glenn Morris +2014-03-26 Glenn Morris * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073) -2014-03-23 Stefan Monnier +2014-03-26 Stefan Monnier * buffer.c (struct sortvec): Add field `spriority'. (compare_overlays): Use it. (sort_overlays): Set it. -2014-03-23 Eli Zaretskii +2014-03-26 Eli Zaretskii * xdisp.c (redisplay_window): If all previous attempts to find the cursor row failed, try a few alternatives before falling back to the top-most row of the window. Use row_containing_pos. (Bug#17047) -2014-03-22 Daniel Colascione +2014-03-26 Juanma Barranquero - * process.c (conv_sockaddr_to_lisp): When extracting the string - names of AF_LOCAL sockets, stop before reading uninitialized - memory. + * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]: + * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally. + + * keyboard.c (read_decoded_event_from_main_queue): #ifdef out + variables on Windows. + + * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression. + + * w32.c (unsetenv): Remove unused var `retval'. + (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'. + + * w32notify.c (watch_worker): Remove unnecesary var sleep_result. + (start_watching): Remove unused var `thr'. + + * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'. + (find_child_console): Remove unnecesary var `thread_id'. + + * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'. + (x_focus_frame): #ifdef 0 unused variable `dpyinfo'. + +2014-03-26 Glenn Morris + + * filelock.c (Flock_buffer): Doc tweak. + + * buffer.c (Frestore_buffer_modified_p, Fkill_buffer): + * emacs.c (shut_down_emacs): + * fileio.c (Finsert_file_contents, write_region): + * filelock.c (top-level, syms_of_filelock): + * insdel.c (prepare_to_modify_buffer_1): + CLASH_DETECTION is always defined now. + +2014-03-25 Eli Zaretskii + + * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the + DLL handle, to speed up thread startup. + +2014-03-25 Paul Eggert + + Handle sigmask better with nested signal handlers (Bug#15561). + * atimer.c (sigmask_atimers): Remove. + Remaining use rewritten to use body of this function. + * atimer.c (block_atimers, unblock_atimers): + * callproc.c (block_child_signal, unblock_child_signal): + * sysdep.c (block_tty_out_signal, unblock_tty_out_signal): + New arg OLDSET. All callers changed. + * atimer.c (block_atimers, unblock_atimers): + * callproc.c (block_child_signal, unblock_child_signal): + * keyboard.c (handle_interrupt): + * sound.c (vox_configure, vox_close): + Restore the old signal mask rather than unilaterally clearing bits + from the mask, in case a handler is running within another + handler. All callers changed. + * lisp.h, process.c, process.h, term.c: + Adjust decls and callers to match new API. + * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE; + signal handlers aren't supposed to use floating point anyway. + (handle_arith_signal): Unblock just SIGFPE rather than clearing mask. + +2014-03-23 Daniel Colascione + + Split gc_sweep into discrete functions for legibility and better + stack traces. + + * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE + (sweep_vectors): Fix typo in comment. + (sweep_conses, sweep_floats, sweep_intervals) + (sweep_symbols, sweep_misc, sweep_buffers): New functions. + (gc_sweep): Call new functions, to which existing functionality is + moved. + * fns.c (sweep_weak_hash_tables): Add NO_INLINE. + +2014-03-23 Juanma Barranquero + + * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin. + +2014-03-23 Daniel Colascione + + * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC + only if xic_style calls for it. This change allows Emacs to work + with ibus. Also, don't leak resources if create_frame_xic fails, + and stop caching xic_style across different displays. + (supported_xim_styles): Make const. + (best_xim_style): Remove first parameter: it's always just + supported_xim_styles. Change to look at supported_xim_styles + directly. + +2014-03-23 Daniel Colascione + + * term.c (init_tty): Rearrange condition for clarity; print + appropriate diagnostic. 2014-03-23 Daniel Colascione * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address array. (ASAN caught.) +2014-03-22 Glenn Morris + + * callproc.c (init_callproc): In etc, look for NEWS rather than GNU. + +2014-03-22 Daniel Colascione + + * process.c (conv_sockaddr_to_lisp): When extracting the string + names of AF_LOCAL sockets, stop before reading uninitialized memory. + 2014-03-21 YAMAMOTO Mitsuharu Fix regression introduced by patch for Bug#10500. @@ -832,6 +3694,33 @@ constrain frame size in SW_SHOWMAXIMIZED case so we can truly maximize a frame for odd default fonts. +2014-03-21 Glenn Morris + + * minibuf.c (history-length): Increase default from 30 to 100. + +2014-03-21 Daniel Colascione + + * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk + every time we switch to minibuffer. + + * alloc.c (lisp_align_malloc, allocate_string_data) + (allocate_vectorlike): Allow mmap allocation of lisp objects. + (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions. + +2014-03-21 Eli Zaretskii + + * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to + support more "verbs". + +2014-03-21 Daniel Colascione + + Always prohibit dumping a dumped Emacs. + + * emacs.c (might_dump): New variable. + (Fdump_emacs): Always prohibit dumping of dumped Emacs. + * lisp.h (might_dump): Declare. + * unexcw.c (unexec): Remove now-redundant multiple-dump detection code. + 2014-03-20 Paul Eggert * doc.c (store_function_docstring): Fix pointer signedness mismatch.