* lisp/window.el (display-buffer): Add docs for several missing actions:
- display-buffer-in-atom-window
- display-buffer-in-direction
- display-buffer-in-side-window
- display-buffer-reuse-mode-window
- display-buffer-use-some-frame
Re-arrange the actions into a less-arbitrary sequence.
Re-word some descriptions to use a more consistent phrasing.
Re-wrap some lines (based on the longest pre-existing line), to reduce
the line count.
Un-link the `pop-up-frames' symbol in the alist entry listing.
(display-buffer--action-function-custom-type): Add missing actions,
and re-order as above.
(display-buffer-reuse-mode-window): Tweak the docstring for better
consistency with other display actions.
* lisp/tab-bar.el (tab-bar--reusable-frames): Implement support for the
`reusable-frames' value 0, for better consistency with other buffer
display actions. (bug#80092)
* doc/lispref/windows.texi: Document the display actions
`display-buffer-in-tab' and `display-buffer-in-new-tab' and the
associated alist entries `tab-name' and `tab-group'.
* lisp/tab-bar.el (display-buffer-in-tab): Restructure docstring for
clarity. Describe the `reusable-frames' behaviour first (as if it finds
a frame with a suitable tab then the `tab-name' entry is not used).
(display-buffer-in-new-tab): Use consistent wording.
* lisp/window.el (display-buffer--action-function-custom-type): Add the
display actions as customize choices for user options.
(display-buffer): Document the display actions and alist entries.
* lisp/net/tramp.el (tramp-completion-handle-file-name-all-completions):
Keep `tramp-default-method{-alist}' in order to get completion
functions for `tramp-default-method-marker'.
This is chiefly for the benefit of rust-analyzer which uses both
mechanisms.
Per https://github.com/joaotavora/eglot/discussions/1562
* lisp/progmodes/eglot.el
(eglot--flymake-report-fn): Rename from eglot--flymake-push-report-fn.
(eglot--pulled-diagnostics)
(eglot--pushed-diagnostics): Rework from eglot--diagnostics.
(eglot--diagnostics): Remove.
(eglot--managed-mode): Tweak.
(eglot--maybe-activate-editing-mode): Tweak.
(eglot-handle-notification): Set eglot--pushed-diagnostics
only. Call eglot--flymake-report.
(eglot-flymake-backend): Use eglot--flymake-report and
eglot--flymake-report-fn.
(eglot--flymake-pull): Rework.
(eglot--flymake-report): Renam from eglot--flymake-push and reworked.
The direct cause of the problem in the bug report is that when
user runs treesit-font-lock-recompute-features to add the
emacs-devel feature in c-ts-mode's mode hook, the added query
for emacs-devel aren't compiled.
This change consists of two parts:
1. The immediate fix: validate and compile queries in
treesit-font-lock-recompute-features.
2. To make it more fool-proof, change treesit-font-lock-rules
back to compile the queries and make
treesit--compile-query-with-cache support compiled queries. This
way, as long as the query goes through treesit-font-lock-rules,
it'll be compiled eventually and not cause slow-down. I had to
add some c-level functions, but they're kind of overdue anyway,
so I don't have any problem adding them to the API.
* lisp/treesit.el (treesit--compile-query-with-cache): Support
compiled queries.
(treesit-font-lock-rules): Compile the queries (but not
eagerly).
(treesit-font-lock-recompute-features): Validate and compile
queries.
(treesit-major-mode-setup): Remove call to
treesit-validate-and-compile-font-lock-rules since it's now
called in treesit-font-lock-recompute-features.
* src/treesit.c (Ftreesit_query_eagerly_compiled_p):
(Ftreesit_query_source): New functions.
* doc/lispref/parsing.texi (Pattern Matching): Add manual
entries for the new functions.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Clean up and simplify an old jump-to-conditional-jump rule that was
originally intended for moving loop branches from the top to the bottom,
but is today not much used because it relies on other transformations
only made for dynbound variables.
This change should not alter code generation.
Discussed in
https://lists.gnu.org/archive/html/emacs-devel/2025-12/msg00903.html.
* lisp/progmodes/project.el (project-files) <vc>: Look up the
value of 'project-vc-ignores' inside DIR rather than project root.
This allows this variable to be applied in external dirs as well.
(project-ignores) <vc>: Do likewise.
(project--value-in-dir): Ensure that DIR has a trailing slash.
The caller might pass the value without slash if produced
differently.
* test/lisp/progmodes/project-tests.el
(project-vc-ignores-in-external-directory): New test.
(project-vc-supports-files-in-subdirectory): Update the test,
considering the subtle change in behavior: the directory DIR
directly includes a .dir-locals.el which sets project-vc-ignores,
which wasn't previously applied because it wasn't set in the root.
This is easier to understand and easier to customize.
* lisp/vc/diff-mode.el (diff-mode-shared-map): Move bindings for
"W", "w", "A", "r" and "R" from here ...
(diff-mode-read-only-map): ... to here, a new map.
(diff-mode-map): Bind diff-mode-shared-map to "ESC".
(diff-read-only-map): Make a composed map from
diff-mode-read-only-map instead of diff-mode-shared-map.
Rework the implementation of `project-files<vc>` so as to
delegate more to the `project-list-files` operation, including
the default implementation.
This can change the behavior in some cases, because it changes
which ignore settings apply where and also it can now use
a dedicated VC backend implementation even for directories
that are outside of the project's root. But the effect should
hopefully be marginal and rather positive by making the behavior
more "regular".
* lisp/progmodes/project.el (project-vc--backend): New function.
(project-files) <vc>: Use it. Call VC's `project-list-files` operation
for all dirs with a backend and remove the `vc-not-supported` fallback.
Inline the `project--dir-ignores` call.
(vc-default-project-list-files): New function, extracted from
`project-files<vc>`.
(vc-git-project-list-files): Use it instead of signaling `vc-not-supported`.
(project--vc-ignores): New function, extracted from `project-ignores<vc>`.
Remove the `vc-not-supported` since the operation has a default
implementation. Use DIR's `ignore-completion-table` regardless
if we're at the root of the project.
(project-ignores) <vc>: Use it.
In particular, don't auto-resize in flymake-start if the current buffer
already has suitable margins. Otherwise it's impossible to operate two
windows showing the same buffer with different scrolls while using
Flymake.
Also, when attempting to restore margins, remember to actually apply
them.
* lisp/progmodes/flymake.el (flymake--original-margin-width)
(flymake--suitably-fringed-p, flymake--bs-display)
(flymake--restore-margins, flymake-restore-margins): Move to
separate section. Rework.
(flymake--suitable-margin-width, flymake--apply-margins)
(flymake--appropriate-margin): New helpers.
This should have been updated along with the recent change to
make the UPSTREAM-LOCATION argument to the incoming-revision
backend API function optional.
* lisp/vc/vc.el (vc--maybe-read-upstream-location): Default to
returning nil, not an empty string.
* src/xdisp.c (redisplay_window): Don't call resize_mini_window
when the minibuffer is active and minibuffer-only frames shall
be resized automatically since that can loop infinitely (Bug#80017).
There are going to be new outstanding changes commands that will
deal in logs, not diffs.
* doc/emacs/vc1-xtra.texi (Outgoing Base Diffs): Rename and
retitle node ...
(Outstanding Changes): ... to this.
* lisp/calendar/calendar.el (calendar-redraw)
(calendar-other-month): Make sure that the mode line is updated
after cursor motion in case 'date' is used in
'calendar-mode-line-format'.
(calendar-set-date-style): Delete call to
calendar-update-mode-line because it is called in calendar-draw.
(calendar-generate-window): Delete calls to
calendar-update-mode-line and calendar-cursor-to-visible-date.
It's better for the caller to do it.
(calendar-basic-setup): Update cursor position and mode line.
* lisp/calendar/cal-move.el (calendar-goto-today): Delete
calendar-update-mode-line because calendar-move-hook is called
last. This is consistent with other cal-move commands.
* test/lisp/calendar/calendar-tests.el
(calendar-test-date-in-mode-line): New test.
* lisp/emacs-lisp/track-changes.el (track-changes-undo-only): New var.
(track-changes-fetch): Bind it.
(track-changes--state): New slot `undo`.
(track-changes--after): Set it.
* lisp/vc/diff-mode.el (diff--track-changes-function): Use the
new var.
* doc/lispref/text.texi (Tracking changes): Mention
`track-changes-undo-only`.