Also require comint when loading.
[bpt/emacs.git] / lisp / align.el
index 122ce2f..923bad4 100644 (file)
@@ -1,16 +1,17 @@
 ;;; align.el --- align text to a specific column, by regexp
 
-;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;; 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
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -559,7 +560,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)
@@ -1074,7 +1075,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)