summaryrefslogtreecommitdiff
path: root/helm-semantic.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2019-07-12 18:53:59 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2019-07-12 18:53:59 +0200
commit60466004daf894fb390b07f9ff8d4d9283a395ef (patch)
treedfb97086e10591c75e5ef587da5ecf31619b8dbd /helm-semantic.el
parentb17339db4fe3b8c81dfb2faae8f71fa523929fb7 (diff)
Change default bindings for right and left
* helm-files.el (helm-ff-lynx-style-map): Do it. * helm-imenu.el (helm-imenu-lynx-style-map): Do it. * helm-semantic.el (helm-semantic-lynx-style-map): Do it. * helm.el (helm-map): Do it.
Diffstat (limited to 'helm-semantic.el')
-rw-r--r--helm-semantic.el23
1 files changed, 14 insertions, 9 deletions
diff --git a/helm-semantic.el b/helm-semantic.el
index 6c246373..f5691244 100644
--- a/helm-semantic.el
+++ b/helm-semantic.el
@@ -35,11 +35,6 @@
"Semantic tags related libraries and applications for helm."
:group 'helm)
-(defcustom helm-semantic-lynx-style-map t
- "Use Arrow keys to jump to occurences."
- :group 'helm-semantic
- :type 'boolean)
-
(defcustom helm-semantic-display-style
'((python-mode . semantic-format-tag-summarize)
(c-mode . semantic-format-tag-concise-prototype-c-mode)
@@ -64,10 +59,20 @@ you have completion on these functions with `C-M i' in the customize interface."
(defvar helm-semantic-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map helm-map)
- (when helm-semantic-lynx-style-map
- (define-key map (kbd "<left>") 'helm-maybe-exit-minibuffer)
- (define-key map (kbd "<right>") 'helm-execute-persistent-action))
- (delq nil map)))
+ map))
+
+(defcustom helm-semantic-lynx-style-map nil
+ "Use Arrow keys to jump to occurences."
+ :group 'helm-semantic
+ :type 'boolean
+ :set (lambda (var val)
+ (set var val)
+ (if val
+ (progn
+ (define-key helm-semantic-map (kbd "<right>") 'helm-execute-persistent-action)
+ (define-key helm-semantic-map (kbd "<left>") 'helm-maybe-exit-minibuffer))
+ (define-key helm-semantic-map (kbd "<right>") nil)
+ (define-key helm-semantic-map (kbd "<left>") nil))))
;; Internals vars
(defvar helm-semantic--tags-cache nil)