[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e35f1ed 19/36: Use `avy-lead-face-0' for 'pre and 'post
From: |
Oleh Krehel |
Subject: |
[elpa] master e35f1ed 19/36: Use `avy-lead-face-0' for 'pre and 'post |
Date: |
Tue, 19 May 2015 12:38:14 +0000 |
branch: master
commit e35f1ed51f56601938aeb0fd343798661fecfaf4
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Use `avy-lead-face-0' for 'pre and 'post
* avy.el (avy--overlay-pre): Update.
(avy--overlay-post): Update.
Re #38
---
avy.el | 54 ++++++++++++++++++++++++++++++------------------------
1 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/avy.el b/avy.el
index 229ce81..84a2c34 100644
--- a/avy.el
+++ b/avy.el
@@ -368,18 +368,21 @@ When GROUP is non-nil, (BEG . END) should delimit that
regex group."
"Create an overlay with PATH at LEAF.
PATH is a list of keys from tree root to LEAF.
LEAF is normally ((BEG . END) . WND)."
- (avy--overlay
- (propertize (apply #'string (reverse path))
- 'face 'avy-lead-face)
- (cond ((numberp leaf)
- leaf)
- ((consp (car leaf))
- (caar leaf))
- (t
- (car leaf)))
- (if (consp leaf)
- (cdr leaf)
- (selected-window))))
+ (let ((str (propertize (apply #'string (reverse path))
+ 'face 'avy-lead-face)))
+ (when (> (length str) 1)
+ (set-text-properties 0 1 '(face avy-lead-face-0) str))
+ (avy--overlay
+ str
+ (cond ((numberp leaf)
+ leaf)
+ ((consp (car leaf))
+ (caar leaf))
+ (t
+ (car leaf)))
+ (if (consp leaf)
+ (cdr leaf)
+ (selected-window)))))
(defun avy--overlay-at (path leaf)
"Create an overlay with PATH at LEAF.
@@ -449,18 +452,21 @@ LEAF is normally ((BEG . END) . WND)."
"Create an overlay with PATH at LEAF.
PATH is a list of keys from tree root to LEAF.
LEAF is normally ((BEG . END) . WND)."
- (avy--overlay
- (propertize (apply #'string (reverse path))
- 'face 'avy-lead-face)
- (cond ((numberp leaf)
- leaf)
- ((consp (car leaf))
- (cdar leaf))
- (t
- (car leaf)))
- (if (consp leaf)
- (cdr leaf)
- (selected-window))))
+ (let ((str (propertize (apply #'string (reverse path))
+ 'face 'avy-lead-face)))
+ (when (> (length str) 1)
+ (set-text-properties 0 1 '(face avy-lead-face-0) str))
+ (avy--overlay
+ str
+ (cond ((numberp leaf)
+ leaf)
+ ((consp (car leaf))
+ (cdar leaf))
+ (t
+ (car leaf)))
+ (if (consp leaf)
+ (cdr leaf)
+ (selected-window)))))
(defun avy--style-fn (style)
"Transform STYLE symbol to a style function."
- [elpa] master b0512fc 21/36: avy.el (avy--overlay-at): Use `avy--overlay-offset', (continued)
- [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, 2015/05/19
- [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 <=
- [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
- [elpa] master dc06220 29/36: Fix the at-full style interaction with tabs, Oleh Krehel, 2015/05/19
- [elpa] master b288c69 31/36: make compile should run checkdoc, Oleh Krehel, 2015/05/19
- [elpa] master 199c526 35/36: Bump version, Oleh Krehel, 2015/05/19
- [elpa] master 4b4b7b4 28/36: README.md: Add a link to the wiki for defcustoms, Oleh Krehel, 2015/05/19
- [elpa] master be74714 34/36: avy.el (avy--overlay-at-full): Work-around 20607, Oleh Krehel, 2015/05/19
- [elpa] master d6b741b 30/36: Allow for all operations to work across frames, Oleh Krehel, 2015/05/19
- [elpa] master 50cfc74 27/36: Fixup the last commit and add contribution guidelines, Oleh Krehel, 2015/05/19