From 4589c25d96501323623df6810641e5a870bcc0ce Mon Sep 17 00:00:00 2001 From: Andrey Kotlarski Date: Tue, 7 May 2013 15:43:52 +0300 Subject: [PATCH] Return to current position after occur ending with quit. --- vlfi.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlfi.el b/vlfi.el index 8df22af..5c8dfe7 100644 --- a/vlfi.el +++ b/vlfi.el @@ -619,9 +619,9 @@ Prematurely ending indexing will still show what's found so far." (pos (point))) (vlfi-beginning-of-file) (goto-char (point-min)) - (vlfi-build-occur regexp) - (vlfi-move-to-chunk start-pos end-pos) - (goto-char pos))) + (unwind-protect (vlfi-build-occur regexp) + (vlfi-move-to-chunk start-pos end-pos) + (goto-char pos)))) (defun vlfi-build-occur (regexp) "Build occur style index for REGEXP."