242 |
|
|
243 |
This command runs the normal hook `view-mode-hook'." |
This command runs the normal hook `view-mode-hook'." |
244 |
(interactive "fView file: ") |
(interactive "fView file: ") |
245 |
|
(unless (file-exists-p file) (error "%s does not exist" file)) |
246 |
(let ((had-a-buf (get-file-buffer file))) |
(let ((had-a-buf (get-file-buffer file))) |
247 |
(view-buffer (find-file-noselect file) |
(view-buffer (find-file-noselect file) |
248 |
(and (not had-a-buf) 'kill-buffer)))) |
(and (not had-a-buf) 'kill-buffer)))) |
259 |
|
|
260 |
This command runs the normal hook `view-mode-hook'." |
This command runs the normal hook `view-mode-hook'." |
261 |
(interactive "fIn other window view file: ") |
(interactive "fIn other window view file: ") |
262 |
|
(unless (file-exists-p file) (error "%s does not exist" file)) |
263 |
(let ((had-a-buf (get-file-buffer file))) |
(let ((had-a-buf (get-file-buffer file))) |
264 |
(view-buffer-other-window (find-file-noselect file) nil |
(view-buffer-other-window (find-file-noselect file) nil |
265 |
(and (not had-a-buf) 'kill-buffer)))) |
(and (not had-a-buf) 'kill-buffer)))) |
276 |
|
|
277 |
This command runs the normal hook `view-mode-hook'." |
This command runs the normal hook `view-mode-hook'." |
278 |
(interactive "fIn other frame view file: ") |
(interactive "fIn other frame view file: ") |
279 |
|
(unless (file-exists-p file) (error "%s does not exist" file)) |
280 |
(let ((had-a-buf (get-file-buffer file))) |
(let ((had-a-buf (get-file-buffer file))) |
281 |
(view-buffer-other-frame (find-file-noselect file) nil |
(view-buffer-other-frame (find-file-noselect file) nil |
282 |
(and (not had-a-buf) 'kill-buffer)))) |
(and (not had-a-buf) 'kill-buffer)))) |