emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/helm 0211c57425 2/2: Rename helm-mode--in-file-completion-


From: ELPA Syncer
Subject: [nongnu] elpa/helm 0211c57425 2/2: Rename helm-mode--in-file-completion-p and move it to helm-lib
Date: Sat, 22 Oct 2022 17:58:54 -0400 (EDT)

branch: elpa/helm
commit 0211c57425bb989965419aeebb7dd52476fcb2b0
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Rename helm-mode--in-file-completion-p and move it to helm-lib
    
    This avoid requiring (which is not possible due to recursive requires)
    helm-mode.
---
 helm-core.el | 3 +--
 helm-lib.el  | 4 ++++
 helm-mode.el | 6 +-----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 9fb768a046..5b702bd40e 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -42,7 +42,6 @@
 (helm--setup-completion-styles-alist)
 
 (declare-function helm-comp-read "helm-mode.el")
-(declare-function helm-mode--in-file-completion-p "helm-mode.el")
 (declare-function custom-unlispify-tag-name "cus-edit.el")
 (declare-function helm-quit-and-find-file "helm-utils.el")
 
@@ -4670,7 +4669,7 @@ See `helm-fuzzy-default-highlight-match'."
   (cl-assert helm-fuzzy-matching-highlight-fn nil "Wrong type argument 
functionp: nil")
   (cl-loop with diac = (helm-get-attr 'diacritics source)
            with file-comp-p = (or minibuffer-completing-file-name
-                                  (helm-mode--in-file-completion-p))
+                                  (helm-guess-filename-at-point))
            ;; helm-pattern may have been modified (fuzzy) so ensure to
            ;; use helm-input which is the raw pattern.
            with pattern = (if file-comp-p
diff --git a/helm-lib.el b/helm-lib.el
index 9894781a83..2a3ddabff1 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1858,6 +1858,10 @@ Also `helm-completion-style' settings have no effect 
here,
                           all)))))
       ;; Ensure circular objects are removed.
       (complete-with-action t compsfn helm-pattern predicate))))
+
+(defun helm-guess-filename-at-point ()
+  (with-helm-current-buffer
+    (run-hook-with-args-until-success 'file-name-at-point-functions)))
 
 ;; Yank text at point.
 ;;
diff --git a/helm-mode.el b/helm-mode.el
index a20889c4f7..db8b2f059d 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1979,7 +1979,7 @@ Can be used for `completion-in-region-function' by 
advicing it with an
                                                 (string= input ""))
                                       " "))
                  (file-comp-p (or (eq (completion-metadata-get metadata 
'category) 'file)
-                                  (helm-mode--in-file-completion-p)
+                                  (helm-guess-filename-at-point)
                                   ;; Assume that when `afun' and `predicate' 
are null
                                   ;; we are in filename completion.
                                   (and (null afun) (null predicate))))
@@ -2164,10 +2164,6 @@ Be sure to know what you are doing when modifying this.")
                     beg end (mapconcat 'identity (append result '("")) sep))))
         (t nil)))
 
-(defun helm-mode--in-file-completion-p ()
-  (with-helm-current-buffer
-    (run-hook-with-args-until-success 'file-name-at-point-functions)))
-
 (defun helm-mode--disable-ido-maybe (&optional from-hook)
   (when (and (boundp 'ido-everywhere) ido-everywhere)
     (remove-function read-file-name-function #'ido-read-file-name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]