summaryrefslogtreecommitdiff
path: root/helm-semantic.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2014-04-20 08:24:54 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2014-04-20 08:24:54 +0200
commitd6643fcd618f4aad0c837fa8de4de16c2bff45df (patch)
tree135d333aba0f697cc98b08f5adc370171e8fd596 /helm-semantic.el
parent85a970cbbfc65e080a1ba5c4e798d37bdb9f7576 (diff)
Add keymap and help to imenu and semantic.
* helm-config.el: * helm-help.el: * helm-imenu.el: * helm-semantic.el:
Diffstat (limited to 'helm-semantic.el')
-rw-r--r--helm-semantic.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/helm-semantic.el b/helm-semantic.el
index 5a51695a..9eeae673 100644
--- a/helm-semantic.el
+++ b/helm-semantic.el
@@ -28,6 +28,21 @@
(declare-function pulse-momentary-highlight-one-line "pulse.el" (point &optional face))
+(defcustom helm-semantic-lynx-style-map t
+ "Use Arrow keys to jump to occurences."
+ :group 'helm-imenu
+ :type 'boolean)
+
+;;; keymap
+(defvar helm-semantic-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map helm-map)
+ (define-key map (kbd "C-c ?") 'helm-semantic-help)
+ (when helm-imenu-lynx-style-map
+ (define-key map (kbd "<left>") 'helm-exit-minibuffer)
+ (define-key map (kbd "<right>") 'helm-execute-persistent-action))
+ (delq nil map)))
+
(defun helm-semantic-init-candidates (tags depth &optional class)
"Write the contents of TAGS to the current buffer."
(let ((class class) cur-type)
@@ -79,7 +94,7 @@
(semantic-parse-tree-set-needs-update)))))
(defvar helm-source-semantic
- '((name . "Semantic Tags")
+ `((name . "Semantic Tags")
(init . (lambda ()
(helm-semantic--maybe-set-needs-update)
(let ((tags (semantic-fetch-tags)))
@@ -92,6 +107,8 @@
(helm-semantic-default-action elm t)
(helm-highlight-current-line)))
(persistent-help . "Show this entry")
+ (keymap . ,helm-semantic-map)
+ (mode-line . helm-semantic-mode-line)
(action . helm-semantic-default-action)
"Source to search tags using Semantic from CEDET."))