summaryrefslogtreecommitdiff
path: root/lisp/vc/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r--lisp/vc/diff-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 7ffa115bde4..a7ac53953dd 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -671,7 +671,7 @@ If the prefix ARG is given, restrict the view to the current file instead."
(inhibit-read-only t))
(apply 'kill-region bounds)
(goto-char (car bounds))
- (diff-beginning-of-hunk t)))
+ (ignore-errors (diff-beginning-of-hunk t))))
(defun diff-beginning-of-file-and-junk ()
"Go to the beginning of file-related diff-info.
@@ -723,9 +723,10 @@ data such as \"Index: ...\" and such."
(defun diff-file-kill ()
"Kill current file's hunks."
(interactive)
+ (diff-beginning-of-hunk t)
(let ((inhibit-read-only t))
(apply 'kill-region (diff-bounds-of-file)))
- (diff-beginning-of-hunk t))
+ (ignore-errors (diff-beginning-of-hunk t)))
(defun diff-kill-junk ()
"Kill spurious empty diffs."