emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 12/13: Fix #11: Work around http://debbugs.gnu.org/17247


From: Leo Liu
Subject: [elpa] 12/13: Fix #11: Work around http://debbugs.gnu.org/17247
Date: Sun, 13 Apr 2014 07:35:28 +0000

leoliu pushed a commit to branch master
in repository elpa.

commit 254bda0603c7613a9fa5f3c4ff0ccd2ae7c60cb6
Author: Leo Liu <address@hidden>
Date:   Sun Apr 13 11:42:51 2014 +0800

    Fix #11: Work around http://debbugs.gnu.org/17247
---
 easy-kill.el |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/easy-kill.el b/easy-kill.el
index c91bd4c..8195bfc 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -349,8 +349,15 @@ candidate property instead."
            (new-front (save-excursion
                         (goto-char front)
                         (with-demoted-errors
-                          (cl-dotimes (_ (abs n))
-                            (forward-thing thing step)))
+                          (cl-labels ((forward-defun (s)
+                                                     (pcase s
+                                                       (`-1 
(beginning-of-defun 1))
+                                                       (`+1 (end-of-defun 
1)))))
+                            (dotimes (_ (abs n))
+                              ;; Work around http://debbugs.gnu.org/17247
+                              (if (eq thing 'defun)
+                                  (forward-defun step)
+                                (forward-thing thing step)))))
                         (point))))
       (pcase (and (/= front new-front)
                   (sort (cons new-front bounds1) #'<))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]