emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc.el,v


From: Sam Steingold
Subject: [Emacs-diffs] Changes to emacs/lisp/vc.el,v
Date: Thu, 01 May 2008 17:46:30 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Sam Steingold <sds>     08/05/01 17:46:28

Index: vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.601
retrieving revision 1.602
diff -u -b -r1.601 -r1.602
--- vc.el       1 May 2008 16:40:14 -0000       1.601
+++ vc.el       1 May 2008 17:46:27 -0000       1.602
@@ -672,9 +672,6 @@
 ;; - vc-cvs-delete-file should not do a "cvs commit" immediately after
 ;;   removing the file.
 ;;
-;; - vc-delete-file should check if the file contains non-checked in
-;;   changes and warn about losing them.
-;;
 ;; - vc-create-snapshot and vc-retrieve-snapshot should update the
 ;;   buffers that might be visiting the affected files.
 ;;
@@ -2998,6 +2995,9 @@
     (define-key map "x" 'vc-dir-hide-up-to-date)
     (define-key map "q" 'quit-window)
     (define-key map "g" 'vc-dir-refresh)
+    ;; PCL-CVS binds "r" to the delete function, but dann objects to ANY 
binding
+    ;; <http://thread.gmane.org/gmane.emacs.devel/96234>
+    ;; (define-key map "D" 'vc-dir-delete-file)
     (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process)
     ;; Does not work unless mouse sets point.  Functions like vc-dir-find-file
     ;; need to find the file from the mouse position, not `point'.
@@ -4037,7 +4037,12 @@
     (unless (vc-find-backend-function backend 'delete-file)
       (error "Deleting files under %s is not supported in VC" backend))
     (when (and buf (buffer-modified-p buf))
-      (error "Please save files before deleting them"))
+      (error "Please save or undo your changes before deleting %s" file))
+    (let ((state (vc-state file)))
+      (when (eq state 'edited)
+        (error "Please commit or undo your changes before deleting %s" file))
+      (when (eq state 'conflict)
+        (error "Please resolve the conflicts before deleting %s" file)))
     (unless (y-or-n-p (format "Really want to delete %s? "
                              (file-name-nondirectory file)))
       (error "Abort!"))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]