Commit 6feeb380 authored by John Wiegley's avatar John Wiegley
Browse files

Added a new feature to align.el

parent 7a3fd467
2000-07-16 John Wiegley <
* lisp/align.el (align-newline-and-indent): Adding new function
for auto-aligning blocks of code on RET.
(align-region): Fixed badly formatted minibuffer message.
2000-07-17 Kenichi Handa <>
* international/kkc.el (kkc-show-conversion-list-count): Customize
......@@ -1033,6 +1033,23 @@ to be colored."
(setq align-highlight-overlays
(cdr align-highlight-overlays))))
(defun align-newline-and-indent ()
"A replacement function for `newline-and-indent', aligning as it goes."
(let ((separate (or (if (symbolp align-region-separate)
(symbol-value align-region-separate)
(end (point)))
(call-interactively 'newline-and-indent)
(forward-line -1)
(while (not (or (bobp)
(align-new-section-p (point) end separate)))
(forward-line -1))
(align (point) end))))
;;; Internal Functions:
(defun align-match-tex-pattern (regexp end &optional reverse)
......@@ -1394,12 +1411,17 @@ aligner would have dealt with are."
;; are, if it's a very large region being
;; aligned
(if report
"Aligning `%s' [rule %d of %d] (%d%%)..."
(symbol-name (car rule))
rule-index rule-count
(/ (* (- (point) real-beg) 100)
(- end-mark real-beg))))
(let ((name (symbol-name (car rule))))
(if name
"Aligning `%s' (rule %d of %d) %d%%..."
rule-index rule-count
(/ (* (- (point) real-beg) 100)
(- end-mark real-beg)))
"Aligning %d%%..."
(/ (* (- (point) real-beg) 100)
(- end-mark real-beg))))))
;; if the search ended us on the beginning of
;; the next line, move back to the end of the
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment