diff options
| author | Richard M. Stallman | 1993-07-17 19:06:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-07-17 19:06:12 +0000 |
| commit | 5c05f56971ff9299eae2628437bf3d0fc89bd5f7 (patch) | |
| tree | c7c4268da9352bb37920a403f66c03c436c5209b | |
| parent | 056afaf788dbc757a538fa616ceb6afb1a0200aa (diff) | |
| download | emacs-5c05f56971ff9299eae2628437bf3d0fc89bd5f7.tar.gz emacs-5c05f56971ff9299eae2628437bf3d0fc89bd5f7.zip | |
Doc fixes; some args renamed.
| -rw-r--r-- | lisp/view.el | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/lisp/view.el b/lisp/view.el index c510d419fa1..4dad422d0c1 100644 --- a/lisp/view.el +++ b/lisp/view.el | |||
| @@ -106,7 +106,7 @@ are defined for moving around in the buffer. | |||
| 106 | Space scrolls forward, Delete scrolls backward. | 106 | Space scrolls forward, Delete scrolls backward. |
| 107 | For list of all View commands, type ? or h while viewing. | 107 | For list of all View commands, type ? or h while viewing. |
| 108 | 108 | ||
| 109 | Calls the value of view-hook if that is non-nil." | 109 | This command runs the normal hook `view-hook'." |
| 110 | (interactive "fView file: ") | 110 | (interactive "fView file: ") |
| 111 | (let ((old-buf (current-buffer)) | 111 | (let ((old-buf (current-buffer)) |
| 112 | (had-a-buf (get-file-buffer file-name)) | 112 | (had-a-buf (get-file-buffer file-name)) |
| @@ -126,7 +126,7 @@ are defined for moving around in the buffer. | |||
| 126 | Space scrolls forward, Delete scrolls backward. | 126 | Space scrolls forward, Delete scrolls backward. |
| 127 | For list of all View commands, type ? or h while viewing. | 127 | For list of all View commands, type ? or h while viewing. |
| 128 | 128 | ||
| 129 | Calls the value of view-hook if that is non-nil." | 129 | This command runs the normal hook `view-hook'." |
| 130 | (interactive "fView file: ") | 130 | (interactive "fView file: ") |
| 131 | (let ((old-arrangement (current-window-configuration)) | 131 | (let ((old-arrangement (current-window-configuration)) |
| 132 | (had-a-buf (get-file-buffer file-name)) | 132 | (had-a-buf (get-file-buffer file-name)) |
| @@ -145,7 +145,7 @@ are defined for moving around in the buffer. | |||
| 145 | Space scrolls forward, Delete scrolls backward. | 145 | Space scrolls forward, Delete scrolls backward. |
| 146 | For list of all View commands, type ? or h while viewing. | 146 | For list of all View commands, type ? or h while viewing. |
| 147 | 147 | ||
| 148 | Calls the value of view-hook if that is non-nil." | 148 | This command runs the normal hook `view-hook'." |
| 149 | (interactive "bView buffer: ") | 149 | (interactive "bView buffer: ") |
| 150 | (let ((old-buf (current-buffer))) | 150 | (let ((old-buf (current-buffer))) |
| 151 | (switch-to-buffer buffer-name t) | 151 | (switch-to-buffer buffer-name t) |
| @@ -154,15 +154,16 @@ Calls the value of view-hook if that is non-nil." | |||
| 154 | ;;;###autoload | 154 | ;;;###autoload |
| 155 | (defun view-buffer-other-window (buffer-name not-return) | 155 | (defun view-buffer-other-window (buffer-name not-return) |
| 156 | "View BUFFER in View mode in another window, | 156 | "View BUFFER in View mode in another window, |
| 157 | returning to original buffer when done ONLY if | 157 | returning to original buffer when done *only* if |
| 158 | prefix argument not-return is nil (as by default). | 158 | prefix argument NOT-RETURN is nil (which is the default). |
| 159 | The usual Emacs commands are not available; instead, | 159 | |
| 160 | The usual Emacs commands are not available in View mode; instead, | ||
| 160 | a special set of commands (mostly letters and punctuation) | 161 | a special set of commands (mostly letters and punctuation) |
| 161 | are defined for moving around in the buffer. | 162 | are defined for moving around in the buffer. |
| 162 | Space scrolls forward, Delete scrolls backward. | 163 | Space scrolls forward, Delete scrolls backward. |
| 163 | For list of all View commands, type ? or h while viewing. | 164 | For list of all View commands, type ? or h while viewing. |
| 164 | 165 | ||
| 165 | Calls the value of view-hook if that is non-nil." | 166 | This command runs the normal hook `view-hook'." |
| 166 | (interactive "bView buffer:\nP") | 167 | (interactive "bView buffer:\nP") |
| 167 | (let ((return-to (and not-return (current-window-configuration)))) | 168 | (let ((return-to (and not-return (current-window-configuration)))) |
| 168 | (switch-to-buffer-other-window buffer-name) | 169 | (switch-to-buffer-other-window buffer-name) |
| @@ -204,7 +205,8 @@ C-p moves upward lines vertically. | |||
| 204 | C-l recenters the screen. | 205 | C-l recenters the screen. |
| 205 | q or C-c exit view-mode and return to previous buffer. | 206 | q or C-c exit view-mode and return to previous buffer. |
| 206 | 207 | ||
| 207 | Entry to this mode calls the value of view-hook if non-nil. | 208 | Entry to this mode runs the normal hook `view-hook'. |
| 209 | |||
| 208 | \\{view-mode-map}" | 210 | \\{view-mode-map}" |
| 209 | ; Not interactive because dangerous things happen | 211 | ; Not interactive because dangerous things happen |
| 210 | ; if you call it without passing a buffer as argument | 212 | ; if you call it without passing a buffer as argument |
| @@ -301,7 +303,7 @@ If you viewed a file that was not present in Emacs, its buffer is killed." | |||
| 301 | (min (view-window-size) (or view-scroll-size (view-window-size)))) | 303 | (min (view-window-size) (or view-scroll-size (view-window-size)))) |
| 302 | 304 | ||
| 303 | (defvar view-hook nil | 305 | (defvar view-hook nil |
| 304 | "If non-nil, its value is called when viewing buffer or file.") | 306 | "Normal hook run when starting to view a buffer or file.") |
| 305 | 307 | ||
| 306 | ;(defun view-last-command (&optional who what) | 308 | ;(defun view-last-command (&optional who what) |
| 307 | ; (setq view-last-command-entry this-command) | 309 | ; (setq view-last-command-entry this-command) |
| @@ -317,7 +319,7 @@ If you viewed a file that was not present in Emacs, its buffer is killed." | |||
| 317 | ; (setq this-command view-last-command-entry)) | 319 | ; (setq this-command view-last-command-entry)) |
| 318 | 320 | ||
| 319 | (defun View-goto-line (&optional line) | 321 | (defun View-goto-line (&optional line) |
| 320 | "Move to LINE in View mode. | 322 | "Move to line LINE in View mode. |
| 321 | Display is centered at LINE. Sets mark at starting position and pushes | 323 | Display is centered at LINE. Sets mark at starting position and pushes |
| 322 | mark ring." | 324 | mark ring." |
| 323 | (interactive "p") | 325 | (interactive "p") |
| @@ -379,36 +381,36 @@ Arg is number of lines to scroll." | |||
| 379 | (- (prefix-numeric-value lines)) | 381 | (- (prefix-numeric-value lines)) |
| 380 | (- (view-scroll-size))))) | 382 | (- (view-scroll-size))))) |
| 381 | 383 | ||
| 382 | (defun View-search-regexp-forward (times regexp) | 384 | (defun View-search-regexp-forward (n regexp) |
| 383 | "Search forward for NTH occurrence of REGEXP in View mode. | 385 | "Search forward for Nth occurrence of REGEXP. |
| 384 | Displays line found at center of window. REGEXP is remembered for | 386 | Displays line found at center of window. REGEXP is remembered for |
| 385 | searching with \\[View-search-last-regexp-forward] and \\[View-search-last-regexp-backward]. Sets mark at starting position and pushes mark ring." | 387 | searching with \\[View-search-last-regexp-forward] and \\[View-search-last-regexp-backward]. Sets mark at starting position and pushes mark ring." |
| 386 | (interactive "p\nsSearch forward (regexp): ") | 388 | (interactive "p\nsSearch forward (regexp): ") |
| 387 | (if (> (length regexp) 0) | 389 | (if (> (length regexp) 0) |
| 388 | (progn | 390 | (progn |
| 389 | ;(view-last-command 'View-search-last-regexp-forward times) | 391 | ;(view-last-command 'View-search-last-regexp-forward n) |
| 390 | (view-search times regexp)))) | 392 | (view-search n regexp)))) |
| 391 | 393 | ||
| 392 | (defun View-search-regexp-backward (times regexp) | 394 | (defun View-search-regexp-backward (n regexp) |
| 393 | "Search backward from window start for NTH instance of REGEXP in View mode. | 395 | "Search backward from window start for Nth instance of REGEXP. |
| 394 | Displays line found at center of window. REGEXP is remembered for | 396 | Displays line found at center of window. REGEXP is remembered for |
| 395 | searching with \\[View-search-last-regexp-forward] and \\[View-search-last-regexp-backward]. Sets mark at starting position and pushes mark ring." | 397 | searching with \\[View-search-last-regexp-forward] and \\[View-search-last-regexp-backward]. Sets mark at starting position and pushes mark ring." |
| 396 | (interactive "p\nsSearch backward (regexp): ") | 398 | (interactive "p\nsSearch backward (regexp): ") |
| 397 | (View-search-regexp-forward (- times) regexp)) | 399 | (View-search-regexp-forward (- n) regexp)) |
| 398 | 400 | ||
| 399 | (defun View-search-last-regexp-forward (times) | 401 | (defun View-search-last-regexp-forward (n) |
| 400 | "Search forward from window end for NTH instance of last regexp in View mode. | 402 | "Search forward from window end for Nth instance of last regexp. |
| 401 | Displays line found at center of window. Sets mark at starting position | 403 | Displays line found at center of window. Sets mark at starting position |
| 402 | and pushes mark ring." | 404 | and pushes mark ring." |
| 403 | (interactive "p") | 405 | (interactive "p") |
| 404 | (View-search-regexp-forward times view-last-regexp)) | 406 | (View-search-regexp-forward n view-last-regexp)) |
| 405 | 407 | ||
| 406 | (defun View-search-last-regexp-backward (times) | 408 | (defun View-search-last-regexp-backward (n) |
| 407 | "Search backward from window start for NTH instance of last regexp in View mode. | 409 | "Search backward from window start for Nth instance of last regexp. |
| 408 | Displays line found at center of window. Sets mark at starting position and | 410 | Displays line found at center of window. Sets mark at starting position and |
| 409 | pushes mark ring." | 411 | pushes mark ring." |
| 410 | (interactive "p") | 412 | (interactive "p") |
| 411 | (View-search-regexp-backward times view-last-regexp)) | 413 | (View-search-regexp-backward n view-last-regexp)) |
| 412 | 414 | ||
| 413 | (defun View-back-to-mark (&optional ignore) | 415 | (defun View-back-to-mark (&optional ignore) |
| 414 | "Return to last mark set in View mode, else beginning of file. | 416 | "Return to last mark set in View mode, else beginning of file. |