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: Stefan Monnier <address@hidden>
Subject: Re: placing cursor at *start* of match in incremental search
Date: 22 Jan 2003 15:49:01 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Greg" == Greg Hill <address@hidden> writes:
> Incidentally, Maciej, when you are experimenting with different versions of
> anonymous (lambda) functions as hooks in the same Emacs session, don't
> forget to explicitly remove any old versions of the function from the hook
> variable, or you will end up executing more that one version and wondering
> why the new one you just added doesn't seem to work the way it should.

To avoid the problem, I recommend to use a non-anonymous function:

  (defun my-i-s-e-h ()
    (blabla))
  (add-hook 'isearch-mode-end-hook 'my-i-s-e-h)

> In case you didn't know, the *scratch* buffer, which uses
> lisp-interaction-mode, is the right place to do stuff like that.

I think the .emacs file is better since that's where you'll want the
code to be in the end anyway.
Otherwise M-x ielm gives you another interface which some people find
more friendly than lisp-interaction-mode.


        Stefan


reply via email to

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