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

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

[elpa] master 26123a7 10/78: avy.el (avy-goto-line): Fixup goto-line cla


From: Oleh Krehel
Subject: [elpa] master 26123a7 10/78: avy.el (avy-goto-line): Fixup goto-line clause
Date: Sat, 23 Jan 2016 13:59:39 +0000

branch: master
commit 26123a7b37b07560b63ea75c43923d7eee12c0a9
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    avy.el (avy-goto-line): Fixup goto-line clause
    
    Fixes #79
---
 avy.el |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/avy.el b/avy.el
index b65ce16..25cd086 100644
--- a/avy.el
+++ b/avy.el
@@ -932,20 +932,21 @@ The window scope is determined by `avy-all-windows' (ARG 
negates it)."
 The window scope is determined by `avy-all-windows' (ARG negates it)."
   (interactive "P")
   (avy-with avy-goto-line
-    (let ((avy-handler-function
-           (lambda (char)
-             (if (or (< char ?0)
-                     (> char ?9))
-                 (avy-handler-default char)
-               (let ((line (read-from-minibuffer
-                            "Goto line: " (string char))))
-                 (when line
-                   (push-mark)
-                   (goto-char (point-min))
-                   (forward-line (1- (string-to-number line)))
-                   (throw 'done 'exit)))))))
-      (avy-action-goto
-       (avy--line arg)))))
+    (let* ((avy-handler-function
+            (lambda (char)
+              (if (or (< char ?0)
+                      (> char ?9))
+                  (avy-handler-default char)
+                (let ((line (read-from-minibuffer
+                             "Goto line: " (string char))))
+                  (when line
+                    (push-mark)
+                    (goto-char (point-min))
+                    (forward-line (1- (string-to-number line)))
+                    (throw 'done 'exit))))))
+           (r (avy--line arg)))
+      (unless (eq r t)
+        (avy-action-goto r)))))
 
 ;;;###autoload
 (defun avy-copy-line (arg)



reply via email to

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