emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/view.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/view.el
Date: Wed, 09 Jul 2003 12:16:54 -0400

Index: emacs/lisp/view.el
diff -c emacs/lisp/view.el:1.70 emacs/lisp/view.el:1.71
*** emacs/lisp/view.el:1.70     Sat May 31 13:53:24 2003
--- emacs/lisp/view.el  Wed Jul  9 12:16:54 2003
***************
*** 243,251 ****
  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))))
  
  ;;;###autoload
  (defun view-file-other-window (file)
--- 243,257 ----
  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))
!       (buffer (find-file-noselect file)))
!     (if (eq (with-current-buffer buffer
!             (get major-mode 'mode-class))
!           'special)
!       (progn
!         (switch-to-buffer buffer)
!         (message "Not using View mode because the major mode is special"))
!       (view-buffer buffer (and (not had-a-buf) 'kill-buffer)))))
  
  ;;;###autoload
  (defun view-file-other-window (file)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]