aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Whitton2025-12-14 10:51:08 +0000
committerSean Whitton2025-12-14 10:51:08 +0000
commit699fb56b4e26aa2cffeec3292bf01c4ac5b11c44 (patch)
tree3552e427449c6e78b2b73820fdecc3c03288a67c
parentd481b9efdc65bb066e2c765ae76ab5aa93dc9541 (diff)
downloademacs-699fb56b4e26aa2cffeec3292bf01c4ac5b11c44.tar.gz
emacs-699fb56b4e26aa2cffeec3292bf01c4ac5b11c44.zip
* lisp/vc/vc.el (vc-diff-internal): Use delay-mode-hooks.
-rw-r--r--lisp/vc/vc.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index f210d440b69..b0821de3da5 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2799,13 +2799,15 @@ Return t if the buffer had changes, nil otherwise."
2799 ;; bindings are nicer for read only buffers. pcl-cvs does the 2799 ;; bindings are nicer for read only buffers. pcl-cvs does the
2800 ;; same thing. 2800 ;; same thing.
2801 (setq buffer-read-only t) 2801 (setq buffer-read-only t)
2802 (diff-mode) 2802 (delay-mode-hooks
2803 (setq-local diff-vc-backend (car vc-fileset)) 2803 (diff-mode)
2804 (setq-local diff-vc-revisions (list rev1 rev2)) 2804 (setq-local diff-vc-backend (car vc-fileset))
2805 (setq-local revert-buffer-function 2805 (setq-local diff-vc-revisions (list rev1 rev2))
2806 (lambda (_ignore-auto _noconfirm) 2806 (setq-local revert-buffer-function
2807 (vc-diff-internal async vc-fileset rev1 rev2 verbose))) 2807 (lambda (_ignore-auto _noconfirm)
2808 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async) 2808 (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
2809 (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async))
2810 (run-mode-hooks 'diff-mode-hook)
2809 (if (and (zerop (buffer-size)) 2811 (if (and (zerop (buffer-size))
2810 (not (get-buffer-process (current-buffer)))) 2812 (not (get-buffer-process (current-buffer))))
2811 ;; Treat this case specially so as not to pop the buffer. 2813 ;; Treat this case specially so as not to pop the buffer.