all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob c7e48890695a2c1f3f583ff52b2182aa76efc6dd 2448 bytes (raw)
name: doc/emacs/align.texi 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 
@c This is part of the Emacs manual.
@c Copyright (C) 2023 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Alignment
@chapter Alignment
@cindex alignment

  @dfn{Alignment} is the process of adjusting whitespace in a sequence
of lines such that in all lines certain parts begin at the same
column.  This is usually done to enhance readability of a piece of
text or code.  The classic example is aligning a series of assignments
in C-like programming languages:

@example
int a = 1;
short foo = 2;
double blah = 4;
@end example

Is commonly aligned to:

@example
int    a    = 1;
short  foo  = 2;
double blah = 4;
@end example

@findex align
  You can use the command @kbd{M-x align} to align lines in the
current region.  This command knows about common alignment patterns
across many markup and programming languages.  It encodes these
patterns as a set of @dfn{alignment rules}, that say how to align
different kinds of text in different contexts.

@kbd{M-x align} splits the region into a series of @dfn{sections},
usually sequences of non-blank lines, and aligns each section
according to a matching alignment rule by expanding or contracting
stretches of whitespace.  If you call this command with a prefix
argument (@kbd{C-u M-x align}), it enables more alignment rules that
are often useful but may sometimes be too intrusive.  For example, in
a Lisp buffer with the following form:

@lisp
(set-face-attribute 'mode-line-inactive nil
                    :box nil
                    :background nil
                    :underline "black")
@end lisp

Typing (@kbd{C-u M-x align}) yields:

@lisp
(set-face-attribute 'mode-line-inactive nil
                    :box                nil
                    :background         nil
                    :underline          "black")
@end lisp

@vindex align-indent-before-aligning
  If the user option @code{align-indent-before-aligning} is
non-@code{nil}, Emacs indents the region before aligning it with
@kbd{M-x align}.  @xref{Indentation}.

@vindex align-to-tab-stop
  The user option @code{align-to-tab-stop} says whether aligned parts
should start at a tab stop (@pxref{Tab Stops}).  If this option is
@code{nil}, @kbd{M-x align} uses just enough whitespace for alignment,
disregarding tab stops.  If this is a non-@code{nil} symbol, @kbd{M-x
align} checks the value of that symbol, and if this value is
non-@code{nil}, @kbd{M-x align} aligns to tab stops.

debug log:

solving c7e48890695 ...
found c7e48890695 in https://yhetil.org/emacs/m1fs2tigd5.fsf@eshelyaron.com/

applying [1/1] https://yhetil.org/emacs/m1fs2tigd5.fsf@eshelyaron.com/
diff --git a/doc/emacs/align.texi b/doc/emacs/align.texi
new file mode 100644
index 00000000000..c7e48890695

Checking patch doc/emacs/align.texi...
Applied patch doc/emacs/align.texi cleanly.

index at:
100644 c7e48890695a2c1f3f583ff52b2182aa76efc6dd	doc/emacs/align.texi

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.