This command runs the normal hook `view-mode-hook'."
(interactive "fView file: ")
+ (unless (file-exists-p file) (error "%s does not exist" file))
(let ((had-a-buf (get-file-buffer file)))
(view-buffer (find-file-noselect file)
(and (not had-a-buf) 'kill-buffer))))
This command runs the normal hook `view-mode-hook'."
(interactive "fIn other window view file: ")
+ (unless (file-exists-p file) (error "%s does not exist" file))
(let ((had-a-buf (get-file-buffer file)))
(view-buffer-other-window (find-file-noselect file) nil
(and (not had-a-buf) 'kill-buffer))))
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)))
(view-buffer-other-frame (find-file-noselect file) nil
(and (not had-a-buf) 'kill-buffer))))