mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
parent
4af1993290
commit
56f6590c20
12
avy.el
12
avy.el
@ -627,20 +627,24 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
(raise-frame frame)
|
(raise-frame frame)
|
||||||
(goto-char pt)))
|
(goto-char pt)))
|
||||||
|
|
||||||
|
(defun avy-forward-item ()
|
||||||
|
(if (eq avy-command 'avy-goto-line)
|
||||||
|
(end-of-line)
|
||||||
|
(forward-sexp))
|
||||||
|
(point))
|
||||||
|
|
||||||
(defun avy-action-mark (pt)
|
(defun avy-action-mark (pt)
|
||||||
"Mark sexp at PT."
|
"Mark sexp at PT."
|
||||||
(goto-char pt)
|
(goto-char pt)
|
||||||
(set-mark (point))
|
(set-mark (point))
|
||||||
(forward-sexp))
|
(avy-forward-item))
|
||||||
|
|
||||||
(defun avy-action-copy (pt)
|
(defun avy-action-copy (pt)
|
||||||
"Copy sexp starting on PT."
|
"Copy sexp starting on PT."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(let (str)
|
(let (str)
|
||||||
(goto-char pt)
|
(goto-char pt)
|
||||||
(if (eq avy-command 'avy-goto-line)
|
(avy-forward-item)
|
||||||
(end-of-line)
|
|
||||||
(forward-sexp))
|
|
||||||
(setq str (buffer-substring pt (point)))
|
(setq str (buffer-substring pt (point)))
|
||||||
(kill-new str)
|
(kill-new str)
|
||||||
(message "Copied: %s" str)))
|
(message "Copied: %s" str)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user