/[emacs]/emacs/lisp/view.el
ViewVC logotype

Diff of /emacs/lisp/view.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70 by monnier, Sat May 31 17:53:24 2003 UTC revision 1.71 by rms, Wed Jul 9 16:16:54 2003 UTC
# Line 243  For list of all View commands, type H or Line 243  For list of all View commands, type H or
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))    (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)          (buffer (find-file-noselect file)))
248                   (and (not had-a-buf) 'kill-buffer))))      (if (eq (with-current-buffer buffer
249                  (get major-mode 'mode-class))
250                'special)
251            (progn
252              (switch-to-buffer buffer)
253              (message "Not using View mode because the major mode is special"))
254          (view-buffer buffer (and (not had-a-buf) 'kill-buffer)))))
255    
256  ;;;###autoload  ;;;###autoload
257  (defun view-file-other-window (file)  (defun view-file-other-window (file)

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26