(tree-widget-super-format-handler)
[bpt/emacs.git] / lisp / align.el
index 4f63895..563e839 100644 (file)
@@ -466,13 +466,13 @@ The possible settings for `align-region-separate' are:
      (repeat   . t)
      (modes    . align-c++-modes)
      (run-if   . ,(function (lambda () current-prefix-arg))))
-;      (valid
-;       . ,(function
-;        (lambda ()
-;          (memq (caar (c-guess-basic-syntax))
-;                '(brace-list-intro
-;                  brace-list-entry
-;                  brace-entry-open))))))
+                                       ;      (valid
+                                       ;       . ,(function
+                                       ;         (lambda ()
+                                       ;           (memq (caar (c-guess-basic-syntax))
+                                       ;                 '(brace-list-intro
+                                       ;                   brace-list-entry
+                                       ;                   brace-entry-open))))))
 
     ;; With a prefix argument, comma delimiter will be aligned.  Since
     ;; perl-mode doesn't give us enough syntactic information (and we
@@ -525,11 +525,11 @@ The possible settings for `align-region-separate' are:
      (regexp   . "\\(\\s-*\\)\\\\$")
      (modes    . align-c++-modes)
      (column   . c-backslash-column))
-;      (valid
-;       . ,(function
-;        (lambda ()
-;          (memq (caar (c-guess-basic-syntax))
-;                '(cpp-macro cpp-macro-cont))))))
+                                       ;      (valid
+                                       ;       . ,(function
+                                       ;         (lambda ()
+                                       ;           (memq (caar (c-guess-basic-syntax))
+                                       ;                 '(cpp-macro cpp-macro-cont))))))
 
     (basic-line-continuation
      (regexp   . "\\(\\s-*\\)\\\\$")
@@ -578,7 +578,12 @@ The possible settings for `align-region-separate' are:
      (justify  . t)
      (run-if   . ,(function
                   (lambda ()
-                    (eq '- current-prefix-arg))))))
+                    (eq '- current-prefix-arg)))))
+
+    (css-declaration
+     (regexp . "^\\s-*\\w+:\\(\\s-*\\).*;")
+     (group . (1))
+     (modes . '(css-mode html-mode))))
   "*A list describing all of the available alignment rules.
 The format is:
 
@@ -933,10 +938,10 @@ region, call `align-regexp' and type in that regular expression."
     (if current-prefix-arg
        (list (read-string "Complex align using regexp: "
                           "\\(\\s-*\\)")
-             (string-to-int
+             (string-to-number
               (read-string
                "Parenthesis group to modify (justify if negative): " "1"))
-             (string-to-int
+             (string-to-number
               (read-string "Amount of spacing (or column if negative): "
                            (number-to-string align-default-spacing)))
              (y-or-n-p "Repeat throughout line? "))
@@ -1212,6 +1217,14 @@ have been aligned.  No changes will be made to the buffer."
              (cond ((< gocol 0) t)     ; don't do anything
                    ((= cur gocol) t)   ; don't need to
                    ((< cur gocol)      ; just add space
+                    ;; FIXME: It is stated above that "...the
+                    ;;        whitespace to be modified was already
+                    ;;        deleted by `align-region', all we have
+                    ;;        to do here is indent."  However, this
+                    ;;        doesn't seem to be true, so we first
+                    ;;        delete the whitespace to avoid tabs
+                    ;;        after spaces.
+                    (delete-horizontal-space t)
                     (indent-to gocol))
                    (t
                     ;; This code works around an oddity in the
@@ -1588,4 +1601,5 @@ aligner would have dealt with are."
 
 (run-hooks 'align-load-hook)
 
+;;; arch-tag: ef79cccf-1db8-4888-a8a1-d7ce2d1532f7
 ;;; align.el ends here