[Top][All Lists]

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

[elpa] master 194dd68 30/40: Reimplemented loccur-no-highlight and fixed

From: Alexey Veretennikov
Subject: [elpa] master 194dd68 30/40: Reimplemented loccur-no-highlight and fixed checkdoc
Date: Fri, 29 Jan 2016 23:29:47 +0000

branch: master
commit 194dd688633069a1a28599b2a8d79e2e35ea4e77
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>

    Reimplemented loccur-no-highlight and fixed checkdoc
 loccur.el |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/loccur.el b/loccur.el
index 0a5bab5..a076a5d 100644
--- a/loccur.el
+++ b/loccur.el
@@ -109,7 +109,7 @@ a new window."
 Default: nil")
 (defcustom loccur-highlight-matching-regexp t
-  "If set to nil, the `loccur-mode' will not highlight matching words.
+  "If set to nil, do not highlight matching words.
 Default: t")
 (defvar loccur-history nil
@@ -135,6 +135,16 @@ Default: t")
   (loccur loccur-last-match))
+(defun loccur-no-highlight (regex)
+  "Perform search like loccur, but temporary removing match highlight.
+REGEX is regexp to search"
+  (interactive
+   (if loccur-mode
+       nil
+     (list (read-string "Loccur: " (loccur-prompt) 'loccur-history))))
+  (let ((loccur-highlight-matching-regexp nil))
+    (loccur regex)))
 (defun loccur (regex)
   "Perform a simple grep in current buffer.
@@ -291,7 +301,8 @@ containing match"
       (setq lines (nreverse lines)))))
 (defun loccur-toggle-highlight (&optional arg)
-  "Toggle the highlighting of the matches"
+  "Toggle the highlighting of the match.
+Optional argument ARG if t turn highlight on, off otherwise."
   (setq loccur-highlight-matching-regexp (not 
   (when loccur-mode

reply via email to

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