(eq '- current-prefix-arg)))))
(css-declaration
- (regexp . "^\\s-*\\w+:\\(\\s-*\\).*;")
+ (regexp . "^\\s-*\\(?:\\w-?\\)+:\\(\\s-*\\).*;")
(group . (1))
(modes . '(css-mode html-mode))))
"A list describing all of the available alignment rules.
(defvar align-highlight-overlays nil
"The current overlays highlighting the text matched by a rule.")
+(defvar align-regexp-history nil
+ "Input history for the full user-entered regex in `align-regexp'")
+
;; Sample extension rule set, for vhdl-mode. This should properly be
;; in vhdl-mode.el itself.
(list (region-beginning) (region-end))
(if current-prefix-arg
(list (read-string "Complex align using regexp: "
- "\\(\\s-*\\)")
+ "\\(\\s-*\\)" 'align-regexp-history)
(string-to-number
(read-string
"Parenthesis group to modify (justify if negative): " "1"))
;;;###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))