diff options
| author | Stefan Monnier | 2010-03-30 22:37:57 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-03-30 22:37:57 -0400 |
| commit | 857387516c3cea919953b39ab170b1ff40f77934 (patch) | |
| tree | 33f6de32a3909240c7b1ab2d760891d62c3acaf5 /doc | |
| parent | 75d1428c578eea9077c679c1e821af8d6643f1ed (diff) | |
| parent | a6d676d9f41be8ad0c436c6d04cfedc1ce68adc8 (diff) | |
| download | emacs-857387516c3cea919953b39ab170b1ff40f77934.tar.gz emacs-857387516c3cea919953b39ab170b1ff40f77934.zip | |
Merge from emacs-23 branch
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 59 | ||||
| -rw-r--r-- | doc/emacs/basic.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 13 | ||||
| -rw-r--r-- | doc/emacs/maintaining.texi | 163 | ||||
| -rw-r--r-- | doc/emacs/major.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/misc.texi | 42 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 24 | ||||
| -rw-r--r-- | doc/emacs/programs.texi | 5 | ||||
| -rw-r--r-- | doc/emacs/rmail.texi | 24 | ||||
| -rw-r--r-- | doc/emacs/sending.texi | 994 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 66 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/loading.texi | 44 |
14 files changed, 743 insertions, 707 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b13b3ac1eec..c0a0539a018 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,62 @@ | |||
| 1 | 2010-03-30 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mule.texi (Input Methods): Mention "C-x 8 RET" and add a | ||
| 4 | cross-reference to "Inserting Text". | ||
| 5 | |||
| 6 | * basic.texi (Inserting Text): Add an index entry for "C-x 8 RET". | ||
| 7 | Mention completion provided by `ucs-insert'. | ||
| 8 | |||
| 9 | 2010-03-30 Chong Yidong <cyd@stupidchicken.com> | ||
| 10 | |||
| 11 | * sending.texi (Sending Mail): Note variables that may need | ||
| 12 | customizing. | ||
| 13 | (Mail Sending): Expand discussion of send-mail-function. | ||
| 14 | |||
| 15 | 2010-03-30 Chong Yidong <cyd@stupidchicken.com> | ||
| 16 | |||
| 17 | Document Message mode as the default mail mode. | ||
| 18 | |||
| 19 | * sending.texi (Sending Mail): Copyedits. | ||
| 20 | (Mail Format, Mail Headers): Document mail-from-style changes. | ||
| 21 | (Mail Commands): Rename from Mail mode. Document Message mode. | ||
| 22 | (Mail Misc): Rename from Mail mode Misc. | ||
| 23 | (Mail Sending, Header Editing, Mail Misc): Switch to Message mode | ||
| 24 | command names and update keybindings. | ||
| 25 | (Header Editing): Document message-tab. De-document | ||
| 26 | mail-self-blind, mail-default-reply-to, and mail-archive-file-name in | ||
| 27 | favor of mail-default-headers. Ad index entries for user-full-name and | ||
| 28 | user-mail-address. | ||
| 29 | (Citing Mail): Update changes in Message mode behavior. Document | ||
| 30 | mail-yank-prefix. | ||
| 31 | (Mail Signature): New node, moved from Mail Misc. | ||
| 32 | (Mail Aliases): Mail abbrevs are the default with Message mode. | ||
| 33 | (Mail Methods): Note that Message mode is now the default. | ||
| 34 | |||
| 35 | * rmail.texi (Rmail Reply): | ||
| 36 | * text.texi (Text Mode): | ||
| 37 | * major.texi (Major Modes): | ||
| 38 | * mule.texi (Output Coding): Refer to Message mode. | ||
| 39 | |||
| 40 | * custom.texi (Init Examples): Add xref to Mail Header. | ||
| 41 | |||
| 42 | * emacs.texi (Top): Fix xrefs. | ||
| 43 | |||
| 44 | 2010-03-30 Chong Yidong <cyd@stupidchicken.com> | ||
| 45 | |||
| 46 | * maintaining.texi (VC With A Merging VCS): C-x v v now creates a | ||
| 47 | repository if there is none. | ||
| 48 | (VC Change Log): Rename from VC Status. Document vc-log-show-limit and | ||
| 49 | vc-print-root-log. | ||
| 50 | (Old Revisions): Copyedits. Document vc-root-diff. | ||
| 51 | |||
| 52 | * programs.texi (Program Modes): Mention Javascript mode. | ||
| 53 | |||
| 54 | * text.texi (HTML Mode): Note that nXML is now the default XML mode. | ||
| 55 | * emacs.texi: Update node description. | ||
| 56 | |||
| 57 | * misc.texi (Navigation): Document doc-view-continuous. | ||
| 58 | (Shell Ring): Document new M-r binding. M-s is no longer bound. | ||
| 59 | |||
| 1 | 2010-03-30 Juri Linkov <juri@jurta.org> | 60 | 2010-03-30 Juri Linkov <juri@jurta.org> |
| 2 | 61 | ||
| 3 | * search.texi (Other Repeating Search): Remove line that `occur' | 62 | * search.texi (Other Repeating Search): Remove line that `occur' |
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 7a917e58a56..ae04ebf9c41 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi | |||
| @@ -100,13 +100,15 @@ character code, just like digits. | |||
| 100 | character to insert (@pxref{Arguments}). | 100 | character to insert (@pxref{Arguments}). |
| 101 | 101 | ||
| 102 | @findex ucs-insert | 102 | @findex ucs-insert |
| 103 | @kindex C-x 8 RET | ||
| 103 | @cindex Unicode | 104 | @cindex Unicode |
| 104 | Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}} | 105 | Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}} |
| 105 | (@code{ucs-insert}) to insert a character based on its Unicode name or | 106 | (@code{ucs-insert}) to insert a character based on its Unicode name or |
| 106 | code-point. This commands prompts for a character to insert, using | 107 | code-point. This commands prompts for a character to insert, using |
| 107 | the minibuffer; you can specify the character using either (i) the | 108 | the minibuffer; you can specify the character using either (i) the |
| 108 | character's name in the Unicode standard, or (ii) the character's | 109 | character's name in the Unicode standard, or (ii) the character's |
| 109 | code-point in the Unicode standard. | 110 | code-point in the Unicode standard. If you specify the character's |
| 111 | name, the command provides completion. | ||
| 110 | 112 | ||
| 111 | @node Moving Point | 113 | @node Moving Point |
| 112 | @section Changing the Location of Point | 114 | @section Changing the Location of Point |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 408de24ed6e..f0faec4d40c 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -2269,8 +2269,9 @@ Specify your own email address, if Emacs can't figure it out correctly. | |||
| 2269 | (setq user-mail-address "cheney@@torture.gov") | 2269 | (setq user-mail-address "cheney@@torture.gov") |
| 2270 | @end example | 2270 | @end example |
| 2271 | 2271 | ||
| 2272 | Various Emacs packages that need your own email address use the value of | 2272 | Various Emacs packages, such as Message mode, consult |
| 2273 | @code{user-mail-address}. | 2273 | @code{user-mail-address} when they need to know your email address. |
| 2274 | @xref{Mail Headers}. | ||
| 2274 | 2275 | ||
| 2275 | @item | 2276 | @item |
| 2276 | Make Text mode the default mode for new buffers. | 2277 | Make Text mode the default mode for new buffers. |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 0704b616543..6c7f611cf93 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -574,7 +574,7 @@ Commands for Human Languages | |||
| 574 | * Text Mode:: The major modes for editing text files. | 574 | * Text Mode:: The major modes for editing text files. |
| 575 | * Outline Mode:: Editing outlines. | 575 | * Outline Mode:: Editing outlines. |
| 576 | * TeX Mode:: Editing input to the formatter TeX. | 576 | * TeX Mode:: Editing input to the formatter TeX. |
| 577 | * HTML Mode:: Editing HTML, SGML, and XML files. | 577 | * HTML Mode:: Editing HTML and SGML files. |
| 578 | * Nroff Mode:: Editing input to the formatter nroff. | 578 | * Nroff Mode:: Editing input to the formatter nroff. |
| 579 | * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. | 579 | * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. |
| 580 | * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. | 580 | * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. |
| @@ -796,7 +796,7 @@ Basic Editing under Version Control | |||
| 796 | The Secondary Commands of VC | 796 | The Secondary Commands of VC |
| 797 | 797 | ||
| 798 | * Registering:: Putting a file under version control. | 798 | * Registering:: Putting a file under version control. |
| 799 | * VC Status:: Viewing the VC status of files. | 799 | * VC Change Log:: Viewing the VC Change Log. |
| 800 | * VC Undo:: Canceling changes before or after check-in. | 800 | * VC Undo:: Canceling changes before or after check-in. |
| 801 | 801 | ||
| 802 | VC Directory Mode | 802 | VC Directory Mode |
| @@ -888,16 +888,17 @@ Sending Mail | |||
| 888 | * Mail Format:: Format of the mail being composed. | 888 | * Mail Format:: Format of the mail being composed. |
| 889 | * Mail Headers:: Details of some standard mail header fields. | 889 | * Mail Headers:: Details of some standard mail header fields. |
| 890 | * Mail Aliases:: Abbreviating and grouping mail addresses. | 890 | * Mail Aliases:: Abbreviating and grouping mail addresses. |
| 891 | * Mail Mode:: Special commands for editing mail being composed. | 891 | * Mail Commands:: Special commands for editing mail being composed. |
| 892 | * Mail Signature:: Adding a signature to every message. | ||
| 892 | * Mail Amusements:: Distracting the NSA; adding fortune messages. | 893 | * Mail Amusements:: Distracting the NSA; adding fortune messages. |
| 893 | * Mail Methods:: Using alternative mail-composition methods. | 894 | * Mail Methods:: Using alternative mail-composition methods. |
| 894 | 895 | ||
| 895 | Mail Mode | 896 | Mail Commands |
| 896 | 897 | ||
| 897 | * Mail Sending:: Commands to send the message. | 898 | * Mail Sending:: Commands to send the message. |
| 898 | * Header Editing:: Commands to move to header fields and edit them. | 899 | * Header Editing:: Commands to move to header fields and edit them. |
| 899 | * Citing Mail:: Copying all or part of a message you are replying to. | 900 | * Citing Mail:: Quoting a message you are replying to. |
| 900 | * Mail Mode Misc:: Spell checking, signatures, etc. | 901 | * Mail Misc:: Attachments, spell checking, etc. |
| 901 | 902 | ||
| 902 | Reading Mail with Rmail | 903 | Reading Mail with Rmail |
| 903 | 904 | ||
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 6e3fa959ca2..8cc5b97d919 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -224,7 +224,7 @@ the repository, along with a log entry for those changes. | |||
| 224 | @cindex revision | 224 | @cindex revision |
| 225 | @cindex revision ID | 225 | @cindex revision ID |
| 226 | A copy of a file stored in a repository is called a @dfn{revision}. | 226 | A copy of a file stored in a repository is called a @dfn{revision}. |
| 227 | The history of a file is a sequence of revisions. Each revisions is | 227 | The history of a file is a sequence of revisions. Each revision is |
| 228 | named by a @dfn{revision ID}. The format of the revision ID depends | 228 | named by a @dfn{revision ID}. The format of the revision ID depends |
| 229 | on the version control system; in the simplest case, it is just an | 229 | on the version control system; in the simplest case, it is just an |
| 230 | integer. | 230 | integer. |
| @@ -403,10 +403,10 @@ Directory buffer, and some files in it are marked, the VC fileset | |||
| 403 | consists of the marked files (@pxref{VC Directory Mode}). | 403 | consists of the marked files (@pxref{VC Directory Mode}). |
| 404 | 404 | ||
| 405 | The principal VC command is an all-purpose command, @kbd{C-x v v} | 405 | The principal VC command is an all-purpose command, @kbd{C-x v v} |
| 406 | (@code{vc-next-action}), that performs either locking, merging or a | 406 | (@code{vc-next-action}), that performs either registration, locking, |
| 407 | check-in (depending on the situation) on the current VC fileset. You | 407 | merging or a check-in (depending on the situation) on the current VC |
| 408 | can use @kbd{C-x v v} in a file-visiting buffer or in a VC Directory | 408 | fileset. You can use @kbd{C-x v v} in a file-visiting buffer or in a |
| 409 | buffer. | 409 | VC Directory buffer. |
| 410 | 410 | ||
| 411 | @table @kbd | 411 | @table @kbd |
| 412 | @itemx C-x v v | 412 | @itemx C-x v v |
| @@ -461,23 +461,31 @@ unmodified; it flips to @samp{:} as soon as you save any changes | |||
| 461 | 461 | ||
| 462 | @itemize @bullet | 462 | @itemize @bullet |
| 463 | @item | 463 | @item |
| 464 | If the work file is the same as in the repository, it does nothing. | 464 | If the work file is in a directory that is not controlled by any |
| 465 | version control system, prompt for a repository type. Then, create a | ||
| 466 | version control repository of that type and register the file with it. | ||
| 467 | |||
| 468 | @item | ||
| 469 | If the work file is in a directory that is controlled by a version | ||
| 470 | control system but not registered with it, register the file. | ||
| 471 | |||
| 472 | @item | ||
| 473 | If the work file is the same as in the repository, do nothing. | ||
| 465 | 474 | ||
| 466 | @item | 475 | @item |
| 467 | If you have not changed the work file, but some other user has checked | 476 | If you have not changed the work file, but some other user has checked |
| 468 | in changes to the repository, @kbd{C-x v v} merges those changes into | 477 | in changes to the repository, merge those changes into the work file. |
| 469 | the work file. | ||
| 470 | 478 | ||
| 471 | @item | 479 | @item |
| 472 | If you have made modifications to the work file, @kbd{C-x v v} | 480 | If you have made modifications to the work file, attempts to check in |
| 473 | attempts to check in your changes. To do this, Emacs first reads the | 481 | your changes. To do this, Emacs first reads the log entry for the new |
| 474 | log entry for the new revision (@pxref{Log Buffer}). If some other | 482 | revision (@pxref{Log Buffer}). If some other user has checked in |
| 475 | user has checked in changes to the repository since you last checked | 483 | changes to the repository since you last checked it out, the checkin |
| 476 | it out, the checkin fails. In that case, type @kbd{C-x v v} again to | 484 | fails. In that case, type @kbd{C-x v v} again to merge those changes |
| 477 | merge those changes into your own work file; this puts the work file | 485 | into your own work file; this puts the work file into a ``conflicted'' |
| 478 | into a ``conflicted'' state. Type @kbd{C-x v v} to clear the | 486 | state. Type @kbd{C-x v v} to clear the ``conflicted'' state; VC then |
| 479 | ``conflicted'' state; VC then regards the file as up-to-date and | 487 | regards the file as up-to-date and modified, and you can try to check |
| 480 | modified, and you can try to check it in again. | 488 | it in again. |
| 481 | 489 | ||
| 482 | To pick up any recent changes from the repository @emph{without} | 490 | To pick up any recent changes from the repository @emph{without} |
| 483 | trying to commit your own changes, type @kbd{C-x v m @key{RET}}. | 491 | trying to commit your own changes, type @kbd{C-x v m @key{RET}}. |
| @@ -485,15 +493,15 @@ trying to commit your own changes, type @kbd{C-x v m @key{RET}}. | |||
| 485 | @end itemize | 493 | @end itemize |
| 486 | 494 | ||
| 487 | These rules also apply when you use RCS in its ``non-locking'' mode, | 495 | These rules also apply when you use RCS in its ``non-locking'' mode, |
| 488 | except that changes will not be automatically merged from the | 496 | except that changes are not automatically merged from the repository. |
| 489 | repository. Nothing informs you if another user has checked in | 497 | Nothing informs you if another user has checked in changes in the same |
| 490 | changes in the same file since you began editing it; when you check in | 498 | file since you began editing it; when you check in your revision, his |
| 491 | your revision, his changes are removed (however, they remain in the | 499 | changes are removed (however, they remain in the repository and are |
| 492 | repository and are thus not irrevocably lost). Therefore, you must | 500 | thus not irrevocably lost). Therefore, you must verify that the |
| 493 | verify that the current revision is unchanged before checking in your | 501 | current revision is unchanged before checking in your changes. In |
| 494 | changes. In addition, locking is possible with RCS even in this mode: | 502 | addition, locking is possible with RCS even in this mode: @kbd{C-x v |
| 495 | @kbd{C-x v v} with an unmodified file locks the file, just as it does | 503 | v} with an unmodified file locks the file, just as it does with RCS in |
| 496 | with RCS in its normal locking mode (@pxref{VC With A Locking VCS}). | 504 | its normal locking mode (@pxref{VC With A Locking VCS}). |
| 497 | 505 | ||
| 498 | @node VC With A Locking VCS | 506 | @node VC With A Locking VCS |
| 499 | @subsubsection Basic Version Control with Locking | 507 | @subsubsection Basic Version Control with Locking |
| @@ -501,26 +509,25 @@ with RCS in its normal locking mode (@pxref{VC With A Locking VCS}). | |||
| 501 | Under a locking-based version control system (such as SCCS, and RCS | 509 | Under a locking-based version control system (such as SCCS, and RCS |
| 502 | in its default mode), @kbd{C-x v v} does the following: | 510 | in its default mode), @kbd{C-x v v} does the following: |
| 503 | 511 | ||
| 504 | @itemize @bullet | 512 | @itemize @bullet |
| 505 | @item | 513 | @item |
| 506 | If the file is not locked, @kbd{C-x v v} locks it, and makes it | 514 | If the file is not locked, lock it and make it writable, so that you |
| 507 | writable so that you can change it. | 515 | can change it. |
| 508 | 516 | ||
| 509 | @item | 517 | @item |
| 510 | If the file is locked by you, and contains changes, @kbd{C-x v v} | 518 | If the file is locked by you, and contains changes, check in the |
| 511 | checks in the changes. In order to do this, it first reads the log | 519 | changes. In order to do this, Emacs first reads the log entry for the |
| 512 | entry for the new revision. @xref{Log Buffer}. | 520 | new revision. @xref{Log Buffer}. |
| 513 | 521 | ||
| 514 | @item | 522 | @item |
| 515 | If the file is locked by you, but you have not changed it since you | 523 | If the file is locked by you, but you have not changed it since you |
| 516 | locked it, @kbd{C-x v v} releases the lock and makes the file | 524 | locked it, release the lock and makes the file read-only again. |
| 517 | read-only again. | ||
| 518 | 525 | ||
| 519 | @item | 526 | @item |
| 520 | If the file is locked by some other user, @kbd{C-x v v} asks you whether | 527 | If the file is locked by some other user, ask whether you want to |
| 521 | you want to ``steal the lock'' from that user. If you say yes, the file | 528 | ``steal the lock'' from that user. If you say yes, the file becomes |
| 522 | becomes locked by you, but a message is sent to the person who had | 529 | locked by you, but a message is sent to the person who had formerly |
| 523 | formerly locked the file, to inform him of what has happened. | 530 | locked the file, to inform him of what has happened. |
| 524 | @end itemize | 531 | @end itemize |
| 525 | 532 | ||
| 526 | These rules also apply when you use CVS in locking mode, except | 533 | These rules also apply when you use CVS in locking mode, except |
| @@ -639,20 +646,23 @@ and @code{vc-log-mode-hook}. @xref{Hooks}. | |||
| 639 | to examine any revision of a file, or compare two revisions. | 646 | to examine any revision of a file, or compare two revisions. |
| 640 | 647 | ||
| 641 | @table @kbd | 648 | @table @kbd |
| 642 | @item C-x v ~ @var{revision} @key{RET} | 649 | @item C-x v ~ |
| 643 | Examine revision @var{revision} of the visited file, in a buffer of its | 650 | Prompt for a revision of the current file, and visit it in a buffer of |
| 644 | own. | 651 | its own (@code{vc-revision-other-window}). |
| 645 | 652 | ||
| 646 | @item C-x v = | 653 | @item C-x v = |
| 647 | Compare the buffer contents associated with the current | 654 | Compare the files in the current fileset with the working revision(s) |
| 648 | fileset with the working revision(s) from which you started editing. | 655 | you started from (@code{vc-diff}). With a prefix argument, prompt for |
| 656 | two revisions of the current fileset and compare them. | ||
| 649 | 657 | ||
| 650 | @item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} | 658 | @item C-x v D |
| 651 | Compare the specified two repository revisions of the current fileset. | 659 | Compare the entire tree corresponding to the current fileset with the |
| 660 | tree you started from (@code{vc-root-diff}). With a prefix argument, | ||
| 661 | prompt for two revisions and compare their trees. | ||
| 652 | 662 | ||
| 653 | @item C-x v g | 663 | @item C-x v g |
| 654 | Display an annotated version of the file: for each line, show the | 664 | Display an annotated version of the file: for each line, show the |
| 655 | latest revision in which it was modified. | 665 | latest revision in which it was modified (@code{vc-annotate}). |
| 656 | @end table | 666 | @end table |
| 657 | 667 | ||
| 658 | @findex vc-revision-other-window | 668 | @findex vc-revision-other-window |
| @@ -673,12 +683,11 @@ buffer in a separate window. | |||
| 673 | 683 | ||
| 674 | @findex vc-diff | 684 | @findex vc-diff |
| 675 | @kindex C-x v = | 685 | @kindex C-x v = |
| 676 | @kbd{C-x v =} (@code{vc-diff}) compares the current buffer contents | 686 | @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC |
| 677 | of each file in the current VC fileset (saving them if necessary) with | 687 | fileset (saving them if necessary) with the repository revision(s) |
| 678 | the repository revision from which you started editing. Note that the | 688 | from which you started editing. Note that the latter may or may not |
| 679 | latter may or may not be the latest revision of the file(s). The diff | 689 | be the latest revision of the file(s). The diff is displayed in a |
| 680 | is displayed in a special buffer in another window. @xref{Comparing | 690 | special buffer in another window. @xref{Comparing Files}. |
| 681 | Files}. | ||
| 682 | 691 | ||
| 683 | @findex vc-diff | 692 | @findex vc-diff |
| 684 | @kindex C-u C-x v = | 693 | @kindex C-u C-x v = |
| @@ -700,6 +709,12 @@ revision ID for a multi-file fileset (as opposed to a symbolic tag | |||
| 700 | name) is unlikely to return diffs that are connected in any meaningful | 709 | name) is unlikely to return diffs that are connected in any meaningful |
| 701 | way. | 710 | way. |
| 702 | 711 | ||
| 712 | The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to | ||
| 713 | @kbd{C-x v =}, but it compares the entire tree associated with the | ||
| 714 | current VC fileset with the tree you started with. This means all the | ||
| 715 | files controlled by the current version control repository, even those | ||
| 716 | that are not part of the current VC fileset. | ||
| 717 | |||
| 703 | If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that | 718 | If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that |
| 704 | is neither visiting a version-controlled file nor a VC directory | 719 | is neither visiting a version-controlled file nor a VC directory |
| 705 | buffer, these commands generate a diff of all registered files in the | 720 | buffer, these commands generate a diff of all registered files in the |
| @@ -801,7 +816,7 @@ the file contents without distraction from the annotations. | |||
| 801 | 816 | ||
| 802 | @menu | 817 | @menu |
| 803 | * Registering:: Putting a file under version control. | 818 | * Registering:: Putting a file under version control. |
| 804 | * VC Status:: Viewing the VC status of files. | 819 | * VC Change Log:: Viewing the VC Change Log. |
| 805 | * VC Undo:: Canceling changes before or after check-in. | 820 | * VC Undo:: Canceling changes before or after check-in. |
| 806 | @end menu | 821 | @end menu |
| 807 | 822 | ||
| @@ -857,22 +872,36 @@ particular file using the minibuffer. | |||
| 857 | initial comment to describe the purpose of this source file. Reading | 872 | initial comment to describe the purpose of this source file. Reading |
| 858 | the initial comment works like reading a log entry (@pxref{Log Buffer}). | 873 | the initial comment works like reading a log entry (@pxref{Log Buffer}). |
| 859 | 874 | ||
| 860 | @node VC Status | 875 | @node VC Change Log |
| 861 | @subsubsection VC Status Commands | 876 | @subsubsection VC Change Log |
| 862 | 877 | ||
| 863 | @table @kbd | 878 | @table @kbd |
| 864 | @item C-x v l | 879 | @item C-x v l |
| 865 | Display revision control state and change history. | 880 | Display revision control state and change history |
| 881 | (@code{vc-print-log}). | ||
| 882 | |||
| 883 | @item C-x v L | ||
| 884 | Display the change history for the current repository | ||
| 885 | (@code{vc-print-root-log}). | ||
| 866 | @end table | 886 | @end table |
| 867 | 887 | ||
| 868 | @kindex C-x v l | 888 | @kindex C-x v l |
| 869 | @findex vc-print-log | 889 | @findex vc-print-log |
| 870 | To view the detailed revision control status and history of a file, | 890 | The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer |
| 871 | type @kbd{C-x v l} (@code{vc-print-log}). This pops up a special | 891 | named @samp{*vc-change-log*} in a new window. This buffer lists the |
| 872 | buffer named @samp{*vc-change-log*}, in a new window, that displays | 892 | changes to the current file, including the associated log entries. |
| 873 | the history of changes to the current file, including the text of the | 893 | (These are the log entries associated with the version control system, |
| 874 | log entries. The point is centered at the revision of the file that | 894 | i.e. the ones you enter via the @samp{*VC-Log*} buffer. @xref{Log |
| 875 | is currently being visited. | 895 | Buffer}.) Point is centered at the revision of the file currently |
| 896 | being visited. With a prefix argument, the command prompts for the | ||
| 897 | revision to center on, and the maximum number of revisions to display. | ||
| 898 | |||
| 899 | @findex vc-print-root-log | ||
| 900 | Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a | ||
| 901 | @samp{*vc-change-log*} buffer showing the history of the | ||
| 902 | version-controlled directory tree as a whole. With a prefix argument, | ||
| 903 | the command prompts for the maximum number of revisions to display. | ||
| 904 | RCS, SCCS, and CVS do not support this feature. | ||
| 876 | 905 | ||
| 877 | In the @samp{*vc-change-log*} buffer, you can use the following keys | 906 | In the @samp{*vc-change-log*} buffer, you can use the following keys |
| 878 | to move between the logs of revisions and of files, to view past | 907 | to move between the logs of revisions and of files, to view past |
| @@ -926,6 +955,16 @@ This is useful to see all the changes to all files that the revision | |||
| 926 | indicated on the current line did when it was committed. | 955 | indicated on the current line did when it was committed. |
| 927 | @end table | 956 | @end table |
| 928 | 957 | ||
| 958 | @vindex vc-log-show-limit | ||
| 959 | Because fetching many log entries can be slow, the | ||
| 960 | @samp{*vc-change-log*} buffer displays no more than 2000 revisions by | ||
| 961 | default. The variable @code{vc-log-show-limit} specifies this limit; | ||
| 962 | if you set the value to zero, that removes the limit. You can also | ||
| 963 | increase the number of revisions shown in an existing | ||
| 964 | @samp{*vc-change-log*} buffer by clicking on the @samp{Show 2X | ||
| 965 | entries} or @samp{Show unlimited entries} buttons at the end of the | ||
| 966 | buffer. However, RCS, SCCS, and CVS do not support this feature. | ||
| 967 | |||
| 929 | @node VC Undo | 968 | @node VC Undo |
| 930 | @subsubsection Undoing Version Control Actions | 969 | @subsubsection Undoing Version Control Actions |
| 931 | 970 | ||
diff --git a/doc/emacs/major.texi b/doc/emacs/major.texi index 19ab86f91dd..d67bc4a13dd 100644 --- a/doc/emacs/major.texi +++ b/doc/emacs/major.texi | |||
| @@ -41,7 +41,7 @@ languages. These include Lisp mode (which has several variants), C | |||
| 41 | mode, Fortran mode, and others. The remaining major modes are not | 41 | mode, Fortran mode, and others. The remaining major modes are not |
| 42 | intended for use on users' files; they are used in buffers created for | 42 | intended for use on users' files; they are used in buffers created for |
| 43 | specific purposes by Emacs, such as Dired mode for buffers made by | 43 | specific purposes by Emacs, such as Dired mode for buffers made by |
| 44 | Dired (@pxref{Dired}), Mail mode for buffers made by @kbd{C-x m} | 44 | Dired (@pxref{Dired}), Message mode for buffers made by @kbd{C-x m} |
| 45 | (@pxref{Sending Mail}), and Shell mode for buffers used for | 45 | (@pxref{Sending Mail}), and Shell mode for buffers used for |
| 46 | communicating with an inferior shell process (@pxref{Interactive | 46 | communicating with an inferior shell process (@pxref{Interactive |
| 47 | Shell}). | 47 | Shell}). |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index cdf46f0f151..808c3bfc3d3 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -84,11 +84,20 @@ When in DocView mode, you can scroll the current page using the usual | |||
| 84 | Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and | 84 | Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and |
| 85 | the arrow keys. | 85 | the arrow keys. |
| 86 | 86 | ||
| 87 | @vindex doc-view-continuous | ||
| 88 | By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop | ||
| 89 | scrolling at the beginning and end of the current page, respectively. | ||
| 90 | However, if you change the variable @code{doc-view-continuous} to a | ||
| 91 | non-@code{nil} value, then @kbd{C-p} displays the previous page if you | ||
| 92 | are already at the beginning of the current page, and @kbd{C-n} | ||
| 93 | displays the next page if you are at the end of the current page. | ||
| 94 | |||
| 87 | @findex doc-view-next-page | 95 | @findex doc-view-next-page |
| 88 | @findex doc-view-previous-page | 96 | @findex doc-view-previous-page |
| 89 | To display the next page, type @kbd{n}, @key{next} or @kbd{C-x ]} | 97 | You can also display the next page by typing @kbd{n}, @key{next} or |
| 90 | (@code{doc-view-next-page}). To display the previous page, type | 98 | @kbd{C-x ]} (@code{doc-view-next-page}). To display the previous |
| 91 | @kbd{p}, @key{prior} or @kbd{C-x [} (@code{doc-view-previous-page}). | 99 | page, type @kbd{p}, @key{prior} or @kbd{C-x [} |
| 100 | (@code{doc-view-previous-page}). | ||
| 92 | 101 | ||
| 93 | @findex doc-view-scroll-up-or-next-page | 102 | @findex doc-view-scroll-up-or-next-page |
| 94 | @findex doc-view-scroll-down-or-previous-page | 103 | @findex doc-view-scroll-down-or-previous-page |
| @@ -957,12 +966,9 @@ Fetch the next earlier old shell command. | |||
| 957 | Fetch the next later old shell command. | 966 | Fetch the next later old shell command. |
| 958 | 967 | ||
| 959 | @kindex M-r @r{(Shell mode)} | 968 | @kindex M-r @r{(Shell mode)} |
| 960 | @kindex M-s @r{(Shell mode)} | 969 | @findex comint-history-isearch-backward-regexp |
| 961 | @findex comint-previous-matching-input | 970 | @item M-r |
| 962 | @findex comint-next-matching-input | 971 | Begin an incremental regexp search of old shell commands. |
| 963 | @item M-r @var{regexp} @key{RET} | ||
| 964 | @itemx M-s @var{regexp} @key{RET} | ||
| 965 | Search backwards or forwards for old shell commands that match @var{regexp}. | ||
| 966 | 972 | ||
| 967 | @item C-c C-x | 973 | @item C-c C-x |
| 968 | @kindex C-c C-x @r{(Shell mode)} | 974 | @kindex C-c C-x @r{(Shell mode)} |
| @@ -995,15 +1001,15 @@ successively more recent shell commands from the buffer. | |||
| 995 | @kbd{C-@key{UP}} works like @kbd{M-p}, and @kbd{C-@key{DOWN}} like | 1001 | @kbd{C-@key{UP}} works like @kbd{M-p}, and @kbd{C-@key{DOWN}} like |
| 996 | @kbd{M-n}. | 1002 | @kbd{M-n}. |
| 997 | 1003 | ||
| 998 | The history search commands @kbd{M-r} and @kbd{M-s} read a regular | 1004 | The history search command @kbd{M-r} begins an incremental regular |
| 999 | expression and search through the history for a matching command. Aside | 1005 | expression search of previous shell commands. After typing @kbd{M-r}, |
| 1000 | from the choice of which command to fetch, they work just like @kbd{M-p} | 1006 | start typing the desired string or regular expression; the last |
| 1001 | and @kbd{M-n}. If you enter an empty regexp, these commands reuse the | 1007 | matching shell command will be displayed in the current line. |
| 1002 | same regexp used last time. | 1008 | Incremental search commands have their usual effects---for instance, |
| 1003 | 1009 | @kbd{C-s} and @kbd{C-r} search forward and backward for the next match | |
| 1004 | When you find the previous input you want, you can resubmit it by | 1010 | (@pxref{Incremental Search}). When you find the desired input, type |
| 1005 | typing @key{RET}, or you can edit it first and then resubmit it if you | 1011 | @key{RET} to terminate the search. This puts the input in the command |
| 1006 | wish. Any partial input you were composing before navigating the | 1012 | line. Any partial input you were composing before navigating the |
| 1007 | history list is restored when you go to the beginning or end of the | 1013 | history list is restored when you go to the beginning or end of the |
| 1008 | history ring. | 1014 | history ring. |
| 1009 | 1015 | ||
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 6420132e0ce..be639f45b0a 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -540,6 +540,11 @@ most input methods---some disable this feature). If | |||
| 540 | possible characters to type next is displayed in the echo area (but | 540 | possible characters to type next is displayed in the echo area (but |
| 541 | not when you are in the minibuffer). | 541 | not when you are in the minibuffer). |
| 542 | 542 | ||
| 543 | Another facility for typing characters not on your keyboard is by | ||
| 544 | using the @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single | ||
| 545 | character based on its Unicode name or code-point; see @ref{Inserting | ||
| 546 | Text}. | ||
| 547 | |||
| 543 | @node Select Input Method | 548 | @node Select Input Method |
| 544 | @section Selecting an Input Method | 549 | @section Selecting an Input Method |
| 545 | 550 | ||
| @@ -968,15 +973,16 @@ still use an unsuitable coding system if you type its name in response | |||
| 968 | to the question.) | 973 | to the question.) |
| 969 | 974 | ||
| 970 | @vindex sendmail-coding-system | 975 | @vindex sendmail-coding-system |
| 971 | When you send a message with Mail mode (@pxref{Sending Mail}), Emacs has | 976 | When you send a message with Message mode (@pxref{Sending Mail}), |
| 972 | four different ways to determine the coding system to use for encoding | 977 | Emacs has four different ways to determine the coding system to use |
| 973 | the message text. It tries the buffer's own value of | 978 | for encoding the message text. It tries the buffer's own value of |
| 974 | @code{buffer-file-coding-system}, if that is non-@code{nil}. Otherwise, | 979 | @code{buffer-file-coding-system}, if that is non-@code{nil}. |
| 975 | it uses the value of @code{sendmail-coding-system}, if that is | 980 | Otherwise, it uses the value of @code{sendmail-coding-system}, if that |
| 976 | non-@code{nil}. The third way is to use the default coding system for | 981 | is non-@code{nil}. The third way is to use the default coding system |
| 977 | new files, which is controlled by your choice of language environment, | 982 | for new files, which is controlled by your choice of language |
| 978 | if that is non-@code{nil}. If all of these three values are @code{nil}, | 983 | environment, if that is non-@code{nil}. If all of these three values |
| 979 | Emacs encodes outgoing mail using the Latin-1 coding system. | 984 | are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding |
| 985 | system. | ||
| 980 | 986 | ||
| 981 | @node Text Coding | 987 | @node Text Coding |
| 982 | @section Specifying a Coding System for File Text | 988 | @section Specifying a Coding System for File Text |
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 8ebbcf58ed4..dce6c38692e 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi | |||
| @@ -88,11 +88,12 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}. | |||
| 88 | @cindex PostScript mode | 88 | @cindex PostScript mode |
| 89 | @cindex Conf mode | 89 | @cindex Conf mode |
| 90 | @cindex DNS mode | 90 | @cindex DNS mode |
| 91 | @cindex Javascript mode | ||
| 91 | The existing programming language major modes include Lisp, Scheme | 92 | The existing programming language major modes include Lisp, Scheme |
| 92 | (a variant of Lisp) and the Scheme-based DSSSL expression language, | 93 | (a variant of Lisp) and the Scheme-based DSSSL expression language, |
| 93 | Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL | 94 | Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL |
| 94 | (CORBA), IDLWAVE, Java, Metafont (@TeX{}'s companion for font | 95 | (CORBA), IDLWAVE, Java, Javascript, Metafont (@TeX{}'s companion for |
| 95 | creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike, | 96 | font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike, |
| 96 | PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL. An | 97 | PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL. An |
| 97 | alternative mode for Perl is called CPerl mode. Modes are available | 98 | alternative mode for Perl is called CPerl mode. Modes are available |
| 98 | for the scripting languages of the common GNU and Unix shells, VMS | 99 | for the scripting languages of the common GNU and Unix shells, VMS |
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index d5ea368dd3b..8a4ce492ee1 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi | |||
| @@ -683,12 +683,12 @@ standard meaning. | |||
| 683 | @node Rmail Reply | 683 | @node Rmail Reply |
| 684 | @section Sending Replies | 684 | @section Sending Replies |
| 685 | 685 | ||
| 686 | Rmail has several commands that use Mail mode to send outgoing mail. | 686 | Rmail has several commands to send outgoing mail. @xref{Sending |
| 687 | @xref{Sending Mail}, for information on using Mail mode, including | 687 | Mail}, for information on using Message mode, including certain |
| 688 | certain features meant to work with Rmail. What this section documents | 688 | features meant to work with Rmail. What this section documents are |
| 689 | are the special commands of Rmail for entering Mail mode. Note that the | 689 | the special commands of Rmail for entering the mail buffer. Note that |
| 690 | usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and @kbd{C-x 5 | 690 | the usual keys for sending mail---@kbd{C-x m}, @kbd{C-x 4 m}, and |
| 691 | m}---also work normally in Rmail mode. | 691 | @kbd{C-x 5 m}---also work normally in Rmail mode. |
| 692 | 692 | ||
| 693 | @table @kbd | 693 | @table @kbd |
| 694 | @item m | 694 | @item m |
| @@ -735,12 +735,12 @@ the reply command with a numeric argument: @kbd{C-u r} or @kbd{1 r}. | |||
| 735 | This means to reply only to the sender of the original message. | 735 | This means to reply only to the sender of the original message. |
| 736 | 736 | ||
| 737 | Once the @samp{*mail*} buffer has been initialized, editing and | 737 | Once the @samp{*mail*} buffer has been initialized, editing and |
| 738 | sending the mail goes as usual (@pxref{Sending Mail}). You can edit the | 738 | sending the mail goes as usual (@pxref{Sending Mail}). You can edit |
| 739 | presupplied header fields if they are not what you want. You can also | 739 | the presupplied header fields if they are not what you want. You can |
| 740 | use the commands of Mail mode (@pxref{Mail Mode}), including @kbd{C-c | 740 | also use commands such as @kbd{C-c C-y}, which yanks in the message |
| 741 | C-y} which yanks in the message that you are replying to. You can | 741 | that you are replying to (@pxref{Mail Commands}). You can also switch |
| 742 | also switch to the Rmail buffer, select a different message there, switch | 742 | to the Rmail buffer, select a different message there, switch back, |
| 743 | back, and yank the new current message. | 743 | and yank the new current message. |
| 744 | 744 | ||
| 745 | @kindex M-m @r{(Rmail)} | 745 | @kindex M-m @r{(Rmail)} |
| 746 | @findex rmail-retry-failure | 746 | @findex rmail-retry-failure |
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 717c89936fc..59f140e5f8a 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi | |||
| @@ -6,120 +6,110 @@ | |||
| 6 | @chapter Sending Mail | 6 | @chapter Sending Mail |
| 7 | @cindex sending mail | 7 | @cindex sending mail |
| 8 | @cindex mail | 8 | @cindex mail |
| 9 | @cindex email | ||
| 9 | @cindex message | 10 | @cindex message |
| 10 | 11 | ||
| 11 | To send a message in Emacs, you start by typing a command (@kbd{C-x m}) | 12 | @kindex C-x m |
| 12 | to select and initialize the @samp{*mail*} buffer. Then you edit the text | 13 | @findex compose-mail |
| 13 | and headers of the message in this buffer, and type another command | 14 | To send an @dfn{e-mail} message in Emacs, type @kbd{C-x m}. This |
| 14 | (@kbd{C-c C-s} or @kbd{C-c C-c}) to send the message. | 15 | selects and initializes a buffer named @samp{*mail*}, where you can |
| 16 | edit the text and headers of the message. Finally, type @kbd{C-c C-s} | ||
| 17 | or @kbd{C-c C-c} to send the message. | ||
| 15 | 18 | ||
| 16 | @table @kbd | 19 | @table @kbd |
| 17 | @item C-x m | 20 | @item C-x m |
| 18 | Begin composing a message to send (@code{compose-mail}). | 21 | Begin composing mail (@code{compose-mail}). |
| 19 | @item C-x 4 m | 22 | @item C-x 4 m |
| 20 | Likewise, but display the message in another window | 23 | Likewise, in another window (@code{compose-mail-other-window}). |
| 21 | (@code{compose-mail-other-window}). | ||
| 22 | @item C-x 5 m | 24 | @item C-x 5 m |
| 23 | Likewise, but make a new frame (@code{compose-mail-other-frame}). | 25 | Likewise, but in a new frame (@code{compose-mail-other-frame}). |
| 24 | @item C-c C-s | 26 | @item C-c C-s |
| 25 | In Mail mode, send the message (@code{mail-send}). | 27 | In the mail buffer, send the message (@code{message-send}). |
| 26 | @item C-c C-c | 28 | @item C-c C-c |
| 27 | Send the message and bury the mail buffer (@code{mail-send-and-exit}). | 29 | In the mail buffer, send the message and bury the buffer |
| 30 | (@code{message-send-and-exit}). | ||
| 28 | @end table | 31 | @end table |
| 29 | 32 | ||
| 30 | @kindex C-x m | ||
| 31 | @findex compose-mail | ||
| 32 | @kindex C-x 4 m | 33 | @kindex C-x 4 m |
| 33 | @findex compose-mail-other-window | 34 | @findex compose-mail-other-window |
| 34 | @kindex C-x 5 m | 35 | @kindex C-x 5 m |
| 35 | @findex compose-mail-other-frame | 36 | @findex compose-mail-other-frame |
| 36 | The command @kbd{C-x m} (@code{compose-mail}) selects a buffer named | 37 | @noindent |
| 37 | @samp{*mail*} and initializes it with the skeleton of an outgoing | 38 | The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does the |
| 38 | message. @kbd{C-x 4 m} (@code{compose-mail-other-window}) selects the | 39 | same as @kbd{C-x m}, except it displays the mail buffer in a different |
| 39 | @samp{*mail*} buffer in a different window, leaving the previous current | 40 | window. The command @kbd{C-x 5 m} (@code{compose-mail-other-frame}) |
| 40 | buffer visible. @kbd{C-x 5 m} (@code{compose-mail-other-frame}) creates | 41 | creates a new frame for the mail buffer. |
| 41 | a new frame to select the @samp{*mail*} buffer. | 42 | |
| 42 | 43 | Because the mail buffer is an ordinary Emacs buffer, you can switch | |
| 43 | Because the mail-composition buffer is an ordinary Emacs buffer, you can | 44 | to other buffers while in the middle of composing mail, and switch |
| 44 | switch to other buffers while in the middle of composing mail, and switch | 45 | back later (or never). If you type @kbd{C-x m} again when you have |
| 45 | back later (or never). If you use the @kbd{C-x m} command again when you | 46 | been composing another message but have not sent it, Emacs asks for |
| 46 | have been composing another message but have not sent it, you are asked to | 47 | confirmation before erasing the old message. If you answer @kbd{n}, |
| 47 | confirm before the old message is erased. If you answer @kbd{n}, the | 48 | Emacs selects the mail buffer with its old contents, so you can finish |
| 48 | @samp{*mail*} buffer remains selected with its old contents, so you can | 49 | the old message and send it. @kbd{C-u C-x m} is another way to do |
| 49 | finish the old message and send it. @kbd{C-u C-x m} is another way to do | 50 | this. Sending the message marks the mail buffer ``unmodified,'' which |
| 50 | this. Sending the message marks the @samp{*mail*} buffer ``unmodified,'' | 51 | avoids the need for confirmation when @kbd{C-x m} is next used. |
| 51 | which avoids the need for confirmation when @kbd{C-x m} is next used. | 52 | |
| 52 | 53 | If you want to send another message before finishing the current | |
| 53 | If you are composing a message in the @samp{*mail*} buffer and want to | 54 | message, use the command @kbd{M-x rename-uniquely} to rename the |
| 54 | send another message before finishing the first, rename the | 55 | current mail buffer (@pxref{Misc Buffer}). Then you can use @kbd{C-x |
| 55 | @samp{*mail*} buffer using @kbd{M-x rename-uniquely} (@pxref{Misc | 56 | m} to make a new mail buffer, and work with each mail buffer |
| 56 | Buffer}). Then you can use @kbd{C-x m} or its variants described above | 57 | independently. |
| 57 | to make a new @samp{*mail*} buffer. Once you've done that, you can work | 58 | |
| 58 | with each mail buffer independently. | 59 | Before using Emacs to send mail, you may need to customize the |
| 59 | 60 | variable @code{send-mail-function} if your system is not set up to | |
| 60 | @vindex mail-default-directory | 61 | deliver mail directly via SMTP (@pxref{Mail Sending}). In addition, |
| 61 | The variable @code{mail-default-directory} controls the default | 62 | you may need to customize @code{user-mail-address} if the system |
| 62 | directory for mail buffers, and also says where to put their auto-save | 63 | cannot receive mail via SMTP (@pxref{Mail Headers}). |
| 63 | files. | ||
| 64 | |||
| 65 | @c Not mentioned: mail-bury-selects-summary. Really an Rmail feature. | ||
| 66 | |||
| 67 | @ignore | ||
| 68 | @c Commented out because it is not user-oriented; | ||
| 69 | @c it doesn't say how to do some job. -- rms. | ||
| 70 | @cindex directory servers | ||
| 71 | @cindex LDAP | ||
| 72 | @cindex PH/QI | ||
| 73 | @cindex names and addresses | ||
| 74 | There is an interface to directory servers using various protocols such | ||
| 75 | as LDAP or the CCSO white pages directory system (PH/QI), described in a | ||
| 76 | separate manual. It may be useful for looking up names and addresses. | ||
| 77 | @xref{Top,,EUDC, eudc, EUDC Manual}. | ||
| 78 | @end ignore | ||
| 79 | 64 | ||
| 80 | @menu | 65 | @menu |
| 81 | * Format: Mail Format. Format of the mail being composed. | 66 | * Format: Mail Format. Format of a mail message. |
| 82 | * Headers: Mail Headers. Details of some standard mail header fields. | 67 | * Headers: Mail Headers. Details of some standard mail header fields. |
| 83 | * Aliases: Mail Aliases. Abbreviating and grouping mail addresses. | 68 | * Aliases: Mail Aliases. Abbreviating and grouping mail addresses. |
| 84 | * Mode: Mail Mode. Special commands for editing mail being composed. | 69 | * Commands: Mail Commands. Special commands for editing mail being composed. |
| 85 | * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. | 70 | * Signature: Mail Signature. Adding a signature to every message. |
| 86 | * Methods: Mail Methods. Using alternative mail-composition methods. | 71 | * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages. |
| 72 | * Methods: Mail Methods. Using alternative mail-composition methods. | ||
| 87 | @end menu | 73 | @end menu |
| 88 | 74 | ||
| 89 | @node Mail Format | 75 | @node Mail Format |
| 90 | @section The Format of the Mail Buffer | 76 | @section The Format of the Mail Buffer |
| 91 | 77 | ||
| 92 | In addition to the @dfn{text} or @dfn{body}, a message has @dfn{header | 78 | An email message must contain certain pieces of information, called |
| 93 | fields} which say who sent it, when, to whom, why, and so on. Some | 79 | @dfn{headers}, which specify the message's sender, recipient(s), and |
| 94 | header fields, such as @samp{Date} and @samp{Message-Id}, are created | 80 | so on. |
| 95 | automatically when you send the message. Others, such as the recipient | 81 | |
| 96 | names, must be specified by you in order to send the message properly. | 82 | At the top of the mail buffer is a set of @dfn{header fields}, where |
| 83 | you can enter this information. You can insert and edit header fields | ||
| 84 | using ordinary editing commands. @xref{Header Editing}, for commands | ||
| 85 | specific to editing header fields. | ||
| 97 | 86 | ||
| 98 | In the mail buffer, you can insert and edit header fields using | 87 | Some header fields are automatically pre-initialized in the buffer, |
| 99 | ordinary editing commands. Mail mode provides commands to help you | 88 | when appropriate; other headers, such as @samp{Date} and |
| 100 | edit some header fields, and some are automatically preinitialized in | 89 | @samp{Message-Id}, are normally omitted from the mail buffer and |
| 101 | the buffer, when appropriate. | 90 | created automatically when the message is sent. |
| 102 | 91 | ||
| 103 | @vindex mail-header-separator | 92 | @vindex mail-header-separator |
| 104 | The line in the buffer that says | 93 | The line in the buffer that says |
| 105 | 94 | ||
| 106 | @example | 95 | @smallexample |
| 107 | --text follows this line-- | 96 | --text follows this line-- |
| 108 | @end example | 97 | @end smallexample |
| 109 | 98 | ||
| 110 | @noindent | 99 | @noindent |
| 111 | is a special delimiter that separates the headers you have specified from | 100 | separates the header fields from the @dfn{body} (or @dfn{text}) of the |
| 112 | the text. Whatever follows this line is the text of the message; the | 101 | message. Everything above this line is treated as part of the |
| 113 | headers precede it. The delimiter line itself does not appear in the | 102 | headers; everything below it is treated as the body. The delimiter |
| 114 | message actually sent. The text used for the delimiter line is controlled | 103 | line itself does not appear in the message actually sent. The text |
| 115 | by the variable @code{mail-header-separator}. | 104 | used for the delimiter line is controlled by the variable |
| 105 | @code{mail-header-separator}. | ||
| 116 | 106 | ||
| 117 | Here is an example of what the headers and text in the mail buffer | 107 | Here is an example of what the headers and text in the mail buffer |
| 118 | might look like. | 108 | might look like. |
| 119 | 109 | ||
| 120 | @example | 110 | @example |
| 121 | To: gnu@@gnu.org | 111 | To: gnu@@example.org |
| 122 | CC: lungfish@@spam.org, byob@@spam.org | 112 | CC: lungfish@@example.com, byob@@example.net |
| 123 | Subject: The Emacs Manual | 113 | Subject: The Emacs Manual |
| 124 | --text follows this line-- | 114 | --text follows this line-- |
| 125 | Please ignore this message. | 115 | Please ignore this message. |
| @@ -134,85 +124,51 @@ beginning of a line, terminated by a colon. Upper and lower case are | |||
| 134 | equivalent in field names (and in mailing addresses also). After the | 124 | equivalent in field names (and in mailing addresses also). After the |
| 135 | colon and optional whitespace comes the contents of the field. | 125 | colon and optional whitespace comes the contents of the field. |
| 136 | 126 | ||
| 137 | You can use any name you like for a header field, but normally people | 127 | You can use any name you like for a header field, but normally |
| 138 | use only standard field names with accepted meanings. Here is a table | 128 | people use only standard field names with accepted meanings. Here is |
| 139 | of fields commonly used in outgoing messages. Emacs preinitializes some | 129 | a table of commonly-used fields. Emacs pre-initializes some of these, |
| 140 | of these when you start to compose a mail, depending on various options | 130 | depending on various options you can set. You can delete or alter any |
| 141 | you can set. You can delete or alter any header field before you send | 131 | header field before you send the message, if you wish. |
| 142 | the message, if you wish. | ||
| 143 | 132 | ||
| 144 | @table @samp | 133 | @table @samp |
| 134 | @item From | ||
| 135 | @vindex user-mail-address | ||
| 136 | The address of the sender (you). This should be a valid mailing | ||
| 137 | address, as replies will normally go there. Emacs initializes this | ||
| 138 | field using the variables @code{user-full-name} and | ||
| 139 | @code{user-mail-address}; see below. | ||
| 140 | |||
| 145 | @item To | 141 | @item To |
| 146 | This field contains the mailing addresses to which the message is | 142 | The mailing address(es) to which the message is addressed. To list |
| 147 | addressed. If you list more than one address, use commas, not spaces, | 143 | more than one address, use commas (not spaces) to separate them. |
| 148 | to separate them. | ||
| 149 | 144 | ||
| 150 | @item Subject | 145 | @item Subject |
| 151 | The contents of the @samp{Subject} field should be a piece of text | 146 | A piece of text saying what the message is about. Most mail-reading |
| 152 | that says what the message is about. The reason @samp{Subject} fields | 147 | programs can display a summary of messages, listing the subject of |
| 153 | are useful is that most mail-reading programs can provide a summary of | 148 | each message but not its text. |
| 154 | messages, listing the subject of each message but not its text. | ||
| 155 | 149 | ||
| 156 | @item CC | 150 | @item CC |
| 157 | This field contains additional mailing addresses to send the message to, | 151 | Additional mailing address(es) to send the message to. This is like |
| 158 | like @samp{To} except that these readers should not regard the message | 152 | @samp{To}, except that these readers should not regard the message as |
| 159 | as directed at them. | 153 | directed at them. |
| 160 | 154 | ||
| 161 | @item BCC | 155 | @item BCC |
| 162 | This field contains additional mailing addresses to send the message to, | 156 | Additional mailing address(es) to send the message to, which should |
| 163 | which should not appear in the header of the message actually sent. | 157 | not appear in the header of the message actually sent. ``BCC'' stands |
| 164 | Copies sent this way are called @dfn{blind carbon copies}. | 158 | for @dfn{blind carbon copies}. |
| 165 | |||
| 166 | @vindex mail-self-blind | ||
| 167 | @cindex copy of every outgoing message | ||
| 168 | To send a blind carbon copy of every outgoing message to yourself, set | ||
| 169 | the variable @code{mail-self-blind} to @code{t}. To send a blind carbon | ||
| 170 | copy of every message to some other @var{address}, set the variable | ||
| 171 | @code{mail-default-headers} to @code{"Bcc: @var{address}\n"}. | ||
| 172 | 159 | ||
| 173 | @item FCC | 160 | @item FCC |
| 174 | This field contains the name of one file and directs Emacs to append a | 161 | The name of one file, to which a copy of the sent message should be |
| 175 | copy of the message to that file when you send the message. Emacs | 162 | appended. Emacs writes the message in mbox format, unless the file is |
| 176 | writes the message in mbox format, unless the file is in Babyl format | 163 | in Babyl format (used by Rmail before Emacs 23), in which case Emacs |
| 177 | (used by Rmail before Emacs 23), in which case Emacs writes Babyl. If | 164 | writes Babyl. If an Rmail buffer is visiting the file, Emacs updates |
| 178 | an Rmail buffer is visiting the file, Emacs updates it accordingly. | 165 | it accordingly. To specify more than one file, use several @samp{FCC} |
| 179 | To specify more than one file, use several @samp{FCC} fields, with one | 166 | fields, with one file name in each field. |
| 180 | file name in each field. | ||
| 181 | |||
| 182 | @vindex mail-archive-file-name | ||
| 183 | To put a fixed file name in the @samp{FCC} field each time you start | ||
| 184 | editing an outgoing message, set the variable | ||
| 185 | @code{mail-archive-file-name} to that file name. Unless you remove the | ||
| 186 | @samp{FCC} field before sending, the message will be written into that | ||
| 187 | file when it is sent. | ||
| 188 | |||
| 189 | @item From | ||
| 190 | Use the @samp{From} field to say who you are. You might need to change | ||
| 191 | this if the account you are using to send the mail is not your own. The | ||
| 192 | contents of the @samp{From} field should be a valid mailing address, | ||
| 193 | since replies will normally go there. | ||
| 194 | |||
| 195 | @vindex mail-setup-with-from | ||
| 196 | Emacs initializes this field (unless the variable | ||
| 197 | @code{mail-setup-with-from} is @code{nil}) using | ||
| 198 | @code{user-mail-address} as the default. If there is no @samp{From} | ||
| 199 | field when you send a mail, Emacs adds one. | ||
| 200 | 167 | ||
| 201 | @item Reply-to | 168 | @item Reply-to |
| 202 | Use this field to direct replies to a different address. Most | 169 | An address to which replies should be sent, instead of @samp{From}. |
| 203 | mail-reading programs (including Rmail) automatically send replies to | 170 | You can use this header if, for some reason, your @samp{From} address |
| 204 | the @samp{Reply-to} address in preference to the @samp{From} address. | 171 | is unable to receive replies. |
| 205 | By adding a @samp{Reply-to} field to your header, you can work around | ||
| 206 | any problems your @samp{From} address may cause for replies. | ||
| 207 | |||
| 208 | @cindex @env{REPLYTO} environment variable | ||
| 209 | @vindex mail-default-reply-to | ||
| 210 | To put a fixed @samp{Reply-to} address into every outgoing message, set | ||
| 211 | the variable @code{mail-default-reply-to} to that address (as a string). | ||
| 212 | Then Emacs initializes the message with a @samp{Reply-to} field as | ||
| 213 | specified. When you first compose a mail, if | ||
| 214 | @code{mail-default-reply-to} is @code{nil}, Emacs initializes it from the | ||
| 215 | environment variable @env{REPLYTO}. | ||
| 216 | 172 | ||
| 217 | @item Mail-reply-to | 173 | @item Mail-reply-to |
| 218 | This field takes precedence over @samp{Reply-to}. It is used because | 174 | This field takes precedence over @samp{Reply-to}. It is used because |
| @@ -225,70 +181,88 @@ you reply to a message from a mailing list that you are subscribed to. | |||
| 225 | It usually indicates that you want replies to go to the list, and that | 181 | It usually indicates that you want replies to go to the list, and that |
| 226 | you do not need an extra copy sent directly to you. | 182 | you do not need an extra copy sent directly to you. |
| 227 | 183 | ||
| 228 | @vindex mail-mailing-lists | 184 | @c Message mode handles this differently... |
| 229 | The variable @code{mail-mailing-lists} holds a list of mailing list | 185 | @c @vindex mail-mailing-lists |
| 230 | addresses that you are subscribed to. If it is non-@code{nil}, Emacs | 186 | @c The variable @code{mail-mailing-lists} holds a list of mailing list |
| 231 | inserts an appropriate @samp{Mail-followup-to} header when sending mail | 187 | @c addresses that you are subscribed to. If it is non-@code{nil}, Emacs |
| 232 | to a mailing list. | 188 | @c inserts an appropriate @samp{Mail-followup-to} header when sending mail |
| 233 | 189 | @c to a mailing list. | |
| 234 | @c There is also "Sent-via", added by C-c C-v, but it does not seem | ||
| 235 | @c particularly useful (?). | ||
| 236 | 190 | ||
| 237 | @item In-reply-to | 191 | @item In-reply-to |
| 238 | This field contains a piece of text describing the message you are | 192 | A piece of text describing the message you are replying to. Some mail |
| 239 | replying to. Some mail systems can use this information to correlate | 193 | systems can use this information to correlate related pieces of mail. |
| 240 | related pieces of mail. Normally this field is filled in by Rmail | 194 | Normally, you never need to think about this, because it is filled in |
| 241 | when you reply to a message in Rmail, and you never need to | 195 | automatically when you reply to a message in Rmail (or any other mail |
| 242 | think about it (@pxref{Rmail}). | 196 | program built into Emacs). |
| 243 | 197 | ||
| 244 | @item References | 198 | @item References |
| 245 | This field lists the Message-Ids of related previous messages (a | 199 | The Message-Ids of previous related messages (a Message-Id is a unique |
| 246 | Message-Id is a unique identifier generated when a message is sent). | 200 | identifier generated when a message is sent). Like |
| 247 | Rmail sets up this field automatically when you reply to a message. | 201 | @samp{In-reply-to}, this is normally set up automatically for you. |
| 248 | @end table | 202 | @end table |
| 249 | 203 | ||
| 250 | The @samp{To}, @samp{CC}, and @samp{BCC} header fields can appear | 204 | @noindent |
| 251 | any number of times, and each such header field can contain multiple | 205 | The @samp{To}, @samp{CC}, and @samp{BCC} fields can appear any number |
| 252 | addresses, separated by commas. This way, you can specify any number | 206 | of times, and each such header field can contain multiple addresses, |
| 253 | of places to send the message. These fields can also have | 207 | separated by commas. This way, you can specify any number of places |
| 254 | continuation lines: one or more lines starting with whitespace, | 208 | to send the message. These fields can also have continuation lines: |
| 255 | following the starting line of the field, are considered part of the | 209 | one or more lines starting with whitespace, following the starting |
| 256 | field. Here's an example of a @samp{To} field with a continuation | 210 | line of the field, are considered part of the field. Here's an |
| 257 | line: | 211 | example of a @samp{To} field with a continuation line: |
| 258 | 212 | ||
| 259 | @example | 213 | @example |
| 260 | @group | 214 | @group |
| 261 | To: foo@@here.net, this@@there.net, | 215 | To: foo@@example.net, this@@example.net, |
| 262 | me@@gnu.cambridge.mass.usa.earth.spiral3281 | 216 | bob@@example.com |
| 263 | @end group | 217 | @end group |
| 264 | @end example | 218 | @end example |
| 265 | 219 | ||
| 266 | @vindex mail-from-style | 220 | @vindex user-full-name |
| 267 | When you send the message, if you didn't write a @samp{From} field | 221 | @vindex user-mail-address |
| 268 | yourself, Emacs puts in one for you, using @code{user-mail-address}. | 222 | The default contents of the @samp{From} header field are computed |
| 269 | The variable @code{mail-from-style} controls the format: | 223 | from the variables @code{user-full-name} and @code{user-mail-address}. |
| 224 | On some operating systems, Emacs initializes these two variables using | ||
| 225 | environment variables (@pxref{General Variables}). If this | ||
| 226 | information is unavailable or wrong, you can customize the variables | ||
| 227 | yourself (@pxref{Easy Customization}). | ||
| 270 | 228 | ||
| 271 | @table @code | 229 | @vindex mail-from-style |
| 272 | @item nil | 230 | The value of the variable @code{mail-from-style} specifies how to |
| 273 | Use just the email address, as in @samp{king@@grassland.com}. | 231 | format the address in the @samp{From} field: |
| 274 | @item parens | 232 | |
| 275 | Use both email address and full name, as in:@* | 233 | @table @asis |
| 234 | @item @code{nil} | ||
| 235 | Use just the address, as in @samp{king@@grassland.com}. | ||
| 236 | @item @code{parens} | ||
| 237 | Use both address and full name, as in:@* | ||
| 276 | @samp{king@@grassland.com (Elvis Parsley)}. | 238 | @samp{king@@grassland.com (Elvis Parsley)}. |
| 277 | @item angles | 239 | @item @code{angles} |
| 278 | Use both email address and full name, as in:@* | 240 | Use both address and full name, as in:@* |
| 279 | @samp{Elvis Parsley <king@@grassland.com>}. | 241 | @samp{Elvis Parsley <king@@grassland.com>}. |
| 280 | @item system-default | 242 | @item any other value |
| 281 | Allow the system to insert the @samp{From} field. | 243 | Use @code{angles} for most addresses. However, if the address must be |
| 244 | ``quoted'' to remain syntactically-valid under the @code{angles} | ||
| 245 | format but not under the @code{parens} format, use @code{parens} | ||
| 246 | instead. This is the default. | ||
| 282 | @end table | 247 | @end table |
| 283 | 248 | ||
| 284 | @c There is also mail-specify-envelope-from and mail-envelope-from, but | 249 | @c There is also mail-specify-envelope-from and mail-envelope-from, but |
| 285 | @c these are probably not topics for the Emacs manual. | 250 | @c these are probably not topics for the Emacs manual. |
| 286 | 251 | ||
| 287 | @vindex mail-default-headers | 252 | @vindex mail-default-headers |
| 288 | You can direct Emacs to insert certain default headers into the | 253 | You can direct Emacs to insert certain default headers into the mail |
| 289 | outgoing message by setting the variable @code{mail-default-headers} | 254 | buffer by setting the variable @code{mail-default-headers} to a |
| 290 | to a string. Then @code{C-x m} inserts this string into the message | 255 | string. Then @kbd{C-x m} inserts this string into the message |
| 291 | headers. If the default header fields are not appropriate for a | 256 | headers. For example, here is how to add a @samp{Reply-to} and |
| 257 | @samp{FCC} header to each message: | ||
| 258 | |||
| 259 | @smallexample | ||
| 260 | (setq mail-default-headers | ||
| 261 | "Reply-to: foo@@example.com\nFCC: ~/Mail/sent") | ||
| 262 | @end smallexample | ||
| 263 | |||
| 264 | @noindent | ||
| 265 | If the default header fields are not appropriate for a | ||
| 292 | particular message, edit them as necessary before sending the message. | 266 | particular message, edit them as necessary before sending the message. |
| 293 | 267 | ||
| 294 | @node Mail Aliases | 268 | @node Mail Aliases |
| @@ -296,29 +270,26 @@ particular message, edit them as necessary before sending the message. | |||
| 296 | @cindex mail aliases | 270 | @cindex mail aliases |
| 297 | @cindex @file{.mailrc} file | 271 | @cindex @file{.mailrc} file |
| 298 | @cindex mailrc file | 272 | @cindex mailrc file |
| 273 | @vindex mail-personal-alias-file | ||
| 299 | 274 | ||
| 300 | You can define @dfn{mail aliases} in a file named @file{~/.mailrc}. | 275 | You can define @dfn{mail aliases}, which are short mnemonic names |
| 301 | These are short mnemonic names which stand for mail addresses or groups of | 276 | that stand for mail addresses or groups of mail addresses. By |
| 302 | mail addresses. Like many other mail programs, Emacs expands aliases | 277 | default, mail aliases are defined in the file @file{~/.mailrc}. You |
| 303 | when they occur in the @samp{To}, @samp{From}, @samp{CC}, @samp{BCC}, and | 278 | can specify a different file name to use, by setting the variable |
| 304 | @samp{Reply-to} fields, plus their @samp{Resent-} variants. | 279 | @code{mail-personal-alias-file}. |
| 305 | @c The list is defined by mail-address-field-regexp. | ||
| 306 | 280 | ||
| 307 | To define an alias in @file{~/.mailrc}, write a line in the following | 281 | To define an alias in @file{.mailrc}, write a line in the following |
| 308 | format: | 282 | format: |
| 309 | 283 | ||
| 310 | @example | 284 | @example |
| 311 | alias @var{shortaddress} @var{fulladdresses} | 285 | alias @var{nick} @var{fulladdresses} |
| 312 | @end example | 286 | @end example |
| 313 | 287 | ||
| 314 | @noindent | 288 | @noindent |
| 315 | Here @var{fulladdresses} stands for one or more mail addresses for | 289 | This means that @var{nick} should expand into @var{fulladdresses}, |
| 316 | @var{shortaddress} to expand into. Separate multiple addresses with | 290 | where @var{fulladdresses} can be either a single address, or multiple |
| 317 | spaces; if an address contains a space, quote the whole address with a | 291 | addresses separated with spaces. For instance, to make @code{maingnu} |
| 318 | pair of double quotes. | 292 | stand for @code{gnu@@gnu.org} plus a local address of your own, put in |
| 319 | |||
| 320 | For instance, to make @code{maingnu} stand for | ||
| 321 | @code{gnu@@gnu.org} plus a local address of your own, put in | ||
| 322 | this line:@refill | 293 | this line:@refill |
| 323 | 294 | ||
| 324 | @example | 295 | @example |
| @@ -326,329 +297,248 @@ alias maingnu gnu@@gnu.org local-gnu | |||
| 326 | @end example | 297 | @end example |
| 327 | 298 | ||
| 328 | @noindent | 299 | @noindent |
| 329 | Addresses specified in this way should use double quotes around an | 300 | If an address contains a space, quote the whole address with a pair of |
| 330 | entire address when the address contains spaces. But you need not | 301 | double quotes, like this: |
| 331 | include double quotes around parts of the address, such as the person's | ||
| 332 | full name. Emacs puts them in if they are needed. For example, | ||
| 333 | 302 | ||
| 334 | @example | 303 | @example |
| 335 | alias jsmith "John Q. Smith <none@@example.com>" | 304 | alias jsmith "John Q. Smith <none@@example.com>" |
| 336 | @end example | 305 | @end example |
| 337 | 306 | ||
| 338 | @noindent | 307 | @noindent |
| 339 | is correct in @samp{.mailrc}. Emacs will insert the address as | 308 | Note that you need not include double quotes around individual parts |
| 309 | of the address, such as the person's full name. Emacs puts them in if | ||
| 310 | they are needed. For instance, it inserts the above address as | ||
| 340 | @samp{"John Q. Smith" <none@@example.com>}. | 311 | @samp{"John Q. Smith" <none@@example.com>}. |
| 341 | 312 | ||
| 342 | Emacs also recognizes ``include'' commands in @samp{.mailrc} files. | 313 | Emacs also recognizes ``include'' commands in @file{.mailrc}. They |
| 343 | They look like this: | 314 | look like this: |
| 344 | 315 | ||
| 345 | @example | 316 | @example |
| 346 | source @var{filename} | 317 | source @var{filename} |
| 347 | @end example | 318 | @end example |
| 348 | 319 | ||
| 349 | @noindent | 320 | @noindent |
| 350 | The file @file{~/.mailrc} is used primarily by other mail-reading | 321 | The @file{.mailrc} file is not unique to Emacs; many other |
| 351 | programs; it can contain various other commands. Emacs ignores | 322 | mail-reading programs use it for mail aliases, and it can contain |
| 352 | everything in it except for alias definitions and include commands. | 323 | various other commands. However, Emacs ignores everything except |
| 353 | 324 | alias definitions and include commands. | |
| 354 | @findex define-mail-alias | ||
| 355 | Another way to define a mail alias, within Emacs alone, is with the | ||
| 356 | @code{define-mail-alias} command. It prompts for the alias and then the | ||
| 357 | full address. You can use it to define aliases in your @file{.emacs} | ||
| 358 | file, like this: | ||
| 359 | |||
| 360 | @example | ||
| 361 | (define-mail-alias "maingnu" "gnu@@gnu.org") | ||
| 362 | @end example | ||
| 363 | |||
| 364 | @vindex mail-aliases | ||
| 365 | @code{define-mail-alias} records aliases by adding them to a | ||
| 366 | variable named @code{mail-aliases}. If you are comfortable with | ||
| 367 | manipulating Lisp lists, you can set @code{mail-aliases} directly. The | ||
| 368 | initial value of @code{mail-aliases} is @code{t}, which means that | ||
| 369 | Emacs should read @file{.mailrc} to get the proper value. | ||
| 370 | |||
| 371 | @vindex mail-personal-alias-file | ||
| 372 | You can specify a different file name to use instead of | ||
| 373 | @file{~/.mailrc} by setting the variable | ||
| 374 | @code{mail-personal-alias-file}. | ||
| 375 | |||
| 376 | @c There is also mail-alias-file for the system aliases. | ||
| 377 | 325 | ||
| 378 | @findex expand-mail-aliases | ||
| 379 | Normally, Emacs expands aliases when you send the message. You do not | ||
| 380 | need to expand mail aliases before sending the message, but you can | ||
| 381 | expand them if you want to see where the mail will actually go. To do | ||
| 382 | this, use the command @kbd{M-x expand-mail-aliases}; it expands all mail | ||
| 383 | aliases currently present in the mail headers that hold addresses. | ||
| 384 | |||
| 385 | If you like, you can have mail aliases expand as abbrevs, as soon as | ||
| 386 | you type them in (@pxref{Abbrevs}). To enable this feature, execute the | ||
| 387 | following: | ||
| 388 | |||
| 389 | @example | ||
| 390 | (add-hook 'mail-mode-hook 'mail-abbrevs-setup) | ||
| 391 | @end example | ||
| 392 | |||
| 393 | @noindent | ||
| 394 | @findex define-mail-abbrev | ||
| 395 | @vindex mail-abbrevs | ||
| 396 | This can go in your @file{.emacs} file. @xref{Hooks}. If you use this | ||
| 397 | feature, you must use @code{define-mail-abbrev} instead of | ||
| 398 | @code{define-mail-alias}; the latter does not work with this package. | ||
| 399 | Note that the mail abbreviation package uses the variable | ||
| 400 | @code{mail-abbrevs} instead of @code{mail-aliases}, and that all alias | ||
| 401 | names are converted to lower case. | ||
| 402 | |||
| 403 | @kindex C-c C-a @r{(Mail mode)} | ||
| 404 | @findex mail-abbrev-insert-alias | 326 | @findex mail-abbrev-insert-alias |
| 405 | The mail abbreviation package also provides the @kbd{C-c C-a} | 327 | Mail aliases expand as abbrevs---that is to say, as soon as you type |
| 406 | (@code{mail-abbrev-insert-alias}) command, which reads an alias | 328 | a word-separator character after an alias (@pxref{Abbrevs}). This |
| 407 | name (with completion) and inserts its definition at point. This is | 329 | expansion takes place only within the @samp{To}, @samp{From}, |
| 408 | useful when editing the message text itself or a header field such as | 330 | @samp{CC}, @samp{BCC}, and @samp{Reply-to} header fields (plus their |
| 409 | @samp{Subject} in which Emacs does not normally expand aliases. | 331 | @samp{Resent-} variants); it does not take place in other header |
| 410 | 332 | fields, such as @samp{Subject}. | |
| 411 | Note that abbrevs expand only if you insert a word-separator character | 333 | |
| 412 | afterward. However, you can rebind @kbd{C-n} and @kbd{M->} to cause | 334 | You can also insert an aliased address directly, using the command |
| 413 | expansion as well. Here's how to do that: | 335 | @kbd{M-x mail-abbrev-insert-alias}. This reads an alias name, with |
| 414 | 336 | completion, and inserts its definition at point. | |
| 415 | @smallexample | 337 | |
| 416 | (add-hook 'mail-mode-hook | 338 | @node Mail Commands |
| 417 | (lambda () | 339 | @section Mail Commands |
| 418 | (define-key | 340 | @cindex Message mode |
| 419 | mail-mode-map [remap next-line] 'mail-abbrev-next-line) | 341 | @cindex mode, Message |
| 420 | (define-key | 342 | |
| 421 | mail-mode-map [remap end-of-buffer] 'mail-abbrev-end-of-buffer))) | 343 | The default major mode for the @samp{*mail*} buffer is called |
| 422 | @end smallexample | 344 | Message mode. It behaves like Text mode in many ways, but provides |
| 423 | 345 | several additional commands on the @kbd{C-c} prefix, which make | |
| 424 | @node Mail Mode | 346 | editing a message more convenient. |
| 425 | @section Mail Mode | 347 | |
| 426 | @cindex Mail mode | 348 | In this section, we will describe some of the most commonly-used |
| 427 | @cindex mode, Mail | 349 | commands available in Message mode. |
| 428 | 350 | @ifnottex | |
| 429 | The major mode used in the mail buffer is Mail mode, which is much | 351 | Message mode also has its own manual, where its features are described |
| 430 | like Text mode except that various special commands are provided on the | 352 | in greater detail. @xref{Top,,Message, message, Message}. |
| 431 | @kbd{C-c} prefix. These commands all have to do specifically with | 353 | @end ifnottex |
| 432 | editing or sending the message. | ||
| 433 | |||
| 434 | Mail mode is normally used in buffers set up automatically by the | ||
| 435 | @code{mail} command and related commands. However, you can also switch | ||
| 436 | to Mail mode in a file-visiting buffer. This is a useful thing to do if | ||
| 437 | you have saved the text of a draft message in a file. | ||
| 438 | 354 | ||
| 439 | @menu | 355 | @menu |
| 440 | * Mail Sending:: Commands to send the message. | 356 | * Mail Sending:: Commands to send the message. |
| 441 | * Header Editing:: Commands to move to header fields and edit them. | 357 | * Header Editing:: Commands to move to header fields and edit them. |
| 442 | * Citing Mail:: Copying all or part of a message you are replying to. | 358 | * Citing Mail:: Quoting a message you are replying to. |
| 443 | * Mail Mode Misc:: Spell checking, signatures, etc. | 359 | * Mail Misc:: Attachments, spell checking, etc. |
| 444 | @end menu | 360 | @end menu |
| 445 | 361 | ||
| 446 | @node Mail Sending | 362 | @node Mail Sending |
| 447 | @subsection Mail Sending | 363 | @subsection Mail Sending |
| 448 | 364 | ||
| 449 | Mail mode has two commands for sending the message you have been | 365 | There are two commands to send a message you have been editing: |
| 450 | editing: | ||
| 451 | 366 | ||
| 452 | @table @kbd | 367 | @table @kbd |
| 453 | @item C-c C-s | ||
| 454 | Send the message, and leave the mail buffer selected (@code{mail-send}). | ||
| 455 | @item C-c C-c | 368 | @item C-c C-c |
| 456 | Send the message, and select some other buffer (@code{mail-send-and-exit}). | 369 | Send the message, and deselect the mail buffer (@code{message-send-and-exit}). |
| 370 | @item C-c C-s | ||
| 371 | Send the message, and leave the mail buffer selected (@code{message-send}). | ||
| 457 | @end table | 372 | @end table |
| 458 | 373 | ||
| 459 | @kindex C-c C-s @r{(Mail mode)} | 374 | @kindex C-c C-s @r{(Message mode)} |
| 460 | @kindex C-c C-c @r{(Mail mode)} | 375 | @kindex C-c C-c @r{(Message mode)} |
| 461 | @findex mail-send | 376 | @findex message-send |
| 462 | @findex mail-send-and-exit | 377 | If you want to send a message and be done with it, type @kbd{C-c |
| 463 | @vindex mail-send-hook | 378 | C-c} (@code{mail-send-and-exit}). This sends the message and then |
| 464 | @kbd{C-c C-s} (@code{mail-send}) sends the message and marks the mail | 379 | either deletes the window or switches to another buffer. It also |
| 465 | buffer unmodified, but leaves that buffer selected so that you can | 380 | ``buries'' the mail buffer, putting it at the lowest priority for |
| 466 | modify the message (perhaps with new recipients) and send it again. | 381 | reselection. This is the usual command for sending a message. |
| 467 | @kbd{C-c C-c} (@code{mail-send-and-exit}) sends and then deletes the | 382 | |
| 468 | window or switches to another buffer. It puts the mail buffer at the | 383 | @findex message-send-and-exit |
| 469 | lowest priority for reselection by default, since you are finished with | 384 | The command @kbd{C-c C-s} (@code{message-send}) sends the message |
| 470 | using it. This is the usual way to send the message. Sending a message | 385 | and marks the mail buffer unmodified, but leaves the buffer selected. |
| 471 | runs the hook @code{mail-send-hook}. | 386 | Use this command if you want to modify the message (perhaps with new |
| 472 | 387 | recipients) and send it again. | |
| 473 | @c Options not mentioned: mail-interactive, mail-use-dsn. | 388 | |
| 389 | @vindex message-send-hook | ||
| 390 | Sending a message runs the hook @code{message-send-hook}. | ||
| 474 | 391 | ||
| 475 | In a file-visiting buffer, sending the message does not clear the | 392 | In a file-visiting buffer, sending the message does not clear the |
| 476 | modified flag, because only saving the file should do that. Also, you | 393 | modified flag, because only saving the file should do that. Also, you |
| 477 | don't get a warning if you try to send the same message twice. | 394 | don't get a warning if you try to send the same message twice. |
| 478 | 395 | ||
| 479 | @c This is indexed in mule.texi, node "Recognize Coding". | 396 | @vindex sendmail-coding-system |
| 480 | @c @vindex sendmail-coding-system | 397 | When you send a message containing non-@acronym{ASCII} characters, |
| 481 | When you send a message that contains non-@acronym{ASCII} characters, they need | 398 | they need to be encoded with a coding system (@pxref{Coding Systems}). |
| 482 | to be encoded with a coding system (@pxref{Coding Systems}). Usually | 399 | Usually the coding system is specified automatically by your chosen |
| 483 | the coding system is specified automatically by your chosen language | 400 | language environment (@pxref{Language Environments}). You can |
| 484 | environment (@pxref{Language Environments}). You can explicitly specify | 401 | explicitly specify the coding system for outgoing mail by setting the |
| 485 | the coding system for outgoing mail by setting the variable | 402 | variable @code{sendmail-coding-system} (@pxref{Recognize Coding}). If |
| 486 | @code{sendmail-coding-system} (@pxref{Recognize Coding}). | 403 | the coding system thus determined does not handle the characters in a |
| 487 | 404 | particular message, Emacs asks you to select the coding system to use, | |
| 488 | If the coding system thus determined does not handle the characters in | ||
| 489 | a particular message, Emacs asks you to select the coding system to use, | ||
| 490 | showing a list of possible coding systems. | 405 | showing a list of possible coding systems. |
| 491 | 406 | ||
| 492 | @c Not mentioned: mail-send-nonascii. | ||
| 493 | |||
| 494 | @cindex SMTP | 407 | @cindex SMTP |
| 495 | @cindex Feedmail | 408 | @cindex Feedmail |
| 496 | @cindex Sendmail | 409 | @cindex Sendmail |
| 497 | @cindex Mailclient | 410 | @cindex Mailclient |
| 498 | @vindex send-mail-function | 411 | @vindex send-mail-function |
| 499 | The variable @code{send-mail-function} controls how the default mail | 412 | The variable @code{send-mail-function} controls how the default mail |
| 500 | user agent sends mail. It should be set to a function. In most cases, | 413 | user agent sends mail. Its value should be a function, which can be |
| 501 | the default is @code{sendmail-send-it}, which delivers mail using the | 414 | one of the following: |
| 502 | Sendmail installation on the local host. On Mac OS X and MS-Windows, | 415 | |
| 503 | however, the default is normally @code{mailclient-send-it}, which | 416 | @table @code |
| 504 | passes the mail buffer on to the system's designated mail client (see | 417 | @item sendmail-send-it |
| 505 | @file{mailclient.el}). To send mail through an SMTP server, set | 418 | Send mail using the system's default @command{sendmail} (or |
| 506 | @code{send-mail-function} to @code{smtpmail-send-it} and set up the | 419 | @command{sendmail}-compatible) program. This is the default on Unix |
| 507 | Emacs SMTP library (@pxref{Top,,Emacs SMTP Library, smtpmail, Sending | 420 | and GNU, and works provided the system is a valid @dfn{mail host} |
| 508 | mail via SMTP}). Another option is @code{feedmail-send-it} (see the | 421 | (that is, provided it can deliver mail via SMTP). |
| 509 | commentary section of the @file{feedmail.el} package). | 422 | |
| 423 | @item mailclient-send-it | ||
| 424 | Pass the mail buffer on to the system's designated mail client (see | ||
| 425 | @file{mailclient.el}). This is the default on Mac OS X and | ||
| 426 | MS-Windows. | ||
| 427 | |||
| 428 | @item smtpmail-send-it | ||
| 429 | Send mail through an external mail host (e.g., your Internet service | ||
| 430 | provider's SMTP server). You will need to tell Emacs how to contact | ||
| 431 | the SMTP server, by customizing the variables | ||
| 432 | @code{smtpmail-smtp-server} and @code{smtpmail-auth-credentials}. | ||
| 433 | @xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}. | ||
| 434 | |||
| 435 | @item feedmail-send-it | ||
| 436 | This is similar to @code{sendmail-send-it}, but allows you to queue | ||
| 437 | messages for later sending. See the commentary section in the file | ||
| 438 | @file{feedmail.el} for more information. | ||
| 439 | @end table | ||
| 510 | 440 | ||
| 511 | @node Header Editing | 441 | @node Header Editing |
| 512 | @subsection Mail Header Editing | 442 | @subsection Mail Header Editing |
| 513 | 443 | ||
| 514 | Mail mode provides special commands to move to particular header | 444 | Message mode provides the following special commands to move to |
| 515 | fields and to complete addresses in headers. | 445 | particular header fields and to complete addresses in headers. |
| 516 | 446 | ||
| 517 | @table @kbd | 447 | @table @kbd |
| 518 | @item C-c C-f C-t | 448 | @item C-c C-f C-t |
| 519 | Move to the @samp{To} header field, creating one if there is none | 449 | Move to the @samp{To} header (@code{message-goto-to}). |
| 520 | (@code{mail-to}). | ||
| 521 | @item C-c C-f C-s | 450 | @item C-c C-f C-s |
| 522 | Move to the @samp{Subject} header field, creating one if there is | 451 | Move to the @samp{Subject} header (@code{message-goto-subject}). |
| 523 | none (@code{mail-subject}). | ||
| 524 | @item C-c C-f C-c | 452 | @item C-c C-f C-c |
| 525 | Move to the @samp{CC} header field, creating one if there is none | 453 | Move to the @samp{CC} header (@code{message-goto-cc}). |
| 526 | (@code{mail-cc}). | ||
| 527 | @item C-c C-f C-b | 454 | @item C-c C-f C-b |
| 528 | Move to the @samp{BCC} header field, creating one if there is none | 455 | Move to the @samp{BCC} header (@code{message-goto-bcc}). |
| 529 | (@code{mail-bcc}). | ||
| 530 | @item C-c C-f C-r | 456 | @item C-c C-f C-r |
| 531 | Move to the @samp{Reply-To} header field, creating one if there is none | 457 | Move to the @samp{Reply-To} header (@code{message-goto-reply-to}). |
| 532 | (@code{mail-reply-to}). | ||
| 533 | @item C-c C-f C-a | ||
| 534 | Move to the @samp{Mail-Reply-To} header field, creating one if there is none | ||
| 535 | (@code{mail-mail-reply-to}). | ||
| 536 | @item C-c C-f C-l | ||
| 537 | Move to the @samp{Mail-Followup-To} header field, creating one if there is none | ||
| 538 | (@code{mail-mail-followup-to}). | ||
| 539 | @item C-c C-f C-f | 458 | @item C-c C-f C-f |
| 459 | Move to the @samp{Mail-Followup-To} header field | ||
| 460 | (@code{message-goto-followup-to}). | ||
| 461 | @item C-c C-f C-w | ||
| 540 | Add a new @samp{FCC} header field, with file-name completion | 462 | Add a new @samp{FCC} header field, with file-name completion |
| 541 | (@code{mail-fcc}). | 463 | (@code{message-goto-fcc}). |
| 542 | @c There is also C-c C-v, mail-sent-via, which adds one or more | 464 | @item C-c C-b |
| 543 | @c "Sent-via" headers, but I don't know what the point of that header is. | 465 | Move to the start of the message body (@code{message-goto-body}). |
| 544 | @item M-@key{TAB} | 466 | @item @key{TAB} |
| 545 | Complete a mailing address (@code{mail-complete}). | 467 | Complete a mailing address (@code{message-tab}). |
| 546 | @end table | 468 | @end table |
| 547 | 469 | ||
| 548 | @kindex C-c C-f C-t @r{(Mail mode)} | 470 | @kindex C-c C-f C-t @r{(Message mode)} |
| 549 | @findex mail-to | 471 | @findex message-goto-to |
| 550 | @kindex C-c C-f C-s @r{(Mail mode)} | 472 | @kindex C-c C-f C-s @r{(Message mode)} |
| 551 | @findex mail-subject | 473 | @findex message-goto-subject |
| 552 | @kindex C-c C-f C-c @r{(Mail mode)} | 474 | @kindex C-c C-f C-c @r{(Message mode)} |
| 553 | @findex mail-cc | 475 | @findex message-goto-cc |
| 554 | @kindex C-c C-f C-b @r{(Mail mode)} | 476 | @kindex C-c C-f C-b @r{(Message mode)} |
| 555 | @findex mail-bcc | 477 | @findex message-goto-bcc |
| 556 | @kindex C-c C-f C-r @r{(Mail mode)} | 478 | @kindex C-c C-f C-r @r{(Message mode)} |
| 557 | @findex mail-reply-to | 479 | @findex goto-reply-to |
| 558 | @kindex C-c C-f C-a @r{(Mail mode)} | 480 | @kindex C-c C-f C-f @r{(Message mode)} |
| 559 | @findex mail-mail-reply-to | 481 | @findex goto-followup-to |
| 560 | @kindex C-c C-f C-l @r{(Mail mode)} | 482 | @kindex C-c C-f C-w @r{(Message mode)} |
| 561 | @findex mail-mail-followup-to | 483 | @findex message-goto-fcc |
| 562 | @kindex C-c C-f C-f @r{(Mail mode)} | 484 | The commands to move point to particular header fields are all based |
| 563 | @findex mail-fcc | 485 | on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). If the |
| 564 | There are several commands to move point to particular header fields, | 486 | field in question does not exist, the command creates one (the |
| 565 | all based on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). | 487 | exception is @code{mail-fcc}, which creates a new field each time). |
| 566 | They are listed in the table above. If the field in question does not | 488 | |
| 567 | exist, these commands create one (the exception is @code{mail-fcc}, | 489 | @kindex C-c C-b @r{(Message mode)} |
| 568 | which creates a new field each time). We provide special motion | 490 | @findex mail-text |
| 569 | commands for these particular fields because they are the fields users | 491 | The command @kbd{C-c C-b} (@code{message-goto-body}) moves point to |
| 570 | most often want to edit. | 492 | just after the header separator line---that is, to the beginning of |
| 571 | 493 | the body. | |
| 572 | @findex mail-complete | 494 | |
| 573 | @kindex M-TAB @r{(Mail mode)} | 495 | @findex message-tab |
| 574 | @c `mail-complete-alist' specifies the headers. | 496 | @kindex TAB @r{(Message mode)} |
| 575 | While editing a header field that contains mailing addresses, such | 497 | While editing a header field that contains addresses, such as |
| 576 | as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing | 498 | @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete an address by |
| 577 | address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It | 499 | typing @key{TAB} (@code{message-tab}). This attempts to insert the |
| 578 | inserts the full name corresponding to the address, if it can | 500 | full name corresponding to the address based on a couple of methods, |
| 579 | determine the full name. The variable @code{mail-complete-style} | 501 | including EUDC, a library that recognizes a number of directory server |
| 580 | controls whether to insert the full name, and what style to use, as in | 502 | protocols (@pxref{Top,,EUDC,eudc, The Emacs Unified Directory |
| 581 | @code{mail-from-style} (@pxref{Mail Headers}). (If your window | 503 | Client}). Failing that, it attempts to expand the address as a mail |
| 582 | manager defines @kbd{M-@key{TAB}} to switch windows, you can type | 504 | alias (@pxref{Mail Aliases}). If point is on a header field that does |
| 583 | @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.) | 505 | not take addresses, or if it is in the message body, then @key{TAB} |
| 584 | 506 | just inserts a tab character. | |
| 585 | For completion purposes, the valid mailing addresses are taken to be | ||
| 586 | the local users' names plus your personal mail aliases (@pxref{Mail | ||
| 587 | Aliases}). You can specify additional sources of valid addresses; | ||
| 588 | browse the customization group @samp{mailalias} to see the variables for | ||
| 589 | customizing this feature (@pxref{Customization Groups}). | ||
| 590 | |||
| 591 | If you type @kbd{M-@key{TAB}} in the body of the message, or on a | ||
| 592 | unrecognized header, @code{mail-complete} invokes the function specified | ||
| 593 | by @code{mail-complete-function}. By default, this is | ||
| 594 | @code{ispell-complete-word}, as in Text mode. | ||
| 595 | 507 | ||
| 596 | @node Citing Mail | 508 | @node Citing Mail |
| 597 | @subsection Citing Mail | 509 | @subsection Citing Mail |
| 598 | @cindex citing mail | 510 | @cindex citing mail |
| 599 | 511 | ||
| 600 | Mail mode also has commands for yanking or @dfn{citing} all or part of | ||
| 601 | a message that you are replying to. These commands are active only when | ||
| 602 | you started sending a message using an Rmail command. | ||
| 603 | |||
| 604 | @table @kbd | 512 | @table @kbd |
| 605 | @item C-c C-y | 513 | @item C-c C-y |
| 606 | Yank the selected message from Rmail (@code{mail-yank-original}). | 514 | Yank the selected message from Rmail (@code{message-yank-original}). |
| 607 | @item C-c C-r | ||
| 608 | Yank the region from the Rmail buffer (@code{mail-yank-region}). | ||
| 609 | @item C-c C-q | 515 | @item C-c C-q |
| 610 | Fill each paragraph cited from another message | 516 | Fill each paragraph cited from another message |
| 611 | (@code{mail-fill-yanked-message}). | 517 | (@code{message-fill-yanked-message}). |
| 612 | @c There is also mail-split-line, but it does not seem very useful. | ||
| 613 | @end table | 518 | @end table |
| 614 | 519 | ||
| 615 | @kindex C-c C-y @r{(Mail mode)} | 520 | @kindex C-c C-y @r{(Message mode)} |
| 616 | @findex mail-yank-original | 521 | @findex message-yank-original |
| 617 | When mail sending is invoked from the Rmail mail reader using an Rmail | 522 | @findex message-yank-prefix |
| 618 | command, @kbd{C-c C-y} can be used inside the mail buffer to insert the | 523 | You can use the command @kbd{C-c C-y} (@code{message-yank-original}) |
| 619 | text of the message you are replying to. Normally it indents each line | 524 | to @dfn{cite} a message that you are replying to. This inserts the |
| 620 | of that message three spaces and eliminates most header fields (as | 525 | text of that message into the mail buffer. This command is active |
| 621 | specified by the variable @code{mail-yank-ignored-headers}). A numeric | 526 | only when the mail buffer is invoked from a mail program running in |
| 622 | argument specifies the number of spaces to indent (the variable | 527 | Emacs, such as Rmail. |
| 623 | @code{mail-indentation-spaces} specifies the default number). An | 528 | |
| 624 | argument of just @kbd{C-u} says not to indent at all and not to | 529 | By default, Emacs inserts the string @samp{>} in front of each line |
| 625 | eliminate anything. @kbd{C-c C-y} always uses the current message from | 530 | of the cited text; this prefix string is specified by the variable |
| 626 | the Rmail buffer, so you can insert several old messages by selecting | 531 | @code{message-yank-prefix}. If you call @code{message-yank-original} |
| 627 | one in Rmail, switching to @samp{*mail*} and yanking it, then switching | 532 | with a prefix argument, the citation prefix is not inserted. |
| 628 | back to Rmail to select another. | 533 | |
| 629 | 534 | @kindex C-c C-q @r{(Message mode)} | |
| 630 | @vindex mail-yank-prefix | ||
| 631 | You can specify the text for @kbd{C-c C-y} to insert at the beginning | ||
| 632 | of each line: set @code{mail-yank-prefix} to the desired string. (A | ||
| 633 | value of @code{nil} means to use indentation; this is the default.) | ||
| 634 | However, @kbd{C-u C-c C-y} never adds anything at the beginning of the | ||
| 635 | inserted lines, regardless of the value of @code{mail-yank-prefix}. | ||
| 636 | |||
| 637 | @kindex C-c C-r @r{(Mail mode)} | ||
| 638 | @findex mail-yank-region | ||
| 639 | To yank just a part of an incoming message, set the region in Rmail to | ||
| 640 | the part you want; then go to the @samp{*Mail*} message and type | ||
| 641 | @kbd{C-c C-r} (@code{mail-yank-region}). Each line that is copied is | ||
| 642 | indented or prefixed according to @code{mail-yank-prefix}. | ||
| 643 | |||
| 644 | @kindex C-c C-q @r{(Mail mode)} | ||
| 645 | @findex mail-fill-yanked-message | 535 | @findex mail-fill-yanked-message |
| 646 | After using @kbd{C-c C-y} or @kbd{C-c C-r}, you can type @kbd{C-c C-q} | 536 | After using @kbd{C-c C-y}, you can type @kbd{C-c C-q} |
| 647 | (@code{mail-fill-yanked-message}) to fill the paragraphs of the yanked | 537 | (@code{message-fill-yanked-message}) to fill the paragraphs of the |
| 648 | old message or messages. One use of @kbd{C-c C-q} fills all such | 538 | cited message. One use of @kbd{C-c C-q} fills all such paragraphs, |
| 649 | paragraphs, each one individually. To fill a single paragraph of the | 539 | each one individually. To fill a single paragraph of the quoted |
| 650 | quoted message, use @kbd{M-q}. If filling does not automatically | 540 | message, use @kbd{M-q}. If filling does not automatically handle the |
| 651 | handle the type of citation prefix you use, try setting the fill prefix | 541 | type of citation prefix you use, try setting the fill prefix |
| 652 | explicitly. @xref{Filling}. | 542 | explicitly. @xref{Filling}. |
| 653 | 543 | ||
| 654 | @vindex mail-citation-hook | 544 | @vindex mail-citation-hook |
| @@ -657,91 +547,103 @@ explicitly. @xref{Filling}. | |||
| 657 | package, which provides more flexible citation | 547 | package, which provides more flexible citation |
| 658 | (@pxref{Introduction,,,sc, Supercite}). | 548 | (@pxref{Introduction,,,sc, Supercite}). |
| 659 | 549 | ||
| 660 | @c No need to mention: mail-citation-prefix-regexp. | 550 | @node Mail Misc |
| 661 | 551 | @subsection Mail Miscellany | |
| 662 | @node Mail Mode Misc | ||
| 663 | @subsection Mail Mode Miscellany | ||
| 664 | 552 | ||
| 665 | @table @kbd | 553 | @kindex C-c C-a @r{(Message mode)} |
| 666 | @item C-c C-t | 554 | @findex mail-attach-file |
| 667 | Move to the beginning of the message body text (@code{mail-text}). | 555 | @cindex MIME |
| 668 | @item C-c C-w | 556 | @cindex Multipurpose Internet Mail Extensions |
| 669 | Insert a signature at the end of the message text (@code{mail-signature}). | 557 | You can @dfn{attach} a file to an outgoing message by typing |
| 670 | @item C-c C-i @var{file} @key{RET} | 558 | @kbd{C-c C-a} (@code{mml-attach-file}) in the mail buffer. Attaching |
| 671 | Insert the contents of @var{file} at the end of the message text | 559 | is done using the MIME (Multipurpose Internet Mail Extensions) |
| 672 | (@code{mail-attach-file}). | 560 | standard. |
| 673 | @item M-x ispell-message | 561 | |
| 674 | Perform spelling correction on the message text, but not on citations from | 562 | The @code{mml-attach-file} command prompts for the name of the file, |
| 675 | other messages, or the message headers. | 563 | and for the attachment's @dfn{content type}, @dfn{description}, and |
| 676 | @end table | 564 | @dfn{disposition}. The content type is normally detected |
| 565 | automatically; just type @key{RET} to accept the default. The | ||
| 566 | description is a single line of text that the recipient will see next | ||
| 567 | to the attachment; you may also choose to leave this empty. The | ||
| 568 | disposition is either @samp{inline} (the default), which means the | ||
| 569 | recipient will see a link to the attachment within the message body, | ||
| 570 | or @samp{attachment}, which means the link will be separate from the | ||
| 571 | body. | ||
| 572 | |||
| 573 | The actual contents of the attached file are not inserted into the | ||
| 574 | mail buffer. Instead, some placeholder text is inserted into the mail | ||
| 575 | buffer, like this: | ||
| 677 | 576 | ||
| 678 | @kindex C-c C-t @r{(Mail mode)} | 577 | @smallexample |
| 679 | @findex mail-text | 578 | <#part type="text/plain" filename="~/foo.txt" disposition=inline> |
| 680 | @kbd{C-c C-t} (@code{mail-text}) moves point to just after the header | 579 | <#/part> |
| 681 | separator line---that is, to the beginning of the message body text. | 580 | @end smallexample |
| 682 | 581 | ||
| 683 | @kindex C-c C-w @r{(Mail mode)} | 582 | @noindent |
| 684 | @findex mail-signature | 583 | When you type @kbd{C-c C-c} or @kbd{C-c C-s} to send the message, the |
| 685 | @vindex mail-signature | 584 | attached file will be delivered with it. |
| 686 | @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text | ||
| 687 | (your @dfn{mail signature}) at the end of the message to say more about who | ||
| 688 | you are. For example, it may contain telephone numbers, or your | ||
| 689 | physical location. The text comes from the variable | ||
| 690 | @code{mail-signature}. It can be a fixed string, or a Lisp expression | ||
| 691 | that returns a string. If it is @code{t} or @code{nil}, the function | ||
| 692 | inserts the contents of the file @code{mail-signature-file}. By | ||
| 693 | default, this is the file @file{~/.signature} in your home directory. | ||
| 694 | |||
| 695 | If the variable @code{mail-signature} has a non-@code{nil} value, | ||
| 696 | starting a mail automatically inserts your signature. Otherwise, you | ||
| 697 | must explicitly use the command @code{mail-signature}. If you want to | ||
| 698 | omit your signature from a particular message, just delete it from the | ||
| 699 | buffer before you send the message. | ||
| 700 | |||
| 701 | Convention says that the start of your signature should be marked by a | ||
| 702 | line whose contents are @samp{-- }. If your signature comes from a | ||
| 703 | file, this prefix is added for you, but in all other cases you must add | ||
| 704 | it yourself. The remainder of your signature should be no more than | ||
| 705 | four lines. | ||
| 706 | 585 | ||
| 707 | @findex ispell-message | 586 | @findex ispell-message |
| 708 | You can do spelling correction on the message text you have written | 587 | While composing a message, you can do spelling correction on the |
| 709 | with the command @kbd{M-x ispell-message}. If you have yanked an | 588 | message text by typing @kbd{M-x ispell-message}. If you have yanked |
| 710 | incoming message into the outgoing draft, this command skips what was | 589 | an incoming message into the outgoing draft, this command skips what |
| 711 | yanked, but it checks the text that you yourself inserted. (It looks | 590 | was yanked, but it checks the text that you yourself inserted (it |
| 712 | for indentation or @code{mail-yank-prefix} to distinguish the cited | 591 | looks for indentation or @code{mail-yank-prefix} to distinguish the |
| 713 | lines from your input.) @xref{Spelling}. | 592 | cited lines from your input). @xref{Spelling}. |
| 714 | |||
| 715 | @kindex C-c C-i @r{(Mail mode)} | ||
| 716 | @findex mail-attach-file | ||
| 717 | To include a file in the outgoing message, you can use @kbd{C-x i}, | ||
| 718 | the usual command to insert a file in the current buffer. But it is | ||
| 719 | often more convenient to use a special command, @kbd{C-c C-i} | ||
| 720 | (@code{mail-attach-file}). This command inserts the file contents at | ||
| 721 | the end of the buffer, after your signature (if any), with a delimiter | ||
| 722 | line that includes the file name. Note that this is not a MIME | ||
| 723 | attachment. | ||
| 724 | 593 | ||
| 725 | @vindex mail-mode-hook | 594 | @vindex mail-mode-hook |
| 726 | @vindex mail-setup-hook | 595 | @vindex mail-setup-hook |
| 727 | Turning on Mail mode (which @kbd{C-x m} does automatically) runs the | 596 | Turning on Message mode (which @kbd{C-x m} does automatically) runs |
| 728 | normal hooks @code{text-mode-hook} and @code{mail-mode-hook}. | 597 | the normal hooks @code{text-mode-hook} and @code{message-mode-hook}. |
| 729 | Initializing a new outgoing message runs the normal hook | 598 | Initializing a new outgoing message runs the normal hook |
| 730 | @code{mail-setup-hook}; if you want to add special fields to your mail | 599 | @code{message-setup-hook}; you can use this hook if you want to make |
| 731 | header or make other changes to the appearance of the mail buffer, use | 600 | changes to the appearance of the mail buffer. @xref{Hooks}. |
| 732 | that hook. @xref{Hooks}. | ||
| 733 | 601 | ||
| 734 | The main difference between these hooks is just when they are | 602 | The main difference between these hooks is just when they are |
| 735 | invoked. Whenever you type @kbd{M-x mail}, @code{mail-mode-hook} runs | 603 | invoked. Whenever you type @kbd{C-x m}, @code{message-mode-hook} runs |
| 736 | as soon as the @samp{*mail*} buffer is created. Then the | 604 | as soon as the mail buffer is created. Then the @code{message-setup} |
| 737 | @code{mail-setup} function inserts the default contents of the buffer. | 605 | function inserts the default contents of the buffer. After these |
| 738 | After these default contents are inserted, @code{mail-setup-hook} runs. | 606 | default contents are inserted, @code{message-setup-hook} runs. |
| 739 | 607 | ||
| 740 | If you use @kbd{M-x mail} to continue an existing composition, | 608 | If you use @kbd{C-x m} to continue an existing composition, |
| 741 | @code{mail-mode-hook} runs immediately after switching to the | 609 | @code{message-mode-hook} runs immediately after switching to the mail |
| 742 | @samp{*mail*} buffer. If the buffer is unmodified, or if you decide to | 610 | buffer. If the buffer is unmodified, or if you decide to erase it and |
| 743 | erase it and start again, @code{mail-setup-hook} runs after the default | 611 | start again, @code{message-setup-hook} runs after the default contents |
| 744 | contents are inserted. | 612 | are inserted. |
| 613 | |||
| 614 | @node Mail Signature | ||
| 615 | @section Mail Signature | ||
| 616 | |||
| 617 | @cindex mail signature | ||
| 618 | @vindex mail-signature-file | ||
| 619 | @vindex mail-signature | ||
| 620 | You can add a standard piece of text---your @dfn{mail | ||
| 621 | signature}---to the end of every message. This signature may contain | ||
| 622 | information such as your telephone number or your physical location. | ||
| 623 | The variable @code{mail-signature} determines how Emacs handles the | ||
| 624 | mail signature. | ||
| 625 | |||
| 626 | The default value of @code{mail-signature} is @code{t}; this means | ||
| 627 | to look for your mail signature in the file @file{~/.signature}. If | ||
| 628 | this file exists, its contents are automatically inserted into the end | ||
| 629 | of the mail buffer. You can change the signature file via the | ||
| 630 | variable @code{mail-signature-file}. | ||
| 631 | |||
| 632 | If you change @code{mail-signature} to a string, that specifies the | ||
| 633 | text of the signature directly. | ||
| 634 | |||
| 635 | @kindex C-c C-w @r{(Message mode)} | ||
| 636 | @findex message-insert-signature | ||
| 637 | If you change @code{mail-signature} to @code{nil}, Emacs will not | ||
| 638 | insert your mail signature automatically. You can insert your mail | ||
| 639 | signature by typing @kbd{C-c C-w} (@code{message-insert-signature}) in | ||
| 640 | the mail buffer. Emacs will look for your signature in the signature | ||
| 641 | file. | ||
| 642 | |||
| 643 | By convention, a mail signature should be marked by a line whose | ||
| 644 | contents are @samp{-- }. If your signature lacks this prefix, it is | ||
| 645 | added for you. The remainder of your signature should be no more than | ||
| 646 | four lines. | ||
| 745 | 647 | ||
| 746 | @node Mail Amusements | 648 | @node Mail Amusements |
| 747 | @section Mail Amusements | 649 | @section Mail Amusements |
| @@ -778,28 +680,32 @@ using this. | |||
| 778 | @node Mail Methods | 680 | @node Mail Methods |
| 779 | @section Mail-Composition Methods | 681 | @section Mail-Composition Methods |
| 780 | @cindex mail-composition methods | 682 | @cindex mail-composition methods |
| 683 | @cindex Mail mode | ||
| 684 | @cindex mode, Mail | ||
| 781 | 685 | ||
| 782 | @cindex MH mail interface | 686 | @cindex MH mail interface |
| 783 | @cindex Message mode for sending mail | 687 | @cindex Message mode for sending mail |
| 784 | In this chapter we have described the usual Emacs mode for editing | 688 | In this chapter we have described the usual Emacs mode for editing |
| 785 | and sending mail---Mail mode. Emacs has alternative facilities for | 689 | and sending mail---Message mode. This is only one of several |
| 786 | editing and sending mail, including | 690 | available modes. Prior to Emacs 23.2, the default mode was Mail mode, |
| 787 | MH-E and Message mode, not documented in this manual. | 691 | which is similar to Message mode in many respects but lacks features |
| 788 | @xref{Top,,MH-E,mh-e, The Emacs Interface to MH}. @xref{Top,,Message,message, | 692 | such as MIME support. Another available mode is MH-E |
| 789 | Message Manual}. You can choose any of them as your preferred method. | 693 | (@pxref{Top,,MH-E,mh-e, The Emacs Interface to MH}). |
| 790 | The commands @code{C-x m}, @code{C-x 4 m} and @code{C-x 5 m} use | ||
| 791 | whichever agent you have specified, as do various other Emacs commands | ||
| 792 | and facilities that send mail. | ||
| 793 | 694 | ||
| 794 | @vindex mail-user-agent | 695 | @vindex mail-user-agent |
| 795 | To specify your mail-composition method, customize the variable | 696 | You can choose any of these @dfn{mail user agents} as your preferred |
| 796 | @code{mail-user-agent}. Currently legitimate values include | 697 | method for editing and sending mail. The commands @code{C-x m}, |
| 797 | @code{sendmail-user-agent} (Mail mode), @code{mh-e-user-agent}, | 698 | @code{C-x 4 m} and @code{C-x 5 m} use whichever agent you have |
| 798 | @code{message-user-agent} and @code{gnus-user-agent}. | 699 | specified; so do various other parts of Emacs that send mail, such as |
| 700 | the bug reporter (@pxref{Bugs}). To specify a mail user agent, | ||
| 701 | customize the variable @code{mail-user-agent}. Currently, legitimate | ||
| 702 | values include @code{message-user-agent} (Message mode) | ||
| 703 | @code{sendmail-user-agent} (Mail mode), @code{gnus-user-agent}, and | ||
| 704 | @code{mh-e-user-agent}. | ||
| 799 | 705 | ||
| 800 | If you select a different mail-composition method, the information | 706 | If you select a different mail-composition method, the information |
| 801 | in this chapter about the @samp{*mail*} buffer and Mail mode does not | 707 | in this chapter about the mail buffer and Message mode does not apply; |
| 802 | apply; the other methods use a different format of text in a different | 708 | the other methods use a different format of text in a different |
| 803 | buffer, and their commands are different as well. | 709 | buffer, and their commands are different as well. |
| 804 | 710 | ||
| 805 | @vindex read-mail-command | 711 | @vindex read-mail-command |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 7b4baec1131..c00410e047a 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -26,11 +26,16 @@ structure. | |||
| 26 | @xref{Outline Mode}. | 26 | @xref{Outline Mode}. |
| 27 | @end iftex | 27 | @end iftex |
| 28 | 28 | ||
| 29 | @cindex nXML mode | ||
| 30 | @cindex mode, XML | ||
| 31 | @cindex mode, nXML | ||
| 32 | @findex nxml-mode | ||
| 29 | Emacs has other major modes for text which contains ``embedded'' | 33 | Emacs has other major modes for text which contains ``embedded'' |
| 30 | commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML, SGML, | 34 | commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and |
| 31 | and XML (@pxref{HTML Mode}); and Groff and Nroff (@pxref{Nroff Mode}). | 35 | SGML (@pxref{HTML Mode}); XML (@pxref{Top, nXML Mode,,nxml-mode, nXML |
| 32 | In addition, you can edit formatted text in WYSIWYG style (``what you | 36 | Mode}); and Groff and Nroff (@pxref{Nroff Mode}). In addition, you |
| 33 | see is what you get''), using Enriched mode (@pxref{Formatted Text}). | 37 | can edit formatted text in WYSIWYG style (``what you see is what you |
| 38 | get''), using Enriched mode (@pxref{Formatted Text}). | ||
| 34 | 39 | ||
| 35 | @cindex ASCII art | 40 | @cindex ASCII art |
| 36 | If you need to edit pictures made out of text characters (commonly | 41 | If you need to edit pictures made out of text characters (commonly |
| @@ -61,7 +66,7 @@ for editing such pictures. | |||
| 61 | * Text Mode:: The major modes for editing text files. | 66 | * Text Mode:: The major modes for editing text files. |
| 62 | * Outline Mode:: Editing outlines. | 67 | * Outline Mode:: Editing outlines. |
| 63 | * TeX Mode:: Editing input to the formatter TeX. | 68 | * TeX Mode:: Editing input to the formatter TeX. |
| 64 | * HTML Mode:: Editing HTML, SGML, and XML files. | 69 | * HTML Mode:: Editing HTML and SGML files. |
| 65 | * Nroff Mode:: Editing input to the formatter nroff. | 70 | * Nroff Mode:: Editing input to the formatter nroff. |
| 66 | * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. | 71 | * Formatted Text:: Editing formatted text directly in WYSIWYG fashion. |
| 67 | * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. | 72 | * Text Based Tables:: Editing text-based tables in WYSIWYG fashion. |
| @@ -923,10 +928,10 @@ type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}. | |||
| 923 | @vindex text-mode-hook | 928 | @vindex text-mode-hook |
| 924 | Entering Text mode runs the hook @code{text-mode-hook}. Other major | 929 | Entering Text mode runs the hook @code{text-mode-hook}. Other major |
| 925 | modes related to Text mode also run this hook, followed by hooks of | 930 | modes related to Text mode also run this hook, followed by hooks of |
| 926 | their own; this includes Paragraph-Indent Text mode, Nroff mode, @TeX{} | 931 | their own; this includes Paragraph-Indent Text mode, Nroff mode, |
| 927 | mode, Outline mode, and Mail mode. Hook functions on | 932 | @TeX{} mode, Outline mode, and Message mode. Hook functions on |
| 928 | @code{text-mode-hook} can look at the value of @code{major-mode} to see | 933 | @code{text-mode-hook} can look at the value of @code{major-mode} to |
| 929 | which of these modes is actually being entered. @xref{Hooks}. | 934 | see which of these modes is actually being entered. @xref{Hooks}. |
| 930 | 935 | ||
| 931 | @node Outline Mode | 936 | @node Outline Mode |
| 932 | @section Outline Mode | 937 | @section Outline Mode |
| @@ -1743,29 +1748,17 @@ required. This is set up for Czech---customize the group | |||
| 1743 | Ref@TeX{}. @inforef{Top,, reftex}. | 1748 | Ref@TeX{}. @inforef{Top,, reftex}. |
| 1744 | 1749 | ||
| 1745 | @node HTML Mode | 1750 | @node HTML Mode |
| 1746 | @section SGML, XML, and HTML Modes | 1751 | @section SGML and HTML Modes |
| 1747 | @cindex SGML mode | 1752 | @cindex SGML mode |
| 1748 | @cindex HTML mode | 1753 | @cindex HTML mode |
| 1749 | @cindex XML mode | ||
| 1750 | @cindex mode, SGML | 1754 | @cindex mode, SGML |
| 1751 | @cindex mode, HTML | 1755 | @cindex mode, HTML |
| 1752 | @cindex mode, XML | ||
| 1753 | @findex sgml-mode | 1756 | @findex sgml-mode |
| 1754 | @findex html-mode | 1757 | @findex html-mode |
| 1755 | @findex xml-mode | ||
| 1756 | 1758 | ||
| 1757 | The major modes for SGML, XML, and HTML provide indentation support | 1759 | The major modes for SGML and HTML provide indentation support and |
| 1758 | and commands for operating on tags. XML mode is actually identical to | 1760 | commands for operating on tags. HTML mode is a slightly customized |
| 1759 | SGML mode (to be precise, @code{xml-mode} is an alias for | 1761 | variant of SGML mode. |
| 1760 | @code{sgml-mode}), because XML is a strict subset of SGML. HTML mode | ||
| 1761 | is a slightly customized variant of SGML mode. | ||
| 1762 | |||
| 1763 | @vindex sgml-xml-mode | ||
| 1764 | In XML, every opening tag must have an explicit closing tag. When | ||
| 1765 | the variable @code{sgml-xml-mode} is non-@code{nil}, the tag insertion | ||
| 1766 | commands described below always insert explicit closing tags as well. | ||
| 1767 | When you visit a file, Emacs determines whether it is XML by examining | ||
| 1768 | the file contents, and sets @code{sgml-xml-mode} accordingly. | ||
| 1769 | 1762 | ||
| 1770 | @table @kbd | 1763 | @table @kbd |
| 1771 | @item C-c C-n | 1764 | @item C-c C-n |
| @@ -1855,13 +1848,22 @@ used as a cheap preview. | |||
| 1855 | @cindex mode, nXML | 1848 | @cindex mode, nXML |
| 1856 | @findex nxml-mode | 1849 | @findex nxml-mode |
| 1857 | @cindex XML schema | 1850 | @cindex XML schema |
| 1858 | Emacs also provides a more advanced mode for editing XML | 1851 | The default mode for editing XML documents is called nXML mode |
| 1859 | documents, called nXML mode (@code{nxml-mode}). nXML mode is aware of | 1852 | (@code{xml-mode} or @code{nxml-mode}). This is a powerful major mode |
| 1860 | many existing XML schema, and uses them to provide completion of XML | 1853 | that can recognize many existing XML schema and use them to provide |
| 1861 | elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, as well as | 1854 | completion of XML elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, |
| 1862 | ``on-the-fly'' validation of XML, with errors highlighted via Font | 1855 | as well as ``on-the-fly'' XML validation with error highlighting. It |
| 1863 | Lock (@pxref{Font Lock}). It is described in its own manual. | 1856 | is described in its own manual. @xref{Top, nXML Mode,,nxml-mode, nXML |
| 1864 | @xref{Top, nXML Mode,,nxml-mode, nXML Mode}. | 1857 | Mode}. |
| 1858 | |||
| 1859 | @vindex sgml-xml-mode | ||
| 1860 | However, you can also use SGML mode to edit XML, since XML is a | ||
| 1861 | strict subset of SGML. In XML, every opening tag must have an | ||
| 1862 | explicit closing tag. When the variable @code{sgml-xml-mode} is | ||
| 1863 | non-@code{nil}, the tag insertion commands described above always | ||
| 1864 | insert explicit closing tags as well. When you visit a file in SGML | ||
| 1865 | mode, Emacs determines whether it is XML by examining the file | ||
| 1866 | contents, and sets @code{sgml-xml-mode} accordingly. | ||
| 1865 | 1867 | ||
| 1866 | @node Nroff Mode | 1868 | @node Nroff Mode |
| 1867 | @section Nroff Mode | 1869 | @section Nroff Mode |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 61e1b2fda5c..21f400948dc 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-03-26 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * loading.texi (Hooks for Loading): Document after-load-functions. | ||
| 4 | Copyedits. | ||
| 5 | |||
| 1 | 2010-03-24 Arni Magnusson <arnima@hafro.is> (tiny change) | 6 | 2010-03-24 Arni Magnusson <arnima@hafro.is> (tiny change) |
| 2 | 7 | ||
| 3 | * frames.texi (Cursor Parameters): Fix typo. (Bug#5760) | 8 | * frames.texi (Cursor Parameters): Fix typo. (Bug#5760) |
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 38bc9c4d0e8..ec10c51b236 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi | |||
| @@ -920,8 +920,17 @@ library, to remove functions defined in the library. | |||
| 920 | @cindex loading hooks | 920 | @cindex loading hooks |
| 921 | @cindex hooks for loading | 921 | @cindex hooks for loading |
| 922 | 922 | ||
| 923 | You can ask for code to be executed if and when a particular library is | 923 | You can ask for code to be executed each time Emacs loads a library, |
| 924 | loaded, by calling @code{eval-after-load}. | 924 | by using the variable @code{after-load-functions}: |
| 925 | |||
| 926 | @defvar after-load-functions | ||
| 927 | This abnormal hook is run after loading a file. Each function in the | ||
| 928 | hook is called with a single argument, the absolute filename of the | ||
| 929 | file that was just loaded. | ||
| 930 | @end defvar | ||
| 931 | |||
| 932 | If you want code to be executed when a @emph{particular} library is | ||
| 933 | loaded, use the function @code{eval-after-load}: | ||
| 925 | 934 | ||
| 926 | @defun eval-after-load library form | 935 | @defun eval-after-load library form |
| 927 | This function arranges to evaluate @var{form} at the end of loading | 936 | This function arranges to evaluate @var{form} at the end of loading |
| @@ -930,7 +939,7 @@ the file @var{library}, each time @var{library} is loaded. If | |||
| 930 | Don't forget to quote @var{form}! | 939 | Don't forget to quote @var{form}! |
| 931 | 940 | ||
| 932 | You don't need to give a directory or extension in the file name | 941 | You don't need to give a directory or extension in the file name |
| 933 | @var{library}---normally you just give a bare file name, like this: | 942 | @var{library}. Normally, you just give a bare file name, like this: |
| 934 | 943 | ||
| 935 | @example | 944 | @example |
| 936 | (eval-after-load "edebug" '(def-edebug-spec c-point t)) | 945 | (eval-after-load "edebug" '(def-edebug-spec c-point t)) |
| @@ -955,31 +964,30 @@ An error in @var{form} does not undo the load, but does prevent | |||
| 955 | execution of the rest of @var{form}. | 964 | execution of the rest of @var{form}. |
| 956 | @end defun | 965 | @end defun |
| 957 | 966 | ||
| 958 | In general, well-designed Lisp programs should not use this feature. | 967 | Normally, well-designed Lisp programs should not use |
| 959 | The clean and modular ways to interact with a Lisp library are (1) | 968 | @code{eval-after-load}. If you need to examine and set the variables |
| 960 | examine and set the library's variables (those which are meant for | 969 | defined in another library (those meant for outside use), you can do |
| 961 | outside use), and (2) call the library's functions. If you wish to | 970 | it immediately---there is no need to wait until the library is loaded. |
| 962 | do (1), you can do it immediately---there is no need to wait for when | 971 | If you need to call functions defined by that library, you should load |
| 963 | the library is loaded. To do (2), you must load the library (preferably | 972 | the library, preferably with @code{require} (@pxref{Named Features}). |
| 964 | with @code{require}). | ||
| 965 | 973 | ||
| 966 | But it is OK to use @code{eval-after-load} in your personal | 974 | But it is OK to use @code{eval-after-load} in your personal |
| 967 | customizations if you don't feel they must meet the design standards for | 975 | customizations if you don't feel that they must meet the design |
| 968 | programs meant for wider use. | 976 | standards for programs meant for wider use. |
| 969 | 977 | ||
| 970 | @defvar after-load-alist | 978 | @defvar after-load-alist |
| 971 | This variable, an alist built by @code{eval-after-load}, holds the | 979 | This variable stores an alist built by @code{eval-after-load}, |
| 972 | expressions to evaluate when particular libraries are loaded. Each | 980 | containing the expressions to evaluate when certain libraries are |
| 973 | element looks like this: | 981 | loaded. Each element looks like this: |
| 974 | 982 | ||
| 975 | @example | 983 | @example |
| 976 | (@var{regexp-or-feature} @var{forms}@dots{}) | 984 | (@var{regexp-or-feature} @var{forms}@dots{}) |
| 977 | @end example | 985 | @end example |
| 978 | 986 | ||
| 979 | The key @var{regexp-or-feature} is either a regular expression or a | 987 | The key @var{regexp-or-feature} is either a regular expression or a |
| 980 | symbol, and the value is a list of forms. The forms are evaluated when | 988 | symbol, and the value is a list of forms. The forms are evaluated |
| 981 | the key matches the absolute true name of the file being | 989 | when the key matches the absolute true name or feature name of the |
| 982 | @code{load}ed or the symbol being @code{provide}d. | 990 | library being loaded. |
| 983 | @end defvar | 991 | @end defvar |
| 984 | 992 | ||
| 985 | @ignore | 993 | @ignore |