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

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

[elpa] master 2e936d8 10/36: avy-jump.el (avy-goto-word-or-subword-1): N


From: Oleh Krehel
Subject: [elpa] master 2e936d8 10/36: avy-jump.el (avy-goto-word-or-subword-1): New command
Date: Tue, 19 May 2015 12:38:10 +0000

branch: master
commit 2e936d8cc3bbf6b7ba0d0f54d38a59192808f0f7
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    avy-jump.el (avy-goto-word-or-subword-1): New command
    
    Fixes #33
---
 avy-jump.el |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/avy-jump.el b/avy-jump.el
index 1da11c6..b32d22c 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -466,6 +466,15 @@ The case is ignored."
       (avy-goto-subword-0
        arg (lambda () (eq (downcase (char-after)) char))))))
 
+(defun avy-goto-word-or-subword-1 (&optional arg)
+  "Jump to a word or subword start, depending on `subword-mode'.
+The window scope is determined by `avy-all-windows' (ARG negates it).
+The case is ignored."
+  (interactive "P")
+  (if (bound-and-true-p subword-mode)
+      (avy-goto-subword-1 arg)
+    (avy-goto-word-1 arg)))
+
 (defun avy--line (&optional arg)
   "Select a line.
 The window scope is determined by `avy-all-windows' (ARG negates it)."



reply via email to

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