diff options
| author | Sam Steingold | 2008-04-30 16:58:15 +0000 |
|---|---|---|
| committer | Sam Steingold | 2008-04-30 16:58:15 +0000 |
| commit | 775237d3a1bdf71ada8505b9d89a11fe17f71ceb (patch) | |
| tree | dd1da64bdf6dcf5733426d023f322f1d88d89198 /lisp | |
| parent | cea6009118c9b5d5d76f81598b214f227464b48f (diff) | |
| download | emacs-775237d3a1bdf71ada8505b9d89a11fe17f71ceb.tar.gz emacs-775237d3a1bdf71ada8505b9d89a11fe17f71ceb.zip | |
(vc-dir-mode-map): Bind "d" to vc-dir-delete-file.
(vc-dir-delete-file): Add.
(vc-delete-file): Do not barf when the file has been already deleted.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/vc.el | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cce6cee7a71..3cedeca41d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-04-30 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * vc.el (vc-dir-mode-map): Bind "d" to vc-dir-delete-file. | ||
| 4 | (vc-dir-delete-file): Add. | ||
| 5 | (vc-delete-file): Do not barf when the file has been already deleted. | ||
| 6 | |||
| 1 | 2008-04-30 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2008-04-30 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * emacs-lisp/lisp-mode.el (lisp-mode-map): Add menu. | 9 | * emacs-lisp/lisp-mode.el (lisp-mode-map): Add menu. |
diff --git a/lisp/vc.el b/lisp/vc.el index 33148db22df..764e52f7066 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2985,6 +2985,7 @@ specific headers." | |||
| 2985 | (define-key map "x" 'vc-dir-hide-up-to-date) | 2985 | (define-key map "x" 'vc-dir-hide-up-to-date) |
| 2986 | (define-key map "q" 'quit-window) | 2986 | (define-key map "q" 'quit-window) |
| 2987 | (define-key map "g" 'vc-dir-refresh) | 2987 | (define-key map "g" 'vc-dir-refresh) |
| 2988 | (define-key map "d" 'vc-dir-delete-file) | ||
| 2988 | (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) | 2989 | (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) |
| 2989 | ;; Does not work unless mouse sets point. Functions like vc-dir-find-file | 2990 | ;; Does not work unless mouse sets point. Functions like vc-dir-find-file |
| 2990 | ;; need to find the file from the mouse position, not `point'. | 2991 | ;; need to find the file from the mouse position, not `point'. |
| @@ -3553,6 +3554,12 @@ that share the same state." | |||
| 3553 | (mapc 'vc-register (or (vc-dir-marked-files) | 3554 | (mapc 'vc-register (or (vc-dir-marked-files) |
| 3554 | (list (vc-dir-current-file))))) | 3555 | (list (vc-dir-current-file))))) |
| 3555 | 3556 | ||
| 3557 | (defun vc-dir-delete-file () | ||
| 3558 | "Delete the marked files, or the current file if no marks." | ||
| 3559 | (interactive) | ||
| 3560 | (mapc 'vc-delete-file (or (vc-dir-marked-files) | ||
| 3561 | (list (vc-dir-current-file))))) | ||
| 3562 | |||
| 3556 | (defun vc-dir-show-fileentry (file) | 3563 | (defun vc-dir-show-fileentry (file) |
| 3557 | "Insert an entry for a specific file into the current VC status listing. | 3564 | "Insert an entry for a specific file into the current VC status listing. |
| 3558 | This is typically used if the file is up-to-date (or has been added | 3565 | This is typically used if the file is up-to-date (or has been added |
| @@ -4022,7 +4029,8 @@ backend to NEW-BACKEND, and unregister FILE from the current backend. | |||
| 4022 | (unless (y-or-n-p (format "Really want to delete %s? " | 4029 | (unless (y-or-n-p (format "Really want to delete %s? " |
| 4023 | (file-name-nondirectory file))) | 4030 | (file-name-nondirectory file))) |
| 4024 | (error "Abort!")) | 4031 | (error "Abort!")) |
| 4025 | (unless (or (file-directory-p file) (null make-backup-files)) | 4032 | (unless (or (file-directory-p file) (null make-backup-files) |
| 4033 | (not (file-exists-p file))) | ||
| 4026 | (with-current-buffer (or buf (find-file-noselect file)) | 4034 | (with-current-buffer (or buf (find-file-noselect file)) |
| 4027 | (let ((backup-inhibited nil)) | 4035 | (let ((backup-inhibited nil)) |
| 4028 | (backup-buffer)) | 4036 | (backup-buffer)) |