diff options
| author | Sean Whitton | 2025-05-29 12:41:36 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-05-29 12:41:36 +0100 |
| commit | 6519fb5d2b22ec571de1d09095df4ad30345e988 (patch) | |
| tree | f3473361ce603ff4a4dadcfca988feaaed80754e | |
| parent | 433a031d249a28a29bdc6c2c4cf880f26a262627 (diff) | |
| download | emacs-6519fb5d2b22ec571de1d09095df4ad30345e988.tar.gz emacs-6519fb5d2b22ec571de1d09095df4ad30345e988.zip | |
Factor out vc-async-checkin-backends
This allows third party backends to indicate they support async
checkins.
* lisp/vc/vc.el (vc-async-checkin-backends): New variable.
(vc-checkin): Use it.
| -rw-r--r-- | lisp/vc/vc.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 60748d05ed8..c32cf9faae1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -1020,6 +1020,9 @@ Not supported by all backends." | |||
| 1020 | :safe #'booleanp | 1020 | :safe #'booleanp |
| 1021 | :version "31.1") | 1021 | :version "31.1") |
| 1022 | 1022 | ||
| 1023 | (defvar vc-async-checkin-backends '(Git Hg) | ||
| 1024 | "Backends which support `vc-async-checkin'.") | ||
| 1025 | |||
| 1023 | 1026 | ||
| 1024 | ;; File property caching | 1027 | ;; File property caching |
| 1025 | 1028 | ||
| @@ -1889,9 +1892,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." | |||
| 1889 | (vc-call-backend backend 'checkin | 1892 | (vc-call-backend backend 'checkin |
| 1890 | files comment rev)) | 1893 | files comment rev)) |
| 1891 | (mapc #'vc-delete-automatic-version-backups files))) | 1894 | (mapc #'vc-delete-automatic-version-backups files))) |
| 1892 | (if (and vc-async-checkin | 1895 | (if (and vc-async-checkin (memq backend vc-async-checkin-backends)) |
| 1893 | ;; Backends which support `vc-async-checkin'. | ||
| 1894 | (memq backend '(Git Hg))) | ||
| 1895 | ;; Rely on `vc-set-async-update' to update properties. | 1896 | ;; Rely on `vc-set-async-update' to update properties. |
| 1896 | (do-it) | 1897 | (do-it) |
| 1897 | (message "Checking in %s..." (vc-delistify files)) | 1898 | (message "Checking in %s..." (vc-delistify files)) |