emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master e9b1e69 3/6: Refactor.


From: Alexey Veretennikov
Subject: [elpa] master e9b1e69 3/6: Refactor.
Date: Mon, 26 Dec 2016 14:14:36 +0000 (UTC)

branch: master
commit e9b1e69f1df22b39105ae15c1c7b9d5e54f366ca
Author: mookid <address@hidden>
Commit: mookid <address@hidden>

    Refactor.
---
 loccur.el |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/loccur.el b/loccur.el
index c48ce3e..2b4c543 100644
--- a/loccur.el
+++ b/loccur.el
@@ -174,11 +174,12 @@ When called interactively, either prompts the user for 
REGEXP or,
 when called with an active region, uses the content of the
 region."
   (interactive
-   (if (region-active-p)
-       (list (buffer-substring (mark) (point)))
-     (if loccur-mode
-         (list nil)
-       (list (read-string "Loccur: " (loccur-prompt) 'loccur-history)))))
+   (cond ((region-active-p)
+          (list (buffer-substring (mark) (point))))
+         (loccur-mode
+          (list nil))
+         (t
+          (list (read-string "Loccur: " (loccur-prompt) 'loccur-history)))))
   (when (region-active-p) (deactivate-mark))
   (if (or loccur-mode
           (= (length regex) 0))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]