]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename vc-buffer-sync's argument to NOT-ESSENTIAL
authorSean Whitton <spwhitton@spwhitton.name>
Sat, 26 Apr 2025 04:55:56 +0000 (12:55 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 27 Apr 2025 13:29:11 +0000 (15:29 +0200)
* 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.

(cherry picked from commit 6b204c2d164a53ff85e132d4a77bd7afbb0fc42e)

lisp/vc/vc-dispatcher.el
lisp/vc/vc.el

index 7e9e6091ff71eaed73e14e5d03f0f780bdf2c467..2db9ea9cbaa4f2c95c818cd17a67af181fc01f28 100644 (file)
@@ -697,9 +697,9 @@ editing!"
   (when vc-dir-buffers
     (vc-dir-resynch-file file)))
 
-(defun vc-buffer-sync (&optional not-urgent)
+(defun vc-buffer-sync (&optional not-essential)
   "Make sure the current buffer and its working file are in sync.
-NOT-URGENT means it is ok to continue if the user says not to save."
+NOT-ESSENTIAL means it is okay to continue if the user says not to save."
   (let (missing)
     (when (cond
            ((buffer-modified-p))
@@ -712,7 +712,7 @@ NOT-URGENT means it is ok to continue if the user says not to save."
                                     "is missing on disk"
                                   "modified"))))
           (save-buffer)
-        (unless not-urgent
+        (unless not-essential
           (error "Aborted"))))))
 
 ;; Command closures
index ddb13db651cd09592f2825c027989bd29176e06b..c7f16859922b25c67f88428336a1e6f98bb4ee77 100644 (file)
@@ -2276,34 +2276,34 @@ state of each file in the fileset."
        t (list backend (list rootdir)) rev1 rev2
        (called-interactively-p 'interactive)))))
 
-(defun vc-maybe-buffer-sync (not-urgent)
+(defun vc-maybe-buffer-sync (not-essential)
   (with-current-buffer (or (buffer-base-buffer) (current-buffer))
-    (when buffer-file-name (vc-buffer-sync not-urgent))))
+    (when buffer-file-name (vc-buffer-sync not-essential))))
 
 ;;;###autoload
-(defun vc-diff (&optional historic not-urgent fileset)
+(defun vc-diff (&optional historic not-essential fileset)
   "Display diffs between file revisions.
 Normally this compares the currently selected fileset with their
 working revisions.  With a prefix argument HISTORIC, it reads two revision
 designators specifying which revisions to compare.
 
-The optional argument NOT-URGENT non-nil means it is ok to say no to
-saving the buffer.  The optional argument FILESET can override the
-deduced fileset."
+Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
+saving the buffer.
+Optional argument FILESET, if non-nil, overrides the fileset."
   (interactive (list current-prefix-arg t))
   (if historic
       (call-interactively 'vc-version-diff)
-    (vc-maybe-buffer-sync not-urgent)
+    (vc-maybe-buffer-sync not-essential)
     (let ((fileset (or fileset (vc-deduce-fileset t))))
-      (vc-buffer-sync-fileset fileset not-urgent)
+      (vc-buffer-sync-fileset fileset not-essential)
       (vc-diff-internal t fileset nil nil
                        (called-interactively-p 'interactive)))))
 
-(defun vc-buffer-sync-fileset (fileset not-urgent)
+(defun vc-buffer-sync-fileset (fileset not-essential)
   (dolist (filename (cadr fileset))
     (when-let ((buffer (find-buffer-visiting filename)))
       (with-current-buffer buffer
-       (vc-buffer-sync not-urgent)))))
+       (vc-buffer-sync not-essential)))))
 
 ;;;###autoload
 (defun vc-diff-mergebase (_files rev1 rev2)
@@ -2369,35 +2369,35 @@ state of each file in FILES."
     (error "More than one file is not supported"))))
 
 ;;;###autoload
-(defun vc-ediff (historic &optional not-urgent)
+(defun vc-ediff (historic &optional not-essential)
   "Display diffs between file revisions using ediff.
 Normally this compares the currently selected fileset with their
 working revisions.  With a prefix argument HISTORIC, it reads two revision
 designators specifying which revisions to compare.
 
-The optional argument NOT-URGENT non-nil means it is ok to say no to
+Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
 saving the buffer."
   (interactive (list current-prefix-arg t))
   (if historic
       (call-interactively 'vc-version-ediff)
-    (vc-maybe-buffer-sync not-urgent)
+    (vc-maybe-buffer-sync not-essential)
     (vc-version-ediff (cadr (vc-deduce-fileset t)) nil nil)))
 
 ;;;###autoload
-(defun vc-root-diff (historic &optional not-urgent)
+(defun vc-root-diff (historic &optional not-essential)
   "Display diffs between VC-controlled whole tree revisions.
 Normally, this compares the tree corresponding to the current
 fileset with the working revision.
 With a prefix argument HISTORIC, prompt for two revision
 designators specifying which revisions to compare.
 
-The optional argument NOT-URGENT non-nil means it is ok to say no to
+Optional argument NOT-ESSENTIAL non-nil means it is okay to say no to
 saving the buffer."
   (interactive (list current-prefix-arg t))
   (if historic
       ;; We want the diff for the VC root dir.
       (call-interactively 'vc-root-version-diff)
-    (vc-maybe-buffer-sync not-urgent)
+    (vc-maybe-buffer-sync not-essential)
     (let ((backend (vc-deduce-backend))
          (default-directory default-directory)
          rootdir)