Fix comment typo.
[bpt/emacs.git] / lisp / align.el
index 5c1e8e7..a384b7c 100644 (file)
@@ -1,16 +1,18 @@
 ;;; align.el --- align text to a specific column, by regexp
 
-;; Copyright (C) 1999, 2000, 2002 Free Sofware Foundation
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
-;; Author: John Wiegley <johnw@gnu.org>
+;; Author: John Wiegley <johnw@gnu.org> 
+;; Maintainer: FSF
 ;; Keywords: convenience languages lisp
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -383,9 +383,6 @@ The possible settings for `align-region-separate' are:
                           regexp function)))))))
   "The `type' form for any `align-rules-list' variable.")
 
-(unless (functionp 'c-guess-basic-syntax)
-  (autoload 'c-guess-basic-syntax "cc-engine"))
-
 (defcustom align-rules-list
   `((lisp-second-arg
      (regexp   . "\\(^\\s-+[^( \t\n]\\|(\\(\\S-+\\)\\s-+\\)\\S-+\\(\\s-+\\)")
@@ -561,7 +558,7 @@ The possible settings for `align-region-separate' are:
     ;; With a numeric prefix argument, or C-u, space delimited text
     ;; tables will be aligned.
     (text-column
-     (regexp   . "\\(^\\|\\S-\\)\\(\\s-+\\)\\(\\S-\\|$\\)")
+     (regexp   . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
      (group    . 2)
      (modes    . align-text-modes)
      (repeat   . t)
@@ -933,8 +930,7 @@ using a REGEXP like \"(\". All you would have to do is to mark the
 region, call `align-regexp' and type in that regular expression."
   (interactive
    (append
-    (list (min (point) (mark))
-         (max (point) (mark)))
+    (list (region-beginning) (region-end))
     (if current-prefix-arg
        (list (read-string "Complex align using regexp: "
                           "\\(\\s-*\\)")
@@ -990,8 +986,7 @@ list of rules (see `align-rules-list'), it can be used to override the
 default alignment rules that would have been used to identify the text
 to be colored."
   (interactive
-   (list (min (mark) (point))
-        (max (mark) (point))
+   (list (region-beginning) (region-end)
         (completing-read
          "Title of rule to highlight: "
          (mapcar
@@ -1078,7 +1073,7 @@ current position."
                           (eq (char-before pos) ?\\))
                 (setq count (1+ count) pos (1- pos)))
               (eq (mod count 2) 1))
-            (goto-char (match-beginning 2))))
+            (goto-char (match-beginning (if reverse 1 2)))))
     result))
 
 (defun align-new-section-p (beg end separator)
@@ -1601,5 +1596,5 @@ aligner would have dealt with are."
 
 (run-hooks 'align-load-hook)
 
-;;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7
+;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7
 ;;; align.el ends here