]> code.delx.au - gnu-emacs/blobdiff - lisp/align.el
* doc/man/emacsclient.1: Document +line:column option.
[gnu-emacs] / lisp / align.el
index 9eb04ef594f58bdadba8f5b11ac7ba7971fdab4e..7e439f3e073a3440dd1ab30230deceef2f87cac4 100644 (file)
@@ -1,6 +1,6 @@
 ;;; align.el --- align text to a specific column, by regexp -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Maintainer: emacs-devel@gnu.org
@@ -888,15 +888,15 @@ on the format of these lists."
       (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)