1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

; Insert "Stealing lock" at the beginning of a message

* lisp/vc/vc.el (vc-steal-lock): Use 'mail-text' instead of
jumping to 'point-max', to avoid inserting the message after
signatures.  (Bug#74027)
This commit is contained in:
Philip Kaludercic 2024-10-26 09:39:00 +02:00
parent 11954a3a0a
commit 551d1a2cd7
No known key found for this signature in database

View File

@ -1738,6 +1738,8 @@ Type \\[vc-next-action] to check in changes.")
(format "%d files" (length files))
"this file"))))
(declare-function mail-text "sendmail" ())
(declare-function message-goto-body "message" (&optional interactive))
(defun vc-steal-lock (file rev owner)
"Steal the lock on FILE."
(let (file-description)
@ -1758,7 +1760,10 @@ Type \\[vc-next-action] to check in changes.")
;; goes wrong, we don't want to send any mail.
(compose-mail owner (format "Stolen lock on %s" file-description))
(setq default-directory (expand-file-name "~/"))
(goto-char (point-max))
(cond
((eq mail-user-agent 'sendmail-user-agent)
(mail-text))
((message-goto-body)))
(insert
(format "I stole the lock on %s, " file-description)
(current-time-string)