summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-01-26 09:22:49 +0900
committerDaiki Ueno <ueno@gnu.org>2016-01-26 09:23:18 +0900
commit4cd7696862e46a4bd7f62c7d27670bc490c59554 (patch)
tree43bfa314029b3f1b84db05c71bb2720eb87892b5
parent34132bae3c8af1fa2b3dea31e7146950169ea6d4 (diff)
align: Expand documentation of align-region
-rw-r--r--gnome-c-align.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/gnome-c-align.el b/gnome-c-align.el
index 446b48f..734800a 100644
--- a/gnome-c-align.el
+++ b/gnome-c-align.el
@@ -493,7 +493,19 @@ This sets `gnome-c-align-identifier-start-column',
;;;###autoload
(defun gnome-c-align-decls-region (beg end)
- "Reformat function declarations in the region between BEG and END."
+ "Reformat function declarations in the region between BEG and END.
+
+The `gnome-c-align-identifier-start-column',
+`gnome-c-align-arglist-start-column', and
+`gnome-c-align-arglist-identifier-start-column' variables
+control the widths.
+
+To set those variables, use \\[gnome-c-align-set-column],
+\\[gnome-c-align-guess-columns], or
+\\[gnome-c-align-guess-optimal-columns].
+
+If they are not set, this function internally calls
+\\[gnome-c-align-guess-optimal-columns] before formatting."
(interactive "r")
(save-excursion
(let (decls)
@@ -513,8 +525,8 @@ This sets `gnome-c-align-identifier-start-column',
(setq gnome-c-align-arglist-identifier-start-column
(cdr (assq 'arglist-identifier-start-column columns))))))
(setq decls (gnome-c-align--scan-decls beg end))
- (mapc #'gnome-c-align--normalize-decl decls)
(dolist (decl decls)
+ (gnome-c-align--normalize-decl decl)
(goto-char (gnome-c-align--decl-identifier-start decl))
(gnome-c-align--indent-to-column
gnome-c-align-identifier-start-column)