Function: view-file-other-frame
view-file-other-frame is an autoloaded, interactive and byte-compiled
function defined in view.el.gz.
Signature
(view-file-other-frame FILE)
Documentation
View FILE in View mode in another frame.
When done, kill the buffer visiting FILE if unmodified and if it wasn't visited before; also, maybe delete other frame and/or return to previous buffer.
Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing.
This command runs the normal hook view-mode-hook.
Probably introduced at or before Emacs version 20.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/view.el.gz
;;;###autoload
(defun view-file-other-frame (file)
"View FILE in View mode in another frame.
When done, kill the buffer visiting FILE if unmodified and if it wasn't
visited before; also, maybe delete other frame and/or return to previous
buffer.
Emacs commands editing the buffer contents are not available; instead,
a special set of commands (mostly letters and punctuation)
are defined for moving around in the buffer.
Space scrolls forward, Delete scrolls backward.
For a list of all View commands, type H or h while viewing.
This command runs the normal hook `view-mode-hook'."
(interactive "fIn other frame view file: ")
(unless (file-exists-p file) (error "%s does not exist" file))
(let ((had-a-buf (get-file-buffer file))
(buf-to-view (find-file-noselect file)))
(view-buffer-other-frame buf-to-view nil
(and (not had-a-buf)
'kill-buffer-if-not-modified))))