summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-05-10 15:04:01 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-05-10 15:04:01 +0000
commit5fc2ccaa85fce4949d1ddf2b46604e90cb703b53 (patch)
tree137a1fec4b571b565f4294b5109df3d1b0650a2b
parentccaa691f6c297164c6206bb40691848f5c24099b (diff)
parentbd014eec0fdd7d1b2b37fe06f3451dfbf635ff6e (diff)
downloademacs-5fc2ccaa85fce4949d1ddf2b46604e90cb703b53.tar.gz
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-266 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-267 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-268 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-269 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-270 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-271 Rename "field-at-point" to "field-at-pos" * emacs@sv.gnu.org/emacs--devo--0--patch-272 (comint-insert-input): Remove redundant calls to setq and goto-char git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in2
-rw-r--r--admin/ChangeLog5
-rw-r--r--admin/FOR-RELEASE3
-rw-r--r--etc/ChangeLog6
-rw-r--r--etc/MH-E-NEWS1268
-rw-r--r--etc/NEWS91
-rw-r--r--info/dir1
-rw-r--r--lisp/ChangeLog239
-rw-r--r--lisp/add-log.el3
-rw-r--r--lisp/arc-mode.el48
-rw-r--r--lisp/autorevert.el4
-rw-r--r--lisp/avoid.el22
-rw-r--r--lisp/battery.el8
-rw-r--r--lisp/comint.el46
-rw-r--r--lisp/cus-start.el2
-rw-r--r--lisp/diff-mode.el18
-rw-r--r--lisp/dired-aux.el4
-rw-r--r--lisp/ediff.el68
-rw-r--r--lisp/emacs-lisp/easy-mmode.el8
-rw-r--r--lisp/emacs-lisp/ewoc.el20
-rw-r--r--lisp/emacs-lisp/re-builder.el35
-rw-r--r--lisp/emacs-lisp/syntax.el17
-rw-r--r--lisp/env.el2
-rw-r--r--lisp/files.el50
-rw-r--r--lisp/font-lock.el8
-rw-r--r--lisp/ibuffer.el7
-rw-r--r--lisp/isearch.el19
-rw-r--r--lisp/kmacro.el20
-rw-r--r--lisp/ldefs-boot.el4
-rw-r--r--lisp/mh-e/ChangeLog10
-rw-r--r--lisp/mh-e/mh-e.el35
-rw-r--r--lisp/mwheel.el21
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/progmodes/gdb-ui.el48
-rw-r--r--lisp/progmodes/grep.el44
-rw-r--r--lisp/progmodes/vhdl-mode.el3
-rw-r--r--lisp/progmodes/xscheme.el9
-rw-r--r--lisp/server.el2
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/speedbar.el17
-rw-r--r--lisp/startup.el27
-rw-r--r--lisp/subr.el32
-rw-r--r--lisp/term/mac-win.el521
-rw-r--r--lisp/term/xterm.el8
-rw-r--r--lisp/textmodes/ispell.el30
-rw-r--r--lisp/url/ChangeLog5
-rw-r--r--lisp/url/url-http.el4
-rw-r--r--lispref/ChangeLog40
-rw-r--r--lispref/commands.texi2
-rw-r--r--lispref/compile.texi4
-rw-r--r--lispref/files.texi4
-rw-r--r--lispref/hooks.texi71
-rw-r--r--lispref/internals.texi16
-rw-r--r--lispref/keymaps.texi9
-rw-r--r--lispref/minibuf.texi19
-rw-r--r--lispref/nonascii.texi2
-rw-r--r--lispref/numbers.texi2
-rw-r--r--lispref/variables.texi13
-rw-r--r--lispref/windows.texi4
-rw-r--r--man/ChangeLog206
-rw-r--r--man/Makefile.in23
-rw-r--r--man/abbrevs.texi4
-rw-r--r--man/arevert-xtra.texi191
-rw-r--r--man/buffers.texi8
-rw-r--r--man/building.texi2
-rw-r--r--man/cal-xtra.texi838
-rw-r--r--man/calendar.texi82
-rw-r--r--man/cmdargs.texi3
-rw-r--r--man/custom.texi13
-rw-r--r--man/dired-xtra.texi49
-rw-r--r--man/dired.texi9
-rw-r--r--man/display.texi2
-rw-r--r--man/emacs-xtra.texi3787
-rw-r--r--man/emacs.texi31
-rw-r--r--man/emerge-xtra.texi414
-rw-r--r--man/faq.texi38
-rw-r--r--man/files.texi189
-rw-r--r--man/fortran-xtra.texi548
-rw-r--r--man/frames.texi8
-rw-r--r--man/gnu.texi2
-rw-r--r--man/help.texi2
-rw-r--r--man/macos.texi7
-rw-r--r--man/maintaining.texi7
-rw-r--r--man/makefile.w32-in24
-rw-r--r--man/mh-e.texi78
-rw-r--r--man/mini.texi3
-rw-r--r--man/misc.texi2
-rw-r--r--man/msdog-xtra.texi687
-rw-r--r--man/msdog.texi32
-rw-r--r--man/picture-xtra.texi291
-rw-r--r--man/programs.texi18
-rw-r--r--man/sending.texi2
-rw-r--r--man/texinfo.tex170
-rw-r--r--man/text.texi8
-rw-r--r--man/tramp.texi12
-rw-r--r--man/trouble.texi10
-rw-r--r--man/vc-xtra.texi32
-rw-r--r--man/vc1-xtra.texi151
-rw-r--r--man/vc2-xtra.texi789
-rw-r--r--man/xresmini.texi135
-rw-r--r--man/xresources.texi6
-rw-r--r--src/.gdbinit155
-rw-r--r--src/ChangeLog152
-rw-r--r--src/callproc.c2
-rw-r--r--src/coding.c19
-rw-r--r--src/coding.h3
-rw-r--r--src/fileio.c2
-rw-r--r--src/image.c21
-rw-r--r--src/keyboard.c3
-rw-r--r--src/keymap.c16
-rw-r--r--src/mac.c125
-rw-r--r--src/macfns.c67
-rw-r--r--src/macgui.h7
-rw-r--r--src/macmenu.c2
-rw-r--r--src/macselect.c216
-rw-r--r--src/macterm.c653
-rw-r--r--src/macterm.h8
-rw-r--r--src/minibuf.c2
-rw-r--r--src/process.c12
-rw-r--r--src/termhooks.h6
-rw-r--r--src/xdisp.c18
122 files changed, 7942 insertions, 5500 deletions
diff --git a/ChangeLog b/ChangeLog
index 2bf1024844b..e2f103f8169 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-06 Eli Zaretskii <eliz@gnu.org>
+
+ * Makefile.in (INFO_FILES): Remove emacs-xtra.
+
+ * info/dir: Remove the Emacs-Xtra entry.
+
2006-04-20 Ramprasad B <ramprasad_i82@yahoo.com>
* Copyright (sources/emacs): updated copyright year(s)
diff --git a/Makefile.in b/Makefile.in
index 12ef4befb48..7193bd1af26 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -135,7 +135,7 @@ man1dir=$(mandir)/man1
# system, it is inappropriate to imply that it is part of Emacs.
infodir=@infodir@
INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \
- elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake \
+ elisp eintr emacs emacs-mime eshell eudc flymake \
forms gnus idlwave info message mh-e newsticker org pcl-cvs \
pgg reftex sc ses sieve speedbar tramp vip viper widget \
woman smtpmail url rcirc erc
diff --git a/admin/ChangeLog b/admin/ChangeLog
index 9dc0def4788..ef6fcb44041 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-06 Bill Wohler <wohler@newt.com>
+
+ * FOR-RELEASE: MH-E 8.0 has been released, so removed reminder
+ about it.
+
2006-04-17 Ramprasad B <ramprasad_i82@yahoo.com>
* ./* (Copyright): Updated Copyright year(s)
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 9fcdb57f250..a34bde7d329 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -26,9 +26,6 @@ face name prefixes should be in it for good results.
** Send an email to the various distributions, including the GNOME
and KDE projects, to use the new Emacs icons in etc/images/icons.
-** Ensure MH-E 8.0 has been released.
-Assigned to Bill Wohler <wohler@newt.com>.
-
* BUGS
** JD Smith's 17 Apr 2006 bug report that CVS operations
diff --git a/etc/ChangeLog b/etc/ChangeLog
index c99d2dce179..16578fa0a6c 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-06 Bill Wohler <wohler@newt.com>
+
+ Release MH-E version 8.0.
+
+ * NEWS, MH-E-NEWS: Update for MH-E release 8.0.
+
2006-04-28 Bill Wohler <wohler@newt.com>
Release MH-E version 7.95.
diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS
index db9de4b9043..18744a67008 100644
--- a/etc/MH-E-NEWS
+++ b/etc/MH-E-NEWS
@@ -6,186 +6,259 @@ Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
-* Changes in MH-E 7.95
-
-Version 7.95, the second 8.0 release candidate, fixes a single bug.
-It would be good to check this version ASAP since the Emacs pretest is
-coming in days: if no showstopper problems are found in this version
-it will be promoted to 8.0 before the pretest. Thanks for your help!
-
-** Bug Fixes in MH-E 7.95
-
-*** Folder Completion Fails in fcc: Field
+* Changes in MH-E 8.0
+
+Version 8.0 supports GNU mailutils, S/MIME, picons, which-func-mode,
+sports an improved interface for hiding header fields, improves upon
+the MH variant detection, improves folder completion, makes the pick
+search equivalent to the other types of searches, spruces up the tool
+bar, creates the correct MIME type when including OpenOffice
+documents, works on a Mac, adds colors to buttons for signed or
+encrypted messages, incorporates new features introduced in
+Emacs 22.1, fixes a bunch of bugs, and best of all, comes with an
+updated manual!
+
+Internally, MH-E now sports a new software organization which will
+help future maintainability. As a side-effect, the number of XEmacs
+compilation warnings has plummeted from hundreds to just three. CVS
+users will notice that MH-E has been migrated from the CVS repository
+from SourceForge to Savannah (but only for those files that were
+already part of Emacs). As a result, the location of MH-E in the
+load-path has changed, and mh-e-autoloads.el was renamed to
+mh-autoloads.el. See section INSTALL in the README for details. While
+this migration will benefit maintainers, it will also benefit users:
+CVS Emacs users will not have to check out MH-E separately and welcome
+faster MH-E updates, and CVS MH-E users will welcome faster MH-E
+updates from Emacs developers. Read section CVS MH-E INSTALL in the
+README for details.
-This has been fixed (closes SF #1476270).
+While not related to this release, the MH-E mailing lists are now
+gatewayed at gmane.org (closes SF #979308).
-* Changes in MH-E 7.94
+If you want to see the release notes for the alpha and beta releases
+leading up this release, please see:
-Version 7.94, the first 8.0 release candidate, fixes a bunch of bugs,
-incorporates new features introduced in Emacs 22.1, improves folder
-completion, and spruces up the tool bar.
+ http://cvs.savannah.gnu.org/viewcvs/emacs/etc/MH-E-NEWS?rev=1.25&root=emacs&view=markup
-** New Features in MH-E 7.94
+
-*** Add :package-version Keyword to Options
+** New Features in MH-E 8.0
-This `defcustom', `defgroup', and `defface' keyword was introduced in
-Emacs 22.1. MH-E has been extended to take advantage of it. With this
-keyword, you can now use `M-x customize-changed-options' to see what
-options in MH-E have changed between versions of Emacs. In a future
-version of Emacs, you'll be able to see changes between MH-E versions
-as well (closes SF #1452724).
+*** GNU mailutils Support
-** Bug Fixes in MH-E 7.94
+MH-E now supports GNU mailutils 0.4 and higher versions.
-*** mhparam -components Fails on mailutils
+*** S/MIME Support
-This error prevented MH-E from loading when using GNU mailutils. GNU
-mailutils drops the `s' in this argument, so we did too since
--component still works in nmh and MH (closes SF #1446985).
+MH-E now supports S/MIME using Gnus 5.10.6 or higher.
-*** "/ s" Still Has Problems With []'d Mail
+*** Picon Support
-On XEmacs, subjects that had special characters would prevent `/ s'
-from narrowing to the given subject. These characters are now quoted
-correctly in XEmacs (closes SF #1447598).
+In addition to the other methods of displaying an icon for the sender
+of a message, MH-E can now display images from a picon directory. The
+directory search path is found in the `mh-picon-directory-list'
+variable. More documentation is found in the "facedb" sections in the
+xfaces man page.
-*** Incorrect Example in mh-folder-list Docstring
+*** Catchup Command
-This has been fixed (closes SF #1448498).
+There is a new `F c' (`mh-catchup') command that marks all unread
+messages in the current folder as read.
-*** Variable mh-send-args Is a String, Not a List
+*** Use which-func-mode to Display Folder in Index Mode
-This was causing errors when sending under GNU mailutils. The internal
-variable `mh-send-args' is now a list which fixes the problem (closes
-SF #1448604).
+Turning on `which-func-mode' displays the folder name of the message
+under the cursor in index folders (closes SF #855520).
-*** Update Icons
+*** Quick Key Help
-Most of the tool bar icons have been replaced by GTK or GNOME 2 icons
-(closes SF #1452715).
+The `?' (`mh-help') function now displays the help in its own buffer
+called *MH-E Help* (closes SF #493740 and SF #656631).
-*** Can't customize tool bar for current session
+*** Search Unification
-If you customized `mh-tool-bar-folder-buttons' or
-`mh-tool-bar-letter-buttons', and clicked Set for Current Session, the
-tool bar was not updated. This has been fixed (closes SF #1452718).
+The old `F s' behavior of adding messages to the search sequence has
+been removed. The `F i' keybinding was deprecated and the new `F s'
+(`mh-search') command is used to initiate either indexed or pick
+searches. Within the MH-Search buffer (renamed from MH-Pick), the
+command `C-c C-p' (`mh-pick-do-search') now runs pick on the given
+folder recursively and displays the results in a search folder like
+the other search methods (closes SF #829207).
-*** Strip Build Number From emacs-version in X-Mailer
+*** Entry Points Have Moved
-This has been done (closes SF #1466481).
+Emacs 21 users must now add `(require 'mh-autoloads)' because the
+entry points (such as `mh-rmail' and `mh-smail') have moved to
+different files which have made the autoloads that come with Emacs
+inaccurate. This change was necessary because the code was reorganized
+to remove circular dependencies, to make the code more stable and
+maintainable, and to reduce the time to load MH-E.
-*** mh-folder-completion-function Problems
+*** MH-Folder Keymap Changes
-One could not longer browse folders outside of the standard MH Mail
-directory. This has been fixed. As a beneficial side-effect, you can
-once again use SPC to complete folders (closes SF #1470518).
+There is now a keymap for the printing functions whose prefix is `P'.
+The command `l' (`mh-print-msg') has been replaced with `P l' although
+we suggest you use the new `P p' instead.
-*** Rename Function and Variable Definers
+Key 7.4.4 8.0
-If you had ever shown help for an MH-E symbol that was both a function
-or variable, you might have found that the hyperlink to the file
-brought you to the wrong definition. This has been fixed by renaming
-the macros `mh-defgroup', `mh-defcustom', `mh-defface',
-`mh-defun-compat', and `mh-defmacro-compat' to `defgroup-mh',
-`defcustom-mh', `defface-mh', `defun-mh', `defmacro-mh' respectively
-(closes SF #1472029).
+; - mh-toggle-mh-decode-mime-flag
+l mh-print-msg -
+/ f mh-narrow-to-from -
+/ r mh-narrow-to-range -
+/ g - mh-narrow-to-range
+/ m - mh-narrow-to-from
+F c - mh-catchup
+F i mh-index-search -
+F s mh-search-folder mh-search
+K e - mh-display-with-external-viewer
+K t - mh-toggle-mime-buttons
+P ? - mh-prefix-help
+P C - mh-ps-print-toggle-color
+P F - mh-ps-print-toggle-faces
+P f - mh-ps-print-msg-file
+P l - mh-print-msg
+P p - mh-ps-print-msg
-*** mh-insert-letter Uses Wrong Default
+*** MH-Letter Keymap Changes
-If you had used `C-c TAB' (`mh-insert-letter') to insert a letter into
-your draft, specified a different folder, and chose the default
-message number, you got the wrong message. This has been fixed (closes
-SF #1473729).
+The change where `mh-letter-mode' derives from `mail-mode' adds a few
+keybindings. Some are interesting: experiment! Only the keybinding
+changes for MH-E functions are listed here.
-*** "echo -e" in Makefile Causes Solaris 10 Problem
+Most of the changes have to do with the renaming of the functions with
+"mhn" in them to "mh" because nmh doesn't use `mhn'. The names were
+also made consistent with the the family of "mml" functions.
-This construct has been replaced with printf, which is reputed to be
-more portable (closes SF #1467222, #1473908).
+The type of signing or encryption has been generalized so the method
+is now an option rather than a part of the function's name. The option
+is `mh-mml-method-default' and choices include PGP (MIME), PGP,
+S/MIME, or none.
-* Changes in MH-E 7.93
+Key 7.4.4 8.0
-Version 7.93, the fourth 8.0 beta release, fixes a handful of bugs in
-searching and limiting exposed during continued beta testing.
+C-c C-e mh-edit-mhn mh-mh-to-mime
+C-c RET C-e mh-mml-secure-message-encrypt-pgpmime
+ mh-mml-secure-message-encrypt
+C-c RET C-g - mh-mh-compose-anon-ftp
+C-c RET C-n - mh-mml-unsecure-message
+C-c RET C-s mh-mml-secure-message-sign-pgpmime
+ mh-mml-secure-message-sign
+C-c RET C-t - mh-mh-compose-external-compressed-tar
+C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo
+C-c RET C-x - mh-mh-compose-external-type
+C-c RET e mh-mml-secure-message-encrypt-pgpmime
+ Prefix Command
+C-c RET e e - mh-mml-secure-message-encrypt
+C-c RET e s - mh-mml-secure-message-signencrypt
+C-c RET g - mh-mh-compose-anon-ftp
+C-c RET n - mh-mml-unsecure-message
+C-c RET s - Prefix Command
+C-c RET s e - mh-mml-secure-message-signencrypt
+C-c RET s s - mh-mml-secure-message-sign
+C-c RET t - mh-mh-compose-external-compressed-tar
+C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo
+C-c RET x - mh-mh-compose-external-type
-** Variables Deleted in MH-E 7.93
+C-c C-f C-a - mh-to-field
+C-c C-f C-l - mh-to-field
+C-c C-f RET - mh-to-field
+C-c C-f a - mh-to-field
+C-c C-f l - mh-to-field
+C-c C-f m - mh-to-field
-*** mh-show-use-goto-addr-flag
+*** MH-Search Keymap Changes
-This flag was redundant and inconsistent with
-`goto-address-highlight-p' at the same time, so we removed it. Please
-customize `goto-address-highlight-p' if you wish to turn off email
-address and URL highlighting.
+These are the changes associated with the new search mode. The command
+`C-c C-c' (`mh-index-do-search') now performs the standard indexed
+search, while `C-c C-p' (`mh-pick-do-search') runs pick as before,
+only better!
-** Bug Fixes in MH-E 7.93
+The `mh-to-field' keybindings were adjusted to be consistent with
+those in the MH-Letter mode.
-*** `/ s' Can Miss the Original Mail
+Key 7.4.4 8.0
-The command `/ s' failed to include the message with the "Re:" in the
-Subject. This has been fixed (closes SF #1438369).
+C-c C-c mh-do-search mh-index-do-search
+C-c C-f C-d mh-to-field -
+C-c C-f C-f mh-to-field -
+C-c C-f C-r mh-to-field -
+C-c C-f RET - mh-to-field
+C-c C-f d mh-to-field -
+C-c C-f f mh-to-field -
+C-c C-f m - mh-to-field
+C-c C-f r mh-to-field -
+C-c TAB mh-index-do-search -
-*** XEmacs -nw Fails with number-char-or-marker-p Error
+*** Updates to X-Image-URL
-Hopefully, this is the last we'll hear of problems associated with
-XEmacs' incompatible `device-color-cells' function (closes SF
-#1436924).
+Now support the use of `curl' and `fetch' as alternatives to `wget' to
+obtain the image. The display of images are controlled with the
+`mh-show-use-xface-flag' option while the `mh-fetch-x-image-url'
+option controls how the images are fetched.
-*** Pick-based Searches Fail
+The default of `mh-fetch-x-image-url' has been changed to "Never
+Fetch." Those of you who like the value of "Ask Before Fetching" will
+have to customize this option (closes SF #831278).
-The command `C-c C-p' failed to find any matches. This has been fixed
-(closes SF #1435381).
+WARNING: There are security concerns with this feature. Please read
+the documentation for these options carefully before changing the
+default.
-*** Can't Narrow to Subject with Regexp Chars
+*** Updates to mh-identity-list
-The command `/ s' could not limit subjects that had special pick
-characters (such as [, *, $, .). This has been fixed (closes SF
-#1432548).
+Note that the field names found in `mh-identity-list' that refer to
+the fields in `mh-identity-handlers' have changed in an incompatible
+way from 7.4.4. In general, the symbolic names now have a ":" prefix
+to avoid collisions with header fields. Before starting Emacs, edit
+your .emacs and insert ":" before "signature" if you have defined it.
-
+You can change your attribution in replies with the new "Attribution
+Verb" field, and you can set your default GPG user ID with the "GPG
+key ID" field.
-* Changes in MH-E 7.92
+Signatures can now be read from the `mh-signature-file-name' variable,
+or come from a function, in addition to a named file. If you write
+your own function, variables that you can use include
+`mh-signature-separator-regexp', `mh-signature-separator',
+and `mh-signature-separator-p'.
-Version 7.92, the third 8.0 beta release, removes the "sed -i" in the
-Makefile (SF #1432060), tunes the setting of `mh-image-load-path',
-works around systems that do not have face inheritance, fixes several
-issues with searching on XEmacs, and creates the correct MIME type
-when including OpenOffice documents.
+The handling of these fields has been moved into a new
+`mh-identity-handlers' option, an alist of fields (strings) and
+handlers (functions). Strings are lowercase. Use ":signature" for
+Signature and ":pgg-default-user-id" for GPG Key ID. The function
+associated with the string "default" is used if no other functions are
+appropriate. For this reason, don't name a header field "Default".
-* Changes in MH-E 7.91
+If you point your signature at a vCard file with a vcf suffix, then it
+will be incorporated as a vCard body part (closes SF #802723).
-Version 7.91 is the second 8.0 beta release and fixes several bugs
-that were uncovered in wider testing.
+*** Updates to Speedbar
-* Changes in MH-E 7.90
+The speedbar now renders the folders with unseen messages in boldface
+which makes them easier to identify (closes SF #623369).
-Version 7.90 is the first 8.0 beta release and is a release that has
-finally broken away from some unfortunate legacy decisions in favor of
-something that will be easier to use and support. Many bugs were fixed
-and many features were added, including making the pick search
-equivalent to the other types of searches.
+*** Updates to mh-msg-is-in-seq
-The rewrite of the manual accelerated dramatically in recent months
-and drove the changes in this release. In order to make the
-manual--and hence the software--better, clearer, more consistent, more
-predictable, and easier to understand, many variables and functions
-were renamed. The changes to the user-visible variables are listed
-here. It is our hope that you, dear MH-E user, will embrace the
-changes for the better and forgive us from making so many incompatible
-changes.
+Can now specify an alternate message number to `S s'
+(`mh-msg-is-in-seq') with a prefix argument.
-If you use undocumented functionality, be sure to read the ChangeLog
-for changes that might affect you.
+*** Updates to mh-to-field-choices
-** New Features in MH-E 7.90
+In MH-Letter mode, you can use the `C-c C-f' (`mh-to-field') prefix to
+go to and insert fields. The fields `Reply-To:', `Mail-Reply-To:',
+`Mail-Followup-To:' can now be created via the `C-r', `C-a' (for
+author), and `C-l' keys respectively. The key for the `From:' field
+has been renamed from `C-r' to `C-m' for consistency with `mail-mode'
+(closes SF #1400139).
-*** Entry Points Have Moved
+*** Change Content-Type Renderer on the Fly in MH-Show Buffer
-Emacs 21 users must now add `(require 'mh-autoloads)' because the
-entry points (such as `mh-rmail' and `mh-smail') have moved to
-different files which have made the autoloads that come with Emacs
-inaccurate. This change was necessary because the code was reorganized
-to remove circular dependencies, to make the code more stable and
-maintainable, and to reduce the time to load MH-E.
+This has been implemented by adding the key binding `K e'
+(`mh-display-with-external-viewer'). For inline text/html parts,
+buttons aren't displayed by default. In that case use `K t'
+(`mh-toggle-mime-buttons') to display the button before viewing it
+with an external browser (closes SF #839318).
*** MH-E No Longer Calls install-mh
@@ -193,28 +266,26 @@ The new variant detection code makes use of `mhparam' which assumes
that your MH environment has already been set up. The code to call
`install-mh', which could no longer be run anyway, was removed.
-*** Use run-hook-with-args
+*** Add :package-version Keyword to Options
-We use normal hooks whenever possible and do not use
-`run-hook-with-args' (with one documented exception) (closes SF
-#643702).
+This `defcustom', `defgroup', and `defface' keyword was introduced in
+Emacs 22.1. MH-E has been extended to take advantage of it. With this
+keyword, you can now use `M-x customize-changed-options' to see what
+options in MH-E have changed between versions of Emacs. In a future
+version of Emacs, you'll be able to see changes between MH-E versions
+as well (closes SF #1452724).
-*** Merge mh-index.el and mh-pick.el
+*** Render Signature and vCard in Italics
-We merged `mh-index.el' and `mh-pick.el' into a new file
-`mh-search.el'. As part of this process, the old `F s' behavior of
-adding messages to the search sequence has been removed. The `F i'
-keybinding was then renamed to `F s' (`mh-search'). The mode of the
-search-pattern buffer was renamed from MH-Pick to MH-Search. Within
-the MH-Search buffer, the command `C-c C-p' (`mh-pick-do-search') now
-runs pick on the given folder recursively and displays the results in
-a search folder like the other search methods (closes SF #829207).
+This has been implemented. Use `mh-show-signature-face' to customize
+the face used (closes SF #802722).
-*** Improve Security of mh-fetch-x-image-url
+*** Derive mh-letter-mode from mail-mode
-The default has been changed to "Never Fetch." Those of you who like
-the value of "Ask Before Fetching" will have to customize this option
-(closes SF #831278).
+MH-Letter mode is now derived from `mail-mode'. We were able to delete
+a lot of code. In return, there are a few `mail-mode' commands that
+are available that may or may not be useful and the `mail-mode-hook'
+is run (closes SF #1385571).
*** Remove Emacs 20 Support
@@ -222,100 +293,92 @@ As it turns out, we had already added some code that didn't work on
Emacs 20. However, now we've formalized it and removed code that was
present solely for Emacs 20 support (closes SF #1359240).
-*** Derive mh-letter-mode from mail-mode
-
-MH-Letter mode is now derived from `mail-mode'. We were able to delete
-a lot of code. In return, there are a few `mail-mode' commands that
-are available that may or may not be useful and the `mail-mode-hook'
-is run (closes SF #1385571).
+*** Glimpse Support Removed
-*** Add Choices to mh-to-field-choices
+Since glimpse isn't free, we cannot mention it. Glimpse has been
+removed from the option `mh-indexer-choices' (closes SF #831276).
-In MH-Letter mode, you can use the "C-c C-f (mh-to-field)" prefix to
-go to and insert fields. The fields "Reply-To:", "Mail-Reply-To:",
-"Mail-Followup-To:" can now be created via the "C-r", "C-a" (for
-author), and "C-l" keys respectively. The key for the "From:" field
-has been renamed from "C-r" to "C-m" for consistency with `mail-mode'
-(closes SF #1400139).
+*** Use run-hook-with-args
-*** MH-Folder Keymap Changes
+We use normal hooks whenever possible and do not use
+`run-hook-with-args' (with one documented exception) (closes SF
+#643702).
-The function `mh-ps-print-toggle-mime' was never implemented and the
-functionality in `mh-ps-print-msg-show' was better afforded by
-`mh-ps-print-msg' and `mh-ps-print-msg-file'.
+
-Key 7.4.85 7.4.90
+** New Variables in MH-E 8.0
-F i mh-index-search -
-F s mh-search-folder mh-search
-P A mh-ps-print-toggle-mime -
-P M mh-ps-print-toggle-mime -
-P s mh-ps-print-msg-show -
+*** mh-after-commands-processed-hook
-*** MH-Letter Keymap Changes
+Hook run by `x' (`mh-execute-commands') after performing outstanding
+refile and delete requests.
-The change where `mh-letter-mode' derives from `mail-mode' adds a few
-keybindings. Some are interesting; experiment! Most of the changes
-have to do with the renaming of the functions with "mhn" in them to
-"mh" because nmh doesn't use `mhn'. The names were also made
-consistent with the the family of "mml" functions.
+*** mh-alias-reloaded-hook
-Key 7.4.85 7.4.90
+Invoked by `mh-alias-reload' after reloading aliases.
-C-c C-e mh-edit-mhn mh-mh-to-mime
-C-c C-f C-a - mh-to-field
-C-c C-f C-l - mh-to-field
-C-c C-f RET - mh-to-field
-C-c C-f a - mh-to-field
-C-c C-f l - mh-to-field
-C-c C-f m - mh-to-field
-C-c RET C-g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp
-C-c RET C-t mh-mhn-compose-external-compressed-tar
- mh-mh-compose-external-compressed-tar
-C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo
-C-c RET C-x mh-mhn-compose-external-type mh-mh-compose-external-type
-C-c RET g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp
-C-c RET t mh-mhn-compose-external-compressed-tar
- mh-mh-compose-external-compressed-tar
-C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo
-C-c RET x mh-mhn-compose-external-type mh-mh-compose-external-type
+*** mh-auto-fields-prompt-flag
-*** MH-Search Keymap Changes
+On means to prompt before sending if fields in `mh-auto-fields-list'
+are inserted.
-These are the changes associated with the new search mode. The command
-`C-c C-c' (`mh-index-do-search') now performs the standard indexed
-search, while `C-c C-p' (`mh-pick-do-search') runs pick as before,
-only better!
+*** mh-before-commands-processed-hook
-Key 7.4.85 7.4.90
+Renamed from `mh-folder-updated-hook'. It wasn't clear whether
+`mh-folder-updated-hook' was run before or after the commands were
+executed. We now provide both with clear names.
-C-c C-c mh-do-search mh-index-do-search
-C-c TAB mh-index-do-search -
+*** mh-compose-forward-as-mime-flag
-** New Variables in MH-E 7.90
+On means that messages are forwarded as attachments (closes SF
+#827203).
-*** mh-after-commands-processed-hook
+*** mh-default-folder-for-message-function
-Hook run by `x' (`mh-execute-commands') after performing outstanding
-refile and delete requests.
+Function to select a default folder for refiling or `Fcc:'.
-*** mh-before-commands-processed-hook
+*** mh-forward-hook
-Renamed from `mh-folder-updated-hook'. It wasn't clear whether
-`mh-folder-updated-hook' was run before or after the commands were
-executed. We now provide both with clear names.
+Invoked on the forwarded letter by `f' (`mh-forward').
*** mh-highlight-citation-style
Renamed from `mh-highlight-citation-p' since it wasn't a boolean. The
new name is also more descriptive.
+*** mh-identity-handlers
+
+Handler functions for fields in `mh-identity-list'.
+
*** mh-insert-signature-hook
Renamed from `mh-letter-insert-signature-hook' since most of the other
hooks do not carry the mode in the prefix and because the new name is
equally clear.
+*** mh-invisible-header-fields-default
+
+List of hidden header fields. The header fields listed in this option
+are hidden, although you can check off any field that you would like
+to see. Header fields that you would like to hide that aren't listed
+can be added to the `mh-invisible-header-fields' option (closes SF
+#752045).
+
+The option `mh-visible-header-fields' has been deleted.
+
+*** mh-junk-background
+
+If on, spam programs are run in background. This used to be the
+default behavior but this could overwhelm a system if many messages
+were black- or whitelisted at once. The spam programs are now run in
+the foreground, but this option can be used to put them back in the
+background.
+
+*** mh-junk-disposition
+
+Renamed from `mh-junk-mail-folder' since this variable can accept
+values other than folder names.
+
*** mh-kill-folder-suppress-prompt-hooks
Renamed from `mh-kill-folder-suppress-prompt-hook'. By convention,
@@ -333,6 +396,10 @@ Renamed from `mh-edit-mhn-hook'. We have a family of `mh-mml-to-mime'
functions and variables; the older mhn functions and variables were
renamed to have a consistent `mh-mh-to-mime' prefix.
+*** mh-mml-method-default
+
+Default method to use in security tags.
+
*** mh-new-messages-folders
Renamed from `mh-index-new-messages-folders' for clarity.
@@ -356,6 +423,14 @@ Renamed from `mh-pick-mode-hook' as part of the
Renamed from `mh-index-program' as part of the
`mh-index.el'/`mh-pick.el' merge into `mh-search.el'.
+*** mh-signature-separator-flag
+
+On means a signature separator should be inserted. It is not
+recommended that you change this option since various mail user
+agents, including MH-E, use the separator to present the signature
+differently, and to suppress the signature when replying or yanking a
+letter into a draft.
+
*** mh-sortm-args
Additional arguments for `sortm'. This was previously an internal
@@ -369,6 +444,25 @@ Renamed from `mh-speed-flists-interval' for clarity.
Renamed from `mh-index-ticked-messages-folders' for clarity.
+*** mh-variant
+
+Specifies the variant used by MH-E. The default setting of this option
+is `Auto-detect' which means that MH-E will automatically choose the
+first of nmh, MH, or GNU mailutils that it finds in the directories
+listed in `mh-path', `mh-sys-path', and `exec-path'. If, for example,
+you have both nmh and mailutils installed and `mh-variant-in-use' was
+initialized to nmh but you want to use mailutils, then you can set
+this option to `mailutils'.
+
+When this variable is changed, MH-E resets `mh-progs', `mh-lib',
+`mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
+accordingly.
+
+If you've set these variables in your .emacs, it is strongly suggested
+that you comment them out. The MH detection code has been completely
+rewritten and it is very likely that you no longer to set them and
+their setting may confuse other MH-E settings.
+
*** mh-xemacs-tool-bar-position
Renamed from `mh-xemacs-toolbar-position' per GNU Emacs naming conventions.
@@ -381,11 +475,13 @@ Renamed from `mh-xemacs-use-toolbar-flag' per GNU Emacs naming conventions.
Renamed from `mh-yank-from-start-of-msg' for clarity.
-** Variables Deleted in MH-E 7.90
+
-*** mail-citation-hook
+** Variables Deleted in MH-E 8.0
-This is already defined in `sendmail.el'.
+*** mh-alias-system-aliases
+
+System definitions should not be a user option.
*** mh-edit-mhn-hook
@@ -411,6 +507,11 @@ Renamed to `mh-search-program'.
Renamed to `mh-ticked-messages-folders'.
+*** mh-junk-mail-folder
+
+Since this variable can accept values other than folder names, it was
+renamed to `mh-junk-disposition' to more accurately reflect the content.
+
*** mh-kill-folder-suppress-prompt-hook
Renamed to `mh-kill-folder-suppress-prompt-hooks'.
@@ -419,14 +520,17 @@ Renamed to `mh-kill-folder-suppress-prompt-hooks'.
Renamed to `mh-insert-signature-hook'.
-*** mhl-formfile
-
-Renamed to `mh-mhl-format-file'.
-
*** mh-pick-mode-hook
Renamed to `mh-search-mode-hook'.
+*** mh-show-use-goto-addr-flag
+
+This flag was redundant with and inconsistent with
+`goto-address-highlight-p' at the same time, so we removed it. Please
+customize `goto-address-highlight-p' if you wish to turn off email
+address and URL highlighting.
+
*** mh-speed-flists-interval
Renamed to `mh-speed-update-interval'.
@@ -436,6 +540,10 @@ Renamed to `mh-speed-update-interval'.
Deleted since setting `mh-speed-flists-interval' to 0 accomplishes the
same thing.
+*** mh-visible-header-fields
+
+Deleted since it would hide new header fields you might want to see.
+
*** mh-xemacs-toolbar-position
Renamed to `mh-xemacs-tool-bar-position'.
@@ -448,538 +556,263 @@ Renamed to `mh-xemacs-use-tool-bar-flag'.
Renamed to `mh-yank-behavior'.
-** Bug Fixes in MH-E 7.90
-
-*** Error Message When Trying to Send Using MH-E
-
-This behavior is no longer observed (closes SF #1002103).
-
-*** "Args out of range" Error in Displaying Message
-
-This behavior is no longer observed (closes SF #1227504).
-
-*** Front-and-back Truncation in mailto: Rendering
-
-This behavior is no longer observed (closes SF #1227510).
-
-*** Completions Offered by mh-refile-message Are Not Sorted
-
-This behavior is no longer observed (closes SF #698734).
-
-*** Add Message-ID to Outgoing Messages
-
-If you replied to a message in your `+outbox', an `In-Reply-To:'
-header field was created that broke threading at the recipient's end.
-We now add a `Message-ID:' to outgoing messages which fixes this
-(closes SF #725425).
-
-*** Speedbar Creating New Folders Instead of Visiting Existing
-
-This was actually fixed in 7.4.3 (closes SF #792300).
-
-*** Args Out of Range
-
-This compilation error was actually fixed in 7.4.3 (closes SF
-#806577).
-
-*** Initialization Fails If ~/Mail Exists
-
-MH-E no longer calls `install-mh' so this issue has gone away (closes
-SF #835192).
-
-*** RETURN Causes Infinite Loop in mh-letter
-
-This behavior is no longer observed (closes SF #887346).
-
-*** Missing Headers When Replying to All
-
-User needed to edit `replgroupcomps' (closes SF #918194).
-
-*** mh-find-path Doesn't Use mhparam
-
-MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It
-uses `mhparam' instead (closes SF #1016027).
-
-*** mh-index-previous-folder Does Not Work Correctly
-
-If your cursor was on an item below a folder heading and you used
-`M-TAB' (`mh-index-previous-folder'), you would move to the previous
-folder heading. This has been fixed (closes SF #1126188).
-
-*** XEmacs Compile Fails
+*** mhl-formfile
-Compiling produced a "Symbol's value as variable is void: require"
-error on all files. This has been fixed. As a bonus, warnings have
-been reduced from hundreds to just a few (closes SF #1127595).
+Renamed to `mh-mhl-format-file'.
-*** buffer-offer-save Permanent Local
+
-There was a movement to make `buffer-offer-save' a permanent local
-which would have meant that we could not set it in `mh-letter-mode'.
-However, this movement was fraught with issues and was postponed
-(closes SF #1184756).
+** New Faces in MH-E 8.0
-*** Better Handling of Empty cur Sequence
+*** mh-folder-address
-If you refiled a message into a folder and then used `F r'
-(`mh-rescan-folder') in that folder, your cursor would be taken to the
-first message. The cursor now stays where it was (closes SF #1207247).
+Renamed from `mh-folder-address-face' per new Emacs conventions.
-*** Name of the Draft File in mh-comp.el
+*** mh-folder-body
-MH is documented to use the draft file. If you use a draft file for
-something else (like Sylpheed), then use draft folders (closes SF
-#1231483).
+Renamed from `mh-folder-body-face' per new Emacs conventions.
-*** Use Standard Default Notation in Prompts
+*** mh-folder-cur-msg-number
-Emacs changed their defaults in prompts from "Prompt: [value]" to
-"Prompt (default value): ". All MH-E prompts have been updated to
-comply with the new standard (closes SF #1275933).
+Renamed from `mh-folder-cur-msg-number-face' per new Emacs conventions.
-*** Msg Display Broken After Displaying Msg with Inline Image
+*** mh-folder-date
-Messages with inline images no longer trim certain message header
-fields (closes SF #1306141).
+Renamed from `mh-folder-date-face' per new Emacs conventions.
-*** mh-visit-folder Munges font-lock-keywords
+*** mh-folder-deleted
-MH-E broke highlighting in Gnus buffers. This was actually a problem
-in CVS Emacs 22 and has been fixed there (closes SF #1393879).
+Renamed from `mh-folder-deleted-face' per new Emacs conventions.
-*** Illegal Filename Chars for W32 Filesystems
+*** mh-folder-followup
-Windows users who view `X-Image-URL:' images could not cache the
-images since the cached image file names had illegal characters. This
-has been fixed (closes SF #1396499).
+Renamed from `mh-folder-followup-face' per new Emacs conventions.
-*** mh-send Doesn't Handle mml Insertions Via mail-user-agent
+*** mh-folder-msg-number
-Can now forward messages in Gnus if MH-E is your `mail-user-agent'
-(closes SF #1399307).
+Renamed from `mh-folder-msg-number-face' per new Emacs conventions.
-
+*** mh-folder-refiled
-* Changes in MH-E 7.85
+Renamed from `mh-folder-refiled-face' per new Emacs conventions.
-Version 7.85 heralds a migration of the CVS repository from
-SourceForge to Savannah only for those files that were already part of
-Emacs. As a result, two incompatibilities were introduced with this
-release: the location of MH-E in the load-path has changed, and
-mh-e-autoloads.el was renamed to mh-autoloads.el. While this migration
-will benefit maintainers, it will also benefit users: CVS Emacs users
-will not have to check out MH-E separately and welcome faster MH-E
-updates, and CVS MH-E users will welcome faster MH-E updates from
-Emacs developers. Read section CVS MH-E INSTALL in the README for
-details.
+*** mh-folder-sent-to-me-hint
-MH-E now works on a Mac. See section INSTALL in the README for details.
+Fontification hint face in messages sent directly to us.
-** Bug Fixes in MH-E 7.85
+*** mh-folder-sent-to-me-sender
-*** Prompts Now Follow Current Conventions
+Sender face in messages sent directly to us.
-Instead of "Prompt: [<default>] ", the prompts now look like "Prompt
-(default: <default>): ".
+*** mh-folder-subject
-*** Face Variable Names Now Follow Current Conventions
+Renamed from `mh-folder-subject-face' per new Emacs conventions.
-The -face suffix has been dropped from all face names.
+*** mh-folder-tick
-*** Default Identity Prevents Insertion of Auto Fields
+Renamed from `mh-folder-tick-face' per new Emacs conventions.
-Auto insertion of an identity now occurs even when the default
-identity is used (closes SF #1204506).
+*** mh-folder-to
-*** mh-compose-forward and Default Message Number
+Renamed from `mh-folder-to-face' per new Emacs conventions.
-mh-compose-forward will now default to the sent message in the sent
-folder and the `cur' message in other folders. It also takes ranges of
-messages and can include multiple messages at a time (closes SF
-#1205890).
+*** mh-letter-header-field
-*** mh-customize Uses Group mh, Not mh-e
+Renamed from `mh-letter-header-field-face' per new Emacs conventions.
-The `mh' customization group alias has been deleted to avoid some
-problems that were found (closes SF #1213716).
+*** mh-search-folder
-*** font-lock Error in mh-letter-mode
+Renamed from `mh-index-folder-face'.
-An error in MH-E was introduced as a result of a change in CVS Emacs.
-This has been fixed (closes SF #1241017).
+*** mh-show-cc
-
+Renamed from `mh-show-cc-face' per new Emacs conventions.
-* Changes in MH-E 7.84
+*** mh-show-date
-Version 7.84 contains no user-visible changes. This version
-incorporates changes made in CVS Emacs such as the removal of some
-deprecated software.
+Renamed from `mh-show--face' per new Emacs conventions.
-* Changes in MH-E 7.83
+*** mh-show-from
-Version 7.83 fixes a handful of bugs, adds colors to buttons for
-signed or encrypted messages, and contains some documentation changes
-related to the upcoming release of the manual. Some options were moved
-to other customization groups as a result.
+Renamed from `mh-show-from-face' per new Emacs conventions.
-While not related to this release, the MH-E mailing lists are now
-gatewayed at gmane.org (closes SF #979308).
+*** mh-show-header
-** New Variables in MH-E 7.83
+Renamed from `mh-show-header-face' per new Emacs conventions.
-*** mh-show-pgg-bad-face
+*** mh-show-pgg-bad
Face used to highlight a bad PGG signature.
-*** mh-show-pgg-good-face
+*** mh-show-pgg-good
Face used to highlight a good PGG signature.
-*** mh-show-pgg-unknown-face
+*** mh-show-pgg-unknown
Face used to highlight a PGG signature whose status is unknown. This
face is also used for a signature when the signer is untrusted.
-** Bug Fixes in MH-E 7.83
+*** mh-show-signature
-*** Whitespace in pick Expressions
+Face used to highlight the signature.
-The "C-u / s RET" command now works. In addition, you can now add
-whitespace to any of the limiting (/) commands (closes SF #1122655).
+*** mh-show-subject
-*** auto-mode-alist Updated
+Renamed from `mh-show-subject-face' per new Emacs conventions.
-MH-E originally updated auto-mode-alist to set the major mode of
-drafts. Now that we explicitly set the mode, there is no reason to do
-this, and this behavior caused problems for people who didn't use MH-E
-who were editing files that looked like MH message files (closes SF
-#1032353).
+*** mh-show-to
-*** mh-show-unquote-From Fails (read-only buffer)
+Renamed from `mh-show-to-face' per new Emacs conventions.
-MH-E quotes the "From " header field that is inserted by MTAs.
-However, it was trying to do this in a read-only buffer. This has been
-fixed (closes SF #1089870).
+*** mh-show-xface
-*** rmmproc Refile Complains No Such Message
+Renamed from `mh-show-xface-face' per new Emacs conventions.
-MH-E would get confused about which folder to delete messages from if
-you were refiling and deleting messages at the same time. This has
-been fixed (closes SF #1023959).
+*** mh-speedbar-folder
-*** ! Doesn't Do Regions
+Renamed from `mh-speedbar-folder-face' per new Emacs conventions.
-Now it does (closes SF #1046330).
+*** mh-speedbar-folder-with-unseen-messages
-*** Swish Fixes
+Renamed from `mh-speedbar-folder-with-unseen-messages-face' per new
+Emacs conventions.
-Items in swish indexes that aren't mail messages are now handled more
-gracefully.
+*** mh-speedbar-selected-folder
-*** Spamassassin Fixes
-
-If you use spamassassin, there was an error when you tried to junk
-mail if the option mh-junk-background was set. This has been fixed.
+Renamed from `mh-speedbar-selected-folder-face' per new Emacs conventions.
-*** Mairix Support
+*** mh-speedbar-selected-folder-with-unseen-messages
-Indexing now compatible with Mairix version 0.12 and later.
+Renamed from `mh-speedbar-selected-folder-with-unseen-messages-face'
+per new Emacs conventions.
-* Changes in MH-E 7.82
+** Faces Deleted in MH-E 8.0
-Version 7.82 continues to address the saga surrounding the use of CL
-macros in CVS Emacs and fixes the auto-detection of vanilla MH (closes
-SF #1014781).
+*** mh-folder-address-face
-* Changes in MH-E 7.81
+Renamed to `mh-folder-address' per new Emacs conventions.
-Version 7.81 fixes a `wrong-type-argument' argument error that
-sometimes occurred when processing the Message-ID, adds the ";
-(mh-toggle-mh-decode-mime-flag)" command, and uses ":default" instead
-of "default" in `mh-identity-handlers' to avoid problems with
-"Default:" as a user defined field. If you have modified
-`mh-identity-handlers' in your .emacs, you'll need to rename "default"
-to ":default". This release also corrects the release numbering; the
-previous version number was intended to be 7.80.
+*** mh-folder-body-face
-
+Renamed to `mh-folder-body' per new Emacs conventions.
-* Changes in MH-E 7.4.80
-
-Version 7.4.80 now supports GNU mailutils, S/MIME, picons,
-which-func-mode, has an improved interface for hiding header fields,
-improves upon the MH variant detection, and contains many bug fixes.
-Those of you familiar with the GNU version numbering schemes will
-recognize this as an alpha release. This does not reflect on the
-quality of this release which is as high as it has always been.
-Although we are not ready to release 8.0, we want you to have access
-to the work that has been hiding in CVS. At the same time we want to
-make it clear that there are incompatible changes with previous
-versions.
-
-We are planning to release the long-awaited manual update synchronized
-with version 8.0. We are using documentation from the manual in the
-docstrings which is hoped to make "C-h f (describe-function)" really
-useful and create a seamless experience when switching back and forth
-between the manual and the docstrings. This has been done in about
-half of the variables and functions in this version.
-
-The writing of the manual has revealed a few inconsistencies in the
-software whose fixes have resulted in incompatible changes, and there
-may well be more. So, unlike version 7 which was chock full of new
-features, version 8's strengths will include complete documentation
-and higher quality.
-
-** New Features in MH-E 7.4.80
+*** mh-folder-cur-msg-face
-*** GNU mailutils Support
+Deleted. Not used.
-MH-E now supports GNU mailutils 0.4 and higher versions.
+*** mh-folder-cur-msg-number-face
-*** S/MIME Support
+Renamed to `mh-folder-cur-msg-number' per new Emacs conventions.
-MH-E now supports S/MIME using Gnus 5.10.6 or higher.
+*** mh-folder-date-face
-*** Picon Support
+Renamed to `mh-folder-date' per new Emacs conventions.
-In addition to the other methods of displaying an icon for the sender
-of a message, MH-E can now display images from a picon directory. The
-directory search path is found in the `mh-picon-directory-list'
-variable. More documentation is found in the "facedb" sections in the
-xfaces man page. [NOTE: need to make mh-picon-directory-list an option
-and add xfaces facedb documentation to it.]
+*** mh-folder-deleted-face
-*** X-Image-URL Updates
+Renamed to `mh-folder-deleted' per new Emacs conventions.
-Now support the use of `curl' and `fetch' as alternatives to `wget' to
-obtain the image. The display of images are controlled with the
-`mh-show-use-xface-flag' option while the `mh-fetch-x-image-url'
-option controls how the images are fetched.
+*** mh-folder-followup-face
-WARNING: There are security concerns with this feature. Please read
-the documentation for these options carefully before changing the
-default.
+Renamed to `mh-folder-followup' per new Emacs conventions.
-*** Updates to mh-identity-list
+*** mh-folder-msg-number-face
-Note that the field names found in `mh-identity-list' that refer to
-the fields in `mh-identity-handlers' have changed in an incompatible
-way from 7.4.4. In general, the symbolic names now have a ":" prefix
-to avoid collisions with header fields. Before starting Emacs, edit
-your .emacs and insert ":" before "signature" if you have defined it.
+Renamed to `mh-folder-msg-number' per new Emacs conventions.
-You can change your attribution in replies with the new "Attribution
-Verb" field, and you can set your default GPG user ID with the "GPG
-key ID" field.
+*** mh-folder-refiled-face
-Signatures can now be read from the `mh-signature-file-name' variable,
-or come from a function, in addition to a named file. If you write
-your own function, variables that you can use include
-`mh-signature-separator-regexp', `mh-signature-separator',
-and `mh-signature-separator-p'.
+Renamed to `mh-folder-refiled' per new Emacs conventions.
-The handling of these fields has been moved into a new
-`mh-identity-handlers' option, an alist of fields (strings) and
-handlers (functions). Strings are lowercase. Use ":signature" for
-Signature and ":pgg-default-user-id" for GPG Key ID. The function
-associated with the string "default" is used if no other functions are
-appropriate. For this reason, don't name a header field "Default".
+*** mh-folder-subject-face
-If you point your signature at a vCard file with a vcf suffix, then it
-will be incorporated as a vCard body part (closes SF #802723).
+Renamed to `mh-folder-subject' per new Emacs conventions.
-*** Catchup Command
+*** mh-folder-tick-face
-There is a new "F c (mh-catchup)" command that marks all unread
-messages in the current folder as read.
+Renamed to `mh-folder-tick' per new Emacs conventions.
-*** Change Content-Type Renderer on the Fly in MH-Show Buffer
+*** mh-folder-to-face
-This has been implemented by adding the key binding "K e
-(mh-display-with-external-viewer)". For inline text/html parts,
-buttons aren't displayed by default. In that case use "K t
-(mh-toggle-mime-buttons)" to display the button before viewing it with
-an external browser (closes SF #839318).
+Renamed to `mh-folder-to' per new Emacs conventions.
-*** Use which-func-mode to Display Folder in Index Mode
+*** mh-index-folder-face
-Turning on `which-func-mode' displays the folder name of the message
-under the cursor in index folders (closes SF #855520).
-
-*** Render Signature and vCard in Italics
-
-This has been implemented. Use `mh-show-signature-face' to customize
-the face used (closes SF #802722).
+Renamed to `mh-search-folder'.
-*** New Print Map
+*** mh-letter-header-field-face
-There is now a keymap for the printing functions whose prefix is "P".
-The command "l (mh-print-msg)" has been replaced with "P l". Other new
-functions in this keymap include:
+Renamed to `mh-letter-header-field' per new Emacs conventions.
- P A mh-ps-print-toggle-mime
- P C mh-ps-print-toggle-color
- P F mh-ps-print-toggle-faces
- P M mh-ps-print-toggle-mime
- P f mh-ps-print-msg-file
- P l mh-print-msg
- P p mh-ps-print-msg
- P s mh-ps-print-msg-show
+*** mh-show-cc-face
-*** Draft Buffer Keymap Changes
-
-The keymap in the draft buffer has been modified slightly. The old
-anonymous ftp and tar composition commands have been reinstated and
-letter signing and encrypting keymaps have been added.
-
-The type of signing or encryption has been generalized so the method
-is now an option rather than a part of the function's name. The option
-is `mh-mml-method-default' and choices include PGP (MIME), PGP,
-S/MIME, or none.
-
-Key 7.4.4 7.4.80
-
-C-c RET C-e mh-mml-secure-message-encrypt-pgpmime
- mh-mml-secure-message-encrypt
-C-c RET C-s mh-mml-secure-message-sign-pgpmime
- -
-C-c RET C-g - mh-mhn-compose-anon-ftp
-C-c RET C-n - mh-mml-unsecure-message
-C-c RET C-s - mh-mml-secure-message-sign
-C-c RET C-t - mh-mhn-compose-external-compressed-tar
-C-c RET C-s mh-mml-secure-message-sign-pgpmime
- mh-mml-secure-message-sign
-C-c RET C-x - mh-mhn-compose-external-type
-C-c RET e mh-mml-secure-message-encrypt-pgpmime
- Prefix Command
-C-c RET e e - mh-mml-secure-message-encrypt
-C-c RET e s - mh-mml-secure-message-signencrypt
-C-c RET g - mh-mhn-compose-anon-ftp
-C-c RET n - mh-mml-unsecure-message
-C-c RET s mh-mml-secure-message-sign-pgpmime
- Prefix Command
-C-c RET s e - mh-mml-secure-message-signencrypt
-C-c RET s s - mh-mml-secure-message-sign
-C-c RET t - mh-mhn-compose-external-compressed-tar
-C-c RET x - mh-mhn-compose-external-type
-
-*** Speedbar: Highlight Folders With Unseen
-
-The speedbar now renders the folders with unseen messages in boldface
-which makes them easier to identify (closes SF #623369).
-
-*** Quick Key Help
-
-The "? (mh-help)" function now displays the help in its own buffer
-called *MH-E Help* (closes SF #493740 and SF #656631).
-
-*** New Startup File mh-e-autoloads.el
-
-If you are installing MH-E yourself, then you can replace any
-autoloads you may have with "(require 'mh-e-autoloads.el)". See the
-README for details.
+Renamed to `mh-show-cc' per new Emacs conventions.
-*** Glimpse Support Removed
+*** mh-show-date-face
-Since glimpse isn't free, we cannot mention it. Glimpse has been
-removed from the option `mh-indexer-choices' (closes SF #831276).
+Renamed to `mh-show-date' per new Emacs conventions.
-*** mh-msg-is-in-seq Update
+*** mh-show-from-face
-Can now specify an alternate message number to "S s
-(mh-msg-is-in-seq)" with a prefix argument.
+Renamed to `mh-show-from' per new Emacs conventions.
-** New Variables in MH-E 7.4.80
+*** mh-show-header-face
-Variables that have been added to MH-E that have not been discussed
-elsewhere are listed here.
+Renamed to `mh-show-header' per new Emacs conventions.
-*** mail-citation-hook
+*** mh-show-subject-face
-Hook for modifying a citation just inserted in the mail buffer.
+Renamed to `mh-show-subject' per new Emacs conventions.
-*** mh-alias-reloaded-hook
+*** mh-show-to-face
-Invoked by `mh-alias-reload' after reloading aliases.
+Renamed to `mh-show-to' per new Emacs conventions.
-*** mh-auto-fields-prompt-flag
+*** mh-show-xface-face
-Non-nil means to prompt before sending if fields in
-`mh-auto-fields-list' are inserted.
+Renamed to `mh-show-xface' per new Emacs conventions.
-*** mh-default-folder-for-message-function
+*** mh-speedbar-folder-face
-Function to select a default folder for refiling or `Fcc'.
+Renamed to `mh-speedbar-folder' per new Emacs conventions.
-*** mh-forward-hook
+*** mh-speedbar-folder-with-unseen-messages-face
-Invoked on the forwarded letter by "f (mh-forward)".
+Renamed to `mh-speedbar-folder-with-unseen-messages' per new Emacs conventions.
-*** mh-invisible-header-fields-default
+*** mh-speedbar-selected-folder-face
-List of hidden header fields. The header fields listed in this option
-are hidden, although you can check off any field that you would like
-to see. Header fields that you would like to hide that aren't listed
-can be added to the `mh-invisible-header-fields' option (closes SF
-#752045).
+Renamed to `mh-speedbar-selected-folder' per new Emacs conventions.
-The option `mh-visible-header-fields' has been deleted.
+*** mh-speedbar-selected-folder-with-unseen-messages-face
-*** mh-junk-background
+Renamed to `mh-speedbar-selected-folder-with-unseen-messages' per new
+Emacs conventions.
-If on, spam programs are run in background. This used to be the
-default behavior but this could overwhelm a system if many messages
-were black- or whitelisted at once. The spam programs are now run in
-the foreground, but this option can be used to put them back in the
-background.
-
-*** mh-signature-separator-flag
-
-Non-nil means a signature separator should be inserted. It is not
-recommended that you change this option since various mail user
-agents, including MH-E, use the separator to present the signature
-differently, and to suppress the signature when replying or yanking a
-letter into a draft.
-
-*** mh-variant
-
-Specifies the variant used by MH-E. The default setting of this option
-is `Auto-detect' which means that MH-E will automatically choose the
-first of nmh, MH, or GNU mailutils that it finds in the directories
-listed in `mh-path', `mh-sys-path', and `exec-path'. If, for example,
-you have both nmh and mailutils installed and `mh-variant-in-use' was
-initialized to nmh but you want to use mailutils, then you can set
-this option to `mailutils'.
+
-When this variable is changed, MH-E resets `mh-progs', `mh-lib',
-`mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use'
-accordingly.
+** Bug Fixes in MH-E 8.0
-If you've set these variables in your .emacs, it is strongly suggested
-that you comment them out. The MH detection code has been completely
-rewritten and it is very likely that you no longer to set them and
-their setting may confuse other MH-E settings.
-
-** Variables Deleted in MH-E 7.4.80
+*** Face Variable Names Now Follow Current Conventions
-Variables that have been removed from MH-E that have not been
-discussed elsewhere are listed here.
+The -face suffix has been dropped from all face names.
-*** mh-alias-system-aliases
+*** Swish Fixes
-System definitions should not be a user option.
+Items in swish indexes that aren't mail messages are now handled more
+gracefully.
-*** mh-junk-mail-folder
+*** Spamassassin Fixes
-Since this variable can accept values other than folder names, it was
-renamed to `mh-junk-disposition' to more accurately reflect the content.
+If you use spamassassin, there was an error when you tried to junk
+mail if the option `mh-junk-background' was set. This has been fixed.
-** Bug Fixes in MH-E 7.4.80
+*** Mairix Support
-Many bugs were fixed in this version that aren't listed below.
+Indexing now compatible with Mairix version 0.12 and later.
*** mh-extract-rejected-mail Can't Do MIME (and Other Formats)
@@ -992,10 +825,23 @@ XEmacs (21.5.9-21.5.16). More recent versions work fine. If you think
our list is too broad, please let us know which version of XEmacs you
are using (closes SF #644321).
+*** Completions Offered by mh-refile-message Are Not Sorted
+
+This behavior is no longer observed (closes SF #698734).
+
+*** Add Message-ID to Outgoing Messages
+
+If you replied to a message in your `+outbox', an `In-Reply-To:'
+header field was created that broke threading at the recipient's end.
+We now add a `Message-ID:' to outgoing messages which fixes this
+(closes SF #725425).
+
*** Inconsistent Prompts
-Prompt formats are now consistent throughout the application (closes
-SF #730470).
+Emacs changed their defaults in prompts from "Prompt: [value]" to
+"Prompt (default value): ". All MH-E prompts have been updated to
+comply with the new standard and are therefore now consistent
+throughout the application (closes SF #730470, SF #1275933).
*** Empty Shell Comments Confuse mh-mhn-directive-present-p
@@ -1034,16 +880,10 @@ user would be flashed, but the alias would be used when sending. This
has been fixed so that the user name that is flashed is the same as
the name that is sent (closes SF #772595).
-*** Args out of range
-
-In rare and non-reproducible circumstances, compilation sometimes
-threw an "Args out of range" error. Nonetheless, this has been fixed
-(closes SF #806577).
-
-*** mh-forward hard-codes '-mime' Switch on nmh
+*** Initialization Fails If ~/Mail Exists
-Added new option `mh-compose-forward-as-mime-flag' that controls whether
-messages are forwarded as MIME attachments (closes SF #827203).
+MH-E no longer calls `install-mh' so this issue has gone away (closes
+SF #835192).
*** Not Re-prompted to Sign After Pass Phrase Typo
@@ -1059,17 +899,187 @@ to start typing their message, any line in the body with a colon would
be fontified with a gray background. This has been fixed (closes SF
#855479).
+*** RETURN Causes Infinite Loop in mh-letter
+
+This behavior is no longer observed (closes SF #887346).
+
*** mh-refile-msg Fails to Suggest Folder for Empty Message
If you received a message with an empty body from someone who is
-listed in your aliases file, "o (mh-refile-msg)" failed to suggest the
-correct folder. This has been fixed (closes SF #917096).
+listed in your aliases file, `o' (`mh-refile-msg') failed to suggest
+the correct folder. This has been fixed (closes SF #917096).
+
+*** Missing Headers When Replying to All
+
+User needed to edit `replgroupcomps' (closes SF #918194).
*** Error Visiting Folder With no Unseen Messages
If you visited a folder without unseen messages and the option "flist:
--noshowzero" is present in your ~/.mh_profile, you'd get an error. This
-has been fixed (closes SF #933954).
+-noshowzero" is present in your `~/.mh_profile', you'd get an error.
+This has been fixed (closes SF #933954).
+
+*** Error Message When Trying to Send Using MH-E
+
+This behavior is no longer observed (closes SF #1002103).
+
+*** mh-find-path Doesn't Use mhparam
+
+MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It
+uses `mhparam' instead (closes SF #1016027).
+
+*** rmmproc Refile Complains No Such Message
+
+MH-E would get confused about which folder to delete messages from if
+you were refiling and deleting messages at the same time. This has
+been fixed (closes SF #1023959).
+
+*** auto-mode-alist Updated
+
+MH-E originally updated auto-mode-alist to set the major mode of
+drafts. Now that we explicitly set the mode, there is no reason to do
+this, and this behavior caused problems for people who didn't use MH-E
+who were editing files that looked like MH message files (closes SF
+#1032353).
+
+*** ! Doesn't Do Regions
+
+Now it does (closes SF #1046330).
+
+*** mh-show-unquote-From Fails (read-only buffer)
+
+MH-E quotes the `From ' header field that is inserted by MTAs.
+However, it was trying to do this in a read-only buffer. This has been
+fixed (closes SF #1089870).
+
+*** Whitespace in pick Expressions
+
+The `C-u / s RET' command now works. In addition, you can now add
+whitespace to any of the limiting (/) commands (closes SF #1122655).
+
+*** mh-index-previous-folder Does Not Work Correctly
+
+If your cursor was on an item below a folder heading and you used
+`M-TAB' (`mh-index-previous-folder'), you would move to the previous
+folder heading. This has been fixed (closes SF #1126188).
+
+*** Default Identity Prevents Insertion of Auto Fields
+
+Auto insertion of an identity now occurs even when the default
+identity is used (closes SF #1204506).
+
+*** mh-compose-forward and Default Message Number
+
+`mh-compose-forward' will now default to the sent message in the sent
+folder and the `cur' message in other folders. It also takes ranges of
+messages and can include multiple messages at a time (closes SF
+#1205890).
+
+*** Better Handling of Empty cur Sequence
+
+If you refiled a message into a folder and then used `F r'
+(`mh-rescan-folder') in that folder, your cursor would be taken to the
+first message. The cursor now stays where it was (closes SF #1207247).
+
+*** mh-customize Uses Group mh, Not mh-e
+
+The `mh' customization group alias has been deleted to avoid some
+problems that were found (closes SF #1213716).
+
+*** "Args out of range" Error in Displaying Message
+
+This behavior is no longer observed (closes SF #1227504).
+
+*** Front-and-back Truncation in mailto: Rendering
+
+This behavior is no longer observed (closes SF #1227510).
+
+*** Name of the Draft File in mh-comp.el
+
+MH is documented to use the draft file. If you use a draft file for
+something else (like Sylpheed), then use draft folders (closes SF
+#1231483).
+
+*** font-lock Error in mh-letter-mode
+
+An error in MH-E was introduced as a result of a change in CVS Emacs.
+This has been fixed (closes SF #1241017).
+
+*** Msg Display Broken After Displaying Msg with Inline Image
+
+Messages with inline images no longer trim certain message header
+fields (closes SF #1306141).
+
+*** mh-visit-folder Munges font-lock-keywords
+
+MH-E broke highlighting in Gnus buffers. This was actually a problem
+in CVS Emacs 22 and has been fixed there (closes SF #1393879).
+
+*** Illegal Filename Chars for W32 Filesystems
+
+Windows users who view `X-Image-URL:' images could not cache the
+images since the cached image file names had illegal characters. This
+has been fixed (closes SF #1396499).
+
+*** mh-send Doesn't Handle mml Insertions Via mail-user-agent
+
+Can now forward messages in Gnus if MH-E is your `mail-user-agent'
+(closes SF #1399307).
+
+*** Can't Narrow to Subject with Regexp Chars
+
+The command `/ s' could not limit subjects that had special pick
+characters (such as [, *, $, .). This has been fixed (closes SF
+#1432548).
+
+*** `/ s' Can Miss the Original Mail
+
+The command `/ s' failed to include the message with the "Re:" in the
+Subject. This has been fixed (closes SF #1438369).
+
+*** mhparam -components Fails on mailutils
+
+This error prevented MH-E from loading when using GNU mailutils. GNU
+mailutils drops the `s' in this argument, so we did too since
+-component still works in nmh and MH (closes SF #1446985).
+
+*** `/ s' Still Has Problems With []'d Mail
+
+On XEmacs, subjects that had special characters would prevent `/ s'
+from narrowing to the given subject. These characters are now quoted
+correctly in XEmacs (closes SF #1447598).
+
+*** Variable mh-send-args Is a String, Not a List
+
+This was causing errors when sending under GNU mailutils. The internal
+variable `mh-send-args' is now a list which fixes the problem (closes
+SF #1448604).
+
+*** Update Icons
+
+Most of the tool bar icons have been replaced by GTK or GNOME 2 icons
+(closes SF #1452715).
+
+*** Strip Build Number From emacs-version in X-Mailer
+
+This has been done (closes SF #1466481).
+
+*** Rename Function and Variable Definers
+
+If you had ever shown help for an MH-E symbol that was both a function
+or variable, you might have found that the hyperlink to the file
+brought you to the wrong definition. This has been fixed by renaming
+the macros `mh-defgroup', `mh-defcustom', `mh-defface',
+`mh-defun-compat', and `mh-defmacro-compat' to `defgroup-mh',
+`defcustom-mh', `defface-mh', `defun-mh', `defmacro-mh' respectively
+(closes SF #1472029).
+
+*** mh-insert-letter Uses Wrong Default
+
+If you had used `C-c TAB' (`mh-insert-letter') to insert a letter into
+your draft, specified a different folder, and chose the default
+message number, you got the wrong message. This has been fixed (closes
+SF #1473729).
diff --git a/etc/NEWS b/etc/NEWS
index 378f715b286..6662ffe9bad 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -571,26 +571,26 @@ can be edited for each replacement.
*** The current match in query-replace is highlighted in new face
`query-replace' which by default inherits from isearch face.
-** File operation changes:
-
-+++
-*** Unquoted `$' in file names do not signal an error any more when
-the corresponding environment variable does not exist.
-Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
-is only rarely needed.
+** Local variables lists:
+++
*** In processing a local variables list, Emacs strips the prefix and
suffix from every line before processing all the lines.
+++
+*** Text properties in local variables.
+
+A file local variables list cannot specify a string with text
+properties--any specified text properties are discarded.
+
++++
*** If the local variables list contains any variable-value pairs that
are not known to be safe, Emacs shows a prompt asking whether to apply
the local variables list as a whole. In earlier versions, a prompt
was only issued for variables explicitly marked as risky (for the
definition of risky variables, see `risky-local-variable-p').
-At the prompt, the user can choose to save the contents of this local
+At the prompt, you can choose to save the contents of this local
variables list to `safe-local-variable-values'. This new customizable
option is a list of variable-value pairs that are known to be safe.
Variables can also be marked as safe with the existing
@@ -599,6 +599,38 @@ However, risky variables will not be added to
`safe-local-variable-values' in this way.
+++
+*** The variable `enable-local-variables' controls how local variable
+lists are handled. t, the default, specifies the standard querying
+behavior. :safe means use only safe values, and ignore the rest.
+nil means ignore them all. Anything else means always query.
+
++++
+*** The variable `safe-local-eval-forms' specifies a list of forms that
+are ok to evaluate when they appear in an `eval' local variables
+specification. Normally Emacs asks for confirmation before evaluating
+such a form, but if the form appears in this list, no confirmation is
+needed.
+
++++
+*** If a function has a non-nil `safe-local-eval-function' property,
+that means it is ok to evaluate some calls to that function when it
+appears in an `eval' local variables specification. If the property
+is t, then any form calling that function with constant arguments is
+ok. If the property is a function or list of functions, they are called
+with the form as argument, and if any returns t, the form is ok to call.
+
+If the form is not "ok to call", that means Emacs asks for
+confirmation as before.
+
+** File operation changes:
+
++++
+*** Unquoted `$' in file names do not signal an error any more when
+the corresponding environment variable does not exist.
+Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
+is only rarely needed.
+
++++
*** find-file-read-only visits multiple files in read-only mode,
when the file name contains wildcard characters.
@@ -3055,7 +3087,7 @@ See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
---
** MH-E changes.
-Upgraded to MH-E version 7.95. There have been major changes since
+Upgraded to MH-E version 8.0. There have been major changes since
version 5.0.2; see MH-E-NEWS for details.
** Calendar changes:
@@ -3558,6 +3590,15 @@ occurrences of an element in the list, the one that's kept is the
first one.
+++
+*** New function `add-to-history' adds an element to a history list.
+
+Lisp packages should use this function to add elements to their
+history lists.
+
+If `history-delete-duplicates' is non-nil, it removes duplicates of
+the new element from the history list it updates.
+
++++
*** New function `rassq-delete-all'.
(rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
@@ -3994,38 +4035,6 @@ the minibuffer with a default value: if DEF is non-nil, the minibuffer
prompt provided in PROMPT is edited to show the default value provided
in DEF before the terminal colon and space.
-** Local variables lists:
-
-+++
-*** Text properties in local variables.
-
-A file local variables list cannot specify a string with text
-properties--any specified text properties are discarded.
-
-+++
-*** The variable `enable-local-variables' controls how local variable
-lists are handled. t, the default, specifies the standard querying
-behavior. :safe means use only safe values, and ignore the rest.
-nil means ignore them all. Anything else means always query.
-
-+++
-*** The variable `safe-local-eval-forms' specifies a list of forms that
-are ok to evaluate when they appear in an `eval' local variables
-specification. Normally Emacs asks for confirmation before evaluating
-such a form, but if the form appears in this list, no confirmation is
-needed.
-
----
-*** If a function has a non-nil `safe-local-eval-function' property,
-that means it is ok to evaluate some calls to that function when it
-appears in an `eval' local variables specification. If the property
-is t, then any form calling that function with constant arguments is
-ok. If the property is a function or list of functions, they are called
-with the form as argument, and if any returns t, the form is ok to call.
-
-If the form is not "ok to call", that means Emacs asks for
-confirmation as before.
-
** Searching and matching changes:
+++
diff --git a/info/dir b/info/dir
index 035ed6e7319..46b8c173c12 100644
--- a/info/dir
+++ b/info/dir
@@ -32,7 +32,6 @@ Emacs
* CL: (cl). Partial Common Lisp support for Emacs Lisp.
* Dired-X: (dired-x). Dired Extra Features.
* Ediff: (ediff). A visual interface for comparing and merging programs.
-* Emacs-Xtra: (emacs-xtra). Specialized Emacs features.
* Org Mode: (org). Outline-based notes management and organizer.
* PCL-CVS: (pcl-cvs). Emacs front-end to CVS.
* Speedbar: (speedbar). File/Tag summarizing utility.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 960130682fe..a8874bb88d7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,242 @@
+2006-05-09 Miles Bader <miles@gnu.org>
+
+ * comint.el (comint-insert-input): Remove redundant calls to setq
+ and goto-char.
+
+2006-05-10 Nick Roberts <nickrob@snap.net.nz>
+
+ * comint.el (comint-insert-input): Make it work when
+ comint-use-prompt-regexp is t.
+
+2006-05-10 Miles Bader <miles@gnu.org>
+
+ * subr.el (field-at-pos): New function.
+
+ * comint.el (comint-insert-input): Use it.
+
+2006-05-09 Juri Linkov <juri@jurta.org>
+
+ * battery.el (battery-linux-proc-acpi): Also try
+ `/proc/acpi/thermal_zone/THR2/temperature'.
+
+ * files.el <safe-local-variable>: Remove `eval' and `let' binding
+ for now unused lambda `string-or-null'.
+
+ * add-log.el (change-log-default-name): Put `string-or-null-p'
+ instead of lambda on `safe-local-variable' property.
+
+ * diff-mode.el (diff-context->unified): Use `region-beginning' and
+ `region-end' instead of `mark' and `point'.
+ (diff-unified->context, diff-reverse-direction, diff-fixup-modifs):
+ Operate on region in Transient Mark mode when the mark is active.
+ Use `region-beginning' and `region-end' instead of `mark' and
+ `point'.
+ (diff-hunk-text, diff-goto-source): Doc fix.
+
+ * startup.el (fancy-splash-screens, normal-splash-screen): Use
+ face `mode-line-buffer-id' for mode-line buffer face instead of
+ hard-coded `(:weight bold)'.
+
+ * arc-mode.el (archive-set-buffer-as-visiting-file): Bind
+ buffer-undo-list to t (undo-ask is reproducible by visiting
+ nested archives).
+
+2006-05-09 Kim F. Storm <storm@cua.dk>
+
+ * progmodes/grep.el (rgrep): Set default directory of *grep*
+ buffer if we start M-x rgrep in the *grep* buffer and choose
+ a different base directory.
+
+2006-05-09 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-register-file-name-handlers): Enable Tramp
+ completion also when ido is loaded.
+
+2006-05-09 Masatake YAMATO <jet@gyve.org>
+
+ * font-lock.el (cpp-font-lock-keywords-source-directives): Addded
+ "warning" and "import".
+ (cpp-font-lock-keywords): Added "warning".
+
+2006-05-08 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * term/xterm.el (terminal-init-xterm): Add more key bindings.
+
+2006-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * mwheel.el (mwheel-scroll): Make sure that when scrolling multiple
+ pages at a time, if we signal the end, we should indeed reach that end.
+
+2006-05-08 David Reitter <david.reitter@gmail.com>
+
+ * emacs-lisp/easy-mmode.el (define-minor-mode): Only preserve messages
+ output during execution of the body.
+
+2006-05-08 Kim F. Storm <storm@cua.dk>
+
+ * progmodes/grep.el (lgrep, rgrep): Doc fixes.
+
+2006-05-08 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*):
+ Use with-current-buffer.
+
+2006-05-07 Kim F. Storm <storm@cua.dk>
+
+ * subr.el (add-to-history): Remove keep-dups arg.
+
+ * kmacro.el (kmacro-push-ring): Let-bind history-delete-duplicates
+ to nil around call to add-to-history.
+
+2006-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/syntax.el (syntax-ppss): Flush the cache before rather
+ than after a buffer modification.
+
+2006-05-08 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-var-create-handler): Move speedbar
+ call to...
+ (gud-watch): ...here so speedbar is raised for already watched
+ expressions.
+ (gdb-speedbar-refresh): Delete function.
+ (gdb-speedbar-update, gdb-speedbar-timer-fn): New functions.
+ Use speedbar-timer-fn instead of speedbar-refresh (reverting
+ earlier change).
+ (gdb-var-evaluate-expression-handler)
+ (gdb-var-list-children-handler-1, gdb-var-update-handler-1): Use it.
+
+ * speedbar.el (speedbar-timer-fn): Remove save-window-excursion.
+ Update localized contents for all buffers except ignored modes.
+
+2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * term/mac-win.el (mac-utxt-to-string): Use `eq' instead of `='.
+ (mac-atsu-font-table, mac-font-panel-mode): Add defvars.
+ (mac-bytes-to-digits, mac-handle-toolbar-switch-mode)
+ (mac-handle-font-panel-closed, mac-handle-font-selection):
+ New functions.
+ (mac-font-panel-mode): New minor mode.
+ (mac-apple-event-map): Add bindings for toolbar toggle button and
+ font panel.
+ (menu-bar-showhide-menu): Add mac-font-panel-mode.
+
+2006-05-07 John Paul Wallington <jpw@pobox.com>
+
+ * ibuffer.el (ibuffer-compressed-file-name-regexp):
+ Avoid `regexp-opt'; simplify regexp for readability.
+
+2006-05-06 Eli Zaretskii <eliz@gnu.org>
+
+ * ldefs-boot.el (dired-do-redisplay, dired-maybe-insert-subdir):
+ * files.el (buffer-stale-function):
+ * dired-aux.el (dired-do-redisplay, dired-maybe-insert-subdir):
+ * autorevert.el (global-auto-revert-non-file-buffers): Point Info
+ links to the main manual, not to emacs-xtra.
+
+2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * term/mac-win.el: (mac-utxt-to-string): Don't make adjustment for
+ MacJapanese if text is ASCII-only.
+
+2006-05-06 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-goto-breakpoint): Use or instead of
+ unless so nil isn't returned.
+ (gdb-setup-windows, gdb-restore-windows): Reset gdb-source-window.
+
+2006-05-06 Kim F. Storm <storm@cua.dk>
+
+ * subr.el (add-to-history): New function.
+
+ * ediff.el (ediff-files, ediff-files3, ediff-merge-files)
+ (ediff-merge-files-with-ancestor):
+ * env.el (setenv):
+ * isearch.el (isearch-update-ring):
+ * server.el (server-visit-files):
+ * progmodes/grep.el (lgrep, rgrep):
+ * progmodes/vhdl-mode.el (vhdl-generate-makefile-1):
+ * progmodes/xscheme.el (xscheme-insert-expression):
+ Use add-to-history.
+
+ * kmacro.el (kmacro-push-ring): Use add-to-history.
+ (kmacro-ring-length): Remove unused defun.
+ (kmacro-start-macro): Use kmacro-push-ring.
+
+2006-05-06 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * emacs-lisp/ewoc.el (ewoc-create, ewoc-set-hf): Use `insert'
+ directly instead of a lambda expression that calls it.
+
+2006-05-06 Kim F. Storm <storm@cua.dk>
+
+ * avoid.el (mouse-avoidance-point-position): Use posn-at-point
+ instead of compute-motion.
+
+2006-05-05 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * ibuffer.el (ibuffer-compressed-file-name-regexp): Undo previous
+ change.
+
+2006-05-05 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * startup.el (command-line-1): Refer to "Pure Storage" on
+ pure-space-overflow.
+
+2006-05-05 Martin Rudalics <rudalics@gmx.at>
+
+ * emacs-lisp/re-builder.el (reb-update-overlays): Cycle through
+ provided faces once they all have been used up.
+
+2006-05-05 Eli Zaretskii <eliz@gnu.org>
+
+ * startup.el (normal-splash-screen, fancy-splash-screens-1): Add a
+ reference to the Lisp manual to the warning about pure space
+ overflow.
+
+2006-05-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org>
+
+ * textmodes/ispell.el (ispell-buffer-local-dict): Add a `no-reload'
+ argument to avoid the call to `ispell-internal-change-dictionary'
+ when not needed.
+ (ispell-change-dictionary): Use this argument and call
+ `ispell-internal-change-dictionary' after the possible change
+ to `ispell-local-dictionary'.
+ (ispell-internal-change-dictionary): Check for a change in
+ personal dictionary use too.
+ Cosmetic changes from Agustin Martin
+ <agustin.martin@hispalinux.es>.
+
+2006-05-05 Eli Zaretskii <eliz@gnu.org>
+
+ * startup.el (command-line): On MS-Windows, probe "~", not
+ "~USER", for warning about non-existent home directory
+
+ * arc-mode.el (archive-l-e): New optional argument `float' means
+ generate a float value.
+ (archive-arc-summarize, archive-lzh-summarize)
+ (archive-zip-summarize, archive-zoo-summarize): Invoke archive-l-e
+ with 3rd argument non-nil when file's size is being computed.
+ Format the file sizes with %8.0f instead of %8d.
+
+2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * cus-start.el (all): Add mac-dnd-known-types.
+
+ * term/mac-win.el: (mac-utxt-to-string, mac-string-to-utxt)
+ (mac-TEXT-to-string, mac-string-to-TEXT, mac-furl-to-string)
+ (mac-TIFF-to-string): New functions.
+ (x-get-selection, x-selection-value)
+ (mac-select-convert-to-string): Use them.
+ (mac-text-encoding-mac-japanese-basic-variant): New constant.
+ (mac-dnd-types-alist): New customization variable.
+ (mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt)
+ (mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data)
+ (mac-dnd-handle-drag-n-drop-event): New functions.
+ (mac-drag-n-drop): Remove function.
+ (global-map): Bind drag-n-drop and M-drag-n-drop to
+ mac-dnd-handle-drag-n-drop-event.
+
2006-05-04 Karl Chen <quarl@NOSPAM.quarl.org>
* progmodes/perl-mode.el (perl-beginning-of-function):
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 47a839d539d..393a696d3f1 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -45,8 +45,7 @@
:type '(choice (const :tag "default" nil)
string)
:group 'change-log)
-(put 'change-log-default-name 'safe-local-variable
- (lambda (a) (or (stringp a) (null a))))
+(put 'change-log-default-name 'safe-local-variable 'string-or-null-p)
(defcustom change-log-mode-hook nil
"Normal hook run by `change-log-mode'."
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index abf38994235..96b41eca88d 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -464,10 +464,12 @@ Each descriptor is a vector of the form
(defsubst archive-name (suffix)
(intern (concat "archive-" (symbol-name archive-subtype) "-" suffix)))
-(defun archive-l-e (str &optional len)
+(defun archive-l-e (str &optional len float)
"Convert little endian string/vector STR to integer.
Alternatively, STR may be a buffer position in the current buffer
-in which case a second argument, length LEN, should be supplied."
+in which case a second argument, length LEN, should be supplied.
+FLOAT, if non-nil, means generate and return a float instead of an integer
+\(use this for numbers that can overflow the Emacs integer)."
(if (stringp str)
(setq len (length str))
(setq str (buffer-substring str (+ str len))))
@@ -475,7 +477,8 @@ in which case a second argument, length LEN, should be supplied."
(i 0))
(while (< i len)
(setq i (1+ i)
- result (+ (ash result 8) (aref str (- len i)))))
+ result (+ (if float (* result 256.0) (ash result 8))
+ (aref str (- len i)))))
result))
(defun archive-int-to-mode (mode)
@@ -860,7 +863,8 @@ using `make-temp-file', and the generated name is returned."
"Set the current buffer as if it were visiting FILENAME."
(save-excursion
(goto-char (point-min))
- (let ((coding
+ (let ((buffer-undo-list t)
+ (coding
(or coding-system-for-read
(and set-auto-coding-function
(save-excursion
@@ -1331,13 +1335,14 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(let* ((namefld (buffer-substring (+ p 2) (+ p 2 13)))
(fnlen (or (string-match "\0" namefld) 13))
(efnname (substring namefld 0 fnlen))
- (csize (archive-l-e (+ p 15) 4))
+ ;; Convert to float to avoid overflow for very large files.
+ (csize (archive-l-e (+ p 15) 4 'float))
(moddate (archive-l-e (+ p 19) 2))
(modtime (archive-l-e (+ p 21) 2))
- (ucsize (archive-l-e (+ p 25) 4))
+ (ucsize (archive-l-e (+ p 25) 4 'float))
(fiddle (string= efnname (upcase efnname)))
(ifnname (if fiddle (downcase efnname) efnname))
- (text (format " %8d %-11s %-8s %s"
+ (text (format " %8.0f %-11s %-8s %s"
ucsize
(archive-dosdate moddate)
(archive-dostime modtime)
@@ -1359,7 +1364,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
dash)
(archive-summarize-files (nreverse visual))
(insert dash
- (format " %8d %d file%s"
+ (format " %8.0f %d file%s"
totalsize
(length files)
(if (= 1 (length files)) "" "s"))
@@ -1393,9 +1398,10 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(while (progn (goto-char p) ;beginning of a base header.
(looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-"))
(let* ((hsize (char-after p)) ;size of the base header (level 0 and 1)
- (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2),
+ ;; Convert to float to avoid overflow for very large files.
+ (csize (archive-l-e (+ p 7) 4 'float)) ;size of a compressed file to follow (level 0 and 2),
;size of extended headers + the compressed file to follow (level 1).
- (ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file.
+ (ucsize (archive-l-e (+ p 11) 4 'float)) ;size of an uncompressed file.
(time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers
(time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.)
(hdrlvl (char-after (+ p 20))) ;header level
@@ -1471,12 +1477,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(archive-unixtime time1 time2)
(archive-dostime time1)))
(setq text (if archive-alternate-display
- (format " %8d %5S %5S %s"
+ (format " %8.0f %5S %5S %s"
ucsize
(or uid "?")
(or gid "?")
ifnname)
- (format " %10s %8d %-11s %-8s %s"
+ (format " %10s %8.0f %-11s %-8s %s"
modestr
ucsize
moddate
@@ -1506,8 +1512,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
"M Length Uid Gid File\n"
"M Filemode Length Date Time File\n"))
(sumline (if archive-alternate-display
- " %8d %d file%s"
- " %8d %d file%s")))
+ " %8.0f %d file%s"
+ " %8.0f %d file%s")))
(insert header dash)
(archive-summarize-files (nreverse visual))
(insert dash
@@ -1603,7 +1609,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
;; (method (archive-l-e (+ p 10) 2))
(modtime (archive-l-e (+ p 12) 2))
(moddate (archive-l-e (+ p 14) 2))
- (ucsize (archive-l-e (+ p 24) 4))
+ ;; Convert to float to avoid overflow for very large files.
+ (ucsize (archive-l-e (+ p 24) 4 'float))
(fnlen (archive-l-e (+ p 28) 2))
(exlen (archive-l-e (+ p 30) 2))
(fclen (archive-l-e (+ p 32) 2))
@@ -1629,7 +1636,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(string= (upcase efnname) efnname)))
(ifnname (if fiddle (downcase efnname) efnname))
(width (string-width ifnname))
- (text (format " %10s %8d %-11s %-8s %s"
+ (text (format " %10s %8.0f %-11s %-8s %s"
modestr
ucsize
(archive-dosdate moddate)
@@ -1655,7 +1662,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
dash)
(archive-summarize-files (nreverse visual))
(insert dash
- (format " %8d %d file%s"
+ (format " %8.0f %d file%s"
totalsize
(length files)
(if (= 1 (length files)) "" "s"))
@@ -1709,7 +1716,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(let* ((next (1+ (archive-l-e (+ p 6) 4)))
(moddate (archive-l-e (+ p 14) 2))
(modtime (archive-l-e (+ p 16) 2))
- (ucsize (archive-l-e (+ p 20) 4))
+ ;; Convert to float to avoid overflow for very large files.
+ (ucsize (archive-l-e (+ p 20) 4 'float))
(namefld (buffer-substring (+ p 38) (+ p 38 13)))
(dirtype (char-after (+ p 4)))
(lfnlen (if (= dirtype 2) (char-after (+ p 56)) 0))
@@ -1733,7 +1741,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
(fiddle (and (= lfnlen 0) (string= efnname (upcase efnname))))
(ifnname (if fiddle (downcase efnname) efnname))
(width (string-width ifnname))
- (text (format " %8d %-11s %-8s %s"
+ (text (format " %8.0f %-11s %-8s %s"
ucsize
(archive-dosdate moddate)
(archive-dostime modtime)
@@ -1755,7 +1763,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
dash)
(archive-summarize-files (nreverse visual))
(insert dash
- (format " %8d %d file%s"
+ (format " %8.0f %d file%s"
totalsize
(length files)
(if (= 1 (length files)) "" "s"))
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 4119dba5755..9d189e027c0 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -215,10 +215,10 @@ changes in subdirectories or in the contents, size, modes, etc.,
of files. You may still sometimes want to revert them manually.
Use this option with care since it could lead to excessive auto-reverts.
-For more information, see Info node `(emacs-xtra)Autorevert'."
+For more information, see Info node `(emacs)Autorevert'."
:group 'auto-revert
:type 'boolean
- :link '(info-link "(emacs-xtra)Autorevert"))
+ :link '(info-link "(emacs)Autorevert"))
(defcustom global-auto-revert-ignore-modes ()
"List of major modes Global Auto-Revert Mode should not check."
diff --git a/lisp/avoid.el b/lisp/avoid.el
index 1d97dd306db..1868707720e 100644
--- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -139,23 +139,13 @@ Only applies in mouse-avoidance-modes `animate' and `jump'."
(defun mouse-avoidance-point-position ()
"Return the position of point as (FRAME X . Y).
Analogous to `mouse-position'."
- (let* ((w (selected-window))
- (edges (window-inside-edges w))
- (list
- (compute-motion (max (window-start w) (point-min)) ; start pos
- ;; window-start can be < point-min if the
- ;; latter has changed since the last redisplay
- '(0 . 0) ; start XY
- (point) ; stop pos
- nil ; stop XY: none
- nil ; width
- (cons (window-hscroll w) 0) ; 0 may not be right?
- (selected-window))))
- ;; compute-motion returns (pos HPOS VPOS prevhpos contin)
- ;; we want: (frame hpos . vpos)
+ (let ((edges (window-inside-edges))
+ (x-y (posn-x-y (posn-at-point))))
(cons (selected-frame)
- (cons (+ (car edges) (car (cdr list)))
- (+ (car (cdr edges)) (car (cdr (cdr list))))))))
+ (cons (+ (car edges)
+ (/ (car x-y) (frame-char-width)))
+ (+ (car (cdr edges))
+ (/ (cdr x-y) (frame-char-height)))))))
;(defun mouse-avoidance-point-position-test ()
; (interactive)
diff --git a/lisp/battery.el b/lisp/battery.el
index 34f74aa9932..50edc8dde8a 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -386,6 +386,14 @@ The following %-sequences are provided:
(when (re-search-forward
"temperature: +\\([0-9]+\\) C$" nil t)
(match-string 1))))
+ (when (file-exists-p
+ "/proc/acpi/thermal_zone/THR2/temperature")
+ (with-temp-buffer
+ (insert-file-contents
+ "/proc/acpi/thermal_zone/THR2/temperature")
+ (when (re-search-forward
+ "temperature: +\\([0-9]+\\) C$" nil t)
+ (match-string 1))))
"N/A"))
(cons ?r (or (and rate (concat (number-to-string rate) " "
rate-type)) "N/A"))
diff --git a/lisp/comint.el b/lisp/comint.el
index 946085661fc..c7e5b3bdddd 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -802,27 +802,31 @@ buffer. The hook `comint-exec-hook' is run after each exec."
;; This doesn't use "e" because it is supposed to work
;; for events without parameters.
(interactive (list last-input-event))
- (let ((pos (point)))
- (if event (posn-set-point (event-end event)))
- (if (not (eq (get-char-property (point) 'field) 'input))
- ;; No input at POS, fall back to the global definition.
- (let* ((keys (this-command-keys))
- (last-key (and (vectorp keys) (aref keys (1- (length keys)))))
- (fun (and last-key (lookup-key global-map (vector last-key)))))
- (goto-char pos)
- (and fun (call-interactively fun)))
- (setq pos (point))
- ;; There's previous input at POS, insert it at the end of the buffer.
- (goto-char (point-max))
- ;; First delete any old unsent input at the end
- (delete-region
- (or (marker-position comint-accum-marker)
- (process-mark (get-buffer-process (current-buffer))))
- (point))
- ;; Insert the input at point
- (insert (buffer-substring-no-properties
- (previous-single-char-property-change (1+ pos) 'field)
- (next-single-char-property-change pos 'field))))))
+ (when event
+ (posn-set-point (event-end event)))
+ (if comint-use-prompt-regexp
+ (let ((input (funcall comint-get-old-input))
+ (process (get-buffer-process (current-buffer))))
+ (if (not process)
+ (error "Current buffer has no process")
+ (goto-char (process-mark process))
+ (insert input)))
+ (let ((pos (point)))
+ (if (not (eq (field-at-pos pos) 'input))
+ ;; No input at POS, fall back to the global definition.
+ (let* ((keys (this-command-keys))
+ (last-key (and (vectorp keys) (aref keys (1- (length keys)))))
+ (fun (and last-key (lookup-key global-map (vector last-key)))))
+ (and fun (call-interactively fun)))
+ ;; There's previous input at POS, insert it at the end of the buffer.
+ (goto-char (point-max))
+ ;; First delete any old unsent input at the end
+ (delete-region
+ (or (marker-position comint-accum-marker)
+ (process-mark (get-buffer-process (current-buffer))))
+ (point))
+ ;; Insert the input at point
+ (insert (field-string-no-properties pos))))))
;; Input history processing in a buffer
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index f15dc3f7a4c..3110252288b 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -193,6 +193,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(suggest-key-bindings keyboard (choice (const :tag "off" nil)
(integer :tag "time" 2)
(other :tag "on")))
+ ;; macselect.c
+ (mac-dnd-known-types mac (repeat string) "22.1")
;; macterm.c
(mac-control-modifier mac (choice (const :tag "No modifier" nil)
(const control) (const meta)
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index cc89aad6ca3..1a8402e06c4 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -633,8 +633,8 @@ Non-nil OLD means that we want the old file."
"Convert unified diffs to context diffs.
START and END are either taken from the region (if a prefix arg is given) or
else cover the whole bufer."
- (interactive (if current-prefix-arg
- (list (mark) (point))
+ (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
+ (list (region-beginning) (region-end))
(list (point-min) (point-max))))
(unless (markerp end) (setq end (copy-marker end)))
(let (;;(diff-inhibit-after-change t)
@@ -722,7 +722,7 @@ START and END are either taken from the region
\(when it is highlighted) or else cover the whole buffer.
With a prefix argument, convert unified format to context format."
(interactive (if (and transient-mark-mode mark-active)
- (list (mark) (point) current-prefix-arg)
+ (list (region-beginning) (region-end) current-prefix-arg)
(list (point-min) (point-max) current-prefix-arg)))
(if to-context
(diff-unified->context start end)
@@ -795,8 +795,8 @@ With a prefix argument, convert unified format to context format."
"Reverse the direction of the diffs.
START and END are either taken from the region (if a prefix arg is given) or
else cover the whole bufer."
- (interactive (if current-prefix-arg
- (list (mark) (point))
+ (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
+ (list (region-beginning) (region-end))
(list (point-min) (point-max))))
(unless (markerp end) (setq end (copy-marker end)))
(let (;;(diff-inhibit-after-change t)
@@ -857,8 +857,8 @@ else cover the whole bufer."
"Fixup the hunk headers (in case the buffer was modified).
START and END are either taken from the region (if a prefix arg is given) or
else cover the whole bufer."
- (interactive (if current-prefix-arg
- (list (mark) (point))
+ (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active))
+ (list (region-beginning) (region-end))
(list (point-min) (point-max))))
(let ((inhibit-read-only t))
(save-excursion
@@ -1069,7 +1069,7 @@ Only works for unified diffs."
(defun diff-hunk-text (hunk destp char-offset)
"Return the literal source text from HUNK as (TEXT . OFFSET).
-if DESTP is nil TEXT is the source, otherwise the destination text.
+If DESTP is nil, TEXT is the source, otherwise the destination text.
CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding
char-offset in TEXT."
(with-temp-buffer
@@ -1302,7 +1302,7 @@ With a prefix argument, try to REVERSE the hunk."
`diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg
is given) determines whether to jump to the old or the new file.
If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument])
- then `diff-jump-to-old-file' is also set, for the next invocations."
+then `diff-jump-to-old-file' is also set, for the next invocations."
(interactive (list current-prefix-arg last-input-event))
;; When pointing at a removal line, we probably want to jump to
;; the old location, and else to the new (i.e. as if reverting).
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 20b0037ab7e..e07689973e4 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -918,7 +918,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
-See Info node `(emacs-xtra)Subdir switches' for more details."
+See Info node `(emacs)Subdir switches' for more details."
;; Moves point if the next ARG files are redisplayed.
(interactive "P\np")
(if (and test-for-subdir (dired-get-subdir))
@@ -1761,7 +1761,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
-See Info node `(emacs-xtra)Subdir switches' for more details."
+See Info node `(emacs)Subdir switches' for more details."
(interactive
(list (dired-get-filename)
(if current-prefix-arg
diff --git a/lisp/ediff.el b/lisp/ediff.el
index bb6cfc6b72e..14f634f0cd2 100644
--- a/lisp/ediff.el
+++ b/lisp/ediff.el
@@ -210,12 +210,11 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1)))
)))
(ediff-files-internal file-A
@@ -246,25 +245,22 @@
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons
- (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "File C to compare"
(setq dir-C (if ediff-use-last-dir
ediff-last-dir-C
(file-name-directory ff)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory ff)
- dir-C))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory ff)
+ dir-C)))
(ediff-get-default-file-name ff 2)))
)))
(ediff-files-internal file-A
@@ -1109,12 +1105,11 @@ lines. For small regions, use `ediff-regions-wordwise'."
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
@@ -1153,13 +1148,11 @@ lines. For small regions, use `ediff-regions-wordwise'."
ediff-last-dir-B
(file-name-directory f)))
(progn
- (setq file-name-history
- (cons
- (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory f)
- dir-B))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory f)
+ dir-B)))
(ediff-get-default-file-name f 1))))
(ediff-read-file-name "Ancestor file"
(setq dir-ancestor
@@ -1167,12 +1160,11 @@ lines. For small regions, use `ediff-regions-wordwise'."
ediff-last-dir-ancestor
(file-name-directory ff)))
(progn
- (setq file-name-history
- (cons (ediff-abbreviate-file-name
- (expand-file-name
- (file-name-nondirectory ff)
- dir-ancestor))
- file-name-history))
+ (add-to-history 'file-name-history
+ (ediff-abbreviate-file-name
+ (expand-file-name
+ (file-name-nondirectory ff)
+ dir-ancestor)))
(ediff-get-default-file-name ff 2)))
)))
(setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks))
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index caac02c2ee3..5475ed530d3 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -139,7 +139,8 @@ For example, you could write
(setq body (list* lighter keymap body) lighter nil keymap nil))
((keywordp keymap) (push keymap body) (setq keymap nil)))
- (let* ((mode-name (symbol-name mode))
+ (let* ((last-message (current-message))
+ (mode-name (symbol-name mode))
(pretty-name (easy-mmode-pretty-mode-name mode lighter))
(globalp nil)
(set nil)
@@ -236,7 +237,10 @@ With zero or negative ARG turn mode off.
(if (called-interactively-p)
(progn
,(if globalp `(customize-mark-as-set ',mode))
- (unless (current-message)
+ ;; Avoid overwriting a message shown by the body,
+ ;; but do overwrite previous messages.
+ (unless ,(and (current-message)
+ (not (equal last-message (current-message))))
(message ,(format "%s %%sabled" pretty-name)
(if ,mode "en" "dis")))))
(force-mode-line-update)
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index 085ae532a63..278ffe6e7ca 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -221,16 +221,12 @@ dll bound to ewoc--dll, and VARLIST bound as in a let*.
dll will be bound when VARLIST is initialized, but the current
buffer will *not* have been changed.
Return value of last form in FORMS."
- (let ((old-buffer (make-symbol "old-buffer"))
- (hnd (make-symbol "ewoc")))
- `(let* ((,old-buffer (current-buffer))
- (,hnd ,ewoc)
+ (let ((hnd (make-symbol "ewoc")))
+ `(let* ((,hnd ,ewoc)
(dll (ewoc--dll ,hnd))
,@varlist)
- (set-buffer (ewoc--buffer ,hnd))
- (unwind-protect
- (progn ,@forms)
- (set-buffer ,old-buffer)))))
+ (with-current-buffer (ewoc--buffer ,hnd)
+ ,@forms))))
(defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms)
`(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms))
@@ -322,8 +318,8 @@ be inserted at the bottom of the ewoc."
(unless header (setq header ""))
(unless footer (setq footer ""))
(setf (ewoc--node-start-marker dll) (copy-marker pos))
- (let ((foot (ewoc--create-node footer (lambda (x) (insert footer)) pos))
- (head (ewoc--create-node header (lambda (x) (insert header)) pos)))
+ (let ((foot (ewoc--create-node footer 'insert pos))
+ (head (ewoc--create-node header 'insert pos)))
(ewoc--node-enter-first dll head)
(ewoc--node-enter-last dll foot)
(setf (ewoc--header new-ewoc) head)
@@ -601,8 +597,8 @@ Return nil if the buffer has been deleted."
"Set the HEADER and FOOTER of EWOC."
(setf (ewoc--node-data (ewoc--header ewoc)) header)
(setf (ewoc--node-data (ewoc--footer ewoc)) footer)
- (ewoc--refresh-node (lambda (x) (insert header)) (ewoc--header ewoc))
- (ewoc--refresh-node (lambda (x) (insert footer)) (ewoc--footer ewoc)))
+ (ewoc--refresh-node 'insert (ewoc--header ewoc))
+ (ewoc--refresh-node 'insert (ewoc--footer ewoc)))
(provide 'ewoc)
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 827578f694c..5dc67e4ac21 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -112,7 +112,7 @@
(if (not (fboundp 'make-overlay))
(require 'overlay))
-;; User costomizable variables
+;; User customizable variables
(defgroup re-builder nil
"Options for the RE Builder."
:group 'lisp
@@ -627,11 +627,9 @@ Return t if the (cooked) expression changed."
beg (match-end 0)))
i))
-
(defun reb-update-overlays (&optional subexp)
"Switch to `reb-target-buffer' and mark all matches of `reb-regexp'.
If SUBEXP is non-nil mark only the corresponding sub-expressions."
-
(let* ((re (reb-target-binding reb-regexp))
(subexps (reb-count-subexps re))
(matches 0)
@@ -645,24 +643,35 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions."
(or (not reb-auto-match-limit)
(< matches reb-auto-match-limit)))
(if (= 0 (length (match-string 0)))
- (error "Empty regular expression!"))
- (let ((i 0))
+ (error "Empty regular expression!"))
+ (let ((i 0)
+ suffix max-suffix)
(setq matches (1+ matches))
(while (<= i subexps)
(if (and (or (not subexp) (= subexp i))
(match-beginning i))
(let ((overlay (make-overlay (match-beginning i)
(match-end i)))
- (face-name (format "reb-match-%d" i)))
- (if (not firstmatch)
- (setq firstmatch (match-data)))
+ ;; When we have exceeded the number of provided faces,
+ ;; cycle thru them where `max-suffix' denotes the maximum
+ ;; suffix for `reb-match-*' that has been defined and
+ ;; `suffix' the suffix calculated for the current match.
+ (face
+ (cond
+ (max-suffix
+ (if (= suffix max-suffix)
+ (setq suffix 1)
+ (setq suffix (1+ suffix)))
+ (intern-soft (format "reb-match-%d" suffix)))
+ ((intern-soft (format "reb-match-%d" i)))
+ ((setq max-suffix (1- i))
+ (setq suffix 1)
+ ;; `reb-match-1' must exist.
+ 'reb-match-1))))
+ (unless firstmatch (setq firstmatch (match-data)))
(setq reb-overlays (cons overlay reb-overlays)
submatches (1+ submatches))
- (overlay-put
- overlay 'face
- (or (intern-soft face-name)
- (error "Too many subexpressions - face `%s' not defined"
- face-name )))
+ (overlay-put overlay 'face face)
(overlay-put overlay 'priority i)))
(setq i (1+ i))))))
(let ((count (if subexp submatches matches)))
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 1484c38a403..695d7877b38 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -27,9 +27,9 @@
;; The main exported function is `syntax-ppss'. You might also need
;; to call `syntax-ppss-flush-cache' or to add it to
-;; after-change-functions'(although this is automatically done by
+;; before-change-functions'(although this is automatically done by
;; syntax-ppss when needed, but that might fail if syntax-ppss is
-;; called in a context where after-change-functions is temporarily
+;; called in a context where before-change-functions is temporarily
;; let-bound to nil).
;;; Todo:
@@ -94,10 +94,9 @@ point (where the PPSS is equivalent to nil).")
(setq syntax-ppss-last nil)
(setcar syntax-ppss-last nil)))
;; Unregister if there's no cache left. Sadly this doesn't work
- ;; because `after-change-functions' is temporarily bound to nil here.
+ ;; because `before-change-functions' is temporarily bound to nil here.
;; (unless syntax-ppss-cache
- ;; (remove-hook 'after-change-functions
- ;; 'syntax-ppss-after-change-function t))
+ ;; (remove-hook 'before-change-functions 'syntax-ppss-flush-cache t))
)
(defvar syntax-ppss-stats
@@ -148,7 +147,7 @@ Point is at POS when this function returns."
;; too far from `pos', we could try to use other positions
;; in (nth 9 old-ppss), but that doesn't seem to happen in
;; practice and it would complicate this code (and the
- ;; after-change-function code even more). But maybe it
+ ;; before-change-function code even more). But maybe it
;; would be useful in "degenerate" cases such as when the
;; whole file is wrapped in a set of parenthesis.
(setq pt-min (or (car (nth 9 old-ppss))
@@ -176,10 +175,10 @@ Point is at POS when this function returns."
(setq cache (cdr cache)))
(if cache (setq pt-min (caar cache) ppss (cdar cache)))
- ;; Setup the after-change function if necessary.
+ ;; Setup the before-change function if necessary.
(unless (or syntax-ppss-cache syntax-ppss-last)
- (add-hook 'after-change-functions
- 'syntax-ppss-flush-cache nil t))
+ (add-hook 'before-change-functions
+ 'syntax-ppss-flush-cache t t))
;; Use the best of OLD-POS and CACHE.
(if (or (not old-pos) (< old-pos pt-min))
diff --git a/lisp/env.el b/lisp/env.el
index 66d505ee011..d0c2208fc6f 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -133,7 +133,7 @@ a side-effect."
(let* ((var (read-envvar-name "Set environment variable: " nil))
(value (getenv var)))
(when value
- (push value setenv-history))
+ (add-to-history 'setenv-history value))
;; Here finally we specify the args to give call setenv with.
(list var
(read-from-minibuffer (format "Set %s to value: " var)
diff --git a/lisp/files.el b/lisp/files.el
index 16c0f1288a1..c79365a6926 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2350,31 +2350,29 @@ asking you for confirmation."
;; For variables defined in the C source code the declaration should go here:
;; FIXME: Some variables should be moved according to the rules above.
-(let ((string-or-null (lambda (a) (or (stringp a) (null a)))))
- (eval
- `(mapc (lambda (pair)
- (put (car pair) 'safe-local-variable (cdr pair)))
- '((byte-compile-dynamic . booleanp)
- (byte-compile-dynamic-docstrings . booleanp)
- (byte-compile-warnings . booleanp)
- (c-basic-offset . integerp)
- (c-file-style . stringp)
- (c-indent-level . integerp)
- (comment-column . integerp)
- (compile-command . string-or-null-p)
- (find-file-visit-truename . booleanp)
- (fill-column . integerp)
- (fill-prefix . string-or-null-p)
- (indent-tabs-mode . booleanp) ;; C source code
- (kept-old-versions . integerp)
- (kept-new-versions . integerp)
- (left-margin . integerp)
- (no-byte-compile . booleanp)
- (no-update-autoloads . booleanp)
- (outline-regexp . string-or-null-p)
- (tab-width . integerp) ;; C source code
- (truncate-lines . booleanp) ;; C source code
- (version-control . symbolp)))))
+(mapc (lambda (pair)
+ (put (car pair) 'safe-local-variable (cdr pair)))
+ '((byte-compile-dynamic . booleanp)
+ (byte-compile-dynamic-docstrings . booleanp)
+ (byte-compile-warnings . booleanp)
+ (c-basic-offset . integerp)
+ (c-file-style . stringp)
+ (c-indent-level . integerp)
+ (comment-column . integerp)
+ (compile-command . string-or-null-p)
+ (find-file-visit-truename . booleanp)
+ (fill-column . integerp)
+ (fill-prefix . string-or-null-p)
+ (indent-tabs-mode . booleanp) ;; C source code
+ (kept-old-versions . integerp)
+ (kept-new-versions . integerp)
+ (left-margin . integerp)
+ (no-byte-compile . booleanp)
+ (no-update-autoloads . booleanp)
+ (outline-regexp . string-or-null-p)
+ (tab-width . integerp) ;; C source code
+ (truncate-lines . booleanp) ;; C source code
+ (version-control . symbolp)))
(put 'c-set-style 'safe-local-eval-function t)
@@ -3932,7 +3930,7 @@ user. In such situations, one has to be careful with potentially
time consuming operations.
For more information on how this variable is used by Auto Revert mode,
-see Info node `(emacs-xtra)Supporting additional buffers'.")
+see Info node `(emacs)Supporting additional buffers'.")
(defvar before-revert-hook nil
"Normal hook for `revert-buffer' to run before reverting.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index c2b8d7200da..f001a0bfaac 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1974,17 +1974,17 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
;;
;; (regexp-opt
;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef"
-;; "ifndef" "include" "line" "pragma" "undef"))
+;; "ifndef" "import" "include" "line" "pragma" "undef" "warning"))
;;
(defconst cpp-font-lock-keywords-source-directives
- "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef"
+ "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning"
"Regular expressoin used in `cpp-font-lock-keywords'.")
;; `cpp-font-lock-keywords-source-depth' is calculated from:
;;
;; (regexp-opt-depth (regexp-opt
;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef"
-;; "ifndef" "include" "line" "pragma" "undef")))
+;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")))
;;
(defconst cpp-font-lock-keywords-source-depth 0
"An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'.
@@ -1996,7 +1996,7 @@ Used in `cpp-font-lock-keywords'.")
(list
;;
;; Fontify error directives.
- '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend)
+ '("^#[ \t]*\\(?:error\\|warning\\)[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend)
;;
;; Fontify filenames in #include <...> preprocessor directives as strings.
'("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)"
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 4b1069b26c1..6264d2e56b5 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -324,14 +324,11 @@ directory, like `default-directory'."
:type '(repeat function)
:group 'ibuffer)
-(eval-when-compile
(defcustom ibuffer-compressed-file-name-regexp
- (concat "\\.\\("
- (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z"))
- "\\)$")
+ "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$"
"Regexp to match compressed file names."
:type 'regexp
- :group 'ibuffer))
+ :group 'ibuffer)
(defcustom ibuffer-hook nil
"Hook run when `ibuffer' is called."
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 78b523f3845..840af2a9b81 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -831,21 +831,10 @@ NOPUSH is t and EDIT is t."
(defun isearch-update-ring (string &optional regexp)
"Add STRING to the beginning of the search ring.
REGEXP if non-nil says use the regexp search ring."
- (if regexp
- (when (or (null regexp-search-ring)
- (not (string= string (car regexp-search-ring))))
- (when history-delete-duplicates
- (setq regexp-search-ring (delete string regexp-search-ring)))
- (push string regexp-search-ring)
- (when (> (length regexp-search-ring) regexp-search-ring-max)
- (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) nil)))
- (when (or (null search-ring)
- (not (string= string (car search-ring))))
- (when history-delete-duplicates
- (setq search-ring (delete string search-ring)))
- (push string search-ring)
- (when (> (length search-ring) search-ring-max)
- (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))
+ (add-to-history
+ (if regexp 'regexp-search-ring 'search-ring)
+ string
+ (if regexp regexp-search-ring-max search-ring-max)))
;; Switching buffers should first terminate isearch-mode.
;; ;; For Emacs 19, the frame switch event is handled.
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 4566d4c32c3..d3db76fcc8a 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -349,10 +349,8 @@ and `kmacro-counter-format'.")
(defun kmacro-push-ring (&optional elt)
"Push ELT or current macro onto `kmacro-ring'."
(when (setq elt (or elt (kmacro-ring-head)))
- (let ((len (length kmacro-ring)))
- (setq kmacro-ring (cons elt kmacro-ring))
- (if (>= len kmacro-ring-max)
- (setcdr (nthcdr len kmacro-ring) nil)))))
+ (let ((history-delete-duplicates nil))
+ (add-to-history 'kmacro-ring elt kmacro-ring-max))))
(defun kmacro-split-ring-element (elt)
@@ -377,11 +375,6 @@ Non-nil arg RAW means just return raw first element."
(kmacro-pop-ring1 raw)))
-(defun kmacro-ring-length ()
- "Return length of macro ring, including pseudo head."
- (+ (if last-kbd-macro 1 0) (length kmacro-ring)))
-
-
(defun kmacro-ring-empty-p (&optional none)
"Tell user and return t if `last-kbd-macro' is nil or `kmacro-ring' is empty.
Check only `last-kbd-macro' if optional arg NONE is non-nil."
@@ -577,13 +570,8 @@ Use \\[kmacro-bind-to-key] to bind it to a key sequence."
(let ((append (and arg (listp arg))))
(unless append
(if last-kbd-macro
- (let ((len (length kmacro-ring)))
- (setq kmacro-ring
- (cons
- (list last-kbd-macro kmacro-counter kmacro-counter-format-start)
- kmacro-ring))
- (if (>= len kmacro-ring-max)
- (setcdr (nthcdr len kmacro-ring) nil))))
+ (kmacro-push-ring
+ (list last-kbd-macro kmacro-counter kmacro-counter-format-start)))
(setq kmacro-counter (or (if arg (prefix-numeric-value arg))
kmacro-initial-counter-value
0)
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 402278489bf..6d6c03823d3 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -7037,7 +7037,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
-See Info node `(emacs-xtra)Subdir switches' for more details.
+See Info node `(emacs)Subdir switches' for more details.
\(fn &optional ARG TEST-FOR-SUBDIR)" t nil)
@@ -7175,7 +7175,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes
may have to reset some subdirectory switches after a `dired-undo'.
You can reset all subdirectory switches to the default using
\\<dired-mode-map>\\[dired-reset-subdir-switches].
-See Info node `(emacs-xtra)Subdir switches' for more details.
+See Info node `(emacs)Subdir switches' for more details.
\(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil)
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index f7846394638..94632f8c38d 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-06 Bill Wohler <wohler@newt.com>
+
+ Release MH-E version 8.0.
+
+ * mh-e.el (Version, mh-version): Update for release 8.0.
+
+2006-05-05 Bill Wohler <wohler@newt.com>
+
+ * mh-e.el: Update commentary.
+
2006-04-28 Bill Wohler <wohler@newt.com>
Release MH-E version 7.95.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 88b8c5bac09..28fff81e93b 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -6,7 +6,7 @@
;; Author: Bill Wohler <wohler@newt.com>
;; Maintainer: Bill Wohler <wohler@newt.com>
-;; Version: 7.95
+;; Version: 8.0
;; Keywords: mail
;; This file is part of GNU Emacs.
@@ -28,6 +28,20 @@
;;; Commentary:
+;; MH-E is an Emacs interface to the MH mail system.
+
+;; MH-E is supported by GNU Emacs 21 and 22, as well as XEmacs 21
+;; (except for versions 21.5.9-21.5.16). It is compatible with MH
+;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils
+;; 0.4 and higher.
+
+;; MH (Message Handler) is a powerful mail reader. See
+;; http://rand-mh.sourceforge.net/.
+
+;; N.B. MH must have been compiled with the MHE compiler flag or several
+;; features necessary for MH-E will be missing from MH commands, specifically
+;; the -build switch to repl and forw.
+
;; How to use:
;; M-x mh-rmail to read mail. Type C-h m there for a list of commands.
;; C-u M-x mh-rmail to visit any folder.
@@ -44,23 +58,6 @@
;; If you want to customize MH-E before explicitly loading it, add this:
;; (require 'mh-cus-load)
-;; MH (Message Handler) is a powerful mail reader.
-
-;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu
-;; (send to mh-users-request to be added). See the monthly Frequently Asked
-;; Questions posting there for information on getting MH and MH-E:
-;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html
-
-;; N.B. MH must have been compiled with the MHE compiler flag or several
-;; features necessary for MH-E will be missing from MH commands, specifically
-;; the -build switch to repl and forw.
-
-;; MH-E is an Emacs interface to the MH mail system.
-
-;; MH-E is supported in GNU Emacs 21 and 22 as well as XEmacs 21
-;; (except for versions 21.5.9-21.5.16), with MH 6.8.4 on, nmh 1.0.4
-;; on, and GNU mailutils 0.4 on.
-
;; Mailing Lists:
;; mh-e-users@lists.sourceforge.net
;; mh-e-announce@lists.sourceforge.net
@@ -136,7 +133,7 @@
;; Try to keep variables local to a single file. Provide accessors if
;; variables are shared. Use this section as a last resort.
-(defconst mh-version "7.95" "Version number of MH-E.")
+(defconst mh-version "8.0" "Version number of MH-E.")
;; Variants
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 662b992b343..b61971c7ea5 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -204,8 +204,25 @@ This should only be bound to mouse buttons 4 and 5."
(setq amt (* amt (event-click-count event))))
(unwind-protect
(let ((button (mwheel-event-button event)))
- (cond ((eq button mouse-wheel-down-event) (scroll-down amt))
- ((eq button mouse-wheel-up-event) (scroll-up amt))
+ (cond ((eq button mouse-wheel-down-event)
+ (condition-case nil (scroll-down amt)
+ ;; Make sure we do indeed scroll to the beginning of
+ ;; the buffer.
+ (beginning-of-buffer
+ (unwind-protect
+ (scroll-down)
+ ;; If the first scroll succeeded, then some scrolling
+ ;; is possible: keep scrolling til the beginning but
+ ;; do not signal an error. For some reason, we have
+ ;; to do it even if the first scroll signalled an
+ ;; error, because otherwise the window is recentered
+ ;; for a reason that escapes me. This problem seems
+ ;; to only affect scroll-down. --Stef
+ (set-window-start (selected-window) (point-min))))))
+ ((eq button mouse-wheel-up-event)
+ (condition-case nil (scroll-up amt)
+ ;; Make sure we do indeed scroll to the end of the buffer.
+ (end-of-buffer (while t (scroll-up)))))
(t (error "Bad binding in mwheel-scroll"))))
(if curwin (select-window curwin))))
(when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6e166aa2393..2ebc4d0b45e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4331,7 +4331,7 @@ Falls back to normal file name handler if no tramp file name handler exists."
"Add tramp file name handlers to `file-name-handler-alist'."
(add-to-list 'file-name-handler-alist
(cons tramp-file-name-regexp 'tramp-file-name-handler))
- (when partial-completion-mode
+ (when (or partial-completion-mode (featurep 'ido))
(add-to-list 'file-name-handler-alist
(cons tramp-completion-file-name-regexp
'tramp-completion-file-name-handler))
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 28fcb70bb8b..a20f11e0aa2 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -694,6 +694,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(if (and transient-mark-mode mark-active)
(buffer-substring (region-beginning) (region-end))
(tooltip-identifier-from-point (point))))))
+ (speedbar 1)
(catch 'already-watched
(dolist (var gdb-var-list)
(unless (string-match "\\." (car var))
@@ -725,7 +726,6 @@ With arg, enter name of variable to be watched in the minibuffer."
(match-string 3)
nil nil gdb-frame-address)))
(push var gdb-var-list)
- (speedbar 1)
(unless (string-equal
speedbar-initial-expansion-list-name "GUD")
(speedbar-change-initial-expansion-list "GUD"))
@@ -741,13 +741,26 @@ With arg, enter name of variable to be watched in the minibuffer."
(message-box "Watching expressions requires gdb 6.0 onwards")
(message-box "No symbol \"%s\" in current context." expr))))
+(defun gdb-speedbar-update ()
+ (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
+ ;; Dummy command to update speedbar even when idle.
+ (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn))
+ ;; Keep gdb-pending-triggers non-nil till end.
+ (push 'gdb-speedbar-timer gdb-pending-triggers)))
+
+(defun gdb-speedbar-timer-fn ()
+ (setq gdb-pending-triggers
+ (delq 'gdb-speedbar-timer gdb-pending-triggers))
+ (speedbar-timer-fn))
+
(defun gdb-var-evaluate-expression-handler (varnum changed)
(goto-char (point-min))
(re-search-forward ".*value=\\(\".*\"\\)" nil t)
(let ((var (assoc varnum gdb-var-list)))
(when var
(if changed (setcar (nthcdr 5 var) 'changed))
- (setcar (nthcdr 4 var) (read (match-string 1))))))
+ (setcar (nthcdr 4 var) (read (match-string 1)))))
+ (gdb-speedbar-update))
(defun gdb-var-list-children (varnum)
(gdb-enqueue-input
@@ -811,21 +824,7 @@ type_changed=\".*?\".*?}")
varnum "\"\n")
`(lambda () (gdb-var-evaluate-expression-handler ,varnum t)))))))
(setq gdb-pending-triggers
- (delq 'gdb-var-update gdb-pending-triggers))
- (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
- ;; Dummy command to update speedbar at right time.
- (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh))
- ;; Keep gdb-pending-triggers non-nil till end.
- (push 'gdb-speedbar-refresh gdb-pending-triggers)))
-
-(defun gdb-speedbar-refresh ()
- (setq gdb-pending-triggers
- (delq 'gdb-speedbar-refresh gdb-pending-triggers))
- (with-current-buffer gud-comint-buffer
- (let ((speedbar-verbosity-level 0)
- (speedbar-shown-directories nil))
- (save-excursion
- (speedbar-refresh)))))
+ (delq 'gdb-var-update gdb-pending-triggers)))
(defun gdb-var-delete ()
"Delete watch expression at point from the speedbar."
@@ -1912,7 +1911,7 @@ static char *magick[] = {
(let* ((buffer (find-file-noselect
(if (file-exists-p file) file
(cdr (assoc bptno gdb-location-alist)))))
- (window (unless (gdb-display-source-buffer buffer)
+ (window (or (gdb-display-source-buffer buffer)
(display-buffer buffer))))
(setq gdb-source-window window)
(with-current-buffer buffer
@@ -2754,6 +2753,7 @@ corresponding to the mode line clicked."
;; Put buffer list in window if we
;; can't find a source file.
(list-buffers-noselect))))
+ (setq gdb-source-window (selected-window))
(when gdb-use-separate-io-buffer
(split-window-horizontally)
(other-window 1)
@@ -2781,6 +2781,7 @@ This arrangement depends on the value of `gdb-many-windows'."
(if gud-last-last-frame
(gud-find-file (car gud-last-last-frame))
(gud-find-file gdb-main-file)))
+ (setq gdb-source-window (selected-window))
(other-window 1))))
(defun gdb-reset ()
@@ -2802,8 +2803,6 @@ Kills the gdb buffers, and resets variables and the source buffers."
(setq overlay-arrow-variable-list
(delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
(setq fringe-indicator-alist '((overlay-arrow . right-triangle)))
- (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
- (speedbar-refresh))
(setq gud-running nil)
(setq gdb-active-process nil)
(setq gdb-var-list nil)
@@ -3231,7 +3230,8 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}")
(throw 'child-already-watched nil))
(push varchild var-list))))
(push var var-list)))
- (setq gdb-var-list (nreverse var-list)))))
+ (setq gdb-var-list (nreverse var-list))))
+ (gdb-speedbar-update))
; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
(defun gdb-var-update-1 ()
@@ -3264,11 +3264,7 @@ in_scope=\"\\(.*?\\)\".*?}")
(read (match-string 2)))))))
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers))
- (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
- ;; dummy command to update speedbar at right time
- (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh))
- ;; keep gdb-pending-triggers non-nil till end
- (push 'gdb-speedbar-refresh gdb-pending-triggers)))
+ (gdb-speedbar-update))
;; Registers buffer.
;;
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index c695272e92b..410a973d1b4 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -639,9 +639,9 @@ The search is limited to file names matching shell pattern FILES.
FILES may use abbreviations defined in `grep-files-aliases', e.g.
entering `ch' is equivalent to `*.[ch]'.
-With \\[universal-argument] prefix, allow user to edit the constructed
-shell command line before it is executed.
-With two \\[universal-argument] prefixes, edit and run grep shell command.
+With \\[universal-argument] prefix, you can edit the constructed shell command line
+before it is executed.
+With two \\[universal-argument] prefixes, directly edit and run `grep-command'.
Collect output in a buffer. While grep runs asynchronously, you
can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error]
@@ -676,7 +676,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
(setq command
(read-from-minibuffer "Confirm: "
command nil nil 'grep-history))
- (push command grep-history))))
+ (add-to-history 'grep-history command))))
(when command
;; Setting process-setup-function makes exit-message-function work
;; even when async processes aren't supported.
@@ -687,14 +687,14 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
;;;###autoload
(defun rgrep (regexp &optional files dir)
- "Recusively grep for REGEXP in FILES in directory tree rooted at DIR.
+ "Recursively grep for REGEXP in FILES in directory tree rooted at DIR.
The search is limited to file names matching shell pattern FILES.
FILES may use abbreviations defined in `grep-files-aliases', e.g.
entering `ch' is equivalent to `*.[ch]'.
-With \\[universal-argument] prefix, allow user to edit the constructed
-shell command line before it is executed.
-With two \\[universal-argument] prefixes, edit and run grep-find shell command.
+With \\[universal-argument] prefix, you can edit the constructed shell command line
+before it is executed.
+With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'.
Collect output in a buffer. While find runs asynchronously, you
can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error]
@@ -721,16 +721,16 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]."
(if (null files)
(if (not (string= regexp grep-find-command))
(compilation-start regexp 'grep-mode))
- (let* ((default-directory (file-name-as-directory (expand-file-name dir)))
- (command (grep-expand-template
- grep-find-template
- regexp
- (concat "\\( -name "
- (mapconcat #'shell-quote-argument
- (split-string files)
- " -o -name ")
- " \\)")
- default-directory
+ (setq dir (file-name-as-directory (expand-file-name dir)))
+ (let ((command (grep-expand-template
+ grep-find-template
+ regexp
+ (concat "\\( -name "
+ (mapconcat #'shell-quote-argument
+ (split-string files)
+ " -o -name ")
+ " \\)")
+ dir
(and grep-find-ignored-directories
(concat "\\( -path '*/"
(mapconcat #'identity
@@ -742,8 +742,12 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]."
(setq command
(read-from-minibuffer "Confirm: "
command nil nil 'grep-find-history))
- (push command grep-find-history))
- (compilation-start command 'grep-mode))))))
+ (add-to-history 'grep-find-history command))
+ (let ((default-directory dir))
+ (compilation-start command 'grep-mode))
+ ;; Set default-directory if we started rgrep in the *grep* buffer.
+ (if (eq next-error-last-buffer (current-buffer))
+ (setq default-directory dir)))))))
(provide 'grep)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index d81a5fcf47b..987b37cf2c2 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -16723,8 +16723,7 @@ specified by a target."
(progn (save-buffer)
(kill-buffer (current-buffer))
(set-buffer orig-buffer)
- (setq file-name-history
- (cons makefile-path-name file-name-history)))
+ (add-to-history 'file-name-history makefile-path-name))
(vhdl-warning-when-idle
(format "File not writable: \"%s\""
(abbreviate-file-name makefile-path-name)))
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 4f1cd37a9f7..0f55c71ac70 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -580,12 +580,9 @@ The strings are concatenated and terminated by a newline."
;;;; Scheme expressions ring
(defun xscheme-insert-expression (string)
- (setq xscheme-expressions-ring (cons string xscheme-expressions-ring))
- (if (> (length xscheme-expressions-ring) xscheme-expressions-ring-max)
- (setcdr (nthcdr (1- xscheme-expressions-ring-max)
- xscheme-expressions-ring)
- nil))
- (setq xscheme-expressions-ring-yank-pointer xscheme-expressions-ring))
+ (setq xscheme-expressions-ring-yank-pointer
+ (add-to-history 'xscheme-expressions-ring string
+ xscheme-expressions-ring-max)))
(defun xscheme-rotate-yank-pointer (arg)
"Rotate the yanking point in the kill ring."
diff --git a/lisp/server.el b/lisp/server.el
index 015c4c6f171..7835c56c3e2 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -858,7 +858,7 @@ so don't mark these buffers specially, just visit them normally."
;; deleted file, offer to write it.
(let* ((filen (car file))
(obuf (get-file-buffer filen)))
- (push filen file-name-history)
+ (add-to-history 'file-name-history filen)
(if (and obuf (set-buffer obuf))
(progn
(cond ((file-exists-p filen)
diff --git a/lisp/simple.el b/lisp/simple.el
index bd8a9d1a284..57e716e4683 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1144,7 +1144,7 @@ they are expressions; otherwise they are strings.
\(That convention is designed to do the right thing for
recursive uses of the minibuffer.)")
(setq minibuffer-history-variable 'minibuffer-history)
-(setq minibuffer-history-position nil)
+(setq minibuffer-history-position nil) ;; Defvar is in C code.
(defvar minibuffer-history-search-history nil)
(defvar minibuffer-text-before-history nil
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 4b83f08d89d..b3913f6f6c6 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -2529,8 +2529,7 @@ name will have the function FIND-FUN and not token."
default-directory)
(speedbar-message nil))))
;; Else, we can do a short cut. No text cache.
- (let ((cbd (expand-file-name default-directory))
- )
+ (let ((cbd (expand-file-name default-directory)))
(set-buffer speedbar-buffer)
(speedbar-with-writable
(let* ((window (get-buffer-window speedbar-buffer 0))
@@ -2542,8 +2541,7 @@ name will have the function FIND-FUN and not token."
(funcall func cbd 0))
(speedbar-reconfigure-keymaps)
(set-window-point window p)
- (set-window-start window start)))
- ))))
+ (set-window-start window start)))))))
(defun speedbar-update-directory-contents ()
"Update the contents of the speedbar buffer based on the current directory."
@@ -2677,7 +2675,6 @@ Also resets scanner functions."
(frame-visible-p (speedbar-current-frame))
(not (eq (frame-visible-p (speedbar-current-frame)) 'icon)))
(let ((af (selected-frame)))
- (save-window-excursion
(dframe-select-attached-frame speedbar-frame)
;; make sure we at least choose a window to
;; get a good directory from
@@ -2704,14 +2701,8 @@ Also resets scanner functions."
"Updating speedbar to special mode: %s...done"
major-mode)
(speedbar-message nil))))
- ;; Update all the contents if directories change!
- (if (or (member major-mode speedbar-ignored-modes)
- (eq af (speedbar-current-frame))
- (not (buffer-file-name)))
- nil
- (speedbar-update-localized-contents)
- ))
- (select-frame af)))
+ (speedbar-update-localized-contents))
+ (select-frame af))
;; Now run stealthy updates of time-consuming items
(speedbar-stealthy-updates)))))
(run-hooks 'speedbar-timer-hook))
diff --git a/lisp/startup.el b/lisp/startup.el
index 07039fa8c18..12a53113f0a 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -827,7 +827,16 @@ opening the first frame (e.g. open a connection to an X server).")
(format "Invalid user name %s"
init-file-user)
:error)
- (if (file-directory-p (expand-file-name (concat "~" init-file-user)))
+ (if (file-directory-p (expand-file-name
+ ;; We don't support ~USER on MS-Windows except
+ ;; for the current user, and always load .emacs
+ ;; from the current user's home directory (see
+ ;; below). So always check "~", even if invoked
+ ;; with "-u USER", or if $USER or $LOGNAME are
+ ;; set to something different.
+ (if (eq system-type 'windows-nt)
+ "~"
+ (concat "~" init-file-user))))
nil
(display-warning 'initialization
(format "User %s has no home directory"
@@ -1282,7 +1291,9 @@ where FACE is a valid face specification, as it can be used with
(set-buffer buffer)
(erase-buffer)
(if pure-space-overflow
- (insert "Warning Warning Pure space overflow Warning Warning\n"))
+ (insert "\
+Warning Warning!!! Pure space overflow !!!Warning Warning
+\(See the node Pure Storage in the Lisp manual for details.)\n"))
(fancy-splash-head)
(apply #'fancy-splash-insert text)
(fancy-splash-tail)
@@ -1354,7 +1365,7 @@ mouse."
emulation-mode-map-alists nil
buffer-undo-list t
mode-line-format (propertize "---- %b %-"
- 'face '(:weight bold))
+ 'face 'mode-line-buffer-id)
fancy-splash-stop-time (+ (float-time)
fancy-splash-max-time)
timer (run-with-timer 0 fancy-splash-delay
@@ -1406,10 +1417,12 @@ we put it on this frame."
(with-current-buffer (get-buffer-create "GNU Emacs")
(set (make-local-variable 'tab-width) 8)
(set (make-local-variable 'mode-line-format)
- (propertize "---- %b %-" 'face '(:weight bold)))
+ (propertize "---- %b %-" 'face 'mode-line-buffer-id))
(if pure-space-overflow
- (insert "Warning Warning Pure space overflow Warning Warning\n"))
+ (insert "\
+Warning Warning!!! Pure space overflow !!!Warning Warning
+\(See the node Pure Storage in the Lisp manual for details.)\n"))
;; The convention for this piece of code is that
;; each piece of output starts with one or two newlines
@@ -1623,9 +1636,7 @@ normal otherwise."
(not noninteractive))
(display-warning
'initialization
- "Building Emacs overflowed pure space. See \"(elisp)Building Emacs\" for more information."
- ;; FIXME: Tell the user what kind of problems are possible and how to fix
- ;; the overflow.
+ "Building Emacs overflowed pure space. (See the node Pure Storage in the Lisp manual for details.)"
:warning))
(when command-line-args-left
diff --git a/lisp/subr.el b/lisp/subr.el
index 43f1d5e57b1..bc7789f3384 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1122,6 +1122,31 @@ The return value is the new value of LIST-VAR."
(if (and oa ob)
(< oa ob)
oa)))))))
+
+(defun add-to-history (history-var newelt &optional maxelt)
+ "Add NEWELT to the history list stored in the variable HISTORY-VAR.
+Return the new history list.
+If MAXELT is non-nil, it specifies the maximum length of the history.
+Otherwise, the maximum history length is the value of the `history-length'
+property on symbol HISTORY-VAR, if set, or the value of the `history-length'
+variable.
+Remove duplicates of NEWELT unless `history-delete-duplicates' is nil."
+ (unless maxelt
+ (setq maxelt (or (get history-var 'history-length)
+ history-length)))
+ (let ((history (symbol-value history-var))
+ tail)
+ (if history-delete-duplicates
+ (setq history (delete newelt history)))
+ (setq history (cons newelt history))
+ (when (integerp maxelt)
+ (if (= 0 maxelt)
+ (setq history nil)
+ (setq tail (nthcdr (1- maxelt) history))
+ (when (consp tail)
+ (setcdr tail nil))))
+ (set history-var history)))
+
;;;; Mode hooks.
@@ -1931,6 +1956,13 @@ Otherwise, return nil."
"Return non-nil if OBJECT is one of the two canonical boolean values: t or nil."
(memq object '(nil t)))
+(defun field-at-pos (pos)
+ "Return the field at position POS, taking stickiness etc into account"
+ (let ((raw-field (get-char-property (field-beginning pos) 'field)))
+ (if (eq raw-field 'boundary)
+ (get-char-property (1- (field-end pos)) 'field)
+ raw-field)))
+
;;;; Support for yanking and text properties.
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 4ab0606c18a..6931f796e5c 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -82,6 +82,8 @@
(defvar mac-services-selection)
(defvar mac-system-script-code)
(defvar mac-apple-event-map)
+(defvar mac-atsu-font-table)
+(defvar mac-font-panel-mode)
(defvar x-invocation-args)
(defvar x-command-line-resources nil)
@@ -1128,6 +1130,107 @@ correspoinding TextEncodingBase value."
(mac-add-charset-info "mac-dingbats" 34)
(mac-add-charset-info "iso10646-1" 126) ; for ATSUI
+(cp-make-coding-system
+ mac-centraleurroman
+ [?\,AD(B ?\$,1 (B ?\$,1 !(B ?\,AI(B ?\$,1 $(B ?\,AV(B ?\,A\(B ?\,Aa(B ?\$,1 %(B ?\$,1 ,(B ?\,Ad(B ?\$,1 -(B ?\$,1 &(B ?\$,1 '(B ?\,Ai(B ?\$,1!9(B
+ ?\$,1!:(B ?\$,1 .(B ?\,Am(B ?\$,1 /(B ?\$,1 2(B ?\$,1 3(B ?\$,1 6(B ?\,As(B ?\$,1 7(B ?\,At(B ?\,Av(B ?\,Au(B ?\,Az(B ?\$,1 :(B ?\$,1 ;(B ?\,A|(B
+ ?\$,1s (B ?\,A0(B ?\$,1 8(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\,A_(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1 9(B ?\,A((B ?\$,1y (B ?\$,1 C(B ?\$,1 N(B
+ ?\$,1 O(B ?\$,1 J(B ?\$,1y$(B ?\$,1y%(B ?\$,1 K(B ?\$,1 V(B ?\$,1x"(B ?\$,1x1(B ?\$,1 b(B ?\$,1 [(B ?\$,1 \(B ?\$,1 ](B ?\$,1 ^(B ?\$,1 Y(B ?\$,1 Z(B ?\$,1 e(B
+ ?\$,1 f(B ?\$,1 c(B ?\,A,(B ?\$,1x:(B ?\$,1 d(B ?\$,1 g(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1 h(B ?\$,1 p(B ?\,AU(B ?\$,1 q(B ?\$,1 l(B
+ ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,2"*(B ?\$,1 m(B ?\$,1 t(B ?\$,1 u(B ?\$,1 x(B ?\$,1s9(B ?\$,1s:(B ?\$,1 y(B ?\$,1 v(B
+ ?\$,1 w(B ?\$,1! (B ?\$,1rz(B ?\$,1r~(B ?\$,1!!(B ?\$,1 z(B ?\$,1 {(B ?\,AA(B ?\$,1!$(B ?\$,1!%(B ?\,AM(B ?\$,1!=(B ?\$,1!>(B ?\$,1!*(B ?\,AS(B ?\,AT(B
+ ?\$,1!+(B ?\$,1!.(B ?\,AZ(B ?\$,1!/(B ?\$,1!0(B ?\$,1!1(B ?\$,1!2(B ?\$,1!3(B ?\,A](B ?\,A}(B ?\$,1 W(B ?\$,1!;(B ?\$,1 a(B ?\$,1!<(B ?\$,1 B(B ?\$,1$g(B]
+ "Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).")
+(coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman)
+
+(cp-make-coding-system
+ mac-cyrillic
+ [?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B
+ ?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B
+ ?\$,1s (B ?\,A0(B ?\$,1)P(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\$,1(&(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1("(B ?\$,1(r(B ?\$,1y (B ?\$,1(#(B ?\$,1(s(B
+ ?\$,1x>(B ?\,A1(B ?\$,1y$(B ?\$,1y%(B ?\$,1(v(B ?\,A5(B ?\$,1)Q(B ?\$,1(((B ?\$,1($(B ?\$,1(t(B ?\$,1('(B ?\$,1(w(B ?\$,1()(B ?\$,1(y(B ?\$,1(*(B ?\$,1(z(B
+ ?\$,1(x(B ?\$,1(%(B ?\,A,(B ?\$,1x:(B ?\$,1!R(B ?\$,1xh(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1(+(B ?\$,1({(B ?\$,1(,(B ?\$,1(|(B ?\$,1(u(B
+ ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,1r~(B ?\$,1(.(B ?\$,1(~(B ?\$,1(/(B ?\$,1((B ?\$,1uV(B ?\$,1(!(B ?\$,1(q(B ?\$,1(o(B
+ ?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B
+ ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1tL(B]
+ "Mac Cyrillic Encoding (MIME:x-mac-cyrillic).")
+(coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic)
+
+(let
+ ((encoding-vector
+ (vconcat
+ (make-vector 32 nil)
+ ;; mac-symbol (32..126) -> emacs-mule mapping
+ [?\ ?\! ?\$,1x (B ?\# ?\$,1x#(B ?\% ?\& ?\$,1x-(B ?\( ?\) ?\$,1x7(B ?\+ ?\, ?\$,1x2(B ?\. ?\/
+ ?\0 ?\1 ?\2 ?\3 ?\4 ?\5 ?\6 ?\7 ?\8 ?\9 ?\: ?\; ?\< ?\= ?\> ?\?
+ ?\$,1xe(B ?\$,1&q(B ?\$,1&r(B ?\$,1''(B ?\$,1&t(B ?\$,1&u(B ?\$,1'&(B ?\$,1&s(B ?\$,1&w(B ?\$,1&y(B ?\$,1'Q(B ?\$,1&z(B ?\$,1&{(B ?\$,1&|(B ?\$,1&}(B ?\$,1&(B
+ ?\$,1' (B ?\$,1&x(B ?\$,1'!(B ?\$,1'#(B ?\$,1'$(B ?\$,1'%(B ?\$,1'B(B ?\$,1')(B ?\$,1&~(B ?\$,1'((B ?\$,1&v(B ?\[ ?\$,1xT(B ?\] ?\$,1ye(B ?\_
+ ?\$,3bE(B ?\$,1'1(B ?\$,1'2(B ?\$,1'G(B ?\$,1'4(B ?\$,1'5(B ?\$,1'F(B ?\$,1'3(B ?\$,1'7(B ?\$,1'9(B ?\$,1'U(B ?\$,1':(B ?\$,1';(B ?\$,1'<(B ?\$,1'=(B ?\$,1'?(B
+ ?\$,1'@(B ?\$,1'8(B ?\$,1'A(B ?\$,1'C(B ?\$,1'D(B ?\$,1'E(B ?\$,1'V(B ?\$,1'I(B ?\$,1'>(B ?\$,1'H(B ?\$,1'6(B ?\{ ?\| ?\} ?\$,1x\(B]
+ (make-vector (- 160 127) nil)
+ ;; mac-symbol (160..254) -> emacs-mule mapping
+ ;; Mapping of the following characters are changed from the
+ ;; original one:
+ ;; 0xE2 0x00AE+0xF87F -> 0x00AE # REGISTERED SIGN, alternate: sans serif
+ ;; 0xE3 0x00A9+0xF87F -> 0x00A9 # COPYRIGHT SIGN, alternate: sans serif
+ ;; 0xE4 0x2122+0xF87F -> 0x2122 # TRADE MARK SIGN, alternate: sans serif
+ [?\$,1tL(B ?\$,1'R(B ?\$,1s2(B ?\$,1y$(B ?\$,1sD(B ?\$,1x>(B ?\$,1!R(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1vt(B ?\$,1vp(B ?\$,1vq(B ?\$,1vr(B ?\$,1vs(B
+ ?\,A0(B ?\,A1(B ?\$,1s3(B ?\$,1y%(B ?\,AW(B ?\$,1x=(B ?\$,1x"(B ?\$,1s"(B ?\,Aw(B ?\$,1y (B ?\$,1y!(B ?\$,1xh(B ?\$,1s&(B ?\$,1|p(B ?\$,1|O(B ?\$,1w5(B
+ ?\$,1uu(B ?\$,1uQ(B ?\$,1u\(B ?\$,1uX(B ?\$,1yW(B ?\$,1yU(B ?\$,1x%(B ?\$,1xI(B ?\$,1xJ(B ?\$,1yC(B ?\$,1yG(B ?\$,1yD(B ?\$,1yB(B ?\$,1yF(B ?\$,1x((B ?\$,1x)(B
+ ?\$,1x@(B ?\$,1x'(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x/(B ?\$,1x:(B ?\$,1z%(B ?\,A,(B ?\$,1xG(B ?\$,1xH(B ?\$,1wT(B ?\$,1wP(B ?\$,1wQ(B ?\$,1wR(B ?\$,1wS(B
+ ?\$,2"*(B ?\$,2=H(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x1(B ?\$,1|;(B ?\$,1|<(B ?\$,1|=(B ?\$,1|A(B ?\$,1|B(B ?\$,1|C(B ?\$,1|G(B ?\$,1|H(B ?\$,1|I(B ?\$,1|J(B
+ ?\$,3b_(B ?\$,2=I(B ?\$,1xK(B ?\$,1{ (B ?\$,1|N(B ?\$,1{!(B ?\$,1|>(B ?\$,1|?(B ?\$,1|@(B ?\$,1|D(B ?\$,1|E(B ?\$,1|F(B ?\$,1|K(B ?\$,1|L(B ?\$,1|M(B
+ nil]))
+ translation-table)
+ (setq translation-table
+ (make-translation-table-from-vector encoding-vector))
+;; (define-translation-table 'mac-symbol-decoder translation-table)
+ (define-translation-table 'mac-symbol-encoder
+ (char-table-extra-slot translation-table 0)))
+
+(let
+ ((encoding-vector
+ (vconcat
+ (make-vector 32 nil)
+ ;; mac-dingbats (32..126) -> emacs-mule mapping
+ [?\ ?\$,2%A(B ?\$,2%B(B ?\$,2%C(B ?\$,2%D(B ?\$,2"n(B ?\$,2%F(B ?\$,2%G(B ?\$,2%H(B ?\$,2%I(B ?\$,2"{(B ?\$,2"~(B ?\$,2%L(B ?\$,2%M(B ?\$,2%N(B ?\$,2%O(B
+ ?\$,2%P(B ?\$,2%Q(B ?\$,2%R(B ?\$,2%S(B ?\$,2%T(B ?\$,2%U(B ?\$,2%V(B ?\$,2%W(B ?\$,2%X(B ?\$,2%Y(B ?\$,2%Z(B ?\$,2%[(B ?\$,2%\(B ?\$,2%](B ?\$,2%^(B ?\$,2%_(B
+ ?\$,2%`(B ?\$,2%a(B ?\$,2%b(B ?\$,2%c(B ?\$,2%d(B ?\$,2%e(B ?\$,2%f(B ?\$,2%g(B ?\$,2"e(B ?\$,2%i(B ?\$,2%j(B ?\$,2%k(B ?\$,2%l(B ?\$,2%m(B ?\$,2%n(B ?\$,2%o(B
+ ?\$,2%p(B ?\$,2%q(B ?\$,2%r(B ?\$,2%s(B ?\$,2%t(B ?\$,2%u(B ?\$,2%v(B ?\$,2%w(B ?\$,2%x(B ?\$,2%y(B ?\$,2%z(B ?\$,2%{(B ?\$,2%|(B ?\$,2%}(B ?\$,2%~(B ?\$,2%(B
+ ?\$,2& (B ?\$,2&!(B ?\$,2&"(B ?\$,2&#(B ?\$,2&$(B ?\$,2&%(B ?\$,2&&(B ?\$,2&'(B ?\$,2&((B ?\$,2&)(B ?\$,2&*(B ?\$,2&+(B ?\$,2"/(B ?\$,2&-(B ?\$,2!`(B ?\$,2&/(B
+ ?\$,2&0(B ?\$,2&1(B ?\$,2&2(B ?\$,2!r(B ?\$,2!|(B ?\$,2"&(B ?\$,2&6(B ?\$,2"7(B ?\$,2&8(B ?\$,2&9(B ?\$,2&:(B ?\$,2&;(B ?\$,2&<(B ?\$,2&=(B ?\$,2&>(B
+ nil
+ ;; mac-dingbats (128..141) -> emacs-mule mapping
+ ?\$,2&H(B ?\$,2&I(B ?\$,2&J(B ?\$,2&K(B ?\$,2&L(B ?\$,2&M(B ?\$,2&N(B ?\$,2&O(B ?\$,2&P(B ?\$,2&Q(B ?\$,2&R(B ?\$,2&S(B ?\$,2&T(B ?\$,2&U(B]
+ (make-vector (- 161 142) nil)
+ ;; mac-dingbats (161..239) -> emacs-mule mapping
+ [?\$,2&A(B ?\$,2&B(B ?\$,2&C(B ?\$,2&D(B ?\$,2&E(B ?\$,2&F(B ?\$,2&G(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1~@(B ?\$,1~A(B ?\$,1~B(B ?\$,1~C(B
+ ?\$,1~D(B ?\$,1~E(B ?\$,1~F(B ?\$,1~G(B ?\$,1~H(B ?\$,1~I(B ?\$,2&V(B ?\$,2&W(B ?\$,2&X(B ?\$,2&Y(B ?\$,2&Z(B ?\$,2&[(B ?\$,2&\(B ?\$,2&](B ?\$,2&^(B ?\$,2&_(B
+ ?\$,2&`(B ?\$,2&a(B ?\$,2&b(B ?\$,2&c(B ?\$,2&d(B ?\$,2&e(B ?\$,2&f(B ?\$,2&g(B ?\$,2&h(B ?\$,2&i(B ?\$,2&j(B ?\$,2&k(B ?\$,2&l(B ?\$,2&m(B ?\$,2&n(B ?\$,2&o(B
+ ?\$,2&p(B ?\$,2&q(B ?\$,2&r(B ?\$,2&s(B ?\$,2&t(B ?\$,1vr(B ?\$,1vt(B ?\$,1vu(B ?\$,2&x(B ?\$,2&y(B ?\$,2&z(B ?\$,2&{(B ?\$,2&|(B ?\$,2&}(B ?\$,2&~(B ?\$,2&(B
+ ?\$,2' (B ?\$,2'!(B ?\$,2'"(B ?\$,2'#(B ?\$,2'$(B ?\$,2'%(B ?\$,2'&(B ?\$,2''(B ?\$,2'((B ?\$,2')(B ?\$,2'*(B ?\$,2'+(B ?\$,2',(B ?\$,2'-(B ?\$,2'.(B ?\$,2'/(B
+ nil
+ ;; mac-dingbats (241..254) -> emacs-mule mapping
+ ?\$,2'1(B ?\$,2'2(B ?\$,2'3(B ?\$,2'4(B ?\$,2'5(B ?\$,2'6(B ?\$,2'7(B ?\$,2'8(B ?\$,2'9(B ?\$,2':(B ?\$,2';(B ?\$,2'<(B ?\$,2'=(B ?\$,2'>(B
+ nil]))
+ translation-table)
+ (setq translation-table
+ (make-translation-table-from-vector encoding-vector))
+;; (define-translation-table 'mac-dingbats-decoder translation-table)
+ (define-translation-table 'mac-dingbats-encoder
+ (char-table-extra-slot translation-table 0)))
+
+(defconst mac-system-coding-system
+ (let ((base (or (cdr (assq mac-system-script-code
+ mac-script-code-coding-systems))
+ 'mac-roman)))
+ (if (eq system-type 'darwin)
+ base
+ (coding-system-change-eol-conversion base 'mac)))
+ "Coding system derived from the system script code.")
+
+(set-selection-coding-system mac-system-coding-system)
+
;;;; Keyboard layout/language change events
(defun mac-handle-language-change (event)
@@ -1141,6 +1244,91 @@ correspoinding TextEncodingBase value."
(define-key key-translation-map [?\x80] "\\"))))
(define-key special-event-map [language-change] 'mac-handle-language-change)
+
+
+;;;; Conversion between common flavors and Lisp string.
+
+(defconst mac-text-encoding-mac-japanese-basic-variant #x20001
+ "MacJapanese text encoding without Apple double-byte extensions.")
+
+(defun mac-utxt-to-string (data &optional coding-system)
+ (or coding-system (setq coding-system mac-system-coding-system))
+ (let* ((encoding
+ (and (eq system-type 'darwin)
+ (eq (coding-system-base coding-system) 'japanese-shift-jis)
+ mac-text-encoding-mac-japanese-basic-variant))
+ (str (and (fboundp 'mac-code-convert-string)
+ (mac-code-convert-string data nil
+ (or encoding coding-system)))))
+ (when str
+ (setq str (decode-coding-string str coding-system))
+ (if (eq encoding mac-text-encoding-mac-japanese-basic-variant)
+ ;; Does it contain Apple one-byte extensions other than
+ ;; reverse solidus?
+ (if (string-match "[\xa0\xfd-\xff]" str)
+ (setq str nil)
+ ;; ASCII-only?
+ (unless (string-match "\\`[[:ascii:]]*\\'" str)
+ (subst-char-in-string ?\x5c ?\(J\(B str t)
+ (subst-char-in-string ?\x80 ?\\ str t)))))
+ (or str
+ (decode-coding-string data
+ (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)))))
+
+(defun mac-string-to-utxt (string &optional coding-system)
+ (or coding-system (setq coding-system mac-system-coding-system))
+ (let (data encoding)
+ (when (and (fboundp 'mac-code-convert-string)
+ (memq (coding-system-base coding-system)
+ (find-coding-systems-string string)))
+ (setq coding-system
+ (coding-system-change-eol-conversion coding-system 'mac))
+ (when (and (eq system-type 'darwin)
+ (eq coding-system 'japanese-shift-jis-mac))
+ (setq encoding mac-text-encoding-mac-japanese-basic-variant)
+ (setq string (subst-char-in-string ?\\ ?\x80 string))
+ (subst-char-in-string ?\(J\(B ?\x5c string t))
+ (setq data (mac-code-convert-string
+ (encode-coding-string string coding-system)
+ (or encoding coding-system) nil)))
+ (or data (encode-coding-string string (if (eq (byteorder) ?B)
+ 'utf-16be-mac
+ 'utf-16le-mac)))))
+
+(defun mac-TEXT-to-string (data &optional coding-system)
+ (or coding-system (setq coding-system mac-system-coding-system))
+ (prog1 (setq data (decode-coding-string data coding-system))
+ (when (eq (coding-system-base coding-system) 'japanese-shift-jis)
+ ;; (subst-char-in-string ?\x5c ?\(J\(B data t)
+ (subst-char-in-string ?\x80 ?\\ data t))))
+
+(defun mac-string-to-TEXT (string &optional coding-system)
+ (or coding-system (setq coding-system mac-system-coding-system))
+ (let ((encodables (find-coding-systems-string string))
+ (rest mac-script-code-coding-systems))
+ (unless (memq (coding-system-base coding-system) encodables)
+ (while (and rest (not (memq (cdar rest) encodables)))
+ (setq rest (cdr rest)))
+ (if rest
+ (setq coding-system (cdar rest)))))
+ (setq coding-system
+ (coding-system-change-eol-conversion coding-system 'mac))
+ (when (eq coding-system 'japanese-shift-jis-mac)
+ ;; (setq string (subst-char-in-string ?\\ ?\x80 string))
+ (setq string (subst-char-in-string ?\(J\(B ?\x5c string)))
+ (encode-coding-string string coding-system))
+
+(defun mac-furl-to-string (data)
+ ;; Remove a trailing nul character.
+ (let ((len (length data)))
+ (if (and (> len 0) (= (aref data (1- len)) ?\0))
+ (substring data 0 (1- len))
+ data)))
+
+(defun mac-TIFF-to-string (data &optional text)
+ (prog1 (or text (setq text (copy-sequence " ")))
+ (put-text-property 0 (length text) 'display (create-image data 'tiff t)
+ text)))
;;;; Selections
@@ -1190,22 +1378,11 @@ in `selection-converter-alist', which see."
(when (and (stringp data)
(setq data-type (get-text-property 0 'foreign-selection data)))
(cond ((eq data-type 'public.utf16-plain-text)
- (let ((encoded (and (fboundp 'mac-code-convert-string)
- (mac-code-convert-string data nil coding))))
- (if encoded
- (setq data (decode-coding-string encoded coding))
- (setq data
- (decode-coding-string data
- (if (eq (byteorder) ?B)
- 'utf-16be 'utf-16le))))))
+ (setq data (mac-utxt-to-string data coding)))
((eq data-type 'com.apple.traditional-mac-plain-text)
- (setq data (decode-coding-string data coding)))
+ (setq data (mac-TEXT-to-string data coding)))
((eq data-type 'public.file-url)
- (setq data (decode-coding-string data 'utf-8))
- ;; Remove a trailing nul character.
- (let ((len (length data)))
- (if (and (> len 0) (= (aref data (1- len)) ?\0))
- (setq data (substring data 0 (1- len)))))))
+ (setq data (mac-furl-to-string data))))
(put-text-property 0 (length data) 'foreign-selection data-type data))
data))
@@ -1227,9 +1404,7 @@ in `selection-converter-alist', which see."
(when tiff-image
(remove-text-properties 0 (length tiff-image)
'(foreign-selection nil) tiff-image)
- (setq tiff-image (create-image tiff-image 'tiff t))
- (or text (setq text " "))
- (put-text-property 0 (length text) 'display tiff-image text))
+ (setq text (mac-TIFF-to-string tiff-image text)))
text))
;;; Return the value of the current selection.
@@ -1300,11 +1475,7 @@ in `selection-converter-alist', which see."
(defun mac-select-convert-to-string (selection type value)
(let ((str (cdr (xselect-convert-to-string selection nil value)))
- coding)
- (setq coding (or next-selection-coding-system selection-coding-system))
- (if coding
- (setq coding (coding-system-base coding))
- (setq coding 'raw-text))
+ (coding (or next-selection-coding-system selection-coding-system)))
(when str
;; If TYPE is nil, this is a local request, thus return STR as
;; is. Otherwise, encode STR.
@@ -1314,28 +1485,9 @@ in `selection-converter-alist', which see."
(remove-text-properties 0 (length str) '(composition nil) str)
(cond
((eq type 'public.utf16-plain-text)
- (let (s)
- (when (and (fboundp 'mac-code-convert-string)
- (memq coding (find-coding-systems-string str)))
- (setq coding (coding-system-change-eol-conversion coding 'mac))
- (setq s (mac-code-convert-string
- (encode-coding-string str coding)
- coding nil)))
- (setq str (or s
- (encode-coding-string str
- (if (eq (byteorder) ?B)
- 'utf-16be-mac
- 'utf-16le-mac))))))
+ (setq str (mac-string-to-utxt str coding)))
((eq type 'com.apple.traditional-mac-plain-text)
- (let ((encodables (find-coding-systems-string str))
- (rest mac-script-code-coding-systems))
- (unless (memq coding encodables)
- (while (and rest (not (memq (cdar rest) encodables)))
- (setq rest (cdr rest)))
- (if rest
- (setq coding (cdar rest)))))
- (setq coding (coding-system-change-eol-conversion coding 'mac))
- (setq str (encode-coding-string str coding)))
+ (setq str (mac-string-to-TEXT str coding)))
(t
(error "Unknown selection type: %S" type))
)))
@@ -1433,6 +1585,17 @@ in `selection-converter-alist', which see."
(ash (lsh result extended-sign-len) (- extended-sign-len))
result)))
+(defun mac-bytes-to-digits (bytes &optional from to)
+ (or from (setq from 0))
+ (or to (setq to (length bytes)))
+ (let ((len (- to from))
+ (val 0.0))
+ (dotimes (i len)
+ (setq val (+ (* val 256.0)
+ (aref bytes (+ from (if (eq (byteorder) ?B) i
+ (- len i 1)))))))
+ (format "%.0f" val)))
+
(defun mac-ae-selection-range (ae)
;; #pragma options align=mac68k
;; typedef struct SelectionRange {
@@ -1518,6 +1681,78 @@ Currently the `mailto' scheme is supported."
(define-key mac-apple-event-map [hicommand about] 'display-splash-screen)
+;;; Converted Carbon Events
+(defun mac-handle-toolbar-switch-mode (event)
+ "Toggle visibility of tool-bars in response to EVENT.
+With no keyboard modifiers, it toggles the visibility of the
+frame where the tool-bar toggle button was pressed. With some
+modifiers, it changes global tool-bar visibility setting."
+ (interactive "e")
+ (let* ((ae (mac-event-ae event))
+ (modifiers (cdr (mac-ae-parameter ae "kmod"))))
+ (if (and modifiers (not (string= modifiers "\000\000\000\000")))
+ ;; Globally toggle tool-bar-mode if some modifier key is pressed.
+ (tool-bar-mode)
+ (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae))))
+ (rest (frame-list))
+ frame)
+ (while (and (null frame) rest)
+ (if (string= (frame-parameter (car rest) 'window-id) window-id)
+ (setq frame (car rest)))
+ (setq rest (cdr rest)))
+ (set-frame-parameter frame 'tool-bar-lines
+ (if (= (frame-parameter frame 'tool-bar-lines) 0)
+ 1 0))))))
+
+;; kEventClassWindow/kEventWindowToolbarSwitchMode
+(define-key mac-apple-event-map [window toolbar-switch-mode]
+ 'mac-handle-toolbar-switch-mode)
+
+;;; Font panel
+(when (fboundp 'mac-set-font-panel-visibility)
+
+(define-minor-mode mac-font-panel-mode
+ "Toggle use of the font panel.
+With numeric ARG, display the panel bar if and only if ARG is positive."
+ :init-value nil
+ :global t
+ :group 'mac
+ (mac-set-font-panel-visibility mac-font-panel-mode))
+
+(defun mac-handle-font-panel-closed (event)
+ "Update internal status in response to font panel closed EVENT."
+ (interactive "e")
+ ;; Synchronize with the minor mode variable.
+ (mac-font-panel-mode 0))
+
+(defun mac-handle-font-selection (event)
+ "Change default face attributes according to font selection EVENT."
+ (interactive "e")
+ (let* ((ae (mac-event-ae event))
+ (fm-font-size (cdr (mac-ae-parameter ae "fmsz")))
+ (atsu-font-id (cdr (mac-ae-parameter ae "auid")))
+ (attribute-values (gethash atsu-font-id mac-atsu-font-table)))
+ (if fm-font-size
+ (setq attribute-values
+ `(:height ,(* 10 (mac-bytes-to-integer fm-font-size))
+ ,@attribute-values)))
+ (apply 'set-face-attribute 'default (selected-frame) attribute-values)))
+
+;; kEventClassFont/kEventFontPanelClosed
+(define-key mac-apple-event-map [font panel-closed]
+ 'mac-handle-font-panel-closed)
+;; kEventClassFont/kEventFontSelection
+(define-key mac-apple-event-map [font selection] 'mac-handle-font-selection)
+
+(define-key-after menu-bar-showhide-menu [mac-font-panel-mode]
+ (menu-bar-make-mm-toggle mac-font-panel-mode
+ "Font Panel"
+ "Show the font panel as a floating dialog")
+ 'showhide-speedbar)
+
+) ;; (fboundp 'mac-set-font-panel-visibility)
+
+;;; Services
(defun mac-services-open-file ()
"Open the file specified by the selection value for Services."
(interactive)
@@ -1589,6 +1824,83 @@ Currently the `mailto' scheme is supported."
;; processed when the initial frame has been created: this is where
;; the files should be opened.
(add-hook 'after-init-hook 'mac-process-deferred-apple-events)
+
+
+;;;; Drag and drop
+
+(defcustom mac-dnd-types-alist
+ '(("furl" . mac-dnd-handle-furl)
+ ("hfs " . mac-dnd-handle-hfs)
+ ("utxt" . mac-dnd-insert-utxt)
+ ("TEXT" . mac-dnd-insert-TEXT)
+ ("TIFF" . mac-dnd-insert-TIFF))
+ "Which function to call to handle a drop of that type.
+The function takes three arguments, WINDOW, ACTION and DATA.
+WINDOW is where the drop occured, ACTION is always `private' on
+Mac. DATA is the drop data. Unlike the x-dnd counterpart, the
+return value of the function is not significant.
+
+See also `mac-dnd-known-types'."
+ :version "22.1"
+ :type 'alist
+ :group 'mac)
+
+(defun mac-dnd-handle-furl (window action data)
+ (dnd-handle-one-url window action (mac-furl-to-string data)))
+
+(defun mac-dnd-handle-hfs (window action data)
+;; struct HFSFlavor {
+;; OSType fileType;
+;; OSType fileCreator;
+;; UInt16 fdFlags;
+;; FSSpec fileSpec;
+;; };
+ (let* ((file-name (mac-coerce-ae-data "fss " (substring data 10)
+ 'undecoded-file-name))
+ (url (concat "file://"
+ (mapconcat 'url-hexify-string
+ (split-string file-name "/") "/"))))
+ (dnd-handle-one-url window action url)))
+
+(defun mac-dnd-insert-utxt (window action data)
+ (dnd-insert-text window action (mac-utxt-to-string data)))
+
+(defun mac-dnd-insert-TEXT (window action data)
+ (dnd-insert-text window action (mac-TEXT-to-string data)))
+
+(defun mac-dnd-insert-TIFF (window action data)
+ (dnd-insert-text window action (mac-TIFF-to-string data)))
+
+(defun mac-dnd-drop-data (event frame window data type)
+ (let* ((type-info (assoc type mac-dnd-types-alist))
+ (handler (cdr type-info))
+ (action 'private)
+ (w (posn-window (event-start event))))
+ (when handler
+ (if (and (windowp w) (window-live-p w)
+ (not (window-minibuffer-p w))
+ (not (window-dedicated-p w)))
+ ;; If dropping in an ordinary window which we could use,
+ ;; let dnd-open-file-other-window specify what to do.
+ (progn
+ (goto-char (posn-point (event-start event)))
+ (funcall handler window action data))
+ ;; If we can't display the file here,
+ ;; make a new window for it.
+ (let ((dnd-open-file-other-window t))
+ (select-frame frame)
+ (funcall handler window action data))))))
+
+(defun mac-dnd-handle-drag-n-drop-event (event)
+ "Receive drag and drop events."
+ (interactive "e")
+ (let ((window (posn-window (event-start event))))
+ (when (windowp window) (select-window window))
+ (dolist (item (mac-ae-list (mac-event-ae event)))
+ (if (not (equal (car item) "null"))
+ (mac-dnd-drop-data event (selected-frame) window
+ (cdr item) (car item)))))
+ (select-frame-set-input-focus (selected-frame)))
;;; Do the actual Windows setup here; the above code just defines
;;; functions and variables that we use now.
@@ -1618,96 +1930,6 @@ Currently the `mailto' scheme is supported."
(setq frame-creation-function 'x-create-frame-with-faces)
-(cp-make-coding-system
- mac-centraleurroman
- [?\,AD(B ?\$,1 (B ?\$,1 !(B ?\,AI(B ?\$,1 $(B ?\,AV(B ?\,A\(B ?\,Aa(B ?\$,1 %(B ?\$,1 ,(B ?\,Ad(B ?\$,1 -(B ?\$,1 &(B ?\$,1 '(B ?\,Ai(B ?\$,1!9(B
- ?\$,1!:(B ?\$,1 .(B ?\,Am(B ?\$,1 /(B ?\$,1 2(B ?\$,1 3(B ?\$,1 6(B ?\,As(B ?\$,1 7(B ?\,At(B ?\,Av(B ?\,Au(B ?\,Az(B ?\$,1 :(B ?\$,1 ;(B ?\,A|(B
- ?\$,1s (B ?\,A0(B ?\$,1 8(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\,A_(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1 9(B ?\,A((B ?\$,1y (B ?\$,1 C(B ?\$,1 N(B
- ?\$,1 O(B ?\$,1 J(B ?\$,1y$(B ?\$,1y%(B ?\$,1 K(B ?\$,1 V(B ?\$,1x"(B ?\$,1x1(B ?\$,1 b(B ?\$,1 [(B ?\$,1 \(B ?\$,1 ](B ?\$,1 ^(B ?\$,1 Y(B ?\$,1 Z(B ?\$,1 e(B
- ?\$,1 f(B ?\$,1 c(B ?\,A,(B ?\$,1x:(B ?\$,1 d(B ?\$,1 g(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1 h(B ?\$,1 p(B ?\,AU(B ?\$,1 q(B ?\$,1 l(B
- ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,2"*(B ?\$,1 m(B ?\$,1 t(B ?\$,1 u(B ?\$,1 x(B ?\$,1s9(B ?\$,1s:(B ?\$,1 y(B ?\$,1 v(B
- ?\$,1 w(B ?\$,1! (B ?\$,1rz(B ?\$,1r~(B ?\$,1!!(B ?\$,1 z(B ?\$,1 {(B ?\,AA(B ?\$,1!$(B ?\$,1!%(B ?\,AM(B ?\$,1!=(B ?\$,1!>(B ?\$,1!*(B ?\,AS(B ?\,AT(B
- ?\$,1!+(B ?\$,1!.(B ?\,AZ(B ?\$,1!/(B ?\$,1!0(B ?\$,1!1(B ?\$,1!2(B ?\$,1!3(B ?\,A](B ?\,A}(B ?\$,1 W(B ?\$,1!;(B ?\$,1 a(B ?\$,1!<(B ?\$,1 B(B ?\$,1$g(B]
- "Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).")
-(coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman)
-
-(cp-make-coding-system
- mac-cyrillic
- [?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B
- ?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B
- ?\$,1s (B ?\,A0(B ?\$,1)P(B ?\,A#(B ?\,A'(B ?\$,1s"(B ?\,A6(B ?\$,1(&(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1("(B ?\$,1(r(B ?\$,1y (B ?\$,1(#(B ?\$,1(s(B
- ?\$,1x>(B ?\,A1(B ?\$,1y$(B ?\$,1y%(B ?\$,1(v(B ?\,A5(B ?\$,1)Q(B ?\$,1(((B ?\$,1($(B ?\$,1(t(B ?\$,1('(B ?\$,1(w(B ?\$,1()(B ?\$,1(y(B ?\$,1(*(B ?\$,1(z(B
- ?\$,1(x(B ?\$,1(%(B ?\,A,(B ?\$,1x:(B ?\$,1!R(B ?\$,1xh(B ?\$,1x&(B ?\,A+(B ?\,A;(B ?\$,1s&(B ?\,A (B ?\$,1(+(B ?\$,1({(B ?\$,1(,(B ?\$,1(|(B ?\$,1(u(B
- ?\$,1rs(B ?\$,1rt(B ?\$,1r|(B ?\$,1r}(B ?\$,1rx(B ?\$,1ry(B ?\,Aw(B ?\$,1r~(B ?\$,1(.(B ?\$,1(~(B ?\$,1(/(B ?\$,1((B ?\$,1uV(B ?\$,1(!(B ?\$,1(q(B ?\$,1(o(B
- ?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B
- ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1tL(B]
- "Mac Cyrillic Encoding (MIME:x-mac-cyrillic).")
-(coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic)
-
-(let
- ((encoding-vector
- (vconcat
- (make-vector 32 nil)
- ;; mac-symbol (32..126) -> emacs-mule mapping
- [?\ ?\! ?\$,1x (B ?\# ?\$,1x#(B ?\% ?\& ?\$,1x-(B ?\( ?\) ?\$,1x7(B ?\+ ?\, ?\$,1x2(B ?\. ?\/
- ?\0 ?\1 ?\2 ?\3 ?\4 ?\5 ?\6 ?\7 ?\8 ?\9 ?\: ?\; ?\< ?\= ?\> ?\?
- ?\$,1xe(B ?\$,1&q(B ?\$,1&r(B ?\$,1''(B ?\$,1&t(B ?\$,1&u(B ?\$,1'&(B ?\$,1&s(B ?\$,1&w(B ?\$,1&y(B ?\$,1'Q(B ?\$,1&z(B ?\$,1&{(B ?\$,1&|(B ?\$,1&}(B ?\$,1&(B
- ?\$,1' (B ?\$,1&x(B ?\$,1'!(B ?\$,1'#(B ?\$,1'$(B ?\$,1'%(B ?\$,1'B(B ?\$,1')(B ?\$,1&~(B ?\$,1'((B ?\$,1&v(B ?\[ ?\$,1xT(B ?\] ?\$,1ye(B ?\_
- ?\$,3bE(B ?\$,1'1(B ?\$,1'2(B ?\$,1'G(B ?\$,1'4(B ?\$,1'5(B ?\$,1'F(B ?\$,1'3(B ?\$,1'7(B ?\$,1'9(B ?\$,1'U(B ?\$,1':(B ?\$,1';(B ?\$,1'<(B ?\$,1'=(B ?\$,1'?(B
- ?\$,1'@(B ?\$,1'8(B ?\$,1'A(B ?\$,1'C(B ?\$,1'D(B ?\$,1'E(B ?\$,1'V(B ?\$,1'I(B ?\$,1'>(B ?\$,1'H(B ?\$,1'6(B ?\{ ?\| ?\} ?\$,1x\(B]
- (make-vector (- 160 127) nil)
- ;; mac-symbol (160..254) -> emacs-mule mapping
- ;; Mapping of the following characters are changed from the
- ;; original one:
- ;; 0xE2 0x00AE+0xF87F -> 0x00AE # REGISTERED SIGN, alternate: sans serif
- ;; 0xE3 0x00A9+0xF87F -> 0x00A9 # COPYRIGHT SIGN, alternate: sans serif
- ;; 0xE4 0x2122+0xF87F -> 0x2122 # TRADE MARK SIGN, alternate: sans serif
- [?\$,1tL(B ?\$,1'R(B ?\$,1s2(B ?\$,1y$(B ?\$,1sD(B ?\$,1x>(B ?\$,1!R(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1vt(B ?\$,1vp(B ?\$,1vq(B ?\$,1vr(B ?\$,1vs(B
- ?\,A0(B ?\,A1(B ?\$,1s3(B ?\$,1y%(B ?\,AW(B ?\$,1x=(B ?\$,1x"(B ?\$,1s"(B ?\,Aw(B ?\$,1y (B ?\$,1y!(B ?\$,1xh(B ?\$,1s&(B ?\$,1|p(B ?\$,1|O(B ?\$,1w5(B
- ?\$,1uu(B ?\$,1uQ(B ?\$,1u\(B ?\$,1uX(B ?\$,1yW(B ?\$,1yU(B ?\$,1x%(B ?\$,1xI(B ?\$,1xJ(B ?\$,1yC(B ?\$,1yG(B ?\$,1yD(B ?\$,1yB(B ?\$,1yF(B ?\$,1x((B ?\$,1x)(B
- ?\$,1x@(B ?\$,1x'(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x/(B ?\$,1x:(B ?\$,1z%(B ?\,A,(B ?\$,1xG(B ?\$,1xH(B ?\$,1wT(B ?\$,1wP(B ?\$,1wQ(B ?\$,1wR(B ?\$,1wS(B
- ?\$,2"*(B ?\$,2=H(B ?\,A.(B ?\,A)(B ?\$,1ub(B ?\$,1x1(B ?\$,1|;(B ?\$,1|<(B ?\$,1|=(B ?\$,1|A(B ?\$,1|B(B ?\$,1|C(B ?\$,1|G(B ?\$,1|H(B ?\$,1|I(B ?\$,1|J(B
- ?\$,3b_(B ?\$,2=I(B ?\$,1xK(B ?\$,1{ (B ?\$,1|N(B ?\$,1{!(B ?\$,1|>(B ?\$,1|?(B ?\$,1|@(B ?\$,1|D(B ?\$,1|E(B ?\$,1|F(B ?\$,1|K(B ?\$,1|L(B ?\$,1|M(B
- nil]))
- translation-table)
- (setq translation-table
- (make-translation-table-from-vector encoding-vector))
-;; (define-translation-table 'mac-symbol-decoder translation-table)
- (define-translation-table 'mac-symbol-encoder
- (char-table-extra-slot translation-table 0)))
-
-(let
- ((encoding-vector
- (vconcat
- (make-vector 32 nil)
- ;; mac-dingbats (32..126) -> emacs-mule mapping
- [?\ ?\$,2%A(B ?\$,2%B(B ?\$,2%C(B ?\$,2%D(B ?\$,2"n(B ?\$,2%F(B ?\$,2%G(B ?\$,2%H(B ?\$,2%I(B ?\$,2"{(B ?\$,2"~(B ?\$,2%L(B ?\$,2%M(B ?\$,2%N(B ?\$,2%O(B
- ?\$,2%P(B ?\$,2%Q(B ?\$,2%R(B ?\$,2%S(B ?\$,2%T(B ?\$,2%U(B ?\$,2%V(B ?\$,2%W(B ?\$,2%X(B ?\$,2%Y(B ?\$,2%Z(B ?\$,2%[(B ?\$,2%\(B ?\$,2%](B ?\$,2%^(B ?\$,2%_(B
- ?\$,2%`(B ?\$,2%a(B ?\$,2%b(B ?\$,2%c(B ?\$,2%d(B ?\$,2%e(B ?\$,2%f(B ?\$,2%g(B ?\$,2"e(B ?\$,2%i(B ?\$,2%j(B ?\$,2%k(B ?\$,2%l(B ?\$,2%m(B ?\$,2%n(B ?\$,2%o(B
- ?\$,2%p(B ?\$,2%q(B ?\$,2%r(B ?\$,2%s(B ?\$,2%t(B ?\$,2%u(B ?\$,2%v(B ?\$,2%w(B ?\$,2%x(B ?\$,2%y(B ?\$,2%z(B ?\$,2%{(B ?\$,2%|(B ?\$,2%}(B ?\$,2%~(B ?\$,2%(B
- ?\$,2& (B ?\$,2&!(B ?\$,2&"(B ?\$,2&#(B ?\$,2&$(B ?\$,2&%(B ?\$,2&&(B ?\$,2&'(B ?\$,2&((B ?\$,2&)(B ?\$,2&*(B ?\$,2&+(B ?\$,2"/(B ?\$,2&-(B ?\$,2!`(B ?\$,2&/(B
- ?\$,2&0(B ?\$,2&1(B ?\$,2&2(B ?\$,2!r(B ?\$,2!|(B ?\$,2"&(B ?\$,2&6(B ?\$,2"7(B ?\$,2&8(B ?\$,2&9(B ?\$,2&:(B ?\$,2&;(B ?\$,2&<(B ?\$,2&=(B ?\$,2&>(B
- nil
- ;; mac-dingbats (128..141) -> emacs-mule mapping
- ?\$,2&H(B ?\$,2&I(B ?\$,2&J(B ?\$,2&K(B ?\$,2&L(B ?\$,2&M(B ?\$,2&N(B ?\$,2&O(B ?\$,2&P(B ?\$,2&Q(B ?\$,2&R(B ?\$,2&S(B ?\$,2&T(B ?\$,2&U(B]
- (make-vector (- 161 142) nil)
- ;; mac-dingbats (161..239) -> emacs-mule mapping
- [?\$,2&A(B ?\$,2&B(B ?\$,2&C(B ?\$,2&D(B ?\$,2&E(B ?\$,2&F(B ?\$,2&G(B ?\$,2#c(B ?\$,2#f(B ?\$,2#e(B ?\$,2#`(B ?\$,1~@(B ?\$,1~A(B ?\$,1~B(B ?\$,1~C(B
- ?\$,1~D(B ?\$,1~E(B ?\$,1~F(B ?\$,1~G(B ?\$,1~H(B ?\$,1~I(B ?\$,2&V(B ?\$,2&W(B ?\$,2&X(B ?\$,2&Y(B ?\$,2&Z(B ?\$,2&[(B ?\$,2&\(B ?\$,2&](B ?\$,2&^(B ?\$,2&_(B
- ?\$,2&`(B ?\$,2&a(B ?\$,2&b(B ?\$,2&c(B ?\$,2&d(B ?\$,2&e(B ?\$,2&f(B ?\$,2&g(B ?\$,2&h(B ?\$,2&i(B ?\$,2&j(B ?\$,2&k(B ?\$,2&l(B ?\$,2&m(B ?\$,2&n(B ?\$,2&o(B
- ?\$,2&p(B ?\$,2&q(B ?\$,2&r(B ?\$,2&s(B ?\$,2&t(B ?\$,1vr(B ?\$,1vt(B ?\$,1vu(B ?\$,2&x(B ?\$,2&y(B ?\$,2&z(B ?\$,2&{(B ?\$,2&|(B ?\$,2&}(B ?\$,2&~(B ?\$,2&(B
- ?\$,2' (B ?\$,2'!(B ?\$,2'"(B ?\$,2'#(B ?\$,2'$(B ?\$,2'%(B ?\$,2'&(B ?\$,2''(B ?\$,2'((B ?\$,2')(B ?\$,2'*(B ?\$,2'+(B ?\$,2',(B ?\$,2'-(B ?\$,2'.(B ?\$,2'/(B
- nil
- ;; mac-dingbats (241..254) -> emacs-mule mapping
- ?\$,2'1(B ?\$,2'2(B ?\$,2'3(B ?\$,2'4(B ?\$,2'5(B ?\$,2'6(B ?\$,2'7(B ?\$,2'8(B ?\$,2'9(B ?\$,2':(B ?\$,2';(B ?\$,2'<(B ?\$,2'=(B ?\$,2'>(B
- nil]))
- translation-table)
- (setq translation-table
- (make-translation-table-from-vector encoding-vector))
-;; (define-translation-table 'mac-dingbats-decoder translation-table)
- (define-translation-table 'mac-dingbats-encoder
- (char-table-extra-slot translation-table 0)))
-
(defvar mac-font-encoder-list
'(("mac-roman" mac-roman-encoder
ccl-encode-mac-roman-font "%s")
@@ -2012,37 +2234,11 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
;; Enable CLIPBOARD copy/paste through menu bar commands.
(menu-bar-enable-clipboard)
-(defconst mac-system-coding-system
- (let ((base (or (cdr (assq mac-system-script-code
- mac-script-code-coding-systems))
- 'mac-roman)))
- (if (eq system-type 'darwin)
- base
- (coding-system-change-eol-conversion base 'mac)))
- "Coding system derived from the system script code.")
-
-(set-selection-coding-system mac-system-coding-system)
+;; Initiate drag and drop
-(defun mac-drag-n-drop (event)
- "Edit the files listed in the drag-n-drop EVENT.
-Switch to a buffer editing the last file dropped."
- (interactive "e")
- ;; Make sure the drop target has positive co-ords
- ;; before setting the selected frame - otherwise it
- ;; won't work. <skx@tardis.ed.ac.uk>
- (let* ((window (posn-window (event-start event)))
- (coords (posn-x-y (event-start event)))
- (x (car coords))
- (y (cdr coords)))
- (if (and (> x 0) (> y 0))
- (set-frame-selected-window nil window))
- (dolist (file-name (nth 2 event))
- (dnd-handle-one-url window 'private
- (concat "file:" file-name))))
- (select-frame-set-input-focus (selected-frame)))
+(global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
+(global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event)
-(global-set-key [drag-n-drop] 'mac-drag-n-drop)
-(global-set-key [M-drag-n-drop] 'mac-drag-n-drop)
;;;; Non-toolkit Scroll bars
@@ -2107,6 +2303,7 @@ Switch to a buffer editing the last file dropped."
(scroll-up 1)))
)
+
;;;; Others
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 049d65c62fa..2bf36283983 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -162,6 +162,14 @@
(define-key xterm-function-map "\e[4~" [select])
(define-key xterm-function-map "\e[29~" [print])
+ ;; These keys will be available xterm starting probably from
+ ;; version 214.
+ (define-key xterm-function-map "\e[27;5;8~" [(control ?\t)])
+ (define-key xterm-function-map "\e[27;5;44~" [(control ?\,)])
+ (define-key xterm-function-map "\e[27;5;46~" [(control ?\.)])
+ (define-key xterm-function-map "\e[27;5;47~" [(control ?\/)])
+ (define-key xterm-function-map "\e[27;5;92~" [(control ?\\)])
+
;; Other versions of xterm might emit these.
(define-key xterm-function-map "\e[A" [up])
(define-key xterm-function-map "\e[B" [down])
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index da77508dce3..fed06a572bb 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2607,15 +2607,18 @@ By just answering RET you can find out what the current dictionary is."
(mapcar 'list (ispell-valid-dictionary-list)))
nil t)
current-prefix-arg))
- (unless arg (ispell-buffer-local-dict))
+ (unless arg (ispell-buffer-local-dict 'no-reload))
(if (equal dict "default") (setq dict nil))
;; This relies on completing-read's bug of returning "" for no match
(cond ((equal dict "")
+ (ispell-internal-change-dictionary)
(message "Using %s dictionary"
(or ispell-local-dictionary ispell-dictionary "default")))
((equal dict (or ispell-local-dictionary
ispell-dictionary "default"))
- ;; Specified dictionary is the default already. No-op
+ ;; Specified dictionary is the default already. Could reload
+ ;; the dictionaries if needed.
+ (ispell-internal-change-dictionary)
(and (interactive-p)
(message "No change, using %s dictionary" dict)))
(t ; reset dictionary!
@@ -2634,13 +2637,16 @@ By just answering RET you can find out what the current dictionary is."
dict))))
(defun ispell-internal-change-dictionary ()
- "Update the dictionary actually used by Ispell.
+ "Update the dictionary and the personal dictionary used by Ispell.
This may kill the Ispell process; if so,
a new one will be started when needed."
- (let ((dict (or ispell-local-dictionary ispell-dictionary)))
- (unless (equal ispell-current-dictionary dict)
+ (let ((dict (or ispell-local-dictionary ispell-dictionary))
+ (pdict (or ispell-local-pdict ispell-personal-dictionary)))
+ (unless (and (equal ispell-current-dictionary dict)
+ (equal ispell-current-personal-dictionary pdict))
(ispell-kill-ispell t)
- (setq ispell-current-dictionary dict))))
+ (setq ispell-current-dictionary dict
+ ispell-current-personal-dictionary pdict))))
;;; Spelling of comments are checked when ispell-check-comments is non-nil.
@@ -3667,8 +3673,9 @@ Includes Latex/Nroff modes and extended character mode."
;;; Can kill the current ispell process
-(defun ispell-buffer-local-dict ()
+(defun ispell-buffer-local-dict (&optional no-reload)
"Initializes local dictionary and local personal dictionary.
+If optional NO-RELOAD is non-nil, do not make any dictionary reloading.
When a dictionary is defined in the buffer (see variable
`ispell-dictionary-keyword'), it will override the local setting
from \\[ispell-change-dictionary].
@@ -3695,12 +3702,9 @@ Both should not be used to define a buffer-local dictionary."
(if (re-search-forward " *\\([^ \"]+\\)" end t)
(setq ispell-local-pdict
(match-string-no-properties 1)))))))
- ;; Reload if new personal dictionary defined.
- (if (not (equal ispell-current-personal-dictionary
- (or ispell-local-pdict ispell-personal-dictionary)))
- (ispell-kill-ispell t))
- ;; Reload if new dictionary defined.
- (ispell-internal-change-dictionary))
+ (unless no-reload
+ ;; Reload if new dictionary (maybe the personal one) defined.
+ (ispell-internal-change-dictionary)))
(defun ispell-buffer-local-words ()
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 92bdf480e06..1c3e383c9fb 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-05 Andreas Seltenreich <seltenreich@gmx.de> (tiny change)
+
+ * url-http.el (url-http-parse-headers): Don't reuse connection if
+ "Connection: close" header was seen.
+
2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
* url-gw.el (url-open-stream): Don't hide errors.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index c401094593e..45bf97ec6b6 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -386,6 +386,10 @@ should be shown to the user."
(url-http-parse-response)
(mail-narrow-to-head)
;;(narrow-to-region (point-min) url-http-end-of-headers)
+ (let ((connection (mail-fetch-field "Connection")))
+ (if (and connection
+ (string= (downcase connection) "close"))
+ (delete-process url-http-process)))
(let ((class nil)
(success nil))
(setq class (/ url-http-response-status 100))
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 020e667ec16..f4bdfc81aff 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,43 @@
+2006-05-09 Richard Stallman <rms@gnu.org>
+
+ * variables.texi (File Local Variables): Document
+ safe-local-eval-forms and safe-local-eval-function.
+
+2006-05-07 Kim F. Storm <storm@cua.dk>
+
+ * minibuf.texi (Minibuffer History): Remove keep-dups arg
+ from add-to-history.
+
+2006-05-07 Romain Francoise <romain@orebokech.com>
+
+ * commands.texi (Event Input Misc):
+ * compile.texi (Eval During Compile):
+ * internals.texi (Buffer Internals):
+ * minibuf.texi (Initial Input):
+ * nonascii.texi (Scanning Charsets):
+ * numbers.texi (Comparison of Numbers):
+ * windows.texi (Textual Scrolling, Vertical Scrolling):
+ Fix various typos.
+
+2006-05-06 Eli Zaretskii <eliz@gnu.org>
+
+ * hooks.texi (Standard Hooks): Replace inforef to emacs-xtra by
+ conditional xref's to either emacs or emacs-xtra, depending on
+ @iftex/@ifnottex.
+
+ * minibuf.texi (Minibuffer History): Document add-to-history.
+
+2006-05-05 Eli Zaretskii <eliz@gnu.org>
+
+ * internals.texi (Pure Storage): Mention the pure overflow message
+ at startup.
+
+2006-05-05 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se>
+
+ * keymaps.texi (Active Keymaps): Fix pseudo-Lisp syntax.
+ (Searching Keymaps): Fix pseudo-Lisp description of keymap
+ search.
+
2006-05-01 Richard Stallman <rms@gnu.org>
* intro.texi (nil and t): Clarify.
diff --git a/lispref/commands.texi b/lispref/commands.texi
index 797a5ced8e9..fa5d95f0408 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -2451,7 +2451,7 @@ If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil},
arrival of input during those parts won't cause an abort until
the end of that part.
-If you want to be able to distingish all possible values computed
+If you want to be able to distinguish all possible values computed
by @var{body} from both kinds of abort conditions, write the code
like this:
diff --git a/lispref/compile.texi b/lispref/compile.texi
index 1d8823a48c5..4b796697731 100644
--- a/lispref/compile.texi
+++ b/lispref/compile.texi
@@ -412,7 +412,7 @@ automatically @code{eval-and-compile}, the package is loaded both when
compiling and executing.
@code{autoload} is also effectively @code{eval-and-compile} too. It's
-recognised when compiling, so uses of such a function don't produce
+recognized when compiling, so uses of such a function don't produce
``not known to be defined'' warnings.
Most uses of @code{eval-and-compile} are fairly sophisticated.
@@ -456,7 +456,7 @@ used to load it for compiling, but not executing. For example,
The same sort of thing goes for macros or @code{defalias}es defined
locally and only for use within the file. They can be defined while
compiling, but then not needed when executing. This is good for code
-that's only a fallback for compability with other versions of Emacs.
+that's only a fallback for compatibility with other versions of Emacs.
For example.
@lisp
diff --git a/lispref/files.texi b/lispref/files.texi
index 4d3cfd52c94..8a566f62ee0 100644
--- a/lispref/files.texi
+++ b/lispref/files.texi
@@ -1602,7 +1602,7 @@ directory name (@pxref{Directory Names}), or @code{nil} if
@var{filename} does not include a directory part.
On GNU and Unix systems, a string returned by this function always
-ends in a slash. On MSDOS it can also end in a colon. On VMS, it
+ends in a slash. On MS-DOS it can also end in a colon. On VMS, it
returns a string ending in one of the three characters @samp{:},
@samp{]}, or @samp{>}.
@@ -1809,7 +1809,7 @@ the directory name but not identical to it. (This is not quite the
same as the usual Unix terminology.) These two different names for
the same entity are related by a syntactic transformation. On GNU and
Unix systems, this is simple: a directory name ends in a slash,
-whereas the directory's name as a file lacks that slash. On MSDOS and
+whereas the directory's name as a file lacks that slash. On MS-DOS and
VMS, the relationship is more complicated.
The difference between a directory name and its name as a file is
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index 562d728339e..4dcc5f5b51c 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -87,7 +87,13 @@ or their values are used). The variables whose names end in
@xref{Lazy Properties}.
@item calendar-load-hook
-@inforef{Calendar Customizing,, emacs-xtra}.
+@iftex
+@xref{Calendar Customizing,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Calendar Customizing,,, emacs}.
+@end ifnottex
+
@item change-major-mode-hook
@xref{Creating Buffer-Local}.
@@ -124,7 +130,12 @@ is useful for truncating history lists, for example. @xref{Saving
Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
@item diary-display-hook
-@inforef{Fancy Diary Display,, emacs-xtra}.
+@iftex
+@xref{Fancy Diary Display,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Fancy Diary Display,,, emacs}.
+@end ifnottex
@item diary-hook
List of functions called after the display of the diary. Can be used
@@ -170,7 +181,12 @@ for appointment notification.
@xref{Other Font Lock Variables}.
@item initial-calendar-window-hook
-@inforef{Calendar Customizing,, emacs-xtra}.
+@iftex
+@xref{Calendar Customizing,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Calendar Customizing,,, emacs}.
+@end ifnottex
@item kbd-macro-termination-hook
@xref{Keyboard Macros}.
@@ -190,14 +206,24 @@ for appointment notification.
@item lisp-indent-function
@item list-diary-entries-hook
-@inforef{Fancy Diary Display,, emacs-xtra}.
+@iftex
+@xref{Fancy Diary Display,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Fancy Diary Display,,, emacs}.
+@end ifnottex
@item mail-setup-hook
@xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs
Manual}.
@item mark-diary-entries-hook
-@inforef{Fancy Diary Display,, emacs-xtra}.
+@iftex
+@xref{Fancy Diary Display,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Fancy Diary Display,,, emacs}.
+@end ifnottex
@item menu-bar-update-hook
@xref{Menu Bar}.
@@ -212,10 +238,20 @@ Manual}.
@xref{Mouse Position}.
@item nongregorian-diary-listing-hook
-@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
+@iftex
+@xref{Hebrew/Islamic Entries,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Hebrew/Islamic Entries,,, emacs}.
+@end ifnottex
@item nongregorian-diary-marking-hook
-@inforef{Hebrew/Islamic Entries,, emacs-xtra}.
+@iftex
+@xref{Hebrew/Islamic Entries,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Hebrew/Islamic Entries,,, emacs}.
+@end ifnottex
@item occur-hook
@@ -229,7 +265,12 @@ Manual}.
@xref{Command Overview}.
@item print-diary-entries-hook
-@inforef{Diary Customizing,, emacs-xtra}.
+@iftex
+@xref{Diary Customizing,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Diary Customizing,,, emacs}.
+@end ifnottex
@item redisplay-end-trigger-functions
@xref{Window Hooks}.
@@ -255,10 +296,20 @@ Manual}.
@xref{Terminal-Specific}.
@item today-visible-calendar-hook
-@inforef{Calendar Customizing,, emacs-xtra}.
+@iftex
+@xref{Calendar Customizing,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Calendar Customizing,,, emacs}.
+@end ifnottex
@item today-invisible-calendar-hook
-@inforef{Calendar Customizing,, emacs-xtra}.
+@iftex
+@xref{Calendar Customizing,,, emacs-xtra}.
+@end iftex
+@ifnottex
+@xref{Calendar Customizing,,, emacs}.
+@end ifnottex
@item window-configuration-change-hook
@xref{Window Hooks}.
diff --git a/lispref/internals.texi b/lispref/internals.texi
index ee6423ef37b..f46a162aef1 100644
--- a/lispref/internals.texi
+++ b/lispref/internals.texi
@@ -155,11 +155,15 @@ standard preloaded Lisp libraries. In the file @file{emacs}, it is
marked as read-only (on operating systems that permit this), so that
the memory space can be shared by all the Emacs jobs running on the
machine at once. Pure storage is not expandable; a fixed amount is
-allocated when Emacs is compiled, and if that is not sufficient for the
-preloaded libraries, @file{temacs} crashes. If that happens, you must
-increase the compilation parameter @code{PURESIZE} in the file
-@file{src/puresize.h}. This normally won't happen unless you try to
-preload additional libraries or add features to the standard ones.
+allocated when Emacs is compiled, and if that is not sufficient for
+the preloaded libraries, @file{temacs} allocates dynamic memory for
+the part that didn't fit. If that happens, you should increase the
+compilation parameter @code{PURESIZE} in the file
+@file{src/puresize.h} and rebuild Emacs, even though the resulting
+image will work. Such an overflow normally won't happen unless you
+try to preload additional libraries or add features to the standard
+ones. Emacs will display a warning about the overflow when it
+starts.
@defun purecopy object
This function makes a copy in pure storage of @var{object}, and returns
@@ -1015,7 +1019,7 @@ Mode line element that controls the format of the mode line. If this
is @code{nil}, no mode line will be displayed.
@item header_line_format
-This field is analoguous to @code{mode_line_format} for the mode
+This field is analogous to @code{mode_line_format} for the mode
line displayed at the top of windows.
@item keymap
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi
index b1e2f7fbaea..39a57eddf13 100644
--- a/lispref/keymaps.texi
+++ b/lispref/keymaps.texi
@@ -561,7 +561,7 @@ pseudo-Lisp description of how this process works:
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
- (if (get-text-property (point) 'local-map))
+ (if (get-text-property (point) 'local-map)
(@var{find-in} (get-text-property (point) 'local-map))
(@var{find-in} (current-local-map))))))
(@var{find-in} (current-global-map)))
@@ -670,14 +670,15 @@ description of the order in which the active keymaps are searched:
(@var{find-in-any} emulation-mode-map-alists)
(@var{find-in-any} minor-mode-overriding-map-alist)
(@var{find-in-any} minor-mode-map-alist)
- (@var{find-in} (get-text-property (point) 'local-map))
- (@var{find-in} (current-local-map)))))
+ (if (get-text-property (point) 'local-map)
+ (@var{find-in} (get-text-property (point) 'local-map))
+ (@var{find-in} (current-local-map))))))
(@var{find-in} (current-global-map)))
@end lisp
@noindent
The @var{find-in} and @var{find-in-any} are pseudo functions that
-searches in one keymap respectively an alist of keymaps.
+search in one keymap and in an alist of keymaps, respectively.
@enumerate
@item
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi
index 4faf8fd374c..b5bcc3a77dc 100644
--- a/lispref/minibuf.texi
+++ b/lispref/minibuf.texi
@@ -449,11 +449,26 @@ list, put the length in the @code{history-length} property of the
history list symbol. The variable @code{history-delete-duplicates}
specifies whether to delete duplicates in history.
+@defun add-to-history history-var newelt &optional maxelt
+This function adds a new element @var{newelt} to the history list
+stored in the variable @var{history-var}, and returns the updated
+history list. By default, the list length is limited by the value
+specified by @code{history-length} (described below), but the optional
+argument @var{maxelt} overrides that. The possible values of
+@var{maxelt} have the same meaning as the values of
+@code{history-length}.
+
+Duplicate members are removed from the history list, unless
+@code{history-delete-duplicates} is @code{nil}.
+@end defun
+
@defvar history-length
The value of this variable specifies the maximum length for all
history lists that don't specify their own maximum lengths. If the
value is @code{t}, that means there no maximum (don't delete old
-elements).
+elements). The value of @code{history-length} property of the history
+list variable's symbol, if set, overrides this variable for that
+particular history list.
@end defvar
@defvar history-delete-duplicates
@@ -501,7 +516,7 @@ A history list for arguments that are Lisp expressions to evaluate.
Several of the functions for minibuffer input have an argument called
@var{initial} or @var{initial-contents}. This is a mostly-deprecated
-feature for specifiying that the minibuffer should start out with
+feature for specifying that the minibuffer should start out with
certain text, instead of empty as usual.
If @var{initial} is a string, the minibuffer starts out containing the
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi
index b09a3fc78a3..c526d419766 100644
--- a/lispref/nonascii.texi
+++ b/lispref/nonascii.texi
@@ -484,7 +484,7 @@ of the text in question.
@defun charset-after &optional pos
This function return the charset of a character in the current buffer
at position @var{pos}. If @var{pos} is omitted or @code{nil}, it
-defauls to the current value of point. If @var{pos} is out of range,
+defaults to the current value of point. If @var{pos} is out of range,
the value is @code{nil}.
@end defun
diff --git a/lispref/numbers.texi b/lispref/numbers.texi
index 3cbc1a7ae16..bac3b0e114c 100644
--- a/lispref/numbers.texi
+++ b/lispref/numbers.texi
@@ -322,7 +322,7 @@ returns @code{t} if so, @code{nil} otherwise.
@defun eql value1 value2
This function acts like @code{eq} except when both arguments are
-numbers. It compares numbers by type and numberic value, so that
+numbers. It compares numbers by type and numeric value, so that
@code{(eql 1.0 1)} returns @code{nil}, but @code{(eql 1.0 1.0)} and
@code{(eql 1 1)} both return @code{t}.
@end defun
diff --git a/lispref/variables.texi b/lispref/variables.texi
index 5b4b779448e..87008d6961b 100644
--- a/lispref/variables.texi
+++ b/lispref/variables.texi
@@ -1844,6 +1844,19 @@ unconditionally; @code{nil} means ignore them; anything else means ask
the user what to do for each file. The default value is @code{maybe}.
@end defopt
+@defopt safe-local-eval-forms
+This variable holds a list of expressions that are safe to
+evaluate when found in the @samp{Eval:} ``variable'' in a file
+local variables list.
+@end defopt
+
+ If the expression is a function call and the function has a
+@code{safe-local-eval-function} property, the property value
+determines whether the expression is safe to evaluate. The property
+value can be a predicate to call to test the expression, a list of
+such predicates (it's safe if any predicate succeeds), or @code{t}
+(always safe provided the arguments are constant).
+
Text properties are also potential loopholes, since their values
could include functions to call. So Emacs discards all text
properties from string values specified for file local variables.
diff --git a/lispref/windows.texi b/lispref/windows.texi
index dc780e7b828..a2746889633 100644
--- a/lispref/windows.texi
+++ b/lispref/windows.texi
@@ -1419,7 +1419,7 @@ buffer is different from the buffer that is displayed in the selected
window. @xref{Current Buffer}.
If the window contains a row which is taller than the height of the
-window (for example in the presense of a large image), the scroll
+window (for example in the presence of a large image), the scroll
functions will adjust the window vscroll to scroll the partially
visible row. To disable this feature, Lisp code may bind the variable
`auto-window-vscroll' to @code{nil} (@pxref{Vertical Scrolling}).
@@ -1656,7 +1656,7 @@ pixels. In this case, the return value is @var{lines}.
If this variable is non-@code{nil}, the line-move, scroll-up, and
scroll-down functions will automatically modify the window vscroll to
scroll through display rows that are taller that the height of the
-window, for example in the presense of large images.
+window, for example in the presence of large images.
@end defvar
@node Horizontal Scrolling
diff --git a/man/ChangeLog b/man/ChangeLog
index 3e220fa5f4c..30933b5f0a3 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,205 @@
+2006-05-09 Michael Albinus <michael.albinus@gmx.de>
+
+ * tramp.texi (Filename completion): Improve wording.
+
+2006-05-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xresmini.texi (GTK resources): Inserted GTK description.
+
+ * xresources.texi (GTK resources): metafont should be menufont.
+
+2006-05-07 Romain Francoise <romain@orebokech.com>
+
+ * faq.texi (Using regular expressions): Fix typo.
+ (Packages that do not come with Emacs): Fix capitalization.
+ (Replacing text across multiple files): Expand node to explain how
+ to use `dired-do-query-replace-regexp' in more detail, based on
+ suggestion by Eric Hanchrow <offby1@blarg.net>.
+
+2006-05-06 Michael Albinus <michael.albinus@gmx.de>
+
+ * mini.texi (Completion Options):
+ * tramp.texi (Filename completion): Completion of remote files'
+ method, user name and host name is active only in partial
+ completion mode.
+
+2006-05-06 Bill Wohler <wohler@newt.com>
+
+ Release MH-E manual version 8.0.
+
+ * mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
+ release 8.0.
+
+2006-05-06 Bill Wohler <wohler@newt.com>
+
+ * mh-e.texi (MH-BOOK-HOME): Change from
+ http://www.ics.uci.edu/~mh/book/mh to
+ http://rand-mh.sourceforge.net/book/mh.
+ Replace .htm suffix with .html for MH book files.
+ (Using This Manual): Update key binding for getting relevant
+ chapter in Info from command key.
+ (Ranges): Fix itemx.
+
+2006-05-06 Eli Zaretskii <eliz@gnu.org>
+
+ * makefile.w32-in (emacs.dvi):
+ * Makefile.in (emacs.dvi): Add xresmini.texi
+
+ * xresmini.texi (Table of Resources): Remove xref to non-existent
+ node "LessTif Resources".
+
+ * msdog.texi (Microsoft Windows):
+ * calendar.texi (Calendar/Diary, Displaying the Diary)
+ (Special Diary Entries, Importing Diary, Holidays):
+ * programs.texi (Program Modes):
+ * text.texi (Text):
+ * buffers.texi (Several Buffers):
+ * files.texi (Comparing Files): Fix cross-references to emacs-xtra.
+
+2006-05-06 Eli Zaretskii <eliz@gnu.org>
+
+ The following changes merge the emacs-xtra manual into the main
+ manual, but only for on-line version of the manual.
+
+ * vc2-xtra.texi (Version Backups, Local Version Control)
+ (Making Snapshots, Change Logs and VC, Version Headers)
+ (Customizing VC, CVS Options) [ifnottex]: Conditional xref's for
+ on-line manual.
+
+ * vc1-xtra.texi (VC Dired Mode) [ifnottex]: Conditional xref's
+ for on-line manual.
+
+ * msdog-xtra.texi (MS-DOS, MS-DOS Keyboard, MS-DOS Mouse)
+ (MS-DOS Display, MS-DOS File Names, MS-DOS Printing)
+ (MS-DOS and MULE, MS-DOS Processes) [ifnottex]: Conditional xref's
+ for on-line manual.
+
+ * fortran-xtra.texi (Fortran, Fortran Autofill)
+ (Fortran Autofill, Fortran Abbrev) [ifnottex]: Conditional xref's
+ for on-line manual.
+
+ * picture-xtra.texi (Basic Picture, Rectangles in Picture) [ifnottex]:
+ Conditional xref's for on-line manual.
+
+ * emerge-xtra.texi (Emerge, Overview of Emerge)
+ (Fine Points of Emerge) [ifnottex]: Conditional xref's for on-line
+ manual.
+
+ * Makefile.in (INFO_TARGETS): Remove ../info/emacs-xtra.
+ (EMACS_XTRA): New variable, lists the new *-xtra.texi files.
+ (EMACSSOURCES): Use EMACS_XTRA.
+ (../info/emacs-xtra): Remove.
+ (emacs-xtra.dvi): Add EMACS_XTRA to prerequisites.
+
+ * makefile.w32-in (INFO_TARGETS): Remove $(infodir)/emacs-xtra.
+ (EMACS_XTRA): New variable, lists the new *-xtra.texi files.
+ (EMACSSOURCES): Use EMACS_XTRA.
+ ($(infodir)/emacs-xtra): Remove.
+ (emacs-xtra.dvi): Add EMACS_XTRA to prerequisites.
+
+ * trouble.texi (Quitting):
+ * text.texi (Text):
+ * programs.texi (Program Modes):
+ * msdog.texi (Microsoft Windows):
+ * frames.texi (Frames):
+ * files.texi (Backup, Version Control, VC Concepts)
+ (Types of Log File, Advanced C-x v v, Log Buffer, Old Versions)
+ (Registering, VC Status, VC Undo, Multi-User Branching)
+ (Comparing Files):
+ * calendar.texi (Calendar/Diary, Holidays, Displaying the Diary)
+ (Displaying the Diary, Special Diary Entries, Importing Diary):
+ * buffers.texi (Several Buffers): Replace inforef to emacs-xtra by
+ conditional xref's, depending on @iftex/@ifnottex.
+
+ * msdog.texi (Microsoft Windows) [ifnottex]: Add menu entry for
+ "MS-DOS". @include msdog-xtra.texi.
+
+ * programs.texi (Programs) [ifnottex]: Add menu entry for "Fortran".
+ <Top Level> [ifnottex]: @include fortran-xtra.texi.
+
+ * files.texi (Secondary VC Commands) [ifnottex]: Add menu entries
+ for vc-xtra.texi subsections.
+ (VC Undo) [ifnottex]: @include vc1-xtra.texi and @lowersections it.
+ (Multi-User Branching) [ifnottex]: @include vc2-xtra.texi.
+
+ * sending.texi (Sending Mail): A @node line without explicit Prev,
+ Next, and Up links.
+
+ * abbrevs.texi (Abbrevs): A @node line without explicit Prev,
+ Next, and Up links.
+
+ * emacs.texi (Top) [ifnottex]: Add menu entries for "Picture Mode"
+ and its sections. @include picture-xtra.texi
+
+ * maintaining.texi (Maintaining) [ifnottex]: Add menu entry for
+ "Emerge".
+ (List Tags) [ifnottex]: @include emerge-xtra.texi.
+
+ * cal-xtra.texi (Daylight Savings): Remove this node: it is an
+ exact duplicate of its name-sake in calendar.texi.
+
+ * calendar.texi (Calendar/Diary) [ifnottex]: Add menu item for
+ "Advanced Calendar/Diary Usage".
+ (Time Intervals) [ifnottex]: @include cal-xtra.texi.
+
+ * dired.texi (Subdirectories in Dired) [ifnottex]: @include
+ dired-xtra.texi.
+ (Dired) [ifnottex]: Add menu entry for "Subdir Switches".
+
+ * files.texi (Reverting) [ifnottex]: @include arevert-xtra.texi.
+ (Files) [ifnottex]: Add menu entry for Autorevert.
+
+ * emacs-xtra.texi (Introduction): Reword to make consistent with
+ printed version only.
+ <Top level>: Remove the body of all chapters and move them to the
+ new *-xtra.texi files. Use @raisesections and @lowersections to
+ convert sections to chapters etc.
+
+ * msdog-xtra.texi:
+ * fortran-xtra.texi:
+ * vc-xtra.texi:
+ * vc1-xtra.texi:
+ * vc2-xtra.texi:
+ * emerge-xtra.texi:
+ * cal-xtra.texi:
+ * dired-xtra.texi:
+ * arevert-xtra.texi: New files, with text from respective chapters
+ of emacs-xtra.texi. Convert each @chapter into @section, @section
+ into @subsection, etc.
+
+ * emacs-xtra.texi (MS-DOS): Renamed from "MS-DOG". All references
+ updated.
+
+ * msdog.texi (Microsoft Windows): Rename from "Emacs and Microsoft
+ Windows". All references updated.
+
+2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * macos.texi (Mac Input): Mention input from Character Palette.
+ (Mac Font Specs): Fix typo.
+
+2006-05-05 Richard Stallman <rms@gnu.org>
+
+ * files.texi (Diff Mode): Minor cleanup.
+
+2006-05-05 Karl Berry <karl@gnu.org>
+
+ * texinfo.tex (\definetextfonsizexi, \definetextfonsizex): new cmds.
+ (\fonttextsize): new user-level command to change text font size.
+ * emacs.texi: call @fonttextsize 10, inside @tex to avoid
+ errors from the current release of makeinfo (4.8).
+ * help.texi (Library Keywords): change widest word in multitable
+ template from `emulations' to `convenience'. (Not sure if this is
+ related to the font change.)
+
+2006-05-05 Eli Zaretskii <eliz@gnu.org>
+
+ * files.texi (File Names): Add a footnote about limited support of
+ ~USER on MS-Windows.
+
+ * cmdargs.texi (Initial Options): Add a footnote about limited
+ support of ~USER on MS-Windows.
+
2006-05-03 Richard Stallman <rms@gnu.org>
* files.texi (Diff Mode): Node moved here.
@@ -23,7 +225,7 @@
* killing.texi (Killing): Say "graphical displays".
* display.texi: Say "graphical displays".
-
+
* cmdargs.texi (Misc X): Say "graphical displays".
2006-05-01 Richard Stallman <rms@gnu.org>
@@ -61,7 +263,7 @@
* pgg.texi (Caching passphrase): Fix markup and typos. Simplify.
-2006-04-26 Sascha Wilde <wilde@sha-bang.de>
+2006-04-26 Sascha Wilde <wilde@sha-bang.de> (tiny change)
* pgg.texi (Caching passphrase): Add pgg-gpg-use-agent.
diff --git a/man/Makefile.in b/man/Makefile.in
index 749252f5492..61f775231ae 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -33,7 +33,7 @@ VPATH=@srcdir@
# The makeinfo program is part of the Texinfo distribution.
# Use --force so that it generates output even if there are errors.
MAKEINFO = makeinfo --force
-INFO_TARGETS = ../info/emacs ../info/emacs-xtra ../info/ccmode ../info/cl \
+INFO_TARGETS = ../info/emacs ../info/ccmode ../info/cl \
../info/dired-x ../info/ediff ../info/forms ../info/gnus \
../info/message ../info/sieve ../info/pgg ../info/emacs-mime \
../info/info ../info/mh-e ../info/reftex \
@@ -61,6 +61,18 @@ INFOSOURCES = info.texi
TEXI2DVI = texi2dvi
ENVADD = TEXINPUTS="$(srcdir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)"
+EMACS_XTRA=\
+ $(srcdir)/arevert-xtra.texi \
+ $(srcdir)/cal-xtra.texi \
+ $(srcdir)/dired-xtra.texi \
+ $(srcdir)/picture-xtra.texi \
+ $(srcdir)/emerge-xtra.texi \
+ $(srcdir)/vc-xtra.texi \
+ $(srcdir)/vc1-xtra.texi \
+ $(srcdir)/vc2-xtra.texi \
+ $(srcdir)/fortran-xtra.texi \
+ $(srcdir)/msdog-xtra.texi
+
EMACSSOURCES= \
${srcdir}/emacs.texi \
${srcdir}/doclicense.texi \
@@ -104,7 +116,8 @@ EMACSSOURCES= \
${srcdir}/gnu.texi \
${srcdir}/glossary.texi \
${srcdir}/ack.texi \
- ${srcdir}/kmacro.texi
+ ${srcdir}/kmacro.texi \
+ $(EMACS_XTRA)
info: $(top_srcdir)/info $(INFO_TARGETS)
@@ -131,7 +144,7 @@ info.dvi: ${INFOSOURCES}
../info/emacs: ${EMACSSOURCES}
cd $(srcdir); $(MAKEINFO) emacs.texi
-emacs.dvi: ${EMACSSOURCES}
+emacs.dvi: ${EMACSSOURCES} $(srcdir)/xresmini.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
# This target is here so you could easily get the list of the *.texi
@@ -176,9 +189,7 @@ dired-x.dvi: dired-x.texi
ediff.dvi: ediff.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
-../info/emacs-xtra: emacs-xtra.texi
- cd $(srcdir); $(MAKEINFO) emacs-xtra.texi
-emacs-xtra.dvi: emacs-xtra.texi
+emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi
../info/forms: forms.texi
diff --git a/man/abbrevs.texi b/man/abbrevs.texi
index 14b6bdbb9f2..31d9b933661 100644
--- a/man/abbrevs.texi
+++ b/man/abbrevs.texi
@@ -2,7 +2,7 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
@c 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Abbrevs, Sending Mail, Maintaining, Top
+@node Abbrevs
@chapter Abbrevs
@cindex abbrevs
@cindex expansion (of abbrevs)
@@ -63,7 +63,7 @@ all major modes. The same abbrev can have a global definition and various
mode-specific definitions for different major modes. A mode-specific
definition for the current major mode overrides a global definition.
- Yu can define abbrevs interactively during the editing session. You
+ You can define abbrevs interactively during the editing session. You
can also save lists of abbrev definitions in files for use in later
sessions. Some users keep extensive lists of abbrevs that they load
in every session.
diff --git a/man/arevert-xtra.texi b/man/arevert-xtra.texi
new file mode 100644
index 00000000000..8a207cc63cf
--- /dev/null
+++ b/man/arevert-xtra.texi
@@ -0,0 +1,191 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node Autorevert
+@section Auto Reverting non-file Buffers
+
+Normally Global Auto Revert Mode only reverts file buffers. There are
+two ways to auto-revert certain non-file buffers: enabling Auto Revert
+Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting
+@code{global-auto-revert-non-file-buffers} to @code{t}. The latter
+enables Auto Reverting for all types of buffers for which it is
+implemented, that is, for the types of buffers listed in the menu
+below.
+
+Like file buffers, non-file buffers should normally not revert while
+you are working on them, or while they contain information that might
+get lost after reverting. Therefore, they do not revert if they are
+``modified''. This can get tricky, because deciding when a non-file
+buffer should be marked modified is usually more difficult than for
+file buffers.
+
+Another tricky detail is that, for efficiency reasons, Auto Revert
+often does not try to detect all possible changes in the buffer, only
+changes that are ``major'' or easy to detect. Hence, enabling
+auto-reverting for a non-file buffer does not always guarantee that
+all information in the buffer is up to date and does not necessarily
+make manual reverts useless.
+
+At the other extreme, certain buffers automatically auto-revert every
+@code{auto-revert-interval} seconds. (This currently only applies to
+the Buffer Menu.) In this case, Auto Revert does not print any
+messages while reverting, even when @code{auto-revert-verbose} is
+non-@code{nil}.
+
+The details depend on the particular types of buffers and are
+explained in the corresponding sections.
+
+@menu
+* Auto Reverting the Buffer Menu::
+* Auto Reverting Dired::
+* Supporting additional buffers::
+@end menu
+
+@node Auto Reverting the Buffer Menu
+@subsection Auto Reverting the Buffer Menu
+
+If auto-reverting of non-file buffers is enabled, the Buffer Menu
+automatically reverts every @code{auto-revert-interval} seconds,
+whether there is a need for it or not. (It would probably take longer
+to check whether there is a need than to actually revert.)
+
+If the Buffer Menu inappropriately gets marked modified, just revert
+it manually using @kbd{g} and auto-reverting will resume. However, if
+you marked certain buffers to get deleted or to be displayed, you have
+to be careful, because reverting erases all marks. The fact that
+adding marks sets the buffer's modified flag prevents Auto Revert from
+automatically erasing the marks.
+
+@node Auto Reverting Dired
+@subsection Auto Reverting Dired buffers
+
+Auto-reverting Dired buffers currently works on GNU or Unix style
+operating systems. It may not work satisfactorily on some other
+systems.
+
+Dired buffers only auto-revert when the file list of the buffer's main
+directory changes. They do not auto-revert when information about a
+particular file changes or when inserted subdirectories change. To be
+sure that @emph{all} listed information is up to date, you have to
+manually revert using @kbd{g}, @emph{even} if auto-reverting is
+enabled in the Dired buffer. Sometimes, you might get the impression
+that modifying or saving files listed in the main directory actually
+does cause auto-reverting. This is because making changes to a file,
+or saving it, very often causes changes in the directory itself, for
+instance, through backup files or auto-save files. However, this is
+not guaranteed.
+
+If the Dired buffer is marked modified and there are no changes you
+want to protect, then most of the time you can make auto-reverting
+resume by manually reverting the buffer using @kbd{g}. There is one
+exception. If you flag or mark files, you can safely revert the
+buffer. This will not erase the flags or marks (unless the marked
+file has been deleted, of course). However, the buffer will stay
+modified, even after reverting, and auto-reverting will not resume.
+This is because, if you flag or mark files, you may be working on the
+buffer and you might not want the buffer to change without warning.
+If you want auto-reverting to resume in the presence of marks and
+flags, mark the buffer non-modified using @kbd{M-~}. However, adding,
+deleting or changing marks or flags will mark it modified again.
+
+Remote Dired buffers are not auto-reverted. Neither are Dired buffers
+for which you used shell wildcards or file arguments to list only some
+of the files. @samp{*Find*} and @samp{*Locate*} buffers do not
+auto-revert either.
+
+@node Supporting additional buffers
+@subsection Adding Support for Auto-Reverting additional Buffers.
+
+This section is intended for Elisp programmers who would like to add
+support for auto-reverting new types of buffers.
+
+To support auto-reverting the buffer must first of all have a
+@code{revert-buffer-function}. @xref{Definition of
+revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
+
+In addition, it @emph{must} have a @code{buffer-stale-function}.
+
+@defvar buffer-stale-function
+The value of this variable is a function to check whether a non-file
+buffer needs reverting. This should be a function with one optional
+argument @var{noconfirm}. The function should return non-@code{nil}
+if the buffer should be reverted. The buffer is current when this
+function is called.
+
+While this function is mainly intended for use in auto-reverting, it
+could be used for other purposes as well. For instance, if
+auto-reverting is not enabled, it could be used to warn the user that
+the buffer needs reverting. The idea behind the @var{noconfirm}
+argument is that it should be @code{t} if the buffer is going to be
+reverted without asking the user and @code{nil} if the function is
+just going to be used to warn the user that the buffer is out of date.
+In particular, for use in auto-reverting, @var{noconfirm} is @code{t}.
+If the function is only going to be used for auto-reverting, you can
+ignore the @var{noconfirm} argument.
+
+If you just want to automatically auto-revert every
+@code{auto-revert-interval} seconds, use:
+
+@example
+(set (make-local-variable 'buffer-stale-function)
+ #'(lambda (&optional noconfirm) 'fast))
+@end example
+
+@noindent
+in the buffer's mode function.
+
+The special return value @samp{fast} tells the caller that the need
+for reverting was not checked, but that reverting the buffer is fast.
+It also tells Auto Revert not to print any revert messages, even if
+@code{auto-revert-verbose} is non-@code{nil}. This is important, as
+getting revert messages every @code{auto-revert-interval} seconds can
+be very annoying. The information provided by this return value could
+also be useful if the function is consulted for purposes other than
+auto-reverting.
+@end defvar
+
+Once the buffer has a @code{revert-buffer-function} and a
+@code{buffer-stale-function}, several problems usually remain.
+
+The buffer will only auto-revert if it is marked unmodified. Hence,
+you will have to make sure that various functions mark the buffer
+modified if and only if either the buffer contains information that
+might be lost by reverting or there is reason to believe that the user
+might be inconvenienced by auto-reverting, because he is actively
+working on the buffer. The user can always override this by manually
+adjusting the modified status of the buffer. To support this, calling
+the @code{revert-buffer-function} on a buffer that is marked
+unmodified should always keep the buffer marked unmodified.
+
+It is important to assure that point does not continuously jump around
+as a consequence of auto-reverting. Of course, moving point might be
+inevitable if the buffer radically changes.
+
+You should make sure that the @code{revert-buffer-function} does not
+print messages that unnecessarily duplicate Auto Revert's own messages
+if @code{auto-revert-verbose} is @code{t} and effectively override a
+@code{nil} value for @code{auto-revert-verbose}. Hence, adapting a
+mode for auto-reverting often involves getting rid of such messages.
+This is especially important for buffers that automatically
+auto-revert every @code{auto-revert-interval} seconds.
+
+Also, you may want to update the documentation string of
+@code{global-auto-revert-non-file-buffers}.
+
+@ifinfo
+Finally, you should add a node to this chapter's menu. This node
+@end ifinfo
+@ifnotinfo
+Finally, you should add a section to this chapter. This section
+@end ifnotinfo
+should at the very least make clear whether enabling auto-reverting
+for the buffer reliably assures that all information in the buffer is
+completely up to date (or will be after @code{auto-revert-interval}
+seconds).
+
+@ignore
+ arch-tag: 2983e613-a272-45f6-9593-3010ad7f865e
+@end ignore
diff --git a/man/buffers.texi b/man/buffers.texi
index 3b3afc2eb92..548a9c9cb2c 100644
--- a/man/buffers.texi
+++ b/man/buffers.texi
@@ -480,7 +480,13 @@ every @code{auto-revert-interval} seconds if you enable Auto Revert
mode in this buffer, as long as it is not marked modified. Global
Auto Revert mode applies to the @samp{*Buffer List*} buffer only if
@code{global-auto-revert-non-file-buffers} is non-@code{nil}.
-@inforef{Autorevert,, emacs-xtra}, for details.
+@iftex
+@xref{Autorevert,,, emacs-xtra, Specialized Emacs Features}, for details.
+@end iftex
+@ifnottex
+@xref{Autorevert, global-auto-revert-non-file-buffers}, for details.
+@end ifnottex
+
The command @code{buffer-menu-other-window} works the same as
@code{buffer-menu}, except that it displays the buffers list in
diff --git a/man/building.texi b/man/building.texi
index 0cbaa5d1826..8feebe3bd99 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -381,7 +381,7 @@ the @code{find-grep-dired} command, in @ref{Dired and Find}.
(recursive grep) are more user-friendly versions of @code{grep} and
@code{grep-find}, which prompt separately for the regular expression
to match, the files to search, and the base directory for the search
-(rgrep only). Case sensitivitivy of the search is controlled by the
+(rgrep only). Case sensitivity of the search is controlled by the
current value of @code{case-fold-search}.
These commands build the shell commands based on the variables
diff --git a/man/cal-xtra.texi b/man/cal-xtra.texi
new file mode 100644
index 00000000000..3214474533e
--- /dev/null
+++ b/man/cal-xtra.texi
@@ -0,0 +1,838 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+
+@c Moved here from the Emacs Lisp Reference Manual, 2005-03-26.
+@node Advanced Calendar/Diary Usage
+@section Customizing the Calendar and Diary
+
+ There are many customizations that you can use to make the calendar and
+diary suit your personal tastes.
+
+@menu
+* Calendar Customizing:: Defaults you can set.
+* Holiday Customizing:: Defining your own holidays.
+* Date Display Format:: Changing the format.
+* Time Display Format:: Changing the format.
+* Diary Customizing:: Defaults you can set.
+* Hebrew/Islamic Entries:: How to obtain them.
+* Fancy Diary Display:: Enhancing the diary display, sorting entries,
+ using included diary files.
+* Sexp Diary Entries:: Fancy things you can do.
+@end menu
+
+@node Calendar Customizing
+@subsection Customizing the Calendar
+@vindex calendar-holiday-marker
+@vindex diary-entry-marker
+ The variable @code{calendar-holiday-marker} specifies how to mark a
+date as being a holiday. Its value may be a single-character string
+to insert next to the date, or a face name to use for displaying the
+date. Likewise, the variable @code{diary-entry-marker} specifies how
+to mark a date that has diary entries. The calendar creates faces
+named @code{holiday-face} and @code{diary-face} for these purposes;
+those symbols are the default values of these variables.
+
+@vindex calendar-load-hook
+ The variable @code{calendar-load-hook} is a normal hook run when the
+calendar package is first loaded (before actually starting to display
+the calendar).
+
+@vindex initial-calendar-window-hook
+ Starting the calendar runs the normal hook
+@code{initial-calendar-window-hook}. Recomputation of the calendar
+display does not run this hook. But if you leave the calendar with the
+@kbd{q} command and reenter it, the hook runs again.@refill
+
+@vindex today-visible-calendar-hook
+ The variable @code{today-visible-calendar-hook} is a normal hook run
+after the calendar buffer has been prepared with the calendar when the
+current date is visible in the window. One use of this hook is to
+replace today's date with asterisks; to do that, use the hook function
+@code{calendar-star-date}.
+
+@findex calendar-star-date
+@example
+(add-hook 'today-visible-calendar-hook 'calendar-star-date)
+@end example
+
+@noindent
+Another standard hook function marks the current date, either by
+changing its face or by adding an asterisk. Here's how to use it:
+
+@findex calendar-mark-today
+@example
+(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
+@end example
+
+@noindent
+@vindex calendar-today-marker
+The variable @code{calendar-today-marker} specifies how to mark
+today's date. Its value should be a single-character string to insert
+next to the date or a face name to use for displaying the date. A
+face named @code{calendar-today-face} is provided for this purpose;
+that symbol is the default for this variable.
+
+@vindex today-invisible-calendar-hook
+@noindent
+ A similar normal hook, @code{today-invisible-calendar-hook} is run if
+the current date is @emph{not} visible in the window.
+
+@vindex calendar-move-hook
+ Each of the calendar cursor motion commands runs the hook
+@code{calendar-move-hook} after it moves the cursor.
+
+@node Holiday Customizing
+@subsection Customizing the Holidays
+
+@vindex calendar-holidays
+@vindex christian-holidays
+@vindex hebrew-holidays
+@vindex islamic-holidays
+ Emacs knows about holidays defined by entries on one of several lists.
+You can customize these lists of holidays to your own needs, adding or
+deleting holidays. The lists of holidays that Emacs uses are for
+general holidays (@code{general-holidays}), local holidays
+(@code{local-holidays}), Christian holidays (@code{christian-holidays}),
+Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim)
+holidays (@code{islamic-holidays}), and other holidays
+(@code{other-holidays}).
+
+@vindex general-holidays
+ The general holidays are, by default, holidays common throughout the
+United States. To eliminate these holidays, set @code{general-holidays}
+to @code{nil}.
+
+@vindex local-holidays
+ There are no default local holidays (but sites may supply some). You
+can set the variable @code{local-holidays} to any list of holidays, as
+described below.
+
+@vindex all-christian-calendar-holidays
+@vindex all-hebrew-calendar-holidays
+@vindex all-islamic-calendar-holidays
+ By default, Emacs does not include all the holidays of the religions
+that it knows, only those commonly found in secular calendars. For a
+more extensive collection of religious holidays, you can set any (or
+all) of the variables @code{all-christian-calendar-holidays},
+@code{all-hebrew-calendar-holidays}, or
+@code{all-islamic-calendar-holidays} to @code{t}. If you want to
+eliminate the religious holidays, set any or all of the corresponding
+variables @code{christian-holidays}, @code{hebrew-holidays}, and
+@code{islamic-holidays} to @code{nil}.@refill
+
+@vindex other-holidays
+ You can set the variable @code{other-holidays} to any list of
+holidays. This list, normally empty, is intended for individual use.
+
+@cindex holiday forms
+ Each of the lists (@code{general-holidays}, @code{local-holidays},
+@code{christian-holidays}, @code{hebrew-holidays},
+@code{islamic-holidays}, and @code{other-holidays}) is a list of
+@dfn{holiday forms}, each holiday form describing a holiday (or
+sometimes a list of holidays).
+
+ Here is a table of the possible kinds of holiday form. Day numbers
+and month numbers count starting from 1, but ``dayname'' numbers
+count Sunday as 0. The element @var{string} is always the
+name of the holiday, as a string.
+
+@table @code
+@item (holiday-fixed @var{month} @var{day} @var{string})
+A fixed date on the Gregorian calendar.
+
+@item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
+The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
+(@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
+from the end of the month.
+
+@item (holiday-hebrew @var{month} @var{day} @var{string})
+A fixed date on the Hebrew calendar.
+
+@item (holiday-islamic @var{month} @var{day} @var{string})
+A fixed date on the Islamic calendar.
+
+@item (holiday-julian @var{month} @var{day} @var{string})
+A fixed date on the Julian calendar.
+
+@item (holiday-sexp @var{sexp} @var{string})
+A date calculated by the Lisp expression @var{sexp}. The expression
+should use the variable @code{year} to compute and return the date of a
+holiday, or @code{nil} if the holiday doesn't happen this year. The
+value of @var{sexp} must represent the date as a list of the form
+@code{(@var{month} @var{day} @var{year})}.
+
+@item (if @var{condition} @var{holiday-form})
+A holiday that happens only if @var{condition} is true.
+
+@item (@var{function} @r{[}@var{args}@r{]})
+A list of dates calculated by the function @var{function}, called with
+arguments @var{args}.
+@end table
+
+ For example, suppose you want to add Bastille Day, celebrated in
+France on July 14. You can do this as follows:
+
+@smallexample
+(setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
+@end smallexample
+
+@noindent
+The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
+fourteenth day of the seventh month (July).
+
+ Many holidays occur on a specific day of the week, at a specific time
+of month. Here is a holiday form describing Hurricane Supplication Day,
+celebrated in the Virgin Islands on the fourth Monday in August:
+
+@smallexample
+(holiday-float 8 1 4 "Hurricane Supplication Day")
+@end smallexample
+
+@noindent
+Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
+Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
+the month (1 specifies the first occurrence, 2 the second occurrence,
+@minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
+so on).
+
+ You can specify holidays that occur on fixed days of the Hebrew,
+Islamic, and Julian calendars too. For example,
+
+@smallexample
+(setq other-holidays
+ '((holiday-hebrew 10 2 "Last day of Hanukkah")
+ (holiday-islamic 3 12 "Mohammed's Birthday")
+ (holiday-julian 4 2 "Jefferson's Birthday")))
+@end smallexample
+
+@noindent
+adds the last day of Hanukkah (since the Hebrew months are numbered with
+1 starting from Nisan), the Islamic feast celebrating Mohammed's
+birthday (since the Islamic months are numbered from 1 starting with
+Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
+Julian calendar.
+
+ To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
+@code{holiday-sexp} form. For example, American presidential elections
+occur on the first Tuesday after the first Monday in November of years
+divisible by 4:
+
+@smallexample
+(holiday-sexp '(if (= 0 (% year 4))
+ (calendar-gregorian-from-absolute
+ (1+ (calendar-dayname-on-or-before
+ 1 (+ 6 (calendar-absolute-from-gregorian
+ (list 11 1 year)))))))
+ "US Presidential Election")
+@end smallexample
+
+@noindent
+or
+
+@smallexample
+(if (= 0 (% displayed-year 4))
+ (fixed 11
+ (extract-calendar-day
+ (calendar-gregorian-from-absolute
+ (1+ (calendar-dayname-on-or-before
+ 1 (+ 6 (calendar-absolute-from-gregorian
+ (list 11 1 displayed-year)))))))
+ "US Presidential Election"))
+@end smallexample
+
+ Some holidays just don't fit into any of these forms because special
+calculations are involved in their determination. In such cases you
+must write a Lisp function to do the calculation. To include eclipses,
+for example, add @code{(eclipses)} to @code{other-holidays}
+and write an Emacs Lisp function @code{eclipses} that returns a
+(possibly empty) list of the relevant Gregorian dates among the range
+visible in the calendar window, with descriptive strings, like this:
+
+@smallexample
+(((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
+@end smallexample
+
+@node Date Display Format
+@subsection Date Display Format
+@vindex calendar-date-display-form
+
+ You can customize the manner of displaying dates in the diary, in mode
+lines, and in messages by setting @code{calendar-date-display-form}.
+This variable holds a list of expressions that can involve the variables
+@code{month}, @code{day}, and @code{year}, which are all numbers in
+string form, and @code{monthname} and @code{dayname}, which are both
+alphabetic strings. In the American style, the default value of this
+list is as follows:
+
+@smallexample
+((if dayname (concat dayname ", ")) monthname " " day ", " year)
+@end smallexample
+
+@noindent
+while in the European style this value is the default:
+
+@smallexample
+((if dayname (concat dayname ", ")) day " " monthname " " year)
+@end smallexample
+
+@noindent
+The ISO standard date representation is this:
+
+@smallexample
+(year "-" month "-" day)
+@end smallexample
+
+@noindent
+This specifies a typical American format:
+
+@smallexample
+(month "/" day "/" (substring year -2))
+@end smallexample
+
+@node Time Display Format
+@subsection Time Display Format
+@vindex calendar-time-display-form
+
+ The calendar and diary by default display times of day in the
+conventional American style with the hours from 1 through 12, minutes,
+and either @samp{am} or @samp{pm}. If you prefer the European style,
+also known in the US as military, in which the hours go from 00 to 23,
+you can alter the variable @code{calendar-time-display-form}. This
+variable is a list of expressions that can involve the variables
+@code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
+numbers in string form, and @code{am-pm} and @code{time-zone}, which are
+both alphabetic strings. The default value of
+@code{calendar-time-display-form} is as follows:
+
+@smallexample
+(12-hours ":" minutes am-pm
+ (if time-zone " (") time-zone (if time-zone ")"))
+@end smallexample
+
+@noindent
+Here is a value that provides European style times:
+
+@smallexample
+(24-hours ":" minutes
+ (if time-zone " (") time-zone (if time-zone ")"))
+@end smallexample
+
+@node Diary Customizing
+@subsection Customizing the Diary
+
+@vindex holidays-in-diary-buffer
+ Ordinarily, the mode line of the diary buffer window indicates any
+holidays that fall on the date of the diary entries. The process of
+checking for holidays can take several seconds, so including holiday
+information delays the display of the diary buffer noticeably. If you'd
+prefer to have a faster display of the diary buffer but without the
+holiday information, set the variable @code{holidays-in-diary-buffer} to
+@code{nil}.@refill
+
+@vindex number-of-diary-entries
+ The variable @code{number-of-diary-entries} controls the number of
+days of diary entries to be displayed at one time. It affects the
+initial display when @code{view-diary-entries-initially} is @code{t}, as
+well as the command @kbd{M-x diary}. For example, the default value is
+1, which says to display only the current day's diary entries. If the
+value is 2, both the current day's and the next day's entries are
+displayed. The value can also be a vector of seven elements: for
+example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
+appear on Sunday, the current date's and the next day's diary entries
+appear Monday through Thursday, Friday through Monday's entries appear
+on Friday, while on Saturday only that day's entries appear.
+
+@vindex print-diary-entries-hook
+@findex print-diary-entries
+ The variable @code{print-diary-entries-hook} is a normal hook run
+after preparation of a temporary buffer containing just the diary
+entries currently visible in the diary buffer. (The other, irrelevant
+diary entries are really absent from the temporary buffer; in the diary
+buffer, they are merely hidden.) The default value of this hook does
+the printing with the command @code{lpr-buffer}. If you want to use a
+different command to do the printing, just change the value of this
+hook. Other uses might include, for example, rearranging the lines into
+order by day and time.
+
+@vindex diary-date-forms
+ You can customize the form of dates in your diary file, if neither the
+standard American nor European styles suits your needs, by setting the
+variable @code{diary-date-forms}. This variable is a list of patterns
+for recognizing a date. Each date pattern is a list whose elements may
+be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs
+Lisp Reference Manual}) or the symbols @code{month}, @code{day},
+@code{year}, @code{monthname}, and @code{dayname}. All these elements
+serve as patterns that match certain kinds of text in the diary file.
+In order for the date pattern, as a whole, to match, all of its elements
+must match consecutively.
+
+ A regular expression in a date pattern matches in its usual fashion,
+using the standard syntax table altered so that @samp{*} is a word
+constituent.
+
+ The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
+and @code{dayname} match the month number, day number, year number,
+month name, and day name of the date being considered. The symbols that
+match numbers allow leading zeros; those that match names allow
+three-letter abbreviations and capitalization. All the symbols can
+match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
+month'', and so on, it should match regardless of the date being
+considered.
+
+ The default value of @code{diary-date-forms} in the American style is
+this:
+
+@example
+((month "/" day "[^/0-9]")
+ (month "/" day "/" year "[^0-9]")
+ (monthname " *" day "[^,0-9]")
+ (monthname " *" day ", *" year "[^0-9]")
+ (dayname "\\W"))
+@end example
+
+ The date patterns in the list must be @emph{mutually exclusive} and
+must not match any portion of the diary entry itself, just the date and
+one character of whitespace. If, to be mutually exclusive, the pattern
+must match a portion of the diary entry text---beyond the whitespace
+that ends the date---then the first element of the date pattern
+@emph{must} be @code{backup}. This causes the date recognizer to back
+up to the beginning of the current word of the diary entry, after
+finishing the match. Even if you use @code{backup}, the date pattern
+must absolutely not match more than a portion of the first word of the
+diary entry. The default value of @code{diary-date-forms} in the
+European style is this list:
+
+@example
+((day "/" month "[^/0-9]")
+ (day "/" month "/" year "[^0-9]")
+ (backup day " *" monthname "\\W+\\<[^*0-9]")
+ (day " *" monthname " *" year "[^0-9]")
+ (dayname "\\W"))
+@end example
+
+@noindent
+Notice the use of @code{backup} in the third pattern, because it needs
+to match part of a word beyond the date itself to distinguish it from
+the fourth pattern.
+
+@node Hebrew/Islamic Entries
+@subsection Hebrew- and Islamic-Date Diary Entries
+
+ Your diary file can have entries based on Hebrew or Islamic dates, as
+well as entries based on the world-standard Gregorian calendar.
+However, because recognition of such entries is time-consuming and most
+people don't use them, you must explicitly enable their use. If you
+want the diary to recognize Hebrew-date diary entries, for example,
+you must do this:
+
+@vindex nongregorian-diary-listing-hook
+@vindex nongregorian-diary-marking-hook
+@findex list-hebrew-diary-entries
+@findex mark-hebrew-diary-entries
+@smallexample
+(add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
+(add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
+@end smallexample
+
+@noindent
+If you want Islamic-date entries, do this:
+
+@findex list-islamic-diary-entries
+@findex mark-islamic-diary-entries
+@smallexample
+(add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
+(add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
+@end smallexample
+
+ Hebrew- and Islamic-date diary entries have the same formats as
+Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
+date and @samp{I} precedes an Islamic date. Moreover, because the
+Hebrew and Islamic month names are not uniquely specified by the first
+three letters, you may not abbreviate them. For example, a diary entry
+for the Hebrew date Heshvan 25 could look like this:
+
+@smallexample
+HHeshvan 25 Happy Hebrew birthday!
+@end smallexample
+
+@noindent
+and would appear in the diary for any date that corresponds to Heshvan 25
+on the Hebrew calendar. And here is an Islamic-date diary entry that matches
+Dhu al-Qada 25:
+
+@smallexample
+IDhu al-Qada 25 Happy Islamic birthday!
+@end smallexample
+
+ As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
+are nonmarking if they are preceded with an ampersand (@samp{&}).
+
+ Here is a table of commands used in the calendar to create diary entries
+that match the selected date and other dates that are similar in the Hebrew
+or Islamic calendar:
+
+@table @kbd
+@item i h d
+Add a diary entry for the Hebrew date corresponding to the selected date
+(@code{insert-hebrew-diary-entry}).
+@item i h m
+Add a diary entry for the day of the Hebrew month corresponding to the
+selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
+entry matches any date that has the same Hebrew day-within-month as the
+selected date.
+@item i h y
+Add a diary entry for the day of the Hebrew year corresponding to the
+selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
+entry matches any date which has the same Hebrew month and day-within-month
+as the selected date.
+@item i i d
+Add a diary entry for the Islamic date corresponding to the selected date
+(@code{insert-islamic-diary-entry}).
+@item i i m
+Add a diary entry for the day of the Islamic month corresponding to the
+selected date (@code{insert-monthly-islamic-diary-entry}).
+@item i i y
+Add a diary entry for the day of the Islamic year corresponding to the
+selected date (@code{insert-yearly-islamic-diary-entry}).
+@end table
+
+@findex insert-hebrew-diary-entry
+@findex insert-monthly-hebrew-diary-entry
+@findex insert-yearly-hebrew-diary-entry
+@findex insert-islamic-diary-entry
+@findex insert-monthly-islamic-diary-entry
+@findex insert-yearly-islamic-diary-entry
+ These commands work much like the corresponding commands for ordinary
+diary entries: they apply to the date that point is on in the calendar
+window, and what they do is insert just the date portion of a diary entry
+at the end of your diary file. You must then insert the rest of the
+diary entry.
+
+@node Fancy Diary Display
+@subsection Fancy Diary Display
+@vindex diary-display-hook
+@findex simple-diary-display
+
+ Diary display works by preparing the diary buffer and then running the
+hook @code{diary-display-hook}. The default value of this hook
+(@code{simple-diary-display}) hides the irrelevant diary entries and
+then displays the buffer. However, if you specify the hook as follows,
+
+@cindex diary buffer
+@findex fancy-diary-display
+@example
+(add-hook 'diary-display-hook 'fancy-diary-display)
+@end example
+
+@noindent
+this enables fancy diary display. It displays diary entries and
+holidays by copying them into a special buffer that exists only for the
+sake of display. Copying to a separate buffer provides an opportunity
+to change the displayed text to make it prettier---for example, to sort
+the entries by the dates they apply to.
+
+ As with simple diary display, you can print a hard copy of the buffer
+with @code{print-diary-entries}. To print a hard copy of a day-by-day
+diary for a week, position point on Sunday of that week, type
+@kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the
+inclusion of the holidays slows down the display slightly; you can speed
+things up by setting the variable @code{holidays-in-diary-buffer} to
+@code{nil}.
+
+@vindex diary-list-include-blanks
+ Ordinarily, the fancy diary buffer does not show days for which there are
+no diary entries, even if that day is a holiday. If you want such days to be
+shown in the fancy diary buffer, set the variable
+@code{diary-list-include-blanks} to @code{t}.@refill
+
+@cindex sorting diary entries
+ If you use the fancy diary display, you can use the normal hook
+@code{list-diary-entries-hook} to sort each day's diary entries by their
+time of day. Here's how:
+
+@findex sort-diary-entries
+@example
+(add-hook 'list-diary-entries-hook 'sort-diary-entries t)
+@end example
+
+@noindent
+For each day, this sorts diary entries that begin with a recognizable
+time of day according to their times. Diary entries without times come
+first within each day.
+
+ Fancy diary display also has the ability to process included diary
+files. This permits a group of people to share a diary file for events
+that apply to all of them. Lines in the diary file of this form:
+
+@smallexample
+#include "@var{filename}"
+@end smallexample
+
+@noindent
+includes the diary entries from the file @var{filename} in the fancy
+diary buffer. The include mechanism is recursive, so that included files
+can include other files, and so on; you must be careful not to have a
+cycle of inclusions, of course. Here is how to enable the include
+facility:
+
+@vindex list-diary-entries-hook
+@vindex mark-diary-entries-hook
+@findex include-other-diary-files
+@findex mark-included-diary-files
+@smallexample
+(add-hook 'list-diary-entries-hook 'include-other-diary-files)
+(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
+@end smallexample
+
+The include mechanism works only with the fancy diary display, because
+ordinary diary display shows the entries directly from your diary file.
+
+@node Sexp Diary Entries
+@subsection Sexp Entries and the Fancy Diary Display
+@cindex sexp diary entries
+
+ Sexp diary entries allow you to do more than just have complicated
+conditions under which a diary entry applies. If you use the fancy
+diary display, sexp entries can generate the text of the entry depending
+on the date itself. For example, an anniversary diary entry can insert
+the number of years since the anniversary date into the text of the
+diary entry. Thus the @samp{%d} in this dairy entry:
+
+@findex diary-anniversary
+@smallexample
+%%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
+@end smallexample
+
+@noindent
+gets replaced by the age, so on October 31, 1990 the entry appears in
+the fancy diary buffer like this:
+
+@smallexample
+Arthur's birthday (42 years old)
+@end smallexample
+
+@noindent
+If the diary file instead contains this entry:
+
+@smallexample
+%%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
+@end smallexample
+
+@noindent
+the entry in the fancy diary buffer for October 31, 1990 appears like this:
+
+@smallexample
+Arthur's 42nd birthday
+@end smallexample
+
+ Similarly, cyclic diary entries can interpolate the number of repetitions
+that have occurred:
+
+@findex diary-cyclic
+@smallexample
+%%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
+@end smallexample
+
+@noindent
+looks like this:
+
+@smallexample
+Renew medication (5th time)
+@end smallexample
+
+@noindent
+in the fancy diary display on September 8, 1990.
+
+ There is an early reminder diary sexp that includes its entry in the
+diary not only on the date of occurrence, but also on earlier dates.
+For example, if you want a reminder a week before your anniversary, you
+can use
+
+@findex diary-remind
+@smallexample
+%%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary
+@end smallexample
+
+@noindent
+and the fancy diary will show
+@smallexample
+Ed's anniversary
+@end smallexample
+@noindent
+both on December 15 and on December 22.
+
+@findex diary-date
+ The function @code{diary-date} applies to dates described by a month,
+day, year combination, each of which can be an integer, a list of
+integers, or @code{t}. The value @code{t} means all values. For
+example,
+
+@smallexample
+%%(diary-date '(10 11 12) 22 t) Rake leaves
+@end smallexample
+
+@noindent
+causes the fancy diary to show
+
+@smallexample
+Rake leaves
+@end smallexample
+
+@noindent
+on October 22, November 22, and December 22 of every year.
+
+@findex diary-float
+ The function @code{diary-float} allows you to describe diary entries
+that apply to dates like the third Friday of November, or the last
+Tuesday in April. The parameters are the @var{month}, @var{dayname},
+and an index @var{n}. The entry appears on the @var{n}th @var{dayname}
+of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and
+so on. If @var{n} is negative it counts backward from the end of
+@var{month}. The value of @var{month} can be a list of months, a single
+month, or @code{t} to specify all months. You can also use an optional
+parameter @var{day} to specify the @var{n}th @var{dayname} of
+@var{month} on or after/before @var{day}; the value of @var{day} defaults
+to 1 if @var{n} is positive and to the last day of @var{month} if
+@var{n} is negative. For example,
+
+@smallexample
+%%(diary-float t 1 -1) Pay rent
+@end smallexample
+
+@noindent
+causes the fancy diary to show
+
+@smallexample
+Pay rent
+@end smallexample
+
+@noindent
+on the last Monday of every month.
+
+ The generality of sexp diary entries lets you specify any diary
+entry that you can describe algorithmically. A sexp diary entry
+contains an expression that computes whether the entry applies to any
+given date. If its value is non-@code{nil}, the entry applies to that
+date; otherwise, it does not. The expression can use the variable
+@code{date} to find the date being considered; its value is a list
+(@var{month} @var{day} @var{year}) that refers to the Gregorian
+calendar.
+
+ The sexp diary entry applies to a date when the expression's value
+is non-@code{nil}, but some values have more specific meanings. If
+the value is a string, that string is a description of the event which
+occurs on that date. The value can also have the form
+@code{(@var{mark} . @var{string})}; then @var{mark} specifies how to
+mark the date in the calendar, and @var{string} is the description of
+the event. If @var{mark} is a single-character string, that character
+appears next to the date in the calendar. If @var{mark} is a face
+name, the date is displayed in that face. If @var{mark} is
+@code{nil}, that specifies no particular highlighting for the date.
+
+ Suppose you get paid on the 21st of the month if it is a weekday, and
+on the Friday before if the 21st is on a weekend. Here is how to write
+a sexp diary entry that matches those dates:
+
+@smallexample
+&%%(let ((dayname (calendar-day-of-week date))
+ (day (car (cdr date))))
+ (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
+ (and (memq day '(19 20)) (= dayname 5)))
+ ) Pay check deposited
+@end smallexample
+
+ The following sexp diary entries take advantage of the ability (in the fancy
+diary display) to concoct diary entries whose text varies based on the date:
+
+@findex diary-sunrise-sunset
+@findex diary-phases-of-moon
+@findex diary-day-of-year
+@findex diary-iso-date
+@findex diary-julian-date
+@findex diary-astro-day-number
+@findex diary-hebrew-date
+@findex diary-islamic-date
+@findex diary-french-date
+@findex diary-mayan-date
+@table @code
+@item %%(diary-sunrise-sunset)
+Make a diary entry for the local times of today's sunrise and sunset.
+@item %%(diary-phases-of-moon)
+Make a diary entry for the phases (quarters) of the moon.
+@item %%(diary-day-of-year)
+Make a diary entry with today's day number in the current year and the number
+of days remaining in the current year.
+@item %%(diary-iso-date)
+Make a diary entry with today's equivalent ISO commercial date.
+@item %%(diary-julian-date)
+Make a diary entry with today's equivalent date on the Julian calendar.
+@item %%(diary-astro-day-number)
+Make a diary entry with today's equivalent astronomical (Julian) day number.
+@item %%(diary-hebrew-date)
+Make a diary entry with today's equivalent date on the Hebrew calendar.
+@item %%(diary-islamic-date)
+Make a diary entry with today's equivalent date on the Islamic calendar.
+@item %%(diary-french-date)
+Make a diary entry with today's equivalent date on the French Revolutionary
+calendar.
+@item %%(diary-mayan-date)
+Make a diary entry with today's equivalent date on the Mayan calendar.
+@end table
+
+@noindent
+Thus including the diary entry
+
+@example
+&%%(diary-hebrew-date)
+@end example
+
+@noindent
+causes every day's diary display to contain the equivalent date on the
+Hebrew calendar, if you are using the fancy diary display. (With simple
+diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
+diary for any date, but does nothing particularly useful.)
+
+ These functions can be used to construct sexp diary entries based on
+the Hebrew calendar in certain standard ways:
+
+@cindex rosh hodesh
+@findex diary-rosh-hodesh
+@cindex parasha, weekly
+@findex diary-parasha
+@cindex candle lighting times
+@findex diary-sabbath-candles
+@cindex omer count
+@findex diary-omer
+@cindex yahrzeits
+@findex diary-yahrzeit
+@table @code
+@item %%(diary-rosh-hodesh)
+Make a diary entry that tells the occurrence and ritual announcement of each
+new Hebrew month.
+@item %%(diary-parasha)
+Make a Saturday diary entry that tells the weekly synagogue scripture reading.
+@item %%(diary-sabbath-candles)
+Make a Friday diary entry that tells the @emph{local time} of Sabbath
+candle lighting.
+@item %%(diary-omer)
+Make a diary entry that gives the omer count, when appropriate.
+@item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
+Make a diary entry marking the anniversary of a date of death. The date
+is the @emph{Gregorian} (civil) date of death. The diary entry appears
+on the proper Hebrew calendar anniversary and on the day before. (In
+the European style, the order of the parameters is changed to @var{day},
+@var{month}, @var{year}.)
+@end table
+
+ All the functions documented above take an optional argument
+@var{mark} which specifies how to mark the date in the calendar display.
+If one of these functions decides that it applies to a certain date,
+it returns a value that contains @var{mark}.
+
+@ignore
+ arch-tag: 52cb299f-fd1f-4616-bfe6-91b988669431
+@end ignore
diff --git a/man/calendar.texi b/man/calendar.texi
index b48b1d547de..cbe1cbc8a6e 100644
--- a/man/calendar.texi
+++ b/man/calendar.texi
@@ -24,9 +24,11 @@ particular date; @kbd{Mouse-3} brings up a menu of commonly used
calendar features that are independent of any particular date. To exit
the calendar, type @kbd{q}.
+@iftex
This chapter describes the basic calendar features.
-@inforef{Advanced Calendar/Diary Usage,, emacs-xtra}, for information
-about more specialized features.
+@xref{Advanced Calendar/Diary Usage,,, emacs-xtra, Specialized Emacs
+Features}, for information about more specialized features.
+@end iftex
@menu
* Calendar Motion:: Moving through the calendar; selecting a date.
@@ -43,6 +45,9 @@ about more specialized features.
* Importing Diary:: Converting diary events to/from other formats.
* Daylight Savings:: How to specify when daylight savings time is active.
* Time Intervals:: Keeping track of time intervals.
+@ifnottex
+* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
+@end ifnottex
@end menu
@node Calendar Motion
@@ -444,14 +449,20 @@ window.
To view the distribution of holidays for all the dates shown in the
calendar, use the @kbd{x} command. This displays the dates that are
holidays in a different face (or places a @samp{*} after these dates, if
-display with multiple faces is not available). @inforef{Calendar
-Customizing, calendar-holiday-marker, emacs-xtra}. The command applies
-both to the currently visible months and to other months that
-subsequently become visible by scrolling. To turn marking off and erase
-the current marks, type @kbd{u}, which also erases any diary marks
-(@pxref{Diary}). If the variable @code{mark-holidays-in-calendar} is
-non-@code{nil}, creating or updating the calendar marks holidays
-automatically.
+display with multiple faces is not available).
+@iftex
+@xref{Calendar Customizing, calendar-holiday-marker,, emacs-xtra,
+Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{Calendar Customizing, calendar-holiday-marker}.
+@end ifnottex
+ The command applies both to the currently visible months and to
+other months that subsequently become visible by scrolling. To turn
+marking off and erase the current marks, type @kbd{u}, which also
+erases any diary marks (@pxref{Diary}). If the variable
+@code{mark-holidays-in-calendar} is non-@code{nil}, creating or
+updating the calendar marks holidays automatically.
@kindex a @r{(Calendar mode)}
@findex list-calendar-holidays
@@ -1029,14 +1040,20 @@ current date is visible).
To get a broader view of which days are mentioned in the diary, use
the @kbd{m} command. This displays the dates that have diary entries in
a different face (or places a @samp{+} after these dates, if display
-with multiple faces is not available). @inforef{Calendar Customizing,
-diary-entry-marker, emacs-xtra}. The command applies both to the
-currently visible months and to other months that subsequently become
-visible by scrolling. To turn marking off and erase the current marks,
-type @kbd{u}, which also turns off holiday marks (@pxref{Holidays}).
-If the variable @code{mark-diary-entries-in-calendar} is
-non-@code{nil}, creating or updating the calendar marks diary dates
-automatically.
+with multiple faces is not available).
+@iftex
+@xref{Calendar Customizing, diary-entry-marker,, emacs-xtra,
+Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{Calendar Customizing, diary-entry-marker}.
+@end ifnottex
+ The command applies both to the currently visible months and to
+other months that subsequently become visible by scrolling. To turn
+marking off and erase the current marks, type @kbd{u}, which also
+turns off holiday marks (@pxref{Holidays}). If the variable
+@code{mark-diary-entries-in-calendar} is non-@code{nil}, creating or
+updating the calendar marks diary dates automatically.
@kindex s @r{(Calendar mode)}
@findex show-all-diary-entries
@@ -1055,7 +1072,13 @@ can customize it like @code{lpr-region} (@pxref{Printing}).
The command @kbd{M-x diary} displays the diary entries for the current
date, independently of the calendar display, and optionally for the next
few days as well; the variable @code{number-of-diary-entries} specifies
-how many days to include. @inforef{Diary Customizing,, emacs-xtra}.
+how many days to include.
+@iftex
+@xref{Diary Customizing,,, emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{Diary Customizing, number-of-diary-entries}.
+@end ifnottex
If you put @code{(diary)} in your @file{.emacs} file, this
automatically displays a window with the day's diary entries, when you
@@ -1360,7 +1383,12 @@ entry applies to all months of the year.@refill
specifying the name of a face or a single-character string to use when
marking the entry in the calendar. Most generally, sexp diary entries
can perform arbitrary computations to determine when they apply.
-@inforef{Sexp Diary Entries,, emacs-xtra}.
+@iftex
+@xref{Sexp Diary Entries,,, emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@inforef{Sexp Diary Entries}.
+@end ifnottex
@node Appointments
@section Appointments
@@ -1479,8 +1507,14 @@ and adds the results to an Emacs diary file. For example:
@noindent
You can use an @code{#include} directive to add the import file contents
-to the main diary file, if these are different files. @inforef{Fancy Diary
-Display,, emacs-xtra}.
+to the main diary file, if these are different files.
+@iftex
+@xref{Fancy Diary Display,,, emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{Fancy Diary Display}.
+@end ifnottex
+
@findex icalendar-export-file, icalendar-export-region
Use @code{icalendar-export-file} to interactively export an entire
@@ -1608,6 +1642,10 @@ you change the value of any of timeclock's customizable variables, you
should run the command @kbd{M-x timeclock-reread-log} to update the
data in Emacs from the file.
+@ifnottex
+@include cal-xtra.texi
+@end ifnottex
+
@ignore
arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92
@end ignore
diff --git a/man/cmdargs.texi b/man/cmdargs.texi
index a674473c91e..9689782decb 100644
--- a/man/cmdargs.texi
+++ b/man/cmdargs.texi
@@ -293,7 +293,8 @@ Do not reload any saved desktop. @xref{Saving Emacs Sessions}.
@opindex --user
@cindex load init file of another user
Load @var{user}'s Emacs init file @file{~@var{user}/.emacs} instead of
-your own.
+your own@footnote{
+This option has no effect on MS-Windows.}.
@item --debug-init
@opindex --debug-init
diff --git a/man/custom.texi b/man/custom.texi
index 35c9222628c..78a51716031 100644
--- a/man/custom.texi
+++ b/man/custom.texi
@@ -1977,11 +1977,12 @@ usual to do so.
@subsection Disabling Commands
@cindex disabled command
- Disabling a command menas it requires confirmation before it can be
-executed. The purpose of disabling a command is to prevent users from
-executing it by accident and being confused.
+ Disabling a command means that invoking it interactively asks for
+confirmation from the user. The purpose of disabling a command is to
+prevent users from executing it by accident; we do this for commands
+that might be confusing to the uninitiated.
- An attempt to invoke a disabled command interactively in Emacs
+ Attempting to invoke a disabled command interactively in Emacs
displays a window containing the command's name, its documentation,
and some instructions on what to do immediately; then Emacs asks for
input saying whether to execute the command as requested, enable it
@@ -2021,8 +2022,8 @@ because Emacs has not read your init file.
Whether a command is disabled is independent of what key is used to
invoke it; disabling also applies if the command is invoked using
-@kbd{M-x}. Disabling a command has no effect on calling it as a
-function from Lisp programs.
+@kbd{M-x}. However, disabling a command has no effect on calling it
+as a function from Lisp programs.
@node Syntax
@section The Syntax Table
diff --git a/man/dired-xtra.texi b/man/dired-xtra.texi
new file mode 100644
index 00000000000..01d6963c582
--- /dev/null
+++ b/man/dired-xtra.texi
@@ -0,0 +1,49 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node Subdir Switches
+@section Subdirectory Switches in Dired
+
+You can insert subdirectories with specified @code{ls} switches in
+Dired buffers, using @kbd{C-u i}. You can change the @code{ls}
+switches of an already inserted subdirectory using @kbd{C-u l}.
+
+In Emacs versions 22.1 and later, Dired remembers the switches, so
+that reverting the buffer will not change them back to the main
+directory's switches. Deleting a subdirectory forgets about its
+switches.
+
+Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
+to reinsert or delete subdirectories, that were inserted with explicit
+switches, can bypass Dired's machinery for remembering (or forgetting)
+switches. Deleting a subdirectory using @code{dired-undo} does not
+forget its switches. When later reinserted using @kbd{i}, it will be
+reinserted using its old switches. Using @code{dired-undo} to
+reinsert a subdirectory that was deleted using the regular
+Dired commands (not @code{dired-undo}) will originally insert it with
+its old switches. However, reverting the buffer will relist it using
+the buffer's default switches. If any of this yields problems, you
+can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
+
+Dired does not remember the @code{R} switch. Inserting a subdirectory
+with switches that include the @code{R} switch is equivalent with
+inserting each of its subdirectories using all remaining switches.
+For instance, updating or killing a subdirectory that was inserted
+with the @code{R} switch will not update or kill its subdirectories.
+
+The buffer's default switches do not affect subdirectories that were
+inserted using explicitly specified switches. In particular,
+commands such as @kbd{s}, that change the buffer's switches do not
+affect such subdirectories. (They do affect subdirectories without
+explicitly assigned switches, however.)
+
+You can make Dired forget about all subdirectory switches and relist
+all subdirectories with the buffer's default switches using
+@kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer.
+
+@ignore
+ arch-tag: e3865701-9179-4ffb-bc34-d321111c688d
+@end ignore
diff --git a/man/dired.texi b/man/dired.texi
index 5face67a7b3..1e3582bebb0 100644
--- a/man/dired.texi
+++ b/man/dired.texi
@@ -36,6 +36,9 @@ on all of them with on command.
* Transforming File Names:: Using patterns to rename multiple files.
* Comparison in Dired:: Running `diff' by way of Dired.
* Subdirectories in Dired:: Adding subdirectories to the Dired buffer.
+@ifnottex
+* Subdir Switches:: Subdirectory switches in Dired.
+@end ifnottex
* Subdirectory Motion:: Moving across subdirectories, and up and down.
* Hiding Subdirectories:: Making subdirectories visible or invisible.
* Updating: Dired Updating. Discarding lines for files of no interest.
@@ -906,6 +909,10 @@ Use the @kbd{l} command (@code{dired-do-redisplay}) to update the
subdirectory's contents. Use @kbd{C-u k} on the subdirectory header
line to delete the subdirectory. @xref{Dired Updating}.
+@ifnottex
+@include dired-xtra.texi
+@end ifnottex
+
@node Subdirectory Motion
@section Moving Over Subdirectories
@@ -1198,7 +1205,7 @@ not appear in the other directory is ``different''. You can specify
more stringent comparisons by entering a Lisp expression, which can
refer to the variables @code{size1} and @code{size2}, the respective
file sizes; @code{mtime1} and @code{mtime2}, the last modification
-times in seconds, as floating point numers; and @code{fa1} and
+times in seconds, as floating point numbers; and @code{fa1} and
@code{fa2}, the respective file attribute lists (as returned by the
function @code{file-attributes}). This expression is evaluated for
each pair of like-named files, and if the expression's value is
diff --git a/man/display.texi b/man/display.texi
index 3f6fd58b125..eaf2ab212bc 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -1127,7 +1127,7 @@ fringe when positioned on that newline.
@vindex indicate-buffer-boundaries
On a graphical display, Emacs can indicate the buffer boundaries in
-the fringes. It inddicates the first line and the last line with
+the fringes. It indicates the first line and the last line with
angle images in the fringes. This can be combined with up and down
arrow images which say whether it is possible to scroll the window up
and down.
diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi
index d6b1ca42583..65625522298 100644
--- a/man/emacs-xtra.texi
+++ b/man/emacs-xtra.texi
@@ -55,18 +55,19 @@ license to the document, as described in section 6 of the license.
@end ifnottex
@menu
-* Introduction:: What documentation belongs here?
-* Autorevert:: Auto Reverting non-file buffers.
-* Subdir Switches:: Subdirectory switches in Dired.
-* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
-* Emerge:: A convenient way of merging two versions
- of a program.
-* Picture Mode:: Editing pictures made up of characters
- using the quarter-plane screen model.
+* Introduction:: What documentation belongs here?
+@iftex
+* Picture Mode:: Editing pictures made up of characters using
+ the quarter-plane screen model.
-* Advanced VC Usage:: Advanced VC (version control) features.
-* Fortran:: Fortran mode and its special features.
-* MS-DOG::
+* Autorevert:: Auto Reverting non-file buffers.
+* Subdir Switches:: Subdirectory switches in Dired.
+* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
+* Emerge:: A convenient way of merging two versions of a program.
+* Advanced VC Usage:: Advanced VC (version control) features.
+* Fortran:: Fortran mode and its special features.
+* MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
+@end iftex
* Index::
@end menu
@@ -74,3772 +75,44 @@ license to the document, as described in section 6 of the license.
@unnumbered Introduction
This manual contains detailed information about various features that
-are too specialized to be included in the Emacs manual. It is
+are too specialized to be included in the printed Emacs manual. It is
intended to be readable by anyone having a basic knowledge of Emacs.
However, certain sections may be intended for a more specialized
audience, such as Elisp authors. This should be clearly pointed out
at the beginning of these sections.
-This manual is intended as a complement, rather than an alternative,
-to other ways to gain a more detailed knowledge of Emacs than the
-Emacs manual can provide, such as browsing packages using @kbd{C-h p},
-accessing mode documentation using @kbd{C-h m} and browsing user
-options using Custom. Also, certain packages, or collections of
-related features, have their own manuals. The present manual is
-mainly intended to be a collection of smaller specialized features,
-too small to get their own manual.
+Certain packages, or collections of related features, have their own
+manuals, separate from the main Emacs User's manual. This manual is
+intended as a complement, rather than an alternative, to reading those
+additional manuals; in a nutshell, it is a collection of smaller
+specialized features, too small or too obscure to justify their own
+manual.
Sections intended specifically for Elisp programmers can follow the
style of the Elisp manual. Other sections should follow the style of
the Emacs manual.
-@node Autorevert
-@chapter Auto Reverting non-file Buffers
-
-Normally Global Auto Revert Mode only reverts file buffers. There are
-two ways to auto-revert certain non-file buffers: enabling Auto Revert
-Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting
-@code{global-auto-revert-non-file-buffers} to @code{t}. The latter
-enables Auto Reverting for all types of buffers for which it is
-implemented, that is, for the types of buffers listed in the menu
-below.
-
-Like file buffers, non-file buffers should normally not revert while
-you are working on them, or while they contain information that might
-get lost after reverting. Therefore, they do not revert if they are
-``modified''. This can get tricky, because deciding when a non-file
-buffer should be marked modified is usually more difficult than for
-file buffers.
-
-Another tricky detail is that, for efficiency reasons, Auto Revert
-often does not try to detect all possible changes in the buffer, only
-changes that are ``major'' or easy to detect. Hence, enabling
-auto-reverting for a non-file buffer does not always guarantee that
-all information in the buffer is up to date and does not necessarily
-make manual reverts useless.
-
-At the other extreme, certain buffers automatically auto-revert every
-@code{auto-revert-interval} seconds. (This currently only applies to
-the Buffer Menu.) In this case, Auto Revert does not print any
-messages while reverting, even when @code{auto-revert-verbose} is
-non-@code{nil}.
-
-The details depend on the particular types of buffers and are
-explained in the corresponding sections.
-
-@menu
-* Auto Reverting the Buffer Menu::
-* Auto Reverting Dired::
-* Supporting additional buffers::
-@end menu
-
-@node Auto Reverting the Buffer Menu
-@section Auto Reverting the Buffer Menu
-
-If auto-reverting of non-file buffers is enabled, the Buffer Menu
-automatically reverts every @code{auto-revert-interval} seconds,
-whether there is a need for it or not. (It would probably take longer
-to check whether there is a need than to actually revert.)
-
-If the Buffer Menu inappropriately gets marked modified, just revert
-it manually using @kbd{g} and auto-reverting will resume. However, if
-you marked certain buffers to get deleted or to be displayed, you have
-to be careful, because reverting erases all marks. The fact that
-adding marks sets the buffer's modified flag prevents Auto Revert from
-automatically erasing the marks.
-
-@node Auto Reverting Dired
-@section Auto Reverting Dired buffers
-
-Auto-reverting Dired buffers currently works on GNU or Unix style
-operating systems. It may not work satisfactorily on some other
-systems.
-
-Dired buffers only auto-revert when the file list of the buffer's main
-directory changes. They do not auto-revert when information about a
-particular file changes or when inserted subdirectories change. To be
-sure that @emph{all} listed information is up to date, you have to
-manually revert using @kbd{g}, @emph{even} if auto-reverting is
-enabled in the Dired buffer. Sometimes, you might get the impression
-that modifying or saving files listed in the main directory actually
-does cause auto-reverting. This is because making changes to a file,
-or saving it, very often causes changes in the directory itself, for
-instance, through backup files or auto-save files. However, this is
-not guaranteed.
-
-If the Dired buffer is marked modified and there are no changes you
-want to protect, then most of the time you can make auto-reverting
-resume by manually reverting the buffer using @kbd{g}. There is one
-exception. If you flag or mark files, you can safely revert the
-buffer. This will not erase the flags or marks (unless the marked
-file has been deleted, of course). However, the buffer will stay
-modified, even after reverting, and auto-reverting will not resume.
-This is because, if you flag or mark files, you may be working on the
-buffer and you might not want the buffer to change without warning.
-If you want auto-reverting to resume in the presence of marks and
-flags, mark the buffer non-modified using @kbd{M-~}. However, adding,
-deleting or changing marks or flags will mark it modified again.
-
-Remote Dired buffers are not auto-reverted. Neither are Dired buffers
-for which you used shell wildcards or file arguments to list only some
-of the files. @samp{*Find*} and @samp{*Locate*} buffers do not
-auto-revert either.
-
-@node Supporting additional buffers
-@section Adding Support for Auto-Reverting additional Buffers.
-
-This section is intended for Elisp programmers who would like to add
-support for auto-reverting new types of buffers.
-
-To support auto-reverting the buffer must first of all have a
-@code{revert-buffer-function}. @xref{Definition of
-revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
-
-In addition, it @emph{must} have a @code{buffer-stale-function}.
-
-@defvar buffer-stale-function
-The value of this variable is a function to check whether a non-file
-buffer needs reverting. This should be a function with one optional
-argument @var{noconfirm}. The function should return non-@code{nil}
-if the buffer should be reverted. The buffer is current when this
-function is called.
-
-While this function is mainly intended for use in auto-reverting, it
-could be used for other purposes as well. For instance, if
-auto-reverting is not enabled, it could be used to warn the user that
-the buffer needs reverting. The idea behind the @var{noconfirm}
-argument is that it should be @code{t} if the buffer is going to be
-reverted without asking the user and @code{nil} if the function is
-just going to be used to warn the user that the buffer is out of date.
-In particular, for use in auto-reverting, @var{noconfirm} is @code{t}.
-If the function is only going to be used for auto-reverting, you can
-ignore the @var{noconfirm} argument.
-
-If you just want to automatically auto-revert every
-@code{auto-revert-interval} seconds, use:
-
-@example
-(set (make-local-variable 'buffer-stale-function)
- #'(lambda (&optional noconfirm) 'fast))
-@end example
-
-@noindent
-in the buffer's mode function.
-
-The special return value @samp{fast} tells the caller that the need
-for reverting was not checked, but that reverting the buffer is fast.
-It also tells Auto Revert not to print any revert messages, even if
-@code{auto-revert-verbose} is non-@code{nil}. This is important, as
-getting revert messages every @code{auto-revert-interval} seconds can
-be very annoying. The information provided by this return value could
-also be useful if the function is consulted for purposes other than
-auto-reverting.
-@end defvar
-
-Once the buffer has a @code{revert-buffer-function} and a
-@code{buffer-stale-function}, several problems usually remain.
-
-The buffer will only auto-revert if it is marked unmodified. Hence,
-you will have to make sure that various functions mark the buffer
-modified if and only if either the buffer contains information that
-might be lost by reverting or there is reason to believe that the user
-might be inconvenienced by auto-reverting, because he is actively
-working on the buffer. The user can always override this by manually
-adjusting the modified status of the buffer. To support this, calling
-the @code{revert-buffer-function} on a buffer that is marked
-unmodified should always keep the buffer marked unmodified.
-
-It is important to assure that point does not continuously jump around
-as a consequence of auto-reverting. Of course, moving point might be
-inevitable if the buffer radically changes.
-
-You should make sure that the @code{revert-buffer-function} does not
-print messages that unnecessarily duplicate Auto Revert's own messages
-if @code{auto-revert-verbose} is @code{t} and effectively override a
-@code{nil} value for @code{auto-revert-verbose}. Hence, adapting a
-mode for auto-reverting often involves getting rid of such messages.
-This is especially important for buffers that automatically
-auto-revert every @code{auto-revert-interval} seconds.
-
-Also, you may want to update the documentation string of
-@code{global-auto-revert-non-file-buffers}.
-
-@ifinfo
-Finally, you should add a node to this chapter's menu. This node
-@end ifinfo
-@ifnotinfo
-Finally, you should add a section to this chapter. This section
-@end ifnotinfo
-should at the very least make clear whether enabling auto-reverting
-for the buffer reliably assures that all information in the buffer is
-completely up to date (or will be after @code{auto-revert-interval}
-seconds).
-
-@node Subdir Switches
-@chapter Subdirectory Switches in Dired
-
-You can insert subdirectories with specified @code{ls} switches in
-Dired buffers, using @kbd{C-u i}. You can change the @code{ls}
-switches of an already inserted subdirectory using @kbd{C-u l}.
-
-In Emacs versions 22.1 and later, Dired remembers the switches, so
-that reverting the buffer will not change them back to the main
-directory's switches. Deleting a subdirectory forgets about its
-switches.
-
-Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
-to reinsert or delete subdirectories, that were inserted with explicit
-switches, can bypass Dired's machinery for remembering (or forgetting)
-switches. Deleting a subdirectory using @code{dired-undo} does not
-forget its switches. When later reinserted using @kbd{i}, it will be
-reinserted using its old switches. Using @code{dired-undo} to
-reinsert a subdirectory that was deleted using the regular
-Dired commands (not @code{dired-undo}) will originally insert it with
-its old switches. However, reverting the buffer will relist it using
-the buffer's default switches. If any of this yields problems, you
-can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
-
-Dired does not remember the @code{R} switch. Inserting a subdirectory
-with switches that include the @code{R} switch is equivalent with
-inserting each of its subdirectories using all remaining switches.
-For instance, updating or killing a subdirectory that was inserted
-with the @code{R} switch will not update or kill its subdirectories.
-
-The buffer's default switches do not affect subdirectories that were
-inserted using explicitly specified switches. In particular,
-commands such as @kbd{s}, that change the buffer's switches do not
-affect such subdirectories. (They do affect subdirectories without
-explicitly assigned switches, however.)
-
-You can make Dired forget about all subdirectory switches and relist
-all subdirectories with the buffer's default switches using
-@kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer.
-
-
-@c Moved here from the Emacs Lisp Reference Manual, 2005-03-26.
-@node Advanced Calendar/Diary Usage
-@chapter Customizing the Calendar and Diary
-
- There are many customizations that you can use to make the calendar and
-diary suit your personal tastes.
-
-@menu
-* Calendar Customizing:: Defaults you can set.
-* Holiday Customizing:: Defining your own holidays.
-* Date Display Format:: Changing the format.
-* Time Display Format:: Changing the format.
-* Daylight Savings:: Changing the default.
-* Diary Customizing:: Defaults you can set.
-* Hebrew/Islamic Entries:: How to obtain them.
-* Fancy Diary Display:: Enhancing the diary display, sorting entries,
- using included diary files.
-* Sexp Diary Entries:: Fancy things you can do.
-@end menu
-
-@node Calendar Customizing
-@section Customizing the Calendar
-@vindex calendar-holiday-marker
-@vindex diary-entry-marker
- The variable @code{calendar-holiday-marker} specifies how to mark a
-date as being a holiday. Its value may be a single-character string
-to insert next to the date, or a face name to use for displaying the
-date. Likewise, the variable @code{diary-entry-marker} specifies how
-to mark a date that has diary entries. The calendar creates faces
-named @code{holiday-face} and @code{diary-face} for these purposes;
-those symbols are the default values of these variables.
-
-@vindex calendar-load-hook
- The variable @code{calendar-load-hook} is a normal hook run when the
-calendar package is first loaded (before actually starting to display
-the calendar).
-
-@vindex initial-calendar-window-hook
- Starting the calendar runs the normal hook
-@code{initial-calendar-window-hook}. Recomputation of the calendar
-display does not run this hook. But if you leave the calendar with the
-@kbd{q} command and reenter it, the hook runs again.@refill
-
-@vindex today-visible-calendar-hook
- The variable @code{today-visible-calendar-hook} is a normal hook run
-after the calendar buffer has been prepared with the calendar when the
-current date is visible in the window. One use of this hook is to
-replace today's date with asterisks; to do that, use the hook function
-@code{calendar-star-date}.
-
-@findex calendar-star-date
-@example
-(add-hook 'today-visible-calendar-hook 'calendar-star-date)
-@end example
-
-@noindent
-Another standard hook function marks the current date, either by
-changing its face or by adding an asterisk. Here's how to use it:
-
-@findex calendar-mark-today
-@example
-(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
-@end example
-
-@noindent
-@vindex calendar-today-marker
-The variable @code{calendar-today-marker} specifies how to mark
-today's date. Its value should be a single-character string to insert
-next to the date or a face name to use for displaying the date. A
-face named @code{calendar-today-face} is provided for this purpose;
-that symbol is the default for this variable.
-
-@vindex today-invisible-calendar-hook
-@noindent
- A similar normal hook, @code{today-invisible-calendar-hook} is run if
-the current date is @emph{not} visible in the window.
-
-@vindex calendar-move-hook
- Each of the calendar cursor motion commands runs the hook
-@code{calendar-move-hook} after it moves the cursor.
-
-@node Holiday Customizing
-@section Customizing the Holidays
-
-@vindex calendar-holidays
-@vindex christian-holidays
-@vindex hebrew-holidays
-@vindex islamic-holidays
- Emacs knows about holidays defined by entries on one of several lists.
-You can customize these lists of holidays to your own needs, adding or
-deleting holidays. The lists of holidays that Emacs uses are for
-general holidays (@code{general-holidays}), local holidays
-(@code{local-holidays}), Christian holidays (@code{christian-holidays}),
-Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim)
-holidays (@code{islamic-holidays}), and other holidays
-(@code{other-holidays}).
-
-@vindex general-holidays
- The general holidays are, by default, holidays common throughout the
-United States. To eliminate these holidays, set @code{general-holidays}
-to @code{nil}.
-
-@vindex local-holidays
- There are no default local holidays (but sites may supply some). You
-can set the variable @code{local-holidays} to any list of holidays, as
-described below.
-
-@vindex all-christian-calendar-holidays
-@vindex all-hebrew-calendar-holidays
-@vindex all-islamic-calendar-holidays
- By default, Emacs does not include all the holidays of the religions
-that it knows, only those commonly found in secular calendars. For a
-more extensive collection of religious holidays, you can set any (or
-all) of the variables @code{all-christian-calendar-holidays},
-@code{all-hebrew-calendar-holidays}, or
-@code{all-islamic-calendar-holidays} to @code{t}. If you want to
-eliminate the religious holidays, set any or all of the corresponding
-variables @code{christian-holidays}, @code{hebrew-holidays}, and
-@code{islamic-holidays} to @code{nil}.@refill
-
-@vindex other-holidays
- You can set the variable @code{other-holidays} to any list of
-holidays. This list, normally empty, is intended for individual use.
-
-@cindex holiday forms
- Each of the lists (@code{general-holidays}, @code{local-holidays},
-@code{christian-holidays}, @code{hebrew-holidays},
-@code{islamic-holidays}, and @code{other-holidays}) is a list of
-@dfn{holiday forms}, each holiday form describing a holiday (or
-sometimes a list of holidays).
-
- Here is a table of the possible kinds of holiday form. Day numbers
-and month numbers count starting from 1, but ``dayname'' numbers
-count Sunday as 0. The element @var{string} is always the
-name of the holiday, as a string.
-
-@table @code
-@item (holiday-fixed @var{month} @var{day} @var{string})
-A fixed date on the Gregorian calendar.
-
-@item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
-The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
-(@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
-from the end of the month.
-
-@item (holiday-hebrew @var{month} @var{day} @var{string})
-A fixed date on the Hebrew calendar.
-
-@item (holiday-islamic @var{month} @var{day} @var{string})
-A fixed date on the Islamic calendar.
-
-@item (holiday-julian @var{month} @var{day} @var{string})
-A fixed date on the Julian calendar.
-
-@item (holiday-sexp @var{sexp} @var{string})
-A date calculated by the Lisp expression @var{sexp}. The expression
-should use the variable @code{year} to compute and return the date of a
-holiday, or @code{nil} if the holiday doesn't happen this year. The
-value of @var{sexp} must represent the date as a list of the form
-@code{(@var{month} @var{day} @var{year})}.
-
-@item (if @var{condition} @var{holiday-form})
-A holiday that happens only if @var{condition} is true.
-
-@item (@var{function} @r{[}@var{args}@r{]})
-A list of dates calculated by the function @var{function}, called with
-arguments @var{args}.
-@end table
-
- For example, suppose you want to add Bastille Day, celebrated in
-France on July 14. You can do this as follows:
-
-@smallexample
-(setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
-@end smallexample
-
-@noindent
-The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
-fourteenth day of the seventh month (July).
-
- Many holidays occur on a specific day of the week, at a specific time
-of month. Here is a holiday form describing Hurricane Supplication Day,
-celebrated in the Virgin Islands on the fourth Monday in August:
-
-@smallexample
-(holiday-float 8 1 4 "Hurricane Supplication Day")
-@end smallexample
-
-@noindent
-Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
-Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
-the month (1 specifies the first occurrence, 2 the second occurrence,
-@minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
-so on).
-
- You can specify holidays that occur on fixed days of the Hebrew,
-Islamic, and Julian calendars too. For example,
-
-@smallexample
-(setq other-holidays
- '((holiday-hebrew 10 2 "Last day of Hanukkah")
- (holiday-islamic 3 12 "Mohammed's Birthday")
- (holiday-julian 4 2 "Jefferson's Birthday")))
-@end smallexample
-
-@noindent
-adds the last day of Hanukkah (since the Hebrew months are numbered with
-1 starting from Nisan), the Islamic feast celebrating Mohammed's
-birthday (since the Islamic months are numbered from 1 starting with
-Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
-Julian calendar.
-
- To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
-@code{holiday-sexp} form. For example, American presidential elections
-occur on the first Tuesday after the first Monday in November of years
-divisible by 4:
-
-@smallexample
-(holiday-sexp '(if (= 0 (% year 4))
- (calendar-gregorian-from-absolute
- (1+ (calendar-dayname-on-or-before
- 1 (+ 6 (calendar-absolute-from-gregorian
- (list 11 1 year)))))))
- "US Presidential Election")
-@end smallexample
-
-@noindent
-or
-
-@smallexample
-(if (= 0 (% displayed-year 4))
- (fixed 11
- (extract-calendar-day
- (calendar-gregorian-from-absolute
- (1+ (calendar-dayname-on-or-before
- 1 (+ 6 (calendar-absolute-from-gregorian
- (list 11 1 displayed-year)))))))
- "US Presidential Election"))
-@end smallexample
-
- Some holidays just don't fit into any of these forms because special
-calculations are involved in their determination. In such cases you
-must write a Lisp function to do the calculation. To include eclipses,
-for example, add @code{(eclipses)} to @code{other-holidays}
-and write an Emacs Lisp function @code{eclipses} that returns a
-(possibly empty) list of the relevant Gregorian dates among the range
-visible in the calendar window, with descriptive strings, like this:
-
-@smallexample
-(((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
-@end smallexample
-
-@node Date Display Format
-@section Date Display Format
-@vindex calendar-date-display-form
-
- You can customize the manner of displaying dates in the diary, in mode
-lines, and in messages by setting @code{calendar-date-display-form}.
-This variable holds a list of expressions that can involve the variables
-@code{month}, @code{day}, and @code{year}, which are all numbers in
-string form, and @code{monthname} and @code{dayname}, which are both
-alphabetic strings. In the American style, the default value of this
-list is as follows:
-
-@smallexample
-((if dayname (concat dayname ", ")) monthname " " day ", " year)
-@end smallexample
-
-@noindent
-while in the European style this value is the default:
-
-@smallexample
-((if dayname (concat dayname ", ")) day " " monthname " " year)
-@end smallexample
-
-@noindent
-The ISO standard date representation is this:
-
-@smallexample
-(year "-" month "-" day)
-@end smallexample
-
-@noindent
-This specifies a typical American format:
-
-@smallexample
-(month "/" day "/" (substring year -2))
-@end smallexample
-
-@node Time Display Format
-@section Time Display Format
-@vindex calendar-time-display-form
-
- The calendar and diary by default display times of day in the
-conventional American style with the hours from 1 through 12, minutes,
-and either @samp{am} or @samp{pm}. If you prefer the European style,
-also known in the US as military, in which the hours go from 00 to 23,
-you can alter the variable @code{calendar-time-display-form}. This
-variable is a list of expressions that can involve the variables
-@code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
-numbers in string form, and @code{am-pm} and @code{time-zone}, which are
-both alphabetic strings. The default value of
-@code{calendar-time-display-form} is as follows:
-
-@smallexample
-(12-hours ":" minutes am-pm
- (if time-zone " (") time-zone (if time-zone ")"))
-@end smallexample
-
-@noindent
-Here is a value that provides European style times:
-
-@smallexample
-(24-hours ":" minutes
- (if time-zone " (") time-zone (if time-zone ")"))
-@end smallexample
-
-@node Daylight Savings
-@section Daylight Savings Time
-@cindex daylight savings time
-
- Emacs understands the difference between standard time and daylight
-savings time---the times given for sunrise, sunset, solstices,
-equinoxes, and the phases of the moon take that into account. The rules
-for daylight savings time vary from place to place and have also varied
-historically from year to year. To do the job properly, Emacs needs to
-know which rules to use.
-
- Some operating systems keep track of the rules that apply to the place
-where you are; on these systems, Emacs gets the information it needs
-from the system automatically. If some or all of this information is
-missing, Emacs fills in the gaps with the rules currently used in
-Cambridge, Massachusetts, which is the center of GNU's world.
-
-
-@vindex calendar-daylight-savings-starts
-@vindex calendar-daylight-savings-ends
- If the default choice of rules is not appropriate for your location,
-you can tell Emacs the rules to use by setting the variables
-@code{calendar-daylight-savings-starts} and
-@code{calendar-daylight-savings-ends}. Their values should be Lisp
-expressions that refer to the variable @code{year}, and evaluate to the
-Gregorian date on which daylight savings time starts or (respectively)
-ends, in the form of a list @code{(@var{month} @var{day} @var{year})}.
-The values should be @code{nil} if your area does not use daylight
-savings time.
-
- Emacs uses these expressions to determine the start and end dates of
-daylight savings time as holidays and for correcting times of day in the
-solar and lunar calculations.
-
- The values for Cambridge, Massachusetts are as follows:
-
-@example
-@group
-(calendar-nth-named-day 1 0 4 year)
-(calendar-nth-named-day -1 0 10 year)
-@end group
-@end example
-
-@noindent
-i.e., the first 0th day (Sunday) of the fourth month (April) in
-the year specified by @code{year}, and the last Sunday of the tenth month
-(October) of that year. If daylight savings time were
-changed to start on October 1, you would set
-@code{calendar-daylight-savings-starts} to this:
-
-@example
-(list 10 1 year)
-@end example
-
- For a more complex example, suppose daylight savings time begins on
-the first of Nisan on the Hebrew calendar. You should set
-@code{calendar-daylight-savings-starts} to this value:
-
-@example
-(calendar-gregorian-from-absolute
- (calendar-absolute-from-hebrew
- (list 1 1 (+ year 3760))))
-@end example
-
-@noindent
-because Nisan is the first month in the Hebrew calendar and the Hebrew
-year differs from the Gregorian year by 3760 at Nisan.
-
- If there is no daylight savings time at your location, or if you want
-all times in standard time, set @code{calendar-daylight-savings-starts}
-and @code{calendar-daylight-savings-ends} to @code{nil}.
-
-@vindex calendar-daylight-time-offset
- The variable @code{calendar-daylight-time-offset} specifies the
-difference between daylight savings time and standard time, measured in
-minutes. The value for Cambridge is 60.
-
-@vindex calendar-daylight-savings-starts-time
-@vindex calendar-daylight-savings-ends-time
- The variable @code{calendar-daylight-savings-starts-time} and the
-variable @code{calendar-daylight-savings-ends-time} specify the number
-of minutes after midnight local time when the transition to and from
-daylight savings time should occur. For Cambridge, both variables'
-values are 120.
-
-@node Diary Customizing
-@section Customizing the Diary
-
-@vindex holidays-in-diary-buffer
- Ordinarily, the mode line of the diary buffer window indicates any
-holidays that fall on the date of the diary entries. The process of
-checking for holidays can take several seconds, so including holiday
-information delays the display of the diary buffer noticeably. If you'd
-prefer to have a faster display of the diary buffer but without the
-holiday information, set the variable @code{holidays-in-diary-buffer} to
-@code{nil}.@refill
-
-@vindex number-of-diary-entries
- The variable @code{number-of-diary-entries} controls the number of
-days of diary entries to be displayed at one time. It affects the
-initial display when @code{view-diary-entries-initially} is @code{t}, as
-well as the command @kbd{M-x diary}. For example, the default value is
-1, which says to display only the current day's diary entries. If the
-value is 2, both the current day's and the next day's entries are
-displayed. The value can also be a vector of seven elements: for
-example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
-appear on Sunday, the current date's and the next day's diary entries
-appear Monday through Thursday, Friday through Monday's entries appear
-on Friday, while on Saturday only that day's entries appear.
-
-@vindex print-diary-entries-hook
-@findex print-diary-entries
- The variable @code{print-diary-entries-hook} is a normal hook run
-after preparation of a temporary buffer containing just the diary
-entries currently visible in the diary buffer. (The other, irrelevant
-diary entries are really absent from the temporary buffer; in the diary
-buffer, they are merely hidden.) The default value of this hook does
-the printing with the command @code{lpr-buffer}. If you want to use a
-different command to do the printing, just change the value of this
-hook. Other uses might include, for example, rearranging the lines into
-order by day and time.
-
-@vindex diary-date-forms
- You can customize the form of dates in your diary file, if neither the
-standard American nor European styles suits your needs, by setting the
-variable @code{diary-date-forms}. This variable is a list of patterns
-for recognizing a date. Each date pattern is a list whose elements may
-be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs
-Lisp Reference Manual}) or the symbols @code{month}, @code{day},
-@code{year}, @code{monthname}, and @code{dayname}. All these elements
-serve as patterns that match certain kinds of text in the diary file.
-In order for the date pattern, as a whole, to match, all of its elements
-must match consecutively.
-
- A regular expression in a date pattern matches in its usual fashion,
-using the standard syntax table altered so that @samp{*} is a word
-constituent.
-
- The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
-and @code{dayname} match the month number, day number, year number,
-month name, and day name of the date being considered. The symbols that
-match numbers allow leading zeros; those that match names allow
-three-letter abbreviations and capitalization. All the symbols can
-match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
-month'', and so on, it should match regardless of the date being
-considered.
-
- The default value of @code{diary-date-forms} in the American style is
-this:
-
-@example
-((month "/" day "[^/0-9]")
- (month "/" day "/" year "[^0-9]")
- (monthname " *" day "[^,0-9]")
- (monthname " *" day ", *" year "[^0-9]")
- (dayname "\\W"))
-@end example
-
- The date patterns in the list must be @emph{mutually exclusive} and
-must not match any portion of the diary entry itself, just the date and
-one character of whitespace. If, to be mutually exclusive, the pattern
-must match a portion of the diary entry text---beyond the whitespace
-that ends the date---then the first element of the date pattern
-@emph{must} be @code{backup}. This causes the date recognizer to back
-up to the beginning of the current word of the diary entry, after
-finishing the match. Even if you use @code{backup}, the date pattern
-must absolutely not match more than a portion of the first word of the
-diary entry. The default value of @code{diary-date-forms} in the
-European style is this list:
-
-@example
-((day "/" month "[^/0-9]")
- (day "/" month "/" year "[^0-9]")
- (backup day " *" monthname "\\W+\\<[^*0-9]")
- (day " *" monthname " *" year "[^0-9]")
- (dayname "\\W"))
-@end example
-
-@noindent
-Notice the use of @code{backup} in the third pattern, because it needs
-to match part of a word beyond the date itself to distinguish it from
-the fourth pattern.
-
-@node Hebrew/Islamic Entries
-@section Hebrew- and Islamic-Date Diary Entries
-
- Your diary file can have entries based on Hebrew or Islamic dates, as
-well as entries based on the world-standard Gregorian calendar.
-However, because recognition of such entries is time-consuming and most
-people don't use them, you must explicitly enable their use. If you
-want the diary to recognize Hebrew-date diary entries, for example,
-you must do this:
-
-@vindex nongregorian-diary-listing-hook
-@vindex nongregorian-diary-marking-hook
-@findex list-hebrew-diary-entries
-@findex mark-hebrew-diary-entries
-@smallexample
-(add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
-(add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
-@end smallexample
-
-@noindent
-If you want Islamic-date entries, do this:
-
-@findex list-islamic-diary-entries
-@findex mark-islamic-diary-entries
-@smallexample
-(add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
-(add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
-@end smallexample
-
- Hebrew- and Islamic-date diary entries have the same formats as
-Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
-date and @samp{I} precedes an Islamic date. Moreover, because the
-Hebrew and Islamic month names are not uniquely specified by the first
-three letters, you may not abbreviate them. For example, a diary entry
-for the Hebrew date Heshvan 25 could look like this:
-
-@smallexample
-HHeshvan 25 Happy Hebrew birthday!
-@end smallexample
-
-@noindent
-and would appear in the diary for any date that corresponds to Heshvan 25
-on the Hebrew calendar. And here is an Islamic-date diary entry that matches
-Dhu al-Qada 25:
-
-@smallexample
-IDhu al-Qada 25 Happy Islamic birthday!
-@end smallexample
-
- As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
-are nonmarking if they are preceded with an ampersand (@samp{&}).
-
- Here is a table of commands used in the calendar to create diary entries
-that match the selected date and other dates that are similar in the Hebrew
-or Islamic calendar:
-
-@table @kbd
-@item i h d
-Add a diary entry for the Hebrew date corresponding to the selected date
-(@code{insert-hebrew-diary-entry}).
-@item i h m
-Add a diary entry for the day of the Hebrew month corresponding to the
-selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
-entry matches any date that has the same Hebrew day-within-month as the
-selected date.
-@item i h y
-Add a diary entry for the day of the Hebrew year corresponding to the
-selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
-entry matches any date which has the same Hebrew month and day-within-month
-as the selected date.
-@item i i d
-Add a diary entry for the Islamic date corresponding to the selected date
-(@code{insert-islamic-diary-entry}).
-@item i i m
-Add a diary entry for the day of the Islamic month corresponding to the
-selected date (@code{insert-monthly-islamic-diary-entry}).
-@item i i y
-Add a diary entry for the day of the Islamic year corresponding to the
-selected date (@code{insert-yearly-islamic-diary-entry}).
-@end table
-
-@findex insert-hebrew-diary-entry
-@findex insert-monthly-hebrew-diary-entry
-@findex insert-yearly-hebrew-diary-entry
-@findex insert-islamic-diary-entry
-@findex insert-monthly-islamic-diary-entry
-@findex insert-yearly-islamic-diary-entry
- These commands work much like the corresponding commands for ordinary
-diary entries: they apply to the date that point is on in the calendar
-window, and what they do is insert just the date portion of a diary entry
-at the end of your diary file. You must then insert the rest of the
-diary entry.
-
-@node Fancy Diary Display
-@section Fancy Diary Display
-@vindex diary-display-hook
-@findex simple-diary-display
-
- Diary display works by preparing the diary buffer and then running the
-hook @code{diary-display-hook}. The default value of this hook
-(@code{simple-diary-display}) hides the irrelevant diary entries and
-then displays the buffer. However, if you specify the hook as follows,
-
-@cindex diary buffer
-@findex fancy-diary-display
-@example
-(add-hook 'diary-display-hook 'fancy-diary-display)
-@end example
-
-@noindent
-this enables fancy diary display. It displays diary entries and
-holidays by copying them into a special buffer that exists only for the
-sake of display. Copying to a separate buffer provides an opportunity
-to change the displayed text to make it prettier---for example, to sort
-the entries by the dates they apply to.
-
- As with simple diary display, you can print a hard copy of the buffer
-with @code{print-diary-entries}. To print a hard copy of a day-by-day
-diary for a week, position point on Sunday of that week, type
-@kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the
-inclusion of the holidays slows down the display slightly; you can speed
-things up by setting the variable @code{holidays-in-diary-buffer} to
-@code{nil}.
-
-@vindex diary-list-include-blanks
- Ordinarily, the fancy diary buffer does not show days for which there are
-no diary entries, even if that day is a holiday. If you want such days to be
-shown in the fancy diary buffer, set the variable
-@code{diary-list-include-blanks} to @code{t}.@refill
-
-@cindex sorting diary entries
- If you use the fancy diary display, you can use the normal hook
-@code{list-diary-entries-hook} to sort each day's diary entries by their
-time of day. Here's how:
-
-@findex sort-diary-entries
-@example
-(add-hook 'list-diary-entries-hook 'sort-diary-entries t)
-@end example
-
-@noindent
-For each day, this sorts diary entries that begin with a recognizable
-time of day according to their times. Diary entries without times come
-first within each day.
-
- Fancy diary display also has the ability to process included diary
-files. This permits a group of people to share a diary file for events
-that apply to all of them. Lines in the diary file of this form:
-
-@smallexample
-#include "@var{filename}"
-@end smallexample
-
-@noindent
-includes the diary entries from the file @var{filename} in the fancy
-diary buffer. The include mechanism is recursive, so that included files
-can include other files, and so on; you must be careful not to have a
-cycle of inclusions, of course. Here is how to enable the include
-facility:
-
-@vindex list-diary-entries-hook
-@vindex mark-diary-entries-hook
-@findex include-other-diary-files
-@findex mark-included-diary-files
-@smallexample
-(add-hook 'list-diary-entries-hook 'include-other-diary-files)
-(add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
-@end smallexample
-
-The include mechanism works only with the fancy diary display, because
-ordinary diary display shows the entries directly from your diary file.
-
-@node Sexp Diary Entries
-@section Sexp Entries and the Fancy Diary Display
-@cindex sexp diary entries
-
- Sexp diary entries allow you to do more than just have complicated
-conditions under which a diary entry applies. If you use the fancy
-diary display, sexp entries can generate the text of the entry depending
-on the date itself. For example, an anniversary diary entry can insert
-the number of years since the anniversary date into the text of the
-diary entry. Thus the @samp{%d} in this dairy entry:
-
-@findex diary-anniversary
-@smallexample
-%%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
-@end smallexample
-
-@noindent
-gets replaced by the age, so on October 31, 1990 the entry appears in
-the fancy diary buffer like this:
-
-@smallexample
-Arthur's birthday (42 years old)
-@end smallexample
-
-@noindent
-If the diary file instead contains this entry:
-
-@smallexample
-%%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
-@end smallexample
-
-@noindent
-the entry in the fancy diary buffer for October 31, 1990 appears like this:
-
-@smallexample
-Arthur's 42nd birthday
-@end smallexample
-
- Similarly, cyclic diary entries can interpolate the number of repetitions
-that have occurred:
-
-@findex diary-cyclic
-@smallexample
-%%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
-@end smallexample
-
-@noindent
-looks like this:
-
-@smallexample
-Renew medication (5th time)
-@end smallexample
-
-@noindent
-in the fancy diary display on September 8, 1990.
-
- There is an early reminder diary sexp that includes its entry in the
-diary not only on the date of occurrence, but also on earlier dates.
-For example, if you want a reminder a week before your anniversary, you
-can use
-
-@findex diary-remind
-@smallexample
-%%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary
-@end smallexample
-
-@noindent
-and the fancy diary will show
-@smallexample
-Ed's anniversary
-@end smallexample
-@noindent
-both on December 15 and on December 22.
-
-@findex diary-date
- The function @code{diary-date} applies to dates described by a month,
-day, year combination, each of which can be an integer, a list of
-integers, or @code{t}. The value @code{t} means all values. For
-example,
-
-@smallexample
-%%(diary-date '(10 11 12) 22 t) Rake leaves
-@end smallexample
-
-@noindent
-causes the fancy diary to show
-
-@smallexample
-Rake leaves
-@end smallexample
-
-@noindent
-on October 22, November 22, and December 22 of every year.
-
-@findex diary-float
- The function @code{diary-float} allows you to describe diary entries
-that apply to dates like the third Friday of November, or the last
-Tuesday in April. The parameters are the @var{month}, @var{dayname},
-and an index @var{n}. The entry appears on the @var{n}th @var{dayname}
-of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and
-so on. If @var{n} is negative it counts backward from the end of
-@var{month}. The value of @var{month} can be a list of months, a single
-month, or @code{t} to specify all months. You can also use an optional
-parameter @var{day} to specify the @var{n}th @var{dayname} of
-@var{month} on or after/before @var{day}; the value of @var{day} defaults
-to 1 if @var{n} is positive and to the last day of @var{month} if
-@var{n} is negative. For example,
-
-@smallexample
-%%(diary-float t 1 -1) Pay rent
-@end smallexample
-
-@noindent
-causes the fancy diary to show
-
-@smallexample
-Pay rent
-@end smallexample
-
-@noindent
-on the last Monday of every month.
-
- The generality of sexp diary entries lets you specify any diary
-entry that you can describe algorithmically. A sexp diary entry
-contains an expression that computes whether the entry applies to any
-given date. If its value is non-@code{nil}, the entry applies to that
-date; otherwise, it does not. The expression can use the variable
-@code{date} to find the date being considered; its value is a list
-(@var{month} @var{day} @var{year}) that refers to the Gregorian
-calendar.
-
- The sexp diary entry applies to a date when the expression's value
-is non-@code{nil}, but some values have more specific meanings. If
-the value is a string, that string is a description of the event which
-occurs on that date. The value can also have the form
-@code{(@var{mark} . @var{string})}; then @var{mark} specifies how to
-mark the date in the calendar, and @var{string} is the description of
-the event. If @var{mark} is a single-character string, that character
-appears next to the date in the calendar. If @var{mark} is a face
-name, the date is displayed in that face. If @var{mark} is
-@code{nil}, that specifies no particular highlighting for the date.
-
- Suppose you get paid on the 21st of the month if it is a weekday, and
-on the Friday before if the 21st is on a weekend. Here is how to write
-a sexp diary entry that matches those dates:
-
-@smallexample
-&%%(let ((dayname (calendar-day-of-week date))
- (day (car (cdr date))))
- (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
- (and (memq day '(19 20)) (= dayname 5)))
- ) Pay check deposited
-@end smallexample
-
- The following sexp diary entries take advantage of the ability (in the fancy
-diary display) to concoct diary entries whose text varies based on the date:
-
-@findex diary-sunrise-sunset
-@findex diary-phases-of-moon
-@findex diary-day-of-year
-@findex diary-iso-date
-@findex diary-julian-date
-@findex diary-astro-day-number
-@findex diary-hebrew-date
-@findex diary-islamic-date
-@findex diary-french-date
-@findex diary-mayan-date
-@table @code
-@item %%(diary-sunrise-sunset)
-Make a diary entry for the local times of today's sunrise and sunset.
-@item %%(diary-phases-of-moon)
-Make a diary entry for the phases (quarters) of the moon.
-@item %%(diary-day-of-year)
-Make a diary entry with today's day number in the current year and the number
-of days remaining in the current year.
-@item %%(diary-iso-date)
-Make a diary entry with today's equivalent ISO commercial date.
-@item %%(diary-julian-date)
-Make a diary entry with today's equivalent date on the Julian calendar.
-@item %%(diary-astro-day-number)
-Make a diary entry with today's equivalent astronomical (Julian) day number.
-@item %%(diary-hebrew-date)
-Make a diary entry with today's equivalent date on the Hebrew calendar.
-@item %%(diary-islamic-date)
-Make a diary entry with today's equivalent date on the Islamic calendar.
-@item %%(diary-french-date)
-Make a diary entry with today's equivalent date on the French Revolutionary
-calendar.
-@item %%(diary-mayan-date)
-Make a diary entry with today's equivalent date on the Mayan calendar.
-@end table
-
-@noindent
-Thus including the diary entry
-
-@example
-&%%(diary-hebrew-date)
-@end example
-
-@noindent
-causes every day's diary display to contain the equivalent date on the
-Hebrew calendar, if you are using the fancy diary display. (With simple
-diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
-diary for any date, but does nothing particularly useful.)
-
- These functions can be used to construct sexp diary entries based on
-the Hebrew calendar in certain standard ways:
-
-@cindex rosh hodesh
-@findex diary-rosh-hodesh
-@cindex parasha, weekly
-@findex diary-parasha
-@cindex candle lighting times
-@findex diary-sabbath-candles
-@cindex omer count
-@findex diary-omer
-@cindex yahrzeits
-@findex diary-yahrzeit
-@table @code
-@item %%(diary-rosh-hodesh)
-Make a diary entry that tells the occurrence and ritual announcement of each
-new Hebrew month.
-@item %%(diary-parasha)
-Make a Saturday diary entry that tells the weekly synagogue scripture reading.
-@item %%(diary-sabbath-candles)
-Make a Friday diary entry that tells the @emph{local time} of Sabbath
-candle lighting.
-@item %%(diary-omer)
-Make a diary entry that gives the omer count, when appropriate.
-@item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
-Make a diary entry marking the anniversary of a date of death. The date
-is the @emph{Gregorian} (civil) date of death. The diary entry appears
-on the proper Hebrew calendar anniversary and on the day before. (In
-the European style, the order of the parameters is changed to @var{day},
-@var{month}, @var{year}.)
-@end table
-
- All the functions documented above take an optional argument
-@var{mark} which specifies how to mark the date in the calendar display.
-If one of these functions decides that it applies to a certain date,
-it returns a value that contains @var{mark}.
-
-@node Emerge
-@chapter Merging Files with Emerge
-@cindex Emerge
-@cindex merging files
-
- It's not unusual for programmers to get their signals crossed and
-modify the same program in two different directions. To recover from
-this confusion, you need to merge the two versions. Emerge makes this
-easier. For other ways to compare files, see @ref{Comparing Files,,,
-emacs, the Emacs Manual} and @ref{Top, Ediff,, ediff, The Ediff
-Manual}.
-
-@menu
-* Overview of Emerge:: How to start Emerge. Basic concepts.
-* Submodes of Emerge:: Fast mode vs. Edit mode.
- Skip Prefers mode and Auto Advance mode.
-* State of Difference:: You do the merge by specifying state A or B
- for each difference.
-* Merge Commands:: Commands for selecting a difference,
- changing states of differences, etc.
-* Exiting Emerge:: What to do when you've finished the merge.
-* Combining in Emerge:: How to keep both alternatives for a difference.
-* Fine Points of Emerge:: Misc.
-@end menu
-
-@node Overview of Emerge
-@section Overview of Emerge
-
- To start Emerge, run one of these four commands:
-
-@table @kbd
-@item M-x emerge-files
-@findex emerge-files
-Merge two specified files.
-
-@item M-x emerge-files-with-ancestor
-@findex emerge-files-with-ancestor
-Merge two specified files, with reference to a common ancestor.
-
-@item M-x emerge-buffers
-@findex emerge-buffers
-Merge two buffers.
-
-@item M-x emerge-buffers-with-ancestor
-@findex emerge-buffers-with-ancestor
-Merge two buffers with reference to a common ancestor in a third
-buffer.
-@end table
-
-@cindex merge buffer (Emerge)
-@cindex A and B buffers (Emerge)
- The Emerge commands compare two files or buffers, and display the
-comparison in three buffers: one for each input text (the @dfn{A buffer}
-and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
-takes place. The merge buffer shows the full merged text, not just the
-differences. Wherever the two input texts differ, you can choose which
-one of them to include in the merge buffer.
-
- The Emerge commands that take input from existing buffers use only
-the accessible portions of those buffers, if they are narrowed.
-@xref{Narrowing,,, emacs, the Emacs Manual}.
-
-
- If a common ancestor version is available, from which the two texts to
-be merged were both derived, Emerge can use it to guess which
-alternative is right. Wherever one current version agrees with the
-ancestor, Emerge presumes that the other current version is a deliberate
-change which should be kept in the merged version. Use the
-@samp{with-ancestor} commands if you want to specify a common ancestor
-text. These commands read three file or buffer names---variant A,
-variant B, and the common ancestor.
-
- After the comparison is done and the buffers are prepared, the
-interactive merging starts. You control the merging by typing special
-@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
-For each run of differences between the input texts, you can choose
-which one of them to keep, or edit them both together.
-
- The merge buffer uses a special major mode, Emerge mode, with commands
-for making these choices. But you can also edit the buffer with
-ordinary Emacs commands.
-
- At any given time, the attention of Emerge is focused on one
-particular difference, called the @dfn{selected} difference. This
-difference is marked off in the three buffers like this:
-
-@example
-vvvvvvvvvvvvvvvvvvvv
-@var{text that differs}
-^^^^^^^^^^^^^^^^^^^^
-@end example
-
-@noindent
-Emerge numbers all the differences sequentially and the mode
-line always shows the number of the selected difference.
-
- Normally, the merge buffer starts out with the A version of the text.
-But when the A version of a difference agrees with the common ancestor,
-then the B version is initially preferred for that difference.
-
- Emerge leaves the merged text in the merge buffer when you exit. At
-that point, you can save it in a file with @kbd{C-x C-w}. If you give a
-numeric argument to @code{emerge-files} or
-@code{emerge-files-with-ancestor}, it reads the name of the output file
-using the minibuffer. (This is the last file name those commands read.)
-Then exiting from Emerge saves the merged text in the output file.
-
- Normally, Emerge commands save the output buffer in its file when you
-exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
-save the output buffer, but you can save it yourself if you wish.
-
-@node Submodes of Emerge
-@section Submodes of Emerge
-
- You can choose between two modes for giving merge commands: Fast mode
-and Edit mode. In Fast mode, basic merge commands are single
-characters, but ordinary Emacs commands are disabled. This is
-convenient if you use only merge commands. In Edit mode, all merge
-commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
-commands are also available. This allows editing the merge buffer, but
-slows down Emerge operations.
-
- Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
-Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
-and @samp{F}.
-
- Emerge has two additional submodes that affect how particular merge
-commands work: Auto Advance mode and Skip Prefers mode.
-
- If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
-advance to the next difference. This lets you go through the merge
-faster as long as you simply choose one of the alternatives from the
-input. The mode line indicates Auto Advance mode with @samp{A}.
-
- If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
-skip over differences in states prefer-A and prefer-B (@pxref{State of
-Difference}). Thus you see only differences for which neither version
-is presumed ``correct.'' The mode line indicates Skip Prefers mode with
-@samp{S}.
-
-@findex emerge-auto-advance-mode
-@findex emerge-skip-prefers-mode
- Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
-clear Auto Advance mode. Use @kbd{s s}
-(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
-These commands turn on the mode with a positive argument, turns it off
-with a negative or zero argument, and toggle the mode with no argument.
-
-@node State of Difference
-@section State of a Difference
-
- In the merge buffer, a difference is marked with lines of @samp{v} and
-@samp{^} characters. Each difference has one of these seven states:
-
-@table @asis
-@item A
-The difference is showing the A version. The @kbd{a} command always
-produces this state; the mode line indicates it with @samp{A}.
-
-@item B
-The difference is showing the B version. The @kbd{b} command always
-produces this state; the mode line indicates it with @samp{B}.
-
-@item default-A
-@itemx default-B
-The difference is showing the A or the B state by default, because you
-haven't made a choice. All differences start in the default-A state
-(and thus the merge buffer is a copy of the A buffer), except those for
-which one alternative is ``preferred'' (see below).
-
-When you select a difference, its state changes from default-A or
-default-B to plain A or B. Thus, the selected difference never has
-state default-A or default-B, and these states are never displayed in
-the mode line.
-
-The command @kbd{d a} chooses default-A as the default state, and @kbd{d
-b} chooses default-B. This chosen default applies to all differences
-which you haven't ever selected and for which no alternative is preferred.
-If you are moving through the merge sequentially, the differences you
-haven't selected are those following the selected one. Thus, while
-moving sequentially, you can effectively make the A version the default
-for some sections of the merge buffer and the B version the default for
-others by using @kbd{d a} and @kbd{d b} between sections.
-
-@item prefer-A
-@itemx prefer-B
-The difference is showing the A or B state because it is
-@dfn{preferred}. This means that you haven't made an explicit choice,
-but one alternative seems likely to be right because the other
-alternative agrees with the common ancestor. Thus, where the A buffer
-agrees with the common ancestor, the B version is preferred, because
-chances are it is the one that was actually changed.
-
-These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
-
-@item combined
-The difference is showing a combination of the A and B states, as a
-result of the @kbd{x c} or @kbd{x C} commands.
-
-Once a difference is in this state, the @kbd{a} and @kbd{b} commands
-don't do anything to it unless you give them a numeric argument.
-
-The mode line displays this state as @samp{comb}.
-@end table
-
-@node Merge Commands
-@section Merge Commands
-
- Here are the Merge commands for Fast mode; in Edit mode, precede them
-with @kbd{C-c C-c}:
-
-@table @kbd
-@item p
-Select the previous difference.
-
-@item n
-Select the next difference.
-
-@item a
-Choose the A version of this difference.
-
-@item b
-Choose the B version of this difference.
-
-@item C-u @var{n} j
-Select difference number @var{n}.
-
-@item .
-Select the difference containing point. You can use this command in the
-merge buffer or in the A or B buffer.
-
-@item q
-Quit---finish the merge.
-
-@item C-]
-Abort---exit merging and do not save the output.
-
-@item f
-Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
-
-@item e
-Go into Edit mode.
-
-@item l
-Recenter (like @kbd{C-l}) all three windows.
-
-@item -
-Specify part of a prefix numeric argument.
-
-@item @var{digit}
-Also specify part of a prefix numeric argument.
-
-@item d a
-Choose the A version as the default from here down in
-the merge buffer.
-
-@item d b
-Choose the B version as the default from here down in
-the merge buffer.
-
-@item c a
-Copy the A version of this difference into the kill ring.
-
-@item c b
-Copy the B version of this difference into the kill ring.
-
-@item i a
-Insert the A version of this difference at point.
-
-@item i b
-Insert the B version of this difference at point.
-
-@item m
-Put point and mark around the difference.
-
-@item ^
-Scroll all three windows down (like @kbd{M-v}).
-
-@item v
-Scroll all three windows up (like @kbd{C-v}).
-
-@item <
-Scroll all three windows left (like @kbd{C-x <}).
-
-@item >
-Scroll all three windows right (like @kbd{C-x >}).
-
-@item |
-Reset horizontal scroll on all three windows.
-
-@item x 1
-Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
-to full size.)
-
-@item x c
-Combine the two versions of this difference (@pxref{Combining in
-Emerge}).
-
-@item x f
-Show the names of the files/buffers Emerge is operating on, in a Help
-window. (Use @kbd{C-u l} to restore windows.)
-
-@item x j
-Join this difference with the following one.
-(@kbd{C-u x j} joins this difference with the previous one.)
-
-@item x s
-Split this difference into two differences. Before you use this
-command, position point in each of the three buffers at the place where
-you want to split the difference.
-
-@item x t
-Trim identical lines off the top and bottom of the difference.
-Such lines occur when the A and B versions are
-identical but differ from the ancestor version.
-@end table
-
-@node Exiting Emerge
-@section Exiting Emerge
-
- The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
-the results into the output file if you specified one. It restores the
-A and B buffers to their proper contents, or kills them if they were
-created by Emerge and you haven't changed them. It also disables the
-Emerge commands in the merge buffer, since executing them later could
-damage the contents of the various buffers.
-
- @kbd{C-]} aborts the merge. This means exiting without writing the
-output file. If you didn't specify an output file, then there is no
-real difference between aborting and finishing the merge.
-
- If the Emerge command was called from another Lisp program, then its
-return value is @code{t} for successful completion, or @code{nil} if you
-abort.
-
-@node Combining in Emerge
-@section Combining the Two Versions
-
- Sometimes you want to keep @emph{both} alternatives for a particular
-difference. To do this, use @kbd{x c}, which edits the merge buffer
-like this:
-
-@example
-@group
-#ifdef NEW
-@var{version from A buffer}
-#else /* not NEW */
-@var{version from B buffer}
-#endif /* not NEW */
-@end group
-@end example
-
-@noindent
-@vindex emerge-combine-versions-template
-While this example shows C preprocessor conditionals delimiting the two
-alternative versions, you can specify the strings to use by setting
-the variable @code{emerge-combine-versions-template} to a string of your
-choice. In the string, @samp{%a} says where to put version A, and
-@samp{%b} says where to put version B. The default setting, which
-produces the results shown above, looks like this:
-
-@example
-@group
-"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
-@end group
-@end example
-
-@node Fine Points of Emerge
-@section Fine Points of Emerge
-
- During the merge, you mustn't try to edit the A and B buffers yourself.
-Emerge modifies them temporarily, but ultimately puts them back the way
-they were.
-
- You can have any number of merges going at once---just don't use any one
-buffer as input to more than one merge at once, since the temporary
-changes made in these buffers would get in each other's way.
-
- Starting Emerge can take a long time because it needs to compare the
-files fully. Emacs can't do anything else until @code{diff} finishes.
-Perhaps in the future someone will change Emerge to do the comparison in
-the background when the input files are large---then you could keep on
-doing other things with Emacs until Emerge is ready to accept
-commands.
-
-@vindex emerge-startup-hook
- After setting up the merge, Emerge runs the hook
-@code{emerge-startup-hook}. @xref{Hooks,,, emacs, the Emacs Manual}.
-
-@node Picture Mode
-@chapter Editing Pictures
-@cindex pictures
-@cindex making pictures out of text characters
-@findex edit-picture
-
- To edit a picture made out of text characters (for example, a picture
-of the division of a register into fields, as a comment in a program),
-use the command @kbd{M-x edit-picture} to enter Picture mode.
-
- In Picture mode, editing is based on the @dfn{quarter-plane} model of
-text, according to which the text characters lie studded on an area that
-stretches infinitely far to the right and downward. The concept of the end
-of a line does not exist in this model; the most you can say is where the
-last nonblank character on the line is found.
-
- Of course, Emacs really always considers text as a sequence of
-characters, and lines really do have ends. But Picture mode replaces
-the most frequently-used commands with variants that simulate the
-quarter-plane model of text. They do this by inserting spaces or by
-converting tabs to spaces.
-
- Most of the basic editing commands of Emacs are redefined by Picture mode
-to do essentially the same thing but in a quarter-plane way. In addition,
-Picture mode defines various keys starting with the @kbd{C-c} prefix to
-run special picture editing commands.
-
- One of these keys, @kbd{C-c C-c}, is particularly important. Often a
-picture is part of a larger file that is usually edited in some other
-major mode. @kbd{M-x edit-picture} records the name of the previous
-major mode so you can use the @kbd{C-c C-c} command
-(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
-also deletes spaces from the ends of lines, unless given a numeric
-argument.
-
- The special commands of Picture mode all work in other modes (provided
-the @file{picture} library is loaded), but are not bound to keys except
-in Picture mode. The descriptions below talk of moving ``one column''
-and so on, but all the picture mode commands handle numeric arguments as
-their normal equivalents do.
-
-@vindex picture-mode-hook
- Turning on Picture mode runs the hook @code{picture-mode-hook}.
-Additional extensions to Picture mode can be found in
-@file{artist.el}.
-
-@menu
-* Basic Picture:: Basic concepts and simple commands of Picture Mode.
-* Insert in Picture:: Controlling direction of cursor motion
- after "self-inserting" characters.
-* Tabs in Picture:: Various features for tab stops and indentation.
-* Rectangles in Picture:: Clearing and superimposing rectangles.
-@end menu
-
-@node Basic Picture
-@section Basic Editing in Picture Mode
-
-@findex picture-forward-column
-@findex picture-backward-column
-@findex picture-move-down
-@findex picture-move-up
-@cindex editing in Picture mode
-
- Most keys do the same thing in Picture mode that they usually do, but
-do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
-run @code{picture-forward-column}, a command which moves point one
-column to the right, inserting a space if necessary so that the actual
-end of the line makes no difference. @kbd{C-b} is rebound to run
-@code{picture-backward-column}, which always moves point left one
-column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
-@kbd{C-p} are rebound to run @code{picture-move-down} and
-@code{picture-move-up}, which can either insert spaces or convert tabs
-as necessary to make sure that point stays in exactly the same column.
-@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
-nonblank character on the line. There is no need to change @kbd{C-a},
-as the choice of screen model does not affect beginnings of
-lines.
-
-@findex picture-newline
- Insertion of text is adapted to the quarter-plane screen model
-through the use of Overwrite mode (@pxref{Minor Modes,,, emacs, the
-Emacs Manual}.) Self-inserting characters replace existing text,
-column by column, rather than pushing existing text to the right.
-@key{RET} runs @code{picture-newline}, which just moves to the
-beginning of the following line so that new text will replace that
-line.
-
-@findex picture-backward-clear-column
-@findex picture-clear-column
-@findex picture-clear-line
- In Picture mode, the commands that normally delete or kill text,
-instead erase text (replacing it with spaces). @key{DEL}
-(@code{picture-backward-clear-column}) replaces the preceding
-character with a space rather than removing it; this moves point
-backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
-character or characters with spaces, but does not move point. (If you
-want to clear characters to spaces and move forward over them, use
-@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
-contents of lines, but does not delete the newlines from the buffer.
-
-@findex picture-open-line
- To do actual insertion, you must use special commands. @kbd{C-o}
-(@code{picture-open-line}) creates a blank line after the current
-line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
-sense in Picture mode, so it is not changed. @kbd{C-j}
-(@code{picture-duplicate-line}) inserts another line with the same
-contents below the current line.
-
-@kindex C-c C-d @r{(Picture mode)}
- To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
-(which is defined as @code{delete-char}, as @kbd{C-d} is in other
-modes), or one of the picture rectangle commands (@pxref{Rectangles in
-Picture}).
-
-@node Insert in Picture
-@section Controlling Motion after Insert
-
-@findex picture-movement-up
-@findex picture-movement-down
-@findex picture-movement-left
-@findex picture-movement-right
-@findex picture-movement-nw
-@findex picture-movement-ne
-@findex picture-movement-sw
-@findex picture-movement-se
-@kindex C-c < @r{(Picture mode)}
-@kindex C-c > @r{(Picture mode)}
-@kindex C-c ^ @r{(Picture mode)}
-@kindex C-c . @r{(Picture mode)}
-@kindex C-c ` @r{(Picture mode)}
-@kindex C-c ' @r{(Picture mode)}
-@kindex C-c / @r{(Picture mode)}
-@kindex C-c \ @r{(Picture mode)}
- Since ``self-inserting'' characters in Picture mode overwrite and move
-point, there is no essential restriction on how point should be moved.
-Normally point moves right, but you can specify any of the eight
-orthogonal or diagonal directions for motion after a ``self-inserting''
-character. This is useful for drawing lines in the buffer.
-
-@table @kbd
-@item C-c <
-@itemx C-c @key{LEFT}
-Move left after insertion (@code{picture-movement-left}).
-@item C-c >
-@itemx C-c @key{RIGHT}
-Move right after insertion (@code{picture-movement-right}).
-@item C-c ^
-@itemx C-c @key{UP}
-Move up after insertion (@code{picture-movement-up}).
-@item C-c .
-@itemx C-c @key{DOWN}
-Move down after insertion (@code{picture-movement-down}).
-@item C-c `
-@itemx C-c @key{HOME}
-Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
-@item C-c '
-@itemx C-c @key{PAGEUP}
-Move up and right (``northeast'') after insertion
-(@code{picture-movement-ne}).
-@item C-c /
-@itemx C-c @key{END}
-Move down and left (``southwest'') after insertion
-@*(@code{picture-movement-sw}).
-@item C-c \
-@itemx C-c @key{PAGEDOWN}
-Move down and right (``southeast'') after insertion
-@*(@code{picture-movement-se}).
-@end table
-
-@kindex C-c C-f @r{(Picture mode)}
-@kindex C-c C-b @r{(Picture mode)}
-@findex picture-motion
-@findex picture-motion-reverse
- Two motion commands move based on the current Picture insertion
-direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
-same direction as motion after ``insertion'' currently does, while @kbd{C-c
-C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
-
-@node Tabs in Picture
-@section Picture Mode Tabs
-
-@kindex M-TAB @r{(Picture mode)}
-@findex picture-tab-search
-@vindex picture-tab-chars
- Two kinds of tab-like action are provided in Picture mode. Use
-@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
-With no argument, it moves to a point underneath the next
-``interesting'' character that follows whitespace in the previous
-nonblank line. ``Next'' here means ``appearing at a horizontal position
-greater than the one point starts out at.'' With an argument, as in
-@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
-character in the current line. @kbd{M-@key{TAB}} does not change the
-text; it only moves point. ``Interesting'' characters are defined by
-the variable @code{picture-tab-chars}, which should define a set of
-characters. The syntax for this variable is like the syntax used inside
-of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
-and the @samp{]}. Its default value is @code{"!-~"}.
-
-@findex picture-tab
- @key{TAB} itself runs @code{picture-tab}, which operates based on the
-current tab stop settings; it is the Picture mode equivalent of
-@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
-argument it clears the text that it moves over.
-
-@kindex C-c TAB @r{(Picture mode)}
-@findex picture-set-tab-stops
- The context-based and tab-stop-based forms of tabbing are brought
-together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
-This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
-would consider significant in the current line. The use of this command,
-together with @key{TAB}, can get the effect of context-based tabbing. But
-@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
-
- It may be convenient to prevent use of actual tab characters in
-pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
-up the picture. You can do this by setting the variable
-@code{indent-tabs-mode} to @code{nil}.
-
-@node Rectangles in Picture
-@section Picture Mode Rectangle Commands
-@cindex rectangles and Picture mode
-@cindex Picture mode and rectangles
-
- Picture mode defines commands for working on rectangular pieces of
-the text in ways that fit with the quarter-plane model. The standard
-rectangle commands may also be useful. @xref{Rectangles,,, emacs, the
-Emacs Manual}.
-
-@table @kbd
-@item C-c C-k
-Clear out the region-rectangle with spaces
-(@code{picture-clear-rectangle}). With argument, delete the text.
-@item C-c C-w @var{r}
-Similar, but save rectangle contents in register @var{r} first
-(@code{picture-clear-rectangle-to-register}).
-@item C-c C-y
-Copy last killed rectangle into the buffer by overwriting, with upper
-left corner at point (@code{picture-yank-rectangle}). With argument,
-insert instead.
-@item C-c C-x @var{r}
-Similar, but use the rectangle in register @var{r}
-(@code{picture-yank-rectangle-from-register}).
-@end table
-
-@kindex C-c C-k @r{(Picture mode)}
-@kindex C-c C-w @r{(Picture mode)}
-@findex picture-clear-rectangle
-@findex picture-clear-rectangle-to-register
- The picture rectangle commands @kbd{C-c C-k}
-(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
-(@code{picture-clear-rectangle-to-register}) differ from the standard
-rectangle commands in that they normally clear the rectangle instead of
-deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
-mode.
-
- However, deletion of rectangles can be useful in Picture mode, so
-these commands delete the rectangle if given a numeric argument.
-@kbd{C-c C-k} either with or without a numeric argument saves the
-rectangle for @kbd{C-c C-y}.
-
-@kindex C-c C-y @r{(Picture mode)}
-@kindex C-c C-x @r{(Picture mode)}
-@findex picture-yank-rectangle
-@findex picture-yank-rectangle-from-register
- The Picture mode commands for yanking rectangles differ from the
-standard ones in that they overwrite instead of inserting. This is
-the same way that Picture mode insertion of other text differs from
-other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
-(by overwriting) the rectangle that was most recently killed, while
-@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
-likewise for the rectangle found in a specified register.
-
-@node Advanced VC Usage
-@chapter Advanced VC Usage
-
- Commonly used features of Emacs' version control (VC) support are
-described in the main Emacs manual (@pxref{Version Control,,,emacs,
-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.
-* 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.
-@end menu
-
-@node VC Dired Mode
-@section Dired under VC
-
-@cindex PCL-CVS
-@pindex cvs
-@cindex CVS Dired Mode
- The VC Dired Mode described here works with all the version control
-systems that VC supports. Another more powerful facility, designed
-specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS,
-pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
-
-@kindex C-x v d
-@findex vc-directory
- When you are working on a large program, it is often useful to find
-out which files have changed within an entire directory tree, or to view
-the status of all files under version control at once, and to perform
-version control operations on collections of files. You can use the
-command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing
-that includes only files relevant for version control.
-
-@vindex vc-dired-terse-display
- @kbd{C-x v d} creates a buffer which uses VC Dired Mode. This looks
-much like an ordinary Dired buffer (@pxref{Dired,,,emacs, the
-Emacs Manual}); however, normally it shows only the noteworthy files
-(those locked or not up-to-date). This is called @dfn{terse display}.
-If you set the variable @code{vc-dired-terse-display} to @code{nil},
-then VC Dired shows all relevant files---those managed under version
-control, plus all subdirectories (@dfn{full display}). The command
-@kbd{v t} in a VC Dired buffer toggles between terse display and full
-display (@pxref{VC Dired Commands}).
-
-@vindex vc-dired-recurse
- By default, VC Dired produces a recursive listing of noteworthy or
-relevant files at or below the given directory. You can change this by
-setting the variable @code{vc-dired-recurse} to @code{nil}; then VC
-Dired shows only the files in the given directory.
-
- The line for an individual file shows the version control state in the
-place of the hard link count, owner, group, and size of the file. If
-the file is unmodified, in sync with the master file, the version
-control state shown is blank. Otherwise it consists of text in
-parentheses. Under RCS and SCCS, the name of the user locking the file
-is shown; under CVS, an abbreviated version of the @samp{cvs status}
-output is used. Here is an example using RCS:
-
-@smallexample
-@group
- /home/jim/project:
-
- -rw-r--r-- (jim) Apr 2 23:39 file1
- -r--r--r-- Apr 5 20:21 file2
-@end group
-@end smallexample
-
-@noindent
-The files @samp{file1} and @samp{file2} are under version control,
-@samp{file1} is locked by user jim, and @samp{file2} is unlocked.
-
- Here is an example using CVS:
-
-@smallexample
-@group
- /home/joe/develop:
-
- -rw-r--r-- (modified) Aug 2 1997 file1.c
- -rw-r--r-- Apr 4 20:09 file2.c
- -rw-r--r-- (merge) Sep 13 1996 file3.c
-@end group
-@end smallexample
-
- Here @samp{file1.c} is modified with respect to the repository, and
-@samp{file2.c} is not. @samp{file3.c} is modified, but other changes
-have also been checked in to the repository---you need to merge them
-with the work file before you can check it in.
-
-@vindex vc-stay-local
-@vindex vc-cvs-stay-local
- In the above, if the repository were on a remote machine, VC would
-only contact it when the variable @code{vc-stay-local} (or
-@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
-because access to the repository may be slow, or you may be working
-offline and not have access to the repository at all. As a
-consequence, VC would not be able to tell you that @samp{file3.c} is
-in the ``merge'' state; you would learn that only when you try to
-check-in your modified copy of the file, or use a command such as
-@kbd{C-x v m}.
-
- In practice, this is not a problem because CVS handles this case
-consistently whenever it arises. In VC, you'll simply get prompted to
-merge the remote changes into your work file first. The benefits of
-less network communication usually outweigh the disadvantage of not
-seeing remote changes immediately.
-
-@vindex vc-directory-exclusion-list
- When VC Dired displays subdirectories (in the ``full'' display mode),
-it omits some that should never contain any files under version control.
-By default, this includes Version Control subdirectories such as
-@samp{RCS} and @samp{CVS}; you can customize this by setting the
-variable @code{vc-directory-exclusion-list}.
-
- You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in
-ordinary Dired, that allows you to specify additional switches for the
-@samp{ls} command.
-
-@node VC Dired Commands
-@section VC Dired Commands
-
- 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.
-
- 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 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.
-
-@findex vc-dired-toggle-terse-mode
-@findex vc-dired-mark-locked
- You can toggle between terse display (only locked files, or files not
-up-to-date) and full display at any time by typing @kbd{v t}
-(@code{vc-dired-toggle-terse-mode}). There is also a special command
-@kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently
-locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l
-t k} is another way to delete from the buffer all files except those
-currently locked.
-
-@node Remote Repositories
-@section Remote Repositories
-@cindex remote repositories (CVS)
-
- 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.
-
- 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.
-
-@menu
-* Version Backups:: Keeping local copies of repository versions.
-* Local Version Control:: Using another version system for local editing.
-@end menu
-
-@node Version Backups
-@subsection Version Backups
-@cindex version backups
-
-@cindex automatic version backups
- When VC sees that the CVS 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
-revert to that version (@kbd{C-x v u}), without any network
-interactions.
-
- The local copy of the unmodified file is called a @dfn{version
-backup} to indicate that it corresponds exactly to a version that is
-stored in the repository. Note that version backups are not the same
-as ordinary Emacs backup files (@pxref{Backup,,,emacs, the Emacs
-Manual}). But they follow a similar naming convention.
-
- For a file that comes from a remote CVS 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
-setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
-
-@cindex manual version backups
- The name of the automatic version backup for version @var{version}
-of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
-almost the same as the name used by @kbd{C-x v ~} (@pxref{Old
-Versions,,,emacs, the Emacs Manual}), the only difference being
-the additional dot (@samp{.}) after the version number. This
-similarity is intentional, because both kinds of files store the same
-kind of information. The file made by @kbd{C-x v ~} acts as a
-@dfn{manual version backup}.
-
- All the VC commands that operate on old versions of a file can use
-both kinds of version backups. For instance, @kbd{C-x v ~} uses
-either an automatic or a manual version backup, if possible, to get
-the contents of the version you request. Likewise, @kbd{C-x v =} and
-@kbd{C-x v u} use either an automatic or a manual version backup, if
-one of them exists, to get the contents of a version to compare or
-revert to. If you changed a file outside of Emacs, so that no
-automatic version backup was created for the previous text, you can
-create a manual backup of that version using @kbd{C-x v ~}, and thus
-obtain the benefit of the local copy for Emacs commands.
-
- The only difference in Emacs's handling of manual and automatic
-version backups, once they exist, is that Emacs deletes automatic
-version backups when you commit to the repository. By contrast,
-manual version backups remain until you delete them.
-
-@node Local Version Control
-@subsection Local Version Control
-@cindex local version control
-@cindex local back end (version control)
-
-When you make many changes to a file that comes from a remote
-repository, it can be convenient to have version control on your local
-machine as well. You can then record intermediate versions, revert to
-a previous state, etc., before you actually commit your changes to the
-remote server.
-
-VC lets you do this by putting a file under a second, local version
-control system, so that the file is effectively registered in two
-systems at the same time. For the description here, we will assume
-that the remote system is CVS, and you use RCS locally, although the
-mechanism works with any combination of version control systems
-(@dfn{back ends}).
-
-To make it work with other back ends, you must make sure that the
-``more local'' back end comes before the ``more remote'' back end in
-the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
-default, this variable is set up so that you can use remote CVS and
-local RCS as described here.
-
-To start using local RCS for a file that comes from a remote CVS
-server, you must @emph{register the file in RCS}, by typing @kbd{C-u
-C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
-prefix argument, and specify RCS as the back end.)
-
-You can do this at any time; it does not matter whether you have
-already modified the file with respect to the version in the CVS
-repository. If possible, VC tries to make the RCS master start with
-the unmodified repository version, then checks in any local changes
-as a new version. This works if you have not made any changes yet, or
-if the unmodified repository version exists locally as a version
-backup (@pxref{Version Backups}). If the unmodified version is not
-available locally, the RCS master starts with the modified version;
-the only drawback to this is that you cannot compare your changes
-locally to what is stored in the repository.
-
-The version number of the RCS master is derived from the current CVS
-version, starting a branch from it. For example, if the current CVS
-version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
-the RCS master will be identical to version 1.23 under CVS; your first
-changes are checked in as 1.23.1.1. (If the unmodified file is not
-available locally, VC will check in the modified file twice, both as
-1.23 and 1.23.1.1, to make the revision numbers consistent.)
-
-If you do not use locking under CVS (the default), locking is also
-disabled for RCS, so that editing under RCS works exactly as under
-CVS.
-
-When you are done with local editing, you can commit the final version
-back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
-This initializes the log entry buffer (@pxref{Log Buffer,,,emacs, the
-Emacs Manual}) to contain all the log entries you have recorded in the
-RCS master; you can edit them as you wish, and then commit in CVS by
-typing @kbd{C-c C-c}. If the commit is successful, VC removes the RCS
-master, so that the file is once again registered under CVS only.
-(The RCS master is not actually deleted, just renamed by appending
-@samp{~} to the name, so that you can refer to it later if you wish.)
-
-While using local RCS, you can pick up recent changes from the CVS
-repository into your local file, or commit some of your changes back
-to CVS, without terminating local RCS version control. To do this,
-switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
-
-@table @kbd
-@item C-x v b
-Switch to another back end that the current file is registered
-under (@code{vc-switch-backend}).
-
-@item C-u C-x v b @var{backend} @key{RET}
-Switch to @var{backend} for the current file.
-@end table
-
-@kindex C-x v b
-@findex vc-switch-backend
-@kbd{C-x v b} does not change the buffer contents, or any files; it
-only changes VC's perspective on how to handle the file. Any
-subsequent VC commands for that file will operate on the back end that
-is currently selected.
-
-If the current file is registered in more than one back end, typing
-@kbd{C-x v b} ``cycles'' through all of these back ends. With a
-prefix argument, it asks for the back end to use in the minibuffer.
-
-Thus, if you are using local RCS, and you want to pick up some recent
-changes in the file from remote CVS, first visit the file, then type
-@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
-@key{RET}} to merge the news (@pxref{Merging,,,emacs, the Emacs
-Manual}). You can then switch back to RCS by typing @kbd{C-x v b}
-again, and continue to edit locally.
-
-But if you do this, the revision numbers in the RCS master no longer
-correspond to those of CVS. Technically, this is not a problem, but
-it can become difficult to keep track of what is in the CVS repository
-and what is not. So we suggest that you return from time to time to
-CVS-only operation, by committing your local changes back to the
-repository using @kbd{C-u C-x v v cvs @key{RET}}.
-
-@node Snapshots
-@section Snapshots
-@cindex snapshots and version control
-
- A @dfn{snapshot} is a named set of file versions (one for each
-registered file) that you can treat as a unit. One important kind of
-snapshot is a @dfn{release}, a (theoretically) stable version of the
-system that is ready for distribution to users.
-
-@menu
-* Making Snapshots:: The snapshot facilities.
-* Snapshot Caveats:: Things to be careful of when using snapshots.
-@end menu
-
-@node Making Snapshots
-@subsection Making and Using Snapshots
-
- There are two basic commands for snapshots; one makes a
-snapshot with a given name, the other retrieves a named snapshot.
-
-@table @code
-@kindex C-x v s
-@findex vc-create-snapshot
-@item C-x v s @var{name} @key{RET}
-Define the last saved versions of every registered file in or under the
-current directory as a snapshot named @var{name}
-(@code{vc-create-snapshot}).
-
-@kindex C-x v r
-@findex vc-retrieve-snapshot
-@item C-x v r @var{name} @key{RET}
-For all registered files at or below the current directory level, select
-whatever versions correspond to the snapshot @var{name}
-(@code{vc-retrieve-snapshot}).
-
-This command reports an error if any files are locked at or below the
-current directory, without changing anything; this is to avoid
-overwriting work in progress.
-@end table
-
- A snapshot uses a very small amount of resources---just enough to record
-the list of file names and which version belongs to the snapshot. Thus,
-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 ~} (@pxref{Old Versions,,,emacs, the Emacs Manual}).
-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
-version.
-
-@node Snapshot Caveats
-@subsection Snapshot Caveats
-
-@cindex named configurations (RCS)
- VC's snapshot facilities are modeled on RCS's named-configuration
-support. They use RCS's native facilities for this, so
-snapshots made using RCS through VC are visible even when you bypass VC.
-
- With CVS, Meta-CVS, and Subversion, VC also uses the native
-mechanism provided by that back end to make snapshots and retrieve them
-(@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion).
-
-@c worded verbosely to avoid overfull hbox.
- For SCCS, VC implements snapshots itself. The files it uses contain
-name/file/version-number triples. These snapshots are visible only
-through VC.
-
- There is no support for VC snapshots using GNU Arch yet.
-
- A snapshot is a set of checked-in versions. So make sure that all the
-files are checked in and not locked when you make a snapshot.
-
- File renaming and deletion can create some difficulties with snapshots.
-This is not a VC-specific problem, but a general design issue in version
-control systems that no one has solved very well yet.
-
- If you rename a registered file, you need to rename its master along
-with it (the command @code{vc-rename-file} does this automatically). If
-you are using SCCS, you must also update the records of the snapshot, to
-mention the file by its new name (@code{vc-rename-file} does this,
-too). An old snapshot that refers to a master file that no longer
-exists under the recorded name is invalid; VC can no longer retrieve
-it. It would be beyond the scope of this manual to explain enough about
-RCS and SCCS to explain how to update the snapshots by hand.
-
- Using @code{vc-rename-file} makes the snapshot remain valid for
-retrieval, but it does not solve all problems. For example, some of the
-files in your program probably refer to others by name. At the very
-least, the makefile probably mentions the file that you renamed. If you
-retrieve an old snapshot, the renamed file is retrieved under its new
-name, which is not the name that the makefile expects. So the program
-won't really work as retrieved.
-
-@node Miscellaneous VC
-@section Miscellaneous Commands and Features of VC
-
- This section explains the less-frequently-used features of VC.
-
-@menu
-* Change Logs and VC:: Generating a change log file from log entries.
-* Renaming and VC:: A command to rename both the source and master
- file correctly.
-* Version Headers:: Inserting version control headers into working files.
-@end menu
-
-@node Change Logs and VC
-@subsection Change Logs and VC
-
- If you use RCS or CVS for a program and also maintain a change log
-file for it (@pxref{Change Log,,,emacs, the Emacs Manual}), you
-can generate change log entries automatically from the version control
-log entries:
-
-@table @kbd
-@item C-x v a
-@kindex C-x v a
-@findex vc-update-change-log
-Visit the current directory's change log file and, for registered files
-in that directory, create new entries for versions checked in since the
-most recent entry in the change log file.
-(@code{vc-update-change-log}).
-
-This command works with RCS or CVS only, not with any of the other
-back ends.
-
-@item C-u C-x v a
-As above, but only find entries for the current buffer's file.
-
-@item M-1 C-x v a
-As above, but find entries for all the currently visited files that are
-maintained with version control. This works only with RCS, and it puts
-all entries in the log for the default directory, which may not be
-appropriate.
-@end table
-
- For example, suppose the first line of @file{ChangeLog} is dated
-1999-04-10, and that the only check-in since then was by Nathaniel
-Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
-messages that start with `#'.}. Then @kbd{C-x v a} visits
-@file{ChangeLog} and inserts text like this:
-
@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-05-22 Nathaniel Bowditch <nat@@apn.org>
+@c ``Picture Mode'' is a chapter, not a section, so it's outside @raisesections.
+@include picture-xtra.texi
- * rcs2log: Ignore log messages that start with `#'.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
+@raisesections
+@include arevert-xtra.texi
-@noindent
-You can then edit the new change log entry further as you wish.
+@include dired-xtra.texi
- Some of the new change log entries may duplicate what's already in
-ChangeLog. You will have to remove these duplicates by hand.
+@include cal-xtra.texi
- Normally, the log entry for file @file{foo} is displayed as @samp{*
-foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
-if the text of the log entry starts with @w{@samp{(@var{functionname}):
-}}. For example, if the log entry for @file{vc.el} is
-@samp{(vc-do-command): Check call-process status.}, then the text in
-@file{ChangeLog} looks like this:
+@include emerge-xtra.texi
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-05-06 Nathaniel Bowditch <nat@@apn.org>
+@include vc-xtra.texi
- * vc.el (vc-do-command): Check call-process status.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
- When @kbd{C-x v a} adds several change log entries at once, it groups
-related log entries together if they all are checked in by the same
-author at nearly the same time. If the log entries for several such
-files all have the same text, it coalesces them into a single entry.
-For example, suppose the most recent check-ins have the following log
-entries:
+@include fortran-xtra.texi
-@flushleft
-@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
-@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
-@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
-@end flushleft
+@include msdog-xtra.texi
-@noindent
-They appear like this in @file{ChangeLog}:
-
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-04-01 Nathaniel Bowditch <nat@@apn.org>
-
- * vc.texinfo: Fix expansion typos.
-
- * vc.el, vc-hooks.el: Don't call expand-file-name.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
- Normally, @kbd{C-x v a} separates log entries by a blank line, but you
-can mark several related log entries to be clumped together (without an
-intervening blank line) by starting the text of each related log entry
-with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label
-itself is not copied to @file{ChangeLog}. For example, suppose the log
-entries are:
-
-@flushleft
-@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
-@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
-@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
-@end flushleft
-
-@noindent
-Then the text in @file{ChangeLog} looks like this:
-
-@iftex
-@medbreak
+@lowersections
@end iftex
-@smallexample
-@group
-1999-04-01 Nathaniel Bowditch <nat@@apn.org>
-
- * vc.texinfo: Fix expansion typos.
- * vc.el, vc-hooks.el: Don't call expand-file-name.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
-
- A log entry whose text begins with @samp{#} is not copied to
-@file{ChangeLog}. For example, if you merely fix some misspellings in
-comments, you can log the change with an entry beginning with @samp{#}
-to avoid putting such trivia into @file{ChangeLog}.
-
-@node Renaming and VC
-@subsection Renaming VC Work Files and Master Files
-
-@findex vc-rename-file
- When you rename a registered file, you must also rename its master
-file correspondingly to get proper results. Use @code{vc-rename-file}
-to rename the source file as you specify, and rename its master file
-accordingly. It also updates any snapshots (@pxref{Snapshots}) that
-mention the file, so that they use the new name; despite this, the
-snapshot thus modified may not completely work (@pxref{Snapshot
-Caveats}).
-
- Some back ends do not provide an explicit rename operation to their
-repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
-on the original and renamed buffers and provide the necessary edit
-log.
-
- You cannot use @code{vc-rename-file} on a file that is locked by
-someone else.
-
-@node Version Headers
-@subsection Inserting Version Control Headers
-
- Sometimes it is convenient to put version identification strings
-directly into working files. Certain special strings called
-@dfn{version headers} are replaced in each successive version by the
-number of that version, the name of the user who created it, and other
-relevant information. All of the back ends that VC supports have such
-a mechanism, except GNU Arch.
-
- VC does not normally use the information contained in these headers.
-The exception is RCS---with RCS, version headers are sometimes more
-reliable than the master file to determine which version of the file
-you are editing. Note that in a multi-branch environment, version
-headers are necessary to make VC behave correctly (@pxref{Multi-User
-Branching,,,emacs, the Emacs Manual}).
-
- Searching for RCS version headers is controlled by the variable
-@code{vc-consult-headers}. If it is non-@code{nil} (the default),
-Emacs searches for headers to determine the version number you are
-editing. Setting it to @code{nil} disables this feature.
-
- Note that although CVS uses the same kind of version headers as RCS
-does, VC never searches for these headers if you are using CVS,
-regardless of the above setting.
-
-@kindex C-x v h
-@findex vc-insert-headers
- You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
-insert a suitable header string.
-
-@table @kbd
-@item C-x v h
-Insert headers in a file for use with your version-control system.
-@end table
-
-@vindex vc-@var{backend}-header
- The default header string is @samp{@w{$}Id$} for RCS and
-@samp{@w{%}W%} for SCCS. You can specify other headers to insert by
-setting the variables @code{vc-@var{backend}-header} where
-@var{backend} is @code{rcs} or @code{sccs}.
-
- Instead of a single string, you can specify a list of strings; then
-each string in the list is inserted as a separate header on a line of
-its own.
-
- It may be necessary to use apparently-superfluous backslashes when
-writing the strings that you put in this variable. For instance, you
-might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
-backslash prevents the string constant from being interpreted as a
-header, if the Emacs Lisp file containing it is maintained with
-version control.
-
-@vindex vc-comment-alist
- Each header is inserted surrounded by tabs, inside comment delimiters,
-on a new line at point. Normally the ordinary comment
-start and comment end strings of the current mode are used, but for
-certain modes, there are special comment delimiters for this purpose;
-the variable @code{vc-comment-alist} specifies them. Each element of
-this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
-
-@vindex vc-static-header-alist
- The variable @code{vc-static-header-alist} specifies further strings
-to add based on the name of the buffer. Its value should be a list of
-elements of the form @code{(@var{regexp} . @var{format})}. Whenever
-@var{regexp} matches the buffer name, @var{format} is inserted as part
-of the header. A header line is inserted for each element that matches
-the buffer name, and for each string specified by
-@code{vc-@var{backend}-header}. The header line is made by processing the
-string from @code{vc-@var{backend}-header} with the format taken from the
-element. The default value for @code{vc-static-header-alist} is as follows:
-
-@example
-@group
-(("\\.c$" .
- "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
-#endif /* lint */\n"))
-@end group
-@end example
-
-@noindent
-It specifies insertion of text of this form:
-
-@example
-@group
-
-#ifndef lint
-static char vcid[] = "@var{string}";
-#endif /* lint */
-@end group
-@end example
-
-@noindent
-Note that the text above starts with a blank line.
-
- If you use more than one version header in a file, put them close
-together in the file. The mechanism in @code{revert-buffer} that
-preserves markers may not handle markers positioned between two version
-headers.
-
-@node Customizing VC
-@section Customizing VC
-
-@vindex vc-handled-backends
-The variable @code{vc-handled-backends} determines which version
-control systems VC should handle. The default value is @code{(RCS CVS
-SVN SCCS Arch MCVS)}, so it contains all six version systems that are
-currently supported. If you want VC to ignore one or more of these
-systems, exclude its name from the list. To disable VC entirely, set
-this variable to @code{nil}.
-
-The order of systems in the list is significant: when you visit a file
-registered in more than one system (@pxref{Local Version Control}), VC
-uses the system that comes first in @code{vc-handled-backends} by
-default. The order is also significant when you register a file for
-the first time, @pxref{Registering,,,emacs, the Emacs Manual} for
-details.
-
-@menu
-* General VC Options:: Options that apply to multiple back ends.
-* RCS and SCCS:: Options for RCS and SCCS.
-* CVS Options:: Options for CVS.
-@end menu
-
-@node General VC Options
-@subsection General Options
-
-@vindex vc-make-backup-files
- Emacs normally does not save backup files for source files that are
-maintained with version control. If you want to make backup files even
-for files that use version control, set the variable
-@code{vc-make-backup-files} to a non-@code{nil} value.
-
-@vindex vc-keep-workfiles
- Normally the work file exists all the time, whether it is locked or
-not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
-in a new version with @kbd{C-x v v} deletes the work file; but any
-attempt to visit the file with Emacs creates it again. (With CVS, work
-files are always kept.)
-
-@vindex vc-follow-symlinks
- Editing a version-controlled file through a symbolic link can be
-dangerous. It bypasses the version control system---you can edit the
-file without locking it, and fail to check your changes in. Also,
-your changes might overwrite those of another user. To protect against
-this, VC checks each symbolic link that you visit, to see if it points
-to a file under version control.
-
- The variable @code{vc-follow-symlinks} controls what to do when a
-symbolic link points to a version-controlled file. If it is @code{nil},
-VC only displays a warning message. If it is @code{t}, VC automatically
-follows the link, and visits the real file instead, telling you about
-this in the echo area. If the value is @code{ask} (the default), VC
-asks you each time whether to follow the link.
-
-@vindex vc-suppress-confirm
- If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
-and @kbd{C-x v i} can save the current buffer without asking, and
-@kbd{C-x v u} also operates without asking for confirmation. (This
-variable does not affect @kbd{C-x v c}; that operation is so drastic
-that it should always ask for confirmation.)
-
-@vindex vc-command-messages
- VC mode does much of its work by running the shell commands for RCS,
-CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC
-displays messages to indicate which shell commands it runs, and
-additional messages when the commands finish.
-
-@vindex vc-path
- You can specify additional directories to search for version control
-programs by setting the variable @code{vc-path}. These directories
-are searched before the usual search path. It is rarely necessary to
-set this variable, because VC normally finds the proper files
-automatically.
-
-@node RCS and SCCS
-@subsection Options for RCS and SCCS
-
-@cindex non-strict locking (RCS)
-@cindex locking, non-strict (RCS)
- By default, RCS uses locking to coordinate the activities of several
-users, but there is a mode called @dfn{non-strict locking} in which
-you can check-in changes without locking the file first. Use
-@samp{rcs -U} to switch to non-strict locking for a particular file,
-see the @code{rcs} manual page for details.
-
- When deducing the version control state of an RCS file, VC first
-looks for an RCS version header string in the file (@pxref{Version
-Headers}). If there is no header string, VC normally looks at the
-file permissions of the work file; this is fast. But there might be
-situations when the file permissions cannot be trusted. In this case
-the master file has to be consulted, which is rather expensive. Also
-the master file can only tell you @emph{if} there's any lock on the
-file, but not whether your work file really contains that locked
-version.
-
-@vindex vc-consult-headers
- You can tell VC not to use version headers to determine the file
-status by setting @code{vc-consult-headers} to @code{nil}. VC then
-always uses the file permissions (if it is supposed to trust them), or
-else checks the master file.
-
-@vindex vc-mistrust-permissions
- You can specify the criterion for whether to trust the file
-permissions by setting the variable @code{vc-mistrust-permissions}.
-Its value can be @code{t} (always mistrust the file permissions and
-check the master file), @code{nil} (always trust the file
-permissions), or a function of one argument which makes the decision.
-The argument is the directory name of the @file{RCS} subdirectory. A
-non-@code{nil} value from the function says to mistrust the file
-permissions. If you find that the file permissions of work files are
-changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
-Then VC always checks the master file to determine the file's status.
-
- VC determines the version control state of files under SCCS much as
-with RCS. It does not consider SCCS version headers, though. Thus,
-the variable @code{vc-mistrust-permissions} affects SCCS use, but
-@code{vc-consult-headers} does not.
-
-@node CVS Options
-@subsection Options specific for CVS
-
-@cindex locking (CVS)
- By default, CVS does not use locking to coordinate the activities of
-several users; anyone can change a work file at any time. However,
-there are ways to restrict this, resulting in behavior that resembles
-locking.
-
-@cindex CVSREAD environment variable (CVS)
- For one thing, you can set the @env{CVSREAD} environment variable
-(the value you use makes no difference). If this variable is defined,
-CVS makes your work files read-only by default. In Emacs, you must
-type @kbd{C-x v v} to make the file writable, so that editing works
-in fact similar as if locking was used. Note however, that no actual
-locking is performed, so several users can make their files writable
-at the same time. When setting @env{CVSREAD} for the first time, make
-sure to check out all your modules anew, so that the file protections
-are set correctly.
-
-@cindex cvs watch feature
-@cindex watching files (CVS)
- Another way to achieve something similar to locking is to use the
-@dfn{watch} feature of CVS. If a file is being watched, CVS makes it
-read-only by default, and you must also use @kbd{C-x v v} in Emacs to
-make it writable. VC calls @code{cvs edit} to make the file writable,
-and CVS takes care to notify other developers of the fact that you
-intend to change the file. See the CVS documentation for details on
-using the watch feature.
-
-@vindex vc-stay-local
-@vindex vc-cvs-stay-local
-@cindex remote repositories (CVS)
- When a file's repository is on a remote machine, VC tries to keep
-network interactions to a minimum. This is controlled by the variable
-@code{vc-cvs-stay-local}. There is another variable,
-@code{vc-stay-local}, which enables the feature also for other back
-ends that support it, including CVS. In the following, we will talk
-only about @code{vc-cvs-stay-local}, but everything applies to
-@code{vc-stay-local} as well.
-
-If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
-only the entry in the local CVS subdirectory to determine the file's
-state (and possibly information returned by previous CVS commands).
-One consequence of this is that when you have modified a file, and
-somebody else has already checked in other changes to the file, you
-are not notified of it until you actually try to commit. (But you can
-try to pick up any recent changes from the repository first, using
-@kbd{C-x v m @key{RET}}, @pxref{Merging,,,emacs, the Emacs Manual}).
-
- When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
-version backups, so that simple diff and revert operations are
-completely local (@pxref{Version Backups}).
-
- On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
-then VC queries the remote repository @emph{before} it decides what to
-do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
-repositories. It also does not make any version backups.
-
- You can also set @code{vc-cvs-stay-local} to a regular expression
-that is matched against the repository host name; VC then stays local
-only for repositories from hosts that match the pattern.
-
-@vindex vc-cvs-global-switches
- You can specify additional command line options to pass to all CVS
-operations in the variable @code{vc-cvs-global-switches}. These
-switches are inserted immediately after the @code{cvs} command, before
-the name of the operation to invoke.
-
-
-@node Fortran
-@chapter Fortran Mode
-@cindex Fortran mode
-@cindex mode, Fortran
-
- Fortran mode provides special motion commands for Fortran statements
-and subprograms, and indentation commands that understand Fortran
-conventions of nesting, line numbers and continuation statements.
-Fortran mode has support for Auto Fill mode that breaks long lines into
-proper Fortran continuation lines.
-
- Special commands for comments are provided because Fortran comments
-are unlike those of other languages. Built-in abbrevs optionally save
-typing when you insert Fortran keywords.
-
- Use @kbd{M-x fortran-mode} to switch to this major mode. This
-command runs the hook @code{fortran-mode-hook}. @xref{Hooks,,, emacs,
-the Emacs Manual}.
-
-@cindex Fortran77 and Fortran90
-@findex f90-mode
-@findex fortran-mode
- Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
-``tab format'') source code. For editing the modern Fortran90 or
-Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
-Emacs normally uses Fortran mode for files with extension @samp{.f},
-@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
-@samp{.f95}. GNU Fortran supports both kinds of format.
-
-@menu
-* Motion: Fortran Motion. Moving point by statements or subprograms.
-* Indent: Fortran Indent. Indentation commands for Fortran.
-* Comments: Fortran Comments. Inserting and aligning comments.
-* Autofill: Fortran Autofill. Auto fill support for Fortran.
-* Columns: Fortran Columns. Measuring columns for valid Fortran.
-* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
-@end menu
-
-@node Fortran Motion
-@section Motion Commands
-
- In addition to the normal commands for moving by and operating on
-``defuns'' (Fortran subprograms---functions and subroutines, as well as
-modules for F90 mode), Fortran mode provides special commands to move by
-statements and other program units.
-
-@table @kbd
-@kindex C-c C-n @r{(Fortran mode)}
-@findex fortran-next-statement
-@findex f90-next-statement
-@item C-c C-n
-Move to the beginning of the next statement
-(@code{fortran-next-statement}/@code{f90-next-statement}).
-
-@kindex C-c C-p @r{(Fortran mode)}
-@findex fortran-previous-statement
-@findex f90-previous-statement
-@item C-c C-p
-Move to the beginning of the previous statement
-(@code{fortran-previous-statement}/@code{f90-previous-statement}).
-If there is no previous statement (i.e. if called from the first
-statement in the buffer), move to the start of the buffer.
-
-@kindex C-c C-e @r{(F90 mode)}
-@findex f90-next-block
-@item C-c C-e
-Move point forward to the start of the next code block
-(@code{f90-next-block}). A code block is a subroutine,
-@code{if}--@code{endif} statement, and so forth. This command exists
-for F90 mode only, not Fortran mode. With a numeric argument, this
-moves forward that many blocks.
-
-@kindex C-c C-a @r{(F90 mode)}
-@findex f90-previous-block
-@item C-c C-a
-Move point backward to the previous code block
-(@code{f90-previous-block}). This is like @code{f90-next-block}, but
-moves backwards.
-
-@kindex C-M-n @r{(Fortran mode)}
-@findex fortran-end-of-block
-@findex f90-end-of-block
-@item C-M-n
-Move to the end of the current code block
-(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
-agument, move forward that number of blocks. The mark is set before
-moving point. The F90 mode version of this command checks for
-consistency of block types and labels (if present), but it does not
-check the outermost block since that may be incomplete.
-
-@kindex C-M-p @r{(Fortran mode)}
-@findex fortran-beginning-of-block
-@findex f90-beginning-of-block
-@item C-M-p
-Move to the start of the current code block
-(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
-is like @code{fortran-end-of-block}, but moves backwards.
-@end table
-
-@node Fortran Indent
-@section Fortran Indentation
-
- Special commands and features are needed for indenting Fortran code in
-order to make sure various syntactic entities (line numbers, comment line
-indicators and continuation line flags) appear in the columns that are
-required for standard, fixed (or tab) format Fortran.
-
-@menu
-* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
-* Contline: ForIndent Cont. How continuation lines indent.
-* Numbers: ForIndent Num. How line numbers auto-indent.
-* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
-* Vars: ForIndent Vars. Variables controlling Fortran indent style.
-@end menu
-
-@node ForIndent Commands
-@subsection Fortran Indentation and Filling Commands
-
-@table @kbd
-@item C-M-j
-Break the current line at point and set up a continuation line
-(@code{fortran-split-line}).
-@item M-^
-Join this line to the previous line (@code{fortran-join-line}).
-@item C-M-q
-Indent all the lines of the subprogram point is in
-(@code{fortran-indent-subprogram}).
-@item M-q
-Fill a comment block or statement.
-@end table
-
-@kindex C-M-q @r{(Fortran mode)}
-@findex fortran-indent-subprogram
- The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
-to reindent all the lines of the Fortran subprogram (function or
-subroutine) containing point.
-
-@kindex C-M-j @r{(Fortran mode)}
-@findex fortran-split-line
- The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
-a line in the appropriate fashion for Fortran. In a non-comment line,
-the second half becomes a continuation line and is indented
-accordingly. In a comment line, both halves become separate comment
-lines.
-
-@kindex M-^ @r{(Fortran mode)}
-@kindex C-c C-d @r{(Fortran mode)}
-@findex fortran-join-line
- @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
-which joins a continuation line back to the previous line, roughly as
-the inverse of @code{fortran-split-line}. The point must be on a
-continuation line when this command is invoked.
-
-@kindex M-q @r{(Fortran mode)}
-@kbd{M-q} in Fortran mode fills the comment block or statement that
-point is in. This removes any excess statement continuations.
-
-@node ForIndent Cont
-@subsection Continuation Lines
-@cindex Fortran continuation lines
-
-@vindex fortran-continuation-string
- Most Fortran77 compilers allow two ways of writing continuation lines.
-If the first non-space character on a line is in column 5, then that
-line is a continuation of the previous line. We call this @dfn{fixed
-format}. (In GNU Emacs we always count columns from 0; but note that
-the Fortran standard counts from 1.) The variable
-@code{fortran-continuation-string} specifies what character to put in
-column 5. A line that starts with a tab character followed by any digit
-except @samp{0} is also a continuation line. We call this style of
-continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
-with another style of continuation lines).
-
-@vindex indent-tabs-mode @r{(Fortran mode)}
-@vindex fortran-analyze-depth
-@vindex fortran-tab-mode-default
- Fortran mode can use either style of continuation line. When you
-enter Fortran mode, it tries to deduce the proper continuation style
-automatically from the buffer contents. It does this by scanning up to
-@code{fortran-analyze-depth} (default 100) lines from the start of the
-buffer. The first line that begins with either a tab character or six
-spaces determines the choice. If the scan fails (for example, if the
-buffer is new and therefore empty), the value of
-@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
-non-@code{nil} for tab format) is used. @samp{/t} in the mode line
-indicates tab format is selected. Fortran mode sets the value of
-@code{indent-tabs-mode} accordingly.
-
- If the text on a line starts with the Fortran continuation marker
-@samp{$}, or if it begins with any non-whitespace character in column
-5, Fortran mode treats it as a continuation line. When you indent a
-continuation line with @key{TAB}, it converts the line to the current
-continuation style. When you split a Fortran statement with
-@kbd{C-M-j}, the continuation marker on the newline is created according
-to the continuation style.
-
- The setting of continuation style affects several other aspects of
-editing in Fortran mode. In fixed format mode, the minimum column
-number for the body of a statement is 6. Lines inside of Fortran
-blocks that are indented to larger column numbers always use only the
-space character for whitespace. In tab format mode, the minimum
-column number for the statement body is 8, and the whitespace before
-column 8 must always consist of one tab character.
-
-@node ForIndent Num
-@subsection Line Numbers
-
- If a number is the first non-whitespace in the line, Fortran
-indentation assumes it is a line number and moves it to columns 0
-through 4. (Columns always count from 0 in GNU Emacs.)
-
-@vindex fortran-line-number-indent
- Line numbers of four digits or less are normally indented one space.
-The variable @code{fortran-line-number-indent} controls this; it
-specifies the maximum indentation a line number can have. The default
-value of the variable is 1. Fortran mode tries to prevent line number
-digits passing column 4, reducing the indentation below the specified
-maximum if necessary. If @code{fortran-line-number-indent} has the
-value 5, line numbers are right-justified to end in column 4.
-
-@vindex fortran-electric-line-number
- Simply inserting a line number is enough to indent it according to
-these rules. As each digit is inserted, the indentation is recomputed.
-To turn off this feature, set the variable
-@code{fortran-electric-line-number} to @code{nil}.
-
-
-@node ForIndent Conv
-@subsection Syntactic Conventions
-
- Fortran mode assumes that you follow certain conventions that simplify
-the task of understanding a Fortran program well enough to indent it
-properly:
-
-@itemize @bullet
-@item
-Two nested @samp{do} loops never share a @samp{continue} statement.
-
-@item
-Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
-and others are written without embedded whitespace or line breaks.
-
-Fortran compilers generally ignore whitespace outside of string
-constants, but Fortran mode does not recognize these keywords if they
-are not contiguous. Constructs such as @samp{else if} or @samp{end do}
-are acceptable, but the second word should be on the same line as the
-first and not on a continuation line.
-@end itemize
-
-@noindent
-If you fail to follow these conventions, the indentation commands may
-indent some lines unaesthetically. However, a correct Fortran program
-retains its meaning when reindented even if the conventions are not
-followed.
-
-@node ForIndent Vars
-@subsection Variables for Fortran Indentation
-
-@vindex fortran-do-indent
-@vindex fortran-if-indent
-@vindex fortran-structure-indent
-@vindex fortran-continuation-indent
-@vindex fortran-check-all-num@dots{}
-@vindex fortran-minimum-statement-indent@dots{}
- Several additional variables control how Fortran indentation works:
-
-@table @code
-@item fortran-do-indent
-Extra indentation within each level of @samp{do} statement (default 3).
-
-@item fortran-if-indent
-Extra indentation within each level of @samp{if}, @samp{select case}, or
-@samp{where} statements (default 3).
-
-@item fortran-structure-indent
-Extra indentation within each level of @samp{structure}, @samp{union},
-@samp{map}, or @samp{interface} statements (default 3).
-
-@item fortran-continuation-indent
-Extra indentation for bodies of continuation lines (default 5).
-
-@item fortran-check-all-num-for-matching-do
-In Fortran77, a numbered @samp{do} statement is ended by any statement
-with a matching line number. It is common (but not compulsory) to use a
-@samp{continue} statement for this purpose. If this variable has a
-non-@code{nil} value, indenting any numbered statement must check for a
-@samp{do} that ends there. If you always end @samp{do} statements with
-a @samp{continue} line (or if you use the more modern @samp{enddo}),
-then you can speed up indentation by setting this variable to
-@code{nil}. The default is @code{nil}.
-
-@item fortran-blink-matching-if
-If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
-statement moves the cursor momentarily to the matching @samp{if} (or
-@samp{do}) statement to show where it is. The default is @code{nil}.
-
-@item fortran-minimum-statement-indent-fixed
-Minimum indentation for Fortran statements when using fixed format
-continuation line style. Statement bodies are never indented less than
-this much. The default is 6.
-
-@item fortran-minimum-statement-indent-tab
-Minimum indentation for Fortran statements for tab format continuation line
-style. Statement bodies are never indented less than this much. The
-default is 8.
-@end table
-
-The variables controlling the indentation of comments are described in
-the following section.
-
-@node Fortran Comments
-@section Fortran Comments
-
- The usual Emacs comment commands assume that a comment can follow a
-line of code. In Fortran77, the standard comment syntax requires an
-entire line to be just a comment. Therefore, Fortran mode replaces the
-standard Emacs comment commands and defines some new variables.
-
-@vindex fortran-comment-line-start
- Fortran mode can also handle the Fortran90 comment syntax where comments
-start with @samp{!} and can follow other text. Because only some Fortran77
-compilers accept this syntax, Fortran mode will not insert such comments
-unless you have said in advance to do so. To do this, set the variable
-@code{fortran-comment-line-start} to @samp{"!"}.
-
-@table @kbd
-@item M-;
-Align comment or insert new comment (@code{fortran-indent-comment}).
-
-@item C-x ;
-Applies to nonstandard @samp{!} comments only.
-
-@item C-c ;
-Turn all lines of the region into comments, or (with argument) turn them back
-into real code (@code{fortran-comment-region}).
-@end table
-
-@findex fortran-indent-comment
- @kbd{M-;} in Fortran mode is redefined as the command
-@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
-recognizes any kind of existing comment and aligns its text appropriately;
-if there is no existing comment, a comment is inserted and aligned. But
-inserting and aligning comments are not the same in Fortran mode as in
-other modes.
-
- When a new comment must be inserted, if the current line is blank, a
-full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
-comment is inserted if you have said you want to use them. Otherwise a
-full-line comment is inserted on a new line before the current line.
-
- Nonstandard @samp{!} comments are aligned like comments in other
-languages, but full-line comments are different. In a standard full-line
-comment, the comment delimiter itself must always appear in column zero.
-What can be aligned is the text within the comment. You can choose from
-three styles of alignment by setting the variable
-@code{fortran-comment-indent-style} to one of these values:
-
-@vindex fortran-comment-indent-style
-@vindex fortran-comment-line-extra-indent
-@table @code
-@item fixed
-Align the text at a fixed column, which is the sum of
-@code{fortran-comment-line-extra-indent} and the minimum statement
-indentation. This is the default.
-
-The minimum statement indentation is
-@code{fortran-minimum-statement-indent-fixed} for fixed format
-continuation line style and @code{fortran-minimum-statement-indent-tab}
-for tab format style.
-
-@item relative
-Align the text as if it were a line of code, but with an additional
-@code{fortran-comment-line-extra-indent} columns of indentation.
-
-@item nil
-Don't move text in full-line comments automatically.
-@end table
-
-@vindex fortran-comment-indent-char
- In addition, you can specify the character to be used to indent within
-full-line comments by setting the variable
-@code{fortran-comment-indent-char} to the single-character string you want
-to use.
-
-@vindex fortran-directive-re
- Compiler directive lines, or preprocessor lines, have much the same
-appearance as comment lines. It is important, though, that such lines
-never be indented at all, no matter what the value of
-@code{fortran-comment-indent-style}. The variable
-@code{fortran-directive-re} is a regular expression that specifies which
-lines are directives. Matching lines are never indented, and receive
-distinctive font-locking.
-
- The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
-you use @samp{!} comments, this command can be used with them. Otherwise
-it is useless in Fortran mode.
-
-@kindex C-c ; @r{(Fortran mode)}
-@findex fortran-comment-region
-@vindex fortran-comment-region
- The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
-lines of the region into comments by inserting the string @samp{C$$$} at
-the front of each one. With a numeric argument, it turns the region
-back into live code by deleting @samp{C$$$} from the front of each line
-in it. The string used for these comments can be controlled by setting
-the variable @code{fortran-comment-region}. Note that here we have an
-example of a command and a variable with the same name; these two uses
-of the name never conflict because in Lisp and in Emacs it is always
-clear from the context which one is meant.
-
-@node Fortran Autofill
-@section Auto Fill in Fortran Mode
-
- Fortran mode has specialized support for Auto Fill mode, which is a
-minor mode that automatically splits statements as you insert them
-when they become too wide. Splitting a statement involves making
-continuation lines using @code{fortran-continuation-string}
-(@pxref{ForIndent Cont}). This splitting happens when you type
-@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
-indentation commands. You activate Auto Fill in Fortran mode in the
-normal way. @xref{Auto Fill,,, emacs, the Emacs Manual}.
-
-@vindex fortran-break-before-delimiters
- Auto Fill breaks lines at spaces or delimiters when the lines get
-longer than the desired width (the value of @code{fill-column}). The
-delimiters (besides whitespace) that Auto Fill can break at are
-@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
-and @samp{,}. The line break comes after the delimiter if the
-variable @code{fortran-break-before-delimiters} is @code{nil}.
-Otherwise (and by default), the break comes before the delimiter.
-
- To enable Auto Fill in all Fortran buffers, add
-@code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks,,,
-emacs, the Emacs Manual}.
-
-@node Fortran Columns
-@section Checking Columns in Fortran
-
-@table @kbd
-@item C-c C-r
-Display a ``column ruler'' momentarily above the current line
-(@code{fortran-column-ruler}).
-@item C-c C-w
-Split the current window horizontally temporarily so that it is 72
-columns wide (@code{fortran-window-create-momentarily}). This may
-help you avoid making lines longer than the 72-character limit that
-some Fortran compilers impose.
-@item C-u C-c C-w
-Split the current window horizontally so that it is 72 columns wide
-(@code{fortran-window-create}). You can then continue editing.
-@item M-x fortran-strip-sequence-nos
-Delete all text in column 72 and beyond.
-@end table
-
-@kindex C-c C-r @r{(Fortran mode)}
-@findex fortran-column-ruler
- The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
-ruler momentarily above the current line. The comment ruler is two lines
-of text that show you the locations of columns with special significance in
-Fortran programs. Square brackets show the limits of the columns for line
-numbers, and curly brackets show the limits of the columns for the
-statement body. Column numbers appear above them.
-
- Note that the column numbers count from zero, as always in GNU Emacs.
-As a result, the numbers may be one less than those you are familiar
-with; but the positions they indicate in the line are standard for
-Fortran.
-
-@vindex fortran-column-ruler-fixed
-@vindex fortran-column-ruler-tabs
- The text used to display the column ruler depends on the value of the
-variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
-@code{nil}, then the value of the variable
-@code{fortran-column-ruler-fixed} is used as the column ruler.
-Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
-displayed. By changing these variables, you can change the column ruler
-display.
-
-@kindex C-c C-w @r{(Fortran mode)}
-@findex fortran-window-create-momentarily
- @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
-splits the current window horizontally, making a window 72 columns
-wide, so you can see any lines that are too long. Type a space to
-restore the normal width.
-
-@kindex C-u C-c C-w @r{(Fortran mode)}
-@findex fortran-window-create
- You can also split the window horizontally and continue editing with
-the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
-fortran-window-create}). By editing in this window you can
-immediately see when you make a line too wide to be correct Fortran.
-
-@findex fortran-strip-sequence-nos
- The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
-column 72 and beyond, on all lines in the current buffer. This is the
-easiest way to get rid of old sequence numbers.
-
-@node Fortran Abbrev
-@section Fortran Keyword Abbrevs
-
- Fortran mode provides many built-in abbrevs for common keywords and
-declarations. These are the same sort of abbrev that you can define
-yourself. To use them, you must turn on Abbrev mode.
-@xref{Abbrevs,,, emacs, the Emacs Manual}.
-
- The built-in abbrevs are unusual in one way: they all start with a
-semicolon. You cannot normally use semicolon in an abbrev, but Fortran
-mode makes this possible by changing the syntax of semicolon to ``word
-constituent.''
-
- For example, one built-in Fortran abbrev is @samp{;c} for
-@samp{continue}. If you insert @samp{;c} and then insert a punctuation
-character such as a space or a newline, the @samp{;c} expands automatically
-to @samp{continue}, provided Abbrev mode is enabled.@refill
-
- Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
-Fortran abbrevs and what they stand for.
-
-
-@node MS-DOG
-@chapter Emacs and MS-DOS
-@cindex MS-DOG
-@cindex MS-DOS peculiarities
-
- This section briefly describes the peculiarities of using Emacs on
-the MS-DOS ``operating system'' (also known as ``MS-DOG'').
-Information about Emacs and Microsoft's current operating system
-Windows (also known as ``Losedows) is in the main Emacs manual
-(@pxref{Emacs and Microsoft Systems,,, emacs, the Emacs Manual}).
-
- If you build Emacs for MS-DOS, the binary will also run on Windows
-3.X, Windows NT, Windows 9X/ME, Windows 2000, or OS/2 as a DOS
-application; all of this chapter applies for all of those systems, if
-you use an Emacs that was built for MS-DOS.
-
- @xref{Text and Binary,,,emacs, the Emacs Manual}, for information
-about Emacs' special handling of text files under MS-DOS (and
-Windows).
-
-@menu
-* Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS.
-* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
-* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
-* Files: MS-DOS File Names. File name conventions on MS-DOS.
-* Printing: MS-DOS Printing. Printing specifics on MS-DOS.
-* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
-* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
-@end menu
-
-@node MS-DOS Keyboard
-@section Keyboard Usage on MS-DOS
-
-@kindex DEL @r{(MS-DOS)}
-@kindex BS @r{(MS-DOS)}
- The key that is called @key{DEL} in Emacs (because that's how it is
-designated on most workstations) is known as @key{BS} (backspace) on a
-PC. That is why the PC-specific terminal initialization remaps the
-@key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act
-as @kbd{C-d} for the same reasons.
-
-@kindex C-g @r{(MS-DOS)}
-@kindex C-BREAK @r{(MS-DOS)}
-@cindex quitting on MS-DOS
- Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
-character, just like @kbd{C-g}. This is because Emacs cannot detect
-that you have typed @kbd{C-g} until it is ready for more input. As a
-consequence, you cannot use @kbd{C-g} to stop a running command
-(@pxref{Quitting,,,emacs, the Emacs Manual}). By contrast,
-@kbd{C-@key{BREAK}} @emph{is} detected as soon as you type it (as
-@kbd{C-g} is on other systems), so it can be used to stop a running
-command and for emergency escape (@pxref{Emergency Escape,,,emacs, the
-Emacs Manual}).
-
-@cindex Meta (under MS-DOS)
-@cindex Hyper (under MS-DOS)
-@cindex Super (under MS-DOS)
-@vindex dos-super-key
-@vindex dos-hyper-key
- The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
-You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
-choose either the right @key{CTRL} key or the right @key{ALT} key by
-setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
-or 2 respectively. If neither @code{dos-super-key} nor
-@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
-also mapped to the @key{META} key. However, if the MS-DOS international
-keyboard support program @file{KEYB.COM} is installed, Emacs will
-@emph{not} map the right @key{ALT} to @key{META}, since it is used for
-accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
-layouts; in this case, you may only use the left @key{ALT} as @key{META}
-key.
-
-@kindex C-j @r{(MS-DOS)}
-@vindex dos-keypad-mode
- The variable @code{dos-keypad-mode} is a flag variable that controls
-what key codes are returned by keys in the numeric keypad. You can also
-define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
-following line into your @file{_emacs} file:
-
-@smallexample
-;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.}
-(define-key function-key-map [kp-enter] [?\C-j])
-@end smallexample
-
-@node MS-DOS Mouse
-@section Mouse Usage on MS-DOS
-
-@cindex mouse support under MS-DOS
- Emacs on MS-DOS supports a mouse (on the default terminal only).
-The mouse commands work as documented, including those that use menus
-and the menu bar (@pxref{Menu Bar,,,emacs, the Emacs Manual}). Scroll
-bars don't work in MS-DOS Emacs. PC mice usually have only two
-buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you
-press both of them together, that has the effect of @kbd{Mouse-3}. If
-the mouse does have 3 buttons, Emacs detects that at startup, and all
-the 3 buttons function normally, as on X.
-
- Help strings for menu-bar and pop-up menus are displayed in the echo
-area when the mouse pointer moves across the menu items. Highlighting
-of mouse-sensitive text (@pxref{Mouse References,,,emacs, the Emacs
-Manual}) is also supported.
-
-@cindex mouse, set number of buttons
-@findex msdos-set-mouse-buttons
- Some versions of mouse drivers don't report the number of mouse
-buttons correctly. For example, mice with a wheel report that they
-have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
-the wheel, which serves as the middle button, are not passed. In
-these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command
-to tell Emacs how many mouse buttons to expect. You could make such a
-setting permanent by adding this fragment to your @file{_emacs} init
-file:
-
-@example
-;; @r{Treat the mouse like a 2-button mouse.}
-(msdos-set-mouse-buttons 2)
-@end example
-
-@cindex Windows clipboard support
- Emacs built for MS-DOS supports clipboard operations when it runs on
-Windows. Commands that put text on the kill ring, or yank text from
-the ring, check the Windows clipboard first, just as Emacs does on the
-X Window System (@pxref{Mouse Commands,,,emacs, the Emacs Manual}).
-Only the primary selection and the cut buffer are supported by MS-DOS
-Emacs on Windows; the secondary selection always appears as empty.
-
- Due to the way clipboard access is implemented by Windows, the
-length of text you can put into the clipboard is limited by the amount
-of free DOS memory that is available to Emacs. Usually, up to 620KB of
-text can be put into the clipboard, but this limit depends on the system
-configuration and is lower if you run Emacs as a subprocess of
-another program. If the killed text does not fit, Emacs outputs a
-message saying so, and does not put the text into the clipboard.
-
- Null characters also cannot be put into the Windows clipboard. If the
-killed text includes null characters, Emacs does not put such text into
-the clipboard, and displays in the echo area a message to that effect.
-
-@vindex dos-display-scancodes
- The variable @code{dos-display-scancodes}, when non-@code{nil},
-directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of
-each keystroke; this feature serves as a complement to the
-@code{view-lossage} command, for debugging.
-
-@node MS-DOS Display
-@section Display on MS-DOS
-@cindex faces under MS-DOS
-@cindex fonts, emulating under MS-DOS
-
- Display on MS-DOS cannot use font variants, like bold or italic, but
-it does support multiple faces, each of which can specify a foreground
-and a background color. Therefore, you can get the full functionality
-of Emacs packages that use fonts (such as @code{font-lock}, Enriched
-Text mode, and others) by defining the relevant faces to use different
-colors. Use the @code{list-colors-display} command (@pxref{Frame
-Parameters,,,emacs, the Emacs Manual}) and the
-@code{list-faces-display} command (@pxref{Faces,,,emacs, the Emacs
-Manual}) to see what colors and faces are available and what they look
-like.
-
- @xref{MS-DOS and MULE}, later in this chapter, for information on
-how Emacs displays glyphs and characters that aren't supported by the
-native font built into the DOS display.
-
-@cindex cursor shape on MS-DOS
- When Emacs starts, it changes the cursor shape to a solid box. This
-is for compatibility with other systems, where the box cursor is the
-default in Emacs. This default shape can be changed to a bar by
-specifying the @code{cursor-type} parameter in the variable
-@code{default-frame-alist} (@pxref{Creating Frames,,,emacs, the Emacs
-Manual}). The MS-DOS terminal doesn't support a vertical-bar cursor,
-so the bar cursor is horizontal, and the @code{@var{width}} parameter,
-if specified by the frame parameters, actually determines its height.
-For this reason, the @code{bar} and @code{hbar} cursor types produce
-the same effect on MS-DOS. As an extension, the bar cursor
-specification can include the starting scan line of the cursor as well
-as its width, like this:
-
-@example
- '(cursor-type bar @var{width} . @var{start})
-@end example
-
-@noindent
-In addition, if the @var{width} parameter is negative, the cursor bar
-begins at the top of the character cell.
-
-@cindex frames on MS-DOS
- The MS-DOS terminal can only display a single frame at a time. The
-Emacs frame facilities work on MS-DOS much as they do on text-only
-terminals (@pxref{Frames,,,emacs, the Emacs Manual}). When you run
-Emacs from a DOS window on MS-Windows, you can make the visible frame
-smaller than the full screen, but Emacs still cannot display more than
-a single frame at a time.
-
-@cindex frame size under MS-DOS
-@findex mode4350
-@findex mode25
- The @code{mode4350} command switches the display to 43 or 50
-lines, depending on your hardware; the @code{mode25} command switches
-to the default 80x25 screen size.
-
- By default, Emacs only knows how to set screen sizes of 80 columns by
-25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
-special video modes that will switch the display to other sizes, you can
-have Emacs support those too. When you ask Emacs to switch the frame to
-@var{n} rows by @var{m} columns dimensions, it checks if there is a
-variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
-uses its value (which must be an integer) as the video mode to switch
-to. (Emacs switches to that video mode by calling the BIOS @code{Set
-Video Mode} function with the value of
-@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
-For example, suppose your adapter will switch to 66x80 dimensions when
-put into video mode 85. Then you can make Emacs support this screen
-size by putting the following into your @file{_emacs} file:
-
-@example
-(setq screen-dimensions-66x80 85)
-@end example
-
- Since Emacs on MS-DOS can only set the frame size to specific
-supported dimensions, it cannot honor every possible frame resizing
-request. When an unsupported size is requested, Emacs chooses the next
-larger supported size beyond the specified size. For example, if you
-ask for 36x80 frame, you will get 40x80 instead.
-
- The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
-when they exactly match the specified size; the search for the next
-larger supported size ignores them. In the above example, even if your
-VGA supports 38x80 dimensions and you define a variable
-@code{screen-dimensions-38x80} with a suitable value, you will still get
-40x80 screen when you ask for a 36x80 frame. If you want to get the
-38x80 size in this case, you can do it by setting the variable named
-@code{screen-dimensions-36x80} with the same video mode value as
-@code{screen-dimensions-38x80}.
-
- Changing frame dimensions on MS-DOS has the effect of changing all the
-other frames to the new dimensions.
-
-@node MS-DOS File Names
-@section File Names on MS-DOS
-@cindex file names under MS-DOS
-@cindex init file, default name under MS-DOS
-
- On MS-DOS, file names are case-insensitive and limited to eight
-characters, plus optionally a period and three more characters. Emacs
-knows enough about these limitations to handle file names that were
-meant for other operating systems. For instance, leading dots
-@samp{.} in file names are invalid in MS-DOS, so Emacs transparently
-converts them to underscores @samp{_}; thus your default init file
-(@pxref{Init File,,,emacs, the Emacs Manual}) is called @file{_emacs}
-on MS-DOS. Excess characters before or after the period are generally
-ignored by MS-DOS itself; thus, if you visit the file
-@file{LongFileName.EvenLongerExtension}, you will silently get
-@file{longfile.eve}, but Emacs will still display the long file name
-on the mode line. Other than that, it's up to you to specify file
-names which are valid under MS-DOS; the transparent conversion as
-described above only works on file names built into Emacs.
-
-@cindex backup file names on MS-DOS
- The above restrictions on the file names on MS-DOS make it almost
-impossible to construct the name of a backup file (@pxref{Backup
-Names,,,emacs, the Emacs Manual}) without losing some of the original
-file name characters. For example, the name of a backup file for
-@file{docs.txt} is @file{docs.tx~} even if single backup is used.
-
-@cindex file names under Windows 95/NT
-@cindex long file names in DOS box under Windows 95/NT
- If you run Emacs as a DOS application under Windows 9X, Windows ME, or
-Windows 2000, you can turn on support for long file names. If you do
-that, Emacs doesn't truncate file names or convert them to lower case;
-instead, it uses the file names that you specify, verbatim. To enable
-long file name support, set the environment variable @env{LFN} to
-@samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow
-DOS programs to access long file names, so Emacs built for MS-DOS will
-only see their short 8+3 aliases.
-
-@cindex @env{HOME} directory under MS-DOS
- MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
-that the directory where it is installed is the value of the @env{HOME}
-environment variable. That is, if your Emacs binary,
-@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
-Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In
-particular, that is where Emacs looks for the init file @file{_emacs}.
-With this in mind, you can use @samp{~} in file names as an alias for
-the home directory, as you would on GNU or Unix. You can also set
-@env{HOME} variable in the environment before starting Emacs; its
-value will then override the above default behavior.
-
- Emacs on MS-DOS handles the directory name @file{/dev} specially,
-because of a feature in the emulator libraries of DJGPP that pretends
-I/O devices have names in that directory. We recommend that you avoid
-using an actual directory named @file{/dev} on any disk.
-
-@node MS-DOS Printing
-@section Printing and MS-DOS
-
- Printing commands, such as @code{lpr-buffer}
-(@pxref{Printing,,,emacs, the Emacs Manual}) and
-@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual})
-can work on MS-DOS by sending the output to one of the printer ports,
-if a Posix-style @code{lpr} program is unavailable. The same Emacs
-variables control printing on all systems, but in some cases they have
-different default values on MS-DOS.
-
-@xref{MS-Windows Printing,,,emacs, the Emacs Manual}, for details.
-
- Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
-though they are connected to a Windows machine which uses a different
-encoding for the same locale. For example, in the Latin-1 locale, DOS
-uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and
-MULE}. When you print to such printers from Windows, you can use the
-@kbd{C-x RET c} (@code{universal-coding-system-argument}) command before
-@kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS
-codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET
-M-x lpr-region RET} will print the region while converting it to the
-codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
-coding system with @kbd{M-x codepage-setup}.
-
-@vindex dos-printer
-@vindex dos-ps-printer
- For backwards compatibility, the value of @code{dos-printer}
-(@code{dos-ps-printer}), if it has a value, overrides the value of
-@code{printer-name} (@code{ps-printer-name}), on MS-DOS.
-
-
-@node MS-DOS and MULE
-@section International Support on MS-DOS
-@cindex international support @r{(MS-DOS)}
-
- Emacs on MS-DOS supports the same international character sets as it
-does on GNU, Unix and other platforms (@pxref{International,,,emacs,
-the Emacs Manual}), including coding systems for converting between
-the different character sets. However, due to incompatibilities
-between MS-DOS/MS-Windows and other systems, there are several
-DOS-specific aspects of this support that you should be aware of.
-This section describes these aspects.
-
- The description below is largely specific to the MS-DOS port of
-Emacs, especially where it talks about practical implications for
-Emacs users. For other operating systems, see the @file{code-pages.el}
-package, which implements support for MS-DOS- and MS-Windows-specific
-encodings for all platforms other than MS-DOS.
-
-@table @kbd
-@item M-x dos-codepage-setup
-Set up Emacs display and coding systems as appropriate for the current
-DOS codepage.
-
-@item M-x codepage-setup
-Create a coding system for a certain DOS codepage.
-@end table
-
-@cindex codepage, MS-DOS
-@cindex DOS codepages
- MS-DOS is designed to support one character set of 256 characters at
-any given time, but gives you a variety of character sets to choose
-from. The alternative character sets are known as @dfn{DOS codepages}.
-Each codepage includes all 128 @acronym{ASCII} characters, but the other 128
-characters (codes 128 through 255) vary from one codepage to another.
-Each DOS codepage is identified by a 3-digit number, such as 850, 862,
-etc.
-
- In contrast to X, which lets you use several fonts at the same time,
-MS-DOS normally doesn't allow use of several codepages in a single
-session. MS-DOS was designed to load a single codepage at system
-startup, and require you to reboot in order to change
-it@footnote{Normally, one particular codepage is burnt into the
-display memory, while other codepages can be installed by modifying
-system configuration files, such as @file{CONFIG.SYS}, and rebooting.
-While there is third-party software that allows changing the codepage
-without rebooting, we describe here how a stock MS-DOS system
-behaves.}. Much the same limitation applies when you run DOS
-executables on other systems such as MS-Windows.
-
-@cindex unibyte operation @r{(MS-DOS)}
- If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
-(@pxref{Initial Options,,,emacs, the Emacs Manual}), Emacs does not
-perform any conversion of non-@acronym{ASCII} characters. Instead, it
-reads and writes any non-@acronym{ASCII} characters verbatim, and
-sends their 8-bit codes to the display verbatim. Thus, unibyte Emacs
-on MS-DOS supports the current codepage, whatever it may be, but
-cannot even represent any other characters.
-
-@vindex dos-codepage
- For multibyte operation on MS-DOS, Emacs needs to know which
-characters the chosen DOS codepage can display. So it queries the
-system shortly after startup to get the chosen codepage number, and
-stores the number in the variable @code{dos-codepage}. Some systems
-return the default value 437 for the current codepage, even though the
-actual codepage is different. (This typically happens when you use the
-codepage built into the display hardware.) You can specify a different
-codepage for Emacs to use by setting the variable @code{dos-codepage} in
-your init file.
-
-@cindex language environment, automatic selection on @r{MS-DOS}
- Multibyte Emacs supports only certain DOS codepages: those which can
-display Far-Eastern scripts, like the Japanese codepage 932, and those
-that encode a single ISO 8859 character set.
-
- The Far-Eastern codepages can directly display one of the MULE
-character sets for these countries, so Emacs simply sets up to use the
-appropriate terminal coding system that is supported by the codepage.
-The special features described in the rest of this section mostly
-pertain to codepages that encode ISO 8859 character sets.
-
- For the codepages which correspond to one of the ISO character sets,
-Emacs knows the character set name based on the codepage number. Emacs
-automatically creates a coding system to support reading and writing
-files that use the current codepage, and uses this coding system by
-default. The name of this coding system is @code{cp@var{nnn}}, where
-@var{nnn} is the codepage number.@footnote{The standard Emacs coding
-systems for ISO 8859 are not quite right for the purpose, because
-typically the DOS codepage does not match the standard ISO character
-codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
-code 231 in the standard Latin-1 character set, but the corresponding
-DOS codepage 850 uses code 135 for this glyph.}
-
-@cindex mode line @r{(MS-DOS)}
- All the @code{cp@var{nnn}} coding systems use the letter @samp{D}
-(for ``DOS'') as their mode-line mnemonic. Since both the terminal
-coding system and the default coding system for file I/O are set to
-the proper @code{cp@var{nnn}} coding system at startup, it is normal
-for the mode line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode
-Line,,,emacs, the Emacs Manual}. Far-Eastern DOS terminals do not use
-the @code{cp@var{nnn}} coding systems, and thus their initial mode
-line looks like the Emacs default.
-
- Since the codepage number also indicates which script you are using,
-Emacs automatically runs @code{set-language-environment} to select the
-language environment for that script (@pxref{Language
-Environments,,,emacs, the Emacs Manual}).
-
- If a buffer contains a character belonging to some other ISO 8859
-character set, not the one that the chosen DOS codepage supports, Emacs
-displays it using a sequence of @acronym{ASCII} characters. For example, if the
-current codepage doesn't have a glyph for the letter @samp{@`o} (small
-@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
-the braces serve as a visual indication that this is a single character.
-(This may look awkward for some non-Latin characters, such as those from
-Greek or Hebrew alphabets, but it is still readable by a person who
-knows the language.) Even though the character may occupy several
-columns on the screen, it is really still just a single character, and
-all Emacs commands treat it as one.
-
-@cindex IBM graphics characters (MS-DOS)
-@cindex box-drawing characters (MS-DOS)
-@cindex line-drawing characters (MS-DOS)
- Not all characters in DOS codepages correspond to ISO 8859
-characters---some are used for other purposes, such as box-drawing
-characters and other graphics. Emacs maps these characters to two
-special character sets called @code{eight-bit-control} and
-@code{eight-bit-graphic}, and displays them as their IBM glyphs.
-However, you should be aware that other systems might display these
-characters differently, so you should avoid them in text that might be
-copied to a different operating system, or even to another DOS machine
-that uses a different codepage.
-
-@vindex dos-unsupported-character-glyph
- Emacs supports many other characters sets aside from ISO 8859, but it
-cannot display them on MS-DOS. So if one of these multibyte characters
-appears in a buffer, Emacs on MS-DOS displays them as specified by the
-@code{dos-unsupported-character-glyph} variable; by default, this glyph
-is an empty triangle. Use the @kbd{C-u C-x =} command to display the
-actual code and character set of such characters. @xref{Position
-Info,,,emacs, the Emacs Manual}.
-
-@findex codepage-setup
- By default, Emacs defines a coding system to support the current
-codepage. To define a coding system for some other codepage (e.g., to
-visit a file written on a DOS machine in another country), use the
-@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
-the codepage, with completion, then creates the coding system for the
-specified codepage. You can then use the new coding system to read and
-write files, but you must specify it explicitly for the file command
-when you want to use it (@pxref{Text Coding,,,emacs, the Emacs Manual}).
-
- These coding systems are also useful for visiting a file encoded using
-a DOS codepage, using Emacs running on some other operating system.
-
-@cindex MS-Windows codepages
- MS-Windows provides its own codepages, which are different from the
-DOS codepages for the same locale. For example, DOS codepage 850
-supports the same character set as Windows codepage 1252; DOS codepage
-855 supports the same character set as Windows codepage 1251, etc.
-The MS-Windows version of Emacs uses the current codepage for display
-when invoked with the @samp{-nw} option. Support for codepages in the
-Windows port of Emacs is part of the @file{code-pages.el} package.
-
-@node MS-DOS Processes
-@section Subprocesses on MS-DOS
-
-@cindex compilation under MS-DOS
-@cindex inferior processes under MS-DOS
-@findex compile @r{(MS-DOS)}
-@findex grep @r{(MS-DOS)}
- Because MS-DOS is a single-process ``operating system,''
-asynchronous subprocesses are not available. In particular, Shell
-mode and its variants do not work. Most Emacs features that use
-asynchronous subprocesses also don't work on MS-DOS, including
-Shell mode and GUD. When in doubt, try and see; commands that
-don't work output an error message saying that asynchronous processes
-aren't supported.
-
- Compilation under Emacs with @kbd{M-x compile}, searching files with
-@kbd{M-x grep} and displaying differences between files with @kbd{M-x
-diff} do work, by running the inferior processes synchronously. This
-means you cannot do any more editing until the inferior process
-finishes.
-
- Spell checking also works, by means of special support for synchronous
-invocation of the @code{ispell} program. This is slower than the
-asynchronous invocation on other platforms
-
- Instead of the Shell mode, which doesn't work on MS-DOS, you can use
-the @kbd{M-x eshell} command. This invokes the Eshell package that
-implements a Posix-like shell entirely in Emacs Lisp.
-
- By contrast, Emacs compiled as a native Windows application
-@strong{does} support asynchronous subprocesses. @xref{Windows
-Processes,,,emacs, the Emacs Manual}.
-
-@cindex printing under MS-DOS
- Printing commands, such as @code{lpr-buffer}
-(@pxref{Printing,,,emacs, the Emacs Manual}) and
-@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}),
-work in MS-DOS by sending the output to one of the printer ports.
-@xref{MS-DOS Printing,,,emacs, the Emacs Manual}.
-
- When you run a subprocess synchronously on MS-DOS, make sure the
-program terminates and does not try to read keyboard input. If the
-program does not terminate on its own, you will be unable to terminate
-it, because MS-DOS provides no general way to terminate a process.
-Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
-cases.
-
- Accessing files on other machines is not supported on MS-DOS. Other
-network-oriented commands such as sending mail, Web browsing, remote
-login, etc., don't work either, unless network access is built into
-MS-DOS with some network redirector.
-
-@cindex directory listing on MS-DOS
-@vindex dired-listing-switches @r{(MS-DOS)}
- Dired on MS-DOS uses the @code{ls-lisp} package where other
-platforms use the system @code{ls} command. Therefore, Dired on
-MS-DOS supports only some of the possible options you can mention in
-the @code{dired-listing-switches} variable. The options that work are
-@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
-@samp{-s}, @samp{-t}, and @samp{-u}.
-
@node Index
@unnumbered Index
diff --git a/man/emacs.texi b/man/emacs.texi
index 95f7d5ad9ed..7843788a99b 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -42,7 +42,13 @@ Software Foundation raise funds for GNU development.''
@smallbook
-@setchapternewpage odd
+@c per rms and peterb, use 10pt fonts for the main text, mostly to
+@c save on paper cost. Also do not declare @setchapternewpage odd.
+@c Do this inside @tex for now, so current makeinfo does not complain.
+@tex
+@fonttextsize 10
+@end tex
+
@defcodeindex op
@synindex pg cp
@@ -127,7 +133,7 @@ and Sending Mail and Registers and Minibuffer.
* Glossary:: The glossary.
* Antinews:: Information about Emacs version 21.
* Mac OS:: Using Emacs in the Mac.
-* Emacs and Microsoft Windows:: Using Emacs on Microsoft Windows.
+* Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS.
* Manifesto:: What's GNU? Gnu's Not Unix!
* Acknowledgments:: Major contributors to GNU Emacs.
@@ -186,6 +192,10 @@ Advanced Features
* Maintaining:: Features for maintaining large programs.
* Abbrevs:: How to define text abbreviations to reduce
the number of characters you must type.
+@ifnottex
+* Picture Mode:: Editing pictures made up of characters using
+ the quarter-plane screen model.
+@end ifnottex
* Sending Mail:: Sending mail in Emacs.
* Rmail:: Reading mail in Emacs.
* Dired:: You can ``edit'' a directory to manage files in it.
@@ -626,6 +636,16 @@ Abbrevs
* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
+@ifnottex
+Editing Pictures
+
+* Basic Picture:: Basic concepts and simple commands of Picture Mode.
+* Insert in Picture:: Controlling direction of cursor motion
+ after "self-inserting" characters.
+* Tabs in Picture:: Various features for tab stops and indentation.
+* Rectangles in Picture:: Clearing and superimposing rectangles.
+@end ifnottex
+
Sending Mail
* Mail Format:: Format of the mail being composed.
@@ -921,8 +941,8 @@ This edition of the manual is intended for use with GNU Emacs
installed on GNU and Unix systems. GNU Emacs can also be used on VMS,
MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems.
Those systems use different file name syntax; in addition, VMS and
-MS-DOS do not support all GNU Emacs features. @xref{Emacs and
-Microsoft Windows}, for information about using Emacs on Windows.
+MS-DOS do not support all GNU Emacs features. @xref{Microsoft
+Windows}, for information about using Emacs on Windows.
@xref{Mac OS}, for information about using Emacs on Macintosh. We
don't try to describe VMS usage in this manual.
@end iftex
@@ -1131,6 +1151,9 @@ while running shell commands.
@include building.texi
@include maintaining.texi
@include abbrevs.texi
+@ifnottex
+@include picture-xtra.texi
+@end ifnottex
@include sending.texi
@include rmail.texi
@include dired.texi
diff --git a/man/emerge-xtra.texi b/man/emerge-xtra.texi
new file mode 100644
index 00000000000..3b5fe7cd17f
--- /dev/null
+++ b/man/emerge-xtra.texi
@@ -0,0 +1,414 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node Emerge
+@section Merging Files with Emerge
+@cindex Emerge
+@cindex merging files
+
+ It's not unusual for programmers to get their signals crossed and
+modify the same program in two different directions. To recover from
+this confusion, you need to merge the two versions. Emerge makes this
+easier. For other ways to compare files, see
+@iftex
+@ref{Comparing Files,,, emacs, the Emacs Manual},
+@end iftex
+@ifnottex
+@ref{Comparing Files},
+@end ifnottex
+and @ref{Top, Ediff,, ediff, The Ediff Manual}.
+
+@menu
+* Overview of Emerge:: How to start Emerge. Basic concepts.
+* Submodes of Emerge:: Fast mode vs. Edit mode.
+ Skip Prefers mode and Auto Advance mode.
+* State of Difference:: You do the merge by specifying state A or B
+ for each difference.
+* Merge Commands:: Commands for selecting a difference,
+ changing states of differences, etc.
+* Exiting Emerge:: What to do when you've finished the merge.
+* Combining in Emerge:: How to keep both alternatives for a difference.
+* Fine Points of Emerge:: Misc.
+@end menu
+
+@node Overview of Emerge
+@subsection Overview of Emerge
+
+ To start Emerge, run one of these four commands:
+
+@table @kbd
+@item M-x emerge-files
+@findex emerge-files
+Merge two specified files.
+
+@item M-x emerge-files-with-ancestor
+@findex emerge-files-with-ancestor
+Merge two specified files, with reference to a common ancestor.
+
+@item M-x emerge-buffers
+@findex emerge-buffers
+Merge two buffers.
+
+@item M-x emerge-buffers-with-ancestor
+@findex emerge-buffers-with-ancestor
+Merge two buffers with reference to a common ancestor in a third
+buffer.
+@end table
+
+@cindex merge buffer (Emerge)
+@cindex A and B buffers (Emerge)
+ The Emerge commands compare two files or buffers, and display the
+comparison in three buffers: one for each input text (the @dfn{A buffer}
+and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
+takes place. The merge buffer shows the full merged text, not just the
+differences. Wherever the two input texts differ, you can choose which
+one of them to include in the merge buffer.
+
+ The Emerge commands that take input from existing buffers use only
+the accessible portions of those buffers, if they are narrowed.
+@iftex
+@xref{Narrowing,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Narrowing}.
+@end ifnottex
+
+
+ If a common ancestor version is available, from which the two texts to
+be merged were both derived, Emerge can use it to guess which
+alternative is right. Wherever one current version agrees with the
+ancestor, Emerge presumes that the other current version is a deliberate
+change which should be kept in the merged version. Use the
+@samp{with-ancestor} commands if you want to specify a common ancestor
+text. These commands read three file or buffer names---variant A,
+variant B, and the common ancestor.
+
+ After the comparison is done and the buffers are prepared, the
+interactive merging starts. You control the merging by typing special
+@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
+For each run of differences between the input texts, you can choose
+which one of them to keep, or edit them both together.
+
+ The merge buffer uses a special major mode, Emerge mode, with commands
+for making these choices. But you can also edit the buffer with
+ordinary Emacs commands.
+
+ At any given time, the attention of Emerge is focused on one
+particular difference, called the @dfn{selected} difference. This
+difference is marked off in the three buffers like this:
+
+@example
+vvvvvvvvvvvvvvvvvvvv
+@var{text that differs}
+^^^^^^^^^^^^^^^^^^^^
+@end example
+
+@noindent
+Emerge numbers all the differences sequentially and the mode
+line always shows the number of the selected difference.
+
+ Normally, the merge buffer starts out with the A version of the text.
+But when the A version of a difference agrees with the common ancestor,
+then the B version is initially preferred for that difference.
+
+ Emerge leaves the merged text in the merge buffer when you exit. At
+that point, you can save it in a file with @kbd{C-x C-w}. If you give a
+numeric argument to @code{emerge-files} or
+@code{emerge-files-with-ancestor}, it reads the name of the output file
+using the minibuffer. (This is the last file name those commands read.)
+Then exiting from Emerge saves the merged text in the output file.
+
+ Normally, Emerge commands save the output buffer in its file when you
+exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
+save the output buffer, but you can save it yourself if you wish.
+
+@node Submodes of Emerge
+@subsection Submodes of Emerge
+
+ You can choose between two modes for giving merge commands: Fast mode
+and Edit mode. In Fast mode, basic merge commands are single
+characters, but ordinary Emacs commands are disabled. This is
+convenient if you use only merge commands. In Edit mode, all merge
+commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
+commands are also available. This allows editing the merge buffer, but
+slows down Emerge operations.
+
+ Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
+Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
+and @samp{F}.
+
+ Emerge has two additional submodes that affect how particular merge
+commands work: Auto Advance mode and Skip Prefers mode.
+
+ If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
+advance to the next difference. This lets you go through the merge
+faster as long as you simply choose one of the alternatives from the
+input. The mode line indicates Auto Advance mode with @samp{A}.
+
+ If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
+skip over differences in states prefer-A and prefer-B (@pxref{State of
+Difference}). Thus you see only differences for which neither version
+is presumed ``correct.'' The mode line indicates Skip Prefers mode with
+@samp{S}.
+
+@findex emerge-auto-advance-mode
+@findex emerge-skip-prefers-mode
+ Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
+clear Auto Advance mode. Use @kbd{s s}
+(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
+These commands turn on the mode with a positive argument, turns it off
+with a negative or zero argument, and toggle the mode with no argument.
+
+@node State of Difference
+@subsection State of a Difference
+
+ In the merge buffer, a difference is marked with lines of @samp{v} and
+@samp{^} characters. Each difference has one of these seven states:
+
+@table @asis
+@item A
+The difference is showing the A version. The @kbd{a} command always
+produces this state; the mode line indicates it with @samp{A}.
+
+@item B
+The difference is showing the B version. The @kbd{b} command always
+produces this state; the mode line indicates it with @samp{B}.
+
+@item default-A
+@itemx default-B
+The difference is showing the A or the B state by default, because you
+haven't made a choice. All differences start in the default-A state
+(and thus the merge buffer is a copy of the A buffer), except those for
+which one alternative is ``preferred'' (see below).
+
+When you select a difference, its state changes from default-A or
+default-B to plain A or B. Thus, the selected difference never has
+state default-A or default-B, and these states are never displayed in
+the mode line.
+
+The command @kbd{d a} chooses default-A as the default state, and @kbd{d
+b} chooses default-B. This chosen default applies to all differences
+which you haven't ever selected and for which no alternative is preferred.
+If you are moving through the merge sequentially, the differences you
+haven't selected are those following the selected one. Thus, while
+moving sequentially, you can effectively make the A version the default
+for some sections of the merge buffer and the B version the default for
+others by using @kbd{d a} and @kbd{d b} between sections.
+
+@item prefer-A
+@itemx prefer-B
+The difference is showing the A or B state because it is
+@dfn{preferred}. This means that you haven't made an explicit choice,
+but one alternative seems likely to be right because the other
+alternative agrees with the common ancestor. Thus, where the A buffer
+agrees with the common ancestor, the B version is preferred, because
+chances are it is the one that was actually changed.
+
+These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
+
+@item combined
+The difference is showing a combination of the A and B states, as a
+result of the @kbd{x c} or @kbd{x C} commands.
+
+Once a difference is in this state, the @kbd{a} and @kbd{b} commands
+don't do anything to it unless you give them a numeric argument.
+
+The mode line displays this state as @samp{comb}.
+@end table
+
+@node Merge Commands
+@subsection Merge Commands
+
+ Here are the Merge commands for Fast mode; in Edit mode, precede them
+with @kbd{C-c C-c}:
+
+@table @kbd
+@item p
+Select the previous difference.
+
+@item n
+Select the next difference.
+
+@item a
+Choose the A version of this difference.
+
+@item b
+Choose the B version of this difference.
+
+@item C-u @var{n} j
+Select difference number @var{n}.
+
+@item .
+Select the difference containing point. You can use this command in the
+merge buffer or in the A or B buffer.
+
+@item q
+Quit---finish the merge.
+
+@item C-]
+Abort---exit merging and do not save the output.
+
+@item f
+Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
+
+@item e
+Go into Edit mode.
+
+@item l
+Recenter (like @kbd{C-l}) all three windows.
+
+@item -
+Specify part of a prefix numeric argument.
+
+@item @var{digit}
+Also specify part of a prefix numeric argument.
+
+@item d a
+Choose the A version as the default from here down in
+the merge buffer.
+
+@item d b
+Choose the B version as the default from here down in
+the merge buffer.
+
+@item c a
+Copy the A version of this difference into the kill ring.
+
+@item c b
+Copy the B version of this difference into the kill ring.
+
+@item i a
+Insert the A version of this difference at point.
+
+@item i b
+Insert the B version of this difference at point.
+
+@item m
+Put point and mark around the difference.
+
+@item ^
+Scroll all three windows down (like @kbd{M-v}).
+
+@item v
+Scroll all three windows up (like @kbd{C-v}).
+
+@item <
+Scroll all three windows left (like @kbd{C-x <}).
+
+@item >
+Scroll all three windows right (like @kbd{C-x >}).
+
+@item |
+Reset horizontal scroll on all three windows.
+
+@item x 1
+Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
+to full size.)
+
+@item x c
+Combine the two versions of this difference (@pxref{Combining in
+Emerge}).
+
+@item x f
+Show the names of the files/buffers Emerge is operating on, in a Help
+window. (Use @kbd{C-u l} to restore windows.)
+
+@item x j
+Join this difference with the following one.
+(@kbd{C-u x j} joins this difference with the previous one.)
+
+@item x s
+Split this difference into two differences. Before you use this
+command, position point in each of the three buffers at the place where
+you want to split the difference.
+
+@item x t
+Trim identical lines off the top and bottom of the difference.
+Such lines occur when the A and B versions are
+identical but differ from the ancestor version.
+@end table
+
+@node Exiting Emerge
+@subsection Exiting Emerge
+
+ The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
+the results into the output file if you specified one. It restores the
+A and B buffers to their proper contents, or kills them if they were
+created by Emerge and you haven't changed them. It also disables the
+Emerge commands in the merge buffer, since executing them later could
+damage the contents of the various buffers.
+
+ @kbd{C-]} aborts the merge. This means exiting without writing the
+output file. If you didn't specify an output file, then there is no
+real difference between aborting and finishing the merge.
+
+ If the Emerge command was called from another Lisp program, then its
+return value is @code{t} for successful completion, or @code{nil} if you
+abort.
+
+@node Combining in Emerge
+@subsection Combining the Two Versions
+
+ Sometimes you want to keep @emph{both} alternatives for a particular
+difference. To do this, use @kbd{x c}, which edits the merge buffer
+like this:
+
+@example
+@group
+#ifdef NEW
+@var{version from A buffer}
+#else /* not NEW */
+@var{version from B buffer}
+#endif /* not NEW */
+@end group
+@end example
+
+@noindent
+@vindex emerge-combine-versions-template
+While this example shows C preprocessor conditionals delimiting the two
+alternative versions, you can specify the strings to use by setting
+the variable @code{emerge-combine-versions-template} to a string of your
+choice. In the string, @samp{%a} says where to put version A, and
+@samp{%b} says where to put version B. The default setting, which
+produces the results shown above, looks like this:
+
+@example
+@group
+"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
+@end group
+@end example
+
+@node Fine Points of Emerge
+@subsection Fine Points of Emerge
+
+ During the merge, you mustn't try to edit the A and B buffers yourself.
+Emerge modifies them temporarily, but ultimately puts them back the way
+they were.
+
+ You can have any number of merges going at once---just don't use any one
+buffer as input to more than one merge at once, since the temporary
+changes made in these buffers would get in each other's way.
+
+ Starting Emerge can take a long time because it needs to compare the
+files fully. Emacs can't do anything else until @code{diff} finishes.
+Perhaps in the future someone will change Emerge to do the comparison in
+the background when the input files are large---then you could keep on
+doing other things with Emacs until Emerge is ready to accept
+commands.
+
+@vindex emerge-startup-hook
+ After setting up the merge, Emerge runs the hook
+@code{emerge-startup-hook}.
+@iftex
+@xref{Hooks,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Hooks}.
+@end ifnottex
+
+@ignore
+ arch-tag: cda63f09-9c5f-4ea1-adb9-4a820fdfb24e
+@end ignore
diff --git a/man/faq.texi b/man/faq.texi
index a2ec12f6408..3fa69aa4395 100644
--- a/man/faq.texi
+++ b/man/faq.texi
@@ -2229,7 +2229,7 @@ otherwise. @inforef{Frame Commands, Frame Commands, emacs}.
@cindex Regexps
@cindex Regular expressions
@cindex Differences between Unix and Emacs regexps
-@cindex Unix regeps, differences from Emacs
+@cindex Unix regexps, differences from Emacs
@cindex Text strings, putting regexps in
@inforef{Regexp Backslash, Regexp Backslash, emacs}.
@@ -2261,15 +2261,35 @@ is actually typical for regexp syntax.)
@cindex Replacing strings across files
@cindex Multiple files, replacing across
@cindex Files, replacing strings across multiple
+@cindex Recursive search/replace operations
-The ``tags'' feature of Emacs includes the command
-@code{tags-query-replace} which performs a query-replace across all the
-files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search,
-emacs}.
+As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x
+d}) supports the command @code{dired-do-query-replace} (@kbd{Q}), which
+allows users to replace regular expressions in multiple files.
+
+You can use this command to perform search/replace operations on
+multiple files by following the following steps:
+
+@itemize @bullet
+@item
+Assemble a list of files you want to operate on with either
+@code{find-dired}, @code{find-name-dired} or @code{find-grep-dired}.
+
+@item
+Mark all files in the resulting Dired buffer using @kbd{t}.
+
+@item
+Use @kbd{Q} to start a @code{query-replace-regexp} session on the marked
+files.
+
+@item
+To accept all replacements in each file, hit @kbd{!}.
+@end itemize
-As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d})
-supports the command @code{dired-do-query-replace} (@kbd{Q}), which allows
-users to replace regular expressions in multiple files.
+Another way to do the same thing is to use the ``tags'' feature of
+Emacs: it includes the command @code{tags-query-replace} which performs
+a query-replace across all the files mentioned in the @file{TAGS} file.
+@inforef{Tags Search, Tags Search, emacs}.
@node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests
@section Where is the documentation for @code{etags}?
@@ -3474,7 +3494,7 @@ see @ref{Packages that do not come with Emacs}.
@uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.html, The Emacs Lisp
List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen},
aims to provide one compact list with links to all of the current Emacs
-Lisp files on the internet. The ELL can be browsed over the web, or
+Lisp files on the Internet. The ELL can be browsed over the web, or
from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el,
the @file{ell} package}.
diff --git a/man/files.texi b/man/files.texi
index be9f4443418..ad90a2758b2 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -25,6 +25,9 @@ on file directories.
* Visiting:: Visiting a file prepares Emacs to edit the file.
* Saving:: Saving makes your changes permanent.
* Reverting:: Reverting cancels all the changes not saved.
+@ifnottex
+* Autorevert:: Auto Reverting non-file buffers.
+@end ifnottex
* Auto Save:: Auto Save periodically protects against loss of data.
* File Aliases:: Handling multiple names for one file.
* Version Control:: Version control systems (RCS, CVS and SCCS).
@@ -107,10 +110,13 @@ first slash in the double slash; the result is @samp{/x1/rms/foo}.
@cindex home directory shorthand
You can use @file{~/} in a file name to mean your home directory,
or @file{~@var{user-id}/} to mean the home directory of a user whose
-login name is @code{user-id}. (On DOS and Windows systems, where a user
-doesn't have a home directory, Emacs substitutes @file{~/} with the
-value of the environment variable @code{HOME}; see @ref{General
-Variables}.)
+login name is @code{user-id}@footnote{
+On MS-Windows and MS-DOS systems, where a user doesn't have a home
+directory, Emacs substitutes @file{~/} with the value of the
+environment variable @code{HOME}; see @ref{General Variables}. The
+@file{~@var{user-id}/} construct is supported on those systems only
+for the current user, i.e., only if @var{user-id} is the current
+user's login name.}.
@cindex environment variables in file names
@cindex expansion of environment variables
@@ -518,8 +524,14 @@ value is @code{t}, so that Emacs does write backup files.
Control}), the variable @code{vc-make-backup-files} determines whether
to make backup files. By default it is @code{nil}, since backup files
are redundant when you store all the previous versions in a version
-control system. @xref{General VC Options,,,emacs-xtra, Specialized
-Emacs Features}.
+control system.
+@iftex
+@xref{General VC Options,,,emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{General VC Options}.
+@end ifnottex
+
At your option, Emacs can keep either a single backup for each file,
or make a series of numbered backup files for each file that you edit.
@@ -973,6 +985,10 @@ modes do not check or revert remote files.
@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
visit files under version control.
+@ifnottex
+@include arevert-xtra.texi
+@end ifnottex
+
@node Auto Save
@section Auto-Saving: Protection Against Disasters
@cindex Auto Save mode
@@ -1202,7 +1218,13 @@ 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}
+@iftex
(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Customizing VC}).
+@end ifnottex
+
@menu
* Introduction to VC:: How version control works in general.
@@ -1211,6 +1233,12 @@ customizable variable @code{vc-handled-backends} to @code{nil}
* Old Versions:: Examining and comparing old versions.
* Secondary VC Commands:: The commands used a little less frequently.
* Branches:: Multiple lines of development.
+@ifnottex
+* Remote Repositories:: Efficient access to remote CVS 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.
+@end ifnottex
@end menu
@node Introduction to VC
@@ -1348,7 +1376,13 @@ permitted; check-in is still the way to record a new version.
CVS normally allows each user to modify his own copy of the work file
at any time, but requires merging with changes from other users at
check-in time. However, CVS can also be set up to require locking.
+@iftex
(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{CVS Options}).
+@end ifnottex
+
@node Types of Log File
@subsubsection Types of Log File
@@ -1380,8 +1414,14 @@ for each change just once, then put it into both logs. You can write
the entry in @file{ChangeLog}, then copy it to the log buffer when you
check in the change. Or you can write the entry in the log buffer
while checking in the change, and later use the @kbd{C-x v a} command
-to copy it to @file{ChangeLog} (@pxref{Change Logs and
-VC,,,emacs-xtra, Specialized Emacs Features}).
+to copy it to @file{ChangeLog}
+@iftex
+(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Change Logs and VC}).
+@end ifnottex
+
@node VC Mode Line
@subsection Version Control and the Mode Line
@@ -1545,8 +1585,15 @@ the repository.
@cindex specific version control system
Instead of the version number, 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 (@pxref{Local
-Version Control,,,emacs-xtra, Specialized Emacs Features}).
+with two version control systems at the same time
+@iftex
+(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs
+Features}).
+@end iftex
+@ifnottex
+(@pxref{Local Version Control}).
+@end ifnottex
+
@end itemize
@node Log Buffer
@@ -1568,16 +1615,27 @@ control, you can generate the Log Edit text from the ChangeLog using
entries for the file(s) concerned in the top entry in the ChangeLog
and uses those paragraphs as the log text. This text is only inserted
if the top entry was made under your user name on the current date.
+@iftex
@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{Change Logs and VC},
+@end ifnottex
for the opposite way of working---generating ChangeLog entries from
the revision control log.
In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x
log-edit-show-files}) shows the list of files to be committed in case
you need to check that. (This can be a list of more than one file if
-you use VC Dired mode or PCL-CVS. @xref{VC Dired Mode,,,emacs-xtra,
-Specialized Emacs Features}, and @ref{Top, , About PCL-CVS, pcl-cvs,
-PCL-CVS --- The Emacs Front-End to CVS}.)
+you use VC Dired mode or PCL-CVS.
+@iftex
+@xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{VC Dired Mode},
+@end ifnottex
+and @ref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs
+Front-End to CVS}.)
When you have finished editing the log message, type @kbd{C-c C-c} to
exit the buffer and commit the change.
@@ -1645,7 +1703,13 @@ Both forms display the output in a special buffer in another window.
You can specify a checked-in version by its number; 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
-(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) instead of one or both version numbers.
+@iftex
+(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features})
+@end iftex
+@ifnottex
+(@pxref{Snapshots})
+@end ifnottex
+instead of one or both version numbers.
If you supply a directory name instead of the name of a registered
file, this command compares the two specified versions of all registered
@@ -1734,6 +1798,10 @@ use once a day.
* Registering:: Putting a file under version control.
* VC Status:: Viewing the VC status of files.
* VC Undo:: Canceling changes before or after check-in.
+@ifnottex
+* VC Dired Mode:: Listing files managed by version control.
+* VC Dired Commands:: Commands to use in a VC Dired buffer.
+@end ifnottex
@end menu
@node Registering
@@ -1754,8 +1822,13 @@ to use for it. If the file's directory already contains files
registered in a version control system, Emacs uses that system. If
there is more than one system in use for a directory, Emacs uses the
one that appears first in @code{vc-handled-backends}
-(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). On
-the other hand, if there are no files already registered, Emacs uses
+@iftex
+(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Customizing VC}).
+@end ifnottex
+On the other hand, if there are no files already registered, Emacs uses
the first system from @code{vc-handled-backends} that could register
the file (for example, you cannot register a file under CVS if its
directory is not already part of a CVS tree); with the default value
@@ -1815,16 +1888,27 @@ count.
@item P
Move to the log of the previous file, when the logs of multiple files
-are in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized
-Emacs Features}). Otherwise, just move to the beginning of the log. A
-numeric prefix argument is a repeat count, so @kbd{C-u 10 P} would
-move backward 10 files.
+are in the log buffer
+@iftex
+(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{VC Dired Mode}).
+@end ifnottex
+Otherwise, just move to the beginning of the log. A numeric prefix
+argument is a repeat count, so @kbd{C-u 10 P} would move backward 10
+files.
@item N
Move to the log of the next file, when the logs of multiple files are
-in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized
-Emacs Features}). It also takes a numeric prefix argument as a repeat
-count.
+in the log buffer
+@iftex
+(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{VC Dired Mode}).
+@end ifnottex
+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
@@ -1878,11 +1962,16 @@ 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 (@pxref{Version
-Headers,,,emacs-xtra, Specialized Emacs Features}). 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.
+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
@@ -1894,6 +1983,13 @@ confirmation with @kbd{yes}. Note also that this command is disabled
under CVS, because canceling versions is very dangerous and discouraged
with CVS.
+@ifnottex
+@c vc1-xtra.texi needs extra level of lowering.
+@lowersections
+@include vc1-xtra.texi
+@raisesections
+@end ifnottex
+
@node Branches
@subsection Multiple Branches of a File
@cindex branch (version control)
@@ -2072,10 +2168,15 @@ own choice of selected versions, but all share the same common RCS
records.
This technique works reliably and automatically, provided that the
-source files contain RCS version headers (@pxref{Version
-Headers,,,emacs-xtra, Specialized Emacs Features}). The headers enable
-Emacs to be sure, at all times, which version number is present in the
-work file.
+source files contain RCS version headers
+@iftex
+(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@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.
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,
@@ -2083,6 +2184,10 @@ 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
during this particular editing session.
+@ifnottex
+@include vc2-xtra.texi
+@end ifnottex
+
@node Directories
@section File Directories
@@ -2205,8 +2310,14 @@ typically the result of a failed merge from a version control system
mode provides commands to resolve conflicts by selecting specific
changes.
- @inforef{Emerge,, emacs-xtra} for the Emerge facility, which
-provides a powerful interface for merging files.
+@iftex
+@xref{Emerge,,, emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{Emerge},
+@end ifnottex
+for the Emerge facility, which provides a powerful interface for
+merging files.
@node Diff Mode
@section Diff Mode
@@ -2214,10 +2325,10 @@ provides a powerful interface for merging files.
@findex diff-mode
@cindex patches, editing
- The @samp{*diff*} buffer uses Diff mode (@pxref{Diff Mode}). Diff
-mode is also useful for editing patches and comparisons produced by
-the @command{diff} program. To select Diff mode manually, type
-@kbd{M-x diff-mode}.
+ Diff mode is used for the output of @kbd{M-x diff}; it is also
+useful for editing patches and comparisons produced by the
+@command{diff} program. To select Diff mode manually, type @kbd{M-x
+diff-mode}.
One general feature of Diff mode is that manual edits to the patch
automatically correct line numbers, including those in the hunk
@@ -2397,7 +2508,7 @@ compiling it.
@findex auto-compression-mode
@vindex auto-compression-mode
To disable this feature, type the command @kbd{M-x
-auto-compression-mode}. You can disenable it permanently by
+auto-compression-mode}. You can disable it permanently by
customizing the variable @code{auto-compression-mode}.
@node File Archives
diff --git a/man/fortran-xtra.texi b/man/fortran-xtra.texi
new file mode 100644
index 00000000000..f157013f1d6
--- /dev/null
+++ b/man/fortran-xtra.texi
@@ -0,0 +1,548 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node Fortran
+@section Fortran Mode
+@cindex Fortran mode
+@cindex mode, Fortran
+
+ Fortran mode provides special motion commands for Fortran statements
+and subprograms, and indentation commands that understand Fortran
+conventions of nesting, line numbers and continuation statements.
+Fortran mode has support for Auto Fill mode that breaks long lines into
+proper Fortran continuation lines.
+
+ Special commands for comments are provided because Fortran comments
+are unlike those of other languages. Built-in abbrevs optionally save
+typing when you insert Fortran keywords.
+
+ Use @kbd{M-x fortran-mode} to switch to this major mode. This
+command runs the hook @code{fortran-mode-hook}.
+@iftex
+@xref{Hooks,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Hooks}.
+@end ifnottex
+
+@cindex Fortran77 and Fortran90
+@findex f90-mode
+@findex fortran-mode
+ Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
+``tab format'') source code. For editing the modern Fortran90 or
+Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
+Emacs normally uses Fortran mode for files with extension @samp{.f},
+@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
+@samp{.f95}. GNU Fortran supports both kinds of format.
+
+@menu
+* Motion: Fortran Motion. Moving point by statements or subprograms.
+* Indent: Fortran Indent. Indentation commands for Fortran.
+* Comments: Fortran Comments. Inserting and aligning comments.
+* Autofill: Fortran Autofill. Auto fill support for Fortran.
+* Columns: Fortran Columns. Measuring columns for valid Fortran.
+* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
+@end menu
+
+@node Fortran Motion
+@subsection Motion Commands
+
+ In addition to the normal commands for moving by and operating on
+``defuns'' (Fortran subprograms---functions and subroutines, as well as
+modules for F90 mode), Fortran mode provides special commands to move by
+statements and other program units.
+
+@table @kbd
+@kindex C-c C-n @r{(Fortran mode)}
+@findex fortran-next-statement
+@findex f90-next-statement
+@item C-c C-n
+Move to the beginning of the next statement
+(@code{fortran-next-statement}/@code{f90-next-statement}).
+
+@kindex C-c C-p @r{(Fortran mode)}
+@findex fortran-previous-statement
+@findex f90-previous-statement
+@item C-c C-p
+Move to the beginning of the previous statement
+(@code{fortran-previous-statement}/@code{f90-previous-statement}).
+If there is no previous statement (i.e. if called from the first
+statement in the buffer), move to the start of the buffer.
+
+@kindex C-c C-e @r{(F90 mode)}
+@findex f90-next-block
+@item C-c C-e
+Move point forward to the start of the next code block
+(@code{f90-next-block}). A code block is a subroutine,
+@code{if}--@code{endif} statement, and so forth. This command exists
+for F90 mode only, not Fortran mode. With a numeric argument, this
+moves forward that many blocks.
+
+@kindex C-c C-a @r{(F90 mode)}
+@findex f90-previous-block
+@item C-c C-a
+Move point backward to the previous code block
+(@code{f90-previous-block}). This is like @code{f90-next-block}, but
+moves backwards.
+
+@kindex C-M-n @r{(Fortran mode)}
+@findex fortran-end-of-block
+@findex f90-end-of-block
+@item C-M-n
+Move to the end of the current code block
+(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
+argument, move forward that number of blocks. The mark is set before
+moving point. The F90 mode version of this command checks for
+consistency of block types and labels (if present), but it does not
+check the outermost block since that may be incomplete.
+
+@kindex C-M-p @r{(Fortran mode)}
+@findex fortran-beginning-of-block
+@findex f90-beginning-of-block
+@item C-M-p
+Move to the start of the current code block
+(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
+is like @code{fortran-end-of-block}, but moves backwards.
+@end table
+
+@node Fortran Indent
+@subsection Fortran Indentation
+
+ Special commands and features are needed for indenting Fortran code in
+order to make sure various syntactic entities (line numbers, comment line
+indicators and continuation line flags) appear in the columns that are
+required for standard, fixed (or tab) format Fortran.
+
+@menu
+* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
+* Contline: ForIndent Cont. How continuation lines indent.
+* Numbers: ForIndent Num. How line numbers auto-indent.
+* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
+* Vars: ForIndent Vars. Variables controlling Fortran indent style.
+@end menu
+
+@node ForIndent Commands
+@subsubsection Fortran Indentation and Filling Commands
+
+@table @kbd
+@item C-M-j
+Break the current line at point and set up a continuation line
+(@code{fortran-split-line}).
+@item M-^
+Join this line to the previous line (@code{fortran-join-line}).
+@item C-M-q
+Indent all the lines of the subprogram point is in
+(@code{fortran-indent-subprogram}).
+@item M-q
+Fill a comment block or statement.
+@end table
+
+@kindex C-M-q @r{(Fortran mode)}
+@findex fortran-indent-subprogram
+ The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
+to reindent all the lines of the Fortran subprogram (function or
+subroutine) containing point.
+
+@kindex C-M-j @r{(Fortran mode)}
+@findex fortran-split-line
+ The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
+a line in the appropriate fashion for Fortran. In a non-comment line,
+the second half becomes a continuation line and is indented
+accordingly. In a comment line, both halves become separate comment
+lines.
+
+@kindex M-^ @r{(Fortran mode)}
+@kindex C-c C-d @r{(Fortran mode)}
+@findex fortran-join-line
+ @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
+which joins a continuation line back to the previous line, roughly as
+the inverse of @code{fortran-split-line}. The point must be on a
+continuation line when this command is invoked.
+
+@kindex M-q @r{(Fortran mode)}
+@kbd{M-q} in Fortran mode fills the comment block or statement that
+point is in. This removes any excess statement continuations.
+
+@node ForIndent Cont
+@subsubsection Continuation Lines
+@cindex Fortran continuation lines
+
+@vindex fortran-continuation-string
+ Most Fortran77 compilers allow two ways of writing continuation lines.
+If the first non-space character on a line is in column 5, then that
+line is a continuation of the previous line. We call this @dfn{fixed
+format}. (In GNU Emacs we always count columns from 0; but note that
+the Fortran standard counts from 1.) The variable
+@code{fortran-continuation-string} specifies what character to put in
+column 5. A line that starts with a tab character followed by any digit
+except @samp{0} is also a continuation line. We call this style of
+continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
+with another style of continuation lines).
+
+@vindex indent-tabs-mode @r{(Fortran mode)}
+@vindex fortran-analyze-depth
+@vindex fortran-tab-mode-default
+ Fortran mode can use either style of continuation line. When you
+enter Fortran mode, it tries to deduce the proper continuation style
+automatically from the buffer contents. It does this by scanning up to
+@code{fortran-analyze-depth} (default 100) lines from the start of the
+buffer. The first line that begins with either a tab character or six
+spaces determines the choice. If the scan fails (for example, if the
+buffer is new and therefore empty), the value of
+@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
+non-@code{nil} for tab format) is used. @samp{/t} in the mode line
+indicates tab format is selected. Fortran mode sets the value of
+@code{indent-tabs-mode} accordingly.
+
+ If the text on a line starts with the Fortran continuation marker
+@samp{$}, or if it begins with any non-whitespace character in column
+5, Fortran mode treats it as a continuation line. When you indent a
+continuation line with @key{TAB}, it converts the line to the current
+continuation style. When you split a Fortran statement with
+@kbd{C-M-j}, the continuation marker on the newline is created according
+to the continuation style.
+
+ The setting of continuation style affects several other aspects of
+editing in Fortran mode. In fixed format mode, the minimum column
+number for the body of a statement is 6. Lines inside of Fortran
+blocks that are indented to larger column numbers always use only the
+space character for whitespace. In tab format mode, the minimum
+column number for the statement body is 8, and the whitespace before
+column 8 must always consist of one tab character.
+
+@node ForIndent Num
+@subsubsection Line Numbers
+
+ If a number is the first non-whitespace in the line, Fortran
+indentation assumes it is a line number and moves it to columns 0
+through 4. (Columns always count from 0 in GNU Emacs.)
+
+@vindex fortran-line-number-indent
+ Line numbers of four digits or less are normally indented one space.
+The variable @code{fortran-line-number-indent} controls this; it
+specifies the maximum indentation a line number can have. The default
+value of the variable is 1. Fortran mode tries to prevent line number
+digits passing column 4, reducing the indentation below the specified
+maximum if necessary. If @code{fortran-line-number-indent} has the
+value 5, line numbers are right-justified to end in column 4.
+
+@vindex fortran-electric-line-number
+ Simply inserting a line number is enough to indent it according to
+these rules. As each digit is inserted, the indentation is recomputed.
+To turn off this feature, set the variable
+@code{fortran-electric-line-number} to @code{nil}.
+
+
+@node ForIndent Conv
+@subsubsection Syntactic Conventions
+
+ Fortran mode assumes that you follow certain conventions that simplify
+the task of understanding a Fortran program well enough to indent it
+properly:
+
+@itemize @bullet
+@item
+Two nested @samp{do} loops never share a @samp{continue} statement.
+
+@item
+Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
+and others are written without embedded whitespace or line breaks.
+
+Fortran compilers generally ignore whitespace outside of string
+constants, but Fortran mode does not recognize these keywords if they
+are not contiguous. Constructs such as @samp{else if} or @samp{end do}
+are acceptable, but the second word should be on the same line as the
+first and not on a continuation line.
+@end itemize
+
+@noindent
+If you fail to follow these conventions, the indentation commands may
+indent some lines unaesthetically. However, a correct Fortran program
+retains its meaning when reindented even if the conventions are not
+followed.
+
+@node ForIndent Vars
+@subsubsection Variables for Fortran Indentation
+
+@vindex fortran-do-indent
+@vindex fortran-if-indent
+@vindex fortran-structure-indent
+@vindex fortran-continuation-indent
+@vindex fortran-check-all-num@dots{}
+@vindex fortran-minimum-statement-indent@dots{}
+ Several additional variables control how Fortran indentation works:
+
+@table @code
+@item fortran-do-indent
+Extra indentation within each level of @samp{do} statement (default 3).
+
+@item fortran-if-indent
+Extra indentation within each level of @samp{if}, @samp{select case}, or
+@samp{where} statements (default 3).
+
+@item fortran-structure-indent
+Extra indentation within each level of @samp{structure}, @samp{union},
+@samp{map}, or @samp{interface} statements (default 3).
+
+@item fortran-continuation-indent
+Extra indentation for bodies of continuation lines (default 5).
+
+@item fortran-check-all-num-for-matching-do
+In Fortran77, a numbered @samp{do} statement is ended by any statement
+with a matching line number. It is common (but not compulsory) to use a
+@samp{continue} statement for this purpose. If this variable has a
+non-@code{nil} value, indenting any numbered statement must check for a
+@samp{do} that ends there. If you always end @samp{do} statements with
+a @samp{continue} line (or if you use the more modern @samp{enddo}),
+then you can speed up indentation by setting this variable to
+@code{nil}. The default is @code{nil}.
+
+@item fortran-blink-matching-if
+If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
+statement moves the cursor momentarily to the matching @samp{if} (or
+@samp{do}) statement to show where it is. The default is @code{nil}.
+
+@item fortran-minimum-statement-indent-fixed
+Minimum indentation for Fortran statements when using fixed format
+continuation line style. Statement bodies are never indented less than
+this much. The default is 6.
+
+@item fortran-minimum-statement-indent-tab
+Minimum indentation for Fortran statements for tab format continuation line
+style. Statement bodies are never indented less than this much. The
+default is 8.
+@end table
+
+The variables controlling the indentation of comments are described in
+the following section.
+
+@node Fortran Comments
+@subsection Fortran Comments
+
+ The usual Emacs comment commands assume that a comment can follow a
+line of code. In Fortran77, the standard comment syntax requires an
+entire line to be just a comment. Therefore, Fortran mode replaces the
+standard Emacs comment commands and defines some new variables.
+
+@vindex fortran-comment-line-start
+ Fortran mode can also handle the Fortran90 comment syntax where comments
+start with @samp{!} and can follow other text. Because only some Fortran77
+compilers accept this syntax, Fortran mode will not insert such comments
+unless you have said in advance to do so. To do this, set the variable
+@code{fortran-comment-line-start} to @samp{"!"}.
+
+@table @kbd
+@item M-;
+Align comment or insert new comment (@code{fortran-indent-comment}).
+
+@item C-x ;
+Applies to nonstandard @samp{!} comments only.
+
+@item C-c ;
+Turn all lines of the region into comments, or (with argument) turn them back
+into real code (@code{fortran-comment-region}).
+@end table
+
+@findex fortran-indent-comment
+ @kbd{M-;} in Fortran mode is redefined as the command
+@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
+recognizes any kind of existing comment and aligns its text appropriately;
+if there is no existing comment, a comment is inserted and aligned. But
+inserting and aligning comments are not the same in Fortran mode as in
+other modes.
+
+ When a new comment must be inserted, if the current line is blank, a
+full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
+comment is inserted if you have said you want to use them. Otherwise a
+full-line comment is inserted on a new line before the current line.
+
+ Nonstandard @samp{!} comments are aligned like comments in other
+languages, but full-line comments are different. In a standard full-line
+comment, the comment delimiter itself must always appear in column zero.
+What can be aligned is the text within the comment. You can choose from
+three styles of alignment by setting the variable
+@code{fortran-comment-indent-style} to one of these values:
+
+@vindex fortran-comment-indent-style
+@vindex fortran-comment-line-extra-indent
+@table @code
+@item fixed
+Align the text at a fixed column, which is the sum of
+@code{fortran-comment-line-extra-indent} and the minimum statement
+indentation. This is the default.
+
+The minimum statement indentation is
+@code{fortran-minimum-statement-indent-fixed} for fixed format
+continuation line style and @code{fortran-minimum-statement-indent-tab}
+for tab format style.
+
+@item relative
+Align the text as if it were a line of code, but with an additional
+@code{fortran-comment-line-extra-indent} columns of indentation.
+
+@item nil
+Don't move text in full-line comments automatically.
+@end table
+
+@vindex fortran-comment-indent-char
+ In addition, you can specify the character to be used to indent within
+full-line comments by setting the variable
+@code{fortran-comment-indent-char} to the single-character string you want
+to use.
+
+@vindex fortran-directive-re
+ Compiler directive lines, or preprocessor lines, have much the same
+appearance as comment lines. It is important, though, that such lines
+never be indented at all, no matter what the value of
+@code{fortran-comment-indent-style}. The variable
+@code{fortran-directive-re} is a regular expression that specifies which
+lines are directives. Matching lines are never indented, and receive
+distinctive font-locking.
+
+ The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
+you use @samp{!} comments, this command can be used with them. Otherwise
+it is useless in Fortran mode.
+
+@kindex C-c ; @r{(Fortran mode)}
+@findex fortran-comment-region
+@vindex fortran-comment-region
+ The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
+lines of the region into comments by inserting the string @samp{C$$$} at
+the front of each one. With a numeric argument, it turns the region
+back into live code by deleting @samp{C$$$} from the front of each line
+in it. The string used for these comments can be controlled by setting
+the variable @code{fortran-comment-region}. Note that here we have an
+example of a command and a variable with the same name; these two uses
+of the name never conflict because in Lisp and in Emacs it is always
+clear from the context which one is meant.
+
+@node Fortran Autofill
+@subsection Auto Fill in Fortran Mode
+
+ Fortran mode has specialized support for Auto Fill mode, which is a
+minor mode that automatically splits statements as you insert them
+when they become too wide. Splitting a statement involves making
+continuation lines using @code{fortran-continuation-string}
+(@pxref{ForIndent Cont}). This splitting happens when you type
+@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
+indentation commands. You activate Auto Fill in Fortran mode in the
+normal way.
+@iftex
+@xref{Auto Fill,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Auto Fill}.
+@end ifnottex
+
+@vindex fortran-break-before-delimiters
+ Auto Fill breaks lines at spaces or delimiters when the lines get
+longer than the desired width (the value of @code{fill-column}). The
+delimiters (besides whitespace) that Auto Fill can break at are
+@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
+and @samp{,}. The line break comes after the delimiter if the
+variable @code{fortran-break-before-delimiters} is @code{nil}.
+Otherwise (and by default), the break comes before the delimiter.
+
+ To enable Auto Fill in all Fortran buffers, add
+@code{turn-on-auto-fill} to @code{fortran-mode-hook}.
+@iftex
+@xref{Hooks,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Hooks}.
+@end ifnottex
+
+@node Fortran Columns
+@subsection Checking Columns in Fortran
+
+@table @kbd
+@item C-c C-r
+Display a ``column ruler'' momentarily above the current line
+(@code{fortran-column-ruler}).
+@item C-c C-w
+Split the current window horizontally temporarily so that it is 72
+columns wide (@code{fortran-window-create-momentarily}). This may
+help you avoid making lines longer than the 72-character limit that
+some Fortran compilers impose.
+@item C-u C-c C-w
+Split the current window horizontally so that it is 72 columns wide
+(@code{fortran-window-create}). You can then continue editing.
+@item M-x fortran-strip-sequence-nos
+Delete all text in column 72 and beyond.
+@end table
+
+@kindex C-c C-r @r{(Fortran mode)}
+@findex fortran-column-ruler
+ The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
+ruler momentarily above the current line. The comment ruler is two lines
+of text that show you the locations of columns with special significance in
+Fortran programs. Square brackets show the limits of the columns for line
+numbers, and curly brackets show the limits of the columns for the
+statement body. Column numbers appear above them.
+
+ Note that the column numbers count from zero, as always in GNU Emacs.
+As a result, the numbers may be one less than those you are familiar
+with; but the positions they indicate in the line are standard for
+Fortran.
+
+@vindex fortran-column-ruler-fixed
+@vindex fortran-column-ruler-tabs
+ The text used to display the column ruler depends on the value of the
+variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
+@code{nil}, then the value of the variable
+@code{fortran-column-ruler-fixed} is used as the column ruler.
+Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
+displayed. By changing these variables, you can change the column ruler
+display.
+
+@kindex C-c C-w @r{(Fortran mode)}
+@findex fortran-window-create-momentarily
+ @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
+splits the current window horizontally, making a window 72 columns
+wide, so you can see any lines that are too long. Type a space to
+restore the normal width.
+
+@kindex C-u C-c C-w @r{(Fortran mode)}
+@findex fortran-window-create
+ You can also split the window horizontally and continue editing with
+the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
+fortran-window-create}). By editing in this window you can
+immediately see when you make a line too wide to be correct Fortran.
+
+@findex fortran-strip-sequence-nos
+ The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
+column 72 and beyond, on all lines in the current buffer. This is the
+easiest way to get rid of old sequence numbers.
+
+@node Fortran Abbrev
+@subsection Fortran Keyword Abbrevs
+
+ Fortran mode provides many built-in abbrevs for common keywords and
+declarations. These are the same sort of abbrev that you can define
+yourself. To use them, you must turn on Abbrev mode.
+@iftex
+@xref{Abbrevs,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Abbrevs}.
+@end ifnottex
+
+ The built-in abbrevs are unusual in one way: they all start with a
+semicolon. You cannot normally use semicolon in an abbrev, but Fortran
+mode makes this possible by changing the syntax of semicolon to ``word
+constituent.''
+
+ For example, one built-in Fortran abbrev is @samp{;c} for
+@samp{continue}. If you insert @samp{;c} and then insert a punctuation
+character such as a space or a newline, the @samp{;c} expands automatically
+to @samp{continue}, provided Abbrev mode is enabled.@refill
+
+ Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
+Fortran abbrevs and what they stand for.
+
+@ignore
+ arch-tag: 23ed7c36-1517-4646-9235-2d5ade5f06f6
+@end ignore
diff --git a/man/frames.texi b/man/frames.texi
index c11d6f74685..227aab7559d 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -27,7 +27,13 @@ it terminates all the frames. To delete just one frame, use @kbd{C-x 5
Emacs compiled for MS-DOS emulates some windowing functionality,
so that you can use many of the features described in this chapter.
+@iftex
@xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{MS-DOS Mouse}.
+@end ifnottex
+
@menu
* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
@@ -512,7 +518,7 @@ Here's a similar example for specifying a foreground color:
Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}).
The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under
a graphical display that allows multiple applications to operate
-simultaneously in their own windies, so Emacs gives @kbd{C-z} a
+simultaneously in their own windows, so Emacs gives @kbd{C-z} a
different binding in that case.
If you type this command on an Emacs frame's icon, it deiconifies the frame.
diff --git a/man/gnu.texi b/man/gnu.texi
index 6b050d7839a..27fe2e24953 100644
--- a/man/gnu.texi
+++ b/man/gnu.texi
@@ -2,7 +2,7 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004,
@c 2005, 2006 Free Software Foundation, Inc.
@ifclear justgnu
-@node Manifesto,, Emacs and Microsoft Windows, Top
+@node Manifesto,, Microsoft Windows, Top
@unnumbered The GNU Manifesto
@end ifclear
@ifset justgnu
diff --git a/man/help.texi b/man/help.texi
index 35470551862..4d69e18cc39 100644
--- a/man/help.texi
+++ b/man/help.texi
@@ -401,7 +401,7 @@ The @kbd{C-h p} command lets you search the standard Emacs Lisp
libraries by topic keywords. Here is a partial list of keywords you can
use:
-@multitable {emulations} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
+@multitable {convenience} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}
@item abbrev@tab abbreviation handling, typing shortcuts, macros.
@item bib@tab code related to the @code{bib} bibliography processor.
@item c@tab support for the C language and related languages.
diff --git a/man/macos.texi b/man/macos.texi
index 272609b8392..a6c1020fbc5 100644
--- a/man/macos.texi
+++ b/man/macos.texi
@@ -2,7 +2,7 @@
@c Copyright (C) 2000, 2001, 2002, 2003, 2004,
@c 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Mac OS, Emacs and Microsoft Windows, Antinews, Top
+@node Mac OS, Microsoft Windows, Antinews, Top
@appendix Emacs and Mac OS
@cindex Mac OS
@cindex Macintosh
@@ -67,7 +67,8 @@ Classic) or the International system preference pane (Mac OS X) and
supports international and alternative keyboard layouts (e.g., Dvorak)
if its script is either Roman, Japanese, Traditional Chinese, Korean,
Cyrillic, Simplified Chinese, or Central European. Keyboard layouts
-based on Unicode may not work properly. Selecting one of the layouts
+based on Unicode may not work properly. (Try drag-and-drop if input
+from the Character Palette does not work.) Selecting one of the layouts
from the keyboard layout pull-down menu will affect how the keys typed
on the keyboard are interpreted.
@@ -318,7 +319,7 @@ charset @code{iso10646-1}. For example 12-point Monaco can be specified
by the name
@samp{-apple-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1}. Note
that it must be specified in a format containing 14 @samp{-}s (i.e., not
-by @samp{-apple-monaco-medium-r-normal-12-*-iso10646-1}) because every
+by @samp{-apple-monaco-medium-r-normal--12-*-iso10646-1}) because every
@acronym{ATSUI}-compatible font is a scalable one.
QuickDraw Text fonts have maker name @code{apple} and various charset
diff --git a/man/maintaining.texi b/man/maintaining.texi
index f0b5f1c31af..1307ce6a229 100644
--- a/man/maintaining.texi
+++ b/man/maintaining.texi
@@ -14,6 +14,9 @@ also particularly useful for this purpose.
* Format of ChangeLog:: What the change log file looks like.
* Tags:: Go direct to any function in your program in one
command. Tags remembers which file it is in.
+@ifnottex
+* Emerge:: A convenient way of merging two versions of a program.
+@end ifnottex
@end menu
@node Change Log
@@ -845,6 +848,10 @@ details.
You can also use the collection of tag names to complete a symbol
name in the buffer. @xref{Symbol Completion}.
+@ifnottex
+@include emerge-xtra.texi
+@end ifnottex
+
@ignore
arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
@end ignore
diff --git a/man/makefile.w32-in b/man/makefile.w32-in
index 93f79f49689..613151f7ff5 100644
--- a/man/makefile.w32-in
+++ b/man/makefile.w32-in
@@ -30,7 +30,7 @@ infodir = $(srcdir)/../info
# The makeinfo program is part of the Texinfo distribution.
MAKEINFO = makeinfo --force
MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat
-INFO_TARGETS = $(infodir)/emacs $(infodir)/emacs-xtra $(infodir)/ccmode \
+INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \
$(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \
$(infodir)/forms $(infodir)/gnus $(infodir)/message \
$(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \
@@ -62,6 +62,18 @@ TEXI2DVI = texi2dvi
ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \
"MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C
+EMACS_XTRA=\
+ $(srcdir)/arevert-xtra.texi \
+ $(srcdir)/cal-xtra.texi \
+ $(srcdir)/dired-xtra.texi \
+ $(srcdir)/picture-xtra.texi \
+ $(srcdir)/emerge-xtra.texi \
+ $(srcdir)/vc-xtra.texi \
+ $(srcdir)/vc1-xtra.texi \
+ $(srcdir)/vc2-xtra.texi \
+ $(srcdir)/fortran-xtra.texi \
+ $(srcdir)/msdog-xtra.texi
+
EMACSSOURCES= \
$(srcdir)/emacs.texi \
$(srcdir)/doclicense.texi \
@@ -105,7 +117,8 @@ EMACSSOURCES= \
$(srcdir)/gnu.texi \
$(srcdir)/glossary.texi \
$(srcdir)/ack.texi \
- $(srcdir)/kmacro.texi
+ $(srcdir)/kmacro.texi \
+ $(EMACS_XTRA)
info: $(INFO_TARGETS)
@@ -134,7 +147,7 @@ info.dvi: $(INFOSOURCES)
$(infodir)/emacs: $(EMACSSOURCES)
$(MAKEINFO) emacs.texi
-emacs.dvi: $(EMACSSOURCES)
+emacs.dvi: $(EMACSSOURCES) $(srcdir)/xresmini.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
# This target is here so you could easily get the list of the *.texi
@@ -309,10 +322,7 @@ $(infodir)/smtpmail: smtpmail.texi
smtpmail.dvi: smtpmail.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
-$(infodir)/emacs-xtra: emacs-xtra.texi
- $(MAKEINFO) emacs-xtra.texi
-
-emacs-xtra.dvi: emacs-xtra.texi
+emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi
$(infodir)/org: org.texi
diff --git a/man/mh-e.texi b/man/mh-e.texi
index 6f20c47f40f..b72ca62cded 100644
--- a/man/mh-e.texi
+++ b/man/mh-e.texi
@@ -8,15 +8,15 @@
@c %**end of header
@c Version of the software and manual.
-@set VERSION 7.94
+@set VERSION 8.0
@c Edition of the manual. It is either empty for the first edition or
@c has the form ", nth Edition" (without the quotes).
-@set EDITION , 2nd Edition
-@set UPDATED 2006-04-24
-@set UPDATE-MONTH April, 2006
+@set EDITION
+@set UPDATED 2006-05-06
+@set UPDATE-MONTH May, 2006
@c Other variables.
-@set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh
+@set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh
@set MH-E-HOME http://mh-e.sourceforge.net/
@c Copyright
@@ -564,12 +564,12 @@ has packages for both of these.
If you've never run MH before, you need to run @command{install-mh}
from the shell before you continue. This sets up your personal MH
environment@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the
+@uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the
MH book.}. If you don't, you'll be greeted with the error message:
@samp{Install MH and run install-mh before running MH-E}. This is all
you need to know about MH to use MH-E, but the more you know about MH,
the more you can leverage its power. See the
-@uref{@value{MH-BOOK-HOME}, MH book} to learn more about MH.
+@uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH.
@cindex @samp{Path:} MH profile component
@cindex MH profile
@@ -763,10 +763,10 @@ message. Type @kbd{C-c C-c} now. That's all there is to it!
To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
This incorporates the new mail and puts the output from
@command{inc}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
+@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} in the MH book.} (called @dfn{scan lines} after the MH program
@command{scan}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
+@uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan
pick Ranges Sequences} in the MH book.} which prints a one-line
summary of each message) into a buffer called @samp{+inbox} whose
major mode is MH-Folder.
@@ -1088,7 +1088,7 @@ i} to read this manual via Info. The online help is quite good; try
running @kbd{C-h C-h}. This brings up a list of available help topics,
one of which displays the documentation for a given key (like @kbd{C-h
k C-n}). Another useful help feature is to view the manual section
-that describes a given key (such as @kbd{C-h C-k i}). In addition,
+that describes a given key (such as @kbd{C-h K i}). In addition,
review @ref{Conventions}, if any of the GNU Emacs conventions are
strange to you.
@@ -1158,7 +1158,7 @@ mh-execute-commands @key{RET}}. If you write your own functions,
please do not prefix your symbols (variables and functions) with
@samp{mh-}. This prefix is reserved for the MH-E package. To avoid
conflicts with existing MH-E symbols, use a prefix like @samp{my-} or
-your initials.
+your initials. (Unless, of course, your initials happen to be @emph{mh}!)
@menu
* Options::
@@ -1252,7 +1252,7 @@ Indicates all messages in the range <num1> to <num2>, inclusive. The
range must be nonempty.
@c -------------------------
@item <num>:N
-@item <num>:+N
+@itemx <num>:+N
@itemx <num>:-N
Up to N messages beginning with (or ending with) message num. Num may
be any of the predefined symbols: first, prev, cur, next or last.
@@ -1459,8 +1459,8 @@ is an absolute pathname, the file is assumed to be in the
@code{mh-progs} directory (@pxref{Getting Started}). You may also link
a file to @command{inc} that uses a different format (see
@samp{mh-profile}(5), and sections
-@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
-prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in
+@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
+prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in
the MH book). You'll then need to modify several variables
appropriately (@pxref{Scan Line Formats}).
@@ -2169,7 +2169,7 @@ Default mhl Format} to get the same output as you would get if you ran
@command{mhl} from the shell. If you have a format file that you want
MH-E to use, you can set this option to @samp{Specify an mhl Format
File} and enter the name of your format file (@command{mhl}(1) or
-section @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in
+section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in
the MH book tells you how to write one). Your format file should
specify a non-zero value for @samp{overflowoffset} to allow MH-E to
parse the header. Note that @command{mhl} is always used for printing
@@ -2291,9 +2291,9 @@ MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
Mail Extensions) messages which are simply messages with additional
@dfn{body parts} or @dfn{attachments}. You can use the MH commands
@command{show}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
+@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} in the MH book.} or @command{mhshow}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/usimim.htm#ReMIMa, Reading MIME Mail} in
+@uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in
the MH book.} from the shell to read @sc{mime} messages@footnote{You
can call them directly from Emacs if you're running the X Window
System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can
@@ -2656,7 +2656,7 @@ use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
command uses the MH command @command{burst}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/burdig.htm, Bursting Messages} in the MH
+@uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH
book.} to break out each message in the digest into its own message.
Using this command, you can quickly delete unwanted messages, like
this: Once the digest is split up, toggle out of MH-Folder Show mode
@@ -2867,7 +2867,7 @@ An alternative to using the @samp{ps-print} package is the command
@kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or
@i{l}pr). You can print all the messages in a range. The message is
formatted with @command{mhl}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
+@uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH
book.} and printed with the @command{lpr} command.
@kindex P f
@@ -3471,8 +3471,8 @@ bindings, for example:
MH-E has analogies for each of the MH @command{folder} and
@command{refile} commands@footnote{See the sections
-@uref{@value{MH-BOOK-HOME}/fol.htm#Youfol, Your Current Folder:
-folder} and @uref{@value{MH-BOOK-HOME}/fol.htm#Movref, Moving and
+@uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder:
+folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and
Linking Messages: refile} in the MH book.}. To refile a message in
another folder, use the command @kbd{o} (@code{mh-refile-msg})
(mnemonic: ``output''). You are prompted for the folder name
@@ -3720,7 +3720,7 @@ Use this hook with care. If there is a bug in your hook which returns
The option @code{mh-sortm-args} holds extra arguments to pass on to
the command @command{sortm}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the
+@uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the
MH book.} when a prefix argument is used with @kbd{F S}. Normally
default arguments to @command{sortm} are specified in the MH profile.
This option may be used to provide an alternate view. For example,
@@ -4103,7 +4103,7 @@ recipients.
@vindex mh-reply-default-reply-to
Depending on your answer, @command{repl}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
+@uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in
the MH book.} is given a different argument to form your reply.
Specifically, a choice of @kbd{from} or none at all runs @samp{repl
-nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
@@ -4133,7 +4133,7 @@ If you supply a prefix argument (as in @kbd{C-u r}), the message you
are replying to is inserted in your reply after having first been run
through @command{mhl} with the format file @file{mhl.reply}. See
@command{mhl}(1) or the section
-@uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
+@uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH
book to see how you can modify the default @file{mhl.reply} file.
@vindex mh-yank-behavior
@@ -4169,7 +4169,7 @@ To forward a message, use the @kbd{f} (@code{mh-forward}) command. You
are prompted for the @samp{To:} and @samp{cc:} recipients. You are
given a draft to edit that looks like it would if you had run the MH
command @command{forw}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in
+@uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in
the MH book.}. You can then add some text (@pxref{Editing Drafts}).
You can forward several messages by using a range (@pxref{Ranges}).
All of the messages in the range are inserted into your draft. The
@@ -4243,10 +4243,10 @@ For more information on redistributing messages, see
The option @code{mh-redist-full-contents-flag} must be turned on if
@command{dist}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with
+@uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with
dist} in the MH book.} requires the whole letter for redistribution,
which is the case if @command{send}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
+@uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send}
in the MH book.} is compiled with the @sc{berk} option (which many
people abhor). If you find that MH will not allow you to redistribute
a message that has been redistributed before, turn off this option.
@@ -5143,7 +5143,7 @@ although it provides a handful of commands prefixed with @kbd{C-c C-m}
to insert the directives so you don't need to remember the syntax of
them. Remember: you can always add MH-style directives by
hand@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
+@uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in
the MH book.}.
@cindex MIME Meta Language (MML)
@@ -5432,7 +5432,7 @@ If you're using MH-style directives, use @kbd{C-c C-e}
(@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the
command @command{mhbuild} (@command{mhn}) on the message which expands
the tags@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in
+@uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in
the MH book.}. This action can be undone by running @kbd{C-c C-m C-u}
(@code{mh-mh-to-mime-undo}), which works by reverting to a backup
file. You are prompted to confirm this action, but you can avoid the
@@ -5565,7 +5565,7 @@ The command @kbd{C-c C-w} (@code{mh-check-whom}) expands aliases so
you can check the actual address(es) in the alias. A new buffer named
@samp{*MH-E Recipients*} is created with the output of @command{whom}
(@pxref{Miscellaneous})@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the
+@uref{@value{MH-BOOK-HOME}/senove.html#WhaPro, What now? -- and the
whatnow Program} in the MH book.}.
@node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
@@ -5599,7 +5599,7 @@ spelling in your message before sending, add the function
@vindex mh-send-prog
In case the MH @command{send} program@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send}
+@uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send}
in the MH book.} is installed under a different name, use
@code{mh-send-prog} to tell MH-E the name.
@@ -5780,7 +5780,7 @@ Recipients}.
MH-E loads aliases for completion and folder name hints from various
places. It uses the MH command @command{ali}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to
+@uref{@value{MH-BOOK-HOME}/mh.html, MH Aliases} in the MH book.} to
read aliases from the files listed in the profile component
@samp{Aliasfile:} as well as system-wide aliases (for example,
@file{/etc/nmh/MailAliases}).
@@ -6253,7 +6253,7 @@ contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
@cindex customization group, @samp{mh-speedbar}
The MH-E speedbar uses the MH command @command{flists}@footnote{See
-the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for
+the section @uref{@value{MH-BOOK-HOME}/morseq.html#flist, Searching for
Sequences with flist} in the MH book.} to generate the list of
folders. The @samp{mh-speedbar} customization group contains the
following option which controls how often the speedbar calls
@@ -6951,7 +6951,7 @@ mknmz -f /home/user/Mail/.namazu/mknmzrc -O /home/user/Mail/.namazu \
This search method does not require any setup.
Read @command{pick}(1) or the section
-@uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
+@uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in
the MH book to find out more about how to enter the criteria.
@subsection grep
@@ -7180,7 +7180,7 @@ messages matching the content of the respective field in the current
message. However, you can give any of these a prefix argument to edit
the @command{pick} expression used to narrow the view@footnote{See
@command{pick}(1) or the section
-@uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
+@uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in
the MH book.}.
@cindex @samp{tick} sequence
@@ -7212,7 +7212,7 @@ command. Give this command a prefix argument to remove all limits.
For the whole scoop on MH sequences, refer to
@samp{mh-sequence}(5)@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH
+@uref{@value{MH-BOOK-HOME}/morseq.html, More About Sequences} in the MH
book.}. As you've read, several of the MH-E commands can operate on a
sequence, which is a shorthand for a range or group of messages. For
example, you might want to forward several messages to a friend or
@@ -7452,7 +7452,7 @@ from the unseen sequence.
With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
command dealing with sequences is @command{mark}@footnote{See the
-section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks
+section @uref{@value{MH-BOOK-HOME}/mmbwm.html, Make Message Bookmarks
with mark} in the MH book.}.
@node Junk, Miscellaneous, Sequences, Top
@@ -8050,7 +8050,7 @@ Unless this variable contains an absolute pathname, it is assumed to
be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
link another program to @command{scan} (see @samp{mh-profile}(5)) to
produce a different type of listing@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan
+@uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan
pick Ranges Sequences} in the MH book.}.
@cindex regular expressions, scan line formats
@@ -8087,7 +8087,7 @@ The first variable has to do with pruning out garbage.
This regular expression describes a valid scan line. This is used to
eliminate error messages that are occasionally produced by
@command{inc}@footnote{See the section
-@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
+@uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next
prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
@end vtable
diff --git a/man/mini.texi b/man/mini.texi
index f88adf01f9f..4c3748a78f1 100644
--- a/man/mini.texi
+++ b/man/mini.texi
@@ -415,6 +415,9 @@ whose initials are @samp{p} and @samp{b}.
indicate the places for completion; thus, @file{/u*/b*/f*} might
complete to @file{/usr/bin/foo}.
+ For remote files, partial completion enables completion of methods,
+user names and host names. @xref{Remote Files}.
+
To enable this mode, use the command @kbd{M-x
partial-completion-mode}, or customize the variable
@code{partial-completion-mode}. This binds the partial completion
diff --git a/man/misc.texi b/man/misc.texi
index 0b07e04ed68..9e5d2835e20 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -2383,7 +2383,7 @@ a buffer containing thumbnails, corresponding to the marked files.
(@code{tumme-display-thumbnail-original-image}) to display a sized
version of it in another window. This sizes the image to fit the
window. Use the arrow keys to move around in the buffer. For easy
-browing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original})
+browsing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original})
to advance and display the next image. Typing @kbd{DEL}
(@code{tumme-display-previous-thumbnail-original}) backs up to the
previous thumbnail and displays that instead.
diff --git a/man/msdog-xtra.texi b/man/msdog-xtra.texi
new file mode 100644
index 00000000000..1c4e50785f2
--- /dev/null
+++ b/man/msdog-xtra.texi
@@ -0,0 +1,687 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node MS-DOS
+@section Emacs and MS-DOS
+@cindex MS-DOG
+@cindex MS-DOS peculiarities
+
+ This section briefly describes the peculiarities of using Emacs on
+the MS-DOS ``operating system'' (also known as ``MS-DOG'').
+@iftex
+Information about Emacs and Microsoft's current operating system
+Windows (also known as ``Losedows) is in the main Emacs manual
+(@pxref{Microsoft Systems,,, emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+Information about peculiarities common to MS-DOS and Microsoft's
+current operating systems Windows (also known as ``Losedows) is in
+@ref{Microsoft Windows}.
+@end ifnottex
+
+ If you build Emacs for MS-DOS, the binary will also run on Windows
+3.X, Windows NT, Windows 9X/ME, Windows 2000/XP, or OS/2 as a DOS
+application; all of this chapter applies for all of those systems, if
+you use an Emacs that was built for MS-DOS.
+
+@iftex
+ @xref{Text and Binary,,,emacs, the Emacs Manual}, for information
+@end iftex
+@ifnottex
+ @xref{Text and Binary}, for information
+@end ifnottex
+about Emacs' special handling of text files under MS-DOS (and Windows).
+
+@menu
+* Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS.
+* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
+* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
+* Files: MS-DOS File Names. File name conventions on MS-DOS.
+* Printing: MS-DOS Printing. Printing specifics on MS-DOS.
+* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
+* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
+@end menu
+
+@node MS-DOS Keyboard
+@subsection Keyboard Usage on MS-DOS
+
+@kindex DEL @r{(MS-DOS)}
+@kindex BS @r{(MS-DOS)}
+ The key that is called @key{DEL} in Emacs (because that's how it is
+designated on most workstations) is known as @key{BS} (backspace) on a
+PC. That is why the PC-specific terminal initialization remaps the
+@key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act
+as @kbd{C-d} for the same reasons.
+
+@kindex C-g @r{(MS-DOS)}
+@kindex C-BREAK @r{(MS-DOS)}
+@cindex quitting on MS-DOS
+ Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
+character, just like @kbd{C-g}. This is because Emacs cannot detect
+that you have typed @kbd{C-g} until it is ready for more input. As a
+consequence, you cannot use @kbd{C-g} to stop a running command
+@iftex
+(@pxref{Quitting,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Quitting}).
+@end ifnottex
+By contrast, @kbd{C-@key{BREAK}} @emph{is} detected as soon as you
+type it (as @kbd{C-g} is on other systems), so it can be used to stop
+a running command and for emergency escape
+@iftex
+(@pxref{Emergency Escape,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Emergency Escape}).
+@end ifnottex
+
+@cindex Meta (under MS-DOS)
+@cindex Hyper (under MS-DOS)
+@cindex Super (under MS-DOS)
+@vindex dos-super-key
+@vindex dos-hyper-key
+ The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
+You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
+choose either the right @key{CTRL} key or the right @key{ALT} key by
+setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
+or 2 respectively. If neither @code{dos-super-key} nor
+@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
+also mapped to the @key{META} key. However, if the MS-DOS international
+keyboard support program @file{KEYB.COM} is installed, Emacs will
+@emph{not} map the right @key{ALT} to @key{META}, since it is used for
+accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
+layouts; in this case, you may only use the left @key{ALT} as @key{META}
+key.
+
+@kindex C-j @r{(MS-DOS)}
+@vindex dos-keypad-mode
+ The variable @code{dos-keypad-mode} is a flag variable that controls
+what key codes are returned by keys in the numeric keypad. You can also
+define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
+following line into your @file{_emacs} file:
+
+@smallexample
+;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.}
+(define-key function-key-map [kp-enter] [?\C-j])
+@end smallexample
+
+@node MS-DOS Mouse
+@subsection Mouse Usage on MS-DOS
+
+@cindex mouse support under MS-DOS
+ Emacs on MS-DOS supports a mouse (on the default terminal only).
+The mouse commands work as documented, including those that use menus
+and the menu bar
+@iftex
+(@pxref{Menu Bar,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Menu Bar}).
+@end ifnottex
+ Scroll bars don't work in MS-DOS Emacs. PC mice usually have only
+two buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you
+press both of them together, that has the effect of @kbd{Mouse-3}. If
+the mouse does have 3 buttons, Emacs detects that at startup, and all
+the 3 buttons function normally, as on X.
+
+ Help strings for menu-bar and pop-up menus are displayed in the echo
+area when the mouse pointer moves across the menu items. Highlighting
+of mouse-sensitive text
+@iftex
+(@pxref{Mouse References,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Mouse References})
+@end ifnottex
+is also supported.
+
+@cindex mouse, set number of buttons
+@findex msdos-set-mouse-buttons
+ Some versions of mouse drivers don't report the number of mouse
+buttons correctly. For example, mice with a wheel report that they
+have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
+the wheel, which serves as the middle button, are not passed. In
+these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command
+to tell Emacs how many mouse buttons to expect. You could make such a
+setting permanent by adding this fragment to your @file{_emacs} init
+file:
+
+@example
+;; @r{Treat the mouse like a 2-button mouse.}
+(msdos-set-mouse-buttons 2)
+@end example
+
+@cindex Windows clipboard support
+ Emacs built for MS-DOS supports clipboard operations when it runs on
+Windows. Commands that put text on the kill ring, or yank text from
+the ring, check the Windows clipboard first, just as Emacs does on the
+X Window System
+@iftex
+(@pxref{Mouse Commands,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Mouse Commands}).
+@end ifnottex
+Only the primary selection and the cut buffer are supported by MS-DOS
+Emacs on Windows; the secondary selection always appears as empty.
+
+ Due to the way clipboard access is implemented by Windows, the
+length of text you can put into the clipboard is limited by the amount
+of free DOS memory that is available to Emacs. Usually, up to 620KB of
+text can be put into the clipboard, but this limit depends on the system
+configuration and is lower if you run Emacs as a subprocess of
+another program. If the killed text does not fit, Emacs outputs a
+message saying so, and does not put the text into the clipboard.
+
+ Null characters also cannot be put into the Windows clipboard. If the
+killed text includes null characters, Emacs does not put such text into
+the clipboard, and displays in the echo area a message to that effect.
+
+@vindex dos-display-scancodes
+ The variable @code{dos-display-scancodes}, when non-@code{nil},
+directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of
+each keystroke; this feature serves as a complement to the
+@code{view-lossage} command, for debugging.
+
+@node MS-DOS Display
+@subsection Display on MS-DOS
+@cindex faces under MS-DOS
+@cindex fonts, emulating under MS-DOS
+
+ Display on MS-DOS cannot use font variants, like bold or italic, but
+it does support multiple faces, each of which can specify a foreground
+and a background color. Therefore, you can get the full functionality
+of Emacs packages that use fonts (such as @code{font-lock}, Enriched
+Text mode, and others) by defining the relevant faces to use different
+colors. Use the @code{list-colors-display} command
+@iftex
+(@pxref{Frame Parameters,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Frame Parameters})
+@end ifnottex
+and the @code{list-faces-display} command
+@iftex
+(@pxref{Faces,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Faces})
+@end ifnottex
+to see what colors and faces are available and what they look like.
+
+ @xref{MS-DOS and MULE}, later in this chapter, for information on
+how Emacs displays glyphs and characters that aren't supported by the
+native font built into the DOS display.
+
+@cindex cursor shape on MS-DOS
+ When Emacs starts, it changes the cursor shape to a solid box. This
+is for compatibility with other systems, where the box cursor is the
+default in Emacs. This default shape can be changed to a bar by
+specifying the @code{cursor-type} parameter in the variable
+@code{default-frame-alist}
+@iftex
+(@pxref{Creating Frames,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Creating Frames}).
+@end ifnottex
+The MS-DOS terminal doesn't support a vertical-bar cursor,
+so the bar cursor is horizontal, and the @code{@var{width}} parameter,
+if specified by the frame parameters, actually determines its height.
+For this reason, the @code{bar} and @code{hbar} cursor types produce
+the same effect on MS-DOS. As an extension, the bar cursor
+specification can include the starting scan line of the cursor as well
+as its width, like this:
+
+@example
+ '(cursor-type bar @var{width} . @var{start})
+@end example
+
+@noindent
+In addition, if the @var{width} parameter is negative, the cursor bar
+begins at the top of the character cell.
+
+@cindex frames on MS-DOS
+ The MS-DOS terminal can only display a single frame at a time. The
+Emacs frame facilities work on MS-DOS much as they do on text-only
+terminals
+@iftex
+(@pxref{Frames,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Frames}).
+@end ifnottex
+When you run Emacs from a DOS window on MS-Windows, you can make the
+visible frame smaller than the full screen, but Emacs still cannot
+display more than a single frame at a time.
+
+@cindex frame size under MS-DOS
+@findex mode4350
+@findex mode25
+ The @code{mode4350} command switches the display to 43 or 50
+lines, depending on your hardware; the @code{mode25} command switches
+to the default 80x25 screen size.
+
+ By default, Emacs only knows how to set screen sizes of 80 columns by
+25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
+special video modes that will switch the display to other sizes, you can
+have Emacs support those too. When you ask Emacs to switch the frame to
+@var{n} rows by @var{m} columns dimensions, it checks if there is a
+variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
+uses its value (which must be an integer) as the video mode to switch
+to. (Emacs switches to that video mode by calling the BIOS @code{Set
+Video Mode} function with the value of
+@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
+For example, suppose your adapter will switch to 66x80 dimensions when
+put into video mode 85. Then you can make Emacs support this screen
+size by putting the following into your @file{_emacs} file:
+
+@example
+(setq screen-dimensions-66x80 85)
+@end example
+
+ Since Emacs on MS-DOS can only set the frame size to specific
+supported dimensions, it cannot honor every possible frame resizing
+request. When an unsupported size is requested, Emacs chooses the next
+larger supported size beyond the specified size. For example, if you
+ask for 36x80 frame, you will get 40x80 instead.
+
+ The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
+when they exactly match the specified size; the search for the next
+larger supported size ignores them. In the above example, even if your
+VGA supports 38x80 dimensions and you define a variable
+@code{screen-dimensions-38x80} with a suitable value, you will still get
+40x80 screen when you ask for a 36x80 frame. If you want to get the
+38x80 size in this case, you can do it by setting the variable named
+@code{screen-dimensions-36x80} with the same video mode value as
+@code{screen-dimensions-38x80}.
+
+ Changing frame dimensions on MS-DOS has the effect of changing all the
+other frames to the new dimensions.
+
+@node MS-DOS File Names
+@subsection File Names on MS-DOS
+@cindex file names under MS-DOS
+@cindex init file, default name under MS-DOS
+
+ On MS-DOS, file names are case-insensitive and limited to eight
+characters, plus optionally a period and three more characters. Emacs
+knows enough about these limitations to handle file names that were
+meant for other operating systems. For instance, leading dots
+@samp{.} in file names are invalid in MS-DOS, so Emacs transparently
+converts them to underscores @samp{_}; thus your default init file
+@iftex
+(@pxref{Init File,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Init File})
+@end ifnottex
+is called @file{_emacs} on MS-DOS. Excess characters before or after
+the period are generally ignored by MS-DOS itself; thus, if you visit
+the file @file{LongFileName.EvenLongerExtension}, you will silently
+get @file{longfile.eve}, but Emacs will still display the long file
+name on the mode line. Other than that, it's up to you to specify
+file names which are valid under MS-DOS; the transparent conversion as
+described above only works on file names built into Emacs.
+
+@cindex backup file names on MS-DOS
+ The above restrictions on the file names on MS-DOS make it almost
+impossible to construct the name of a backup file
+@iftex
+(@pxref{Backup Names,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Backup Names})
+@end ifnottex
+without losing some of the original file name characters. For
+example, the name of a backup file for @file{docs.txt} is
+@file{docs.tx~} even if single backup is used.
+
+@cindex file names under Windows 95/NT
+@cindex long file names in DOS box under Windows 95/NT
+ If you run Emacs as a DOS application under Windows 9X, Windows ME, or
+Windows 2000/XP, you can turn on support for long file names. If you do
+that, Emacs doesn't truncate file names or convert them to lower case;
+instead, it uses the file names that you specify, verbatim. To enable
+long file name support, set the environment variable @env{LFN} to
+@samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow
+DOS programs to access long file names, so Emacs built for MS-DOS will
+only see their short 8+3 aliases.
+
+@cindex @env{HOME} directory under MS-DOS
+ MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
+that the directory where it is installed is the value of the @env{HOME}
+environment variable. That is, if your Emacs binary,
+@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
+Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In
+particular, that is where Emacs looks for the init file @file{_emacs}.
+With this in mind, you can use @samp{~} in file names as an alias for
+the home directory, as you would on GNU or Unix. You can also set
+@env{HOME} variable in the environment before starting Emacs; its
+value will then override the above default behavior.
+
+ Emacs on MS-DOS handles the directory name @file{/dev} specially,
+because of a feature in the emulator libraries of DJGPP that pretends
+I/O devices have names in that directory. We recommend that you avoid
+using an actual directory named @file{/dev} on any disk.
+
+@node MS-DOS Printing
+@subsection Printing and MS-DOS
+
+ Printing commands, such as @code{lpr-buffer}
+@iftex
+(@pxref{Printing,,,emacs, the Emacs Manual}) and @code{ps-print-buffer}
+(@pxref{PostScript,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript})
+@end ifnottex
+can work on MS-DOS by sending the output to one of the printer ports,
+if a Posix-style @code{lpr} program is unavailable. The same Emacs
+variables control printing on all systems, but in some cases they have
+different default values on MS-DOS.
+
+@iftex
+@xref{Windows Printing,,,emacs, the Emacs Manual},
+@end iftex
+@ifnottex
+@xref{Windows Printing},
+@end ifnottex
+for details about setting up printing to a networked printer.
+
+ Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
+though they are connected to a Windows machine which uses a different
+encoding for the same locale. For example, in the Latin-1 locale, DOS
+uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and
+MULE}. When you print to such printers from Windows, you can use the
+@kbd{C-x RET c} (@code{universal-coding-system-argument}) command before
+@kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS
+codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET
+M-x lpr-region RET} will print the region while converting it to the
+codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
+coding system with @kbd{M-x codepage-setup}.
+
+@vindex dos-printer
+@vindex dos-ps-printer
+ For backwards compatibility, the value of @code{dos-printer}
+(@code{dos-ps-printer}), if it has a value, overrides the value of
+@code{printer-name} (@code{ps-printer-name}), on MS-DOS.
+
+
+@node MS-DOS and MULE
+@subsection International Support on MS-DOS
+@cindex international support @r{(MS-DOS)}
+
+ Emacs on MS-DOS supports the same international character sets as it
+does on GNU, Unix and other platforms
+@iftex
+(@pxref{International,,,emacs, the Emacs Manual}),
+@end iftex
+@ifnottex
+(@pxref{International}),
+@end ifnottex
+including coding systems for converting between the different
+character sets. However, due to incompatibilities between
+MS-DOS/MS-Windows and other systems, there are several DOS-specific
+aspects of this support that you should be aware of. This section
+describes these aspects.
+
+ The description below is largely specific to the MS-DOS port of
+Emacs, especially where it talks about practical implications for
+Emacs users. For other operating systems, see the @file{code-pages.el}
+package, which implements support for MS-DOS- and MS-Windows-specific
+encodings for all platforms other than MS-DOS.
+
+@table @kbd
+@item M-x dos-codepage-setup
+Set up Emacs display and coding systems as appropriate for the current
+DOS codepage.
+
+@item M-x codepage-setup
+Create a coding system for a certain DOS codepage.
+@end table
+
+@cindex codepage, MS-DOS
+@cindex DOS codepages
+ MS-DOS is designed to support one character set of 256 characters at
+any given time, but gives you a variety of character sets to choose
+from. The alternative character sets are known as @dfn{DOS codepages}.
+Each codepage includes all 128 @acronym{ASCII} characters, but the other 128
+characters (codes 128 through 255) vary from one codepage to another.
+Each DOS codepage is identified by a 3-digit number, such as 850, 862,
+etc.
+
+ In contrast to X, which lets you use several fonts at the same time,
+MS-DOS normally doesn't allow use of several codepages in a single
+session. MS-DOS was designed to load a single codepage at system
+startup, and require you to reboot in order to change
+it@footnote{Normally, one particular codepage is burnt into the
+display memory, while other codepages can be installed by modifying
+system configuration files, such as @file{CONFIG.SYS}, and rebooting.
+While there is third-party software that allows changing the codepage
+without rebooting, we describe here how a stock MS-DOS system
+behaves.}. Much the same limitation applies when you run DOS
+executables on other systems such as MS-Windows.
+
+@cindex unibyte operation @r{(MS-DOS)}
+ If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
+@iftex
+(@pxref{Initial Options,,,emacs, the Emacs Manual}),
+@end iftex
+@ifnottex
+(@pxref{Initial Options}),
+@end ifnottex
+Emacs does not perform any conversion of non-@acronym{ASCII}
+characters. Instead, it reads and writes any non-@acronym{ASCII}
+characters verbatim, and sends their 8-bit codes to the display
+verbatim. Thus, unibyte Emacs on MS-DOS supports the current
+codepage, whatever it may be, but cannot even represent any other
+characters.
+
+@vindex dos-codepage
+ For multibyte operation on MS-DOS, Emacs needs to know which
+characters the chosen DOS codepage can display. So it queries the
+system shortly after startup to get the chosen codepage number, and
+stores the number in the variable @code{dos-codepage}. Some systems
+return the default value 437 for the current codepage, even though the
+actual codepage is different. (This typically happens when you use the
+codepage built into the display hardware.) You can specify a different
+codepage for Emacs to use by setting the variable @code{dos-codepage} in
+your init file.
+
+@cindex language environment, automatic selection on @r{MS-DOS}
+ Multibyte Emacs supports only certain DOS codepages: those which can
+display Far-Eastern scripts, like the Japanese codepage 932, and those
+that encode a single ISO 8859 character set.
+
+ The Far-Eastern codepages can directly display one of the MULE
+character sets for these countries, so Emacs simply sets up to use the
+appropriate terminal coding system that is supported by the codepage.
+The special features described in the rest of this section mostly
+pertain to codepages that encode ISO 8859 character sets.
+
+ For the codepages which correspond to one of the ISO character sets,
+Emacs knows the character set name based on the codepage number. Emacs
+automatically creates a coding system to support reading and writing
+files that use the current codepage, and uses this coding system by
+default. The name of this coding system is @code{cp@var{nnn}}, where
+@var{nnn} is the codepage number.@footnote{The standard Emacs coding
+systems for ISO 8859 are not quite right for the purpose, because
+typically the DOS codepage does not match the standard ISO character
+codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
+code 231 in the standard Latin-1 character set, but the corresponding
+DOS codepage 850 uses code 135 for this glyph.}
+
+@cindex mode line @r{(MS-DOS)}
+ All the @code{cp@var{nnn}} coding systems use the letter @samp{D}
+(for ``DOS'') as their mode-line mnemonic. Since both the terminal
+coding system and the default coding system for file I/O are set to
+the proper @code{cp@var{nnn}} coding system at startup, it is normal
+for the mode line on MS-DOS to begin with @samp{-DD\-}.
+@iftex
+@xref{Mode Line,,,emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Mode Line}.
+@end ifnottex
+Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding
+systems, and thus their initial mode line looks like the Emacs
+default.
+
+ Since the codepage number also indicates which script you are using,
+Emacs automatically runs @code{set-language-environment} to select the
+language environment for that script
+@iftex
+(@pxref{Language Environments,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Language Environments}).
+@end ifnottex
+
+ If a buffer contains a character belonging to some other ISO 8859
+character set, not the one that the chosen DOS codepage supports, Emacs
+displays it using a sequence of @acronym{ASCII} characters. For example, if the
+current codepage doesn't have a glyph for the letter @samp{@`o} (small
+@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
+the braces serve as a visual indication that this is a single character.
+(This may look awkward for some non-Latin characters, such as those from
+Greek or Hebrew alphabets, but it is still readable by a person who
+knows the language.) Even though the character may occupy several
+columns on the screen, it is really still just a single character, and
+all Emacs commands treat it as one.
+
+@cindex IBM graphics characters (MS-DOS)
+@cindex box-drawing characters (MS-DOS)
+@cindex line-drawing characters (MS-DOS)
+ Not all characters in DOS codepages correspond to ISO 8859
+characters---some are used for other purposes, such as box-drawing
+characters and other graphics. Emacs maps these characters to two
+special character sets called @code{eight-bit-control} and
+@code{eight-bit-graphic}, and displays them as their IBM glyphs.
+However, you should be aware that other systems might display these
+characters differently, so you should avoid them in text that might be
+copied to a different operating system, or even to another DOS machine
+that uses a different codepage.
+
+@vindex dos-unsupported-character-glyph
+ Emacs supports many other characters sets aside from ISO 8859, but it
+cannot display them on MS-DOS. So if one of these multibyte characters
+appears in a buffer, Emacs on MS-DOS displays them as specified by the
+@code{dos-unsupported-character-glyph} variable; by default, this glyph
+is an empty triangle. Use the @kbd{C-u C-x =} command to display the
+actual code and character set of such characters.
+@iftex
+@xref{Position Info,,,emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Position Info}.
+@end ifnottex
+
+@findex codepage-setup
+ By default, Emacs defines a coding system to support the current
+codepage. To define a coding system for some other codepage (e.g., to
+visit a file written on a DOS machine in another country), use the
+@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
+the codepage, with completion, then creates the coding system for the
+specified codepage. You can then use the new coding system to read and
+write files, but you must specify it explicitly for the file command
+when you want to use it
+@iftex
+(@pxref{Text Coding,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Text Coding}).
+@end ifnottex
+
+ These coding systems are also useful for visiting a file encoded using
+a DOS codepage, using Emacs running on some other operating system.
+
+@cindex MS-Windows codepages
+ MS-Windows provides its own codepages, which are different from the
+DOS codepages for the same locale. For example, DOS codepage 850
+supports the same character set as Windows codepage 1252; DOS codepage
+855 supports the same character set as Windows codepage 1251, etc.
+The MS-Windows version of Emacs uses the current codepage for display
+when invoked with the @samp{-nw} option. Support for codepages in the
+Windows port of Emacs is part of the @file{code-pages.el} package.
+
+@node MS-DOS Processes
+@subsection Subprocesses on MS-DOS
+
+@cindex compilation under MS-DOS
+@cindex inferior processes under MS-DOS
+@findex compile @r{(MS-DOS)}
+@findex grep @r{(MS-DOS)}
+ Because MS-DOS is a single-process ``operating system,''
+asynchronous subprocesses are not available. In particular, Shell
+mode and its variants do not work. Most Emacs features that use
+asynchronous subprocesses also don't work on MS-DOS, including
+Shell mode and GUD. When in doubt, try and see; commands that
+don't work output an error message saying that asynchronous processes
+aren't supported.
+
+ Compilation under Emacs with @kbd{M-x compile}, searching files with
+@kbd{M-x grep} and displaying differences between files with @kbd{M-x
+diff} do work, by running the inferior processes synchronously. This
+means you cannot do any more editing until the inferior process
+finishes.
+
+ Spell checking also works, by means of special support for synchronous
+invocation of the @code{ispell} program. This is slower than the
+asynchronous invocation on other platforms
+
+ Instead of the Shell mode, which doesn't work on MS-DOS, you can use
+the @kbd{M-x eshell} command. This invokes the Eshell package that
+implements a Posix-like shell entirely in Emacs Lisp.
+
+ By contrast, Emacs compiled as a native Windows application
+@strong{does} support asynchronous subprocesses.
+@iftex
+@xref{Windows Processes,,,emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Windows Processes}.
+@end ifnottex
+
+@cindex printing under MS-DOS
+ Printing commands, such as @code{lpr-buffer}
+@iftex
+(@pxref{Printing,,,emacs, the Emacs Manual}) and
+@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}),
+work in MS-DOS by sending the output to one of the printer ports.
+@xref{MS-DOS Printing,,,emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+(@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}),
+work in MS-DOS by sending the output to one of the printer ports.
+@xref{MS-DOS Printing}.
+@end ifnottex
+
+ When you run a subprocess synchronously on MS-DOS, make sure the
+program terminates and does not try to read keyboard input. If the
+program does not terminate on its own, you will be unable to terminate
+it, because MS-DOS provides no general way to terminate a process.
+Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
+cases.
+
+ Accessing files on other machines is not supported on MS-DOS. Other
+network-oriented commands such as sending mail, Web browsing, remote
+login, etc., don't work either, unless network access is built into
+MS-DOS with some network redirector.
+
+@cindex directory listing on MS-DOS
+@vindex dired-listing-switches @r{(MS-DOS)}
+ Dired on MS-DOS uses the @code{ls-lisp} package where other
+platforms use the system @code{ls} command. Therefore, Dired on
+MS-DOS supports only some of the possible options you can mention in
+the @code{dired-listing-switches} variable. The options that work are
+@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
+@samp{-s}, @samp{-t}, and @samp{-u}.
+
+@ignore
+ arch-tag: 868d50ff-07f8-4a13-a807-dab6f1cdb431
+@end ignore
diff --git a/man/msdog.texi b/man/msdog.texi
index 2f7cc229884..0dfb57ffdc9 100644
--- a/man/msdog.texi
+++ b/man/msdog.texi
@@ -2,8 +2,8 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Emacs and Microsoft Windows, Manifesto, Mac OS, Top
-@appendix Emacs and Microsoft Windows
+@node Microsoft Windows, Manifesto, Mac OS, Top
+@appendix Emacs and Microsoft Windows/MS-DOS
@cindex Microsoft Windows
@cindex MS-Windows, Emacs peculiarities
@@ -11,7 +11,14 @@
Windows. Some of these peculiarities are also relevant to Microsoft's
older MS-DOS ``operating system'' (also known as ``MS-DOG'').
However, Emacs features that are relevant @emph{only} to MS-DOS are
-described in a separate manual (@inforef{MS-DOG,, emacs-xtra}).
+described in a separate
+@iftex
+manual (@pxref{MS-DOS,,, emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+section (@pxref{MS-DOS}).
+@end ifnottex
+
The behavior of Emacs on MS-Windows is reasonably similar to what is
documented in the rest of the manual, including support for long file
@@ -20,12 +27,15 @@ However, a few special considerations apply, and they are described
here.
@menu
-* Text and Binary:: Text files use CRLF to terminate lines.
-* Windows Files:: File-name conventions on Windows.
-* Windows HOME:: Where Emacs looks for your @file{.emacs}.
-* Windows Processes:: Running subprocesses on Windows.
-* Windows Printing:: How to specify the printer on MS-Windows.
-* Windows System Menu:: Controlling what the ALT key does.
+* Text and Binary:: Text files use CRLF to terminate lines.
+* Windows Files:: File-name conventions on Windows.
+* Windows HOME:: Where Emacs looks for your @file{.emacs}.
+* Windows Processes:: Running subprocesses on Windows.
+* Windows Printing:: How to specify the printer on MS-Windows.
+* Windows System Menu:: Controlling what the ALT key does.
+@ifnottex
+* MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}).
+@end ifnottex
@end menu
@node Text and Binary
@@ -408,6 +418,10 @@ users find this frustrating.
You can re-enable Windows' default handling of tapping the @key{ALT} key
by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value.
+@ifnottex
+@include msdog-xtra.texi
+@end ifnottex
+
@ignore
arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2
@end ignore
diff --git a/man/picture-xtra.texi b/man/picture-xtra.texi
new file mode 100644
index 00000000000..61ff949f448
--- /dev/null
+++ b/man/picture-xtra.texi
@@ -0,0 +1,291 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in emacs-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node Picture Mode
+@chapter Editing Pictures
+@cindex pictures
+@cindex making pictures out of text characters
+@findex edit-picture
+
+ To edit a picture made out of text characters (for example, a picture
+of the division of a register into fields, as a comment in a program),
+use the command @kbd{M-x edit-picture} to enter Picture mode.
+
+ In Picture mode, editing is based on the @dfn{quarter-plane} model of
+text, according to which the text characters lie studded on an area that
+stretches infinitely far to the right and downward. The concept of the end
+of a line does not exist in this model; the most you can say is where the
+last nonblank character on the line is found.
+
+ Of course, Emacs really always considers text as a sequence of
+characters, and lines really do have ends. But Picture mode replaces
+the most frequently-used commands with variants that simulate the
+quarter-plane model of text. They do this by inserting spaces or by
+converting tabs to spaces.
+
+ Most of the basic editing commands of Emacs are redefined by Picture mode
+to do essentially the same thing but in a quarter-plane way. In addition,
+Picture mode defines various keys starting with the @kbd{C-c} prefix to
+run special picture editing commands.
+
+ One of these keys, @kbd{C-c C-c}, is particularly important. Often a
+picture is part of a larger file that is usually edited in some other
+major mode. @kbd{M-x edit-picture} records the name of the previous
+major mode so you can use the @kbd{C-c C-c} command
+(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
+also deletes spaces from the ends of lines, unless given a numeric
+argument.
+
+ The special commands of Picture mode all work in other modes (provided
+the @file{picture} library is loaded), but are not bound to keys except
+in Picture mode. The descriptions below talk of moving ``one column''
+and so on, but all the picture mode commands handle numeric arguments as
+their normal equivalents do.
+
+@vindex picture-mode-hook
+ Turning on Picture mode runs the hook @code{picture-mode-hook}.
+Additional extensions to Picture mode can be found in
+@file{artist.el}.
+
+@menu
+* Basic Picture:: Basic concepts and simple commands of Picture Mode.
+* Insert in Picture:: Controlling direction of cursor motion
+ after "self-inserting" characters.
+* Tabs in Picture:: Various features for tab stops and indentation.
+* Rectangles in Picture:: Clearing and superimposing rectangles.
+@end menu
+
+@node Basic Picture
+@section Basic Editing in Picture Mode
+
+@findex picture-forward-column
+@findex picture-backward-column
+@findex picture-move-down
+@findex picture-move-up
+@cindex editing in Picture mode
+
+ Most keys do the same thing in Picture mode that they usually do, but
+do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
+run @code{picture-forward-column}, a command which moves point one
+column to the right, inserting a space if necessary so that the actual
+end of the line makes no difference. @kbd{C-b} is rebound to run
+@code{picture-backward-column}, which always moves point left one
+column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
+@kbd{C-p} are rebound to run @code{picture-move-down} and
+@code{picture-move-up}, which can either insert spaces or convert tabs
+as necessary to make sure that point stays in exactly the same column.
+@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
+nonblank character on the line. There is no need to change @kbd{C-a},
+as the choice of screen model does not affect beginnings of
+lines.
+
+@findex picture-newline
+ Insertion of text is adapted to the quarter-plane screen model
+through the use of Overwrite mode
+@iftex
+(@pxref{Minor Modes,,, emacs, the Emacs Manual}.)
+@end iftex
+@ifnottex
+(@pxref{Minor Modes}.)
+@end ifnottex
+Self-inserting characters replace existing text, column by column,
+rather than pushing existing text to the right. @key{RET} runs
+@code{picture-newline}, which just moves to the beginning of the
+following line so that new text will replace that line.
+
+@findex picture-backward-clear-column
+@findex picture-clear-column
+@findex picture-clear-line
+ In Picture mode, the commands that normally delete or kill text,
+instead erase text (replacing it with spaces). @key{DEL}
+(@code{picture-backward-clear-column}) replaces the preceding
+character with a space rather than removing it; this moves point
+backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
+character or characters with spaces, but does not move point. (If you
+want to clear characters to spaces and move forward over them, use
+@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
+contents of lines, but does not delete the newlines from the buffer.
+
+@findex picture-open-line
+ To do actual insertion, you must use special commands. @kbd{C-o}
+(@code{picture-open-line}) creates a blank line after the current
+line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
+sense in Picture mode, so it is not changed. @kbd{C-j}
+(@code{picture-duplicate-line}) inserts another line with the same
+contents below the current line.
+
+@kindex C-c C-d @r{(Picture mode)}
+ To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
+(which is defined as @code{delete-char}, as @kbd{C-d} is in other
+modes), or one of the picture rectangle commands (@pxref{Rectangles in
+Picture}).
+
+@node Insert in Picture
+@section Controlling Motion after Insert
+
+@findex picture-movement-up
+@findex picture-movement-down
+@findex picture-movement-left
+@findex picture-movement-right
+@findex picture-movement-nw
+@findex picture-movement-ne
+@findex picture-movement-sw
+@findex picture-movement-se
+@kindex C-c < @r{(Picture mode)}
+@kindex C-c > @r{(Picture mode)}
+@kindex C-c ^ @r{(Picture mode)}
+@kindex C-c . @r{(Picture mode)}
+@kindex C-c ` @r{(Picture mode)}
+@kindex C-c ' @r{(Picture mode)}
+@kindex C-c / @r{(Picture mode)}
+@kindex C-c \ @r{(Picture mode)}
+ Since ``self-inserting'' characters in Picture mode overwrite and move
+point, there is no essential restriction on how point should be moved.
+Normally point moves right, but you can specify any of the eight
+orthogonal or diagonal directions for motion after a ``self-inserting''
+character. This is useful for drawing lines in the buffer.
+
+@table @kbd
+@item C-c <
+@itemx C-c @key{LEFT}
+Move left after insertion (@code{picture-movement-left}).
+@item C-c >
+@itemx C-c @key{RIGHT}
+Move right after insertion (@code{picture-movement-right}).
+@item C-c ^
+@itemx C-c @key{UP}
+Move up after insertion (@code{picture-movement-up}).
+@item C-c .
+@itemx C-c @key{DOWN}
+Move down after insertion (@code{picture-movement-down}).
+@item C-c `
+@itemx C-c @key{HOME}
+Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
+@item C-c '
+@itemx C-c @key{PAGEUP}
+Move up and right (``northeast'') after insertion
+(@code{picture-movement-ne}).
+@item C-c /
+@itemx C-c @key{END}
+Move down and left (``southwest'') after insertion
+@*(@code{picture-movement-sw}).
+@item C-c \
+@itemx C-c @key{PAGEDOWN}
+Move down and right (``southeast'') after insertion
+@*(@code{picture-movement-se}).
+@end table
+
+@kindex C-c C-f @r{(Picture mode)}
+@kindex C-c C-b @r{(Picture mode)}
+@findex picture-motion
+@findex picture-motion-reverse
+ Two motion commands move based on the current Picture insertion
+direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
+same direction as motion after ``insertion'' currently does, while @kbd{C-c
+C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
+
+@node Tabs in Picture
+@section Picture Mode Tabs
+
+@kindex M-TAB @r{(Picture mode)}
+@findex picture-tab-search
+@vindex picture-tab-chars
+ Two kinds of tab-like action are provided in Picture mode. Use
+@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
+With no argument, it moves to a point underneath the next
+``interesting'' character that follows whitespace in the previous
+nonblank line. ``Next'' here means ``appearing at a horizontal position
+greater than the one point starts out at.'' With an argument, as in
+@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
+character in the current line. @kbd{M-@key{TAB}} does not change the
+text; it only moves point. ``Interesting'' characters are defined by
+the variable @code{picture-tab-chars}, which should define a set of
+characters. The syntax for this variable is like the syntax used inside
+of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
+and the @samp{]}. Its default value is @code{"!-~"}.
+
+@findex picture-tab
+ @key{TAB} itself runs @code{picture-tab}, which operates based on the
+current tab stop settings; it is the Picture mode equivalent of
+@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
+argument it clears the text that it moves over.
+
+@kindex C-c TAB @r{(Picture mode)}
+@findex picture-set-tab-stops
+ The context-based and tab-stop-based forms of tabbing are brought
+together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
+This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
+would consider significant in the current line. The use of this command,
+together with @key{TAB}, can get the effect of context-based tabbing. But
+@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
+
+ It may be convenient to prevent use of actual tab characters in
+pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
+up the picture. You can do this by setting the variable
+@code{indent-tabs-mode} to @code{nil}.
+
+@node Rectangles in Picture
+@section Picture Mode Rectangle Commands
+@cindex rectangles and Picture mode
+@cindex Picture mode and rectangles
+
+ Picture mode defines commands for working on rectangular pieces of
+the text in ways that fit with the quarter-plane model. The standard
+rectangle commands may also be useful.
+@iftex
+@xref{Rectangles,,, emacs, the Emacs Manual}.
+@end iftex
+@ifnottex
+@xref{Rectangles}.
+@end ifnottex
+
+@table @kbd
+@item C-c C-k
+Clear out the region-rectangle with spaces
+(@code{picture-clear-rectangle}). With argument, delete the text.
+@item C-c C-w @var{r}
+Similar, but save rectangle contents in register @var{r} first
+(@code{picture-clear-rectangle-to-register}).
+@item C-c C-y
+Copy last killed rectangle into the buffer by overwriting, with upper
+left corner at point (@code{picture-yank-rectangle}). With argument,
+insert instead.
+@item C-c C-x @var{r}
+Similar, but use the rectangle in register @var{r}
+(@code{picture-yank-rectangle-from-register}).
+@end table
+
+@kindex C-c C-k @r{(Picture mode)}
+@kindex C-c C-w @r{(Picture mode)}
+@findex picture-clear-rectangle
+@findex picture-clear-rectangle-to-register
+ The picture rectangle commands @kbd{C-c C-k}
+(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
+(@code{picture-clear-rectangle-to-register}) differ from the standard
+rectangle commands in that they normally clear the rectangle instead of
+deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
+mode.
+
+ However, deletion of rectangles can be useful in Picture mode, so
+these commands delete the rectangle if given a numeric argument.
+@kbd{C-c C-k} either with or without a numeric argument saves the
+rectangle for @kbd{C-c C-y}.
+
+@kindex C-c C-y @r{(Picture mode)}
+@kindex C-c C-x @r{(Picture mode)}
+@findex picture-yank-rectangle
+@findex picture-yank-rectangle-from-register
+ The Picture mode commands for yanking rectangles differ from the
+standard ones in that they overwrite instead of inserting. This is
+the same way that Picture mode insertion of other text differs from
+other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
+(by overwriting) the rectangle that was most recently killed, while
+@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
+likewise for the rectangle found in a specified register.
+
+@ignore
+ arch-tag: 10e423ad-d896-42f2-a7e8-7018adeaf8c2
+@end ignore
diff --git a/man/programs.texi b/man/programs.texi
index 59ea979399d..f4ede8e5e2f 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -42,6 +42,9 @@ Highlight program syntax (@pxref{Font Lock}).
* C Modes:: Special commands of C, C++, Objective-C,
Java, and Pike modes.
* Asm Mode:: Asm mode and its special features.
+@ifnottex
+* Fortran:: Fortran mode and its special features.
+@end ifnottex
@end menu
@node Program Modes
@@ -109,7 +112,14 @@ tab character before point, in these modes.
Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran
-mode, @inforef{Fortran,, emacs-xtra}.
+mode, see
+@iftex
+@ref{Fortran,,, emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@ref{Fortran}.
+@end ifnottex
+
@cindex mode hook
@vindex c-mode-hook
@@ -1591,7 +1601,7 @@ hungry-delete feature is enabled.
@itemx M-x c-subword-mode
@findex c-subword-mode
Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word
-commands then recognize upper case letters in
+commands recognize upper case letters in
@samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by
the flag @samp{/w} on the mode line after the mode name
(e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in
@@ -1742,6 +1752,10 @@ Insert or align a comment.
The variable @code{asm-comment-char} specifies which character
starts comments in assembler syntax.
+@ifnottex
+@include fortran-xtra.texi
+@end ifnottex
+
@ignore
arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0
@end ignore
diff --git a/man/sending.texi b/man/sending.texi
index 0c0c249ba5d..df2ccd962a0 100644
--- a/man/sending.texi
+++ b/man/sending.texi
@@ -2,7 +2,7 @@
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Sending Mail, Rmail, Abbrevs, Top
+@node Sending Mail
@chapter Sending Mail
@cindex sending mail
@cindex mail
diff --git a/man/texinfo.tex b/man/texinfo.tex
index 7ed20f016b1..f6ac94ed734 100644
--- a/man/texinfo.tex
+++ b/man/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2006-03-21.13}
+\def\texinfoversion{2006-05-05.09}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@@ -1471,6 +1471,7 @@ where each line of input produces a line of output.}
% We don't need math for this font style.
\def\ttsl{\setfontstyle{ttsl}}
+
% Default leading.
\newdimen\textleading \textleading = 13.2pt
@@ -1492,11 +1493,13 @@ where each line of input produces a line of output.}
}%
}
+
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor
\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
+
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
@@ -1520,6 +1523,10 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
+% Definitions for a main text size of 11pt. This is the default in
+% Texinfo.
+%
+\def\definetextfontsizexi{
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
\edef\mainmagstep{\magstephalf}
@@ -1633,6 +1640,165 @@ where each line of input produces a line of output.}
\font\reducedi=cmmi10
\font\reducedsy=cmsy10
+% reset the current fonts
+\textfonts
+\rm
+} % end of 11pt text font size definitions
+
+
+% Definitions to make the main text be 10pt Computer Modern, with
+% section, chapter, etc., sizes following suit. This is for the GNU
+% Press printing of the Emacs 22 manual. Maybe other manuals in the
+% future. Used with @smallbook, which sets the leading to 12pt.
+%
+\def\definetextfontsizex{%
+% Text fonts (10pt).
+\def\textnominalsize{10pt}
+\edef\mainmagstep{1000}
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
+\setfont\textbf\bfshape{10}{\mainmagstep}
+\setfont\textit\itshape{10}{\mainmagstep}
+\setfont\textsl\slshape{10}{\mainmagstep}
+\setfont\textsf\sfshape{10}{\mainmagstep}
+\setfont\textsc\scshape{10}{\mainmagstep}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstephalf}
+\setfont\deftt\ttshape{10}{\magstephalf}
+\setfont\defttsl\ttslshape{10}{\magstephalf}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}
+\setfont\smalltt\ttshape{9}{1000}
+\setfont\smallbf\bfshape{10}{900}
+\setfont\smallit\itshape{9}{1000}
+\setfont\smallsl\slshape{9}{1000}
+\setfont\smallsf\sfshape{9}{1000}
+\setfont\smallsc\scshape{10}{900}
+\setfont\smallttsl\ttslshape{10}{900}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}
+\setfont\smallertt\ttshape{8}{1000}
+\setfont\smallerbf\bfshape{10}{800}
+\setfont\smallerit\itshape{8}{1000}
+\setfont\smallersl\slshape{8}{1000}
+\setfont\smallersf\sfshape{8}{1000}
+\setfont\smallersc\scshape{10}{800}
+\setfont\smallerttsl\ttslshape{10}{800}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}
+\setfont\titleit\itbshape{10}{\magstep4}
+\setfont\titlesl\slbshape{10}{\magstep4}
+\setfont\titlett\ttbshape{12}{\magstep3}
+\setfont\titlettsl\ttslshape{10}{\magstep4}
+\setfont\titlesf\sfbshape{17}{\magstep1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\authorrm{\secrm}
+\def\authortt{\sectt}
+
+% Chapter fonts (14.4pt).
+\def\chapnominalsize{14pt}
+\setfont\chaprm\rmbshape{12}{\magstep1}
+\setfont\chapit\itbshape{10}{\magstep2}
+\setfont\chapsl\slbshape{10}{\magstep2}
+\setfont\chaptt\ttbshape{12}{\magstep1}
+\setfont\chapttsl\ttslshape{10}{\magstep2}
+\setfont\chapsf\sfbshape{12}{\magstep1}
+\let\chapbf\chaprm
+\setfont\chapsc\scbshape{10}{\magstep2}
+\font\chapi=cmmi12 scaled \magstep1
+\font\chapsy=cmsy10 scaled \magstep2
+
+% Section fonts (12pt).
+\def\secnominalsize{12pt}
+\setfont\secrm\rmbshape{12}{1000}
+\setfont\secit\itbshape{10}{\magstep1}
+\setfont\secsl\slbshape{10}{\magstep1}
+\setfont\sectt\ttbshape{12}{1000}
+\setfont\secttsl\ttslshape{10}{\magstep1}
+\setfont\secsf\sfbshape{12}{1000}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep1}
+\font\seci=cmmi12
+\font\secsy=cmsy10 scaled \magstep1
+
+% Subsection fonts (10pt).
+\def\ssecnominalsize{10pt}
+\setfont\ssecrm\rmbshape{10}{1000}
+\setfont\ssecit\itbshape{10}{1000}
+\setfont\ssecsl\slbshape{10}{1000}
+\setfont\ssectt\ttbshape{10}{1000}
+\setfont\ssecttsl\ttslshape{10}{1000}
+\setfont\ssecsf\sfbshape{10}{1000}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1000}
+\font\sseci=cmmi10
+\font\ssecsy=cmsy10
+
+% Reduced fonts for @acro in text (9pt).
+\def\reducednominalsize{9pt}
+\setfont\reducedrm\rmshape{9}{1000}
+\setfont\reducedtt\ttshape{9}{1000}
+\setfont\reducedbf\bfshape{10}{900}
+\setfont\reducedit\itshape{9}{1000}
+\setfont\reducedsl\slshape{9}{1000}
+\setfont\reducedsf\sfshape{9}{1000}
+\setfont\reducedsc\scshape{10}{900}
+\setfont\reducedttsl\ttslshape{10}{900}
+\font\reducedi=cmmi9
+\font\reducedsy=cmsy9
+
+% reduce space between paragraphs
+\divide\parskip by 2
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 10pt text font size definitions
+
+
+% We provide the user-level command
+% @fonttextsize 10
+% (or 11) to redefine the text font size. pt is assumed.
+%
+\def\xword{10}
+\def\xiword{11}
+%
+\parseargdef\fonttextsize{%
+ \def\textsizearg{#1}%
+ \wlog{doing @fonttextsize \textsizearg}%
+ %
+ % Set \globaldefs so that documents can use this inside @tex, since
+ % makeinfo 4.8 does not support it, but we need it nonetheless.
+ %
+ \begingroup \globaldefs=1
+ \ifx\textsizearg\xword \definetextfontsizex
+ \else \ifx\textsizearg\xiword \definetextfontsizexi
+ \else
+ \errhelp=\EMsimple
+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
+ \fi\fi
+ \endgroup
+}
+
+
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts except
@@ -1743,7 +1909,7 @@ where each line of input produces a line of output.}
% Set up the default fonts, so we can use them for creating boxes.
%
-\textfonts \rm
+\definetextfontsizexi
% Define these so they can be easily changed for other fonts.
\def\angleleft{$\langle$}
diff --git a/man/text.texi b/man/text.texi
index 97e6aa50338..f9b1d312453 100644
--- a/man/text.texi
+++ b/man/text.texi
@@ -55,7 +55,13 @@ Then the formatting appears on the screen in Emacs while you edit.
If you need to edit pictures made out of text characters (commonly
referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter
Picture mode, a special major mode for editing such pictures.
-@inforef{Picture Mode,, emacs-xtra}.
+@iftex
+@xref{Picture Mode,,, emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{Picture Mode}.
+@end ifnottex
+
@cindex skeletons
@cindex templates
diff --git a/man/tramp.texi b/man/tramp.texi
index 89773534096..acee8ce7321 100644
--- a/man/tramp.texi
+++ b/man/tramp.texi
@@ -1831,9 +1831,15 @@ should you want to add your own.
@section Filename completion
@cindex filename completion
-Filename completion works with @value{tramp} for both completing methods,
-user names and machine names (except multi hop methods) as well as for
-files on remote machines.
+Filename completion works with @value{tramp} for completion of method
+names, of user names and of machine names (except multi-hop methods)
+as well as for completion of file names on remote machines.
+@ifset emacs
+In order to enable this, Partial Completion mode must be set on.
+@ifinfo
+@xref{Completion Options, , , @value{emacsdir}}.
+@end ifinfo
+@end ifset
If you, for example, type @kbd{C-x C-f @value{prefix}t
@key{TAB}}, @value{tramp} might give you as result the choice for
diff --git a/man/trouble.texi b/man/trouble.texi
index 90e99a0ea59..9e09dac4d43 100644
--- a/man/trouble.texi
+++ b/man/trouble.texi
@@ -58,8 +58,14 @@ Search}).
like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to
recognize @kbd{C-g} while a command is running, between interactions
with the user. By contrast, it @emph{is} feasible to recognize
-@kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard,,,emacs-xtra,
-Specialized Emacs Features}.
+@kbd{C-@key{BREAK}} at all times.
+@iftex
+@xref{MS-DOS Keyboard,,,emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{MS-DOS Keyboard}.
+@end ifnottex
+
@findex keyboard-quit
@kbd{C-g} works by setting the variable @code{quit-flag} to @code{t}
diff --git a/man/vc-xtra.texi b/man/vc-xtra.texi
new file mode 100644
index 00000000000..6e8985b2e39
--- /dev/null
+++ b/man/vc-xtra.texi
@@ -0,0 +1,32 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included in emacs-xtra.texi when producing the printed
+@c version.
+@iftex
+@node Advanced VC Usage
+@section Advanced VC Usage
+
+ Commonly used features of Emacs' version control (VC) support are
+described in the main Emacs manual (@pxref{Version Control,,,emacs,
+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.
+* 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.
+@end menu
+@end iftex
+
+@iftex
+@include vc1-xtra.texi
+@include vc2-xtra.texi
+@end iftex
+
+@ignore
+ arch-tag: 11a18d0e-1baf-49da-8e38-f61195ae4dc3
+@end ignore
diff --git a/man/vc1-xtra.texi b/man/vc1-xtra.texi
new file mode 100644
index 00000000000..16edf79a3bd
--- /dev/null
+++ b/man/vc1-xtra.texi
@@ -0,0 +1,151 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in vc-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node VC Dired Mode
+@subsection Dired under VC
+
+@cindex PCL-CVS
+@pindex cvs
+@cindex CVS Dired Mode
+ The VC Dired Mode described here works with all the version control
+systems that VC supports. Another more powerful facility, designed
+specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS,
+pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
+
+@kindex C-x v d
+@findex vc-directory
+ When you are working on a large program, it is often useful to find
+out which files have changed within an entire directory tree, or to view
+the status of all files under version control at once, and to perform
+version control operations on collections of files. You can use the
+command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing
+that includes only files relevant for version control.
+
+@vindex vc-dired-terse-display
+ @kbd{C-x v d} creates a buffer which uses VC Dired Mode. This looks
+much like an ordinary Dired buffer
+@iftex
+(@pxref{Dired,,,emacs, the Emacs Manual});
+@end iftex
+@ifnottex
+(@pxref{Dired});
+@end ifnottex
+however, normally it shows only the noteworthy files (those locked or
+not up-to-date). This is called @dfn{terse display}. If you set the
+variable @code{vc-dired-terse-display} to @code{nil}, then VC Dired
+shows all relevant files---those managed under version control, plus
+all subdirectories (@dfn{full display}). The command @kbd{v t} in a
+VC Dired buffer toggles between terse display and full display
+(@pxref{VC Dired Commands}).
+
+@vindex vc-dired-recurse
+ By default, VC Dired produces a recursive listing of noteworthy or
+relevant files at or below the given directory. You can change this by
+setting the variable @code{vc-dired-recurse} to @code{nil}; then VC
+Dired shows only the files in the given directory.
+
+ The line for an individual file shows the version control state in the
+place of the hard link count, owner, group, and size of the file. If
+the file is unmodified, in sync with the master file, the version
+control state shown is blank. Otherwise it consists of text in
+parentheses. Under RCS and SCCS, the name of the user locking the file
+is shown; under CVS, an abbreviated version of the @samp{cvs status}
+output is used. Here is an example using RCS:
+
+@smallexample
+@group
+ /home/jim/project:
+
+ -rw-r--r-- (jim) Apr 2 23:39 file1
+ -r--r--r-- Apr 5 20:21 file2
+@end group
+@end smallexample
+
+@noindent
+The files @samp{file1} and @samp{file2} are under version control,
+@samp{file1} is locked by user jim, and @samp{file2} is unlocked.
+
+ Here is an example using CVS:
+
+@smallexample
+@group
+ /home/joe/develop:
+
+ -rw-r--r-- (modified) Aug 2 1997 file1.c
+ -rw-r--r-- Apr 4 20:09 file2.c
+ -rw-r--r-- (merge) Sep 13 1996 file3.c
+@end group
+@end smallexample
+
+ Here @samp{file1.c} is modified with respect to the repository, and
+@samp{file2.c} is not. @samp{file3.c} is modified, but other changes
+have also been checked in to the repository---you need to merge them
+with the work file before you can check it in.
+
+@vindex vc-stay-local
+@vindex vc-cvs-stay-local
+ In the above, if the repository were on a remote machine, VC would
+only contact it when the variable @code{vc-stay-local} (or
+@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
+because access to the repository may be slow, or you may be working
+offline and not have access to the repository at all. As a
+consequence, VC would not be able to tell you that @samp{file3.c} is
+in the ``merge'' state; you would learn that only when you try to
+check-in your modified copy of the file, or use a command such as
+@kbd{C-x v m}.
+
+ In practice, this is not a problem because CVS handles this case
+consistently whenever it arises. In VC, you'll simply get prompted to
+merge the remote changes into your work file first. The benefits of
+less network communication usually outweigh the disadvantage of not
+seeing remote changes immediately.
+
+@vindex vc-directory-exclusion-list
+ When VC Dired displays subdirectories (in the ``full'' display mode),
+it omits some that should never contain any files under version control.
+By default, this includes Version Control subdirectories such as
+@samp{RCS} and @samp{CVS}; you can customize this by setting the
+variable @code{vc-directory-exclusion-list}.
+
+ You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in
+ordinary Dired, that allows you to specify additional switches for the
+@samp{ls} command.
+
+@node VC Dired Commands
+@subsection VC Dired Commands
+
+ 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.
+
+ 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 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.
+
+@findex vc-dired-toggle-terse-mode
+@findex vc-dired-mark-locked
+ You can toggle between terse display (only locked files, or files not
+up-to-date) and full display at any time by typing @kbd{v t}
+(@code{vc-dired-toggle-terse-mode}). There is also a special command
+@kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently
+locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l
+t k} is another way to delete from the buffer all files except those
+currently locked.
+
+@ignore
+ arch-tag: 8e8c2a01-ad41-4e61-a89a-60131ad67263
+@end ignore
diff --git a/man/vc2-xtra.texi b/man/vc2-xtra.texi
new file mode 100644
index 00000000000..14b8bc9fb07
--- /dev/null
+++ b/man/vc2-xtra.texi
@@ -0,0 +1,789 @@
+@c This is part of the Emacs manual.
+@c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+@c See file emacs.texi for copying conditions.
+@c
+@c This file is included either in vc-xtra.texi (when producing the
+@c printed version) or in the main Emacs manual (for the on-line version).
+@node Remote Repositories
+@subsection Remote Repositories
+@cindex remote repositories (CVS)
+
+ 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.
+
+ 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.
+
+@menu
+* Version Backups:: Keeping local copies of repository versions.
+* Local Version Control:: Using another version system for local editing.
+@end menu
+
+@node Version Backups
+@subsubsection Version Backups
+@cindex version backups
+
+@cindex automatic version backups
+ When VC sees that the CVS 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
+revert to that version (@kbd{C-x v u}), without any network
+interactions.
+
+ The local copy of the unmodified file is called a @dfn{version
+backup} to indicate that it corresponds exactly to a version that is
+stored in the repository. Note that version backups are not the same
+as ordinary Emacs backup files
+@iftex
+(@pxref{Backup,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Backup}).
+@end ifnottex
+But they follow a similar naming convention.
+
+ For a file that comes from a remote CVS 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
+setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
+
+@cindex manual version backups
+ The name of the automatic version backup for version @var{version}
+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}),
+@end iftex
+@ifnottex
+(@pxref{Old Versions}),
+@end ifnottex
+the only difference being the additional dot (@samp{.}) after the
+version number. This similarity is intentional, because both kinds of
+files store the same kind of information. The file made by @kbd{C-x v
+~} acts as a @dfn{manual version backup}.
+
+ All the VC commands that operate on old versions of a file can use
+both kinds of version backups. For instance, @kbd{C-x v ~} uses
+either an automatic or a manual version backup, if possible, to get
+the contents of the version you request. Likewise, @kbd{C-x v =} and
+@kbd{C-x v u} use either an automatic or a manual version backup, if
+one of them exists, to get the contents of a version to compare or
+revert to. If you changed a file outside of Emacs, so that no
+automatic version backup was created for the previous text, you can
+create a manual backup of that version using @kbd{C-x v ~}, and thus
+obtain the benefit of the local copy for Emacs commands.
+
+ The only difference in Emacs's handling of manual and automatic
+version backups, once they exist, is that Emacs deletes automatic
+version backups when you commit to the repository. By contrast,
+manual version backups remain until you delete them.
+
+@node Local Version Control
+@subsubsection Local Version Control
+@cindex local version control
+@cindex local back end (version control)
+
+When you make many changes to a file that comes from a remote
+repository, it can be convenient to have version control on your local
+machine as well. You can then record intermediate versions, revert to
+a previous state, etc., before you actually commit your changes to the
+remote server.
+
+VC lets you do this by putting a file under a second, local version
+control system, so that the file is effectively registered in two
+systems at the same time. For the description here, we will assume
+that the remote system is CVS, and you use RCS locally, although the
+mechanism works with any combination of version control systems
+(@dfn{back ends}).
+
+To make it work with other back ends, you must make sure that the
+``more local'' back end comes before the ``more remote'' back end in
+the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
+default, this variable is set up so that you can use remote CVS and
+local RCS as described here.
+
+To start using local RCS for a file that comes from a remote CVS
+server, you must @emph{register the file in RCS}, by typing @kbd{C-u
+C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
+prefix argument, and specify RCS as the back end.)
+
+You can do this at any time; it does not matter whether you have
+already modified the file with respect to the version in the CVS
+repository. If possible, VC tries to make the RCS master start with
+the unmodified repository version, then checks in any local changes
+as a new version. This works if you have not made any changes yet, or
+if the unmodified repository version exists locally as a version
+backup (@pxref{Version Backups}). If the unmodified version is not
+available locally, the RCS master starts with the modified version;
+the only drawback to this is that you cannot compare your changes
+locally to what is stored in the repository.
+
+The version number of the RCS master is derived from the current CVS
+version, starting a branch from it. For example, if the current CVS
+version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
+the RCS master will be identical to version 1.23 under CVS; your first
+changes are checked in as 1.23.1.1. (If the unmodified file is not
+available locally, VC will check in the modified file twice, both as
+1.23 and 1.23.1.1, to make the revision numbers consistent.)
+
+If you do not use locking under CVS (the default), locking is also
+disabled for RCS, so that editing under RCS works exactly as under
+CVS.
+
+When you are done with local editing, you can commit the final version
+back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
+This initializes the log entry buffer
+@iftex
+(@pxref{Log Buffer,,,emacs, the Emacs Manual})
+@end iftex
+@ifnottex
+(@pxref{Log Buffer})
+@end ifnottex
+to contain all the log entries you have recorded in the RCS master;
+you can edit them as you wish, and then commit in CVS by typing
+@kbd{C-c C-c}. If the commit is successful, VC removes the RCS
+master, so that the file is once again registered under CVS only.
+(The RCS master is not actually deleted, just renamed by appending
+@samp{~} to the name, so that you can refer to it later if you wish.)
+
+While using local RCS, you can pick up recent changes from the CVS
+repository into your local file, or commit some of your changes back
+to CVS, without terminating local RCS version control. To do this,
+switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
+
+@table @kbd
+@item C-x v b
+Switch to another back end that the current file is registered
+under (@code{vc-switch-backend}).
+
+@item C-u C-x v b @var{backend} @key{RET}
+Switch to @var{backend} for the current file.
+@end table
+
+@kindex C-x v b
+@findex vc-switch-backend
+@kbd{C-x v b} does not change the buffer contents, or any files; it
+only changes VC's perspective on how to handle the file. Any
+subsequent VC commands for that file will operate on the back end that
+is currently selected.
+
+If the current file is registered in more than one back end, typing
+@kbd{C-x v b} ``cycles'' through all of these back ends. With a
+prefix argument, it asks for the back end to use in the minibuffer.
+
+Thus, if you are using local RCS, and you want to pick up some recent
+changes in the file from remote CVS, first visit the file, then type
+@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
+@key{RET}} to merge the news
+@iftex
+(@pxref{Merging,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Merging}).
+@end ifnottex
+You can then switch back to RCS by typing @kbd{C-x v b} again, and
+continue to edit locally.
+
+But if you do this, the revision numbers in the RCS master no longer
+correspond to those of CVS. Technically, this is not a problem, but
+it can become difficult to keep track of what is in the CVS repository
+and what is not. So we suggest that you return from time to time to
+CVS-only operation, by committing your local changes back to the
+repository using @kbd{C-u C-x v v cvs @key{RET}}.
+
+@node Snapshots
+@subsection Snapshots
+@cindex snapshots and version control
+
+ A @dfn{snapshot} is a named set of file versions (one for each
+registered file) that you can treat as a unit. One important kind of
+snapshot is a @dfn{release}, a (theoretically) stable version of the
+system that is ready for distribution to users.
+
+@menu
+* Making Snapshots:: The snapshot facilities.
+* Snapshot Caveats:: Things to be careful of when using snapshots.
+@end menu
+
+@node Making Snapshots
+@subsubsection Making and Using Snapshots
+
+ There are two basic commands for snapshots; one makes a
+snapshot with a given name, the other retrieves a named snapshot.
+
+@table @code
+@kindex C-x v s
+@findex vc-create-snapshot
+@item C-x v s @var{name} @key{RET}
+Define the last saved versions of every registered file in or under the
+current directory as a snapshot named @var{name}
+(@code{vc-create-snapshot}).
+
+@kindex C-x v r
+@findex vc-retrieve-snapshot
+@item C-x v r @var{name} @key{RET}
+For all registered files at or below the current directory level, select
+whatever versions correspond to the snapshot @var{name}
+(@code{vc-retrieve-snapshot}).
+
+This command reports an error if any files are locked at or below the
+current directory, without changing anything; this is to avoid
+overwriting work in progress.
+@end table
+
+ A snapshot uses a very small amount of resources---just enough to record
+the list of file names and which version belongs to the snapshot. Thus,
+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}).
+@end iftex
+@ifnottex
+(@pxref{Old Versions}).
+@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
+version.
+
+@node Snapshot Caveats
+@subsubsection Snapshot Caveats
+
+@cindex named configurations (RCS)
+ VC's snapshot facilities are modeled on RCS's named-configuration
+support. They use RCS's native facilities for this, so
+snapshots made using RCS through VC are visible even when you bypass VC.
+
+ With CVS, Meta-CVS, and Subversion, VC also uses the native
+mechanism provided by that back end to make snapshots and retrieve them
+(@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion).
+
+@c worded verbosely to avoid overfull hbox.
+ For SCCS, VC implements snapshots itself. The files it uses contain
+name/file/version-number triples. These snapshots are visible only
+through VC.
+
+ There is no support for VC snapshots using GNU Arch yet.
+
+ A snapshot is a set of checked-in versions. So make sure that all the
+files are checked in and not locked when you make a snapshot.
+
+ File renaming and deletion can create some difficulties with snapshots.
+This is not a VC-specific problem, but a general design issue in version
+control systems that no one has solved very well yet.
+
+ If you rename a registered file, you need to rename its master along
+with it (the command @code{vc-rename-file} does this automatically). If
+you are using SCCS, you must also update the records of the snapshot, to
+mention the file by its new name (@code{vc-rename-file} does this,
+too). An old snapshot that refers to a master file that no longer
+exists under the recorded name is invalid; VC can no longer retrieve
+it. It would be beyond the scope of this manual to explain enough about
+RCS and SCCS to explain how to update the snapshots by hand.
+
+ Using @code{vc-rename-file} makes the snapshot remain valid for
+retrieval, but it does not solve all problems. For example, some of the
+files in your program probably refer to others by name. At the very
+least, the makefile probably mentions the file that you renamed. If you
+retrieve an old snapshot, the renamed file is retrieved under its new
+name, which is not the name that the makefile expects. So the program
+won't really work as retrieved.
+
+@node Miscellaneous VC
+@subsection Miscellaneous Commands and Features of VC
+
+ This section explains the less-frequently-used features of VC.
+
+@menu
+* Change Logs and VC:: Generating a change log file from log entries.
+* Renaming and VC:: A command to rename both the source and master
+ file correctly.
+* Version Headers:: Inserting version control headers into working files.
+@end menu
+
+@node Change Logs and VC
+@subsubsection Change Logs and VC
+
+ If you use RCS or CVS for a program and also maintain a change log
+file for it
+@iftex
+(@pxref{Change Log,,,emacs, the Emacs Manual}),
+@end iftex
+@ifnottex
+(@pxref{Change Log}),
+@end ifnottex
+you can generate change log entries automatically from the version
+control log entries:
+
+@table @kbd
+@item C-x v a
+@kindex C-x v a
+@findex vc-update-change-log
+Visit the current directory's change log file and, for registered files
+in that directory, create new entries for versions checked in since the
+most recent entry in the change log file.
+(@code{vc-update-change-log}).
+
+This command works with RCS or CVS only, not with any of the other
+back ends.
+
+@item C-u C-x v a
+As above, but only find entries for the current buffer's file.
+
+@item M-1 C-x v a
+As above, but find entries for all the currently visited files that are
+maintained with version control. This works only with RCS, and it puts
+all entries in the log for the default directory, which may not be
+appropriate.
+@end table
+
+ For example, suppose the first line of @file{ChangeLog} is dated
+1999-04-10, and that the only check-in since then was by Nathaniel
+Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
+messages that start with `#'.}. Then @kbd{C-x v a} visits
+@file{ChangeLog} and inserts text like this:
+
+@iftex
+@medbreak
+@end iftex
+@smallexample
+@group
+1999-05-22 Nathaniel Bowditch <nat@@apn.org>
+
+ * rcs2log: Ignore log messages that start with `#'.
+@end group
+@end smallexample
+@iftex
+@medbreak
+@end iftex
+
+@noindent
+You can then edit the new change log entry further as you wish.
+
+ Some of the new change log entries may duplicate what's already in
+ChangeLog. You will have to remove these duplicates by hand.
+
+ Normally, the log entry for file @file{foo} is displayed as @samp{*
+foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
+if the text of the log entry starts with @w{@samp{(@var{functionname}):
+}}. For example, if the log entry for @file{vc.el} is
+@samp{(vc-do-command): Check call-process status.}, then the text in
+@file{ChangeLog} looks like this:
+
+@iftex
+@medbreak
+@end iftex
+@smallexample
+@group
+1999-05-06 Nathaniel Bowditch <nat@@apn.org>
+
+ * vc.el (vc-do-command): Check call-process status.
+@end group
+@end smallexample
+@iftex
+@medbreak
+@end iftex
+
+ When @kbd{C-x v a} adds several change log entries at once, it groups
+related log entries together if they all are checked in by the same
+author at nearly the same time. If the log entries for several such
+files all have the same text, it coalesces them into a single entry.
+For example, suppose the most recent check-ins have the following log
+entries:
+
+@flushleft
+@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
+@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
+@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
+@end flushleft
+
+@noindent
+They appear like this in @file{ChangeLog}:
+
+@iftex
+@medbreak
+@end iftex
+@smallexample
+@group
+1999-04-01 Nathaniel Bowditch <nat@@apn.org>
+
+ * vc.texinfo: Fix expansion typos.
+
+ * vc.el, vc-hooks.el: Don't call expand-file-name.
+@end group
+@end smallexample
+@iftex
+@medbreak
+@end iftex
+
+ Normally, @kbd{C-x v a} separates log entries by a blank line, but you
+can mark several related log entries to be clumped together (without an
+intervening blank line) by starting the text of each related log entry
+with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label
+itself is not copied to @file{ChangeLog}. For example, suppose the log
+entries are:
+
+@flushleft
+@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
+@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
+@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
+@end flushleft
+
+@noindent
+Then the text in @file{ChangeLog} looks like this:
+
+@iftex
+@medbreak
+@end iftex
+@smallexample
+@group
+1999-04-01 Nathaniel Bowditch <nat@@apn.org>
+
+ * vc.texinfo: Fix expansion typos.
+ * vc.el, vc-hooks.el: Don't call expand-file-name.
+@end group
+@end smallexample
+@iftex
+@medbreak
+@end iftex
+
+ A log entry whose text begins with @samp{#} is not copied to
+@file{ChangeLog}. For example, if you merely fix some misspellings in
+comments, you can log the change with an entry beginning with @samp{#}
+to avoid putting such trivia into @file{ChangeLog}.
+
+@node Renaming and VC
+@subsubsection Renaming VC Work Files and Master Files
+
+@findex vc-rename-file
+ When you rename a registered file, you must also rename its master
+file correspondingly to get proper results. Use @code{vc-rename-file}
+to rename the source file as you specify, and rename its master file
+accordingly. It also updates any snapshots (@pxref{Snapshots}) that
+mention the file, so that they use the new name; despite this, the
+snapshot thus modified may not completely work (@pxref{Snapshot
+Caveats}).
+
+ Some back ends do not provide an explicit rename operation to their
+repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
+on the original and renamed buffers and provide the necessary edit
+log.
+
+ You cannot use @code{vc-rename-file} on a file that is locked by
+someone else.
+
+@node Version Headers
+@subsubsection Inserting Version Control Headers
+
+ Sometimes it is convenient to put version identification strings
+directly into working files. Certain special strings called
+@dfn{version headers} are replaced in each successive version by the
+number of that version, the name of the user who created it, and other
+relevant information. All of the back ends that VC supports have such
+a mechanism, except GNU Arch.
+
+ VC does not normally use the information contained in these headers.
+The exception is RCS---with RCS, version headers are sometimes more
+reliable than the master file to determine which version of the file
+you are editing. Note that in a multi-branch environment, version
+headers are necessary to make VC behave correctly
+@iftex
+(@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Multi-User Branching}).
+@end ifnottex
+
+ Searching for RCS version headers is controlled by the variable
+@code{vc-consult-headers}. If it is non-@code{nil} (the default),
+Emacs searches for headers to determine the version number you are
+editing. Setting it to @code{nil} disables this feature.
+
+ Note that although CVS uses the same kind of version headers as RCS
+does, VC never searches for these headers if you are using CVS,
+regardless of the above setting.
+
+@kindex C-x v h
+@findex vc-insert-headers
+ You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
+insert a suitable header string.
+
+@table @kbd
+@item C-x v h
+Insert headers in a file for use with your version-control system.
+@end table
+
+@vindex vc-@var{backend}-header
+ The default header string is @samp{@w{$}Id$} for RCS and
+@samp{@w{%}W%} for SCCS. You can specify other headers to insert by
+setting the variables @code{vc-@var{backend}-header} where
+@var{backend} is @code{rcs} or @code{sccs}.
+
+ Instead of a single string, you can specify a list of strings; then
+each string in the list is inserted as a separate header on a line of
+its own.
+
+ It may be necessary to use apparently-superfluous backslashes when
+writing the strings that you put in this variable. For instance, you
+might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
+backslash prevents the string constant from being interpreted as a
+header, if the Emacs Lisp file containing it is maintained with
+version control.
+
+@vindex vc-comment-alist
+ Each header is inserted surrounded by tabs, inside comment delimiters,
+on a new line at point. Normally the ordinary comment
+start and comment end strings of the current mode are used, but for
+certain modes, there are special comment delimiters for this purpose;
+the variable @code{vc-comment-alist} specifies them. Each element of
+this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
+
+@vindex vc-static-header-alist
+ The variable @code{vc-static-header-alist} specifies further strings
+to add based on the name of the buffer. Its value should be a list of
+elements of the form @code{(@var{regexp} . @var{format})}. Whenever
+@var{regexp} matches the buffer name, @var{format} is inserted as part
+of the header. A header line is inserted for each element that matches
+the buffer name, and for each string specified by
+@code{vc-@var{backend}-header}. The header line is made by processing the
+string from @code{vc-@var{backend}-header} with the format taken from the
+element. The default value for @code{vc-static-header-alist} is as follows:
+
+@example
+@group
+(("\\.c$" .
+ "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
+#endif /* lint */\n"))
+@end group
+@end example
+
+@noindent
+It specifies insertion of text of this form:
+
+@example
+@group
+
+#ifndef lint
+static char vcid[] = "@var{string}";
+#endif /* lint */
+@end group
+@end example
+
+@noindent
+Note that the text above starts with a blank line.
+
+ If you use more than one version header in a file, put them close
+together in the file. The mechanism in @code{revert-buffer} that
+preserves markers may not handle markers positioned between two version
+headers.
+
+@node Customizing VC
+@subsection Customizing VC
+
+@vindex vc-handled-backends
+The variable @code{vc-handled-backends} determines which version
+control systems VC should handle. The default value is @code{(RCS CVS
+SVN SCCS Arch MCVS)}, so it contains all six version systems that are
+currently supported. If you want VC to ignore one or more of these
+systems, exclude its name from the list. To disable VC entirely, set
+this variable to @code{nil}.
+
+The order of systems in the list is significant: when you visit a file
+registered in more than one system (@pxref{Local Version Control}), VC
+uses the system that comes first in @code{vc-handled-backends} by
+default. The order is also significant when you register a file for
+the first time, see
+@iftex
+@ref{Registering,,,emacs, the Emacs Manual},
+@end iftex
+@ifnottex
+@ref{Registering},
+@end ifnottex
+for details.
+
+@menu
+* General VC Options:: Options that apply to multiple back ends.
+* RCS and SCCS:: Options for RCS and SCCS.
+* CVS Options:: Options for CVS.
+@end menu
+
+@node General VC Options
+@subsubsection General Options
+
+@vindex vc-make-backup-files
+ Emacs normally does not save backup files for source files that are
+maintained with version control. If you want to make backup files even
+for files that use version control, set the variable
+@code{vc-make-backup-files} to a non-@code{nil} value.
+
+@vindex vc-keep-workfiles
+ Normally the work file exists all the time, whether it is locked or
+not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
+in a new version with @kbd{C-x v v} deletes the work file; but any
+attempt to visit the file with Emacs creates it again. (With CVS, work
+files are always kept.)
+
+@vindex vc-follow-symlinks
+ Editing a version-controlled file through a symbolic link can be
+dangerous. It bypasses the version control system---you can edit the
+file without locking it, and fail to check your changes in. Also,
+your changes might overwrite those of another user. To protect against
+this, VC checks each symbolic link that you visit, to see if it points
+to a file under version control.
+
+ The variable @code{vc-follow-symlinks} controls what to do when a
+symbolic link points to a version-controlled file. If it is @code{nil},
+VC only displays a warning message. If it is @code{t}, VC automatically
+follows the link, and visits the real file instead, telling you about
+this in the echo area. If the value is @code{ask} (the default), VC
+asks you each time whether to follow the link.
+
+@vindex vc-suppress-confirm
+ If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
+and @kbd{C-x v i} can save the current buffer without asking, and
+@kbd{C-x v u} also operates without asking for confirmation. (This
+variable does not affect @kbd{C-x v c}; that operation is so drastic
+that it should always ask for confirmation.)
+
+@vindex vc-command-messages
+ VC mode does much of its work by running the shell commands for RCS,
+CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC
+displays messages to indicate which shell commands it runs, and
+additional messages when the commands finish.
+
+@vindex vc-path
+ You can specify additional directories to search for version control
+programs by setting the variable @code{vc-path}. These directories
+are searched before the usual search path. It is rarely necessary to
+set this variable, because VC normally finds the proper files
+automatically.
+
+@node RCS and SCCS
+@subsubsection Options for RCS and SCCS
+
+@cindex non-strict locking (RCS)
+@cindex locking, non-strict (RCS)
+ By default, RCS uses locking to coordinate the activities of several
+users, but there is a mode called @dfn{non-strict locking} in which
+you can check-in changes without locking the file first. Use
+@samp{rcs -U} to switch to non-strict locking for a particular file,
+see the @code{rcs} manual page for details.
+
+ When deducing the version control state of an RCS file, VC first
+looks for an RCS version header string in the file (@pxref{Version
+Headers}). If there is no header string, VC normally looks at the
+file permissions of the work file; this is fast. But there might be
+situations when the file permissions cannot be trusted. In this case
+the master file has to be consulted, which is rather expensive. Also
+the master file can only tell you @emph{if} there's any lock on the
+file, but not whether your work file really contains that locked
+version.
+
+@vindex vc-consult-headers
+ You can tell VC not to use version headers to determine the file
+status by setting @code{vc-consult-headers} to @code{nil}. VC then
+always uses the file permissions (if it is supposed to trust them), or
+else checks the master file.
+
+@vindex vc-mistrust-permissions
+ You can specify the criterion for whether to trust the file
+permissions by setting the variable @code{vc-mistrust-permissions}.
+Its value can be @code{t} (always mistrust the file permissions and
+check the master file), @code{nil} (always trust the file
+permissions), or a function of one argument which makes the decision.
+The argument is the directory name of the @file{RCS} subdirectory. A
+non-@code{nil} value from the function says to mistrust the file
+permissions. If you find that the file permissions of work files are
+changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
+Then VC always checks the master file to determine the file's status.
+
+ VC determines the version control state of files under SCCS much as
+with RCS. It does not consider SCCS version headers, though. Thus,
+the variable @code{vc-mistrust-permissions} affects SCCS use, but
+@code{vc-consult-headers} does not.
+
+@node CVS Options
+@subsubsection Options specific for CVS
+
+@cindex locking (CVS)
+ By default, CVS does not use locking to coordinate the activities of
+several users; anyone can change a work file at any time. However,
+there are ways to restrict this, resulting in behavior that resembles
+locking.
+
+@cindex CVSREAD environment variable (CVS)
+ For one thing, you can set the @env{CVSREAD} environment variable
+(the value you use makes no difference). If this variable is defined,
+CVS makes your work files read-only by default. In Emacs, you must
+type @kbd{C-x v v} to make the file writable, so that editing works
+in fact similar as if locking was used. Note however, that no actual
+locking is performed, so several users can make their files writable
+at the same time. When setting @env{CVSREAD} for the first time, make
+sure to check out all your modules anew, so that the file protections
+are set correctly.
+
+@cindex cvs watch feature
+@cindex watching files (CVS)
+ Another way to achieve something similar to locking is to use the
+@dfn{watch} feature of CVS. If a file is being watched, CVS makes it
+read-only by default, and you must also use @kbd{C-x v v} in Emacs to
+make it writable. VC calls @code{cvs edit} to make the file writable,
+and CVS takes care to notify other developers of the fact that you
+intend to change the file. See the CVS documentation for details on
+using the watch feature.
+
+@vindex vc-stay-local
+@vindex vc-cvs-stay-local
+@cindex remote repositories (CVS)
+ When a file's repository is on a remote machine, VC tries to keep
+network interactions to a minimum. This is controlled by the variable
+@code{vc-cvs-stay-local}. There is another variable,
+@code{vc-stay-local}, which enables the feature also for other back
+ends that support it, including CVS. In the following, we will talk
+only about @code{vc-cvs-stay-local}, but everything applies to
+@code{vc-stay-local} as well.
+
+If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
+only the entry in the local CVS subdirectory to determine the file's
+state (and possibly information returned by previous CVS commands).
+One consequence of this is that when you have modified a file, and
+somebody else has already checked in other changes to the file, you
+are not notified of it until you actually try to commit. (But you can
+try to pick up any recent changes from the repository first, using
+@kbd{C-x v m @key{RET}},
+@iftex
+@pxref{Merging,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+@pxref{Merging}).
+@end ifnottex
+
+ When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
+version backups, so that simple diff and revert operations are
+completely local (@pxref{Version Backups}).
+
+ On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
+then VC queries the remote repository @emph{before} it decides what to
+do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
+repositories. It also does not make any version backups.
+
+ You can also set @code{vc-cvs-stay-local} to a regular expression
+that is matched against the repository host name; VC then stays local
+only for repositories from hosts that match the pattern.
+
+@vindex vc-cvs-global-switches
+ You can specify additional command line options to pass to all CVS
+operations in the variable @code{vc-cvs-global-switches}. These
+switches are inserted immediately after the @code{cvs} command, before
+the name of the operation to invoke.
+
+@ignore
+ arch-tag: 140b8629-4339-4b5e-9e50-72453e51615e
+@end ignore
diff --git a/man/xresmini.texi b/man/xresmini.texi
index bf791a59e36..7445028e0be 100644
--- a/man/xresmini.texi
+++ b/man/xresmini.texi
@@ -131,8 +131,8 @@ Additional space (@dfn{leading}) between lines, in pixels.
@item @code{menuBar} (class @code{MenuBar})
@cindex menu bar
Give frames menu bars if @samp{on}; don't have menu bars if
-@samp{off}. @xref{Lucid Resources}, and @ref{LessTif Resources}, for
-how to control the appearance of the menu bar if you have one.
+@samp{off}. @xref{Lucid Resources}, for how to control the appearance
+of the menu bar if you have one.
@item @code{pointerColor} (class @code{Foreground})
Color of the mouse cursor.
@@ -296,7 +296,136 @@ The margin of the menu bar, in characters. Default is 1.
@node GTK resources
@appendixsec GTK resources
-@c Waiting for contents
+ The most common way to customize the GTK widgets Emacs uses (menus, dialogs
+tool bars and scroll bars) is by choosing an appropriate theme, for example
+with the GNOME theme selector. You can also do Emacs specific customization
+by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK
+themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything
+works with all themes. To customize Emacs font, background, faces, etc., use
+the normal X resources (@pxref{Resources}). We will present some examples of
+customizations here, but for a more detailed description, see the online manual.
+
+ The first example is just one line. It changes the font on all GTK widgets
+to courier with size 12:
+
+@smallexample
+gtk-font-name = "courier 12"
+@end smallexample
+
+ The thing to note is that the font name is not an X font name, like
+-*-helvetica-medium-r-*--*-120-*-*-*-*-*-*, but a Pango font name. A Pango
+font name is basically of the format "family style size", where the style
+is optional as in the case above. A name with a style could be for example:
+
+@smallexample
+gtk-font-name = "helvetica bold 10"
+@end smallexample
+
+ To customize widgets you first define a style and then apply the style to
+the widgets. Here is an example that sets the font for menus, but not
+for other widgets:
+
+@smallexample
+# @r{Define the style @samp{menufont}.}
+style "menufont"
+@{
+ font_name = "helvetica bold 14" # This is a Pango font name
+@}
+
+# @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{menufont}.}
+widget "*emacs-menuitem*" style "menufont"
+@end smallexample
+
+The widget name in this example contains wildcards, so the style will be
+applied to all widgets that match "*emacs-menuitem*". The widgets are
+named by the way they are contained, from the outer widget to the inner widget.
+So to apply the style "my_style" (not shown) with the full, absolute name, for
+the menubar and the scroll bar in Emacs we use:
+
+@smallexample
+widget "Emacs.pane.menubar" style "my_style"
+widget "Emacs.pane.emacs.verticalScrollBar" style "my_style"
+@end smallexample
+
+But to aoid having to type it all, wildcards are often used. @samp{*}
+matches zero or more characters and @samp{?} matches one character. So "*"
+matches all widgets.
+
+ Each widget has a class (for example GtkMenuItem) and a name (emacs-menuitem).
+You can assign styles by name or by class. In this example we have used the
+class:
+
+@smallexample
+style "menufont"
+@{
+ font_name = "helvetica bold 14"
+@}
+
+widget_class "*GtkMenuBar" style "menufont"
+@end smallexample
+
+@noindent
+The names and classes for the GTK widgets Emacs uses are:
+
+@multitable {@code{verticalScrollbar plus}} {@code{GtkFileSelection} and some}
+@item @code{emacs-filedialog}
+@tab @code{GtkFileSelection}
+@item @code{emacs-dialog}
+@tab @code{GtkDialog}
+@item @code{Emacs}
+@tab @code{GtkWindow}
+@item @code{pane}
+@tab @code{GtkVHbox}
+@item @code{emacs}
+@tab @code{GtkFixed}
+@item @code{verticalScrollBar}
+@tab @code{GtkVScrollbar}
+@item @code{emacs-toolbar}
+@tab @code{GtkToolbar}
+@item @code{menubar}
+@tab @code{GtkMenuBar}
+@item @code{emacs-menuitem}
+@tab anything in menus
+@end multitable
+
+ GTK absolute names are quite strange when it comes to menus
+and dialogs. The names do not start with @samp{Emacs}, as they are
+free-standing windows and not contained (in the GTK sense) by the
+Emacs GtkWindow. To customize the dialogs and menus, use wildcards like this:
+
+@smallexample
+widget "*emacs-dialog*" style "my_dialog_style"
+widget "*emacs-filedialog* style "my_file_style"
+widget "*emacs-menuitem* style "my_menu_style"
+@end smallexample
+
+ If you specify a customization in @file{~/.emacs.d/gtkrc}, then it
+automatically applies only to Emacs, since other programs don't read
+that file. For example, the drop down menu in the file dialog can not
+be customized by any absolute widget name, only by an absolute class
+name. This is because the widgets in the drop down menu do not
+have names and the menu is not contained in the Emacs GtkWindow. To
+have all menus in Emacs look the same, use this in
+@file{~/.emacs.d/gtkrc}:
+
+@smallexample
+widget_class "*Menu*" style "my_menu_style"
+@end smallexample
+
+ Here is a more elaborate example, showing how to change the parts of
+the scroll bar:
+
+@smallexample
+style "scroll"
+@{
+ fg[NORMAL] = "red"@ @ @ @ @ # @r{The arrow color.}
+ bg[NORMAL] = "yellow"@ @ # @r{The thumb and background around the arrow.}
+ bg[ACTIVE] = "blue"@ @ @ @ # @r{The trough color.}
+ bg[PRELIGHT] = "white"@ # @r{The thumb color when the mouse is over it.}
+@}
+
+widget "*verticalScrollBar*" style "scroll"
+@end smallexample
@ignore
arch-tag: e1856f29-2482-42c0-a990-233cdccd1f21
diff --git a/man/xresources.texi b/man/xresources.texi
index ce6709ad764..5f027a4ad4a 100644
--- a/man/xresources.texi
+++ b/man/xresources.texi
@@ -585,7 +585,7 @@ The color for the border shadow, on the top and the left.
@cindex @file{~/.gtkrc-2.0} file
@cindex @file{~/.emacs.d/gtkrc} file
- If Emacs was built to use the GTK widget set, then the menu bar,
+ If Emacs was built to use the GTK widget set, then the menu bar, tool bar,
scroll bar and the dialogs are customized with the standard GTK
customization file, @file{~/.gtkrc-2.0}, or with the Emacs specific
file @file{~/.emacs.d/gtkrc}. We recommend that you use
@@ -603,13 +603,13 @@ widget names}). Here is an example of how to change the font for
Emacs menus:
@smallexample
-# @r{Define the style @samp{metafont}.}
+# @r{Define the style @samp{menufont}.}
style "menufont"
@{
font_name = "helvetica bold 14" # This is a Pango font name
@}
-# @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{metafont}.}
+# @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{menufont}.}
widget "*emacs-menuitem*" style "menufont"
@end smallexample
diff --git a/src/.gdbinit b/src/.gdbinit
index ea9bf3f6092..54d68dc123d 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -211,6 +211,7 @@ define pitx
printf "vpos=%d hpos=%d", $it->vpos, $it->hpos,
printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y
printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x
+ printf " w=%d", $it->pixel_width
printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent
printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent
printf "\n"
@@ -544,6 +545,10 @@ end
define xframe
xgetptr $
print (struct frame *) $ptr
+ xgetptr $->name
+ set $ptr = (struct Lisp_String *) $ptr
+ xprintstr $ptr
+ echo \n
end
document xframe
Print $ as a frame pointer, assuming it is an Emacs Lisp frame value.
@@ -676,6 +681,31 @@ document xcdr
Print the cdr of $, assuming it is an Emacs Lisp pair.
end
+define xlist
+ xgetptr $
+ set $cons = (struct Lisp_Cons *) $ptr
+ xgetptr Qnil
+ set $nil = $ptr
+ set $i = 0
+ while $cons != $nil && $i < 10
+ p/x $cons->car
+ xpr
+ xgetptr $cons->u.cdr
+ set $cons = (struct Lisp_Cons *) $ptr
+ set $i = $i + 1
+ printf "---\n"
+ end
+ if $cons == $nil
+ printf "nil\n"
+ else
+ printf "...\n"
+ p $ptr
+ end
+end
+document xlist
+Print $ assuming it is a list.
+end
+
define xfloat
xgetptr $
print ((struct Lisp_Float *) $ptr)->u.data
@@ -694,6 +724,108 @@ document xscrollbar
Print $ as a scrollbar pointer.
end
+define xpr
+ xtype
+ if $type == Lisp_Int
+ xint
+ end
+ if $type == Lisp_Symbol
+ xsymbol
+ end
+ if $type == Lisp_String
+ xstring
+ end
+ if $type == Lisp_Cons
+ xcons
+ end
+ if $type == Lisp_Float
+ xfloat
+ end
+ if $type == Lisp_Misc
+ set $misc = (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type)
+ if $misc == Lisp_Misc_Free
+ xmiscfree
+ end
+ if $misc == Lisp_Misc_Boolfwd
+ xboolfwd
+ end
+ if $misc == Lisp_Misc_Marker
+ xmarker
+ end
+ if $misc == Lisp_Misc_Intfwd
+ xintfwd
+ end
+ if $misc == Lisp_Misc_Boolfwd
+ xboolfwd
+ end
+ if $misc == Lisp_Misc_Objfwd
+ xobjfwd
+ end
+ if $misc == Lisp_Misc_Buffer_Objfwd
+ xbufobjfwd
+ end
+ if $misc == Lisp_Misc_Buffer_Local_Value
+ xbuflocal
+ end
+# if $misc == Lisp_Misc_Some_Buffer_Local_Value
+# xvalue
+# end
+ if $misc == Lisp_Misc_Overlay
+ xoverlay
+ end
+ if $misc == Lisp_Misc_Kboard_Objfwd
+ xkbobjfwd
+ end
+# if $misc == Lisp_Misc_Save_Value
+# xsavevalue
+# end
+ end
+ if $type == Lisp_Vectorlike
+ set $size = ((struct Lisp_Vector *) $ptr)->size
+ if ($size & PVEC_FLAG)
+ set $vec = (enum pvec_type) ($size & PVEC_TYPE_MASK)
+ if $vec == PVEC_NORMAL_VECTOR
+ xvector
+ end
+ if $vec == PVEC_PROCESS
+ xprocess
+ end
+ if $vec == PVEC_FRAME
+ xframe
+ end
+ if $vec == PVEC_COMPILED
+ xcompiled
+ end
+ if $vec == PVEC_WINDOW
+ xwindow
+ end
+ if $vec == PVEC_WINDOW_CONFIGURATION
+ xwinconfig
+ end
+ if $vec == PVEC_SUBR
+ xsubr
+ end
+ if $vec == PVEC_CHAR_TABLE
+ xchartable
+ end
+ if $vec == PVEC_BOOL_VECTOR
+ xboolvector
+ end
+ if $vec == PVEC_BUFFER
+ xbuffer
+ end
+ if $vec == PVEC_HASH_TABLE
+ xhashtable
+ end
+ else
+ xvector
+ end
+ end
+end
+document xpr
+Print $ as a lisp object of any type.
+end
+
define xprintstr
set $data = $arg0->data
output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte)
@@ -716,7 +848,7 @@ define xbacktrace
xgettype (*$bt->function)
if $type == Lisp_Symbol
xprintsym (*$bt->function)
- echo \n
+ printf " (0x%x)\n", *$bt->args
else
printf "0x%x ", *$bt->function
if $type == Lisp_Vectorlike
@@ -737,6 +869,27 @@ document xbacktrace
an error was signaled.
end
+define which
+ set debug_print (which_symbols ($arg0))
+end
+document which
+ Print symbols which references a given lisp object,
+ either as its symbol value or symbol function.
+end
+
+define xbytecode
+ set $bt = byte_stack_list
+ while $bt
+ xgettype ($bt->byte_string)
+ printf "0x%x => ", $bt->byte_string
+ which $bt->byte_string
+ set $bt = $bt->next
+ end
+end
+document xbytecode
+ Print a backtrace of the byte code stack.
+end
+
# Show Lisp backtrace after normal backtrace.
define hookpost-backtrace
set $bt = backtrace_list
diff --git a/src/ChangeLog b/src/ChangeLog
index 1c48632df78..d3693c4e9cf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,155 @@
+2006-05-09 Kenichi Handa <handa@m17n.org>
+
+ * keymap.c (push_key_description): Handle invalid character key.
+
+2006-05-08 Kenichi Handa <handa@m17n.org>
+
+ * callproc.c (Fcall_process): Use system_eol_type for encoding
+ arguments if eol_type is not yet decided.
+
+ * coding.h (system_eol_type): Extern it.
+
+ * coding.c (setup_coding_system): For invalid coding-system, set
+ coding->eol_type to CODING_EOL_UNDECIDED.
+ (encode_coding): Cancel previous change.
+ (shrink_encoding_region): Likewise.
+ (code_convert_region1): Likewise.
+ (code_convert_string1): Likewise.
+ (code_convert_string_norecord): Likewise.
+
+ * fileio.c (choose_write_coding_system): Use system_eol_type for
+ encoding if eol_type is not yet decided.
+
+ * process.c (setup_process_coding_systems): Use system_eol_type
+ for encoding if eol_type is not yet decided.
+ (read_process_output): Likewise.
+ (send_process): Likewise.
+
+2006-05-07 Juanma Barranquero <lekktu@gmail.com>
+
+ * minibuf.c (syms_of_minibuf) <history-length>: Fix typo in doc.
+
+2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * mac.c (Fmac_clear_font_name_table): Move defun to macfns.c.
+ (syms_of_mac): Likewise for defsubr.
+
+ * macfns.c (mac_set_font): New function.
+ (mac_frame_parm_handlers, syms_of_macfns): Replace x_set_font with it.
+ (mac_window) [TARGET_API_MAC_CARBON && MAC_OSX]: Specify
+ kWindowToolbarButtonAttribute when creating window.
+ (Fmac_clear_font_name_table): Move from macfns.c.
+ (syms_of_macfns): Likewise for defsubr.
+ [USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): New defun.
+ (syms_of_macfns) [USE_MAC_FONT_PANEL]: Defsubr it.
+
+ * macgui.h (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set
+ and build is done on Mac OS X 10.2 and later.
+
+ * macselect.c (mac_do_receive_drag): Remove unused variable `index'.
+ (mac_store_services_event): Change return type in extern.
+
+ * macterm.c (XLoadQueryFont) [USE_ATSUI]: Set FMFontFamily value
+ to font->mac_fontnum.
+ [USE_MAC_FONT_PANEL] (mac_set_font_info_for_selection): New function.
+ (x_new_focus_frame) [USE_MAC_FONT_PANEL]: Use it.
+ (QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic): Add extern.
+ (QWindow) [MAC_OSX]: Likewise.
+ (Qfont) [USE_MAC_FONT_PANEL]: Likewise.
+ (Vmac_atsu_font_table) [USE_ATSUI]: New variable.
+ (syms_of_macterm) [USE_ATSUI]: Defvar it.
+ (Qtoolbar_switch_mode) [MAC_OSX]: New variable.
+ (Qpanel_closed, Qselection) [USE_MAC_FONT_PANEL]: Likewise.
+ (syms_of_macterm): Intern and staticpro them.
+ (init_font_name_table) [USE_ATSUI]: Set data to Vmac_atsu_font_table.
+ [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): New
+ function.
+ [USE_CARBON_EVENTS] (mac_handle_command_event): Use it.
+ [MAC_OSX] (mac_store_services_event): Likewise.
+ [USE_CARBON_EVENTS] (mac_handle_window_event) [MAC_OSX]: Handle
+ kEventWindowToolbarSwitchMode event.
+ (install_window_handler) [USE_CARBON_EVENTS && MAC_OSX]: Register it.
+ [MAC_OSX] (mac_store_services_event): Change return type to OSStatus.
+ [USE_MAC_FONT_PANEL] (mac_handle_font_event): New function.
+ (install_window_handler) [USE_MAC_FONT_PANEL]: Install it.
+ (XTread_socket): Select window on mouse click if x_focus_frame is NULL.
+
+ * macterm.h (mac_set_font_info_for_selection): Add extern.
+
+2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * image.c (Qduration) [MAC_OS]: New variable.
+ (syms_of_image) [MAC_OS]: Intern and staticpro it.
+ [MAC_OS] (gif_load): Save image extension data in img->data.lisp_val.
+ [MAC_OSX] (image_load_quartz2d): Use cfstring_create_with_utf8_cstring
+ instead of cfstring_create_with_string.
+
+2006-05-06 Kim F. Storm <storm@cua.dk>
+
+ * .gdbinit (xframe): Print frame name.
+ (xlist): New command to print a list (max 10 elements).
+ (xpr): Print lisp object of any type.
+ (pitx): Print it->pixel_width.
+
+2006-05-05 Kenichi Handa <handa@m17n.org>
+
+ * xdisp.c (handle_composition_prop): Fix for the case of empty
+ composition component.
+
+2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * keyboard.c (make_lispy_event) [MAC_OS]: Get Apple event info
+ from event->arg.
+
+ * termhooks.h (enum event_kind) [MAC_OS]: Update comment for
+ MAC_APPLE_EVENT.
+
+ * macterm.h (mac_make_lispy_event_code): Remove extern.
+ (mac_post_mouse_moved_event): Add extern.
+ (mac_aelist_to_lisp, mac_aedesc_to_lisp): Change arg 1 to
+ `const AEDesc *' in externs.
+ (create_apple_event_from_drag_ref) [TARGET_API_MAC_CARBON]: New extern.
+
+ * mac.c (mac_aelist_to_lisp, mac_aedesc_to_lisp): Change arg 1 to
+ `const AEDesc *'.
+ [TARGET_API_MAC_CARBON] (create_apple_event): New function.
+ [TARGET_API_MAC_CARBON] (create_apple_event_from_event_ref): Use it.
+ Use xrealloc instead of repeated xmalloc/xfree.
+ [TARGET_API_MAC_CARBON] (create_apple_event_from_drag_ref): New
+ function.
+
+ * macmenu.c (restore_menu_items, cleanup_popup_menu): Return a value.
+
+ * macselect.c: Update copyright year.
+ (mac_store_apple_event): Change return type to void in extern.
+ (mac_handle_apple_event): Don't get return value from
+ mac_store_apple_event.
+ [TARGET_API_MAC_CARBON] (Vmac_dnd_known_types): New variable.
+ (syms_of_macselect) [TARGET_API_MAC_CARBON]: Defvar it.
+ [TARGET_API_MAC_CARBON] (mac_do_track_drag): Move function from
+ macterm.c. Use Vmac_dnd_known_types as acceptable flavors.
+ [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. New
+ implementation using create_apple_event_from_drag_ref.
+ [TARGET_API_MAC_CARBON] (mac_do_track_dragUPP)
+ (mac_do_receive_dragUPP): Move variables from macterm.c.
+ (install_drag_handler, remove_drag_handler): New functions.
+
+ * macterm.c (XTread_socket) [TARGET_API_MAC_CARBON]: Try window
+ path select also for proxy icon click.
+ [TARGET_API_MAC_CARBON] (mac_post_mouse_moved_event): New function.
+ [USE_TOOLKIT_SCROLL_BARS] (scroll_bar_timer_callback): Use it.
+ (xlfdpat_create): Remove unused label `error' and trailing sentences.
+ (mac_do_track_drag, mac_do_receive_drag): Move functions to macselect.c.
+ (mac_do_track_dragUPP, mac_do_receive_dragUPP): Move variables to
+ macselect.c.
+ (install_drag_handler, remove_drag_handler): Add extern.
+ (mac_store_apple_event): Change return type to void. All uses changed.
+ Create Lisp object from Apple event and store it into input event.
+ (mac_make_lispy_event_code): Remove function.
+ [TARGET_API_MAC_CARBON] (mac_store_drag_event): New function.
+ (install_window_handler): Call install_drag_handler.
+ (remove_window_handler): Call remove_drag_handler.
+
2006-05-03 Richard Stallman <rms@gnu.org>
* sound.c (Fplay_sound_internal): Dynamically allocate
diff --git a/src/callproc.c b/src/callproc.c
index a6841317e63..25c79bf926c 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -302,6 +302,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
val = Qnil;
}
setup_coding_system (Fcheck_coding_system (val), &argument_coding);
+ if (argument_coding.eol_type == CODING_EOL_UNDECIDED)
+ argument_coding.eol_type = system_eol_type;
}
}
diff --git a/src/coding.c b/src/coding.c
index d261418def5..a83aadfd468 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -386,7 +386,9 @@ Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac;
Lisp_Object eol_mnemonic_undecided;
/* Format of end-of-line decided by system. This is CODING_EOL_LF on
- Unix, CODING_EOL_CRLF on DOS/Windows, and CODING_EOL_CR on Mac. */
+ Unix, CODING_EOL_CRLF on DOS/Windows, and CODING_EOL_CR on Mac.
+ This has an effect only for external encoding (i.e. for output to
+ file and process), not for in-buffer or Lisp string encoding. */
int system_eol_type;
#ifdef emacs
@@ -3920,10 +3922,7 @@ setup_coding_system (coding_system, coding)
coding->type = coding_type_no_conversion;
coding->category_idx = CODING_CATEGORY_IDX_BINARY;
coding->common_flags = 0;
- coding->eol_type = NILP (coding_system) ? system_eol_type : CODING_EOL_LF;
- if (coding->eol_type != CODING_EOL_LF)
- coding->common_flags
- |= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK;
+ coding->eol_type = CODING_EOL_UNDECIDED;
coding->pre_write_conversion = coding->post_read_conversion = Qnil;
return NILP (coding_system) ? 0 : -1;
}
@@ -5000,7 +4999,7 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes)
coding->errors = 0;
coding->result = CODING_FINISH_NORMAL;
if (coding->eol_type == CODING_EOL_UNDECIDED)
- coding->eol_type = system_eol_type;
+ coding->eol_type = CODING_EOL_LF;
switch (coding->type)
{
@@ -5257,8 +5256,6 @@ shrink_encoding_region (beg, end, coding, str)
if (coding->type == coding_type_ccl
|| coding->eol_type == CODING_EOL_CRLF
|| coding->eol_type == CODING_EOL_CR
- || (coding->eol_type == CODING_EOL_UNDECIDED
- && system_eol_type != CODING_EOL_LF)
|| (coding->cmp_data && coding->cmp_data->used > 0))
{
/* We can't skip any data. */
@@ -7114,7 +7111,7 @@ code_convert_region1 (start, end, coding_system, encodep)
from = XFASTINT (start);
to = XFASTINT (end);
- if (NILP (coding_system) && system_eol_type == CODING_EOL_LF)
+ if (NILP (coding_system))
return make_number (to - from);
if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0)
@@ -7169,7 +7166,7 @@ code_convert_string1 (string, coding_system, nocopy, encodep)
CHECK_STRING (string);
CHECK_SYMBOL (coding_system);
- if (NILP (coding_system) && system_eol_type == CODING_EOL_LF)
+ if (NILP (coding_system))
return (NILP (nocopy) ? Fcopy_sequence (string) : string);
if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0)
@@ -7228,7 +7225,7 @@ code_convert_string_norecord (string, coding_system, encodep)
CHECK_STRING (string);
CHECK_SYMBOL (coding_system);
- if (NILP (coding_system) && system_eol_type == CODING_EOL_LF)
+ if (NILP (coding_system))
return string;
if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0)
diff --git a/src/coding.h b/src/coding.h
index 5d649fbf9ff..cac11d1514c 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -666,6 +666,9 @@ extern Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac;
/* Mnemonic string to indicate type of end-of-line is not yet decided. */
extern Lisp_Object eol_mnemonic_undecided;
+/* Format of end-of-line decided by system. */
+extern int system_eol_type;
+
#ifdef emacs
extern Lisp_Object Qfile_coding_system;
extern Lisp_Object Qcall_process, Qcall_process_region;
diff --git a/src/fileio.c b/src/fileio.c
index 2248963102a..7bfcc98541b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4940,6 +4940,8 @@ choose_write_coding_system (start, end, filename,
setup_coding_system (Fcheck_coding_system (val), coding);
done_setup_coding:
+ if (coding->eol_type == CODING_EOL_UNDECIDED)
+ coding->eol_type = system_eol_type;
if (!STRINGP (start) && !NILP (current_buffer->selective_display))
coding->mode |= CODING_MODE_SELECTIVE_DISPLAY;
}
diff --git a/src/image.c b/src/image.c
index eae25fdb02e..98e44be9d44 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2630,7 +2630,7 @@ image_load_quartz2d (f, img, png_p)
UNGCPRO;
return 0;
}
- path = cfstring_create_with_string (file);
+ path = cfstring_create_with_utf8_cstring (SDATA (file));
url = CFURLCreateWithFileSystemPath (NULL, path,
kCFURLPOSIXPathStyle, 0);
CFRelease (path);
@@ -7901,6 +7901,8 @@ gif_load (f, img)
#else /* !HAVE_GIF */
#ifdef MAC_OS
+static Lisp_Object Qduration;
+
static int
gif_load (f, img)
struct frame *f;
@@ -7922,7 +7924,8 @@ gif_load (f, img)
RGBColor bg_color;
int width, height;
XImagePtr ximg;
- TimeValue time;
+ TimeScale time_scale;
+ TimeValue time, duration;
int ino;
CGrafPtr old_port;
GDHandle old_gdh;
@@ -8030,6 +8033,7 @@ gif_load (f, img)
image, img->spec);
goto error;
}
+ time_scale = GetMediaTimeScale (media);
specified_bg = image_spec_value (img->spec, QCbackground, NULL);
if (!STRINGP (specified_bg) ||
@@ -8055,7 +8059,7 @@ gif_load (f, img)
SetGWorld (old_port, old_gdh);
SetMovieActive (movie, 1);
SetMovieGWorld (movie, ximg, NULL);
- SampleNumToMediaTime (media, ino + 1, &time, NULL);
+ SampleNumToMediaTime (media, ino + 1, &time, &duration);
SetMovieTimeValue (movie, time);
MoviesTask (movie, 0L);
DisposeTrackMedia (media);
@@ -8063,6 +8067,12 @@ gif_load (f, img)
DisposeMovie (movie);
if (dh)
DisposeHandle (dh);
+
+ /* Save GIF image extension data for `image-extension-data'.
+ Format is (count IMAGES duration DURATION). */
+ img->data.lisp_val = list4 (Qcount, make_number (nsamples), Qduration,
+ make_float ((double)duration / time_scale));
+
/* Maybe fill in the background field while we have ximg handy. */
if (NILP (image_spec_value (img->spec, QCbackground, NULL)))
IMAGE_BACKGROUND (img, f, ximg);
@@ -8618,6 +8628,11 @@ non-numeric, there is no explicit limit on the size of images. */);
ADD_IMAGE_TYPE(Qgif);
#endif
+#ifdef MAC_OS
+ Qduration = intern ("duration");
+ staticpro (&Qduration);
+#endif
+
#if defined (HAVE_PNG) || defined (MAC_OS)
Qpng = intern ("png");
staticpro (&Qpng);
diff --git a/src/keyboard.c b/src/keyboard.c
index 1ad852c819a..5dcd2f8f5ae 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5992,8 +5992,7 @@ make_lispy_event (event)
spec[1] = event->y;
return Fcons (Qmac_apple_event,
Fcons (Fvector (2, spec),
- Fcons (mac_make_lispy_event_code (event->code),
- Qnil)));
+ Fcons (event->arg, Qnil)));
}
#endif
diff --git a/src/keymap.c b/src/keymap.c
index c609ed6c4e4..31b9378d3ad 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2083,12 +2083,21 @@ push_key_description (c, p, force_multibyte)
int force_multibyte;
{
unsigned c2;
+ int valid_p;
/* Clear all the meaningless bits above the meta bit. */
c &= meta_modifier | ~ - meta_modifier;
c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier
| meta_modifier | shift_modifier | super_modifier);
+ valid_p = SINGLE_BYTE_CHAR_P (c2) || char_valid_p (c2, 0);
+ if (! valid_p)
+ {
+ /* KEY_DESCRIPTION_SIZE is large enough for this. */
+ p += sprintf (p, "[%d]", c);
+ return p;
+ }
+
if (c & alt_modifier)
{
*p++ = 'A';
@@ -2176,16 +2185,13 @@ push_key_description (c, p, force_multibyte)
}
else
{
- int valid_p = SINGLE_BYTE_CHAR_P (c) || char_valid_p (c, 0);
-
- if (force_multibyte && valid_p)
+ if (force_multibyte)
{
if (SINGLE_BYTE_CHAR_P (c))
c = unibyte_char_to_multibyte (c);
p += CHAR_STRING (c, p);
}
- else if (NILP (current_buffer->enable_multibyte_characters)
- || valid_p)
+ else if (NILP (current_buffer->enable_multibyte_characters))
{
int bit_offset;
*p++ = '\\';
diff --git a/src/mac.c b/src/mac.c
index 444320322c3..f7fcbe9ac88 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -272,7 +272,7 @@ static Lisp_Object Qundecoded_file_name;
static Lisp_Object
mac_aelist_to_lisp (desc_list)
- AEDescList *desc_list;
+ const AEDescList *desc_list;
{
OSErr err;
long count;
@@ -337,7 +337,7 @@ mac_aelist_to_lisp (desc_list)
Lisp_Object
mac_aedesc_to_lisp (desc)
- AEDesc *desc;
+ const AEDesc *desc;
{
OSErr err = noErr;
DescType desc_type = desc->descriptorType;
@@ -665,33 +665,46 @@ init_coercion_handler ()
}
#if TARGET_API_MAC_CARBON
-OSErr
-create_apple_event_from_event_ref (event, num_params, names, types, result)
- EventRef event;
- UInt32 num_params;
- EventParamName *names;
- EventParamType *types;
+static OSErr
+create_apple_event (class, id, result)
+ AEEventClass class;
+ AEEventID id;
AppleEvent *result;
{
OSErr err;
static const ProcessSerialNumber psn = {0, kCurrentProcess};
AEAddressDesc address_desc;
- UInt32 i, size;
- CFStringRef string;
- CFDataRef data;
- char *buf;
err = AECreateDesc (typeProcessSerialNumber, &psn,
sizeof (ProcessSerialNumber), &address_desc);
if (err == noErr)
{
- err = AECreateAppleEvent (0, 0, /* Dummy class and ID. */
+ err = AECreateAppleEvent (class, id,
&address_desc, /* NULL is not allowed
on Mac OS Classic. */
kAutoGenerateReturnID,
kAnyTransactionID, result);
AEDisposeDesc (&address_desc);
}
+
+ return err;
+}
+
+OSErr
+create_apple_event_from_event_ref (event, num_params, names, types, result)
+ EventRef event;
+ UInt32 num_params;
+ EventParamName *names;
+ EventParamType *types;
+ AppleEvent *result;
+{
+ OSErr err;
+ UInt32 i, size;
+ CFStringRef string;
+ CFDataRef data;
+ char *buf = NULL;
+
+ err = create_apple_event (0, 0, result); /* Dummy class and ID. */
if (err != noErr)
return err;
@@ -721,19 +734,88 @@ create_apple_event_from_event_ref (event, num_params, names, types, result)
0, &size, NULL);
if (err != noErr)
break;
- buf = xmalloc (size);
+ buf = xrealloc (buf, size);
err = GetEventParameter (event, names[i], types[i], NULL,
size, NULL, buf);
if (err == noErr)
AEPutParamPtr (result, names[i], types[i], buf, size);
- xfree (buf);
break;
}
+ if (buf)
+ xfree (buf);
return noErr;
}
-#endif
+OSErr
+create_apple_event_from_drag_ref (drag, num_types, types, result)
+ DragRef drag;
+ UInt32 num_types;
+ FlavorType *types;
+ AppleEvent *result;
+{
+ OSErr err;
+ UInt16 num_items;
+ AppleEvent items;
+ long index;
+ char *buf = NULL;
+
+ err = CountDragItems (drag, &num_items);
+ if (err != noErr)
+ return err;
+ err = AECreateList (NULL, 0, false, &items);
+ if (err != noErr)
+ return err;
+
+ for (index = 1; index <= num_items; index++)
+ {
+ ItemReference item;
+ DescType desc_type = typeNull;
+ Size size;
+
+ err = GetDragItemReferenceNumber (drag, index, &item);
+ if (err == noErr)
+ {
+ int i;
+
+ for (i = 0; i < num_types; i++)
+ {
+ err = GetFlavorDataSize (drag, item, types[i], &size);
+ if (err == noErr)
+ {
+ buf = xrealloc (buf, size);
+ err = GetFlavorData (drag, item, types[i], buf, &size, 0);
+ }
+ if (err == noErr)
+ {
+ desc_type = types[i];
+ break;
+ }
+ }
+ }
+ err = AEPutPtr (&items, index, desc_type,
+ desc_type != typeNull ? buf : NULL,
+ desc_type != typeNull ? size : 0);
+ if (err != noErr)
+ break;
+ }
+ if (buf)
+ xfree (buf);
+
+ if (err == noErr)
+ {
+ err = create_apple_event (0, 0, result); /* Dummy class and ID. */
+ if (err == noErr)
+ err = AEPutParamDesc (result, keyDirectObject, &items);
+ if (err != noErr)
+ AEDisposeDesc (result);
+ }
+
+ AEDisposeDesc (&items);
+
+ return err;
+}
+#endif /* TARGET_API_MAC_CARBON */
/***********************************************************************
Conversion between Lisp and Core Foundation objects
@@ -4686,16 +4768,6 @@ On successful conversion, return the result string, else return nil. */)
#endif /* TARGET_API_MAC_CARBON */
-DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, Smac_clear_font_name_table, 0, 0, 0,
- doc: /* Clear the font name table. */)
- ()
-{
- check_mac ();
- mac_clear_font_name_table ();
- return Qnil;
-}
-
-
static Lisp_Object
mac_get_system_locale ()
{
@@ -5167,7 +5239,6 @@ syms_of_mac ()
defsubr (&Smac_get_preference);
defsubr (&Smac_code_convert_string);
#endif
- defsubr (&Smac_clear_font_name_table);
defsubr (&Smac_set_file_creator);
defsubr (&Smac_set_file_type);
diff --git a/src/macfns.c b/src/macfns.c
index 2a83fef0870..bb2b8b540ff 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -2013,6 +2013,22 @@ mac_update_title_bar (f, save_match_data)
#endif
}
+static void
+mac_set_font (f, arg, oldval)
+ struct frame *f;
+ Lisp_Object arg, oldval;
+{
+ x_set_font (f, arg, oldval);
+#if USE_MAC_FONT_PANEL
+ if (FRAME_MAC_DISPLAY_INFO (f)->x_focus_frame == f)
+ {
+ BLOCK_INPUT;
+ mac_set_font_info_for_selection (f);
+ UNBLOCK_INPUT;
+ }
+#endif
+}
+
/* Subroutines of creating a frame. */
@@ -2213,8 +2229,10 @@ mac_window (f)
#if TARGET_API_MAC_CARBON
CreateNewWindow (kDocumentWindowClass,
kWindowStandardDocumentAttributes
- /* | kWindowToolbarButtonAttribute */,
- &r, &FRAME_MAC_WINDOW (f));
+#ifdef MAC_OSX
+ | kWindowToolbarButtonAttribute
+#endif
+ , &r, &FRAME_MAC_WINDOW (f));
if (FRAME_MAC_WINDOW (f))
{
SetWRefCon (FRAME_MAC_WINDOW (f), (long) f->output_data.mac);
@@ -4469,6 +4487,43 @@ mac_nav_event_callback (selector, parms, data)
#endif
/***********************************************************************
+ Fonts
+ ***********************************************************************/
+
+DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table,
+ Smac_clear_font_name_table, 0, 0, 0,
+ doc: /* Clear the font name table. */)
+ ()
+{
+ check_mac ();
+ mac_clear_font_name_table ();
+ return Qnil;
+}
+
+#if USE_MAC_FONT_PANEL
+DEFUN ("mac-set-font-panel-visibility", Fmac_set_font_panel_visibility,
+ Smac_set_font_panel_visibility, 1, 1, 0,
+ doc: /* Set the font panel visibile if and only if VISIBLE is non-nil.
+This is for internal use only. Use `mac-font-panel-mode' instead. */)
+ (visible)
+ Lisp_Object visible;
+{
+ OSStatus err = noErr;
+
+ check_mac ();
+
+ BLOCK_INPUT;
+ if (NILP (visible) == (FPIsFontPanelVisible () == true))
+ err = FPShowHideFontPanel ();
+ UNBLOCK_INPUT;
+
+ if (err != noErr)
+ error ("Cannot change visibility of the font panel");
+ return Qnil;
+}
+#endif
+
+/***********************************************************************
Initialization
***********************************************************************/
@@ -4484,7 +4539,7 @@ frame_parm_handler mac_frame_parm_handlers[] =
x_set_border_width,
x_set_cursor_color,
x_set_cursor_type,
- x_set_font,
+ mac_set_font,
x_set_foreground_color,
x_set_icon_name,
0, /* MAC_TODO: x_set_icon_type, */
@@ -4660,7 +4715,7 @@ Chinese, Japanese, and Korean. */);
load_font_func = x_load_font;
find_ccl_program_func = x_find_ccl_program;
query_font_func = x_query_font;
- set_frame_fontset_func = x_set_font;
+ set_frame_fontset_func = mac_set_font;
check_window_system_func = check_mac;
hourglass_atimer = NULL;
@@ -4679,6 +4734,10 @@ Chinese, Japanese, and Korean. */);
#if TARGET_API_MAC_CARBON
defsubr (&Sx_file_dialog);
#endif
+ defsubr (&Smac_clear_font_name_table);
+#if USE_MAC_FONT_PANEL
+ defsubr (&Smac_set_font_panel_visibility);
+#endif
}
/* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc
diff --git a/src/macgui.h b/src/macgui.h
index 579ae2b7663..f7005600d43 100644
--- a/src/macgui.h
+++ b/src/macgui.h
@@ -103,6 +103,13 @@ typedef unsigned long Time;
#endif
#endif
+/* Whether to use the standard Font Panel floating dialog. */
+#ifndef USE_MAC_FONT_PANEL
+#if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
+#define USE_MAC_FONT_PANEL 1
+#endif
+#endif
+
typedef WindowPtr Window;
typedef GWorldPtr Pixmap;
diff --git a/src/macmenu.c b/src/macmenu.c
index be565f89259..e7d69d5657c 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -318,6 +318,7 @@ restore_menu_items (saved)
menu_items_n_panes = XINT (XCAR (saved));
saved = XCDR (saved);
menu_items_submenu_depth = XINT (XCAR (saved));
+ return Qnil;
}
/* Push the whole state of menu_items processing onto the specpdl.
@@ -634,6 +635,7 @@ cleanup_popup_menu (arg)
Lisp_Object arg;
{
discard_menu_items ();
+ return Qnil;
}
DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,
diff --git a/src/macselect.c b/src/macselect.c
index fe4a7c8eccc..dd96102e19b 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -1,5 +1,5 @@
/* Selection processing for Emacs on Mac OS.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -918,8 +918,8 @@ static struct
int size, count;
} deferred_apple_events;
extern Lisp_Object Qundefined;
-extern OSErr mac_store_apple_event P_ ((Lisp_Object, Lisp_Object,
- const AEDesc *));
+extern void mac_store_apple_event P_ ((Lisp_Object, Lisp_Object,
+ const AEDesc *));
struct apple_event_binding
{
@@ -1079,9 +1079,8 @@ mac_handle_apple_event (apple_event, reply, refcon)
{
if (INTEGERP (binding))
return XINT (binding);
- err = mac_store_apple_event (class_key, id_key, apple_event);
- if (err == noErr)
- return noErr;
+ mac_store_apple_event (class_key, id_key, apple_event);
+ return noErr;
}
}
return errAEEventNotHandled;
@@ -1146,6 +1145,198 @@ DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events,
}
+#if TARGET_API_MAC_CARBON
+static Lisp_Object Vmac_dnd_known_types;
+static pascal OSErr mac_do_track_drag P_ ((DragTrackingMessage, WindowRef,
+ void *, DragRef));
+static pascal OSErr mac_do_receive_drag P_ ((WindowRef, void *, DragRef));
+static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL;
+static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL;
+
+extern void mac_store_drag_event P_ ((WindowRef, Point, SInt16,
+ const AEDesc *));
+
+static pascal OSErr
+mac_do_track_drag (message, window, refcon, drag)
+ DragTrackingMessage message;
+ WindowRef window;
+ void *refcon;
+ DragRef drag;
+{
+ OSErr err = noErr;
+ static int can_accept;
+ UInt16 num_items, index;
+
+ if (GetFrontWindowOfClass (kMovableModalWindowClass, false))
+ return dragNotAcceptedErr;
+
+ switch (message)
+ {
+ case kDragTrackingEnterHandler:
+ err = CountDragItems (drag, &num_items);
+ if (err != noErr)
+ break;
+ can_accept = 0;
+ for (index = 1; index <= num_items; index++)
+ {
+ ItemReference item;
+ FlavorFlags flags;
+ Lisp_Object rest;
+
+ err = GetDragItemReferenceNumber (drag, index, &item);
+ if (err != noErr)
+ continue;
+ for (rest = Vmac_dnd_known_types; CONSP (rest); rest = XCDR (rest))
+ {
+ Lisp_Object str;
+ FlavorType type;
+
+ str = XCAR (rest);
+ if (!(STRINGP (str) && SBYTES (str) == 4))
+ continue;
+ type = EndianU32_BtoN (*((UInt32 *) SDATA (str)));
+
+ err = GetFlavorFlags (drag, item, type, &flags);
+ if (err == noErr)
+ {
+ can_accept = 1;
+ break;
+ }
+ }
+ }
+ break;
+
+ case kDragTrackingEnterWindow:
+ if (can_accept)
+ {
+ RgnHandle hilite_rgn = NewRgn ();
+
+ if (hilite_rgn)
+ {
+ Rect r;
+
+ GetWindowPortBounds (window, &r);
+ OffsetRect (&r, -r.left, -r.top);
+ RectRgn (hilite_rgn, &r);
+ ShowDragHilite (drag, hilite_rgn, true);
+ DisposeRgn (hilite_rgn);
+ }
+ SetThemeCursor (kThemeCopyArrowCursor);
+ }
+ break;
+
+ case kDragTrackingInWindow:
+ break;
+
+ case kDragTrackingLeaveWindow:
+ if (can_accept)
+ {
+ HideDragHilite (drag);
+ SetThemeCursor (kThemeArrowCursor);
+ }
+ break;
+
+ case kDragTrackingLeaveHandler:
+ break;
+ }
+
+ if (err != noErr)
+ return dragNotAcceptedErr;
+ return noErr;
+}
+
+static pascal OSErr
+mac_do_receive_drag (window, refcon, drag)
+ WindowRef window;
+ void *refcon;
+ DragRef drag;
+{
+ OSErr err;
+ int num_types, i;
+ Lisp_Object rest, str;
+ FlavorType *types;
+ AppleEvent apple_event;
+ Point mouse_pos;
+ SInt16 modifiers;
+
+ if (GetFrontWindowOfClass (kMovableModalWindowClass, false))
+ return dragNotAcceptedErr;
+
+ num_types = 0;
+ for (rest = Vmac_dnd_known_types; CONSP (rest); rest = XCDR (rest))
+ {
+ str = XCAR (rest);
+ if (STRINGP (str) && SBYTES (str) == 4)
+ num_types++;
+ }
+
+ types = xmalloc (sizeof (FlavorType) * num_types);
+ i = 0;
+ for (rest = Vmac_dnd_known_types; CONSP (rest); rest = XCDR (rest))
+ {
+ str = XCAR (rest);
+ if (STRINGP (str) && SBYTES (str) == 4)
+ types[i++] = EndianU32_BtoN (*((UInt32 *) SDATA (str)));
+ }
+
+ err = create_apple_event_from_drag_ref (drag, num_types, types,
+ &apple_event);
+ xfree (types);
+
+ if (err == noErr)
+ err = GetDragMouse (drag, &mouse_pos, NULL);
+ if (err == noErr)
+ {
+ GlobalToLocal (&mouse_pos);
+ err = GetDragModifiers (drag, NULL, NULL, &modifiers);
+ }
+
+ if (err == noErr)
+ {
+ mac_store_drag_event (window, mouse_pos, modifiers, &apple_event);
+ AEDisposeDesc (&apple_event);
+ /* Post a harmless event so as to wake up from ReceiveNextEvent. */
+ mac_post_mouse_moved_event ();
+ return noErr;
+ }
+ else
+ return dragNotAcceptedErr;
+}
+#endif /* TARGET_API_MAC_CARBON */
+
+OSErr
+install_drag_handler (window)
+ WindowRef window;
+{
+ OSErr err = noErr;
+
+#if TARGET_API_MAC_CARBON
+ if (mac_do_track_dragUPP == NULL)
+ mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag);
+ if (mac_do_receive_dragUPP == NULL)
+ mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag);
+
+ err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL);
+ if (err == noErr)
+ err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL);
+#endif
+
+ return err;
+}
+
+void
+remove_drag_handler (window)
+ WindowRef window;
+{
+#if TARGET_API_MAC_CARBON
+ if (mac_do_track_dragUPP)
+ RemoveTrackingHandler (mac_do_track_dragUPP, window);
+ if (mac_do_receive_dragUPP)
+ RemoveReceiveHandler (mac_do_receive_dragUPP, window);
+#endif
+}
+
+
#ifdef MAC_OSX
void
init_service_handler ()
@@ -1158,7 +1349,7 @@ init_service_handler ()
GetEventTypeCount (specs), specs, NULL, NULL);
}
-extern OSErr mac_store_services_event P_ ((EventRef));
+extern OSStatus mac_store_services_event P_ ((EventRef));
static OSStatus
copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type)
@@ -1408,6 +1599,17 @@ set to nil. */);
doc: /* Keymap for Apple events handled by Emacs. */);
Vmac_apple_event_map = Qnil;
+#if TARGET_API_MAC_CARBON
+ DEFVAR_LISP ("mac-dnd-known-types", &Vmac_dnd_known_types,
+ doc: /* The types accepted by default for dropped data.
+The types are chosen in the order they appear in the list. */);
+ Vmac_dnd_known_types = list4 (build_string ("hfs "), build_string ("utxt"),
+ build_string ("TEXT"), build_string ("TIFF"));
+#ifdef MAC_OSX
+ Vmac_dnd_known_types = Fcons (build_string ("furl"), Vmac_dnd_known_types);
+#endif
+#endif
+
#ifdef MAC_OSX
DEFVAR_LISP ("mac-services-selection", &Vmac_services_selection,
doc: /* Selection name for communication via Services menu. */);
diff --git a/src/macterm.c b/src/macterm.c
index 45bc533893c..8af067e086b 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -4097,6 +4097,11 @@ x_new_focus_frame (dpyinfo, frame)
pending_autoraise_frame = dpyinfo->x_focus_frame;
else
pending_autoraise_frame = 0;
+
+#if USE_MAC_FONT_PANEL
+ if (frame)
+ mac_set_font_info_for_selection (frame);
+#endif
}
x_frame_rehighlight (dpyinfo);
@@ -4454,35 +4459,11 @@ scroll_bar_timer_callback (timer, data)
EventLoopTimerRef timer;
void *data;
{
- EventRef event = NULL;
- OSErr err;
-
- err = CreateEvent (NULL, kEventClassMouse, kEventMouseMoved, 0,
- kEventAttributeNone, &event);
- if (err == noErr)
- {
- Point mouse_pos;
-
- GetMouse (&mouse_pos);
- LocalToGlobal (&mouse_pos);
- err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
- sizeof (Point), &mouse_pos);
- }
- if (err == noErr)
- {
- UInt32 modifiers = GetCurrentKeyModifiers ();
+ OSStatus err;
- err = SetEventParameter (event, kEventParamKeyModifiers, typeUInt32,
- sizeof (UInt32), &modifiers);
- }
- if (err == noErr)
- err = PostEventToQueue (GetCurrentEventQueue (), event,
- kEventPriorityStandard);
+ err = mac_post_mouse_moved_event ();
if (err == noErr)
scroll_bar_timer_event_posted_p = 1;
-
- if (event)
- ReleaseEvent (event);
}
static OSStatus
@@ -6723,10 +6704,6 @@ xlfdpat_create (pattern)
}
return pat;
-
- error:
- xlfdpat_destroy (pat);
- return NULL;
}
static INLINE int
@@ -6895,6 +6872,8 @@ static Lisp_Object fm_font_family_alist;
#if USE_ATSUI
/* Hash table linking font family names to ATSU font IDs. */
static Lisp_Object atsu_font_id_hash;
+static Lisp_Object Vmac_atsu_font_table;
+extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic;
#endif
/* Alist linking character set strings to Mac text encoding and Emacs
@@ -7190,8 +7169,21 @@ init_font_name_table ()
NULL, NULL);
if (err == noErr)
{
+ FMFontFamily ff;
+ FMFontStyle style = normal;
+
decode_mac_font_name (name, name_len + 1, Qnil);
family = make_unibyte_string (name, name_len);
+ FMGetFontFamilyInstanceFromFont (font_ids[i], &ff, &style);
+ Fputhash (make_unibyte_string ((char *)(font_ids + i),
+ sizeof (ATSUFontID)),
+ Fcons (QCfamily,
+ list5 (family,
+ QCweight,
+ style & bold ? Qbold : Qnormal,
+ QCslant,
+ style & italic ? Qitalic : Qnormal)),
+ Vmac_atsu_font_table);
if (*name != '.'
&& hash_lookup (h, family, &hash_code) < 0)
{
@@ -7737,6 +7729,7 @@ XLoadQueryFont (Display *dpy, char *fontname)
ATSUFontFeatureSelector selectors[] = {kAllTypeFeaturesOffSelector,
kDecomposeDiacriticsSelector};
Lisp_Object font_id_cons;
+ FMFontStyle style;
font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)),
atsu_font_id_hash, Qnil);
@@ -7755,7 +7748,11 @@ XLoadQueryFont (Display *dpy, char *fontname)
return NULL;
err = ATSUSetAttributes (mac_style, sizeof (tags) / sizeof (tags[0]),
tags, sizes, values);
- fontnum = -1;
+ if (err != noErr)
+ return NULL;
+ err = FMGetFontFamilyInstanceFromFont (font_id, &fontnum, &style);
+ if (err != noErr)
+ fontnum = -1;
scriptcode = kTextEncodingMacUnicode;
}
else
@@ -7815,22 +7812,20 @@ XLoadQueryFont (Display *dpy, char *fontname)
pcm_init (font->bounds.rows[0], 0x100);
#if USE_CG_TEXT_DRAWING
- {
- FMFontFamily font_family;
- FMFontStyle style;
- ATSFontRef ats_font;
+ if (fontnum != -1)
+ {
+ FMFontStyle style;
+ ATSFontRef ats_font;
- err = FMGetFontFamilyInstanceFromFont (font_id, &font_family, &style);
- if (err == noErr)
- err = FMGetFontFromFontFamilyInstance (font_family, fontface,
+ err = FMGetFontFromFontFamilyInstance (fontnum, fontface,
&font_id, &style);
- /* Use CG text drawing if italic/bold is not synthesized. */
- if (err == noErr && style == fontface)
- {
- ats_font = FMGetATSFontRefFromFont (font_id);
- font->cg_font = CGFontCreateWithPlatformFont (&ats_font);
- }
- }
+ /* Use CG text drawing if italic/bold is not synthesized. */
+ if (err == noErr && style == fontface)
+ {
+ ats_font = FMGetATSFontRefFromFont (font_id);
+ font->cg_font = CGFontCreateWithPlatformFont (&ats_font);
+ }
+ }
if (font->cg_font)
{
@@ -8319,6 +8314,42 @@ x_find_ccl_program (fontp)
}
}
+#if USE_MAC_FONT_PANEL
+OSStatus
+mac_set_font_info_for_selection (f)
+ struct frame *f;
+{
+ OSStatus err;
+
+ if (f == NULL)
+ err = SetFontInfoForSelection (kFontSelectionATSUIType, 0, NULL, NULL);
+ else
+ {
+ struct face *default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
+ XFontStruct *ascii_font = default_face->ascii_face->font;
+ EventTargetRef target = GetWindowEventTarget (FRAME_MAC_WINDOW (f));
+
+ if (ascii_font->mac_fontnum != -1)
+ {
+ FontSelectionQDStyle qd_style;
+
+ qd_style.version = kFontSelectionQDStyleVersionZero;
+ qd_style.instance.fontFamily = ascii_font->mac_fontnum;
+ qd_style.instance.fontStyle = ascii_font->mac_fontface;
+ qd_style.size = ascii_font->mac_fontsize;
+ qd_style.hasColor = false;
+
+ err = SetFontInfoForSelection (kFontSelectionQDType,
+ 1, &qd_style, target);
+ }
+ else
+ err = SetFontInfoForSelection (kFontSelectionATSUIType,
+ 1, &ascii_font->mac_style, target);
+ }
+
+ return err;
+}
+#endif
/* The Mac Event loop code */
@@ -8406,6 +8437,14 @@ Point saved_menu_event_location;
/* Apple Events */
#if USE_CARBON_EVENTS
static Lisp_Object Qhicommand;
+#ifdef MAC_OSX
+extern Lisp_Object Qwindow;
+static Lisp_Object Qtoolbar_switch_mode;
+#endif
+#if USE_MAC_FONT_PANEL
+extern Lisp_Object Qfont;
+static Lisp_Object Qpanel_closed, Qselection;
+#endif
#endif
extern int mac_ready_for_apple_events;
extern Lisp_Object Qundefined;
@@ -8415,13 +8454,9 @@ extern void mac_find_apple_event_spec P_ ((AEEventClass, AEEventID,
Lisp_Object *));
extern OSErr init_coercion_handler P_ ((void));
-#if TARGET_API_MAC_CARBON
/* Drag and Drop */
-static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference);
-static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference);
-static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL;
-static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL;
-#endif
+OSErr install_drag_handler P_ ((WindowRef));
+void remove_drag_handler P_ ((WindowRef));
#if USE_CARBON_EVENTS
#ifdef MAC_OSX
@@ -8977,47 +9012,84 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out)
x_real_positions (f, &f->left_pos, &f->top_pos);
}
-OSErr
+void
mac_store_apple_event (class, id, desc)
Lisp_Object class, id;
const AEDesc *desc;
{
- OSErr err;
struct input_event buf;
- AEDesc *desc_copy;
- desc_copy = xmalloc (sizeof (AEDesc));
- err = AEDuplicateDesc (desc, desc_copy);
- if (err == noErr)
- {
- EVENT_INIT (buf);
+ EVENT_INIT (buf);
+
+ buf.kind = MAC_APPLE_EVENT;
+ buf.x = class;
+ buf.y = id;
+ XSETFRAME (buf.frame_or_window,
+ mac_focus_frame (&one_mac_display_info));
+ /* Now that Lisp object allocations are protected by BLOCK_INPUT, it
+ is safe to use them during read_socket_hook. */
+ buf.arg = mac_aedesc_to_lisp (desc);
+ kbd_buffer_store_event (&buf);
+}
+
+#if TARGET_API_MAC_CARBON
+static OSStatus
+mac_store_event_ref_as_apple_event (class, id, class_key, id_key,
+ event, num_params, names, types)
+ AEEventClass class;
+ AEEventID id;
+ Lisp_Object class_key, id_key;
+ EventRef event;
+ UInt32 num_params;
+ EventParamName *names;
+ EventParamType *types;
+{
+ OSStatus err = eventNotHandledErr;
+ Lisp_Object binding;
- buf.kind = MAC_APPLE_EVENT;
- buf.x = class;
- buf.y = id;
- buf.code = (int)desc_copy;
- XSETFRAME (buf.frame_or_window,
- mac_focus_frame (&one_mac_display_info));
- buf.arg = Qnil;
- kbd_buffer_store_event (&buf);
+ mac_find_apple_event_spec (class, id, &class_key, &id_key, &binding);
+ if (!NILP (binding) && !EQ (binding, Qundefined))
+ {
+ if (INTEGERP (binding))
+ err = XINT (binding);
+ else
+ {
+ AppleEvent apple_event;
+ err = create_apple_event_from_event_ref (event, num_params,
+ names, types,
+ &apple_event);
+ if (err == noErr)
+ {
+ mac_store_apple_event (class_key, id_key, &apple_event);
+ AEDisposeDesc (&apple_event);
+ }
+ }
}
return err;
}
-Lisp_Object
-mac_make_lispy_event_code (code)
- int code;
+void
+mac_store_drag_event (window, mouse_pos, modifiers, desc)
+ WindowRef window;
+ Point mouse_pos;
+ SInt16 modifiers;
+ const AEDesc *desc;
{
- AEDesc *desc = (AEDesc *)code;
- Lisp_Object obj;
+ struct input_event buf;
- obj = mac_aedesc_to_lisp (desc);
- AEDisposeDesc (desc);
- xfree (desc);
+ EVENT_INIT (buf);
- return obj;
+ buf.kind = DRAG_N_DROP_EVENT;
+ buf.modifiers = mac_to_emacs_modifiers (modifiers);
+ buf.timestamp = TickCount () * (1000 / 60);
+ XSETINT (buf.x, mouse_pos.h);
+ XSETINT (buf.y, mouse_pos.v);
+ XSETFRAME (buf.frame_or_window, mac_window_to_frame (window));
+ buf.arg = mac_aedesc_to_lisp (desc);
+ kbd_buffer_store_event (&buf);
}
+#endif
#if USE_CARBON_EVENTS
static pascal OSStatus
@@ -9028,7 +9100,11 @@ mac_handle_command_event (next_handler, event, data)
{
OSStatus result, err;
HICommand command;
- Lisp_Object class_key, id_key, binding;
+ static EventParamName names[] = {kEventParamDirectObject,
+ kEventParamKeyModifiers};
+ static EventParamType types[] = {typeHICommand,
+ typeUInt32};
+ int num_params = sizeof (names) / sizeof (names[0]);
result = CallNextEventHandler (next_handler, event);
if (result != eventNotHandledErr)
@@ -9042,33 +9118,10 @@ mac_handle_command_event (next_handler, event, data)
/* A HICommand event is mapped to an Apple event whose event class
symbol is `hicommand' and event ID is its command ID. */
- class_key = Qhicommand;
- mac_find_apple_event_spec (0, command.commandID,
- &class_key, &id_key, &binding);
- if (!NILP (binding) && !EQ (binding, Qundefined))
- {
- if (INTEGERP (binding))
- return XINT (binding);
- else
- {
- AppleEvent apple_event;
- static EventParamName names[] = {kEventParamDirectObject,
- kEventParamKeyModifiers};
- static EventParamType types[] = {typeHICommand,
- typeUInt32};
- err = create_apple_event_from_event_ref (event, 2, names, types,
- &apple_event);
- if (err == noErr)
- {
- err = mac_store_apple_event (class_key, id_key, &apple_event);
- AEDisposeDesc (&apple_event);
- }
- if (err == noErr)
- return noErr;
- }
- }
-
- return eventNotHandledErr;
+ err = mac_store_event_ref_as_apple_event (0, command.commandID,
+ Qhicommand, Qnil,
+ event, num_params, names, types);
+ return err == noErr ? noErr : eventNotHandledErr;
}
static OSErr
@@ -9171,6 +9224,33 @@ mac_handle_window_event (next_handler, event, data)
return noErr;
break;
+
+#ifdef MAC_OSX
+ case kEventWindowToolbarSwitchMode:
+ result = CallNextEventHandler (next_handler, event);
+ {
+ static EventParamName names[] = {kEventParamDirectObject,
+ kEventParamWindowMouseLocation,
+ kEventParamKeyModifiers,
+ kEventParamMouseButton,
+ kEventParamClickCount,
+ kEventParamMouseChord};
+ static EventParamType types[] = {typeWindowRef,
+ typeQDPoint,
+ typeUInt32,
+ typeMouseButton,
+ typeUInt32,
+ typeUInt32};
+ int num_params = sizeof (names) / sizeof (names[0]);
+
+ err = mac_store_event_ref_as_apple_event (0, 0,
+ Qwindow,
+ Qtoolbar_switch_mode,
+ event, num_params,
+ names, types);
+ }
+ return err == noErr ? noErr : result;
+#endif
}
return eventNotHandledErr;
@@ -9245,45 +9325,96 @@ mac_handle_mouse_event (next_handler, event, data)
return eventNotHandledErr;
}
+#if USE_MAC_FONT_PANEL
+static pascal OSStatus
+mac_handle_font_event (next_handler, event, data)
+ EventHandlerCallRef next_handler;
+ EventRef event;
+ void *data;
+{
+ OSStatus result, err;
+ Lisp_Object id_key;
+ int num_params;
+ EventParamName *names;
+ EventParamType *types;
+ static EventParamName names_sel[] = {kEventParamATSUFontID,
+ kEventParamATSUFontSize,
+ kEventParamFMFontFamily,
+ kEventParamFMFontSize,
+ kEventParamFontColor};
+ static EventParamType types_sel[] = {typeATSUFontID,
+ typeATSUSize,
+ typeFMFontFamily,
+ typeFMFontSize,
+ typeFontColor};
+
+ result = CallNextEventHandler (next_handler, event);
+ if (result != eventNotHandledErr)
+ return result;
+
+ switch (GetEventKind (event))
+ {
+ case kEventFontPanelClosed:
+ id_key = Qpanel_closed;
+ num_params = 0;
+ names = NULL;
+ types = NULL;
+ break;
+
+ case kEventFontSelection:
+ id_key = Qselection;
+ num_params = sizeof (names_sel) / sizeof (names_sel[0]);
+ names = names_sel;
+ types = types_sel;
+ break;
+ }
+
+ err = mac_store_event_ref_as_apple_event (0, 0, Qfont, id_key,
+ event, num_params,
+ names, types);
+
+ return err == noErr ? noErr : eventNotHandledErr;
+}
+#endif
+
#ifdef MAC_OSX
-OSErr
+OSStatus
mac_store_services_event (event)
EventRef event;
{
- OSErr err;
- AppleEvent apple_event;
+ OSStatus err;
Lisp_Object id_key;
+ int num_params;
+ EventParamName *names;
+ EventParamType *types;
+ static EventParamName names_pfm[] = {kEventParamServiceMessageName,
+ kEventParamServiceUserData};
+ static EventParamType types_pfm[] = {typeCFStringRef,
+ typeCFStringRef};
switch (GetEventKind (event))
{
case kEventServicePaste:
id_key = Qpaste;
- err = create_apple_event_from_event_ref (event, 0, NULL, NULL,
- &apple_event);
+ num_params = 0;
+ names = NULL;
+ types = NULL;
break;
case kEventServicePerform:
- {
- static EventParamName names[] = {kEventParamServiceMessageName,
- kEventParamServiceUserData};
- static EventParamType types[] = {typeCFStringRef,
- typeCFStringRef};
-
- id_key = Qperform;
- err = create_apple_event_from_event_ref (event, 2, names, types,
- &apple_event);
- }
+ id_key = Qperform;
+ num_params = sizeof (names_pfm) / sizeof (names_pfm[0]);
+ names = names_pfm;
+ types = types_pfm;
break;
default:
abort ();
}
- if (err == noErr)
- {
- err = mac_store_apple_event (Qservices, id_key, &apple_event);
- AEDisposeDesc (&apple_event);
- }
+ err = mac_store_event_ref_as_apple_event (0, 0, Qservices, id_key,
+ event, num_params,
+ names, types);
return err;
}
@@ -9303,15 +9434,28 @@ install_window_handler (window)
{kEventClassWindow, kEventWindowShown},
{kEventClassWindow, kEventWindowHidden},
{kEventClassWindow, kEventWindowExpanded},
- {kEventClassWindow, kEventWindowCollapsed}};
+ {kEventClassWindow, kEventWindowCollapsed},
+#ifdef MAC_OSX
+ {kEventClassWindow, kEventWindowToolbarSwitchMode},
+#endif
+ };
EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}};
static EventHandlerUPP handle_window_eventUPP = NULL;
static EventHandlerUPP handle_mouse_eventUPP = NULL;
+#if USE_MAC_FONT_PANEL
+ EventTypeSpec specs_font[] = {{kEventClassFont, kEventFontPanelClosed},
+ {kEventClassFont, kEventFontSelection}};
+ static EventHandlerUPP handle_font_eventUPP = NULL;
+#endif
if (handle_window_eventUPP == NULL)
handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event);
if (handle_mouse_eventUPP == NULL)
handle_mouse_eventUPP = NewEventHandlerUPP (mac_handle_mouse_event);
+#if USE_MAC_FONT_PANEL
+ if (handle_font_eventUPP == NULL)
+ handle_font_eventUPP = NewEventHandlerUPP (mac_handle_font_event);
+#endif
err = InstallWindowEventHandler (window, handle_window_eventUPP,
GetEventTypeCount (specs_window),
specs_window, NULL, NULL);
@@ -9319,18 +9463,16 @@ install_window_handler (window)
err = InstallWindowEventHandler (window, handle_mouse_eventUPP,
GetEventTypeCount (specs_mouse),
specs_mouse, NULL, NULL);
-#endif
-#if TARGET_API_MAC_CARBON
- if (mac_do_track_dragUPP == NULL)
- mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag);
- if (mac_do_receive_dragUPP == NULL)
- mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag);
-
- if (err == noErr)
- err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL);
+#if USE_MAC_FONT_PANEL
if (err == noErr)
- err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL);
+ err = InstallWindowEventHandler (window, handle_font_eventUPP,
+ GetEventTypeCount (specs_font),
+ specs_font, NULL, NULL);
#endif
+#endif
+ if (err == noErr)
+ err = install_drag_handler (window);
+
return err;
}
@@ -9338,167 +9480,9 @@ void
remove_window_handler (window)
WindowPtr window;
{
-#if TARGET_API_MAC_CARBON
- if (mac_do_track_dragUPP)
- RemoveTrackingHandler (mac_do_track_dragUPP, window);
- if (mac_do_receive_dragUPP)
- RemoveReceiveHandler (mac_do_receive_dragUPP, window);
-#endif
-}
-
-#if TARGET_API_MAC_CARBON
-static pascal OSErr
-mac_do_track_drag (DragTrackingMessage message, WindowPtr window,
- void *handlerRefCon, DragReference theDrag)
-{
- static int can_accept;
- short items;
- short index;
- ItemReference theItem;
- FlavorFlags theFlags;
- OSErr result;
-
- if (GetFrontWindowOfClass (kMovableModalWindowClass, false))
- return dragNotAcceptedErr;
-
- switch (message)
- {
- case kDragTrackingEnterHandler:
- CountDragItems (theDrag, &items);
- can_accept = 0;
- for (index = 1; index <= items; index++)
- {
- GetDragItemReferenceNumber (theDrag, index, &theItem);
- result = GetFlavorFlags (theDrag, theItem, flavorTypeHFS, &theFlags);
- if (result == noErr)
- {
- can_accept = 1;
- break;
- }
- }
- break;
-
- case kDragTrackingEnterWindow:
- if (can_accept)
- {
- RgnHandle hilite_rgn = NewRgn ();
- Rect r;
- struct frame *f = mac_window_to_frame (window);
-
- GetWindowPortBounds (window, &r);
- OffsetRect (&r, -r.left, -r.top);
- RectRgn (hilite_rgn, &r);
- ShowDragHilite (theDrag, hilite_rgn, true);
- DisposeRgn (hilite_rgn);
- SetThemeCursor (kThemeCopyArrowCursor);
- }
- break;
-
- case kDragTrackingInWindow:
- break;
-
- case kDragTrackingLeaveWindow:
- if (can_accept)
- {
- struct frame *f = mac_window_to_frame (window);
-
- HideDragHilite (theDrag);
- SetThemeCursor (kThemeArrowCursor);
- }
- break;
-
- case kDragTrackingLeaveHandler:
- break;
- }
-
- return noErr;
+ remove_drag_handler (window);
}
-static pascal OSErr
-mac_do_receive_drag (WindowPtr window, void *handlerRefCon,
- DragReference theDrag)
-{
- short items;
- short index;
- FlavorFlags theFlags;
- Point mouse;
- OSErr result;
- ItemReference theItem;
- HFSFlavor data;
- Size size = sizeof (HFSFlavor);
- Lisp_Object file_list;
-
- if (GetFrontWindowOfClass (kMovableModalWindowClass, false))
- return dragNotAcceptedErr;
-
- file_list = Qnil;
- GetDragMouse (theDrag, &mouse, 0L);
- CountDragItems (theDrag, &items);
- for (index = 1; index <= items; index++)
- {
- /* Only handle file references. */
- GetDragItemReferenceNumber (theDrag, index, &theItem);
- result = GetFlavorFlags (theDrag, theItem, flavorTypeHFS, &theFlags);
- if (result == noErr)
- {
- OSErr err;
- AEDesc desc;
-
- err = GetFlavorData (theDrag, theItem, flavorTypeHFS,
- &data, &size, 0L);
- if (err == noErr)
- err = AECoercePtr (typeFSS, &data.fileSpec, sizeof (FSSpec),
- TYPE_FILE_NAME, &desc);
- if (err == noErr)
- {
- Lisp_Object file;
-
- /* x-dnd functions expect undecoded filenames. */
- file = make_uninit_string (AEGetDescDataSize (&desc));
- err = AEGetDescData (&desc, SDATA (file), SBYTES (file));
- if (err == noErr)
- file_list = Fcons (file, file_list);
- AEDisposeDesc (&desc);
- }
- }
- }
- /* If there are items in the list, construct an event and post it to
- the queue like an interrupt using kbd_buffer_store_event. */
- if (!NILP (file_list))
- {
- struct input_event event;
- Lisp_Object frame;
- struct frame *f = mac_window_to_frame (window);
- SInt16 modifiers;
-
- GlobalToLocal (&mouse);
- GetDragModifiers (theDrag, NULL, NULL, &modifiers);
-
- event.kind = DRAG_N_DROP_EVENT;
- event.code = 0;
- event.modifiers = mac_to_emacs_modifiers (modifiers);
- event.timestamp = TickCount () * (1000 / 60);
- XSETINT (event.x, mouse.h);
- XSETINT (event.y, mouse.v);
- XSETFRAME (frame, f);
- event.frame_or_window = frame;
- event.arg = file_list;
- /* Post to the interrupt queue */
- kbd_buffer_store_event (&event);
- /* MAC_TODO: Mimic behavior of windows by switching contexts to Emacs */
- {
- ProcessSerialNumber psn;
- GetCurrentProcess (&psn);
- SetFrontProcess (&psn);
- }
-
- return noErr;
- }
- else
- return dragNotAcceptedErr;
-}
-#endif
-
#if __profile__
void
@@ -9784,6 +9768,41 @@ mac_wait_next_event (er, sleep_time, dequeue)
}
#endif /* not USE_CARBON_EVENTS */
+#if TARGET_API_MAC_CARBON
+OSStatus
+mac_post_mouse_moved_event ()
+{
+ EventRef event = NULL;
+ OSStatus err;
+
+ err = CreateEvent (NULL, kEventClassMouse, kEventMouseMoved, 0,
+ kEventAttributeNone, &event);
+ if (err == noErr)
+ {
+ Point mouse_pos;
+
+ GetMouse (&mouse_pos);
+ LocalToGlobal (&mouse_pos);
+ err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
+ sizeof (Point), &mouse_pos);
+ }
+ if (err == noErr)
+ {
+ UInt32 modifiers = GetCurrentKeyModifiers ();
+
+ err = SetEventParameter (event, kEventParamKeyModifiers, typeUInt32,
+ sizeof (UInt32), &modifiers);
+ }
+ if (err == noErr)
+ err = PostEventToQueue (GetCurrentEventQueue (), event,
+ kEventPriorityStandard);
+ if (event)
+ ReleaseEvent (event);
+
+ return err;
+}
+#endif
+
/* Emacs calls this whenever it wants to read an input event from the
user. */
int
@@ -9911,7 +9930,8 @@ XTread_socket (sd, expected, hold_quit)
break;
case inContent:
- if (window_ptr != FRAME_MAC_WINDOW (mac_focus_frame (dpyinfo)))
+ if (dpyinfo->x_focus_frame == NULL
+ || window_ptr != FRAME_MAC_WINDOW (dpyinfo->x_focus_frame))
SelectWindow (window_ptr);
else
{
@@ -10058,20 +10078,18 @@ XTread_socket (sd, expected, hold_quit)
}
break;
-#if TARGET_API_MAC_CARBON
- case inProxyIcon:
- if (TrackWindowProxyDrag (window_ptr, er.where)
- != errUserWantsToDragWindow)
- break;
- /* fall through */
-#endif
case inDrag:
#if TARGET_API_MAC_CARBON
+ case inProxyIcon:
if (IsWindowPathSelectClick (window_ptr, &er))
{
WindowPathSelect (window_ptr, NULL, NULL);
break;
}
+ if (part_code == inProxyIcon
+ && (TrackWindowProxyDrag (window_ptr, er.where)
+ != errUserWantsToDragWindow))
+ break;
DragWindow (window_ptr, er.where, NULL);
#else /* not TARGET_API_MAC_CARBON */
DragWindow (window_ptr, er.where, &qd.screenBits.bounds);
@@ -11010,6 +11028,13 @@ syms_of_macterm ()
#if USE_CARBON_EVENTS
Qhicommand = intern ("hicommand"); staticpro (&Qhicommand);
#ifdef MAC_OSX
+ Qtoolbar_switch_mode = intern ("toolbar-switch-mode");
+ staticpro (&Qtoolbar_switch_mode);
+#if USE_MAC_FONT_PANEL
+ Qpanel_closed = intern ("panel-closed"); staticpro (&Qpanel_closed);
+ Qselection = intern ("selection"); staticpro (&Qselection);
+#endif
+
Qservices = intern ("services"); staticpro (&Qservices);
Qpaste = intern ("paste"); staticpro (&Qpaste);
Qperform = intern ("perform"); staticpro (&Qperform);
@@ -11050,7 +11075,7 @@ NOTE: Not supported on Mac yet. */);
x_use_underline_position_properties = 0;
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
- doc: /* If not nil, Emacs uses toolkit scroll bars. */);
+ doc: /* If not nil, Emacs uses toolkit scroll bars. */);
#ifdef USE_TOOLKIT_SCROLL_BARS
Vx_toolkit_scroll_bars = Qt;
#else
@@ -11104,23 +11129,23 @@ mouse-3 and the command-key will register for mouse-2. */);
#if USE_CARBON_EVENTS
DEFVAR_BOOL ("mac-wheel-button-is-mouse-2", &mac_wheel_button_is_mouse_2,
- doc: /* *Non-nil if the wheel button is mouse-2 and the right click mouse-3.
+ doc: /* *Non-nil if the wheel button is mouse-2 and the right click mouse-3.
Otherwise, the right click will be treated as mouse-2 and the wheel
button will be mouse-3. */);
mac_wheel_button_is_mouse_2 = 1;
DEFVAR_BOOL ("mac-pass-command-to-system", &mac_pass_command_to_system,
- doc: /* *Non-nil if command key presses are passed on to the Mac Toolbox. */);
+ doc: /* *Non-nil if command key presses are passed on to the Mac Toolbox. */);
mac_pass_command_to_system = 1;
DEFVAR_BOOL ("mac-pass-control-to-system", &mac_pass_control_to_system,
- doc: /* *Non-nil if control key presses are passed on to the Mac Toolbox. */);
+ doc: /* *Non-nil if control key presses are passed on to the Mac Toolbox. */);
mac_pass_control_to_system = 1;
#endif
DEFVAR_BOOL ("mac-allow-anti-aliasing", &mac_use_core_graphics,
- doc: /* *If non-nil, allow anti-aliasing.
+ doc: /* *If non-nil, allow anti-aliasing.
The text will be rendered using Core Graphics text rendering which
may anti-alias the text. */);
#if USE_CG_DRAWING
@@ -11133,7 +11158,7 @@ may anti-alias the text. */);
creating the terminal frame on Mac OS 9 before loading
term/mac-win.elc. */
DEFVAR_LISP ("mac-charset-info-alist", &Vmac_charset_info_alist,
- doc: /* Alist of Emacs character sets vs text encodings and coding systems.
+ doc: /* Alist of Emacs character sets vs text encodings and coding systems.
Each entry should be of the form:
(CHARSET-NAME TEXT-ENCODING CODING-SYSTEM)
@@ -11144,6 +11169,18 @@ CODING_SYSTEM is a coding system corresponding to TEXT-ENCODING. */);
Vmac_charset_info_alist =
Fcons (list3 (build_string ("mac-roman"),
make_number (smRoman), Qnil), Qnil);
+
+#if USE_ATSUI
+ DEFVAR_LISP ("mac-atsu-font-table", &Vmac_atsu_font_table,
+ doc: /* Hash table of ATSU font IDs vs plist of attributes and values.
+Each font ID is represented as a four-byte string in native byte
+order. */);
+ Vmac_atsu_font_table =
+ make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE),
+ make_float (DEFAULT_REHASH_SIZE),
+ make_float (DEFAULT_REHASH_THRESHOLD),
+ Qnil, Qnil, Qnil);
+#endif
}
/* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b
diff --git a/src/macterm.h b/src/macterm.h
index 80276b45102..7406fb2fda6 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -581,10 +581,11 @@ extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int,
extern void mac_clear_area P_ ((struct frame *, int, int,
unsigned int, unsigned int));
extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
+extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *));
extern OSErr install_window_handler P_ ((WindowPtr));
extern void remove_window_handler P_ ((WindowPtr));
-extern Lisp_Object mac_make_lispy_event_code P_ ((int));
extern void do_menu_choice P_ ((SInt32));
+extern OSStatus mac_post_mouse_moved_event P_ ((void));
#if USE_CG_DRAWING
extern void mac_prepare_for_quickdraw P_ ((struct frame *));
#endif
@@ -620,12 +621,15 @@ extern void free_frame_menubar P_ ((struct frame *));
/* Defined in mac.c. */
extern void mac_clear_font_name_table P_ ((void));
-extern Lisp_Object mac_aedesc_to_lisp P_ ((AEDesc *));
+extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *));
#if TARGET_API_MAC_CARBON
extern OSErr create_apple_event_from_event_ref P_ ((EventRef, UInt32,
EventParamName *,
EventParamType *,
AppleEvent *));
+extern OSErr create_apple_event_from_drag_ref P_ ((DragRef, UInt32,
+ FlavorType *,
+ AppleEvent *));
extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *));
extern CFStringRef cfstring_create_with_string P_ ((Lisp_Object));
extern Lisp_Object cfdata_to_lisp P_ ((CFDataRef));
diff --git a/src/minibuf.c b/src/minibuf.c
index 5f3f7454a0c..dc920287304 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2805,7 +2805,7 @@ syms_of_minibuf ()
DEFVAR_LISP ("history-length", &Vhistory_length,
doc: /* *Maximum length for history lists before truncation takes place.
A number means that length; t means infinite. Truncation takes place
-just after a new element is inserted. Setting the history-length
+just after a new element is inserted. Setting the `history-length'
property of a history variable overrides this default. */);
XSETFASTINT (Vhistory_length, 30);
diff --git a/src/process.c b/src/process.c
index 6e633a5825c..de4dbd4a3ff 100644
--- a/src/process.c
+++ b/src/process.c
@@ -695,6 +695,8 @@ setup_process_coding_systems (process)
= (struct coding_system *) xmalloc (sizeof (struct coding_system));
setup_coding_system (p->encode_coding_system,
proc_encode_coding_system[outch]);
+ if (proc_encode_coding_system[outch]->eol_type == CODING_EOL_UNDECIDED)
+ proc_encode_coding_system[outch]->eol_type = system_eol_type;
}
DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0,
@@ -5071,6 +5073,10 @@ read_process_output (proc, channel)
p->encode_coding_system = coding->symbol;
setup_coding_system (coding->symbol,
proc_encode_coding_system[XINT (p->outfd)]);
+ if (proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ == CODING_EOL_UNDECIDED)
+ proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ = system_eol_type;
}
}
@@ -5178,6 +5184,10 @@ read_process_output (proc, channel)
p->encode_coding_system = coding->symbol;
setup_coding_system (coding->symbol,
proc_encode_coding_system[XINT (p->outfd)]);
+ if (proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ == CODING_EOL_UNDECIDED)
+ proc_encode_coding_system[XINT (p->outfd)]->eol_type
+ = system_eol_type;
}
}
carryover = nbytes - coding->consumed;
@@ -5320,6 +5330,8 @@ send_process (proc, buf, len, object)
sending a multibyte text, thus we must encode it by the
original coding system specified for the current process. */
setup_coding_system (p->encode_coding_system, coding);
+ if (coding->eol_type == CODING_EOL_UNDECIDED)
+ coding->eol_type = system_eol_type;
/* src_multibyte should be set to 1 _after_ a call to
setup_coding_system, since it resets src_multibyte to
zero. */
diff --git a/src/termhooks.h b/src/termhooks.h
index 13b41f95f70..8937a709f85 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -183,9 +183,9 @@ enum event_kind
/* Generated when an Apple event, a HICommand event, or a Services
menu event is received and the corresponding handler is
registered. Members `x' and `y' are for the event class and ID
- symbols, respectively. Member `code' points to the Apple event
- descriptor. Parameters for Non-Apple events are converted to
- those in Apple events. */
+ symbols, respectively. Member `arg' is a Lisp object converted
+ from the received Apple event. Parameters for non-Apple events
+ are converted to those in Apple events. */
MAC_APPLE_EVENT
#endif
};
diff --git a/src/xdisp.c b/src/xdisp.c
index d05b1c5293d..4ad511c18b0 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4433,6 +4433,24 @@ handle_composition_prop (it)
if (id >= 0)
{
+ struct composition *cmp = composition_table[id];
+
+ if (cmp->glyph_len == 0)
+ {
+ /* No glyph. */
+ if (STRINGP (it->string))
+ {
+ IT_STRING_CHARPOS (*it) = end;
+ IT_STRING_BYTEPOS (*it) = string_char_to_byte (it->string,
+ end);
+ }
+ else
+ {
+ IT_CHARPOS (*it) = end;
+ IT_BYTEPOS (*it) = CHAR_TO_BYTE (end);
+ }
+ return HANDLED_RECOMPUTE_PROPS;
+ }
it->method = GET_FROM_COMPOSITION;
it->cmp_id = id;
it->cmp_len = COMPOSITION_LENGTH (prop);