[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 64759ec 4/6: avy-jump.el (avi--overlay-offset): Add
From: |
Oleh Krehel |
Subject: |
[elpa] master 64759ec 4/6: avy-jump.el (avi--overlay-offset): Add |
Date: |
Thu, 16 Apr 2015 12:13:06 +0000 |
branch: master
commit 64759ec02ea0e02c7ec549be084b17050c990096
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy-jump.el (avi--overlay-offset): Add
* avy-jump.el (avi--overlay-offset): New defvar.
(avi--overlay): Use `avi--overlay-offset'. Bind it for better
flexibility.
For instance, the regex can be "[^ a-z][a-z]+". In that case, it might
be desirable to shift the overlay by one char.
---
avy-jump.el | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/avy-jump.el b/avy-jump.el
index 9503ee9..50c7fce 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -94,11 +94,15 @@ When PRED is non-nil, it's a filter for matching point
positions."
wnd) candidates))))
(nreverse candidates))))
+(defvar avi--overlay-offset 0
+ "The offset to apply in `avi--overlay'.")
+
(defun avi--overlay (str pt wnd)
"Create an overlay with STR at PT in WND."
- (let ((ol (make-overlay pt (1+ pt) (window-buffer wnd)))
- (old-str (with-selected-window wnd
- (buffer-substring pt (1+ pt)))))
+ (let* ((pt (+ pt avi--overlay-offset))
+ (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)))
- [elpa] master updated (f0c4778 -> cf04c93), Oleh Krehel, 2015/04/16
- [elpa] master 64759ec 4/6: avy-jump.el (avi--overlay-offset): Add,
Oleh Krehel <=
- [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, 2015/04/16