Commit graph

2191 commits

Author SHA1 Message Date
Sean Whitton
a06cddec20 ; diff--revert-kill-hunks: Hoist binding inhibit-read-only. 2026-02-05 12:24:05 +00:00
Visuwesh
e2f9e6ba7d vc-git--mailinfo: Use file-local-name (bug#80295, bug#80320)
* lisp/vc/vc-git.el (vc-git--mailinfo):
Use file-local-name (bug#80295, bug#80320).
2026-02-05 12:11:53 +00:00
Protesilaos Stavrou
dda572a2fa New minibuffer history for vc-user-edit-command (bug#80169)
* lisp/vc/vc-dispatcher.el (vc-user-edit-command-history): New variable.
(vc-user-edit-command): Use it (bug#80169).
* etc/NEWS: Announce it.
2026-02-05 12:01:43 +00:00
Sean Whitton
10aa35bab7 Bind "u", "@" in diff-mode-read-only-map, not diff-mode-shared-map
* lisp/vc/diff-mode.el (diff-mode-shared-map): Move bindings for
"u" and "@" from here ...
(diff-mode-read-only-map): ... to here.
2026-02-05 11:49:28 +00:00
Sean Whitton
ccee1c0de6 ; Improve outgoing base command docstrings. 2026-02-05 11:46:01 +00:00
Sean Whitton
0dfaa75612 Bind "s" in diff-mode-read-only-map, not diff-mode-shared-map
* lisp/vc/diff-mode.el (diff-mode-shared-map): Move binding for
"s" from here ...
(diff-mode-read-only-map): ... to here (bug#80330).
2026-02-05 11:31:05 +00:00
Sean Whitton
a269bcb86b diff-mode-shared-map: Bind '@' to diff-revert-and-kill-hunk
* lisp/vc/diff-mode.el (diff-mode-shared-map): Bind '@' to
diff-revert-and-kill-hunk.
2026-02-02 12:57:12 +00:00
Sean Whitton
53a3883bf6 vc--incoming-revision: Signal error on cache hit
* lisp/vc/vc.el (vc--incoming-revision): Signal an error instead
of returning nil on a cache hit (bug#80270).
(vc--outgoing-base-mergebase): Simplify, given that
vc--incoming-revision now handles the error case.
2026-01-30 15:56:58 +00:00
Sean Whitton
fcdd8678f9 Make diff-hunk-kill respect an active region
* lisp/vc/diff-mode.el (diff--revert-kill-hunks): New workhorse
routine.
(diff-hunk-kill, diff-revert-and-kill-hunk): Call it.
(diff-hunk-kill): New BEG and END parameters and interactive
form.
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document the change.
2026-01-30 15:06:52 +00:00
Sean Whitton
c1029c88a8 ; vc-git-topic-outgoing-base: Merge let into if-let*. 2026-01-30 13:52:37 +00:00
Sean Whitton
b4a18e466e vc-git-topic-outgoing-base: Respect a configure push remote
* lisp/vc/vc-git.el (vc-git-topic-outgoing-base): If there is a
configured push remote, return tracking branch as outgoing base.
2026-01-30 13:50:28 +00:00
Sean Whitton
83db778195 ; Fix last change. 2026-01-30 13:49:35 +00:00
Sean Whitton
93bba3797e Factor out vc-git--branch-remotes
* lisp/vc/vc-git.el (vc-git--branch-remotes): New function.
(vc-git-trunk-or-topic-p): Use it.
* test/lisp/vc/vc-git-tests.el (vc-git-test-branch-remotes): New
test.
2026-01-30 13:35:50 +00:00
Sean Whitton
705c0e3729 Bind 's' to diff-split-hunk in read-only diff-mode
* lisp/vc/diff-mode.el (diff-mode-shared-map): Bind 's' to
'diff-split-hunk'.
* etc/NEWS: Document the change.
2026-01-30 11:21:27 +00:00
Sean Whitton
12e53dfafe New C-x v T l and C-x v T L commands
* lisp/vc/vc.el (vc-log-outgoing-base)
(vc-root-log-outgoing-base): New commands.
* lisp/vc/vc-dir.el (vc-dir-mode-map):
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind them.
* doc/emacs/vc1-xtra.texi (Outstanding Changes):
* etc/NEWS: Document them.
2026-01-29 17:01:32 +00:00
Sean Whitton
60b9435ad7 ; Fix/improve two comments. 2026-01-29 17:00:46 +00:00
Sean Whitton
43d6907ad9 Move outstanding changes commands from 'o' to 'T'
The main reason for this is that then these commands can have
the same bindings in VC-Dir buffers that they have under
vc-prefix-map.  'T' is a good mnemonic for "Topic" and a
serviceable mnemonic for "outsTanding".

* lisp/vc/vc-hooks.el (vc-prefix-map): Move 'o' to 'T'.
* lisp/vc/vc-dir.el (vc-dir-mode-map): New 'T' bindings.
2026-01-28 16:13:47 +00:00
Sean Whitton
29bdba37f2 New bindings for vc-revert
* lisp/vc/vc-dir.el (vc-dir-mode-map): Bind vc-revert to '@'.
* lisp/vc/vc-hooks.el (vc-prefix-map): Additionally bind
vc-revert to 'C-x v @'.
* doc/emacs/maintaining.texi (VC Undo, VC Directory Commands):
* etc/NEWS: Document the change.
2026-01-23 14:11:27 +00:00
Sean Whitton
852ca2ff40 Disable diff-restrict-view by default
* lisp/vc/diff-mode.el (diff-restrict-view): Disable it.
* etc/NEWS: Announce the change.
2026-01-17 17:17:52 +00:00
Sean Whitton
6e4bceb8ce Automatically detect the VC outgoing base (bug#80006)
* lisp/vc/vc-git.el (vc-git--current-branch): Rename to ...
(vc-git-working-branch): ... this.  All uses changed.
(vc-git-trunk-or-topic-p, vc-git-topic-outgoing-base):
* lisp/vc/vc-hg.el (vc-hg--working-branch, vc-hg-working-branch)
(vc-hg-trunk-or-topic-p, vc-hg-topic-outgoing-base):
* lisp/vc/vc-hooks.el (vc--safe-branch-regexps-p):
* lisp/vc/vc.el (vc-default-working-branch)
(vc-default-trunk-or-topic-p, vc--match-branch-name-regexps)
(vc--outgoing-base, vc--outgoing-base-mergebase)
(vc--maybe-read-outgoing-base): New functions.
(vc-diff-outgoing-base): Call vc--outgoing-base-mergebase.
(vc-root-diff-outgoing-base, vc-diff-outgoing-base): Use
vc--maybe-read-outgoing-base in interactive specification.
(working-branch, trunk-or-topic-p, topic-outgoing-base): New
specifications for backend functions.
(vc-trunk-branch-regexps, vc-topic-branch-regexps): New
variables.
* .dir-locals.el: Commented entries for the new variables.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-match-branch-name-regexps): New test.
* doc/emacs/vc1-xtra.texi (Outstanding Changes): Document the
new functionality.
2026-01-17 17:17:51 +00:00
USAMI Kenta
c68c5fbe14 ; Remove redundant cl-lib runtime dependencies across lisp/
* lisp/editorconfig-tools.el:
* lisp/emacs-lisp/shorthands.el:
* lisp/info-xref.el:
* lisp/international/quail.el:
* lisp/international/rfc1843.el:
* lisp/mail/ietf-drums.el:
* lisp/mail/rfc2047.el:
* lisp/mail/yenc.el:
* lisp/net/pop3.el:
* lisp/net/sasl-scram-sha256.el:
* lisp/net/shr-color.el:
* lisp/progmodes/grep.el:
* lisp/scroll-bar.el:
* lisp/textmodes/emacs-news-mode.el:
* lisp/textmodes/reftex-auc.el:
* lisp/textmodes/reftex-dcr.el:
* lisp/textmodes/reftex-global.el:
* lisp/textmodes/reftex-sel.el:
* lisp/url/url-dav.el:
* lisp/vc/vc-src.el:
* lisp/xwidget.el:
* lisp/yank-media.el: Remove redundant (require 'cl-lib).
(Bug#80129)
2026-01-17 15:32:15 +02:00
Sean Whitton
aa6e42f18b Rename VC outgoing and incoming log commands to include "-root-"
* lisp/vc/vc.el (vc-log-incoming, vc-log-outgoing): Rename ...
(vc-root-log-incoming, vc-root-log-outgoing): ... to these.  All
uses changed.  Leave behind obsolete function aliases.
* lisp/emacs-lisp/package-vc.el (package-vc-log-incoming):
Rename ...
(package-vc-root-log-incoming): ... to this.  All uses changed.
Leave behind obsolete function alias.
2026-01-14 12:48:02 +00:00
Sean Whitton
65655ccfae ; * lisp/vc/vc.el (vc-diff-outgoing-base): Document FILESET param. 2026-01-14 12:18:41 +00:00
Sean Whitton
eb4c5f0095 vc--read-branch-to-log: Pass BACKEND to vc-read-revision
* lisp/vc/vc.el (vc--read-branch-to-log): When passing FILES to
vc-read-revision, also pass BACKEND.  Necessary in some cases.
2026-01-12 10:39:28 +00:00
Sean Whitton
09aad81166 vc--apply-to-other-working-tree: Handle 'diff-default-read-only'.
* lisp/vc/vc.el (vc--apply-to-other-working-tree): Bind
inhibit-read-only to non-nil to handle the case when
diff-default-read-only is non-nil (bug#80128).
2026-01-10 12:08:11 +00:00
Sean Whitton
cd88b8c2ba ; Fix last change. 2026-01-10 11:51:58 +00:00
Sean Whitton
fc682db9d8 * lisp/vc/vc.el (vc-deduce-fileset): Don't return empty FILESET.
Suggested by Spencer Baugh <sbaugh@janestreet.com>.
2026-01-10 11:50:12 +00:00
Sean Whitton
d35e705bdc ; log-view-mode-map: Fix binding M-RET in text mode frames. 2026-01-10 11:31:07 +00:00
Sean Whitton
c31f6adc31 ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00: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
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
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
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
Sean Whitton
3e5c942b75 ; * lisp/vc/vc.el (vc-print-root-change-log): Fix copy/paste error. 2025-12-29 19:25:06 +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
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
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
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
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
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
Sean Whitton
6539b7e8ac ; Annotate VC backend functions regarding vc-use-short-revision
* lisp/vc/vc.el (previous-revision, next-revision): Say that
implementations should respect the value of
vc-use-short-revision (bug#80033).
2025-12-21 18:10:49 +00:00
Sean Whitton
59e3c27f37 diff-sanity-check-hunk: Better handle incomplete lines (bug#80040)
* lisp/vc/diff-mode.el (diff-sanity-check-hunk): Better handle
incomplete lines (bug#80040).
2025-12-21 17:56:10 +00:00
Eli Zaretskii
54eae320f5 ; * lisp/vc/vc-git.el (vc-git-registered): Fix remote files (bug#80035). 2025-12-20 09:47:39 +02:00
Sean Whitton
f9172be29a Make VC-Dir's 'd' able to delete unregistered files
* lisp/vc/vc.el (vc-delete-file): Simplify.
* lisp/vc/vc-dir.el (vc-dir-delete-file): Handle deleting
unregistered files, too.
(vc-dir-menu-map, vc-dir-mode-map): Replace bindings for
vc-dir-clean-files with ones for vc-dir-delete-file.
* doc/emacs/maintaining.texi (VC Directory Commands):
* etc/NEWS: Document the bindings change.
2025-12-18 21:46:49 +00:00