branch: elpa/isl
commit b1985fc623a8fc54a5402d9a6b7cf1d22bdd704a
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Move cleanup code inside a function
---
isearch-light.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/isearch-light.el b/isearch-light.el
index 6c71feb5958..4e688730cb8 100644
--- a/isearch-light.el
+++ b/isearch-light.el
@@ -328,11 +328,14 @@ appended at end."
(condition-case-unless-debug nil
(unwind-protect
(isl-read-from-minibuffer "Search: ")
- (isl-delete-overlays)
- (setq mode-line-format (default-value 'mode-line-format)
- isl--yank-point nil
- isl-search-function (default-value 'isl-search-function)))
+ (isl-cleanup))
(quit (goto-char isl-initial-pos))))
+
+(defun isl-cleanup ()
+ (isl-delete-overlays)
+ (setq mode-line-format (default-value 'mode-line-format)
+ isl--yank-point nil
+ isl-search-function (default-value 'isl-search-function)))
;;;###autoload
(defun isl ()