* test/manual/redisplay-testsuite.el (test-redisplay-5): Add some
newlines.
(test-redisplay-6): New function...
(test-redisplay): ... call it (bug#72721).
Previously, you could only use this when setting the handle afterwards.
* lisp/eshell/esh-io.el (eshell-set-output-handle): Don't catch
'eshell-null-device' here...
(eshell-get-target): ... catch it here.
* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/output-dev-null): New test (bug#72857).
* lisp/eshell/esh-io.el (eshell-output-object-to-target): Don't require
TARGET to be bound.
* lisp/eshell/em-script.el (eshell-execute-file):
* lisp/eshell/eshell.el (eshell-command): Quote the output/error
targets.
* test/lisp/eshell/em-script-tests.el (eshell-execute-file-output): New
variable.
(em-script-test/execute-file/output-symbol): New test.
* test/lisp/eshell/eshell-tests.el (eshell-command-output): New
variable.
(eshell-test/eshell-command/output-symbol): New test (bug#72857).
This makes sure we close the handles as we should, which is important
for writing the output to an actual file (bug#72857).
* lisp/eshell/em-script.el (esh-cmd): Require this, just to be explicit.
(eshell-execute-file): Use 'eshell-with-handles'.
This binding dates back at least to 2004 (where we bound
`after-change-functions` instead). Maybe it had a real impact in the past,
but nowadays I can't see any effect other than maybe a negligible
performance improvement at the cost at breaking some uses of
`before-after-change-functions`.
* lisp/gnus/message.el (message-hide-headers):
Don't bind `inhibit-modification-hooks`.
* doc/misc/tramp.texi (Frequently Asked Questions): Remove tramp-mode.
* lisp/net/tramp.el (tramp-mode): Make it a defvar. People shouldn't
customize it manually.
* lisp/treesit.el (treesit-forward-sexp): Check if point is strictly
inside a comment or string, only then use the default forward-sexp
function; otherwise use tree-sitter's forward-sexp routine.
This refines the fix for bug#72561: commit 0a50019308 fixes
the bug by changing `ert--pp-with-indentation-and-newline`,
but it turns out that `pp` was inconsistent (it sometimes
indented the subsequent lines correctly and sometimes not,
depending on the current-buffer's major mode).
So the fix really should be in `pp`, which is what this patch does.
* lisp/emacs-lisp/pp.el (pp): Appropriately indent subsequent lines
if the first line is not inserted in column 0 (tho only when
printing into a buffer since otherwise it's somewhere between
ill-defined and impossible to implement).
* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Remove the indentation code after `pp` which was just working
around the bug in `pp`. Also remove the redundant addition of
`\n` since `pp` always does it nowadays.
* test/lisp/help-mode-tests.el (help-mode-tests-xref-on-pp):
Fix thinko.
Sorry for sneaking in a sizable commit so late. But I just found out
about this bug and it has to be fixed. Before this change, we weren't
properly cleaning up overlays that store local parsers. And in the case
of doxygen local parser in C files, the doxygen local parser overlay
sometimes bleeds out of comments and into other code, and interferes
with font-lock and indentation.
This commit adds a cleanup function that'll cleanup any overlays that
aren't being used. I tested with doxygen in C files and everything
works smoothly now, including tricky tests like removing the ending "*/"
of a doxygen comment and adding it back.
The idea is simple, at the end of each call to (treesit-update-ranges
BEG END), we remove any overlay within BEG and END that wasn't touched
by the range setting code.
* lisp/treesit.el (treesit--cleanup-local-range-overlays): New function.
(treesit--update-ranges-local): Remove code for cleaning up zero-length
overlays since we have the cleanup function now.
(treesit-update-ranges): Wrap the function body inside a let form, which
defines modified-tick; and add a call to
treesit--cleanup-local-range-overlays at the very end.
* src/xfaces.c (recompute_basic_faces): Revert the change which
caused recalculation of all the faces, as it made cursor motion
too slow. Reported by Juri Linkov <juri@linkov.net> (bug#72692).
Now, we get the average-width of the current font using
'string-pixel-width' and a specified space display spec, which doesn't
require the buffer to be displayed in a window (bug#72771).
* lisp/net/shr.el (shr-indent):
* lisp/visual-wrap.el (visual-wrap--content-prefix): Fix getting the
font when the buffer isn't displayed in a window.
(visual-wrap-fill-context-prefix): Fix indentation.
This also affects the listing of `should' forms produced by hitting
the L key on a test button in an ERT buffer.
* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Indent the pretty-printed result to match the caller's current column
as a reference indentation.
* test/lisp/emacs-lisp/ert-tests.el
(ert--pp-with-indentation-and-newline): New test. (Bug#72561)
* lisp/progmodes/eglot.el (eglot--dumb-tryc): Check that the
expanded string matches every completion strictly (bug#72705).
And in the fallback case, check whether the table matches the
original prefix at all. Return nil otherwise.
* test/lisp/progmodes/eglot-tests.el
(eglot-test-stop-completion-on-nonprefix)
(eglot-test-try-completion-nomatch): Corresponding tests.
* etc/EGLOT-NEWS: New entry.
* test/lisp/progmodes/eglot-tests.el
(eglot-test-common-prefix-completion)
(eglot-test-try-completion-inside-symbol)
(eglot-test-rust-completion-exit-function): New tests.
(eglot--wait-for-rust-analyzer): New function.
* src/xdisp.c (get_display_property, display_min_width): Rename
BUFPOS to CHARPOS, to avoid confusion (it is not necessarily a
buffer position). Suggested by Jim Porter <jporterbugs@gmail.com>.
(get_display_property): Call 'Fget_char_property' to support
'min-width' properties of overlays as well.
(display_min_width): Handle the buffer and string cases more
accurately, without relying only on the values of positions.
(handle_display_prop, handle_single_display_spec): Pass correct
position to 'display_min_width', when iterating over a string.
(handle_display_prop): When OBJECT is a window, pass it to
display_min_width.
(set_iterator_to_next): Call 'display_min_width' when at end of a
display or overlay string. (Bug#72721)
* etc/NEWS: Announce the support for overlays.
* src/treesit.c (Ftreesit_parser_create): We recently changed something
such that base buffer and indirect buffer appears to use separate
parser-lists. Therefore, creating a parser in one of the buffer
shouldn't reuse the parser in another buffer.
* lisp/url/url-auth.el (url-basic-auth): Forward the user if
provided by the url or found by 'auth-source' when searching
for secrets. Supplying 'auth-source' with the user when
matching secrets allows for more accurate retrieval and fixes
instances where the user enters an url that already contains
the user such as "user@host.de". (Bug#72526)