Skip to content

Commit

Permalink
Fix undefined function & update docs for symbol command
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood committed Oct 20, 2024
1 parent 965d03c commit fa39eb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions COMMANDS.org
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ Move cursor prev/next and select, the selection can be expand by other char move

*** meow-mark-word/symbol

Selection Type: ~expand word~
Selection Type: ~expand word/symbol~

Select current word/symbol(from its beginning to end), push the content into ~regexp-search-ring~.

*** meow-next-word/symbol

Selection Type: ~no-expand word~
Selection Type: ~no-expand word/symbol~

Forward select to the word/symbol end.

*** meow-back-word/symbol

Selection type: ~no-expand word~
Selection type: ~no-expand word/symbol~

Backward select to the word/symbol beginning.

Expand Down
4 changes: 2 additions & 2 deletions TUTORIAL.org
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ BEACON state will be disabled automatically when cursor moves out or secondary s
Once BEACON state is enabled, you can create fake cursors/regions with movement commands.

- ~meow-left/right~ will create cursors in current column.
- ~meow-next/back-word/symbol~ will create cursors at words' beginning or end.
- ~meow-mark-word/symbol~ will create regions for every same words.
- ~meow-next/back-word/symbol~ will create cursors at words'/symbols' beginning or end.
- ~meow-mark-word/symbol~ will create regions for every same words/symbols.
- ~meow-visit/search~ will create regions for every same regexp.
- ~meow-find/till~ will create cursors for every same characters.
- ~meow-line~ will create regions for every N lines. (N is the number of selected lines).
Expand Down
10 changes: 5 additions & 5 deletions meow-beacon.el
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ same way, and escape each time the macro is applied."
(forward-line 1)))))
(setq meow--beacon-overlays (reverse meow--beacon-overlays))))

(defun meow--add-beacons-for-word ()
(defun meow--add-beacons-for-thing (thing)
"Add beacon for word movement."
(save-restriction
(meow--narrow-secondary-selection)
Expand All @@ -219,15 +219,15 @@ same way, and escape each time the macro is applied."
(save-mark-and-excursion
(goto-char (point-min))
(while (let ((p (point)))
(forward-thing meow-word-thing 1)
(forward-thing thing 1)
(not (= p (point))))
(unless (= (point) orig)
(meow--beacon-add-overlay-at-point (meow--hack-cursor-pos (point)))))))

(save-mark-and-excursion
(goto-char (point-max))
(while (let ((p (point)))
(forward-thing meow-word-thing -1)
(forward-thing thing -1)
(not (= p (point))))
(unless (= (point) orig)
(meow--beacon-add-overlay-at-point (point))))))))
Expand Down Expand Up @@ -397,10 +397,10 @@ MATCH is the search regexp."
(cl-case type
((nil transient) (meow--add-beacons-for-char))
((word) (if (not (eq 'expand ex))
(meow--add-beacons-for-word)
(meow--add-beacons-for-thing meow-word-thing)
(meow--add-beacons-for-match (meow--beacon-region-words-to-match))))
((symbol) (if (not (eq 'expand ex))
(meow--add-beacons-for-symbol)
(meow--add-beacons-for-thing meow-symbol-thing)
(meow--add-beacons-for-match (meow--beacon-region-words-to-match))))
((visit) (meow--add-beacons-for-match (car regexp-search-ring)))
((line) (meow--add-beacons-for-line))
Expand Down

0 comments on commit fa39eb6

Please sign in to comment.