make 'avy-goto-word-1 work with the form-feed character ("^L") (used … #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…to separate functions in emacs lisp files)
In Emacs Lisp files, especially those which are part of Emacs itself, form-feed characters (^L) are used to separate definitions or groups of definitions (and are represented in
emacs-lisp-mode
as coloured dividers). It would be convenient to be able to jump to these dividers with'avy-word
, but this currently doesn't work (even if the character is added toavy-subword-extra-word-chars
).This patch to
'avy-goto-word-1
simply tests if the character is^L
and if so makes anavy-goto-subword-0
call specifically for^L
. If not, it proceeds as usual.Possibly this should be limited to emacs-lisp-mode, but that might complicate things if there were avy
-all-windows
or-other-window
commands (I can't see any such commands, but it seems like something that may appear later).