Error in `pre-command-hook`
[email protected] Wed, 30 Nov 2005 14:00:57 +0100
| Newsgroups | gmane.emacs.xemacs.general |
|---|---|
| Message-ID | <OFE6EAA123.CB297DE9-ONC12570C9.0046DD07-C12570C9.00477F8F@pruftechnik.com> |
Hello,
I think it was in an emacs wiki, where I found this nice isearch hook:
(add-hook 'isearch-mode-end-hook '(lambda ()
(when isearch-forward (goto-char=20
isearch-other-end))))
It jumps to the start of the searched part instead of staying at its end=20
which is much nicer for me.
Unfortunately, I get the following error quite often:
(1) (error/warning) Error in `pre-command-hook' (setting hook to nil):=20
(wrong-type-argument integer-or-marker-p nil)
It is reproducible when I press C-s C-home but appears at many other=20
occasions, too.
I turned on "Debug on error" and got this:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p=20
nil)
goto-char(nil)
(if isearch-forward (goto-char isearch-other-end))
(when isearch-forward (goto-char isearch-other-end))
(lambda nil (when isearch-forward (goto-char isearch-other-end)))()
run-hooks((lambda nil (when isearch-forward (goto-char=20
isearch-other-end))))
isearch-done()
isearch-pre-command-hook()
Unfotrunately, I am not experienced enough to handle this. Could you=20
please help me, as you have done so many times before ?
Many thanks in advance,
Markus Grunwald
Softwareentwicklung
PR=DCFTECHNIK Condition Monitoring GmbH
Oskar-Messter-Stra=DFe 19-21
85737 Ismaning
www.pruftechnik.com
Tel: +49 (0)89 99616177
Fax: +49 (0)89 99616200