diff options
| author | Sean Whitton | 2025-08-17 11:10:14 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-08-17 11:36:30 +0100 |
| commit | 70b5ad0192b2dd6232c1961b49e94a6620d02152 (patch) | |
| tree | 24c00a1d24011dc50c1db8079e6c4b7632d8b69e | |
| parent | 6f7e795ce1e5cf4e62c6260c4bde3545fc6d0f0d (diff) | |
| download | emacs-70b5ad0192b2dd6232c1961b49e94a6620d02152.tar.gz emacs-70b5ad0192b2dd6232c1961b49e94a6620d02152.zip | |
Delete duplicate bindings of default-directory
* lisp/vc/vc.el (vc-root-version-diff, vc-diff-mergebase)
(vc-root-diff-incoming, vc-root-diff-outgoing, vc-root-diff):
Delete duplicate bindings of default-directory.
vc--with-backend-in-rootdir already establishes bindings.
| -rw-r--r-- | lisp/vc/vc.el | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 8543b14c2a2..73f4f5d6f1d 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -2456,9 +2456,8 @@ state of each file in the fileset." | |||
| 2456 | (when (and (not rev1) rev2) | 2456 | (when (and (not rev1) rev2) |
| 2457 | (error "Not a valid revision range")) | 2457 | (error "Not a valid revision range")) |
| 2458 | (vc--with-backend-in-rootdir "VC root-diff" | 2458 | (vc--with-backend-in-rootdir "VC root-diff" |
| 2459 | (let ((default-directory rootdir)) | 2459 | (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) rev1 rev2 |
| 2460 | (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) rev1 rev2 | 2460 | (called-interactively-p 'interactive)))) |
| 2461 | (called-interactively-p 'interactive))))) | ||
| 2462 | 2461 | ||
| 2463 | ;;;###autoload | 2462 | ;;;###autoload |
| 2464 | (defun vc-diff (&optional historic not-essential fileset) | 2463 | (defun vc-diff (&optional historic not-essential fileset) |
| @@ -2531,8 +2530,7 @@ The merge base is a common ancestor between REV1 and REV2 revisions." | |||
| 2531 | (when (and (not rev1) rev2) | 2530 | (when (and (not rev1) rev2) |
| 2532 | (error "Not a valid revision range")) | 2531 | (error "Not a valid revision range")) |
| 2533 | (vc--with-backend-in-rootdir "VC root-diff" | 2532 | (vc--with-backend-in-rootdir "VC root-diff" |
| 2534 | (let ((default-directory rootdir) | 2533 | (let ((rev1 (vc-call-backend backend 'mergebase rev1 rev2))) |
| 2535 | (rev1 (vc-call-backend backend 'mergebase rev1 rev2))) | ||
| 2536 | (vc-diff-internal | 2534 | (vc-diff-internal |
| 2537 | vc-allow-async-diff (list backend (list rootdir)) rev1 rev2 | 2535 | vc-allow-async-diff (list backend (list rootdir)) rev1 rev2 |
| 2538 | (called-interactively-p 'interactive))))) | 2536 | (called-interactively-p 'interactive))))) |
| @@ -2548,8 +2546,7 @@ See `vc-use-incoming-outgoing-prefixes' regarding giving this command a | |||
| 2548 | global binding." | 2546 | global binding." |
| 2549 | (interactive (list (vc--maybe-read-remote-location))) | 2547 | (interactive (list (vc--maybe-read-remote-location))) |
| 2550 | (vc--with-backend-in-rootdir "VC root-diff" | 2548 | (vc--with-backend-in-rootdir "VC root-diff" |
| 2551 | (let ((default-directory rootdir) | 2549 | (let ((incoming (vc--incoming-revision backend |
| 2552 | (incoming (vc--incoming-revision backend | ||
| 2553 | (or remote-location "")))) | 2550 | (or remote-location "")))) |
| 2554 | (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) | 2551 | (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) |
| 2555 | (vc-call-backend backend 'mergebase incoming) | 2552 | (vc-call-backend backend 'mergebase incoming) |
| @@ -2572,8 +2569,7 @@ global binding." | |||
| 2572 | ;; (Hence why we don't call `vc-buffer-sync-fileset'.) | 2569 | ;; (Hence why we don't call `vc-buffer-sync-fileset'.) |
| 2573 | (interactive (list (vc--maybe-read-remote-location))) | 2570 | (interactive (list (vc--maybe-read-remote-location))) |
| 2574 | (vc--with-backend-in-rootdir "VC root-diff" | 2571 | (vc--with-backend-in-rootdir "VC root-diff" |
| 2575 | (let ((default-directory rootdir) | 2572 | (let ((incoming (vc--incoming-revision backend |
| 2576 | (incoming (vc--incoming-revision backend | ||
| 2577 | (or remote-location "")))) | 2573 | (or remote-location "")))) |
| 2578 | (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) | 2574 | (vc-diff-internal vc-allow-async-diff (list backend (list rootdir)) |
| 2579 | (vc-call-backend backend 'mergebase incoming) | 2575 | (vc-call-backend backend 'mergebase incoming) |
| @@ -2674,8 +2670,7 @@ saving the buffer." | |||
| 2674 | ;; relative to it. Bind default-directory to the root directory | 2670 | ;; relative to it. Bind default-directory to the root directory |
| 2675 | ;; here, this way the *vc-diff* buffer is setup correctly, so | 2671 | ;; here, this way the *vc-diff* buffer is setup correctly, so |
| 2676 | ;; relative file names work. | 2672 | ;; relative file names work. |
| 2677 | (let ((default-directory rootdir) | 2673 | (let ((fileset `(,backend (,rootdir)))) |
| 2678 | (fileset `(,backend (,rootdir)))) | ||
| 2679 | (vc-buffer-sync-fileset fileset not-essential) | 2674 | (vc-buffer-sync-fileset fileset not-essential) |
| 2680 | (vc-diff-internal vc-allow-async-diff fileset nil nil | 2675 | (vc-diff-internal vc-allow-async-diff fileset nil nil |
| 2681 | (called-interactively-p 'interactive)))))) | 2676 | (called-interactively-p 'interactive)))))) |