Skip to content

Commit

Permalink
Use now-standard 'isearch-occur in place of hand-rolled code
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Jan 11, 2012
1 parent 8e64a05 commit dbed2b4
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions init-isearch.el
@@ -1,18 +1,5 @@
(defun call-with-current-isearch-string-as-regex (f)
(let ((case-fold-search isearch-case-fold-search))
(funcall f (if isearch-regexp isearch-string (regexp-quote isearch-string)))))

;; Activate occur easily inside isearch
(define-key isearch-mode-map (kbd "C-o")
(lambda ()
(interactive)
(call-with-current-isearch-string-as-regex 'occur)))

;; or fire up "all"
(define-key isearch-mode-map (kbd "C-l")
(lambda ()
(interactive)
(call-with-current-isearch-string-as-regex 'all)))
(define-key isearch-mode-map (kbd "C-o") 'isearch-occur)

;; Search back/forth for the symbol at point
;; See http://www.emacswiki.org/emacs/SearchAtPoint
Expand Down

0 comments on commit dbed2b4

Please sign in to comment.