summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2013-12-13 18:58:02 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2013-12-13 18:58:02 +0100
commit39979da67f6f735fe23172ce4d0e9187016c7c08 (patch)
tree9ecc708574660b0e433e2bafaac70c26a572f081
parenta8380961fad834d81dc9d992c8f9d6a20e2301f3 (diff)
* helm-mode.el (helm--completion-in-region): Add source name and buffer.
-rw-r--r--helm-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/helm-mode.el b/helm-mode.el
index 4a185114..b485e646 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -862,6 +862,9 @@ Can be used as value for `completion-in-region-function'."
(cl-declare (special require-match prompt))
(let* ((enable-recursive-minibuffers t)
(input (buffer-substring start end))
+ (current-command (or (helm-this-command) this-command))
+ (str-command (symbol-name current-command))
+ (buf-name (format "*helm-mode-%s*" str-command))
(require-match (or (and (boundp 'require-match) require-match)
minibuffer-completion-confirm
;; If prompt have not been propagated here, that's
@@ -872,7 +875,9 @@ Can be used as value for `completion-in-region-function'."
;; Completion-at-point and friends have no prompt.
(result (helm-comp-read (or (and (boundp 'prompt) prompt) "Pattern: ")
(all-completions input collection predicate)
+ :name str-command
:initial-input input
+ :buffer buf-name
:must-match require-match)))
(when result
(delete-region start end)