aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Whitton2025-04-26 12:55:56 +0800
committerSean Whitton2025-04-27 11:52:53 +0800
commit6b204c2d164a53ff85e132d4a77bd7afbb0fc42e (patch)
treed1c50f7d9271bec78e0f9bb9fdbc16853f5f9127
parent191b4cd9a76aa31ff9711370842394f37955c06a (diff)
downloademacs-6b204c2d164a53ff85e132d4a77bd7afbb0fc42e.tar.gz
emacs-6b204c2d164a53ff85e132d4a77bd7afbb0fc42e.zip
Rename vc-buffer-sync's argument to NOT-ESSENTIAL
* lisp/vc/vc-dispatcher.el (vc-buffer-sync): * lisp/vc/vc.el (vc-maybe-buffer-sync, vc-diff) (vc-buffer-sync-fileset, vc-ediff, vc-root-diff): Rename argument from NOT-URGENT to NOT-ESSENTIAL.
-rw-r--r--lisp/vc/vc-dispatcher.el6
-rw-r--r--lisp/vc/vc.el32
2 files changed, 19 insertions, 19 deletions
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index f51eb728cf8..0a733336edd 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -697,9 +697,9 @@ editing!"
697 (when vc-dir-buffers 697 (when vc-dir-buffers
698 (vc-dir-resynch-file file))) 698 (vc-dir-resynch-file file)))
699 699
700(defun vc-buffer-sync (&optional not-urgent) 700(defun vc-buffer-sync (&optional not-essential)
701 "Make sure the current buffer and its working file are in sync. 701 "Make sure the current buffer and its working file are in sync.
702NOT-URGENT means it is ok to continue if the user says not to save." 702NOT-ESSENTIAL means it is okay to continue if the user says not to save."
703 (let (missing) 703 (let (missing)
704 (when (cond 704 (when (cond
705 ((buffer-modified-p)) 705 ((buffer-modified-p))
@@ -712,7 +712,7 @@ NOT-URGENT means it is ok to continue if the user says not to save."
712 "is missing on disk" 712 "is missing on disk"
713 "modified")))) 713 "modified"))))
714 (save-buffer) 714 (save-buffer)
715 (unless not-urgent 715 (unless not-essential
716 (error "Aborted")))))) 716 (error "Aborted"))))))
717 717
718;; Command closures 718;; Command closures
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 12f39be4bdb..a8e99d280ef 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2281,34 +2281,34 @@ state of each file in the fileset."
2281 t (list backend (list rootdir)) rev1 rev2 2281 t (list backend (list rootdir)) rev1 rev2
2282 (called-interactively-p 'interactive))))) 2282 (called-interactively-p 'interactive)))))
2283 2283
2284(defun vc-maybe-buffer-sync (not-urgent) 2284(defun vc-maybe-buffer-sync (not-essential)
2285 (with-current-buffer (or (buffer-base-buffer) (current-buffer)) 2285 (with-current-buffer (or (buffer-base-buffer) (current-buffer))
2286 (when buffer-file-name (vc-buffer-sync not-urgent)))) 2286 (when buffer-file-name (vc-buffer-sync not-essential))))
2287 2287
2288;;;###autoload 2288;;;###autoload
2289(defun vc-diff (&optional historic not-urgent fileset) 2289(defun vc-diff (&optional historic not-essential fileset)
2290 "Display diffs between file revisions. 2290 "Display diffs between file revisions.
2291Normally this compares the currently selected fileset with their 2291Normally this compares the currently selected fileset with their
2292working revisions. With a prefix argument HISTORIC, it reads two revision 2292working revisions. With a prefix argument HISTORIC, it reads two revision
2293designators specifying which revisions to compare. 2293designators specifying which revisions to compare.
2294 2294
2295The optional argument NOT-URGENT non-nil means it is ok to say no to 2295Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
2296saving the buffer. The optional argument FILESET can override the 2296saving the buffer.
2297deduced fileset." 2297Optional argument FILESET, if non-nil, overrides the fileset."
2298 (interactive (list current-prefix-arg t)) 2298 (interactive (list current-prefix-arg t))
2299 (if historic 2299 (if historic
2300 (call-interactively 'vc-version-diff) 2300 (call-interactively 'vc-version-diff)
2301 (vc-maybe-buffer-sync not-urgent) 2301 (vc-maybe-buffer-sync not-essential)
2302 (let ((fileset (or fileset (vc-deduce-fileset t)))) 2302 (let ((fileset (or fileset (vc-deduce-fileset t))))
2303 (vc-buffer-sync-fileset fileset not-urgent) 2303 (vc-buffer-sync-fileset fileset not-essential)
2304 (vc-diff-internal t fileset nil nil 2304 (vc-diff-internal t fileset nil nil
2305 (called-interactively-p 'interactive))))) 2305 (called-interactively-p 'interactive)))))
2306 2306
2307(defun vc-buffer-sync-fileset (fileset not-urgent) 2307(defun vc-buffer-sync-fileset (fileset not-essential)
2308 (dolist (filename (cadr fileset)) 2308 (dolist (filename (cadr fileset))
2309 (when-let* ((buffer (find-buffer-visiting filename))) 2309 (when-let* ((buffer (find-buffer-visiting filename)))
2310 (with-current-buffer buffer 2310 (with-current-buffer buffer
2311 (vc-buffer-sync not-urgent))))) 2311 (vc-buffer-sync not-essential)))))
2312 2312
2313;;;###autoload 2313;;;###autoload
2314(defun vc-diff-mergebase (_files rev1 rev2) 2314(defun vc-diff-mergebase (_files rev1 rev2)
@@ -2374,35 +2374,35 @@ state of each file in FILES."
2374 (error "More than one file is not supported")))) 2374 (error "More than one file is not supported"))))
2375 2375
2376;;;###autoload 2376;;;###autoload
2377(defun vc-ediff (historic &optional not-urgent) 2377(defun vc-ediff (historic &optional not-essential)
2378 "Display diffs between file revisions using ediff. 2378 "Display diffs between file revisions using ediff.
2379Normally this compares the currently selected fileset with their 2379Normally this compares the currently selected fileset with their
2380working revisions. With a prefix argument HISTORIC, it reads two revision 2380working revisions. With a prefix argument HISTORIC, it reads two revision
2381designators specifying which revisions to compare. 2381designators specifying which revisions to compare.
2382 2382
2383The optional argument NOT-URGENT non-nil means it is ok to say no to 2383Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
2384saving the buffer." 2384saving the buffer."
2385 (interactive (list current-prefix-arg t)) 2385 (interactive (list current-prefix-arg t))
2386 (if historic 2386 (if historic
2387 (call-interactively 'vc-version-ediff) 2387 (call-interactively 'vc-version-ediff)
2388 (vc-maybe-buffer-sync not-urgent) 2388 (vc-maybe-buffer-sync not-essential)
2389 (vc-version-ediff (cadr (vc-deduce-fileset t)) nil nil))) 2389 (vc-version-ediff (cadr (vc-deduce-fileset t)) nil nil)))
2390 2390
2391;;;###autoload 2391;;;###autoload
2392(defun vc-root-diff (historic &optional not-urgent) 2392(defun vc-root-diff (historic &optional not-essential)
2393 "Display diffs between VC-controlled whole tree revisions. 2393 "Display diffs between VC-controlled whole tree revisions.
2394Normally, this compares the tree corresponding to the current 2394Normally, this compares the tree corresponding to the current
2395fileset with the working revision. 2395fileset with the working revision.
2396With a prefix argument HISTORIC, prompt for two revision 2396With a prefix argument HISTORIC, prompt for two revision
2397designators specifying which revisions to compare. 2397designators specifying which revisions to compare.
2398 2398
2399The optional argument NOT-URGENT non-nil means it is ok to say no to 2399Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
2400saving the buffer." 2400saving the buffer."
2401 (interactive (list current-prefix-arg t)) 2401 (interactive (list current-prefix-arg t))
2402 (if historic 2402 (if historic
2403 ;; We want the diff for the VC root dir. 2403 ;; We want the diff for the VC root dir.
2404 (call-interactively 'vc-root-version-diff) 2404 (call-interactively 'vc-root-version-diff)
2405 (vc-maybe-buffer-sync not-urgent) 2405 (vc-maybe-buffer-sync not-essential)
2406 (let ((backend (vc-deduce-backend)) 2406 (let ((backend (vc-deduce-backend))
2407 (default-directory default-directory) 2407 (default-directory default-directory)
2408 rootdir) 2408 rootdir)