diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index bdd02523ceb..56a9d3f9981 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -24,7 +24,7 @@ sk Miroslav Vaško ** Try to reorder NEWS: most important things first, related items together. -* WINDOWS SUPPORT BUGS. +* WINDOWS SUPPORT BUGS These don't need to be fixed before a release, but we call the attention of Windows users to fixing them. @@ -43,6 +43,11 @@ frame makes the menu bar wrap before. On 2007-08-16 Glenn Morris reported on emacs-devel that he was not able to reproduce the bug on a GNU/Linux system. +* BUGS WAITING FOR MORE USER INPUT + +** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process) +http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg00690.html + * BUGS ** Document the changes introduced by multi-tty @@ -56,9 +61,6 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01330.html ** Why were the calls to x_fully_uncatch_errors commented out in eval.c? http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01987.html -** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process) -http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg00690.html - ** grep et al should use font-lock to do highlighting, so that they respect font-lock-mode. "can't turn off font-lock" http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00548.html @@ -99,26 +101,26 @@ names of the people who have checked it. SECTION READERS ---------------------------------- -etc/TUTORIAL rms -etc/TUTORIAL.bg Ognyan Kulev +etc/TUTORIAL +etc/TUTORIAL.bg etc/TUTORIAL.cn -etc/TUTORIAL.cs Pavel Janík -etc/TUTORIAL.de Werner LEMBERG +etc/TUTORIAL.cs +etc/TUTORIAL.de etc/TUTORIAL.eo -etc/TUTORIAL.es Marcelo Toledo -etc/TUTORIAL.fr ttn -etc/TUTORIAL.it ttn -etc/TUTORIAL.ja Kenichi Handa +etc/TUTORIAL.es +etc/TUTORIAL.fr +etc/TUTORIAL.it +etc/TUTORIAL.ja etc/TUTORIAL.ko -etc/TUTORIAL.nl Lute Kamstra -etc/TUTORIAL.pl Slawomir Nowaczyk -etc/TUTORIAL.pt_BR Marcelo Toledo +etc/TUTORIAL.nl +etc/TUTORIAL.pl +etc/TUTORIAL.pt_BR etc/TUTORIAL.ro -etc/TUTORIAL.ru Alex Ott -etc/TUTORIAL.sk Pavel Janík -etc/TUTORIAL.sl Primoz PETERLIN -etc/TUTORIAL.sv Mats Lidell -etc/TUTORIAL.th Virach Sornlertlamvanich +etc/TUTORIAL.ru +etc/TUTORIAL.sk +etc/TUTORIAL.sl +etc/TUTORIAL.sv +etc/TUTORIAL.th etc/TUTORIAL.zh diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 41decab74bf..279a9a47ec3 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,6 +1,26 @@ +2007-10-13 Glenn Morris + + * misc.texi (Interactive Shell): Correct INSIDE_EMACS reference. + +2007-10-11 Eric S. Raymond + + * emacs.texi: + * files.texi (Version Systems): Minor fixes to version-control material + suggseted by RMS and Robert J. Chassell. + +2007-10-10 Eric S. Raymond + + * files.texi (Version Systems): + * vc-xtra.texi: + * vc1-xtra.texi: + * vc2-xtra.texi: Merge in changes for new VC with fileset-oriented + operations. Change of terminology from 'version' to `revision'. + Revise text for adequate description of VCSes with monotonic IDs. + * emacs.texi: Change of terminology from 'version' to `revision'. + 2007-10-09 Eric S. Raymond - * files.texi (Version Systems): Describe newerte VCses. + * files.texi (Version Systems): Describe newer VCses. Reorder the descriptions to be chronological. 2007-10-04 Nick Roberts diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 96cf365497d..119e2ea80d1 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -460,7 +460,7 @@ Version Control * Introduction to VC:: How version control works in general. * VC Mode Line:: How the mode line shows version control status. * Basic VC Editing:: How to edit a file under version control. -* Old Versions:: Examining and comparing old versions. +* Old Revisions:: Examining and comparing old revisions of files. * Secondary VC Commands:: The commands used a little less frequently. * Branches:: Multiple lines of development. * Remote Repositories:: Efficient access to remote CVS servers. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 6e90cff5776..78c72dac330 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -1213,11 +1213,10 @@ description of what was changed in that version. The Emacs version control interface is called VC. Its commands work with different version control systems---currently, it supports CVS, GNU Arch, RCS, Meta-CVS, Subversion, and SCCS. Of these, the GNU -project distributes CVS, GNU Arch, and RCS; we recommend that you use -either CVS or GNU Arch for your projects, and RCS for individual -files. We also have free software to replace SCCS, known as CSSC; if -you are using SCCS and don't want to make the incompatible change to -RCS or CVS, you can switch to CSSC. +project distributes CVS, GNU Arch, and RCS. We also have free +software to replace SCCS, known as CSSC; if you are using SCCS and +don't want to make the incompatible change to RCS or CVS, you can +switch to CSSC. VC is enabled by default in Emacs. To disable it, set the customizable variable @code{vc-handled-backends} to @code{nil} @@ -1233,7 +1232,7 @@ customizable variable @code{vc-handled-backends} to @code{nil} * Introduction to VC:: How version control works in general. * VC Mode Line:: How the mode line shows version control status. * Basic VC Editing:: How to edit a file under version control. -* Old Versions:: Examining and comparing old versions. +* Old Revisions:: Examining and comparing old versions. * Secondary VC Commands:: The commands used a little less frequently. * Branches:: Multiple lines of development. @ifnottex @@ -1250,7 +1249,7 @@ customizable variable @code{vc-handled-backends} to @code{nil} VC allows you to use a version control system from within Emacs, integrating the version control operations smoothly with editing. Though VC cannot completely bridge the gaps between version-control -systems with widely differing capabilities, it does provide +systems with widely differing capabilities, it does provide a uniform interface to many version control operations. Regardless of which version control system is in use, you will be able to do basic operations in much the same way. @@ -1261,10 +1260,10 @@ this section if you are already familiar with the version control system you want to use. @menu -* Why Version Control?:: Understanding the problems it addresses -* Version Systems:: Supported version control back-end systems. -* VC Concepts:: Words and concepts related to version control. -* Types of Log File:: The per-file VC log in contrast to the ChangeLog. +* Why Version Control?:: Understanding the problems it addresses +* Version Control Systems:: Supported version control back-end systems. +* VCS Concepts:: Words and concepts related to version control. +* Types of Log File:: The VCS log in contrast to the ChangeLog. @end menu @node Why Version Control? @@ -1287,7 +1286,7 @@ change to it. Even for a programmer working solo change histories are an important aid to memory; for a multi-person project they become a vitally important form of communication among developers. -@node Version Systems +@node Version Control Systems @subsubsection Supported Version Control Systems @cindex back end (version control) @@ -1368,11 +1367,11 @@ be done from the command line. @cindex Mercurial Mercurial is a distributed version-control systems broadly resembling GNU Arch and git, with atomic fileset commits and -rename/move histories. Like git it is fully decventralized. +rename/move histories. Like git it is fully decentralized. VC fully supports Mercurial, except for repository sync operations which still need to be done from the command line. -@node VC Concepts +@node VCS Concepts @subsubsection Concepts of Version Control @cindex repository @@ -1387,11 +1386,22 @@ revision. @cindex work file @cindex checking out files - A file checked out of a version-control repository is sometimes called -the @dfn{work file}. You edit the work file and make changes in it, as -you would with an ordinary file. After you are done with a set of -changes, you @dfn{check the file in}, which records the changes in the -repository, along with a log entry for them. + A file checked out of a version-control repository is sometimes +called the @dfn{work file}. You edit the work file and make changes +in it, as you would with an ordinary file. After you are done with a +set of changes, you @dfn{check in} or @dfn{commit} the file, which +records the changes in the repository, along with a log entry for +them. + +@cindex revision +@cindex revision ID + A copy of a file stored in a repository is called a @dfn{revision}. +The history of a file is a sequence of revisions. Each revisions is +named by a @dfn{revision ID}. In older VCSes (such as SCCS and RCS), +the simplest kind of revision ID consisted of a @dfn{dot-pair}; +integers (the @dfn{major} and @dfn{minor} revisions) separated by a +dot. Newer VCSes tend to use @dfn{monotonic} revision IDs that are +simple integers counting from 1. To go beyond these basic concepts, you will need to understand three ways in which version-control systems can differ from each other. They @@ -1417,7 +1427,7 @@ the file, making the work file read-only again. This allows other users to lock the file to make further changes. By contrast, a merging system lets each user check out and modify a -work file at any time. When you check in a a file, the system will +work file at any time. When you check in a file, the system will attempt to merge your changes with any others checked into the repository since you checked out the file. @@ -1429,14 +1439,15 @@ happen when you check in a change to a file that conflicts with a change checked in by someone else after your checkout. Both kinds of conflict have to be resolved by human judgment and communication. - SCCS always uses locking. RCS is lock-based by default but can be told -to operate in a merging style. CVS is merge-based by default but can -be told to operate in a locking mode. Most later version-control -systems, such as Subversion and GNU Arch, have been fundamentally -merging-based rather than locking-based. This is because experience -has shown that the merging-based approach is generally superior to -the locking one, both in convenience to developers and in minimizing -the number and severity of conflicts that actually occur. + SCCS always uses locking. RCS is lock-based by default but can be +told to operate in a merging style. CVS and Subversion are +merge-based by default but can be told to operate in a locking mode. +Most later version-control systems, such as GNU Arch, git, and +Mercurial, have been based exclusively on merging rather than locking. +This is because experience has shown that the merging-based approach +is generally superior to the locking one, both in convenience to +developers and in minimizing the number and severity of conflicts that +actually occur. While it is rather unlikely that anyone will ever again build a fundamentally locking-based rather than merging-based version-control @@ -1448,14 +1459,14 @@ both locking and merging version control and tries to hide the differences between them as much as possible. @cindex files versus changesets. - On SCCS. RCS, CVS, and other early version-control systems, checkins + On SCCS, RCS, CVS, and other early version-control systems, checkins and other operations are @dfn{file-based}; each file has its own -@dfn{master file} with its own comment- and revision history separate +@dfn{master file} with its own comment and revision history separate from that of all other files in the system. Later systems, beginning -with Subversion, are @dfn{changeset-based}; a checkin may include -changes to several files and that change set is treated as a unit by the -system. Any comment associated with the change doesn't belong to any -one file, but is attached to the changeset itself. +with Subversion, became @dfn{changeset-based}; a checkin under these +may include changes to several files and that change set is treated as +a unit by the system. Any comment associated with the change belongs +to no single file, but is attached to the changeset itself. Changeset-based version control is in general both more flexible and more powerful than file-based version control; usually, when a change to @@ -1465,22 +1476,30 @@ figure that out, and while file-based systems are passing out of use there are lots of legacy repositories still to be dealt with at time of writing in 2007. -@cindex centralized vs. decentralized + In fact, older versions of VC mode supported only file-based systems, +leading to some unhappy results when it was used to drive +changeset-based ones---the Subversion support, for example, used to break +up changesets into multiple per-file commits. This has been fixed, but +it has left a legacy in VC-mode's terminology. The terms ``checkin'' +and ``checkout'' are associated with file-based and locking-based +systems and a bit archaic; nowadays those operations are usually called +``commit'' and ``update''. +@cindex centralized vs. decentralized Early version-control systems were designed around a @dfn{centralized} model in which each project has only one repository used by all developers. SCCS, RCS, CVS, and Subversion share this kind of model. It has two important problems. One is that a single repository is a -single point of failure--if the repository server is down all work +single point of failure---if the repository server is down all work stops. The other is that you need to be connected live to the server to do checkins and checkouts; if you're offline, you can't work. - Newer version-control systems like GNU Arch are @dfn{decentralized}. -A project may have several different repositories, and these systems -support a sort of super-merge between repositories that tries to -reconcile their change histories. At the limit, each developer has -his/her own repository, and repository merges replace checkin/commit -operations. + Newer version-control systems like GNU Arch, git, Mercurial, and Bzr +are @dfn{decentralized}. A project may have several different +repositories, and these systems support a sort of super-merge between +repositories that tries to reconcile their change histories. At the +limit, each developer has his/her own repository, and repository +merges replace checkin/commit operations. VC's job is to help you manage the traffic between your personal workfiles and a repository. Whether that repository is a single master @@ -1553,7 +1572,7 @@ to copy it to @file{ChangeLog} this on the mode line. For example, @samp{RCS-1.3} says that RCS is used for that file, and the current version is 1.3. - The character between the back-end name and the version number + The character between the back-end name and the revision ID indicates the version control status of the file. @samp{-} means that the work file is not locked (if locking is in use), or not modified (if locking is not in use). @samp{:} indicates that the file is locked, or @@ -1575,8 +1594,56 @@ system, but is usually not excessive. @node Basic VC Editing @subsection Basic Editing under Version Control +@menu +* Selecting a fileset:: Choosing a set of files to operate on +* Doing the next logical thing:: Stepping forward in the development cycle +* VC with a locking VCS:: RCS in its default mode, SCCS, and optionally CVS. +* VC with a merging VCS:: Without locking: default mode for CVS. +* Advanced C-x v v:: Advanced features available with a prefix argument. +* Log Buffer:: Features available in log entry buffers. +@end menu + +@node Selecting a fileset +@subsubsection Choosing the scope of your command + +@cindex filesets + Most VC commands operate on @dfn{filesets}. A fileset is a +group of files that you have chosen to treat as a unit at the +time you perform the command. Filesets are the way that VC +mode bridges the gap between file-based and changeset-based +version-control systems. + + If you are visiting a version-controlled file in the current buffer, +the default fileset for any command is simply that one file. If you +are visiting a VC Dired buffer, and some files in it are marked, +your fileset is the marked files only. + + All files in a fileset must be under the same version-control system. +If they are not, VC mode will fail when you attempt to execute +a command on the fileset. + + In VC, filesets, are, essentially, a way to pass multiple file +arguments as a group to underlying version-control commands. For +example, on Subversion a checkin with more than one file in its +fileset will become a joint commit, as though you had typed +@command{svn commit} with those file arguments at the shell command +line in the directory of the selected buffer. + + If you are accustomed to earlier versions of VC, the change in behavior +you will notice is in VC-Dired mode. Other than @kbd{C-x v v}, most +VC-mode commands once operated on only one file selected by the line +the cursor is on. The change in the behavior of @kbd{C-x v v} outside +VC-Dired mode is more subtle. Formerly it operated in parallel on all +marked files, but did not pass them to the version-control backends as +a group. Now it does, which enables VC to drive changeset-based +version-control systems. + +@node Doing the next logical thing +@subsubsection Performing the next operation in the development cycle + The principal VC command is an all-purpose command that performs -either locking or check-in, depending on the situation. +either locking or check-in on your current fileset, depending on +the situation. @table @kbd @itemx C-x v v @@ -1600,14 +1667,7 @@ accidentally edit a file without properly checking it out first. To achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only} in your @file{~/.emacs} file. (@xref{Init Rebinding}.) -@menu -* VC with Locking:: RCS in its default mode, SCCS, and optionally CVS. -* Without Locking:: Without locking: default mode for CVS. -* Advanced C-x v v:: Advanced features available with a prefix argument. -* Log Buffer:: Features available in log entry buffers. -@end menu - -@node VC with Locking +@node VC with a locking VCS @subsubsection Basic Version Control with Locking If locking is used for the file (as with SCCS, and RCS in its default @@ -1621,7 +1681,7 @@ makes it writable so that you can change it. @item If the file is locked by you, and contains changes, @kbd{C-x v v} checks in the changes. In order to do this, it first reads the log entry -for the new version. @xref{Log Buffer}. +for the new revision. @xref{Log Buffer}. @item If the file is locked by you, but you have not changed it since you @@ -1638,18 +1698,19 @@ formerly locked the file, to inform him of what has happened. These rules also apply when you use CVS in locking mode, except that there is no such thing as stealing a lock. -@node Without Locking -@subsubsection Basic Version Control without Locking +@node VC with a merging VCS +@subsubsection Basic Version Control with Merging When your version-control system is merging-based rather than locking-based---the default for CVS and Subversion, and the way GNU -Arch always works---work files are always writable; you do not need to -do anything before you begin to edit a file. The status indicator on -the mode line is @samp{-} if the file is unmodified; it flips to -@samp{:} as soon as you save any changes in the work file. +Arch and more modern systems always work---work files are always +writable; you do not need to do anything before you begin to edit a +file. The status indicator on the mode line is @samp{-} if the file +is unmodified; it flips to @samp{:} as soon as you save any changes in +the work file. Here is what @kbd{C-x v v} does when using a merging-based system -(such as CVS or Subversion in their defaiult merging mode): +(such as CVS or Subversion in their default merging mode): @itemize @bullet @item @@ -1663,7 +1724,7 @@ to commit your own changes, type @kbd{C-x v m @key{RET}}.) @item If there are no new changes in the repository, but you have made modifications in your work file, @kbd{C-x v v} checks in your changes. -In order to do this, it first reads the log entry for the new version. +In order to do this, it first reads the log entry for the new revision. @xref{Log Buffer}. @item @@ -1675,9 +1736,9 @@ require locking, except that automatic merging of changes from the repository is not implemented. Unfortunately, this means that nothing informs you if another user has checked in changes in the same file since you began editing it, and when this happens, his changes will be -effectively removed when you check in your version (though they will +effectively removed when you check in your revision (though they will remain in the repository, so they will not be entirely lost). You must -therefore verify that the current version is unchanged, before you +therefore verify that the current revision is unchanged, before you check in your changes. In addition, locking is possible with RCS even in this mode, although @@ -1690,7 +1751,7 @@ changes in the repository automatically and notify you when they occur. @node Advanced C-x v v @subsubsection Advanced Control in @kbd{C-x v v} -@cindex version number to check in/out +@cindex revision ID to check in/out When you give a prefix argument to @code{vc-next-action} (@kbd{C-u C-x v v}), it still performs the next logical version control operation, but accepts additional arguments to specify precisely how @@ -1698,21 +1759,21 @@ to do the operation. @itemize @bullet @item -If the file is modified (or locked), you can specify the version -number to use for the new version that you check in. This is one way +If the file is modified (or locked), you can specify the revision ID +to use for the new version that you check in. This is one way to create a new branch (@pxref{Branches}). @item If the file is not modified (and unlocked), you can specify the -version to select; this lets you start working from an older version, -or on another branch. If you do not enter any version, that takes you -to the highest version on the current branch; therefore @kbd{C-u C-x -v v @key{RET}} is a convenient way to get the latest version of a file from -the repository. +revision to select; this lets you start working from an older +revision, or on another branch. If you do not enter any revision, +that takes you to the highest (``head'') revision on the current +branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to +get the latest version of a file from the repository. @item @cindex specific version control system -Instead of the version number, you can also specify the name of a +Instead of the revision ID, you can also specify the name of a version control system. This is useful when one file is being managed with two version control systems at the same time @iftex @@ -1776,11 +1837,13 @@ in the @samp{*VC-Log*} buffer, and you can go back to that buffer at any time to complete the check-in. If you change several source files for the same reason, it is often -convenient to specify the same log entry for many of the files. To do -this, use the history of previous log entries. The commands @kbd{M-n}, -@kbd{M-p}, @kbd{M-s} and @kbd{M-r} for doing this work just like the -minibuffer history commands (except that these versions are used outside -the minibuffer). +convenient to specify the same log entry for many of the files. (This +is the normal way to do things on a changeset-oriented system, where +comments are attached to changesets rather than the history of +individual files.) The most convenient way to do this is to mark all the +files in VC-Dired mode and check in from there; the log buffer will +carry the fileset information with it and do a group commit when you +confirm it with @kbd{C-c C-c}. However, you can also browse the history of previous log entries to duplicate a checkin comment. This can be useful when you want several @@ -1794,62 +1857,73 @@ these versions are used outside the minibuffer). mode, which involves running two hooks: @code{text-mode-hook} and @code{vc-log-mode-hook}. @xref{Hooks}. -@node Old Versions -@subsection Examining And Comparing Old Versions +@node Old Revisions +@subsection Examining And Comparing Old Revisions One of the convenient features of version control is the ability -to examine any version of a file, or compare two versions. +to examine any revision of a file, or compare two revisions. @table @kbd -@item C-x v ~ @var{version} @key{RET} -Examine version @var{version} of the visited file, in a buffer of its +@item C-x v ~ @var{revision} @key{RET} +Examine revision @var{revision} of the visited file, in a buffer of its own. @item C-x v = -Compare the current buffer contents with the focus version from which -you started editing. +Compare the buffer contents associated with the current +fileset with the working revision(s) from which you started editing. -@item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} -Compare the specified two versions of @var{file}. +@item C-u C-x v = @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} +Compare the specified two repository revisions of the current fileset. @item C-x v g -Display the file with per-line version information and using colors. +Display the file with per-line revision information and using colors. @end table -@findex vc-version-other-window +@findex vc-revision-other-window @kindex C-x v ~ - To examine an old version in its entirety, visit the file and then type -@kbd{C-x v ~ @var{version} @key{RET}} (@code{vc-version-other-window}). -This puts the text of version @var{version} in a file named -@file{@var{filename}.~@var{version}~}, and visits it in its own buffer -in a separate window. (In RCS, you can also select an old version + To examine an old revision in its entirety, visit the file and then type +@kbd{C-x v ~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). +This puts the text of revision @var{revision} in a file named +@file{@var{filename}.~@var{revision}~}, and visits it in its own buffer +in a separate window. (In RCS, you can also select an old revision and create a branch from it. @xref{Branches}.) @findex vc-diff @kindex C-x v = - It is usually more convenient to compare two versions of the file, -with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} -compares the current buffer contents (saving them in the file if -necessary) with the master version from which you started editing the -file (this is not necessarily the latest version of the file). -@kbd{C-u C-x v =}, with a numeric argument, reads a file name and two -version numbers, then compares those versions of the specified file. -Both forms display the output in a special buffer in another window. +@kbd{C-x v =} compares the current buffer contents of each file in the +current fileset (saving them in the file if necessary) with the +repository revision from which you started editing each file (this is not +necessarily the latest revision of the file). The diff will be displayed +in a special buffer in another window. - You can specify a checked-in version by its number; an empty input +@findex vc-diff +@kindex C-u C-x v = + You can compare two repository revisions of the current fileset with +the command @kbd{C-u C-x v =} (@code{vc-diff}). @kbd{C-u C-x v =} reads +two revision ID or tags. The diff will be displayed in a special +buffer in another window. + + You can specify a checked-in revision by its ID; an empty input specifies the current contents of the work file (which may be different -from all the checked-in versions). You can also specify a snapshot name +from all the checked-in revisions). You can also specify a snapshot name @iftex (@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) @end iftex @ifnottex (@pxref{Snapshots}) @end ifnottex -instead of one or both version numbers. +instead of one or both revision ID. - If you supply a directory name instead of the name of a registered -file, this command compares the two specified versions of all registered -files in that directory and its subdirectories. + Note that if your version-control system is file-oriented (SCCS, +RCS, CVS) rather than fileset-oriented (Subversion, GNU Arch, git, +Mercurial) specifying a revision of a multiple-file fileset by +revision ID (as opposed to a snapshot name or RSCCS/RCS tag) is +unlikely to return diffs that are connected in any meaningful way. + + If you invoke @kbd{C-u C-x v =} or @kbd{C-u C-x v =} from a buffer +that is neither visiting a version-controlled file nor a VC Dired +buffer, these commands will generate a diff of all registered files in +the current directory and its subdirectories. @vindex vc-diff-switches @vindex vc-rcs-diff-switches @@ -1867,12 +1941,12 @@ the options in @code{vc-rcs-diff-switches}. The Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and @kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always find the corresponding locations in the current work file. (Older -versions are not, in general, present as files on your disk.) +revisions are not, in general, present as files on your disk.) @findex vc-annotate @kindex C-x v g For some back ends, you can display the file @dfn{annotated} with -per-line version information and using colors to enhance the visual +per-line revision information and using colors to enhance the visual appearance, with the command @kbd{M-x vc-annotate}. It creates a new buffer (the ``annotate buffer'') displaying the file's text, with each part colored to show how old it is. Text colored red is new, blue means @@ -1881,7 +1955,7 @@ the color is scaled over the full range of ages, such that the oldest changes are blue, and the newest changes are red. When you give a prefix argument to this command, it uses the -minibuffer to read two arguments: which version number to display and +minibuffer to read two arguments: the ID of which revision to display and annotate (instead of the current file contents), and the time span in days the color range should cover. @@ -1919,9 +1993,9 @@ the author's description of the changes in the revision on the current line. @item W -Annotate the focus version--the one you are editing. If you used +Annotate the working revision--the one you are editing. If you used @kbd{P} and @kbd{N} to browse to other revisions, use this key to -return to your current version. +return to your working revision. @end table @node Secondary VC Commands @@ -1974,16 +2048,18 @@ situation. If locking is in use, @kbd{C-x v i} leaves the file unlocked and read-only. Type @kbd{C-x v v} if you wish to start editing it. After registering a file with CVS, you must subsequently commit the initial -version by typing @kbd{C-x v v}. Until you do that, the version +revision by typing @kbd{C-x v v}. Until you do that, the revision ID appears as @samp{@@@@} in the mode line. -@vindex vc-default-init-version -@cindex initial version number to register - The initial version number for a newly registered file is 1.1, by -default. You can specify a different default by setting the variable -@code{vc-default-init-version}, or you can give @kbd{C-x v i} a numeric -argument; then it reads the initial version number for this particular -file using the minibuffer. +@vindex vc-default-init-revision +@cindex initial revision ID to register + The default initial revision ID for a newly registered file +varies by what VCS you are using; normally it will be 1.1 on VCSes +that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs. +You can specify a different default by setting the variable +@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a +numeric argument; then it reads the initial revision ID for this +particular file using the minibuffer. @vindex vc-initial-comment If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an @@ -1995,12 +2071,12 @@ the initial comment works like reading a log entry (@pxref{Log Buffer}). @table @kbd @item C-x v l -Display version control state and change history. +Display revision control state and change history. @end table @kindex C-x v l @findex vc-print-log - To view the detailed version control status and history of a file, + To view the detailed revision control status and history of a file, type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of changes to the current file, including the text of the log entries. The output appears in a separate window. The point is centered at the @@ -2048,7 +2124,7 @@ It also takes a numeric prefix argument as a repeat count. @item f Visit the revision indicated at the current line, like typing @kbd{C-x -v ~} and specifying this revision's number (@pxref{Old Versions}). +v ~} and specifying this revision's ID (@pxref{Old Revisions}). @item d Display the diff (@pxref{Comparing Files}) between the revision @@ -2062,7 +2138,7 @@ current line was committed. @table @kbd @item C-x v u -Revert the buffer and the file to the version from which you started +Revert the buffer and the file to the working revision from which you started editing the file. @item C-x v c @@ -2073,51 +2149,25 @@ This undoes your last check-in. @kindex C-x v u @findex vc-revert-buffer If you want to discard your current set of changes and revert to the -version from which you started editing the file, use @kbd{C-x v u} +working revision from which you started editing the file, use @kbd{C-x v u} (@code{vc-revert-buffer}). This leaves the file unlocked; if locking is in use, you must first lock the file again before you change it again. @kbd{C-x v u} requires confirmation, unless it sees that you -haven't made any changes with respect to the master version. +haven't made any changes with respect to the master copy of the +working revision. @kbd{C-x v u} is also the command to unlock a file if you lock it and then decide not to change it. @kindex C-x v c -@findex vc-cancel-version +@findex vc-rollback To cancel a change that you already checked in, use @kbd{C-x v c} -(@code{vc-cancel-version}). This command discards all record of the -most recent checked-in version, but only if your work file corresponds -to that version---you cannot use @kbd{C-x v c} to cancel a version -that is not the latest on its branch. @kbd{C-x v c} also offers to -revert your work file and buffer to the previous version (the one that -precedes the version that is deleted). - - If you answer @kbd{no}, VC keeps your changes in the buffer, and locks -the file. The no-revert option is useful when you have checked in a -change and then discover a trivial error in it; you can cancel the -erroneous check-in, fix the error, and check the file in again. - - When @kbd{C-x v c} does not revert the buffer, it unexpands all -version control headers in the buffer instead -@iftex -(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}). -@end iftex -@ifnottex -(@pxref{Version Headers}). -@end ifnottex -This is because the buffer no longer corresponds to any existing -version. If you check it in again, the check-in process will expand -the headers properly for the new version number. - - However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header -automatically. If you use that header feature, you have to unexpand it -by hand---by deleting the entry for the version that you just canceled. - - Be careful when invoking @kbd{C-x v c}, as it is easy to lose a lot of -work with it. To help you be careful, this command always requires -confirmation with @kbd{yes}. Note also that this command is disabled -under CVS, because canceling versions is very dangerous and discouraged -with CVS. +(@code{vc-rollback}). This command discards all record of the most +recent checked-in revision, but only if your work file corresponds to +that revision---you cannot use @kbd{C-x v c} to cancel a revision that is +not the latest on its branch. Note that many version-control systems do +not support rollback at all; this command is something of a historical +relic. @ifnottex @c vc1-xtra.texi needs extra level of lowering. @@ -2132,7 +2182,7 @@ with CVS. @cindex trunk (version control) One use of version control is to maintain multiple ``current'' -versions of a file. For example, you might have different versions of a +revisions of a file. For example, you might have different revisions of a program in which you are gradually adding various unfinished new features. Each such independent line of development is called a @dfn{branch}. VC allows you to create branches, switch between @@ -2140,18 +2190,30 @@ different branches, and merge changes from one branch to another. Please note, however, that branches are not supported for SCCS. A file's main line of development is usually called the @dfn{trunk}. -The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At -any such version, you can start an independent branch. A branch -starting at version 1.2 would have version number 1.2.1.1, and consecutive -versions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, -and so on. If there is a second branch also starting at version 1.2, it -would consist of versions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. +You can create multiple branches from the trunk. How the difference +between trunk and branch is made visible is dependent on whether the +VCS uses dot-pair or monotonic version IDs. -@cindex head version - If you omit the final component of a version number, that is called a -@dfn{branch number}. It refers to the highest existing version on that -branch---the @dfn{head version} of that branch. The branches in the -example above have branch numbers 1.2.1 and 1.2.2. + In VCSes with dot-pair revision IDs, the revisions on the trunk are +normally IDed 1.1, 1.2, 1.3, etc. At any such revision, you can +start an independent branch. A branch starting at revision 1.2 would +have revision ID 1.2.1.1, and consecutive revisions on this branch +would have IDs 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on. If there is +a second branch also starting at revision 1.2, it would consist of +revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc. + + In VCSes with monotonic revision IDs, trunk revisions are IDed as +1, 2, 3, etc. A branch from (say) revision 2 might start with 2.1 and +continue through 2.2, 2.3, etc. But naming conventions for branches +and subbranches vary widely on these systems, and some (like +Mercurial) never depart from the monotonic integer sequence at all. +Consult the documentation of the VCS you are using. + +@cindex head revision + If you omit the final component of a dot-pair revision ID, that is called a +@dfn{branch ID}. It refers to the highest existing revision on that +branch---the @dfn{head revision} of that branch. The branches in the +dot-pair example above have branch IDs 1.2.1 and 1.2.2. @menu * Switching Branches:: How to get to another existing branch. @@ -2165,14 +2227,15 @@ example above have branch numbers 1.2.1 and 1.2.2. @subsubsection Switching between Branches To switch between branches, type @kbd{C-u C-x v v} and specify the -version number you want to select. On a locking-based system, this +revision ID you want to select. On a locking-based system, this version is then visited @emph{unlocked} (write-protected), so you can examine it before locking it. Switching branches in this way is allowed only when the file is not locked. - You can omit the minor version number, thus giving only the branch -number; this takes you to the head version on the chosen branch. If you -only type @key{RET}, Emacs goes to the highest version on the trunk. + On a VCS with dot-pair IDs, you can omit the minor part, thus giving +only the branch ID; this takes you to the head version on the +chosen branch. If you only type @key{RET}, Emacs goes to the highest +version on the trunk. After you have switched to any branch (including the main branch), you stay on it for subsequent VC commands, until you explicitly select some @@ -2181,36 +2244,36 @@ other branch. @node Creating Branches @subsubsection Creating New Branches - To create a new branch from a head version (one that is the latest in -the branch that contains it), first select that version if necessary, + To create a new branch from a head revision (one that is the latest in +the branch that contains it), first select that revision if necessary, lock it with @kbd{C-x v v}, and make whatever changes you want. Then, when you check in the changes, use @kbd{C-u C-x v v}. This lets you -specify the version number for the new version. You should specify a -suitable branch number for a branch starting at the current version. -For example, if the current version is 2.5, the branch number should be +specify the revision ID for the new revision. You should specify a +suitable branch ID for a branch starting at the current revision. +For example, if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2, and so on, depending on the number of existing branches at that point. - To create a new branch at an older version (one that is no longer the -head of a branch), first select that version (@pxref{Switching + To create a new branch at an older revision (one that is no longer the +head of a branch), first select that revision (@pxref{Switching Branches}). Your procedure will then differ depending on whether you are using a locking or merging-based VCS. - On a locking VCS, you will need to lock the old version branch with + On a locking VCS, you will need to lock the old revision branch with @kbd{C-x v v}. You'll be asked to confirm, when you lock the old -version, that you really mean to create a new branch---if you say no, -you'll be offered a chance to lock the latest version instead. On +revision, that you really mean to create a new branch---if you say no, +you'll be offered a chance to lock the latest revision instead. On a merging-based VCS you will skip this step. Then make your changes and type @kbd{C-x v v} again to check in a new -version. This automatically creates a new branch starting from the -selected version. You need not specially request a new branch, because -that's the only way to add a new version at a point that is not the head +revision. This automatically creates a new branch starting from the +selected revision. You need not specially request a new branch, because +that's the only way to add a new revision at a point that is not the head of a branch. After the branch is created, you ``stay'' on it. That means that -subsequent check-ins create new versions on that branch. To leave the -branch, you must explicitly select a different version with @kbd{C-u C-x +subsequent check-ins create new revisions on that branch. To leave the +branch, you must explicitly select a different revision with @kbd{C-u C-x v v}. To transfer changes from one branch to another, use the merge command, described in the next section. @@ -2240,26 +2303,26 @@ since you checked the file out (we call this @dfn{merging the news}). This is the common way to pick up recent changes from the repository, regardless of whether you have already changed the file yourself. - You can also enter a branch number or a pair of version numbers in + You can also enter a branch ID or a pair of revision IDs in the minibuffer. Then @kbd{C-x v m} finds the changes from that -branch, or the differences between the two versions you specified, and -merges them into the current version of the current file. +branch, or the differences between the two revisions you specified, and +merges them into the current revision of the current file. As an example, suppose that you have finished a certain feature on branch 1.3.1. In the meantime, development on the trunk has proceeded -to version 1.5. To merge the changes from the branch to the trunk, -first go to the head version of the trunk, by typing @kbd{C-u C-x v v -@key{RET}}. Version 1.5 is now current. If locking is used for the file, -type @kbd{C-x v v} to lock version 1.5 so that you can change it. Next, +to revision 1.5. To merge the changes from the branch to the trunk, +first go to the head revision of the trunk, by typing @kbd{C-u C-x v v +@key{RET}}. Revision 1.5 is now current. If locking is used for the file, +type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next, type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on -branch 1.3.1 (relative to version 1.3, where the branch started, up to -the last version on the branch) and merges it into the current version +branch 1.3.1 (relative to revision 1.3, where the branch started, up to +the last revision on the branch) and merges it into the current revision of the work file. You can now check in the changed file, thus creating -version 1.6 containing the changes from the branch. +revision 1.6 containing the changes from the branch. It is possible to do further editing after merging the branch, before the next check-in. But it is usually wiser to check in the merged -version, then lock it and make the further changes. This will keep +revision, then lock it and make the further changes. This will keep a better record of the history of changes. @cindex conflicts @@ -2277,7 +2340,7 @@ Ediff, Ediff, ediff, The Ediff Manual}). If you say no, the conflicting changes are both inserted into the file, surrounded by @dfn{conflict markers}. The example below shows how a conflict region looks; the file is called @samp{name} and the current -master file version with user B's changes in it is 1.11. +master file revision with user B's changes in it is 1.11. @c @w here is so CVS won't think this is a conflict. @smallexample @@ -2300,12 +2363,12 @@ check in the merged version afterwards. @subsubsection Multi-User Branching It is often useful for multiple developers to work simultaneously on -different branches of a file. CVS allows this by default; for RCS, it -is possible if you create multiple source directories. Each source -directory should have a link named @file{RCS} which points to a common -directory of RCS master files. Then each source directory can have its -own choice of selected versions, but all share the same common RCS -records. +different branches of a file. CVS and later systems allow this by +default; for RCS, it is possible if you create multiple source +directories. Each source directory should have a link named +@file{RCS} which points to a common directory of RCS master files. +Then each source directory can have its own choice of selected +revisions, but all share the same common RCS records. This technique works reliably and automatically, provided that the source files contain RCS version headers @@ -2315,13 +2378,13 @@ source files contain RCS version headers @ifnottex (@pxref{Version Headers}). @end ifnottex -The headers enable Emacs to be sure, at all times, which version -number is present in the work file. +The headers enable Emacs to be sure, at all times, which revision +ID is present in the work file. If the files do not have version headers, you must instead tell Emacs explicitly in each session which branch you are working on. To do this, first find the file, then type @kbd{C-u C-x v v} and specify the correct -branch number. This ensures that Emacs knows which branch it is using +branch ID. This ensures that Emacs knows which branch it is using during this particular editing session. @ifnottex diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index c4cdea4359d..83fc1617066 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -488,12 +488,13 @@ also change the coding system for a running subshell by typing Coding}. @cindex @env{INSIDE_EMACS} environment variable - Emacs sets the envitonment variable @env{INSIDE_EMACS} to @code{t} -in the subshell. Programs can check this variable to determine -whether they are running inside an Emacs subshell. + Emacs sets the environment variable @env{INSIDE_EMACS} (to a +comma-separated list including the Emacs version) in the subshell. +Programs can check this variable to determine whether they are running +inside an Emacs subshell. @cindex @env{EMACS} environment variable - Emacs also sets the @env{EMACS} environment variable to @code{t} if + Emacs also sets the @env{EMACS} environment variable (to @code{t}) if it is not already defined. @strong{Warning:} This environment variable is deprecated. Programs that check this variable should be changed to check @env{INSIDE_EMACS} instead. diff --git a/doc/emacs/vc-xtra.texi b/doc/emacs/vc-xtra.texi index 6ec69d60896..5b4e374a6ea 100644 --- a/doc/emacs/vc-xtra.texi +++ b/doc/emacs/vc-xtra.texi @@ -15,7 +15,7 @@ the Emacs Manual}). This chapter describes more advanced VC usage. @menu * VC Dired Mode:: Listing files managed by version control. * VC Dired Commands:: Commands to use in a VC Dired buffer. -* Remote Repositories:: Efficient access to remote CVS servers. +* Remote Repositories:: Efficient access to remote VCS servers. * Snapshots:: Sets of file versions treated as a unit. * Miscellaneous VC:: Various other commands and features of VC. * Customizing VC:: Variables that change VC's behavior. diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 6d5df78848c..ebdd1d5951f 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -120,21 +120,27 @@ ordinary Dired, that allows you to specify additional switches for the All the usual Dired commands work normally in VC Dired mode, except for @kbd{v}, which is redefined as the version control prefix. You can invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by -typing @kbd{v =}, or @kbd{v l}, and so on. Most of these commands apply -to the file name on the current line. +typing @kbd{v =}, or @kbd{v l}, and so on. These commands will apply +to the set of files you have marked for operation in the VC-Dired +buffer. The command @kbd{v v} (@code{vc-next-action}) operates on all the marked files, so that you can lock or check in several files at once. -If it operates on more than one file, it handles each file according to -its current state; thus, it might lock one file, but check in another -file. This could be confusing; it is up to you to avoid confusing -behavior by marking a set of files that are in a similar state. If no -files are marked, @kbd{v v} operates on the file in the current line. +If the underlying VC supports atomic commits of multiple-file +changesets @kbd{v v} with a selected set of modified but not committed +files wuill commit all of them at once as a single changeset. - If any files call for check-in, @kbd{v v} reads a single log entry, -then uses it for all the files being checked in. This is convenient for -registering or checking in several files at once, as part of the same -change. + When @kbd{v v} (@code{vc-next-action}) operates on a set of files, +it requires that all of those files must be in the same state; +otherwise it will throw an error. Note that this differs from the +behavior of older versions of VC, which did not have fileset +operations and simply did @code{vc-next-action} on each file +individually. + + If any files are in a state that calls for commit, @kbd{v v} reads a +single log entry and uses it for the changeset as a whole. If the +underling VCS is file- rather than changeset-oriented, the log entry +will be replicated into the history of each file. @findex vc-dired-toggle-terse-mode @findex vc-dired-mark-locked diff --git a/doc/emacs/vc2-xtra.texi b/doc/emacs/vc2-xtra.texi index 83f28088726..da7ef76025a 100644 --- a/doc/emacs/vc2-xtra.texi +++ b/doc/emacs/vc2-xtra.texi @@ -6,17 +6,24 @@ @c printed version) or in the main Emacs manual (for the on-line version). @node Remote Repositories @subsection Remote Repositories -@cindex remote repositories (CVS) +@cindex remote repositories - A common way of using CVS is to set up a central CVS repository on -some Internet host, then have each developer check out a personal -working copy of the files on his local machine. Committing changes to -the repository, and picking up changes from other users into one's own -working area, then works by direct interactions with the CVS server. + A common way of using CVS and other more advanced VCSes is to set up +a central repository on some Internet host, then have each +developer check out a personal working copy of the files on his local +machine. Committing changes to the repository, and picking up changes +from other users into one's own working area, then works by direct +interactions with the repository server. - One difficulty is that access to the CVS server is often slow, and -that developers might need to work off-line as well. VC is designed -to reduce the amount of network interaction necessary. + One difficulty is that access to a repository server is often slow, +and that developers might need to work off-line as well. While only +third-generation decentralized VCses such as GNU Arch or Mercurial +really solve this problem, VC is designed to reduce the amount of +network interaction necessary. + + If you are using a truly decentralized VCS you can skip the rest of +this section. It describes backup and local-repository techniques +that are only useful for Subversion and earlier VCSes. @menu * Version Backups:: Keeping local copies of repository versions. @@ -28,7 +35,7 @@ to reduce the amount of network interaction necessary. @cindex version backups @cindex automatic version backups - When VC sees that the CVS repository for a file is on a remote + When VC sees that the repository for a file is on a remote machine, it automatically makes local backups of unmodified versions of the file---@dfn{automatic version backups}. This means that you can compare the file to the repository version (@kbd{C-x v =}), or @@ -47,7 +54,7 @@ as ordinary Emacs backup files @end ifnottex But they follow a similar naming convention. - For a file that comes from a remote CVS repository, VC makes a + For a file that comes from a remote repository, VC makes a version backup whenever you save the first changes to the file, and removes it after you have committed your modified version to the repository. You can disable the making of automatic version backups by @@ -58,10 +65,10 @@ setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}). of file @var{file} is @code{@var{file}.~@var{version}.~}. This is almost the same as the name used by @kbd{C-x v ~} @iftex -(@pxref{Old Versions,,,emacs, the Emacs Manual}), +(@pxref{Old Revisions,,,emacs, the Emacs Manual}), @end iftex @ifnottex -(@pxref{Old Versions}), +(@pxref{Old Revisions}), @end ifnottex the only difference being the additional dot (@samp{.}) after the version number. This similarity is intentional, because both kinds of @@ -244,10 +251,10 @@ you need not hesitate to create snapshots whenever they are useful. You can give a snapshot name as an argument to @kbd{C-x v =} or @kbd{C-x v ~} @iftex -(@pxref{Old Versions,,,emacs, the Emacs Manual}). +(@pxref{Old Revisions,,,emacs, the Emacs Manual}). @end iftex @ifnottex -(@pxref{Old Versions}). +(@pxref{Old Revisions}). @end ifnottex Thus, you can use it to compare a snapshot against the current files, or two snapshots against each other, or a snapshot against a named diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 056ad379127..364b2796ac0 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2007-10-10 Michael Albinus + + Sync with Tramp 2.1.11. + + * trampver.texi: Update release number. + 2007-10-06 Michael Albinus * tramp.texi (External packages): New section. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index eb69733b61c..f4d65ed07aa 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -208,8 +208,8 @@ license to the document, as described in section 6 of the license. @vskip 0pt plus 1filll @insertcopying -This manual was generated from $Revision: 1.2 $ of $RCSfile: cc-mode.texi,v $, which can be -downloaded from +This manual was generated from cc-mode.texi, which can be downloaded +from @url{http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/doc/misc/cc-mode.texi}. @end titlepage diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 4ed196a80f0..179af979c06 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -4,12 +4,12 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.1.11-pre +@set trampver 2.1.11 @c Other flags from configuration @set instprefix /usr/local @set lispdir /usr/local/share/emacs/site-lisp -@set infodir /usr/local/info +@set infodir /usr/local/share/info @c Formatting of the tramp program name consistent. @set tramp @sc{tramp} diff --git a/etc/ChangeLog b/etc/ChangeLog index ffdba84db2d..daf43c08d97 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2007-10-10 Eric S. Raymond + + * NEWS: Explain the VC fileset changes a bit better. + 2007-09-28 Glenn Morris * PROBLEMS: Mention Tex superscript font issue. diff --git a/etc/NEWS b/etc/NEWS index 8cc4b9ed6f3..4ecdca35c52 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -107,6 +107,8 @@ file or directory. This is a convenience alias, so that one can write `(pop argv)' inside of --eval command line arguments in order to access following arguments. + +** The abbrev file is no longer read at startup in batch mode. * Incompatible Editing Changes in Emacs 23.1 @@ -173,6 +175,11 @@ with the face `eldoc-highlight-function-argument'. *** VC now supports applying VC operations to a set of files at a time. +This enables VC to work much more effectively with changeset-oriented +version-control systems such as Subversion, GNU Arch, Mercurial, and +Bzr. VC will now pass a multiple-file commit to these systems +as a single changeset. + ** sgml-electric-tag-pair-mode lets you simultaneously edit matched tag pairs. ** The appearance of superscript and subscript in TeX is more customizable. @@ -257,6 +264,8 @@ supported on other platforms, but not on Windows due to using the winsock * Lisp Changes in Emacs 23.1 +** `frame-inherited-parameters' lets new frames inherit parameters from +the selected frame. ** New keymap `input-decode-map' overrides like key-translation-map, but applies before function-key-map. Also it is terminal-local contrary to key-translation-map. Terminal-specific key-sequences are generally added to @@ -292,10 +301,13 @@ are called after a tty frame has been suspended or resumed, respectively. The functions are called with the terminal id of the frame being suspended/resumed as a parameter. -*** New functions: `environment', `let-environment'. +*** New function: `environment'. *** New variable: `local-function-key-map'. -This in addition to the global function-key-map variable that already existed. +This in addition to the global function-key-map variable that +already existed. The global variable is not used directly any more; +instead, the local-function-key-map is initialized so as to inherit from +function-key-map. *** `initial-environment' holds the environment inherited from Emacs's parent. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9524be4cdee..3fe5e2994cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,310 @@ +2007-10-13 Glenn Morris + + * woman.el (woman0-rename): Fix paren typo. + + * mail/feedmail.el (feedmail-run-the-queue) + (feedmail-look-at-queue-directory): + * mail/reporter.el (reporter-dump-state): + * net/eudc-hotlist.el (eudc-edit-hotlist): + * net/eudc.el (eudc-display-records) + (eudc-filter-duplicate-attributes) + (eudc-distribute-field-on-records, eudc-query-form) + (eudc-process-form): + * net/eudcb-bbdb.el (eudc-bbdb-filter-non-matching-record) + (eudc-bbdb-query-internal): + * net/eudcb-ldap.el (eudc-ldap-simple-query-internal): + * net/socks.el (socks-build-auth-list): + * progmodes/cc-cmds.el (top level): + * progmodes/cc-styles.el (c-make-styles-buffer-local) + (c-set-style): + * progmodes/cperl-mode.el (top level, cperl-imenu-addback) + (cperl-write-tags, cperl-tags-treeify): + * progmodes/ebnf-yac.el (ebnf-yac-token-table): + * progmodes/ebnf2ps.el (ebnf-map-name, ebnf-dimensions): + * progmodes/idlw-shell.el (idlwave-shell-filter-bp, top level): + * progmodes/idlw-toolbar.el (idlwave-toolbar-add-everywhere) + (idlwave-toolbar-remove-everywhere): + * progmodes/idlwave.el (idlwave-indent-line) + (idlwave-sintern-keyword-list, idlwave-scan-user-lib-files) + (idlwave-write-paths, idlwave-all-method-classes) + (idlwave-all-method-keyword-classes, idlwave-entry-keywords) + (idlwave-fix-keywords, idlwave-display-calling-sequence): + * textmodes/org.el (org-export-as-html, org-export-as-ascii) + (org-fast-tag-selection): Use mapc rather than mapcar. + +2007-10-13 Dan Nicolaescu + + * diff-mode.el (diff-fine-change): Add :group. + +2007-10-12 Dan Nicolaescu + + * cus-start.el (all): Use the same test as the 22.2 branch. + +2007-10-12 Stefan Monnier + + * diff-mode.el (diff-current-defun): Force recomputation of + change-log-default-name. + +2007-10-12 Chong Yidong + + * startup.el (fancy-startup-screen): Remove an unnecessary newline + and some leftover logic regarding dedicated frames. If showing + concise startup screen, fit window to buffer. + (command-line-1): If we will be using the splash screen, use + find-file instead of find-file-other-window to find additional + files. Comment out unused code for coping with the old sit-for + behavior. + +2007-10-12 Stefan Monnier + + * term/xterm.el (xterm-function-map, xterm-alternatives-map): Use the + `meta' modifier consistently, rather than using sometimes meta + sometimes alt. + +2007-10-12 Martin Rudalics + + * window.el (handle-select-window): Revert part of 2007-10-08 + change setting the input focus. + +2007-10-12 Glenn Morris + + * startup.el (command-line): Do not read abbrev file in batch mode. + + * emacs-lisp/byte-opt.el (top level): + * mail/rmail.el (rmail-list-to-menu): + * obsolete/hilit19.el (hilit-mode): + * progmodes/cc-mode.el (c-postprocess-file-styles) + (c-submit-bug-report): + * textmodes/org-publish.el (org-publish-get-plist-from-filename): + * textmodes/reftex.el (reftex-erase-all-selection-and-index-buffers) + (reftex-access-parse-file): + * textmodes/reftex-cite.el (reftex-do-citation) + (reftex-insert-bib-matches): + * textmodes/reftex-ref.el (reftex-offer-label-menu): + * textmodes/reftex-sel.el (reftex-select-unmark): + * textmodes/reftex-toc.el (reftex-toc-do-promote): + * vc-mcvs.el (vc-mcvs-checkin): Use mapc rather than mapcar. + + * cus-edit.el (custom-variable-menu, custom-face-menu) + (custom-group-menu): Check init-file-user rather than + user-init-file, in case cus-edit is loaded by site-run-file. + +2007-10-11 Dan Nicolaescu + + * vc.el (vc-deduce-fileset): Delete unused code. + (vc-next-action): Fix typos. + +2007-10-11 Juanma Barranquero + + * bs.el (bs--mark-unmark): New function. + (bs-mark-current, bs-unmark-current): Use it. + +2007-10-11 Eric S. Raymond + + * vc.el (vc-diff, vc-diff-internal): Bug fixes by Juanma Barranquero. + Temporarily disable the check for his edge case, it's calling some + brittle code. + (with-vc-properties): Fievaluation time of a macro argument. + + * ediff-vers.el (ediff-vc-internal): + * vc-hooks.el: + * loaddefs.el: Follow up on VC terminology change. + +2007-10-11 Juanma Barranquero + + * follow.el (follow-stop-intercept-process-output): + Use `follow-call-process-filter' rather than `process-filter'. + Simplify. + +2007-10-11 Eric S. Raymond + + * vc.el: Address an edge case in vc-diff pointed out by + Juanma Barranquero. This is an experimental fix and may change. + + * vc-hooks.el (vc-registered): Robustify this function a bit + against filenames with no directory component. + +2007-10-11 Stefan Monnier + + * international/characters.el: Undo unwanted and unexplained change. + +2007-10-10 Vinicius Jose Latorre + + * ps-print.el: Fix the usage of :foreground and :background face + attributes. Reported by Nikolaj Schumacher . + (ps-print-version): New version 6.7.6. + (ps-face-attributes, ps-face-attribute-list, ps-face-background): + Fix code. + (ps-face-foreground-color-p, ps-face-background-color-p) + (ps-face-color-p): New inline funs. + +2007-10-10 Carsten Dominik + + * org.el (org-additional-option-like-keywords): New constant. + (org-complete): Use `org-additional-option-like-keywords'. + (org-parse-local-options): New function. + +2007-10-10 Carsten Dominik + + * org.el (org-in-clocktable-p): New function. + (org-clock-report): Only update the table at point, or insert a + new one. + (org-clock-goto): New function. + (org-open-file): Use `start-process-shell-command' instead of + `shell-command' with an ampersand. + (org-deadline, org-schedule): New argument REMOVE to remove the + date from the entry. + (org-agenda-schedule, org-agenda-deadline): Pass the prefix + argument to `org-schedule' and `org-deadline'. + (org-trim): Use the correct expressions for beginning and end of + the string. + (org-get-cleaned-entry): Trim the string before returning it. + (org-clock-find-position): New function. + (org-clock-into-drawer): New option. + (org-agenda-tags-column): Rename from + `org-agenda-align-tags-to-column'. + (org-agenda-align-tags): Allow negative values for + `org-agenda-tags-column'. + (org-insert-labeled-timestamps-before-properties-drawer): Remove var. + (org-agenda-to-appt): New optional argument FILTER. + (org-completion-fallback-command): New variable. + (org-complete): Use `org-completion-fallback-command'. + (org-find-base-buffer-visiting): Catch the case that there is no + buffer visiting the file. + (org-property-or-variable-value): New function. + (org-todo): Use `org-property-or-variable-value' + (org-agenda-compact-blocks): New option. + (org-prepare-agenda, org-agenda-list): Use `org-agenda-compact-blocks'. + (org-agenda-schedule, org-agenda-deadline): + Call `org-agenda-show-new-time'. + (org-agenda-show-new-time): New argument PREFIX. + (org-colgroup-info-to-vline-list): Fix but that cause a + shift in the vertical lines. + (org-buffer-property-keys): New argument INCLUDE-DEFAULTS. + (org-maybe-renumber-ordered-list, org-cycle-list-bullet) + (org-indent-item): No arg in call to `org-fix-bullet-type'. + (org-fix-bullet-type): Remove argument. + (org-read-date): Check for am/pm twice, to catch the end time. + (org-goto-map): Use `suppress-keymap'. + (org-remember-apply-template): Respect the dynamically scoped + selection character. + + * org.texi (Appointment reminders): New section. + +2007-10-10 Bastien Guerry + + * org-export-latex.el (org-export-latex-protect-string): + Renaming of `org-latex-protect'. + (org-export-latex-emphasis-alist): By default, don't protect + any emphasis formatter from further conversion. + (org-export-latex-tables): Honor column grouping for tables. + (org-export-latex-title-command): New option. + (org-export-latex-treat-backslash-char): Use \textbackslash{} to + export backslash character. + +2007-10-10 Stefan Monnier + + * frame.el (frame-inherited-parameters): Remove unused `environment' + parameter, and let server.el add `client' when needed. + + * server.el (server-create-tty-frame) + (server-create-window-system-frame): Set frame-inherited-parameters. + + * frame.el (frame-inherited-parameters): New var. + (make-frame): Use it. + + * font-lock.el (lisp-font-lock-keywords-2): Remove let-environment. + + * env.el (let-environment): Remove. Unused. + (read-envvar-name): Simplify. + (setenv): Remove unused arg `frame'. + + * help-fns.el (describe-variable): Add missing " " for multiline + obsolescence info and missing EOL after global value. + +2007-10-10 Eric S. Raymond + + * add-log.el: + * ediff-vers.el: + * log-view.el: + * pcvs.el: + * vc-arch.el: + * vc-bzr.el: + * vc-cvs.el: + * vc.el: + * vc-git.el: + * vc-hg.el: + * vc-hooks.el: + * vc-mcvs.el: + * vc-mtn.el: + * vc-rcs.el: + * vc-sccs.el: + * vc-svn.el: Terminology cleanup: workfile-version -> working-revision, + {find,init,next,previous,annotate-*,log}-version -> + {find,init,next,previous,annotate-*,log}-revision, + annotate-focus-version -> annotate-working-revision, The term + 'focus' is gone. The term 'revision' is now used consistently + everywhere that reference to a revision ID is intended, replacing + older use of 'version'. + +2007-10-10 Juanma Barranquero + + * follow.el: Change all instances of "Follow Mode" to "Follow + mode" in docstrings and messages. + (follow-menu-filter): Fix arg passed to `bound-and-true-p'. + +2007-10-10 Eric S. Raymond + + * vc.el (vc-next-action): Rewrite completely; this principal + entry point now operates on a current fileset selected either + explicitly via VC-Dired or implicitly by visiting a file buffer, + rather than always operating on the file of the current buffer as + in older versions. Rewrite the rest of the mode to match. + (with-vc-properties): Rewrite to operate on a file list. + (with-vc-file): vc-checkin takes a file list argument now. + (vc-post-command-functions): This hook now receives a file list. + (vc-do-command): Take a either a file or a file list as argument. + (vc-deduce-fileset): New function for deducing a file list to + operate on. + (vc-next-action-on-file, vc-next-action-dired): Remove. + Merge into vc-next-action. + (vc-register): Adapt to the fact that vc-start-entry now takes a + file list. + (vc-register-with): New function. + (vc-start-entry): Take a file list argument rather than a + file argument. + (vc-checkout): Cope with vc-start-entry taking a file list. + (vc-steal-lock): Cope with with-vc-properties taking a + file list. + (vc-checkin): Take a file list argument rather than a file argument. + (vc-finish-logentry): Use the filelist passed by vc-start-entry. + (vc-diff-internal): Rewrite for filesets. + (vc-diff-sentinel): New function, tests whether changes were + written into a diff buffer. + (vc-diff): Rewrite for filesets. + (vc-version-diff): Rewrite for filesets. + (vc-print-log): Take a fileset argument. + (vc-revert): Revert the entire selected fileset, not just the + current buffer. + (vc-rollback): Roll back the entire selected fileset, if + possible. No longer accepts a prefix argument. + (vc-update): Merge new changes for the entire selected + fileset, not just the current buffer. + (vc-revert-file): Cope with with-vc-properties taking a file list. + (vc-default-dired-state-info): Add + status suffix if the file is + modified. + (vc-annotate-warp-version): Use the new diff machinery. + (vc-log-edit): Take a file list argument rather than a file argument. + +2007-10-10 Michael Albinus + + Sync with Tramp 2.1.11. + + * net/tramp.el (tramp-open-connection-setup-interactive-shell): + Pacify byte compiler. + + * net/trampver.el: Update release number. + 2007-10-09 Juanma Barranquero * follow.el: Require easymenu. @@ -11,7 +318,7 @@ (handle-select-window): When autoselecting window set input focus. Restructure. - * frame.el (focus-follows-mouse): Moved to frame.c. + * frame.el (focus-follows-mouse): Move to frame.c. * cus-start.el (all): Add focus-follows-mouse. 2007-10-08 Juanma Barranquero @@ -210,10 +517,10 @@ 2007-10-08 Stefan Monnier - * pcvs.el (cvs-mode-add-change-log-entry-other-window): Use - add-log-buffer-file-name-function rather than bind buffer-file-name, - so we dont end up calling change-log-mode in *cvs* when `fi' is the - ChangeLog file itself. + * pcvs.el (cvs-mode-add-change-log-entry-other-window): + Use add-log-buffer-file-name-function rather than binding + buffer-file-name, so we don't end up calling change-log-mode in *cvs* + when `fi' is the ChangeLog file itself. * outline.el (outline-flag-region): Use front-advance. diff --git a/lisp/add-log.el b/lisp/add-log.el index 546f87b4e4d..a58d6318670 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -379,7 +379,7 @@ With a numeric prefix ARG, go back ARG comments." (defun change-log-version-number-search () "Return version number of current buffer's file. -This is the value returned by `vc-workfile-version' or, if that is +This is the value returned by `vc-working-revision' or, if that is nil, by matching `change-log-version-number-regexp-list'." (let* ((size (buffer-size)) (limit @@ -390,7 +390,7 @@ nil, by matching `change-log-version-number-regexp-list'." ;; Apply percentage only if buffer size is bigger than ;; approx 100 lines. (if (> size (* 100 80)) (+ (point) (/ size 10))))) - (or (and buffer-file-name (vc-workfile-version buffer-file-name)) + (or (and buffer-file-name (vc-working-revision buffer-file-name)) (save-restriction (widen) (let ((regexps change-log-version-number-regexp-list) diff --git a/lisp/bs.el b/lisp/bs.el index 4d13c97c2fd..6390bd2dd81 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -864,35 +864,32 @@ the status of buffer on current line." (bs--set-window-height) (bs--show-config-message what)) +(defun bs--mark-unmark (count fun) + "Call FUN on COUNT consecutive buffers of *buffer-selection*." + (let ((dir (if (> count 0) 1 -1))) + (dotimes (i (abs count)) + (let ((buffer (bs--current-buffer))) + (when buffer (funcall fun buffer)) + (bs--update-current-line) + (bs-down dir))))) + (defun bs-mark-current (count) "Mark buffers. COUNT is the number of buffers to mark. Move cursor vertically down COUNT lines." (interactive "p") - (let ((dir (if (> count 0) 1 -1)) - (count (abs count))) - (while (> count 0) - (let ((buffer (bs--current-buffer))) - (if buffer - (setq bs--marked-buffers (cons buffer bs--marked-buffers))) - (bs--update-current-line) - (bs-down dir)) - (setq count (1- count))))) + (bs--mark-unmark count + (lambda (buf) + (add-to-list 'bs--marked-buffers buf)))) (defun bs-unmark-current (count) "Unmark buffers. COUNT is the number of buffers to unmark. Move cursor vertically down COUNT lines." (interactive "p") - (let ((dir (if (> count 0) 1 -1)) - (count (abs count))) - (while (> count 0) - (let ((buffer (bs--current-buffer))) - (if buffer - (setq bs--marked-buffers (delq buffer bs--marked-buffers))) - (bs--update-current-line) - (bs-down dir)) - (setq count (1- count))))) + (bs--mark-unmark count + (lambda (buf) + (setq bs--marked-buffers (delq buf bs--marked-buffers))))) (defun bs--show-config-message (what) "Show message indicating the new showing status WHAT. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 8f7ad22dce6..3bc83604227 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2682,7 +2682,12 @@ try matching its doc string against `custom-guess-doc-alist'." `(("Set for Current Session" custom-variable-set (lambda (widget) (eq (widget-get widget :custom-state) 'modified))) - ,@(when (or custom-file user-init-file) + ;; Note that in all the backquoted code in this file, we test + ;; init-file-user rather than user-init-file. This is in case + ;; cus-edit is loaded by something in site-start.el, because + ;; user-init-file is not set at that stage. + ;; http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00310.html + ,@(when (or custom-file init-file-user) '(("Save for Future Sessions" custom-variable-save (lambda (widget) (memq (widget-get widget :custom-state) @@ -2697,7 +2702,7 @@ try matching its doc string against `custom-guess-doc-alist'." (get (widget-value widget) 'saved-variable-comment)) (memq (widget-get widget :custom-state) '(modified set changed rogue))))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Erase Customization" custom-variable-reset-standard (lambda (widget) (and (get (widget-value widget) 'standard-value) @@ -3371,7 +3376,7 @@ SPEC must be a full face spec." (defvar custom-face-menu `(("Set for Current Session" custom-face-set) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Save for Future Sessions" custom-face-save))) ("Undo Edits" custom-redraw (lambda (widget) @@ -3380,7 +3385,7 @@ SPEC must be a full face spec." (lambda (widget) (or (get (widget-value widget) 'saved-face) (get (widget-value widget) 'saved-face-comment)))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Erase Customization" custom-face-reset-standard (lambda (widget) (get (widget-value widget) 'face-defface-spec))))) @@ -3978,7 +3983,7 @@ Creating group members... %2d%%" `(("Set for Current Session" custom-group-set (lambda (widget) (eq (widget-get widget :custom-state) 'modified))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Save for Future Sessions" custom-group-save (lambda (widget) (memq (widget-get widget :custom-state) '(modified set)))))) @@ -3988,7 +3993,7 @@ Creating group members... %2d%%" ("Reset to Saved" custom-group-reset-saved (lambda (widget) (memq (widget-get widget :custom-state) '(modified set)))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Erase Customization" custom-group-reset-standard (lambda (widget) (memq (widget-get widget :custom-state) '(modified set saved))))))) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index ee6491a1a79..53245d902ae 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -436,7 +436,7 @@ since it could result in memory overflow and make Emacs crash." ((string-match "\\`w32-" (symbol-name symbol)) (eq system-type 'windows-nt)) ((string-match "\\`mac-" (symbol-name symbol)) - (or (eq system-type 'mac) (eq system-type 'darwin))) + (eq window-system 'mac)) ((string-match "\\`x-.*gtk" (symbol-name symbol)) (featurep 'gtk)) ((string-match "\\`x-" (symbol-name symbol)) diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 609c5ef6490..894a12b1193 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1578,6 +1578,10 @@ then `diff-jump-to-old-file' is also set, for the next invocations." (defun diff-current-defun () "Find the name of function at point. For use in `add-log-current-defun-function'." + ;; Kill change-log-default-name so it gets recomputed each time, since + ;; each hunk may belong to another file which may belong to another + ;; directory and hence have a different ChangeLog file. + (kill-local-variable 'change-log-default-name) (save-excursion (when (looking-at diff-hunk-header-re) (forward-line 1) @@ -1649,7 +1653,8 @@ For use in `add-log-current-defun-function'." (defface diff-fine-change '((t :background "yellow")) - "Face used for char-based changes shown by `diff-fine-highlight'.") + "Face used for char-based changes shown by `diff-fine-highlight'." + :group 'diff-mode) (defun diff-fine-highlight-preproc () (while (re-search-forward "^." nil t) diff --git a/lisp/ediff-vers.el b/lisp/ediff-vers.el index d0a323980c2..8480984b95c 100644 --- a/lisp/ediff-vers.el +++ b/lisp/ediff-vers.el @@ -84,12 +84,12 @@ comparison or merge operations are being performed." (setq rev1 (ediff-vc-latest-version (buffer-file-name)))) (save-window-excursion (save-excursion - (vc-version-other-window rev1) + (vc-revision-other-window rev1) (setq rev1buf (current-buffer) file1 (buffer-file-name))) (save-excursion (or (string= rev2 "") ; use current buffer - (vc-version-other-window rev2)) + (vc-revision-other-window rev2)) (setq rev2buf (current-buffer) file2 (buffer-file-name))) (setq startup-hooks @@ -191,17 +191,17 @@ comparison or merge operations are being performed." (let (buf1 buf2 ancestor-buf) (save-window-excursion (save-excursion - (vc-version-other-window rev1) + (vc-revision-other-window rev1) (setq buf1 (current-buffer))) (save-excursion (or (string= rev2 "") - (vc-version-other-window rev2)) + (vc-revision-other-window rev2)) (setq buf2 (current-buffer))) (if ancestor-rev (save-excursion (if (string= ancestor-rev "") - (setq ancestor-rev (vc-workfile-version buffer-file-name))) - (vc-version-other-window ancestor-rev) + (setq ancestor-rev (vc-working-revision buffer-file-name))) + (vc-revision-other-window ancestor-rev) (setq ancestor-buf (current-buffer)))) (setq startup-hooks (cons diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 2ab57f9c0d4..60f1cdd3754 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -2012,17 +2012,17 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." (assq 'byte-code (symbol-function 'byte-optimize-form)) (let ((byte-optimize nil) (byte-compile-warnings nil)) - (mapcar (lambda (x) - (or noninteractive (message "compiling %s..." x)) - (byte-compile x) - (or noninteractive (message "compiling %s...done" x))) - '(byte-optimize-form - byte-optimize-body - byte-optimize-predicate - byte-optimize-binary-predicate - ;; Inserted some more than necessary, to speed it up. - byte-optimize-form-code-walker - byte-optimize-lapcode)))) + (mapc (lambda (x) + (or noninteractive (message "compiling %s..." x)) + (byte-compile x) + (or noninteractive (message "compiling %s...done" x))) + '(byte-optimize-form + byte-optimize-body + byte-optimize-predicate + byte-optimize-binary-predicate + ;; Inserted some more than necessary, to speed it up. + byte-optimize-form-code-walker + byte-optimize-lapcode)))) nil) ;; arch-tag: 0f14076b-737e-4bef-aae6-908826ec1ff1 diff --git a/lisp/env.el b/lisp/env.el index 128228be3db..90d576dc71d 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -47,15 +47,14 @@ Optional second arg MUSTMATCH, if non-nil, means require existing envvar name. If it is also not t, RET does not exit if it does non-null completion." (completing-read prompt (mapcar (lambda (enventry) - (list (if enable-multibyte-characters - (decode-coding-string - (substring enventry 0 - (string-match "=" enventry)) - locale-coding-system t) - (substring enventry 0 - (string-match "=" enventry))))) + (let ((str (substring enventry 0 + (string-match "=" enventry)))) + (if (multibyte-string-p str) + (decode-coding-string + str locale-coding-system t) + str))) (append process-environment - nil ;;(frame-parameter (frame-with-environment) 'environment) + ;;(frame-environment) )) nil mustmatch nil 'read-envvar-name-history)) @@ -128,7 +127,7 @@ Changes ENV by side-effect, and returns its new value." ;; Fixme: Should the environment be recoded if LC_CTYPE &c is set? -(defun setenv (variable &optional value substitute-env-vars frame) +(defun setenv (variable &optional value substitute-env-vars) "Set the value of the environment variable named VARIABLE to VALUE. VARIABLE should be a string. VALUE is optional; if not provided or nil, the environment variable VARIABLE will be removed. @@ -143,19 +142,11 @@ SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment variables in VALUE with `substitute-env-vars', which see. This is normally used only for interactive calls. -If optional parameter FRAME is non-nil, this function modifies -only the frame-local value of VARIABLE on FRAME, ignoring -`process-environment'. Note that frames on the same terminal -device usually share their environment, so calling `setenv' on -one of them affects the others as well. - -If FRAME is nil, `setenv' changes the global value of VARIABLE by -modifying `process-environment'. Note that the global value -overrides any frame-local values. - The return value is the new value of VARIABLE, or nil if it was removed from the environment. +This function works by modifying `process-environment'. + As a special case, setting variable `TZ' calls `set-time-zone-rule' as a side-effect." (interactive @@ -188,12 +179,8 @@ a side-effect." (error "Environment variable name `%s' contains `='" variable)) (if (string-equal "TZ" variable) (set-time-zone-rule value)) - (if (null frame) - (setq process-environment (setenv-internal process-environment - variable value t)) - (setq frame (frame-with-environment frame)) - (setq process-environment (setenv-internal process-environment - variable value nil))) + (setq process-environment (setenv-internal process-environment + variable value t)) value) (defun getenv (variable &optional frame) @@ -238,8 +225,7 @@ Non-ASCII characters are encoded according to the initial value of `locale-coding-system', i.e. the elements must normally be decoded for use. See `setenv' and `getenv'." (let* ((env (append process-environment -;; (frame-parameter (frame-with-environment frame) -;; 'environment) + ;; (frame-environment frame) nil)) (scan env) prev seen) @@ -269,45 +255,6 @@ See `setenv' and `getenv'." scan (cdr scan)))) env)) -(defmacro let-environment (varlist &rest body) - "Evaluate BODY with environment variables set according to VARLIST. -The environment variables are then restored to their previous -values. -The value of the last form in BODY is returned. - -Each element of VARLIST is either a string (which variable is -then removed from the environment), or a list (NAME -VALUEFORM) (which sets NAME to the value of VALUEFORM, a string). -All the VALUEFORMs are evaluated before any variables are set." - (declare (indent 2)) - (let ((old-env (make-symbol "old-env")) - (name (make-symbol "name")) - (value (make-symbol "value")) - (entry (make-symbol "entry")) - (frame (make-symbol "frame"))) - `(let ((,frame (selected-frame)) - ,old-env) - ;; Evaluate VALUEFORMs and replace them in VARLIST with their values. - (dolist (,entry ,varlist) - (unless (stringp ,entry) - (if (cdr (cdr ,entry)) - (error "`let-environment' bindings can have only one value-form")) - (setcdr ,entry (eval (cadr ,entry))))) - ;; Set the variables. - (dolist (,entry ,varlist) - (let ((,name (if (stringp ,entry) ,entry (car ,entry))) - (,value (if (consp ,entry) (cdr ,entry)))) - (setq ,old-env (cons (cons ,name (getenv ,name)) ,old-env)) - (setenv ,name ,value))) - (unwind-protect - (progn ,@body) - ;; Restore old values. - (with-selected-frame (if (frame-live-p ,frame) - ,frame - (selected-frame)) - (dolist (,entry ,old-env) - (setenv (car ,entry) (cdr ,entry)))))))) - (provide 'env) ;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8 diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index f262a6324fb..fb824f08996 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,8 @@ +2007-10-13 Glenn Morris + + * erc-track.el (erc-modified-channels-update): Use mapc rather + than mapcar. + 2007-09-18 Exal de Jesus Garcia Carrillo (tiny change) * erc.texi (Special-Features): Fix small typo. diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 1408adcd942..ad3eaf73a4b 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -701,17 +701,17 @@ ARGS are ignored." (unless erc-modified-channels-update-inside (let ((erc-modified-channels-update-inside t) (removed-channel nil)) - (mapcar (lambda (elt) - (let ((buffer (car elt))) - (when (or (not (bufferp buffer)) - (not (buffer-live-p buffer)) - (erc-buffer-visible buffer) - (and erc-track-remove-disconnected-buffers - (not (with-current-buffer buffer - erc-server-connected)))) - (setq removed-channel t) - (erc-modified-channels-remove-buffer buffer)))) - erc-modified-channels-alist) + (mapc (lambda (elt) + (let ((buffer (car elt))) + (when (or (not (bufferp buffer)) + (not (buffer-live-p buffer)) + (erc-buffer-visible buffer) + (and erc-track-remove-disconnected-buffers + (not (with-current-buffer buffer + erc-server-connected)))) + (setq removed-channel t) + (erc-modified-channels-remove-buffer buffer)))) + erc-modified-channels-alist) (when removed-channel (erc-modified-channels-display) (force-mode-line-update t))))) diff --git a/lisp/follow.el b/lisp/follow.el index e6538e5a350..55a331a22d3 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -37,7 +37,7 @@ ;; ;; * The windows always display adjacent sections of the buffer. ;; This means that whenever one window is moved, all the -;; others will follow. (Hence the name Follow Mode.) +;; others will follow. (Hence the name Follow mode.) ;; ;; * Should the point (cursor) end up outside a window, another ;; window displaying that point is selected, if possible. This @@ -149,15 +149,15 @@ ;; The following is a list of commands useful when follow-mode is active. ;; ;; follow-scroll-up C-c . C-v -;; Scroll text in a Follow Mode window chain up. +;; Scroll text in a Follow mode window chain up. ;; ;; follow-scroll-down C-c . v ;; Like `follow-scroll-up', but in the other direction. ;; ;; follow-delete-other-windows-and-split C-c . 1 ;; Maximize the visible area of the current buffer, -;; and enter Follow Mode. This is a very convenient -;; way to start Follow Mode, hence we recomend that +;; and enter Follow mode. This is a very convenient +;; way to start Follow mode, hence we recomend that ;; this command be added to the global keymap. ;; ;; follow-recenter C-c . C-l @@ -330,7 +330,7 @@ After that, changing the prefix key requires manipulating keymaps." (define-key mainmap follow-mode-prefix map) - ;; Replace the standard `end-of-buffer', when in Follow Mode. (I + ;; Replace the standard `end-of-buffer', when in Follow mode. (I ;; don't see the point in trying to replace every function that ;; could be enhanced in Follow mode. End-of-buffer is a special ;; case since it is very simple to define and it greatly enhances @@ -343,9 +343,9 @@ After that, changing the prefix key requires manipulating keymaps." ;; When the mode is not activated, only one item is visible to activate ;; the mode. (defun follow-menu-filter (menu) - (if (bound-and-true-p 'follow-mode) + (if (bound-and-true-p follow-mode) menu - '(["Follow mode " follow-mode + '(["Follow mode" follow-mode :style toggle :selected follow-mode]))) ;; If there is a `tools' menu, we use it. However, we can't add a @@ -391,7 +391,7 @@ are \" Fw\", or simply \"\"." :group 'follow) (defcustom follow-intercept-processes (fboundp 'start-process) - "When non-nil, Follow Mode will monitor process output." + "When non-nil, Follow mode will monitor process output." :type 'boolean :group 'follow) @@ -401,11 +401,11 @@ are \" Fw\", or simply \"\"." A \"tail window\" is a window that displays only the end of the buffer. Normally it is practical for the user that empty windows are recentered automatically. However, when using -Follow Mode it breaks the display when the end is displayed +Follow mode it breaks the display when the end is displayed in a window \"above\" the last window. This is for example the case when displaying a short page in info. -Must be set before Follow Mode is loaded. +Must be set before Follow mode is loaded. Please note that it is not possible to fully prevent Emacs from recentering empty windows. Please report if you find a repeatable @@ -494,7 +494,7 @@ of two major techniques: * The windows always displays adjacent sections of the buffer. This means that whenever one window is moved, all the - others will follow. (Hence the name Follow Mode.) + others will follow. (Hence the name Follow mode.) * Should the point (cursor) end up outside a window, another window displaying that point is selected, if possible. This @@ -545,7 +545,7 @@ Keys specific to Follow mode: (add-hook 'find-file-hook 'follow-find-file-hook t) (defun follow-find-file-hook () - "Find-file hook for Follow Mode. See the variable `follow-auto'." + "Find-file hook for Follow mode. See the variable `follow-auto'." (if follow-auto (follow-mode t))) ;;}}} @@ -558,7 +558,7 @@ Keys specific to Follow mode: ;;{{{ Scroll -;; `scroll-up' and `-down', but for windows in Follow Mode. +;; `scroll-up' and `-down', but for windows in Follow mode. ;; ;; Almost like the real thing, excpet when the cursor ends up outside ;; the top or bottom... In our case however, we end up outside the @@ -574,7 +574,7 @@ Keys specific to Follow mode: ;; good redisplay abstraction.) (defun follow-scroll-up (&optional arg) - "Scroll text in a Follow Mode window chain up. + "Scroll text in a Follow mode window chain up. If called with no ARG, the `next-screen-context-lines' last lines of the bottom window in the chain will be visible in the top window. @@ -582,7 +582,7 @@ the bottom window in the chain will be visible in the top window. If called with an argument, scroll ARG lines up. Negative ARG means scroll downward. -Works like `scroll-up' when not in Follow Mode." +Works like `scroll-up' when not in Follow mode." (interactive "P") (cond ((not (and (boundp 'follow-mode) follow-mode)) (scroll-up arg)) @@ -603,7 +603,7 @@ Works like `scroll-up' when not in Follow Mode." (defun follow-scroll-down (&optional arg) - "Scroll text in a Follow Mode window chain down. + "Scroll text in a Follow mode window chain down. If called with no ARG, the `next-screen-context-lines' top lines of the top window in the chain will be visible in the bottom window. @@ -611,7 +611,7 @@ the top window in the chain will be visible in the bottom window. If called with an argument, scroll ARG lines down. Negative ARG means scroll upward. -Works like `scroll-up' when not in Follow Mode." +Works like `scroll-up' when not in Follow mode." (interactive "P") (cond ((not (and (boundp 'follow-mode) follow-mode)) (scroll-up arg)) @@ -638,12 +638,12 @@ Works like `scroll-up' when not in Follow Mode." ;;;###autoload (defun follow-delete-other-windows-and-split (&optional arg) - "Create two side by side windows and enter Follow Mode. + "Create two side by side windows and enter Follow mode. Execute this command to display as much as possible of the text in the selected window. All other windows, in the current frame, are deleted and the selected window is split in two -side-by-side windows. Follow Mode is activated, hence the +side-by-side windows. Follow mode is activated, hence the two windows always will display two successive pages. \(If one window is moved, the other one will follow.) @@ -671,7 +671,7 @@ in your `~/.emacs' file, replacing [f7] by your favourite key: (follow-mode 1))) (defun follow-switch-to-buffer (buffer) - "Show BUFFER in all windows in the current Follow Mode window chain." + "Show BUFFER in all windows in the current Follow mode window chain." (interactive "BSwitch to Buffer: ") (let ((orig-window (selected-window)) (windows (follow-all-followers))) @@ -699,7 +699,7 @@ Defaults to current buffer." (defun follow-switch-to-current-buffer-all () - "Show current buffer in all windows on this frame, and enter Follow Mode. + "Show current buffer in all windows on this frame, and enter Follow mode. To bind this command to a hotkey place the following line in your `~/.emacs' file: @@ -796,10 +796,10 @@ Follow mode since the windows should always be aligned." ;;{{{ End of buffer (defun follow-end-of-buffer (&optional arg) - "Move point to the end of the buffer, Follow Mode style. + "Move point to the end of the buffer, Follow mode style. If the end is not visible, it will be displayed in the last possible -window in the Follow Mode window chain. +window in the Follow mode window chain. The mark is left at the previous position. With arg N, put point N/10 of the way from the true end." @@ -1315,7 +1315,7 @@ position of the first window. Otherwise it is a good guess." "Make sure windows displaying the end of a buffer aren't recentered. This is done by reading and rewriting the start position of -non-first windows in Follow Mode." +non-first windows in Follow mode." (if follow-avoid-tail-recenter-p (let* ((orig-buffer (current-buffer)) (top (frame-first-window (selected-frame))) @@ -1607,7 +1607,7 @@ non-first windows in Follow Mode." (after ,(intern (concat "follow-" (symbol-name (car cmds)))) activate) - "Adviced by Follow Mode." + "Adviced by Follow mode." (follow-redraw-after-event (ad-get-arg 0)))) (setq cmds (cdr cmds)))) @@ -1718,9 +1718,9 @@ WINDOW can be an object or a window." ;; filter... (defadvice set-process-filter (before follow-set-process-filter activate) - "Ensure process output will be displayed correctly in Follow Mode buffers. + "Ensure process output will be displayed correctly in Follow mode buffers. -Follow Mode inserts its own process filter to do its +Follow mode inserts its own process filter to do its magic stuff before the real process filter is called." (if follow-intercept-processes (progn @@ -1794,7 +1794,7 @@ magic stuff before the real process filter is called." (defun follow-intercept-process-output () "Intercept all active processes. -This is needed so that Follow Mode can track all display events in the +This is needed so that Follow mode can track all display events in the system. (See `follow-mode'.)" (interactive) (let ((list (process-list))) @@ -1808,7 +1808,7 @@ system. (See `follow-mode'.)" (defun follow-stop-intercept-process-output () - "Stop Follow Mode from spying on processes. + "Stop Follow mode from spying on processes. All current spypoints are removed and no new will be added. @@ -1820,17 +1820,14 @@ would interfere with some other package. If this happens, please report this using the `report-emacs-bug' function." (interactive) (follow-tidy-process-filter-alist) - (let ((list (process-list))) - (while list - (if (eq (process-filter (car list)) 'follow-generic-filter) - (progn - (follow-call-set-process-filter - (car list) - (cdr-safe (assq (car list) follow-process-filter-alist))) - (setq follow-process-filter-alist - (delq (assq (car list) follow-process-filter-alist) - follow-process-filter-alist)))) - (setq list (cdr list)))) + (dolist (process (process-list)) + (when (eq (follow-call-process-filter process) 'follow-generic-filter) + (follow-call-set-process-filter + process + (cdr-safe (assq process follow-process-filter-alist))) + (setq follow-process-filter-alist + (delq (assq process follow-process-filter-alist) + follow-process-filter-alist)))) (setq follow-intercept-processes nil)) ;;}}} @@ -2073,7 +2070,7 @@ report this using the `report-emacs-bug' function." ;;{{{ Tail window handling ;; In Emacs (not XEmacs) windows showing nothing are sometimes -;; recentered. When in Follow Mode, this is not desirable for +;; recentered. When in Follow mode, this is not desirable for ;; non-first windows in the window chain. This section tries to ;; make the windows stay where they should be. ;; @@ -2107,10 +2104,10 @@ report this using the `report-emacs-bug' function." (if follow-avoid-tail-recenter-p (defadvice sit-for (before follow-sit-for activate) - "Adviced by Follow Mode. + "Adviced by Follow mode. Avoid to recenter windows displaying only the end of a file as when -displaying a short file in two windows, using Follow Mode." +displaying a short file in two windows, using Follow mode." (follow-avoid-tail-recenter))) @@ -2120,7 +2117,7 @@ displaying a short file in two windows, using Follow Mode." (if (and follow-avoid-tail-recenter-p (fboundp 'move-overlay)) (defadvice move-overlay (before follow-move-overlay activate) - "Adviced by Follow Mode. + "Adviced by Follow mode. Don't recenter windows showing only the end of a buffer. This prevents `mouse-drag-region' from messing things up." (follow-avoid-tail-recenter))) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index d7882d3e988..f8201250096 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -2228,7 +2228,7 @@ other modes in which C preprocessor directives are used. e.g. `asm-mode' and `(;; Control structures. Emacs Lisp forms. (,(concat "(" (regexp-opt - '("cond" "if" "while" "while-no-input" "let" "let*" "let-environment" + '("cond" "if" "while" "while-no-input" "let" "let*" "prog" "progn" "progv" "prog1" "prog2" "prog*" "inline" "lambda" "save-restriction" "save-excursion" "save-window-excursion" "save-selected-window" diff --git a/lisp/frame.el b/lisp/frame.el index d9688804266..37673835f34 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -673,6 +673,10 @@ The functions are run with one arg, the newly created frame.") ;; Alias, kept temporarily. (define-obsolete-function-alias 'new-frame 'make-frame "22.1") +(defvar frame-inherited-parameters '() + ;; FIXME: Shouldn't we add `font' here as well? + "Parameters `make-frame' copies from the `selected-frame' to the new frame.") + (defun make-frame (&optional parameters) "Return a newly created frame displaying the current buffer. Optional argument PARAMETERS is an alist of parameters for the new frame. @@ -723,15 +727,11 @@ setup is for focus to follow the pointer." (run-hooks 'before-make-frame-hook) (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) (normal-erase-is-backspace-setup-frame frame) - ;; Inherit the 'environment and 'client parameters. - (let ((env (frame-parameter oldframe 'environment)) - (client (frame-parameter oldframe 'client))) - (if (not (framep env)) - (setq env oldframe)) - (if (and env (not (assq 'environment parameters))) - (set-frame-parameter frame 'environment env)) - (if (and client (not (assq 'client parameters))) - (set-frame-parameter frame 'client client))) + ;; Inherit the original frame's parameters. + (dolist (param frame-inherited-parameters) + (unless (assq param parameters) ;Overridden by explicit parameters. + (let ((val (frame-parameter oldframe param))) + (when val (set-frame-parameter frame param val))))) (run-hook-with-args 'after-make-frame-functions frame) frame)) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 25e8ca7ed3b..eee0794b673 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -565,7 +565,8 @@ it is displayed along with the global value." ;; See previous comment for this function. ;; (help-xref-on-pp from (point)) (if (< (point) (+ from 20)) - (delete-region (1- from) from))))))) + (delete-region (1- from) from)))))) + (terpri)) ;; If the value is large, move it to the end. (with-current-buffer standard-output @@ -617,7 +618,7 @@ it is displayed along with the global value." (setq extra-line t) (princ " This variable is obsolete") (if (cdr obsolete) (princ (format " since %s" (cdr obsolete)))) - (princ ";") (terpri) + (princ ";\n ") (princ (if (stringp (car obsolete)) (car obsolete) (format "use `%s' instead." (car obsolete)))) (terpri)) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 7e2a32a42e5..c7679a7e58a 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -29117,10 +29117,10 @@ If FILE-NAME is non-nil, save the result to FILE-NAME. ;;;*** -;;;### (autoloads (vc-annotate vc-branch-part vc-trunk-p vc-update-change-log -;;;;;; vc-rename-file vc-transfer-file vc-switch-backend vc-update -;;;;;; vc-rollback vc-revert vc-print-log vc-retrieve-snapshot vc-create-snapshot -;;;;;; vc-directory vc-merge vc-insert-headers vc-version-other-window +;;;### (autoloads (vc-annotate vc-update-change-log vc-rename-file +;;;;;; vc-transfer-file vc-switch-backend vc-rollback vc-update +;;;;;; vc-revert vc-print-log vc-retrieve-snapshot vc-create-snapshot +;;;;;; vc-directory vc-merge vc-insert-headers vc-revision-other-window ;;;;;; vc-diff vc-register vc-next-action vc-do-command edit-vc-file ;;;;;; with-vc-file vc-before-checkin-hook vc-checkin-hook vc-checkout-hook) ;;;;;; "vc" "vc.el" (18190 35214)) diff --git a/lisp/log-view.el b/lisp/log-view.el index b215917a559..194afb8d5de 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -76,7 +76,7 @@ (eval-when-compile (require 'cl)) (require 'pcvs-util) -(autoload 'vc-find-version "vc") +(autoload 'vc-find-revision "vc") (autoload 'vc-version-diff "vc") (defvar cvs-minor-wrap-function) @@ -93,7 +93,7 @@ ;; ("e" . cvs-mode-edit-log) ("d" . log-view-diff) ("a" . log-view-annotate-version) - ("f" . log-view-find-version) + ("f" . log-view-find-revision) ("n" . log-view-msg-next) ("p" . log-view-msg-prev) ("\t" . log-view-msg-next) @@ -116,7 +116,7 @@ ;; ["Kill This Buffer" kill-this-buffer] ["Mark Log Entry for Diff" set-mark-command] ["Diff Revisions" log-view-diff] - ["Visit Version" log-view-find-version] + ["Visit Version" log-view-find-revision] ["Annotate Version" log-view-annotate-version] ["Next Log Entry" log-view-msg-next] ["Previous Log Entry" log-view-msg-prev] @@ -365,12 +365,12 @@ log entries." (cvs-force-command "/F")) (funcall f)))) -(defun log-view-find-version (pos) +(defun log-view-find-revision (pos) "Visit the version at point." (interactive "d") (save-excursion (goto-char pos) - (switch-to-buffer (vc-find-version (log-view-current-file) + (switch-to-buffer (vc-find-revision (log-view-current-file) (log-view-current-tag))))) (defun log-view-annotate-version (pos) diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index b8d42debe6f..e75387f48ac 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -1588,7 +1588,7 @@ backup file names and the like)." (setq list-of-possible-fqms (directory-files feedmail-queue-directory t)) (if feedmail-queue-run-orderer (setq list-of-possible-fqms (funcall feedmail-queue-run-orderer list-of-possible-fqms))) - (mapcar + (mapc '(lambda (blobby) (setq maybe-file (expand-file-name blobby feedmail-queue-directory)) (cond @@ -1835,7 +1835,7 @@ the counts." (let ((q-cnt 0) (q-oth 0) (high-water 0) (blobbet)) ;; iterate, counting things we find along the way in the directory (if (file-directory-p queue-directory) - (mapcar + (mapc '(lambda (blobby) (cond ((file-directory-p blobby) nil) ; don't care about subdirs diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index 5c6bcb83efd..596c7ee9627 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el @@ -252,7 +252,7 @@ dumped." (erase-buffer) (insert "(setq\n") (lisp-indent-line) - (mapcar + (mapc (function (lambda (varsym-or-cons-cell) (let ((varsym (or (car-safe varsym-or-cons-cell) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 53c9220f14f..4a7bd12ba42 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1,7 +1,8 @@ ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs ;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: mail @@ -1460,7 +1461,7 @@ original copy." (defun rmail-list-to-menu (menu-name l action &optional full-name) (let ((menu (make-sparse-keymap menu-name))) - (mapcar + (mapc (function (lambda (item) (let (command) (if (consp item) diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el index 0509ac9ab79..2914ebdc1b0 100644 --- a/lisp/net/eudc-hotlist.el +++ b/lisp/net/eudc-hotlist.el @@ -69,10 +69,10 @@ These are the special commands of this mode: (switch-to-buffer (get-buffer-create "*EUDC Servers*")) (setq buffer-read-only nil) (erase-buffer) - (mapcar (function - (lambda (entry) - (setq proto-col (max (length (car entry)) proto-col)))) - eudc-server-hotlist) + (mapc (function + (lambda (entry) + (setq proto-col (max (length (car entry)) proto-col)))) + eudc-server-hotlist) (setq proto-col (+ 3 proto-col)) (setq gap (make-string (- proto-col 6) ?\ )) (insert " EUDC Servers\n" @@ -82,7 +82,7 @@ These are the special commands of this mode: "------" gap "--------\n" "\n") (setq eudc-hotlist-list-beginning (point)) - (mapcar '(lambda (entry) + (mapc '(lambda (entry) (insert (car entry)) (indent-to proto-col) (insert (symbol-name (cdr entry)) "\n")) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 4ee09a26951..0f300c20736 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -502,15 +502,15 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." records)) ;; Display the records (setq first-record (point)) - (mapcar + (mapc (function (lambda (record) (setq beg (point)) ;; Map over the record fields to print the attribute/value pairs - (mapcar (function - (lambda (field) - (eudc-print-record-field field width))) - record) + (mapc (function + (lambda (field) + (eudc-print-record-field field width))) + record) ;; Store the record internal format in some convenient place (overlay-put (make-overlay beg (point)) 'eudc-record @@ -540,13 +540,13 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." (if (not (and (boundp 'eudc-form-widget-list) eudc-form-widget-list)) (error "Not in a directory query form buffer") - (mapcar (function - (lambda (wid-field) - (setq value (widget-value (cdr wid-field))) - (if (not (string= value "")) - (setq query-alist (cons (cons (car wid-field) value) - query-alist))))) - eudc-form-widget-list) + (mapc (function + (lambda (wid-field) + (setq value (widget-value (cdr wid-field))) + (if (not (string= value "")) + (setq query-alist (cons (cons (car wid-field) value) + query-alist))))) + eudc-form-widget-list) (kill-buffer (current-buffer)) (eudc-display-records (eudc-query query-alist) eudc-use-raw-directory-names)))) @@ -565,15 +565,15 @@ otherwise they are formatted according to `eudc-user-attribute-names-alist'." (if (null (eudc-cdar rec)) (list record) ; No duplicate attrs in this record - (mapcar (function - (lambda (field) - (if (listp (cdr field)) - (setq duplicates (cons field duplicates)) - (setq unique (cons field unique))))) - record) + (mapc (function + (lambda (field) + (if (listp (cdr field)) + (setq duplicates (cons field duplicates)) + (setq unique (cons field unique))))) + record) (setq result (list unique)) ;; Map over the record fields that have multiple values - (mapcar + (mapc (function (lambda (field) (let ((method (if (consp eudc-duplicate-attribute-handling-method) @@ -641,7 +641,7 @@ Each copy is added a new field containing one of the values of FIELD." (while values (setcdr values (delete (car values) (cdr values))) (setq values (cdr values))) - (mapcar + (mapc (function (lambda (value) (let ((result-list (copy-sequence records))) @@ -974,11 +974,11 @@ queries the server for the existing fields and displays a corresponding form." (capitalize (symbol-name field))))) fields))) ;; Loop over prompt strings to find the longest one - (mapcar (function - (lambda (prompt) - (if (> (length prompt) width) - (setq width (length prompt))))) - prompts) + (mapc (function + (lambda (prompt) + (if (> (length prompt) width) + (setq width (length prompt))))) + prompts) ;; Insert the first widget out of the mapcar to leave the cursor ;; in the first field (widget-insert "\n\n" (format (concat "%" (int-to-string width) "s: ") (car prompts))) @@ -988,15 +988,15 @@ queries the server for the existing fields and displays a corresponding form." eudc-form-widget-list)) (setq fields (cdr fields)) (setq prompts (cdr prompts)) - (mapcar (function - (lambda (field) - (widget-insert "\n\n" (format (concat "%" (int-to-string width) "s: ") (car prompts))) - (setq widget (widget-create 'editable-field - :size 15)) - (setq eudc-form-widget-list (cons (cons field widget) - eudc-form-widget-list)) - (setq prompts (cdr prompts)))) - fields) + (mapc (function + (lambda (field) + (widget-insert "\n\n" (format (concat "%" (int-to-string width) "s: ") (car prompts))) + (setq widget (widget-create 'editable-field + :size 15)) + (setq eudc-form-widget-list (cons (cons field widget) + eudc-form-widget-list)) + (setq prompts (cdr prompts)))) + fields) (widget-insert "\n\n") (widget-create 'push-button :notify (lambda (&rest ignore) diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index f84d98aaed8..7e37d9d4123 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -75,7 +75,7 @@ "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise." (catch 'unmatch (progn - (mapcar + (mapc (function (lambda (condition) (let ((attr (car condition)) @@ -197,22 +197,22 @@ RETURN-ATTRS is a list of attributes to return, defaulting to (if (car query-attrs) (setq records (eval `(bbdb-search ,(quote records) ,@bbdb-attrs)))) (setq query-attrs (cdr query-attrs))) - (mapcar (function - (lambda (record) - (setq filtered (eudc-filter-duplicate-attributes record)) - ;; If there were duplicate attributes reverse the order of the - ;; record so the unique attributes appear first - (if (> (length filtered) 1) - (setq filtered (mapcar (function - (lambda (rec) - (reverse rec))) - filtered))) - (setq result (append result filtered)))) - (delq nil - (mapcar 'eudc-bbdb-format-record-as-result - (delq nil - (mapcar 'eudc-bbdb-filter-non-matching-record - records))))) + (mapc (function + (lambda (record) + (setq filtered (eudc-filter-duplicate-attributes record)) + ;; If there were duplicate attributes reverse the order of the + ;; record so the unique attributes appear first + (if (> (length filtered) 1) + (setq filtered (mapcar (function + (lambda (rec) + (reverse rec))) + filtered))) + (setq result (append result filtered)))) + (delq nil + (mapcar 'eudc-bbdb-format-record-as-result + (delq nil + (mapcar 'eudc-bbdb-filter-non-matching-record + records))))) result)) ;;}}} diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index c484c590abf..f286fe761c9 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -130,7 +130,7 @@ RETURN-ATTRS is a list of attributes to return, defaulting to (setq result (eudc-filter-partial-records result return-attrs))) ;; Apply eudc-duplicate-attribute-handling-method (if (not (eq 'list eudc-duplicate-attribute-handling-method)) - (mapcar + (mapc (function (lambda (record) (setq final-result (append (eudc-filter-duplicate-attributes record) diff --git a/lisp/net/socks.el b/lisp/net/socks.el index 5079e84ce19..fd8e7ec59f2 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -247,7 +247,7 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (defun socks-build-auth-list () (let ((num 0) (retval "")) - (mapcar + (mapc (function (lambda (x) (if (fboundp (cdr (cdr x))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 26846f562f5..c8b2a72aad0 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5695,7 +5695,7 @@ process to set up. VEC specifies the connection." (if (featurep 'mule) ;; Use MULE to select the right EOL convention for communicating ;; with the process. - (let* ((cs (or (process-coding-system proc) + (let* ((cs (or (funcall (symbol-function 'process-coding-system) proc) (cons 'undecided 'undecided))) cs-decode cs-encode) (when (symbolp cs) (setq cs (cons cs cs))) @@ -5708,7 +5708,8 @@ process to set up. VEC specifies the connection." (when (search-forward "\r" nil t) (setq cs-decode (tramp-coding-system-change-eol-conversion cs-decode 'dos))) - (set-buffer-process-coding-system cs-decode cs-encode)) + (funcall (symbol-function 'set-buffer-process-coding-system) + cs-decode cs-encode)) ;; Look for ^M and do something useful if found. (when (search-forward "\r" nil t) ;; We have found a ^M but cannot frob the process coding system diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index c8da0add016..a83d81966a8 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -30,14 +30,14 @@ ;; "autoconf && ./configure" to change them. (X)Emacs version check is defined ;; in macro AC_EMACS_INFO of aclocal.m4; should be changed only there. -(defconst tramp-version "2.1.11-pre" +(defconst tramp-version "2.1.11" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@gnu.org" "Email address to send bug reports to.") ;; Check for (X)Emacs version. -(let ((x (if (or (< emacs-major-version 21) (and (featurep 'xemacs) (< emacs-minor-version 4))) (format "Tramp 2.1.11-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))) "ok"))) +(let ((x (if (or (< emacs-major-version 21) (and (featurep 'xemacs) (< emacs-minor-version 4))) (format "Tramp 2.1.11 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))) "ok"))) (unless (string-match "\\`ok\\'" x) (error x))) (provide 'trampver) diff --git a/lisp/obsolete/hilit19.el b/lisp/obsolete/hilit19.el index 9221753a864..be0b5d622a2 100644 --- a/lisp/obsolete/hilit19.el +++ b/lisp/obsolete/hilit19.el @@ -975,24 +975,24 @@ the entire buffer is forced." (progn ;; BUFFER highlights... - (mapcar (lambda (hook) - (if hilit-mode - (add-hook hook 'hilit-rehighlight-buffer-quietly) - (remove-hook hook 'hilit-rehighlight-buffer-quietly))) - '( - Info-selection-hook + (mapc (lambda (hook) + (if hilit-mode + (add-hook hook 'hilit-rehighlight-buffer-quietly) + (remove-hook hook 'hilit-rehighlight-buffer-quietly))) + '( + Info-selection-hook - ;; runs too early vm-summary-mode-hooks - vm-summary-pointer-hook - vm-preview-message-hook - vm-show-message-hook + ;; runs too early vm-summary-mode-hooks + vm-summary-pointer-hook + vm-preview-message-hook + vm-show-message-hook - rmail-show-message-hook - mail-setup-hook - mh-show-mode-hook + rmail-show-message-hook + mail-setup-hook + mh-show-mode-hook - dired-after-readin-hook - )) + dired-after-readin-hook + )) ) (error (message "Error loading highlight hooks: %s" c) (ding) (sit-for 1))))) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 1e45fe6974b..a0bac0b2871 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -2411,7 +2411,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (let* ((file (expand-file-name buffer-file-name)) (version (and (fboundp 'vc-backend) (eq (vc-backend file) 'CVS) - (vc-workfile-version file)))) + (vc-working-revision file)))) (when version (save-excursion (dolist (cvs-buf (buffer-list)) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 860893bcfa6..db052c4b8f5 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -2595,7 +2595,7 @@ sentence motion in or near comments and multiline strings." ;; set up electric character functions to work with pending-del, ;; (a.k.a. delsel) mode. All symbols get the t value except ;; the functions which delete, which gets 'supersede. -(mapcar +(mapc (function (lambda (sym) (put sym 'delete-selection t) ; for delsel (Emacs) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index f234404e81d..00ec64a85a0 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -841,7 +841,7 @@ Note that the style variables are always made local to the buffer." (and c-file-style (c-set-style c-file-style)) (and c-file-offsets - (mapcar + (mapc (lambda (langentry) (let ((langelem (car langentry)) (offset (cdr langentry))) @@ -1430,15 +1430,15 @@ Key bindings: adaptive-fill-mode adaptive-fill-regexp) nil))) - (mapcar (lambda (var) (unless (boundp var) - (setq vars (delq var vars)))) - '(signal-error-on-buffer-boundary - filladapt-mode - defun-prompt-regexp - font-lock-mode - font-lock-maximum-decoration - parse-sexp-lookup-properties - lookup-syntax-properties)) + (mapc (lambda (var) (unless (boundp var) + (setq vars (delq var vars)))) + '(signal-error-on-buffer-boundary + filladapt-mode + defun-prompt-regexp + font-lock-mode + font-lock-maximum-decoration + parse-sexp-lookup-properties + lookup-syntax-properties)) vars) (lambda () (run-hooks 'c-prepare-bug-report-hooks) diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index c5b9b063812..1ffcb170ca3 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -381,11 +381,11 @@ a null operation." ;; fallback entry. (setq c-special-indent-hook (default-value 'c-special-indent-hook))) - (mapcar (lambda (elem) - (c-set-style-1 elem dont-override)) - ;; Need to go through the variables backwards when we - ;; don't override any settings. - (if (eq dont-override t) (nreverse vars) vars))) + (mapc (lambda (elem) + (c-set-style-1 elem dont-override)) + ;; Need to go through the variables backwards when we + ;; don't override any settings. + (if (eq dont-override t) (nreverse vars) vars))) (setq c-indentation-style stylename) (c-keep-region-active)) @@ -636,7 +636,7 @@ any reason to call this function directly." 'make-variable-buffer-local)) (varsyms (cons 'c-indentation-style (copy-alist c-style-variables)))) (delq 'c-special-indent-hook varsyms) - (mapcar func varsyms) + (mapc func varsyms) ;; Hooks must be handled specially (if this-buf-only-p (make-local-hook 'c-special-indent-hook) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 4de1a845ab4..d030110d85a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1107,11 +1107,11 @@ versions of Emacs." ;;; (setq interpreter-mode-alist (append interpreter-mode-alist ;;; '(("miniperl" . perl-mode)))))) (eval-when-compile - (mapcar (lambda (p) - (condition-case nil - (require p) - (error nil))) - '(imenu easymenu etags timer man info)) + (mapc (lambda (p) + (condition-case nil + (require p) + (error nil))) + '(imenu easymenu etags timer man info)) (if (fboundp 'ps-extend-face-list) (defmacro cperl-ps-extend-face-list (arg) `(ps-extend-face-list ,arg)) @@ -5385,15 +5385,15 @@ indentation and initial hashes. Behaves usually outside of comment." (t (or name (setq name "+++BACK+++")) - (mapcar (lambda (elt) - (if (and (listp elt) (listp (cdr elt))) - (progn - ;; In the other order it goes up - ;; one level only ;-( - (setcdr elt (cons (cons name lst) - (cdr elt))) - (cperl-imenu-addback (cdr elt) t name)))) - (if isback (cdr lst) lst)) + (mapc (lambda (elt) + (if (and (listp elt) (listp (cdr elt))) + (progn + ;; In the other order it goes up + ;; one level only ;-( + (setcdr elt (cons (cons name lst) + (cdr elt))) + (cperl-imenu-addback (cdr elt) t name)))) + (if isback (cdr lst) lst)) lst))) (defun cperl-imenu--create-perl-index (&optional regexp) @@ -6986,17 +6986,17 @@ Use as (setq cperl-unreadable-ok t tm nil) ; Return empty list (error "Aborting: unreadable directory %s" file))))))) - (mapcar (function - (lambda (file) - (cond - ((string-match cperl-noscan-files-regexp file) - nil) - ((not (file-directory-p file)) - (if (string-match cperl-scan-files-regexp file) - (cperl-write-tags file erase recurse nil t noxs topdir))) - ((not recurse) nil) - (t (cperl-write-tags file erase recurse t t noxs topdir))))) - files))) + (mapc (function + (lambda (file) + (cond + ((string-match cperl-noscan-files-regexp file) + nil) + ((not (file-directory-p file)) + (if (string-match cperl-scan-files-regexp file) + (cperl-write-tags file erase recurse nil t noxs topdir))) + ((not recurse) nil) + (t (cperl-write-tags file erase recurse t t noxs topdir))))) + files))) (t (setq xs (string-match "\\.xs$" file)) (if (not (and xs noxs)) @@ -7110,16 +7110,16 @@ One may build such TAGS files from CPerl mode menu." (cperl-tags-hier-fill)) (or tags-table-list (call-interactively 'visit-tags-table)) - (mapcar + (mapc (function (lambda (tagsfile) (message "Updating list of classes... %s" tagsfile) (set-buffer (get-file-buffer tagsfile)) (cperl-tags-hier-fill))) - tags-table-list) + tags-table-list) (message "Updating list of classes... postprocessing...")) - (mapcar remover (car cperl-hierarchy)) - (mapcar remover (nth 1 cperl-hierarchy)) + (mapc remover (car cperl-hierarchy)) + (mapc remover (nth 1 cperl-hierarchy)) (setq to (list nil (cons "Packages: " (nth 1 cperl-hierarchy)) (cons "Methods: " (car cperl-hierarchy)))) (cperl-tags-treeify to 1) @@ -7183,40 +7183,40 @@ One may build such TAGS files from CPerl mode menu." (setcdr to l1) ; Init to dynamic space (setq writeto to) (setq ord 1) - (mapcar move-deeper packages) + (mapc move-deeper packages) (setq ord 2) - (mapcar move-deeper methods) + (mapc move-deeper methods) (if recurse - (mapcar (function (lambda (elt) + (mapc (function (lambda (elt) (cperl-tags-treeify elt (1+ level)))) - (cdr to))) + (cdr to))) ;;Now clean up leaders with one child only - (mapcar (function (lambda (elt) - (if (not (and (listp (cdr elt)) - (eq (length elt) 2))) nil - (setcar elt (car (nth 1 elt))) - (setcdr elt (cdr (nth 1 elt)))))) - (cdr to)) + (mapc (function (lambda (elt) + (if (not (and (listp (cdr elt)) + (eq (length elt) 2))) nil + (setcar elt (car (nth 1 elt))) + (setcdr elt (cdr (nth 1 elt)))))) + (cdr to)) ;; Sort the roots of subtrees (if (default-value 'imenu-sort-function) (setcdr to (sort (cdr to) (default-value 'imenu-sort-function)))) ;; Now add back functions removed from display - (mapcar (function (lambda (elt) - (setcdr to (cons elt (cdr to))))) - (if (default-value 'imenu-sort-function) - (nreverse - (sort root-functions (default-value 'imenu-sort-function))) - root-functions)) + (mapc (function (lambda (elt) + (setcdr to (cons elt (cdr to))))) + (if (default-value 'imenu-sort-function) + (nreverse + (sort root-functions (default-value 'imenu-sort-function))) + root-functions)) ;; Now add back packages removed from display - (mapcar (function (lambda (elt) - (setcdr to (cons (cons (concat "package " (car elt)) - (cdr elt)) - (cdr to))))) - (if (default-value 'imenu-sort-function) - (nreverse - (sort root-packages (default-value 'imenu-sort-function))) - root-packages)))) + (mapc (function (lambda (elt) + (setcdr to (cons (cons (concat "package " (car elt)) + (cdr elt)) + (cdr to))))) + (if (default-value 'imenu-sort-function) + (nreverse + (sort root-packages (default-value 'imenu-sort-function))) + root-packages)))) ;;;(x-popup-menu t ;;; '(keymap "Name1" diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el index c1b00bdddfc..14640649d02 100644 --- a/lisp/progmodes/ebnf-yac.el +++ b/lisp/progmodes/ebnf-yac.el @@ -273,12 +273,12 @@ ;; control character & 8-bit character are set to `error' (let ((table (make-vector 256 'error))) ;; upper & lower case letters: - (mapcar + (mapc #'(lambda (char) (aset table char 'non-terminal)) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") ;; printable characters: - (mapcar + (mapc #'(lambda (char) (aset table char 'character)) "!#$&()*+-.0123456789=?@[\\]^_`~") diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el index be25293c643..66aefe66045 100644 --- a/lisp/progmodes/ebnf2ps.el +++ b/lisp/progmodes/ebnf2ps.el @@ -5004,11 +5004,11 @@ killed after process termination." (defvar ebnf-map-name (let ((map (make-vector 256 ?\_))) - (mapcar #'(lambda (char) - (aset map char char)) - (concat "#$%&+-.0123456789=?@~" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz")) + (mapc #'(lambda (char) + (aset map char char)) + (concat "#$%&+-.0123456789=?@~" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz")) map)) @@ -5553,7 +5553,7 @@ killed after process termination." (ebnf-log "(ebnf-dimensions tree)") (let ((ebnf-total (length tree)) (ebnf-nprod 0)) - (mapcar 'ebnf-production-dimension tree)) + (mapc 'ebnf-production-dimension tree)) tree) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index f903d490565..4d2dd7f315e 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -3461,12 +3461,12 @@ breakpoint overlays." line (string-to-number (match-string (nth 2 indmap))) file (idlwave-shell-file-name (match-string (nth 3 indmap)))) (if (eq bp-re bp-re55) - (setq count (if (match-string 10) 1 + (setq count (if (match-string 10) 1 (if (match-string 8) (string-to-number (match-string 8)))) condition (match-string 13) disabled (not (null (match-string 15))))) - + ;; Add the breakpoint info to the list (nconc idlwave-shell-bp-alist (list (cons (list file line) @@ -3476,9 +3476,9 @@ breakpoint overlays." count nil condition disabled)))))) (setq idlwave-shell-bp-alist (cdr idlwave-shell-bp-alist)) ;; Update breakpoint data - (if (eq bp-re bp-re54) - (mapcar 'idlwave-shell-update-bp old-bp-alist) - (mapcar 'idlwave-shell-update-bp-command-only old-bp-alist)))) + (if (eq bp-re bp-re54) + (mapc 'idlwave-shell-update-bp old-bp-alist) + (mapc 'idlwave-shell-update-bp-command-only old-bp-alist)))) ;; Update the breakpoint overlays (unless no-show (idlwave-shell-update-bp-overlays)) ;; Return the new list @@ -4530,27 +4530,27 @@ idlwave-shell-electric-debug-mode-map) (if (or (featurep 'easymenu) (load "easymenu" t)) (progn - (easy-menu-define + (easy-menu-define idlwave-mode-debug-menu idlwave-mode-map "IDL debugging menus" idlwave-shell-menu-def) (easy-menu-define idlwave-shell-mode-menu idlwave-shell-mode-map "IDL shell menus" idlwave-shell-menu-def) (save-excursion - (mapcar (lambda (buf) - (set-buffer buf) - (if (eq major-mode 'idlwave-mode) - (progn - (easy-menu-remove idlwave-mode-debug-menu) - (easy-menu-add idlwave-mode-debug-menu)))) - (buffer-list))))) + (mapc (lambda (buf) + (set-buffer buf) + (if (eq major-mode 'idlwave-mode) + (progn + (easy-menu-remove idlwave-mode-debug-menu) + (easy-menu-add idlwave-mode-debug-menu)))) + (buffer-list))))) ;; The Breakpoint Glyph ------------------------------------------------------- (defvar idlwave-shell-bp-glyph nil "The glyphs to mark breakpoint lines in the source code.") -(let ((image-alist +(let ((image-alist '((bp . "/* XPM */ static char * file[] = { \"14 12 3 1\", diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 2d143a3ddaa..4400c30b09d 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -916,21 +916,21 @@ static char * file[] = { (idlwave-toolbar-add)) (buffer-list))) ;; For Emacs, add the key definitions to the mode maps - (mapcar (lambda (x) - (let* ((icon (aref x 0)) - (func (aref x 1)) - (show (aref x 2)) - (help (aref x 3)) - (key (vector 'tool-bar func)) - (def (list 'menu-item - "a" - func - :image (symbol-value icon) - :visible show - :help help))) - (define-key idlwave-mode-map key def) - (define-key idlwave-shell-mode-map key def))) - (reverse idlwave-toolbar))) + (mapc (lambda (x) + (let* ((icon (aref x 0)) + (func (aref x 1)) + (show (aref x 2)) + (help (aref x 3)) + (key (vector 'tool-bar func)) + (def (list 'menu-item + "a" + func + :image (symbol-value icon) + :visible show + :help help))) + (define-key idlwave-mode-map key def) + (define-key idlwave-shell-mode-map key def))) + (reverse idlwave-toolbar))) (setq idlwave-toolbar-visible t))) (defun idlwave-toolbar-remove-everywhere () @@ -947,15 +947,15 @@ static char * file[] = { (idlwave-toolbar-remove)) (buffer-list))) ;; For Emacs, remove the key definitions from the mode maps - (mapcar (lambda (x) - (let* (;;(icon (aref x 0)) - (func (aref x 1)) - ;;(show (aref x 2)) - ;;(help (aref x 3)) - (key (vector 'tool-bar func))) - (define-key idlwave-mode-map key nil) - (define-key idlwave-shell-mode-map key nil))) - idlwave-toolbar)) + (mapc (lambda (x) + (let* (;;(icon (aref x 0)) + (func (aref x 1)) + ;;(show (aref x 2)) + ;;(help (aref x 3)) + (key (vector 'tool-bar func))) + (define-key idlwave-mode-map key nil) + (define-key idlwave-shell-mode-map key nil))) + idlwave-toolbar)) (setq idlwave-toolbar-visible nil))) (defun idlwave-toolbar-toggle (&optional force-on) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 1e600d6c456..646f6a80d8e 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -2827,10 +2827,10 @@ If the optional argument EXPAND is non-nil then the actions in ;; Before indenting, run action routines. ;; (if (and expand idlwave-do-actions) - (mapcar 'idlwave-do-action idlwave-indent-expand-table)) + (mapc 'idlwave-do-action idlwave-indent-expand-table)) ;; (if idlwave-do-actions - (mapcar 'idlwave-do-action idlwave-indent-action-table)) + (mapc 'idlwave-do-action idlwave-indent-action-table)) ;; ;; No longer expand abbrevs on the line. The user can do this ;; manually using expand-region-abbrevs. @@ -4242,9 +4242,9 @@ blank lines." (defun idlwave-sintern-keyword-list (kwd-list &optional set) "Sintern a set of keywords (file (key . link) (key2 . link2) ...)" - (mapcar (lambda(x) - (setcar x (idlwave-sintern-keyword (car x) set))) - (cdr kwd-list)) + (mapc (lambda(x) + (setcar x (idlwave-sintern-keyword (car x) set))) + (cdr kwd-list)) kwd-list) (defun idlwave-sintern-rinfo-list (list &optional set default-dir) @@ -5560,11 +5560,11 @@ directories and save the routine info. ;; Define the routine info list (insert "\n(setq idlwave-user-catalog-routines\n '(") (let ((standard-output (current-buffer))) - (mapcar (lambda (x) - (insert "\n ") - (prin1 x) - (goto-char (point-max))) - idlwave-user-catalog-routines)) + (mapc (lambda (x) + (insert "\n ") + (prin1 x) + (goto-char (point-max))) + idlwave-user-catalog-routines)) (insert (format "))\n\n;;; %s ends here\n" (file-name-nondirectory idlwave-user-catalog-file))) (goto-char (point-min)) @@ -5604,11 +5604,11 @@ directories and save the routine info. ;; Define the variable which contains a list of all scanned directories (insert "\n(setq idlwave-path-alist\n '(") (let ((standard-output (current-buffer))) - (mapcar (lambda (x) - (insert "\n ") - (prin1 x) - (goto-char (point-max))) - idlwave-path-alist)) + (mapc (lambda (x) + (insert "\n ") + (prin1 x) + (goto-char (point-max))) + idlwave-path-alist)) (insert "))\n") (save-buffer 0) (kill-buffer (current-buffer)))) @@ -6319,12 +6319,12 @@ When TYPE is not specified, both procedures and functions will be considered." (if (null method) (mapcar 'car (idlwave-class-alist)) (let (rtn) - (mapcar (lambda (x) - (and (nth 2 x) - (or (not type) - (eq type (nth 1 x))) - (push (nth 2 x) rtn))) - (idlwave-all-assq method (idlwave-routines))) + (mapc (lambda (x) + (and (nth 2 x) + (or (not type) + (eq type (nth 1 x))) + (push (nth 2 x) rtn))) + (idlwave-all-assq method (idlwave-routines))) (idlwave-uniquify rtn)))) (defun idlwave-all-method-keyword-classes (method keyword &optional type) @@ -6335,13 +6335,13 @@ When TYPE is not specified, both procedures and functions will be considered." (null keyword)) nil (let (rtn) - (mapcar (lambda (x) - (and (nth 2 x) ; non-nil class - (or (not type) ; correct or unspecified type - (eq type (nth 1 x))) - (assoc keyword (idlwave-entry-keywords x)) - (push (nth 2 x) rtn))) - (idlwave-all-assq method (idlwave-routines))) + (mapc (lambda (x) + (and (nth 2 x) ; non-nil class + (or (not type) ; correct or unspecified type + (eq type (nth 1 x))) + (assoc keyword (idlwave-entry-keywords x)) + (push (nth 2 x) rtn))) + (idlwave-all-assq method (idlwave-routines))) (idlwave-uniquify rtn)))) (defun idlwave-members-only (list club) @@ -7551,7 +7551,7 @@ The list is cached in `idlwave-class-info' for faster access." If RECORD-LINK is non-nil, the keyword text is copied and a text property indicating the link is added." (let (kwds) - (mapcar + (mapc (lambda (key-list) (let ((file (car key-list))) (mapcar (lambda (key-cons) @@ -8277,8 +8277,8 @@ demand _EXTRA in the keyword list." (memq (nth 2 entry) super-classes) ; an inherited class (eq (nth 1 entry) type) ; correct type (eq (car entry) name) ; correct name - (mapcar (lambda (k) (add-to-list 'keywords k)) - (idlwave-entry-keywords entry 'do-link)))) + (mapc (lambda (k) (add-to-list 'keywords k)) + (idlwave-entry-keywords entry 'do-link)))) (setq keywords (idlwave-uniquify keywords))) ;; Return the final list @@ -8437,7 +8437,7 @@ If we do not know about MODULE, just return KEYWORD literally." (if (null keywords) (insert " No keywords accepted.") (setq col 9) - (mapcar + (mapc (lambda (x) (if (>= (+ col 1 (length (car x))) (window-width)) diff --git a/lisp/server.el b/lisp/server.el index 02190a97c6f..22b947ea9f8 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -561,6 +561,7 @@ Server mode runs a process that accepts commands from the (server-quote-arg text))))))))) (defun server-create-tty-frame (tty type proc) + (add-to-list 'frame-inherited-parameters 'client) (let ((frame (server-with-environment (process-get proc 'env) '("LANG" "LC_CTYPE" "LC_ALL" @@ -575,6 +576,16 @@ Server mode runs a process that accepts commands from the ;; Ignore nowait here; we always need to ;; clean up opened ttys when the client dies. `((client . ,proc) + ;; This is a leftover from an earlier + ;; attempt at making it possible for process + ;; run in the server process to use the + ;; environment of the client process. + ;; It has no effect now and to make it work + ;; we'd need to decide how to make + ;; process-environment interact with client + ;; envvars, and then to change the + ;; C functions `child_setup' and + ;; `getenv_internal' accordingly. (environment . ,(process-get proc 'env))))))) ;; ttys don't use the `display' parameter, but callproc.c does to set @@ -594,6 +605,7 @@ Server mode runs a process that accepts commands from the frame)) (defun server-create-window-system-frame (display nowait proc) + (add-to-list 'frame-inherited-parameters 'client) (if (not (fboundp 'make-frame-on-display)) (progn ;; This emacs does not support X. @@ -606,6 +618,7 @@ Server mode runs a process that accepts commands from the ;; `server-save-buffers-kill-terminal' from unexpectedly ;; killing emacs on that frame. (let* ((params `((client . ,(if nowait 'nowait proc)) + ;; This is a leftover, see above. (environment . ,(process-get proc 'env)))) (frame (make-frame-on-display (or display @@ -614,9 +627,8 @@ Server mode runs a process that accepts commands from the (error "Please specify display")) params))) (server-log (format "%s created" frame) proc) - ;; XXX We need to ensure the parameters are - ;; really set because Emacs forgets unhandled - ;; initialization parameters for X frames at + ;; XXX We need to ensure the parameters are really set because Emacs + ;; forgets unhandled initialization parameters for X frames at ;; the moment. (modify-frame-parameters frame params) (select-frame frame) diff --git a/lisp/startup.el b/lisp/startup.el index 947fc0da57a..d1e44bdad6b 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -875,6 +875,10 @@ opening the first frame (e.g. open a connection to an X server).") ;; Run the site-start library if it exists. The point of this file is ;; that it is run before .emacs. There is no point in doing this after ;; .emacs; that is useless. + ;; Note that user-init-file is nil at this point. Code that might + ;; be loaded from site-run-file and wants to test if -q was given + ;; should check init-file-user instead, since that is already set. + ;; See cus-edit.el for an example. (if site-run-file (load site-run-file t t)) @@ -1014,11 +1018,9 @@ opening the first frame (e.g. open a connection to an X server).") (with-current-buffer (window-buffer) (deactivate-mark))) - ;; If the user has a file of abbrevs, read it. - ;; FIXME: after the 22.0 release this should be changed so - ;; that it does not read the abbrev file when -batch is used - ;; on the command line. - (when (and (file-exists-p abbrev-file-name) + ;; If the user has a file of abbrevs, read it (unless -batch). + (when (and (not noninteractive) + (file-exists-p abbrev-file-name) (file-readable-p abbrev-file-name)) (quietly-read-abbrev-file abbrev-file-name)) @@ -1449,7 +1451,7 @@ a face or button specification." (when concise (fancy-splash-insert - :face 'variable-pitch "\n\n" + :face 'variable-pitch "\n" :link '("Dismiss" (lambda (button) (when startup-screen-inhibit-startup-screen (customize-set-variable 'inhibit-startup-screen t) @@ -1489,34 +1491,39 @@ a face or button specification." "Display fancy startup screen. If CONCISE is non-nil, display a concise version of the splash screen in another window." - (with-current-buffer (get-buffer-create "*GNU Emacs*") - (let ((inhibit-read-only t)) - (erase-buffer) - (make-local-variable 'startup-screen-inhibit-startup-screen) - (if pure-space-overflow - (insert pure-space-overflow-message)) - (unless concise - (fancy-splash-head)) - (dolist (text fancy-startup-text) - (apply #'fancy-splash-insert text) - (insert "\n")) - (skip-chars-backward "\n") - (delete-region (point) (point-max)) - (insert "\n") - (fancy-startup-tail concise)) - (use-local-map splash-screen-keymap) - (setq tab-width 22) - (set-buffer-modified-p nil) - (setq buffer-read-only t) - (if (and view-read-only (not view-mode)) - (view-mode-enter nil 'kill-buffer)) - (goto-char (point-min))) - (if (or (window-minibuffer-p) - (window-dedicated-p (selected-window))) - (pop-to-buffer (current-buffer))) - (if concise - (display-buffer (get-buffer "*GNU Emacs*")) - (switch-to-buffer "*GNU Emacs*"))) + (let ((splash-buffer (get-buffer-create "*GNU Emacs*"))) + (with-current-buffer splash-buffer + (let ((inhibit-read-only t)) + (erase-buffer) + (make-local-variable 'startup-screen-inhibit-startup-screen) + (if pure-space-overflow + (insert pure-space-overflow-message)) + (unless concise + (fancy-splash-head)) + (dolist (text fancy-startup-text) + (apply #'fancy-splash-insert text) + (insert "\n")) + (skip-chars-backward "\n") + (delete-region (point) (point-max)) + (insert "\n") + (fancy-startup-tail concise)) + (use-local-map splash-screen-keymap) + (setq tab-width 22 + buffer-read-only t) + (set-buffer-modified-p nil) + (if (and view-read-only (not view-mode)) + (view-mode-enter nil 'kill-buffer)) + (goto-char (point-max))) + (if concise + (progn + (display-buffer splash-buffer) + ;; If the splash screen is in a split window, fit it. + (let ((window (get-buffer-window splash-buffer t))) + (or (null window) + (eq window (selected-window)) + (eq window (next-window window)) + (fit-window-to-buffer window)))) + (switch-to-buffer splash-buffer)))) (defun fancy-about-screen () "Display fancy About screen." @@ -2149,9 +2156,11 @@ A fancy display is used on graphic displays, normal otherwise." (expand-file-name (command-line-normalize-file-name orig-argi) dir))) - (if (= file-count 1) - (setq first-file-buffer (find-file file)) - (find-file-other-window file))) + (cond ((= file-count 1) + (setq first-file-buffer (find-file file))) + (inhibit-startup-screen + (find-file-other-window file)) + (t (find-file file)))) (or (zerop line) (goto-line line)) (setq line 0) @@ -2208,12 +2217,12 @@ A fancy display is used on graphic displays, normal otherwise." ;; Don't let the hook be run twice. (setq window-setup-hook nil)) - ;; Do this now to avoid an annoying delay if the user - ;; clicks the menu bar during the sit-for. - (when (display-popup-menus-p) - (precompute-menubar-bindings)) - (with-no-warnings - (setq menubar-bindings-done t)) + ;; ;; Do this now to avoid an annoying delay if the user + ;; ;; clicks the menu bar during the sit-for. + ;; (when (display-popup-menus-p) + ;; (precompute-menubar-bindings)) + ;; (with-no-warnings + ;; (setq menubar-bindings-done t)) ;; If *scratch* exists and is empty, insert initial-scratch-message. (and initial-scratch-message diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 8326c920528..1c4b60706aa 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -89,18 +89,18 @@ (define-key map "\e[23;6~" [C-S-f11]) (define-key map "\e[24;6~" [C-S-f12]) - (define-key map "\eO3P" [A-f1]) - (define-key map "\eO3Q" [A-f2]) - (define-key map "\eO3R" [A-f3]) - (define-key map "\eO3S" [A-f4]) - (define-key map "\e[15;3~" [A-f5]) - (define-key map "\e[17;3~" [A-f6]) - (define-key map "\e[18;3~" [A-f7]) - (define-key map "\e[19;3~" [A-f8]) - (define-key map "\e[20;3~" [A-f9]) - (define-key map "\e[21;3~" [A-f10]) - (define-key map "\e[23;3~" [A-f11]) - (define-key map "\e[24;3~" [A-f12]) + (define-key map "\eO3P" [M-f1]) + (define-key map "\eO3Q" [M-f2]) + (define-key map "\eO3R" [M-f3]) + (define-key map "\eO3S" [M-f4]) + (define-key map "\e[15;3~" [M-f5]) + (define-key map "\e[17;3~" [M-f6]) + (define-key map "\e[18;3~" [M-f7]) + (define-key map "\e[19;3~" [M-f8]) + (define-key map "\e[20;3~" [M-f9]) + (define-key map "\e[21;3~" [M-f10]) + (define-key map "\e[23;3~" [M-f11]) + (define-key map "\e[24;3~" [M-f12]) (define-key map "\eO4P" [M-S-f1]) (define-key map "\eO4Q" [M-S-f2]) @@ -164,12 +164,12 @@ (define-key map "\e[1;8F" [C-M-S-end]) (define-key map "\e[1;8H" [C-M-S-home]) - (define-key map "\e[1;3A" [A-up]) - (define-key map "\e[1;3B" [A-down]) - (define-key map "\e[1;3C" [A-right]) - (define-key map "\e[1;3D" [A-left]) - (define-key map "\e[1;3F" [A-end]) - (define-key map "\e[1;3H" [A-home]) + (define-key map "\e[1;3A" [M-up]) + (define-key map "\e[1;3B" [M-down]) + (define-key map "\e[1;3C" [M-right]) + (define-key map "\e[1;3D" [M-left]) + (define-key map "\e[1;3F" [M-end]) + (define-key map "\e[1;3H" [M-home]) (define-key map "\e[2~" [insert]) (define-key map "\e[3~" [delete]) @@ -206,10 +206,10 @@ (define-key map "\e[5;8~" [C-M-S-prior]) (define-key map "\e[6;8~" [C-M-S-next]) - (define-key map "\e[2;3~" [A-insert]) - (define-key map "\e[3;3~" [A-delete]) - (define-key map "\e[5;3~" [A-prior]) - (define-key map "\e[6;3~" [A-next]) + (define-key map "\e[2;3~" [M-insert]) + (define-key map "\e[3;3~" [M-delete]) + (define-key map "\e[5;3~" [M-prior]) + (define-key map "\e[6;3~" [M-next]) (define-key map "\e[4~" [select]) (define-key map "\e[29~" [print]) @@ -425,18 +425,18 @@ (define-key map [f47] [C-S-f11]) (define-key map [f48] [C-S-f12]) - (define-key map [f49] [A-f1]) - (define-key map [f50] [A-f2]) - (define-key map [f51] [A-f3]) - (define-key map [f52] [A-f4]) - (define-key map [f53] [A-f5]) - (define-key map [f54] [A-f6]) - (define-key map [f55] [A-f7]) - (define-key map [f56] [A-f8]) - (define-key map [f57] [A-f9]) - (define-key map [f58] [A-f10]) - (define-key map [f59] [A-f11]) - (define-key map [f60] [A-f12]) + (define-key map [f49] [M-f1]) + (define-key map [f50] [M-f2]) + (define-key map [f51] [M-f3]) + (define-key map [f52] [M-f4]) + (define-key map [f53] [M-f5]) + (define-key map [f54] [M-f6]) + (define-key map [f55] [M-f7]) + (define-key map [f56] [M-f8]) + (define-key map [f57] [M-f9]) + (define-key map [f58] [M-f10]) + (define-key map [f59] [M-f11]) + (define-key map [f60] [M-f12]) map) "Keymap of possible alternative meanings for some keys.") diff --git a/lisp/textmodes/org-export-latex.el b/lisp/textmodes/org-export-latex.el index 9aedae9461b..2cf08b399e6 100644 --- a/lisp/textmodes/org-export-latex.el +++ b/lisp/textmodes/org-export-latex.el @@ -1,10 +1,15 @@ -;;; org-export-latex.el --- LaTeX exporter for Org-mode + ;;; org-export-latex.el --- LaTeX exporter for org-mode +;; ;; Copyright (C) 2007 Free Software Foundation, Inc. ;; +;; Emacs Lisp Archive Entry +;; Filename: org-export-latex.el +;; Version: 5.11 ;; Author: Bastien Guerry -;; Keywords: org organizer latex export convert -;; Homepage: http://www.cognition.ens.fr/~guerry/u/org-export-latex.el -;; Version: 5.09 +;; Maintainer: Bastien Guerry +;; Keywords: org, wp, tex +;; Description: Converts an org-mode buffer into LaTeX +;; URL: http://www.cognition.ens.fr/~guerry/u/org-export-latex.el ;; ;; This file is part of GNU Emacs. ;; @@ -17,7 +22,7 @@ ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ;; more details. -;; +;; ;; You should have received a copy of the GNU General Public License along ;; with GNU Emacs; see the file COPYING. If not, write to the Free Software ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -83,12 +88,17 @@ The %s formatter will be replaced by the title of the section." :type 'alist) (defcustom org-export-latex-emphasis-alist - '(("*" "\\textbf{%s}") - ("/" "\\emph{%s}") - ("_" "\\underline{%s}") - ("+" "\\texttt{%s}") - ("=" "\\texttt{%s}")) - "Alist of LaTeX expressions to convert emphasis fontifiers." + '(("*" "\\textbf{%s}" nil) + ("/" "\\emph{%s}" nil) + ("_" "\\underline{%s}" nil) + ("+" "\\texttt{%s}" nil) + ("=" "\\texttt{%s}" nil)) + "Alist of LaTeX expressions to convert emphasis fontifiers. +Each element of the list is a list of three elements. +The first element is the character used as a marker for fontification. +The second element is a formatting string to wrap fontified text with. +The third element decides whether to protect converted text from other +conversions." :group 'org-export-latex :type 'alist) @@ -101,6 +111,14 @@ The %s formatter will be replaced by the title of the section." :group 'org-export-latex :type 'string) +(defcustom org-export-latex-title-command "\\maketitle" + "The command used to insert the title just after \\begin{document}. +If this string contains the formatting specification \"%s\" then +it will be used as a formatting string, passing the title as an +argument." + :group 'org-export-latex + :type 'string) + (defcustom org-export-latex-date-format "%d %B %Y" "Format string for \\date{...}." @@ -124,11 +142,14 @@ For example: :type 'alist) (defcustom org-export-latex-low-levels 'description - "Choice for converting sections that are below the current -admitted level of sectioning. This can be either nil (ignore the -sections), 'description (convert them as description lists) or a -string to be used instead of \\section{%s} (a %s for inserted the -headline is mandatory)." + "How to convert sections below the current level of sectioning, +as specified by `org-export-headline-levels' or the value of \"H:\" +in Org's #+OPTION line. + +This can be either nil (skip the sections), 'description (convert +the sections as descriptive lists) or a string to be used instead +of \\section{%s}. In this latter case, the %s stands here for the +inserted headline and is mandatory." :group 'org-export-latex :type '(choice (const :tag "Ignore" nil) (symbol :tag "Convert as descriptive list" description) @@ -248,7 +269,8 @@ in a window. A non-interactive call will only retunr the buffer." (message "Exporting to LaTeX...") (org-update-radio-target-regexp) (org-export-latex-set-initial-vars ext-plist) - (let* ((opt-plist org-latex-options-plist) + (let* ((wcf (current-window-configuration)) + (opt-plist org-latex-options-plist) (filename (concat (file-name-as-directory (org-export-directory :LaTeX ext-plist)) (file-name-sans-extension @@ -284,15 +306,27 @@ in a window. A non-interactive call will only retunr the buffer." region :emph-multiline t :for-LaTeX t :comments nil - :add-text text + :add-text (if (eq to-buffer 'string) nil text) :skip-before-1st-heading skip :LaTeX-fragments nil))) - (set-buffer buffer) + + (set-buffer buffer) (erase-buffer) - (unless body-only (insert preamble)) - (when text (insert (org-export-latex-content text) "\n\n")) - (unless skip (insert first-lines)) + (and (fboundp 'set-buffer-file-coding-system) + (set-buffer-file-coding-system coding-system-for-write)) + + ;; insert the preamble and initial document commands + (unless (or (eq to-buffer 'string) body-only) + (insert preamble)) + + ;; insert text found in #+TEXT + (when (and text (not (eq to-buffer 'string))) + (insert (org-export-latex-content text) "\n\n")) + + ;; insert lines before the first headline + (unless (or skip (eq to-buffer 'string)) + (insert first-lines)) ;; handle the case where the region does not begin with a section (when region-p @@ -300,25 +334,30 @@ in a window. A non-interactive call will only retunr the buffer." (insert string-for-export) (org-export-latex-first-lines)))) + ;; export the content of headlines (org-export-latex-global (with-temp-buffer (insert string-for-export) (goto-char (point-min)) - (re-search-forward "^\\(\\*+\\) " nil t) - (let* ((asters (length (match-string 1))) - (level (if odd (- asters 2) (- asters 1)))) - (setq org-latex-add-level - (if odd (1- (/ (1+ asters) 2)) (1- asters))) - (org-export-latex-parse-global level odd)))) - + (when (re-search-forward "^\\(\\*+\\) " nil t) + (let* ((asters (length (match-string 1))) + (level (if odd (- asters 2) (- asters 1)))) + (setq org-latex-add-level + (if odd (1- (/ (1+ asters) 2)) (1- asters))) + (org-export-latex-parse-global level odd))))) + + ;; finalization (unless body-only (insert "\n\\end{document}")) (or to-buffer (save-buffer)) (goto-char (point-min)) (message "Exporting to LaTeX...done") - (if (eq to-buffer 'string) - (prog1 (buffer-substring (point-min) (point-max)) - (kill-buffer (current-buffer))) - (current-buffer)))) + (prog1 + (if (eq to-buffer 'string) + (prog1 (buffer-substring (point-min) (point-max)) + (kill-buffer (current-buffer))) + (current-buffer)) + (set-window-configuration wcf)))) + ;;; Parsing functions: (defun org-export-latex-parse-global (level odd) @@ -484,8 +523,11 @@ and its content." ;;; Exporting internals: -(defun org-latex-protect (string) - (add-text-properties 0 (length string) '(org-protected t) string) string) +(defun org-export-latex-protect-string (string) + "Prevent further conversion for STRING by adding the +org-protect property." + (add-text-properties + 0 (length string) '(org-protected t) string) string) (defun org-export-latex-protect-char-in-string (char-list string) "Add org-protected text-property to char from CHAR-LIST in STRING." @@ -518,54 +560,65 @@ EXT-PLIST is an optional additional plist." "Make the LaTeX preamble and return it as a string. Argument OPT-PLIST is the options plist for current buffer." (let ((toc (plist-get opt-plist :table-of-contents))) - (concat (if (plist-get opt-plist :time-stamp-file) - (format-time-string "% Created %Y-%m-%d %a %H:%M\n")) - - ;; LaTeX custom preamble - org-export-latex-preamble "\n" - - ;; LaTeX packages - (if org-export-latex-packages-alist - (mapconcat (lambda(p) - (if (equal "" (car p)) - (format "\\usepackage{%s}" (cadr p)) - (format "\\usepackage[%s]{%s}" - (car p) (cadr p)))) - org-export-latex-packages-alist "\n") "") - "\n\\begin{document}\n\n" - - ;; title - (format - "\\title{%s}\n" - (or (plist-get opt-plist :title) - (and (not - (plist-get opt-plist :skip-before-1st-heading)) - (org-export-grab-title-from-buffer)) - (and buffer-file-name - (file-name-sans-extension - (file-name-nondirectory buffer-file-name))) - "UNTITLED")) - - ;; author info - (if (plist-get opt-plist :author-info) - (format "\\author{%s}\n" - (or (plist-get opt-plist :author) user-full-name)) - (format "%%\\author{%s}\n" - (or (plist-get opt-plist :author) user-full-name))) - - ;; date - (format "\\date{%s}\n" - (format-time-string - (or (plist-get opt-plist :date) - org-export-latex-date-format))) - - "\\maketitle\n\n" - ;; table of contents - (if (and (plist-get opt-plist :section-numbers) toc) - (format "\\setcounter{tocdepth}{%s}\n" - (plist-get opt-plist :headline-levels)) "") - (if (and (plist-get opt-plist :section-numbers) toc) - "\\tableofcontents\n" "\n")))) + (concat + (if (plist-get opt-plist :time-stamp-file) + (format-time-string "% Created %Y-%m-%d %a %H:%M\n")) + + ;; insert LaTeX custom preamble + org-export-latex-preamble "\n" + + ;; insert information on LaTeX packages + (when org-export-latex-packages-alist + (mapconcat (lambda(p) + (if (equal "" (car p)) + (format "\\usepackage{%s}" (cadr p)) + (format "\\usepackage[%s]{%s}" + (car p) (cadr p)))) + org-export-latex-packages-alist "\n")) + + ;; insert the title + (format + "\\title{%s}\n" + (or (plist-get opt-plist :title) + (and (not + (plist-get opt-plist :skip-before-1st-heading)) + (org-export-grab-title-from-buffer)) + (and buffer-file-name + (file-name-sans-extension + (file-name-nondirectory buffer-file-name))) + "UNTITLED")) + + ;; insert author info + (if (plist-get opt-plist :author-info) + (format "\\author{%s}\n" + (or (plist-get opt-plist :author) user-full-name)) + (format "%%\\author{%s}\n" + (or (plist-get opt-plist :author) user-full-name))) + + ;; insert the date + (format "\\date{%s}\n" + (format-time-string + (or (plist-get opt-plist :date) + org-export-latex-date-format))) + + ;; beginning of the document + "\n\\begin{document}\n\n" + + ;; insert the title command + (if (string-match "%s" org-export-latex-title-command) + (format org-export-latex-title-command + (plist-get opt-plist :title)) + org-export-latex-title-command) + "\n\n" + + ;; table of contents + (when (and org-export-with-toc + (plist-get opt-plist :section-numbers)) + (cond ((numberp toc) + (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n" + (min toc (plist-get opt-plist :headline-levels)))) + (toc (format "\\setcounter{tocdepth}{%s}\n\\tableofcontents\n\n" + (plist-get opt-plist :headline-levels)))))))) (defun org-export-latex-first-lines (&optional comments) "Export the first lines before first headline. @@ -640,6 +693,7 @@ formatting string like %%%%s if we want to comment them out." (plist-get org-latex-options-plist :tables)) (org-export-latex-fixed-width (plist-get org-latex-options-plist :fixed-width)) + ;; return string (buffer-substring (point-min) (point-max)))) (defun org-export-latex-quotation-marks () @@ -658,7 +712,7 @@ Local definition of the language overrides (mapc (lambda(l) (goto-char (point-min)) (while (re-search-forward (car l) nil t) (let ((rpl (concat (match-string 1) (cadr l)))) - (org-latex-protect rpl) + (org-export-latex-protect-string rpl) (org-if-unprotected (replace-match rpl t t))))) quote-rpl))) @@ -688,42 +742,42 @@ See the `org-export-latex.el' code for a complete conversion table." ;; Put the point where to check for org-protected (unless (get-text-property (match-beginning 2) 'org-protected) (cond ((member (match-string 2) '("\\$" "$")) - (if (equal (match-string 2) "\\$") - (replace-match (concat (match-string 1) "$" - (match-string 3)) t t) - (replace-match (concat (match-string 1) "\\$" - (match-string 3)) t t))) - ((member (match-string 2) '("&" "#" "%")) - (if (equal (match-string 1) "\\") - (replace-match (match-string 2) t t) - (replace-match (concat (match-string 1) "\\" - (match-string 2)) t t))) - ((equal (match-string 2) "~") - (cond ((equal (match-string 1) "\\") nil) - ((eq 'org-link (get-text-property 0 'face (match-string 2))) - (replace-match (concat (match-string 1) "\\~") t t)) - (t (replace-match - (org-latex-protect - (concat (match-string 1) "\\~{}")) t t)))) - ((member (match-string 2) '("{" "}")) - (unless (save-match-data (org-inside-LaTeX-fragment-p)) - (if (equal (match-string 1) "\\") - (replace-match (match-string 2) t t) - (replace-match (concat (match-string 1) "\\" - (match-string 2)) t t))))) + (if (equal (match-string 2) "\\$") + (replace-match (concat (match-string 1) "$" + (match-string 3)) t t) + (replace-match (concat (match-string 1) "\\$" + (match-string 3)) t t))) + ((member (match-string 2) '("&" "%" "#")) + (if (equal (match-string 1) "\\") + (replace-match (match-string 2) t t) + (replace-match (concat (match-string 1) "\\" + (match-string 2)) t t))) + ((equal (match-string 2) "~") + (cond ((equal (match-string 1) "\\") nil) + ((eq 'org-link (get-text-property 0 'face (match-string 2))) + (replace-match (concat (match-string 1) "\\~") t t)) + (t (replace-match + (org-export-latex-protect-string + (concat (match-string 1) "\\~{}")) t t)))) + ((member (match-string 2) '("{" "}")) + (unless (save-match-data (org-inside-LaTeX-fragment-p)) + (if (equal (match-string 1) "\\") + (replace-match (match-string 2) t t) + (replace-match (concat (match-string 1) "\\" + (match-string 2)) t t))))) (unless (save-match-data (org-inside-LaTeX-fragment-p)) - (cond ((equal (match-string 2) "\\") - (replace-match (or (save-match-data - (org-export-latex-treat-backslash-char - (match-string 1) - (match-string 3))) "") t t)) - ((member (match-string 2) '("_" "^")) - (replace-match (or (save-match-data - (org-export-latex-treat-sub-super-char - sub-superscript - (match-string 1) - (match-string 2) - (match-string 3))) "") t t))))))) + (cond ((equal (match-string 2) "\\") + (replace-match (or (save-match-data + (org-export-latex-treat-backslash-char + (match-string 1) + (match-string 3))) "") t t)) + ((member (match-string 2) '("_" "^")) + (replace-match (or (save-match-data + (org-export-latex-treat-sub-super-char + sub-superscript + (match-string 1) + (match-string 2) + (match-string 3))) "") t t))))))) '("^\\([^\n$]*?\\|^\\)\\(\\\\?\\$\\)\\([^\n$]*\\)$" "\\([a-za-z0-9]+\\|[ \t\n]\\|\\b\\|\\\\\\)\\(_\\|\\^\\)\\([a-za-z0-9]+\\|[ \t\n]\\|[:punct:]\\|{[a-za-z0-9]+}\\|([a-za-z0-9]+)\\)" "\\(.\\|^\\)\\(\\\\\\)\\([ \t\n]\\|[a-zA-Z&#%{}\"]+\\)" @@ -732,7 +786,10 @@ See the `org-export-latex.el' code for a complete conversion table." "\\(.\\|^\\)\\(%\\)" "\\(.\\|^\\)\\({\\)" "\\(.\\|^\\)\\(}\\)" - "\\(.\\|^\\)\\(~\\)"))) + "\\(.\\|^\\)\\(~\\)" + ;; (?\< . "\\textless{}") + ;; (?\> . "\\textgreater{}") + ))) (defun org-export-latex-treat-sub-super-char (subsup string-before char string-after) @@ -759,9 +816,9 @@ Convert CHAR depending on STRING-BEFORE and STRING-AFTER." (format "$%s%s{%s}$" string-before char (match-string 1 string-after))) (subsup (concat "$" string-before char string-after "$")) - (t (org-latex-protect + (t (org-export-latex-protect-string (concat string-before "\\" char "{}" string-after))))) - (t (org-latex-protect + (t (org-export-latex-protect-string (concat string-before "\\" char "{}" string-after))))) (defun org-export-latex-treat-backslash-char (string-before string-after) @@ -775,17 +832,21 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." ((and (not (string-match "^[ \n\t]" string-after)) (not (string-match "[ \t]\\'\\|^" string-before))) ;; backslash is inside a word - (concat string-before "$\\backslash$" string-after)) + (org-export-latex-protect-string + (concat string-before "\\textbackslash{}" string-after))) ((not (or (equal string-after "") (string-match "^[ \t\n]" string-after))) ;; backslash might escape a character (like \#) or a user TeX ;; macro (like \setcounter) - (concat string-before "\\" string-after)) + (org-export-latex-protect-string + (concat string-before "\\" string-after))) ((and (string-match "^[ \t\n]" string-after) (string-match "[ \t\n]\\'" string-before)) ;; backslash is alone, convert it to $\backslash$ - (concat string-before "$\\backslash$" string-after)) - (t (concat string-before "$\\backslash$" string-after)))) + (org-export-latex-protect-string + (concat string-before "\\textbackslash{}" string-after))) + (t (org-export-latex-protect-string + (concat string-before "\\textbackslash{}" string-after))))) (defun org-export-latex-keywords (timestamps) "Convert special keywords to LaTeX. @@ -801,6 +862,7 @@ Regexps are those from `org-latex-special-string-regexps'." (defun org-export-latex-fixed-width (opt) "When OPT is non-nil convert fixed-width sections to LaTeX." (goto-char (point-min)) + ;; FIXME the search shouldn't be performed on already converted text (while (re-search-forward "^[ \t]*:" nil t) (if opt (progn (goto-char (match-beginning 0)) @@ -816,7 +878,6 @@ Regexps are those from `org-latex-special-string-regexps'." (match-string 2)) t t) (forward-line)))))) -;; FIXME Use org-export-highlight-first-table-line ? (defun org-export-latex-lists () "Convert lists to LaTeX." (goto-char (point-min)) @@ -883,52 +944,87 @@ Valid parameters are ;; Add a trailing \n after list conversion "\n")) -(defun org-export-latex-tables (opt) - "When OPT is non-nil convert tables to LaTeX." +;; FIXME Use org-export-highlight-first-table-line ? +(defun org-export-latex-tables (insert) + "Convert tables to LaTeX and INSERT it." (goto-char (point-min)) (while (re-search-forward "^\\([ \t]*\\)|" nil t) - ;; Re-align the table to update org-table-last-alignment - ;; (save-excursion (save-match-data (org-table-align))) - (let (tbl-list - (beg (match-beginning 0)) - (end (save-excursion - (re-search-forward - (concat "^" (regexp-quote (match-string 1)) - "[^|]\\|\\'") nil t) (match-beginning 0)))) - (beginning-of-line) + ;; FIXME really need to save-excursion? + (save-excursion (org-table-align)) + (let* ((beg (org-table-begin)) + (end (org-table-end)) + (raw-table (buffer-substring-no-properties beg end)) + fnum line lines olines gr colgropen line-fmt alignment) (if org-export-latex-tables-verbatim - (let* ((raw-table (buffer-substring beg end)) - (tbl (concat "\\begin{verbatim}\n" raw-table + (let* ((tbl (concat "\\begin{verbatim}\n" raw-table "\\end{verbatim}\n"))) (apply 'delete-region (list beg end)) (insert tbl)) - (progn - (while (not (eq end (point))) - (if (looking-at "[ \t]*|\\([^-|].+\\)|[ \t]*$") - (push (split-string (org-trim (match-string 1)) "|") tbl-list) - (push 'hline tbl-list)) - (forward-line)) - ;; comment region out instead of deleting it ? + (progn + (setq lines (split-string raw-table "\n" t)) (apply 'delete-region (list beg end)) - (when opt (insert (orgtbl-to-latex (nreverse tbl-list) - nil) "\n\n"))))))) + (when org-export-table-remove-special-lines + (setq lines (org-table-clean-before-export lines))) + ;; make a formatting string to reflect aligment + (setq olines lines) + (while (and (not line-fmt) (setq line (pop olines))) + (unless (string-match "^[ \t]*|-" line) + (setq fields (org-split-string line "[ \t]*|[ \t]*")) + (setq fnum (make-vector (length fields) 0)) + (setq line-fmt + (mapconcat + (lambda (x) + (setq gr (pop org-table-colgroup-info)) + (format "%s%%s%s" + (cond ((eq gr ':start) + (prog1 (if colgropen "|" "") + (setq colgropen t))) + ((eq gr ':startend) + (prog1 (if colgropen "|" "|") + (setq colgropen nil))) + (t "")) + (if (memq gr '(:end :startend)) + (progn (setq colgropen nil) "|") + ""))) + fnum "")))) + ;; maybe remove the first and last "|" + (when (string-match "^\\(|\\)?\\(.+\\)|$" line-fmt) + (setq line-fmt (match-string 2 line-fmt))) + ;; format alignment + (setq align (apply 'format + (cons line-fmt + (mapcar (lambda (x) (if x "r" "l")) + org-table-last-alignment)))) + ;; prepare the table to send to orgtbl-to-latex + (setq lines + (mapcar + (lambda(elem) + (or (and (string-match "[ \t]*|-+" elem) 'hline) + (split-string (org-trim elem) "|" t))) + lines)) + (when insert + (insert (orgtbl-to-latex + lines `(:tstart ,(concat "\\begin{tabular}{" align "}"))) + "\n\n"))))))) (defun org-export-latex-fontify () "Convert fontification to LaTeX." (goto-char (point-min)) (while (re-search-forward org-emph-re nil t) ;; The match goes one char after the *string* - (unless (get-text-property (1- (point)) 'org-protected) - (replace-match - (concat (match-string 1) - (format - (org-export-latex-protect-char-in-string - '("\\" "{" "}") - (cadr (assoc (match-string 3) - org-export-latex-emphasis-alist))) - (match-string 4)) - (match-string 5)) t t) - (backward-char)))) + (let ((emph (assoc (match-string 3) + org-export-latex-emphasis-alist)) + rpl) + (unless (get-text-property (1- (point)) 'org-protected) + (setq rpl (concat (match-string 1) + (format (org-export-latex-protect-char-in-string + '("\\" "{" "}") (cadr emph)) + (match-string 4)) + (match-string 5))) + (if (caddr emph) + (setq rpl (org-export-latex-protect-string rpl))) + (replace-match rpl t t))) + (backward-char))) (defun org-export-latex-links () ;; Make sure to use the LaTeX hyperref and graphicx package @@ -982,12 +1078,6 @@ Valid parameters are (&optional commentsp) "Clean stuff in the LaTeX export." - ;; align all tables - (goto-char (point-min)) - (while (re-search-forward "^\\([ \t]*\\)|" nil t) - ;; Re-align the table to update org-table-last-alignment - (org-table-align)) - ;; Preserve line breaks (goto-char (point-min)) (while (re-search-forward "\\\\\\\\" nil t) @@ -998,13 +1088,13 @@ Valid parameters are (goto-char (point-min)) (let ((case-fold-search nil) rpl) (while (re-search-forward "\\([^+_]\\)LaTeX" nil t) - (replace-match (org-latex-protect + (replace-match (org-export-latex-protect-string (concat (match-string 1) "\\LaTeX{}")) t t))) ;; Convert horizontal rules (goto-char (point-min)) (while (re-search-forward "^----+.$" nil t) - (replace-match (org-latex-protect "\\hrule") t t)) + (replace-match (org-export-latex-protect-string "\\hrule") t t)) ;; Protect LaTeX \commands{...} (goto-char (point-min)) @@ -1018,7 +1108,7 @@ Valid parameters are (concat "<<>>?\\((INVISIBLE)\\)?") nil t) (replace-match - (org-latex-protect + (org-export-latex-protect-string (format "\\label{%s}%s"(match-string 1) (if (match-string 2) "" (match-string 1)))) t t)) @@ -1035,7 +1125,7 @@ Valid parameters are (while (re-search-forward "\\[[0-9]+\\]" nil t) (when (save-match-data (save-excursion (beginning-of-line) - (looking-at "[^:|]"))) + (looking-at "[^:|#]"))) (let ((foot-beg (match-beginning 0)) (foot-end (match-end 0)) (foot-prefix (match-string 0)) diff --git a/lisp/textmodes/org-publish.el b/lisp/textmodes/org-publish.el index a72b477d0b2..bc45a7d9941 100644 --- a/lisp/textmodes/org-publish.el +++ b/lisp/textmodes/org-publish.el @@ -426,7 +426,7 @@ nil if not found." (defun org-publish-get-plist-from-filename (filename) "Return publishing configuration plist for file FILENAME." (let ((found nil)) - (mapcar + (mapc (lambda (plist) (let ((files (org-publish-get-base-files plist))) (if (member (expand-file-name filename) files) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index f4746b48f6b..6c48c47d3ad 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 5.08 +;; Version: 5.11b ;; ;; This file is part of GNU Emacs. ;; @@ -83,7 +83,7 @@ ;;; Version -(defconst org-version "5.09" +(defconst org-version "5.11" "The version number of the file org.el.") (defun org-version () (interactive) @@ -120,7 +120,16 @@ (unwind-protect (progn ,@body) (goto-line _line) - (move-to-column _col)))) + (move-to-column _col)))) + +(defmacro org-without-partial-completion (&rest body) + `(let ((pc-mode (and (boundp 'partial-completion-mode) + partial-completion-mode))) + (unwind-protect + (progn + (if pc-mode (partial-completion-mode -1)) + ,@body) + (if pc-mode (partial-completion-mode 1))))) ;;; The custom variables @@ -131,6 +140,13 @@ :group 'hypermedia :group 'calendar) +;; FIXME: Needs a separate group... +(defcustom org-completion-fallback-command 'hippie-expand + "The expansion command called by \\[org-complete] in normal context. +Normal means, no org-mode-specific context." + :group 'org + :type 'function) + (defgroup org-startup nil "Options concerning startup of Org-mode." :tag "Org Startup" @@ -415,7 +431,7 @@ contexts. See `org-show-hierarchy-above' for valid contexts." :tag "Org Cycle" :group 'org-structure) -(defcustom org-drawers '("PROPERTIES") +(defcustom org-drawers '("PROPERTIES" "CLOCK") "Names of drawers. Drawers are not opened by cycling on the headline above. Drawers only open with a TAB on the drawer line itself. A drawer looks like this: @@ -714,7 +730,9 @@ use the first keyword in its list that means done." (string :tag "Use this keyword"))) (defcustom org-archive-stamp-time t - "Non-nil means, add a time stamp to entries moved to an archive file." + "Non-nil means, add a time stamp to entries moved to an archive file. +This variable is obsolete and has no effect anymore, instead add ot remove +`time' from the variablle `org-archive-save-context-info'." :group 'org-archive :type 'boolean) @@ -736,7 +754,8 @@ For each symbol present in the list, a property will be created in the archived entry, with a prefix \"PRE_ARCHIVE_\", to remember this information." :group 'org-archive - :type '(set + :type '(set :greedy t + (const :tag "Time" time) (const :tag "File" file) (const :tag "Category" category) (const :tag "TODO state" todo) @@ -1599,7 +1618,10 @@ the following lines anywhere in the buffer: #+STARTUP: nologging #+STARTUP: lognotedone #+STARTUP: lognotestate - #+STARTUP: lognoteclock-out" + #+STARTUP: lognoteclock-out + +You can have local logging settings for a subtree by setting the LOGGING +property to one or more of these keywords." :group 'org-todo :group 'org-progress :type '(choice @@ -1646,11 +1668,32 @@ When nil, the notes will be orderer according to time." (defcustom org-log-repeat t "Non-nil means, prompt for a note when REPEAT is resetting a TODO entry. -When nil, no note will be taken." +When nil, no note will be taken. +This option can also be set with on a per-file-basis with + + #+STARTUP: logrepeat + #+STARTUP: nologrepeat + +You can have local logging settings for a subtree by setting the LOGGING +property to one or more of these keywords." :group 'org-todo :group 'org-progress :type 'boolean) +(defcustom org-clock-into-drawer 2 + "Should clocking info be wrapped into a drawer? +When t, clocking info will always be inserted into a :CLOCK: drawer. +If necessary, the drawer will be created. +When nil, the drawer will not be created, but used when present. +When an integer and the number of clocking entries in an item +reaches or exceeds this number, a drawer will be created." + :group 'org-todo + :group 'org-progress + :type '(choice + (const :tag "Always" t) + (const :tag "Only when drawer exists" nil) + (integer :tag "When at least N clock entries"))) + (defcustom org-clock-out-when-done t "When t, the clock will be stopped when the relevant entry is marked DONE. Nil means, clock will keep running until stopped explicitly with @@ -1681,6 +1724,13 @@ This is the priority an item get if no explicit priority is given." :group 'org-priorities :type 'character) +(defcustom org-priority-start-cycle-with-default t + "Non-nil means, start with default priority when starting to cycle. +When this is nil, the first step in the cycle will be (depending on the +command used) one higher or lower that the default priority." + :group 'org-priorities + :type 'boolean) + (defgroup org-time nil "Options concerning time stamps and deadlines in Org-mode." :tag "Org Time" @@ -1694,15 +1744,6 @@ the time stamp will always be forced into the second line." :group 'org-time :type 'boolean) -(defcustom org-insert-labeled-timestamps-before-properties-drawer t - "Non-nil means, always insert planning info before property drawer. -When this is nil and there is a property drawer *directly* after -the headline, move the planning info into the drawer. If the property -drawer separated from the headline by at least one line, this variable -has no effect." - :group 'org-time - :type 'boolean) - (defconst org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>") "Formats for `format-time-string' which are used for time stamps. It is not recommended to change this constant.") @@ -1824,11 +1865,11 @@ displaying the tags menu is not even shown, until you press C-c again." "Non-nil means, fast tags selection interface will also offer TODO states. This is an undocumented feature, you should not rely on it.") -(defcustom org-tags-column 48 +(defcustom org-tags-column -80 "The column to which tags should be indented in a headline. If this number is positive, it specifies the column. If it is negative, it means that the tags should be flushright to that column. For example, --79 works well for a normal 80 character screen." +-80 works well for a normal 80 character screen." :group 'org-tags :type 'integer) @@ -1962,6 +2003,12 @@ forth between agenda and calendar." :group 'org-agenda :type 'sexp) +(defcustom org-agenda-compact-blocks nil + "Non-nil means, make the block agenda more compact. +This is done by leaving out unnecessary lines." + :group 'org-agenda + :type nil) + (defgroup org-agenda-export nil "Options concerning exporting agenda views in Org-mode." :tag "Org Agenda Export" @@ -2192,7 +2239,7 @@ The idea behind this is that such items will appear in the agenda anyway." (defcustom org-agenda-skip-scheduled-if-done nil "Non-nil means don't show scheduled items in agenda when they are done. This is relevant for the daily/weekly agenda, not for the TODO list. And -it applied only to the actualy date of the scheduling. Warnings about +it applies only to the actual date of the scheduling. Warnings about an item with a past scheduling dates are always turned off when the item is DONE." :group 'org-agenda-skip @@ -2467,9 +2514,9 @@ agenda entries." :group 'org-agenda-sorting :type 'boolean) -(defgroup org-agenda-prefix nil +(defgroup org-agenda-line-format nil "Options concerning the entry prefix in the Org-mode agenda display." - :tag "Org Agenda Prefix" + :tag "Org Agenda Line Format" :group 'org-agenda) (defcustom org-agenda-prefix-format @@ -2532,7 +2579,7 @@ See also the variables `org-agenda-remove-times-when-in-prefix' and (cons (const timeline) (string :tag "Format")) (cons (const todo) (string :tag "Format")) (cons (const tags) (string :tag "Format")))) - :group 'org-agenda-prefix) + :group 'org-agenda-line-format) (defvar org-prefix-format-compiled nil "The compiled version of the most recently used prefix format. @@ -2549,7 +2596,7 @@ cluttered. The option can be t or nil. It may also be the symbol `beg', indicating that the time should only be removed what it is located at the beginning of the headline/diary entry." - :group 'org-agenda-prefix + :group 'org-agenda-line-format :type '(choice (const :tag "Always" t) (const :tag "Never" nil) @@ -2560,7 +2607,7 @@ the headline/diary entry." "Default duration for appointments that only have a starting time. When nil, no duration is specified in such cases. When non-nil, this must be the number of minutes, e.g. 60 for one hour." - :group 'org-agenda-prefix + :group 'org-agenda-line-format :type '(choice (integer :tag "Minutes") (const :tag "No default duration"))) @@ -2570,7 +2617,7 @@ When non-nil, this must be the number of minutes, e.g. 60 for one hour." "Non-nil means, remove the tags from the headline copy in the agenda. When this is the symbol `prefix', only remove tags when `org-agenda-prefix-format' contains a `%T' specifier." - :group 'org-agenda-prefix + :group 'org-agenda-line-format :type '(choice (const :tag "Always" t) (const :tag "Never" nil) @@ -2580,11 +2627,17 @@ When this is the symbol `prefix', only remove tags when (defvaralias 'org-agenda-remove-tags-when-in-prefix 'org-agenda-remove-tags)) -(defcustom org-agenda-align-tags-to-column 65 - "Shift tags in agenda items to this column." - :group 'org-agenda-prefix +(defcustom org-agenda-tags-column -80 + "Shift tags in agenda items to this column. +If this number is positive, it specifies the column. If it is negative, +it means that the tags should be flushright to that column. For example, +-80 works well for a normal 80 character screen." + :group 'org-agenda-line-format :type 'integer) +(if (fboundp 'defvaralias) + (defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column)) + (defgroup org-latex nil "Options for embedding LaTeX code into Org-mode" :tag "Org LaTeX" @@ -2610,7 +2663,7 @@ This is a property list with the following properties: \"$$\" find math expressions surrounded by $$....$$ \"\\(\" find math expressions surrounded by \\(...\\) \"\\ [\" find math expressions surrounded by \\ [...\\]" - :group 'org-export-latex + :group 'org-latex :type 'plist) (defcustom org-format-latex-header "\\documentclass{article} @@ -2622,7 +2675,7 @@ This is a property list with the following properties: \\usepackage[mathscr]{eucal} \\pagestyle{empty} % do not remove" "The document header used for processing LaTeX fragments." - :group 'org-export-latex + :group 'org-latex :type 'string) (defgroup org-export nil @@ -2980,6 +3033,11 @@ Org-mode file." :group 'org-export-html :type 'coding-system) +(defcustom org-export-html-extension "html" + "The extension for exported HTML files." + :group 'org-export-html + :type 'string) + (defcustom org-export-html-style "