comparison lisp/align.el @ 102734:c4853c1bf38c

* align.el (align-large-region, align-perl-modes, align-rules-list) (align-open-comment-modes): Fix typos in docstrings. (align-region-separate): Doc fixes.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 26 Mar 2009 16:21:25 +0000
parents 577a3b5b05f5
children 1d1d5d9bd884
comparison
equal deleted inserted replaced
102733:a1a47a7b5087 102734:c4853c1bf38c
172 :type 'face 172 :type 'face
173 :group 'align) 173 :group 'align)
174 174
175 (defcustom align-large-region 10000 175 (defcustom align-large-region 10000
176 "If an integer, defines what constitutes a \"large\" region. 176 "If an integer, defines what constitutes a \"large\" region.
177 If nil,then no messages will ever be printed to the minibuffer." 177 If nil, then no messages will ever be printed to the minibuffer."
178 :type 'integer 178 :type 'integer
179 :group 'align) 179 :group 'align)
180 180
181 (defcustom align-c++-modes '(c++-mode c-mode java-mode) 181 (defcustom align-c++-modes '(c++-mode c-mode java-mode)
182 "A list of modes whose syntax resembles C/C++." 182 "A list of modes whose syntax resembles C/C++."
183 :type '(repeat symbol) 183 :type '(repeat symbol)
184 :group 'align) 184 :group 'align)
185 185
186 (defcustom align-perl-modes '(perl-mode cperl-mode) 186 (defcustom align-perl-modes '(perl-mode cperl-mode)
187 "A list of modes where perl syntax is to be seen." 187 "A list of modes where Perl syntax is to be seen."
188 :type '(repeat symbol) 188 :type '(repeat symbol)
189 :group 'align) 189 :group 'align)
190 190
191 (defcustom align-lisp-modes 191 (defcustom align-lisp-modes
192 '(emacs-lisp-mode lisp-interaction-mode lisp-mode scheme-mode) 192 '(emacs-lisp-mode lisp-interaction-mode lisp-mode scheme-mode)
220 220
221 (defcustom align-open-comment-modes 221 (defcustom align-open-comment-modes
222 (append align-lisp-modes align-c++-modes align-perl-modes 222 (append align-lisp-modes align-c++-modes align-perl-modes
223 '(python-mode makefile-mode)) 223 '(python-mode makefile-mode))
224 "A list of modes with a single-line comment syntax. 224 "A list of modes with a single-line comment syntax.
225 These are comments as in Lisp, which have a beginning but, end with 225 These are comments as in Lisp, which have a beginning, but end with
226 the line (i.e., `comment-end' is an empty string)." 226 the line (i.e., `comment-end' is an empty string)."
227 :type '(repeat symbol) 227 :type '(repeat symbol)
228 :group 'align) 228 :group 'align)
229 229
230 (defcustom align-region-separate "^\\s-*[{}]?\\s-*$" 230 (defcustom align-region-separate "^\\s-*[{}]?\\s-*$"
257 long double epsilon; 257 long double epsilon;
258 long long chi = 10; /* ten */ 258 long long chi = 10; /* ten */
259 259
260 `group' Each contiguous set of lines where a specific alignment 260 `group' Each contiguous set of lines where a specific alignment
261 occurs is considered a section for that alignment rule. 261 occurs is considered a section for that alignment rule.
262 Note that each rule will may have any entirely different 262 Note that each rule may have any entirely different set
263 set of section divisions than another. 263 of section divisions than another.
264 264
265 int alpha = 1; /* one */ 265 int alpha = 1; /* one */
266 double beta = 2.0; 266 double beta = 2.0;
267 long gamma; /* ten */ 267 long gamma; /* ten */
268 268
290 regexp A regular expression string which defines the section 290 regexp A regular expression string which defines the section
291 divider. If the mode you're in has a consistent divider 291 divider. If the mode you're in has a consistent divider
292 between sections, the behavior will be very similar to 292 between sections, the behavior will be very similar to
293 `largest', and faster. But if the mode does not use clear 293 `largest', and faster. But if the mode does not use clear
294 separators (for example, if you collapse your braces onto 294 separators (for example, if you collapse your braces onto
295 the preceding statement in C or perl), `largest' is 295 the preceding statement in C or Perl), `largest' is
296 probably the better alternative. 296 probably the better alternative.
297 297
298 function A function that will be passed the beginning and ending 298 function A function that will be passed the beginning and ending
299 locations of the region in which to look for the section 299 locations of the region in which to look for the section
300 separator. At the very beginning of the attempt to align, 300 separator. At the very beginning of the attempt to align,
301 both of these parameters will be nil, in which case the 301 both of these parameters will be nil, in which case the
302 function should return non-nil if it wants each rule to 302 function should return non-nil if it wants each rule to
303 define its own section, or nil if it wants the largest 303 define its own section, or nil if it wants the largest
304 section found to be used as the common section for all rules 304 section found to be used as the common section for all
305 that occur there. 305 rules that occur there.
306 306
307 list A list of markers within the buffer that represent where 307 list A list of markers within the buffer that represent where
308 the section dividers lie. Be certain to use markers! For 308 the section dividers lie. Be certain to use markers! For
309 when the aligning begins, the ensuing contract/expanding of 309 when the aligning begins, the ensuing contract/expanding of
310 whitespace will throw off any non-marker positions. 310 whitespace will throw off any non-marker positions.
621 characters that should be ignored. For alignment rules, 621 characters that should be ignored. For alignment rules,
622 these are the characters that will be deleted/expanded for 622 these are the characters that will be deleted/expanded for
623 the purposes of alignment. The \"alignment character\" is 623 the purposes of alignment. The \"alignment character\" is
624 always the first character immediately following this 624 always the first character immediately following this
625 parenthesis group. This attribute may also be a list of 625 parenthesis group. This attribute may also be a list of
626 integer, in which case multiple alignment characters will 626 integers, in which case multiple alignment characters will
627 be aligned, with the list of integer identifying the 627 be aligned, with the list of integers identifying the
628 whitespace groups which precede them. The default for 628 whitespace groups which precede them. The default for
629 this attribute is 1. 629 this attribute is 1.
630 630
631 `modes' The `modes' attribute, if set, should name a list of 631 `modes' The `modes' attribute, if set, should name a list of
632 major modes -- or evaluate to such a value -- in which the 632 major modes -- or evaluate to such a value -- in which the
634 modes. 634 modes.
635 635
636 `case-fold' If `regexp' is an ordinary regular expression string 636 `case-fold' If `regexp' is an ordinary regular expression string
637 containing alphabetic character, sometimes you may want 637 containing alphabetic character, sometimes you may want
638 the search to proceed case-insensitively (for languages 638 the search to proceed case-insensitively (for languages
639 that ignore case, such as pascal for example). In that 639 that ignore case, such as Pascal for example). In that
640 case, set `case-fold' to a non-nil value, and the regular 640 case, set `case-fold' to a non-nil value, and the regular
641 expression search will ignore case. If `regexp' is set to 641 expression search will ignore case. If `regexp' is set to
642 a function, that function must handle the job of ignoring 642 a function, that function must handle the job of ignoring
643 case by itself. 643 case by itself.
644 644