From: Michael Albinus Date: Thu, 16 Aug 2018 08:04:11 +0000 (+0200) Subject: Fix Bug#32447 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5df7423b4a400140106ab86fd9c7d297e1fd176a;p=emacs.git Fix Bug#32447 * lisp/files.el (find-file-existing, find-file--read-only): Use `find-file-with-threads'. (Bug#32447) --- diff --git a/lisp/files.el b/lisp/files.el index 52e44509123..4054934b1db 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.