From 98a7d5e9189067679fc5b561fd571b5936eece00 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sat, 12 Apr 2014 18:14:16 +0800 Subject: [PATCH 1/1] Fix last change for the case of no thing at point --- easy-kill.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easy-kill.el b/easy-kill.el index 924ea9182..8cb3450bd 100644 --- a/easy-kill.el +++ b/easy-kill.el @@ -157,6 +157,7 @@ The value is the function's symbol if non-nil." (defun easy-kill-pair-to-list (pair) (pcase pair + (`nil nil) (`(,beg . ,end) (list beg end)) (_ (signal 'wrong-type-argument (list pair "Not a dot pair"))))) @@ -335,7 +336,8 @@ candidate property instead." (when (and (easy-kill-get thing) (/= n 0)) (let* ((step (if (cl-minusp n) -1 +1)) (thing (easy-kill-get thing)) - (bounds1 (easy-kill-pair-to-list (bounds-of-thing-at-point thing))) + (bounds1 (or (easy-kill-pair-to-list (bounds-of-thing-at-point thing)) + (list (point) (point)))) (start (easy-kill-get start)) (end (easy-kill-get end)) (front (or (car (cl-set-difference (list end start) bounds1)) -- 2.39.2