SHARE
TWEET

Untitled

a guest Jul 20th, 2013 39 Never
  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)))
RAW Paste Data
Top