From 563d9ca42377f2b477b5c2227d450c899c97ed5d Mon Sep 17 00:00:00 2001 From: Andrey Kotlarski Date: Tue, 6 Aug 2013 02:13:01 +0300 Subject: [PATCH] Fix vlfi-revert to revert on user confirmation. --- vlfi.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/vlfi.el b/vlfi.el index 4e603a2..80a2287 100644 --- a/vlfi.el +++ b/vlfi.el @@ -225,13 +225,12 @@ With FROM-END prefix, start from the back." (interactive) (vlfi-insert-file t)) -(defun vlfi-revert (&optional ignore-auto noconfirm) - "Revert current chunk. Ignore IGNORE-AUTO. +(defun vlfi-revert (&optional _ignore-auto noconfirm) + "Revert current chunk. Ignore _IGNORE-AUTO. Ask for confirmation if NOCONFIRM is nil." - (ignore ignore-auto) - (or noconfirm - (yes-or-no-p (format "Revert buffer from file %s? " - buffer-file-name)) + (if (or noconfirm + (yes-or-no-p (format "Revert buffer from file %s? " + buffer-file-name))) (vlfi-move-to-chunk vlfi-start-pos vlfi-end-pos))) (defun vlfi-jump-to-chunk (n)