*** empty log message ***
[bpt/emacs.git] / lisp / align.el
index 0c71846..bae09d7 100644 (file)
@@ -1,10 +1,9 @@
-;;; align --- align text to a specific column, by regexp
+;;; align.el --- align text to a specific column, by regexp
 
-;; Copyright (C) 1999, 2000 Free Sofware Foundation
+;; Copyright (C) 1999, 2000, 2002 Free Sofware Foundation
 
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Keywords: convenience languages lisp
-;; X-URL: http://www.emacs.org/~johnw/emacs.html
 
 ;; This file is part of GNU Emacs.
 
@@ -580,7 +579,7 @@ The possible settings for `align-region-separate' are:
      (run-if   . ,(function
                   (lambda ()
                     (eq '- current-prefix-arg))))))
-  "*An list describing all of the available alignment rules.
+  "*A list describing all of the available alignment rules.
 The format is:
 
    ((TITLE
@@ -636,9 +635,9 @@ The following attributes are meaningful:
            containing alphabetic character, sometimes you may want
            the search to proceed case-insensitively (for languages
            that ignore case, such as pascal for example).  In that
-           case, set `case-fold' to nil, and the regular expression
-           search will ignore case.  If `regexp' is set to a
-           function, that function must handle the job of ignoring
+           case, set `case-fold' to a non-nil value, and the regular
+           expression search will ignore case.  If `regexp' is set to
+           function, that function must handle the job of ignoring
            case by itself.
 
 `tab-stop'  If the `tab-stop' attribute is set, and non-nil, the
@@ -778,7 +777,7 @@ The following attributes are meaningful:
      (regexp . "^\\s-*#\\s-*\\(if\\w*\\|endif\\)\\(.*\\)$")
      (group  . 2)
      (modes  . align-c++-modes)))
-  "*An list describing text that should be excluded from alignment.
+  "*A list describing text that should be excluded from alignment.
 See the documentation for `align-rules-list' for more info."
   :type align-exclude-rules-list-type
   :group 'align)
@@ -873,7 +872,8 @@ on the format of these lists."
   (interactive "r")
   (let ((separator
         (or separate
-            (if (symbolp align-region-separate)
+            (if (and (symbolp align-region-separate)
+                     (boundp align-region-separate))
                 (symbol-value align-region-separate)
               align-region-separate)
             'entire)))
@@ -1038,7 +1038,8 @@ to be colored."
 (defun align-newline-and-indent ()
   "A replacement function for `newline-and-indent', aligning as it goes."
   (interactive)
-  (let ((separate (or (if (symbolp align-region-separate)
+  (let ((separate (or (if (and (symbolp align-region-separate)
+                              (boundp align-region-separate))
                          (symbol-value align-region-separate)
                        align-region-separate)
                      'entire))
@@ -1412,11 +1413,11 @@ aligner would have dealt with are."
                        ;; are, if it's a very large region being
                        ;; aligned
                        (if report
-                           (let ((name (symbol-name (car rule))))
-                             (if name
+                           (let ((symbol (car rule)))
+                             (if (and symbol (symbolp symbol))
                                  (message
                                   "Aligning `%s' (rule %d of %d) %d%%..."
-                                  rule-index rule-count
+                                  (symbol-name symbol) rule-index rule-count
                                   (/ (* (- (point) real-beg) 100)
                                      (- end-mark real-beg)))
                                (message
@@ -1587,4 +1588,5 @@ aligner would have dealt with are."
 
 (run-hooks 'align-load-hook)
 
+;;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7
 ;;; align.el ends here