aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-17 19:06:12 +0000
committerRichard M. Stallman1993-07-17 19:06:12 +0000
commit5c05f56971ff9299eae2628437bf3d0fc89bd5f7 (patch)
treec7c4268da9352bb37920a403f66c03c436c5209b
parent056afaf788dbc757a538fa616ceb6afb1a0200aa (diff)
downloademacs-5c05f56971ff9299eae2628437bf3d0fc89bd5f7.tar.gz
emacs-5c05f56971ff9299eae2628437bf3d0fc89bd5f7.zip
Doc fixes; some args renamed.
-rw-r--r--lisp/view.el48
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.
106Space scrolls forward, Delete scrolls backward. 106Space scrolls forward, Delete scrolls backward.
107For list of all View commands, type ? or h while viewing. 107For list of all View commands, type ? or h while viewing.
108 108
109Calls the value of view-hook if that is non-nil." 109This 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.
126Space scrolls forward, Delete scrolls backward. 126Space scrolls forward, Delete scrolls backward.
127For list of all View commands, type ? or h while viewing. 127For list of all View commands, type ? or h while viewing.
128 128
129Calls the value of view-hook if that is non-nil." 129This 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.
145Space scrolls forward, Delete scrolls backward. 145Space scrolls forward, Delete scrolls backward.
146For list of all View commands, type ? or h while viewing. 146For list of all View commands, type ? or h while viewing.
147 147
148Calls the value of view-hook if that is non-nil." 148This 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,
157returning to original buffer when done ONLY if 157returning to original buffer when done *only* if
158prefix argument not-return is nil (as by default). 158prefix argument NOT-RETURN is nil (which is the default).
159 The usual Emacs commands are not available; instead, 159
160The usual Emacs commands are not available in View mode; instead,
160a special set of commands (mostly letters and punctuation) 161a special set of commands (mostly letters and punctuation)
161are defined for moving around in the buffer. 162are defined for moving around in the buffer.
162Space scrolls forward, Delete scrolls backward. 163Space scrolls forward, Delete scrolls backward.
163For list of all View commands, type ? or h while viewing. 164For list of all View commands, type ? or h while viewing.
164 165
165Calls the value of view-hook if that is non-nil." 166This 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.
204C-l recenters the screen. 205C-l recenters the screen.
205q or C-c exit view-mode and return to previous buffer. 206q or C-c exit view-mode and return to previous buffer.
206 207
207Entry to this mode calls the value of view-hook if non-nil. 208Entry 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.
321Display is centered at LINE. Sets mark at starting position and pushes 323Display is centered at LINE. Sets mark at starting position and pushes
322mark ring." 324mark 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.
384Displays line found at center of window. REGEXP is remembered for 386Displays line found at center of window. REGEXP is remembered for
385searching with \\[View-search-last-regexp-forward] and \\[View-search-last-regexp-backward]. Sets mark at starting position and pushes mark ring." 387searching 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.
394Displays line found at center of window. REGEXP is remembered for 396Displays line found at center of window. REGEXP is remembered for
395searching with \\[View-search-last-regexp-forward] and \\[View-search-last-regexp-backward]. Sets mark at starting position and pushes mark ring." 397searching 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.
401Displays line found at center of window. Sets mark at starting position 403Displays line found at center of window. Sets mark at starting position
402and pushes mark ring." 404and 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.
408Displays line found at center of window. Sets mark at starting position and 410Displays line found at center of window. Sets mark at starting position and
409pushes mark ring." 411pushes 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.