;ELC   
;;; compiled by roland@churchy.gnu.ai.mit.edu on Fri Nov  3 20:06:11 1995
;;; from file /gd/gnu/emacs/19.0/lisp/two-column.el
;;; emacs version 19.29.90.2.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`two-column.el' was compiled for Emacs 19.29 or later"))


(byte-code "!\n M" [fboundp frame-width screen-width] 2)
#@53 Keymap for commands for setting up two-column mode.
(defvar 2C-mode-map (byte-code " 	#	#	#	#	)" [make-sparse-keymap map define-key "2" 2C-two-columns [f2] "b" 2C-associate-buffer "s" 2C-split] 4) (#$ . 550))
(byte-code "	M\"\"" [2C-command 2C-mode-map global-set-key "6" [f2]] 3)
#@49 Keymap for commands for use in two-column mode.
(defvar 2C-minor-mode-map (byte-code " 	#	#	#	#	#	#	#	)" [make-sparse-keymap map define-key "1" 2C-merge "d" 2C-dissociate "o" 2C-associated-buffer "" 2C-newline "|" 2C-toggle-autoscroll "{" 2C-shrink-window-horizontally "}" 2C-enlarge-window-horizontally] 4) (#$ . 867))
(byte-code " \n $\n $\n $\n)BB" [2C-mode make-sparse-keymap map substitute-key-definition 2C-command 2C-minor-mode-map current-global-map enlarge-window-horizontally 2C-enlarge-window-horizontally shrink-window-horizontally 2C-shrink-window-horizontally minor-mode-map-alist] 6)
#@46 Marker to the associated buffer, if non-nil.
(defvar 2C-mode nil (#$ . 1528))
(byte-code "!#B" [make-variable-buffer-local 2C-mode put permanent-local t (2C-mode " 2C") minor-mode-alist] 4)
#@67 *Value of mode-line-format for a buffer in two-column minor mode.
(defvar 2C-mode-line-format (quote ("-%*- %15b --" (-3 . "%p") "--%[(" mode-name minor-mode-alist "%n" mode-line-process ")%]%-")) (#$ . -1739))
#@65 *Hook run in new buffer when it is associated with current one.
(defvar 2C-other-buffer-hook (quote text-mode) (#$ . -1956))
#@96 *A string inserted between the two columns when merging.
This gets set locally by \[2C-split].
(defvar 2C-separator "" (#$ . -2087))
(put (quote 2C-separator) (quote permanent-local) t)
#@123 *The width of the first column.  (Must be at least `window-min-width')
This value is local for every buffer that sets it.
(defvar 2C-window-width 40 (#$ . -2280))
(byte-code "!#" [make-variable-buffer-local 2C-window-width put permanent-local t] 4)
#@163 *Base for calculating `fill-column' for a buffer in two-column minor mode.
The value of `fill-column' becomes `2C-window-width' for this buffer
minus this value.
(defvar 2C-beyond-fill-column 4 (#$ . -2544))
#@70 If non-nil, Emacs attempts to keep the two column's buffers aligned.
(defvar 2C-autoscroll t (#$ . 2758))
(byte-code "! B!" [boundp 2C-autoscroll-start nil current-load-list make-variable-buffer-local] 2)
(defalias '2C-other #[(&optional req) " !\n !! !" [2C-mode marker-buffer 2C-mode-line-format mode-line-format kill-local-variable req error "You must first set two-column minor mode."] 2])
#@1577 Minor mode for independently editing two columns.
This is set up for two associated buffers by the three commands bound
to  \[2C-two-columns] ,  \[2C-associate-buffer]  and  \[2C-split].
Turning on two-column mode calls the value of the variable `2C-mode-hook',
if that value is non-nil.

These buffers can be edited separately, for example with `fill-paragraph'.
If you want to disable parallel scrolling temporarily, use  \[2C-toggle-autoscroll] .

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.

Potential uses are writing bilingual texts, or editing the comments of a
source code.  See the file lisp/two-column.el for detailed examples.

You have the following commands at your disposal:

\[2C-two-columns]   Rearrange screen with current buffer first
\[2C-associate-buffer]   Reassociate buffer after changing major mode
\[shrink-window-horizontally], \[enlarge-window-horizontally]   Shrink, enlarge current column
\[2C-associated-buffer]   Switch to associated buffer at same point
\[2C-newline] Insert newline(s) in both buffers at same point
\[2C-merge]   Merge both buffers
\[2C-dissociate]   Dissociate the two buffers

These keybindings can be customized in your ~/.emacs by `2C-mode-map',
`2C-minor-mode-map' and by binding `2C-command' to some prefix.

The appearance of the screen can be customized by the variables
`2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and
`truncate-partial-width-windows'.
(defalias '2C-mode #[(other) "!$Z	\n\f!" [make-local-hook post-command-hook add-hook 2C-autoscroll nil t 2C-window-width 2C-beyond-fill-column fill-column 2C-mode-line-format mode-line-format other 2C-mode run-hooks 2C-mode-hook] 5 (#$ . 3192)])
#@344 Split current window vertically for two-column editing.
When called the first time, associates a buffer with the current
buffer in two-column minor mode (see  \[describe-mode] ).
Runs `2C-other-buffer-hook' in the new buffer.
When called again, restores the screen layout with the current buffer
first and the associated buffer to it's right.
(defalias '2C-two-columns #[(&optional buffer) "  W \" Z^]! 6 ! !!^ ! !I  P!!T !! !!" [window-width frame-width enlarge-window 99999 t split-window-horizontally window-min-width 2C-window-width 2C-other other-window 1 switch-to-buffer -1 2C-autoscroll 2C-toggle-autoscroll 2C-mode point-marker buffer generate-new-buffer "2C/" buffer-name run-hooks 2C-other-buffer-hook] 6 (#$ . 5044) "P"])
#@197 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  \[describe-mode] .)
(defalias '2C-associate-buffer #[nil "p   \"\fq (  =(  !\" 1 )=  Z\f!*" [2C-other read-buffer "Associate buffer: " other-buffer b2 b1 nil 2C-mode error "Buffer already associated with buffer `%s'." buffer-name 2C-window-width buffer-local-variables frame-width 2C-two-columns] 4 (#$ . 5845) nil])
#@727 Split a two-column text at point, into two buffers in two-column minor mode.
Point becomes the local value of `2C-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 `2C-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.  You
write the first line of each column and then split that line.  E.g.:

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

(See  \[describe-mode] .)
(defalias '2C-split #[(arg) " \"  !Q!  q )\" \"`ie`\"Sȉ\n\f!`{w!`{i)  \nm? iUx `!`){ \fT\f `!x`|`\f\"\nm ` `T#`|\f!\\ ." [2C-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 " 	" make-local-variable 2C-separator 2C-window-width 2C-two-columns insert-char 10 append-to-buffer 0 next-line 1] 5 (#$ . 6383) "*p"])
#@130 Turn off two-column minor mode in current and associated buffer.
If the associated buffer is unmodified and empty, it is killed.
(defalias '2C-dissociate #[nil "p B  qB    =B  . m. o. !B !!!!!)!!!!!)" [buffer 2C-other buffer-modified-p kill-buffer nil kill-local-variable 2C-mode 2C-window-width 2C-separator mode-line-format fill-column] 2 (#$ . 7650) nil])
#@691 Merges the associated buffer with the current buffer.
They get merged at the column, which is the value of `2C-window-width',
i.e. usually at the vertical window separator.  This separator gets
replaced with white space.  Beyond that the value of `2C-separator' 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 `2C-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
(defalias '2C-merge #[nil " @V  !!= !p!	\neb\nqebmd ``{	m@ uq	̘Y j	!\nq- ,  Wq \"" [window-edges 0 window-buffer previous-window 2C-other t other-window -1 nil string b2 b1 "" 2C-window-width 2C-separator next-line 1 window-width frame-width enlarge-window 99999] 3 (#$ . 8066) nil])
#@30 Switch to associated buffer.
(defalias '2C-associated-buffer #[nil "e`\"n\f  \\l n  i!!/  !!4  !\f!!D !F *" [count-lines 1 0 col line get-buffer-window 2C-other t select-window switch-to-buffer newline goto-line move-to-column] 3 (#$ . 9110) nil])
#@38 Insert ARG newlines in both buffers.
(defalias '2C-newline #[(arg) "\n!" [((byte-code " \n!" [2C-associated-buffer newline arg] 2)) newline arg] 2 (#$ . 9402) "P"])
#@142 Toggle autoscrolling, or set it iff prefix ARG is non-nil and positive.
When autoscrolling is turned on, this also realigns the two buffers.
(defalias '2C-toggle-autoscroll #[(arg) " \n \n!Y ?P  !e \"!!N  !!\ne \"Z\n db\"ZZ\")\n!!!" [window-start 2C-autoscroll-start arg prefix-numeric-value 0 2C-autoscroll select-window selected-window message "Autoscrolling is on." count-lines get-buffer-window 2C-other t insert-char 10 -1 scroll-up "Autoscrolling is off."] 8 (#$ . 9583) "P"])
(defalias '2C-autoscroll #[nil "#  :  A@@= A@@!Ə!" [2C-autoscroll select-window selected-window last-command-char nil (byte-code "\n !T  UT  T  !T  \" W0 [  !! db\"ZZ\")! )͇" [2C-autoscroll-start 2C-toggle-autoscroll t window-start 2C-other get-buffer-window count-lines lines select-window insert-char 10 -1 scroll-up nil] 6) ((error))] 5])
#@40 Make current window ARG columns wider.
(defalias '2C-enlarge-window-horizontally #[(arg) "	\"  \f	\\  q \f	Z" [enlarge-window arg t 2C-other 2C-window-width] 3 (#$ . 10524) "p"])
#@43 Make current window ARG columns narrower.
(defalias '2C-shrink-window-horizontally #[(arg) "	[!" [2C-enlarge-window-horizontally arg] 2 (#$ . 10725) "p"])
(provide (quote two-column))
