]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoDon’t ignore stderr failure when ADDRESS_SANITIZER
Paul Eggert [Sun, 7 Jul 2019 00:41:52 +0000 (17:41 -0700)]
Don’t ignore stderr failure when ADDRESS_SANITIZER

* src/emacs.c (close_output_streams): Move from here ...
* src/sysdep.c: ... to here, where it really belongs anyway.
When ADDRESS_SANITIZER, fflush stderr and check for ferror,
to catch stderr output errors even in this case.

5 years ago* lisp/emacs-lisp/nadvice.el: Make it a package separate from `emacs`.
Stefan Monnier [Sat, 6 Jul 2019 22:42:02 +0000 (18:42 -0400)]
* lisp/emacs-lisp/nadvice.el: Make it a package separate from `emacs`.

* lisp/finder.el (finder-compile-keywords): Grab version from
package--builtin-versions when available.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:52:12 +0000 (12:52 -0700)]
Merge from origin/emacs-26

1e6d8e0 (origin/emacs-26) ; * doc/emacs/killing.texi (Secondary Selec...
e2344a7 * lisp/svg.el, lisp/progmodes/ada-mode.el: Fix bug#36360.
ff738ab Minor copyedit of "Font Lock" in user manual
faf99dc Improve description of image descriptors
21351cc ; * src/lread.c (Fread): Make the comment wording more accurate.
d176090 Improve documentation of secondary selections
8910fe1 * src/fns.c (Fmapconcat): Doc fix.  (Bug#36418)

# Conflicts:
# lisp/svg.el

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

f0db687 Avoid crash inside CFCharacterSetIsLongCharacterMember (Bug#3...

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
Merge from origin/emacs-26

e97c043 Fix python.el docstring (Bug#36458)
e660801 ; Add thing-at-point-looking-at test (Bug#35708)
f5b4846 ; Fix typo, insure -> ensure in ChangeLogs
cb8fb59 * lisp/hi-lock.el (hi-lock-line-face-buffer): Doc fix.  (Bug3...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

dc5ed2c (emacs-26) ; Auto-commit of loaddefs files.

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 6 Jul 2019 19:51:30 +0000 (12:51 -0700)]
Merge from origin/emacs-26

316f5a3 Fix typo in doc string of file-exists-p (bug#36408)
bfc7c6e * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX f...
13b95e1 Fix typo in windows.texi
8b775c3 Clarify & update (elisp) Writing Emacs Primitives
7648c12 Clarify a subtle issue in the Internals chapter of lispref

5 years ago* lisp/dom.el (dom-texts): Simplify (Bug#36441).
Xu Chunyang [Sun, 30 Jun 2019 04:30:22 +0000 (12:30 +0800)]
* lisp/dom.el (dom-texts): Simplify (Bug#36441).

5 years agoUse buffer's name for help-mode bookmarks (Bug#24573)
Noam Postavsky [Sat, 28 Oct 2017 19:48:17 +0000 (15:48 -0400)]
Use buffer's name for help-mode bookmarks (Bug#24573)

* lisp/help-mode.el (help-bookmark-make-record): Replace buffer
objects with their names in help-args, otherwise the bookmark won't be
readable from the bookmark save file.

5 years agoAdd commentary about #$ in autoload files
Noam Postavsky [Sat, 6 Jul 2019 02:26:13 +0000 (22:26 -0400)]
Add commentary about #$ in autoload files

* lisp/emacs-lisp/autoload.el (autoload-rubric): Add commentary about
`#$' trick.

5 years ago; * doc/emacs/killing.texi (Secondary Selection): Fix last change.
Eli Zaretskii [Sat, 6 Jul 2019 18:33:45 +0000 (21:33 +0300)]
; * doc/emacs/killing.texi (Secondary Selection): Fix last change.

5 years agoFix indentation of default clocking definitions.
Wilson Snyder [Sat, 6 Jul 2019 17:33:59 +0000 (13:33 -0400)]
Fix indentation of default clocking definitions.

* verilog-mode.el (verilog-default-clocking-re): Fix indentation of default
clocking definitions, Verilog-Mode bug1457. Reported by Paul Donahue.

5 years agoBackout replacing manually crafted hex regexes with [:xdigit:].
Wilson Snyder [Sat, 6 Jul 2019 17:27:13 +0000 (13:27 -0400)]
Backout replacing manually crafted hex regexes with [:xdigit:].

* lisp/progmodes/verilog-mode.el (verilog-delay-re):
(verilog-type-font-keywords, verilog-read-always-signals-recurse):
(verilog-is-number): Backout replacing manually crafted hex regexes with
[:xdigit:] (Bug#36167).  This repairs Verilog-mode regressions;
Verilog-mode maintains back-compatibility with Emacsen before this syntax
was supported.

5 years agoUpdate current buffer when changing text properties
Pip Cet [Sat, 6 Jul 2019 15:21:04 +0000 (15:21 +0000)]
Update current buffer when changing text properties

* src/textprop.c (add_text_properties_1, set_text_properties)
(set_text_properties_1, Fremove_text_properties): Switch buffer if
necessary.  (Bug#36190)

* doc/lispref/text.texi (Examining Properties): Document performance
FIXME.

5 years ago* lisp/svg.el, lisp/progmodes/ada-mode.el: Fix bug#36360.
Stefan Monnier [Sat, 6 Jul 2019 16:16:24 +0000 (12:16 -0400)]
* lisp/svg.el, lisp/progmodes/ada-mode.el: Fix bug#36360.

Tell package.el their version number, for better behavior w.r.t the
versions available in GNU ELPA

5 years agoUpdate from Gnulib
Paul Eggert [Sat, 6 Jul 2019 15:54:24 +0000 (08:54 -0700)]
Update from Gnulib

This incorporates:
2019-07-06 thread, lock, cond, tls: Remove support for Pth threads
2019-07-02 verify: document ‘assume’ better
2019-06-30 Include <stdlib.h> when needed
2019-06-30 inet_ntop, inet_pton: Avoid conflict with native Windows
* build-aux/config.sub, lib/faccessat.c, lib/fcntl.c, lib/fstatat.c:
* lib/readlinkat.c, lib/verify.h, m4/pthread_sigmask.m4:
* m4/sys_socket_h.m4: Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

5 years agoFix [[:xdigit:]] glitch on Solaris
Paul Eggert [Sat, 6 Jul 2019 14:48:15 +0000 (07:48 -0700)]
Fix [[:xdigit:]] glitch on Solaris

* admin/charsets/mapconv: Revert this [[:xdigit:]] change.
Solaris 10 ‘sed’ does not support [[:xdigit:]].

5 years agoTweak point movement in view-echo-area-messages
Drew Adams [Sat, 6 Jul 2019 14:47:08 +0000 (16:47 +0200)]
Tweak point movement in view-echo-area-messages

* lisp/help.el (view-echo-area-messages): Move the point to the
end of the *Messages* buffer even if it's already displayed
(bug#36343).

5 years agoRemove outdated comment in uniquify.el
Stefan Kangas [Sat, 6 Jul 2019 14:37:09 +0000 (16:37 +0200)]
Remove outdated comment in uniquify.el

* lisp/uniquify.el: Remove outdated comment regarding some ancient
version of uniquify.el (bug#36384).

5 years agoImprove an error message in bookmark.el
Stefan Kangas [Sat, 6 Jul 2019 14:35:52 +0000 (16:35 +0200)]
Improve an error message in bookmark.el

* lisp/bookmark.el (bookmark-alist-from-buffer): Improve error
message (bug#36391).

5 years agoImprove Gnus ephemeral bug group browsing
Basil L. Contovounesios [Sat, 6 Jul 2019 14:34:10 +0000 (16:34 +0200)]
Improve Gnus ephemeral bug group browsing

* doc/misc/gnus.texi (Foreign Groups): Update description of
gnus-read-ephemeral-emacs-bug-group for multiple bug
IDs (bug#11961).

* lisp/gnus/gnus-group.el (gnus-bug-group-download-format-alist):
Use HTTPS for Debian's bug tracker.
(gnus-group--read-bug-ids): New function for reading multiple bug
IDs in the minibuffer.  Improves on previous brittle approach of
word-at-point -> read-string -> string-to-number by a) defaulting to
the more accurate bug-reference-bug-regexp or number-at-point
without using the intrusive INITIAL-INPUT argument, and b) not
attempting to parse bug IDs.
(gnus-read-ephemeral-bug-group): Use it.  Extend docstring and
commentary.  Fix handling of multiple bug IDs as either numbers or
strings.  Hoist some string consing out of inner loop.  Delete
temporary file even on error.  Throw more informative error when
url-insert-file-contents successfully returns an error (bug#36433).
(gnus-read-ephemeral-debian-bug-group): Use gnus-group--read-bug-ids
and fix docstring for multiple bug IDs.  Accept optional WINDOW-CONF
like other ephemeral bug group commands.
(gnus-read-ephemeral-emacs-bug-group): Use gnus-group--read-bug-ids
and fix string/numeric ID conversions.  Try loading debbugs-gnu
before testing for debbugs-gnu-summary-mode (bug#36433).

5 years agoAdd tests for text-property-search to check prop-match-value
Stefan Kangas [Sat, 6 Jul 2019 14:27:05 +0000 (16:27 +0200)]
Add tests for text-property-search to check prop-match-value

* test/lisp/emacs-lisp/text-property-search-tests.el
(with-match-test): New macro.
(text-property-search-forward-prop-match-match-face-nil-nil)
(text-property-search-forward-prop-match-match-face-bold-t)
(text-property-search-forward-prop-match-match-face-bold-nil)
(text-property-search-backward-prop-match-match-face-nil-nil)
(text-property-search-backward-prop-match-match-face-italic-t)
(text-property-search-backward-prop-match-match-face-italic-nil):
Add test cases to also verify the value of prop-match-value
(bug#36486).

5 years agoMinor copyedit of "Font Lock" in user manual
Eli Zaretskii [Sat, 6 Jul 2019 14:25:46 +0000 (17:25 +0300)]
Minor copyedit of "Font Lock" in user manual

* doc/emacs/display.texi (Font Lock): Make the wording about
"enabling Font Lock" crystal clear.  (Bug#36529)

5 years agoImprove description of image descriptors
Eli Zaretskii [Sat, 6 Jul 2019 12:32:20 +0000 (15:32 +0300)]
Improve description of image descriptors

* doc/lispref/display.texi (Image Descriptors): More accurate
description of where image files are looked up.  (Bug#36523)

5 years agoImprove the default value of 'doc-view-ghostscript-program'
Eli Zaretskii [Sat, 6 Jul 2019 11:49:23 +0000 (14:49 +0300)]
Improve the default value of 'doc-view-ghostscript-program'

* lisp/doc-view.el (doc-view-ghostscript-program): Make the
default value dependent on the underlying OS.  (Bug#36357)

5 years agoMake "M-x pdb" use "[:graph:]" to match file names
Stefan Kangas [Sun, 30 Jun 2019 17:17:52 +0000 (19:17 +0200)]
Make "M-x pdb" use "[:graph:]" to match file names

* lisp/progmodes/gud.el (gud-pdb-marker-regexp): Use "[:graph:]" to
match file name in prompt.  (Bug#34489)

5 years ago* lisp/net/goto-addr.el: Remove leftover XEmacs compat code. (Bug#36512)
Stefan Kangas [Fri, 5 Jul 2019 14:29:32 +0000 (16:29 +0200)]
* lisp/net/goto-addr.el: Remove leftover XEmacs compat code.  (Bug#36512)

5 years ago* lisp/bookmark.el (bookmark-set-internal): Doc fix. (Bug#25032)
Stefan Kangas [Tue, 2 Jul 2019 05:09:13 +0000 (07:09 +0200)]
* lisp/bookmark.el (bookmark-set-internal): Doc fix. (Bug#25032)

5 years ago* lisp/bookmark.el (bookmark-quit-flag): Mark unused variable obsolete.
Stefan Kangas [Mon, 1 Jul 2019 17:56:00 +0000 (19:56 +0200)]
* lisp/bookmark.el (bookmark-quit-flag): Mark unused variable obsolete.

(Bug#36460)

5 years agoPrefer progress-reporter to 'message' in bookmark.el
Stefan Kangas [Mon, 1 Jul 2019 17:10:36 +0000 (19:10 +0200)]
Prefer progress-reporter to 'message' in bookmark.el

* lisp/bookmark.el (bookmark-upgrade-file-format-from-0)
(bookmark-bmenu-execute-deletions): Use progress-reporter.
(Bug#36462)

5 years ago; * src/lread.c (Fread): Make the comment wording more accurate.
Eli Zaretskii [Sat, 6 Jul 2019 08:40:49 +0000 (11:40 +0300)]
; * src/lread.c (Fread): Make the comment wording more accurate.

5 years agoImprove documentation of secondary selections
Eli Zaretskii [Sat, 6 Jul 2019 08:30:35 +0000 (11:30 +0300)]
Improve documentation of secondary selections

* doc/emacs/killing.texi (Secondary Selection): Improve
wording.  Mention that 'M-mouse-1' can be used to cancel
secondary selections.  (Bug#36365)

5 years agoReplace manually crafted hex regexes with [:xdigit:]
Konstantin Kharlamov [Thu, 13 Jun 2019 00:18:43 +0000 (03:18 +0300)]
Replace manually crafted hex regexes with [:xdigit:]

* admin/charsets/mapconv:
* build-aux/gitlog-to-changelog (parse_amend_file, git_dir_option):
* lisp/progmodes/verilog-mode.el (verilog-delay-re):
(verilog-type-font-keywords, verilog-read-always-signals-recurse):
(verilog-is-number):
* lisp/progmodes/vera-mode.el (vera-font-lock-keywords):
* test/src/emacs-module-tests.el (mod-test-sum-test):
* lisp/xml.el: (xml--entity-replacement-text):
* lisp/version.el (emacs-repository-version-git):
* lisp/textmodes/sgml-mode.el (sgml-quote):
* lisp/textmodes/css-mode.el (css-escapes-re)
(css--colors-regexp):
* lisp/progmodes/prolog.el (prolog-syntax-propertize-function):
* lisp/progmodes/hideif.el (hif-token-regexp, hif-tokenize):
* lisp/progmodes/ebnf-dtd.el: (ebnf-dtd-attlistdecl)
(ebnf-dtd-entitydecl, ebnf-dtd-lex):
* lisp/progmodes/ebnf-ebx.el (ebnf-ebx-hex-character):
* lisp/progmodes/ebnf-abn.el (ebnf-abn-character):
* lisp/progmodes/cperl-mode.el (cperl-highlight-charclass)
(cperl-find-pods-heres):
* lisp/progmodes/cc-mode.el (c-maybe-quoted-number-head)
(c-maybe-quoted-number, c-parse-quotes-before-change)
(c-parse-quotes-after-change, c-quoted-number-head-before-point)
(c-quoted-number-straddling-point):
* lisp/progmodes/ada-mode.el (featurep, ada-in-numeric-literal-p)
(ada-font-lock-keywords):
* lisp/org/org-mobile.el (org-mobile-copy-agenda-files)
* lisp/org/org-table.el (org-table-number-regexp):
(org-mobile-update-checksum-for-capture-file):
* lisp/nxml/xsd-regexp.el (xsdre-gen-categories):
* lisp/nxml/xmltok.el (let*):
* lisp/nxml/rng-xsd.el (rng-xsd-convert-hex-binary)
(rng-xsd-convert-any-uri):
* lisp/nxml/rng-uri.el (rng-uri-file-name-1)
(rng-uri-unescape-multibyte, rng-uri-unescape-unibyte)
(rng-uri-unescape-unibyte-match)
(rng-uri-unescape-unibyte-replace):
* lisp/nxml/rng-cmpct.el (rng-c-process-escapes):
* lisp/nxml/nxml-maint.el (nxml-insert-target-repertoire-glyph-set):
* lisp/net/shr-color.el (shr-color->hexadecimal):
* lisp/mail/rfc2231.el (rfc2231-decode-encoded-string):
* lisp/international/mule-cmds.el (read-char-by-name):
* lisp/htmlfontify.el (hfy-hex-regex):
* lisp/gnus/nneething.el (nneething-decode-file-name):
* lisp/gnus/mml-sec.el (mml-secure-find-usable-keys):
* lisp/gnus/gnus-art.el (gnus-button-mid-or-mail-heuristic-alist):
* lisp/faces.el (read-color):
* lisp/epg.el (epg--status-ERRSIG, epg--status-VALIDSIG)
(epg--status-SIG_CREATED, epg--decode-percent-escape)
(epg--decode-hexstring, epg--decode-quotedstring)
(epg-dn-from-string):
* lisp/emulation/cua-rect.el (cua-incr-rectangle):
* lisp/dnd.el (dnd-unescape-uri):
* lisp/cedet/semantic/lex.el (semantic-lex-number-expression):
* lisp/cedet/semantic/java.el (semantic-java-number-regexp):
* lisp/calc/calc-lang.el (pascal):
* lisp/calc/calc-ext.el (math-read-number-fancy):
* lisp/calc/calc-aent.el (math-read-token):
Replace various combinations of [0-9a-fA-F] with [[:xdigit:]].
(Bug#36167)

5 years ago* src/fns.c (Fmapconcat): Doc fix. (Bug#36418)
Eli Zaretskii [Sat, 6 Jul 2019 07:31:06 +0000 (10:31 +0300)]
* src/fns.c (Fmapconcat): Doc fix.  (Bug#36418)

5 years agoAdd HarfBuzz fallbacks for libotf functions used in ftfont_list
YAMAMOTO Mitsuharu [Sat, 6 Jul 2019 05:35:00 +0000 (14:35 +0900)]
Add HarfBuzz fallbacks for libotf functions used in ftfont_list

* src/ftfont.c [!HAVE_LIBOTF && HAVE_HARFBUZZ]: Include hb-ot.h.
(OTF, OTF_tag) [!HAVE_LIBOTF && HAVE_HARFBUZZ]: New typedefs.
(hbotf_open, hbotf_check_features) [!HAVE_LIBOTF && HAVE_HARFBUZZ]: New
functions.
(OTF_open, OTF_close, OTF_check_features) [!HAVE_LIBOTF && HAVE_HARFBUZZ]:
New macros.
(ftfont_list) [!HAVE_LIBOTF && HAVE_HARFBUZZ]: Use them.

5 years agoAvoid crash inside CFCharacterSetIsLongCharacterMember (Bug#36507)
YAMAMOTO Mitsuharu [Sat, 6 Jul 2019 05:24:34 +0000 (14:24 +0900)]
Avoid crash inside CFCharacterSetIsLongCharacterMember (Bug#36507)

* src/macfont.m (macfont_supports_charset_and_languages_p)
(macfont_has_char): Don't pass integers outside the Unicode codespace to
CFCharacterSetIsLongCharacterMember.  Do not merge to master.

5 years agoAvoid crash inside CFCharacterSetIsLongCharacterMember
YAMAMOTO Mitsuharu [Sat, 6 Jul 2019 05:08:47 +0000 (14:08 +0900)]
Avoid crash inside CFCharacterSetIsLongCharacterMember

* src/macfont.m (macfont_supports_charset_and_languages_p)
(macfont_has_char): Don't pass integers outside the Unicode codespace to
CFCharacterSetIsLongCharacterMember.

5 years agoFix python.el docstring (Bug#36458)
Noam Postavsky [Sat, 6 Jul 2019 01:34:16 +0000 (21:34 -0400)]
Fix python.el docstring (Bug#36458)

* lisp/progmodes/python.el (python-shell--prompt-calculated-output-regexp):
python-shell-set-prompt-regexp doesn't exist, presumably
python-shell-prompt-set-calculated-regexps was meant.

5 years ago; Add thing-at-point-looking-at test (Bug#35708)
Noam Postavsky [Mon, 13 May 2019 12:39:00 +0000 (08:39 -0400)]
; Add thing-at-point-looking-at test (Bug#35708)

* test/lisp/thingatpt-tests.el (thing-at-point-looking-at): New test.

5 years ago; Fix typo, insure -> ensure in ChangeLogs
Noam Postavsky [Thu, 30 May 2019 12:16:46 +0000 (08:16 -0400)]
; Fix typo, insure -> ensure in ChangeLogs

5 years ago* lisp/replace.el (replace-highlight): Add save-match-data (bug#36328)
Juri Linkov [Fri, 5 Jul 2019 19:11:34 +0000 (22:11 +0300)]
* lisp/replace.el (replace-highlight): Add save-match-data (bug#36328)

* lisp/term/tty-colors.el (tty-color-canonicalize):
Replace string-match with string-match-p.

Thanks to Jayden Navarro <jayden@yugabyte.com> and Alan Mackenzie <acm@muc.de>

5 years ago* lisp/minibuffer.el (minibuffer-message-properties): New variable.
Juri Linkov [Thu, 4 Jul 2019 22:01:01 +0000 (01:01 +0300)]
* lisp/minibuffer.el (minibuffer-message-properties): New variable.

(minibuffer-message): Use it to propertize message unless already
propertized by the caller.

* lisp/simple.el (minibuffer-error-function): Propertize the error.

* lisp/isearch.el (isearch-message-properties): New variable.
(isearch--momentary-message, isearch-message-prefix)
(isearch-message-suffix): Use it.  (Bug#21112)

5 years ago* lisp/char-fold.el (char-fold-to-regexp): Implement arg LAX (bug#36398).
Juri Linkov [Thu, 4 Jul 2019 20:49:33 +0000 (23:49 +0300)]
* lisp/char-fold.el (char-fold-to-regexp): Implement arg LAX (bug#36398).

* test/lisp/char-fold-tests.el (char-fold--test-multi-lax): New test.

5 years ago; * lisp/net/shr.el (shr-selected-link): Doc fix.
Basil L. Contovounesios [Thu, 4 Jul 2019 18:09:19 +0000 (19:09 +0100)]
; * lisp/net/shr.el (shr-selected-link): Doc fix.

5 years agoOptimise more inputs to `regexp-opt' (bug#36444)
Mattias Engdegård [Sun, 30 Jun 2019 10:53:52 +0000 (12:53 +0200)]
Optimise more inputs to `regexp-opt' (bug#36444)

Use a more precise test to determine whether the input to `regexp-opt'
is safe to optimise when KEEP-ORDER is non-nil, permitting more inputs
to be optimised than before.  For example, ("good" "goal" "go") is now
accepted.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
More precise test for whether the list is safe w.r.t. KEEP-ORDER.
(regexp-opt--contains-prefix): Remove.

* test/lisp/emacs-lisp/regexp-opt-tests.el: Use lexical-binding.
(regexp-opt-test--permutation, regexp-opt-test--factorial)
(regexp-opt-test--permutations, regexp-opt-test--match-all)
(regexp-opt-test--check-perm, regexp-opt-test--explain-perm)
(regexp-opt-keep-order): Test KEEP-ORDER.

5 years ago* src/coding.c (decode_coding): Improve doc.
Stefan Monnier [Thu, 4 Jul 2019 14:13:57 +0000 (10:13 -0400)]
* src/coding.c (decode_coding): Improve doc.

5 years agoIn Message, respect Content-Type provided by the user
Lars Ingebrigtsen [Thu, 4 Jul 2019 14:08:22 +0000 (16:08 +0200)]
In Message, respect Content-Type provided by the user

* lisp/gnus/mml.el (mml-parse-1): Respect any Content-Type
inserted by the user instead of insisting on text/plain.

5 years agoFix an infinite loop in c-end-of-macro. Should fix bug #36484
Alan Mackenzie [Thu, 4 Jul 2019 13:18:51 +0000 (13:18 +0000)]
Fix an infinite loop in c-end-of-macro.  Should fix bug #36484

Also fix two faulty regexps, save-match-data, and check c-major-mode-is
'c++-mode where needed.

* lis/progmodes/cc-langs.el (c-last-c-comment-end-on-line-re)
(c-last-open-c-comment-start-on-line-re): Handle repeated *s in regexp
correctly.

* lisp/progmodes/cc-engine.el (c-beginning-of-macro, c-end-of-macro): Protect
the match-data with save-match-data around regexp operations.
(c-end-of-macro): In the loop handling multiline block comments, check a
comment actually is multiline.

* lisp/progmodes/cc-mode.el (c-depropertize-CPP): Only call
c-depropertize-raw-strings-in-region in C++ Mode.

5 years agoFix Flymake's user-visible accessors of diagnostic positions
João Távora [Wed, 3 Jul 2019 23:34:26 +0000 (00:34 +0100)]
Fix Flymake's user-visible accessors of diagnostic positions

Diagnostics are supported by overlays, and they can legitimately move
around.  So flymake-diagnostic-beg and flymake-diagnostic-end must
look up the overlay positions, not the immutable slots of the
flymake--diag structure, which become stale.

* lisp/progmodes/flymake.el (version): Bump to 1.0.8.
(flymake-diagnostic-beg, flymake-diagnostic-end): Use diag's
overlay.
(flymake-show-diagnostic): Use flymake-diagnostic-end,
flymake-diagnostic-beg.

5 years agoFix Flymake's treatment of region-specific reports
João Távora [Wed, 3 Jul 2019 23:27:08 +0000 (00:27 +0100)]
Fix Flymake's treatment of region-specific reports

We're supposed to delete intersecting diagnostics in that situation,
but the intersection logic was way off.

* lisp/progmodes/flymake.el (version): Bump to 1.0.7.
(flymake--intersects-p): New helper.
(flymake--handle-report): Fix handling of :region.

5 years agoSmall fix to writing Gnus dribble change-level entries
Eric Abrahamsen [Wed, 3 Jul 2019 19:53:43 +0000 (12:53 -0700)]
Small fix to writing Gnus dribble change-level entries

* lisp/gnus/gnus-start.el (gnus-group-change-level): PREVIOUS needs to
  still be a string when the dribble entry is written, so don't
  convert it to an entry until after that's done. Also, we're not
  meant to write PREVIOUS itself, we're meant to write the group that
  comes _after_ it in the sort-order of gnus-group-list, so do that
  instead.

5 years ago* lisp/hi-lock.el (hi-lock-line-face-buffer): Doc fix. (Bug36448)
Eli Zaretskii [Wed, 3 Jul 2019 12:55:10 +0000 (15:55 +0300)]
* lisp/hi-lock.el (hi-lock-line-face-buffer): Doc fix.  (Bug36448)

5 years agoAdd tests for bookmark.el (Bug#36452)
Stefan Kangas [Sun, 30 Jun 2019 23:21:47 +0000 (01:21 +0200)]
Add tests for bookmark.el (Bug#36452)

* test/lisp/bookmark-resources/example.txt:
* test/lisp/bookmark-resources/test.bmk:
* test/lisp/bookmark-tests.el: New files.
* lisp/bookmark.el: Minor cleanups.
(bookmark-insert-annotation): Signal error on invalid bookmark.
(bookmark-write-file): Add newline at end of file.

5 years agoFix rotation validity test in image.c
Eli Zaretskii [Wed, 3 Jul 2019 07:31:48 +0000 (10:31 +0300)]
Fix rotation validity test in image.c

* src/image.c (compute_image_rotation): Fix the validity test
for :rotation values.  This avoids logging error messages when
no :rotation was provided in the image spec.

5 years agoFix compiler warnings due to a recent commit
Eli Zaretskii [Wed, 3 Jul 2019 07:20:20 +0000 (10:20 +0300)]
Fix compiler warnings due to a recent commit

* src/xdisp.c (expose_window, expose_frame): Avoid compilation
warnings about printing unsigned values with %d.

5 years agoChange expected result of a flymake test on emba
Michael Albinus [Wed, 3 Jul 2019 07:00:26 +0000 (09:00 +0200)]
Change expected result of a flymake test on emba

* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Test is now passing on emba.gnu.org, too.

5 years agoReplace TRACE with redisplay_trace, etc.
Paul Eggert [Tue, 2 Jul 2019 23:09:46 +0000 (16:09 -0700)]
Replace TRACE with redisplay_trace, etc.

This simplifies callers and catches trace printf format errors
even with typical (non-debugging) compiles.
* src/dispextern.h (TRACE) [GLYPH_DEBUG]:
Move definitions to xdisp.c if it’s used only there.
* src/xdisp.c (redisplay_trace): New function, replacing TRACE macro.
(move_trace): New function, replacing TRACE_MOVE macro.
All uses changed.
(dump_glyph): When tracing, don’t use %d to format ptrdiff_t,
or %x to format a pointer.
(expose_frame): Redo trace printfs to avoid interleaved output
on GNU/Linux.

5 years agoChange expected result of a flymake test on hydra
Glenn Morris [Tue, 2 Jul 2019 23:46:25 +0000 (16:46 -0700)]
Change expected result of a flymake test on hydra

* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types):
Test is now passing on hydra.nixos.org, since today.

5 years ago* src/json.c (Fjson_insert): Don't temporarily insert invalid bytes in buffer
Stefan Monnier [Tue, 2 Jul 2019 22:54:36 +0000 (18:54 -0400)]
* src/json.c (Fjson_insert): Don't temporarily insert invalid bytes in buffer

5 years ago(Finsert_file_contents): Keep buffer consistent in non-local exit
Stefan Monnier [Tue, 2 Jul 2019 22:02:51 +0000 (18:02 -0400)]
(Finsert_file_contents): Keep buffer consistent in non-local exit

* src/fileio.c (decide_coding_unwind): Delete function.
(Finsert_file_contents): Don't let invalid multibyte byte sequences
escape when we exit non-locally.

* test/src/fileio-tests.el (fileio-tests--insert-file-interrupt): New test.

5 years agoFix printf formats when DEBUG_TRACE_MOVE
Paul Eggert [Tue, 2 Jul 2019 21:50:43 +0000 (14:50 -0700)]
Fix printf formats when DEBUG_TRACE_MOVE

Problem caught by gcc -DDEBUG_TRACE_MOVE -Wformat.
* src/xdisp.c (move_it_in_display_line_to, move_it_to)
(move_it_vertically) [DEBUG_TRACE_MOVE]: Fix printf format typos.

5 years ago* src/insdel.c (insert_from_gap_1): New fun, extracted from insert_from_gap.
Stefan Monnier [Tue, 2 Jul 2019 20:04:16 +0000 (16:04 -0400)]
* src/insdel.c (insert_from_gap_1): New fun, extracted from insert_from_gap.

(insert_from_gap): Use it.
* src/lisp.h (insert_from_gap_1): Declare it.
* src/json.c (Fjson_insert):
* src/fileio.c (Finsert_file_contents): Use it.

5 years ago* src/coding.c (decode_coding_gap): Remove `chars` argument.
Stefan Monnier [Tue, 2 Jul 2019 19:48:25 +0000 (15:48 -0400)]
* src/coding.c (decode_coding_gap): Remove `chars` argument.

* src/json.c (Fjson_insert):
* src/fileio.c (Finsert_file_contents):
* src/coding.h (decode_coding_gap): Adjust accordingly.

5 years ago* test/src/editfns-tests.el (test-group-name): Accept nil group-name.
Stefan Monnier [Tue, 2 Jul 2019 19:11:16 +0000 (15:11 -0400)]
* test/src/editfns-tests.el (test-group-name): Accept nil group-name.

5 years agoCorrect customize type for gnus-group-customize
Andreas Schwab [Mon, 1 Jul 2019 18:33:57 +0000 (20:33 +0200)]
Correct customize type for gnus-group-customize

* lisp/gnus/gnus-cus.el (gnus-extra-group-parameters): Add more
group parameters used by nnimap.

5 years agoCorrectly reindent previous line in electric-indent-mode
João Távora [Wed, 15 May 2019 12:10:22 +0000 (13:10 +0100)]
Correctly reindent previous line in electric-indent-mode

Fixes: bug#35254
Do this even when electric-indent-inhibit is t, except when the
newline insertion is being performed by electric-layout-mode.

* lisp/electric.el (electric-indent-post-self-insert-function):
Reindent previous line unless operating under
electric-layout-mode.
(electric-layout-post-self-insert-function-1): Bind
electric-indent-inhibit to 'electric-layout-mode.

* test/lisp/electric-tests.el
(electric-layout-control-reindentation): New test.

5 years agoProtect Flymake from being corrupted by backends
João Távora [Fri, 29 Mar 2019 12:27:11 +0000 (12:27 +0000)]
Protect Flymake from being corrupted by backends

A backend building a diagnostic with a nil :type would cause Flymake
to create a diagnostic without an overlay, confusing Flymake's
accounting of overlays and diagnostics

* lisp/progmodes/flymake.el (flymake--highlight-line): Return
non-nil unconditionally.

5 years agoMore carefully cleanup Flymake C/C++ backend's temp buffers
João Távora [Thu, 28 Mar 2019 18:04:35 +0000 (18:04 +0000)]
More carefully cleanup Flymake C/C++ backend's temp buffers

Sometimes the Flymake process dies by some means that doesn't involve
a sentinel call for the "exit" status, so we clean up the temporary
buffer as soon as we notice it's not process-alive-p anymore.

* lisp/progmodes/flymake-cc.el (flymake-cc): Broaden cleanup
conditions.

5 years agoDon't create nil-severity diagnostics in the Flymake C/C++ backend
João Távora [Thu, 28 Mar 2019 17:51:12 +0000 (17:51 +0000)]
Don't create nil-severity diagnostics in the Flymake C/C++ backend

* lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics): Use
`:error` as a diagnostic severity.

5 years agoRevert "Avoid occasional confusion of Flymake C/C++ backend"
João Távora [Thu, 28 Mar 2019 17:47:43 +0000 (17:47 +0000)]
Revert "Avoid occasional confusion of Flymake C/C++ backend"

This reverts commit 67c3a3af1d9e2582193d5ea33b6c190e79ad56e6, which
creates more problems than it solves.

5 years agoCC Mode: Improve handling of unbalanced strings
Alan Mackenzie [Tue, 2 Jul 2019 12:33:01 +0000 (12:33 +0000)]
CC Mode: Improve handling of unbalanced strings

* lisp/progmodes/cc-fonts.el (c-before-font-lock-functions): Add function
c-after-change-escape-NL-in-string into value for most languages.

* lisp/progmodes/cc-mode.el (c-after-change-escape-NL-in-string): New
function.
(c-before-change-check-unbalanced-strings): Handle the making and breaking of
escaped newlines, by removal or addition of text.

5 years agoBetter error message for C-h P RET
Mattias Engdegård [Mon, 1 Jul 2019 15:56:49 +0000 (17:56 +0200)]
Better error message for C-h P RET

Previously:
  package--incompatible-p: Wrong type argument: package-desc, nil
Now:
  No package specified

* lisp/emacs-lisp/package.el (describe-package): Don't use ## as input.

5 years agoFix performDragOperation: diagnostic typo
Paul Eggert [Tue, 2 Jul 2019 07:01:06 +0000 (00:01 -0700)]
Fix performDragOperation: diagnostic typo

* src/nsterm.m (performDragOperation:): Fix missing newline.

5 years agoFix regex-emacs debug format glitches
Paul Eggert [Tue, 2 Jul 2019 04:42:58 +0000 (21:42 -0700)]
Fix regex-emacs debug format glitches

These patches affect behavior only if REGEX_EMACS_DEBUG.
* src/regex-emacs.c (debug_putchar): Use unsigned for %x.
(print_compiled_pattern, ENSURE_FAIL_STACK, PUSH_FAILURE_POINT)
(POP_FAILURE_POINT): Use %td for ptrdiff_t.
(print_compiled_pattern, regex_compile, re_match_2_internal):
Put newlines at ends of lines, not at starts of next lines.
Omit white space at line ends.

5 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 2 Jul 2019 02:18:47 +0000 (05:18 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

5 years agoMinor changes in tramp.texi
Michael Albinus [Mon, 1 Jul 2019 21:44:05 +0000 (23:44 +0200)]
Minor changes in tramp.texi

* doc/misc/tramp.texi (Obtaining Tramp): Mention file INSTALL.
(Cleanup remote connections): The session timer is also deleted.

5 years agoMore XFIXNUM fixes
Eli Zaretskii [Mon, 1 Jul 2019 18:12:55 +0000 (21:12 +0300)]
More XFIXNUM fixes

* src/hbfont.c (hbfont_shape): Don't assume LGLYPH_TO is
always a fixnum.
* src/fontset.c (fontset_find_font): A cleaner test for
matching charset_id.

5 years agoFix assertion violations in fontset_find_font
Eli Zaretskii [Mon, 1 Jul 2019 16:25:52 +0000 (19:25 +0300)]
Fix assertion violations in fontset_find_font

* src/fontset.c (fontset_find_font): Don't assume REPERTORY
must be a fixnum.

5 years agoAdjust return value of image-transforms-p
Eli Zaretskii [Mon, 1 Jul 2019 14:54:15 +0000 (17:54 +0300)]
Adjust return value of image-transforms-p

* src/image.c (Fimage_transforms_p):
* doc/lispref/display.texi (Image Descriptors):
image-transforms-p now returns at most (scale rotate90), even
if ImageMagick is available.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Jul 2019 13:26:46 +0000 (06:26 -0700)]
; Auto-commit of loaddefs files.

5 years agoExtract gnus-collect-urls from gnus-summary-browse-url
Sam Steingold [Fri, 28 Jun 2019 21:22:55 +0000 (17:22 -0400)]
Extract gnus-collect-urls from gnus-summary-browse-url

* lisp/gnus/gnus-sum.el (gnus-collect-urls): Extract from ...
(gnus-summary-browse-url): Use it here.
Extracting URLs from an article will be useful in BBDB interaction.

5 years ago; Auto-commit of loaddefs files.
Glenn Morris [Mon, 1 Jul 2019 13:08:24 +0000 (06:08 -0700)]
; Auto-commit of loaddefs files.

5 years agoImplement the otf_capability method for HarfBuzz
YAMAMOTO Mitsuharu [Mon, 1 Jul 2019 07:58:53 +0000 (16:58 +0900)]
Implement the otf_capability method for HarfBuzz

* src/hbfont.c: Include hb-ot.h.
[HAVE_NTGUI]: Add DEF_DLL_FN and #define for hb_tag_to_string,
hb_font_get_face, hb_ot_layout_table_get_script_tags,
hb_ot_layout_table_get_feature_tags, hb_ot_layout_script_get_language_tags,
and hb_ot_layout_language_get_feature_tags.
(hbfont_init_w32_funcs) [HAVE_NTGUI]: Add LOAD_DLL_FN for them.
(hbfont_otf_features, hbfont_otf_capability): New functions.

* src/font.h (hbfont_otf_capability) [HAVE_HARFBUZZ]: Add extern.

* src/ftcrfont.c (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]:
* src/ftfont.c (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]:
* src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper) [HAVE_HARFBUZZ]:
* src/xftfont.c (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Populate
otf_capability method with hbfont_otf_capability.

5 years agoRemove divide_double
Paul Eggert [Sun, 30 Jun 2019 15:08:02 +0000 (08:08 -0700)]
Remove divide_double

* src/image.c (divide_double): Remove.  All uses replaced
with inline equivalents.  Suggested by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2019-06/msg01067.html

5 years agoC++ Mode: change the default doc comment style from nothing to gtkdoc
Alan Mackenzie [Sun, 30 Jun 2019 15:02:13 +0000 (15:02 +0000)]
C++ Mode: change the default doc comment style from nothing to gtkdoc

Also amend a pertinent regular expression.  This fixes bug #11865.

* lisp/progmodes/cc-vars.el (c-doc-comment-style): Insert an entry for
c++-mode, namely gtkdoc.

* lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Amend the regexp
recognizing the introductory "/**" to allow subsequent characters on that
line.

5 years ago; Fix last change to profiler-report
Basil L. Contovounesios [Sun, 30 Jun 2019 12:30:03 +0000 (13:30 +0100)]
; Fix last change to profiler-report

* lisp/profiler.el (profiler-report): Make interactive
again (bug#22114).

5 years agoRelease Tramp 2.4.2
Michael Albinus [Sun, 30 Jun 2019 09:23:06 +0000 (11:23 +0200)]
Release Tramp 2.4.2

* lisp/net/tramp.el: Bump version.

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case):
Add `add-name-to-file' error message.
(tramp--test-ignore-add-name-to-file-error): Make error handler
more explicit about the error.

5 years agoDoc fix
Andreas Schwab [Sun, 30 Jun 2019 08:43:55 +0000 (10:43 +0200)]
Doc fix

* doc/emacs/display.texi (Displaying Boundaries): Document
display-fill-column-indicator-character, not
display-fill-column-indicator-char.

5 years agoFix use of undefined macro
Andreas Schwab [Sun, 30 Jun 2019 06:22:53 +0000 (08:22 +0200)]
Fix use of undefined macro

* src/xdisp.c (append_space_for_newline): Use FRAME_FONT only
inside HAVE_WINDOW_SYSTEM.
(extend_face_to_end_of_line): Likewise.
(syms_of_xdisp): Doc fix.

5 years agoFix negation in elements of OTF feature list
YAMAMOTO Mitsuharu [Sun, 30 Jun 2019 07:09:56 +0000 (16:09 +0900)]
Fix negation in elements of OTF feature list

* src/ftfont.c (ftfont_get_open_type_spec):
* src/macfont.m (macfont_get_open_type_spec): Take bitwise or instead of and.

5 years agoFix error in mouse-set-font on GTK 3 with Harfbuzz (Bug#36288)
YAMAMOTO Mitsuharu [Sun, 30 Jun 2019 06:40:43 +0000 (15:40 +0900)]
Fix error in mouse-set-font on GTK 3 with Harfbuzz (Bug#36288)

* src/gtkutil.c (xg_get_font) [HAVE_GTK3]: Remove type property from font
spec.  This effectively undoes the fix for Bug#3228, but gives consistent
results overall.

5 years ago* src/xfns.c (x_create_tip_frame): Support inhibit-double-buffering.
YAMAMOTO Mitsuharu [Sun, 30 Jun 2019 06:27:41 +0000 (15:27 +0900)]
* src/xfns.c (x_create_tip_frame): Support inhibit-double-buffering.

5 years ago* src/xfns.c (Fx_show_tip): Call flush_frame. (Bug#34819)
YAMAMOTO Mitsuharu [Sun, 30 Jun 2019 06:26:27 +0000 (15:26 +0900)]
* src/xfns.c (Fx_show_tip): Call flush_frame.  (Bug#34819)

5 years agoPacify gcc and other image rotation tweaks
Paul Eggert [Sat, 29 Jun 2019 23:46:16 +0000 (16:46 -0700)]
Pacify gcc and other image rotation tweaks

* src/image.c: No need to include <float.h> as lisp.h does that.
(matrix3x3_copy): Remove; no longer needed.
(divide_double): New function, to avoid undefined behavior
when dividing by zero on non-IEEE hosts.
(image_set_transform): Simplify transformation computation
by avoiding the need to copy a matrix.  Pacify
gcc 9 -Wdouble-promotion and -Wmaybe-uninitialized.
Avoid unnecessary assignment of width and height.
Improve error reporting for unsupported native image rotation.

5 years agoSimplify workaround for Cygwin O_PATH bug
Ken Brown [Sat, 29 Jun 2019 19:03:34 +0000 (15:03 -0400)]
Simplify workaround for Cygwin O_PATH bug

Suggested by Paul Eggert (Bug#36405#22).
* configure.ac (HAVE_CYGWIN_O_PATH_BUG): New AC_DEFINE, for Cygwin
versions 3.0.0 through 3.0.7.
* src/dired.c (O_PATH) [__CYGWIN__]: Remove #undef.
(file_attributes) [HAVE_CYGWIN_O_PATH_BUG]: Don't use O_PATH.

5 years agoSupport native image transforms on MS-Windows
Eli Zaretskii [Sat, 29 Jun 2019 11:51:41 +0000 (14:51 +0300)]
Support native image transforms on MS-Windows

This changeset also rearranges native image transform code
for other platforms to make it cleaner, and also removes
the support for native cropping.  For the discussions, see
https://lists.gnu.org/archive/html/emacs-devel/2019-06/msg00242.html

* src/w32term.c (w32_image_rotations_p, transform): New functions.
(w32_draw_image_foreground): If image rotation is requested
and supported, call PlgBlt to transform the image.
(w32_initialize): Populate the PlgBlt function pointer if it
is supported.
* src/w32term.h (w32_image_rotations_p): Add prototype.
* src/dispextern.h (struct image) [HAVE_NTGUI]: New member xform.
* src/image.c (compute_image_rotation): Renamed from
image_set_rotation.  Only compute and returns the rotation
angle; leave the matrix calculation for later.  Log an error
message if the :rotation parameter is not a number.
(image_set_crop): Function deleted.  We no longer support
native cropping, as one can display an image slice instead.
(image_set_transform): Compute the transform matrix in its
entirety here, in two variants: one for XRender and Cairo, the
other for NS and MS-Windows.  call compute_image_size and
compute_image_rotation internally.
(lookup_image) [HAVE_NATIVE_TRANSFORMS]: Call only
image_set_transform.  No need to pass the transform matrix to
image_set_transform.
(Fimage_transforms_p): Return a list of transform capabilities
rather than a simple boolean.  Support TTY frames as well.
* src/nsimage.m (setTransform:): Don't invert the matrix, as
it is already inverted in image.c.

* test/manual/image-transforms-tests.el (test-cropping): State
in the text that only ImageMagick supports cropping.

* doc/lispref/display.texi (Image Descriptors): Update the
documentation of native image transforms.
(ImageMagick Images): Move the description of ':crop' here.

* etc/NEWS: Minor copyedits of the feature announcement.

5 years agoFix recent change in Tramp
Shuguang Sun [Sat, 29 Jun 2019 10:18:59 +0000 (12:18 +0200)]
Fix recent change in Tramp

* lisp/net/tramp-adb.el:
* lisp/net/tramp-archive.el:
* lisp/net/tramp-integration.el: Remove superfluous `progn' in
`with-eval-after-load'.

5 years agoCosmetic fix-up of message-forward-included-headers
Lars Ingebrigtsen [Sat, 29 Jun 2019 10:05:50 +0000 (12:05 +0200)]
Cosmetic fix-up of message-forward-included-headers

* lisp/gnus/message.el (message-forward-included-headers): Use
consistent capitalization in the regexps.

5 years agoFix display of fringe bitmaps for tooltips in echo area
Eli Zaretskii [Sat, 29 Jun 2019 09:48:15 +0000 (12:48 +0300)]
Fix display of fringe bitmaps for tooltips in echo area

* src/xdisp.c (display_line): Force redrawing of fringe
bitmaps when redisplaying a minibuffer window with
truncate-lines set to a non-nil value.  (Bug#36308)

5 years agoAllow empty argument to `regexp-opt-charset'
Mattias Engdegård [Sat, 29 Jun 2019 09:10:36 +0000 (11:10 +0200)]
Allow empty argument to `regexp-opt-charset'

* test/lisp/emacs-lisp/regexp-opt-tests.el (regexp-opt-charset):
Handle nil argument, and use regexp-quote for singletons.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Expand tests.