aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into concurrency-libtaskPhilipp Stephani2016-10-3022-242/+637
|\
| * Speed up initialization by preferring /dev/urandom to GnuTLSDaniel Colascione2016-10-291-18/+26
| | | | | | | | * src/sysdep.c (init_random): Try /dev/urandom before GnuTLS.
| * Avoid errors in posn-at-point for large imagesEli Zaretskii2016-10-291-0/+8
| | | | | | | | | | | | | | | | * src/keyboard.c (Fposn_at_point): If pos-visible-in-window-p returns a 6-member list for a partially visible glyph, pass the sum of Y and RTOP to posn-at-x-y, since that's where the visible portion of that glyph begins on display. (Bug#24804) (Bug#21832) (Bug#23809)
| * Unbreak MS-Windows buildEli Zaretskii2016-10-292-8/+8
| | | | | | | | | | | | | | | | | | | | | | * src/w32term.c (XCreateGC): Second argument is now HWND, and its name is "wignore". (x_set_cursor_gc, x_set_mouse_face_gc) (x_draw_glyph_string_background, x_draw_glyph_string_bg_rect) (x_draw_image_glyph_string, x_draw_stretch_glyph_string): Don't use s->window, which doesn't exist anymore. * src/w32term.h (XCreateGC): Adjust prototype.
| * Add double-buffering support to reduce flickerDaniel Colascione2016-10-2818-216/+595
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (struct glyph_string): Remove window member (block_buffer_flips, unblock_buffer_flips) (buffer_flipping_blocked_p): Declare. * src/xterm.h (struct x_display_info): New member supports_xdbe. (struct x_output): New members draw_desc and need_buffer_flip. (FRAME_X_DRAWABLE, FRAME_X_RAW_DRAWABLE) (FRAME_X_DOUBLE_BUFFERED_P) (FRAME_X_NEED_BUFFER_FLIP): New macros. (set_up_x_back_buffer, tear_down_x_back_buffer) (initial_set_up_x_back_buffer): Declare. * src/xterm.c: Include Xdbe.h. (x_begin_cr_clip, x_fill_rectangle, x_draw_rectangle) (x_draw_vertical_window_border, x_update_end) (x_setup_relief_color, x_draw_relief_rect) (x_draw_fringe_bitmap, x_shift_glyphs_for_insert) (x_scroll_run, x_draw_hollow_cursor, x_draw_bar_cursor): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local variables appropriately; substitute calls to XClearArea with x_clear_area, which DTRT for double buffering. (x_clear_window, x_clear_area): In double-buffering mode, use rect-drawing X functions instead of XClearWindow and XClearArea, which always operate on the front buffer. (show_back_buffer): New function. (XTframe_up_to_date): Call show_back_buffer when done. (x_clear_frame, x_clear_frame_area): Remove obsolete calls to gtk_widget_queue_draw to refresh scroll bars; scroll bars are now independent X windows. (handle_one_xevent): Call font_drop_xrender_surfaces when XftDraw might need regenerating; perform buffer flip when responding to Expose events; issue front-buffer clearing commands as stopgap while we wait for redisplay. Call flush_dirty_back_buffers. (x_make_frame_visible): Un-bitrot comment; move XSETFRAME earlier in function. (x_free_frame_resources): Call tear_down_x_back_buffer when destroying frame. (x_term_init): Attempt to initialize double buffer extension. (x_flip_and_flush): New function. (x_redisplay_interface): Point to x_flip_and_flush instead of x_flip directly. (flush_dirty_back_buffers): New function. (x_create_terminal): Register buffer_flipping_unblocked_hook. * src/xftfont.c (xftfont_drop_xrender_surfaces): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW. (xftfont_draw): Call x_mark_frame_dirty. (xftfont_drop_xrender_surfaces): New function. (syms_of_xftfont): Register it. * src/xfont.c (xfont_draw): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW. * src/xfns.c: Include Xdbe.h. (x_set_inhibit_double_buffering, set_up_x_back_buffer) (Fx_double_buffered_p): New functions. (x_window): Call initial_set_up_x_back_buffer. (x_make_gc): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW. (Fx_create_frame): Configure `inhibit-double-buffering' frame parameter. (x_create_tip_frame): Call initial_set_up_x_back_buffer. (x_frame_parm_handlers): Register x_set_inhibit_double_buffering. (syms_of_xfns): Register Sx_double_buffered_p. (x_mark_frame_dirty): Define. * src/xfaces.c (x_create_gc): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW. * src/xdisp.c (remember_mouse_glyph, init_glyph_string): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW. (redisplay_internal): Restart redisplay if a frame is garbaged during updating; explain why. Block buffer flips during redisplay. (redisplay_preserve_echo_area): Block buffer flip during call to redisplay_internal. (buffer_flip_blocked_depth): New variable. (block_buffer_flips, unblock_buffer_flips) (buffer_flipping_blocked_p): New functions. (init_glyph_string): Stop setting window member of struct glyph_string. * src/w32fns.c (w32_frame_parm_handlers): Add placeholder for x_set_inhibit_double_buffering. * src/termhooks.h (struct terminal): Add buffer_flipping_unblocked_hook. * src/nsfns.m (ns_frame_parm_handlers): Add placeholder for x_set_inhibit_double_buffering. * src/image.c (x_create_bitmap_from_data) (x_create_bitmap_from_file, x_create_x_image_and_pixmap) (Create_Pixmap_From_Bitmap_Data) (x_create_bitmap_from_xpm_data, xpm_load, gs_load): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW; rename local variables appropriately. * src/gtkutil.c: Include Xdbe.h. (xg_get_widget_from_map): Forward declare. (xg_clear_under_internal_border): Remove obsolete calls to refresh scroll bars. (xg_create_frame_widgets): Call initial_set_up_x_back_buffer. (xg_free_frame_widgets): Call tear_down_x_back_buffer; reset FRAME_X_DRAWABLE as well as FRAME_X_WINDOW and for the same reason. (xg_set_background_color): Set scroll bar background colors. (xg_finish_scroll_bar_creation): New function with common logic of xg_create_scroll_bar, xg_create_horizontal_scroll_bar. Force scroll bars to be real X11 windows. (xg_create_scroll_bar, xg_create_horizontal_scroll_bar): Call xg_finish_scroll_bar_creation. (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Remove obsolete calls to refresh scroll bars; fix comments. * src/ftxfont.c (ftxfont_get_gcs, ftxfont_draw_bitmap, (ftxfont_draw_background): Use FRAME_X_DRAWABLE instead of FRAME_X_WINDOW. * src/frame.c (frame_parms): Add table entry for new `inhibit-double-buffering' frame parameter (syms_of_frame): Register Qinhibit_double_buffering. * src/font.h (struct font_driver): Add new `flush_frame_caches' hook. (font_drop_xrender_surfaces): Declare. * src/font.c (font_drop_xrender_surfaces): New function. * src/Makefile.in (XDBE_LIBS, XDBE_CFLAGS): Substitute. * etc/NEWS: Mention use of double buffering * doc/lispref/frames.texi (Management Parameters): Document `inhibit-double-buffering' frame parameters. (Visibility of Frames): Document `x-double-buffered-p'. * configure.ac: Check for the X double buffer extension
* | Merge branch 'master' into concurrency-libtaskPhilipp Stephani2016-10-281-1/+1
|\ \ | |/
| * ; Spelling fixPaul Eggert2016-10-271-1/+1
| |
* | Revert change in fd_handler.Philipp Stephani2016-10-261-2/+2
| | | | | | | | | | Crashes Emacs on macOS and shouldn’t be needed anyway as fd_handler runs in a background thread.
* | Fix format specifiersPhilipp Stephani2016-10-261-4/+4
| |
* | Add missing defsubrPhilipp Stephani2016-10-261-0/+1
| |
* | Transfer signals to main coroutinePhilipp Stephani2016-10-263-0/+69
| |
* | Remove wrong assertionPhilipp Stephani2016-10-261-1/+0
| | | | | | | | It’s totally fine to free a channel that still buffers something.
* | malloc is redefined by config.hPhilipp Stephani2016-10-261-1/+1
| | | | | | | | But we need to define emacs as preprocessor symbol, not just EMACS.
* | WIP: CSP based on libtaskPhilipp Stephani2016-10-2614-27/+632
|/
* * src/xwidget.c (webkit_js_to_lisp): Now static.Paul Eggert2016-10-251-1/+1
|
* Implement zoom for WebKit widget.Ricardo Wurmus2016-10-251-0/+20
| | | | | | | * src/xwidget.c (xwidget-webkit-zoom): New procedure. * lisp/xwidget.el: Bind "+" and "-" to zoom in and out, respectively. (xwidget-webkit-zoom): Declare procedure. (xwidget-webkit-zoom-in, xwidget-webkit-zoom-out): New procedures.
* xwidget: Remove title hack.Ricardo Wurmus2016-10-251-22/+0
| | | | | | * src/xwidget.c (xwidget-webkit-get-title): Remove procedure. * lisp/xwidget.el (xwidget-webkit-get-title, xwidget-webkit-execute-script-rv): Remove procedures.
* Remove scrolled window container around WebKit widgetRicardo Wurmus2016-10-252-63/+4
| | | | | | | | | | | | | | The WebKit widget can scroll on its own and does not need to wrapped with a scrolled window container. * src/xwidget.h: Remove struct member widgetscrolledwindow_osr. * src/xwidget.c: Remove widgetscrolledwindow_osr. (xwidget-set-adjustment): Remove. (xwidget-resize): Resize Webkit widget last. * lisp/xwidget.el (xwidget-set-adjustment): Remove. (xwidget-webkit-scroll-up, xwidget-webkit-scroll-down, xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward): Implement scrolling via JavaScript.
* xwidget: Pass JavaScript return value to optional callback procedureRicardo Wurmus2016-10-251-7/+158
| | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-execute-script): Accept optional callback argument. (xwidget-webkit-callback): Handle "javascript-callback" event type. * src/xwidget.c (xwidget-webkit-execute-script): Accept optional argument FUN, a Lisp procedure to execute on the JavaScript return value. (store_xwidget_js_callback_event, webkit_javascript_finished_cb, webkit_js_to_lisp): New procedures.
* xwidget: Use WebKit2 APIRicardo Wurmus2016-10-251-106/+80
| | | | | | | * configure.ac: Check for webkit2gtk-4.0. * src/xwidget.c: Adjust to use WebKit2 API. * lisp/xwidget.el (xwidget-webkit-callback): Adjust matches for `xwidget-event-type'.
* Merge from origin/emacs-25Paul Eggert2016-10-251-3/+15
|\ | | | | | | | | | | 96ac0c3 Yet another fix for using pointers into buffer text 1047496 Another fix for using pointer to buffer text 3121992 Fix Bug#24478
| * Yet another fix for using pointers into buffer textEli Zaretskii2016-10-241-1/+8
| | | | | | | | | | * src/search.c (boyer_moore): Update pointers to buffer text after call to set_search_regs. (Bug#24358)
| * Another fix for using pointer to buffer textEli Zaretskii2016-10-241-2/+7
| | | | | | | | | | | | * src/search.c (Freplace_match): Move the call to BYTE_POS_ADDR after the call to xpalloc, to avoid the danger of buffer text relocation after its address was taken. (Bug#24358)
| * Port --enable-gcc-warnings to bleeding-edge glibcPaul Eggert2016-10-231-7/+6
| | | | | | | | | | | | | | | | | | | | | | Bleeding-edge glibc sets emacs_cv_var_doug_lea_malloc to 'no'. Do not merge to master. * configure.ac: Check for valloc decl when compiling gmalloc.c. * src/gmalloc.c (emacs_abort) [emacs]: Adjust decl to match what is in lisp.h. Remove duplicate decl. (aligned_alloc): #undef before defining. (aligned_alloc, memalign) [!MSDOS]: Declare. (valloc) [HAVE_DECL_VALLOC]: Remove duplicate decl.
* | Merge from origin/emacs-25Paul Eggert2016-10-253-6/+21
|\ \ | |/ | | | | | | | | | | ee04aed Fix handling of buffer relocation in regex.c functions 71ca4f6 Avoid relocating buffers while libxml2 reads its text 1b3fc8a ; Remove redundant code in gmalloc.c 9afea93 Attempt to catch reads from a buffer that is relocated
| * Fix handling of buffer relocation in regex.c functionsEli Zaretskii2016-10-231-0/+4
| | | | | | | | | | * src/search.c (search_buffer): Updated the base pointer to buffer text after the call to re_search_2. (Bug#24358)
| * Avoid relocating buffers while libxml2 reads its textEli Zaretskii2016-10-231-0/+8
| | | | | | | | | | * src/xml.c (parse_region) [REL_ALLOC]: Freeze the ralloc arena while libxml2 reads the current buffer's text. (Bug#24764)
| * ; Remove redundant code in gmalloc.cEli Zaretskii2016-10-231-4/+0
| | | | | | | | | | * src/gmalloc.c [WINDOWSNT]: Remove MS-Windows only inclusion of w32heap.h, as the MS-Windows build no longer uses gmalloc.c.
| * Attempt to catch reads from a buffer that is relocatedEli Zaretskii2016-10-231-2/+9
| | | | | | | | | | * src/xml.c (parse_region): Add assertion to ensure buffer text is not relocated while libxml2 is reading it. (Bug#24764)
* | * src/regex.c (re_search_2): Use UNINIT, not IF_LINT.Paul Eggert2016-10-231-2/+2
| | | | | | | | | | This finishes the merge of the recent emacs-25 regex changes into master.
* | Merge from origin/emacs-25Paul Eggert2016-10-235-24/+119
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 50fa7d6 ;* src/w32heap.c: Fix typo and wording of the comments. 6f1325e electric-quote mode no longer worries about coding c2a1792 * src/regex.c (re_search_2): Make new code safe for -Wjump-mi... f6134bb Port to GCC 6.2.1 + --enable-gcc-warnings b2ba630 Explain how to debug emacsclient lisp errors 9da53e2 Let describe-function work for lambda again 5c2da93 Fix kill-line's docstring ad66b3f Fix handling of allocation in regex matching 5a26c9b * lisp/electric.el (electric-quote-mode): Improve doc (Bug#24... 3877c91 vc-region-history: Search just on lines intersecting the region 8988327 Fix documentation of 'alist-get' b6998ea * src/regex.h (re_match_object): Improve commentary. # Conflicts: # etc/NEWS # lisp/help-fns.el
| * ;* src/w32heap.c: Fix typo and wording of the comments.Eli Zaretskii2016-10-231-7/+7
| |
| * * src/regex.c (re_search_2): Make new code safe for -Wjump-misses-init.Paul Eggert2016-10-231-3/+6
| |
| * Port to GCC 6.2.1 + --enable-gcc-warningsPaul Eggert2016-10-221-17/+19
| | | | | | | | | | | | | | * src/regex.c (ENSURE_FAIL_STACK, re_search_2): Redo recent regex changes to avoid complaints from GCC 6.2.1 when Emacs is configured with --enable-gcc-warnings. Also, work around GCC bug 78081, which was uncovered by this new code.
| * Fix handling of allocation in regex matchingNoam Postavsky2016-10-214-17/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `re_match_2_internal' uses pointers to the lisp objects that it searches. Since it may call malloc when growing the "fail stack", these pointers may be invalidated while searching, resulting in memory curruption (Bug #24358). To fix this, we check the pointer that the lisp object (as specified by re_match_object) points to before and after growing the stack, and update existing pointers accordingly. * src/regex.c (STR_BASE_PTR): New macro. (ENSURE_FAIL_STACK, re_search_2): Use it to convert pointers into offsets before possible malloc call, and back into pointers again afterwards. (POS_AS_IN_BUFFER): Add explanatory comment about punning trick. * src/search.c (search_buffer): Instead of storing search location as pointers, store them as pointers and recompute the corresponding address for each call to `re_search_2'. (string_match_1, fast_string_match_internal, fast_looking_at): * src/dired.c (directory_files_internal): Set `re_match_object' to Qnil after calling `re_search' or `re_match_2'. * src/regex.h (re_match_object): Mention new usage in commentary.
| * * src/regex.h (re_match_object): Improve commentary.Eli Zaretskii2016-10-191-2/+6
| |
| * Fix time-related data types in 2 editfns.c functionsEli Zaretskii2016-10-171-2/+9
| | | | | | | | | | | | | | * src/editfns.c (format_time_string, Fcurrent_time_zone): Pass a pointer to time_t value to emacs_localtime_rz and gmtime_r, instead of relying on struct timespec's tv_sec member to be of compatible type.
* | Merge from origin/emacs-25Paul Eggert2016-10-232-5/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | b73f466 * lisp/cus-start.el (exec-path): Handle nil elements. (Bug#2... 55ebb70 Catch the imenu-unavailable error in sh-mode completion table 993acb5 ; Minor fix for last change in characters.el 30c4bb5 More char-width fixes 4eb4463 Fix char-width-table values for some Emoji 528997d Keep point when switching from and to *terminal* buffer 2130005 * INSTALL: Use correct Emacs release number 25. 10835b1 Avoid crashes due to objects read with the #n=object form 4de671d Improve doc string of 'completion-at-point-functions' ceb46f0 Fix crash in evaluating functions d8374c4 * src/filelock.c (current_lock_owner): Update comment.
| * Avoid crashes due to objects read with the #n=object formEli Zaretskii2016-10-141-1/+12
| | | | | | | | | | | | * src/lread.c (read1): Use Fcons for 'placeholder', not AUTO_CONS, because elements of the list in 'read_objects' cannot be allocated off the stack. (Bug#24640)
| * Fix crash in evaluating functionsPhilipp Stephani2016-10-131-2/+4
| | | | | | | | | | | | | | See Bug#24673 * src/eval.c (funcall_lambda): Fix crash for bogus functions such as (closure).
| * * src/filelock.c (current_lock_owner): Update comment.Paul Eggert2016-10-121-4/+4
| |
| * Port --enable-gcc-warnings to GCC 6.2.1Paul Eggert2016-10-123-25/+33
| | | | | | | | | | | | | | | | | | Backport from master. * src/conf_post.h (GNUC_PREREQ): New macro. * src/keyboard.c: Use it to work around GCC bug 54561. * src/process.c (would_block): New function. (server_accept_connection, wait_reading_process_output, send_process): Use it.
| * Work around Samba bug with ':' in symlink contentsPaul Eggert2016-10-121-13/+22
| | | | | | | | | | | | * src/filelock.c (current_lock_owner): When reading the contents of a lock, treat the UTF-8 for U+F022 as if it were ':' (Bug#24656). Backport from master.
* | Merge from origin/emacs-25Paul Eggert2016-10-232-3/+2
|\ \ | |/ | | | | | | | | 2deb20c Port last_marked change to full-program optimizers 27eb668 Adapt GDB scripts to '--enable-check-lisp-object-type' builds dac64e3 Avoid optimizing out the last_marked[] array
| * Port last_marked change to full-program optimizersPaul Eggert2016-10-121-3/+1
| | | | | | | | * src/alloc.c (last_marked): Now EXTERNALLY_VISIBLE.
| * Adapt GDB scripts to '--enable-check-lisp-object-type' buildsEli Zaretskii2016-10-121-2/+1
| | | | | | | | | | | | | | | | | | | | * etc/emacs-buffer.gdb <$qnil>: New variable. (ybuffer-list, yset-buffer): Use $qnil for comparing against 'nil', as direct comparison with Qnil doesn't work in a build with '--enable-check-lisp-object-type'. * src/.gdbinit: Adapt commands of the temporary breakpoint in init_sys_modes to a build with '--enable-check-lisp-object-type'.
| * Avoid optimizing out the last_marked[] arrayEli Zaretskii2016-10-111-1/+3
| | | | | | | | | | | | * src/alloc.c <last_marked>: No longer 'static', to avoid having it optimized out in optimized builds, which then makes debugging GC problems harder.
* | Avoid infinite hscrolling in redisplayNoam Postavsky2016-10-221-6/+24
| | | | | | | | | | | | * src/xdisp.c (redisplay_internal): Add a counter to avoid horizontal scrolling (e.g., caused by pre-redisplay-functions) triggering infinite redisplay (Bug #24633).
* | On terminal frames ignore minibuffer frame parameter (Bug#24758)Martin Rudalics2016-10-221-0/+4
| | | | | | | | | | * src/frame.c (Fmake_terminal_frame): Don't complain when the caller asks for a deviant minibuffer setting (Bug#24758).
* | New error file-missingPaul Eggert2016-10-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a recently-introduced bug in delete-directory, where the code assumes the C locale when determining whether a file-error corresponds to a missing file (Bug#24714). * doc/lispref/errors.texi (Standard Errors): * doc/lispref/files.texi (Changing Files): * etc/NEWS: Document this. * doc/lispref/loading.texi (How Programs Do Loading): Say "a file-error" rather than "the error file-error" since it might be a file-missing now. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): * lisp/epa-file.el (epa-file--find-file-not-found-function): (epa-file-insert-file-contents, epa-file-write-region): * lisp/ffap.el (find-file-at-point, dired-at-point): * lisp/jka-compr.el (jka-compr-insert-file-contents) (jka-compr-insert-file-contents): * lisp/net/ange-ftp.el (ange-ftp-barf-if-not-directory) (ange-ftp-insert-file-contents, ange-ftp-copy-file-internal): * lisp/progmodes/etags.el (visit-tags-table): * lisp/url/url-handlers.el (url-copy-file): * src/fileio.c (report_file_errno): Signal file-missing if appropriate. * lisp/epa-file.el (epa-file-insert-file-contents): * lisp/jka-compr.el (jka-compr-insert-file-contents): Don't assume file-error is a leaf in the error hierarchy. * lisp/files.el (files--force): * lisp/gnus/nnmaildir.el (nnmaildir--enoent-p): * lisp/jka-compr.el (jka-compr-insert-file-contents): Use file-missing to detect whether the file is missing. * lisp/url/url-handlers.el (url-copy-file): Signal file-already-exists if appropriate. * src/fileio.c (syms_of_fileio): Define file-missing. 2016-10-18 Paul Eggert <eggert@cs.ucla.edu>