diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 4cc090bca94..ad749557987 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -3137,10 +3137,7 @@ files will be visited." (interactive (find-file-read-args "Find file read-only in other tab: " (confirm-nonexistent-file-or-buffer))) - (find-file--read-only (lambda (filename wildcards) - (window-buffer - (find-file-other-tab filename wildcards))) - filename wildcards)) + (find-file--read-only #'find-file-other-tab filename wildcards)) (defun other-tab-prefix () "Display the buffer of the next command in a new tab.