aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2004-02-08 22:42:42 +0000
committerAndreas Schwab2004-02-08 22:42:42 +0000
commit2df5044f341e44e2f2d3c7e1f164c3c0fcb48879 (patch)
tree56a74abaa5f4182c61f98521d47f9396497a8c85
parentc971696d040d9d7411a1ceeaf57e7c8e0ba490bf (diff)
downloademacs-2df5044f341e44e2f2d3c7e1f164c3c0fcb48879.tar.gz
emacs-2df5044f341e44e2f2d3c7e1f164c3c0fcb48879.zip
(with-vc-file): Fix unsafe uses of error.
(vc-cancel-version): Likewise.
-rw-r--r--lisp/vc.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index a4d941cff41..3c04dd98b9d 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1,13 +1,13 @@
1;;; vc.el --- drive a version-control system from within Emacs 1;;; vc.el --- drive a version-control system from within Emacs
2 2
3;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003 3;; Copyright (C) 1992,93,94,95,96,97,98,2000,01,2003,2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: FSF (see below for full credits) 6;; Author: FSF (see below for full credits)
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8;; Keywords: tools 8;; Keywords: tools
9 9
10;; $Id: vc.el,v 1.365 2004/01/23 11:20:55 uid65624 Exp $ 10;; $Id: vc.el,v 1.366 2004/02/07 00:37:13 uid65598 Exp $
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -804,11 +804,11 @@ somebody else, signal error."
804 (let ((filevar (make-symbol "file"))) 804 (let ((filevar (make-symbol "file")))
805 `(let ((,filevar (expand-file-name ,file))) 805 `(let ((,filevar (expand-file-name ,file)))
806 (or (vc-backend ,filevar) 806 (or (vc-backend ,filevar)
807 (error (format "File not under version control: `%s'" file))) 807 (error "File not under version control: `%s'" file))
808 (unless (vc-editable-p ,filevar) 808 (unless (vc-editable-p ,filevar)
809 (let ((state (vc-state ,filevar))) 809 (let ((state (vc-state ,filevar)))
810 (if (stringp state) 810 (if (stringp state)
811 (error (format "`%s' is locking `%s'" state ,filevar)) 811 (error "`%s' is locking `%s'" state ,filevar)
812 (vc-checkout ,filevar t)))) 812 (vc-checkout ,filevar t))))
813 (save-excursion 813 (save-excursion
814 ,@body) 814 ,@body)
@@ -2487,7 +2487,7 @@ A prefix argument NOREVERT means do not revert the buffer afterwards."
2487 ((not (vc-call latest-on-branch-p file)) 2487 ((not (vc-call latest-on-branch-p file))
2488 (error "This is not the latest version; VC cannot cancel it")) 2488 (error "This is not the latest version; VC cannot cancel it"))
2489 ((not (vc-up-to-date-p file)) 2489 ((not (vc-up-to-date-p file))
2490 (error (substitute-command-keys "File is not up to date; use \\[vc-revert-buffer] to discard changes")))) 2490 (error "%s" (substitute-command-keys "File is not up to date; use \\[vc-revert-buffer] to discard changes"))))
2491 (if (null (yes-or-no-p (format "Remove version %s from master? " target))) 2491 (if (null (yes-or-no-p (format "Remove version %s from master? " target)))
2492 (error "Aborted") 2492 (error "Aborted")
2493 (setq norevert (or norevert (not 2493 (setq norevert (or norevert (not