[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 42/77: Must reference the actual object in easy-kill-candidate
From: |
Leo Liu |
Subject: |
[elpa] 42/77: Must reference the actual object in easy-kill-candidate |
Date: |
Sat, 05 Apr 2014 04:08:19 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit d10686871536575a6dbb78288309aed2da83d050
Author: Leo Liu <address@hidden>
Date: Sat Oct 12 12:00:53 2013 +0800
Must reference the actual object in easy-kill-candidate
because this-command may set easy-kill-candidate to something else.
---
easy-kill.el | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/easy-kill.el b/easy-kill.el
index fcfae02..286d138 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -167,13 +167,13 @@ candidate property instead."
(defun easy-kill-destroy-candidate ()
(let ((hook (make-symbol "easy-kill-destroy-candidate")))
- (fset hook (lambda ()
- (when easy-kill-candidate
- (let ((i (overlay-get easy-kill-candidate
'origin-indicator)))
- (and (overlayp i) (delete-overlay i)))
- (delete-overlay easy-kill-candidate))
- (setq easy-kill-candidate nil)
- (remove-hook 'post-command-hook hook)))
+ (fset hook `(lambda ()
+ (let ((o ,easy-kill-candidate))
+ (when o
+ (let ((i (overlay-get o 'origin-indicator)))
+ (and (overlayp i) (delete-overlay i)))
+ (delete-overlay o)))
+ (remove-hook 'post-command-hook ',hook)))
(add-hook 'post-command-hook hook)))
(defun easy-kill-expand ()
- [elpa] 35/77: Doc fix and release v0.8.0, (continued)
- [elpa] 35/77: Doc fix and release v0.8.0, Leo Liu, 2014/04/05
- [elpa] 36/77: New variable easy-kill-base-map for customising key bindings, Leo Liu, 2014/04/05
- [elpa] 33/77: Support append kill for append-next-kill and easy-kill, Leo Liu, 2014/04/05
- [elpa] 34/77: Better support for defining commands that exit easy-kill, Leo Liu, 2014/04/05
- [elpa] 30/77: Merge pull request #6 from knu/usage-remap, Leo Liu, 2014/04/05
- [elpa] 32/77: Improve easy-kill-bounds-of-list, Leo Liu, 2014/04/05
- [elpa] 37/77: Make easy-kill-backward-up work better when in strings, Leo Liu, 2014/04/05
- [elpa] 38/77: Fix #3: Add command easy-mark for marking, Leo Liu, 2014/04/05
- [elpa] 39/77: Fix doc and buglets in last change, Leo Liu, 2014/04/05
- [elpa] 40/77: Some improvements based on comments in #3, Leo Liu, 2014/04/05
- [elpa] 42/77: Must reference the actual object in easy-kill-candidate,
Leo Liu <=
- [elpa] 43/77: Add new command easy-mark-sexp, Leo Liu, 2014/04/05
- [elpa] 41/77: Tell easy-kill-append to deactivate-mark, Leo Liu, 2014/04/05
- [elpa] 44/77: Fix #7: Add new command easy-kill-abort for key C-g, Leo Liu, 2014/04/05
- [elpa] 45/77: Better origin indicator by easy-kill-indicate-origin, Leo Liu, 2014/04/05
- [elpa] 46/77: Teach easy-kill-abort to deactivate mark immediately, Leo Liu, 2014/04/05
- [elpa] 47/77: Doc fix and small tweaks, Leo Liu, 2014/04/05
- [elpa] 49/77: Work with `sexp' and `list' in nxml mode, Leo Liu, 2014/04/05
- [elpa] 52/77: Use filter-buffer-substring, Leo Liu, 2014/04/05
- [elpa] 51/77: Fix quoting error in face definitions, Leo Liu, 2014/04/05
- [elpa] 50/77: Fix last change to easy-kill-backward-up, Leo Liu, 2014/04/05