1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-09 08:21:30 -07:00
Commit graph

180689 commits

Author SHA1 Message Date
Phil Sainty
be9371cde3 Document more display actions in `display-buffer' (bug#80092)
* 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.
2026-01-03 15:00:31 +13:00
Phil Sainty
bb43055ef0 Support the reusable-frames' value 0 for display-buffer-in-tab'
* 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)
2026-01-03 14:09:28 +13:00
Phil Sainty
99750f9fdf Improve documentation for tab-bar 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.
2026-01-03 14:09:28 +13:00
Mattias Engdegård
791024dc8c Make string-trim faster
* lisp/subr.el (string-trim): Avoid intermediate substring allocation.
* test/lisp/subr-tests.el (subr-string-trim-left):
(subr-string-trim-right): Move here from subr-x-tests.el.
(subr-string-trim): New test.
2026-01-02 19:09:54 +01:00
Eli Zaretskii
b51c95c1c7 ; Fix documentation of recent treesit changes
* etc/NEWS:
* src/treesit.c (Ftreesit_query_eagerly_compiled_p):
* doc/lispref/parsing.texi (Pattern Matching): Fix documentation
of the recent treesit-related changes.  (Bug#80108)
2026-01-02 14:48:58 +02:00
Michael Albinus
1e777f71f2 Fix Tramp completion for default method "-"
* 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'.
2026-01-02 11:22:34 +01:00
João Távora
2175e9a192 ; Eglot: remove spurious leftover trace-values
* lisp/progmodes/eglot.el (eglot--after-revert-hook): Delete
spurious trace-values.
2026-01-02 09:25:37 +00:00
João Távora
c6483b4c89 ; Eglot: unbreak tests after semtok face rename
* test/lisp/progmodes/eglot-tests.el (eglot-test-semtok-basic)
(eglot-test-semtok-refontify): Fix tests.
2026-01-02 09:25:36 +00:00
João Távora
da4c693e0b Eglot: consider "pulled" and "pushed" diagnostics separately
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.
2026-01-02 09:25:36 +00:00
Yuan Fu
ad500a13e4
Compile queries in treesit-f-l-recompute-features (bug#80108)
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.
2026-01-01 23:21:27 -08:00
Eshel Yaron
e09990891f
; * etc/themes/modus-themes.el: Update comment.
See discussion here
https://lists.gnu.org/archive/html/emacs-devel/2026-01/msg00011.html
2026-01-02 07:45:14 +01:00
Po Lu
0db173fa23 ; * src/keyboard.c (is_ignored_event): Delete redundant assignment. 2026-01-02 10:02:47 +08:00
Dmitry Gutov
89879654e5 Fix indentation in some project.el functions
* lisp/progmodes/project.el
(vc-git-project-list-files, project--vc-ignores)
(project-prompt-project-dir): Fix indentation.
2026-01-02 02:59:22 +02:00
Dmitry Gutov
c678963fb1 project-files<vc>: Fix 'void-function vc-git--program-version'
* lisp/progmodes/project.el (project-try-vc--search): Re-add the
loading of vc-<backend> feature just removed from `project-files'.
2026-01-02 02:50:46 +02:00
Arash Esbati
17ddfd66e6 ; Don't mark some symbols as links
* lisp/textmodes/reftex-vars.el (reftex-auto-recenter-toc)
(reftex-label-alist, reftex-index-phrases-logical-and-regexp)
(reftex-index-phrases-logical-or-regexp): Don't mark symbols as
links.
2026-01-01 16:12:43 +01:00
Mattias Engdegård
10eece2cf0 Clean up a lapcode peephole optimisation rule
* 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.
2026-01-01 14:26:17 +01:00
Sean Whitton
094e5f0928 ; Update ETAGS/CTAGS tests for copyright year change.
CTAGS.good_update not yet updated.
2026-01-01 13:23:21 +00:00
Sean Whitton
c31f6adc31 ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
Philip Kaludercic
4771cd2e58
; Fix test resulting from 5744519e
* lisp/emacs-lisp/package.el (package-install): Delete dead code
resulting from previous change.
* test/lisp/emacs-lisp/package-tests.el
(package-test-install-single): Adjust code to expect
'user-error'
2026-01-01 13:47:41 +01:00
Sean Whitton
e1f87081d4 * lisp/vc/diff-mode.el (diff-undo): New obsolete function alias. 2026-01-01 11:45:59 +00:00
Sean Whitton
47dd565d39 ; * lisp/vc/vc.el (dir-status-files): Mention vc-dir-status-files. 2026-01-01 11:05:56 +00:00
Sean Whitton
7fa5c7e07b ; * src/keyboard.c (is_ignored_event): Fix last change. 2026-01-01 11:02:57 +00:00
Po Lu
ef12da4ba1 Don't permit special configuration events to trigger `throw-on-input'
* src/keyboard.c (init_while_no_input_ignore_events): Ignore
Qmonitors_changed and Qtoolkit_theme_changed events.
(is_ignored_event): Assign symbols to
{MONITOR_CHANGED,TOOLKIT_THEME_CHANGED}_EVENT.
(syms_of_keyboard) <Qmonitors_changed>
<Qtoolkit_theme_changed>: New symbols.  (bug#80022)
2026-01-01 10:24:49 +08:00
Dmitry Gutov
9785e904f1 ; Mention the project-list-files backend method in vc.el 2026-01-01 04:21:03 +02:00
Dmitry Gutov
6c832af157 Allow project-vc-ignores to be applied in more cases
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.
2026-01-01 04:13:30 +02:00
Stefan Monnier
20e1a57d44 (native--compile-async): Try and avoid inf-loops (bug#80012)
* lisp/emacs-lisp/comp-run.el (native--compile-async): Call
`comp--run-async-workers` only if we caused the queue to become non-empty.
2025-12-31 13:15:40 -05:00
Sean Whitton
a03419b52c Factor out undo-ignore-read-only (bug#80049)
* lisp/vc/diff-mode.el (diff-undo): Rename to
undo-ignore-read-only.
(diff-mode-shared-map): Update "<remap> <undo>" binding.
* lisp/simple.el (undo-ignore-read-only): Rename from diff-undo.
* lisp/dired.el (dired-undo):
* lisp/proced.el (proced-undo): Call it.  New numeric prefix
argument to specify a repeat count.
* doc/emacs/dired.texi (Marks vs Flags):
* etc/NEWS: Document the change.
2025-12-31 18:10:48 +00:00
Sean Whitton
466627ffeb Split diff-mode-shared-map into two maps
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.
2025-12-31 14:09:09 +00:00
Michael Albinus
288039c2d1 Sync with Tramp 2.8.1
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
2025-12-31 12:57:38 +01:00
Protesilaos Stavrou
3e05de78df
Update Modus themes to their version 5.2.0
Release notes: <https://protesilaos.com/codelog/2025-12-31-emacs-modus-themes-5-2-0/>.
2025-12-31 10:47:14 +02:00
Yuan Fu
6a586b3688
Update c-ts-common--adaptive-fill-prefix for Rust
* lisp/progmodes/c-ts-common.el:
(c-ts-common--adaptive-fill-prefix): Make it support Rust's //! style comment.
2025-12-30 22:17:01 -08:00
Stefan Monnier
c12b9edcd4 project-vc: Provide default implementation of project-list-files
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.
2025-12-31 00:12:59 -05:00
Dmitry Gutov
4473b11797 Clarify the type of value that 'ignore-completion-table' returns
* lisp/vc/vc.el: Clarify the type of value that
'ignore-completion-table' returns
(https://lists.gnu.org/archive/html/emacs-devel/2025-12/msg00895.html).
2025-12-31 05:15:56 +02:00
João Távora
ee918cafda Flymake: try to resize margins less frequently
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.
2025-12-31 00:44:01 +00:00
Sean Whitton
af32cba449 vc--maybe-read-upstream-location: Default to returning nil
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.
2025-12-30 15:25:02 +00:00
Eli Zaretskii
c877c71739 ; * admin/MAINTAINERS: Add Elías Gabriel Pérez. 2025-12-30 15:14:30 +02:00
Martin Rudalics
258b5778c2 Inhibit looping in resize_mini_window (Bug#80017)
* 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).
2025-12-30 09:04:09 +01:00
Stéphane Marks
9a667e6d5b Improve system-taskbar on unsupported or unenabled back ends (bug#80087)
* lisp/system-taskbar.el (system-taskbar-mode): Set
'system-taskbar-mode' to nil if an unsupported system or
unenabled back end.
2025-12-29 18:29:05 -05:00
Sean Whitton
3e5c942b75 ; * lisp/vc/vc.el (vc-print-root-change-log): Fix copy/paste error. 2025-12-29 19:25:06 +00:00
Manuel Giraud
fd50808154 Fix buffer menu unmark on first line (bug#80089)
* lisp/buff-menu.el (Buffer-menu-backup-unmark): Remove mark on
first line too.
2025-12-29 19:42:17 +02:00
Sean Whitton
62f50367ba ; VC docs: Use broader term "topic branches". 2025-12-29 15:24:15 +00:00
Sean Whitton
c2a503c3d5 ; * admin/notes/repo: Don't contradict git-workflow about messages. 2025-12-29 15:19:26 +00:00
Sean Whitton
d79d748dee * lisp/vc/vc-hooks.el (vc-prefix-map): Move 'B' to 'o' (bug#80037). 2025-12-29 15:16:15 +00:00
Sean Whitton
35912a8c64 Rename node from "Outgoing Base Diffs" to "Outstanding Changes"
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.
2025-12-29 15:14:38 +00:00
Sean Whitton
fbbce9d405 New commands vc-print-change-log & vc-print-root-change-log
* lisp/vc/vc.el (vc--read-branch-to-log): Call
vc-deduce-fileset.  Don't wrap return value in a list.
(vc-print-fileset-branch-log, vc-print-root-branch-log): Adjust
calls to vc--read-branch-to-log.
(vc-print-change-log, vc-print-root-change-log):
New commands (bug#80037).
* etc/NEWS: Announce them.
2025-12-29 15:12:41 +00:00
Mattias Engdegård
29dea9ff46 ; * etc/yow.lines: remove dummy database for removed yow.el 2025-12-29 12:50:28 +01:00
Liu Hui
1fb98f2002 Fix the date in the calendar mode line (bug#80069)
* 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.
2025-12-29 11:36:07 +00:00
Stefan Monnier
e119514ae8 track-changes.el (track-changes-undo-only): New var
* 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`.
2025-12-28 22:32:23 -05:00
Yuan Fu
8f2557844d
Use variable-use-face for assignment in c-ts-mode (bug#79623)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Use variable-use face for the LHS of assignment statements.
2025-12-28 15:11:27 -08:00
Stéphane Marks
94191686a7 ; Add myself as system-taskbar.el maintainer (bug#80088). 2025-12-28 20:05:05 +02:00