]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix last change for the case of no thing at point
authorLeo Liu <sdl.web@gmail.com>
Sat, 12 Apr 2014 10:14:16 +0000 (18:14 +0800)
committerLeo Liu <sdl.web@gmail.com>
Sat, 12 Apr 2014 10:31:55 +0000 (18:31 +0800)
easy-kill.el

index 924ea9182aabc61be0d23eb690b7e1a3bcd2b812..8cb3450bd88572d48e11513d8f9207e01b077eaf 100644 (file)
@@ -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))