Any existing package that can do incremental search inside a function definition instead of the whole buffer?
Now the best I can do is to turn on semantic-mode
along with semantic-stickyfunc-mode
and carefully search within its scope.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityAs @xuchunyang said in a comment to your question, you can first narrow the buffer to the function definition.
Or you can use library Isearch+, which lets you search just the active region, without narrowing.
Non-nil
option isearchp-restrict-to-region-flag
does this. You can use C-x n
(command isearchp-toggle-region-restriction
) during search to toggle this option value.
Also, deactivation of the active region when you search is controlled by option isearchp-deactivate-region-flag
.
(NOTE: For search to be limited to the active region in Info, you must also use library Info+.)
C-x n d
(orM-x narrow-to-defun
) then search?