-;;; 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.
(defgroup align nil
"Align text to a specific column, by regexp."
+ :version "21.1"
:group 'fill)
;;; User Variables:
(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
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
+ a 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
(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)
(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)))
(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))
;; 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
(run-hooks 'align-load-hook)
+;;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7
;;; align.el ends here