]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/two-column.el
Switch license to GPLv3 or later.
[gnu-emacs] / lisp / textmodes / two-column.el
index 0643bb99ecba8a93d4f67bd29538f9b0372ad261..2568b53fe36e84145e79f374bf2f3780fe7719c8 100644 (file)
@@ -1,9 +1,13 @@
 ;;; two-column.el --- minor mode for editing of two-column text
 
-;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994, 1995, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
-;; Author: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389
+;; Author: Daniel Pfeiffer <occitan@esperanto.org>
 ;; Adapted-By: ESR, Daniel Pfeiffer
+;; Keywords: wp
+
+;; This file is part of GNU Emacs.
 
 ;; Esperanto:                           English:
 
@@ -14,7 +18,7 @@
 ;; ^gin sub  la  kondi^coj  de  la  GNU         under the terms of the GNU General
 ;; ^Generala  Publika Licenco kiel pub-         Public License as published by the
 ;; likigita far la Liberprogramara Fon-         Free Software Foundation; either
-;; da^jo; a^u eldono 2a,  a^u (la^u via         version 2, or (at your option) any
+;; da^jo; a^u eldono 2a,  a^u (la^u via         version 3, or (at your option) any
 ;; elekto) ajna posta eldono.           later version.
 
 ;; GNU  Emacs  estas  disdonata  en  la         GNU Emacs is distributed in the hope
 ;; GNU Emacs; vidu la dosieron COPYING.         with GNU Emacs; see the file
 ;; Alikaze skribu al la                         COPYING.  If not, write to the
 
-;; Free Software Foundation, 59 Temple Place - Suite 330
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, 51 Franklin Street, Fifth Floor
+;; Boston, MA 02110-1301, USA.
 
+;;; Commentary:
 
 ;;; Komentario:                                 Commentary:
 
 ;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
 (fset '2C-command 2C-mode-map)
 
-;;;###autoload
 ;; This one is for historical reasons and simple keyboards, it is not
 ;; at all mnemonic.  All usual sequences containing 2 were used, and
 ;; f2 could not be set up in a standard way under Emacs 18.
-(global-set-key "\C-x6" '2C-command)
+;;;###autoload (global-set-key "\C-x6" '2C-command)
 
-
-;;;###autoload
-(global-set-key [f2] '2C-command)
+;;;###autoload (global-set-key [f2] '2C-command)
 
 
 (defvar 2C-minor-mode-map
 ;;;;; variable declarations ;;;;;
 
 (defgroup two-column nil
-  "Minor mode for editing of two-column text"
+  "Minor mode for editing of two-column text."
   :prefix "2C-"
   :group 'frames)
 
 (defcustom 2C-mode-line-format
        '("-%*- %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."
+  "*Value of `mode-line-format' for a buffer in two-column minor mode."
   :type 'sexp
   :group 'two-column)
 
@@ -287,7 +289,7 @@ minus this value."
                (kill-local-variable '2C-mode)
                (kill-local-variable 'mode-line-format)
                nil)))
-      (if req (error "You must first set two-column minor mode."))))
+      (if req (error "You must first set two-column minor mode"))))
 
 
 
@@ -326,7 +328,6 @@ These keybindings can be customized in your ~/.emacs by `2C-mode-map',
 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'."
-  (make-local-hook 'post-command-hook)
   (add-hook 'post-command-hook '2C-autoscroll nil t)
   (setq fill-column (- 2C-window-width
                       2C-beyond-fill-column)
@@ -339,9 +340,9 @@ The appearance of the screen can be customized by the variables
 ;;;###autoload
 (defun 2C-two-columns (&optional buffer)
   "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.
+\\<global-map>When called the first time, associates a buffer with the current
+buffer in two-column minor mode (use \\[describe-mode] once in the mode,
+for details.).  It 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 its right."
   (interactive "P")
@@ -366,7 +367,7 @@ first and the associated buffer to its right."
                    (generate-new-buffer (concat "2C/" (buffer-name)))))
               (or buffer
                   (run-hooks '2C-other-buffer-hook))))
-    
+
     (2C-mode (prog1 (point-marker)
               (other-window -1)))))
 
@@ -388,7 +389,7 @@ accepting the proposed default buffer.
       (set-buffer b2)
       (and (2C-other)
           (not (eq b1 (2C-other)))
-          (error "Buffer already associated with buffer `%s'."
+          (error "Buffer already associated with buffer `%s'"
                  (buffer-name (2C-other))))
       (setq b1 (and (assq '2C-window-width (buffer-local-variables))
                    2C-window-width)))
@@ -506,7 +507,7 @@ 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"
+off trailing spaces with \\[delete-trailing-whitespace]."
   (interactive)
   (and (> (car (window-edges)) 0)      ; not touching left edge of screen
        (eq (window-buffer (previous-window))
@@ -639,4 +640,5 @@ When autoscrolling is turned on, this also realigns the two buffers."
 
 (provide 'two-column)
 
+;;; arch-tag: 2021b5ab-d3a4-4a8c-a21c-1936b0f9e6b1
 ;;; two-column.el ends here