Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add counsel-mode #414

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 28 additions & 0 deletions counsel.el
Expand Up @@ -1688,6 +1688,34 @@ An extra action allows to switch to the process buffer."
("e" counsel-rhythmbox-enqueue-song "Enqueue song"))
:caller 'counsel-rhythmbox))

(defvar counsel-mode-map
(let ((map (make-sparse-keymap)))
(dolist (binding
'((describe-bindings . counsel-descbinds)
(describe-function . counsel-describe-function)
(describe-variable . counsel-describe-variable)
(find-file . counsel-find-file)
(imenu . counsel-imenu)
(load-library . counsel-load-library)
(load-theme . counsel-load-theme)
(yank-pop . counsel-yank-pop)))
(define-key map (vector 'remap (car binding)) (cdr binding)))
map)
"Map for `counsel-mode'. Remaps built-in functions to counsel
replacements.")

;;;###autoload
(define-minor-mode counsel-mode
"Toggle Counsel mode on or off.
Turn Counsel mode on if ARG is positive, off otherwise. Counsel
mode remaps built-in emacs functions that have counsel
replacements. "
:group 'ivy
:global t
:keymap counsel-mode-map
:lighter " counsel")


(provide 'counsel)

;;; counsel.el ends here