; Fix last change: change let*' to let'.

This commit is contained in:
Sean Whitton 2025-08-16 20:42:25 +01:00
parent 72022459a9
commit 23b766b503

View file

@ -1242,36 +1242,36 @@ It is an error to supply both or neither."
(write-region (car args) nil msg-file))
(when patch-file
(write-region patch-string nil patch-file)))
(let* ((coding-system-for-write
;; On MS-Windows, we must encode command-line arguments in
;; the system codepage.
(if (eq system-type 'windows-nt)
locale-coding-system
coding-system-for-write))
(args
(nconc (if patch-file
(list "import" "--bypass" patch-file)
(list "commit" "-A"))
(if msg-file
(cl-list* "-l" (file-local-name msg-file) (cdr args))
(cl-list* "-m" args))))
(post (lambda ()
(when (and msg-file (file-exists-p msg-file))
(delete-file msg-file))
(when (and patch-file (file-exists-p patch-file))
(delete-file patch-file))
;; When committing a patch we run 'hg import' and
;; then 'hg update'. We have 'hg update' here in the
;; always-synchronous `post' function because we
;; assume that 'hg import' is the one that might be
;; slow and so benefits most from `vc-async-checkin'.
;; If in fact both the 'hg import' and the 'hg
;; update' can be slow, then we need to make both of
;; them part of the async command, possibly by
;; writing out a tiny shell script (bug#79235).
(when patch-file
(vc-hg-command nil 0 nil "update" "--merge"
"--tool" "internal:local" "tip")))))
(let ((coding-system-for-write
;; On MS-Windows, we must encode command-line arguments in
;; the system codepage.
(if (eq system-type 'windows-nt)
locale-coding-system
coding-system-for-write))
(args
(nconc (if patch-file
(list "import" "--bypass" patch-file)
(list "commit" "-A"))
(if msg-file
(cl-list* "-l" (file-local-name msg-file) (cdr args))
(cl-list* "-m" args))))
(post (lambda ()
(when (and msg-file (file-exists-p msg-file))
(delete-file msg-file))
(when (and patch-file (file-exists-p patch-file))
(delete-file patch-file))
;; When committing a patch we run 'hg import' and
;; then 'hg update'. We have 'hg update' here in the
;; always-synchronous `post' function because we
;; assume that 'hg import' is the one that might be
;; slow and so benefits most from `vc-async-checkin'.
;; If in fact both the 'hg import' and the 'hg
;; update' can be slow, then we need to make both of
;; them part of the async command, possibly by
;; writing out a tiny shell script (bug#79235).
(when patch-file
(vc-hg-command nil 0 nil "update" "--merge"
"--tool" "internal:local" "tip")))))
(if vc-async-checkin
(let ((buffer (vc-hg--async-buffer)))
(vc-wait-for-process-before-save