Skip to content

Commit

Permalink
Add misc punctuation to subword commands
Browse files Browse the repository at this point in the history
* avy.el (avy-goto-subword-0): Temporarily bind
  `subword-backward-regexp' to allow chars like ! or @ to count as
  subword parts.

Fixes #93
  • Loading branch information
abo-abo committed Aug 21, 2015
1 parent dbd2d20 commit 53d457c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avy.el
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
(avy--generic-jump regex arg avy-style))))

(declare-function subword-backward "subword")
(defvar subword-bacward-regexp)

;;;###autoload
(defun avy-goto-subword-0 (&optional arg predicate)
Expand All @@ -870,6 +871,8 @@ should return true."
(require 'subword)
(avy-with avy-goto-subword-0
(let ((case-fold-search nil)
(subword-backward-regexp
"\\(\\(\\W\\|[[:lower:][:digit:]]\\)\\([!-/:@`~[:upper:]]+\\W*\\)\\|\\W\\w+\\)")
candidates)
(avy-dowindows arg
(let ((ws (window-start))
Expand Down

0 comments on commit 53d457c

Please sign in to comment.