emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 02f2f33 3/4: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 02f2f33 3/4: Merge from origin/emacs-26
Date: Mon, 2 Jul 2018 22:23:06 -0400 (EDT)

branch: master
commit 02f2f336af7c4129ec79ab00881bba3e14ff9820
Merge: bc0e36d fc5cae7
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    fc5cae7 ; Fix ChangeLog typo.
    e17a5e5 ; make change-history-commit
    f205928 * etc/HISTORY: Cite Brinkoff on early history.
    4e58ca8 Document internal use of 'above-suspended' z-group frame para...
    4bd43b0 Increase max-lisp-eval-depth adjustment while in debugger (bu...
    ab98352 Improve on last change in replace-buffer-contents
    2f149c0 Fix a factual error in Introduction to Emacs Lisp
    8ad50a3 ; * lisp/files.el (buffer-offer-save): Doc fix.  (Bug#32000)
    c80f31f Minor improvements in documentation of imenu.el
    8ebb683 Avoid errors with recentering in 'skeleton-insert'
    e980a3c * src/lisp.h: Omit obsolete comment re bytecode stack.
    eec71eb Speed up replace-buffer-contents
    93c41ce Remove extra process call from vc-git-find-file-hook
    7ea0873 ; Update some commentary
    4a7f423 Speed up vc-git-dir-status-files
    9134c84 Avoid compiler warning using coding.h
    
    Conflicts:
        src/editfns.c
---
 ChangeLog.3                         | 1429 ++++++++++++++++++++++++++++++++++-
 doc/lispintro/emacs-lisp-intro.texi |    4 +-
 etc/HISTORY                         |    7 +-
 lisp/emacs-lisp/debug.el            |    1 +
 lisp/files.el                       |    8 +-
 lisp/imenu.el                       |    6 +-
 lisp/skeleton.el                    |    3 +-
 lisp/vc/vc-git.el                   |   16 +-
 src/coding.h                        |    4 +
 src/editfns.c                       |   99 ++-
 src/eval.c                          |    8 +-
 src/lisp.h                          |   18 +-
 src/w32fns.c                        |   22 +-
 src/xterm.c                         |    4 +
 14 files changed, 1566 insertions(+), 63 deletions(-)

diff --git a/ChangeLog.3 b/ChangeLog.3
index 6704d0d..a0a4794 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -1,3 +1,1430 @@
+2018-07-01  Paul Eggert  <address@hidden>
+
+       * etc/HISTORY: Cite Brinkhoff on early history.
+
+2018-07-01  Martin Rudalics  <address@hidden>
+
+       Document internal use of 'above-suspended' z-group frame parameter
+
+       * src/w32fns.c (w32_dialog_in_progress, x_set_z_group):
+       * src/xterm.c (x_set_z_group): Clarify the internal use of
+       'above-suspended' when setting a frame's 'z-group' parameter.
+
+2018-06-30  Gemini Lasswell  <address@hidden>
+
+       Increase max-lisp-eval-depth adjustment while in debugger (bug#31919)
+
+       * src/eval.c (call_debugger): Increase the amount of extra Lisp
+       evaluation depth given to the debugger to allow it to call cl-print.
+       * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Add a comment
+       to suggest updating call_debugger when changing print-level.
+
+2018-06-30  Eli Zaretskii  <address@hidden>
+
+       Improve on last change in replace-buffer-contents
+
+       * src/editfns.c (Freplace_buffer_contents): Call modification
+       hooks only for the actual region where changes are made.
+       (Bug#31888)
+
+2018-06-30  Eli Zaretskii  <address@hidden>
+
+       Fix a factual error in Introduction to Emacs Lisp
+
+       * doc/lispintro/emacs-lisp-intro.texi (Buffer Names): Update the
+       key that exits the splash screen.  (Bug#32019)
+
+2018-06-30  Eli Zaretskii  <address@hidden>
+
+       Minor improvements in documentation of imenu.el
+
+       * lisp/imenu.el (imenu-generic-skip-comments-and-strings)
+       (imenu--generic-function): Doc fixes.  (Bug#31962)
+
+2018-06-30  Eli Zaretskii  <address@hidden>
+
+       Avoid errors with recentering in 'skeleton-insert'
+
+       * lisp/skeleton.el (skeleton-insert): Don't recenter if we are
+       running in a buffer other than the one displayed in the selected
+       window.  (Bug#31950)
+
+2018-06-29  Paul Eggert  <address@hidden>
+
+       * src/lisp.h: Omit obsolete comment re bytecode stack.
+
+2018-06-29  Eli Zaretskii  <address@hidden>
+
+       Speed up replace-buffer-contents
+
+       * src/editfns.c (EXTRA_CONTEXT_FIELDS): Add a_unibyte and
+       b_unibyte members.
+       (rbc_quitcounter): New static variable.
+       (Freplace_buffer_contents): Initialize a_unibyte, b_unibyte, and
+       rbc_quitcounter.  Inhibit modification hooks if they were not
+       already inhibited.  Use rarely_quit to allow user to quit, to
+       avoid calling maybe_quit too frequently (which hurts performance).
+       Remove redundant assertions (which hurt performance too much).
+       Call signal_after_change and update_compositions after all the
+       changes are done.
+       (buffer_chars_equal): Remove redundant assertions (which hurt
+       performance).  Avoid using BUF_FETCH_CHAR_AS_MULTIBYTE, which
+       hurts performance by referencing Lisp symbols; instead, use
+       lower-level macros with explicit tests to select which macro to
+       use.  (Bug#31888)
+
+2018-06-27  Dmitry Gutov  <address@hidden>
+
+       Remove extra process call from vc-git-find-file-hook
+
+       * lisp/vc/vc-git.el (vc-git-find-file-hook): Resolve FIXMEs.
+
+2018-06-27  Dmitry Gutov  <address@hidden>
+
+       Speed up vc-git-dir-status-files
+
+       * lisp/vc/vc-git.el (vc-git-dir-status-goto-stage): Call 'git
+       ls-files -u' for the ls-files-conflict stage
+       (https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00885.html).
+
+2018-06-27  Eli Zaretskii  <address@hidden>
+
+       Avoid compiler warning using coding.h
+
+       * src/coding.h: Add INLINE_HEADER_BEGIN..INLINE_HEADER_END, since
+       this header now has an extern INLINE function.
+
+2018-06-27  Michael Albinus  <address@hidden>
+
+       Sync with Tramp 2.3.4.  Do not merge with master
+
+       * doc/misc/trampver.texi:
+       * lisp/net/trampver.el: Change version to "2.3.4".
+
+       * lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
+       Check, that the directory has been removed indeed.
+
+       * test/lisp/net/tramp-tests.el (tramp-test21-file-links): Adapt test.
+       (tramp--test-emacs25-p): New defun.
+       (tramp-test34-vc-registered): Use it.
+
+2018-06-27  Martin Rudalics  <address@hidden>
+
+       * src/xdisp.c (Vmouse_autoselect_window): Clarify doc-string (Bug#31975)
+
+2018-06-26  Noam Postavsky  <address@hidden>
+
+       Detect a non-list package archive content properly (Bug#22311)
+
+       * lisp/emacs-lisp/package.el (package--download-one-archive): Use
+       `read' instead of `read-from-string'; the latter always returns a
+       cons, so the `listp' check on its return value doesn't make sense.  It
+       was changed from `read' to `read-from-string' in 2015-04-01 "*
+       emacs-lisp/package.el: Implement asynchronous refreshing", but that
+       change was not needed because `read' works fine on strings as well as
+       buffers.
+
+2018-06-25  Christophe Junke  <address@hidden>  (tiny change)
+
+       Add ido-fallback special variable (Bug#31707)
+
+       Before ido.el switch to lexical-binding, it was possible for other
+       packages to modify the 'fallback' variables declared inside
+       'ido-file-internal' and 'ido-buffer-internal'.
+       * lisp/ido.el (ido-fallback): New variable.
+       (ido-buffer-internal, ido-file-internal): Reset ido-fallback to nil
+       before prompting user.  Use ido-fallback when ido-exit is 'fallback'.
+       (ido-fallback-command): Add optional FALLBACK-COMMAND argument.
+
+2018-06-25  Karl Fogel  <address@hidden>
+
+       Tighten a cross-reference in documentation
+
+       * doc/lispref/internals.texi (Writing Emacs Primitives): Switch to
+         a simple parenthetical cross-reference, following up to my
+         commit 9a53b6d426 of 2018-06-24.
+
+       See discussion:
+
+         https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00826.html
+         From: Eli Zaretskii
+         Subject: Re: [Emacs-diffs] \
+                  emacs-26 9a53b6d: Say how to override a primitive 
interactive spec
+         To: Karl Fogel
+         CC: Stefan Monnier, Emacs Devel
+         Date: Mon, 25 Jun 2018 17:41:53 +0300
+         Message-Id: <address@hidden>
+
+2018-06-25  Michael Albinus  <address@hidden>
+
+       Fix last change in tramp-sh.el
+
+       * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
+       Use "-R" rather than "-r" for recursive copy of directories.
+
+2018-06-24  Paul Eggert  <address@hidden>
+
+       Revert previous patch; comment was OK after all.
+
+2018-06-24  Paul Eggert  <address@hidden>
+
+       Fix lead comment for count_trailing_zero_bits
+
+       * src/data.c (count_trailing_zero_bits): Fix comment to match code.
+
+2018-06-24  Noam Postavsky  <address@hidden>
+
+       * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring quotes.
+
+2018-06-24  Simen Heggestøyl  <address@hidden>
+
+       Make a minor update to the CSS mode docstring
+
+       * lisp/textmodes/css-mode.el (css-mode): Mention 'fill-paragraph'.
+
+2018-06-24  Karl Fogel  <address@hidden>
+
+       Say how to override a primitive interactive spec
+
+       * doc/lispref/internals.texi (Writing Emacs Primitives): Mention that
+         the `interactive-form' property can be used to override a primitive
+         interactive specification, and refer to the detailed documentation
+         for setting that property.
+
+       From this thread on Emacs Devel:
+
+         https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00923.html
+         From: Eli Zaretskii
+         To: Karl Fogel
+         CC: Juri Linkov, Emacs Devel
+         Subject: Re: [Emacs-diffs] \
+                  master b88e7c8: Make transpose-regions interactive 
(Bug#30343)
+         Date: Thu, 29 Mar 2018 14:38:15 +0300
+         Message-Id: <address@hidden>
+
+2018-06-24  Michael Albinus  <address@hidden>
+
+       Fix Bug#31941
+
+       * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file): In case of
+       FILENAME being a directory, check whether `copy-directory' could
+       be avoided.  Suggested by Stephen Nutt <address@hidden>.  (Bug#31941)
+       (tramp-do-copy-or-rename-file-directly): Call "cp" with "-r".
+
+2018-06-23  Leo Liu  <address@hidden>
+
+       Fix previous change in minibuffer-default-add-dired-shell-commands
+
+       The mailcap minibuffer completion used dynamic binding.  Locally set
+       a dynamic variable.
+       * lisp/dired-aux.el (minibuffer-default-add-dired-shell-commands):
+       Store list of files in 'minibuffer-completion-table'.  (Bug#31794)
+
+2018-06-23  Eli Zaretskii  <address@hidden>
+
+       * src/editfns.c (Fformat): Make %x easier to spot in doc string.  
(Bug#31945)
+
+2018-06-23  Eli Zaretskii  <address@hidden>
+
+       Improve responsiveness while in 'replace-buffer-contents'
+
+       * src/editfns.c (buffer_chars_equal): Avoid calling
+       buf_charpos_to_bytepos when the buffer is plain-ASCII.
+       Suggested by Milan Stanojević <address@hidden>.
+       Call maybe_quit to improve responsiveness.
+       (Freplace_buffer_contents): Call maybe_quit.  Warn in the doc
+       string that the function could be slow.  (Bug#31888)
+
+2018-06-23  Eli Zaretskii  <address@hidden>
+
+       Improve documentation of 'server-start' and friends
+
+       * lisp/server.el (server-start, server-running-p): Document how to
+       reliably check that the current Emacs process started the server.
+       (Bug#31859)
+
+2018-06-23  Eli Zaretskii  <address@hidden>
+
+       Clarify wording about functions' argument lists
+
+       * doc/lispref/functions.texi (Argument List): Clarify the
+       wording.  (Bug#31872)
+
+2018-06-23  Eli Zaretskii  <address@hidden>
+
+       * lisp/doc-view.el: Fix typos in the commentary.  (Bug#31937)
+
+2018-06-22  Eli Zaretskii  <address@hidden>
+
+       Fix a typo in emacs-lisp-intro.texi
+
+       * doc/lispintro/emacs-lisp-intro.texi (kill-ring-yank-pointer):
+       Add a missing quote.  Reported by Jean-Christophe Helary
+       <address@hidden> in emacs-devel.
+
+2018-06-22  Paul Eggert  <address@hidden>
+
+       Fix doc typo: missing double-quote
+
+2018-06-22  Eli Zaretskii  <address@hidden>
+
+       Avoid segfaults in replace-buffer-contents with large buffers
+
+       * src/editfns.c (Freplace_buffer_contents): Don't release
+       malloc'ed memory as long as we are using it.  (Bug#31888)
+
+2018-06-22  Robert Pluim  <address@hidden>
+
+       Adjust for scaling for mode-line popup menus (Bug#31880)
+
+       * src/xmenu.c (menu_position_func) [HAVE_GTK3]: Take scaling
+       into account when calculating screen size.
+
+2018-06-21  Simen Heggestøyl  <address@hidden>
+
+       Change name of `seqp' argument (Bug#26411)
+
+       * lisp/emacs-lisp/seq.el (seqp): Change argument name.
+
+       * doc/lispref/sequences.texi: Update the documentation for seqp.
+
+2018-06-20  Noam Postavsky  <address@hidden>
+
+       Change index of ";" to better reflect it's usage (Bug#31623)
+
+       * doc/lispref/objects.texi (Comments): "; for commenting" fits better
+       with the following text about how a semicolon begins a comment.  Also
+       mention that only unescaped semicolons start a comment.
+
+2018-06-20  Tak Kunihiro  <address@hidden>
+
+       Fix bug of 'mouse-drag-and-drop-region' to detect edges of region 
(Bug#31905)
+
+       * lisp/mouse.el (mouse-drag-and-drop-region): Detect both the
+       beginning and the end of character of region during dragging
+       text.
+
+2018-06-19  Noam Postavsky  <address@hidden>
+
+       Fix #'fun handling inside `labels' (Bug#31792)
+
+       * lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the
+       cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix
+       last change".
+       * test/lisp/emacs-lisp/cl-tests.el (labels-function-quoting): New
+       test.
+       * lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Improve docstring,
+       link to relevant manual page.
+       * doc/misc/cl.texi (Function Bindings): Don't imply that function
+       cells of symbols are modified by cl-flet.  Don't claim that cl-flet or
+       cl-labels affect references of the form (quote FUNC).
+
+2018-06-18  Eli Zaretskii  <address@hidden>
+
+       Fix vertical-motion with 'visual' line-number display
+
+       * src/indent.c (Fvertical_motion): Don't exempt 'visual' sty;e of
+       line-number display from X coordinate adjustments.  (Bug#31875)
+
+2018-06-17  Alan Third  <address@hidden>
+
+       Handle NSAttributedString inputs (bug#29837)
+
+
+       * src/nsterm.m (EmacsView::insertText): Handle NSAttributedString.
+
+2018-06-17  Philipp Stephani  <address@hidden>
+
+       Allow inserting non-BMP characters
+
+       * src/coding.h (UTF_16_HIGH_SURROGATE_P, UTF_16_LOW_SURROGATE_P): Move
+       from coding.c and document.
+       (surrogates_to_codepoint): New function.
+
+       * src/nsterm.m (insertText:): Properly handle surrogate pairs.
+
+       (cherry picked from commit 703ac3ea1c1ce381f385469a0e88bc29d3fe83c2)
+
+2018-06-17  Aaron Jensen  <address@hidden>
+
+       Prevent errant scroll on mouse click (Bug#31546)
+
+       * src/nsterm.m (ns_mouse_position): Use correct frame when determining
+         mouse position.
+       * lisp/mouse.el (mouse-drag-track): Only account for mode-line height
+         if `mode-line-format' is non-nil.
+
+2018-06-17  Eli Zaretskii  <address@hidden>
+
+       Minor documentation fix
+
+       * doc/lispref/windows.texi (Window Start and End): Improve
+       documentation and indexing of window-end.
+
+2018-06-16  Eli Zaretskii  <address@hidden>
+
+       * lisp/window.el (window-toggle-side-windows): Doc fix.  (Bug#31858)
+
+2018-06-16  Paul Eggert  <address@hidden>
+
+       Fix byte compilation of (eq foo 'default)
+
+       Backport from master.
+       Do not use the symbol ‘default’ as a special marker.
+       Instead, use a value that cannot appear in the program,
+       improving on a patch proposed by Robert Cochran (Bug#31718#14).
+       * lisp/emacs-lisp/bytecomp.el (byte-compile--default-val):
+       New constant.
+       (byte-compile-cond-jump-table-info)
+       (byte-compile-cond-jump-table): Use it instead of 'default.
+       * test/lisp/emacs-lisp/bytecomp-tests.el:
+       (byte-opt-testsuite-arith-data): Add a test for the bug.
+
+2018-06-16  Michael Albinus  <address@hidden>
+
+       Fix Bug#31846.  Do not merge with master
+
+       * lisp/net/secrets.el (secrets-search-items)
+       (secrets-create-item): Fix format of :dict-entry values.  (Bug#31846)
+
+2018-06-16  Eli Zaretskii  <address@hidden>
+
+       Fix documentation of ':propertize' in mode-line-format
+
+       * doc/lispref/modes.texi (Mode Line Data): Make the description of
+       ':propertize' more accurate.  (Bug#26291)
+
+2018-06-15  Eli Zaretskii  <address@hidden>
+
+       Reject invalid 5-byte sequences when detecting UTF-8 encoding
+
+       * src/coding.c (detect_coding_utf_8): Reject multibyte sequences
+       whose leading byte is greater than MAX_MULTIBYTE_LEADING_CODE.
+       (Bug#31829)
+       * src/character.h (MAX_MULTIBYTE_LEADING_CODE): Add commentary
+       about the connection between the value of this macro and MAX_CHAR.
+
+2018-06-15  Eli Zaretskii  <address@hidden>
+
+       Fix 'replace-buffer-contents' in multibyte buffers
+
+       * src/editfns.c (buffer_chars_equal): Pass a byte position to
+       BUF_FETCH_CHAR_AS_MULTIBYTE, not a character position.
+       (Bug#31837)
+
+       * test/src/editfns-tests.el (replace-buffer-contents-bug31837):
+       New test.
+
+2018-06-15  Robert Pluim  <address@hidden>
+
+       Update etc/NEWS for mail-source-movemail-program change
+
+       * etc/NEWS: Describe change in how we search for
+       mail-source-movemail-program.
+
+2018-06-15  Robert Pluim  <address@hidden>
+
+       Improve movemail default
+
+       * lisp/gnus/mail-source.el (mail-source-movemail-program):
+       Change default to "movemail".
+       (mail-source-movemail): Pass just mail-source-movemail-program to
+       call-process instead of fully specifying it relative to
+       exec-directory.  Ensures that we will find Mailutils movemail if
+       it is installed.  (Bug#31737)
+
+2018-06-15  Eli Zaretskii  <address@hidden>
+
+       Delete description of deleted Customize functions
+
+       * doc/lispref/customize.texi (Variable Definitions): Remove the
+       description of 'custom-initialize-safe-set' and
+       'custom-initialize-safe-default', which were deleted in Emacs
+       23.2, and replace with the description of
+       'custom-initialize-delay'.
+
+2018-06-14  Noam Postavsky  <address@hidden>
+
+       Keep vc-print-log from putting point at buffer end (Bug#31764)
+
+       * lisp/vc/vc.el (vc-print-log-internal): Use `save-excursion' around
+       `vc-print-log-setup-buttons'.
+
+2018-06-14  Paul Eggert  <address@hidden>
+
+       Don’t set EMACS=t if Bash is 4.4 or newer
+
+       (Backport from master.)
+       (Thanks to Stefan Monnier for improvements to this patch.)
+       * lisp/term.el (term--bash-needs-EMACS-status): New var.
+       (term--bash-needs-EMACSp): New function.
+       (term-exec-1): Use it instead of always setting EMACS.
+
+2018-06-14  Eli Zaretskii  <address@hidden>
+
+       Improve commentary in info.el
+
+       * lisp/info.el: Explain in commentary why some commands start with
+       "info-" and others with "Info-".  See also
+       http://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00482.html.
+
+2018-06-13  Michael Albinus  <address@hidden>
+
+       Fix wording in tramp.texi
+
+       * doc/misc/tramp.texi (Frequently Asked Questions):
+       Fix wording for abbreviations.
+
+2018-06-13  Michael Albinus  <address@hidden>
+
+       * doc/misc/tramp.texi (Remote shell setup): Fix typo.
+
+2018-06-12  Sam Steingold  <address@hidden>
+
+       Finish the Bug#11728 work: hg & git
+
+       * lisp/vc/vc-git.el (vc-git--pushpull): Make `extra-args' a list.
+       Do not set `compilation-error-regexp-alist', this is done in
+       `vc-compilation-mode'.
+       (vc-git-error-regexp-alist): Tweak the regexp.
+       * lisp/vc/vc-hg.el (vc-hg-error-regexp-alist): Make non-trivial.
+       (vc-hg--pushpull): Accept `post-processing' argument.
+       Call them after the `command'.
+       (vc-hg-pull): Pass the `post-processing' commands that show which
+       are to be modified by the `update', and then run `update'.
+
+2018-06-12  Sam Steingold  <address@hidden>
+
+       Fix Bug#11728: show files updated by git
+
+       * lisp/vc/vc-git.el (vc-git--pushpull): Accept extra-args and set
+       `compilation-error-regexp-alist' to `vc-git-error-regexp-alist'.
+       (vc-git-pull): Pass "--stat" as `extra-args' to `vc-git--pushpull'.
+       (vc-git-push): Pass "" as `extra-args' to `vc-git--pushpull'.
+
+2018-06-12  Noam Postavsky  <address@hidden>
+
+       Make 'tags' targets respect --with-silent-rules (Bug#31744)
+
+       * lwlib/Makefile.in (TAGS):
+       * lisp/Makefile.in (TAGS):
+       * src/Makefile.in (TAGS): Use AM_V_GEN and AM_V_at.
+       * src/Makefile.in: Note that TAGS are generated in build dir.
+
+2018-06-11  Thomas Fitzsimmons  <address@hidden>
+           Noam Postavsky  <address@hidden>
+
+       soap-client: Add byte-code compatibility function (Bug#31742)
+
+       * lisp/net/soap-client.el: Bump version to 3.1.4.
+       (soap-type-of): New function.
+       (soap-resolve-references, soap-decode-type)
+       (soap-encode-attributes, soap-encode-value): Replace aref
+       calls with calls to soap-type-of.
+
+       * lisp/net/soap-inspect.el (soap-sample-value, soap-inspect):
+       Replace aref calls with calls to soap-type-of.
+
+
+       Backport: (cherry picked from commit
+       1feb2e221349f26ec26bc684e0cce2acecbed3ca)
+
+2018-06-11  Eli Zaretskii  <address@hidden>
+
+       * doc/lispref/files.texi (Unique File Names): Fix a typo.  (Bug#31784)
+
+2018-06-10  Noam Postavsky  <address@hidden>
+
+       Fix term.el cursor movement at bottom margin (Bug#31690)
+
+       * lisp/term.el (term-handle-ansi-escape) <\E[B cud>: Allow moving the
+       cursor to the bottom margin line, rather than stopping one line
+       before.
+
+2018-06-10  Reuben Thomas  <address@hidden>
+
+       Call enchant-lsmod correctly when Enchant is installed with a suffix
+
+       * lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Cope with a
+       version suffix on the binary name, so enchant-2 is converted to
+       enchant-lsmod-2, not enchant-2-lsmod.  (Bug#31761)
+
+       (cherry picked from commit a402d9aacbecf4bf0b9afde592a3b90c71f96832)
+
+2018-06-09  Eli Zaretskii  <address@hidden>
+
+       Enlarge DUMPED_HEAP_SIZE for 64-bit Windows builds
+
+       * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 23MB.  Reported by
+       Andy Moreton <address@hidden>.
+
+2018-06-09  Eli Zaretskii  <address@hidden>
+
+       Update Unicode data files to version 11.0.0 of Unicode
+
+       * admin/unidata/UnicodeData.txt:
+       * admin/unidata/SpecialCasing.txt:
+       * admin/unidata/NormalizationTest.txt:
+       * admin/unidata/copyright.html:
+       * admin/unidata/BidiMirroring.txt:
+       * admin/unidata/BidiBrackets.txt: Import from Unicode 11.0.
+       * admin/notes/unicode: Update the URL for OTF script tags.
+
+       * lisp/international/mule-cmds.el (ucs-names): Update unused ranges.
+       * lisp/international/fontset.el (script-representative-chars): Add
+       hanifi-rohingya, old-sogdian, sogdian, dogra, gunjala-gondi,
+       makasar, and medefaidrin.
+       (otf-script-alist): Add old-hungarian.
+       * lisp/international/characters.el (tbl): Add syntax entries for
+       Supplemental Mathematical Operators, Miscellaneous Symbols and
+       Arrows, and Supplemental Punctuation.
+       Update the list of wide characters.
+
+       * test/lisp/international/ucs-normalize-tests.el
+       (ucs-normalize-tests--failing-lines-part2): Update to match
+       admin/unidata/NormalizationTest.txt.
+
+       * doc/lispref/nonascii.texi (Character Properties): Update the
+       reference to the Unicode Standard.
+       * doc/misc/efaq.texi (New in Emacs 26):
+       * etc/NEWS: Mention compatibility with Unicode 11.0.
+
+2018-06-09  Eli Zaretskii  <address@hidden>
+
+       * etc/NEWS: Belatedly call out vc-hg changes in v26.1.  (Bug#31759)
+
+2018-06-09  Eli Zaretskii  <address@hidden>
+
+       Clarify the documentation of 'dired-recursive-deletes'
+
+       * doc/emacs/dired.texi (Dired Deletion): Clarify text regarding
+       recursive deletion of non-empty directories.  (Bug#31529)
+
+2018-06-08  Eli Zaretskii  <address@hidden>
+
+       Clarify doc string of 'update-glyphless-char-display'
+
+       * lisp/international/characters.el
+       (update-glyphless-char-display): Doc fix.  (Bug#31730)
+
+2018-06-08  Eli Zaretskii  <address@hidden>
+
+       Clarify subtle issues with 'eq' in byte-compiled code
+
+       * doc/lispref/objects.texi (Equality Predicates): Explain why
+       byte-compiled code might compare literal objects with identical
+       contents as 'eq'.  (Bug#31688)
+
+2018-06-07  Gemini Lasswell  <address@hidden>
+
+       Make cl-print respect print-quoted (bug#31649)
+
+       * lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Observe
+       print-quoted when printing quote and its relatives.  Add printing of
+       'function' as #'.
+
+2018-06-07  Martin Rudalics  <address@hidden>
+
+       Fix unexpected jumps of window-point in 'set-window-configuration' 
(Bug#31695)
+
+       * src/window.c (Fset_window_configuration): Prevent that the
+       fix for Bug#12208 affects restoration of window points when
+       using separate minibuffer frames (Bug#31695).
+
+2018-06-06  Nicolas Petton  <address@hidden>
+
+       * etc/emacs.appdata.xml: Update Emacs screenshot.
+
+2018-06-06  Eli Zaretskii  <address@hidden>
+
+       Fix cursor movement by 'next-logical-line' after 'next-line'
+
+       * src/indent.c (Fvertical_motion): Adjust TO_X when line-numbers
+       are being displayed.  Remove unneeded "correction" of TO_X at the
+       goal line.
+
+       * lisp/simple.el (last--line-number-width): Remove unneeded
+       variable.
+       (line-move-visual): Account for line-number display width by
+       adjusting the pixel X coordinate that gets converted into
+       canonical columns passed to vertical-motion, instead of adjusting
+       temporary-goal-column (which then affects next commands, including
+       next-logical-line).  (Bug#31723)
+
+2018-06-05  Allen Li  <address@hidden>
+
+       Fix prompt in bookmark.el (Bug#24726)
+
+       * lisp/bookmark.el (bookmark-set-internal): Conform to the standard
+       default prompt format (per `minibuffer-electric-default-mode') which
+       does not use a colon.
+
+2018-06-05  Basil L. Contovounesios  <address@hidden>
+
+       Improve documentation of 'empty' whitespace-style
+
+       * doc/emacs/display.texi (Useless Whitespace): Clarify that the
+       'empty' whitespace-style option highlights empty lines only at
+       BOB/EOB, as per the docstring of whitespace-style. (bug#31713)
+
+2018-06-05  Paul Eggert  <address@hidden>
+
+       Port FC_COLOR change to older fontconfig
+
+       Problem reported by John ff in:
+       https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html
+       * src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]:
+       Don’t use FC_COLOR on older fontconfigs that don’t have it.
+
+2018-06-05  Robert Pluim  <address@hidden>
+
+       Ignore color fonts when using Xft
+
+       * src/font.c (syms_of_font): New configuration variable
+       xft-ignore-color-fonts, default t.
+       * src/ftfont.c (ftfont_spec_pattern): Tell fontconfig to ignore
+       color fonts if xft-ignore-color-fonts is t.  (Bug#30874, Bug#30045)
+       * etc/NEWS: Document xft-ignore-color-fonts.
+
+2018-06-04  Noam Postavsky  <address@hidden>
+
+       Fix comint-get-old-input-default for output field case (Bug#25028)
+
+       * lisp/comint.el (comint-get-old-input-default): Don't return whole
+       field when point was on an output field.
+
+2018-06-04  Eli Zaretskii  <address@hidden>
+
+       Prevent infloop in 'delete-trailing-whitespace'
+
+       * lisp/simple.el (delete-trailing-whitespace): Avoid inflooping
+       when some region of trailing whitespace is unmodifiable.
+       (Bug#31557)
+
+2018-06-04  Gemini Lasswell  <address@hidden>
+
+       Make cl-print respect print-level and print-length (bug#31559)
+
+       * lisp/emacs-lisp/cl-print.el (cl-print--depth): New variable.
+       (cl-print-object) <cons>: Print ellipsis if printing depth greater
+       than 'print-level' or length of list greater than 'print-length'.
+       (cl-print-object) <vector>: Truncate printing with ellipsis if
+       vector is longer than 'print-length'.
+       (cl-print-object) <cl-structure-object>: Truncate printing with
+       ellipsis if structure has more slots than 'print-length'.
+       (cl-print-object) <:around>: Bind 'cl-print--depth'.
+       * test/lisp/emacs-lisp/cl-print-tests.el
+       (cl-print-tests-3, cl-print-tests-4): New tests.
+
+       (cherry picked from commit 0f48d18fd2a30f29cc3592a835d2a2254c9b0afb)
+
+2018-06-03  Phil Sainty  <address@hidden>
+
+       Fix remote-host directory tracking for shells in `term' buffers
+
+       * lisp/term.el (term-handle-ansi-terminal-messages): Use an explicit
+       tramp method when constructing the tramp path for a non-local host,
+       as this is now mandatory.  "-" is a pseudo-method for the user's
+       `tramp-default-method'.  (Bug#31355)
+
+       Specify the remote username explicitly in all cases, as
+       `tramp-default-user' and `tramp-default-user-alist' could cause the
+       previous logic to fail.
+
+       Minor related improvements to the commentary.
+
+2018-06-03  Eli Zaretskii  <address@hidden>
+
+       Update doc string of 'rx'
+
+       * lisp/emacs-lisp/rx.el (rx): Update the description of some
+       character classes.
+
+2018-06-03  Stefan Monnier  <address@hidden>
+
+       Fix bug#30846, along with misc cleanups found along the way
+
+       * test/src/data-tests.el (data-tests-kill-all-local-variables): New 
test.
+
+       * src/buffer.c (swap_out_buffer_local_variables): Remove.
+       Fuse the body of its loop into that of reset_buffer_local_variables.
+       (Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
+       (reset_buffer_local_variables): Make sure the buffer's local binding
+       is swapped out before removing it from the alist (bug#30846).
+       Call watchers before actually killing the var.
+
+       * src/data.c (Fmake_local_variable): Simplify.
+       Use swap_in_global_binding to swap out any local binding, instead of
+       a mix of find_symbol_value followed by messing with where&found.
+       Don't call swap_in_symval_forwarding since the currently swapped
+       binding is never one we've modified.
+       (Fkill_local_variable): Use swap_in_global_binding rather than messing
+       with where&found to try and trick find_symbol_value into doing the same.
+
+       * src/alloc.c (mark_localized_symbol): 'where' can't be a frame any 
more.
+
+       (cherry picked from commit 3ddff080341580eb6fc18d907181e9cc2301f62d)
+
+2018-06-03  Jay Kamat  <address@hidden>
+
+       esh-opt.el: Fix improper parsing of first argument (Bug#28323)
+
+       Examples of broken behavior:
+
+           sudo -u root whoami
+           Outputs: -u
+           ls -I '*.txt' /dev/null
+           Errors with: *.txt: No such file or directory
+
+       * lisp/eshell/esh-opt.el (eshell--process-args): Refactor usage of
+       args to eshell--args, as we rely on modifications from
+       eshell--process-option and vice versa.  These modifications were not
+       being propogated in the (if (= ai 0)) case, since popping the first
+       element of a list doesn't destructively modify the underlying list
+       object.
+
+       (cherry picked from commit 92a8230e49a65be48442ee95cf50c90514e48f99)
+
+2018-06-03  Noam Postavsky  <address@hidden>
+
+       * lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).
+
+       (cherry picked from commit 217202c084232f36d4fa0fead0f3aca21396d074)
+
+2018-06-03  Noam Postavsky  <address@hidden>
+
+       Fix cl-print for circular sublists (Bug#31146)
+
+       * lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Push each
+       element of list being printed onto cl-print--currently-printing.
+       * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle-2): New
+       test.
+
+       (cherry picked from commit b8aa7ecf54c9b164a59f1b0e9f9fe90531dadd20)
+
+2018-06-03  Lars Ingebrigtsen  <address@hidden>
+
+       Revert "Make mail-extract-address-components return the user name more"
+
+       This reverts commit 8b50ae8b2284b5652c2843a9d0d076f4f657be28.
+
+       According to tests in bug#27656 by OGAWA Hirofumi, this patch
+       led to wrong results when binding
+
+       (dolist (addr '("Rasmus <address@hidden>" "Rasmus <address@hidden>"))
+         (dolist (ignore-single '(t nil))
+           (dolist (ignore-same '(t nil))
+             (let ((mail-extr-ignore-single-names ignore-single)
+                   (mail-extr-ignore-realname-equals-mailbox-name ignore-same))
+               (message "%s" (mail-extract-address-components addr))))))
+
+       in combination.
+
+       (cherry picked from commit a3a9d5434d56f8736cc47e379a1d011d4c779b7c)
+
+2018-06-03  Paul Eggert  <address@hidden>
+
+       Centralize Bug#30931 fix
+
+       * src/marker.c (detach_marker): New function.
+       * src/editfns.c (save_restriction_restore):
+       * src/insdel.c (signal_before_change): Use it.
+
+       (cherry picked from commit 6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb)
+
+2018-06-03  Noam Postavsky  <address@hidden>
+
+       Fix another case of freed markers in the undo-list (Bug#30931)
+
+       * src/alloc.c (free_marker): Remove.
+       * src/editfns.c (save_restriction_restore):
+       * src/insdel.c (signal_before_change): Detach the markers from the
+       buffer when we're done with them instead of calling free_marker on
+       them.
+       * test/src/editfns-tests.el (delete-region-undo-markers-1)
+       (delete-region-undo-markers-2): New tests.
+
+       (cherry picked from commit 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a)
+
+2018-06-03  Paul Eggert  <address@hidden>
+
+       Fix CHECK_ALLOCATED_AND_LIVE abort during GC
+
+       * src/editfns.c (save_restriction_restore):
+       Wait for the GC to free the temporary markers (Bug#30931).
+
+       (cherry picked from commit 670f2ffae718046c0fb37313965a51c040ed096f)
+
+2018-06-03  Noam Postavsky  <address@hidden>
+
+       Don't wait for visible frames to become visible
+
+       For discussion, see thread starting at
+       https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html.
+       * src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before
+       calling x_wait_for_event.
+
+       (cherry picked from commits 2a192e21cf3b04b7f830b4971c1508c611e13a3c
+       and 00c1f771f2a51ffa675ec5a07ea330f2605cd302)
+
+2018-06-03  Tino Calancha  <address@hidden>
+
+       query-replace undo: Handle when user edits the replacement string
+
+       * lisp/replace.el (perform-replace): Update the replacement string
+       after the user edit it (Fix Bug#31538).
+
+       * test/lisp/replace-tests.el (query-replace-undo-bug31538): New test.
+
+       Backport: (cherry picked from commits
+       ea133e04f49afa7928e49a3ac4a85b47f6f13f01
+       and
+       7dcfdf5b14325ae7996f272f14c72810d7c84944)
+
+2018-06-03  Tino Calancha  <address@hidden>
+
+       Backport: Fix corner case in query-replace-regexp undo
+
+       This commit fixes Bug#31492.
+       * lisp/replace.el (replace-match-maybe-edit): Preserve match data.
+
+       * test/lisp/replace-tests.el (query-replace-undo-bug31492): Add test.
+
+       (cherry picked from commit bab73230d1be1fe394b7269c1365ef6fb1a5d9b3)
+
+2018-06-03  Tino Calancha  <address@hidden>
+
+       Backport: Preserve case in query-replace undo
+
+       If the user query and replaces 'foo' with 'BAR', then
+       undo must comeback to 'foo', not to 'FOO' (Bug#31073).
+       * lisp/replace.el (perform-replace): Bind nocasify to non-nil
+       value during undo/undo-all actions.
+       * test/lisp/replace-tests.el (query-replace-undo-bug31073): Add test.
+
+       (cherry picked from commit 32dc0cb1b5ae895d237c7118ccaeb084715934fd)
+
+2018-06-02  Alan Third  <address@hidden>
+
+       Set accessibility subroles for child frame (bug#31324)
+
+
+       * src/nsterm.m (x_set_parent_frame): Set subrole depending on whether
+       frame is a child or not.
+
+2018-06-02  Alan Third  <address@hidden>
+
+       Fix redefinition of child frames on NS
+
+       * src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing
+       parent frame, remove it.
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Improve ELisp documentation of 'clone-indirect-buffer'
+
+       * doc/lispref/buffers.texi (Indirect Buffers): Be more explicit
+       about the value of DISPLAY-FLAG in interactive usage.  (Bug#31648)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Improve documentation of 'inhibit-message'
+
+       * src/xdisp.c (syms_of_xdisp) <inhibit-message>: Warn against
+       setting it non-nil globally.  (Bug#31627)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Improve documentation of comment styles
+
+       * doc/lispref/syntax.texi (Syntax Flags): Define the "a" style.
+       (Bug#31624)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Documentation improvements in newcomment.el
+
+       * lisp/newcomment.el (uncomment-region)
+       (uncomment-region-default): Doc fixes.  (Bug#31615)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Imp[rove documentation of 'with-silent-modifications'
+
+       * doc/lispref/buffers.texi (Buffer Modification): Document
+       'with-silent-modifications'.  (Bug#31613)
+       * doc/lispref/text.texi (Changing Properties): Add a
+       cross-reference to "Buffer Modification".  Improve wording.
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix decoding of directories when "~" includes non-ASCII chars
+
+       * src/fileio.c (Fexpand_file_name): Don't build multibyte strings
+       from unibyte non-ASCII strings when NAME and DEFAULT_DIRECTORY
+       have different multibyteness, as this adds bytes to the byte
+       sequence, and in some situations, e.g., when the home directory
+       includes non-ASCII characters, can fail file APIs.  (Bug#30755)
+
+       * lisp/startup.el (normal-top-level): Make sure default-directory
+       is set to a multibyte string when decoded on MS-Windows.
+
+       (cherry picked from commit 3aab8626ba5080bb04d0fdae52d99c850a842a52)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Don't remove highlight of misspelled word on pdict save
+
+       * lisp/textmodes/ispell.el (ispell-pdict-save): Don't restart
+       flyspell-mode, as bug#11963, which this was supposed to fix, is
+       fixed better by ispell-command-loop, when the user types 'i' or
+       'a'.  Restarting Flyspell mode when the personal dictionary is
+       saved caused bug#31372 as side effect.
+       (ispell-command-loop): Test 'flyspell-mode', not whether
+       flyspell-unhighlight-at is fboundp, to determine whether Flyspell
+       mode is turned on in the current buffer.
+       (flyspell-unhighlight-at): Add declare-function form for it.
+
+       (cherry picked from commit 91e582a31ada28fab5ae55bdbf959a9d30796587)
+
+2018-06-02  Ari Roponen  <address@hidden>
+
+       Fix some problems in the Cairo build
+
+       * src/xterm.c (x_begin_cr_clip): Create image surface.
+       (x_update_end) [USE_CAIRO]: Remove GTK3-specific code.
+       (x_scroll_run) [USE_CAIRO]: Implement scrolling.
+       * src/image.c (lookup_rgb_color) [USE_CAIRO]: Support Cairo.
+       (jpeg_load_body) [USE_CAIRO]: Support Cairo.  Use USE_CAIRO
+       instead of CAIRO for #ifdef's.
+       (imagemagick_load_image) [USE_CAIRO]: Support Cairo.
+       (Bug#31288)
+
+       (cherry picked from commit 2d0eff42b8f1122e00f948759ed01a3be1a8c3fc)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Avoid infloops in font_open_entity
+
+       * src/font.c (font_open_entity): Fail after 15 iterations through
+       the loop that looks for a font whose average_width and height are
+       both positive.  This avoids infinite loops for fonts that, e.g.,
+       report average_width of zero for any possible size we try.
+       (Bug#31316)
+
+       (cherry picked from commit e2879c1f837059335af89022b2a9ac9bc861e96d)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix encoding of characters when using GB18030 fonts
+
+       * lisp/international/fontset.el (font-encoding-alist): Fix the
+       GB18030 entry to encode characters correctly when passing them to
+       the xfont back-end.  (Bug#31315)  See also
+       http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00754.html.
+
+       (cherry picked from commit bbe2cadc544e63e9378350621887f8fb9bbcc236)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix C-p and C-n when wrap-prefix is too wide
+
+       * src/xdisp.c (move_it_in_display_line_to): Avoid looping in
+       previous/next-line when wrap-prefix is set to a too-wide
+       stretch of whitespace.  (Bug#30432)
+
+       (cherry picked from commit 842b3d7412eaed6b2c9f90c3361abb4932ec0b1d)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Avoid redisplay problems with too wide wrap-prefix
+
+       * src/xdisp.c (display_line): Avoid looping in redisplay when
+       wrap-prefix is set to a too-wide stretch of whitespace.
+       (Bug#30432)
+
+       (cherry picked from commit 2a1fe08307402d6217d073f8ab7737750d253dd4)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix 'posn-at-point' when line numbers are displayed
+
+       * src/xdisp.c (pos_visible_p): For the leftmost glyph, adjust the X
+       coordinate due to line-number display.  (Bug#30834)
+
+       (cherry picked from commit 4a20174d7949028f66b18a92a75d6b74194242a8)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Another followup to fixing 'window-text-pixel-width'
+
+       * src/xdisp.c (Fwindow_text_pixel_size): Adjust the return value
+       when we stop one buffer position short of TO.  (Bug#30746)
+
+       (cherry picked from commit 33cba5405c724566673cf023513bfb1faa963bea)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix mouse-set-point when line numbers are displayed
+
+       * src/xdisp.c (move_it_to): Initialize the line_number_produced_p
+       flag before iterating on a new line.  (Bug#30818)
+
+       (cherry picked from commit 5c585b8b994aad4e6844f8eed80bdfbb396e91bf)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       * src/xdisp.c (Fwindow_text_pixel_size): Fix last change.
+
+       (cherry picked from commit 06911714ef66ea81380b1eda75a9f7cfbc9e0b65)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix 'window-text-pixel-size' when display properties are around
+
+       * src/xdisp.c (Fwindow_text_pixel_size): Correct the result when
+       there's a display property at the  TO position, and the call to
+       move_it_to overshoots.  (Bug#30746)
+
+       (cherry picked from commit 50e2c0fb5180a757d8d533518f68837ffe5909be)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix display of TABs in hscrolled windows with line numbers
+
+       * src/dispextern.h (struct it): New members tab_offset and
+       line_number_produced_p.
+       * src/xdisp.c (display_line): Don't set row->x to a negative value
+       if line numbers are being displayed.  (Bug#30582)
+       Reset the line_number_produced_p flag before laying out the glyph
+       row.
+       (x_produce_glyphs): Use the line_number_produced_p flag to decide
+       whether to offset the X coordinate due to line-number display.
+       Use the tab_offset member to restore the original TAB width for
+       alignment purposes.
+       (move_it_in_display_line_to): Don't produce line numbers when moving
+       in hscrolled window to the left of first_visible_x.
+       (maybe_produce_line_number): Set the line_number_produced_p flag.
+       (Bug#30584)
+       * src/term.c (produce_glyphs): Correct TAB width only when
+       line_number_produced_p flag is set.
+
+       (cherry picked from commit 1ac190553886ff20817d3dd218464e2fc6f9e42a)
+
+2018-06-02  Matthias Dahl  <address@hidden>
+
+       Fix wait_reading_process_output wait_proc hang
+
+       * src/process.c (read_process_output): Track bytes read from
+       a process.
+       (wait_reading_process_output): If called recursively through
+       timers and/or process filters via accept-process-output, it is
+       possible that the output of wait_proc has already been read by
+       one of those recursive calls, leaving the original call hanging
+       forever if no further output arrives through that fd and no
+       timeout has been set.  Fix that by using the process read
+       accounting to keep track of how many bytes have been read and
+       use that as a condition to break out of the infinite loop and
+       return to the caller as well as to calculate the proper return
+       value (if a wait_proc is given that is).
+
+       * src/process.h (struct Lisp_Process): Add nbytes_read to track
+       bytes read from a process.
+
+       (cherry picked from commit 4ba32858d61eee16f17b51aca01c15211a0912f8)
+
+2018-06-02  Eli Zaretskii  <address@hidden>
+
+       Fix posn-at-point in Flycheck buffers
+
+       * src/dispnew.c (buffer_posn_from_coords): Improve commentary.
+
+       * src/xdisp.c (move_it_in_display_line_to): Don't exit the loop
+       under truncate-lines if the glyph at TO_CHARPOS was not yet
+       produced.  This avoids bailing out too early when we are at
+       TO_CHARPOS, but didn't yet produce glyphs for that buffer
+       position, because the last call to PRODUCE_GLYPHS at this position
+       was for an object other than the buffer.  For further details, see
+       http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00537.html.
+
+       (cherry picked from commit c0154ac7c3423f68d8f3a2e85a756c9759219039)
+
+2018-06-02  Martin Rudalics  <address@hidden>
+
+       * etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31650)
+
+2018-06-01  Eli Zaretskii  <address@hidden>
+
+       Update Emacs Lisp Intro to match current behavior
+
+       * doc/lispintro/emacs-lisp-intro.texi (Wrong Type of Argument)
+       (debug, debug-on-entry, Void Function, Void Variable): Update the
+       *Backtrace* buffer display to current Emacs.  (Bug#31654)
+
+2018-06-01  Robert Pluim  <address@hidden>
+
+       Fix previous commit
+
+       * doc/emacs/files.texi (Interlocking): Two spaces at end of sentence
+
+2018-06-01  Ville Skyttä  <address@hidden>  (tiny change)
+
+       Fix typos in several manuals (Bug#31610)
+
+2018-06-01  Robert Pluim  <address@hidden>
+
+       Add detailed documentation about lock files
+
+       * doc/emacs/files.texi (Interlocking): Point user at detailed
+       file locking description in lisp reference manual.  Add index
+       entry for '.#' to improve disoverability of information about locking.
+
+       * doc/lispref/files.texi (File Locks): Describe in detail what
+       the form of the lock file is.  Add index entry for '.#' to
+       improve disoverability of information about locking.
+
+       * src/filelock.c (create-lockfiles): Add cross reference to
+       file locking in user manual and to 'lock-buffer'.  Add string
+       '.#' to help users find the doc string.
+
+2018-06-01  Eli Zaretskii  <address@hidden>
+
+       Add commentary for subtle aspect of frame.el
+
+       * lisp/frame.el: Explain why we use symbol-function when adding
+       watchers for certain variables that need to trigger redisplay.
+
+2018-06-01  Eli Zaretskii  <address@hidden>
+
+       Improve documentation of 'directory-files-and-attributes'
+
+       * doc/lispref/files.texi (Contents of Directories): Fix inaccurate
+       description of the return value of directory-files-and-attributes.
+
+       * src/dired.c (Fdirectory_files_and_attributes): Describe the
+       function's value in more detail.
+
+2018-05-30  Katsumi Yamaoka  <address@hidden>
+
+       * lisp/gnus/message.el (message-remove-header): Don't remove things
+       not looking like header (bug#31651).
+
+2018-05-30  Eli Zaretskii  <address@hidden>
+
+       Adapt hexl-mode to native line-number display
+
+       * lisp/hexl.el (hexl-mode-ruler): When display-line-numbers is in
+       effect, adjust offsets and columns to account for the line-number
+       display.  (Bug#31595)
+
+2018-05-30  Michael Albinus  <address@hidden>
+
+       Fix example in Tramp manual
+
+       * doc/misc/tramp.texi (Frequently Asked Questions): Fix wording
+       for the zsh example.
+
+2018-05-29  Robert Pluim  <address@hidden>
+
+       Handle case where Xft is found but not XRender
+
+       * configure.ac (XFT_LIBS): Ensure that HAVE_XFT is no if
+       XRender is not found.  (Bug#31634)
+
+2018-05-29  Michael Albinus  <address@hidden>
+
+       * doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh example.
+
+2018-05-29  Damien Cassou  <address@hidden>
+
+       Improve read-multiple-choice docstring (Bug#31628)
+
+       * lisp/emacs-lisp/rmc.el (read-multiple-choice): Improve docstring.
+
+2018-05-29  Michael Albinus  <address@hidden>
+
+       * doc/misc/tramp.texi (All): Use @code instead of @option for user 
options.
+
+2018-05-29  Michael Albinus  <address@hidden>
+
+       Fix Bug#31605
+
+       * doc/misc/tramp.texi (All): Add @vindex entries for
+       environment variables.
+       (Remote shell setup): New items `tramp-terminal-type' and
+       "Determining a Tramp session".
+       (Frequently Asked Questions): Adapt zsh example.  (Bug#31605)
+
+2018-05-29  Michael Albinus  <address@hidden>
+
+       Sync with Tramp 2.3.4-pre
+
+       * doc/misc/trampver.texi: Change version to "2.3.4-pre
+
+       * lisp/net/tramp.el (tramp-mode, tramp-verbose)
+       (tramp-backup-directory-alist, tramp-auto-save-directory)
+       (tramp-encoding-shell, tramp-encoding-command-switch)
+       (tramp-encoding-command-interactive, tramp-default-method)
+       (tramp-default-method-alist, tramp-default-user)
+       (tramp-default-user-alist, tramp-default-host)
+       (tramp-default-host-alist, tramp-default-proxies-alist)
+       (tramp-save-ad-hoc-proxies, tramp-restricted-shell-hosts-alist)
+       (tramp-local-end-of-line, tramp-rsh-end-of-line)
+       (tramp-login-prompt-regexp, tramp-shell-prompt-pattern)
+       (tramp-password-prompt-regexp, tramp-wrong-passwd-regexp)
+       (tramp-yesno-prompt-regexp, tramp-yn-prompt-regexp)
+       (tramp-terminal-prompt-regexp)
+       (tramp-operation-not-permitted-regexp, tramp-copy-failed-regexp)
+       (tramp-process-alive-regexp, tramp-chunksize)
+       (tramp-process-connection-type, tramp-connection-timeout)
+       (tramp-connection-min-time-diff)
+       (tramp-completion-reread-directory-timeout):
+       * lisp/net/tramp-adb.el (tramp-adb-program)
+       (tramp-adb-connect-if-not-connected, tramp-adb-prompt):
+       * lisp/net/tramp-cache.el (tramp-connection-properties)
+       (tramp-persistency-file-name):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-methods)
+       (tramp-gvfs-zeroconf-domain, tramp-bluez-discover-devices-timeout):
+       * lisp/net/tramp-sh.el (tramp-inline-compress-start-size)
+       (tramp-copy-size-limit, tramp-terminal-type)
+       (tramp-histfile-override, tramp-use-ssh-controlmaster-options)
+       (tramp-remote-path, tramp-remote-process-environment)
+       (tramp-sh-extra-args):
+       * lisp/net/tramp-smb.el (tramp-smb-program, tramp-smb-acl-program)
+       (tramp-smb-conf, tramp-smb-winexe-program)
+       (tramp-smb-winexe-shell-command)
+       (tramp-smb-winexe-shell-command-switch):
+       Dont't require 'tramp.  (Bug#31558)
+
+       * lisp/net/tramp.el (tramp-accept-process-output):
+       * lisp/net/tramp-adb.el (tramp-adb-handle-start-file-process):
+       * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
+       (tramp-sh-handle-start-file-process):
+       * lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
+       (tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
+       (tramp-smb-handle-set-file-acl)
+       (tramp-smb-handle-start-file-process): Suppress timers.
+
+       * lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
+       * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
+       * lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
+       * lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
+       Write proper message.
+
+       * lisp/net/tramp-cmds.el (tramp-change-syntax):
+       Use `customize-set-variable'.
+
+       * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
+       Ensure proper EOL handling for Darwin.
+       (tramp-find-inline-compress): Improve command quoting for w32.
+       Reported by Chris Zheng <address@hidden>.
+       (tramp-open-connection-setup-interactive-shell): Wrap both echo
+       calls in parentheses, in order to avoid double prompt.
+
+       * lisp/net/tramp-smb.el (tramp-smb-errors):
+       Add "NT_STATUS_RESOURCE_NAME_NOT_FOUND".
+
+       * lisp/net/tramp.el (tramp-default-user-alist)
+       (tramp-default-host-alist): Fix docstring.
+       (tramp-dissect-file-name): Adapt docstring.  (Bug#30904)
+       (tramp-make-tramp-file-name): Check, that method is
+       not empty.  (Bug#30038)
+       (tramp-message-show-message): Change default.
+
+       * lisp/net/trampver.el: Change version to "2.3.4-pre".
+
+       * test/lisp/net/tramp-tests.el (ert-x): Require it.
+       (tramp-test10-write-region): Extend test.
+       (tramp--test-emacs27-p, tramp--test-windows-nt): New defuns.
+       (tramp-test11-copy-file, tramp-test12-rename-file)
+       (tramp-test21-file-links, tramp-test24-file-acl)
+       (tramp-test25-file-selinux, tramp--test-check-files): Use them.
+       (tramp-test21-file-links): Do not call `make-symbolic-link' on w32.
+       Fix file name quoting test.
+       (tramp-test32-environment-variables-and-port-numbers):
+       Adapt check for systems which do not support "echo -n".  (Bug#29712)
+       (tramp-test36-find-backup-file-name): Call also
+       `convert-standard-filename' due to w32.
+       (tramp-test41-asynchronous-requests):
+       Use $REMOTE_PARALLEL_PROCESSES.  Flush cache prior file operations.
+       (tramp-test42-auto-load, tramp-test42-delay-load)
+       (tramp-test42-recursive-load, tramp-test42-remote-load-path):
+       Quote command due to w32.
+
+2018-05-28  Eli Zaretskii  <address@hidden>
+
+       Bump Emacs version to 26.1.50
+
+       * msdos/sed2v2.inp:
+       * nt/README.W32:
+       * configure.ac:
+       * README: Bump Emacs version to 26.1.50.
+
+2018-05-27  Thien-Thi Nguyen  <address@hidden>
+
+       Mention pcase as a fifth conditional form
+
+       * doc/lispref/control.texi (Conditionals): ...here,
+       in first para, w/ xref to "Pattern-Matching Conditional".
+
+2018-05-27  Thien-Thi Nguyen  <address@hidden>
+
+       Overhaul pcase documentation
+
+       Suggested by Drew Adams (Bug#31311).
+
+       * doc/lispref/control.texi (Control Structures):
+       Add "Pattern-Matching Conditional" to menu, before "Iteration".
+       (Conditionals): Delete menu.
+       (Pattern matching case statement): Delete node/subsection,
+       by actually moving, renaming, and overhauling it to...
+       (Pattern-Matching Conditional): ...new node/section.
+       (pcase Macro): New node/subsection.
+       (Extending pcase): Likewise.
+       (Backquote Patterns): Likewise.
+       * doc/lispref/elisp.texi (Top) In @detailmenu, add
+       "Pattern-Matching Conditional" under "Control Structures"
+       section and delete "Conditionals" section.
+       * lisp/emacs-lisp/pcase.el (pcase): Rewrite docstring.
+       (pcase-defmacro \` (qpat) ...): Likewise.
+
+2018-05-27  Thien-Thi Nguyen  <address@hidden>
+
+       Use EXPVAL in docstrings of patterns defined using pcase-defmacro
+
+       Suggested by Drew Adams (Bug#31311).
+
+       * lisp/emacs-lisp/cl-macs.el (cl-struct): ...here.
+       * lisp/emacs-lisp/eieio.el (eieio): Likewise.
+       * lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Likewise.
+       * lisp/emacs-lisp/rx.el (rx): Likewise.
+
+2018-05-27  Thien-Thi Nguyen  <address@hidden>
+
+       Introduce EXPVAL for pcase, pcase-defmacro docstrings
+
+       Suggested by Drew Adams (Bug#31311).
+
+       * lisp/emacs-lisp/pcase.el (pcase): Use EXPVAL in
+       docstring to stand for the result of evaluating EXP.
+       (pcase-defmacro): Add (fn ...) form in docstring
+       that includes [DOC], and the EXPVAL convention.
+
+2018-05-27  Thien-Thi Nguyen  <address@hidden>
+
+       Ensure pcase doc shows `QPAT first among extensions
+
+       * lisp/emacs-lisp/pcase.el (pcase--make-docstring):
+       Split extensions display into two phases, collection
+       and display, separated by a reordering step that
+       ensures backquote is the first.
+
+2018-05-25  Nicolas Petton  <address@hidden>
+
+       * etc/HISTORY: Update for Emacs 26.1 release.
+
+       * etc/AUTHORS: Update.
+
 2018-05-25  Noam Postavsky  <address@hidden>
 
        Note caveat for backward regexp searching in docstring (Bug#31584)
@@ -59730,7 +61157,7 @@
 
 This file records repository revisions from
 commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
-commit 35574609dd09e2eab0301309b0e3bf831f627fcc (inclusive).
+commit f205928d1f93f4373d755ca91805a88e022ac414 (inclusive).
 See ChangeLog.1 for earlier changes.
 
 ;; Local Variables:
diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index a8e9fb1..0b0c0a1 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -2729,8 +2729,8 @@ In the old days, when you lacked a @file{~/.emacs} file 
and started an
 Emacs session by typing the command @code{emacs} alone, without naming
 any files, Emacs started with the @file{*scratch*} buffer visible.
 Nowadays, you will see a splash screen.  You can follow one of the
-commands suggested on the splash screen, visit a file, or press the
-spacebar to reach the @file{*scratch*} buffer.
+commands suggested on the splash screen, visit a file, or press @kbd{q}
+to quit the splash screen and reach the @file{*scratch*} buffer.
 
 If you switch to the @file{*scratch*} buffer, type
 @code{(buffer-name)}, position the cursor after it, and then type
diff --git a/etc/HISTORY b/etc/HISTORY
index ba86182..b239904 100644
--- a/etc/HISTORY
+++ b/etc/HISTORY
@@ -12,10 +12,11 @@ development is sketchy, the following text summarizes what 
is known.
 EMACS started out as a set of macros atop the TECO text editor, and
 was first operational in late 1976.  It was inspired by earlier work
 such as the E editor of Stanford, and was based on older TECO macro
-sets.  EMACS in turn inspired several similar editors.  See:
-Stallman RM. EMACS: The Extensible, Customizable Self-Documenting
-Display Editor.  AI Memo 519a, MIT, 1981-03-26
+sets.  See: Stallman RM. EMACS: The Extensible, Customizable
+Self-Documenting Display Editor.  AI Memo 519a, MIT, 1981-03-26
 <http://dspace.mit.edu/bitstream/handle/1721.1/5736/AIM-519A.pdf>.
+EMACS in turn inspired several similar editors.  For a summary of
+this history, see <https://github.com/larsbrinkhoff/emacs-history>.
 
 In 1984, work began on GNU Emacs, a fresh implementation designed to
 run on GNU and GNU-like systems, with a full-featured Lisp at its
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index e8a3015..0efaa63 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -349,6 +349,7 @@ That buffer should be current already."
                  (backtrace-frames 'debug)))
         (print-escape-newlines t)
         (print-escape-control-characters t)
+        ;; If you increase print-level, add more depth in call_debugger.
         (print-level 8)
         (print-length 50)
         (pos (point)))
diff --git a/lisp/files.el b/lisp/files.el
index 31e2f39..eabb3c0 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -148,12 +148,16 @@ This variable is relevant only if `backup-by-copying' and
 Called with an absolute file name as argument, it returns t to enable backup.")
 
 (defcustom buffer-offer-save nil
-  "Non-nil in a buffer means always offer to save buffer on exit.
+  "Non-nil in a buffer means always offer to save buffer on exiting Emacs.
 Do so even if the buffer is not visiting a file.
 Automatically local in all buffers.
 
 Set to the symbol `always' to offer to save buffer whenever
-`save-some-buffers' is called."
+`save-some-buffers' is called.
+
+Note that this option has no effect on `kill-buffer';
+if you want to control what happens when a buffer is killed,
+use `kill-buffer-query-functions'."
   :type '(choice (const :tag "Never" nil)
                  (const :tag "On Emacs exit" t)
                  (const :tag "Whenever save-some-buffers is called" always))
diff --git a/lisp/imenu.el b/lisp/imenu.el
index b4d7d90..94ee6bc 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -179,7 +179,9 @@ with name concatenation."
 
 (defcustom imenu-generic-skip-comments-and-strings t
   "When non-nil, ignore text inside comments and strings.
-Only affects `imenu--generic-function'."
+Only affects `imenu-default-create-index-function' (and any
+alternative implementation of `imenu-create-index-function' that
+uses `imenu--generic-function')."
   :type 'boolean
   :group 'imenu
   :version "24.4")
@@ -730,7 +732,7 @@ for modes which use `imenu--generic-function'.  If it is 
not set, but
 ;; so it needs to be careful never to loop!
 (defun imenu--generic-function (patterns)
   "Return an index alist of the current buffer based on PATTERNS.
-PATTERNS should be an alist with the same form as `imenu-generic-expression'.
+PATTERNS should be an alist of the same form as `imenu-generic-expression'.
 
 If `imenu-generic-skip-comments-and-strings' is non-nil, this ignores
 text inside comments and strings.
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 1d1af82..e7ac2ea 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -268,7 +268,8 @@ available:
        (or (eolp) (not skeleton-end-newline) (newline-and-indent))
        (run-hooks 'skeleton-end-hook)
        (sit-for 0)
-       (or (pos-visible-in-window-p beg)
+       (or (not (eq (window-buffer) (current-buffer)))
+            (pos-visible-in-window-p beg)
            (progn
              (goto-char beg)
              (recenter 0)))
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 88052d7..75f4582 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -301,9 +301,6 @@ in the order given by 'git status'."
                 '("--ignored"))
             "--"))
         (status (apply #'vc-git--run-command-string file args)))
-    ;; Alternatively, the `ignored' state could be detected with 'git
-    ;; ls-files -i -o --exclude-standard', but that's an extra process
-    ;; call, and the `ignored' state is rarely needed.
     (if (null status)
         ;; If status is nil, there was an error calling git, likely because
         ;; the file is not in a git repo.
@@ -568,6 +565,7 @@ or an empty string if none."
 (declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
 
 (defun vc-git-dir-status-goto-stage (git-state)
+  ;; TODO: Look into reimplementing this using `git status --porcelain=v2'.
   (let ((files (vc-git-dir-status-state->files git-state)))
     (erase-buffer)
     (pcase (vc-git-dir-status-state->stage git-state)
@@ -584,7 +582,7 @@ or an empty string if none."
                        "ls-files" "-z" "-c" "-s" "--"))
       (`ls-files-conflict
        (vc-git-command (current-buffer) 'async files
-                       "ls-files" "-z" "-c" "-s" "--"))
+                       "ls-files" "-z" "-u" "--"))
       (`ls-files-unknown
        (vc-git-command (current-buffer) 'async files
                        "ls-files" "-z" "-o" "--directory"
@@ -947,9 +945,6 @@ This prompts for a branch to merge from."
           (vc-git--run-command-string directory "status" "--porcelain" "--"))
          (lines (when status (split-string status "\n" 'omit-nulls)))
          files)
-    ;; TODO: Look into reimplementing `vc-git-state', as well as
-    ;; `vc-git-dir-status-files', based on this output, thus making the
-    ;; extra process call in `vc-git-find-file-hook' unnecessary.
     (dolist (line lines files)
       (when (string-match "\\([ MADRCU?!][ MADRCU?!]\\) \\(.+\\)\\(?: -> 
\\(.+\\)\\)?"
                           line)
@@ -984,15 +979,10 @@ This prompts for a branch to merge from."
 (defun vc-git-find-file-hook ()
   "Activate `smerge-mode' if there is a conflict."
   (when (and buffer-file-name
-             ;; FIXME
-             ;; 1) the net result is to call git twice per file.
-             ;; 2) v-g-c-f is documented to take a directory.
-             ;; https://lists.gnu.org/r/emacs-devel/2014-01/msg01126.html
-             (vc-git-conflicted-files buffer-file-name)
+             (eq (vc-state buffer-file-name 'Git) 'conflict)
              (save-excursion
                (goto-char (point-min))
                (re-search-forward "^<<<<<<< " nil 'noerror)))
-    (vc-file-setprop buffer-file-name 'vc-state 'conflict)
     (smerge-start-session)
     (when vc-git-resolve-conflicts
       (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local))
diff --git a/src/coding.h b/src/coding.h
index 165c1b2..d2cf4d8 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -28,6 +28,8 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 
 #include "lisp.h"
 
+INLINE_HEADER_BEGIN
+
 /* Index to arguments of Fdefine_coding_system_internal.  */
 
 enum define_coding_system_arg_index
@@ -771,4 +773,6 @@ extern struct coding_system safe_terminal_coding;
 
 extern char emacs_mule_bytes[256];
 
+INLINE_HEADER_END
+
 #endif /* EMACS_CODING_H */
diff --git a/src/editfns.c b/src/editfns.c
index efe83e8..e16a554 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3127,6 +3127,9 @@ determines whether case is significant or ignored.  */)
 #undef ELEMENT
 #undef EQUAL
 
+/* Counter used to rarely_quit in replace-buffer-contents.  */
+static unsigned short rbc_quitcounter;
+
 #define XVECREF_YVECREF_EQUAL(ctx, xoff, yoff)  \
   buffer_chars_equal ((ctx), (xoff), (yoff))
 
@@ -3136,6 +3139,9 @@ determines whether case is significant or ignored.  */)
   /* Buffers to compare.  */                    \
   struct buffer *buffer_a;                      \
   struct buffer *buffer_b;                      \
+  /* Whether each buffer is unibyte/plain-ASCII or not.  */ \
+  bool a_unibyte;                              \
+  bool b_unibyte;                              \
   /* Bit vectors recording for each character whether it was deleted
      or inserted.  */                           \
   unsigned char *deletions;                     \
@@ -3216,6 +3222,8 @@ differences between the two buffers.  */)
   struct context ctx = {
     .buffer_a = a,
     .buffer_b = b,
+    .a_unibyte = BUF_ZV (a) == BUF_ZV_BYTE (a),
+    .b_unibyte = BUF_ZV (b) == BUF_ZV_BYTE (b),
     .deletions = SAFE_ALLOCA (del_bytes),
     .insertions = SAFE_ALLOCA (ins_bytes),
     .fdiag = buffer + size_b + 1,
@@ -3232,9 +3240,36 @@ differences between the two buffers.  */)
      early.  */
   eassert (! early_abort);
 
+  rbc_quitcounter = 0;
+
   Fundo_boundary ();
+  bool modification_hooks_inhibited = false;
   record_unwind_protect_excursion ();
 
+  /* We are going to make a lot of small modifications, and having the
+     modification hooks called for each of them will slow us down.
+     Instead, we announce a single modification for the entire
+     modified region.  But don't do that if the caller inhibited
+     modification hooks, because then they don't want that.  */
+  ptrdiff_t from, to;
+  if (!inhibit_modification_hooks)
+    {
+      ptrdiff_t k, l;
+
+      /* Find the first character position to be changed.  */
+      for (k = 0; k < size_a && !bit_is_set (ctx.deletions, k); k++)
+       ;
+      from = BEGV + k;
+
+      /* Find the last character position to be changed.  */
+      for (l = size_a; l > 0 && !bit_is_set (ctx.deletions, l - 1); l--)
+       ;
+      to = BEGV + l;
+      prepare_to_modify_buffer (from, to, NULL);
+      specbind (Qinhibit_modification_hooks, Qt);
+      modification_hooks_inhibited = true;
+    }
+
   ptrdiff_t i = size_a;
   ptrdiff_t j = size_b;
   /* Walk backwards through the lists of changes.  This was also
@@ -3243,15 +3278,13 @@ differences between the two buffers.  */)
   while (i >= 0 || j >= 0)
     {
       /* Allow the user to quit if this gets too slow.  */
-      maybe_quit ();
+      rarely_quit (++rbc_quitcounter);
 
       /* Check whether there is a change (insertion or deletion)
          before the current position.  */
       if ((i > 0 && bit_is_set (ctx.deletions, i - 1)) ||
           (j > 0 && bit_is_set (ctx.insertions, j - 1)))
        {
-         maybe_quit ();
-
           ptrdiff_t end_a = min_a + i;
           ptrdiff_t end_b = min_b + j;
           /* Find the beginning of the current change run.  */
@@ -3259,14 +3292,13 @@ differences between the two buffers.  */)
             --i;
          while (j > 0 && bit_is_set (ctx.insertions, j - 1))
             --j;
+
+         rarely_quit (rbc_quitcounter++);
+
           ptrdiff_t beg_a = min_a + i;
           ptrdiff_t beg_b = min_b + j;
-          eassert (beg_a >= BEGV);
-          eassert (beg_b >= BUF_BEGV (b));
           eassert (beg_a <= end_a);
           eassert (beg_b <= end_b);
-          eassert (end_a <= ZV);
-          eassert (end_b <= BUF_ZV (b));
           eassert (beg_a < end_a || beg_b < end_b);
           if (beg_a < end_a)
             del_range (beg_a, end_a);
@@ -3280,8 +3312,17 @@ differences between the two buffers.  */)
       --i;
       --j;
     }
+  SAFE_FREE_UNBIND_TO (count, Qnil);
+  rbc_quitcounter = 0;
 
-  return SAFE_FREE_UNBIND_TO (count, Qnil);
+  if (modification_hooks_inhibited)
+    {
+      ptrdiff_t updated_to = to + ZV - BEGV - size_a;
+      signal_after_change (from, to - from, updated_to - from);
+      update_compositions (from, updated_to, CHECK_INSIDE);
+    }
+
+  return Qnil;
 }
 
 static void
@@ -3307,39 +3348,45 @@ bit_is_set (const unsigned char *a, ptrdiff_t i)
 /* Return true if the characters at position POS_A of buffer
    CTX->buffer_a and at position POS_B of buffer CTX->buffer_b are
    equal.  POS_A and POS_B are zero-based.  Text properties are
-   ignored.  */
+   ignored.
+
+   Implementation note: this function is called inside the inner-most
+   loops of compareseq, so it absolutely must be optimized for speed,
+   every last bit of it.  E.g., each additional use of BEGV or such
+   likes will slow down replace-buffer-contents by dozens of percents,
+   because builtin_lisp_symbol will be called one more time in the
+   innermost loop.  */
 
 static bool
 buffer_chars_equal (struct context *ctx,
                     ptrdiff_t pos_a, ptrdiff_t pos_b)
 {
-  eassert (pos_a >= 0);
   pos_a += BUF_BEGV (ctx->buffer_a);
-  eassert (pos_a >= BUF_BEGV (ctx->buffer_a));
-  eassert (pos_a < BUF_ZV (ctx->buffer_a));
-
-  eassert (pos_b >= 0);
   pos_b += BUF_BEGV (ctx->buffer_b);
-  eassert (pos_b >= BUF_BEGV (ctx->buffer_b));
-  eassert (pos_b < BUF_ZV (ctx->buffer_b));
-
-  bool a_unibyte = BUF_ZV (ctx->buffer_a) == BUF_ZV_BYTE (ctx->buffer_a);
-  bool b_unibyte = BUF_ZV (ctx->buffer_b) == BUF_ZV_BYTE (ctx->buffer_b);
 
   /* Allow the user to escape out of a slow compareseq call.  */
-  maybe_quit ();
+  rarely_quit (++rbc_quitcounter);
 
   ptrdiff_t bpos_a =
-    a_unibyte ? pos_a : buf_charpos_to_bytepos (ctx->buffer_a, pos_a);
+    ctx->a_unibyte ? pos_a : buf_charpos_to_bytepos (ctx->buffer_a, pos_a);
   ptrdiff_t bpos_b =
-    b_unibyte ? pos_b : buf_charpos_to_bytepos (ctx->buffer_b, pos_b);
+    ctx->b_unibyte ? pos_b : buf_charpos_to_bytepos (ctx->buffer_b, pos_b);
 
-  if (a_unibyte && b_unibyte)
+  /* We make the below a series of specific test to avoid using
+     BUF_FETCH_CHAR_AS_MULTIBYTE, which references Lisp symbols, and
+     is therefore significantly slower (see the note in the commentary
+     to this function).  */
+  if (ctx->a_unibyte && ctx->b_unibyte)
     return BUF_FETCH_BYTE (ctx->buffer_a, bpos_a)
       == BUF_FETCH_BYTE (ctx->buffer_b, bpos_b);
-
-  return BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_a, bpos_a)
-    == BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_b, bpos_b);
+  if (ctx->a_unibyte && !ctx->b_unibyte)
+    return UNIBYTE_TO_CHAR (BUF_FETCH_BYTE (ctx->buffer_a, bpos_a))
+      == BUF_FETCH_MULTIBYTE_CHAR (ctx->buffer_b, bpos_b);
+  if (!ctx->a_unibyte && ctx->b_unibyte)
+    return BUF_FETCH_MULTIBYTE_CHAR (ctx->buffer_a, bpos_a)
+      == UNIBYTE_TO_CHAR (BUF_FETCH_BYTE (ctx->buffer_b, bpos_b));
+  return BUF_FETCH_MULTIBYTE_CHAR (ctx->buffer_a, bpos_a)
+    == BUF_FETCH_MULTIBYTE_CHAR (ctx->buffer_b, bpos_b);
 }
 
 
diff --git a/src/eval.c b/src/eval.c
index c16a267..256ca8f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -282,8 +282,12 @@ call_debugger (Lisp_Object arg)
   /* Do not allow max_specpdl_size less than actual depth (Bug#16603).  */
   EMACS_INT old_max = max (max_specpdl_size, count);
 
-  if (lisp_eval_depth + 40 > max_lisp_eval_depth)
-    max_lisp_eval_depth = lisp_eval_depth + 40;
+  /* The previous value of 40 is too small now that the debugger
+     prints using cl-prin1 instead of prin1.  Printing lists nested 8
+     deep (which is the value of print-level used in the debugger)
+     currently requires 77 additional frames.  See bug#31919.  */
+  if (lisp_eval_depth + 100 > max_lisp_eval_depth)
+    max_lisp_eval_depth = lisp_eval_depth + 100;
 
   /* While debugging Bug#16603, previous value of 100 was found
      too small to avoid specpdl overflow in the debugger itself.  */
diff --git a/src/lisp.h b/src/lisp.h
index 6203a74..731a45d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3012,15 +3012,13 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, 
const char *, int);
   } while (false)
 
 
-/* Elisp uses several stacks:
-   - the C stack.
-   - the bytecode stack: used internally by the bytecode interpreter.
-     Allocated from the C stack.
-   - The specpdl stack: keeps track of active unwind-protect and
-     dynamic-let-bindings.  Allocated from the `specpdl' array, a manually
-     managed stack.
-   - The handler stack: keeps track of active catch tags and condition-case
-     handlers.  Allocated in a manually managed stack implemented by a
+/* Elisp uses multiple stacks:
+   - The C stack.
+   - The specpdl stack keeps track of backtraces, unwind-protects and
+     dynamic let-bindings.  It is allocated from the 'specpdl' array,
+     a manually managed stack.
+   - The handler stack keeps track of active catch tags and condition-case
+     handlers.  It is allocated in a manually managed stack implemented by a
      doubly-linked list allocated via xmalloc and never freed.  */
 
 /* Structure for recording Lisp call stack for backtrace purposes.  */
@@ -3113,7 +3111,7 @@ SPECPDL_INDEX (void)
    control structures.  A struct handler contains all the information needed to
    restore the state of the interpreter after a non-local jump.
 
-   handler structures are chained together in a doubly linked list; the `next'
+   Handler structures are chained together in a doubly linked list; the `next'
    member points to the next outer catchtag and the `nextfree' member points in
    the other direction to the next inner element (which is typically the next
    free element since we mostly use it on the deepest handler).
diff --git a/src/w32fns.c b/src/w32fns.c
index 3bd3209..7f7e1a4 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2192,6 +2192,11 @@ x_set_no_accept_focus (struct frame *f, Lisp_Object 
new_value, Lisp_Object old_v
  *
  * Some window managers may not honor this parameter.  The value `below'
  * is not supported on Windows.
+ *
+ * Internally, this function also handles a value 'above-suspended'.
+ * That value is used to temporarily remove F from the 'above' group
+ * to make sure that it does not obscure the window of a dialog in
+ * progress.
  */
 static void
 x_set_z_group (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
@@ -7583,12 +7588,27 @@ file_dialog_callback (HWND hwnd, UINT msg, WPARAM 
wParam, LPARAM lParam)
   return 0;
 }
 
+/**
+ * w32_dialog_in_progress:
+ *
+ * This function is called by Fx_file_dialog and Fx_select_font and
+ * serves to temporarily remove any Emacs frame currently in the
+ * 'above' z-group from that group to assure that such a frame does
+ * not hide the dialog window.  Frames that are temporarily removed
+ * from the 'above' group have their z_group bit-field set to
+ * z_group_above_suspended.  Any such frame is moved back to the
+ * 'above' group as soon as the dialog finishes and has its z_group
+ * bit-field reset to z_group_above.
+ *
+ * This function does not affect the z-order or the z-group state of
+ * the dialog window itself.
+ */
 void
 w32_dialog_in_progress (Lisp_Object in_progress)
 {
   Lisp_Object frames, frame;
 
-  /* Don't let frames in `above' z-group obscure popups.  */
+  /* Don't let frames in `above' z-group obscure dialog windows.  */
   FOR_EACH_FRAME (frames, frame)
     {
       struct frame *f = XFRAME (frame);
diff --git a/src/xterm.c b/src/xterm.c
index 9504bfb..af28dab 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10566,6 +10566,10 @@ x_set_skip_taskbar (struct frame *f, Lisp_Object 
new_value, Lisp_Object old_valu
  * windows that do not have the `below' property set.
  *
  * Some window managers may not honor this parameter.
+ *
+ * Internally, this function also handles a value 'above-suspended'.
+ * That value is used to temporarily remove F from the 'above' group
+ * to make sure that it does not obscure a menu currently popped up.
  */
 void
 x_set_z_group (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]