mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 01:34:21 +00:00
* lisp/vc/vc.el (vc-diff-internal): Use delay-mode-hooks.
This commit is contained in:
parent
d481b9efdc
commit
699fb56b4e
1 changed files with 9 additions and 7 deletions
|
|
@ -2799,13 +2799,15 @@ Return t if the buffer had changes, nil otherwise."
|
|||
;; bindings are nicer for read only buffers. pcl-cvs does the
|
||||
;; same thing.
|
||||
(setq buffer-read-only t)
|
||||
(diff-mode)
|
||||
(setq-local diff-vc-backend (car vc-fileset))
|
||||
(setq-local diff-vc-revisions (list rev1 rev2))
|
||||
(setq-local revert-buffer-function
|
||||
(lambda (_ignore-auto _noconfirm)
|
||||
(vc-diff-internal async vc-fileset rev1 rev2 verbose)))
|
||||
(vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
|
||||
(delay-mode-hooks
|
||||
(diff-mode)
|
||||
(setq-local diff-vc-backend (car vc-fileset))
|
||||
(setq-local diff-vc-revisions (list rev1 rev2))
|
||||
(setq-local revert-buffer-function
|
||||
(lambda (_ignore-auto _noconfirm)
|
||||
(vc-diff-internal async vc-fileset rev1 rev2 verbose)))
|
||||
(vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async))
|
||||
(run-mode-hooks 'diff-mode-hook)
|
||||
(if (and (zerop (buffer-size))
|
||||
(not (get-buffer-process (current-buffer))))
|
||||
;; Treat this case specially so as not to pop the buffer.
|
||||
|
|
|
|||
Loading…
Reference in a new issue