mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 21:33:05 +00:00
Use `avy-lead-face-0' for 'pre and 'post
* avy.el (avy--overlay-pre): Update. (avy--overlay-post): Update. Re #38
This commit is contained in:
parent
7433f309a7
commit
e35f1ed51f
18
avy.el
18
avy.el
@ -368,9 +368,12 @@ When GROUP is non-nil, (BEG . END) should delimit that regex group."
|
|||||||
"Create an overlay with PATH at LEAF.
|
"Create an overlay with PATH at LEAF.
|
||||||
PATH is a list of keys from tree root to LEAF.
|
PATH is a list of keys from tree root to LEAF.
|
||||||
LEAF is normally ((BEG . END) . WND)."
|
LEAF is normally ((BEG . END) . WND)."
|
||||||
|
(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
|
(avy--overlay
|
||||||
(propertize (apply #'string (reverse path))
|
str
|
||||||
'face 'avy-lead-face)
|
|
||||||
(cond ((numberp leaf)
|
(cond ((numberp leaf)
|
||||||
leaf)
|
leaf)
|
||||||
((consp (car leaf))
|
((consp (car leaf))
|
||||||
@ -379,7 +382,7 @@ LEAF is normally ((BEG . END) . WND)."
|
|||||||
(car leaf)))
|
(car leaf)))
|
||||||
(if (consp leaf)
|
(if (consp leaf)
|
||||||
(cdr leaf)
|
(cdr leaf)
|
||||||
(selected-window))))
|
(selected-window)))))
|
||||||
|
|
||||||
(defun avy--overlay-at (path leaf)
|
(defun avy--overlay-at (path leaf)
|
||||||
"Create an overlay with PATH at LEAF.
|
"Create an overlay with PATH at LEAF.
|
||||||
@ -449,9 +452,12 @@ LEAF is normally ((BEG . END) . WND)."
|
|||||||
"Create an overlay with PATH at LEAF.
|
"Create an overlay with PATH at LEAF.
|
||||||
PATH is a list of keys from tree root to LEAF.
|
PATH is a list of keys from tree root to LEAF.
|
||||||
LEAF is normally ((BEG . END) . WND)."
|
LEAF is normally ((BEG . END) . WND)."
|
||||||
|
(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
|
(avy--overlay
|
||||||
(propertize (apply #'string (reverse path))
|
str
|
||||||
'face 'avy-lead-face)
|
|
||||||
(cond ((numberp leaf)
|
(cond ((numberp leaf)
|
||||||
leaf)
|
leaf)
|
||||||
((consp (car leaf))
|
((consp (car leaf))
|
||||||
@ -460,7 +466,7 @@ LEAF is normally ((BEG . END) . WND)."
|
|||||||
(car leaf)))
|
(car leaf)))
|
||||||
(if (consp leaf)
|
(if (consp leaf)
|
||||||
(cdr leaf)
|
(cdr leaf)
|
||||||
(selected-window))))
|
(selected-window)))))
|
||||||
|
|
||||||
(defun avy--style-fn (style)
|
(defun avy--style-fn (style)
|
||||||
"Transform STYLE symbol to a style function."
|
"Transform STYLE symbol to a style function."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user