branch: externals/vlf
commit 563d9ca42377f2b477b5c2227d450c899c97ed5d
Author: Andrey Kotlarski <[email protected]>
Commit: Andrey Kotlarski <[email protected]>
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)