* 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`.
* 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.
* 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.
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'.
* 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.
* 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.