Only ask to abort when buffer is modified.

This commit is contained in:
Phil Jackson 2010-05-31 20:59:24 +01:00
parent 243de6b58c
commit c2c15b67c4

View file

@ -133,7 +133,8 @@ current line down."
"Abort this rebase (by emptying the buffer, saving and closing
server connection)."
(interactive)
(when (y-or-n-p "Abort this rebase? ")
(when (or (not (buffer-modified-p))
(y-or-n-p "Abort this rebase? "))
(let ((buffer-read-only nil))
(delete-region (point-min) (point-max))
(save-buffer)