]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Bug#32447
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 16 Aug 2018 08:04:11 +0000 (10:04 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 16 Aug 2018 08:04:11 +0000 (10:04 +0200)
* lisp/files.el (find-file-existing, find-file--read-only):
Use `find-file-with-threads'.  (Bug#32447)

lisp/files.el

index 52e4450912358aaba24a6a5d1d884104ca6bdf41..4054934b1dbbf2b6810eb4112039a47db08177a1 100644 (file)
@@ -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.