aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-12-24 23:07:23 +0000
committerRichard M. Stallman1993-12-24 23:07:23 +0000
commit97d3f95071f3f01fa94226f1f2a168c317d6c1e5 (patch)
tree0670722bb19786547cc4853e9ac9d22f947fc14f
parentbe44f62cfbf2011b3bf4df4fd00f32bd2e96c5f8 (diff)
downloademacs-97d3f95071f3f01fa94226f1f2a168c317d6c1e5.tar.gz
emacs-97d3f95071f3f01fa94226f1f2a168c317d6c1e5.zip
(vc-buffer-sync, vc-diff): New arg NOT-URGENT.
(vc-diff): Pass new arg.
-rw-r--r--lisp/vc.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 357c5c274f5..c469c7ca189 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -331,14 +331,17 @@ the master name of FILE; this is appended to an optional list of FLAGS."
331 (if new-mark (set-mark new-mark)))))) 331 (if new-mark (set-mark new-mark))))))
332 332
333 333
334(defun vc-buffer-sync () 334(defun vc-buffer-sync (&optional not-urgent)
335 ;; Make sure the current buffer and its working file are in sync 335 ;; Make sure the current buffer and its working file are in sync
336 ;; NOT-URGENT means it is ok to continue if the user says not to save.
336 (if (buffer-modified-p) 337 (if (buffer-modified-p)
337 (progn 338 (if (or vc-suppress-confirm
338 (or vc-suppress-confirm 339 (y-or-n-p (format "Buffer %s modified; save it? " (buffer-name))))
339 (y-or-n-p (format "Buffer %s modified; save it? " (buffer-name))) 340 (save-buffer)
340 (error "Aborted")) 341 (if not-urgent
341 (save-buffer)))) 342 nil
343 (error "Aborted")))))
344
342 345
343(defun vc-workfile-unchanged-p (file &optional want-differences-if-changed) 346(defun vc-workfile-unchanged-p (file &optional want-differences-if-changed)
344 ;; Has the given workfile changed since last checkout? 347 ;; Has the given workfile changed since last checkout?
@@ -748,7 +751,7 @@ If nil, uses `change-log-default-name'."
748;; Additional entry points for examining version histories 751;; Additional entry points for examining version histories
749 752
750;;;###autoload 753;;;###autoload
751(defun vc-diff (historic) 754(defun vc-diff (historic &optional not-urgent)
752 "Display diffs between file versions. 755 "Display diffs between file versions.
753Normally this compares the current file and buffer with the most recent 756Normally this compares the current file and buffer with the most recent
754checked in version of that file. This uses no arguments. 757checked in version of that file. This uses no arguments.
@@ -768,7 +771,7 @@ and two version designators specifying which versions to compare."
768 unchanged) 771 unchanged)
769 (or (and file (vc-name file)) 772 (or (and file (vc-name file))
770 (vc-registration-error file)) 773 (vc-registration-error file))
771 (vc-buffer-sync) 774 (vc-buffer-sync not-urgent)
772 (setq unchanged (vc-workfile-unchanged-p buffer-file-name)) 775 (setq unchanged (vc-workfile-unchanged-p buffer-file-name))
773 (if unchanged 776 (if unchanged
774 (message "No changes to %s since latest version." file) 777 (message "No changes to %s since latest version." file)
@@ -1120,7 +1123,7 @@ to that version."
1120 (while vc-parent-buffer 1123 (while vc-parent-buffer
1121 (pop-to-buffer vc-parent-buffer)) 1124 (pop-to-buffer vc-parent-buffer))
1122 (let ((file buffer-file-name) 1125 (let ((file buffer-file-name)
1123 (obuf (current-buffer)) (changed (vc-diff nil))) 1126 (obuf (current-buffer)) (changed (vc-diff nil t)))
1124 (if (and changed (or vc-suppress-confirm 1127 (if (and changed (or vc-suppress-confirm
1125 (not (yes-or-no-p "Discard changes? ")))) 1128 (not (yes-or-no-p "Discard changes? "))))
1126 (progn 1129 (progn