diff options
| author | Richard M. Stallman | 1995-11-24 23:18:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-24 23:18:22 +0000 |
| commit | bc15ba424c74d7bfdfef793cc344300db02b01a0 (patch) | |
| tree | 6db427c4831b36f99c2de682934efcabbd410d29 /lisp | |
| parent | 5b7a91bb28d9ad1389530e85aa468793bc14c95f (diff) | |
| download | emacs-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.el | 30 |
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'." | |||
| 185 | If you use this function to turn on View mode, | 184 | If 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. |
| 187 | The other way to turn View mode on is by calling | 186 | The 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. | ||
| 198 | Letters do not insert themselves. Instead these commands are provided. | 189 | Letters do not insert themselves. Instead these commands are provided. |
| 199 | Most commands take prefix arguments. Commands dealing with lines | 190 | Most commands take prefix arguments. Commands dealing with lines |
| 200 | default to \"scroll size\" lines (initially size of window). | 191 | default to \"scroll size\" lines (initially size of window). |
| 201 | Search commands default to a repeat count of one. | 192 | Search commands default to a repeat count of one. |
| 193 | |||
| 202 | M-< or < move to beginning of buffer. | 194 | M-< or < move to beginning of buffer. |
| 203 | M-> or > move to end of buffer. | 195 | M-> or > move to end of buffer. |
| 204 | C-v or Space scroll forward lines. | 196 | C-v or Space scroll forward lines. |
| @@ -226,7 +218,17 @@ C-r or r do reverse incremental search. | |||
| 226 | C-n moves down lines vertically. | 218 | C-n moves down lines vertically. |
| 227 | C-p moves upward lines vertically. | 219 | C-p moves upward lines vertically. |
| 228 | C-l recenters the screen. | 220 | C-l recenters the screen. |
| 229 | q exit view-mode and return to previous buffer. | 221 | q 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. | ||
| 231 | See the function `view-mode' for more details. | ||
| 230 | 232 | ||
| 231 | This function runs the normal hook `view-mode-hook'. | 233 | This 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. |