summaryrefslogtreecommitdiff
path: root/helm-elisp.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-27 14:41:39 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-12-27 18:14:42 +0100
commit68c55e7db1c45208bc0d99d9ca8f756a59a4ba62 (patch)
treed0dd2e732e93b0b7086d70f6e9e119e24a0ff165 /helm-elisp.el
parentf4542b98f93f4c34b7f88bc0c9b2035fd5301ffb (diff)
Allow displaying helm-buffer in separate frame (#1932)
It is done by setting helm-display-function. Persistent actions are limited to non-splitting actions when using this. * helm-elisp.el (helm-show-completion-display-function): New. (helm-show-completion-default-display-function): Renamed from helm-show-completion-display-function. (with-helm-show-completion): Use helm-show-completion-display-function. * helm.el (helm--buffer-in-new-frame-p): New internal flag. (helm-default-display-buffer): Docstring. (helm-display-buffer-in-own-frame): New function suitable for helm-display-function. (helm-cleanup): Delete frame if needed. (helm-execute-persistent-action): Persistent action that split window are not allowed when using helm-buffer in own frame.
Diffstat (limited to 'helm-elisp.el')
-rw-r--r--helm-elisp.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/helm-elisp.el b/helm-elisp.el
index 6cc3fa78..82dc12a5 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -101,6 +101,11 @@ fuzzy completion is not available in `completion-at-point'."
:group 'helm-elisp
:type '(repeat (choice symbol)))
+(defcustom helm-show-completion-display-function
+ #'helm-show-completion-default-display-function
+ "The function to use to display completion buffer."
+ :group 'helm-elisp
+ :type 'function)
;;; Faces
;;
@@ -154,7 +159,7 @@ fuzzy completion is not available in `completion-at-point'."
(overlay-put helm-show-completion-overlay
'face 'helm-lisp-show-completion))
-(defun helm-show-completion-display-function (buffer &rest _args)
+(defun helm-show-completion-default-display-function (buffer &rest _args)
"A special resized helm window is used depending on position in BUFFER."
(with-selected-window (selected-window)
(if (window-dedicated-p)
@@ -193,7 +198,7 @@ If `helm-turn-on-show-completion' is nil do nothing."
(helm-set-local-variable
'helm-display-function
(if helm-show-completion-use-special-display
- 'helm-show-completion-display-function
+ helm-show-completion-display-function
'helm-default-display-buffer))
(helm-show-completion-init-overlay ,beg ,end)
,@body)