[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d08fdac 36/40: Updated README and rearranged functions.
From: |
Alexey Veretennikov |
Subject: |
[elpa] master d08fdac 36/40: Updated README and rearranged functions. |
Date: |
Fri, 29 Jan 2016 23:29:52 +0000 |
branch: master
commit d08fdac495552f3dc70e671f4c14ac0863abae27
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>
Updated README and rearranged functions.
---
README.md | 16 +++++++++++++++-
loccur.el | 20 ++++++++++----------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 5cba2b3..cea09cd 100644
--- a/README.md
+++ b/README.md
@@ -33,4 +33,18 @@ To use it, add the following to your .emacs file:
(define-key global-map [(control shift o)] 'loccur-previous-match)
```
-Now you can point the cursor to the word and press `Ctrl+o` to hide all lines
except those containing this word. Moving cursor to the required line and
pressing `Ctrl+o` again will shows all the text. The good thing about this mode
is what you can navigate through the buffer easily. `Ctrl+Shift+o` will repeat
last search.
+Now you can point the cursor to the word and press `Ctrl+o` to hide all lines
except those containing this word. Moving cursor to the required line and
pressing `Ctrl+o` again will shows all the text. The good thing about this mode
is what you can navigate through the buffer easily. `Ctrl+Shift+o` will repeat
last search.
+
+### Available commands
+Below is the list of interactive commands available for user:
+
+* `loccur` interactively asks user for regexp to search or toggle search off
(if `loccur-mode` is already enabled)
+* `loccur-current` searches for the current word under the cursor
+* `loccur-previous-match` repeat previous `loccur` command
+* `loccur-no-highlight` is the same as `loccur` but not highlighting matches
+* `loccur-toggle-highlight` toggles highlighting of matches
+
+### Customization
+* `loccur-jump-beginning-of-line` variable specifies if move the cursor to the
beginning of the matching line. Default `nil`
+* `loccur-highlight-matching-regexp` variable whenever `loccur` should
highlight matching words. Default `t`.
+* `loccur-face` face to be used while highlighting. Default points to
`isearch` face.
diff --git a/loccur.el b/loccur.el
index a59d406..9b110b0 100644
--- a/loccur.el
+++ b/loccur.el
@@ -154,6 +154,16 @@ REGEX is regexp to search"
(let ((loccur-highlight-matching-regexp nil))
(loccur regex)))
+(defun loccur-toggle-highlight (&optional arg)
+ "Toggle the highlighting of the match.
+Optional argument ARG if t turn highlight on, off otherwise."
+ (interactive)
+ (setq loccur-highlight-matching-regexp (not
loccur-highlight-matching-regexp))
+ (when loccur-mode
+ (dolist (ovl loccur-overlay-list)
+ (when (overlay-get ovl loccur-overlay-visible-property-name)
+ (overlay-put ovl 'face (if loccur-highlight-matching-regexp
'loccur-face nil))))))
+
(defun loccur (regex)
"Perform a simple grep in current buffer.
@@ -181,7 +191,6 @@ unhides lines again"
(beginning-of-line))))) ; optionally jump to the beginning of line
-
(defun loccur-prompt ()
"Return the default value of the prompt.
@@ -310,15 +319,6 @@ containing match"
(forward-line 1))
(setq lines (nreverse lines)))))
-(defun loccur-toggle-highlight (&optional arg)
- "Toggle the highlighting of the match.
-Optional argument ARG if t turn highlight on, off otherwise."
- (interactive)
- (setq loccur-highlight-matching-regexp (not
loccur-highlight-matching-regexp))
- (when loccur-mode
- (dolist (ovl loccur-overlay-list)
- (when (overlay-get ovl loccur-overlay-visible-property-name)
- (overlay-put ovl 'face (if loccur-highlight-matching-regexp
'loccur-face nil))))))
- [elpa] master f95c8d6 28/40: Preparation to move to GNU ELPA., (continued)
- [elpa] master f95c8d6 28/40: Preparation to move to GNU ELPA., Alexey Veretennikov, 2016/01/29
- [elpa] master 359fae1 25/40: Preparation to move to GNU ELPA., Alexey Veretennikov, 2016/01/29
- [elpa] master 194dd68 30/40: Reimplemented loccur-no-highlight and fixed checkdoc, Alexey Veretennikov, 2016/01/29
- [elpa] master 66a9810 32/40: Merge pull request #3 from syohex/group, Alexey Veretennikov, 2016/01/29
- [elpa] master e5d1061 31/40: Define group for customize and fixing byte-compile warnings, Alexey Veretennikov, 2016/01/29
- [elpa] master 2680df7 34/40: Fixed bug when loccur called with empty argument., Alexey Veretennikov, 2016/01/29
- [elpa] master 59b8dd1 29/40: Implemented removed features and added face loccur-face, Alexey Veretennikov, 2016/01/29
- [elpa] master 2cacc68 33/40: Added types to custom, Alexey Veretennikov, 2016/01/29
- [elpa] master 61dcaaf 37/40: Removed redundand code, Alexey Veretennikov, 2016/01/29
- [elpa] master 03789fa 35/40: Updated README, Alexey Veretennikov, 2016/01/29
- [elpa] master d08fdac 36/40: Updated README and rearranged functions.,
Alexey Veretennikov <=
- [elpa] master aae3563 27/40: Preparation to move to GNU ELPA., Alexey Veretennikov, 2016/01/29
- [elpa] master fb1fbc0 39/40: Fixed compilation warnings., Alexey Veretennikov, 2016/01/29
- [elpa] master a90bd54 38/40: Preparation to submission to GNU ELPA, Alexey Veretennikov, 2016/01/29
- [elpa] master 8f6fe36 40/40: Add 'packages/loccur/' from commit 'fb1fbc0ff5da7a8b117542ab8083d29cd79e12b2', Alexey Veretennikov, 2016/01/29