This reverts commit 75155e4586.
Evidently, some MSYS2/MinGW64 folks still think Windows 8.1
is the minimum supported version, even though MinGW-w64 switched
to Windows 10 as the default target in January 2022.
* lisp/international/mule-conf.el (chinese-cns11643-15): Fix
:code-offset value. (Bug#60275)
* lisp/international/characters.el: Add chinese-cns11643-15 to
charsets whose characters have categories c and C.
Now it handles stuff like
/**
* @some_func:
* @arg1:
*/
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use new
matcher and anchor.
(c-ts-mode--looking-at-star): New matcher.
(c-ts-mode--comment-start-after-first-star): New anchor.
* src/treesit.c (treesit_recursion_limit): New constant.
(treesit_cursor_helper)
(Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Use the new constant.
Now indent and filling works like in c-mode. The only noticeable
missing piece is that the "*/" is not attached to the last sentence
when filling. c-mode does it by replacing whitespaces between the
"*/" and the end of the last sentence with xxx, fill it, then change
the xxx back. I don't know if we should do that in c-ts-mode's filling.
* doc/lispref/modes.texi (Parser-based Indentation): Add new preset.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add new
indent rule.
(c-ts-mode--fill-paragraph): New function.
(c-ts-base-mode): Setup paragraph-start, adaptive-fill, etc.
* lisp/treesit.el (treesit-simple-indent-presets): Add new preset.
The cause of that bug is that in a particular parse tree, the node
treesit_cursor_helper tries to go to is a missing node, not only is it
a missing node, it is the first node of a subtree. So when
treesit_cursor_helper follows the algorithm and goes down the tree, it
goes down the previous subtree (because that subtree's end = end_pos,
because the target node has zero width).
o
|
o--+-o
| |
+-+ +-+-+
| | | | |
o x t o o
(We ended up in x when the target is t, because t has zero width.)
One way to solve it is to go back up the tree if we are at a leaf node
and still haven't matched the target node. That's too ugly and
finicky so I resorted to recursion. Now one more functions will
return give up (treesit_node_parent) if we are in a werid parse tree
that is super deep. But since we already kind of give up on this kind
of parse trees (bug#59426), it doesn't really hurt.
* src/treesit.c (treesit_cursor_helper_1): New function.
(treesit_cursor_helper): Use the new function. Change return type to
bool, and accept a cursor pointer.
(Ftreesit_node_parent)
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Use the new signature.
The node (info)Go to node in the Info manual states that 'g'
does not allow the use of abbreviations, however it does.
To test this, type 'gt' from this node and see that it takes
you to (info)Top, then type 'ggo<RET>' and see that it takes
you back to (info)Go to node. Tested on emacs 28.2.
* doc/misc/info.texi (Go to node): Fix inaccurate information.
(Bug#60263)
Copyright-paperwork-exempt: yes
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-fixups-added-lines):
Test that diff-mode fixes patches with added lines correctly.
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-fixups-empty-hunks):
Ditto for patches with empty hunks. (Bug#60259)
Apparently the emacsclient-mail.desktop file doesn't conform to the
Desktop Entry Specification at
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
which says about the Exec key:
| Field codes must not be used inside a quoted argument, the result of
| field code expansion inside a quoted argument is undefined.
However, the %u field code is used inside a quoted argument of the
Exec key in both the [Desktop Entry] and [Desktop Action new-window]
sections.
* etc/emacsclient-mail.desktop (Exec): The Desktop Entry
Specification does not allow field codes like %u inside a quoted
argument. Work around it by passing %u as first parameter ($1)
to the shell wrapper.
* etc/emacsclient.desktop (Exec): Use `sh` rather than `placeholder`
as the command name of the shell wrapper. (Bug#60204)
* lisp/emacs-lisp/ert-x.el (ert-with-buffer-selected): New macro to
temporarily display a buffer in a selected window and evaluate a body.
(ert-with-test-buffer-selected): Use the new macro.
* test/lisp/whitespace-tests.el
(ert-test-with-buffer-selected/current)
(ert-test-with-buffer-selected/selected)
(ert-test-with-buffer-selected/nil-buffer)
(ert-test-with-buffer-selected/modification-hooks)
(ert-test-with-buffer-selected/read-only)
(ert-test-with-buffer-selected/return-value): Add tests.
(Bug#60189)
This test should have been included with commit
29b7d74000.
* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-with-test-buffer-selected/read-only): New test.
(Bug#60189)
* lisp/subr.el (event--posn-at-point): Leave POSN alone if it
doesn't have at least 6 members. This follows more faithfully
what 'event-start' and 'event-end' did before they started using
this function, see commit c1cead89f5. Call posn-at-point with
the minibuffer-window when in the minibuffer. (Bug#60252)
* doc/emacs/custom.texi (Modifier Keys): Document how to enter
Shift, Control, and Meta using "C-x @".
* lisp/simple.el (function-key-map): Add commentary to "C-x @"
bindings to make them easier to discover.
* lisp/vc/vc-git.el (vc-git-checkin): Don't try to apply an empty
patch to the index, because in that case 'git apply' fails.
(cherry picked from commit 1424342225)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.0.29.1".
(customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.1.
A weak-valued hash-table is not enough to guarantee that a reference
to a zombie server in eglot--servers-by-xrefed-file variable won't
survive long enough to confuse the next call to eglot--current-server
in some buffers.
So, before this fix it was common to get "Process EGLOT ... not
running" errors if some xref-extended buffers (like system libraries)
were open and M-x eglot-reconnect was issued. This should be
prevented now.
Note however, that even after this the eglot-extend-to-xref logic is
still flawed. For example, if a buffer for the xref-extended buffer
happens to be already visited by the time M-. is issued to navigate to
it, Eglot won't be activated. A half-decent workaround is to kill the
buffer and re-visit it.
* lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Move
up.
(eglot--on-shutdown): Make sure to cleanup
eglot--servers-by-xrefed-file.
As part of 18947103fa,
`font-lock-fontify-syntactically-region' was renamed to
`font-lock-default-fontify-sytactically'.
* lisp/font-lock.el (font-lock-fontify-syntactically-region): Add
obsolete alias for the renamed function.
Copyright-paperwork-exempt: yes
This is so that users can type "cmd ... > /dev/null" in Eshell no
matter what their system's null device is called. (Users can still
use their system's null device name when redirecting, too. Eshell
doesn't need to do anything special to support that.) This partially
reverts 67a8bdb90c. See bug#59545.
Do not merge to master.
* lisp/eshell/esh-io.el (eshell-set-output-handle): Use "/dev/null"
literally.
* lisp/eshell/em-elecslash.el (eshell-electric-forward-slash): Insert
the remote prefix as determined by 'file-remote-p'.
Copyright-paperwork-exempt: Yes
* src/fileio.c (write_region) [WINDOWSNT]: Ignore EBADF errors
from fsync -- this means fsync is not supported for this file.
Happens, for example, with the null device. (Bug#59545)