summaryrefslogtreecommitdiff
path: root/helm-mode.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thievol@posteo.net>2020-09-08 16:57:16 +0200
committerThierry Volpiatto <thievol@posteo.net>2020-09-08 16:57:16 +0200
commit54727f4bcbb1861ecceab416f695467bb3b566ad (patch)
tree5e99a1fd61bb4849e0cdb6d2b59937587511e67b /helm-mode.el
parent8d5c3074ae6da2ffc5c8b01d330ff7f5ee02a3ee (diff)
Check use-file-dialog value
Diffstat (limited to 'helm-mode.el')
-rw-r--r--helm-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/helm-mode.el b/helm-mode.el
index 8761abb8..c4b2e7e9 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1389,6 +1389,8 @@ Don't use it directly, use instead `helm-read-file-name' in your programs."
;; in helm specialized functions.
(others-args (append def-args (list str-command buf-name)))
(reading-directory (eq predicate 'file-directory-p))
+ (use-dialog (and (string= str-command "menu-find-file-existing")
+ use-file-dialog))
helm-completion-mode-start-message ; Be quiet
helm-completion-mode-quit-message ; Same here
add-to-history fname)
@@ -1417,13 +1419,13 @@ Don't use it directly, use instead `helm-read-file-name' in your programs."
;; If we use now `read-file-name' we MUST turn off `helm-mode'
;; to avoid infinite recursion and CRASH. It will be reenabled on exit.
(when (or (memq def-com '(read-file-name ido-read-file-name))
- (string= str-command "menu-find-file-existing")
+ use-dialog
(and (stringp str-defcom)
(not (string-match "^helm" str-defcom))))
(helm-mode -1))
(unwind-protect
(setq fname
- (cond ((string= str-command "menu-find-file-existing")
+ (cond (use-dialog
(let ((dialog-mustmatch
(not (memq mustmatch
'(nil confirm confirm-after-completion)))))