aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1995-11-24 23:18:22 +0000
committerRichard M. Stallman1995-11-24 23:18:22 +0000
commitbc15ba424c74d7bfdfef793cc344300db02b01a0 (patch)
tree6db427c4831b36f99c2de682934efcabbd410d29 /lisp
parent5b7a91bb28d9ad1389530e85aa468793bc14c95f (diff)
downloademacs-bc15ba424c74d7bfdfef793cc344300db02b01a0.tar.gz
emacs-bc15ba424c74d7bfdfef793cc344300db02b01a0.zip
(view-mode, view-mode-enter): Doc changes.
(view-mode-map): Change h and ? to use describe-mode. Delete binding of help char. (view-mode-enter): Use describe-mode in message.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/view.el30
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/view.el b/lisp/view.el
index d84198b8435..0823cc1e67b 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -87,9 +87,8 @@ This is local in each buffer, once it is used.")
87 (define-key view-mode-map "'" 'View-back-to-mark) 87 (define-key view-mode-map "'" 'View-back-to-mark)
88 (define-key view-mode-map "@" 'View-back-to-mark) 88 (define-key view-mode-map "@" 'View-back-to-mark)
89 (define-key view-mode-map "x" 'exchange-point-and-mark) 89 (define-key view-mode-map "x" 'exchange-point-and-mark)
90 (define-key view-mode-map "h" 'Helper-describe-bindings) 90 (define-key view-mode-map "h" 'describe-mode)
91 (define-key view-mode-map "?" 'Helper-describe-bindings) 91 (define-key view-mode-map "?" 'describe-mode)
92 (define-key view-mode-map (char-to-string help-char) 'help-command)
93 (define-key view-mode-map "s" 'isearch-forward) 92 (define-key view-mode-map "s" 'isearch-forward)
94 (define-key view-mode-map "r" 'isearch-backward) 93 (define-key view-mode-map "r" 'isearch-backward)
95 (define-key view-mode-map "/" 'View-search-regexp-forward) 94 (define-key view-mode-map "/" 'View-search-regexp-forward)
@@ -185,20 +184,13 @@ This command runs the normal hook `view-mode-hook'."
185If you use this function to turn on View mode, 184If you use this function to turn on View mode,
186\"exiting\" View mode does nothing except turn View mode off. 185\"exiting\" View mode does nothing except turn View mode off.
187The other way to turn View mode on is by calling 186The other way to turn View mode on is by calling
188`view-mode-enter'." 187`view-mode-enter'.
189 (interactive "P")
190 (setq view-mode
191 (if (null arg)
192 (not view-mode)
193 (> (prefix-numeric-value arg) 0)))
194 (force-mode-line-update))
195 188
196(defun view-mode-enter (&optional prev-buffer action)
197 "Minor mode for viewing text but not editing it.
198Letters do not insert themselves. Instead these commands are provided. 189Letters do not insert themselves. Instead these commands are provided.
199Most commands take prefix arguments. Commands dealing with lines 190Most commands take prefix arguments. Commands dealing with lines
200default to \"scroll size\" lines (initially size of window). 191default to \"scroll size\" lines (initially size of window).
201Search commands default to a repeat count of one. 192Search commands default to a repeat count of one.
193
202M-< or < move to beginning of buffer. 194M-< or < move to beginning of buffer.
203M-> or > move to end of buffer. 195M-> or > move to end of buffer.
204C-v or Space scroll forward lines. 196C-v or Space scroll forward lines.
@@ -226,7 +218,17 @@ C-r or r do reverse incremental search.
226C-n moves down lines vertically. 218C-n moves down lines vertically.
227C-p moves upward lines vertically. 219C-p moves upward lines vertically.
228C-l recenters the screen. 220C-l recenters the screen.
229q exit view-mode and return to previous buffer. 221q exit view-mode and return to previous buffer."
222 (interactive "P")
223 (setq view-mode
224 (if (null arg)
225 (not view-mode)
226 (> (prefix-numeric-value arg) 0)))
227 (force-mode-line-update))
228
229(defun view-mode-enter (&optional prev-buffer action)
230 "Enter View mode, a Minor mode for viewing text but not editing it.
231See the function `view-mode' for more details.
230 232
231This function runs the normal hook `view-mode-hook'. 233This function runs the normal hook `view-mode-hook'.
232 234
@@ -261,7 +263,7 @@ This function runs the normal hook `view-mode-hook'.
261 (run-hooks 'view-mode-hook) 263 (run-hooks 'view-mode-hook)
262 (message 264 (message
263 (substitute-command-keys 265 (substitute-command-keys
264 "Type \\[help-command] for help, \\[Helper-describe-bindings] for commands, \\[view-exit] to quit."))) 266 "Type \\[help-command] for help, \\[describe-mode] for commands, \\[view-exit] to quit.")))
265 267
266(defun view-exit () 268(defun view-exit ()
267 "Exit from view-mode. 269 "Exit from view-mode.