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

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

Re: placing cursor at *start* of match in incremental search


From: Kevin Rodgers
Subject: Re: placing cursor at *start* of match in incremental search
Date: Tue, 21 Jan 2003 10:12:46 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Maciej Kalisiak wrote:

* Greg Hill <ghill@synergymicro.com>:

Put this in your .emacs:

(add-hook 'isearch-mode-end-hook
     (function (lambda () (goto-char (match-beginning 0)))))


Ah, perfect!  Thanks.

Is this approach better, or Adrian's method of using "advice"? (I have only
limited elisp knowledge, and not much experience with advice functions)


I'm a big fan of defadvice, but I think it should only be used when there's no

other way to get the behavior you want.  If there's a hook available, use that;
and better yet, if there's a user option, use that.

--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

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