Advertisement
Guest User

Untitled

a guest
Jul 20th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.55 KB | None | 0 0
  1. (add-hook 'isearch-mode-end-hook 'my-goto-match-beginning)
  2.     (defun my-goto-match-beginning ()
  3.       (when (and isearch-forward isearch-other-end)
  4.         (goto-char isearch-other-end)))
  5.     (defadvice isearch-exit (after my-goto-match-beginning activate)
  6.       "Go to beginning of match."
  7.       (when (and isearch-forward isearch-other-end)
  8.         (goto-char isearch-other-end)))
  9.  
  10.    (defun my-goto-match-beginning ()
  11.       (when (and isearch-forward isearch-other-end (not isearch-mode-end-hook-quit))
  12.         (goto-char isearch-other-end)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement