branch: elpa/helm commit d733debbe1144122e464f164707e5ff2717e2d9a Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Remove user var helm-sources-using-help-echo-popup Now only sources that have the popup-info attributes will work with helm-popup-tip-mode. --- helm-grep.el | 6 ++++++ helm-utils.el | 28 ++++++++-------------------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/helm-grep.el b/helm-grep.el index 13657a05d1..bbc5dfc84e 100644 --- a/helm-grep.el +++ b/helm-grep.el @@ -1186,6 +1186,7 @@ of grep." (defclass helm-grep-class (helm-source-async) ((candidates-process :initform 'helm-grep-collect-candidates) (filtered-candidate-transformer :initform #'helm-grep-fc-transformer) + (popup-info :initform #'helm-grep-popup-info-fn) (keymap :initform 'helm-grep-map) (pcre :initarg :pcre :initform nil :documentation @@ -1396,6 +1397,10 @@ matching `helm-zgrep-file-extension-regexp' only." (and (stringp candidate) (helm-grep--filter-candidate-1 candidate nil pcre))))) +(defun helm-grep-popup-info-fn (_candidate) + (helm-aif (get-text-property (pos-bol) 'helm-grep-fname) + (abbreviate-file-name it))) + (defun helm-grep-fc-transformer (candidates source) (let ((helm-grep-default-directory-fn (or helm-grep-default-directory-fn @@ -1742,6 +1747,7 @@ continuing calling grep ag." (history :initform 'helm-grep-ag-history) (help-message :initform 'helm-grep-help-message) (filtered-candidate-transformer :initform #'helm-grep-fc-transformer) + (popup-info :initform #'helm-grep-popup-info-fn) (persistent-action :initform 'helm-grep-persistent-action) (persistent-help :initform "Jump to line (`C-u' Record in mark ring)") (candidate-number-limit :initform 99999) diff --git a/helm-utils.el b/helm-utils.el index 923ce8885d..22bef0bbb7 100644 --- a/helm-utils.el +++ b/helm-utils.el @@ -104,11 +104,6 @@ Where PA means persistent action." :group 'helm-utils :type 'integer) -(defcustom helm-sources-using-help-echo-popup '("Ack-Grep" "AG" "RG" "Gid" "Git-Grep") - "Show the buffer name or the filename in a popup at selection." - :group 'helm-utils - :type '(repeat (choice string))) - (defcustom helm-html-decode-entities-function #'helm-html-decode-entities-string "Function used to decode HTML entities in HTML bookmarks. Helm comes by default with `helm-html-decode-entities-string', if @@ -1042,9 +1037,7 @@ Assume regexp is a pcre based regexp." (popup-info-fn (assoc-default 'popup-info src))) (when (and helm-alive-p helm-popup-tip-mode - (or (member (assoc-default 'name src) - helm-sources-using-help-echo-popup) - popup-info-fn)) + popup-info-fn) (setq helm--show-help-echo-timer (run-with-idle-timer 1 nil @@ -1054,23 +1047,18 @@ Assume regexp is a pcre based regexp." ;; Use helm-grep-fname prop instead of help-echo as help-echo ;; maybe used by mouse overlay after resume. (let ((pos (save-excursion (end-of-visual-line) (point)))) - (helm-acond ((get-text-property (pos-bol) 'helm-grep-fname) - (helm-tooltip-show - (concat " " (abbreviate-file-name it)) - pos)) - (popup-info-fn - (helm-tooltip-show - (concat " " (funcall it (helm-get-selection))) - pos)))))))))))) + (when popup-info-fn + (helm-tooltip-show + (concat " " (funcall popup-info-fn (helm-get-selection))) + pos))))))))))) ;;;###autoload (define-minor-mode helm-popup-tip-mode "Show additional informations in a popup tip at end of line. -When the mode is enabled, popup showup either when the source is one of -`helm-sources-using-help-echo-popup' or the source has a `popup-info' -attribute which define a specific function for this source to fetch infos on -candidate." +When the mode is enabled, popup showup when the source the source +has a `popup-info' attribute which define a specific function for +this source to fetch infos on candidate." :global t (if helm-popup-tip-mode (progn