summaryrefslogtreecommitdiff
path: root/src
Commit message (Expand)AuthorAgeFilesLines
* * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy....All callers changed. * xterm.c (x_term_init): Use new functionality to avoid two needs to compute a string length. Paul Eggert2014-09-2314-18/+27
* * dispextern.h, xdisp.c (window_box_right_offset): Now static.Paul Eggert2014-09-233-2/+5
* Use known length of a Lisp string to copy it faster....* 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. Dmitry Antipov2014-09-2314-15/+41
* Fix SAFE_ALLOCA to not exhaust the stack when in a loop....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. Paul Eggert2014-09-223-6/+25
* Merge from emacs-24Stefan Monnier2014-09-2211-153/+293
|\
| * On OSX, do not free font-specific data more than once (Bug#18501)....* macfont.m (macfont_close): Release and free font-specific data only if it wasn't previously freed. Dmitry Antipov2014-09-222-13/+24
| * * configure.ac: Increase headerpad_extra to 1000, update the comment...about load commands. * src/unexmacosx.c (dump_it): Improve error message. Fixes: debbugs:18505 David Caldwell2014-09-212-1/+7
| * * src/image.c (imagemagick_load_image): Add delay to imagemagick metadata....(Bug#10747, bug#18334) Juri Linkov2014-09-182-0/+11
| * Clarify the doc strings of mouse-position and set-mouse-position.... src/frame.c (Fmouse_position, Fset_mouse_position): Clarify the units in which the position is measured. (Bug#18493) Eli Zaretskii2014-09-182-6/+10
| * Fix bug #18490 with redisplay of other windows showing a narrowed buffer.... src/xdisp.c (redisplay_internal): Force redisplay of all windows that show a buffer whose narrowing has changed. Eli Zaretskii2014-09-182-0/+11
| * Fix display of hollow-box and hbar cursors on r2L lines.... 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. Eli Zaretskii2014-09-163-4/+31
| * Fix block cursor display in R2L lines.... 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>. Eli Zaretskii2014-09-163-2/+10
| * Prefer ptrdiff_t to int and avoid integer overflows....* 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. Dmitry Antipov2014-09-164-3/+9
| * Always use matched specpdl entry to record call arguments (Bug#18473)....* 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. Dmitry Antipov2014-09-163-34/+40
| * src/dispextern.h: Commentary fix.Eli Zaretskii2014-09-151-1/+3
| * Fix display of R2L lines in partial-width windows.... 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. Eli Zaretskii2014-09-152-13/+57
* | Fix bug #18516 with SIGSEGV in expand-file-name.... 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. Eli Zaretskii2014-09-222-0/+9
* | Avoid extra call to oblookup when interning symbols....* 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. Dmitry Antipov2014-09-225-54/+57
* | Minor improvements to new stack-allocated Lisp objects....* 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. Paul Eggert2014-09-214-26/+79
* | More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS....* 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. Dmitry Antipov2014-09-1812-25/+50
* | Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64....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. Paul Eggert2014-09-172-25/+17
* | Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64....* 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. Paul Eggert2014-09-172-9/+32
* | * unexmacosx.c (copy_data_segment): Port to GCC 4.6+....Fixes: debbugs:9927 Samuel Bronson2014-09-172-0/+26
* | Fix minor problems found by static checking....* 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. Paul Eggert2014-09-175-16/+13
* | Avoid clang-specific warnings....* buffer.c (init_buffer): Shut up -Wself-assign. * process.c (server_accept_connection): Shut up -Wunsequenced. Dmitry Antipov2014-09-173-3/+9
* | * alloc.c (local_vector_init): Remove useless INLINE.Dmitry Antipov2014-09-171-1/+1
* | For symbols, use address as hash code....* src/fns.c (sxhash): For symbols, use address as hash code. Daniel Colascione2014-09-162-4/+5
* | Avoid more integer overflows on string size calculations....* category.c (Fmake_category_set): * xdisp.c (get_overlay_arrow_glyph_row): * w32font.c (intern_font_name): Prefer ptrdiff_t to int. Dmitry Antipov2014-09-164-3/+8
* | If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack....* 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. Dmitry Antipov2014-09-1614-70/+71
* | Support playing on MS-Windows non-ASCII sound files using Unicode APIs.... 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. Eli Zaretskii2014-09-154-56/+130
* | If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack....* 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. Dmitry Antipov2014-09-1519-129/+164
* | Tweak sort docstring...* fns.c (Fsort): Tweak sort docstring. Daniel Colascione2014-09-142-4/+8
* | Merge from emacs-24; up to 2014-07-09T02:04:12Z!rgm@gnu.orgGlenn Morris2014-09-146-31/+117
|\|
| * Fix bug #18420 with deadlocks communicating with subprocess on MS-Windows.... 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. Eli Zaretskii2014-09-142-8/+55
| * Fix expansion and encoding of sound file names on MS-Windows.... 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. Eli Zaretskii2014-09-133-8/+25
| * In Fresize_mini_window_internal set w->total_lines from w->pixel_height (Bug#......* window.c (Fresize_mini_window_internal): Set w->total_lines from w->pixel_height (Bug#18422). Martin Rudalics2014-09-112-2/+7
| * src/xdisp.c (pos_visible_p): Don't assign a boolean value to an int var.Eli Zaretskii2014-09-091-1/+1
| * * nsterm.m (updateFrameSize:, initFrameFromEmacs:)...(toggleFullScreen:): Take frame_resize_pixelwise into account when setting resize increments. Fixes: debbugs:18435 Jan Djärv2014-09-092-7/+16
| * Fix the row number mistakenly reported by pos_visible_p in rare cases.... 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. Eli Zaretskii2014-09-092-6/+16
* | * callproc.c (init_callproc): Fix bug introduced at 2014-09-07....Fixes: debbugs:18474 Jan Djärv2014-09-142-1/+6
* | Prefer ptrdiff_t to int and avoid integer overflows....* 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. Dmitry Antipov2014-09-134-4/+12
* | * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).Detlev Zundel2014-09-122-0/+5
* | Spelling fixes....* lisp/ses.el (ses-file-format-extend-parameter-list): Rename from ses-file-format-extend-paramter-list. All uses changed. * lisp/gnus-cloud.el (gnus-cloud-parse-version-1): Fix misspelling of ":delete". Paul Eggert2014-09-114-5/+5
* | Remove redundant GCPROs around Ffuncall and Fapply calls. This...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. Dmitry Antipov2014-09-113-113/+29
* | * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix...bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE. Dmitry Antipov2014-09-112-3/+8
* | More debugging aids around GCPROs....* lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members. (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7): Minor restyle. If DEBUG_GCPRO, initialize extra fields. Dmitry Antipov2014-09-112-107/+150
* | * lisp.h (make_local_string): Nitpick indent....* print.c (Fprin1_to_string): Remove unused GCPROs. Dmitry Antipov2014-09-113-5/+7
* | Pacify --enable-gcc-warnings when no window system is used....These warnings found that subscript error, so they seem worthwhile. * composite.c (char_composable_p): Simplify a bit. * frame.c (x_set_frame_parameters): Add an IF_LINT. * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS): * window.c (set_window_scroll_bars): Use USE_HORIZONTAL_SCROLL_BARS for simplicity. * frame.h [! USE_HORIZONTAL_SCROLL_BARS]: Ignore -Wsuggest-attribute=const. * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro. (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it. Paul Eggert2014-09-106-30/+45
* | * charset.c (Fget_unused_iso_final_char): Fix subscript error....Use check_iso_charset_parameter instead of doing the checks by hand. (check_iso_charset_parameter): Move up. Check parameters a bit more carefully, and return true for 96-char sets. All callers changed. Paul Eggert2014-09-102-40/+44
* | Simplify lisp.h by removing the __COUNTER__ business....Problem reported by Dmitry Antipov in: http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html * lisp.h (make_local_vector, make_local_string) (build_local_string): Simplify by not bothering with __COUNTER__. The __COUNTER__ business wasn't working properly, and was needed only for hypothetical future expansion anyway. Paul Eggert2014-09-102-30/+32