[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 58/77: Emacs 24.x compatibility
From: |
Leo Liu |
Subject: |
[elpa] 58/77: Emacs 24.x compatibility |
Date: |
Sat, 05 Apr 2014 04:08:24 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit b49c2f114cd8b7454c7cc6f2bae789aa346f2948
Author: Leo Liu <address@hidden>
Date: Thu Oct 17 15:01:02 2013 +0800
Emacs 24.x compatibility
---
easy-kill.el | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/easy-kill.el b/easy-kill.el
index 1728f41..1d10ea9 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -44,6 +44,29 @@
(eval-when-compile (require 'cl))
(require 'thingatpt)
+(eval-and-compile
+ (or (fboundp 'set-temporary-overlay-map) ; new in 24.3
+ (defun set-temporary-overlay-map (map &optional keep-pred)
+ (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map"))
+ (overlaysym (make-symbol "t"))
+ (alist (list (cons overlaysym map)))
+ (clearfun
+ `(lambda ()
+ (unless ,(cond ((null keep-pred) nil)
+ ((eq t keep-pred)
+ `(eq this-command
+ (lookup-key ',map
+
(this-command-keys-vector))))
+ (t `(funcall ',keep-pred)))
+ (set ',overlaysym nil) ;Just in case.
+ (remove-hook 'pre-command-hook ',clearfunsym)
+ (setq emulation-mode-map-alists
+ (delq ',alist emulation-mode-map-alists))))))
+ (set overlaysym overlaysym)
+ (fset clearfunsym clearfun)
+ (add-hook 'pre-command-hook clearfunsym)
+ (push alist emulation-mode-map-alists)))))
+
(defcustom easy-kill-alist
'((?w . word)
(?s . sexp)
- [elpa] 45/77: Better origin indicator by easy-kill-indicate-origin, (continued)
- [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
- [elpa] 55/77: Fix easy-kill-backward-down to handle prefix chars, Leo Liu, 2014/04/05
- [elpa] 48/77: Make command easy-kill-append work for easy-mark, Leo Liu, 2014/04/05
- [elpa] 57/77: Fix to always display the string candidate, Leo Liu, 2014/04/05
- [elpa] 58/77: Emacs 24.x compatibility,
Leo Liu <=
- [elpa] 53/77: Destroy after-string before goto-char in easy-kill-abort, Leo Liu, 2014/04/05
- [elpa] 54/77: Better control of message emission in an easy-kill session, Leo Liu, 2014/04/05
- [elpa] 63/77: Teach easy-kill-activate-keymap to handle command remapping, Leo Liu, 2014/04/05
- [elpa] 59/77: Doc fix, Leo Liu, 2014/04/05
- [elpa] 64/77: Teach easy-kill to handle rectangle-mark from Emacs trunk, Leo Liu, 2014/04/05
- [elpa] 56/77: Doc fix and release v0.9.0, Leo Liu, 2014/04/05
- [elpa] 61/77: Optimise easy-kill-thing-forward when n is 0, Leo Liu, 2014/04/05
- [elpa] 62/77: Small tweak to easy-kill-on-nxml-element, Leo Liu, 2014/04/05
- [elpa] 60/77: Make easy-kill-on-buffer-file-name do nothing in easy-mark, Leo Liu, 2014/04/05
- [elpa] 68/77: Fix easy-kill-append to update clipboard, Leo Liu, 2014/04/05