comparison lisp/view.el @ 909:4c6cdb66c74c

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Mon, 03 Aug 1992 02:02:37 +0000
parents 113281b361ec
children 1dac458b5117
comparison
equal deleted inserted replaced
908:94eb4344341b 909:4c6cdb66c74c
285 (if (and (eq (key-binding "\C-h") 'Helper-help) 285 (if (and (eq (key-binding "\C-h") 'Helper-help)
286 (eq (key-binding "?") 'Helper-describe-bindings) 286 (eq (key-binding "?") 'Helper-describe-bindings)
287 (eq (key-binding "\C-c") 'view-exit)) 287 (eq (key-binding "\C-c") 'view-exit))
288 "Type C-h for help, ? for commands, C-c to quit" 288 "Type C-h for help, ? for commands, C-c to quit"
289 (substitute-command-keys 289 (substitute-command-keys
290 "Type \\[Helper-help] for help, \\[Helper-describe-bindings] for commands, \\[exit-recursive-edit] to quit.")))) 290 "Type \\[Helper-help] for help, \\[Helper-describe-bindings] for commands, \\[view-exit] to quit."))))
291 291
292 (defun View-undefined () 292 (defun View-undefined ()
293 (interactive) 293 (interactive)
294 (ding) 294 (ding)
295 (view-helpful-message)) 295 (view-helpful-message))
328 "Scroll forward in View mode, or exit if end of text is visible. 328 "Scroll forward in View mode, or exit if end of text is visible.
329 No arg means whole window full, or number of lines set by \\[View-scroll-lines-forward-set-scroll-size]. 329 No arg means whole window full, or number of lines set by \\[View-scroll-lines-forward-set-scroll-size].
330 Arg is number of lines to scroll." 330 Arg is number of lines to scroll."
331 (interactive "P") 331 (interactive "P")
332 (if (pos-visible-in-window-p (point-max)) 332 (if (pos-visible-in-window-p (point-max))
333 (exit-recursive-edit)) 333 (view-exit))
334 (setq lines 334 (setq lines
335 (if lines (prefix-numeric-value lines) 335 (if lines (prefix-numeric-value lines)
336 (view-scroll-size))) 336 (view-scroll-size)))
337 ; (view-last-command 'View-scroll-lines-forward lines) 337 ; (view-last-command 'View-scroll-lines-forward lines)
338 (if (>= lines (view-window-size)) 338 (if (>= lines (view-window-size))
342 (scroll-up lines))) 342 (scroll-up lines)))
343 (cond ((pos-visible-in-window-p (point-max)) 343 (cond ((pos-visible-in-window-p (point-max))
344 (goto-char (point-max)) 344 (goto-char (point-max))
345 (recenter -1) 345 (recenter -1)
346 (message (substitute-command-keys 346 (message (substitute-command-keys
347 "End. Type \\[exit-recursive-edit] to quit viewing.")))) 347 "End. Type \\[view-exit] to quit viewing."))))
348 (move-to-window-line -1) 348 (move-to-window-line -1)
349 (beginning-of-line)) 349 (beginning-of-line))
350 350
351 (defun View-scroll-lines-forward-set-scroll-size (&optional lines) 351 (defun View-scroll-lines-forward-set-scroll-size (&optional lines)
352 "Scroll forward LINES lines in View mode, setting the \"scroll size\". 352 "Scroll forward LINES lines in View mode, setting the \"scroll size\".
433 (recenter (/ (view-window-size) 2))) 433 (recenter (/ (view-window-size) 2)))
434 (message "Can't find occurrence %d of %s" times regexp) 434 (message "Can't find occurrence %d of %s" times regexp)
435 (sit-for 4)))) 435 (sit-for 4))))
436 436
437 437
438 ;;;###autoload
439 (define-key ctl-x-map "v" 'view-file)
440
441 ;;;###autoload
442 (define-key ctl-x-4-map "v" 'view-file-other-window)
443
444 (provide 'view) 438 (provide 'view)
445 439
446 ;;; view.el ends here 440 ;;; view.el ends here