Suppose we have the following text:
(print "thIis-is-a-text")
and the cursor is in the word "this", which is between char 'h' and 'i'.
In emacs, if I type Cs Cw , the text to search for is 'is',
again Cw is 'is-is',
again Cw is 'is-is-a',
again Cw is 'is-is-a-text',
again Cw is "is-is-a-text" "...
And there is the emacs expand region plugin: "The spread area increases the selected area with semantic units. Just keep pressing the key until it selects what you want."
So, I want to make Cs Cw smarter: combine with an extension scope.
The cursor between char 'h' and 'i' in the word 'this' again, my goal:
when I type Cs Cw , the word 'this' will be the search text,
again will be "this-is-a-text",
again will be "this-is-a-text",
will print this-is-a-text "" again,
will be 'again (type "this-is-a-text")',
.... (behaves like an expansion area, maybe this is not a good example ...)
As I sometimes find, expanding an area is very useful in finding texts, I hope someone can write some codes to achieve this for me, since I'm new to emacs and elisp. Thank you, please forgive my broken English! :)