1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merge branch 'master' into feature/package+vc

This commit is contained in:
Philip Kaludercic 2022-10-08 11:56:23 +02:00
commit 8cfeb8a9e0
No known key found for this signature in database
GPG key ID: F2C3CC513DB89F66
892 changed files with 34527 additions and 16927 deletions

View file

@ -80,6 +80,7 @@
;; - delete-file (file) TEST IT
;; - rename-file (old new) OK
;; - find-file-hook () added for bug#10709
;; - prepare-patch (rev) OK
;; 2) Implement Stefan Monnier's advice:
;; vc-hg-registered and vc-hg-state
@ -907,7 +908,7 @@ if we don't understand a construct, we signal
;; should cover the common cases. Remember that we fall back
;; to regular hg commands if we see something we don't like.
(save-restriction
(narrow-to-region (point) (point-at-eol))
(narrow-to-region (point) (line-end-position))
(cond ((looking-at "[ \t]*\\(?:#.*\\)?$"))
((looking-at "syntax:[ \t]*re[ \t]*$")
(setf default-syntax 'vc-hg--hgignore-add-pcre))
@ -1347,7 +1348,7 @@ REV is the revision to check out into WORKFILE."
;; Follows vc-hg-command (or vc-do-async-command), which uses vc-do-command
;; from vc-dispatcher.
(declare-function vc-exec-after "vc-dispatcher" (code))
(declare-function vc-exec-after "vc-dispatcher" (code &optional success))
;; Follows vc-exec-after.
(declare-function vc-set-async-update "vc-dispatcher" (process-buffer))
@ -1509,6 +1510,17 @@ This runs the command \"hg merge\"."
(with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg)))
(vc-set-async-update buffer)))
(defun vc-hg-prepare-patch (rev)
(with-current-buffer (generate-new-buffer " *vc-hg-prepare-patch*")
(vc-hg-command t 0 '() "export" "--rev" rev)
(let (subject)
;; Extract the subject line
(goto-char (point-min))
(search-forward-regexp "^[^#].*")
(setq subject (match-string 0))
;; Return the extracted data
(list :subject subject :buffer (current-buffer)))))
;;; Internal functions
(defun vc-hg-command (buffer okstatus file-or-list &rest flags)