help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modified isearch


From: Michael Heerdegen
Subject: Re: Modified isearch
Date: Thu, 23 Jan 2014 19:01:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Peter West <lists@pbw.id.au> writes:

> What I want to do is to invoke normal isearch and isearch-regexp
> functions (forward functions at least), and have the mark reset to the
> beginning of the matched text. So I tried this:
>
>
>  (define-key search-map (kbd "C-c R") 'my-set-mark-point-around-isearch)
>      (defun my-set-mark-point-around-isearch ()
>        "Do a forward search and set mark to the beginning of the
> search-term."
>        (interactive)
>        (isearch-forward)
>        (push-mark isearch-other-end))
>
>
> No luck.

Works well for me.  When I hit C-x C-x is see that the mark has been set
accordingly.  Or do you want the region to be activated?  Then use the
third argument of `push-mark'.


Regards,

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]