;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:39:36 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/emulation/tpu-extras.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`tpu-extras.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'tpu-edt)
#@95 *Scroll margin at the top of the screen.
Interpreted as a percent of the current window size.
(custom-declare-variable 'tpu-top-scroll-margin '0 '(#$ . -651) :type 'integer :group 'tpu)
#@98 *Scroll margin at the bottom of the screen.
Interpreted as a percent of the current window size.
(custom-declare-variable 'tpu-bottom-scroll-margin '0 '(#$ . -843) :type 'integer :group 'tpu)
#@191 *If non-nil, in free cursor mode backward-char (left-arrow) works
just like TPU/edt.  Otherwise, backward-char will move to the end of
the previous line when starting from a line beginning.
(custom-declare-variable 'tpu-backward-char-like-tpu 't '(#$ . -1042) :type 'boolean :group 'tpu)
#@39 If non-nil, let the cursor roam free.
(defvar tpu-cursor-free nil (#$ . 1336))
(add-hook 'picture-mode-hook 'tpu-set-cursor-free)
#@63 Eliminate whitespace at ends of lines, if the cursor is free.
(defalias 'tpu-write-file-hook #[nil "\301 \205 \205 \302 \207" [tpu-cursor-free buffer-modified-p tpu-trim-line-ends] 1 (#$ . 1472)])
(byte-code "\301>\204\n \301B\301\207" [write-file-hooks tpu-write-file-hook] 2)
#@45 Enforce scroll margin at the top of screen.
(defalias 'tpu-top-check #[(beg lines) "\304 _\305\245\n	W\203 \306\n!\202 \nZ	W\205 \306	!)\207" [tpu-top-scroll-margin margin beg lines window-height 100 recenter] 2 (#$ . 1762)])
#@48 Enforce scroll margin at the bottom of screen.
(defalias 'tpu-bottom-check #[(beg lines) "\306 \211	_\307\245T\nZ\310Z\fV\203 \311\f!\202( \f\\V\205( \311\n[!+\207" [height tpu-bottom-scroll-margin margin difference beg lines window-height 100 1 recenter] 3 (#$ . 2000)])
#@54 Move right ARG characters (left if ARG is negative).
(defalias 'tpu-forward-char #[(num) "\203 \302	!\207	u\207" [tpu-cursor-free num picture-forward-column] 2 (#$ . 2286) "p"])
#@54 Move left ARG characters (right if ARG is negative).
(defalias 'tpu-backward-char #[(num) "\204 \303	!\207\n\203 \304	!\207n\203 \305u\210\306 \210\304	S!\207\304	!\207" [tpu-cursor-free num tpu-backward-char-like-tpu backward-char picture-backward-column -1 picture-end-of-line] 2 (#$ . 2472) "p"])
#@62 Move to next line.
Prefix argument serves as a repeat count.
(defalias 'tpu-next-line #[(num) "\304 	\203 m\204 \305\n!\210\202 \306\n!\210\307\n\"\210\310\211)\207" [beg tpu-cursor-free num this-command tpu-current-line picture-move-down next-line-internal tpu-bottom-check next-line] 3 (#$ . 2782) "p"])
#@66 Move to previous line.
Prefix argument serves as a repeat count.
(defalias 'tpu-previous-line #[(num) "\304 	\203 \305\n!\210\202 \306\n[!\210\307\n\"\210\310\211)\207" [beg tpu-cursor-free num this-command tpu-current-line picture-move-up next-line-internal tpu-top-check previous-line] 3 (#$ . 3100) "p"])
#@136 Move to beginning of line; if at beginning, move to beginning of next line.
Accepts a prefix argument for the number of lines to move.
(defalias 'tpu-next-beginning-of-line #[(num) "\302 \303u\210\304\305	Z!\210\306	\")\207" [beg num tpu-current-line -1 forward-visible-line 1 tpu-top-check] 3 (#$ . 3420) "p"])
#@118 Move to end of line; if at end, move to end of next line.
Accepts a prefix argument for the number of lines to move.
(defalias 'tpu-next-end-of-line #[(num) "\303 	\203% `\304\nW\203 \ny\210\305 \210`X\203! \306y\210\305 \210)\202+ \306u\210\n\210\307\n\")\207" [beg tpu-cursor-free num tpu-current-line 1 picture-end-of-line nil tpu-bottom-check] 3 (#$ . 3741) "p"])
#@77 Move EOL upward.
Accepts a prefix argument for the number of lines to move.
(defalias 'tpu-previous-end-of-line #[(num) "\303 	\203 \304\305\nZ!\210\202 \305\nZ\210\306\n\")\207" [beg tpu-cursor-free num tpu-current-line picture-end-of-line 1 tpu-top-check] 3 (#$ . 4121) "p"])
#@36 Move point to end of current line.
(defalias 'tpu-current-end-of-line #[nil "`	\203\f \302 \210\202 \303\210`U\205 \304\305!)\207" [beg tpu-cursor-free picture-end-of-line nil message "You are already at the end of a line."] 2 (#$ . 4410) nil])
#@75 Move to beginning of next line.
Prefix argument serves as a repeat count.
(defalias 'tpu-forward-line #[(num) "\302 \303	!\210\304	\"\210\305 )\207" [beg num tpu-current-line next-line-internal tpu-bottom-check beginning-of-line] 3 (#$ . 4666) "p"])
#@77 Move to beginning of previous line.
Prefix argument serves as repeat count.
(defalias 'tpu-backward-line #[(num) "\302 n\204 \303	Y\204 	S\304	[!\210\305	\"\210\306 )\207" [beg num tpu-current-line 0 next-line-internal tpu-top-check beginning-of-line] 3 (#$ . 4924) "p"])
#@102 Move to the next paragraph in the current direction.
A repeat count means move that many paragraphs.
(defalias 'tpu-paragraph #[(num) "\306\307 \310 \311U\203 \312\202 \311U\203 \313\202 \n\f_\314\245\n_\314\245T	\nZ\315Z]\212\316!\210`)\212\316!\210`)\212b\210\n\317Zy\210`)\203\227 \320!\210`V\203\211 \212\ny)\211\311U\203\200 \321!\202\251 \321Z!\202\251 `V\205\251 \321!\202\251 \322!\210`W\205\251 \321	^!.\207" [left beg height tpu-top-scroll-margin top-percent tpu-bottom-scroll-margin nil tpu-current-line window-height 0 10 15 100 1 move-to-window-line 2 tpu-next-paragraph recenter tpu-previous-paragraph bottom-percent top-margin bottom-up-margin bottom-margin top bottom far tpu-advance num] 4 (#$ . 5208) "p"])
#@92 Move to the next page in the current direction.
A repeat count means move that many pages.
(defalias 'tpu-page #[(num) "\306\307 \310 \311U\203 \312\202 \311U\203 \313\202 \n\f_\314\245\n_\314\245T	\nZ\315Z]\212\316!\210`)\212\316!\210`)\212b\210\n\317Zy\210`)\203\227 \320!\210`V\203\211 \212\ny)\211\311U\203\200 \321!\202\251 \321Z!\202\251 `V\205\251 \321!\202\251 \322!\210`W\205\251 \321	^!.\207" [left beg height tpu-top-scroll-margin top-percent tpu-bottom-scroll-margin nil tpu-current-line window-height 0 10 15 100 1 move-to-window-line 2 forward-page recenter backward-page bottom-percent top-margin bottom-up-margin bottom-margin top bottom far tpu-advance num] 4 (#$ . 5998) "p"])
#@94 Scroll the display down to the next section.
A repeat count means scroll that many sections.
(defalias 'tpu-scroll-window-down #[(num) "\305 \306 S\n	_\307\245_\310\f[!\210\311\f\"+\207" [beg height num tpu-percent-scroll lines tpu-current-line window-height 100 next-line-internal tpu-top-check] 3 (#$ . 6758) "p"])
#@92 Scroll the display up to the next section.
A repeat count means scroll that many sections.
(defalias 'tpu-scroll-window-up #[(num) "\305 \306 S\n	_\307\245_\310\f!\210\311\f\"+\207" [beg height num tpu-percent-scroll lines tpu-current-line window-height 100 next-line-internal tpu-bottom-check] 3 (#$ . 7086) "p"])
#@44 Search for a string or regular expression.
(defalias 'tpu-search-internal #[(pat &optional quiet) "\306\307 \310 \311U\203 \312\202 \311U\203 \313\202 \n\f_\314\245\n_\314\245T	\nZ\315Z]\212\316!\210`)\212\316!\210`)\212b\210\n\317Zy\210`)\320\"\210\203\231 `V\203\213 \212\ny)\211\311U\203\202 \321!\202\246 \321Z!\202\246 `V\205\246 \321!\202\246 `W\205\246 \321	^!.\207" [left beg height tpu-top-scroll-margin top-percent tpu-bottom-scroll-margin nil tpu-current-line window-height 0 10 15 100 1 move-to-window-line 2 tpu-search-internal-core recenter bottom-percent top-margin bottom-up-margin bottom-margin top bottom far pat quiet tpu-searching-forward] 4 (#$ . 7412)])
(byte-code "\300\301!\204 \301\302KM\210\300\303!\204 \303\304KM\210\300\305!\204! \305\306KM\210\300\207" [fboundp tpu-old-newline newline tpu-old-do-auto-fill do-auto-fill tpu-old-newline-and-indent newline-and-indent] 2)
#@192 Insert a newline.  With arg, insert that many newlines.
In Auto Fill mode, can break the preceding line if no numeric arg.
This is the TPU-edt version that respects the bottom scroll margin.
(defalias 'newline #[(&optional num) "\302 	\204	 \303\304	!\210\305	\")\207" [beg num tpu-current-line 1 tpu-old-newline tpu-bottom-check] 3 (#$ . 8380) "p"])
#@336 Insert a newline, then indent according to major mode.
Indentation is done using the current indent-line-function.
In programming language modes, this is the same as TAB.
In some text modes, where TAB inserts a tab, this indents
to the specified left-margin column.  This is the TPU-edt
version that respects the bottom scroll margin.
(defalias 'newline-and-indent #[nil "\301 \302 \210\303\304\")\207" [beg tpu-current-line tpu-old-newline-and-indent tpu-bottom-check 1] 3 (#$ . 8741) nil])
#@57 TPU-edt version that respects the bottom scroll margin.
(defalias 'do-auto-fill #[nil "\301 \302 \210\303\304\")\207" [beg tpu-current-line tpu-old-do-auto-fill tpu-bottom-check 1] 3 (#$ . 9241)])
#@21 Set scroll margins.
(defalias 'tpu-set-scroll-margins #[(top bottom) "\304\230\204# \305\306O\307\230\203 \310!\202# \310!\311_\312 \\S\312 \245\n\304\230\204F \n\305\306O\307\230\2039 \310\n!\202F \310\n!\311_\312 \\S\312 \245t\205O \313\314	#\207" [top tpu-top-scroll-margin bottom tpu-bottom-scroll-margin "" -1 nil "%" string-to-int 100 window-height message "Scroll margins set.  Top = %s%%, Bottom = %s%%"] 4 (#$ . 9446) "sEnter top scroll margin (N lines or N%% or RETURN for current value): \nsEnter bottom scroll margin (N lines or N%% or RETURN for current value): "])
#@51 Allow the cursor to move freely about the screen.
(defalias 'tpu-set-cursor-free #[nil "\302\303\304\305	#\210\306\307!\207" [tpu-cursor-free GOLD-map t substitute-key-definition tpu-set-cursor-free tpu-set-cursor-bound message "The cursor will now move freely about the screen."] 4 (#$ . 10041) nil])
#@47 Constrain the cursor to the flow of the text.
(defalias 'tpu-set-cursor-bound #[nil "\302 \210\303\304\305\306	#\210\307\310!\207" [tpu-cursor-free GOLD-map tpu-trim-line-ends nil substitute-key-definition tpu-set-cursor-bound tpu-set-cursor-free message "The cursor is now bound to the flow of your text."] 4 (#$ . 10350) nil])
