- "Toggle View mode.
-If you use this function to turn on View mode,
-\"exiting\" View mode does nothing except turn View mode off.
-The other way to turn View mode on is by calling
-`view-mode-enter'.
-
-Letters do not insert themselves. Instead these commands are provided.
-Most commands take prefix arguments. Commands dealing with lines
-default to \"scroll size\" lines (initially size of window).
-Search commands default to a repeat count of one.
-
-M-< or < move to beginning of buffer.
-M-> or > move to end of buffer.
-C-v or Space scroll forward lines.
-M-v or DEL scroll backward lines.
-CR or LF scroll forward one line (backward with prefix argument).
-z like Space except set number of lines for further
- scrolling commands to scroll by.
-C-u and Digits provide prefix arguments. `-' denotes negative argument.
-= prints the current line number.
-g goes to line given by prefix argument.
-/ or M-C-s searches forward for regular expression
-\\ or M-C-r searches backward for regular expression.
-n searches forward for last regular expression.
-p searches backward for last regular expression.
-C-@ or . set the mark.
-x exchanges point and mark.
-C-s or s do forward incremental search.
-C-r or r do reverse incremental search.
-@ or ' return to mark and pops mark ring.
- Mark ring is pushed at start of every
- successful search and when jump to line to occurs.
- The mark is set on jump to buffer start or end.
-? or h provide help message (list of commands).
-\\[help-command] provides help (list of commands or description of a command).
-C-n moves down lines vertically.
-C-p moves upward lines vertically.
-C-l recenters the screen.
-q exit view-mode and return to previous buffer."
+ ;; In the following documentation string we have to use some explicit key
+ ;; bindings instead of using the \\[] construction. The reason for this
+ ;; is that most commands have more than one key binding.
+ "Toggle View mode, a minor mode for viewing text but not editing it.
+With ARG, turn View mode on iff ARG is positive.
+
+Emacs commands that do not change the buffer contents are available as usual.
+Kill commands insert text in kill buffers but do not delete. Other commands
+\(among them most letters and punctuation) beep and tell that the buffer is
+read-only.
+\\<view-mode-map>
+The following additional commands are provided. Most commands take prefix
+arguments. Page commands default to \"page size\" lines which is almost a whole
+window full, or number of lines set by \\[View-scroll-page-forward-set-page-size] or \\[View-scroll-page-backward-set-page-size]. Half page commands default to
+and set \"half page size\" lines which initially is half a window full. Search
+commands default to a repeat count of one.
+
+H, h, ? This message.
+Digits provide prefix arguments.
+\\[negative-argument] negative prefix argument.
+\\[beginning-of-buffer] move to the beginning of buffer.
+> move to the end of buffer.
+\\[View-scroll-to-buffer-end] scroll so that buffer end is at last line of window.
+SPC scroll forward \"page size\" lines.
+ With prefix scroll forward prefix lines.
+DEL scroll backward \"page size\" lines.
+ With prefix scroll backward prefix lines.
+\\[View-scroll-page-forward-set-page-size] like \\[View-scroll-page-forward] but with prefix sets \"page size\" to prefix.
+\\[View-scroll-page-backward-set-page-size] like \\[View-scroll-page-backward] but with prefix sets \"page size\" to prefix.
+\\[View-scroll-half-page-forward] scroll forward \"half page size\" lines. With prefix, sets
+ \"half page size\" to prefix lines and scrolls forward that much.
+\\[View-scroll-half-page-backward] scroll backward \"half page size\" lines. With prefix, sets
+ \"half page size\" to prefix lines and scrolls backward that much.
+RET, LFD scroll forward one line. With prefix scroll forward prefix line(s).
+y scroll backward one line. With prefix scroll backward prefix line(s).
+\\[View-revert-buffer-scroll-page-forward] revert-buffer if necessary and scroll forward.
+ Use this to view a changing file.
+\\[what-line] prints the current line number.
+\\[View-goto-percent] goes prefix argument (default 100) percent into buffer.
+\\[View-goto-line] goes to line given by prefix argument (default first line).
+. set the mark.
+x exchanges point and mark.
+\\[View-back-to-mark] return to mark and pops mark ring.
+ Mark ring is pushed at start of every successful search and when
+ jump to line occurs. The mark is set on jump to buffer start or end.
+\\[point-to-register] save current position in character register.
+' go to position saved in character register.
+s do forward incremental search.
+r do reverse incremental search.
+\\[View-search-regexp-forward] searches forward for regular expression, starting after current page.
+ ! and @ have a special meaning at the beginning of the regexp.
+ ! means search for a line with no match for regexp. @ means start
+ search at beginning (end for backward search) of buffer.
+\\ searches backward for regular expression, starting before current page.
+\\[View-search-last-regexp-forward] searches forward for last regular expression.
+p searches backward for last regular expression.
+\\[View-quit] quit View mode, restoring this window and buffer to previous state.
+ \\[View-quit] is the normal way to leave view mode.
+\\[View-exit] exit View mode but stay in current buffer. Use this if you started
+ viewing a buffer (file) and find out you want to edit it.
+ This command restores the previous read-only status of the buffer.
+\\[View-exit-and-edit] exit View mode, and make the current buffer editable
+ even if it was not editable before entry to View mode.
+\\[View-quit-all] quit View mode, restoring all windows to previous state.
+\\[View-leave] quit View mode and maybe switch buffers, but don't kill this buffer.
+\\[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, 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'."