]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years agoAdd missing taskexit() concurrency-libtask
Philipp Stephani [Sun, 30 Oct 2016 21:06:50 +0000 (22:06 +0100)]
Add missing taskexit()

8 years agoFix pthread implementation
Philipp Stephani [Sun, 30 Oct 2016 19:46:23 +0000 (20:46 +0100)]
Fix pthread implementation

8 years agoMerge remote-tracking branch 'origin/master' into concurrency-libtask
Philipp Stephani [Sun, 30 Oct 2016 17:29:45 +0000 (18:29 +0100)]
Merge remote-tracking branch 'origin/master' into concurrency-libtask

8 years agoFix typo
Philipp Stephani [Sun, 30 Oct 2016 17:27:53 +0000 (18:27 +0100)]
Fix typo

8 years agoSpeed up initialization by preferring /dev/urandom to GnuTLS
Daniel Colascione [Thu, 6 Oct 2016 19:46:36 +0000 (12:46 -0700)]
Speed up initialization by preferring /dev/urandom to GnuTLS

* src/sysdep.c (init_random): Try /dev/urandom before GnuTLS.

8 years agoQuote file names in dired compression commands
José L. Doménech [Sun, 30 Oct 2016 01:18:31 +0000 (21:18 -0400)]
Quote file names in dired compression commands

* lisp/dired-aux.el (dired-do-compress-to): Change the string
used as shell command for compression by quoting the filenames
used for input and output (Bug #24620).

8 years agoAvoid errors in posn-at-point for large images
Eli Zaretskii [Sat, 29 Oct 2016 14:39:54 +0000 (17:39 +0300)]
Avoid errors in posn-at-point for large images

* 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)

8 years agoUnbreak MS-Windows build
Eli Zaretskii [Sat, 29 Oct 2016 07:40:38 +0000 (10:40 +0300)]
Unbreak MS-Windows build

* 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.

8 years agoAdd double-buffering support to reduce flicker
Daniel Colascione [Fri, 21 Oct 2016 03:34:36 +0000 (20:34 -0700)]
Add double-buffering support to reduce flicker

* 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

8 years agoImprove result of `auth-source-search' in Tramp
Michael Albinus [Fri, 28 Oct 2016 15:08:14 +0000 (17:08 +0200)]
Improve result of `auth-source-search' in Tramp

* lisp/net/tramp.el (tramp-read-passwd): Require :secret and
:user in result of `auth-source-search'.

8 years agoMerge branch 'master' into concurrency-libtask
Philipp Stephani [Thu, 27 Oct 2016 22:04:17 +0000 (00:04 +0200)]
Merge branch 'master' into concurrency-libtask

8 years agoSupport for context switching using pthreads
Philipp Stephani [Thu, 27 Oct 2016 21:14:19 +0000 (23:14 +0200)]
Support for context switching using pthreads

Experimental, doesn’t work yet

8 years agoFix avl-tree alias docstrings
Mark Oteiza [Thu, 27 Oct 2016 15:32:28 +0000 (11:32 -0400)]
Fix avl-tree alias docstrings

* lisp/emacs-lisp/avl-tree.el (avl-tree--node-branch):
(avl-tree-stack-p, avl-tree-create):
(avl-tree-compare-function): Add calling convention to docstrings.

8 years agoUpdate from gnulib
Paul Eggert [Thu, 27 Oct 2016 15:27:13 +0000 (08:27 -0700)]
Update from gnulib

This incorporates:
2016-10-16 qsort_r: Fix macrology for platforms that lack the function.
2016-10-13 stdint: port SIZE_MAX to glibc s390
2016-10-11 maint: remove stray space after "." in AC_DEFINE comment.
* lib/gnulib.mk: Regenerate.
* lib/stdlib.in.h, m4/st_dm_mode.m4, m4/stdint.m4, m4/stdlib_h.m4:
* m4/utimes.m4: Copy from gnulib.

8 years agoelectric-quote-chars fixups
Paul Eggert [Thu, 27 Oct 2016 15:05:24 +0000 (08:05 -0700)]
electric-quote-chars fixups

* lisp/electric.el (electric-quote-chars): Check types and safety
more carefully.
(electric-quote-post-self-insert-function): Use more-mnemonic locals.
Omit no-longer-necessary runtime error diagnostic.

8 years agoNew user variable 'electric-quote-chars'
Göktuğ Kayaalp [Thu, 27 Oct 2016 15:05:24 +0000 (08:05 -0700)]
New user variable 'electric-quote-chars'

* doc/emacs/text.texi (Quotation Marks), etc/NEWS: Document this.
* lisp/electric.el (electric-quote-chars): New defcustom.
(electric-quote-post-self-insert-function): Use it.

8 years ago; Spelling fix
Paul Eggert [Thu, 27 Oct 2016 15:04:28 +0000 (08:04 -0700)]
; Spelling fix

8 years agoAdd more tests for Bug#24627
Tino Calancha [Thu, 27 Oct 2016 09:06:54 +0000 (18:06 +0900)]
Add more tests for Bug#24627

* test/lisp/thingatpt-tests.el (thing-at-point-bug24627):
Add tests for 'list-at-point'.

8 years agoMerge branch 'concurrency-libtask' of git.sv.gnu.org:/srv/git/emacs into concurrency...
Philipp Stephani [Wed, 26 Oct 2016 21:32:35 +0000 (23:32 +0200)]
Merge branch 'concurrency-libtask' of git.sv.gnu.org:/srv/git/emacs into concurrency-libtask

8 years agoRevert change in fd_handler.
Philipp Stephani [Wed, 26 Oct 2016 21:30:38 +0000 (23:30 +0200)]
Revert change in fd_handler.

Crashes Emacs on macOS and shouldn’t be needed anyway as fd_handler runs
in a background thread.

8 years agoFix format specifiers
Philipp Stephani [Tue, 25 Oct 2016 23:38:41 +0000 (01:38 +0200)]
Fix format specifiers

8 years agoAdd missing defsubr
Philipp Stephani [Tue, 25 Oct 2016 23:38:16 +0000 (01:38 +0200)]
Add missing defsubr

8 years agoTransfer signals to main coroutine
Philipp Stephani [Tue, 25 Oct 2016 21:42:41 +0000 (23:42 +0200)]
Transfer signals to main coroutine

8 years agoRemove wrong assertion
Philipp Stephani [Tue, 25 Oct 2016 21:41:20 +0000 (23:41 +0200)]
Remove wrong assertion

It’s totally fine to free a channel that still buffers something.

8 years agomalloc is redefined by config.h
Philipp Stephani [Tue, 25 Oct 2016 21:40:34 +0000 (23:40 +0200)]
malloc is redefined by config.h

But we need to define emacs as preprocessor symbol, not just EMACS.

8 years agoSupport for Windows fibers
Philipp Stephani [Tue, 25 Oct 2016 21:40:09 +0000 (23:40 +0200)]
Support for Windows fibers

8 years agoWIP: CSP based on libtask
Philipp Stephani [Sat, 22 Oct 2016 16:27:16 +0000 (18:27 +0200)]
WIP: CSP based on libtask

8 years agoClarify the behavior of minor mode commands
Philipp Stephani [Sun, 16 Oct 2016 18:22:24 +0000 (20:22 +0200)]
Clarify the behavior of minor mode commands

See Bug#24706.

* doc/lispref/modes.texi (Minor Mode Conventions): Clarify behavior when
the argument to a minor mode command is not an integer.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Clarify behavior
when ARG is not an integer.
* test/lisp/emacs-lisp/easy-mmode-tests.el: New file with unit tests.

8 years agoRevert change in fd_handler.
Philipp Stephani [Wed, 26 Oct 2016 21:30:38 +0000 (23:30 +0200)]
Revert change in fd_handler.

Crashes Emacs on macOS and shouldn’t be needed anyway as fd_handler runs
in a background thread.

8 years ago* lisp/shell.el (shell--unquote&requote-argument): Match data misuse
Filipp Gunbin [Wed, 26 Oct 2016 18:31:12 +0000 (14:31 -0400)]
* lisp/shell.el (shell--unquote&requote-argument): Match data misuse

* lisp/shell.el (shell--unquote&requote-argument): Fix
off-by-one thinko.  Don't use match data after a failed string-match.

8 years ago* src/xwidget.c (webkit_js_to_lisp): Now static.
Paul Eggert [Wed, 26 Oct 2016 06:04:21 +0000 (23:04 -0700)]
* src/xwidget.c (webkit_js_to_lisp): Now static.

8 years agoxwidget: Map "previous-line" and "next-line" to scroll
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Map "previous-line" and "next-line" to scroll

* lisp/xwidget.el: Map "previous-line" and "next-line" to scrolling
procedures.

8 years agoxwidget: Bind "beginning-of-buffer" and "end-of-buffer"
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Bind "beginning-of-buffer" and "end-of-buffer"

* lisp/xwidget.el: Rebind "beginning-of-buffer" and "end-of-buffer" to
"xwidget-webkit-scroll-top" and "xwidget-webkit-scroll-bottom",
respectively.
(xwidget-webkit-scroll-top,
xwidget-webkit-scroll-bottom): New procedures.

8 years agoImplement zoom for WebKit widget.
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
Implement zoom for WebKit widget.

* 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.

8 years agoDynamically resize WebKit widget.
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
Dynamically resize WebKit widget.

* lisp/xwidget.el (xwidget-webkit-auto-adjust-size,
xwidget-webkit-adjust-size-in-frame): New procedures.
(xwidget-webkit-new-session): Remove hint to resize widget with `a'.
(xwidget-webkit-adjust-size-dispatch): Resize current webkit widget.
(xwidget-webkit-adjust-size-to-window): Make non-interactive,
add widget and window as arguments.
(xwidget-webkit-callback): Use xwidget-webkit-adjust-size-to-window.

8 years agoLet initial WebKit view fill window
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
Let initial WebKit view fill window

* lisp/xwidget.el (xwidget-webkit-new-session): Change default size of
WebKit widget to window size.

8 years agoxwidget: Remove title hack.
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Remove title hack.

* src/xwidget.c (xwidget-webkit-get-title): Remove procedure.
* lisp/xwidget.el (xwidget-webkit-get-title,
xwidget-webkit-execute-script-rv): Remove procedures.

8 years agoxwidget: Get URL asynchronously.
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Get URL asynchronously.

* lisp/xwidget.el (xwidget-webkit-current-url): Kill URL in callback.

8 years agoxwidget: Get selection with asynchronous JavaScript
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Get selection with asynchronous JavaScript

* lisp/xwidget.el (xwidget-webkit-get-selection): Add PROC argument to
process selection.
(xwidget-webkit-copy-selection-as-kill): Kill selection in callback.

8 years agoxwidget: Add function to find element by CSS selector
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Add function to find element by CSS selector

* lisp/xwidget.el (xwidget-webkit-show-element): New procedure.

8 years agoxwidget: Simplify functions to scroll to elements
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Simplify functions to scroll to elements

* lisp/xwidget.el (xwidget-webkit-show-named-element,
xwidget-webkit-show-id-element,
xwidget-webkit-show-id-or-named-element): Simplify functions by
scrolling exclusively with JavaScript.

8 years agoxwidget: Get title via asynchronous JavaScript.
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Get title via asynchronous JavaScript.

* lisp/xwidget.el (xwidget-webkit-callback): Get document title
asynchronously.

8 years agoxwidget: Do not use `xwidget-execute-script-rv' to insert string
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Do not use `xwidget-execute-script-rv' to insert string

* lisp/xwidget.el (xwidget-webkit-insert-string): Obtain JavaScript
return value via callback instead of using
`xwidget-webkit-execute-script-rv'.

8 years agoRemove scrolled window container around WebKit widget
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
Remove scrolled window container around WebKit widget

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.

8 years agoxwidget: Pass JavaScript return value to optional callback procedure
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Pass JavaScript return value to optional callback procedure

* 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.

8 years agoxwidget: Use WebKit2 API
Ricardo Wurmus [Wed, 26 Oct 2016 06:00:35 +0000 (23:00 -0700)]
xwidget: Use WebKit2 API

* 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'.

8 years agoFix format specifiers
Philipp Stephani [Tue, 25 Oct 2016 23:38:41 +0000 (01:38 +0200)]
Fix format specifiers

8 years agoAdd missing defsubr
Philipp Stephani [Tue, 25 Oct 2016 23:38:16 +0000 (01:38 +0200)]
Add missing defsubr

8 years agoTransfer signals to main coroutine
Philipp Stephani [Tue, 25 Oct 2016 21:42:41 +0000 (23:42 +0200)]
Transfer signals to main coroutine

8 years agoRemove wrong assertion
Philipp Stephani [Tue, 25 Oct 2016 21:41:20 +0000 (23:41 +0200)]
Remove wrong assertion

It’s totally fine to free a channel that still buffers something.

8 years agomalloc is redefined by config.h
Philipp Stephani [Tue, 25 Oct 2016 21:40:34 +0000 (23:40 +0200)]
malloc is redefined by config.h

But we need to define emacs as preprocessor symbol, not just EMACS.

8 years agoSupport for Windows fibers
Philipp Stephani [Tue, 25 Oct 2016 21:40:09 +0000 (23:40 +0200)]
Support for Windows fibers

8 years agoWIP: CSP based on libtask
Philipp Stephani [Sat, 22 Oct 2016 16:27:16 +0000 (18:27 +0200)]
WIP: CSP based on libtask

8 years agoClarify the behavior of minor mode commands
Philipp Stephani [Sun, 16 Oct 2016 18:22:24 +0000 (20:22 +0200)]
Clarify the behavior of minor mode commands

See Bug#24706.

* doc/lispref/modes.texi (Minor Mode Conventions): Clarify behavior when
the argument to a minor mode command is not an integer.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Clarify behavior
when ARG is not an integer.
* test/lisp/emacs-lisp/easy-mmode-tests.el: New file with unit tests.

8 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 25 Oct 2016 19:50:31 +0000 (12:50 -0700)]
Merge from origin/emacs-25

4c3f738 Comment for bug#24793

8 years ago; Merge from origin/emacs-25
Paul Eggert [Tue, 25 Oct 2016 19:50:31 +0000 (12:50 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

32827b3 Default REL_ALLOC to 'no'

8 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 25 Oct 2016 19:50:31 +0000 (12:50 -0700)]
Merge from origin/emacs-25

96ac0c3 Yet another fix for using pointers into buffer text
1047496 Another fix for using pointer to buffer text
3121992 Fix Bug#24478

8 years ago; Merge from origin/emacs-25
Paul Eggert [Tue, 25 Oct 2016 19:50:30 +0000 (12:50 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

7bb5c4f Port --enable-gcc-warnings to bleeding-edge glibc

8 years agoMerge from origin/emacs-25
Paul Eggert [Tue, 25 Oct 2016 19:50:30 +0000 (12:50 -0700)]
Merge from origin/emacs-25

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

8 years ago; Merge from origin/emacs-25
Paul Eggert [Tue, 25 Oct 2016 19:50:29 +0000 (12:50 -0700)]
; Merge from origin/emacs-25

The following commits were skipped:

b8e8e15 Revert "* lisp/simple.el (process-menu-mode, list-processes--...
d784e75 Revert "* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):"
1dd7b54 Revert "* lisp/ibuffer.el (ibuffer): Improve 'other-window' c...

8 years agoComment for bug#24793
Eli Zaretskii [Tue, 25 Oct 2016 19:33:14 +0000 (22:33 +0300)]
Comment for bug#24793

* lisp/info.el (Info-mode-font-lock-keywords): Add a comment
explaining why `..' quoting is not fontified using the
'Info-quoted' face.  (Bug#24793)

8 years agoMinor fix in the documentation of seq-random-elt
Nicolas Petton [Tue, 25 Oct 2016 19:28:36 +0000 (21:28 +0200)]
Minor fix in the documentation of seq-random-elt

* doc/lispref/sequences.texi (Sequence Functions): Remove false
  sentence.

8 years agoDefault REL_ALLOC to 'no'
Paul Eggert [Tue, 25 Oct 2016 19:13:20 +0000 (12:13 -0700)]
Default REL_ALLOC to 'no'

This should make ralloc-related bugs less likely on GNU/Linux
systems with bleeding-edge glibc.  See the email thread containing:
http://lists.gnu.org/archive/html/emacs-devel/2016-10/msg00801.html
Do not merge to master.
* configure.ac (REL_ALLOC): Default to 'no' on all platforms, not
merely on platforms with Doug Lea malloc.  Although bleeding-edge
glibc no longer exports __malloc_initialize_hook and so longer
passes the configure-time test for Doug Lea malloc, ralloc tickles
longstanding bugs like Bug#24358 and Bug#24764 and Emacs is likely
to be more reliable without it.  This patch is not needed on
master, which uses hybrid malloc in this situation.

8 years agoMinor copyedits in documentation of 'seq-random-elt'
Eli Zaretskii [Tue, 25 Oct 2016 18:56:16 +0000 (21:56 +0300)]
Minor copyedits in documentation of 'seq-random-elt'

* doc/lispref/sequences.texi (Sequence Functions): Fix markup in
last change.  Use 2 spaces between sentences.

8 years ago* lisp/emacs-lisp/seq.el (seq-random-elt): Fix docstring.
Nicolas Petton [Tue, 25 Oct 2016 15:06:03 +0000 (17:06 +0200)]
* lisp/emacs-lisp/seq.el (seq-random-elt): Fix docstring.

8 years ago; Add missing `require'
Philipp Stephani [Tue, 25 Oct 2016 11:29:17 +0000 (13:29 +0200)]
; Add missing `require'

8 years agoAdd seq-random-elt to seq.el
Damien Cassou [Fri, 21 Oct 2016 05:53:08 +0000 (07:53 +0200)]
Add seq-random-elt to seq.el

* lisp/emacs-lisp/seq.el (seq-random-elt): Add function to return a
  random element from it's sequence parameter.

* test/lisp/emacs-lisp/seq-tests.el (test-seq-random-elt-take-all
  test-seq-random-elt-return-nil): Test the new function

* doc/lispref/sequences.texi: Document the new function

8 years agoYet another fix for using pointers into buffer text
Eli Zaretskii [Mon, 24 Oct 2016 18:37:20 +0000 (21:37 +0300)]
Yet another fix for using pointers into buffer text

* src/search.c (boyer_moore): Update pointers to buffer text
after call to set_search_regs.  (Bug#24358)

8 years ago* configure.ac: Stop using mmap for buffers on Cygwin.
Ken Brown [Mon, 24 Oct 2016 16:41:07 +0000 (12:41 -0400)]
* configure.ac: Stop using mmap for buffers on Cygwin.

8 years agoAnother fix for using pointer to buffer text
Eli Zaretskii [Mon, 24 Oct 2016 13:59:34 +0000 (16:59 +0300)]
Another fix for using pointer to buffer text

* 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)

8 years agoFix Bug#24478
Michael Albinus [Mon, 24 Oct 2016 13:04:25 +0000 (15:04 +0200)]
Fix Bug#24478

* lisp/net/tramp-sh.el (tramp-histfile-override): Change default value
to "~/.tramp_history".
(tramp-open-shell): Check proper HISTFILE setting.
(tramp-maybe-open-connection): Cleanup also for errors.  (Bug#24478)

8 years ago* lisp/emacs-lisp/seq.el (seq-let): Fix debug spec (Bug#24738)
Nicolas Petton [Mon, 24 Oct 2016 11:15:05 +0000 (13:15 +0200)]
* lisp/emacs-lisp/seq.el (seq-let): Fix debug spec (Bug#24738)

8 years agoDon't prompt user when killing Flymake processes
Karl Chen [Sat, 15 Oct 2016 20:16:26 +0000 (22:16 +0200)]
Don't prompt user when killing Flymake processes

* lisp/progmodes/flymake.el (flymake-start-syntax-check-process):
Don’t prompt the user when killing Flymake processes.

* doc/misc/flymake.texi (Starting the syntax check process):
Document new behavior.

8 years agoPort --enable-gcc-warnings to bleeding-edge glibc
Paul Eggert [Mon, 24 Oct 2016 04:54:13 +0000 (21:54 -0700)]
Port --enable-gcc-warnings to bleeding-edge glibc

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.

8 years agoFix handling of buffer relocation in regex.c functions
Eli Zaretskii [Sun, 23 Oct 2016 19:09:43 +0000 (22:09 +0300)]
Fix handling of buffer relocation in regex.c functions

* src/search.c (search_buffer): Updated the base pointer to buffer
text after the call to re_search_2.  (Bug#24358)

8 years agoAvoid relocating buffers while libxml2 reads its text
Eli Zaretskii [Sun, 23 Oct 2016 16:52:56 +0000 (19:52 +0300)]
Avoid relocating buffers while libxml2 reads its text

* src/xml.c (parse_region) [REL_ALLOC]: Freeze the ralloc arena
while libxml2 reads the current buffer's text.  (Bug#24764)

8 years ago; Remove redundant code in gmalloc.c
Eli Zaretskii [Sun, 23 Oct 2016 15:05:48 +0000 (18:05 +0300)]
; Remove redundant code in gmalloc.c

* src/gmalloc.c [WINDOWSNT]: Remove MS-Windows only inclusion of
w32heap.h, as the MS-Windows build no longer uses gmalloc.c.

8 years agoAttempt to catch reads from a buffer that is relocated
Eli Zaretskii [Sun, 23 Oct 2016 13:54:00 +0000 (16:54 +0300)]
Attempt to catch reads from a buffer that is relocated

* src/xml.c (parse_region): Add assertion to ensure buffer text is
not relocated while libxml2 is reading it.  (Bug#24764)

8 years agoRevert "* lisp/simple.el (process-menu-mode, list-processes--refresh):"
Eli Zaretskii [Sun, 23 Oct 2016 13:04:20 +0000 (16:04 +0300)]
Revert "* lisp/simple.el (process-menu-mode, list-processes--refresh):"

This reverts commit a4285bcb1114e29200001f33af9b4802167d6140.
Do not merge to master!

8 years agoRevert "* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):"
Eli Zaretskii [Sun, 23 Oct 2016 13:03:25 +0000 (16:03 +0300)]
Revert "* lisp/ibuf-ext.el (ibuffer-do-shell-command-file):"

This reverts commit b0c447e4668116cecfda91d0203cb7cac2486d92.
Do not merge to master!

8 years agoRevert "* lisp/ibuffer.el (ibuffer): Improve 'other-window' case. (Bug#23617)"
Eli Zaretskii [Sun, 23 Oct 2016 13:02:11 +0000 (16:02 +0300)]
Revert "* lisp/ibuffer.el (ibuffer): Improve 'other-window' case.  (Bug#23617)"

This reverts commit cf3c19b0298236293d9c56d5ba425af4f42c1f8e.
Do not merge to master!

8 years ago; Apply whitespace conventions of Tramp upstream
Michael Albinus [Sun, 23 Oct 2016 11:28:33 +0000 (13:28 +0200)]
; Apply whitespace conventions of Tramp upstream

8 years ago* src/regex.c (re_search_2): Use UNINIT, not IF_LINT.
Paul Eggert [Sun, 23 Oct 2016 09:58:07 +0000 (02:58 -0700)]
* src/regex.c (re_search_2): Use UNINIT, not IF_LINT.

This finishes the merge of the recent emacs-25 regex changes into
master.

8 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:50:48 +0000 (02:50 -0700)]
Merge from origin/emacs-25

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

8 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:48:50 +0000 (02:48 -0700)]
; Merge from origin/emacs-25

The following commit was skipped:

dfd0476 Fix cursor at bottom left of rectangle (bug#24364)

8 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:48:50 +0000 (02:48 -0700)]
Merge from origin/emacs-25

8ad0d7d ; Fix quoting in etc/NEWS
6b9dee1 Change Tramp version to "2.2.13.25.2"
62f2684 * lisp/emacs-lisp/autoload.el (update-directory-autoloads): F...
b2f32e4 Don't scan compiled module files for autoloads
9a758b4 Fix Bug#24698
baa8ba4 * lisp/subr.el (start-process): Doc fix.  (Bug#24693)
e535ca4 Fix display of vc-dir CVS file statuses in subdirectories
12da149 Update URL of MS-Windows optional DLLs
2331056 Merge branch 'emacs-25' of git.savannah.gnu.org:/srv/git/emac...
a4285bc * lisp/simple.el (process-menu-mode, list-processes--refresh)...
b0c447e * lisp/ibuf-ext.el (ibuffer-do-shell-command-file): Fix non-f...
cf3c19b * lisp/ibuffer.el (ibuffer): Improve 'other-window' case.  (B...

# Conflicts:
# doc/misc/trampver.texi
# etc/NEWS
# lisp/net/tramp-sh.el
# lisp/net/trampver.el

8 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:43:18 +0000 (02:43 -0700)]
; Merge from origin/emacs-25

The following commits were skipped:

d70ed8a Fix time-related data types in 2 editfns.c functions
99892ee Port to Ubuntu 16.10, which needs gcc -nopie

8 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:43:17 +0000 (02:43 -0700)]
Merge from origin/emacs-25

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.

8 years ago; Merge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:43:17 +0000 (02:43 -0700)]
; Merge from origin/emacs-25

The following commits were skipped:

eb17d6f Port --enable-gcc-warnings to GCC 6.2.1
40c426a Work around Samba bug with ':' in symlink contents

8 years agoMerge from origin/emacs-25
Paul Eggert [Sun, 23 Oct 2016 09:43:16 +0000 (02:43 -0700)]
Merge from origin/emacs-25

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

8 years ago;* src/w32heap.c: Fix typo and wording of the comments.
Eli Zaretskii [Sun, 23 Oct 2016 09:14:05 +0000 (12:14 +0300)]
;* src/w32heap.c: Fix typo and wording of the comments.

8 years agoelectric-quote mode no longer worries about coding
Paul Eggert [Sun, 23 Oct 2016 08:14:23 +0000 (01:14 -0700)]
electric-quote mode no longer worries about coding

* doc/emacs/text.texi (Quotation Marks), etc/NEWS: Document this.
* lisp/electric.el (electric--insertable-p): Remove.
All uses removed (Bug#24759).

8 years ago* src/regex.c (re_search_2): Make new code safe for -Wjump-misses-init.
Paul Eggert [Sun, 23 Oct 2016 08:00:27 +0000 (01:00 -0700)]
* src/regex.c (re_search_2): Make new code safe for -Wjump-misses-init.

8 years agoPort to GCC 6.2.1 + --enable-gcc-warnings
Paul Eggert [Sun, 23 Oct 2016 04:12:54 +0000 (21:12 -0700)]
Port to GCC 6.2.1 + --enable-gcc-warnings

* 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.

8 years agoAvoid infinite hscrolling in redisplay
Noam Postavsky [Sat, 22 Oct 2016 19:55:21 +0000 (15:55 -0400)]
Avoid infinite hscrolling in redisplay

* src/xdisp.c (redisplay_internal): Add a counter to avoid horizontal
scrolling (e.g., caused by pre-redisplay-functions) triggering infinite
redisplay (Bug #24633).

8 years agoExplain how to debug emacsclient lisp errors
Noam Postavsky [Sat, 22 Oct 2016 15:52:14 +0000 (11:52 -0400)]
Explain how to debug emacsclient lisp errors

* doc/lispref/debugging.texi (Error Debugging): Mention that
debug-on-signal is useful for getting backtraces from
emacsclient (Bug#24616).

8 years agoFix error codes in Tramp
Michael Albinus [Sat, 22 Oct 2016 11:54:56 +0000 (13:54 +0200)]
Fix error codes in Tramp

* lisp/net/tramp-compat.el (tramp-compat-user-error): New defsubst,
taken from tramp.el.
(tramp-file-missing): New defconst.

* lisp/net/tramp.el (tramp-user-error): Remove it.
(tramp-check-proper-method-and-host)
(tramp-dissect-file-name, tramp-debug-message)
(tramp-handle-shell-command):
* lisp/net/tramp-adb.el (tramp-adb-handle-shell-command):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler):
Use `tramp-compat-user-error'.

* lisp/net/tramp.el (tramp-handle-insert-file-contents)
(tramp-handle-load):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-local-copy)
* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-local-copy):
Use `tramp-file-missing'.  (Bug#24714)

* lisp/net/tramp-sh.el (tramp-sh-handle-add-name-to-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-symbolic-link):
Use `file-already-exists'.

8 years agoAutoload all commands from misc.el
Jorgen Schaefer [Sat, 22 Oct 2016 11:07:32 +0000 (13:07 +0200)]
Autoload all commands from misc.el

Only two of the commands there were autoloaded, one of which is an
easter egg.
* lisp/miscl.el (copy-from-above-command):
* lisp/miscl.el (zap-up-to-char):
* lisp/miscl.el (mark-beginning-of-buffer):
* lisp/miscl.el (mark-end-of-buffer):
* lisp/miscl.el (upcase-char):
* lisp/miscl.el (forward-to-word):
* lisp/miscl.el (backward-to-word):
Add autoload cookie.

8 years agoOn terminal frames ignore minibuffer frame parameter (Bug#24758)
Martin Rudalics [Sat, 22 Oct 2016 09:52:39 +0000 (11:52 +0200)]
On terminal frames ignore minibuffer frame parameter (Bug#24758)

* src/frame.c (Fmake_terminal_frame): Don't complain when the
caller asks for a deviant minibuffer setting (Bug#24758).

8 years agoLet describe-function work for lambda again
Noam Postavsky [Mon, 3 Oct 2016 22:49:56 +0000 (18:49 -0400)]
Let describe-function work for lambda again

Since commit "* lisp/help-fns.el (describe-function): More type
checking[...]", `describe-function' throws a user-error when given a
non-symbol.  This prevents the [back] button in a *Help* buffer from
working when the page it goes back to describes an anonymous
function (e.g., the result of `describe-key' on a key which is bound to
a lambda form).

* lisp/help-fns.el (describe-function): Move the checks on FUNCTION
being an fbound symbol into the `interactive' form.  This allows
non-interactive calls to pass an anonymous function (Bug #24221).  Note
that passing a non-bound symbol non-interactively will still trigger a
`void-function' error from `describe-function-1'.