1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00
Commit Graph

136450 Commits

Author SHA1 Message Date
Noam Postavsky
04e9938350 Accept NO-PROPERTIES in thing-at-point aliases (Bug#35491)
* lisp/thingatpt.el (word-at-point, sentence-at-point): Accept and
pass NO-PROPERTIES to thing-at-point.
* etc/NEWS: Announce change.
2019-05-16 06:53:05 -04:00
Michael Albinus
88cc910abe * lisp/net/tramp.el (tramp-yesno-prompt-regexp): Extend. 2019-05-16 08:36:33 +02:00
Stefan Monnier
9a74e5666b * lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Fix typo
* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New corresponding test.
2019-05-15 22:21:36 -04:00
Noam Postavsky
e7e92dc5d2 Fix merge of sgml-syntax-propertize-rules
During the merge of emacs-26, the sgml-syntax-propertize-rules part of
2019-01-17 "* lisp/textmodes/sgml-mode.el: Try and fix bug#33887." got
lost in the conflict against 2019-05-09 "Recognize single quote
attribute values in nxml and sgml (Bug#35381)".
* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Reapply
the 2019-01-17 change to speed up sgml-syntax-propertize-rules, taking
into account the 2019-05-09 which means we have to handle single
quotes as well.
2019-05-15 19:04:14 -04:00
Anders Lindgren
520aca2d89 Fix diff-mode face problem when used in terminals (Bug#35695)
In a terminal supporting 256 colors, both diff-added and diff-removed
was mapped to the same greyish color.

* lisp/vc/diff-mode.el: Modify the colors of diff-removed,
  diff-added, diff-refine-removed, and diff-refine-added when
  used in a 256 color environment.
2019-05-15 21:00:49 +02:00
Stefan Monnier
c3e8381668 * lisp/gnus/gnus-sum.el: Use lexical-binding
(gnus-summary-make-menu-bar, gnus-summary-display-make-predicate)
(gnus-summary-refer-thread, gnus-summary-find-matching)
(gnus-summary-edit-article, gnus-summary-sort):
Replace backquoted lambda with closure.
(gnus-summary-article-header): Use define-inline rather than defmacro,
so it's also a function.
(gnus-save-hidden-threads, gnus-summary-iterate, gnus-with-article):
Use `declare`.
(gnus-thread-sort-by-random): Simplify.
(gnus-summary-display-article, gnus-summary-limit-to-address):
Hoist common code outside of `if`.
2019-05-15 13:53:13 -04:00
Paul Eggert
d4868b2bee Tune reading of radix integers
This improves the performance of (read "%xFF") by about 25%
on my platform.
* src/lread.c: Include <vla.h>, so that we can better document
buffer sizes of arguments.
(invalid_radix_integer_format, stackbufsize): New constants.
(free_contents): Remove.  All uses removed.
(invalid_radix_integer): New function.
(read_integer): New arg STACKBUF.  Assume radix is in range.
All uses changed.  Use STACKBUF to avoid calling malloc in the
usual case.  Use grow_read_buffer to simplify.
(read1): Tune.  Improve quality of diagnostic when
MOST_POSITIVE_FIXNUM < radix <= EMACS_INT_MAX.
2019-05-15 10:27:55 -07:00
Stefan Monnier
32b01c02b4 * lisp/mail/footnote.el (footnote-prefix): Docstring typo. 2019-05-15 13:01:09 -04:00
Mattias Engdegård
26f735ff19 Add standard unmatchable regexp
Add `regexp-unmatchable' as a standard unmatchable regexp, defined as
"\\`a\\`".  Use it where such a regexp is needed, replacing slower
expressions in several places.
From a suggestion by Philippe Schnoebelen.

* lisp/subr.el (regexp-unmatchable): New defconst.
* etc/NEWS (Lisp Changes): Mention `regexp-unmatchable'.
* doc/lispref/searching.texi (Regexp Functions): Document it.
* lisp/emacs-lisp/regexp-opt.el (regexp-opt)
* lisp/progmodes/cc-defs.el (cc-conditional-require-after-load)
(c-make-keywords-re)
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
(c-looking-at-decl-block)
* lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
(c-doc-bright-comment-start-re)
* lisp/progmodes/cc-langs.el (c-populate-syntax-table)
(c-assignment-op-regexp)
(c-block-comment-ender-regexp, c-font-lock-comment-end-skip)
(c-block-comment-start-regexp, c-line-comment-start-regexp)
(c-doc-comment-start-regexp, c-decl-start-colon-kwd-re)
(c-type-decl-prefix-key, c-type-decl-operator-prefix-key)
(c-pre-id-bracelist-key, c-enum-clause-introduction-re)
(c-nonlabel-token-2-key)
* lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end)
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
(c-noise-macro-name-re, c-make-noise-macro-regexps)
* lisp/progmodes/octave.el (octave-help-mode)
* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode, vc-bzr-revision-completion-table)
* lisp/vc/vc-git.el (vc-git-log-view-mode)
* lisp/vc/vc-hg.el (vc-hg-log-view-mode)
* lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
Use `regexp-unmatchable'.
* lisp/textmodes/ispell.el (ispell-non-empty-string):
Use `regexp-unmatchable', fixing a broken never-match regexp.
2019-05-15 18:55:27 +02:00
John Shahid
d0ebc389eb Avoid infinitly looping in tramp-interrupt-process (bug#35506)
* lisp/net/tramp.el (tramp-interrupt-process): Remove with-timeout.
Instead pass a timeout to tramp-accept-process-output.
tramp-accept-process-output stops timers from running which makes the
with-timeout ineffective.
2019-05-15 16:29:58 +02:00
Alan Mackenzie
356fb18a1f CC Mode: fix indentation in switch statement after "case a(1):".
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Enhance the
analysis of case labels to handle parenthesised expressions (e.g. macros).

* lisp/progmodes/cc-langs.el (c-nonlabel-nonparen-token-key): New lang const
and lang var.
2019-05-15 08:58:31 +00:00
Lars Ingebrigtsen
8f544c6104 Describe error data in url-retrieve better
* lisp/url/url.el (url-retrieve): Describe the error data more in
depth (bug#25735).
2019-05-15 09:45:08 +02:00
Lars Ingebrigtsen
ceed3d7557 Don't have url-basic-auth bug out when called with an URL string
* lisp/url/url-auth.el (url-basic-auth): Pass the parsed URL
object to the prompting function instead of the parameter that's
possibly a string (bug#26708).  Passing url-basic-auth with a
string parameter would fail if passed a non-parsed URL.
2019-05-15 07:34:35 +02:00
Lars Ingebrigtsen
4f1df40db3 Fix obscure HTTP chunked parsing problem
* lisp/url/url-http.el
(url-http-chunked-encoding-after-change-function): Ensure that we
parse the entire initial chunked header as the length (bug#35658).
2019-05-15 07:12:26 +02:00
Lars Ingebrigtsen
15bd081ce6 Indent url-http-chunked-encoding-after-change-function 2019-05-15 06:59:12 +02:00
Thomas Fitzsimmons
4fa6029f7e Fix url-auth prompts when realm is empty
* lisp/url/url-auth.el (url-get-authentication): When realm is
empty, use the entire URL in the prompt (bug#35688).
2019-05-15 06:14:21 +02:00
Lars Ingebrigtsen
e3fbe04cbc Make image scaling work without imagemagick support in eww
* lisp/net/shr.el (shr-rescale-image): Emacs has native image
scaling now, so images can be rescaled without imagemagick
support.
2019-05-15 02:53:56 +02:00
Glenn Morris
4b2c9f638a ; Merge from origin/emacs-26
The following commits were skipped:

cf54577 (origin/emacs-26) Backport: fix broken build on m68k
202ff53 Handle GNUTLS_E_AGAIN in emacs_gnutls_read (Bug#34341)
2019-05-14 17:18:19 -07:00
Glenn Morris
5fe9375a51 Merge from origin/emacs-26
02bee78 Let dir locals for more specific modes override those from less
b1235f9 Improve documentation of Hexl mode
32d1813 Fix description of (move-to-column <n> t) when column <n> is ...
0397b7c ; Fix smtpmail-stream-type docstring
7dab3ee Recognize single quote attribute values in nxml and sgml (Bug...
e4cde42 Disable extra display of &#10; in nxml-mode (Bug#32897)
ca14dd1 Fix nxml-get-inside (Bug#32003)
e7ab351 Fix positioning client buffer as instructed by emacsclient

# Conflicts:
#	lisp/files.el
#	lisp/textmodes/sgml-mode.el
2019-05-14 17:18:18 -07:00
Glenn Morris
0f63e17663 ; Merge from origin/emacs-26
The following commit was skipped:

916510b * etc/package-keyring.gpg: Add the 2019 key (backport)
2019-05-14 17:10:28 -07:00
Juri Linkov
c11c990356 * lisp/progmodes/project.el (project-read-file-name-function): Fix type. 2019-05-14 23:40:31 +03:00
Paul Eggert
cf5457764c Backport: fix broken build on m68k
The GCC + valgrind fix caused the m68k build to fail (Bug#35711).
Simplify string allocation a bit to make similar problems less
likely in the future.
* src/alloc.c (sdata, SDATA_NBYTES, SDATA_DATA) [GC_CHECK_STRING_BYTES]:
Use the same implementation as with !GC_CHECK_STRING_BYTES,
as the special case is no longer needed.
(SDATA_ALIGN): New constant.
(SDATA_SIZE): Remove this macro, replacing with ...
(sdata_size): ... this new function.  All uses changed.
Properly account for sizes and alignments even in the m68k case,
and even if GC_CHECK_STRING_BYTES is not defined.
2019-05-14 11:10:02 -07:00
Stefan Monnier
624a232a8d * lisp/savehist.el: Use lexical-binding
Remove redundant :group args.
(savehist-no-conversion): Remove constant.
(savehist-save): Use savehist-coding-system instead since it's no slower.
2019-05-14 14:00:58 -04:00
Paul Eggert
d2dea70415 Default to disabling ImageMagick (Bug#33587)
ImageMagick has continuing stability and security problems, suggesting
that 'configure' should disable it by default.  See Glenn Morris's notes
at: https://lists.gnu.org/r/emacs-devel/2018-12/msg00036.html
* INSTALL, etc/NEWS, nt/INSTALL.W64: Mention this.
* configure.ac (imagemagick): Default to off.
2019-05-13 23:07:05 -07:00
Dmitry Gutov
e0ee41d155 Allow customizing the display of project file names when reading
To hopefully resolve a long-running discussion
(https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00162.html).

* lisp/progmodes/project.el (project-read-file-name-function):
New variable.
(project--read-file-absolute, project--read-file-cpd-relative):
New functions, possible values for the above.
(project-find-file-in): Use the introduced variable.
(project--completing-read-strict): Retain just the logic that fits
the name.
2019-05-14 05:11:18 +03:00
YAMAMOTO Mitsuharu
9b28a5083e Avoid artifacts in ftx and ftcr font backend drivers
* src/ftcrfont.c (ftcrfont_open):
* src/ftfont.c (ftfont_open2): Make font->height equal to sum of font->ascent
and font->descent.  Respect :minspace property.
(ftfont_open2): Remove redundant assignment.
(syms_of_ftfont) <QCminspace>: New DEFSYM.
2019-05-14 10:17:16 +09:00
Basil L. Contovounesios
2f7e97ef48 Fix mail-header-separator font lock in message.el
* lisp/gnus/message.el (message-font-lock-keywords): Dynamically
font lock mail-header-separator, in case it changes. (bug#34898)
2019-05-14 02:15:37 +01:00
Kévin Le Gouguec
417c52b0b7 Extract common code for adding text properties
* lisp/font-lock.el (font-lock--add-text-property):
New function.
(font-lock-prepend-text-property)
(font-lock-append-text-property): Use it.

(Bug#35476)
2019-05-13 20:41:02 -04:00
Kévin Le Gouguec
59ad303e8f Stop splicing anonymous faces in font-lock-append-text-property
This is the same fix as 2019-04-29 "Refrain from splicing anonymous
faces in text properties", which was only applied to
font-lock-prepend-text-property.

* lisp/font-lock.el (font-lock-append-text-property): Distinguish list
of faces from property list.
* test/lisp/font-lock-tests.el: New test suite.

(Bug#35476)
2019-05-13 20:41:02 -04:00
Noam Postavsky
202ff53da2 Handle GNUTLS_E_AGAIN in emacs_gnutls_read (Bug#34341)
Don't merge to master, this has already been fixed there by 2019-01-15
"Fix unlikely races with GnuTLS, datagrams".
* src/gnutls.c (emacs_gnutls_read): Similar to emacs_gnutls_write,
when gnutls_record_recv returns GNUTLS_E_AGAIN set errno to EGAIN.
2019-05-13 20:15:31 -04:00
Basil L. Contovounesios
364d4e156d Do not hard-code message-mode keys in docstring
* lisp/gnus/message.el (message-mode): Replace hard-coded bindings
in docstring with summary of message-mode-map. (bug#31388)
2019-05-13 23:58:45 +01:00
Basil L. Contovounesios
f4c1d95bef Fix last change to message-signature :type
* lisp/gnus/message.el (message-signature): List more specific :type
alternatives before more general ones, as per "(elisp) Composite
Types".
2019-05-13 23:23:06 +01:00
Robert Pluim
2ecb7c5c0b Document nil value of message-signature and mail-signature
* lisp/gnus/message.el (message-signature): Allow nil as a
customizable value, and describe its effect.
* lisp/mail/sendmail.el (mail-signature): Describe effect of nil
value (bug#32680).
2019-05-13 16:46:27 -04:00
Juri Linkov
cd5b0538c5 * lisp/vc/log-view.el (log-view-diff-common): Use the previous revision
only when the end of the region is on a line after the last entry.
(Bug#35624)
2019-05-13 23:40:11 +03:00
Alexandre Garreau
f515bc6398 [PATCH 1/1] Adds variable 'eww-accept-content-types'
* lisp/gnus/message.el (message-simplify-subject): Decouple
simplification from "Re:" adding (bug#33200).
(message-reply): Add the "Re:"'s here.
(message-followup): And here.
2019-05-13 16:34:06 -04:00
Lars Ingebrigtsen
86c8582c9e Make mml respect the "recipient-filename" parameter
* lisp/gnus/mml.el (mml-insert-mime-headers): Implement the
already-documented "recipient-filename" parameter (bug#34654).
2019-05-13 16:16:10 -04:00
Lars Ingebrigtsen
8fe73515ad Make eww understand #fragment URLs at point interactively
* lisp/net/eww.el (eww-suggest-uris): Use
thing-at-point-url-at-point instead of url-get-url-at-point
(bug#31927) because it's much better at guessing what the URL
actually is (especially with #fragments).
2019-05-13 15:45:52 -04:00
Paul Eggert
967711995e Fix broken build on m68k
The GCC + valgrind fix caused the m68k build to fail (Bug#35711).
Simplify string allocation a bit to make similar problems less
likely in the future.
* src/alloc.c (sdata, SDATA_NBYTES, SDATA_DATA) [GC_CHECK_STRING_BYTES]:
Use the same implementation as with !GC_CHECK_STRING_BYTES,
as the special case is no longer needed.
(SDATA_ALIGN): New constant.
(SDATA_SIZE): Remove this macro, replacing with ...
(sdata_size): ... this new function.  All uses changed.
Properly account for sizes and alignments even in the m68k case,
and even if GC_CHECK_STRING_BYTES is not defined.
2019-05-13 12:43:39 -07:00
Lars Ingebrigtsen
3de3452014 Add a comment about the previous shr change 2019-05-13 15:10:33 -04:00
Lars Ingebrigtsen
648a52ae69 Fix problems in shr when indenting tables
* lisp/net/shr.el (shr-mark-fill, shr-insert-table): Fix problems
when block-quoting/<li>-ing a table -- the indentation/prefix was
inserted twice (bug#32277).
2019-05-13 15:04:46 -04:00
Federico Tedin
81af228a63 Use a more specific Accepts header in eww
* lisp/net/eww.el (eww-accept-content-types): New variable.
(eww): Use it.
(eww-reload): Use it. (bug#33002).

Copyright-paperwork-exempt: yes
2019-05-13 14:06:16 -04:00
Jimmy Aguilar Mena
d2d4916046 ; * lisp/faces.el (fill-column-indicator): Fix typo. 2019-05-12 23:20:54 +02:00
Xu Chunyang
fccc3d8067 (eww-follow-link): Record the location properly when following #links
* lisp/net/eww.el (eww-follow-link): Record the location properly
when following #links (bug#35445).
2019-05-12 16:35:49 -04:00
Stefan Monnier
3c1967dbfe * lisp/emacs-lisp/packages.el: Add all to package-check-signature
(package-check-signature): Add `all` option.
(package--check-signature-content): Adjust accordingly.
2019-05-12 13:03:24 -04:00
Neil Roberts
02bee7860f Let dir locals for more specific modes override those from less
The list of dir local variables to apply is now sorted by the number
of parent modes of the mode used as the key in the association list.
That way when the variables are applied in order the variables from
more specific modes will override those from less specific modes.

If there are directory entries in the list then they are sorted in
order of name length.  The list of modes for that dir is then
recursively sorted with the same mechanism.  That way variables tied
to a particular subdirectory override those in in a parent directory.

Previously the behaviour didn’t seem to be well defined anyway and was
dependent on the order they appeared in the file.  However this order
was changed in version 26.1 and it probably also depended on the
number of dir-local files that are merged.

Bug#33400

* lisp/files.el (dir-locals-get-sort-score, dir-locals-sort-variables)
(dir-locals-read-from-dir): Sort the dir locals so that more precise
modes and directory-specific entries have override lesser ones.
* doc/emacs/custom.texi (Directory Variables): Document the priority.
2019-05-12 09:59:55 -04:00
Noam Postavsky
29531785a1 Improve printing for named keyboard macros (Bug#35486)
* lisp/macros.el (macros--insert-vector-macro): New function,
extracted from insert-kbd-macro.
(insert-kbd-macro): Use it and kmacro-extract-lambda to produce nicer
expressions for macros produced by kmacro-lambda-form.
2019-05-12 08:05:01 -04:00
Noam Postavsky
b1cc876b6c Use remapping in ffap-bindings (Bug#35577)
* lisp/ffap.el (ffap-bindings): Bind to the [remap COMMAND] instead of
hardcoding the default keybindings.  This better adapts better if
non-default are used.  And lets the original keybindings be
remembered, so that, e.g., \[find-file] in docstrings will still be
substituted with C-x C-f (even though that binding has been remapped
to find-file-at-point.
2019-05-12 08:05:01 -04:00
Basil L. Contovounesios
571d802df3 Fix Gnus summary widget navigation across frames
* lisp/gnus/gnus-sum.el (gnus-summary-widget-forward)
(gnus-summary-widget-backward): Signal more informative error if
article window is not found.  Consider other frames displaying
article buffer, and raise its frame before navigating its
widgets. (bug#35565)
* lisp/gnus/gnus-win.el (gnus-get-buffer-window): Simplify and add
docstring.
2019-05-12 12:47:56 +01:00
Basil L. Contovounesios
bb60144d00 Make application/x-patch inlinable in mm-decode.el
* lisp/gnus/mm-decode.el (mm-inline-media-tests, mm-inlined-types):
Include application/x-patch as a synonym of text/x-patch and
text/x-diff. (bug#35236)
2019-05-12 12:27:40 +01:00
Basil L. Contovounesios
ef62469e56 Fix some gnus-msg.el variables (bug#35239)
* lisp/gnus/gnus-msg.el (gnus-gcc-externalize-attachments):
Fix custom :type.
(gnus-debug-files, gnus-debug-exclude-variables): Mark variables
that have been unused since Emacs 24.1 as obsolete.
(gnus-check-before-posting): Remove unused variable.
2019-05-12 11:59:11 +01:00