Lars Ingebrigtsen [Fri, 17 May 2019 03:42:12 +0000 (05:42 +0200)]
(gui-get-selection): Avoid using `string-to-multibyte'
* lisp/select.el (gui-get-selection): Avoid using
`string-to-multibyte' -- instead encode as `eight-bit' if the
string is unibyte.
Lars Ingebrigtsen [Fri, 17 May 2019 03:18:12 +0000 (05:18 +0200)]
Declare two w32 functions to avoid byte compilation warnings
* lisp/w32-fns.el (w32-version, w32-read-registry): Declare these
functions to avoid byte compilation warnings. The functions
should be loaded when `w32--os-description' is called, as far as I
can tell.
Lars Ingebrigtsen [Fri, 17 May 2019 02:47:31 +0000 (04:47 +0200)]
Remove obsolete epg functions
* lisp/epg.el (epg-start-sign-keys, epg-sign-keys): Remove
functions declared obsolete since Emacs 23.1.
Lars Ingebrigtsen [Fri, 17 May 2019 02:22:08 +0000 (04:22 +0200)]
Declare rectangle functions in mouse.el to avoid warnings
* lisp/mouse.el (rectangle-dimensions)
(rectangle-position-as-coordinates, rectangle-intersect-p):
Declare these functions from rect.el to avoid compilation warnings.
Stefan Monnier [Fri, 17 May 2019 02:00:57 +0000 (22:00 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Fix docstring of accessors.
Stefan Monnier [Fri, 17 May 2019 01:50:16 +0000 (21:50 -0400)]
* lisp/gnus/nnheader.el (mail-header-*): Define via cl-defstruct
This also has the side effect that the accessors are now defined as proper
functions rather than as macros, so they can be passed to `mapcar` etc..
* lisp/gnus/nnheader.el (mail-header-number, mail-header-subject)
(mail-header-from, mail-header-date, mail-header-id)
(mail-header-references, mail-header-chars, mail-header-lines)
(mail-header-xref, mail-header-extra): Define via cl-defstruct.
(mail-header-set-number, mail-header-set-subject)
(mail-header-set-from, mail-header-set-date, mail-header-set-id)
(mail-header-set-message-id, mail-header-set-references)
(mail-header-set-chars, mail-header-set-lines, mail-header-set-xref)
(mail-header-set-extra): Remove, use `setf` instead. All callers adjusted.
* lisp/gnus/gnus-sum.el (gnus-select-newsgroup)
(gnus-summary-pop-limit, gnus-summary-limit-mark-excluded-as-read)
(gnus-summary-find-matching, gnus-find-matching-articles):
* lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal, gnus-execute):
* lisp/gnus/gnus-score.el (gnus-score-adaptive):
Eta-reduce, now that mail-header-FIELD are functions.
Katsumi Yamaoka [Fri, 17 May 2019 01:34:47 +0000 (01:34 +0000)]
Fix ffap behavior in the Gnus group buffer (bug#35693)
* lisp/ffap.el (ffap-file-exists-string, ffap-file-at-point):
Don't recognize "" as a path or a file name (bug#35693).
Stefan Monnier [Fri, 17 May 2019 00:49:06 +0000 (20:49 -0400)]
* mule.el (set-buffer-file-coding-system): Don't burp on iso-2022-7bit
Paul Pogonyshev [Thu, 10 Jan 2019 19:39:54 +0000 (20:39 +0100)]
Make `package' not "uninhibit" messages (Bug#34037)
* lisp/emacs-lisp/package.el: Don't let-bind inhibit-message to a
different value if it was non-nil.
Basil L. Contovounesios [Tue, 7 May 2019 12:46:22 +0000 (13:46 +0100)]
Fix gnus-summary-expand-window placement of point
* lisp/gnus/gnus-win.el (gnus-configure-frame): Replace
switch-to-buffer with pop-to-buffer-same-window to avoid messing
with point. (bug#35613)
Basil L. Contovounesios [Thu, 16 May 2019 22:26:27 +0000 (23:26 +0100)]
Add docstring to project--read-file-cpd-relative
For discussion, see thread starting at:
https://lists.gnu.org/archive/html/emacs-devel/2019-05/msg00460.html
* lisp/progmodes/project.el (project--read-file-cpd-relative):
Describe arglist as promised by user option
project-read-file-name-function.
Stefan Monnier [Thu, 16 May 2019 21:16:36 +0000 (17:16 -0400)]
* cl-macs-tests.el (cl-macs-test--symbol-macrolet): New test
Eric Abrahamsen [Thu, 16 May 2019 19:47:18 +0000 (12:47 -0700)]
Fix stray call to make-vector
* lisp/gnus/gnus-agent.el (gnus-agent-fetch-group-1): This is meant to
be a hash table.
Stefan Monnier [Thu, 16 May 2019 19:29:36 +0000 (15:29 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand) <setq>: Rewrite
The previous code had 2 problems:
- It converted `setq` to `setf` in unrelated cases such as
(cl-symbol-macrolet ((x 1)) (setq (car foo) bar))
- It macroexpanded places before `setf` had a chance to see if they
have a gv-expander.
Paul Eggert [Thu, 16 May 2019 17:42:27 +0000 (10:42 -0700)]
Distribute test cases in tarballs by default
* INSTALL, INSTALL.REPO, admin/make-tarball.txt:
Mention ‘make check’.
* configure.ac: Update comment.
* etc/NEWS: Say that tarballs have a test directory.
* make-dist (with_tests): Default to "yes".
Add an option --no-tests to make it "no".
Lars Ingebrigtsen [Thu, 16 May 2019 11:38:11 +0000 (13:38 +0200)]
Make shr-rescale-image respect get-buffer-window again
* lisp/net/shr.el (shr-rescale-image): Partially revert previous
change -- ressurrect the check for `get-buffer-window'.
Ivan Shmakov [Fri, 14 Sep 2018 19:05:12 +0000 (19:05 +0000)]
Improve user convenience of the rcirc debug buffer
* lisp/net/rcirc.el (rcirc-debug): Ignore rcirc-debug-buffer read-only
status. Restore point after insertion unless it was at the end.
Ensure a newline before each [lead]. Replace %Y-%m-%d with the
equivalent %F in format-time-string; remove useless concat. (Bug#32470)
Noam Postavsky [Tue, 7 May 2019 22:15:35 +0000 (18:15 -0400)]
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.
Michael Albinus [Thu, 16 May 2019 06:36:33 +0000 (08:36 +0200)]
* lisp/net/tramp.el (tramp-yesno-prompt-regexp): Extend.
Stefan Monnier [Thu, 16 May 2019 02:21:36 +0000 (22:21 -0400)]
* 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.
Noam Postavsky [Wed, 15 May 2019 22:51:30 +0000 (18:51 -0400)]
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.
Anders Lindgren [Wed, 15 May 2019 19:00:49 +0000 (21:00 +0200)]
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.
Stefan Monnier [Wed, 15 May 2019 17:53:13 +0000 (13:53 -0400)]
* 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`.
Paul Eggert [Wed, 15 May 2019 17:26:54 +0000 (10:26 -0700)]
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.
Stefan Monnier [Wed, 15 May 2019 17:00:51 +0000 (13:00 -0400)]
* lisp/mail/footnote.el (footnote-prefix): Docstring typo.
Mattias Engdegård [Tue, 14 May 2019 09:43:49 +0000 (11:43 +0200)]
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.
John Shahid [Wed, 15 May 2019 14:29:58 +0000 (16:29 +0200)]
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.
Alan Mackenzie [Wed, 15 May 2019 08:58:31 +0000 (08:58 +0000)]
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.
Lars Ingebrigtsen [Wed, 15 May 2019 07:45:08 +0000 (09:45 +0200)]
Describe error data in url-retrieve better
* lisp/url/url.el (url-retrieve): Describe the error data more in
depth (bug#25735).
Lars Ingebrigtsen [Wed, 15 May 2019 05:34:35 +0000 (07:34 +0200)]
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.
Lars Ingebrigtsen [Wed, 15 May 2019 05:12:26 +0000 (07:12 +0200)]
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).
Lars Ingebrigtsen [Wed, 15 May 2019 04:59:12 +0000 (06:59 +0200)]
Indent url-http-chunked-encoding-after-change-function
Thomas Fitzsimmons [Wed, 15 May 2019 04:14:21 +0000 (06:14 +0200)]
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).
Lars Ingebrigtsen [Wed, 15 May 2019 00:53:56 +0000 (02:53 +0200)]
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.
Glenn Morris [Wed, 15 May 2019 00:18:19 +0000 (17:18 -0700)]
; 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)
Glenn Morris [Wed, 15 May 2019 00:18:18 +0000 (17:18 -0700)]
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 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
Glenn Morris [Wed, 15 May 2019 00:10:28 +0000 (17:10 -0700)]
; Merge from origin/emacs-26
The following commit was skipped:
916510b * etc/package-keyring.gpg: Add the 2019 key (backport)
Juri Linkov [Tue, 14 May 2019 20:40:31 +0000 (23:40 +0300)]
* lisp/progmodes/project.el (project-read-file-name-function): Fix type.
Paul Eggert [Mon, 13 May 2019 19:43:13 +0000 (12:43 -0700)]
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.
Stefan Monnier [Tue, 14 May 2019 18:00:58 +0000 (14:00 -0400)]
* 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.
Paul Eggert [Tue, 14 May 2019 05:59:29 +0000 (22:59 -0700)]
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.
Dmitry Gutov [Tue, 14 May 2019 02:09:19 +0000 (05:09 +0300)]
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.
YAMAMOTO Mitsuharu [Tue, 14 May 2019 01:17:16 +0000 (10:17 +0900)]
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.
Basil L. Contovounesios [Mon, 18 Mar 2019 18:21:15 +0000 (18:21 +0000)]
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)
Kévin Le Gouguec [Sun, 12 May 2019 16:55:01 +0000 (18:55 +0200)]
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)
Kévin Le Gouguec [Sun, 12 May 2019 16:36:09 +0000 (18:36 +0200)]
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)
Noam Postavsky [Mon, 6 May 2019 23:55:17 +0000 (19:55 -0400)]
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.
Basil L. Contovounesios [Mon, 7 May 2018 15:42:41 +0000 (16:42 +0100)]
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)
Basil L. Contovounesios [Mon, 13 May 2019 22:23:06 +0000 (23:23 +0100)]
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".
Robert Pluim [Mon, 13 May 2019 20:45:16 +0000 (16:45 -0400)]
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).
Juri Linkov [Mon, 13 May 2019 20:40:11 +0000 (23:40 +0300)]
* 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)
Alexandre Garreau [Mon, 13 May 2019 20:34:06 +0000 (16:34 -0400)]
[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.
Lars Ingebrigtsen [Mon, 13 May 2019 20:16:10 +0000 (16:16 -0400)]
Make mml respect the "recipient-filename" parameter
* lisp/gnus/mml.el (mml-insert-mime-headers): Implement the
already-documented "recipient-filename" parameter (bug#34654).
Lars Ingebrigtsen [Mon, 13 May 2019 19:17:00 +0000 (15:17 -0400)]
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).
Paul Eggert [Mon, 13 May 2019 19:43:13 +0000 (12:43 -0700)]
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.
Lars Ingebrigtsen [Mon, 13 May 2019 19:10:33 +0000 (15:10 -0400)]
Add a comment about the previous shr change
Lars Ingebrigtsen [Mon, 13 May 2019 19:04:46 +0000 (15:04 -0400)]
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).
Federico Tedin [Mon, 13 May 2019 18:06:16 +0000 (14:06 -0400)]
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
Jimmy Aguilar Mena [Sun, 12 May 2019 21:20:54 +0000 (23:20 +0200)]
; * lisp/faces.el (fill-column-indicator): Fix typo.
Xu Chunyang [Sun, 12 May 2019 20:35:49 +0000 (16:35 -0400)]
(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).
Stefan Monnier [Sun, 12 May 2019 17:03:24 +0000 (13:03 -0400)]
* lisp/emacs-lisp/packages.el: Add `all` to package-check-signature
(package-check-signature): Add `all` option.
(package--check-signature-content): Adjust accordingly.
Neil Roberts [Fri, 10 May 2019 10:57:28 +0000 (12:57 +0200)]
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.
Noam Postavsky [Sun, 5 May 2019 17:24:15 +0000 (13:24 -0400)]
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.
Noam Postavsky [Sun, 5 May 2019 13:13:19 +0000 (09:13 -0400)]
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.
Basil L. Contovounesios [Sat, 4 May 2019 15:29:39 +0000 (16:29 +0100)]
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.
Basil L. Contovounesios [Thu, 11 Apr 2019 13:42:20 +0000 (14:42 +0100)]
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)
Basil L. Contovounesios [Thu, 11 Apr 2019 22:55:03 +0000 (23:55 +0100)]
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.
Mauro Aranda [Thu, 2 May 2019 12:51:01 +0000 (09:51 -0300)]
Use characters, not symbols for table-cell-bindings
* lisp/textmodes/table.el (table-cell-bindings): Add missing '?', to
avoid confusion between symbols and characters in bindings. (Bug#35533)
Eli Zaretskii [Sat, 11 May 2019 12:00:06 +0000 (15:00 +0300)]
Improve documentation of Hexl mode
* doc/emacs/misc.texi (Editing Binary Files): Clarify
"insertion". Improve wording. Add a few Hexl commands.
(Bug#35580)
Mark Oteiza [Sat, 11 May 2019 00:55:04 +0000 (20:55 -0400)]
Generate some repetitive WordStar code with macros
* lisp/obsolete/ws-mode.el (ws-set-marker-0, ws-set-marker-1):
(ws-set-marker-2, ws-set-marker-3, ws-set-marker-4, ws-set-marker-5):
(ws-set-marker-6, ws-set-marker-7, ws-set-marker-8, ws-set-marker-9):
(ws-find-marker-0, ws-find-marker-1, ws-find-marker-2, ws-find-marker-3):
(ws-find-marker-4, ws-find-marker-5, ws-find-marker-6, ws-find-marker-7):
(ws-find-marker-8, ws-find-marker-9): Remove.
(ws-set-marker, ws-find-marker): New macros. Use them.
Alexander Gramiak [Thu, 9 May 2019 15:37:50 +0000 (09:37 -0600)]
Convert Free_Pixmap macro into terminal hook
* src/termhooks.h (terminal) [HAVE_WINDOW_SYSTEM]: New terminal hook
free_pixmap.
* src/image.c: Replace Free_Pixmap with free_pixmap.
* src/msdos.h (FRAME_X_DISPLAY):
* src/nsgui.h (Display):
* src/nsterm.h (FRAME_NS_DISPLAY, FRAME_X_DISPLAY, FRAME_X_SCREEN)
(FRAME_X_VISUAL):
* src/w32term.h (FRAME_X_DISPLAY): Remove unused X-compatibility
macros and typedefs.
* src/nsterm.m:
* src/w32term.c:
* src/xterm.c: Implement and set free_pixmap hook.
Alexander Gramiak [Thu, 9 May 2019 03:40:24 +0000 (21:40 -0600)]
Remove display member of glyph_string
This member has little value even on X, and it leaks internal backend
details to the glyph_string struct.
* src/dispextern.h (glyph_string): Remove X display member.
* src/xdisp.c (init_glyph_string): Remove initialization of display.
* src/xfont.c (xfont_draw):
* src/xterm.c: Use FRAME_X_DISPLAY (s->f) instead of display member.
Stefan Monnier [Fri, 10 May 2019 12:49:03 +0000 (08:49 -0400)]
* lisp/help.el (help--read-key-sequence): Handle `switch-frame' events
If you do `C-h k ... mouse-1 in other frame` (at least if you have a focus
that follows the mouse), then additionally to the down-mouse-1 and mouse-1
events, a `switch-frame` event (and `select-window` event as well sometimes)
is generated. When `read-key-sequence` is called with nil for
`can-return-switch-frame`, this event is not returned but kept for later,
which causes a subsequent `sit-for` to return nil immediately.
This interfered without our "wait for double-click" which in turn prevented
us from stopping after the mouse-1 click, getting stuck waiting for something
else instead.
(help--read-key-sequence): Pass a non-nil `can-return-switch-frame`, so the
subsequent `sit-for` returns more trustworthy information.
Michael Albinus [Fri, 10 May 2019 12:48:07 +0000 (14:48 +0200)]
Handle subdomains in Tramp ad-hoc proxies
* lisp/net/tramp-sh.el (tramp-compute-multi-hops): Add proper
regexps to `tramp-default-proxies-alist'.
Noam Postavsky [Tue, 7 May 2019 12:18:49 +0000 (08:18 -0400)]
Stop using message-default-charset (Bug#35370)
In 2016-02-14 "Remove compat code for older Emacsen",
message-default-charset was obsoleted, and a couple of uses were
removed, but others were left behind.
* lisp/gnus/message.el (message-send-mail)
(message-send-news, message-do-fcc)
(message-encode-message-body):
* lisp/gnus/mml.el (mml-to-mime): Stop using message-default-charset.
Alan Mackenzie [Fri, 10 May 2019 10:21:09 +0000 (10:21 +0000)]
Optimize CC Mode a bit for repetitive insertion and replace-regexp
This is mainly by enhancing a parse-partial-sexp cache to retain recently
calculated values. Also, there are several miscellaneous optimizations and
bug fixes.
* lisp/progmodes/cc-engine.el (c-state-semi-nonlit-near-cache): New buffer
local variable.
(c-state-semi-trim-near-cache, c-state-semi-get-near-cache-entry)
(c-state-semi-put-near-cache-entry, c-state-semi-trim-cache): New functions.
(c-state-semi-pp-to-literal, c-state-full-pp-to-literal): Use the new "near"
cache.
(c-parse-ps-state-below): Use the new function c-state-semi-trim-cache.
(c-before-change-check-<>-operators): Check simply for < or > in the
neighbourhood before doing more expensive processing.
(c-maybe-re-mark-raw-string): Give a backward search limit to an operation
which was needlessly lacking one.
* lisp/progmodes/cc-mode.el (c-doc-fl-decl-start, c-doc-fl-decl-end): Check a
certain regexp is valid before performing the (somewhat expensive) actions of
these functions.
(c-fl-decl-start): In the search for a C++ lambda capture list, replace (slow)
calculation of c-parse-state by a (less slow) c-go-up-list-backward.
Alan Mackenzie [Fri, 10 May 2019 07:28:54 +0000 (07:28 +0000)]
Make uncomment-region remove obtrusive spaces before tabs.
These spaces were typically inserted earlier by comment-region. This patch
makes these two complementary functions closer to inverses.
* lisp/newcomment.el (uncomment-region-default-1): Remove spaces before a tab
where the comment opener has just been removed.
Michael Heerdegen [Mon, 6 May 2019 12:58:24 +0000 (14:58 +0200)]
Fix alist-get gv setter not returning VAL
This fixes Bug#35546.
* lisp/emacs-lisp/gv.el (alist-get): Make setter return the set value
to preserve 'setf' semantics.
Alan Mackenzie [Thu, 9 May 2019 16:27:03 +0000 (16:27 +0000)]
Fix description of (move-to-column <n> t) when column <n> is inside a tab
This fixes bug #35647. State that when indent-tabs-mode is non-nil, spaces
are inserted before the tab rather than the tab being replaced by spaces.
* doc/lispref/text.texi (columns)
* src/indent.c (move-to-column): Make the above documentation amendment.
Stefan Monnier [Thu, 9 May 2019 14:32:25 +0000 (10:32 -0400)]
* lisp/mail/footnote.el: Avoid regexp-opt-charset, which is not autoloaded.
(footnote-hebrew-numeric-regex): Use rx-to-string instead.
Michael Albinus [Thu, 9 May 2019 12:24:22 +0000 (14:24 +0200)]
Fix an error in tramp-vc-file-name-handler
* lisp/net/tramp.el (tramp-accept-process-output, tramp-send-string):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-make-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-process-file)
(tramp-smb-handle-set-file-acl)
(tramp-smb-handle-start-file-process): Do not suppress timers.
* lisp/net/tramp-sh.el (tramp-vc-file-name-handler): Check, that
`tramp-file-name-for-operation' returns a proper Tramp file.
Michael Albinus [Thu, 9 May 2019 12:23:07 +0000 (14:23 +0200)]
* test/lisp/net/tramp-tests.el (cl-lib): Require instead of cl-seq.
Noam Postavsky [Sun, 5 May 2019 16:27:32 +0000 (12:27 -0400)]
; Fix smtpmail-stream-type docstring
* lisp/mail/smtpmail.el (smtpmail-stream-type): Remove redundant
docstring verbiage.
Noam Postavsky [Mon, 22 Apr 2019 02:44:50 +0000 (22:44 -0400)]
Recognize single quote attribute values in nxml and sgml (Bug#35381)
* lisp/textmodes/sgml-mode.el (sgml-specials): Add single quote.
(sgml-syntax-propertize-rules): Handle single quote.
* test/lisp/nxml/nxml-mode-tests.el (nxml-mode-font-lock-quotes): New
test.
* test/lisp/textmodes/sgml-mode-tests.el
(sgml-delete-tag-bug-8203-should-not-delete-apostrophe): Now passes.
Noam Postavsky [Fri, 19 Apr 2019 17:28:00 +0000 (13:28 -0400)]
Disable extra display of in nxml-mode (Bug#32897)
* lisp/nxml/nxml-mode.el (nxml-char-ref-display-extra): Don't put
display for the newline, it makes the indentation look wrong.
Noam Postavsky [Fri, 19 Apr 2019 03:36:04 +0000 (23:36 -0400)]
Fix nxml-get-inside (Bug#32003)
The change from 2016-01-16 "lisp/nxml: Use syntax-tables for comments"
made nxml-get-inside return non-nil for any string or comment,
including attribute strings. This caused incorrect and therefore
indentation.
* lisp/nxml/nxml-rap.el: Update commentary to reflect changes to
nxml-mode parsing.
(nxml-get-inside): Only return non-nil when inside comments and
generic strings, not normal quote-delimited strings.
* test/lisp/nxml/nxml-mode-tests.el: New tests.
Stefan Monnier [Wed, 8 May 2019 19:18:32 +0000 (15:18 -0400)]
* lisp/emacs-lisp/syntax.el (syntax-propertize): `ignore` is like nil
(syntax-ppss-after-change-function): Mark it as obsolete.
* lisp/font-lock.el (font-lock-apply-syntactic-highlight):
Use syntax-ppss-flush-cache instead.
Eli Zaretskii [Wed, 8 May 2019 17:34:09 +0000 (20:34 +0300)]
Fix positioning client buffer as instructed by emacsclient
* lisp/server.el (server-switch-buffer): Let-bind
switch-to-buffer-preserve-window-point to nil when switching
to the client buffer, when the client requested a specific
position. (Bug#35602)
Stefan Monnier [Wed, 8 May 2019 17:19:36 +0000 (13:19 -0400)]
* etc/package-keyring.gpg: Add the 2019 key (backport)
Paul Eggert [Wed, 8 May 2019 15:37:40 +0000 (08:37 -0700)]
Port LIBRSVG_CHECK_VERSION fix to picky cpp
* src/image.c (LIBRSVG_CHECK_VERSION): Define to yield false
if it isn’t already defined.
(svg_load_image): Port to C preprocessors that check the
syntax of the entire preprocessing expression before
evaluating any of it.
Glenn Morris [Wed, 8 May 2019 14:51:48 +0000 (07:51 -0700)]
Merge from origin/emacs-26
1c6484e (origin/emacs-26) Fix incorrect cloning of eieio-instance-inh...
37436fe Fix cloning of eieio-named objects (Bug#22840)
fb65a36 Fix ibuffer-unmark-backward synopsis (bug#35572)
f77bd2b ; * src/lisp.h (DEFSYM): Fix inaccurate comment.
3b86e0b Clarify handling of long options (Bug#24949)
04340a8 Improve documentation of the daemon and emacsclient
3e29de2 * etc/NEWS.24: Belatedly announce delete-consecutive-dups.
Glenn Morris [Wed, 8 May 2019 14:51:48 +0000 (07:51 -0700)]
; Merge from origin/emacs-26
The following commits were skipped:
0ae7b2b (emacs-26) ; Auto-commit of loaddefs files.
3e322df * admin/update_autogen: Handle git worktree.
Glenn Morris [Wed, 8 May 2019 14:51:46 +0000 (07:51 -0700)]
Merge from origin/emacs-26
ec02c73 Update process filter example (Bug#35044)
Eli Zaretskii [Wed, 8 May 2019 13:20:36 +0000 (16:20 +0300)]
; * lisp/help.el (view-lossage): Fix commentary. (Bug#35596)
Eli Zaretskii [Wed, 8 May 2019 13:03:08 +0000 (16:03 +0300)]
Fix compilation with old versions of librsvg
* src/image.c (svg_load_image): Use LIBRSVG_CHECK_VERSION only
if it's defined; it isn't in old versions of librsvg.
Vitalie Spinu [Wed, 8 May 2019 09:12:29 +0000 (11:12 +0200)]
Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)
* lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of
eieio-instance-inheritor objects as documented in the docs string
and implemented in the original eieio implementation.
Michael Albinus [Wed, 8 May 2019 08:49:31 +0000 (10:49 +0200)]
; Instrument auto-revert--deftest-remote
Michael Albinus [Wed, 8 May 2019 07:44:22 +0000 (09:44 +0200)]
Skip tramp-test10-write-region-file-precious-flag for Emacs < 27
* test/lisp/net/tramp-tests.el
(tramp-test10-write-region-file-precious-flag): Skip for Emacs < 27.
Jonathan Tomer [Wed, 8 May 2019 07:13:58 +0000 (09:13 +0200)]
Don't rewrite buffer contents after saving by rename (Bug#35497)
* lisp/files.el (basic-save-buffer-2): Don't rewrite file contents
after saving-by-renaming. (Bug#35497)
* test/lisp/files-tests.el (files-tests-dont-rewrite-precious-files):
* test/lisp/net/tramp-tests.el
(tramp-test10-write-region-file-precious-flag): Regression tests
for this change.
Eli Zaretskii [Wed, 8 May 2019 06:29:20 +0000 (09:29 +0300)]
Add an assertion to xdisp.c
* src/xdisp.c (display_mode_element): Add an assertion where
we assume that 'string' returned by decode_mode_spec is always
either a Lisp string or nil.