(let ((sec-first end)
(sec-last beg))
(align-region beg end
- (or exclude-rules
- align-mode-exclude-rules-list
- align-exclude-rules-list) nil
separator
- (function
- (lambda (b e mode)
- (when (and mode (listp mode))
- (setq sec-first (min sec-first b)
- sec-last (max sec-last e))))))
+ nil ; rules
+ (or exclude-rules
+ align-mode-exclude-rules-list
+ align-exclude-rules-list)
+ (lambda (b e mode)
+ (when (consp mode)
+ (setq sec-first (min sec-first b)
+ sec-last (max sec-last e)))))
(if (< sec-first sec-last)
(align-region sec-first sec-last 'entire
(or rules align-mode-rules-list align-rules-list)
;;;###autoload
(defun align-newline-and-indent ()
- "A replacement function for `newline-and-indent', aligning as it goes."
+ "A replacement function for `newline-and-indent', aligning as it goes.
+The alignment is done by calling `align' on the region that was
+indented."
(interactive)
(let ((separate (or (if (and (symbolp align-region-separate)
(boundp align-region-separate))