leoliu pushed a commit to branch master in repository elpa. commit 24f5de6ae99ad318b11df786060b63be1172e9c5 Author: Leo Liu <sdl....@gmail.com> 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'.