1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-09 21:20:45 -08:00
Commit graph

99358 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Morgan Willcock
7d3ed7c11d Fix specification of 'python-indent-guess-indent-offset-verbose'
* lisp/progmodes/python.el (python-indent-guess-indent-offset-verbose):
Fix typo in configuration of safe value function.  (Bug#80085)
2025-12-28 19:56:14 +02:00
Sean Whitton
445cfc687c ; Update ldefs-boot.el. 2025-12-28 16:10:44 +00:00
Sean Whitton
3e35226da6 New command 'C-x v b l'
* lisp/vc/vc.el (vc--read-branch-to-log): New function.
(vc-print-root-branch-log): Rewrite to use
vc--read-branch-to-log and vc--with-backend-in-rootdir.
(vc-print-fileset-branch-log): New command.
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map):
(vc-menu-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-12-28 16:09:44 +00:00
Sean Whitton
8afbcb0ffe ; * lisp/vc/vc.el (vc-print-branch-log): Fix declaration. 2025-12-28 13:02:03 +00:00
Sean Whitton
aefc4baca9 Factor out vc--read-limit
* lisp/vc/vc.el (vc--read-limit): New function.
(vc-print-root-log): Call it.
(vc-print-log): Call it.  Modernize style.  Fix docs regarding
LIMIT: it defaults to vc-log-show-limit only for interactive
calls.
2025-12-28 13:00:51 +00:00
Sean Whitton
1b23b4a5ad ; * lisp/ldefs-boot.el: Restore no-byte-compile local variable. 2025-12-28 12:33:25 +00:00
Sean Whitton
dc34b9a969 ; Regenerate ldefs-boot.el 2025-12-28 12:29:09 +00:00
Sean Whitton
124d3cde04 Move 'C-x v b l' to 'C-x v b L', rename command
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map, vc-menu-map): Replace
bindings of 'b l' with 'b L'.
* lisp/vc/vc.el (vc-print-root-branch-log): Rename from
'vc-print-branch-log'.  All uses changed.
(vc-print-branch-log): New obsolete alias.
* doc/emacs/maintaining.texi (VC Change Log)
(VC Directory Commands):
* doc/emacs/vc1-xtra.texi (Editing VC Commands):
* etc/NEWS: Document the change.
2025-12-28 12:28:06 +00:00
Mattias Engdegård
8f9c0c1843 Don't use the term 'null' for empty strings
Zero-length strings are just 'empty'; 'null' can be confusing in several
ways.

* lisp/subr.el (split-string, string-lines):
* doc/lispref/strings.texi (Creating Strings):
Change argument names from 'omit-nulls' to 'omit-empty'.
2025-12-28 12:37:37 +01:00
Mattias Engdegård
bdc34b199d Clean up split-string documentation
* doc/lispref/strings.texi (Creating Strings):
* lisp/subr.el (split-string):

Make it clear that the SEPARATORS argument should not match the empty
string, since the behaviour was entirely an artefact of the original
implementation in this case; it makes little sense otherwise.

Clean up the examples for conciseness and do not waste space on
irrelevant details.
2025-12-28 12:37:37 +01:00
Mattias Engdegård
2592690abe Various split-string improvements
* lisp/subr.el (split-string):
Fix quadratic behaviour in (split-string "xx..." ":" nil " +").
General code reorganisation for speed and reduced allocation.
Fix a regexp bug; eg, (split-string "A;B" "," nil ";\\|:")

* test/lisp/subr-tests.el (subr-test-split-string):
More extensive test coverage.
2025-12-28 12:37:37 +01:00
Martin Rudalics
01212ce03f Fix two thinkos in 'set-frame-size-and-position'
* lisp/frame.el (set-frame-size-and-position): Correctly
interpret width and height of workarea as returned by
'frame-monitor-attributes'.  If LEFT or RIGHT are floats,
position FRAME according to left/top position of workarea.
2025-12-28 09:27:45 +01:00
Stefan Monnier
cc2a0e90ab (nxml-compute-indent-in-token): Use noindent in CDATA
`noindent` is more precise than what we did since it gives more
info to the caller: `indent-for-tab-command` can treat it
differently (e.g. fall back to `indent-relative`) than `indent-region`.

* lisp/nxml/nxml-mode.el (nxml-compute-indent-in-token): Use `noindent`
in CDATA.
(nxml-compute-indent-in-delimited-token): Remove CDATA case, not used
any nmore.
2025-12-27 15:27:49 -05:00
Jonas Bernoulli
2b6161a19f
lisp-indent-local-overrides: New variable 2025-12-27 20:25:05 +01:00
Paul Eggert
9affabf6db Move vc-cloneable-backends-custom-type alias up
* lisp/vc/vc.el (vc-cloneable-backends-custom-type):
Move alias up.  Problem reported by Arash Esbati in:
https://lists.gnu.org/r/emacs-devel/2025-12/msg00772.html
2025-12-26 13:30:13 -08:00
Paul Eggert
481ad70d5c December 2025 spelling fixes
Some of the fixes are to continue to use American
rather than British spelling.
* doc/misc/modus-themes.org (my-modus-themes-engraved-faces):
Fix misspelled ‘:foreground’s.
* etc/themes/modus-themes.el (modus-themes-faces):
Fix misspelled ‘modus-themes-bold’.
* lisp/emacs-lisp/rx.el (rx--normalize-char-pattern):
Rename from rx--normalise-char-pattern.
(rx--optimize-or-args):	Rename from rx--optimise-or-args.
* lisp/frame.el (frame--special-parameters):
Fix misspelled "right-divider-width".
* lisp/net/tramp.el (tramp-fingerprint-prompt-regexp):
Use American spelling “centered”, to match current libfprintf.
* lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers):
Rename from org-fold-core--optimise-for-huge-buffers.
(org-fold-core-update-optimization):
Rename from org-fold-core-update-optimisation,
leaving an alias behind.
(org-fold-core-remove-optimization):
Rename from org-fold-core-remove-optimisation,
leaving an alias behind.
* lisp/org/org.el (org-advertized-archive-subtree):
This alias is now obsolete.
* lisp/play/zone.el (zone-ignored-buffers):
Fix misspelling of ‘zone--buffer-encrypted-p’.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces):
Fix misspelling of ‘csharp’ group.
* lisp/vc/vc.el (vc-clonable-backends-custom-type):
Rename from vc-cloneable-backends-custom-type,
leaving an alias behind.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(bytecomp-tests--warn-arity-non-compiled-callee):
Rename from bytecomp-tests--warn-arity-noncompiled-callee.
(bytecomp-test-defface-spec): Reword a deliberate misspelling
of “default” that is so common I don’t want it to pollute the
spelling dictionary.
* test/lisp/emacs-lisp/package-vc-tests.el:
(package-vc-tests-preserve-artifacts):
Rename from package-vc-tests-preserve-artifacts.
* test/lisp/eshell/em-prompt-tests.el:
(em-prompt-test/forward-backward-paragraph-1):
Reword a deliberate misspelling of “goodbye” that is so common I
don’t want it to pollute the spelling dictionary.
2025-12-26 10:22:12 -08:00
Michael Albinus
5b461a4930 Fix problem in tramp-adb
* lisp/net/tramp-adb.el (tramp-adb-do-ls): New function.
(tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Use it.  (Bug#80054)
2025-12-26 11:28:12 +01:00
João Távora
0a6daa1412 Eglot: speed up symbol highlighting (bug#80072)
In large buffers, responses to textDocument/documentHighlight
requests may return thousands of occurrences.  Avoid incurring
expensive eglot--lsp-position-to-point calls, by restricting the
highlights to visible region in the active window.

* lisp/progmodes/eglot.el (eglot-highlight-eldoc-function):
Rework.
2025-12-25 16:46:17 +00:00
Juri Linkov
54ae1944e9 * lisp/tab-bar.el (tab-bar-merge-tabs): New command.
(merge-tabs): Alias for 'tab-bar-merge-tabs'.
https://lists.gnu.org/archive/html/emacs-devel/2025-12/msg00721.html
2025-12-24 20:45:07 +02:00
Juri Linkov
2fc957795a * lisp/image-mode.el (image-mode--next-file): Fix infinite loop.
Fix the case when an image file is visited in the directory with
image files without image file extensions, and 'dired-movement-style'
is non-nil, and 'dired-next-line' wraps to the top of the dired buffer,
doesn't find the next image file and goes into an infinite loop.
Remember the original file name and exit the loop when after wrapping
'dired-next-line' reaches the original file.
2025-12-24 19:35:04 +02:00
Stefan Monnier
c6bdfaf358 Merge branch 'cursor-intangible' 2025-12-23 22:48:26 -05:00
Stefan Monnier
fc117f1d3b (cursor-sensor-tangible-pos): Prefer shortening the motion
When moving to the middle of an intangible chunk, and either end
of the chunk would result in a movement in the right direction, prefer
the shorter movement, since it's easier for the users to repeat a
movement than to "go back".
(see https://lists.gnu.org/archive/html/emacs-devel/2025-12/msg00686.html)

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-tangible-pos):
Refine the choice.
2025-12-23 22:48:05 -05:00
Stefan Monnier
068d94074b (cursor-sensor-tangible-pos): Insist on picking a tangible position
* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-tangible-pos):
Prefer a tangible position, even if it means going in the wrong
direction; and don't favor shorter movement.
2025-12-23 22:48:05 -05:00
Stefan Monnier
e69d60f9f3 (cursor-sensor-tangible-pos): Clarify edge case
* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-tangible-pos):
Make it clear that prevpos/nextpos can be nil only at BOB/EOB.
2025-12-23 22:48:05 -05:00
Stefan Monnier
3e3b5c3213 (cursor-sensor-tangible-pos): Rewrite
The main purpose is to make the code more symmetric and make it
easier to tweak the behavior, compared to the previous code which
focused on moving always in the direction of the overall motion.

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor-tangible-pos):
Rewrite and allow movement in both directions, tho with (hopefully)
minimal changes in behavior.
2025-12-23 22:48:05 -05:00