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

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

[elpa] master 3200351 16/17: avy-jump.el (avy-setup-default): Setup some


From: Oleh Krehel
Subject: [elpa] master 3200351 16/17: avy-jump.el (avy-setup-default): Setup some bindings
Date: Fri, 08 May 2015 13:42:15 +0000

branch: master
commit 32003515c8efa2cf38b62c45499dae30bc7cacb8
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    avy-jump.el (avy-setup-default): Setup some bindings
    
    * README.md: Add a description.
    
    Fixes #10
---
 README.md   |   10 ++++++++++
 avy-jump.el |    8 +++++++-
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/README.md b/README.md
index 4755742..01bf587 100644
--- a/README.md
+++ b/README.md
@@ -76,3 +76,13 @@ After <kbd>M-g e</kbd>:
 ### Other commands
 
 There are some more commands which you can explore yourself by looking at the 
code.
+
+### Bindings
+
+You add this to your config to bind some stuff:
+
+```elisp
+(avy-setup-default)
+```
+
+It will bind, for example, `avy-isearch` to <kbd>C-'</kbd> in 
`isearch-mode-map`, so that you can select one of the currently visible 
`isearch` candidates using `avy`.
diff --git a/avy-jump.el b/avy-jump.el
index 60b9160..d6bb52e 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -1,4 +1,4 @@
-;;; avy-jump.el --- jump to things tree-style
+;;; avy-jump.el --- jump to things tree-style. -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2015  Free Software Foundation, Inc.
 
@@ -437,6 +437,12 @@ ARG lines can be used."
           (line-end-position)))
        pad))))
 
+;;;###autoload
+(defun avy-setup-default ()
+  "Setup the default shortcuts."
+  (eval-after-load 'isearch
+    '(define-key isearch-mode-map (kbd "C-'") 'avy-isearch)))
+
 (define-obsolete-variable-alias 'avi-keys 'avy-keys "0.1.0")
 (define-obsolete-variable-alias 'avi-background 'avy-background "0.1.0")
 (define-obsolete-variable-alias 'avi-word-punc-regexp 'avy-word-punc-regexp 
"0.1.0")



reply via email to

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