emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/tramp-thread-safe 5df7423: Fix Bug#32447


From: Michael Albinus
Subject: [Emacs-diffs] feature/tramp-thread-safe 5df7423: Fix Bug#32447
Date: Thu, 16 Aug 2018 04:04:22 -0400 (EDT)

branch: feature/tramp-thread-safe
commit 5df7423b4a400140106ab86fd9c7d297e1fd176a
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix Bug#32447
    
    * lisp/files.el (find-file-existing, find-file--read-only):
    Use `find-file-with-threads'.  (Bug#32447)
---
 lisp/files.el | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 52e4450..4054934 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1732,8 +1732,9 @@ prior the command invocation."
    (if (and (not (called-interactively-p 'interactive))
            (not (file-exists-p filename)))
        (error "%s does not exist" filename)
-     (find-file filename nil async)
-     (current-buffer)))
+     (find-file-with-threads filename async
+       (find-file filename)
+       (current-buffer))))
 
 (defun find-file--read-only (fun filename wildcards async)
   (unless (or (and wildcards find-file-wildcards
@@ -1741,10 +1742,11 @@ prior the command invocation."
                   (string-match "[[*?]" filename))
              (file-exists-p filename))
     (error "%s does not exist" filename))
-  (let ((value (funcall fun filename wildcards async)))
-    (mapc (lambda (b) (with-current-buffer b (read-only-mode 1)))
-         (if (listp value) value (list value)))
-    value))
+  (find-file-with-threads filename async
+    (let ((value (funcall fun filename wildcards)))
+      (mapc (lambda (b) (with-current-buffer b (read-only-mode 1)))
+           (if (listp value) value (list value)))
+      value)))
 
 (defun find-file-read-only (filename &optional wildcards async)
   "Edit file FILENAME but don't allow changes.



reply via email to

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