Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ee91bfdf
Commit
ee91bfdf
authored
May 23, 2008
by
Stefan Monnier
Browse files
(vc-delete-file): Don't try to resynch the buffer.
parent
a3507bd3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/vc.el
lisp/vc.el
+8
-7
No files found.
lisp/ChangeLog
View file @
ee91bfdf
2008-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
* vc.el (vc-delete-file): Don't try to resynch the buffer.
2008-05-23 Paul R <paul.r.ml@gmail.com>
* textmodes/reftex-vars.el (reftex-extra-bindings-prefix): New var.
...
...
lisp/vc.el
View file @
ee91bfdf
...
...
@@ -547,6 +547,8 @@
;;; Todo:
;; - Add key-binding for vc-delete-file.
;;;; New Primitives:
;;
;; - deal with push/pull operations.
...
...
@@ -587,7 +589,7 @@
;;;; Internal cleanups:
;;
;; - backends that care about vc-stay-local should try to take it into
;; account for vc-dir. Is this likely to be useful???
;; account for vc-dir. Is this likely to be useful???
YES!
;;
;; - vc-expand-dirs should take a backend parameter and only look for
;; files managed by that backend.
...
...
@@ -2437,17 +2439,16 @@ backend to NEW-BACKEND, and unregister FILE from the current backend.
(
not
(
file-exists-p
file
)))
(
with-current-buffer
(
or
buf
(
find-file-noselect
file
))
(
let
((
backup-inhibited
nil
))
(
backup-buffer
))
;; If we didn't have a buffer visiting the file before this
;; command, kill the buffer created by the above
;; `find-file-noselect' call.
(
unless
buf
(
kill-buffer
(
current-buffer
)))))
(
backup-buffer
))))
(
vc-call-backend
backend
'delete-file
file
)
;; If the backend hasn't deleted the file itself, let's do it for him.
(
when
(
file-exists-p
file
)
(
delete-file
file
))
;; Forget what VC knew about the file.
(
vc-file-clearprops
file
)
(
vc-resynch-buffer
file
buf
t
)))
;; Since we've deleted the file and we've made sure the buffer had no
;; unsaved changes, we can kill the buffer. Much easier than trying to
;; properly refresh its VC state.
(
when
buf
(
kill-buffer
buf
))))
;;;###autoload
(
defun
vc-rename-file
(
old
new
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment