branch: elpa/helm
commit 990d810c4d0e8ead2f99fd2a77425cf65b8e391f
Merge: 2f76845056 5a5bdbfc40
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Merge branch 'devel'
---
 helm-files.el |  5 ++---
 helm-mode.el  | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 86e6b8a0f0..5f5fd93435 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -5916,7 +5916,6 @@ and `dired-compress-files-alist'."
                      (format "%s exists, overwrite?"
                              (abbreviate-file-name ofile)))))
       (message "Compression aborted"))
-    ;; FIXME: provide mode-line notification like in delete files async.
     (message "Compressing %d file(s) to `%s'..."
              (length ifiles) (helm-basename ofile))
     (process-put
@@ -5997,9 +5996,9 @@ and `dired-compress-files-alist'."
         (setq helm-marked-candidates nil
               helm-visible-mark-overlays nil)
         (helm-force-update
-         ;; select candidate before compress. If it can't, select candidate
-         ;; after compress.
          (let ((presel (helm-get-selection)))
+           ;; FIXME: Probably this would never happen, I see no cases here 
where
+           ;; helm-get-selection doesn't exist.
            (unless (file-exists-p presel)
              (setq presel cfile))
            (when presel
diff --git a/helm-mode.el b/helm-mode.el
index 794d24bd9e..2d8eb94720 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -2647,18 +2647,18 @@ Can be used for `completion-in-region-function' by 
advicing it with an
             (helm-completion-in-region--insert-result
              result start point end base-size))
         ;; Allow running extra property `:exit-function' (Bug#2265,
-        ;; Bug#2356). Function is called with 'exact if for a unique
-        ;; match which is exact, the return value of `try-completion'
-        ;; is t or a string ending with "/" i.e. possibly a directory
-        ;; (Bug#2274),
-        ;; otherwise it is called with 'finished.
+        ;; Bug#2356). Function is called with 'exact if the return value of
+        ;; `try-completion' is a string (possibly a directory Bug#2274 if the
+        ;; string ends with /), otherwise it is always called with 'finished.
+        ;; However it is still not clear what to use, the documentation on this
+        ;; beeing really bad (bug#2646).
         (when (and (stringp string) exit-fun)
-          (let ((tcomp (try-completion initial-input collection)))
-            (funcall exit-fun string
-                     (if (or (eq tcomp t) ; Unique.
-                             (and (stringp tcomp)
-                                  (string-match "/\\'" tcomp))) ; A directory.
-                         'exact 'finished))))
+          (funcall exit-fun string
+                   (helm-acase (try-completion initial-input collection 
predicate)
+                     ;; FIXME: Should I limit 'exact only for strings ending
+                     ;; with / ?
+                     ((guard (stringp it)) 'exact)
+                     (t 'finished))))
         (remove-hook 'helm-before-action-hook 
'helm-completion-in-region--selection)
         (customize-set-variable 'helm-completion-style 
old--helm-completion-style)
         (setq helm-completion--sorting-done nil)

Reply via email to