aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix local_cons etc. to not exhaust the stack when in a loop.Paul Eggert2014-09-241-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported in: http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html * buffer.c (Fother_buffer, other_buffer_safely, init_buffer): * charset.c (load_charset_map_from_file, Ffind_charset_region) (Ffind_charset_string): * chartab.c (uniprop_encode_value_numeric, uniprop_table): * data.c (wrong_range): * editfns.c (Fpropertize, format2): * emacs.c (init_cmdargs, decode_env_path): * fileio.c (auto_save_error): * fns.c (Fyes_or_no_p): * font.c (font_style_to_value, font_parse_xlfd) (font_parse_family_registry, font_delete_unmatched) (font_add_log): * fontset.c (Fset_fontset_font): * frame.c (x_get_arg): * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item) (read_char_minibuf_menu_prompt): * keymap.c (silly_event_symbol_error, describe_vector): * lread.c (load_warn_old_style_backquotes): * menu.c (single_menu_item): * minibuf.c (Fread_buffer): * process.c (status_message, Fformat_network_address) (server_accept_connection): * textprop.c (copy_text_properties): * xdisp.c (Fcurrent_bidi_paragraph_direction): * xfns.c (x_default_scroll_bar_color_parameter): * xfont.c (xfont_open): * xselect.c (x_clipboard_manager_error_1): * xterm.c (x_term_init): Put USE_LOCAL_ALLOCA at the start of the function. * fns.c (maybe_resize_hash_table): Use build_string instead of build_local_string, since we'd otherwise need a conditional USE_LOCAL_ALLOCA here, but this is just debugging output and is not worth the bother of optimization. * font.c (font_delete_unmatched): Remove by-hand code that observed MAX_ALLOCA limit, since it's now done automatically. * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top, since build_local_string needs its sa_alloc. * lisp.h (lisp_word_count): New function. (SAFE_ALLOCA_LISP): Use it. (USE_LOCAL_ALLOCA): New macro. (local_cons, make_local_vector, make_local_string): Observe the MAX_ALLOCA limit. (LISP_STRING_OVERHEAD): New constant. (make_local_string): Use it.
* | Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.Paul Eggert2014-09-241-0/+5
| | | | | | | | | | | | * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX and Solaris and it's likely to work on similar platforms.
* | Avoid signed integer overflow when converting Time to ptrdiff_t.Paul Eggert2014-09-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN): New macros. (position_to_Time, Time_to_position): New functions. (gen_help_event, kbd_buffer_get_event): Use them. * systime.h (Time) [emacs && !HAVE_X_WINDOWS]: Go back to plain 'unsigned long', so that 'Time' is the same for both X and non-X builds; this is less likely to cause surprise. * termhooks.h: Remove compile-time check that Time and ptrdiff_t are the same size; this is no longer required.
* | * keyboard.c (make_lispy_event): Avoid unnecessary testsPaul Eggert2014-09-241-0/+6
| | | | | | | | | | of bit 28 and of whether an unsigned value is negative. This simplifies the code a bit, and pacifies clang 3.4.
* | * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUXDmitry Antipov2014-09-241-0/+3
| | | | | | | | && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
* | * chartab.c (uniprop_encode_value_numeric):Dmitry Antipov2014-09-241-0/+5
| | | | | | | | | | | | * font.c (font_style_to_value): Use make_local_vector. (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA. * keymap.c (append_key): Use scoped_list1.
* | Fix fallout on MinGW64 from the previous commit.Eli Zaretskii2014-09-241-0/+13
| | | | | | | | | | | | | | | | | | | | | | src/systime.h (Time): Define as size_t, to be consistent with 64-bit Windows builds, where 'long' is a 32-bit type. src/w32inevt.h (w32_console_mouse_position): Update the argument types to use 'Time'. src/w32term.c (w32_mouse_position) (x_horizontal_scroll_bar_report_motion) (x_scroll_bar_report_motion): Update the argument types to use 'Time'.
* | * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...Dmitry Antipov2014-09-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct input_event): ...unsigned bitfields. Likewise for `event_kind' member. Prefer unsigned for `code' and 'modifiers'. Use `timestamp' for HELP_EVENT position. Add compile-time assert. * keyboard.c (gen_help_event, kbd_buffer_store_help_event) (kbd_buffer_get_event): Adjust users. (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere. (make_scroll_bar_position): New function, refactored out of... (make_lispy_event): ...adjusted user. * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member. * nsterm.m (ns_mouse_position, mouseUp): * term.c (term_mouse_position): * w32inevt.c (w32_console_mouse_position): * w32term.c (w32_mouse_position): * xterm.c (XTmouse_position): Use scroll_bar_above_handle. (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback): Prefer enum and explicit enum members to integers and numeric values.
* | Fix some slow uses and misuses of strcat.Paul Eggert2014-09-231-0/+11
| | | | | | | | | | | | | | | | | | | | * doc.c (get_doc_string): * gtkutil.c (get_utf8_string): * xsmfns.c (x_session_initialize): Avoid recomputation of string length. * ftfont.c (ftfont_spec_pattern): * xfns.c (xic_create_fontsetname): Don't assume output buffer is initially zero.
* | * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.Paul Eggert2014-09-231-0/+5
| | | | | | | | | | | | All callers changed. * xterm.c (x_term_init): Use new functionality to avoid two needs to compute a string length.
* | * dispextern.h, xdisp.c (window_box_right_offset): Now static.Paul Eggert2014-09-231-0/+4
| |
* | Use known length of a Lisp string to copy it faster.Dmitry Antipov2014-09-231-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp.h (lispstrcpy): New function. Add comment. * callproc.c (child_setup): * dbusbind.c (xd_append_arg): * doc.c (get_doc_string): * font.c (Ffont_xlfd_name): * frame.c (xrdb_get_resource): * process.c (Fmake_network_process, network_interface_info): * w32fns.c (Fx_open_connection): * w32proc.c (sys_spawnve): * xfns.c (select_visual): * xfont.c (xfont_list): * xsmfns.c (x_session_initialize): * xterm.c (x_term_init): Use it.
* | Fix SAFE_ALLOCA to not exhaust the stack when in a loop.Paul Eggert2014-09-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Dmietry Antipov in thread leading to: http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP; the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS remain unfixed. * callproc.c (call_process): Save and restore sa_avail. * lisp.h (USE_SAFE_ALLOCA): Define sa_avail. (AVAIL_ALLOCA): New macro. (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP): Use it, and check against sa_avail rather than MAX_ALLOCA.
* | Merge from emacs-24Stefan Monnier2014-09-221-79/+151
|\ \ | |/
| * On OSX, do not free font-specific data more than once (Bug#18501).Dmitry Antipov2014-09-221-0/+6
| | | | | | | | | | * macfont.m (macfont_close): Release and free font-specific data only if it wasn't previously freed.
| * * configure.ac: Increase headerpad_extra to 1000, update the commentDavid Caldwell2014-09-211-0/+4
| | | | | | | | | | | | | | | | about load commands. * src/unexmacosx.c (dump_it): Improve error message. Fixes: debbugs:18505
| * * src/image.c (imagemagick_load_image): Add delay to imagemagick metadata.Juri Linkov2014-09-181-0/+5
| | | | | | | | (Bug#10747, bug#18334)
| * Clarify the doc strings of mouse-position and set-mouse-position.Eli Zaretskii2014-09-181-0/+3
| | | | | | | | | | src/frame.c (Fmouse_position, Fset_mouse_position): Clarify the units in which the position is measured. (Bug#18493)
| * Fix bug #18490 with redisplay of other windows showing a narrowed buffer.Eli Zaretskii2014-09-181-0/+5
| | | | | | | | | | src/xdisp.c (redisplay_internal): Force redisplay of all windows that show a buffer whose narrowing has changed.
| * Fix display of hollow-box and hbar cursors on r2L lines.Eli Zaretskii2014-09-161-0/+6
| | | | | | | | | | | | | | | | src/xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor): src/w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L lines, draw the hollow-box and hbar cursors on the right side of cursor-glyph. Thanks to Martin Rudalics <rudalics@gmx.at> for testing on X.
| * Fix block cursor display in R2L lines.Eli Zaretskii2014-09-161-0/+8
| | | | | | | | | | | | | | | | src/xterm.c (x_draw_stretch_glyph_string): src/w32term.c (x_draw_stretch_glyph_string): Fix a thinko that caused the block cursor to disappear on a TAB in R2L lines in every window except the leftmost one. Reported by Martin Rudalics <rudalics@gmx.at>.
| * Prefer ptrdiff_t to int and avoid integer overflows.Dmitry Antipov2014-09-161-0/+6
| | | | | | | | | | | | | | * fileio.c (make_temp_name): * font.c (font_parse_family_registry): Avoid integer overflow on string size calculation. * data.c (Faset): Likewise for byte index.
| * Always use matched specpdl entry to record call arguments (Bug#18473).Dmitry Antipov2014-09-161-0/+11
| | | | | | | | | | | | | | | | | | | | * lisp.h (record_in_backtrace): Adjust prototype. * eval.c (record_in_backtrace): Return current specpdl level. (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users. (eval_sub, Ffuncall): Record call arguments in matched specpdl entry and use that entry in call to backtrace_debug_on_exit. (apply_lambda): Likewise. Get current specpdl level as 3rd arg. (do_debug_on_call): Get current specpdl level as 2nd arg.
| * Fix display of R2L lines in partial-width windows.Eli Zaretskii2014-09-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | src/xdisp.c (init_iterator): Don't use it->bidi_p before it is assigned the correct value. (extend_face_to_end_of_line): Account for truncation and continuation glyphs in R2L rows when one of the fringes is not displayed. (display_line): Don't assign negative X offset to a row if we are going to produce a truncation glyph for it. When handling truncated R2L rows, consider the width of the left fringe instead of the right one. (produce_special_glyphs): Fix bogus assignments.
* | Fix bug #18516 with SIGSEGV in expand-file-name.Eli Zaretskii2014-09-221-0/+6
| | | | | | | | | | | | src/fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is always set to a valid value. Make sure the size passed to alloca is always positive.
* | Avoid extra call to oblookup when interning symbols.Dmitry Antipov2014-09-221-0/+9
| | | | | | | | | | | | | | | | * lisp.h (intern_driver): Add prototype. * lread.c (intern_driver): New function. (intern1, intern_c_string_1, Fintern): * font.c (font_intern_prop): * w32font.c (intern_font_name): Use it.
* | Minor improvements to new stack-allocated Lisp objects.Paul Eggert2014-09-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | * frame.h (FRAME_PARAMETER): Prefer scoped_list1 to local_list1 where either would do. * lisp.h (scoped_list4): New macro. (local_cons, local_list1, local_list2, local_list3, local_list4) (make_local_vector, make_local_string, build_local_string): Prefer functions to macros where either would do. * xdisp.c (build_desired_tool_bar_string): Prefer scoped_list4 to local_list4 where either would do.
* | More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.Dmitry Antipov2014-09-181-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro. [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4. * frame.h (FRAME_PARAMETER): New macro. * dispnew.c (init_display): * fontset.c (Fset_fontset_font): * frame.c (x_default_parameter): * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face): * xfns.c (x_default_scroll_bar_color_parameter) (x_default_font_parameter, x_create_tip_frame): Use it. * editfns.c (Fpropertize): Use local_cons. * process.c (status_message): Use build_local_string. * xfont.c (xfont_open): Use make_local_string. * xdisp.c (build_desired_tool_bar_string): Use local_list4.
* | Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.Paul Eggert2014-09-171-3/+3
| | | | | | | | | | | | | | Revert previous lisp.h change, and install the following instead. * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ && !__clang__. This works with GCC and with clang and is safer for compilers we don't know about.
* | Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.Paul Eggert2014-09-171-0/+8
| | | | | | | | | | | | | | * lisp.h (ALLOCA_FIXUP): New constant. (LOCAL_ALLOCA): New macro. (local_cons, make_local_vector, make_local_string): Use them. (local_cons): Rename parameter to make capture less likely.
* | * unexmacosx.c (copy_data_segment): Port to GCC 4.6+.Samuel Bronson2014-09-171-0/+4
| | | | | | | | Fixes: debbugs:9927
* | Fix minor problems found by static checking.Paul Eggert2014-09-171-0/+8
| | | | | | | | | | | | | | * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj): Remove; now unused. * buffer.h (decode_buffer): Doc and indentation fixes. * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
* | Avoid clang-specific warnings.Dmitry Antipov2014-09-171-0/+6
| | | | | | | | | | * buffer.c (init_buffer): Shut up -Wself-assign. * process.c (server_accept_connection): Shut up -Wunsequenced.
* | For symbols, use address as hash code.Daniel Colascione2014-09-161-0/+4
| | | | | | | | * src/fns.c (sxhash): For symbols, use address as hash code.
* | Avoid more integer overflows on string size calculations.Dmitry Antipov2014-09-161-0/+5
| | | | | | | | | | | | * category.c (Fmake_category_set): * xdisp.c (get_overlay_arrow_glyph_row): * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
* | If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.Dmitry Antipov2014-09-161-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * charset.c (load_charset_map_from_file): Use scoped_list2 and build_local_string. * buffer.c (Fother_buffer, other_buffer_safely, init_buffer): * emacs.c (init_cmdargs, decode_env_path): * fileio.c (Fexpand_file_name): * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]: * frame.c (x_get_arg): * keyboard.c (safe_run_hooks_error): * lread.c (load_warn_old_style_backquotes): * xdisp.c (Fcurrent_bidi_paragraph_direction): * xfns.c (x_default_scroll_bar_color_parameter, select_visual): * xselect.c (x_clipboard_manager_error_1) (x_clipboard_manager_save_all): * xterm.c (x_term_init): Use build_local_string.
* | Support playing on MS-Windows non-ASCII sound files using Unicode APIs.Eli Zaretskii2014-09-151-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/sound.c [WINDOWSNT]: Include w32common.h and mbstring.h. (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the error message format. Use message_with_string to have non-ASCII file names properly displayed. (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files when w32-unicode-filenames is non-nil, but not on Windows 9X, where these APIs are not available even in UNICOWS.DLL. Improve the format of error messages and include the file name in them where appropriate. (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch call play-sound-functions, per documentation. src/w32.c (w32_get_long_filename, w32_get_short_filename): Constify the input file name arguments. src/w32.h (w32_get_long_filename, w32_get_short_filename): Update prototypes.
* | If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.Dmitry Antipov2014-09-151-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp.h (local_cons, local_list1, local_list2, local_list3) [USE_LOCAL_ALLOCATORS]: New macros. [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions. (build_local_string): Avoid argument name expansion clash with make_local_string. * alloc.c (toplevel) [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]: Preprocessor guard to avoid impossible configuration. * charset.c (Ffind_charset_region, Ffind_charset_string): Use make_local_vector. * lread.c (read1, substitute_object_recurse): Use scoped_cons. * textprop.c (Fput_text_property, Fadd_face_text_property): Use scoped_list2. (copy_text_properties): Use local_cons and local_list3. * chartab.c (uniprop_table): * data.c (wrong_choice, wrong_range): * doc.c (get_doc_string): * editfns.c (format2): * fileio.c (Fexpand_file_name, auto_save_error): * fns.c (Fyes_or_no_p): * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log): * fontset.c (Fset_fontset_font): * keyboard.c (echo_add_key, echo_dash, parse_menu_item) (read_char_minibuf_menu_prompt): * keymap.c (silly_event_symbol_error, describe_vector): * menu.c (single_menu_item): * minibuf.c (Fread_buffer): * process.c (status_message, Fformat_network_address) (server_accept_connection): Use make_local_string and build_local_string. Prefer compound literals where appropriate.
* | Tweak sort docstringDaniel Colascione2014-09-141-0/+4
| | | | | | | | * fns.c (Fsort): Tweak sort docstring.
* | Merge from emacs-24; up to 2014-07-09T02:04:12Z!rgm@gnu.orgGlenn Morris2014-09-141-0/+37
|\ \ | |/
| * Fix bug #18420 with deadlocks communicating with subprocess on MS-Windows.Eli Zaretskii2014-09-141-0/+9
| | | | | | | | | | | | | | | | | | src/w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes. (sys_write): When a write to a non-blocking pipe returns ENOSPC, set errno to EAGAIN instead, to allow the caller to retry the write after some waiting. Fixes deadlocks when Emacs exchanges a lot of data through the pipe.
| * Fix expansion and encoding of sound file names on MS-Windows.Eli Zaretskii2014-09-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | src/sound.c (Fplay_sound_internal): Encode the sound file name in the ANSI codepage. Expand it against data-directory, as per docs, not against the current directory. No need to make a local copy of the file name; pass the encoded file name directly to do_play_sound. (Bug#18463) src/w32.c (ansi_encode_filename): If w32_get_short_filename returns NULL, and the file name is not encodable in ANSI codepage, return the string with "?" replacement characters, which will fail the caller. This avoids returning a random value in that case.
| * In Fresize_mini_window_internal set w->total_lines from w->pixel_height ↵Martin Rudalics2014-09-111-0/+5
| | | | | | | | | | | | | | (Bug#18422). * window.c (Fresize_mini_window_internal): Set w->total_lines from w->pixel_height (Bug#18422).
| * * nsterm.m (updateFrameSize:, initFrameFromEmacs:)Jan Djärv2014-09-091-0/+6
| | | | | | | | | | | | | | (toggleFullScreen:): Take frame_resize_pixelwise into account when setting resize increments. Fixes: debbugs:18435
| * Fix the row number mistakenly reported by pos_visible_p in rare cases.Eli Zaretskii2014-09-091-0/+7
| | | | | | | | | | | | | | src/xdisp.c (pos_visible_p): Properly save and restore the iterator state around the call to line_bottom, since it can move the iterator to another screen line. This fixes off-by-one errors in the reported row in some rare cases.
* | * callproc.c (init_callproc): Fix bug introduced at 2014-09-07.Jan Djärv2014-09-141-0/+5
| | | | | | | | Fixes: debbugs:18474
* | Prefer ptrdiff_t to int and avoid integer overflows.Dmitry Antipov2014-09-131-1/+9
| | | | | | | | | | | | | | * fileio.c (make_temp_name): * font.c (font_parse_family_registry): Avoid integer overflow on string size calculation. * data.c (Faset): Likewise for byte index.
* | * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).Detlev Zundel2014-09-121-0/+4
| |
* | Remove redundant GCPROs around Ffuncall and Fapply calls. ThisDmitry Antipov2014-09-111-0/+7
| | | | | | | | | | | | | | | | is safe because Ffuncall protects all of its arguments by itself. * charset.c (map_charset_for_dump): Remove redundant GCPRO. * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5) (call6, call7): Likewise. Use compound literals where applicable. (run_hook_with_args_2): Use compound literal.
* | * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fixDmitry Antipov2014-09-111-0/+3
| | | | | | | | bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.