[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master c581478 3/6: avy-jump.el (avi--overlay-at): New overlay st
From: |
Oleh Krehel |
Subject: |
[elpa] master c581478 3/6: avy-jump.el (avi--overlay-at): New overlay style |
Date: |
Thu, 16 Apr 2015 12:13:05 +0000 |
branch: master
commit c581478c2434bcbfb9567a39f16aab2e07be3c59
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy-jump.el (avi--overlay-at): New overlay style
---
avy-jump.el | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/avy-jump.el b/avy-jump.el
index 7419319..9503ee9 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -118,6 +118,28 @@ LEAF is ((BEG . END) . WND)."
(car leaf))
(cdr leaf)))
+(defun avi--overlay-at (path leaf)
+ "Create an overlay with STR at LEAF.
+PATH is a list of keys from tree root to LEAF.
+LEAF is ((BEG . END) . WND)."
+ (let ((str (propertize
+ (string (car (last path)))
+ 'face 'avi-lead-face))
+ (pt (if (consp (car leaf))
+ (caar leaf)
+ (car leaf)))
+ (wnd (cdr leaf)))
+ (let ((ol (make-overlay pt (1+ pt)
+ (window-buffer wnd)))
+ (old-str (with-selected-window wnd
+ (buffer-substring pt (1+ pt)))))
+ (when avi-background
+ (setq old-str (propertize
+ old-str 'face 'aw-background-face)))
+ (overlay-put ol 'window wnd)
+ (overlay-put ol 'display str)
+ (push ol aw-overlays-lead))))
+
(defun avi--overlay-post (path leaf)
"Create an overlay with STR at LEAF.
PATH is a list of keys from tree root to LEAF.
- [elpa] master updated (f0c4778 -> cf04c93), Oleh Krehel, 2015/04/16
- [elpa] master 64759ec 4/6: avy-jump.el (avi--overlay-offset): Add, Oleh Krehel, 2015/04/16
- [elpa] master 1273871 2/6: avy-jump.el (avi--regex-candidates): Allow for a predicate, Oleh Krehel, 2015/04/16
- [elpa] master d592e36 5/6: ace-window.el (aw--lead-overlay): Work around args-out-of-range, Oleh Krehel, 2015/04/16
- [elpa] master e7e8ee2 1/6: ace-window.el: Update comments, Oleh Krehel, 2015/04/16
- [elpa] master cf04c93 6/6: Merge commit 'd592e36f33ac7e1fece462c5b7157f330c732630' from ace-window, Oleh Krehel, 2015/04/16
- [elpa] master c581478 3/6: avy-jump.el (avi--overlay-at): New overlay style,
Oleh Krehel <=