(vc-path): Mark as obsolete.
[emacs.git] / lisp / textmodes / two-column.el
blob9c5e70e93d45d36aafc7858125138609c04e5b72
1 ;;; two-column.el --- minor mode for editing of two-column text
3 ;; Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
6 ;; Author: Daniel Pfeiffer <occitan@esperanto.org>
7 ;; Adapted-By: ESR, Daniel Pfeiffer
8 ;; Keywords: wp
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;;; Commentary:
27 ;;; Komentario: Commentary:
29 ;; Tiu programaro ebligas vin redakti This package gives you the ability
30 ;; dukolumnan tekston. to edit text in a two-column format.
33 ;; Vi havas tri eblecojn por eki tiun You have three ways to start up this
34 ;; mal^cefan modalon. ^Ciu donas al vi minor mode. Each gives you a
35 ;; horizontale disigatan fenestron, si- horizontally split window similar to
36 ;; milan al fina apareco de via teksto: the final outcome of your text:
39 ;; f2 2 asocias novan bufron nomatan associates a new buffer called
40 ;; C-x 6 2 same, sed kun 2C/ anta^u. the same, but with 2C/
41 ;; prepended.
43 ;; f2 b asocias alian bufron. Vi povas associates another buffer.
44 ;; C-x 6 b anka^u asocii dataron, se vi This can be used to associate a
45 ;; ^jus anta^ue faris C-x C-f. file if you just did C-x C-f.
47 ;; f2 s disigas jam dukolumnan tekston splits a two-column text into
48 ;; C-x 6 s en du bufroj ekde la nuna two buffers from the current
49 ;; linio, kaj je la nuna kolumno. line and at the current column.
50 ;; La anta^uaj signoj (ofte The preceding characters (often
51 ;; tabeligilo a^u |) estas la tab or |) are the column
52 ;; kolumna disiganto. Linioj kiuj separator. Lines that don't
53 ;; ne enhavas ilin ne estas have them won't be separated.
54 ;; disigitaj. Kiel la kvara kaj Like the fourth and fifth line
55 ;; la kvina linio se vi disigas if you split this file from
56 ;; ^ci dataron ekde la unua angla the first english word.
57 ;; vorto.
59 ;; Se vi volas meti longajn liniojn If you include long lines, i.e which
60 ;; (ekz. programerojn) en la kunigotan will span both columns (eg. source
61 ;; tekston, ili devas esti en la code), they should be in what will
62 ;; estonte unua kolumno. La alia devas be the first column, with the
63 ;; havi vakajn linion apud ili. associated buffer having empty lines
64 ;; next to them.
66 ;; Averto: en Emacs kiam vi ^san^gas la Attention: in Emacs when you change
67 ;; ^cefan modalon, la mal^cefaj modaloj the major mode, the minor modes are
68 ;; estas anka^u elmemorigitaj. Tiu- also purged from memory. In that
69 ;; okaze vi devas religi la du bufrojn case you must reassociate the two
70 ;; per iu C-x 6-ordono, ekz. C-x 6 b. buffers with any C-x 6-command, e.g.
71 ;; C-x 6 b.
73 ;; Kiam vi estos kontenta de la When you have edited both buffers to
74 ;; rezulto, vi kunmetos la du kolumnojn your content, you merge them with
75 ;; per C-x 6 1. Se vi poste vidas C-x 6 1. If you then see a problem,
76 ;; problemon, vi neniigu la kunmeton you undo the merge with C-x u and
77 ;; per C-x u kaj plue modifu la du continue to edit the two buffers.
78 ;; bufrojn. Kiam vi ne plu volas tajpi When you no longer want to edit in
79 ;; dukolumne, vi eliru el la mal^cefa two columns, you turn off the minor
80 ;; modalo per C-x 6 d. mode with C-x 6 d.
83 ;; Aldone al dukolumna redaktado, ek- In addition to two-column editing of
84 ;; zemple por skribi dulingvan tekston text, for example for writing a
85 ;; flank-al-flanke kiel ^ci tiu, aliaj bilingual text side-by-side as shown
86 ;; interesaj uzoj trovitas por tiu mal- here, other interesting uses have
87 ;; ^cefa modalo: been found for this minor mode:
89 ;; Vi povas disigi la kolumnojn per {+} You can separate the columns with
90 ;; ajna pla^ca ^ceno starigante {+} any string that pleases you, by
91 ;; `2C-separator'. Ekzemple "{+} " {+} setting `2C-separator'. For example
92 ;; por amuzi^gi. f2 s a^u C-x 6 s {+} "{+} " if you'd like to have fun.
93 ;; traktas tiujn kun prefiksa {+} f2 s or C-x 6 s handles these with a
94 ;; argumento kiu signifas la longon {+} prefix argument that means the
95 ;; de tia ^ceno. {+} desired length of such a string.
98 ;; Programistoj eble ^satus la eblecon Programmers might like the ability
99 ;; forspliti la komentarian kolumnon de to split off the comment column of a
100 ;; dosiero kiel la sekvanta. Vi povas file that looks like the following.
101 ;; rearan^gigi la paragrafon. La pro- You can fill-paragraph the comment.
102 ;; blemo estas ke koda^jo tuj lar- The problem is, code quickly gets
103 ;; ^gi^gas, tiel ke vi bezonas pli rather wide, so you need to use a
104 ;; mallar^gan komentarian kolumnon. narrower comment column. Code lines
105 ;; Koda^jaj linioj tra `comment-column' that reach beyond `comment-column'
106 ;; ne problemas, krom ke vi ne vidos are no problem, except that you
107 ;; iliajn finojn dum redaktado. won't see their end during editing.
110 ;; BEGIN -- This is just some meaningless
111 ;; FOR i IN 1..10 LOOP -- code in Ada, that runs foobar
112 ;; foobar( i ); -- once for each argument from one
113 ;; END LOOP; -- to ten, and then we're already
114 ;; END; -- through with it.
116 ;; Pli bone ankora^u, vi povas pozici- Better yet, you can put the point
117 ;; i^gi anta^u "This", tajpi M-3 f2 s before "This", type M-3 f2 s
118 ;; kiu igas "-- " la separigilon inter which makes "-- " the separator
119 ;; senkomentaria Ada bufro kaj nur- between a no-comments Ada buffer,
120 ;; teksta komentaria bufro. Kiam vi and a plain text comment buffer.
121 ;; denove kuni^gos ilin, ^ciu nevaka When you put them back together,
122 ;; linio de l' dua kolumno denove every non-empty line of the 2nd
123 ;; anta^uhavos "-- ". column will again be preceded by
124 ;; "-- ".
127 ;;; Code:
130 ;; Lucid patch
131 (or (fboundp 'frame-width)
132 (fset 'frame-width 'screen-width))
135 ;;;;; Set up keymap ;;;;;
137 (defvar 2C-mode-map
138 (let ((map (make-sparse-keymap)))
139 (define-key map "2" '2C-two-columns)
140 (define-key map [f2] '2C-two-columns)
141 (define-key map "b" '2C-associate-buffer)
142 (define-key map "s" '2C-split)
143 map)
144 "Keymap for commands for setting up two-column mode.")
148 ;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
149 (fset '2C-command 2C-mode-map)
151 ;; This one is for historical reasons and simple keyboards, it is not
152 ;; at all mnemonic. All usual sequences containing 2 were used, and
153 ;; f2 could not be set up in a standard way under Emacs 18.
154 ;;;###autoload (global-set-key "\C-x6" '2C-command)
156 ;;;###autoload (global-set-key [f2] '2C-command)
159 (defvar 2C-minor-mode-map
160 (let ((map (make-sparse-keymap)))
161 (define-key map "1" '2C-merge)
162 (define-key map "d" '2C-dissociate)
163 (define-key map "o" '2C-associated-buffer)
164 (define-key map "\^m" '2C-newline)
165 (define-key map "|" '2C-toggle-autoscroll)
166 (define-key map "{" '2C-shrink-window-horizontally)
167 (define-key map "}" '2C-enlarge-window-horizontally)
168 map)
169 "Keymap for commands for use in two-column mode.")
172 (setq minor-mode-map-alist
173 (cons (cons '2C-mode
174 (let ((map (make-sparse-keymap)))
175 (substitute-key-definition '2C-command 2C-minor-mode-map
176 map (current-global-map))
177 (substitute-key-definition 'enlarge-window-horizontally
178 '2C-enlarge-window-horizontally
179 map (current-global-map))
180 (substitute-key-definition 'shrink-window-horizontally
181 '2C-shrink-window-horizontally
182 map (current-global-map))
183 map))
184 minor-mode-map-alist))
186 ;;;;; variable declarations ;;;;;
188 (defgroup two-column nil
189 "Minor mode for editing of two-column text."
190 :prefix "2C-"
191 :group 'frames)
194 ;; Markers seem to be the only buffer-id not affected by renaming a buffer.
195 ;; This nevertheless loses when a buffer is killed. The variable-name is
196 ;; required by `describe-mode'.
197 (defvar 2C-mode nil
198 "Marker to the associated buffer, if non-nil.")
199 (make-variable-buffer-local '2C-mode)
200 (put '2C-mode 'permanent-local t)
204 (setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist))
208 ;; rearranged, so that the pertinent info will show in 40 columns
209 (defcustom 2C-mode-line-format
210 '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name
211 minor-mode-alist "%n" mode-line-process ")%]%-")
212 "*Value of `mode-line-format' for a buffer in two-column minor mode."
213 :type 'sexp
214 :group 'two-column)
217 (defcustom 2C-other-buffer-hook 'text-mode
218 "*Hook run in new buffer when it is associated with current one."
219 :type 'function
220 :group 'two-column)
223 (defcustom 2C-separator ""
224 "*A string inserted between the two columns when merging.
225 This gets set locally by \\[2C-split]."
226 :type 'string
227 :group 'two-column)
228 (put '2C-separator 'permanent-local t)
232 (defcustom 2C-window-width 40
233 "*The width of the first column. (Must be at least `window-min-width')
234 This value is local for every buffer that sets it."
235 :type 'integer
236 :group 'two-column)
237 (make-variable-buffer-local '2C-window-width)
238 (put '2C-window-width 'permanent-local t)
242 (defcustom 2C-beyond-fill-column 4
243 "*Base for calculating `fill-column' for a buffer in two-column minor mode.
244 The value of `fill-column' becomes `2C-window-width' for this buffer
245 minus this value."
246 :type 'integer
247 :group 'two-column)
251 (defcustom 2C-autoscroll t
252 "If non-nil, Emacs attempts to keep the two column's buffers aligned."
253 :type 'boolean
254 :group 'two-column)
258 (defvar 2C-autoscroll-start nil)
259 (make-variable-buffer-local '2C-autoscroll-start)
261 ;;;;; base functions ;;;;;
263 ;; The access method for the other buffer. This tries to remedy against
264 ;; lost local variables and lost buffers.
265 (defun 2C-other (&optional req)
266 (or (if 2C-mode
267 (or (prog1
268 (marker-buffer 2C-mode)
269 (setq mode-line-format 2C-mode-line-format))
270 ;; The associated buffer somehow got killed.
271 (progn
272 ;; The other variables may later be useful if the user
273 ;; reestablishes the association.
274 (kill-local-variable '2C-mode)
275 (kill-local-variable 'mode-line-format)
276 nil)))
277 (if req (error "You must first set two-column minor mode"))))
281 ;; function for setting up two-column minor mode in a buffer associated
282 ;; with the buffer pointed to by the marker other.
283 (defun 2C-mode (other)
284 "Minor mode for independently editing two columns.
285 This is set up for two associated buffers by the three commands bound
286 to \\[2C-two-columns] , \\[2C-associate-buffer] and \\[2C-split].
287 Turning on two-column mode calls the value of the variable `2C-mode-hook',
288 if that value is non-nil.
290 These buffers can be edited separately, for example with `fill-paragraph'.
291 If you want to disable parallel scrolling temporarily, use \\[2C-toggle-autoscroll] .
293 If you include long lines, i.e which will span both columns (eg.
294 source code), they should be in what will be the first column, with
295 the associated buffer having empty lines next to them.
297 Potential uses are writing bilingual texts, or editing the comments of a
298 source code. See the file lisp/two-column.el for detailed examples.
300 You have the following commands at your disposal:
302 \\[2C-two-columns] Rearrange screen with current buffer first
303 \\[2C-associate-buffer] Reassociate buffer after changing major mode
304 \\[shrink-window-horizontally], \\[enlarge-window-horizontally] Shrink, enlarge current column
305 \\[2C-associated-buffer] Switch to associated buffer at same point
306 \\[2C-newline] Insert newline(s) in both buffers at same point
307 \\[2C-merge] Merge both buffers
308 \\[2C-dissociate] Dissociate the two buffers
310 These keybindings can be customized in your ~/.emacs by `2C-mode-map',
311 `2C-minor-mode-map' and by binding `2C-command' to some prefix.
313 The appearance of the screen can be customized by the variables
314 `2C-window-width', `2C-beyond-fill-column', `2C-mode-line-format' and
315 `truncate-partial-width-windows'."
316 (add-hook 'post-command-hook '2C-autoscroll nil t)
317 (setq fill-column (- 2C-window-width
318 2C-beyond-fill-column)
319 mode-line-format 2C-mode-line-format
320 2C-mode other)
321 (run-hooks '2C-mode-hook))
325 ;;;###autoload
326 (defun 2C-two-columns (&optional buffer)
327 "Split current window vertically for two-column editing.
328 \\<global-map>When called the first time, associates a buffer with the current
329 buffer in two-column minor mode (use \\[describe-mode] once in the mode,
330 for details.). It runs `2C-other-buffer-hook' in the new buffer.
331 When called again, restores the screen layout with the current buffer
332 first and the associated buffer to its right."
333 (interactive "P")
334 ;; first go to full width, so that we can certainly split into two windows
335 (unless (window-full-width-p)
336 (enlarge-window 99999 t))
337 (split-window-horizontally
338 (max window-min-width (min 2C-window-width
339 (- (frame-width) window-min-width))))
340 (if (2C-other)
341 (progn
342 (other-window 1)
343 (switch-to-buffer (2C-other))
344 (other-window -1)
345 (if 2C-autoscroll
346 (2C-toggle-autoscroll t)))
348 (2C-mode (prog1 (point-marker)
349 (other-window 1)
350 (switch-to-buffer
351 (or buffer
352 (generate-new-buffer (concat "2C/" (buffer-name)))))
353 (or buffer
354 (run-hooks '2C-other-buffer-hook))))
356 (2C-mode (prog1 (point-marker)
357 (other-window -1)))))
361 ;;;###autoload
362 (defun 2C-associate-buffer ()
363 "Associate another buffer with this one in two-column minor mode.
364 Can also be used to associate a just previously visited file, by
365 accepting the proposed default buffer.
367 \(See \\[describe-mode] .)"
368 (interactive)
369 (let ((b1 (current-buffer))
370 (b2 (or (2C-other)
371 (read-buffer "Associate buffer: " (other-buffer)))))
372 (save-excursion
373 (setq 2C-mode nil)
374 (set-buffer b2)
375 (and (2C-other)
376 (not (eq b1 (2C-other)))
377 (error "Buffer already associated with buffer `%s'"
378 (buffer-name (2C-other))))
379 (setq b1 (and (assq '2C-window-width (buffer-local-variables))
380 2C-window-width)))
381 ; if other buffer has a local width, adjust here too
382 (if b1 (setq 2C-window-width (- (frame-width) b1)))
383 (2C-two-columns b2)))
387 ;;;###autoload
388 (defun 2C-split (arg)
389 "Split a two-column text at point, into two buffers in two-column minor mode.
390 Point becomes the local value of `2C-window-width'. Only lines that
391 have the ARG same preceding characters at that column get split. The
392 ARG preceding characters without any leading whitespace become the local
393 value for `2C-separator'. This way lines that continue across both
394 columns remain untouched in the first buffer.
396 This function can be used with a prototype line, to set up things. You
397 write the first line of each column and then split that line. E.g.:
399 First column's text sSs Second column's text
400 \\___/\\
401 / \\
402 5 character Separator You type M-5 \\[2C-split] with the point here.
404 \(See \\[describe-mode] .)"
405 (interactive "*p")
406 (and (2C-other)
407 (if (y-or-n-p (concat "Overwrite associated buffer `"
408 (buffer-name (2C-other))
409 "'? "))
410 (with-current-buffer (2C-other)
411 (erase-buffer))
412 (signal 'quit nil)))
413 (let ((point (point))
414 ;; make next-line always come back to same column
415 (column (current-column))
416 ;; a counter for empty lines in other buffer
417 (n (1- (count-lines (point-min) (point))))
418 chars other)
419 (save-excursion
420 (backward-char arg)
421 (setq chars (buffer-substring (point) point))
422 (skip-chars-forward " \t" point)
423 (make-local-variable '2C-separator)
424 (setq 2C-separator (buffer-substring (point) point)
425 2C-window-width (+ (fringe-columns 'left)
426 (fringe-columns 'right)
427 (scroll-bar-columns 'left)
428 (scroll-bar-columns 'right)
429 (current-column))))
430 (2C-two-columns)
431 (setq other (2C-other))
432 ;; now we're ready to actually split
433 (save-excursion
434 (while (not (eobp))
435 (if (not (and (= (current-column) column)
436 (string= chars
437 (buffer-substring (point)
438 (save-excursion
439 (backward-char arg)
440 (point))))))
441 (setq n (1+ n))
442 (setq point (point))
443 (backward-char arg)
444 (skip-chars-backward " \t")
445 (delete-region point (point))
446 (setq point (point))
447 (insert-char ?\n n)
448 (append-to-buffer other point (progn (end-of-line)
449 (if (eobp)
450 (point)
451 (1+ (point)))))
452 (delete-region point (point))
453 (setq n 0))
454 (forward-line 1)
455 (move-to-column column)))))
460 (defun 2C-dissociate ()
461 "Turn off two-column minor mode in current and associated buffer.
462 If the associated buffer is unmodified and empty, it is killed."
463 (interactive)
464 (let ((buffer (current-buffer)))
465 (save-excursion
466 (and (2C-other)
467 (set-buffer (2C-other))
468 (or (not (2C-other))
469 (eq buffer (2C-other)))
470 (if (and (not (buffer-modified-p))
471 (eobp) (bobp))
472 (kill-buffer nil)
473 (kill-local-variable '2C-mode)
474 (kill-local-variable '2C-window-width)
475 (kill-local-variable '2C-separator)
476 (kill-local-variable 'mode-line-format)
477 (kill-local-variable 'fill-column))))
478 (kill-local-variable '2C-mode)
479 (kill-local-variable '2C-window-width)
480 (kill-local-variable '2C-separator)
481 (kill-local-variable 'mode-line-format)
482 (kill-local-variable 'fill-column)))
486 ;; this doesn't use yank-rectangle, so that the first column can
487 ;; contain long lines
488 (defun 2C-merge ()
489 "Merges the associated buffer with the current buffer.
490 They get merged at the column, which is the value of `2C-window-width',
491 i.e. usually at the vertical window separator. This separator gets
492 replaced with white space. Beyond that the value of `2C-separator' gets
493 inserted on merged lines. The two columns are thus pasted side by side,
494 in a single text. If the other buffer is not displayed to the left of
495 this one, then this one becomes the left column.
497 If you want `2C-separator' on empty lines in the second column,
498 you should put just one space in them. In the final result, you can strip
499 off trailing spaces with \\[delete-trailing-whitespace]."
500 (interactive)
501 (and (> (car (window-edges)) 0) ; not touching left edge of screen
502 (eq (window-buffer (previous-window))
503 (2C-other t))
504 (other-window -1))
505 (save-excursion
506 (let ((b1 (current-buffer))
507 (b2 (2C-other t))
508 string)
509 (goto-char (point-min))
510 (set-buffer b2)
511 (goto-char (point-min))
512 (while (not (eobp))
513 (setq string (buffer-substring (point)
514 (progn (end-of-line) (point))))
515 (or (eobp)
516 (forward-char)) ; next line
517 (set-buffer b1)
518 (if (string= string "")
520 (end-of-line)
521 (indent-to-column 2C-window-width)
522 (insert 2C-separator string))
523 (forward-line 1) ; add one if necessary
524 (set-buffer b2))))
525 (unless (window-full-width-p)
526 (enlarge-window 99999 t)))
528 ;;;;; utility functions ;;;;;
530 (defun 2C-associated-buffer ()
531 "Switch to associated buffer."
532 (interactive)
533 (let ((line (+ (count-lines (point-min) (point))
534 (if (bolp) 1 0)))
535 (col (if (eolp) (if (bolp) 0) (current-column))))
536 (if (get-buffer-window (2C-other t))
537 (select-window (get-buffer-window (2C-other)))
538 (switch-to-buffer (2C-other)))
539 (goto-char (point-min))
540 (newline (forward-line (1- line)))
541 (if col
542 (move-to-column col)
543 (end-of-line 1))))
545 (defun 2C-newline (arg)
546 "Insert ARG newlines in both buffers."
547 (interactive "P")
548 (save-window-excursion
549 (2C-associated-buffer)
550 (newline arg))
551 (newline arg))
553 (defun 2C-toggle-autoscroll (arg)
554 "Toggle autoscrolling.
555 With prefix argument ARG, turn on autoscrolling if ARG is
556 positive, otherwise turn it off. When autoscrolling is turned
557 on, this also realigns the two buffers."
558 (interactive "P")
559 ;(sit-for 0)
560 (setq 2C-autoscroll-start (window-start))
561 (if (setq 2C-autoscroll (if arg
562 (>= (prefix-numeric-value arg) 0)
563 (not 2C-autoscroll)))
564 (select-window
565 (prog1 (selected-window)
566 (message "Autoscrolling is on.")
567 (setq arg (count-lines (point-min) (window-start)))
568 (if (get-buffer-window (2C-other t))
569 (progn
570 (select-window (get-buffer-window (2C-other)))
571 (setq arg (- arg (count-lines (point-min) (window-start))))
572 ;; make sure that other buffer has enough lines
573 (save-excursion
574 (insert-char ?\n
575 (- arg (count-lines (window-start)
576 (goto-char (point-max)))
577 -1)))
578 (scroll-up arg)))))
579 (message "Autoscrolling is off.")))
583 (defun 2C-autoscroll ()
584 (if 2C-autoscroll
585 ;; catch a mouse scroll on non-selected scrollbar
586 (select-window
587 (prog1 (selected-window)
588 (and (consp last-command-event)
589 (not (eq (selected-window)
590 (car (car (cdr last-command-event)))))
591 (select-window (car (car (cdr last-command-event)))))
592 ;; In some cases scrolling causes an error, but post-command-hook
593 ;; shouldn't, and should always stay in the original window
594 (condition-case ()
595 (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil)
596 (/= (window-start) 2C-autoscroll-start)
597 (2C-other)
598 (get-buffer-window (2C-other))
599 (let ((lines (count-lines (window-start)
600 2C-autoscroll-start)))
601 (if (< (window-start) 2C-autoscroll-start)
602 (setq lines (- lines)))
603 (setq 2C-autoscroll-start (window-start))
604 (select-window (get-buffer-window (2C-other)))
605 ;; make sure that other buffer has enough lines
606 (save-excursion
607 (insert-char
608 ?\n (- lines (count-lines (window-start)
609 (goto-char (point-max)))
610 -1)))
611 (scroll-up lines)
612 (setq 2C-autoscroll-start (window-start))))
613 (error))))))
617 (defun 2C-enlarge-window-horizontally (arg)
618 "Make current window ARG columns wider."
619 (interactive "p")
620 (enlarge-window arg t)
621 (and (2C-other)
622 (setq 2C-window-width (+ 2C-window-width arg))
623 (set-buffer (2C-other))
624 (setq 2C-window-width (- 2C-window-width arg))))
626 (defun 2C-shrink-window-horizontally (arg)
627 "Make current window ARG columns narrower."
628 (interactive "p")
629 (2C-enlarge-window-horizontally (- arg)))
633 (provide 'two-column)
635 ;; arch-tag: 2021b5ab-d3a4-4a8c-a21c-1936b0f9e6b1
636 ;;; two-column.el ends here