;;; view.el --- peruse file or buffer without editing
;; Copyright (C) 1985, 1989, 1994, 1995, 1997, 2000, 2001, 2002,
-;; 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: Inge Frick <inge@nada.kth.se>
:type 'boolean
:group 'view)
+(defcustom view-inhibit-help-message nil
+ "*Non-nil inhibits the help message showed upon entering View mode."
+ :type 'boolean
+ :group 'view
+ :version "22.1")
+
;;;###autoload
(defvar view-mode nil
"Non-nil if View mode is enabled.
\\[View-kill-and-leave] quit View mode, kill current buffer and go back to other buffer.
The effect of \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] depends on how view-mode was entered. If it was
-entered by view-file, view-file-other-window or view-file-other-frame
-\(\\[view-file], \\[view-file-other-window], \\[view-file-other-frame] or the dired mode v command), then \\[View-quit] will
-try to kill the current buffer. If view-mode was entered from another buffer
-as is done by View-buffer, View-buffer-other-window, View-buffer-other frame,
-View-file, View-file-other-window or View-file-other-frame then \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave]
-will return to that buffer.
+entered by view-file, view-file-other-window, view-file-other-frame, or
+\\[dired-view-file] \(\\[view-file], \\[view-file-other-window],
+\\[view-file-other-frame], or the Dired mode v command),
+then \\[View-quit] will try to kill the current buffer.
+If view-mode was entered from another buffer, by \\[view-buffer],
+\\[view-buffer-other-window], \\[view-buffer-other frame], \\[view-file],
+\\[view-file-other-window], or \\[view-file-other-frame],
+then \\[View-leave] , \\[View-quit] and \\[View-kill-and-leave] will return to that buffer.
Entry to view-mode runs the normal hook `view-mode-hook'."
(interactive "P")
(unless view-mode ; Do nothing if already in view mode.
(view-mode-enable)
(force-mode-line-update)
- (message "%s"
- (substitute-command-keys "\
-View mode: type \\[help-command] for help, \\[describe-mode] for commands, \\[View-quit] to quit."))))
+ (unless view-inhibit-help-message
+ (message "%s"
+ (substitute-command-keys "\
+View mode: type \\[help-command] for help, \\[describe-mode] for commands, \\[View-quit] to quit.")))))
\f
(defun view-mode-exit (&optional return-to-alist exit-action all-win)
"Exit View mode in various ways, depending on optional arguments.