[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ea6f5c5 25/36: Customize how `avy-lead-face-0' is applied
From: |
Oleh Krehel |
Subject: |
[elpa] master ea6f5c5 25/36: Customize how `avy-lead-face-0' is applied |
Date: |
Tue, 19 May 2015 12:38:16 +0000 |
branch: master
commit ea6f5c5953fdb3c11c3d8828fa169a0928b5e092
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Customize how `avy-lead-face-0' is applied
* avy.el (avy-highlight-first): New defcustom. When non-nil, use
`avy-lead-face-0' even on terminal chars.
(avy--overlay-pre): Update.
(avy--overlay-at-full): Update.
(avy--overlay-post): Update.
Fixes #42
---
avy.el | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/avy.el b/avy.el
index 4e96866..637a339 100644
--- a/avy.el
+++ b/avy.el
@@ -374,13 +374,18 @@ When GROUP is non-nil, (BEG . END) should delimit that
regex group."
(overlay-put ol 'display (concat str old-str))
(push ol avy--overlays-lead))))
+(defcustom avy-highlight-first nil
+ "When non-nil highlight the first decision char with `avy-lead-face-0'.
+Do this even when the char is terminating."
+ :type 'boolean)
+
(defun avy--overlay-pre (path leaf)
"Create an overlay with PATH at LEAF.
PATH is a list of keys from tree root to LEAF.
LEAF is normally ((BEG . END) . WND)."
(let ((str (propertize (apply #'string (reverse path))
'face 'avy-lead-face)))
- (when (> (length str) 1)
+ (when (or avy-highlight-first (> (length str) 1))
(set-text-properties 0 1 '(face avy-lead-face-0) str))
(setq str (concat
(propertize avy-current-path
@@ -435,7 +440,7 @@ LEAF is normally ((BEG . END) . WND)."
(caar leaf)
(car leaf)))
(wnd (cdr leaf)))
- (when (> (length str) 1)
+ (when (or avy-highlight-first (> (length str) 1))
(set-text-properties 0 1 '(face avy-lead-face-0) str))
(with-selected-window wnd
(save-excursion
@@ -469,7 +474,7 @@ PATH is a list of keys from tree root to LEAF.
LEAF is normally ((BEG . END) . WND)."
(let ((str (propertize (apply #'string (reverse path))
'face 'avy-lead-face)))
- (when (> (length str) 1)
+ (when (or avy-highlight-first (> (length str) 1))
(set-text-properties 0 1 '(face avy-lead-face-0) str))
(setq str (concat
(propertize avy-current-path
- [elpa] master 60dd24b 12/36: Update avy-jump mentions in the README, (continued)
- [elpa] master 60dd24b 12/36: Update avy-jump mentions in the README, Oleh Krehel, 2015/05/19
- [elpa] master a08b049 04/36: Fix jumping to newlines with at-full style, Oleh Krehel, 2015/05/19
- [elpa] master eed8f6f 15/36: avy.el (avy--regex-candidates): Add optional group arg, Oleh Krehel, 2015/05/19
- [elpa] master 0d83599 16/36: Update group name, Oleh Krehel, 2015/05/19
- [elpa] master ca69b1f 14/36: Add debug declarations, Oleh Krehel, 2015/05/19
- [elpa] master a53ffb7 05/36: Allow to break from `avy-goto-line' into `goto-line', Oleh Krehel, 2015/05/19
- [elpa] master ca302b4 08/36: targets/avy-init.el: Move, Oleh Krehel, 2015/05/19
- [elpa] master b0512fc 21/36: avy.el (avy--overlay-at): Use `avy--overlay-offset', Oleh Krehel, 2015/05/19
- [elpa] master 04d26c4 07/36: avy-jump.el (avy-case-fold-search): New defcustom, Oleh Krehel, 2015/05/19
- [elpa] master b602a56 17/36: Stop 'at-full from shifting text, Oleh Krehel, 2015/05/19
- [elpa] master ea6f5c5 25/36: Customize how `avy-lead-face-0' is applied,
Oleh Krehel <=
- [elpa] master 8efed40 20/36: Add `avy-lead-face-1' for dimmed matched chars, Oleh Krehel, 2015/05/19
- [elpa] master 410c4ac 11/36: Merge avy-jump.el into avy.el, Oleh Krehel, 2015/05/19
- [elpa] master 7433f30 18/36: With 'at-full style, use full len to check for overlap, Oleh Krehel, 2015/05/19
- [elpa] master f0694a2 23/36: Remove empty line after original one being moved, Oleh Krehel, 2015/05/19
- [elpa] master 1127467 24/36: avy.el (avy-move-line): Use ARG lines, Oleh Krehel, 2015/05/19
- [elpa] master 2e936d8 10/36: avy-jump.el (avy-goto-word-or-subword-1): New command, Oleh Krehel, 2015/05/19
- [elpa] master e35f1ed 19/36: Use `avy-lead-face-0' for 'pre and 'post, Oleh Krehel, 2015/05/19
- [elpa] master a39f689 22/36: Allow all kinds of styles for `avy-goto-line', Oleh Krehel, 2015/05/19
- [elpa] master 92a7884 32/36: avy.el (avy-window-list): Fixup last commit, Oleh Krehel, 2015/05/19
- [elpa] master a4f4015 33/36: avy.el (avy--overlay-at-full): Check overlay window, Oleh Krehel, 2015/05/19