aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2006-03-16 03:19:56 +0000
committerChong Yidong2006-03-16 03:19:56 +0000
commite0fc8fa2dd2e0a42c55027addc5c78090b5deac7 (patch)
tree788c12dd7408e6c94354959932fc147ae43d7b42
parentdc5c3489f44f5bd0a17ee3deef9363387f5b4de5 (diff)
downloademacs-e0fc8fa2dd2e0a42c55027addc5c78090b5deac7.tar.gz
emacs-e0fc8fa2dd2e0a42c55027addc5c78090b5deac7.zip
* emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
moved here from Emacs manual. * programs.texi (Fortran): Section moved to emacs-xtra. (Program Modes): Xref to Fortran in emacs-xtra. * maintaining.texi (Emerge): Moved to emacs-xtra. * files.texi (Comparing Files): Xref to Emerge in emacs-xtra. * picture.texi: File deleted. * text.texi (Text): Xref to Picture Mode in emacs-xtra. * abbrevs.texi (Abbrevs): * sending.texi (Sending Mail): Picture node removed. * emacs.texi (Top): Update node listings.
-rw-r--r--man/ChangeLog18
-rw-r--r--man/abbrevs.texi2
-rw-r--r--man/emacs-xtra.texi1182
-rw-r--r--man/emacs.texi37
-rw-r--r--man/files.texi4
-rw-r--r--man/maintaining.texi388
-rw-r--r--man/programs.texi519
-rw-r--r--man/sending.texi2
-rw-r--r--man/text.texi6
9 files changed, 1212 insertions, 946 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 99c84283f8e..7301e501d30 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,21 @@
12006-03-15 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
4 moved here from Emacs manual.
5
6 * programs.texi (Fortran): Section moved to emacs-xtra.
7 (Program Modes): Xref to Fortran in emacs-xtra.
8
9 * maintaining.texi (Emerge): Moved to emacs-xtra.
10 * files.texi (Comparing Files): Xref to Emerge in emacs-xtra.
11
12 * picture.texi: File deleted.
13 * text.texi (Text): Xref to Picture Mode in emacs-xtra.
14 * abbrevs.texi (Abbrevs):
15 * sending.texi (Sending Mail): Picture node removed.
16
17 * emacs.texi (Top): Update node listings.
18
12006-03-15 Carsten Dominik <dominik@science.uva.nl> 192006-03-15 Carsten Dominik <dominik@science.uva.nl>
2 20
3 * org.texi: Version number change only. 21 * org.texi: Version number change only.
diff --git a/man/abbrevs.texi b/man/abbrevs.texi
index 683da2204c1..14b6bdbb9f2 100644
--- a/man/abbrevs.texi
+++ b/man/abbrevs.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003, 2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
3@c 2004, 2005, 2006 Free Software Foundation, Inc. 3@c 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Abbrevs, Picture, Maintaining, Top 5@node Abbrevs, Sending Mail, Maintaining, Top
6@chapter Abbrevs 6@chapter Abbrevs
7@cindex abbrevs 7@cindex abbrevs
8@cindex expansion (of abbrevs) 8@cindex expansion (of abbrevs)
diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi
index a352bc913c2..9b3a76f5430 100644
--- a/man/emacs-xtra.texi
+++ b/man/emacs-xtra.texi
@@ -59,6 +59,10 @@ license to the document, as described in section 6 of the license.
59* Autorevert:: Auto Reverting non-file buffers. 59* Autorevert:: Auto Reverting non-file buffers.
60* Subdir switches:: Subdirectory switches in Dired. 60* Subdir switches:: Subdirectory switches in Dired.
61* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. 61* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
62* Emerge:: A convenient way of merging two versions of a program.
63* Picture Mode:: Editing pictures made up of characters
64 using the quarter-plane screen model.
65* Fortran:: Fortran mode and its special features.
62* Index:: 66* Index::
63@end menu 67@end menu
64 68
@@ -1222,6 +1226,1184 @@ the European style, the order of the parameters is changed to @var{day},
1222If one of these functions decides that it applies to a certain date, 1226If one of these functions decides that it applies to a certain date,
1223it returns a value that contains @var{mark}. 1227it returns a value that contains @var{mark}.
1224 1228
1229@node Emerge
1230@chapter Merging Files with Emerge
1231@cindex Emerge
1232@cindex merging files
1233
1234 It's not unusual for programmers to get their signals crossed and
1235modify the same program in two different directions. To recover from
1236this confusion, you need to merge the two versions. Emerge makes this
1237easier. For other ways to compare files, see @ref{Comparing Files,,,
1238emacs, the Emacs Manual} and @ref{Top, Ediff,, ediff, The Ediff
1239Manual}.
1240
1241@menu
1242* Overview of Emerge:: How to start Emerge. Basic concepts.
1243* Submodes of Emerge:: Fast mode vs. Edit mode.
1244 Skip Prefers mode and Auto Advance mode.
1245* State of Difference:: You do the merge by specifying state A or B
1246 for each difference.
1247* Merge Commands:: Commands for selecting a difference,
1248 changing states of differences, etc.
1249* Exiting Emerge:: What to do when you've finished the merge.
1250* Combining in Emerge:: How to keep both alternatives for a difference.
1251* Fine Points of Emerge:: Misc.
1252@end menu
1253
1254@node Overview of Emerge
1255@section Overview of Emerge
1256
1257 To start Emerge, run one of these four commands:
1258
1259@table @kbd
1260@item M-x emerge-files
1261@findex emerge-files
1262Merge two specified files.
1263
1264@item M-x emerge-files-with-ancestor
1265@findex emerge-files-with-ancestor
1266Merge two specified files, with reference to a common ancestor.
1267
1268@item M-x emerge-buffers
1269@findex emerge-buffers
1270Merge two buffers.
1271
1272@item M-x emerge-buffers-with-ancestor
1273@findex emerge-buffers-with-ancestor
1274Merge two buffers with reference to a common ancestor in a third
1275buffer.
1276@end table
1277
1278@cindex merge buffer (Emerge)
1279@cindex A and B buffers (Emerge)
1280 The Emerge commands compare two files or buffers, and display the
1281comparison in three buffers: one for each input text (the @dfn{A buffer}
1282and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
1283takes place. The merge buffer shows the full merged text, not just the
1284differences. Wherever the two input texts differ, you can choose which
1285one of them to include in the merge buffer.
1286
1287 The Emerge commands that take input from existing buffers use only
1288the accessible portions of those buffers, if they are narrowed.
1289@xref{Narrowing,,, emacs, the Emacs Manual}.
1290
1291
1292 If a common ancestor version is available, from which the two texts to
1293be merged were both derived, Emerge can use it to guess which
1294alternative is right. Wherever one current version agrees with the
1295ancestor, Emerge presumes that the other current version is a deliberate
1296change which should be kept in the merged version. Use the
1297@samp{with-ancestor} commands if you want to specify a common ancestor
1298text. These commands read three file or buffer names---variant A,
1299variant B, and the common ancestor.
1300
1301 After the comparison is done and the buffers are prepared, the
1302interactive merging starts. You control the merging by typing special
1303@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
1304For each run of differences between the input texts, you can choose
1305which one of them to keep, or edit them both together.
1306
1307 The merge buffer uses a special major mode, Emerge mode, with commands
1308for making these choices. But you can also edit the buffer with
1309ordinary Emacs commands.
1310
1311 At any given time, the attention of Emerge is focused on one
1312particular difference, called the @dfn{selected} difference. This
1313difference is marked off in the three buffers like this:
1314
1315@example
1316vvvvvvvvvvvvvvvvvvvv
1317@var{text that differs}
1318^^^^^^^^^^^^^^^^^^^^
1319@end example
1320
1321@noindent
1322Emerge numbers all the differences sequentially and the mode
1323line always shows the number of the selected difference.
1324
1325 Normally, the merge buffer starts out with the A version of the text.
1326But when the A version of a difference agrees with the common ancestor,
1327then the B version is initially preferred for that difference.
1328
1329 Emerge leaves the merged text in the merge buffer when you exit. At
1330that point, you can save it in a file with @kbd{C-x C-w}. If you give a
1331numeric argument to @code{emerge-files} or
1332@code{emerge-files-with-ancestor}, it reads the name of the output file
1333using the minibuffer. (This is the last file name those commands read.)
1334Then exiting from Emerge saves the merged text in the output file.
1335
1336 Normally, Emerge commands save the output buffer in its file when you
1337exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
1338save the output buffer, but you can save it yourself if you wish.
1339
1340@node Submodes of Emerge
1341@section Submodes of Emerge
1342
1343 You can choose between two modes for giving merge commands: Fast mode
1344and Edit mode. In Fast mode, basic merge commands are single
1345characters, but ordinary Emacs commands are disabled. This is
1346convenient if you use only merge commands. In Edit mode, all merge
1347commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
1348commands are also available. This allows editing the merge buffer, but
1349slows down Emerge operations.
1350
1351 Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
1352Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
1353and @samp{F}.
1354
1355 Emerge has two additional submodes that affect how particular merge
1356commands work: Auto Advance mode and Skip Prefers mode.
1357
1358 If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
1359advance to the next difference. This lets you go through the merge
1360faster as long as you simply choose one of the alternatives from the
1361input. The mode line indicates Auto Advance mode with @samp{A}.
1362
1363 If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
1364skip over differences in states prefer-A and prefer-B (@pxref{State of
1365Difference}). Thus you see only differences for which neither version
1366is presumed ``correct.'' The mode line indicates Skip Prefers mode with
1367@samp{S}.
1368
1369@findex emerge-auto-advance-mode
1370@findex emerge-skip-prefers-mode
1371 Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
1372clear Auto Advance mode. Use @kbd{s s}
1373(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
1374These commands turn on the mode with a positive argument, turns it off
1375with a negative or zero argument, and toggle the mode with no argument.
1376
1377@node State of Difference
1378@section State of a Difference
1379
1380 In the merge buffer, a difference is marked with lines of @samp{v} and
1381@samp{^} characters. Each difference has one of these seven states:
1382
1383@table @asis
1384@item A
1385The difference is showing the A version. The @kbd{a} command always
1386produces this state; the mode line indicates it with @samp{A}.
1387
1388@item B
1389The difference is showing the B version. The @kbd{b} command always
1390produces this state; the mode line indicates it with @samp{B}.
1391
1392@item default-A
1393@itemx default-B
1394The difference is showing the A or the B state by default, because you
1395haven't made a choice. All differences start in the default-A state
1396(and thus the merge buffer is a copy of the A buffer), except those for
1397which one alternative is ``preferred'' (see below).
1398
1399When you select a difference, its state changes from default-A or
1400default-B to plain A or B. Thus, the selected difference never has
1401state default-A or default-B, and these states are never displayed in
1402the mode line.
1403
1404The command @kbd{d a} chooses default-A as the default state, and @kbd{d
1405b} chooses default-B. This chosen default applies to all differences
1406which you haven't ever selected and for which no alternative is preferred.
1407If you are moving through the merge sequentially, the differences you
1408haven't selected are those following the selected one. Thus, while
1409moving sequentially, you can effectively make the A version the default
1410for some sections of the merge buffer and the B version the default for
1411others by using @kbd{d a} and @kbd{d b} between sections.
1412
1413@item prefer-A
1414@itemx prefer-B
1415The difference is showing the A or B state because it is
1416@dfn{preferred}. This means that you haven't made an explicit choice,
1417but one alternative seems likely to be right because the other
1418alternative agrees with the common ancestor. Thus, where the A buffer
1419agrees with the common ancestor, the B version is preferred, because
1420chances are it is the one that was actually changed.
1421
1422These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
1423
1424@item combined
1425The difference is showing a combination of the A and B states, as a
1426result of the @kbd{x c} or @kbd{x C} commands.
1427
1428Once a difference is in this state, the @kbd{a} and @kbd{b} commands
1429don't do anything to it unless you give them a numeric argument.
1430
1431The mode line displays this state as @samp{comb}.
1432@end table
1433
1434@node Merge Commands
1435@section Merge Commands
1436
1437 Here are the Merge commands for Fast mode; in Edit mode, precede them
1438with @kbd{C-c C-c}:
1439
1440@table @kbd
1441@item p
1442Select the previous difference.
1443
1444@item n
1445Select the next difference.
1446
1447@item a
1448Choose the A version of this difference.
1449
1450@item b
1451Choose the B version of this difference.
1452
1453@item C-u @var{n} j
1454Select difference number @var{n}.
1455
1456@item .
1457Select the difference containing point. You can use this command in the
1458merge buffer or in the A or B buffer.
1459
1460@item q
1461Quit---finish the merge.
1462
1463@item C-]
1464Abort---exit merging and do not save the output.
1465
1466@item f
1467Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
1468
1469@item e
1470Go into Edit mode.
1471
1472@item l
1473Recenter (like @kbd{C-l}) all three windows.
1474
1475@item -
1476Specify part of a prefix numeric argument.
1477
1478@item @var{digit}
1479Also specify part of a prefix numeric argument.
1480
1481@item d a
1482Choose the A version as the default from here down in
1483the merge buffer.
1484
1485@item d b
1486Choose the B version as the default from here down in
1487the merge buffer.
1488
1489@item c a
1490Copy the A version of this difference into the kill ring.
1491
1492@item c b
1493Copy the B version of this difference into the kill ring.
1494
1495@item i a
1496Insert the A version of this difference at point.
1497
1498@item i b
1499Insert the B version of this difference at point.
1500
1501@item m
1502Put point and mark around the difference.
1503
1504@item ^
1505Scroll all three windows down (like @kbd{M-v}).
1506
1507@item v
1508Scroll all three windows up (like @kbd{C-v}).
1509
1510@item <
1511Scroll all three windows left (like @kbd{C-x <}).
1512
1513@item >
1514Scroll all three windows right (like @kbd{C-x >}).
1515
1516@item |
1517Reset horizontal scroll on all three windows.
1518
1519@item x 1
1520Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
1521to full size.)
1522
1523@item x c
1524Combine the two versions of this difference (@pxref{Combining in
1525Emerge}).
1526
1527@item x f
1528Show the names of the files/buffers Emerge is operating on, in a Help
1529window. (Use @kbd{C-u l} to restore windows.)
1530
1531@item x j
1532Join this difference with the following one.
1533(@kbd{C-u x j} joins this difference with the previous one.)
1534
1535@item x s
1536Split this difference into two differences. Before you use this
1537command, position point in each of the three buffers at the place where
1538you want to split the difference.
1539
1540@item x t
1541Trim identical lines off the top and bottom of the difference.
1542Such lines occur when the A and B versions are
1543identical but differ from the ancestor version.
1544@end table
1545
1546@node Exiting Emerge
1547@section Exiting Emerge
1548
1549 The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
1550the results into the output file if you specified one. It restores the
1551A and B buffers to their proper contents, or kills them if they were
1552created by Emerge and you haven't changed them. It also disables the
1553Emerge commands in the merge buffer, since executing them later could
1554damage the contents of the various buffers.
1555
1556 @kbd{C-]} aborts the merge. This means exiting without writing the
1557output file. If you didn't specify an output file, then there is no
1558real difference between aborting and finishing the merge.
1559
1560 If the Emerge command was called from another Lisp program, then its
1561return value is @code{t} for successful completion, or @code{nil} if you
1562abort.
1563
1564@node Combining in Emerge
1565@section Combining the Two Versions
1566
1567 Sometimes you want to keep @emph{both} alternatives for a particular
1568difference. To do this, use @kbd{x c}, which edits the merge buffer
1569like this:
1570
1571@example
1572@group
1573#ifdef NEW
1574@var{version from A buffer}
1575#else /* not NEW */
1576@var{version from B buffer}
1577#endif /* not NEW */
1578@end group
1579@end example
1580
1581@noindent
1582@vindex emerge-combine-versions-template
1583While this example shows C preprocessor conditionals delimiting the two
1584alternative versions, you can specify the strings to use by setting
1585the variable @code{emerge-combine-versions-template} to a string of your
1586choice. In the string, @samp{%a} says where to put version A, and
1587@samp{%b} says where to put version B. The default setting, which
1588produces the results shown above, looks like this:
1589
1590@example
1591@group
1592"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
1593@end group
1594@end example
1595
1596@node Fine Points of Emerge
1597@section Fine Points of Emerge
1598
1599 During the merge, you mustn't try to edit the A and B buffers yourself.
1600Emerge modifies them temporarily, but ultimately puts them back the way
1601they were.
1602
1603 You can have any number of merges going at once---just don't use any one
1604buffer as input to more than one merge at once, since the temporary
1605changes made in these buffers would get in each other's way.
1606
1607 Starting Emerge can take a long time because it needs to compare the
1608files fully. Emacs can't do anything else until @code{diff} finishes.
1609Perhaps in the future someone will change Emerge to do the comparison in
1610the background when the input files are large---then you could keep on
1611doing other things with Emacs until Emerge is ready to accept
1612commands.
1613
1614@vindex emerge-startup-hook
1615 After setting up the merge, Emerge runs the hook
1616@code{emerge-startup-hook}. @xref{Hooks,,, emacs, the Emacs Manual}.
1617
1618@node Picture Mode
1619@chapter Editing Pictures
1620@cindex pictures
1621@cindex making pictures out of text characters
1622@findex edit-picture
1623
1624 To edit a picture made out of text characters (for example, a picture
1625of the division of a register into fields, as a comment in a program),
1626use the command @kbd{M-x edit-picture} to enter Picture mode.
1627
1628 In Picture mode, editing is based on the @dfn{quarter-plane} model of
1629text, according to which the text characters lie studded on an area that
1630stretches infinitely far to the right and downward. The concept of the end
1631of a line does not exist in this model; the most you can say is where the
1632last nonblank character on the line is found.
1633
1634 Of course, Emacs really always considers text as a sequence of
1635characters, and lines really do have ends. But Picture mode replaces
1636the most frequently-used commands with variants that simulate the
1637quarter-plane model of text. They do this by inserting spaces or by
1638converting tabs to spaces.
1639
1640 Most of the basic editing commands of Emacs are redefined by Picture mode
1641to do essentially the same thing but in a quarter-plane way. In addition,
1642Picture mode defines various keys starting with the @kbd{C-c} prefix to
1643run special picture editing commands.
1644
1645 One of these keys, @kbd{C-c C-c}, is particularly important. Often a
1646picture is part of a larger file that is usually edited in some other
1647major mode. @kbd{M-x edit-picture} records the name of the previous
1648major mode so you can use the @kbd{C-c C-c} command
1649(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
1650also deletes spaces from the ends of lines, unless given a numeric
1651argument.
1652
1653 The special commands of Picture mode all work in other modes (provided
1654the @file{picture} library is loaded), but are not bound to keys except
1655in Picture mode. The descriptions below talk of moving ``one column''
1656and so on, but all the picture mode commands handle numeric arguments as
1657their normal equivalents do.
1658
1659@vindex picture-mode-hook
1660 Turning on Picture mode runs the hook @code{picture-mode-hook}.
1661Additional extensions to Picture mode can be found in
1662@file{artist.el}.
1663
1664@menu
1665* Basic Picture:: Basic concepts and simple commands of Picture Mode.
1666* Insert in Picture:: Controlling direction of cursor motion
1667 after "self-inserting" characters.
1668* Tabs in Picture:: Various features for tab stops and indentation.
1669* Rectangles in Picture:: Clearing and superimposing rectangles.
1670@end menu
1671
1672@node Basic Picture
1673@section Basic Editing in Picture Mode
1674
1675@findex picture-forward-column
1676@findex picture-backward-column
1677@findex picture-move-down
1678@findex picture-move-up
1679@cindex editing in Picture mode
1680
1681 Most keys do the same thing in Picture mode that they usually do, but
1682do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
1683run @code{picture-forward-column}, a command which moves point one
1684column to the right, inserting a space if necessary so that the actual
1685end of the line makes no difference. @kbd{C-b} is rebound to run
1686@code{picture-backward-column}, which always moves point left one
1687column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
1688@kbd{C-p} are rebound to run @code{picture-move-down} and
1689@code{picture-move-up}, which can either insert spaces or convert tabs
1690as necessary to make sure that point stays in exactly the same column.
1691@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
1692nonblank character on the line. There is no need to change @kbd{C-a},
1693as the choice of screen model does not affect beginnings of
1694lines.
1695
1696@findex picture-newline
1697 Insertion of text is adapted to the quarter-plane screen model
1698through the use of Overwrite mode (@pxref{Minor Modes,,, emacs, the
1699Emacs Manual}.) Self-inserting characters replace existing text,
1700column by column, rather than pushing existing text to the right.
1701@key{RET} runs @code{picture-newline}, which just moves to the
1702beginning of the following line so that new text will replace that
1703line.
1704
1705@findex picture-backward-clear-column
1706@findex picture-clear-column
1707@findex picture-clear-line
1708 In Picture mode, the commands that normally delete or kill text,
1709instead erase text (replacing it with spaces). @key{DEL}
1710(@code{picture-backward-clear-column}) replaces the preceding
1711character with a space rather than removing it; this moves point
1712backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
1713character or characters with spaces, but does not move point. (If you
1714want to clear characters to spaces and move forward over them, use
1715@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
1716contents of lines, but does not delete the newlines from the buffer.
1717
1718@findex picture-open-line
1719 To do actual insertion, you must use special commands. @kbd{C-o}
1720(@code{picture-open-line}) creates a blank line after the current
1721line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
1722sense in Picture mode, so it is not changed. @kbd{C-j}
1723(@code{picture-duplicate-line}) inserts another line with the same
1724contents below the current line.
1725
1726@kindex C-c C-d @r{(Picture mode)}
1727 To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
1728(which is defined as @code{delete-char}, as @kbd{C-d} is in other
1729modes), or one of the picture rectangle commands (@pxref{Rectangles in
1730Picture}).
1731
1732@node Insert in Picture
1733@section Controlling Motion after Insert
1734
1735@findex picture-movement-up
1736@findex picture-movement-down
1737@findex picture-movement-left
1738@findex picture-movement-right
1739@findex picture-movement-nw
1740@findex picture-movement-ne
1741@findex picture-movement-sw
1742@findex picture-movement-se
1743@kindex C-c < @r{(Picture mode)}
1744@kindex C-c > @r{(Picture mode)}
1745@kindex C-c ^ @r{(Picture mode)}
1746@kindex C-c . @r{(Picture mode)}
1747@kindex C-c ` @r{(Picture mode)}
1748@kindex C-c ' @r{(Picture mode)}
1749@kindex C-c / @r{(Picture mode)}
1750@kindex C-c \ @r{(Picture mode)}
1751 Since ``self-inserting'' characters in Picture mode overwrite and move
1752point, there is no essential restriction on how point should be moved.
1753Normally point moves right, but you can specify any of the eight
1754orthogonal or diagonal directions for motion after a ``self-inserting''
1755character. This is useful for drawing lines in the buffer.
1756
1757@table @kbd
1758@item C-c <
1759@itemx C-c @key{LEFT}
1760Move left after insertion (@code{picture-movement-left}).
1761@item C-c >
1762@itemx C-c @key{RIGHT}
1763Move right after insertion (@code{picture-movement-right}).
1764@item C-c ^
1765@itemx C-c @key{UP}
1766Move up after insertion (@code{picture-movement-up}).
1767@item C-c .
1768@itemx C-c @key{DOWN}
1769Move down after insertion (@code{picture-movement-down}).
1770@item C-c `
1771@itemx C-c @key{HOME}
1772Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
1773@item C-c '
1774@itemx C-c @key{PAGEUP}
1775Move up and right (``northeast'') after insertion
1776(@code{picture-movement-ne}).
1777@item C-c /
1778@itemx C-c @key{END}
1779Move down and left (``southwest'') after insertion
1780@*(@code{picture-movement-sw}).
1781@item C-c \
1782@itemx C-c @key{PAGEDOWN}
1783Move down and right (``southeast'') after insertion
1784@*(@code{picture-movement-se}).
1785@end table
1786
1787@kindex C-c C-f @r{(Picture mode)}
1788@kindex C-c C-b @r{(Picture mode)}
1789@findex picture-motion
1790@findex picture-motion-reverse
1791 Two motion commands move based on the current Picture insertion
1792direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
1793same direction as motion after ``insertion'' currently does, while @kbd{C-c
1794C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
1795
1796@node Tabs in Picture
1797@section Picture Mode Tabs
1798
1799@kindex M-TAB @r{(Picture mode)}
1800@findex picture-tab-search
1801@vindex picture-tab-chars
1802 Two kinds of tab-like action are provided in Picture mode. Use
1803@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
1804With no argument, it moves to a point underneath the next
1805``interesting'' character that follows whitespace in the previous
1806nonblank line. ``Next'' here means ``appearing at a horizontal position
1807greater than the one point starts out at.'' With an argument, as in
1808@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
1809character in the current line. @kbd{M-@key{TAB}} does not change the
1810text; it only moves point. ``Interesting'' characters are defined by
1811the variable @code{picture-tab-chars}, which should define a set of
1812characters. The syntax for this variable is like the syntax used inside
1813of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
1814and the @samp{]}. Its default value is @code{"!-~"}.
1815
1816@findex picture-tab
1817 @key{TAB} itself runs @code{picture-tab}, which operates based on the
1818current tab stop settings; it is the Picture mode equivalent of
1819@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
1820argument it clears the text that it moves over.
1821
1822@kindex C-c TAB @r{(Picture mode)}
1823@findex picture-set-tab-stops
1824 The context-based and tab-stop-based forms of tabbing are brought
1825together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
1826This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
1827would consider significant in the current line. The use of this command,
1828together with @key{TAB}, can get the effect of context-based tabbing. But
1829@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
1830
1831 It may be convenient to prevent use of actual tab characters in
1832pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
1833up the picture. You can do this by setting the variable
1834@code{indent-tabs-mode} to @code{nil}.
1835
1836@node Rectangles in Picture
1837@section Picture Mode Rectangle Commands
1838@cindex rectangles and Picture mode
1839@cindex Picture mode and rectangles
1840
1841 Picture mode defines commands for working on rectangular pieces of
1842the text in ways that fit with the quarter-plane model. The standard
1843rectangle commands may also be useful. @xref{Rectangles,,, emacs, the
1844Emacs Manual}.
1845
1846@table @kbd
1847@item C-c C-k
1848Clear out the region-rectangle with spaces
1849(@code{picture-clear-rectangle}). With argument, delete the text.
1850@item C-c C-w @var{r}
1851Similar, but save rectangle contents in register @var{r} first
1852(@code{picture-clear-rectangle-to-register}).
1853@item C-c C-y
1854Copy last killed rectangle into the buffer by overwriting, with upper
1855left corner at point (@code{picture-yank-rectangle}). With argument,
1856insert instead.
1857@item C-c C-x @var{r}
1858Similar, but use the rectangle in register @var{r}
1859(@code{picture-yank-rectangle-from-register}).
1860@end table
1861
1862@kindex C-c C-k @r{(Picture mode)}
1863@kindex C-c C-w @r{(Picture mode)}
1864@findex picture-clear-rectangle
1865@findex picture-clear-rectangle-to-register
1866 The picture rectangle commands @kbd{C-c C-k}
1867(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
1868(@code{picture-clear-rectangle-to-register}) differ from the standard
1869rectangle commands in that they normally clear the rectangle instead of
1870deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
1871mode.
1872
1873 However, deletion of rectangles can be useful in Picture mode, so
1874these commands delete the rectangle if given a numeric argument.
1875@kbd{C-c C-k} either with or without a numeric argument saves the
1876rectangle for @kbd{C-c C-y}.
1877
1878@kindex C-c C-y @r{(Picture mode)}
1879@kindex C-c C-x @r{(Picture mode)}
1880@findex picture-yank-rectangle
1881@findex picture-yank-rectangle-from-register
1882 The Picture mode commands for yanking rectangles differ from the
1883standard ones in that they overwrite instead of inserting. This is
1884the same way that Picture mode insertion of other text differs from
1885other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
1886(by overwriting) the rectangle that was most recently killed, while
1887@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
1888likewise for the rectangle found in a specified register.
1889
1890@node Fortran
1891@chapter Fortran Mode
1892@cindex Fortran mode
1893@cindex mode, Fortran
1894
1895 Fortran mode provides special motion commands for Fortran statements
1896and subprograms, and indentation commands that understand Fortran
1897conventions of nesting, line numbers and continuation statements.
1898Fortran mode has support for Auto Fill mode that breaks long lines into
1899proper Fortran continuation lines.
1900
1901 Special commands for comments are provided because Fortran comments
1902are unlike those of other languages. Built-in abbrevs optionally save
1903typing when you insert Fortran keywords.
1904
1905 Use @kbd{M-x fortran-mode} to switch to this major mode. This
1906command runs the hook @code{fortran-mode-hook}. @xref{Hooks,,, emacs,
1907the Emacs Manual}.
1908
1909@cindex Fortran77 and Fortran90
1910@findex f90-mode
1911@findex fortran-mode
1912 Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
1913``tab format'') source code. For editing the modern Fortran90 or
1914Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
1915Emacs normally uses Fortran mode for files with extension @samp{.f},
1916@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
1917@samp{.f95}. GNU Fortran supports both kinds of format.
1918
1919@menu
1920* Motion: Fortran Motion. Moving point by statements or subprograms.
1921* Indent: Fortran Indent. Indentation commands for Fortran.
1922* Comments: Fortran Comments. Inserting and aligning comments.
1923* Autofill: Fortran Autofill. Auto fill support for Fortran.
1924* Columns: Fortran Columns. Measuring columns for valid Fortran.
1925* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
1926@end menu
1927
1928@node Fortran Motion
1929@section Motion Commands
1930
1931 In addition to the normal commands for moving by and operating on
1932``defuns'' (Fortran subprograms---functions and subroutines, as well as
1933modules for F90 mode), Fortran mode provides special commands to move by
1934statements and other program units.
1935
1936@table @kbd
1937@kindex C-c C-n @r{(Fortran mode)}
1938@findex fortran-next-statement
1939@findex f90-next-statement
1940@item C-c C-n
1941Move to the beginning of the next statement
1942(@code{fortran-next-statement}/@code{f90-next-statement}).
1943
1944@kindex C-c C-p @r{(Fortran mode)}
1945@findex fortran-previous-statement
1946@findex f90-previous-statement
1947@item C-c C-p
1948Move to the beginning of the previous statement
1949(@code{fortran-previous-statement}/@code{f90-previous-statement}).
1950If there is no previous statement (i.e. if called from the first
1951statement in the buffer), move to the start of the buffer.
1952
1953@kindex C-c C-e @r{(F90 mode)}
1954@findex f90-next-block
1955@item C-c C-e
1956Move point forward to the start of the next code block
1957(@code{f90-next-block}). A code block is a subroutine,
1958@code{if}--@code{endif} statement, and so forth. This command exists
1959for F90 mode only, not Fortran mode. With a numeric argument, this
1960moves forward that many blocks.
1961
1962@kindex C-c C-a @r{(F90 mode)}
1963@findex f90-previous-block
1964@item C-c C-a
1965Move point backward to the previous code block
1966(@code{f90-previous-block}). This is like @code{f90-next-block}, but
1967moves backwards.
1968
1969@kindex C-M-n @r{(Fortran mode)}
1970@findex fortran-end-of-block
1971@findex f90-end-of-block
1972@item C-M-n
1973Move to the end of the current code block
1974(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
1975agument, move forward that number of blocks. The mark is set before
1976moving point. The F90 mode version of this command checks for
1977consistency of block types and labels (if present), but it does not
1978check the outermost block since that may be incomplete.
1979
1980@kindex C-M-p @r{(Fortran mode)}
1981@findex fortran-beginning-of-block
1982@findex f90-beginning-of-block
1983@item C-M-p
1984Move to the start of the current code block
1985(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
1986is like @code{fortran-end-of-block}, but moves backwards.
1987@end table
1988
1989@node Fortran Indent
1990@section Fortran Indentation
1991
1992 Special commands and features are needed for indenting Fortran code in
1993order to make sure various syntactic entities (line numbers, comment line
1994indicators and continuation line flags) appear in the columns that are
1995required for standard, fixed (or tab) format Fortran.
1996
1997@menu
1998* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
1999* Contline: ForIndent Cont. How continuation lines indent.
2000* Numbers: ForIndent Num. How line numbers auto-indent.
2001* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
2002* Vars: ForIndent Vars. Variables controlling Fortran indent style.
2003@end menu
2004
2005@node ForIndent Commands
2006@subsection Fortran Indentation and Filling Commands
2007
2008@table @kbd
2009@item C-M-j
2010Break the current line at point and set up a continuation line
2011(@code{fortran-split-line}).
2012@item M-^
2013Join this line to the previous line (@code{fortran-join-line}).
2014@item C-M-q
2015Indent all the lines of the subprogram point is in
2016(@code{fortran-indent-subprogram}).
2017@item M-q
2018Fill a comment block or statement.
2019@end table
2020
2021@kindex C-M-q @r{(Fortran mode)}
2022@findex fortran-indent-subprogram
2023 The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
2024to reindent all the lines of the Fortran subprogram (function or
2025subroutine) containing point.
2026
2027@kindex C-M-j @r{(Fortran mode)}
2028@findex fortran-split-line
2029 The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
2030a line in the appropriate fashion for Fortran. In a non-comment line,
2031the second half becomes a continuation line and is indented
2032accordingly. In a comment line, both halves become separate comment
2033lines.
2034
2035@kindex M-^ @r{(Fortran mode)}
2036@kindex C-c C-d @r{(Fortran mode)}
2037@findex fortran-join-line
2038 @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
2039which joins a continuation line back to the previous line, roughly as
2040the inverse of @code{fortran-split-line}. The point must be on a
2041continuation line when this command is invoked.
2042
2043@kindex M-q @r{(Fortran mode)}
2044@kbd{M-q} in Fortran mode fills the comment block or statement that
2045point is in. This removes any excess statement continuations.
2046
2047@node ForIndent Cont
2048@subsection Continuation Lines
2049@cindex Fortran continuation lines
2050
2051@vindex fortran-continuation-string
2052 Most Fortran77 compilers allow two ways of writing continuation lines.
2053If the first non-space character on a line is in column 5, then that
2054line is a continuation of the previous line. We call this @dfn{fixed
2055format}. (In GNU Emacs we always count columns from 0; but note that
2056the Fortran standard counts from 1.) The variable
2057@code{fortran-continuation-string} specifies what character to put in
2058column 5. A line that starts with a tab character followed by any digit
2059except @samp{0} is also a continuation line. We call this style of
2060continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
2061with another style of continuation lines).
2062
2063@vindex indent-tabs-mode @r{(Fortran mode)}
2064@vindex fortran-analyze-depth
2065@vindex fortran-tab-mode-default
2066 Fortran mode can use either style of continuation line. When you
2067enter Fortran mode, it tries to deduce the proper continuation style
2068automatically from the buffer contents. It does this by scanning up to
2069@code{fortran-analyze-depth} (default 100) lines from the start of the
2070buffer. The first line that begins with either a tab character or six
2071spaces determines the choice. If the scan fails (for example, if the
2072buffer is new and therefore empty), the value of
2073@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
2074non-@code{nil} for tab format) is used. @samp{/t} in the mode line
2075indicates tab format is selected. Fortran mode sets the value of
2076@code{indent-tabs-mode} accordingly.
2077
2078 If the text on a line starts with the Fortran continuation marker
2079@samp{$}, or if it begins with any non-whitespace character in column
20805, Fortran mode treats it as a continuation line. When you indent a
2081continuation line with @key{TAB}, it converts the line to the current
2082continuation style. When you split a Fortran statement with
2083@kbd{C-M-j}, the continuation marker on the newline is created according
2084to the continuation style.
2085
2086 The setting of continuation style affects several other aspects of
2087editing in Fortran mode. In fixed format mode, the minimum column
2088number for the body of a statement is 6. Lines inside of Fortran
2089blocks that are indented to larger column numbers always use only the
2090space character for whitespace. In tab format mode, the minimum
2091column number for the statement body is 8, and the whitespace before
2092column 8 must always consist of one tab character.
2093
2094@node ForIndent Num
2095@subsection Line Numbers
2096
2097 If a number is the first non-whitespace in the line, Fortran
2098indentation assumes it is a line number and moves it to columns 0
2099through 4. (Columns always count from 0 in GNU Emacs.)
2100
2101@vindex fortran-line-number-indent
2102 Line numbers of four digits or less are normally indented one space.
2103The variable @code{fortran-line-number-indent} controls this; it
2104specifies the maximum indentation a line number can have. The default
2105value of the variable is 1. Fortran mode tries to prevent line number
2106digits passing column 4, reducing the indentation below the specified
2107maximum if necessary. If @code{fortran-line-number-indent} has the
2108value 5, line numbers are right-justified to end in column 4.
2109
2110@vindex fortran-electric-line-number
2111 Simply inserting a line number is enough to indent it according to
2112these rules. As each digit is inserted, the indentation is recomputed.
2113To turn off this feature, set the variable
2114@code{fortran-electric-line-number} to @code{nil}.
2115
2116
2117@node ForIndent Conv
2118@subsection Syntactic Conventions
2119
2120 Fortran mode assumes that you follow certain conventions that simplify
2121the task of understanding a Fortran program well enough to indent it
2122properly:
2123
2124@itemize @bullet
2125@item
2126Two nested @samp{do} loops never share a @samp{continue} statement.
2127
2128@item
2129Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
2130and others are written without embedded whitespace or line breaks.
2131
2132Fortran compilers generally ignore whitespace outside of string
2133constants, but Fortran mode does not recognize these keywords if they
2134are not contiguous. Constructs such as @samp{else if} or @samp{end do}
2135are acceptable, but the second word should be on the same line as the
2136first and not on a continuation line.
2137@end itemize
2138
2139@noindent
2140If you fail to follow these conventions, the indentation commands may
2141indent some lines unaesthetically. However, a correct Fortran program
2142retains its meaning when reindented even if the conventions are not
2143followed.
2144
2145@node ForIndent Vars
2146@subsection Variables for Fortran Indentation
2147
2148@vindex fortran-do-indent
2149@vindex fortran-if-indent
2150@vindex fortran-structure-indent
2151@vindex fortran-continuation-indent
2152@vindex fortran-check-all-num@dots{}
2153@vindex fortran-minimum-statement-indent@dots{}
2154 Several additional variables control how Fortran indentation works:
2155
2156@table @code
2157@item fortran-do-indent
2158Extra indentation within each level of @samp{do} statement (default 3).
2159
2160@item fortran-if-indent
2161Extra indentation within each level of @samp{if}, @samp{select case}, or
2162@samp{where} statements (default 3).
2163
2164@item fortran-structure-indent
2165Extra indentation within each level of @samp{structure}, @samp{union},
2166@samp{map}, or @samp{interface} statements (default 3).
2167
2168@item fortran-continuation-indent
2169Extra indentation for bodies of continuation lines (default 5).
2170
2171@item fortran-check-all-num-for-matching-do
2172In Fortran77, a numbered @samp{do} statement is ended by any statement
2173with a matching line number. It is common (but not compulsory) to use a
2174@samp{continue} statement for this purpose. If this variable has a
2175non-@code{nil} value, indenting any numbered statement must check for a
2176@samp{do} that ends there. If you always end @samp{do} statements with
2177a @samp{continue} line (or if you use the more modern @samp{enddo}),
2178then you can speed up indentation by setting this variable to
2179@code{nil}. The default is @code{nil}.
2180
2181@item fortran-blink-matching-if
2182If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
2183statement moves the cursor momentarily to the matching @samp{if} (or
2184@samp{do}) statement to show where it is. The default is @code{nil}.
2185
2186@item fortran-minimum-statement-indent-fixed
2187Minimum indentation for Fortran statements when using fixed format
2188continuation line style. Statement bodies are never indented less than
2189this much. The default is 6.
2190
2191@item fortran-minimum-statement-indent-tab
2192Minimum indentation for Fortran statements for tab format continuation line
2193style. Statement bodies are never indented less than this much. The
2194default is 8.
2195@end table
2196
2197The variables controlling the indentation of comments are described in
2198the following section.
2199
2200@node Fortran Comments
2201@section Fortran Comments
2202
2203 The usual Emacs comment commands assume that a comment can follow a
2204line of code. In Fortran77, the standard comment syntax requires an
2205entire line to be just a comment. Therefore, Fortran mode replaces the
2206standard Emacs comment commands and defines some new variables.
2207
2208@vindex fortran-comment-line-start
2209 Fortran mode can also handle the Fortran90 comment syntax where comments
2210start with @samp{!} and can follow other text. Because only some Fortran77
2211compilers accept this syntax, Fortran mode will not insert such comments
2212unless you have said in advance to do so. To do this, set the variable
2213@code{fortran-comment-line-start} to @samp{"!"}.
2214
2215@table @kbd
2216@item M-;
2217Align comment or insert new comment (@code{fortran-indent-comment}).
2218
2219@item C-x ;
2220Applies to nonstandard @samp{!} comments only.
2221
2222@item C-c ;
2223Turn all lines of the region into comments, or (with argument) turn them back
2224into real code (@code{fortran-comment-region}).
2225@end table
2226
2227@findex fortran-indent-comment
2228 @kbd{M-;} in Fortran mode is redefined as the command
2229@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
2230recognizes any kind of existing comment and aligns its text appropriately;
2231if there is no existing comment, a comment is inserted and aligned. But
2232inserting and aligning comments are not the same in Fortran mode as in
2233other modes.
2234
2235 When a new comment must be inserted, if the current line is blank, a
2236full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
2237comment is inserted if you have said you want to use them. Otherwise a
2238full-line comment is inserted on a new line before the current line.
2239
2240 Nonstandard @samp{!} comments are aligned like comments in other
2241languages, but full-line comments are different. In a standard full-line
2242comment, the comment delimiter itself must always appear in column zero.
2243What can be aligned is the text within the comment. You can choose from
2244three styles of alignment by setting the variable
2245@code{fortran-comment-indent-style} to one of these values:
2246
2247@vindex fortran-comment-indent-style
2248@vindex fortran-comment-line-extra-indent
2249@table @code
2250@item fixed
2251Align the text at a fixed column, which is the sum of
2252@code{fortran-comment-line-extra-indent} and the minimum statement
2253indentation. This is the default.
2254
2255The minimum statement indentation is
2256@code{fortran-minimum-statement-indent-fixed} for fixed format
2257continuation line style and @code{fortran-minimum-statement-indent-tab}
2258for tab format style.
2259
2260@item relative
2261Align the text as if it were a line of code, but with an additional
2262@code{fortran-comment-line-extra-indent} columns of indentation.
2263
2264@item nil
2265Don't move text in full-line comments automatically.
2266@end table
2267
2268@vindex fortran-comment-indent-char
2269 In addition, you can specify the character to be used to indent within
2270full-line comments by setting the variable
2271@code{fortran-comment-indent-char} to the single-character string you want
2272to use.
2273
2274@vindex fortran-directive-re
2275 Compiler directive lines, or preprocessor lines, have much the same
2276appearance as comment lines. It is important, though, that such lines
2277never be indented at all, no matter what the value of
2278@code{fortran-comment-indent-style}. The variable
2279@code{fortran-directive-re} is a regular expression that specifies which
2280lines are directives. Matching lines are never indented, and receive
2281distinctive font-locking.
2282
2283 The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
2284you use @samp{!} comments, this command can be used with them. Otherwise
2285it is useless in Fortran mode.
2286
2287@kindex C-c ; @r{(Fortran mode)}
2288@findex fortran-comment-region
2289@vindex fortran-comment-region
2290 The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
2291lines of the region into comments by inserting the string @samp{C$$$} at
2292the front of each one. With a numeric argument, it turns the region
2293back into live code by deleting @samp{C$$$} from the front of each line
2294in it. The string used for these comments can be controlled by setting
2295the variable @code{fortran-comment-region}. Note that here we have an
2296example of a command and a variable with the same name; these two uses
2297of the name never conflict because in Lisp and in Emacs it is always
2298clear from the context which one is meant.
2299
2300@node Fortran Autofill
2301@section Auto Fill in Fortran Mode
2302
2303 Fortran mode has specialized support for Auto Fill mode, which is a
2304minor mode that automatically splits statements as you insert them
2305when they become too wide. Splitting a statement involves making
2306continuation lines using @code{fortran-continuation-string}
2307(@pxref{ForIndent Cont}). This splitting happens when you type
2308@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
2309indentation commands. You activate Auto Fill in Fortran mode in the
2310normal way. @xref{Auto Fill,,, emacs, the Emacs Manual}.
2311
2312@vindex fortran-break-before-delimiters
2313 Auto Fill breaks lines at spaces or delimiters when the lines get
2314longer than the desired width (the value of @code{fill-column}). The
2315delimiters (besides whitespace) that Auto Fill can break at are
2316@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
2317and @samp{,}. The line break comes after the delimiter if the
2318variable @code{fortran-break-before-delimiters} is @code{nil}.
2319Otherwise (and by default), the break comes before the delimiter.
2320
2321 To enable Auto Fill in all Fortran buffers, add
2322@code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks,,,
2323emacs, the Emacs Manual}.
2324
2325@node Fortran Columns
2326@section Checking Columns in Fortran
2327
2328@table @kbd
2329@item C-c C-r
2330Display a ``column ruler'' momentarily above the current line
2331(@code{fortran-column-ruler}).
2332@item C-c C-w
2333Split the current window horizontally temporarily so that it is 72
2334columns wide (@code{fortran-window-create-momentarily}). This may
2335help you avoid making lines longer than the 72-character limit that
2336some Fortran compilers impose.
2337@item C-u C-c C-w
2338Split the current window horizontally so that it is 72 columns wide
2339(@code{fortran-window-create}). You can then continue editing.
2340@item M-x fortran-strip-sequence-nos
2341Delete all text in column 72 and beyond.
2342@end table
2343
2344@kindex C-c C-r @r{(Fortran mode)}
2345@findex fortran-column-ruler
2346 The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
2347ruler momentarily above the current line. The comment ruler is two lines
2348of text that show you the locations of columns with special significance in
2349Fortran programs. Square brackets show the limits of the columns for line
2350numbers, and curly brackets show the limits of the columns for the
2351statement body. Column numbers appear above them.
2352
2353 Note that the column numbers count from zero, as always in GNU Emacs.
2354As a result, the numbers may be one less than those you are familiar
2355with; but the positions they indicate in the line are standard for
2356Fortran.
2357
2358@vindex fortran-column-ruler-fixed
2359@vindex fortran-column-ruler-tabs
2360 The text used to display the column ruler depends on the value of the
2361variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
2362@code{nil}, then the value of the variable
2363@code{fortran-column-ruler-fixed} is used as the column ruler.
2364Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
2365displayed. By changing these variables, you can change the column ruler
2366display.
2367
2368@kindex C-c C-w @r{(Fortran mode)}
2369@findex fortran-window-create-momentarily
2370 @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
2371splits the current window horizontally, making a window 72 columns
2372wide, so you can see any lines that are too long. Type a space to
2373restore the normal width.
2374
2375@kindex C-u C-c C-w @r{(Fortran mode)}
2376@findex fortran-window-create
2377 You can also split the window horizontally and continue editing with
2378the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
2379fortran-window-create}). By editing in this window you can
2380immediately see when you make a line too wide to be correct Fortran.
2381
2382@findex fortran-strip-sequence-nos
2383 The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
2384column 72 and beyond, on all lines in the current buffer. This is the
2385easiest way to get rid of old sequence numbers.
2386
2387@node Fortran Abbrev
2388@section Fortran Keyword Abbrevs
2389
2390 Fortran mode provides many built-in abbrevs for common keywords and
2391declarations. These are the same sort of abbrev that you can define
2392yourself. To use them, you must turn on Abbrev mode.
2393@xref{Abbrevs,,, emacs, the Emacs Manual}.
2394
2395 The built-in abbrevs are unusual in one way: they all start with a
2396semicolon. You cannot normally use semicolon in an abbrev, but Fortran
2397mode makes this possible by changing the syntax of semicolon to ``word
2398constituent.''
2399
2400 For example, one built-in Fortran abbrev is @samp{;c} for
2401@samp{continue}. If you insert @samp{;c} and then insert a punctuation
2402character such as a space or a newline, the @samp{;c} expands automatically
2403to @samp{continue}, provided Abbrev mode is enabled.@refill
2404
2405 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
2406Fortran abbrevs and what they stand for.
1225 2407
1226@node Index 2408@node Index
1227@unnumbered Index 2409@unnumbered Index
diff --git a/man/emacs.texi b/man/emacs.texi
index ce3c7318945..647d199f612 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -103,8 +103,6 @@ Text Mode
103Outline Mode 103Outline Mode
104@TeX{} Mode 104@TeX{} Mode
105Formatted Text 105Formatted Text
106Fortran Mode
107Fortran Indentation
108Shell Command History 106Shell Command History
109 107
110The ones for Dired and Rmail have had the items turned into :: items 108The ones for Dired and Rmail have had the items turned into :: items
@@ -182,8 +180,6 @@ Advanced Features
182* Maintaining:: Features for maintaining large programs. 180* Maintaining:: Features for maintaining large programs.
183* Abbrevs:: How to define text abbreviations to reduce 181* Abbrevs:: How to define text abbreviations to reduce
184 the number of characters you must type. 182 the number of characters you must type.
185* Picture:: Editing pictures made up of characters
186 using the quarter-plane screen model.
187* Sending Mail:: Sending mail in Emacs. 183* Sending Mail:: Sending mail in Emacs.
188* Rmail:: Reading mail in Emacs. 184* Rmail:: Reading mail in Emacs.
189* Dired:: You can ``edit'' a directory to manage files in it. 185* Dired:: You can ``edit'' a directory to manage files in it.
@@ -525,7 +521,6 @@ Editing Programs
525* Misc for Programs:: Other Emacs features useful for editing programs. 521* Misc for Programs:: Other Emacs features useful for editing programs.
526* C Modes:: Special commands of C, C++, Objective-C, 522* C Modes:: Special commands of C, C++, Objective-C,
527 Java, and Pike modes. 523 Java, and Pike modes.
528* Fortran:: Fortran mode and its special features.
529* Asm Mode:: Asm mode and its special features. 524* Asm Mode:: Asm mode and its special features.
530 525
531Top-Level Definitions, or Defuns 526Top-Level Definitions, or Defuns
@@ -572,15 +567,6 @@ C and Related Modes
572* Other C Commands:: Filling comments, viewing expansion of macros, 567* Other C Commands:: Filling comments, viewing expansion of macros,
573 and other neat features. 568 and other neat features.
574 569
575Fortran Mode
576
577* Fortran Motion:: Moving point by statements or subprograms.
578* Fortran Indent:: Indentation commands for Fortran.
579* Fortran Comments:: Inserting and aligning comments.
580* Fortran Autofill:: Auto fill minor mode for Fortran.
581* Fortran Columns:: Measuring columns for valid Fortran.
582* Fortran Abbrev:: Built-in abbrevs for Fortran keywords.
583
584Compiling and Testing Programs 570Compiling and Testing Programs
585 571
586* Compilation:: Compiling programs in languages other 572* Compilation:: Compiling programs in languages other
@@ -615,7 +601,6 @@ Maintaining Large Programs
615* Format of ChangeLog:: What the change log file looks like. 601* Format of ChangeLog:: What the change log file looks like.
616* Tags:: Go direct to any function in your program in one 602* Tags:: Go direct to any function in your program in one
617 command. Tags remembers which file it is in. 603 command. Tags remembers which file it is in.
618* Emerge:: A convenient way of merging two versions of a program.
619 604
620Tags Tables 605Tags Tables
621 606
@@ -627,19 +612,6 @@ Tags Tables
627* Tags Search:: Using a tags table for searching and replacing. 612* Tags Search:: Using a tags table for searching and replacing.
628* List Tags:: Listing and finding tags defined in a file. 613* List Tags:: Listing and finding tags defined in a file.
629 614
630Merging Files with Emerge
631
632* Overview of Emerge:: How to start Emerge. Basic concepts.
633* Submodes of Emerge:: Fast mode vs. Edit mode.
634 Skip Prefers mode and Auto Advance mode.
635* State of Difference:: You do the merge by specifying state A or B
636 for each difference.
637* Merge Commands:: Commands for selecting a difference,
638 changing states of differences, etc.
639* Exiting Emerge:: What to do when you've finished the merge.
640* Combining in Emerge:: How to keep both alternatives for a difference.
641* Fine Points of Emerge:: Misc.
642
643Abbrevs 615Abbrevs
644 616
645* Abbrev Concepts:: Fundamentals of defined abbrevs. 617* Abbrev Concepts:: Fundamentals of defined abbrevs.
@@ -650,14 +622,6 @@ Abbrevs
650* Dynamic Abbrevs:: Abbreviations for words already in the buffer. 622* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
651* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling. 623* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
652 624
653Editing Pictures
654
655* Basic Picture:: Basic concepts and simple commands of Picture Mode.
656* Insert in Picture:: Controlling direction of cursor motion
657 after "self-inserting" characters.
658* Tabs in Picture:: Various features for tab stops and indentation.
659* Rectangles in Picture:: Clearing and superimposing rectangles.
660
661Sending Mail 625Sending Mail
662 626
663* Mail Format:: Format of the mail being composed. 627* Mail Format:: Format of the mail being composed.
@@ -1179,7 +1143,6 @@ shell commands.
1179@include building.texi 1143@include building.texi
1180@include maintaining.texi 1144@include maintaining.texi
1181@include abbrevs.texi 1145@include abbrevs.texi
1182@include picture.texi
1183@include sending.texi 1146@include sending.texi
1184@include rmail.texi 1147@include rmail.texi
1185@include dired.texi 1148@include dired.texi
diff --git a/man/files.texi b/man/files.texi
index 23846167b6e..3d671397b34 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -3037,8 +3037,8 @@ typically the result of a failed merge from a version control system
3037mode provides commands to resolve conflicts by selecting specific 3037mode provides commands to resolve conflicts by selecting specific
3038changes. 3038changes.
3039 3039
3040 See also @ref{Emerge}, and @ref{Top,,, ediff, The Ediff Manual}, for 3040 @inforef{Emerge,, emacs-xtra} for the Emerge facility, which
3041convenient facilities for merging two similar files. 3041provides a powerful interface for merging files.
3042 3042
3043@node Misc File Ops 3043@node Misc File Ops
3044@section Miscellaneous File Operations 3044@section Miscellaneous File Operations
diff --git a/man/maintaining.texi b/man/maintaining.texi
index 9836aae4e83..f0b5f1c31af 100644
--- a/man/maintaining.texi
+++ b/man/maintaining.texi
@@ -14,7 +14,6 @@ also particularly useful for this purpose.
14* Format of ChangeLog:: What the change log file looks like. 14* Format of ChangeLog:: What the change log file looks like.
15* Tags:: Go direct to any function in your program in one 15* Tags:: Go direct to any function in your program in one
16 command. Tags remembers which file it is in. 16 command. Tags remembers which file it is in.
17* Emerge:: A convenient way of merging two versions of a program.
18@end menu 17@end menu
19 18
20@node Change Log 19@node Change Log
@@ -846,393 +845,6 @@ details.
846 You can also use the collection of tag names to complete a symbol 845 You can also use the collection of tag names to complete a symbol
847name in the buffer. @xref{Symbol Completion}. 846name in the buffer. @xref{Symbol Completion}.
848 847
849@node Emerge
850@section Merging Files with Emerge
851@cindex Emerge
852@cindex merging files
853
854 It's not unusual for programmers to get their signals crossed and
855modify the same program in two different directions. To recover from
856this confusion, you need to merge the two versions. Emerge makes this
857easier. See also @ref{Comparing Files}, for other ways to compare
858files, and @ref{Top, Ediff,, ediff, The Ediff Manual}.
859
860@menu
861* Overview of Emerge:: How to start Emerge. Basic concepts.
862* Submodes of Emerge:: Fast mode vs. Edit mode.
863 Skip Prefers mode and Auto Advance mode.
864* State of Difference:: You do the merge by specifying state A or B
865 for each difference.
866* Merge Commands:: Commands for selecting a difference,
867 changing states of differences, etc.
868* Exiting Emerge:: What to do when you've finished the merge.
869* Combining in Emerge:: How to keep both alternatives for a difference.
870* Fine Points of Emerge:: Misc.
871@end menu
872
873@node Overview of Emerge
874@subsection Overview of Emerge
875
876 To start Emerge, run one of these four commands:
877
878@table @kbd
879@item M-x emerge-files
880@findex emerge-files
881Merge two specified files.
882
883@item M-x emerge-files-with-ancestor
884@findex emerge-files-with-ancestor
885Merge two specified files, with reference to a common ancestor.
886
887@item M-x emerge-buffers
888@findex emerge-buffers
889Merge two buffers.
890
891@item M-x emerge-buffers-with-ancestor
892@findex emerge-buffers-with-ancestor
893Merge two buffers with reference to a common ancestor in a third
894buffer.
895@end table
896
897@cindex merge buffer (Emerge)
898@cindex A and B buffers (Emerge)
899 The Emerge commands compare two files or buffers, and display the
900comparison in three buffers: one for each input text (the @dfn{A buffer}
901and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
902takes place. The merge buffer shows the full merged text, not just the
903differences. Wherever the two input texts differ, you can choose which
904one of them to include in the merge buffer.
905
906 The Emerge commands that take input from existing buffers use only the
907accessible portions of those buffers, if they are narrowed
908(@pxref{Narrowing}).
909
910 If a common ancestor version is available, from which the two texts to
911be merged were both derived, Emerge can use it to guess which
912alternative is right. Wherever one current version agrees with the
913ancestor, Emerge presumes that the other current version is a deliberate
914change which should be kept in the merged version. Use the
915@samp{with-ancestor} commands if you want to specify a common ancestor
916text. These commands read three file or buffer names---variant A,
917variant B, and the common ancestor.
918
919 After the comparison is done and the buffers are prepared, the
920interactive merging starts. You control the merging by typing special
921@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
922For each run of differences between the input texts, you can choose
923which one of them to keep, or edit them both together.
924
925 The merge buffer uses a special major mode, Emerge mode, with commands
926for making these choices. But you can also edit the buffer with
927ordinary Emacs commands.
928
929 At any given time, the attention of Emerge is focused on one
930particular difference, called the @dfn{selected} difference. This
931difference is marked off in the three buffers like this:
932
933@example
934vvvvvvvvvvvvvvvvvvvv
935@var{text that differs}
936^^^^^^^^^^^^^^^^^^^^
937@end example
938
939@noindent
940Emerge numbers all the differences sequentially and the mode
941line always shows the number of the selected difference.
942
943 Normally, the merge buffer starts out with the A version of the text.
944But when the A version of a difference agrees with the common ancestor,
945then the B version is initially preferred for that difference.
946
947 Emerge leaves the merged text in the merge buffer when you exit. At
948that point, you can save it in a file with @kbd{C-x C-w}. If you give a
949numeric argument to @code{emerge-files} or
950@code{emerge-files-with-ancestor}, it reads the name of the output file
951using the minibuffer. (This is the last file name those commands read.)
952Then exiting from Emerge saves the merged text in the output file.
953
954 Normally, Emerge commands save the output buffer in its file when you
955exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
956save the output buffer, but you can save it yourself if you wish.
957
958@node Submodes of Emerge
959@subsection Submodes of Emerge
960
961 You can choose between two modes for giving merge commands: Fast mode
962and Edit mode. In Fast mode, basic merge commands are single
963characters, but ordinary Emacs commands are disabled. This is
964convenient if you use only merge commands. In Edit mode, all merge
965commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
966commands are also available. This allows editing the merge buffer, but
967slows down Emerge operations.
968
969 Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
970Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
971and @samp{F}.
972
973 Emerge has two additional submodes that affect how particular merge
974commands work: Auto Advance mode and Skip Prefers mode.
975
976 If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
977advance to the next difference. This lets you go through the merge
978faster as long as you simply choose one of the alternatives from the
979input. The mode line indicates Auto Advance mode with @samp{A}.
980
981 If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
982skip over differences in states prefer-A and prefer-B (@pxref{State of
983Difference}). Thus you see only differences for which neither version
984is presumed ``correct.'' The mode line indicates Skip Prefers mode with
985@samp{S}.
986
987@findex emerge-auto-advance-mode
988@findex emerge-skip-prefers-mode
989 Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
990clear Auto Advance mode. Use @kbd{s s}
991(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
992These commands turn on the mode with a positive argument, turns it off
993with a negative or zero argument, and toggle the mode with no argument.
994
995@node State of Difference
996@subsection State of a Difference
997
998 In the merge buffer, a difference is marked with lines of @samp{v} and
999@samp{^} characters. Each difference has one of these seven states:
1000
1001@table @asis
1002@item A
1003The difference is showing the A version. The @kbd{a} command always
1004produces this state; the mode line indicates it with @samp{A}.
1005
1006@item B
1007The difference is showing the B version. The @kbd{b} command always
1008produces this state; the mode line indicates it with @samp{B}.
1009
1010@item default-A
1011@itemx default-B
1012The difference is showing the A or the B state by default, because you
1013haven't made a choice. All differences start in the default-A state
1014(and thus the merge buffer is a copy of the A buffer), except those for
1015which one alternative is ``preferred'' (see below).
1016
1017When you select a difference, its state changes from default-A or
1018default-B to plain A or B. Thus, the selected difference never has
1019state default-A or default-B, and these states are never displayed in
1020the mode line.
1021
1022The command @kbd{d a} chooses default-A as the default state, and @kbd{d
1023b} chooses default-B. This chosen default applies to all differences
1024which you haven't ever selected and for which no alternative is preferred.
1025If you are moving through the merge sequentially, the differences you
1026haven't selected are those following the selected one. Thus, while
1027moving sequentially, you can effectively make the A version the default
1028for some sections of the merge buffer and the B version the default for
1029others by using @kbd{d a} and @kbd{d b} between sections.
1030
1031@item prefer-A
1032@itemx prefer-B
1033The difference is showing the A or B state because it is
1034@dfn{preferred}. This means that you haven't made an explicit choice,
1035but one alternative seems likely to be right because the other
1036alternative agrees with the common ancestor. Thus, where the A buffer
1037agrees with the common ancestor, the B version is preferred, because
1038chances are it is the one that was actually changed.
1039
1040These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
1041
1042@item combined
1043The difference is showing a combination of the A and B states, as a
1044result of the @kbd{x c} or @kbd{x C} commands.
1045
1046Once a difference is in this state, the @kbd{a} and @kbd{b} commands
1047don't do anything to it unless you give them a numeric argument.
1048
1049The mode line displays this state as @samp{comb}.
1050@end table
1051
1052@node Merge Commands
1053@subsection Merge Commands
1054
1055 Here are the Merge commands for Fast mode; in Edit mode, precede them
1056with @kbd{C-c C-c}:
1057
1058@table @kbd
1059@item p
1060Select the previous difference.
1061
1062@item n
1063Select the next difference.
1064
1065@item a
1066Choose the A version of this difference.
1067
1068@item b
1069Choose the B version of this difference.
1070
1071@item C-u @var{n} j
1072Select difference number @var{n}.
1073
1074@item .
1075Select the difference containing point. You can use this command in the
1076merge buffer or in the A or B buffer.
1077
1078@item q
1079Quit---finish the merge.
1080
1081@item C-]
1082Abort---exit merging and do not save the output.
1083
1084@item f
1085Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
1086
1087@item e
1088Go into Edit mode.
1089
1090@item l
1091Recenter (like @kbd{C-l}) all three windows.
1092
1093@item -
1094Specify part of a prefix numeric argument.
1095
1096@item @var{digit}
1097Also specify part of a prefix numeric argument.
1098
1099@item d a
1100Choose the A version as the default from here down in
1101the merge buffer.
1102
1103@item d b
1104Choose the B version as the default from here down in
1105the merge buffer.
1106
1107@item c a
1108Copy the A version of this difference into the kill ring.
1109
1110@item c b
1111Copy the B version of this difference into the kill ring.
1112
1113@item i a
1114Insert the A version of this difference at point.
1115
1116@item i b
1117Insert the B version of this difference at point.
1118
1119@item m
1120Put point and mark around the difference.
1121
1122@item ^
1123Scroll all three windows down (like @kbd{M-v}).
1124
1125@item v
1126Scroll all three windows up (like @kbd{C-v}).
1127
1128@item <
1129Scroll all three windows left (like @kbd{C-x <}).
1130
1131@item >
1132Scroll all three windows right (like @kbd{C-x >}).
1133
1134@item |
1135Reset horizontal scroll on all three windows.
1136
1137@item x 1
1138Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
1139to full size.)
1140
1141@item x c
1142Combine the two versions of this difference (@pxref{Combining in
1143Emerge}).
1144
1145@item x f
1146Show the names of the files/buffers Emerge is operating on, in a Help
1147window. (Use @kbd{C-u l} to restore windows.)
1148
1149@item x j
1150Join this difference with the following one.
1151(@kbd{C-u x j} joins this difference with the previous one.)
1152
1153@item x s
1154Split this difference into two differences. Before you use this
1155command, position point in each of the three buffers at the place where
1156you want to split the difference.
1157
1158@item x t
1159Trim identical lines off the top and bottom of the difference.
1160Such lines occur when the A and B versions are
1161identical but differ from the ancestor version.
1162@end table
1163
1164@node Exiting Emerge
1165@subsection Exiting Emerge
1166
1167 The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
1168the results into the output file if you specified one. It restores the
1169A and B buffers to their proper contents, or kills them if they were
1170created by Emerge and you haven't changed them. It also disables the
1171Emerge commands in the merge buffer, since executing them later could
1172damage the contents of the various buffers.
1173
1174 @kbd{C-]} aborts the merge. This means exiting without writing the
1175output file. If you didn't specify an output file, then there is no
1176real difference between aborting and finishing the merge.
1177
1178 If the Emerge command was called from another Lisp program, then its
1179return value is @code{t} for successful completion, or @code{nil} if you
1180abort.
1181
1182@node Combining in Emerge
1183@subsection Combining the Two Versions
1184
1185 Sometimes you want to keep @emph{both} alternatives for a particular
1186difference. To do this, use @kbd{x c}, which edits the merge buffer
1187like this:
1188
1189@example
1190@group
1191#ifdef NEW
1192@var{version from A buffer}
1193#else /* not NEW */
1194@var{version from B buffer}
1195#endif /* not NEW */
1196@end group
1197@end example
1198
1199@noindent
1200@vindex emerge-combine-versions-template
1201While this example shows C preprocessor conditionals delimiting the two
1202alternative versions, you can specify the strings to use by setting
1203the variable @code{emerge-combine-versions-template} to a string of your
1204choice. In the string, @samp{%a} says where to put version A, and
1205@samp{%b} says where to put version B. The default setting, which
1206produces the results shown above, looks like this:
1207
1208@example
1209@group
1210"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
1211@end group
1212@end example
1213
1214@node Fine Points of Emerge
1215@subsection Fine Points of Emerge
1216
1217 During the merge, you mustn't try to edit the A and B buffers yourself.
1218Emerge modifies them temporarily, but ultimately puts them back the way
1219they were.
1220
1221 You can have any number of merges going at once---just don't use any one
1222buffer as input to more than one merge at once, since the temporary
1223changes made in these buffers would get in each other's way.
1224
1225 Starting Emerge can take a long time because it needs to compare the
1226files fully. Emacs can't do anything else until @code{diff} finishes.
1227Perhaps in the future someone will change Emerge to do the comparison in
1228the background when the input files are large---then you could keep on
1229doing other things with Emacs until Emerge is ready to accept
1230commands.
1231
1232@vindex emerge-startup-hook
1233 After setting up the merge, Emerge runs the hook
1234@code{emerge-startup-hook} (@pxref{Hooks}).
1235
1236@ignore 848@ignore
1237 arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb 849 arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
1238@end ignore 850@end ignore
diff --git a/man/programs.texi b/man/programs.texi
index 643e6445fb0..9ec4f7ff2d3 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -41,7 +41,6 @@ Highlight program syntax (@pxref{Font Lock}).
41* Misc for Programs:: Other Emacs features useful for editing programs. 41* Misc for Programs:: Other Emacs features useful for editing programs.
42* C Modes:: Special commands of C, C++, Objective-C, 42* C Modes:: Special commands of C, C++, Objective-C,
43 Java, and Pike modes. 43 Java, and Pike modes.
44* Fortran:: Fortran mode and its special features.
45* Asm Mode:: Asm mode and its special features. 44* Asm Mode:: Asm mode and its special features.
46@end menu 45@end menu
47 46
@@ -109,7 +108,8 @@ tab character before point, in these modes.
109 Separate manuals are available for the modes for Ada (@pxref{Top, , Ada 108 Separate manuals are available for the modes for Ada (@pxref{Top, , Ada
110Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK 109Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
111(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes 110(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
112(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). 111(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran
112mode, @inforef{Fortran,, emacs-xtra}.
113 113
114@cindex mode hook 114@cindex mode hook
115@vindex c-mode-hook 115@vindex c-mode-hook
@@ -1715,521 +1715,6 @@ to a C/C++ source file, or vice versa. The variable
1715names. 1715names.
1716@end table 1716@end table
1717 1717
1718@node Fortran
1719@section Fortran Mode
1720@cindex Fortran mode
1721@cindex mode, Fortran
1722
1723 Fortran mode provides special motion commands for Fortran statements
1724and subprograms, and indentation commands that understand Fortran
1725conventions of nesting, line numbers and continuation statements.
1726Fortran mode has support for Auto Fill mode that breaks long lines into
1727proper Fortran continuation lines.
1728
1729 Special commands for comments are provided because Fortran comments
1730are unlike those of other languages. Built-in abbrevs optionally save
1731typing when you insert Fortran keywords.
1732
1733 Use @kbd{M-x fortran-mode} to switch to this major mode. This command
1734runs the hook @code{fortran-mode-hook} (@pxref{Hooks}).
1735
1736@cindex Fortran77 and Fortran90
1737@findex f90-mode
1738@findex fortran-mode
1739 Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
1740``tab format'') source code. For editing the modern Fortran90 or
1741Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
1742Emacs normally uses Fortran mode for files with extension @samp{.f},
1743@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
1744@samp{.f95}. GNU Fortran supports both kinds of format.
1745
1746@menu
1747* Motion: Fortran Motion. Moving point by statements or subprograms.
1748* Indent: Fortran Indent. Indentation commands for Fortran.
1749* Comments: Fortran Comments. Inserting and aligning comments.
1750* Autofill: Fortran Autofill. Auto fill support for Fortran.
1751* Columns: Fortran Columns. Measuring columns for valid Fortran.
1752* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
1753@end menu
1754
1755@node Fortran Motion
1756@subsection Motion Commands
1757
1758 In addition to the normal commands for moving by and operating on
1759``defuns'' (Fortran subprograms---functions and subroutines, as well as
1760modules for F90 mode), Fortran mode provides special commands to move by
1761statements and other program units.
1762
1763@table @kbd
1764@kindex C-c C-n @r{(Fortran mode)}
1765@findex fortran-next-statement
1766@findex f90-next-statement
1767@item C-c C-n
1768Move to the beginning of the next statement
1769(@code{fortran-next-statement}/@code{f90-next-statement}).
1770
1771@kindex C-c C-p @r{(Fortran mode)}
1772@findex fortran-previous-statement
1773@findex f90-previous-statement
1774@item C-c C-p
1775Move to the beginning of the previous statement
1776(@code{fortran-previous-statement}/@code{f90-previous-statement}).
1777If there is no previous statement (i.e. if called from the first
1778statement in the buffer), move to the start of the buffer.
1779
1780@kindex C-c C-e @r{(F90 mode)}
1781@findex f90-next-block
1782@item C-c C-e
1783Move point forward to the start of the next code block
1784(@code{f90-next-block}). A code block is a subroutine,
1785@code{if}--@code{endif} statement, and so forth. This command exists
1786for F90 mode only, not Fortran mode. With a numeric argument, this
1787moves forward that many blocks.
1788
1789@kindex C-c C-a @r{(F90 mode)}
1790@findex f90-previous-block
1791@item C-c C-a
1792Move point backward to the previous code block
1793(@code{f90-previous-block}). This is like @code{f90-next-block}, but
1794moves backwards.
1795
1796@kindex C-M-n @r{(Fortran mode)}
1797@findex fortran-end-of-block
1798@findex f90-end-of-block
1799@item C-M-n
1800Move to the end of the current code block
1801(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
1802agument, move forward that number of blocks. The mark is set before
1803moving point. The F90 mode version of this command checks for
1804consistency of block types and labels (if present), but it does not
1805check the outermost block since that may be incomplete.
1806
1807@kindex C-M-p @r{(Fortran mode)}
1808@findex fortran-beginning-of-block
1809@findex f90-beginning-of-block
1810@item C-M-p
1811Move to the start of the current code block
1812(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
1813is like @code{fortran-end-of-block}, but moves backwards.
1814@end table
1815
1816@node Fortran Indent
1817@subsection Fortran Indentation
1818
1819 Special commands and features are needed for indenting Fortran code in
1820order to make sure various syntactic entities (line numbers, comment line
1821indicators and continuation line flags) appear in the columns that are
1822required for standard, fixed (or tab) format Fortran.
1823
1824@menu
1825* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
1826* Contline: ForIndent Cont. How continuation lines indent.
1827* Numbers: ForIndent Num. How line numbers auto-indent.
1828* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
1829* Vars: ForIndent Vars. Variables controlling Fortran indent style.
1830@end menu
1831
1832@node ForIndent Commands
1833@subsubsection Fortran Indentation and Filling Commands
1834
1835@table @kbd
1836@item C-M-j
1837Break the current line at point and set up a continuation line
1838(@code{fortran-split-line}).
1839@item M-^
1840Join this line to the previous line (@code{fortran-join-line}).
1841@item C-M-q
1842Indent all the lines of the subprogram point is in
1843(@code{fortran-indent-subprogram}).
1844@item M-q
1845Fill a comment block or statement.
1846@end table
1847
1848@kindex C-M-q @r{(Fortran mode)}
1849@findex fortran-indent-subprogram
1850 The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
1851to reindent all the lines of the Fortran subprogram (function or
1852subroutine) containing point.
1853
1854@kindex C-M-j @r{(Fortran mode)}
1855@findex fortran-split-line
1856 The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
1857a line in the appropriate fashion for Fortran. In a non-comment line,
1858the second half becomes a continuation line and is indented
1859accordingly. In a comment line, both halves become separate comment
1860lines.
1861
1862@kindex M-^ @r{(Fortran mode)}
1863@kindex C-c C-d @r{(Fortran mode)}
1864@findex fortran-join-line
1865 @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
1866which joins a continuation line back to the previous line, roughly as
1867the inverse of @code{fortran-split-line}. The point must be on a
1868continuation line when this command is invoked.
1869
1870@kindex M-q @r{(Fortran mode)}
1871@kbd{M-q} in Fortran mode fills the comment block or statement that
1872point is in. This removes any excess statement continuations.
1873
1874@node ForIndent Cont
1875@subsubsection Continuation Lines
1876@cindex Fortran continuation lines
1877
1878@vindex fortran-continuation-string
1879 Most Fortran77 compilers allow two ways of writing continuation lines.
1880If the first non-space character on a line is in column 5, then that
1881line is a continuation of the previous line. We call this @dfn{fixed
1882format}. (In GNU Emacs we always count columns from 0; but note that
1883the Fortran standard counts from 1.) The variable
1884@code{fortran-continuation-string} specifies what character to put in
1885column 5. A line that starts with a tab character followed by any digit
1886except @samp{0} is also a continuation line. We call this style of
1887continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
1888with another style of continuation lines).
1889
1890@vindex indent-tabs-mode @r{(Fortran mode)}
1891@vindex fortran-analyze-depth
1892@vindex fortran-tab-mode-default
1893 Fortran mode can use either style of continuation line. When you
1894enter Fortran mode, it tries to deduce the proper continuation style
1895automatically from the buffer contents. It does this by scanning up to
1896@code{fortran-analyze-depth} (default 100) lines from the start of the
1897buffer. The first line that begins with either a tab character or six
1898spaces determines the choice. If the scan fails (for example, if the
1899buffer is new and therefore empty), the value of
1900@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
1901non-@code{nil} for tab format) is used. @samp{/t} in the mode line
1902indicates tab format is selected. Fortran mode sets the value of
1903@code{indent-tabs-mode} accordingly (@pxref{Just Spaces}).
1904
1905 If the text on a line starts with the Fortran continuation marker
1906@samp{$}, or if it begins with any non-whitespace character in column
19075, Fortran mode treats it as a continuation line. When you indent a
1908continuation line with @key{TAB}, it converts the line to the current
1909continuation style. When you split a Fortran statement with
1910@kbd{C-M-j}, the continuation marker on the newline is created according
1911to the continuation style.
1912
1913 The setting of continuation style affects several other aspects of
1914editing in Fortran mode. In fixed format mode, the minimum column
1915number for the body of a statement is 6. Lines inside of Fortran
1916blocks that are indented to larger column numbers always use only the
1917space character for whitespace. In tab format mode, the minimum
1918column number for the statement body is 8, and the whitespace before
1919column 8 must always consist of one tab character.
1920
1921@node ForIndent Num
1922@subsubsection Line Numbers
1923
1924 If a number is the first non-whitespace in the line, Fortran
1925indentation assumes it is a line number and moves it to columns 0
1926through 4. (Columns always count from 0 in GNU Emacs.)
1927
1928@vindex fortran-line-number-indent
1929 Line numbers of four digits or less are normally indented one space.
1930The variable @code{fortran-line-number-indent} controls this; it
1931specifies the maximum indentation a line number can have. The default
1932value of the variable is 1. Fortran mode tries to prevent line number
1933digits passing column 4, reducing the indentation below the specified
1934maximum if necessary. If @code{fortran-line-number-indent} has the
1935value 5, line numbers are right-justified to end in column 4.
1936
1937@vindex fortran-electric-line-number
1938 Simply inserting a line number is enough to indent it according to
1939these rules. As each digit is inserted, the indentation is recomputed.
1940To turn off this feature, set the variable
1941@code{fortran-electric-line-number} to @code{nil}.
1942
1943
1944@node ForIndent Conv
1945@subsubsection Syntactic Conventions
1946
1947 Fortran mode assumes that you follow certain conventions that simplify
1948the task of understanding a Fortran program well enough to indent it
1949properly:
1950
1951@itemize @bullet
1952@item
1953Two nested @samp{do} loops never share a @samp{continue} statement.
1954
1955@item
1956Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
1957and others are written without embedded whitespace or line breaks.
1958
1959Fortran compilers generally ignore whitespace outside of string
1960constants, but Fortran mode does not recognize these keywords if they
1961are not contiguous. Constructs such as @samp{else if} or @samp{end do}
1962are acceptable, but the second word should be on the same line as the
1963first and not on a continuation line.
1964@end itemize
1965
1966@noindent
1967If you fail to follow these conventions, the indentation commands may
1968indent some lines unaesthetically. However, a correct Fortran program
1969retains its meaning when reindented even if the conventions are not
1970followed.
1971
1972@node ForIndent Vars
1973@subsubsection Variables for Fortran Indentation
1974
1975@vindex fortran-do-indent
1976@vindex fortran-if-indent
1977@vindex fortran-structure-indent
1978@vindex fortran-continuation-indent
1979@vindex fortran-check-all-num@dots{}
1980@vindex fortran-minimum-statement-indent@dots{}
1981 Several additional variables control how Fortran indentation works:
1982
1983@table @code
1984@item fortran-do-indent
1985Extra indentation within each level of @samp{do} statement (default 3).
1986
1987@item fortran-if-indent
1988Extra indentation within each level of @samp{if}, @samp{select case}, or
1989@samp{where} statements (default 3).
1990
1991@item fortran-structure-indent
1992Extra indentation within each level of @samp{structure}, @samp{union},
1993@samp{map}, or @samp{interface} statements (default 3).
1994
1995@item fortran-continuation-indent
1996Extra indentation for bodies of continuation lines (default 5).
1997
1998@item fortran-check-all-num-for-matching-do
1999In Fortran77, a numbered @samp{do} statement is ended by any statement
2000with a matching line number. It is common (but not compulsory) to use a
2001@samp{continue} statement for this purpose. If this variable has a
2002non-@code{nil} value, indenting any numbered statement must check for a
2003@samp{do} that ends there. If you always end @samp{do} statements with
2004a @samp{continue} line (or if you use the more modern @samp{enddo}),
2005then you can speed up indentation by setting this variable to
2006@code{nil}. The default is @code{nil}.
2007
2008@item fortran-blink-matching-if
2009If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
2010statement moves the cursor momentarily to the matching @samp{if} (or
2011@samp{do}) statement to show where it is. The default is @code{nil}.
2012
2013@item fortran-minimum-statement-indent-fixed
2014Minimum indentation for Fortran statements when using fixed format
2015continuation line style. Statement bodies are never indented less than
2016this much. The default is 6.
2017
2018@item fortran-minimum-statement-indent-tab
2019Minimum indentation for Fortran statements for tab format continuation line
2020style. Statement bodies are never indented less than this much. The
2021default is 8.
2022@end table
2023
2024The variables controlling the indentation of comments are described in
2025the following section.
2026
2027@node Fortran Comments
2028@subsection Fortran Comments
2029
2030 The usual Emacs comment commands assume that a comment can follow a
2031line of code. In Fortran77, the standard comment syntax requires an
2032entire line to be just a comment. Therefore, Fortran mode replaces the
2033standard Emacs comment commands and defines some new variables.
2034
2035@vindex fortran-comment-line-start
2036 Fortran mode can also handle the Fortran90 comment syntax where comments
2037start with @samp{!} and can follow other text. Because only some Fortran77
2038compilers accept this syntax, Fortran mode will not insert such comments
2039unless you have said in advance to do so. To do this, set the variable
2040@code{fortran-comment-line-start} to @samp{"!"}.
2041
2042@table @kbd
2043@item M-;
2044Align comment or insert new comment (@code{fortran-indent-comment}).
2045
2046@item C-x ;
2047Applies to nonstandard @samp{!} comments only.
2048
2049@item C-c ;
2050Turn all lines of the region into comments, or (with argument) turn them back
2051into real code (@code{fortran-comment-region}).
2052@end table
2053
2054@findex fortran-indent-comment
2055 @kbd{M-;} in Fortran mode is redefined as the command
2056@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
2057recognizes any kind of existing comment and aligns its text appropriately;
2058if there is no existing comment, a comment is inserted and aligned. But
2059inserting and aligning comments are not the same in Fortran mode as in
2060other modes.
2061
2062 When a new comment must be inserted, if the current line is blank, a
2063full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
2064comment is inserted if you have said you want to use them. Otherwise a
2065full-line comment is inserted on a new line before the current line.
2066
2067 Nonstandard @samp{!} comments are aligned like comments in other
2068languages, but full-line comments are different. In a standard full-line
2069comment, the comment delimiter itself must always appear in column zero.
2070What can be aligned is the text within the comment. You can choose from
2071three styles of alignment by setting the variable
2072@code{fortran-comment-indent-style} to one of these values:
2073
2074@vindex fortran-comment-indent-style
2075@vindex fortran-comment-line-extra-indent
2076@table @code
2077@item fixed
2078Align the text at a fixed column, which is the sum of
2079@code{fortran-comment-line-extra-indent} and the minimum statement
2080indentation. This is the default.
2081
2082The minimum statement indentation is
2083@code{fortran-minimum-statement-indent-fixed} for fixed format
2084continuation line style and @code{fortran-minimum-statement-indent-tab}
2085for tab format style.
2086
2087@item relative
2088Align the text as if it were a line of code, but with an additional
2089@code{fortran-comment-line-extra-indent} columns of indentation.
2090
2091@item nil
2092Don't move text in full-line comments automatically.
2093@end table
2094
2095@vindex fortran-comment-indent-char
2096 In addition, you can specify the character to be used to indent within
2097full-line comments by setting the variable
2098@code{fortran-comment-indent-char} to the single-character string you want
2099to use.
2100
2101@vindex fortran-directive-re
2102 Compiler directive lines, or preprocessor lines, have much the same
2103appearance as comment lines. It is important, though, that such lines
2104never be indented at all, no matter what the value of
2105@code{fortran-comment-indent-style}. The variable
2106@code{fortran-directive-re} is a regular expression that specifies which
2107lines are directives. Matching lines are never indented, and receive
2108distinctive font-locking.
2109
2110 The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
2111you use @samp{!} comments, this command can be used with them. Otherwise
2112it is useless in Fortran mode.
2113
2114@kindex C-c ; @r{(Fortran mode)}
2115@findex fortran-comment-region
2116@vindex fortran-comment-region
2117 The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
2118lines of the region into comments by inserting the string @samp{C$$$} at
2119the front of each one. With a numeric argument, it turns the region
2120back into live code by deleting @samp{C$$$} from the front of each line
2121in it. The string used for these comments can be controlled by setting
2122the variable @code{fortran-comment-region}. Note that here we have an
2123example of a command and a variable with the same name; these two uses
2124of the name never conflict because in Lisp and in Emacs it is always
2125clear from the context which one is meant.
2126
2127@node Fortran Autofill
2128@subsection Auto Fill in Fortran Mode
2129
2130 Fortran mode has specialized support for Auto Fill mode, which is a
2131minor mode that automatically splits statements as you insert them when
2132they become too wide. Splitting a statement involves making
2133continuation lines using @code{fortran-continuation-string}
2134(@pxref{ForIndent Cont}). This splitting happens when you type
2135@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran indentation
2136commands. You activate Auto Fill in Fortran mode in the normal way
2137(@pxref{Auto Fill}).
2138
2139@vindex fortran-break-before-delimiters
2140 Auto Fill breaks lines at spaces or delimiters when the lines get
2141longer than the desired width (the value of @code{fill-column}). The
2142delimiters (besides whitespace) that Auto Fill can break at are
2143@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
2144and @samp{,}. The line break comes after the delimiter if the
2145variable @code{fortran-break-before-delimiters} is @code{nil}.
2146Otherwise (and by default), the break comes before the delimiter.
2147
2148 To enable Auto Fill in all Fortran buffers, add
2149@code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks}.
2150
2151@node Fortran Columns
2152@subsection Checking Columns in Fortran
2153
2154@table @kbd
2155@item C-c C-r
2156Display a ``column ruler'' momentarily above the current line
2157(@code{fortran-column-ruler}).
2158@item C-c C-w
2159Split the current window horizontally temporarily so that it is 72
2160columns wide (@code{fortran-window-create-momentarily}). This may
2161help you avoid making lines longer than the 72-character limit that
2162some Fortran compilers impose.
2163@item C-u C-c C-w
2164Split the current window horizontally so that it is 72 columns wide
2165(@code{fortran-window-create}). You can then continue editing.
2166@item M-x fortran-strip-sequence-nos
2167Delete all text in column 72 and beyond.
2168@end table
2169
2170@kindex C-c C-r @r{(Fortran mode)}
2171@findex fortran-column-ruler
2172 The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
2173ruler momentarily above the current line. The comment ruler is two lines
2174of text that show you the locations of columns with special significance in
2175Fortran programs. Square brackets show the limits of the columns for line
2176numbers, and curly brackets show the limits of the columns for the
2177statement body. Column numbers appear above them.
2178
2179 Note that the column numbers count from zero, as always in GNU Emacs.
2180As a result, the numbers may be one less than those you are familiar
2181with; but the positions they indicate in the line are standard for
2182Fortran.
2183
2184@vindex fortran-column-ruler-fixed
2185@vindex fortran-column-ruler-tabs
2186 The text used to display the column ruler depends on the value of the
2187variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
2188@code{nil}, then the value of the variable
2189@code{fortran-column-ruler-fixed} is used as the column ruler.
2190Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
2191displayed. By changing these variables, you can change the column ruler
2192display.
2193
2194@kindex C-c C-w @r{(Fortran mode)}
2195@findex fortran-window-create-momentarily
2196 @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
2197splits the current window horizontally, making a window 72 columns
2198wide, so you can see any lines that are too long. Type a space to
2199restore the normal width.
2200
2201@kindex C-u C-c C-w @r{(Fortran mode)}
2202@findex fortran-window-create
2203 You can also split the window horizontally and continue editing with
2204the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
2205fortran-window-create}). By editing in this window you can
2206immediately see when you make a line too wide to be correct Fortran.
2207
2208@findex fortran-strip-sequence-nos
2209 The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
2210column 72 and beyond, on all lines in the current buffer. This is the
2211easiest way to get rid of old sequence numbers.
2212
2213@node Fortran Abbrev
2214@subsection Fortran Keyword Abbrevs
2215
2216 Fortran mode provides many built-in abbrevs for common keywords and
2217declarations. These are the same sort of abbrev that you can define
2218yourself. To use them, you must turn on Abbrev mode. @xref{Abbrevs}.
2219
2220 The built-in abbrevs are unusual in one way: they all start with a
2221semicolon. You cannot normally use semicolon in an abbrev, but Fortran
2222mode makes this possible by changing the syntax of semicolon to ``word
2223constituent.''
2224
2225 For example, one built-in Fortran abbrev is @samp{;c} for
2226@samp{continue}. If you insert @samp{;c} and then insert a punctuation
2227character such as a space or a newline, the @samp{;c} expands automatically
2228to @samp{continue}, provided Abbrev mode is enabled.@refill
2229
2230 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
2231Fortran abbrevs and what they stand for.
2232
2233@node Asm Mode 1718@node Asm Mode
2234@section Asm Mode 1719@section Asm Mode
2235 1720
diff --git a/man/sending.texi b/man/sending.texi
index 2fbf9a189c7..299787e529c 100644
--- a/man/sending.texi
+++ b/man/sending.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
3@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Sending Mail, Rmail, Picture, Top 5@node Sending Mail, Rmail, Abbrevs, Top
6@chapter Sending Mail 6@chapter Sending Mail
7@cindex sending mail 7@cindex sending mail
8@cindex mail 8@cindex mail
diff --git a/man/text.texi b/man/text.texi
index 2b70c599b89..cf3d03af4d5 100644
--- a/man/text.texi
+++ b/man/text.texi
@@ -51,6 +51,12 @@ Then the formatting appears on the screen in Emacs while you edit.
51@xref{Formatted Text}. 51@xref{Formatted Text}.
52@end iftex 52@end iftex
53 53
54@cindex ASCII art
55 If you need to edit pictures made out of text characters (commonly
56referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter
57Picture mode, a special major mode for editing such pictures.
58@inforef{Picture Mode,, emacs-xtra}.
59
54@cindex skeletons 60@cindex skeletons
55@cindex templates 61@cindex templates
56@cindex autotyping 62@cindex autotyping