diff options
author | Kyle Meyer <kyle@kyleam.com> | 2018-08-11 23:49:51 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2018-08-17 23:23:49 -0400 |
commit | 68415befccf02b5b56da6b391bda988a4d930797 (patch) | |
tree | f4075d7b584df397dd0a627a8270318ce9f6b0bf /lisp | |
parent | 65b7991e516b8f6874d4d37f14ee13b0200e0680 (diff) | |
download | emacs.d-68415befccf02b5b56da6b391bda988a4d930797.tar.gz |
Add mode to override xref-find-definitions with helm-etags-select
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-helm.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/km-helm.el b/lisp/km-helm.el index 5295e2a..eda178b 100644 --- a/lisp/km-helm.el +++ b/lisp/km-helm.el @@ -68,5 +68,18 @@ (display-buffer (find-file-noselect f) '(display-buffer-below-selected))))))) +(defvar km/helm-etags-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "M-.") #'helm-etags-select) + map)) + +(define-minor-mode km/helm-etags-mode + "Override `xref-find-definitions' with `helm-etags-select'." + :keymap km/helm-etags-mode-map) + +(defun km/helm-maybe-override-xref () + (when (helm-etags-find-tag-file-directory default-directory) + (km/helm-etags-mode 1))) + (provide 'km-helm) ;;; km-helm.el ends here |