summaryrefslogtreecommitdiff
path: root/helm-semantic.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2013-12-29 08:13:58 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2013-12-29 08:13:58 +0100
commit37181f053c98a621f75868d9e14b60a85d35f927 (patch)
treef1f6628e85c17bc85ab04254aa89a90fbe74bb5d /helm-semantic.el
parent307f7e6730f283903c767d0b9da4675dd42976f2 (diff)
* helm-imenu.el (helm-imenu): use new default behavior.
* helm-semantic.el (helm-semantic, helm-semantic-or-imenu): same. * helm.el (helm-sources-using-default-as-input): Add semantic.
Diffstat (limited to 'helm-semantic.el')
-rw-r--r--helm-semantic.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/helm-semantic.el b/helm-semantic.el
index c65b7514..2e49d7bb 100644
--- a/helm-semantic.el
+++ b/helm-semantic.el
@@ -89,8 +89,10 @@
(defun helm-semantic ()
"Preconfigured `helm' for `semantic'."
(interactive)
- (helm :sources 'helm-source-semantic
- :buffer "*helm semantic*"))
+ (let ((str (thing-at-point 'symbol)))
+ (helm :sources 'helm-source-semantic
+ :default (list (concat "\\_<" str "\\_>") str)
+ :buffer "*helm semantic*")))
;;;###autoload
(defun helm-semantic-or-imenu ()
@@ -104,11 +106,13 @@ Fill in the symbol at point by default."
'helm-source-semantic
'helm-source-imenu))
(imenu-p (eq source 'helm-source-imenu))
+ (str (thing-at-point 'symbol))
(imenu-auto-rescan imenu-p)
(helm-execute-action-at-once-if-one
(and imenu-p
helm-imenu-execute-action-at-once-if-one)))
(helm :sources source
+ :default (list (concat "\\_<" str "\\_>") str)
:buffer "*helm semantic/imenu*"
:preselect (unless imenu-p (thing-at-point 'symbol)))))