Function: find-file-read-only-other-window

find-file-read-only-other-window is an interactive and byte-compiled function defined in files.el.gz.

Signature

(find-file-read-only-other-window FILENAME &optional WILDCARDS)

Documentation

Edit file FILENAME in another window but don't allow changes.

Like C-x 4 C-f (find-file-other-window), but marks buffer as read-only. Use C-x C-q (read-only-mode) to permit editing. If this command needs to split the current window, it by default obeys the user options split-height-threshold and split-width-threshold, when it decides whether to split the window horizontally or vertically.

Probably introduced at or before Emacs version 19.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun find-file-read-only-other-window (filename &optional wildcards)
  "Edit file FILENAME in another window but don't allow changes.
Like \\[find-file-other-window], but marks buffer as read-only.
Use \\[read-only-mode] to permit editing.
If this command needs to split the current window, it by default obeys
the user options `split-height-threshold' and `split-width-threshold',
when it decides whether to split the window horizontally or vertically."
  (interactive
   (find-file-read-args "Find file read-only other window: "
                        (confirm-nonexistent-file-or-buffer)))
  (find-file--read-only #'find-file-other-window filename wildcards))