summaryrefslogtreecommitdiff
path: root/helm-semantic.el
diff options
context:
space:
mode:
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)))))