aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use single-arg form of `signal` to re-throw an errorStefan Monnier23 hours3-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/smerge-mode.el (smerge-extend): * lisp/vc/diff-mode.el (diff-beginning-of-file-and-junk): * lisp/transient.el (transient--with-emergency-exit): * lisp/textmodes/tex-mode.el (latex-forward-sexp): * lisp/tar-mode.el (tar-mode): * lisp/savehist.el (savehist--reload): * lisp/progmodes/octave.el (inferior-octave-resync-dirs): * lisp/progmodes/js.el (js--re-search-forward): * lisp/plstore.el (plstore--decrypt): * lisp/net/dbus.el (dbus-ignore-errors, dbus-register-signal) (dbus-handle-event): * lisp/mouse.el (mouse-drag-track, mouse-drag-region-rectangle): * lisp/minibuffer.el (completion-pcm--find-all-completions): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rfc2047.el (rfc2047-encode-region): * lisp/jit-lock.el (jit-lock-fontify-now): * lisp/international/ja-dic-utl.el (skkdic-lookup-key): * lisp/gnus/nnselect.el (nnselect-generate-artlist): * lisp/gnus/mml-sec.el (mml-secure-epg-encrypt, mml-secure-epg-sign): * lisp/gnus/mail-source.el (mail-source-fetch-pop) (mail-source-check-pop): * lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): * lisp/files.el (basic-save-buffer-2, files--ensure-directory) (files--force, copy-directory): * lisp/eshell/esh-io.el (eshell-output-object-to-target): * lisp/epa.el (epa-decrypt-file, epa-verify-file, epa-sign-file) (epa-encrypt-file, epa-decrypt-region, epa-verify-region) (epa-sign-region, epa-encrypt-region, epa-delete-keys) (epa-export-keys, epa-insert-keys): * lisp/emacs-lisp/package.el (package--unless-error): * lisp/emacs-lisp/multisession.el (multisession--read-file-value): * lisp/emacs-lisp/lisp.el (up-list-default-function): * lisp/desktop.el (desktop-kill): * lisp/calendar/time-date.el (date-to-time): * lisp/calendar/appt.el (appt-display-message): * lisp/calc/calc.el (calc-do): * lisp/bookmark.el (bookmark-handle-bookmark): * src/fileio.c (report_file_errno): * lisp/vc/vc.el (vc-checkout, vc-pull): Use `(signal err)` instead of `(signal (car err) (cdr err))`.
* Use the new error API functionsStefan Monnier23 hours1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/epa-file.el (epa-file--find-file-not-found-function): Use `error-slot-value` and `error-data`. (epa-file-insert-file-contents): Use `error-has-type-p`, `error-slot-value`, and `error-data`. * lisp/jka-compr.el (jka-compr-insert-file-contents): Use `error-has-type-p` and `error-slot-value` as well as new re-signaling form of `signal`. * lisp/simple.el (minibuffer-error-function): Use `error-has-type-p`. * lisp/startup.el (startup--load-user-init-file): Use `error-message-string`. (command-line): Use `error-has-type-p` and `error-message-string`. * lisp/type-break.el (type-break-demo-life): Use `error-message-string`. * lisp/emacs-lisp/bytecomp.el (batch-byte-compile-file): Use `error-message-string` and `error-has-type-p`. * lisp/emacs-lisp/edebug.el (edebug-safe-eval, edebug-report-error) (edebug-eval-expression): * lisp/emacs-lisp/debug.el (debugger-eval-expression): Use `error-message-string`. * lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Use `error-has-type-p` and `error-type`. * lisp/net/sasl.el (sasl-error): Use `define-error`. * lisp/net/tramp-compat.el (tramp-error-type-p): New function. (tramp-permission-denied, tramp-compat-permission-denied): Use it. * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Use `error-type-p`. * lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) (turn-off-xterm-mouse-tracking-on-terminal): Use `error-slot-value`. * lisp/simple.el (next-line, previous-line): Remove useless `condition-case` handler, and hence the whole `condition-case`, and then simplify. * lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`. * lisp/gnus/nnmaildir.el (nnmaildir--emlink-p, nnmaildir--enoent-p) (nnmaildir--eexist-p): Use `error-has-type-p`. (nnmaildir--new-number, nnmaildir-request-set-mark): Use single-arg `signal`. * lisp/ffap.el (ffap-machine-p): Use `error-slot-value`. * lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-has-type-p` as well as single-arg `signal`. * lisp/net/ange-ftp.el (ange-ftp-hook-function): Use single-arg `signal`. * lisp/ebuff-menu.el (electric-buffer-menu-looper): Use `error-has-type-p`. * lisp/progmodes/ebrowse.el (ebrowse-electric-list-looper): Use `error-has-type-p`. (ebrowse-electric-position-looper): Make it an alias of `ebrowse-electric-list-looper`. * lisp/ibuffer.el (ibuffer-confirm-operation-on): * lisp/ls-lisp.el (ls-lisp--insert-directory): * lisp/gnus/gnus-search.el (gnus-search-run-query): * lisp/mail/mail-extr.el (mail-extr-safe-move-sexp): * lisp/net/dbus.el (dbus-set-property): * lisp/net/eudc-export.el (eudc-bbdbify-phone): * lisp/net/imap.el (imap-fetch-safe): * lisp/vc/vc.el (vc-root-dir): Use `error-slot-value` and single-arg `signal` to re-signal.
* ; Fix documentation of a recently added user optionEli Zaretskii6 days1-2/+3
| | | | | * lisp/vc/vc-dispatcher.el (vc-display-failed-async-commands): Doc fix. Add a :version tag.
* New user option vc-display-failed-async-commandsSean Whitton6 days2-5/+22
| | | | | | | | | | | | * lisp/vc/vc-dispatcher.el (vc-display-failed-async-commands): New user option. (vc-do-async-command): Use it. * doc/emacs/vc1-xtra.texi (General VC Options): * etc/NEWS: Document it. * lisp/vc/vc-dispatcher.el (vc-do-command): Adjust message to begin "Failed" not "Done" when command exits non-zero. * lisp/vc/vc.el (vc-checkin): Adjust message to end in "...failed" not "...done" when async command exits non-zero.
* vc-do-command: Tidy up some messagingSean Whitton6 days1-13/+16
| | | | | | | * lisp/vc/vc-dispatcher.el (vc--inhibit-message): New defvar, replacing the undeclared vc-inhibit-message. All uses changed. (vc--command-message): New function, factored out. (vc-do-command): Call it.
* ; * lisp/vc/vc.el (vc-print-change-log): Fix last change.Sean Whitton7 days1-1/+1
|
* ; Fix docstring of vc-print-root-change-logFilipp Gunbin8 days1-1/+1
|
* Fix respecting vc-log-show-limit with new -change-log commandsSean Whitton8 days1-2/+2
| | | | | * lisp/vc/vc.el (vc-print-change-log, vc-print-root-change-log): Respect vc-log-show-limit when there is no prefix argument (bug#80532).
* Handle side windows in 'ediff-setup-windows-plain-compare' (Bug#80415)Martin Rudalics9 days1-33/+28
| | | | | | | | * lisp/vc/ediff-wind.el (ediff-split-window-function) (ediff-merge-split-window-function): Amend doc-strings. (ediff-setup-windows-plain-compare): Simplify minibuffer window handling, handle side windows (Bug#80415), avoid 'other-window' and 'switch-to-buffer' calls.
* ; Relocate comment along with the relocated code.Sean Whitton11 days1-2/+1
| | | | | | | | | | | | | The code was moved, but without its comment, in this change: Author: Dmitry Gutov <dgutov@yandex.ru> AuthorDate: Thu May 28 02:16:00 2015 +0300 Delete the old process in vc-setup-buffer * lisp/vc/vc-dispatcher.el (vc-setup-buffer): Delete the old process here. (vc-do-command): Rather than here (bug#20608).
* New 'log-outstanding' value for vc-log-view-typeSean Whitton12 days3-11/+16
| | | | | | | | | | This fixes vc-hg-print-log's choice of -r arguments to 'hg log'. * lisp/vc/vc.el (vc-log-view-type): New 'log-outstanding' value. (vc-log-outstanding): Pass it. * lisp/vc/vc-git.el (vc-git-log-view-mode): * lisp/vc/vc-hg.el (vc-hg-print-log, vc-hg-log-view-mode): Treat 'log-outstanding' the same as 'log-outgoing'.
* Fix renaming directories in VC repositoriesSean Whitton12 days1-6/+11
| | | | | | | * lisp/dired-aux.el (dired-rename-file): When determining whether to call vc-rename-file, use vc-responsible-backend instead of vc-backend when FILE is a directory. * lisp/vc/vc.el (vc-rename-file): Support renaming directories.
* lisp/vc/smerge-mode.el (smerge-refine-shadow-cursor): Make it thinnerStefan Monnier14 days1-1/+1
| | | | | | | | | | | OTOH a thickness of 1 pixel is a bit too thin on my HiDPI displays, but 2 is too thick on non-HiDPI displays, at least with my default smallish font. I originally favored the HiDPI displays and large fonts, thinking it's a more common situation nowadays, but I changed my mind because the "too thick" problem seems actually more severe because it's occasionally bad enough that it's unclear which cursor is the real one.
* ; * lisp/vc/vc.el (revision-published-p): Disambiguate (bug#80396).Sean Whitton2026-02-231-1/+1
|
* Fix VC Git error when patch matches staged changesPaul Nelson2026-02-231-1/+1
| | | | | | | | * lisp/vc/vc-git.el (vc-git--checkin): Check that patch-string is not empty before applying it. This prevents an error when the patch exactly matches the index (bug#80228). * test/lisp/vc/vc-git-tests.el (vc-git-test-checkin-patch-staged-diff): New test.
* vc-do-async-command: Set special-mode only when no mode setSean Whitton2026-02-211-1/+2
| | | | | * lisp/vc/vc-dispatcher.el (vc-do-async-command): Set special-mode only when no other mode set.
* New command vc-dir-root-next-actionSean Whitton2026-02-211-1/+22
| | | | | | | * lisp/vc/vc-dir.el (vc-dir-root-next-action): New command. (vc-dir-mode-map): Bind it. * doc/emacs/maintaining.texi (VC Directory Commands): * etc/NEWS: Document it.
* Show "committing" pseudo-state in VC-Dir during an async checkinSean Whitton2026-02-204-41/+79
| | | | | | | | | | | | * lisp/vc/vc-dir.el (vc-dir-fileinfo): New 'display-state' field. (vc-dir-update): Use it. (vc-default-dir-printer): * lisp/vc/vc-git.el (vc-git-dir-printer): Use it. Fontify a display state of "committing" as vc-dir-status-warning. * lisp/vc/vc-hooks.el (vc--file-getinheprop): New function. * lisp/vc/vc.el (vc-checkin): Set "committing" display state on items we are checking in asynchronously.
* Fix invalid vc-state after vc-revertSean Whitton2026-02-191-19/+30
| | | | | | | | * lisp/vc/vc.el (vc-revert-file, vc-revert-files): If the vc-state of the file is 'added', set it to 'unregistered' after the operation, not 'up-to-date'. (vc-revert-files): Fix updating vc-checkout-time to affect files within directories within FILES.
* * lisp/vc/vc-dispatcher.el (vc-do-async-command): Call special-mode.Sean Whitton2026-02-191-0/+1
|
* Fixes to with-vc-propertiesSean Whitton2026-02-181-5/+7
| | | | | | | | * lisp/vc/vc.el (with-vc-properties): Un-gensym 'vc-touched-properties'; this is a dynamic variable. Document the longstanding behavior to capture 'file' while evaluating SETTINGS, and to evaluate SETTINGS for each file to be updated. Declare '(indent 0)'.
* vc-dir-show-outgoing-count: Mark a safe local variableSean Whitton2026-02-181-0/+1
| | | | | * lisp/vc/vc-dir.el (vc-dir-show-outgoing-count): Mark a safe local variable.
* New 'delete-files' VC backend function for faster mass deletionsSean Whitton2026-02-183-22/+62
| | | | | | * lisp/vc/vc-git.el (vc-git-delete-files): * lisp/vc/vc-hg.el (vc-hg-delete-files): New functions. * lisp/vc/vc.el (vc-delete-file): Use them.
* Fix vc-hg-delete-file on files in nonexistent directoriesSean Whitton2026-02-181-6/+7
| | | | | * lisp/vc/vc-hg.el (vc-hg-delete-file): Always run hg in the repository root.
* vc-git-pull, vc-git-incoming-revision: Use push remotesSean Whitton2026-02-181-4/+18
| | | | | | * lisp/vc/vc-git.el (vc-git-pull, vc-git-incoming-revision): Use configured push remotes. * etc/NEWS: Announce change to vc-git-pull.
* ; Docstring fix for outstanding changes commands.Sean Whitton2026-02-171-16/+8
|
* Use -outstanding not -outgoing-base in VC command namesSean Whitton2026-02-173-16/+16
| | | | | | | | | * lisp/vc/vc.el (vc-root-diff-outgoing-base) (vc-diff-outgoing-base, vc-log-outgoing-base) (vc-root-log-outgoing-base): Rename from these ... (vc-root-diff-outstanding, vc-diff-outstanding) (vc-log-outstanding, vc-root-log-outstanding): ... to these. All uses changed.
* Mark add-log-always-start-new-record as safeBasil L. Contovounesios2026-02-171-0/+1
| | | | | * lisp/vc/add-log.el (add-log-always-start-new-record): Mark as safe-local-variable (bug#80408).
* Add repeat-map for smerge-mode commandsPaul Nelson2026-02-161-0/+20
| | | | * lisp/vc/smerge-mode.el (smerge-repeat-map): New keymap (bug#80414).
* vc-pull-and-push: Fix when visiting untracked filesSean Whitton2026-02-141-4/+2
| | | | | * lisp/vc/vc.el (vc-pull-and-push): Don't fail when called from buffers visiting unregistered or ignored files.
* * lisp/vc/vc.el (vc-push): Fix when visiting untracked files.Sean Whitton2026-02-141-3/+2
|
* Fix vc-pull from buffers visiting untracked filesSean Whitton2026-02-141-7/+19
| | | | | | * lisp/vc/vc.el (vc-pull): Don't fail when called from buffers visiting unregistered or ignored files so long as there is a 'pull' function available from the backend.
* vc-find-backend-function: Require vc for default implementationsSean Whitton2026-02-141-3/+5
| | | | | | * lisp/vc/vc-hooks.el (vc-find-backend-function): Require vc for default implementations (bug#80254). Report and fix due to Daniel Mendler <mail@daniel-mendler.de>.
* ; vc-user-edit-command-history: Expand docstring.Sean Whitton2026-02-141-1/+3
|
* Improve vc-git-topic-outgoing-base fallback algorithmSean Whitton2026-02-143-65/+106
| | | | | | | | | | | | | | * lisp/vc/vc-hg.el (vc-hg--bookmarks): New function. (vc-hg-trunk-or-topic-p): * lisp/vc/vc-git.el (vc-git--branch-remotes) (vc-git-trunk-or-topic-p): New optional BRANCH argument. (vc-trunk-or-topic-p): Declare. (vc-git-topic-outgoing-base): Consider only local trunks, if there are any (bug#80006). * lisp/vc/vc.el (trunk-or-topic-p): New optional BRANCH argument. (vc-trunk-or-topic-p): New function. (vc--outgoing-base): Call it.
* vc-log-show-limit: Change default to 500, and the button to 4XDmitry Gutov2026-02-142-7/+9
| | | | | | | | | | | | | * lisp/vc/vc.el (vc-log-show-limit): Change the default to 500 (bug#80037). (vc-print-log-setup-buttons): Have the first button prompt and propose 4X the current limit as the default. (vc-print-fileset-branch-log): Update the reference to the changed button text. * lisp/vc/log-view.el (log-view-end-of-defun-1): Same. * doc/emacs/maintaining.texi (VC Change Log): Also here.
* Autoload 'diff-no-select'Philip Kaludercic2026-02-131-0/+1
| | | | | | | | | | | * lisp/emacs-lisp/package.el (package-review): Remove unnecessary 'require'. * lisp/eshell/em-unix.el: Remove declaration. * lisp/files.el (save-some-buffers-action-alist): Remove unnecessary 'require'. * lisp/vc/diff.el (diff-no-select): Autoload it. (Bug#80288)
* ; vc-git-topic-outgoing-base: Preparatory refactoring.Sean Whitton2026-02-131-33/+70
| | | | No intentional functional change.
* vc-git--deduce-files-for-stash: Use file-relative-name (bug#80278)Sean Whitton2026-02-101-3/+3
| | | | | * lisp/vc/vc-git.el (vc-git--deduce-files-for-stash): Use file-relative-name (bug#80278).
* Separate input histories for 'C-x v !' and Git pulling & pushingSean Whitton2026-02-063-4/+10
| | | | | | | | | | * lisp/vc/vc-dispatcher.el (vc-user-edit-command-history): Use this as a dynamically bound variable, not a minibuffer history. (vc-user-edit-command): Pass its value to read-shell-command. * lisp/vc/vc-git.el (vc-git--pushpull): * lisp/vc/vc.el (vc-edit-next-command): Bind it. (vc-edit-next-command-history): New variable. * etc/NEWS: Document the change.
* ; diff--revert-kill-hunks: Hoist binding inhibit-read-only.Sean Whitton2026-02-051-1/+1
|
* vc-git--mailinfo: Use file-local-name (bug#80295, bug#80320)Visuwesh2026-02-051-1/+3
| | | | | * lisp/vc/vc-git.el (vc-git--mailinfo): Use file-local-name (bug#80295, bug#80320).
* New minibuffer history for vc-user-edit-command (bug#80169)Protesilaos Stavrou2026-02-051-1/+5
| | | | | | * lisp/vc/vc-dispatcher.el (vc-user-edit-command-history): New variable. (vc-user-edit-command): Use it (bug#80169). * etc/NEWS: Announce it.
* Bind "u", "@" in diff-mode-read-only-map, not diff-mode-shared-mapSean Whitton2026-02-051-10/+13
| | | | | | * lisp/vc/diff-mode.el (diff-mode-shared-map): Move bindings for "u" and "@" from here ... (diff-mode-read-only-map): ... to here.
* ; Improve outgoing base command docstrings.Sean Whitton2026-02-051-4/+12
|
* Bind "s" in diff-mode-read-only-map, not diff-mode-shared-mapSean Whitton2026-02-051-6/+8
| | | | | | * lisp/vc/diff-mode.el (diff-mode-shared-map): Move binding for "s" from here ... (diff-mode-read-only-map): ... to here (bug#80330).
* diff-mode-shared-map: Bind '@' to diff-revert-and-kill-hunkSean Whitton2026-02-021-2/+3
| | | | | * lisp/vc/diff-mode.el (diff-mode-shared-map): Bind '@' to diff-revert-and-kill-hunk.
* vc--incoming-revision: Signal error on cache hitSean Whitton2026-01-301-23/+24
| | | | | | | * 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.
* Make diff-hunk-kill respect an active regionSean Whitton2026-01-302-47/+92
| | | | | | | | | | * 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.
* ; vc-git-topic-outgoing-base: Merge let into if-let*.Sean Whitton2026-01-301-32/+32
|