aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-02-22 14:17:16 +0000
committerJim Blandy1993-02-22 14:17:16 +0000
commit1ab31687d41ee63c4aa4e10fe591c2d8133a5d56 (patch)
tree501d02e4fe34f6c9f1e81558a3e62fcf9348a238
parent6f5191a247bdbb31b78ddb81855300174dc210df (diff)
downloademacs-1ab31687d41ee63c4aa4e10fe591c2d8133a5d56.tar.gz
emacs-1ab31687d41ee63c4aa4e10fe591c2d8133a5d56.zip
* files.el (revert-buffer): Reverse the sense of the first
argument, but leave interactive usage the same. * vc.el (vc-resynch-window): Call vc-revert-buffer1 with the newly appropriate arguments. This seems to be the only file which was adjusted for the new meaning of the revert-buffer arguments.
-rw-r--r--lisp/files.el26
-rw-r--r--lisp/vc.el4
2 files changed, 22 insertions, 8 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 0dce2e3d7cc..49d452b92e2 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1427,21 +1427,35 @@ or multiple mail buffers, etc."
1427Gets two args, first the nominal file name to use, 1427Gets two args, first the nominal file name to use,
1428and second, t if reading the auto-save file.") 1428and second, t if reading the auto-save file.")
1429 1429
1430(defun revert-buffer (&optional check-auto noconfirm) 1430(defun revert-buffer (&optional ignore-auto noconfirm)
1431 "Replace the buffer text with the text of the visited file on disk. 1431 "Replace the buffer text with the text of the visited file on disk.
1432This undoes all changes since the file was visited or saved. 1432This undoes all changes since the file was visited or saved.
1433With a prefix argument, offer to revert from latest auto-save file, if 1433With a prefix argument, offer to revert from latest auto-save file, if
1434that is more recent than the visited file. 1434that is more recent than the visited file.
1435When called from lisp, this is the first argument, CHECK-AUTO; it is optional. 1435
1436Optional second argument NOCONFIRM means don't ask for confirmation at all. 1436When called from lisp, the first argument is IGNORE-AUTO; only offer
1437to revert from the auto-save file when this is nil. Note that the
1438sense of this argument is the reverse of the prefix argument, for the
1439sake of backward compatibility. IGNORE-AUTO is optional, defaulting
1440to nil.
1441
1442Optional second argument NOCONFIRM means don't ask for confirmation at
1443all.
1437 1444
1438If the value of `revert-buffer-function' is non-nil, it is called to 1445If the value of `revert-buffer-function' is non-nil, it is called to
1439do the work." 1446do the work."
1440 (interactive "P") 1447 ;; I admit it's odd to reverse the sense of the prefix argument, but
1448 ;; there is a lot of code out there which assumes that the first
1449 ;; argument should be t to avoid consulting the auto-save file, and
1450 ;; there's no straightforward way to encourage authors to notice a
1451 ;; reversal of the argument sense. So I'm just changing the user
1452 ;; interface, but leaving the programmatic interface the same.
1453 (interactive (list (not prefix-arg)))
1441 (if revert-buffer-function 1454 (if revert-buffer-function
1442 (funcall revert-buffer-function (not check-auto) noconfirm) 1455 (funcall revert-buffer-function ignore-auto noconfirm)
1443 (let* ((opoint (point)) 1456 (let* ((opoint (point))
1444 (auto-save-p (and check-auto (recent-auto-save-p) 1457 (auto-save-p (and (not ignore-auto)
1458 (recent-auto-save-p)
1445 buffer-auto-save-file-name 1459 buffer-auto-save-file-name
1446 (file-readable-p buffer-auto-save-file-name) 1460 (file-readable-p buffer-auto-save-file-name)
1447 (y-or-n-p 1461 (y-or-n-p
diff --git a/lisp/vc.el b/lisp/vc.el
index 91c5908b389..62d4a8869ab 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -5,7 +5,7 @@
5;; Author: Eric S. Raymond <esr@snark.thyrsus.com> 5;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
6;; Version: 4.0 6;; Version: 4.0
7 7
8;; $Id: vc.el,v 1.18 1992/11/20 19:33:38 rms Exp jimb $ 8;; $Id: vc.el,v 1.19 1992/12/12 15:22:26 jimb Exp jimb $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -359,7 +359,7 @@ the option to steal the lock."
359 (and (string= buffer-file-name file) 359 (and (string= buffer-file-name file)
360 (if keep 360 (if keep
361 (progn 361 (progn
362 (vc-revert-buffer1 nil noquery) 362 (vc-revert-buffer1 t noquery)
363 (vc-mode-line buffer-file-name)) 363 (vc-mode-line buffer-file-name))
364 (progn 364 (progn
365 (delete-window) 365 (delete-window)