]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoFix Bug#31846. Do not merge with master
Michael Albinus [Sat, 16 Jun 2018 14:05:07 +0000 (16:05 +0200)]
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)

6 years agoFix documentation of ':propertize' in mode-line-format
Eli Zaretskii [Sat, 16 Jun 2018 11:00:47 +0000 (14:00 +0300)]
Fix documentation of ':propertize' in mode-line-format

* doc/lispref/modes.texi (Mode Line Data): Make the description of
':propertize' more accurate.  (Bug#26291)

6 years agoReject invalid 5-byte sequences when detecting UTF-8 encoding
Eli Zaretskii [Fri, 15 Jun 2018 14:39:34 +0000 (17:39 +0300)]
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.

6 years agoFix 'replace-buffer-contents' in multibyte buffers
Eli Zaretskii [Fri, 15 Jun 2018 08:27:56 +0000 (11:27 +0300)]
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.

6 years agoUpdate etc/NEWS for mail-source-movemail-program change
Robert Pluim [Fri, 15 Jun 2018 08:24:43 +0000 (10:24 +0200)]
Update etc/NEWS for mail-source-movemail-program change

* etc/NEWS: Describe change in how we search for
mail-source-movemail-program.

6 years agoImprove movemail default
Robert Pluim [Fri, 15 Jun 2018 07:40:53 +0000 (00:40 -0700)]
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)

6 years agoDelete description of deleted Customize functions
Eli Zaretskii [Fri, 15 Jun 2018 07:32:45 +0000 (10:32 +0300)]
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'.

6 years agoKeep vc-print-log from putting point at buffer end (Bug#31764)
Noam Postavsky [Tue, 12 Jun 2018 00:00:54 +0000 (20:00 -0400)]
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'.

6 years agoDon’t set EMACS=t if Bash is 4.4 or newer
Paul Eggert [Sat, 26 May 2018 20:29:06 +0000 (13:29 -0700)]
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.

6 years agoImprove commentary in info.el
Eli Zaretskii [Thu, 14 Jun 2018 13:54:08 +0000 (16:54 +0300)]
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.

6 years ago; Further wording fix in tramp.texi
Michael Albinus [Wed, 13 Jun 2018 08:28:39 +0000 (10:28 +0200)]
; Further wording fix in tramp.texi

6 years agoFix wording in tramp.texi
Michael Albinus [Wed, 13 Jun 2018 07:34:35 +0000 (09:34 +0200)]
Fix wording in tramp.texi

* doc/misc/tramp.texi (Frequently Asked Questions):
Fix wording for abbreviations.

6 years ago* doc/misc/tramp.texi (Remote shell setup): Fix typo.
Michael Albinus [Wed, 13 Jun 2018 07:21:29 +0000 (09:21 +0200)]
* doc/misc/tramp.texi (Remote shell setup): Fix typo.

6 years agoFinish the Bug#11728 work: hg & git
Sam Steingold [Fri, 3 Nov 2017 16:00:35 +0000 (12:00 -0400)]
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'.

6 years agoFix Bug#11728: show files updated by git
Sam Steingold [Wed, 1 Nov 2017 23:13:46 +0000 (19:13 -0400)]
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'.

6 years ago; Reduce quoting for SELECTOR in 'make -C test' (Bug#31744)
Noam Postavsky [Thu, 7 Jun 2018 01:25:52 +0000 (21:25 -0400)]
; Reduce quoting for SELECTOR in 'make -C test' (Bug#31744)

Before:

    make -C test SELECTOR='\"foo\"'
    make -C test SELECTOR='(quote (tag :some-tag))'

After:

    make -C test SELECTOR='"foo"'
    make -C test SELECTOR='(tag :some-tag)'

* test/Makefile.in: Use single quotes around the command line call to
ert, this means the user doesn't have to backslash escape double
quotes when writing lisp strings for the selector.  Also wrap the
SELECTOR value in (quote ...) so the user won't have to type it
in (and not get tempted to use the '... reader syntax form which would
now fail to work due to using single quotes around the whole shell
arg).
* test/README: Update instructions accordingly.

6 years ago; test/Makefile.in: Add TEST_INTERACTIVE option (Bug#31744).
Noam Postavsky [Sun, 17 Dec 2017 01:06:11 +0000 (20:06 -0500)]
; test/Makefile.in: Add TEST_INTERACTIVE option (Bug#31744).

* test/README: Note the new option.

6 years agoMake 'tags' targets respect --with-silent-rules (Bug#31744)
Noam Postavsky [Thu, 7 Dec 2017 09:31:47 +0000 (04:31 -0500)]
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.

6 years agosoap-client: Add byte-code compatibility function (Bug#31742)
Thomas Fitzsimmons [Sat, 9 Jun 2018 02:41:28 +0000 (22:41 -0400)]
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.

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
Backport: (cherry picked from commit
1feb2e221349f26ec26bc684e0cce2acecbed3ca)

6 years ago* doc/lispref/files.texi (Unique File Names): Fix a typo. (Bug#31784)
Eli Zaretskii [Mon, 11 Jun 2018 16:58:14 +0000 (19:58 +0300)]
* doc/lispref/files.texi (Unique File Names): Fix a typo.  (Bug#31784)

6 years agoFix term.el cursor movement at bottom margin (Bug#31690)
Noam Postavsky [Sat, 2 Jun 2018 19:57:33 +0000 (15:57 -0400)]
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.

6 years agoCall enchant-lsmod correctly when Enchant is installed with a suffix
Reuben Thomas [Fri, 16 Mar 2018 10:50:21 +0000 (10:50 +0000)]
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)

6 years agoEnlarge DUMPED_HEAP_SIZE for 64-bit Windows builds
Eli Zaretskii [Sat, 9 Jun 2018 18:14:04 +0000 (21:14 +0300)]
Enlarge DUMPED_HEAP_SIZE for 64-bit Windows builds

* src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 23MB.  Reported by
Andy Moreton <andrewjmoreton@gmail.com>.

6 years agoUpdate Unicode data files to version 11.0.0 of Unicode
Eli Zaretskii [Sat, 9 Jun 2018 12:41:21 +0000 (15:41 +0300)]
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.

6 years ago* etc/NEWS: Belatedly call out vc-hg changes in v26.1. (Bug#31759)
Eli Zaretskii [Sat, 9 Jun 2018 09:33:20 +0000 (12:33 +0300)]
* etc/NEWS: Belatedly call out vc-hg changes in v26.1.  (Bug#31759)

6 years agoClarify the documentation of 'dired-recursive-deletes'
Eli Zaretskii [Sat, 9 Jun 2018 08:58:27 +0000 (11:58 +0300)]
Clarify the documentation of 'dired-recursive-deletes'

* doc/emacs/dired.texi (Dired Deletion): Clarify text regarding
recursive deletion of non-empty directories.  (Bug#31529)

6 years ago; * etc/DEBUG: Add information about debugging libXft problems.
Eli Zaretskii [Fri, 8 Jun 2018 15:22:50 +0000 (18:22 +0300)]
; * etc/DEBUG: Add information about debugging libXft problems.

6 years agoClarify doc string of 'update-glyphless-char-display'
Eli Zaretskii [Fri, 8 Jun 2018 15:15:26 +0000 (18:15 +0300)]
Clarify doc string of 'update-glyphless-char-display'

* lisp/international/characters.el
(update-glyphless-char-display): Doc fix.  (Bug#31730)

6 years agoClarify subtle issues with 'eq' in byte-compiled code
Eli Zaretskii [Fri, 8 Jun 2018 15:06:34 +0000 (18:06 +0300)]
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)

6 years agoMake cl-print respect print-quoted (bug#31649)
Gemini Lasswell [Tue, 29 May 2018 18:41:09 +0000 (11:41 -0700)]
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 #'.

6 years agoFix unexpected jumps of window-point in 'set-window-configuration' (Bug#31695)
Martin Rudalics [Thu, 7 Jun 2018 07:59:38 +0000 (09:59 +0200)]
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).

6 years ago* etc/emacs.appdata.xml: Update Emacs screenshot.
Nicolas Petton [Wed, 6 Jun 2018 18:55:33 +0000 (20:55 +0200)]
* etc/emacs.appdata.xml: Update Emacs screenshot.

6 years agoFix cursor movement by 'next-logical-line' after 'next-line'
Eli Zaretskii [Wed, 6 Jun 2018 15:28:44 +0000 (18:28 +0300)]
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)

6 years agoFix prompt in bookmark.el (Bug#24726)
Allen Li [Sat, 8 Apr 2017 22:21:12 +0000 (15:21 -0700)]
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.

6 years agoImprove documentation of 'empty' whitespace-style
Basil L. Contovounesios [Mon, 4 Jun 2018 16:39:40 +0000 (17:39 +0100)]
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)

6 years ago; * src/ftfont.c (ftfont_spec_pattern): Fix whitespace.
Eli Zaretskii [Tue, 3 Apr 2018 16:59:40 +0000 (19:59 +0300)]
; * src/ftfont.c (ftfont_spec_pattern): Fix whitespace.

6 years agoPort FC_COLOR change to older fontconfig
Paul Eggert [Tue, 3 Apr 2018 15:12:41 +0000 (08:12 -0700)]
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.

6 years agoIgnore color fonts when using Xft
Robert Pluim [Tue, 3 Apr 2018 09:06:01 +0000 (11:06 +0200)]
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.

6 years agoFix comint-get-old-input-default for output field case (Bug#25028)
Noam Postavsky [Fri, 11 May 2018 11:05:53 +0000 (07:05 -0400)]
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.

6 years ago; ChangeLog.3: Fix typo.
Noam Postavsky [Mon, 4 Jun 2018 23:41:21 +0000 (19:41 -0400)]
; ChangeLog.3: Fix typo.

6 years agoPrevent infloop in 'delete-trailing-whitespace'
Eli Zaretskii [Mon, 4 Jun 2018 16:33:07 +0000 (19:33 +0300)]
Prevent infloop in 'delete-trailing-whitespace'

* lisp/simple.el (delete-trailing-whitespace): Avoid inflooping
when some region of trailing whitespace is unmodifiable.
(Bug#31557)

6 years agoMake cl-print respect print-level and print-length (bug#31559)
Gemini Lasswell [Sun, 27 May 2018 18:38:00 +0000 (11:38 -0700)]
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)

6 years agoFix remote-host directory tracking for shells in `term' buffers
Phil Sainty [Thu, 3 May 2018 13:29:42 +0000 (01:29 +1200)]
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.

6 years agoUpdate doc string of 'rx'
Eli Zaretskii [Sun, 3 Jun 2018 17:20:52 +0000 (20:20 +0300)]
Update doc string of 'rx'

* lisp/emacs-lisp/rx.el (rx): Update the description of some
character classes.

6 years ago; Merge: backports from master
Noam Postavsky [Sun, 3 Jun 2018 16:55:37 +0000 (12:55 -0400)]
; Merge: backports from master

6 years agoFix bug#30846, along with misc cleanups found along the way
Stefan Monnier [Fri, 23 Mar 2018 15:29:06 +0000 (11:29 -0400)]
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)

6 years agoesh-opt.el: Fix improper parsing of first argument (Bug#28323)
Jay Kamat [Tue, 8 May 2018 19:04:00 +0000 (12:04 -0700)]
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)

6 years ago* lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).
Noam Postavsky [Fri, 27 Apr 2018 11:27:59 +0000 (07:27 -0400)]
* lisp/epa.el (epa-decrypt-file): Apply epa-pinentry-mode (Bug#30363).

(cherry picked from commit 217202c084232f36d4fa0fead0f3aca21396d074)

6 years agoFix cl-print for circular sublists (Bug#31146)
Noam Postavsky [Sat, 14 Apr 2018 05:02:25 +0000 (01:02 -0400)]
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)

6 years agoRevert "Make mail-extract-address-components return the user name more"
Lars Ingebrigtsen [Sun, 15 Apr 2018 17:28:04 +0000 (19:28 +0200)]
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 <rasmus@gmx.us>" "Rasmus <mbox@gmx.us>"))
  (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)

6 years agoCentralize Bug#30931 fix
Paul Eggert [Fri, 30 Mar 2018 21:23:55 +0000 (14:23 -0700)]
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)

6 years agoFix another case of freed markers in the undo-list (Bug#30931)
Noam Postavsky [Fri, 30 Mar 2018 20:44:24 +0000 (16:44 -0400)]
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)

6 years agoFix CHECK_ALLOCATED_AND_LIVE abort during GC
Paul Eggert [Fri, 30 Mar 2018 06:00:23 +0000 (23:00 -0700)]
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)

6 years agoDon't wait for visible frames to become visible
Noam Postavsky [Thu, 29 Mar 2018 23:11:47 +0000 (19:11 -0400)]
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)

6 years agoquery-replace undo: Handle when user edits the replacement string
Tino Calancha [Sun, 3 Jun 2018 14:28:30 +0000 (23:28 +0900)]
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)

6 years agoBackport: Fix corner case in query-replace-regexp undo
Tino Calancha [Sun, 3 Jun 2018 14:28:24 +0000 (23:28 +0900)]
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)

6 years agoBackport: Preserve case in query-replace undo
Tino Calancha [Sun, 3 Jun 2018 14:28:14 +0000 (23:28 +0900)]
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)

6 years agoSet accessibility subroles for child frame (bug#31324)
Alan Third [Sun, 13 May 2018 10:02:00 +0000 (11:02 +0100)]
Set accessibility subroles for child frame (bug#31324)

; Depends on patch in bug#31440.

* src/nsterm.m (x_set_parent_frame): Set subrole depending on whether
frame is a child or not.

6 years agoFix redefinition of child frames on NS
Alan Third [Sun, 13 May 2018 09:33:44 +0000 (10:33 +0100)]
Fix redefinition of child frames on NS

* src/nsterm.m (x_set_parent_frame): If the NSWindow has an existing
parent frame, remove it.

6 years agoImprove ELisp documentation of 'clone-indirect-buffer'
Eli Zaretskii [Sat, 2 Jun 2018 11:15:10 +0000 (14:15 +0300)]
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)

6 years agoImprove documentation of 'inhibit-message'
Eli Zaretskii [Sat, 2 Jun 2018 11:09:11 +0000 (14:09 +0300)]
Improve documentation of 'inhibit-message'

* src/xdisp.c (syms_of_xdisp) <inhibit-message>: Warn against
setting it non-nil globally.  (Bug#31627)

6 years agoImprove documentation of comment styles
Eli Zaretskii [Sat, 2 Jun 2018 11:01:18 +0000 (14:01 +0300)]
Improve documentation of comment styles

* doc/lispref/syntax.texi (Syntax Flags): Define the "a" style.
(Bug#31624)

6 years agoDocumentation improvements in newcomment.el
Eli Zaretskii [Sat, 2 Jun 2018 10:43:43 +0000 (13:43 +0300)]
Documentation improvements in newcomment.el

* lisp/newcomment.el (uncomment-region)
(uncomment-region-default): Doc fixes.  (Bug#31615)

6 years agoImp[rove documentation of 'with-silent-modifications'
Eli Zaretskii [Sat, 2 Jun 2018 10:27:22 +0000 (13:27 +0300)]
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.

6 years agoFix decoding of directories when "~" includes non-ASCII chars
Eli Zaretskii [Fri, 18 May 2018 13:34:19 +0000 (16:34 +0300)]
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)

6 years agoDon't remove highlight of misspelled word on pdict save
Eli Zaretskii [Sun, 6 May 2018 18:20:31 +0000 (21:20 +0300)]
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)

6 years agoFix some problems in the Cairo build
Ari Roponen [Fri, 27 Apr 2018 12:13:12 +0000 (15:13 +0300)]
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)

6 years agoAvoid infloops in font_open_entity
Eli Zaretskii [Sat, 5 May 2018 08:52:29 +0000 (11:52 +0300)]
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)

6 years agoFix encoding of characters when using GB18030 fonts
Eli Zaretskii [Sat, 5 May 2018 08:45:37 +0000 (11:45 +0300)]
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)

6 years agoFix C-p and C-n when wrap-prefix is too wide
Eli Zaretskii [Fri, 30 Mar 2018 12:57:57 +0000 (15:57 +0300)]
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)

6 years agoAvoid redisplay problems with too wide wrap-prefix
Eli Zaretskii [Tue, 20 Mar 2018 17:05:21 +0000 (19:05 +0200)]
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)

6 years agoFix 'posn-at-point' when line numbers are displayed
Eli Zaretskii [Fri, 16 Mar 2018 17:15:33 +0000 (19:15 +0200)]
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)

6 years agoAnother followup to fixing 'window-text-pixel-width'
Eli Zaretskii [Fri, 16 Mar 2018 16:11:07 +0000 (18:11 +0200)]
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)

6 years agoFix mouse-set-point when line numbers are displayed
Eli Zaretskii [Thu, 15 Mar 2018 13:13:50 +0000 (15:13 +0200)]
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)

6 years ago* src/xdisp.c (Fwindow_text_pixel_size): Fix last change.
Eli Zaretskii [Tue, 13 Mar 2018 18:00:54 +0000 (20:00 +0200)]
* src/xdisp.c (Fwindow_text_pixel_size): Fix last change.

(cherry picked from commit 06911714ef66ea81380b1eda75a9f7cfbc9e0b65)

6 years agoFix 'window-text-pixel-size' when display properties are around
Eli Zaretskii [Thu, 8 Mar 2018 13:32:23 +0000 (15:32 +0200)]
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)

6 years agoFix display of TABs in hscrolled windows with line numbers
Eli Zaretskii [Wed, 7 Mar 2018 18:40:44 +0000 (20:40 +0200)]
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)

6 years agoFix wait_reading_process_output wait_proc hang
Matthias Dahl [Fri, 16 Feb 2018 15:57:40 +0000 (17:57 +0200)]
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)

6 years agoMerge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26
Eli Zaretskii [Sat, 2 Jun 2018 09:10:51 +0000 (12:10 +0300)]
Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26

6 years agoFix posn-at-point in Flycheck buffers
Eli Zaretskii [Fri, 19 Jan 2018 14:18:41 +0000 (16:18 +0200)]
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)

6 years ago; * etc/PROBLEMS: Fix fvwm version number in last commit
Martin Rudalics [Sat, 2 Jun 2018 09:05:52 +0000 (11:05 +0200)]
; * etc/PROBLEMS: Fix fvwm version number in last commit

6 years ago* etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31650)
Martin Rudalics [Sat, 2 Jun 2018 07:49:13 +0000 (09:49 +0200)]
* etc/PROBLEMS: Document stickyness problem with FVWM (Bug#31650)

6 years agoUpdate Emacs Lisp Intro to match current behavior
Eli Zaretskii [Fri, 1 Jun 2018 14:11:36 +0000 (17:11 +0300)]
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)

6 years agoMerge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26
Eli Zaretskii [Fri, 1 Jun 2018 14:10:46 +0000 (17:10 +0300)]
Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26

6 years agoFix previous commit
Robert Pluim [Fri, 1 Jun 2018 13:34:33 +0000 (15:34 +0200)]
Fix previous commit

* doc/emacs/files.texi (Interlocking): Two spaces at end of sentence

6 years agoFix typos in several manuals (Bug#31610)
Ville Skyttä [Sun, 27 May 2018 17:03:10 +0000 (19:03 +0200)]
Fix typos in several manuals (Bug#31610)

Copyright-paperwork-exempt: yes

6 years agoAdd detailed documentation about lock files
Robert Pluim [Fri, 1 Jun 2018 13:05:23 +0000 (15:05 +0200)]
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.

6 years agoAdd commentary for subtle aspect of frame.el
Eli Zaretskii [Fri, 1 Jun 2018 12:34:30 +0000 (15:34 +0300)]
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.

6 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Jun 2018 10:30:31 +0000 (06:30 -0400)]
; Auto-commit of loaddefs files.

6 years ago; * etc/NEWS: Belated announcement of 2 changes made in Emacs 26.1.
Eli Zaretskii [Fri, 1 Jun 2018 08:37:56 +0000 (11:37 +0300)]
; * etc/NEWS: Belated announcement of 2 changes made in Emacs 26.1.

6 years agoImprove documentation of 'directory-files-and-attributes'
Eli Zaretskii [Fri, 1 Jun 2018 08:27:29 +0000 (11:27 +0300)]
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.

6 years ago* lisp/gnus/message.el (message-remove-header): Don't remove things
Katsumi Yamaoka [Wed, 30 May 2018 23:30:11 +0000 (23:30 +0000)]
* lisp/gnus/message.el (message-remove-header): Don't remove things
not looking like header (bug#31651).

6 years ago; * etc/NEWS: Add headings for Emacs 26.2
Eli Zaretskii [Wed, 30 May 2018 19:31:52 +0000 (22:31 +0300)]
; * etc/NEWS: Add headings for Emacs 26.2

6 years agoAdapt hexl-mode to native line-number display
Eli Zaretskii [Wed, 30 May 2018 17:30:07 +0000 (20:30 +0300)]
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)

6 years agoFix example in Tramp manual
Michael Albinus [Wed, 30 May 2018 07:00:04 +0000 (09:00 +0200)]
Fix example in Tramp manual

* doc/misc/tramp.texi (Frequently Asked Questions): Fix wording
for the zsh example.

6 years agoHandle case where Xft is found but not XRender
Robert Pluim [Tue, 29 May 2018 18:32:08 +0000 (20:32 +0200)]
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)

6 years ago* doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh example.
Michael Albinus [Tue, 29 May 2018 17:45:23 +0000 (19:45 +0200)]
* doc/misc/tramp.texi (Frequently Asked Questions): Adapt zsh example.

6 years agoImprove read-multiple-choice docstring (Bug#31628)
Damien Cassou [Mon, 28 May 2018 15:12:34 +0000 (17:12 +0200)]
Improve read-multiple-choice docstring (Bug#31628)

* lisp/emacs-lisp/rmc.el (read-multiple-choice): Improve docstring.

6 years ago* doc/misc/tramp.texi (All): Use @code instead of @option for user options.
Michael Albinus [Tue, 29 May 2018 10:42:17 +0000 (12:42 +0200)]
* doc/misc/tramp.texi (All): Use @code instead of @option for user options.

6 years agoFix Bug#31605
Michael Albinus [Tue, 29 May 2018 10:28:01 +0000 (12:28 +0200)]
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)