;;; compiled by eric@mole.gnu.ai.mit.edu on Fri Apr 23 03:21:09 1993
;;; from file /gd/gnu/emacs/19.0/lisp/two-column.el
;;; emacs version 19.5.1.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(defvar tc-mode-map nil "\
Keymap for commands for two-column mode.")
(byte-code "„O Á ÂÃÄ#ˆÂÅÆ#ˆÂÇÈ#ˆÂÉÊ#ˆÂËÌ#ˆÂÍÎ#ˆÂÏÐ#ˆÂÑÒ#ˆÂÓÔ#ˆÂÕÖ#ˆÂ×Ø#ˆÂÙÚ#ˆÛÜ\"‡" [tc-mode-map make-sparse-keymap define-key "1" tc-merge "2" tc-two-columns "b" tc-associate-buffer "e" tc-dissociate "" tc-recenter "o" tc-associated-buffer "s" tc-split "{" shrink-window-horizontally "}" enlarge-window-horizontally " " tc-scroll-up "" tc-scroll-down "" tc-scroll-line global-set-key "6"] 4)
(defvar tc-other nil "\
Marker to the associated buffer, if non-nil.")
(byte-code "ÀÁ!ˆÂÁÃÄ#ˆÅBÀ‡" [make-variable-buffer-local tc-other put permanent-local t (tc-other " 2C") minor-mode-alist] 4)
(defvar tc-mode-line-format (quote ("-%*- %15b --" (-3 . "%p") "--%[(" mode-name minor-mode-alist "%n" mode-line-process ")%]%-")) "\
*Value of mode-line-format for a buffer in two-column minor mode.")
(defvar tc-separator "" "\
*A string inserted between the two columns when merging.
This gets set locally by \\[tc-split].")
(put (quote tc-separator) (quote permanent-local) t)
(defvar tc-window-width 40 "\
*The width of the first column.  (Must be at least `window-min-width')
This value is local for every buffer that sets it.")
(byte-code "ÀÁ!ˆÂÁÃÄ#‡" [make-variable-buffer-local tc-window-width put permanent-local t] 4)
(defvar tc-beyond-fill-column 4 "\
*Base for calculating `fill-column' for a buffer in two-column minor mode.
The value of `fill-column' becomes `tc-window-width' for this buffer
minus this value.")
(defvar tc-mode-hook nil "\
Function called, if non-nil, whenever turning on two-column minor mode.
It can get called by \\[tc-two-columns] (tc-two-columns), \\[tc-split] (tc-split)
and \\[tc-associate-buffer] (tc-associate-buffer), on both buffers.")
(fset (quote tc-other) #[nil "… Á!\n† ÄÀ!ˆÄÃ!ˆÅ‡" [tc-other marker-buffer tc-mode-line-format mode-line-format kill-local-variable nil] 2])
(defalias 'tc-two-columns #[(&optional buffer) "À Á Wƒ ÂÃÄ\"ˆÅÁ Z^]!ˆÈ ƒ1 ÉÊ!ˆËÈ !ˆÉÌ!ˆÍÎ!‡ZÓ!ˆÕ ÉÊ!ˆË†U ØÙÚ P!!ˆ„_ Û ˆZÕ Ó!ˆÉÌ!ˆ‰)‡" [window-width frame-width enlarge-window 99999 t split-window-horizontally window-min-width tc-window-width tc-other other-window 1 switch-to-buffer -1 tc-scroll-line 0 tc-beyond-fill-column fill-column tc-mode-line-format mode-line-format run-hooks tc-mode-hook point-marker other buffer generate-new-buffer "2C/" buffer-name text-mode] 5 "\
Split current window vertically for two-column editing.

When called the first time, associates a buffer with the current
buffer.  Both buffers are put in two-column minor mode and
tc-mode-hook gets called on both.  These buffers remember
about one another, even when renamed.

When called again, restores the screen layout with the current buffer
first and the associated buffer to it's right.

If you include long lines, i.e which will span both columns (eg.
source code), they should be in what will be the first column, with
the associated buffer having empty lines next to them.

You have the following commands at your disposal:

\\[tc-two-columns]   Rearrange screen
\\[tc-associate-buffer]   Reassociate buffer after changing major mode
\\[tc-scroll-up]   Scroll both buffers up by a screenfull
\\[tc-scroll-down]   Scroll both buffers down by a screenful
\\[tc-scroll-line]   Scroll both buffers up by one or more lines
\\[tc-recenter]   Recenter and realign other buffer
\\[shrink-window-horizontally], \\[enlarge-window-horizontally]   Shrink, enlarge current column
\\[tc-associated-buffer]   Switch to associated buffer
\\[tc-merge]   Merge both buffers

These keybindings can be customized in your ~/.emacs by `tc-prefix'
and `tc-mode-map'.

The appearance of the screen can be customized by the variables
`tc-window-width', `tc-beyond-fill-column',
`tc-mode-line-format' and `truncate-partial-width-windows'." "P"])
(defalias (quote tc-mode) (quote tc-two-columns))
(defalias 'tc-associate-buffer #[nil "pÀ † ÁÂÃ \"ŠÆqˆÀ ƒ' À =„' ÇÈÉÀ !\"ˆÊËÌ \"…1 )ƒ= Í ZÎ!*‡" [tc-other read-buffer "Associate buffer: " other-buffer b2 b1 nil error "Buffer already associated with buffer `%s'." buffer-name assq tc-window-width buffer-local-variables frame-width tc-two-columns] 4 "\
Associate another buffer with this one in two-column minor mode.
Can also be used to associate a just previously visited file, by
accepting the proposed default buffer.

See  \\[tc-two-columns]  and  `lisp/two-column.el'  for further details." nil])
(defalias 'tc-split #[(arg) "À ƒ\" ÁÂÃÀ !ÄQ!ƒ ŠÀ qˆÅ ˆ)‚\" ÆÇÈ\"ˆ`iÉe`\"SÈ‰\nŠÏ!ˆÑ`\"ÒÓ\"ˆÔÕ!ˆÑ`\"i)× ˆÀ \nŠm?…Ä iUƒ} ØÑ`ŠÏ!ˆ`)\"\"„… T‚½ `Ï!ˆÙÓ!ˆÚ`\"ˆ`ÛÜ\"ˆÝ\nÞ ˆmƒ° `‚² `T#ˆÚ`\"ˆßàá!ˆ‚_ .‡" [tc-other y-or-n-p "Overwrite associated buffer `" buffer-name "'? " erase-buffer signal quit nil count-lines other chars n goal-column point backward-char arg buffer-substring skip-chars-forward " 	" make-local-variable tc-separator tc-window-width tc-two-columns string= skip-chars-backward delete-region insert-char 10 append-to-buffer end-of-line 0 next-line 1] 6 "\
Unmerge a two-column text into two buffers in two-column minor mode.
The text is unmerged at the cursor's column which becomes the local
value of `tc-window-width'.  Only lines that have the ARG same
preceding characters at that column get split.  The ARG preceding
characters without any leading whitespace become the local value for
`tc-separator'.  This way lines that continue across both
columns remain untouched in the first buffer.

This function can be used with a prototype line, to set up things as
you like them.  You write the first line of each column with the
separator you like and then unmerge that line.  E.g.:

First column's text    sSs  Second columns text
		       \\___/\\
			/    \\
   5 character Separator      You type  M-5 \\[tc-split]  with the point here

See  \\[tc-two-columns]  and  `lisp/two-column.el'  for further details." "p"])
(defalias 'tc-dissociate #[nil "pŠÁ ƒB Á qƒB Á ƒ Á =ƒB Â „. mƒ. oƒ. ÃÄ!ˆ‚B ÅÁ!ˆÅÆ!ˆÅÇ!ˆÅÈ!ˆÅÉ!ˆ)ÅÁ!ˆÅÆ!ˆÅÇ!ˆÅÈ!ˆÅÉ!)‡" [buffer tc-other buffer-modified-p kill-buffer nil kill-local-variable tc-window-width tc-separator mode-line-format fill-column] 2 "\
Turn off two-column minor mode in current and associated buffer.
If the associated buffer is unmodified and empty, it is killed." nil])
(defalias 'tc-merge #[nil "À „	 ÁÂ!ˆÃ @ÄVƒ ÅÆ !À =ƒ ÇÈ!ˆŠpÀ É\nebˆqˆebˆm„n Í`Î ˆ`\"\nm„H Ï ˆqˆÐ\nÑ\"„c Î ˆjˆcˆ\ncˆÔÕ!ˆqˆ‚4 ,Ö × W…{ ØÙÚ\"‡" [tc-other error "You must first set two-column minor mode." window-edges 0 window-buffer previous-window other-window -1 nil string b2 b1 buffer-substring end-of-line forward-char string= "" tc-window-width tc-separator next-line 1 window-width frame-width enlarge-window 99999 t] 3 "\
Merges the associated buffer with the current buffer.
They get merged at the column, which is the value of
`tc-window-width', i.e. usually at the vertical window
separator.  This separator gets replaced with white space.  Beyond
that the value of gets inserted on merged lines.  The two columns are
thus pasted side by side, in a single text.  If the other buffer is
not displayed to the left of this one, then this one becomes the left
column.

If you want `tc-separator' on empty lines in the second column,
you should put just one space in them.  In the final result, you can strip
off trailing spaces with \\[beginning-of-buffer] \\[replace-regexp] [ SPC TAB ] + $ RET RET" nil])
(defalias 'tc-associated-buffer #[nil "À „	 ÁÂ!ˆÃÀ !ƒ ÄÃÀ !!‡ÅÀ !‡" [tc-other error "You must set two-column minor mode." get-buffer-window select-window switch-to-buffer] 3 "\
Switch to associated buffer." nil])
(defalias 'tc-scroll-line #[(arg) "À „	 ÁÂ!ˆÃ!„ Å!ˆÆeÇ \"ÈÀ !…T É \nËÈÀ !!ˆÆeÇ \"ZŠdbˆÌÍÆÇ d\"ZÎZ\"ˆ)Ã!„O Å!ˆË\n!)‡" [tc-other error "You must set two-column minor mode." zerop arg scroll-up count-lines window-start get-buffer-window selected-window window select-window insert-char 10 -1] 6 "\
Scroll current window upward by ARG lines.
The associated window gets scrolled to the same line." "p"])
(defalias 'tc-scroll-up #[(arg) "ÀÁ\nÃ ZÅZ\"!‡" [tc-scroll-line * arg window-height next-screen-context-lines 1] 5 "\
Scroll current window upward by ARG screens.
The associated window gets scrolled to the same line." "p"])
(defalias 'tc-scroll-down #[(arg) "ÀÁ\nÄ ZÅZ\"!‡" [tc-scroll-line * arg next-screen-context-lines window-height -1] 5 "\
Scroll current window downward by ARG screens.
The associated window gets scrolled to the same line." "p"])
(defalias 'tc-recenter #[(arg) "… Á!ÂÃÄ `\"„ ÅÆ Ç\"‚( ÈWƒ' Æ \\‚( Z!‡" [arg prefix-numeric-value tc-scroll-line count-lines window-start / window-height 2 0] 5 "\
Center point in window.  With ARG, put point on line ARG.
This counts from bottom if ARG is negative.  The associated window
gets scrolled to the same line." "P"])
(defalias 'enlarge-window-horizontally #[(arg) "À	Â\"ˆÃ … 	\\‰… Ã q… 	Z‰‡" [enlarge-window arg t tc-other tc-window-width] 3 "\
Make current window ARG columns wider." "p"])
(defalias 'shrink-window-horizontally #[(arg) "À	[!‡" [enlarge-window-horizontally arg] 2 "\
Make current window ARG columns narrower." "p"])
(provide (quote two-column))
