Correctly restore original Isearch point. (Bug#4994)
authorJuri Linkov <juri@jurta.org>
Mon, 7 Dec 2009 17:30:01 +0000 (17:30 +0000)
committerJuri Linkov <juri@jurta.org>
Mon, 7 Dec 2009 17:30:01 +0000 (17:30 +0000)
commit406374109c9df9fd1a2143f0001fe21562e9644a
treec475710dde8a019d06d6430544796799cb712e02
parente07278736e3103b4ad0ae01dfa1deaf2c2684e0e
Correctly restore original Isearch point.  (Bug#4994)

* isearch.el (isearch-mode): Move `isearch-push-state' after
`(run-hooks 'isearch-mode-hook)'.
(isearch-cancel): When `isearch-push-state-function' is defined,
let-bind `isearch-cmds' to the first state (the last element of
`isearch-cmds') and call `isearch-top-state' (it calls pop-state
function and restores the original point).  Otherwise, move point
to `isearch-opoint'.
lisp/ChangeLog
lisp/isearch.el