]> git.eshelyaron.com Git - emacs.git/log
emacs.git
8 years ago* lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876)
Johan Bockgård [Sat, 5 Nov 2016 15:31:22 +0000 (16:31 +0100)]
* lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876)

8 years agoSupport zstd compressed files
Nick Terrell [Sat, 5 Nov 2016 09:42:15 +0000 (11:42 +0200)]
Support zstd compressed files

* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list): Add
zstd compression info: <http://facebook.github.io/zstd/>.
(jka-compr-mode-alist-additions): Handle .tzst suffix for zstd
compressed tar archives.  (Bug#24853)

Copyright-paperwork-exempt: yes

8 years agoEnlarge DUMPED_HEAP_SIZE
Eli Zaretskii [Sat, 5 Nov 2016 08:21:23 +0000 (10:21 +0200)]
Enlarge DUMPED_HEAP_SIZE

* src/w32heap.c (DUMPED_HEAP_SIZE) [_WIN64 || WIDE_EMACS_INT]:
Enlarge to 21MB.  Reported by Richard Copley <rcopley@gmail.com>.

8 years agoUpdate from gnulib
Paul Eggert [Fri, 4 Nov 2016 22:12:09 +0000 (15:12 -0700)]
Update from gnulib

This incorporates:
2016-11-03 intprops: port to older XL C
* lib/intprops.h: Copy from gnulib.

8 years ago; Spelling fixes
Paul Eggert [Fri, 4 Nov 2016 22:07:01 +0000 (15:07 -0700)]
; Spelling fixes

8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 4 Nov 2016 22:02:03 +0000 (15:02 -0700)]
Merge from origin/emacs-25

acae275 ; Spelling fixes
d8fac73 Update README for precompiled windows Emacs.
23570fd Clarify documentation of 'vc-responsible-backend' wrt symlinks
f708cb2 Clarify doc string of 'transpose-sexps'
cd05b1d Fix docstring of 'browse-url-firefox-new-window-is-tab'
bdc89eb Improve documentation of 'font-lock-remove-keywords'
4a0c590 Fix documentation of the command summary key
0221b7a Mark relocation workarounds with REL_ALLOC

8 years ago; Merge from origin/emacs-25
Paul Eggert [Fri, 4 Nov 2016 22:02:03 +0000 (15:02 -0700)]
; Merge from origin/emacs-25

The following commits were skipped:

5043e0a Fix documentation for 'eudc-options-file'
26038aa Fix documentation of 'eudc-inline-expansion-format'

8 years agoMerge from origin/emacs-25
Paul Eggert [Fri, 4 Nov 2016 22:01:17 +0000 (15:01 -0700)]
Merge from origin/emacs-25

dbb3410 python.el: Fix detection of native completion in Python 3 (bu...
91c97b6 * Makefile.in (install-arch-indep): Skip etc/refcards/emacsve...
9c1cb8d * lisp/subr.el (set-transient-map): Exit for unbound events (...
9c247d2 Update category-table for Chinese characters
43986d1 Inhibit buffer relocation during regex searches
fee4cef Revert fixes to allocation of regex matching

8 years ago; Spelling fixes
Paul Eggert [Fri, 4 Nov 2016 21:50:09 +0000 (14:50 -0700)]
; Spelling fixes

8 years agoUpdate README for precompiled windows Emacs.
Phillip Lord [Fri, 4 Nov 2016 20:50:55 +0000 (20:50 +0000)]
Update README for precompiled windows Emacs.

 * nt/README.W32: Describe 64 and 32-bit downloads, optional
   dependencies bundle. Remove old material on sourcing dependencies.
   Remove references to Windows 95. Update GUI references to recent
   Windows. Remove references to Usenet.

8 years ago; Restore nixed comments
Mark Oteiza [Fri, 4 Nov 2016 18:22:05 +0000 (14:22 -0400)]
; Restore nixed comments

8 years agoFix references to long obsoleted functions/aliases
Mark Oteiza [Fri, 4 Nov 2016 16:45:51 +0000 (12:45 -0400)]
Fix references to long obsoleted functions/aliases

* doc/lispintro/emacs-list-intro.texi (Miscellaneous):
* doc/misc/cl.texi (Conditionals):
* doc/misc/speedbar.texi (Major Display Modes): Use string-to-number,
not string-to-int.
* lisp/emulation/viper.el (viper-go-away): Use major-mode, not
default-major-mode.
* lisp/textmodes/reftex-toc.el (reftex-toc-visit-location): show-window
here is not a function call, but shorten the binding names anyways.
Also, use pop-to-buffer-same-window instead of switch-to-buffer cf
Bug#22244.
* lisp/textmodes/sgml-mode.el (html-tag-alist): Use read-string, not
read-input.

8 years ago* lisp/emacs-lisp/pcase.el (pcase-dolist): Add a docstring.
Mark Oteiza [Fri, 4 Nov 2016 14:23:46 +0000 (10:23 -0400)]
* lisp/emacs-lisp/pcase.el (pcase-dolist): Add a docstring.

8 years ago; Fix warnings
Mark Oteiza [Fri, 4 Nov 2016 14:14:01 +0000 (10:14 -0400)]
; Fix warnings

8 years ago* lisp/net/shr.el (shr-collect-extra-strings-in-table) New function
Katsumi Yamaoka [Fri, 4 Nov 2016 10:33:26 +0000 (10:33 +0000)]
* lisp/net/shr.el (shr-collect-extra-strings-in-table) New function
that gathers extra strings in an invalid html.  (bug#24831)
(shr-tag-table): Use it.

8 years agoClarify documentation of 'vc-responsible-backend' wrt symlinks
Hong Xu [Fri, 4 Nov 2016 10:06:00 +0000 (12:06 +0200)]
Clarify documentation of 'vc-responsible-backend' wrt symlinks

* lisp/vc/vc.el (vc-responsible-backend): Clarify that symlinks
are not resolved when the VC backend is reported.

* doc/lispref/files.texi (Truenames): Document
'vc-responsible-backend'.  (Bug#23436)
* doc/emacs/maintaining.texi (Version Control Systems): Fix a
typo.

8 years agoClarify doc string of 'transpose-sexps'
Eli Zaretskii [Fri, 4 Nov 2016 09:50:48 +0000 (11:50 +0200)]
Clarify doc string of 'transpose-sexps'

* lisp/simple.el (transpose-sexps): Clarify the conditions for
transposing sexps that are lists or strings.  Mention the effect
of the prefix argument.  (Bug#24860)

8 years agoFix docstring of 'browse-url-firefox-new-window-is-tab'
Tibor Csögör [Fri, 4 Nov 2016 09:24:21 +0000 (11:24 +0200)]
Fix docstring of 'browse-url-firefox-new-window-is-tab'

* lisp/net/browse-url.el (browse-url-firefox-new-window-is-tab):
Remove obsolete note from docstring (obsoleted by previous commits).
(Bug#24843)

Copyright-paperwork-exempt: yes

8 years agoImprove documentation of 'font-lock-remove-keywords'
Eli Zaretskii [Fri, 4 Nov 2016 09:16:40 +0000 (11:16 +0200)]
Improve documentation of 'font-lock-remove-keywords'

* doc/lispref/modes.texi (Customizing Keywords): Clarify the
'keywords' argument of 'font-lock-remove-keywords'.  Suggested by
Hong Xu <hong@topbug.net>.  (Bug#24830)

8 years agoAdd 'x-ctrl-keysym' support on X window system
Vasilij Schneidermann [Fri, 4 Nov 2016 09:09:31 +0000 (11:09 +0200)]
Add 'x-ctrl-keysym' support on X window system

* src/xterm.c (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers):
Support 'x-ctrl-keysym'.
(syms_of_xterm): DEFSYM "ctrl" and put a proper modifier-value
property on it.
<x-ctrl-keysym>: New DEFVAR_LISP.
<x-alt-keysym, x-hyper-keysym, x-meta-keysym, x-super-keysym>: Doc
fix.  (Bug#24822)

* etc/NEWS: Mention the addition of 'x-ctrl-keysym'.

* doc/lispref/os.texi (X11 Keysyms): Document 'x-ctrl-keysym'.

8 years agoFix documentation of the command summary key
Eli Zaretskii [Fri, 4 Nov 2016 08:56:11 +0000 (10:56 +0200)]
Fix documentation of the command summary key

* doc/misc/info.texi (Help-^L, Help-Xref, Top): Emacs Info uses
'?' for the summary of commands, whereas the stand-alone reader
uses 'H'.  (Bug#24825)

8 years agoImprove autoload error reporting
Alexander Gramiak [Fri, 4 Nov 2016 08:41:21 +0000 (10:41 +0200)]
Improve autoload error reporting

* src/eval.c (Fautoload_do_load): Include the absolute file name
in the error message.

8 years agoMark relocation workarounds with REL_ALLOC
Eli Zaretskii [Fri, 4 Nov 2016 08:36:02 +0000 (10:36 +0200)]
Mark relocation workarounds with REL_ALLOC

* src/search.c (boyer_moore): Mark workarounds for ralloc.c
relocation of buffer text with "#ifdef REL_ALLOC".

8 years agoStop force parameter of whitespace-report-region having global effect
Reuben Thomas [Tue, 25 Oct 2016 22:20:59 +0000 (23:20 +0100)]
Stop force parameter of whitespace-report-region having global effect

* lisp/whitespace.el (whitespace-report-region): Force parameter
previously changed whitespace-style globally.  Fix this, and use
whitespace-active-style, to take account of any changes the user may
have made.  Simplify the documentation: the force parameter simply
forces all classes of whitespace problem to be considered.
(Bug#24745)

8 years agoDocument use of `tab-width'
Reuben Thomas [Tue, 25 Oct 2016 22:04:18 +0000 (23:04 +0100)]
Document use of `tab-width'

* lisp/whitespace.el: When talking about `8 or more spaces', mention
`tab-width' instead of 8.  (Bug#24745)

8 years agoMake whitespace-report-region respect current settings
Reuben Thomas [Fri, 21 Oct 2016 14:25:12 +0000 (15:25 +0100)]
Make whitespace-report-region respect current settings

* lisp/whitespace.el (whitespace-report-region): Make it respect
whitespace-style, including any additions made by the force parameter.
This means that the function does not return t unless a whitespace
problem that the user cares about is reported.  (Bug#24745)

8 years agoFix whitespace-space-after-tab-regexp
Reuben Thomas [Fri, 21 Oct 2016 14:23:08 +0000 (15:23 +0100)]
Fix whitespace-space-after-tab-regexp

* lisp/whitespace.el (whitespace-space-after-tab-regexp)
(whitespace-regexp): Match all the spaces after tabs for highlighting,
not just the first tab-width.  Fix whitespace-space-after-tab::space
version so that it requires at least tab-width spaces, not just 1.
(Bug#24745)

8 years agoRemove duplicate documentation
Reuben Thomas [Fri, 21 Oct 2016 14:20:07 +0000 (15:20 +0100)]
Remove duplicate documentation

* lisp/whitespace.el: Remove duplicate documentation from the Commentary
  section which duplicate and in some places contradict (due to being
  out of date) the docstrings (Bug#24745).

8 years agoFix bob/eob checks
Reuben Thomas [Thu, 20 Oct 2016 12:17:58 +0000 (13:17 +0100)]
Fix bob/eob checks

* lisp/whitespace.el (whitespace-empty-at-bob-regexp)
(whitespace-empty-at-eob-regexp, whitespace-cleanup): Make `empty' checks
work at beginning & end of buffer in whitespace-report-region, and only
there (i.e. they will never match in regions that don't include the
start or end of the buffer).  (Bug#24745)

8 years ago(thing-at-point 'list) return nil if no list at point
Tino Calancha [Thu, 3 Nov 2016 11:33:19 +0000 (20:33 +0900)]
(thing-at-point 'list) return nil if no list at point

* lisp/thingatpt.el (thing-at-point-bounds-of-list-at-point):
Check first if we are at the beginning of a top-level sexp (Bug#24627).
If point is inside a comment or string, look for a list out of the
comment/string.
Escape '[' in doc string.
* test/lisp/thingatpt-tests.el (thing-at-point-bug24627): Update
expected test result as pass.

8 years agoRemove antlr face aliases obsoleted in 22.1
Mark Oteiza [Thu, 3 Nov 2016 05:15:30 +0000 (01:15 -0400)]
Remove antlr face aliases obsoleted in 22.1

* lisp/progmodes/antlr-mode.el: Remove obsolete aliases
(antlr-default-face, antlr-keyword-face, antlr-syntax-face):
(antlr-ruledef-face, antlr-tokendef-face, antlr-ruleref-face):
(antlr-tokenref-face, antlr-literal-face):
(antlr-literal-face): Remove.
(antlr-font-lock-additional-keywords): Use face symbols instead.

8 years agoRevert "Disable bracketed paste in a terminal in char mode"
Daniel Colascione [Thu, 3 Nov 2016 04:17:48 +0000 (21:17 -0700)]
Revert "Disable bracketed paste in a terminal in char mode"

This change causes regressions, and besides, disabling BPM frame-wide
for the sake of one buffer is the wrong solution.

This reverts commit cf566b46a6cf85c6d54d0b0db80e32ed6ae8d1ca.

8 years ago; Require eieio at run time
Mark Oteiza [Wed, 2 Nov 2016 20:23:48 +0000 (16:23 -0400)]
; Require eieio at run time

8 years agoRevert change to eww-suggest-uris
Mark Oteiza [Wed, 2 Nov 2016 20:18:49 +0000 (16:18 -0400)]
Revert change to eww-suggest-uris

The introduced append is ugly and can yield '(nil); doing delq on it
would be hacks on hacks.
* lisp/net/eww.el: Require cl-lib at run time.
(eww-suggest-uris): Restore eww-current-url, reverting previous change.
(eww): Remove erroneous append.
(eww-open-in-new-buffer): Check if the return from eww-suggested-uris is
equal to eww-current-url, which is nil anyways if we are not in an EWW
buffer.

8 years agoAdd eww-open-in-new-buffer to EWW
Mark Oteiza [Wed, 2 Nov 2016 19:58:28 +0000 (15:58 -0400)]
Add eww-open-in-new-buffer to EWW

* doc/misc/eww.texi (Basic): Document new command and key.
* etc/NEWS: Mention new key and its purpose.
* lisp/net/eww.el (eww-suggest-uris): Remove eww-current-url.
(eww): Append (eww-current-url) to the prompt defaults.
(eww-open-in-new-buffer): New command.
(eww-mode-map): Bind it and add a menu item.

8 years agoMigrate auth-source to cl-lib
Mark Oteiza [Wed, 2 Nov 2016 18:56:40 +0000 (14:56 -0400)]
Migrate auth-source to cl-lib

* lisp/auth-source.el: Use cl-lib.
(auth-source-read-char-choice, auth-source-backend-parse-parameters):
(auth-source-search): Replace cl calls with cl-lib ones.
(auth-source-netrc-cache):
(auth-source-forget+): Use cl-do-symbols instead.
(auth-source-specmatchp, auth-source-netrc-parse):
(auth-source-netrc-search, auth-source-netrc-create):
(auth-source-netrc-saver, auth-source-secrets-listify-pattern):
(auth-source-secrets-search, auth-source-secrets-create):
(auth-source-macos-keychain-search, auth-source--decode-octal-string):
(auth-source-macos-keychain-search-items, auth-source-plstore-search):
(auth-source-plstore-create): Replace cl calls with cl-lib ones.

8 years agoFix documentation for 'eudc-options-file'
Thomas Fitzsimmons [Tue, 1 Nov 2016 09:00:25 +0000 (05:00 -0400)]
Fix documentation for 'eudc-options-file'

* doc/misc/eudc.texi (The Server Hotlist): Update the default
value of 'eudc-options-file'.

Backport:

(cherry picked from commit 0575fd95d0b92a9a0ebff8df183a449190f74dbc)

8 years agoFix documentation of 'eudc-inline-expansion-format'
Tibor Csögör [Tue, 1 Nov 2016 08:57:53 +0000 (04:57 -0400)]
Fix documentation of 'eudc-inline-expansion-format'

* doc/misc/eudc.texi (Inline Query Expansion): Fix the default value of
'eudc-inline-expansion-format'. (Bug#24840)

Backport:

(cherry picked from commit 1fef1387c387d80f8ece326621539b89a6965702)

8 years agoDon't segfault on timed-out TLS connections
Lars Ingebrigtsen [Tue, 1 Nov 2016 19:57:28 +0000 (20:57 +0100)]
Don't segfault on timed-out TLS connections

* src/process.c (finish_after_tls_connection): Check that the
file descriptor is still alive before proceeding (bug#24811).
Also clean up the code slightly.

8 years agoSupport 'TARGETS' in clipboard selections on MS-Windows
Eli Zaretskii [Tue, 1 Nov 2016 16:04:07 +0000 (18:04 +0200)]
Support 'TARGETS' in clipboard selections on MS-Windows

* src/w32select.c (Fw32_selection_targets): New function.

* lisp/term/w32-win.el (w32--get-selection): Call
'w32-selection-targets' to obtain the list of data formats
available in the clipboard.

8 years ago; Auto-commit of loaddefs files.
Glenn Morris [Tue, 1 Nov 2016 10:18:02 +0000 (06:18 -0400)]
; Auto-commit of loaddefs files.

8 years agoFix documentation for 'eudc-options-file'
Thomas Fitzsimmons [Tue, 1 Nov 2016 09:00:25 +0000 (05:00 -0400)]
Fix documentation for 'eudc-options-file'

* doc/misc/eudc.texi (The Server Hotlist): Update the default
value of 'eudc-options-file'.

8 years agoFix documentation of 'eudc-inline-expansion-format'
Tibor Csögör [Tue, 1 Nov 2016 08:57:53 +0000 (04:57 -0400)]
Fix documentation of 'eudc-inline-expansion-format'

* doc/misc/eudc.texi (Inline Query Expansion): Fix the default value of
'eudc-inline-expansion-format'. (Bug#24840)

8 years agoTurn on lexical-binding in some more libs
Mark Oteiza [Tue, 1 Nov 2016 00:31:22 +0000 (20:31 -0400)]
Turn on lexical-binding in some more libs

* lisp/calendar/icalendar.el:
* lisp/emacs-lisp/regexp-opt.el:
* lisp/emacs-lisp/timer.el:
* lisp/gnus/message.el:
* lisp/hex-util.el: Turn on lexical-binding.

8 years agoTurn on lexical-binding in some net libs
Mark Oteiza [Tue, 1 Nov 2016 00:19:21 +0000 (20:19 -0400)]
Turn on lexical-binding in some net libs

* lisp/net/dbus.el: Turn on lexical-binding.
(dbus-list-hash-table, dbus-list-known-names):
(dbus-introspect-get-node-names, dbus-introspect-get-interface-names):
(dbus-introspect-get-method-names, dbus-introspect-get-signal-names):
(dbus-introspect-get-property-names):
(dbus-introspect-get-argument-names, dbus-get-all-properties):
(dbus-property-handler, dbus-get-all-managed-objects):
(dbus-managed-object-handler): Replace add-to-list with push. Add
nreverse in some places where the APPEND argument of add-to-list was
used.
* lisp/net/network-stream.el: Turn on lexical-binding.
* lisp/net/newsticker.el: Turn on lexical-binding.
* lisp/net/shr.el: Turn on lexical-binding.
(shr-make-placeholder-image): Remove unused variable binding.
(shr-inspect-table): Replace ignored bindings with underscore.

8 years agoTurn on lexical-binding in some url libs
Mark Oteiza [Mon, 31 Oct 2016 23:55:17 +0000 (19:55 -0400)]
Turn on lexical-binding in some url libs

* lisp/url/url-auth.el:
* lisp/url/url-expand.el:
* lisp/url/url-future.el:
* lisp/url/url-parse.el:
* lisp/url/url-util.el: Turn on lexical-binding.

8 years ago* lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet): Fix debug spec
Johan Bockgård [Fri, 21 Oct 2016 22:14:44 +0000 (00:14 +0200)]
* lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet): Fix debug spec

(Bug#24733)

8 years agopython.el: Fix detection of native completion in Python 3 (bug #24401)
Clément Pit--Claudel [Thu, 27 Oct 2016 02:46:28 +0000 (22:46 -0400)]
python.el: Fix detection of native completion in Python 3 (bug #24401)

With Python 3.5, (python-shell-completion-native-get-completions ... "")
would return an empty list, causing python.el to think that native
completion was unavailable (the difference between Python 2 and Python 3
is due to https://bugs.python.org/issue25660).

* lisp/progmodes/python.el (python-shell-completion-native-try): Use "_"
  to check whether native completion is available instead of "".

8 years agoHandle chars of syntax word which are also flagged as comment delimiters
Alan Mackenzie [Sun, 30 Oct 2016 17:29:52 +0000 (17:29 +0000)]
Handle chars of syntax word which are also flagged as comment delimiters

src/syntax.c (scan_sexps_forward): When chars of syntax word are also flagged
as the start/end of two char comment delimiters, recognize a comment delimiter
in preference to a portion of a word.  This fixes bug #24767.

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 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 ago* Makefile.in (install-arch-indep): Skip etc/refcards/emacsver.tex.in.
Glenn Morris [Wed, 26 Oct 2016 19:47:54 +0000 (15:47 -0400)]
* Makefile.in (install-arch-indep): Skip etc/refcards/emacsver.tex.in.

8 years ago* lisp/subr.el (set-transient-map): Exit for unbound events (bug#24755).
Stefan Monnier [Wed, 26 Oct 2016 19:29:02 +0000 (15:29 -0400)]
* lisp/subr.el (set-transient-map): Exit for unbound events (bug#24755).

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 agoUpdate category-table for Chinese characters
Eli Zaretskii [Wed, 26 Oct 2016 12:58:07 +0000 (15:58 +0300)]
Update category-table for Chinese characters

* lisp/international/characters.el (standard-category-table):
Update the ranges of Han and Chinese characters.  (Bug#24798)

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 agoInhibit buffer relocation during regex searches
Noam Postavsky [Tue, 25 Oct 2016 01:22:07 +0000 (21:22 -0400)]
Inhibit buffer relocation during regex searches

* src/search.c (looking_at_1, fast_looking_at, search_buffer): Prevent
relocation of buffer contents during calls to re_search_2.  This ensures
the pointers into buffer text won't be invalidated by
r_alloc_sbrk (called from malloc with configurations where
REL_ALLOC=yes).

8 years agoRevert fixes to allocation of regex matching
Noam Postavsky [Mon, 24 Oct 2016 23:54:29 +0000 (19:54 -0400)]
Revert fixes to allocation of regex matching

The fix was not complete, and completing it was proving too complicated.

- Revert "* src/regex.c (re_search_2): Make new code safe for
          -Wjump-misses-init."
  This reverts commit c2a17924a57483d14692c8913edbe8ad24b5ffbb.
- Revert "Port to GCC 6.2.1 + --enable-gcc-warnings"
  This reverts commit f6134bbda259c115c06d4a9a3ab5c39340a15949.
- Revert "Fix handling of allocation in regex matching"
  This reverts commit ad66b3fadb7ae22a4cbb82bb1507c39ceadf3897.
- Revert "Fix handling of buffer relocation in regex.c functions"
  This reverts commit ee04aedc723b035eedaf975422d4eb242894121b.

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)