diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-11-16 23:42:58 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-11-16 23:42:58 -0500 |
commit | 0a0ba646409e2abc98ea674ab60b44f2c3e59029 (patch) | |
tree | 8214c0172400f05fd5f186940251615ce6a297cc | |
parent | bee5ed53172bfd79cd17596e179d246dcde89034 (diff) | |
download | emacs.d-0a0ba646409e2abc98ea674ab60b44f2c3e59029.tar.gz |
Use avy-with instead of avy--with-avy-keys
-rw-r--r-- | lisp/init-ace.el | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/init-ace.el b/lisp/init-ace.el index af1143c..c06cec1 100644 --- a/lisp/init-ace.el +++ b/lisp/init-ace.el @@ -10,13 +10,14 @@ (defun km/ace-link-dired () "Ace jump to files in dired buffers." (interactive) - (let ((res (avy--with-avy-keys km/ace-link-dired - (avy--process - (km/ali--dired-collect-references) - #'avy--overlay-pre)))) - (when res - (goto-char res) - (org-open-file (dired-get-filename))))) + (avy-with km/ace-link-dired + (setq avy-action + (lambda (pt) + (goto-char pt) + (org-open-file (dired-get-filename)))) + (avy--process + (km/ali--dired-collect-references) + #'avy--overlay-post))) (defun km/ali--dired-collect-references () (let ((end (window-end)) @@ -37,13 +38,14 @@ property." (interactive) (when (eq major-mode 'gnus-summary-mode) (gnus-summary-widget-forward 1)) - (let ((res (avy--with-avy-keys km/ace-link-widget - (avy--process - (km/ali--widget-collect-references) - #'avy--overlay-post)))) - (when res - (goto-char (1+ res)) - (widget-button-press (point))))) + (avy-with km/ace-link-widget + (setq avy-action + (lambda (pt) + (goto-char (1+ pt)) + (widget-button-press (point)))) + (avy--process + (km/ali--widget-collect-references) + #'avy--overlay-post))) (defun km/ali--widget-collect-references () "Collect the positions of visible widgets in buffer." |