[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 12/77: Tweak the definition of thing `region'
From: |
Leo Liu |
Subject: |
[elpa] 12/77: Tweak the definition of thing `region' |
Date: |
Sat, 05 Apr 2014 04:08:12 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 24f5de6ae99ad318b11df786060b63be1172e9c5
Author: Leo Liu <address@hidden>
Date: Mon Oct 7 13:03:03 2013 +0800
Tweak the definition of thing `region'
---
easy-kill.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/easy-kill.el b/easy-kill.el
index 5861d09..1a30d10 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -197,9 +197,7 @@ candidate property instead."
(overlay-put o 'priority 999)
o))
(setq deactivate-mark t)
- (dolist (thing (if (use-region-p)
- '(region url email line)
- '(url email line)))
+ (dolist (thing '(region url email line))
(easy-kill-thing thing n)
(when (overlay-get easy-kill-candidate 'thing)
(return)))
@@ -208,7 +206,9 @@ candidate property instead."
;;; Extended things
(put 'region 'bounds-of-thing-at-point
- (lambda () (cons (region-beginning) (region-end))))
+ (lambda ()
+ (when (use-region-p)
+ (cons (region-beginning) (region-end)))))
(defun easy-kill-on-buffer-file-name (n)
"Get `buffer-file-name' or `default-directory'.
- [elpa] 03/77: Fix error: wrong-type-argument number-or-marker-p nil, (continued)
- [elpa] 03/77: Fix error: wrong-type-argument number-or-marker-p nil, Leo Liu, 2014/04/05
- [elpa] 02/77: Fix error when interprogram-cut-function unset, Leo Liu, 2014/04/05
- [elpa] 05/77: Call interprogram-cut-function in easy-kill-forward, Leo Liu, 2014/04/05
- [elpa] 01/77: Initial commit, Leo Liu, 2014/04/05
- [elpa] 07/77: Rename easy-kill-forward/backward to easy-kill-enlarge/shrink, Leo Liu, 2014/04/05
- [elpa] 08/77: Give overlay by easy-kill-candidate higher priority, Leo Liu, 2014/04/05
- [elpa] 06/77: Various bug fixes and improvements, Leo Liu, 2014/04/05
- [elpa] 09/77: Restore the ability to inspect char properties for URLs, Leo Liu, 2014/04/05
- [elpa] 04/77: Use overlay for storing kill candidate and change +/-, Leo Liu, 2014/04/05
- [elpa] 11/77: Minor tweaks to easy-kill-on-url, Leo Liu, 2014/04/05
- [elpa] 12/77: Tweak the definition of thing `region',
Leo Liu <=
- [elpa] 13/77: New command easy-kill-region to kill current selection, Leo Liu, 2014/04/05
- [elpa] 10/77: New function easy-kill-adjust-candidate and doc fix, Leo Liu, 2014/04/05
- [elpa] 16/77: Make function easy-kill-candidate always return string, Leo Liu, 2014/04/05
- [elpa] 17/77: Fix error: (args-out-of-range 1009 1035), Leo Liu, 2014/04/05
- [elpa] 15/77: Some string and comment fixes, Leo Liu, 2014/04/05
- [elpa] 23/77: Use parse-partial-sexp in easy-kill-bounds-of-list, Leo Liu, 2014/04/05
- [elpa] 20/77: Replace `enlarge' with `expand' in strings and comments, Leo Liu, 2014/04/05
- [elpa] 19/77: Add lispy treatment for +/- on list and sexp, Leo Liu, 2014/04/05
- [elpa] 14/77: Doc fix and release v0.7.0, Leo Liu, 2014/04/05
- [elpa] 22/77: Handle the case when overlay has already been destroyed, Leo Liu, 2014/04/05