diff --git a/helm.el b/helm.el index c66d497e0..1e6bc9441 100644 --- a/helm.el +++ b/helm.el @@ -392,7 +392,7 @@ the default has changed now to avoid flickering." (defcustom helm-display-function 'helm-default-display-buffer "Function to display *helm* buffer. By default, it is `helm-default-display-buffer', which affects -`helm-full-frame'." +`helm-full-frame' among others." :group 'helm :type 'symbol) @@ -2479,6 +2479,14 @@ frame configuration as per `helm-save-configuration-functions'." (select-frame-set-input-focus frame)))))) (defun helm-split-window-default-fn (window) + "Default function to split windows before displaying `helm-buffer'. + +It is used as default value for +`helm-split-window-preferred-function' which is then the let-bounded +value of `split-window-preferred-function' in `helm-display-buffer'. +When `helm-display-function' which default to +`helm-default-display-buffer' is called from `helm-display-buffer' the +value of `split-window-preferred-function' will be used by `display-buffer'." (let (split-width-threshold) (if (and (fboundp 'window-in-direction) ;; Don't try to split when starting in a minibuffer @@ -2519,7 +2527,10 @@ frame configuration as per `helm-save-configuration-functions'." ;; (defun helm-display-buffer (buffer) "Display BUFFER. -The function to display `helm-buffer'." + +The function used to display `helm-buffer' by calling +`helm-display-function' which split window with +`helm-split-window-preferred-function'." (let (pop-up-frames (split-window-preferred-function helm-split-window-preferred-function)