diff options
| author | Miles Bader | 2006-05-10 20:42:41 +0000 |
|---|---|---|
| committer | Miles Bader | 2006-05-10 20:42:41 +0000 |
| commit | 3bcf2b084a0dd1ff0399480d57b87e01cfe061dc (patch) | |
| tree | 355c68cda5a5c9c73824840df3cdae6320017283 | |
| parent | 0ea38cf9dca8f2b148d78f638eed17e8896984af (diff) | |
| parent | d105bfecce2288cd99f591382586a22a4ce1b6f2 (diff) | |
| download | emacs-3bcf2b084a0dd1ff0399480d57b87e01cfe061dc.tar.gz emacs-3bcf2b084a0dd1ff0399480d57b87e01cfe061dc.zip | |
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-60
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 259-273)
- Update from CVS
- lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t
- Merge from gnus--rel--5.10
- Rename "field-at-point" to "field-at-pos"
- (comint-insert-input): Remove redundant calls to setq and goto-char
* gnus--rel--5.10 (patch 99-100)
- Merge from emacs--devo--0
- Update from CVS
140 files changed, 8765 insertions, 6146 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (INFO_FILES): Remove emacs-xtra. | ||
| 4 | |||
| 5 | * info/dir: Remove the Emacs-Xtra entry. | ||
| 6 | |||
| 1 | 2006-04-20 Ramprasad B <ramprasad_i82@yahoo.com> | 7 | 2006-04-20 Ramprasad B <ramprasad_i82@yahoo.com> |
| 2 | 8 | ||
| 3 | * Copyright (sources/emacs): updated copyright year(s) | 9 | * 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 | |||
| 135 | # system, it is inappropriate to imply that it is part of Emacs. | 135 | # system, it is inappropriate to imply that it is part of Emacs. |
| 136 | infodir=@infodir@ | 136 | infodir=@infodir@ |
| 137 | INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \ | 137 | INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \ |
| 138 | elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake \ | 138 | elisp eintr emacs emacs-mime eshell eudc flymake \ |
| 139 | forms gnus idlwave info message mh-e newsticker org pcl-cvs \ | 139 | forms gnus idlwave info message mh-e newsticker org pcl-cvs \ |
| 140 | pgg reftex sc ses sieve speedbar tramp vip viper widget \ | 140 | pgg reftex sc ses sieve speedbar tramp vip viper widget \ |
| 141 | woman smtpmail url rcirc erc | 141 | 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 @@ | |||
| 1 | 2006-05-06 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | * FOR-RELEASE: MH-E 8.0 has been released, so removed reminder | ||
| 4 | about it. | ||
| 5 | |||
| 1 | 2006-04-17 Ramprasad B <ramprasad_i82@yahoo.com> | 6 | 2006-04-17 Ramprasad B <ramprasad_i82@yahoo.com> |
| 2 | 7 | ||
| 3 | * ./* (Copyright): Updated Copyright year(s) | 8 | * ./* (Copyright): Updated Copyright year(s) |
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index c641fbe106c..88d3a0dcf48 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -23,22 +23,18 @@ face name prefixes should be in it for good results. | |||
| 23 | 23 | ||
| 24 | ** Ask maintainers of refcard translations to update them. | 24 | ** Ask maintainers of refcard translations to update them. |
| 25 | 25 | ||
| 26 | ** Check what should be deleted or updated in MORE.STUFF. | ||
| 27 | |||
| 28 | ** Send an email to the various distributions, including the GNOME | 26 | ** Send an email to the various distributions, including the GNOME |
| 29 | and KDE projects, to use the new Emacs icons in etc/images/icons. | 27 | and KDE projects, to use the new Emacs icons in etc/images/icons. |
| 30 | 28 | ||
| 31 | ** Ensure MH-E 8.0 has been released. | ||
| 32 | Assigned to Bill Wohler <wohler@newt.com>. | ||
| 33 | |||
| 34 | * BUGS | 29 | * BUGS |
| 35 | 30 | ||
| 36 | ** Stefan Monnier's March 20 bug report about 3d boxes in header line. | 31 | ** JD Smith's 17 Apr 2006 bug report that CVS operations |
| 32 | get mysterious unreproducible failures. | ||
| 37 | 33 | ||
| 38 | ** Is there a basic problem with cl-byte-compile-compiler-macro? | 34 | ** David Hansen's bug report on 16 Apr 2006 about point-entered and |
| 35 | point-left text properties. | ||
| 39 | 36 | ||
| 40 | ** Recalculate the tool bar height after changing the default font. | 37 | ** Is there a basic problem with cl-byte-compile-compiler-macro? |
| 41 | (Bug report by Yamamoto Mistuharu, 31 Mar 2006) | ||
| 42 | 38 | ||
| 43 | ** Markus Gritsch's report about Emacs looping on Windoze with the following | 39 | ** Markus Gritsch's report about Emacs looping on Windoze with the following |
| 44 | .emacs file, and then reduce Emacs frame width to "something quite narrow": | 40 | .emacs file, and then reduce Emacs frame width to "something quite narrow": |
| @@ -71,97 +67,6 @@ Lisp point of view. | |||
| 71 | 67 | ||
| 72 | ** Check man/info.texi. | 68 | ** Check man/info.texi. |
| 73 | 69 | ||
| 74 | ** Add missing years in copyright notices of all files. | ||
| 75 | |||
| 76 | Please record your name here and say which part of the distribution | ||
| 77 | you're going to handle. | ||
| 78 | |||
| 79 | DIRECTORY STATUS IN CHARGE | ||
| 80 | --------- ------ --------- | ||
| 81 | etc (and subdirs) done Thien-Thi Nguyen (ttn(@gnu.org)) | ||
| 82 | leim done Kenichi Handa | ||
| 83 | lib-src done ttn | ||
| 84 | lisp done ttn | ||
| 85 | lisp/calc done Jay Belanger | ||
| 86 | lisp/calendar done Glenn Morris | ||
| 87 | lisp/emacs-lisp done ttn | ||
| 88 | lisp/emulation done ttn | ||
| 89 | lisp/eshell done ttn | ||
| 90 | lisp/gnus done Romain Francoise | ||
| 91 | lisp/international done Kenichi Handa | ||
| 92 | lisp/language done Kenichi Handa | ||
| 93 | lisp/mail done ttn | ||
| 94 | lisp/mh-e done Bill Wohler | ||
| 95 | lisp/net done ttn | ||
| 96 | lisp/obsolete done ttn | ||
| 97 | lisp/play done Romain Francoise | ||
| 98 | lisp/progmodes done Nick Roberts | ||
| 99 | lisp/term done ttn | ||
| 100 | lisp/textmodes done ttn | ||
| 101 | lisp/url done ttn | ||
| 102 | lispintro done ttn | ||
| 103 | lispref done ttn | ||
| 104 | lwlib done ttn | ||
| 105 | m4 done ttn | ||
| 106 | mac (and subdirs) done ttn | ||
| 107 | man done ttn | ||
| 108 | msdos done ttn | ||
| 109 | nt (and subdirs) done ttn | ||
| 110 | oldXMenu done ttn | ||
| 111 | src (and subdirs) done ttn | ||
| 112 | vms done ttn | ||
| 113 | |||
| 114 | ** Check the Emacs manual. | ||
| 115 | |||
| 116 | Each manual section should be checked for factual correctness | ||
| 117 | regarding recent changes by at least two people. After each file | ||
| 118 | name, on the same line or the following line, come the names of the | ||
| 119 | people who have checked it. | ||
| 120 | |||
| 121 | SECTION READERS | ||
| 122 | ----------------------------- | ||
| 123 | man/abbrevs.texi Chong Yidong Joakim Verona | ||
| 124 | man/anti.texi Chong Yidong | ||
| 125 | man/basic.texi "Luc Teirlinck" Chong Yidong | ||
| 126 | man/buffers.texi "Luc Teirlinck" Chong Yidong | ||
| 127 | man/building.texi "Ted Zlatanov" <tzz@lifelogs.com> | ||
| 128 | man/calendar.texi joakim@verona.se Chong Yidong | ||
| 129 | man/cmdargs.texi Chong Yidong "Luc Teirlinck" | ||
| 130 | man/commands.texi "Luc Teirlinck" Chong Yidong | ||
| 131 | man/custom.texi Chong Yidong "Luc Teirlinck" | ||
| 132 | man/dired.texi Chong Yidong joakim@verona.se | ||
| 133 | man/display.texi "Luc Teirlinck" Chong Yidong | ||
| 134 | man/emacs.texi "Luc Teirlinck" Lute Kamstra | ||
| 135 | man/entering.texi "Luc Teirlinck" Chong Yidong | ||
| 136 | man/files.texi "Luc Teirlinck" Chong Yidong | ||
| 137 | man/fixit.texi "Luc Teirlinck" Chong Yidong | ||
| 138 | man/frames.texi "Luc Teirlinck" Chong Yidong | ||
| 139 | man/glossary.texi Chong Yidong | ||
| 140 | man/help.texi "Luc Teirlinck" Chong Yidong | ||
| 141 | man/indent.texi "Luc Teirlinck" Chong Yidong | ||
| 142 | man/killing.texi "Luc Teirlinck" Chong Yidong | ||
| 143 | man/kmacro.texi "Luc Teirlinck" Chong Yidong | ||
| 144 | man/macos.texi Chong Yidong | ||
| 145 | man/maintaining.texi Chong Yidong | ||
| 146 | man/major.texi "Luc Teirlinck" Chong Yidong | ||
| 147 | man/mark.texi "Luc Teirlinck" Chong Yidong | ||
| 148 | man/mini.texi "Luc Teirlinck" Chong Yidong | ||
| 149 | man/misc.texi Chong Yidong | ||
| 150 | man/msdog.texi Chong Yidong | ||
| 151 | man/mule.texi "Luc Teirlinck" Kenichi Handa | ||
| 152 | man/m-x.texi "Luc Teirlinck" Chong Yidong | ||
| 153 | man/picture.texi Joakim Verona <joakim@verona.se> Chong Yidong | ||
| 154 | man/programs.texi "Stephen Eglen" Chong Yidong | ||
| 155 | man/regs.texi "Luc Teirlinck" Chong Yidong | ||
| 156 | man/rmail.texi Chong Yidong "Luc Teirlinck" | ||
| 157 | man/screen.texi "Luc Teirlinck" Chong Yidong | ||
| 158 | man/search.texi "Luc Teirlinck" Chong Yidong | ||
| 159 | man/sending.texi Chong Yidong "Luc Teirlinck" | ||
| 160 | man/text.texi "Luc Teirlinck" Chong Yidong | ||
| 161 | man/trouble.texi Chong Yidong | ||
| 162 | man/windows.texi "Luc Teirlinck" Chong Yidong | ||
| 163 | man/xresources.texi | ||
| 164 | |||
| 165 | ** Check the Emacs Lisp manual. | 70 | ** Check the Emacs Lisp manual. |
| 166 | 71 | ||
| 167 | Each manual section should be checked for factual correctness | 72 | Each manual section should be checked for factual correctness |
diff --git a/etc/ChangeLog b/etc/ChangeLog index c80b23c0489..c084d5ab205 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-05-06 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | Release MH-E version 8.0. | ||
| 4 | |||
| 5 | * NEWS, MH-E-NEWS: Update for MH-E release 8.0. | ||
| 6 | |||
| 1 | 2006-04-28 Bill Wohler <wohler@newt.com> | 7 | 2006-04-28 Bill Wohler <wohler@newt.com> |
| 2 | 8 | ||
| 3 | Release MH-E version 7.95. | 9 | 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, | |||
| 6 | are permitted in any medium without royalty provided the copyright | 6 | are permitted in any medium without royalty provided the copyright |
| 7 | notice and this notice are preserved. | 7 | notice and this notice are preserved. |
| 8 | 8 | ||
| 9 | * Changes in MH-E 7.95 | 9 | * Changes in MH-E 8.0 |
| 10 | 10 | ||
| 11 | Version 7.95, the second 8.0 release candidate, fixes a single bug. | 11 | Version 8.0 supports GNU mailutils, S/MIME, picons, which-func-mode, |
| 12 | It would be good to check this version ASAP since the Emacs pretest is | 12 | sports an improved interface for hiding header fields, improves upon |
| 13 | coming in days: if no showstopper problems are found in this version | 13 | the MH variant detection, improves folder completion, makes the pick |
| 14 | it will be promoted to 8.0 before the pretest. Thanks for your help! | 14 | search equivalent to the other types of searches, spruces up the tool |
| 15 | 15 | bar, creates the correct MIME type when including OpenOffice | |
| 16 | ** Bug Fixes in MH-E 7.95 | 16 | documents, works on a Mac, adds colors to buttons for signed or |
| 17 | 17 | encrypted messages, incorporates new features introduced in | |
| 18 | *** Folder Completion Fails in fcc: Field | 18 | Emacs 22.1, fixes a bunch of bugs, and best of all, comes with an |
| 19 | updated manual! | ||
| 20 | |||
| 21 | Internally, MH-E now sports a new software organization which will | ||
| 22 | help future maintainability. As a side-effect, the number of XEmacs | ||
| 23 | compilation warnings has plummeted from hundreds to just three. CVS | ||
| 24 | users will notice that MH-E has been migrated from the CVS repository | ||
| 25 | from SourceForge to Savannah (but only for those files that were | ||
| 26 | already part of Emacs). As a result, the location of MH-E in the | ||
| 27 | load-path has changed, and mh-e-autoloads.el was renamed to | ||
| 28 | mh-autoloads.el. See section INSTALL in the README for details. While | ||
| 29 | this migration will benefit maintainers, it will also benefit users: | ||
| 30 | CVS Emacs users will not have to check out MH-E separately and welcome | ||
| 31 | faster MH-E updates, and CVS MH-E users will welcome faster MH-E | ||
| 32 | updates from Emacs developers. Read section CVS MH-E INSTALL in the | ||
| 33 | README for details. | ||
| 19 | 34 | ||
| 20 | This has been fixed (closes SF #1476270). | 35 | While not related to this release, the MH-E mailing lists are now |
| 36 | gatewayed at gmane.org (closes SF #979308). | ||
| 21 | 37 | ||
| 22 | * Changes in MH-E 7.94 | 38 | If you want to see the release notes for the alpha and beta releases |
| 39 | leading up this release, please see: | ||
| 23 | 40 | ||
| 24 | Version 7.94, the first 8.0 release candidate, fixes a bunch of bugs, | 41 | http://cvs.savannah.gnu.org/viewcvs/emacs/etc/MH-E-NEWS?rev=1.25&root=emacs&view=markup |
| 25 | incorporates new features introduced in Emacs 22.1, improves folder | ||
| 26 | completion, and spruces up the tool bar. | ||
| 27 | 42 | ||
| 28 | ** New Features in MH-E 7.94 | 43 | |
| 29 | 44 | ||
| 30 | *** Add :package-version Keyword to Options | 45 | ** New Features in MH-E 8.0 |
| 31 | 46 | ||
| 32 | This `defcustom', `defgroup', and `defface' keyword was introduced in | 47 | *** GNU mailutils Support |
| 33 | Emacs 22.1. MH-E has been extended to take advantage of it. With this | ||
| 34 | keyword, you can now use `M-x customize-changed-options' to see what | ||
| 35 | options in MH-E have changed between versions of Emacs. In a future | ||
| 36 | version of Emacs, you'll be able to see changes between MH-E versions | ||
| 37 | as well (closes SF #1452724). | ||
| 38 | 48 | ||
| 39 | ** Bug Fixes in MH-E 7.94 | 49 | MH-E now supports GNU mailutils 0.4 and higher versions. |
| 40 | 50 | ||
| 41 | *** mhparam -components Fails on mailutils | 51 | *** S/MIME Support |
| 42 | 52 | ||
| 43 | This error prevented MH-E from loading when using GNU mailutils. GNU | 53 | MH-E now supports S/MIME using Gnus 5.10.6 or higher. |
| 44 | mailutils drops the `s' in this argument, so we did too since | ||
| 45 | -component still works in nmh and MH (closes SF #1446985). | ||
| 46 | 54 | ||
| 47 | *** "/ s" Still Has Problems With []'d Mail | 55 | *** Picon Support |
| 48 | 56 | ||
| 49 | On XEmacs, subjects that had special characters would prevent `/ s' | 57 | In addition to the other methods of displaying an icon for the sender |
| 50 | from narrowing to the given subject. These characters are now quoted | 58 | of a message, MH-E can now display images from a picon directory. The |
| 51 | correctly in XEmacs (closes SF #1447598). | 59 | directory search path is found in the `mh-picon-directory-list' |
| 60 | variable. More documentation is found in the "facedb" sections in the | ||
| 61 | xfaces man page. | ||
| 52 | 62 | ||
| 53 | *** Incorrect Example in mh-folder-list Docstring | 63 | *** Catchup Command |
| 54 | 64 | ||
| 55 | This has been fixed (closes SF #1448498). | 65 | There is a new `F c' (`mh-catchup') command that marks all unread |
| 66 | messages in the current folder as read. | ||
| 56 | 67 | ||
| 57 | *** Variable mh-send-args Is a String, Not a List | 68 | *** Use which-func-mode to Display Folder in Index Mode |
| 58 | 69 | ||
| 59 | This was causing errors when sending under GNU mailutils. The internal | 70 | Turning on `which-func-mode' displays the folder name of the message |
| 60 | variable `mh-send-args' is now a list which fixes the problem (closes | 71 | under the cursor in index folders (closes SF #855520). |
| 61 | SF #1448604). | ||
| 62 | 72 | ||
| 63 | *** Update Icons | 73 | *** Quick Key Help |
| 64 | 74 | ||
| 65 | Most of the tool bar icons have been replaced by GTK or GNOME 2 icons | 75 | The `?' (`mh-help') function now displays the help in its own buffer |
| 66 | (closes SF #1452715). | 76 | called *MH-E Help* (closes SF #493740 and SF #656631). |
| 67 | 77 | ||
| 68 | *** Can't customize tool bar for current session | 78 | *** Search Unification |
| 69 | 79 | ||
| 70 | If you customized `mh-tool-bar-folder-buttons' or | 80 | The old `F s' behavior of adding messages to the search sequence has |
| 71 | `mh-tool-bar-letter-buttons', and clicked Set for Current Session, the | 81 | been removed. The `F i' keybinding was deprecated and the new `F s' |
| 72 | tool bar was not updated. This has been fixed (closes SF #1452718). | 82 | (`mh-search') command is used to initiate either indexed or pick |
| 83 | searches. Within the MH-Search buffer (renamed from MH-Pick), the | ||
| 84 | command `C-c C-p' (`mh-pick-do-search') now runs pick on the given | ||
| 85 | folder recursively and displays the results in a search folder like | ||
| 86 | the other search methods (closes SF #829207). | ||
| 73 | 87 | ||
| 74 | *** Strip Build Number From emacs-version in X-Mailer | 88 | *** Entry Points Have Moved |
| 75 | 89 | ||
| 76 | This has been done (closes SF #1466481). | 90 | Emacs 21 users must now add `(require 'mh-autoloads)' because the |
| 91 | entry points (such as `mh-rmail' and `mh-smail') have moved to | ||
| 92 | different files which have made the autoloads that come with Emacs | ||
| 93 | inaccurate. This change was necessary because the code was reorganized | ||
| 94 | to remove circular dependencies, to make the code more stable and | ||
| 95 | maintainable, and to reduce the time to load MH-E. | ||
| 77 | 96 | ||
| 78 | *** mh-folder-completion-function Problems | 97 | *** MH-Folder Keymap Changes |
| 79 | 98 | ||
| 80 | One could not longer browse folders outside of the standard MH Mail | 99 | There is now a keymap for the printing functions whose prefix is `P'. |
| 81 | directory. This has been fixed. As a beneficial side-effect, you can | 100 | The command `l' (`mh-print-msg') has been replaced with `P l' although |
| 82 | once again use SPC to complete folders (closes SF #1470518). | 101 | we suggest you use the new `P p' instead. |
| 83 | 102 | ||
| 84 | *** Rename Function and Variable Definers | 103 | Key 7.4.4 8.0 |
| 85 | 104 | ||
| 86 | If you had ever shown help for an MH-E symbol that was both a function | 105 | ; - mh-toggle-mh-decode-mime-flag |
| 87 | or variable, you might have found that the hyperlink to the file | 106 | l mh-print-msg - |
| 88 | brought you to the wrong definition. This has been fixed by renaming | 107 | / f mh-narrow-to-from - |
| 89 | the macros `mh-defgroup', `mh-defcustom', `mh-defface', | 108 | / r mh-narrow-to-range - |
| 90 | `mh-defun-compat', and `mh-defmacro-compat' to `defgroup-mh', | 109 | / g - mh-narrow-to-range |
| 91 | `defcustom-mh', `defface-mh', `defun-mh', `defmacro-mh' respectively | 110 | / m - mh-narrow-to-from |
| 92 | (closes SF #1472029). | 111 | F c - mh-catchup |
| 112 | F i mh-index-search - | ||
| 113 | F s mh-search-folder mh-search | ||
| 114 | K e - mh-display-with-external-viewer | ||
| 115 | K t - mh-toggle-mime-buttons | ||
| 116 | P ? - mh-prefix-help | ||
| 117 | P C - mh-ps-print-toggle-color | ||
| 118 | P F - mh-ps-print-toggle-faces | ||
| 119 | P f - mh-ps-print-msg-file | ||
| 120 | P l - mh-print-msg | ||
| 121 | P p - mh-ps-print-msg | ||
| 93 | 122 | ||
| 94 | *** mh-insert-letter Uses Wrong Default | 123 | *** MH-Letter Keymap Changes |
| 95 | 124 | ||
| 96 | If you had used `C-c TAB' (`mh-insert-letter') to insert a letter into | 125 | The change where `mh-letter-mode' derives from `mail-mode' adds a few |
| 97 | your draft, specified a different folder, and chose the default | 126 | keybindings. Some are interesting: experiment! Only the keybinding |
| 98 | message number, you got the wrong message. This has been fixed (closes | 127 | changes for MH-E functions are listed here. |
| 99 | SF #1473729). | ||
| 100 | 128 | ||
| 101 | *** "echo -e" in Makefile Causes Solaris 10 Problem | 129 | Most of the changes have to do with the renaming of the functions with |
| 130 | "mhn" in them to "mh" because nmh doesn't use `mhn'. The names were | ||
| 131 | also made consistent with the the family of "mml" functions. | ||
| 102 | 132 | ||
| 103 | This construct has been replaced with printf, which is reputed to be | 133 | The type of signing or encryption has been generalized so the method |
| 104 | more portable (closes SF #1467222, #1473908). | 134 | is now an option rather than a part of the function's name. The option |
| 135 | is `mh-mml-method-default' and choices include PGP (MIME), PGP, | ||
| 136 | S/MIME, or none. | ||
| 105 | 137 | ||
| 106 | * Changes in MH-E 7.93 | 138 | Key 7.4.4 8.0 |
| 107 | 139 | ||
| 108 | Version 7.93, the fourth 8.0 beta release, fixes a handful of bugs in | 140 | C-c C-e mh-edit-mhn mh-mh-to-mime |
| 109 | searching and limiting exposed during continued beta testing. | 141 | C-c RET C-e mh-mml-secure-message-encrypt-pgpmime |
| 142 | mh-mml-secure-message-encrypt | ||
| 143 | C-c RET C-g - mh-mh-compose-anon-ftp | ||
| 144 | C-c RET C-n - mh-mml-unsecure-message | ||
| 145 | C-c RET C-s mh-mml-secure-message-sign-pgpmime | ||
| 146 | mh-mml-secure-message-sign | ||
| 147 | C-c RET C-t - mh-mh-compose-external-compressed-tar | ||
| 148 | C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo | ||
| 149 | C-c RET C-x - mh-mh-compose-external-type | ||
| 150 | C-c RET e mh-mml-secure-message-encrypt-pgpmime | ||
| 151 | Prefix Command | ||
| 152 | C-c RET e e - mh-mml-secure-message-encrypt | ||
| 153 | C-c RET e s - mh-mml-secure-message-signencrypt | ||
| 154 | C-c RET g - mh-mh-compose-anon-ftp | ||
| 155 | C-c RET n - mh-mml-unsecure-message | ||
| 156 | C-c RET s - Prefix Command | ||
| 157 | C-c RET s e - mh-mml-secure-message-signencrypt | ||
| 158 | C-c RET s s - mh-mml-secure-message-sign | ||
| 159 | C-c RET t - mh-mh-compose-external-compressed-tar | ||
| 160 | C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo | ||
| 161 | C-c RET x - mh-mh-compose-external-type | ||
| 110 | 162 | ||
| 111 | ** Variables Deleted in MH-E 7.93 | 163 | C-c C-f C-a - mh-to-field |
| 164 | C-c C-f C-l - mh-to-field | ||
| 165 | C-c C-f RET - mh-to-field | ||
| 166 | C-c C-f a - mh-to-field | ||
| 167 | C-c C-f l - mh-to-field | ||
| 168 | C-c C-f m - mh-to-field | ||
| 112 | 169 | ||
| 113 | *** mh-show-use-goto-addr-flag | 170 | *** MH-Search Keymap Changes |
| 114 | 171 | ||
| 115 | This flag was redundant and inconsistent with | 172 | These are the changes associated with the new search mode. The command |
| 116 | `goto-address-highlight-p' at the same time, so we removed it. Please | 173 | `C-c C-c' (`mh-index-do-search') now performs the standard indexed |
| 117 | customize `goto-address-highlight-p' if you wish to turn off email | 174 | search, while `C-c C-p' (`mh-pick-do-search') runs pick as before, |
| 118 | address and URL highlighting. | 175 | only better! |
| 119 | 176 | ||
| 120 | ** Bug Fixes in MH-E 7.93 | 177 | The `mh-to-field' keybindings were adjusted to be consistent with |
| 178 | those in the MH-Letter mode. | ||
| 121 | 179 | ||
| 122 | *** `/ s' Can Miss the Original Mail | 180 | Key 7.4.4 8.0 |
| 123 | 181 | ||
| 124 | The command `/ s' failed to include the message with the "Re:" in the | 182 | C-c C-c mh-do-search mh-index-do-search |
| 125 | Subject. This has been fixed (closes SF #1438369). | 183 | C-c C-f C-d mh-to-field - |
| 184 | C-c C-f C-f mh-to-field - | ||
| 185 | C-c C-f C-r mh-to-field - | ||
| 186 | C-c C-f RET - mh-to-field | ||
| 187 | C-c C-f d mh-to-field - | ||
| 188 | C-c C-f f mh-to-field - | ||
| 189 | C-c C-f m - mh-to-field | ||
| 190 | C-c C-f r mh-to-field - | ||
| 191 | C-c TAB mh-index-do-search - | ||
| 126 | 192 | ||
| 127 | *** XEmacs -nw Fails with number-char-or-marker-p Error | 193 | *** Updates to X-Image-URL |
| 128 | 194 | ||
| 129 | Hopefully, this is the last we'll hear of problems associated with | 195 | Now support the use of `curl' and `fetch' as alternatives to `wget' to |
| 130 | XEmacs' incompatible `device-color-cells' function (closes SF | 196 | obtain the image. The display of images are controlled with the |
| 131 | #1436924). | 197 | `mh-show-use-xface-flag' option while the `mh-fetch-x-image-url' |
| 198 | option controls how the images are fetched. | ||
| 132 | 199 | ||
| 133 | *** Pick-based Searches Fail | 200 | The default of `mh-fetch-x-image-url' has been changed to "Never |
| 201 | Fetch." Those of you who like the value of "Ask Before Fetching" will | ||
| 202 | have to customize this option (closes SF #831278). | ||
| 134 | 203 | ||
| 135 | The command `C-c C-p' failed to find any matches. This has been fixed | 204 | WARNING: There are security concerns with this feature. Please read |
| 136 | (closes SF #1435381). | 205 | the documentation for these options carefully before changing the |
| 206 | default. | ||
| 137 | 207 | ||
| 138 | *** Can't Narrow to Subject with Regexp Chars | 208 | *** Updates to mh-identity-list |
| 139 | 209 | ||
| 140 | The command `/ s' could not limit subjects that had special pick | 210 | Note that the field names found in `mh-identity-list' that refer to |
| 141 | characters (such as [, *, $, .). This has been fixed (closes SF | 211 | the fields in `mh-identity-handlers' have changed in an incompatible |
| 142 | #1432548). | 212 | way from 7.4.4. In general, the symbolic names now have a ":" prefix |
| 213 | to avoid collisions with header fields. Before starting Emacs, edit | ||
| 214 | your .emacs and insert ":" before "signature" if you have defined it. | ||
| 143 | 215 | ||
| 144 | 216 | You can change your attribution in replies with the new "Attribution | |
| 217 | Verb" field, and you can set your default GPG user ID with the "GPG | ||
| 218 | key ID" field. | ||
| 145 | 219 | ||
| 146 | * Changes in MH-E 7.92 | 220 | Signatures can now be read from the `mh-signature-file-name' variable, |
| 221 | or come from a function, in addition to a named file. If you write | ||
| 222 | your own function, variables that you can use include | ||
| 223 | `mh-signature-separator-regexp', `mh-signature-separator', | ||
| 224 | and `mh-signature-separator-p'. | ||
| 147 | 225 | ||
| 148 | Version 7.92, the third 8.0 beta release, removes the "sed -i" in the | 226 | The handling of these fields has been moved into a new |
| 149 | Makefile (SF #1432060), tunes the setting of `mh-image-load-path', | 227 | `mh-identity-handlers' option, an alist of fields (strings) and |
| 150 | works around systems that do not have face inheritance, fixes several | 228 | handlers (functions). Strings are lowercase. Use ":signature" for |
| 151 | issues with searching on XEmacs, and creates the correct MIME type | 229 | Signature and ":pgg-default-user-id" for GPG Key ID. The function |
| 152 | when including OpenOffice documents. | 230 | associated with the string "default" is used if no other functions are |
| 231 | appropriate. For this reason, don't name a header field "Default". | ||
| 153 | 232 | ||
| 154 | * Changes in MH-E 7.91 | 233 | If you point your signature at a vCard file with a vcf suffix, then it |
| 234 | will be incorporated as a vCard body part (closes SF #802723). | ||
| 155 | 235 | ||
| 156 | Version 7.91 is the second 8.0 beta release and fixes several bugs | 236 | *** Updates to Speedbar |
| 157 | that were uncovered in wider testing. | ||
| 158 | 237 | ||
| 159 | * Changes in MH-E 7.90 | 238 | The speedbar now renders the folders with unseen messages in boldface |
| 239 | which makes them easier to identify (closes SF #623369). | ||
| 160 | 240 | ||
| 161 | Version 7.90 is the first 8.0 beta release and is a release that has | 241 | *** Updates to mh-msg-is-in-seq |
| 162 | finally broken away from some unfortunate legacy decisions in favor of | ||
| 163 | something that will be easier to use and support. Many bugs were fixed | ||
| 164 | and many features were added, including making the pick search | ||
| 165 | equivalent to the other types of searches. | ||
| 166 | 242 | ||
| 167 | The rewrite of the manual accelerated dramatically in recent months | 243 | Can now specify an alternate message number to `S s' |
| 168 | and drove the changes in this release. In order to make the | 244 | (`mh-msg-is-in-seq') with a prefix argument. |
| 169 | manual--and hence the software--better, clearer, more consistent, more | ||
| 170 | predictable, and easier to understand, many variables and functions | ||
| 171 | were renamed. The changes to the user-visible variables are listed | ||
| 172 | here. It is our hope that you, dear MH-E user, will embrace the | ||
| 173 | changes for the better and forgive us from making so many incompatible | ||
| 174 | changes. | ||
| 175 | 245 | ||
| 176 | If you use undocumented functionality, be sure to read the ChangeLog | 246 | *** Updates to mh-to-field-choices |
| 177 | for changes that might affect you. | ||
| 178 | 247 | ||
| 179 | ** New Features in MH-E 7.90 | 248 | In MH-Letter mode, you can use the `C-c C-f' (`mh-to-field') prefix to |
| 249 | go to and insert fields. The fields `Reply-To:', `Mail-Reply-To:', | ||
| 250 | `Mail-Followup-To:' can now be created via the `C-r', `C-a' (for | ||
| 251 | author), and `C-l' keys respectively. The key for the `From:' field | ||
| 252 | has been renamed from `C-r' to `C-m' for consistency with `mail-mode' | ||
| 253 | (closes SF #1400139). | ||
| 180 | 254 | ||
| 181 | *** Entry Points Have Moved | 255 | *** Change Content-Type Renderer on the Fly in MH-Show Buffer |
| 182 | 256 | ||
| 183 | Emacs 21 users must now add `(require 'mh-autoloads)' because the | 257 | This has been implemented by adding the key binding `K e' |
| 184 | entry points (such as `mh-rmail' and `mh-smail') have moved to | 258 | (`mh-display-with-external-viewer'). For inline text/html parts, |
| 185 | different files which have made the autoloads that come with Emacs | 259 | buttons aren't displayed by default. In that case use `K t' |
| 186 | inaccurate. This change was necessary because the code was reorganized | 260 | (`mh-toggle-mime-buttons') to display the button before viewing it |
| 187 | to remove circular dependencies, to make the code more stable and | 261 | with an external browser (closes SF #839318). |
| 188 | maintainable, and to reduce the time to load MH-E. | ||
| 189 | 262 | ||
| 190 | *** MH-E No Longer Calls install-mh | 263 | *** MH-E No Longer Calls install-mh |
| 191 | 264 | ||
| @@ -193,28 +266,26 @@ The new variant detection code makes use of `mhparam' which assumes | |||
| 193 | that your MH environment has already been set up. The code to call | 266 | that your MH environment has already been set up. The code to call |
| 194 | `install-mh', which could no longer be run anyway, was removed. | 267 | `install-mh', which could no longer be run anyway, was removed. |
| 195 | 268 | ||
| 196 | *** Use run-hook-with-args | 269 | *** Add :package-version Keyword to Options |
| 197 | 270 | ||
| 198 | We use normal hooks whenever possible and do not use | 271 | This `defcustom', `defgroup', and `defface' keyword was introduced in |
| 199 | `run-hook-with-args' (with one documented exception) (closes SF | 272 | Emacs 22.1. MH-E has been extended to take advantage of it. With this |
| 200 | #643702). | 273 | keyword, you can now use `M-x customize-changed-options' to see what |
| 274 | options in MH-E have changed between versions of Emacs. In a future | ||
| 275 | version of Emacs, you'll be able to see changes between MH-E versions | ||
| 276 | as well (closes SF #1452724). | ||
| 201 | 277 | ||
| 202 | *** Merge mh-index.el and mh-pick.el | 278 | *** Render Signature and vCard in Italics |
| 203 | 279 | ||
| 204 | We merged `mh-index.el' and `mh-pick.el' into a new file | 280 | This has been implemented. Use `mh-show-signature-face' to customize |
| 205 | `mh-search.el'. As part of this process, the old `F s' behavior of | 281 | the face used (closes SF #802722). |
| 206 | adding messages to the search sequence has been removed. The `F i' | ||
| 207 | keybinding was then renamed to `F s' (`mh-search'). The mode of the | ||
| 208 | search-pattern buffer was renamed from MH-Pick to MH-Search. Within | ||
| 209 | the MH-Search buffer, the command `C-c C-p' (`mh-pick-do-search') now | ||
| 210 | runs pick on the given folder recursively and displays the results in | ||
| 211 | a search folder like the other search methods (closes SF #829207). | ||
| 212 | 282 | ||
| 213 | *** Improve Security of mh-fetch-x-image-url | 283 | *** Derive mh-letter-mode from mail-mode |
| 214 | 284 | ||
| 215 | The default has been changed to "Never Fetch." Those of you who like | 285 | MH-Letter mode is now derived from `mail-mode'. We were able to delete |
| 216 | the value of "Ask Before Fetching" will have to customize this option | 286 | a lot of code. In return, there are a few `mail-mode' commands that |
| 217 | (closes SF #831278). | 287 | are available that may or may not be useful and the `mail-mode-hook' |
| 288 | is run (closes SF #1385571). | ||
| 218 | 289 | ||
| 219 | *** Remove Emacs 20 Support | 290 | *** Remove Emacs 20 Support |
| 220 | 291 | ||
| @@ -222,100 +293,92 @@ As it turns out, we had already added some code that didn't work on | |||
| 222 | Emacs 20. However, now we've formalized it and removed code that was | 293 | Emacs 20. However, now we've formalized it and removed code that was |
| 223 | present solely for Emacs 20 support (closes SF #1359240). | 294 | present solely for Emacs 20 support (closes SF #1359240). |
| 224 | 295 | ||
| 225 | *** Derive mh-letter-mode from mail-mode | 296 | *** Glimpse Support Removed |
| 226 | |||
| 227 | MH-Letter mode is now derived from `mail-mode'. We were able to delete | ||
| 228 | a lot of code. In return, there are a few `mail-mode' commands that | ||
| 229 | are available that may or may not be useful and the `mail-mode-hook' | ||
| 230 | is run (closes SF #1385571). | ||
| 231 | 297 | ||
| 232 | *** Add Choices to mh-to-field-choices | 298 | Since glimpse isn't free, we cannot mention it. Glimpse has been |
| 299 | removed from the option `mh-indexer-choices' (closes SF #831276). | ||
| 233 | 300 | ||
| 234 | In MH-Letter mode, you can use the "C-c C-f (mh-to-field)" prefix to | 301 | *** Use run-hook-with-args |
| 235 | go to and insert fields. The fields "Reply-To:", "Mail-Reply-To:", | ||
| 236 | "Mail-Followup-To:" can now be created via the "C-r", "C-a" (for | ||
| 237 | author), and "C-l" keys respectively. The key for the "From:" field | ||
| 238 | has been renamed from "C-r" to "C-m" for consistency with `mail-mode' | ||
| 239 | (closes SF #1400139). | ||
| 240 | 302 | ||
| 241 | *** MH-Folder Keymap Changes | 303 | We use normal hooks whenever possible and do not use |
| 304 | `run-hook-with-args' (with one documented exception) (closes SF | ||
| 305 | #643702). | ||
| 242 | 306 | ||
| 243 | The function `mh-ps-print-toggle-mime' was never implemented and the | 307 | |
| 244 | functionality in `mh-ps-print-msg-show' was better afforded by | ||
| 245 | `mh-ps-print-msg' and `mh-ps-print-msg-file'. | ||
| 246 | 308 | ||
| 247 | Key 7.4.85 7.4.90 | 309 | ** New Variables in MH-E 8.0 |
| 248 | 310 | ||
| 249 | F i mh-index-search - | 311 | *** mh-after-commands-processed-hook |
| 250 | F s mh-search-folder mh-search | ||
| 251 | P A mh-ps-print-toggle-mime - | ||
| 252 | P M mh-ps-print-toggle-mime - | ||
| 253 | P s mh-ps-print-msg-show - | ||
| 254 | 312 | ||
| 255 | *** MH-Letter Keymap Changes | 313 | Hook run by `x' (`mh-execute-commands') after performing outstanding |
| 314 | refile and delete requests. | ||
| 256 | 315 | ||
| 257 | The change where `mh-letter-mode' derives from `mail-mode' adds a few | 316 | *** mh-alias-reloaded-hook |
| 258 | keybindings. Some are interesting; experiment! Most of the changes | ||
| 259 | have to do with the renaming of the functions with "mhn" in them to | ||
| 260 | "mh" because nmh doesn't use `mhn'. The names were also made | ||
| 261 | consistent with the the family of "mml" functions. | ||
| 262 | 317 | ||
| 263 | Key 7.4.85 7.4.90 | 318 | Invoked by `mh-alias-reload' after reloading aliases. |
| 264 | 319 | ||
| 265 | C-c C-e mh-edit-mhn mh-mh-to-mime | 320 | *** mh-auto-fields-prompt-flag |
| 266 | C-c C-f C-a - mh-to-field | ||
| 267 | C-c C-f C-l - mh-to-field | ||
| 268 | C-c C-f RET - mh-to-field | ||
| 269 | C-c C-f a - mh-to-field | ||
| 270 | C-c C-f l - mh-to-field | ||
| 271 | C-c C-f m - mh-to-field | ||
| 272 | C-c RET C-g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp | ||
| 273 | C-c RET C-t mh-mhn-compose-external-compressed-tar | ||
| 274 | mh-mh-compose-external-compressed-tar | ||
| 275 | C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo | ||
| 276 | C-c RET C-x mh-mhn-compose-external-type mh-mh-compose-external-type | ||
| 277 | C-c RET g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp | ||
| 278 | C-c RET t mh-mhn-compose-external-compressed-tar | ||
| 279 | mh-mh-compose-external-compressed-tar | ||
| 280 | C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo | ||
| 281 | C-c RET x mh-mhn-compose-external-type mh-mh-compose-external-type | ||
| 282 | 321 | ||
| 283 | *** MH-Search Keymap Changes | 322 | On means to prompt before sending if fields in `mh-auto-fields-list' |
| 323 | are inserted. | ||
| 284 | 324 | ||
| 285 | These are the changes associated with the new search mode. The command | 325 | *** mh-before-commands-processed-hook |
| 286 | `C-c C-c' (`mh-index-do-search') now performs the standard indexed | ||
| 287 | search, while `C-c C-p' (`mh-pick-do-search') runs pick as before, | ||
| 288 | only better! | ||
| 289 | 326 | ||
| 290 | Key 7.4.85 7.4.90 | 327 | Renamed from `mh-folder-updated-hook'. It wasn't clear whether |
| 328 | `mh-folder-updated-hook' was run before or after the commands were | ||
| 329 | executed. We now provide both with clear names. | ||
| 291 | 330 | ||
| 292 | C-c C-c mh-do-search mh-index-do-search | 331 | *** mh-compose-forward-as-mime-flag |
| 293 | C-c TAB mh-index-do-search - | ||
| 294 | 332 | ||
| 295 | ** New Variables in MH-E 7.90 | 333 | On means that messages are forwarded as attachments (closes SF |
| 334 | #827203). | ||
| 296 | 335 | ||
| 297 | *** mh-after-commands-processed-hook | 336 | *** mh-default-folder-for-message-function |
| 298 | 337 | ||
| 299 | Hook run by `x' (`mh-execute-commands') after performing outstanding | 338 | Function to select a default folder for refiling or `Fcc:'. |
| 300 | refile and delete requests. | ||
| 301 | 339 | ||
| 302 | *** mh-before-commands-processed-hook | 340 | *** mh-forward-hook |
| 303 | 341 | ||
| 304 | Renamed from `mh-folder-updated-hook'. It wasn't clear whether | 342 | Invoked on the forwarded letter by `f' (`mh-forward'). |
| 305 | `mh-folder-updated-hook' was run before or after the commands were | ||
| 306 | executed. We now provide both with clear names. | ||
| 307 | 343 | ||
| 308 | *** mh-highlight-citation-style | 344 | *** mh-highlight-citation-style |
| 309 | 345 | ||
| 310 | Renamed from `mh-highlight-citation-p' since it wasn't a boolean. The | 346 | Renamed from `mh-highlight-citation-p' since it wasn't a boolean. The |
| 311 | new name is also more descriptive. | 347 | new name is also more descriptive. |
| 312 | 348 | ||
| 349 | *** mh-identity-handlers | ||
| 350 | |||
| 351 | Handler functions for fields in `mh-identity-list'. | ||
| 352 | |||
| 313 | *** mh-insert-signature-hook | 353 | *** mh-insert-signature-hook |
| 314 | 354 | ||
| 315 | Renamed from `mh-letter-insert-signature-hook' since most of the other | 355 | Renamed from `mh-letter-insert-signature-hook' since most of the other |
| 316 | hooks do not carry the mode in the prefix and because the new name is | 356 | hooks do not carry the mode in the prefix and because the new name is |
| 317 | equally clear. | 357 | equally clear. |
| 318 | 358 | ||
| 359 | *** mh-invisible-header-fields-default | ||
| 360 | |||
| 361 | List of hidden header fields. The header fields listed in this option | ||
| 362 | are hidden, although you can check off any field that you would like | ||
| 363 | to see. Header fields that you would like to hide that aren't listed | ||
| 364 | can be added to the `mh-invisible-header-fields' option (closes SF | ||
| 365 | #752045). | ||
| 366 | |||
| 367 | The option `mh-visible-header-fields' has been deleted. | ||
| 368 | |||
| 369 | *** mh-junk-background | ||
| 370 | |||
| 371 | If on, spam programs are run in background. This used to be the | ||
| 372 | default behavior but this could overwhelm a system if many messages | ||
| 373 | were black- or whitelisted at once. The spam programs are now run in | ||
| 374 | the foreground, but this option can be used to put them back in the | ||
| 375 | background. | ||
| 376 | |||
| 377 | *** mh-junk-disposition | ||
| 378 | |||
| 379 | Renamed from `mh-junk-mail-folder' since this variable can accept | ||
| 380 | values other than folder names. | ||
| 381 | |||
| 319 | *** mh-kill-folder-suppress-prompt-hooks | 382 | *** mh-kill-folder-suppress-prompt-hooks |
| 320 | 383 | ||
| 321 | Renamed from `mh-kill-folder-suppress-prompt-hook'. By convention, | 384 | 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' | |||
| 333 | functions and variables; the older mhn functions and variables were | 396 | functions and variables; the older mhn functions and variables were |
| 334 | renamed to have a consistent `mh-mh-to-mime' prefix. | 397 | renamed to have a consistent `mh-mh-to-mime' prefix. |
| 335 | 398 | ||
| 399 | *** mh-mml-method-default | ||
| 400 | |||
| 401 | Default method to use in security tags. | ||
| 402 | |||
| 336 | *** mh-new-messages-folders | 403 | *** mh-new-messages-folders |
| 337 | 404 | ||
| 338 | Renamed from `mh-index-new-messages-folders' for clarity. | 405 | Renamed from `mh-index-new-messages-folders' for clarity. |
| @@ -356,6 +423,14 @@ Renamed from `mh-pick-mode-hook' as part of the | |||
| 356 | Renamed from `mh-index-program' as part of the | 423 | Renamed from `mh-index-program' as part of the |
| 357 | `mh-index.el'/`mh-pick.el' merge into `mh-search.el'. | 424 | `mh-index.el'/`mh-pick.el' merge into `mh-search.el'. |
| 358 | 425 | ||
| 426 | *** mh-signature-separator-flag | ||
| 427 | |||
| 428 | On means a signature separator should be inserted. It is not | ||
| 429 | recommended that you change this option since various mail user | ||
| 430 | agents, including MH-E, use the separator to present the signature | ||
| 431 | differently, and to suppress the signature when replying or yanking a | ||
| 432 | letter into a draft. | ||
| 433 | |||
| 359 | *** mh-sortm-args | 434 | *** mh-sortm-args |
| 360 | 435 | ||
| 361 | Additional arguments for `sortm'. This was previously an internal | 436 | Additional arguments for `sortm'. This was previously an internal |
| @@ -369,6 +444,25 @@ Renamed from `mh-speed-flists-interval' for clarity. | |||
| 369 | 444 | ||
| 370 | Renamed from `mh-index-ticked-messages-folders' for clarity. | 445 | Renamed from `mh-index-ticked-messages-folders' for clarity. |
| 371 | 446 | ||
| 447 | *** mh-variant | ||
| 448 | |||
| 449 | Specifies the variant used by MH-E. The default setting of this option | ||
| 450 | is `Auto-detect' which means that MH-E will automatically choose the | ||
| 451 | first of nmh, MH, or GNU mailutils that it finds in the directories | ||
| 452 | listed in `mh-path', `mh-sys-path', and `exec-path'. If, for example, | ||
| 453 | you have both nmh and mailutils installed and `mh-variant-in-use' was | ||
| 454 | initialized to nmh but you want to use mailutils, then you can set | ||
| 455 | this option to `mailutils'. | ||
| 456 | |||
| 457 | When this variable is changed, MH-E resets `mh-progs', `mh-lib', | ||
| 458 | `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use' | ||
| 459 | accordingly. | ||
| 460 | |||
| 461 | If you've set these variables in your .emacs, it is strongly suggested | ||
| 462 | that you comment them out. The MH detection code has been completely | ||
| 463 | rewritten and it is very likely that you no longer to set them and | ||
| 464 | their setting may confuse other MH-E settings. | ||
| 465 | |||
| 372 | *** mh-xemacs-tool-bar-position | 466 | *** mh-xemacs-tool-bar-position |
| 373 | 467 | ||
| 374 | Renamed from `mh-xemacs-toolbar-position' per GNU Emacs naming conventions. | 468 | 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. | |||
| 381 | 475 | ||
| 382 | Renamed from `mh-yank-from-start-of-msg' for clarity. | 476 | Renamed from `mh-yank-from-start-of-msg' for clarity. |
| 383 | 477 | ||
| 384 | ** Variables Deleted in MH-E 7.90 | 478 | |
| 385 | 479 | ||
| 386 | *** mail-citation-hook | 480 | ** Variables Deleted in MH-E 8.0 |
| 387 | 481 | ||
| 388 | This is already defined in `sendmail.el'. | 482 | *** mh-alias-system-aliases |
| 483 | |||
| 484 | System definitions should not be a user option. | ||
| 389 | 485 | ||
| 390 | *** mh-edit-mhn-hook | 486 | *** mh-edit-mhn-hook |
| 391 | 487 | ||
| @@ -411,6 +507,11 @@ Renamed to `mh-search-program'. | |||
| 411 | 507 | ||
| 412 | Renamed to `mh-ticked-messages-folders'. | 508 | Renamed to `mh-ticked-messages-folders'. |
| 413 | 509 | ||
| 510 | *** mh-junk-mail-folder | ||
| 511 | |||
| 512 | Since this variable can accept values other than folder names, it was | ||
| 513 | renamed to `mh-junk-disposition' to more accurately reflect the content. | ||
| 514 | |||
| 414 | *** mh-kill-folder-suppress-prompt-hook | 515 | *** mh-kill-folder-suppress-prompt-hook |
| 415 | 516 | ||
| 416 | Renamed to `mh-kill-folder-suppress-prompt-hooks'. | 517 | Renamed to `mh-kill-folder-suppress-prompt-hooks'. |
| @@ -419,14 +520,17 @@ Renamed to `mh-kill-folder-suppress-prompt-hooks'. | |||
| 419 | 520 | ||
| 420 | Renamed to `mh-insert-signature-hook'. | 521 | Renamed to `mh-insert-signature-hook'. |
| 421 | 522 | ||
| 422 | *** mhl-formfile | ||
| 423 | |||
| 424 | Renamed to `mh-mhl-format-file'. | ||
| 425 | |||
| 426 | *** mh-pick-mode-hook | 523 | *** mh-pick-mode-hook |
| 427 | 524 | ||
| 428 | Renamed to `mh-search-mode-hook'. | 525 | Renamed to `mh-search-mode-hook'. |
| 429 | 526 | ||
| 527 | *** mh-show-use-goto-addr-flag | ||
| 528 | |||
| 529 | This flag was redundant with and inconsistent with | ||
| 530 | `goto-address-highlight-p' at the same time, so we removed it. Please | ||
| 531 | customize `goto-address-highlight-p' if you wish to turn off email | ||
| 532 | address and URL highlighting. | ||
| 533 | |||
| 430 | *** mh-speed-flists-interval | 534 | *** mh-speed-flists-interval |
| 431 | 535 | ||
| 432 | Renamed to `mh-speed-update-interval'. | 536 | Renamed to `mh-speed-update-interval'. |
| @@ -436,6 +540,10 @@ Renamed to `mh-speed-update-interval'. | |||
| 436 | Deleted since setting `mh-speed-flists-interval' to 0 accomplishes the | 540 | Deleted since setting `mh-speed-flists-interval' to 0 accomplishes the |
| 437 | same thing. | 541 | same thing. |
| 438 | 542 | ||
| 543 | *** mh-visible-header-fields | ||
| 544 | |||
| 545 | Deleted since it would hide new header fields you might want to see. | ||
| 546 | |||
| 439 | *** mh-xemacs-toolbar-position | 547 | *** mh-xemacs-toolbar-position |
| 440 | 548 | ||
| 441 | Renamed to `mh-xemacs-tool-bar-position'. | 549 | Renamed to `mh-xemacs-tool-bar-position'. |
| @@ -448,538 +556,263 @@ Renamed to `mh-xemacs-use-tool-bar-flag'. | |||
| 448 | 556 | ||
| 449 | Renamed to `mh-yank-behavior'. | 557 | Renamed to `mh-yank-behavior'. |
| 450 | 558 | ||
| 451 | ** Bug Fixes in MH-E 7.90 | 559 | *** mhl-formfile |
| 452 | |||
| 453 | *** Error Message When Trying to Send Using MH-E | ||
| 454 | |||
| 455 | This behavior is no longer observed (closes SF #1002103). | ||
| 456 | |||
| 457 | *** "Args out of range" Error in Displaying Message | ||
| 458 | |||
| 459 | This behavior is no longer observed (closes SF #1227504). | ||
| 460 | |||
| 461 | *** Front-and-back Truncation in mailto: Rendering | ||
| 462 | |||
| 463 | This behavior is no longer observed (closes SF #1227510). | ||
| 464 | |||
| 465 | *** Completions Offered by mh-refile-message Are Not Sorted | ||
| 466 | |||
| 467 | This behavior is no longer observed (closes SF #698734). | ||
| 468 | |||
| 469 | *** Add Message-ID to Outgoing Messages | ||
| 470 | |||
| 471 | If you replied to a message in your `+outbox', an `In-Reply-To:' | ||
| 472 | header field was created that broke threading at the recipient's end. | ||
| 473 | We now add a `Message-ID:' to outgoing messages which fixes this | ||
| 474 | (closes SF #725425). | ||
| 475 | |||
| 476 | *** Speedbar Creating New Folders Instead of Visiting Existing | ||
| 477 | |||
| 478 | This was actually fixed in 7.4.3 (closes SF #792300). | ||
| 479 | |||
| 480 | *** Args Out of Range | ||
| 481 | |||
| 482 | This compilation error was actually fixed in 7.4.3 (closes SF | ||
| 483 | #806577). | ||
| 484 | |||
| 485 | *** Initialization Fails If ~/Mail Exists | ||
| 486 | |||
| 487 | MH-E no longer calls `install-mh' so this issue has gone away (closes | ||
| 488 | SF #835192). | ||
| 489 | |||
| 490 | *** RETURN Causes Infinite Loop in mh-letter | ||
| 491 | |||
| 492 | This behavior is no longer observed (closes SF #887346). | ||
| 493 | |||
| 494 | *** Missing Headers When Replying to All | ||
| 495 | |||
| 496 | User needed to edit `replgroupcomps' (closes SF #918194). | ||
| 497 | |||
| 498 | *** mh-find-path Doesn't Use mhparam | ||
| 499 | |||
| 500 | MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It | ||
| 501 | uses `mhparam' instead (closes SF #1016027). | ||
| 502 | |||
| 503 | *** mh-index-previous-folder Does Not Work Correctly | ||
| 504 | |||
| 505 | If your cursor was on an item below a folder heading and you used | ||
| 506 | `M-TAB' (`mh-index-previous-folder'), you would move to the previous | ||
| 507 | folder heading. This has been fixed (closes SF #1126188). | ||
| 508 | |||
| 509 | *** XEmacs Compile Fails | ||
| 510 | 560 | ||
| 511 | Compiling produced a "Symbol's value as variable is void: require" | 561 | Renamed to `mh-mhl-format-file'. |
| 512 | error on all files. This has been fixed. As a bonus, warnings have | ||
| 513 | been reduced from hundreds to just a few (closes SF #1127595). | ||
| 514 | 562 | ||
| 515 | *** buffer-offer-save Permanent Local | 563 | |
| 516 | 564 | ||
| 517 | There was a movement to make `buffer-offer-save' a permanent local | 565 | ** New Faces in MH-E 8.0 |
| 518 | which would have meant that we could not set it in `mh-letter-mode'. | ||
| 519 | However, this movement was fraught with issues and was postponed | ||
| 520 | (closes SF #1184756). | ||
| 521 | 566 | ||
| 522 | *** Better Handling of Empty cur Sequence | 567 | *** mh-folder-address |
| 523 | 568 | ||
| 524 | If you refiled a message into a folder and then used `F r' | 569 | Renamed from `mh-folder-address-face' per new Emacs conventions. |
| 525 | (`mh-rescan-folder') in that folder, your cursor would be taken to the | ||
| 526 | first message. The cursor now stays where it was (closes SF #1207247). | ||
| 527 | 570 | ||
| 528 | *** Name of the Draft File in mh-comp.el | 571 | *** mh-folder-body |
| 529 | 572 | ||
| 530 | MH is documented to use the draft file. If you use a draft file for | 573 | Renamed from `mh-folder-body-face' per new Emacs conventions. |
| 531 | something else (like Sylpheed), then use draft folders (closes SF | ||
| 532 | #1231483). | ||
| 533 | 574 | ||
| 534 | *** Use Standard Default Notation in Prompts | 575 | *** mh-folder-cur-msg-number |
| 535 | 576 | ||
| 536 | Emacs changed their defaults in prompts from "Prompt: [value]" to | 577 | Renamed from `mh-folder-cur-msg-number-face' per new Emacs conventions. |
| 537 | "Prompt (default value): ". All MH-E prompts have been updated to | ||
| 538 | comply with the new standard (closes SF #1275933). | ||
| 539 | 578 | ||
| 540 | *** Msg Display Broken After Displaying Msg with Inline Image | 579 | *** mh-folder-date |
| 541 | 580 | ||
| 542 | Messages with inline images no longer trim certain message header | 581 | Renamed from `mh-folder-date-face' per new Emacs conventions. |
| 543 | fields (closes SF #1306141). | ||
| 544 | 582 | ||
| 545 | *** mh-visit-folder Munges font-lock-keywords | 583 | *** mh-folder-deleted |
| 546 | 584 | ||
| 547 | MH-E broke highlighting in Gnus buffers. This was actually a problem | 585 | Renamed from `mh-folder-deleted-face' per new Emacs conventions. |
| 548 | in CVS Emacs 22 and has been fixed there (closes SF #1393879). | ||
| 549 | 586 | ||
| 550 | *** Illegal Filename Chars for W32 Filesystems | 587 | *** mh-folder-followup |
| 551 | 588 | ||
| 552 | Windows users who view `X-Image-URL:' images could not cache the | 589 | Renamed from `mh-folder-followup-face' per new Emacs conventions. |
| 553 | images since the cached image file names had illegal characters. This | ||
| 554 | has been fixed (closes SF #1396499). | ||
| 555 | 590 | ||
| 556 | *** mh-send Doesn't Handle mml Insertions Via mail-user-agent | 591 | *** mh-folder-msg-number |
| 557 | 592 | ||
| 558 | Can now forward messages in Gnus if MH-E is your `mail-user-agent' | 593 | Renamed from `mh-folder-msg-number-face' per new Emacs conventions. |
| 559 | (closes SF #1399307). | ||
| 560 | 594 | ||
| 561 | 595 | *** mh-folder-refiled | |
| 562 | 596 | ||
| 563 | * Changes in MH-E 7.85 | 597 | Renamed from `mh-folder-refiled-face' per new Emacs conventions. |
| 564 | 598 | ||
| 565 | Version 7.85 heralds a migration of the CVS repository from | 599 | *** mh-folder-sent-to-me-hint |
| 566 | SourceForge to Savannah only for those files that were already part of | ||
| 567 | Emacs. As a result, two incompatibilities were introduced with this | ||
| 568 | release: the location of MH-E in the load-path has changed, and | ||
| 569 | mh-e-autoloads.el was renamed to mh-autoloads.el. While this migration | ||
| 570 | will benefit maintainers, it will also benefit users: CVS Emacs users | ||
| 571 | will not have to check out MH-E separately and welcome faster MH-E | ||
| 572 | updates, and CVS MH-E users will welcome faster MH-E updates from | ||
| 573 | Emacs developers. Read section CVS MH-E INSTALL in the README for | ||
| 574 | details. | ||
| 575 | 600 | ||
| 576 | MH-E now works on a Mac. See section INSTALL in the README for details. | 601 | Fontification hint face in messages sent directly to us. |
| 577 | 602 | ||
| 578 | ** Bug Fixes in MH-E 7.85 | 603 | *** mh-folder-sent-to-me-sender |
| 579 | 604 | ||
| 580 | *** Prompts Now Follow Current Conventions | 605 | Sender face in messages sent directly to us. |
| 581 | 606 | ||
| 582 | Instead of "Prompt: [<default>] ", the prompts now look like "Prompt | 607 | *** mh-folder-subject |
| 583 | (default: <default>): ". | ||
| 584 | 608 | ||
| 585 | *** Face Variable Names Now Follow Current Conventions | 609 | Renamed from `mh-folder-subject-face' per new Emacs conventions. |
| 586 | 610 | ||
| 587 | The -face suffix has been dropped from all face names. | 611 | *** mh-folder-tick |
| 588 | 612 | ||
| 589 | *** Default Identity Prevents Insertion of Auto Fields | 613 | Renamed from `mh-folder-tick-face' per new Emacs conventions. |
| 590 | 614 | ||
| 591 | Auto insertion of an identity now occurs even when the default | 615 | *** mh-folder-to |
| 592 | identity is used (closes SF #1204506). | ||
| 593 | 616 | ||
| 594 | *** mh-compose-forward and Default Message Number | 617 | Renamed from `mh-folder-to-face' per new Emacs conventions. |
| 595 | 618 | ||
| 596 | mh-compose-forward will now default to the sent message in the sent | 619 | *** mh-letter-header-field |
| 597 | folder and the `cur' message in other folders. It also takes ranges of | ||
| 598 | messages and can include multiple messages at a time (closes SF | ||
| 599 | #1205890). | ||
| 600 | 620 | ||
| 601 | *** mh-customize Uses Group mh, Not mh-e | 621 | Renamed from `mh-letter-header-field-face' per new Emacs conventions. |
| 602 | 622 | ||
| 603 | The `mh' customization group alias has been deleted to avoid some | 623 | *** mh-search-folder |
| 604 | problems that were found (closes SF #1213716). | ||
| 605 | 624 | ||
| 606 | *** font-lock Error in mh-letter-mode | 625 | Renamed from `mh-index-folder-face'. |
| 607 | 626 | ||
| 608 | An error in MH-E was introduced as a result of a change in CVS Emacs. | 627 | *** mh-show-cc |
| 609 | This has been fixed (closes SF #1241017). | ||
| 610 | 628 | ||
| 611 | 629 | Renamed from `mh-show-cc-face' per new Emacs conventions. | |
| 612 | 630 | ||
| 613 | * Changes in MH-E 7.84 | 631 | *** mh-show-date |
| 614 | 632 | ||
| 615 | Version 7.84 contains no user-visible changes. This version | 633 | Renamed from `mh-show--face' per new Emacs conventions. |
| 616 | incorporates changes made in CVS Emacs such as the removal of some | ||
| 617 | deprecated software. | ||
| 618 | 634 | ||
| 619 | * Changes in MH-E 7.83 | 635 | *** mh-show-from |
| 620 | 636 | ||
| 621 | Version 7.83 fixes a handful of bugs, adds colors to buttons for | 637 | Renamed from `mh-show-from-face' per new Emacs conventions. |
| 622 | signed or encrypted messages, and contains some documentation changes | ||
| 623 | related to the upcoming release of the manual. Some options were moved | ||
| 624 | to other customization groups as a result. | ||
| 625 | 638 | ||
| 626 | While not related to this release, the MH-E mailing lists are now | 639 | *** mh-show-header |
| 627 | gatewayed at gmane.org (closes SF #979308). | ||
| 628 | 640 | ||
| 629 | ** New Variables in MH-E 7.83 | 641 | Renamed from `mh-show-header-face' per new Emacs conventions. |
| 630 | 642 | ||
| 631 | *** mh-show-pgg-bad-face | 643 | *** mh-show-pgg-bad |
| 632 | 644 | ||
| 633 | Face used to highlight a bad PGG signature. | 645 | Face used to highlight a bad PGG signature. |
| 634 | 646 | ||
| 635 | *** mh-show-pgg-good-face | 647 | *** mh-show-pgg-good |
| 636 | 648 | ||
| 637 | Face used to highlight a good PGG signature. | 649 | Face used to highlight a good PGG signature. |
| 638 | 650 | ||
| 639 | *** mh-show-pgg-unknown-face | 651 | *** mh-show-pgg-unknown |
| 640 | 652 | ||
| 641 | Face used to highlight a PGG signature whose status is unknown. This | 653 | Face used to highlight a PGG signature whose status is unknown. This |
| 642 | face is also used for a signature when the signer is untrusted. | 654 | face is also used for a signature when the signer is untrusted. |
| 643 | 655 | ||
| 644 | ** Bug Fixes in MH-E 7.83 | 656 | *** mh-show-signature |
| 645 | 657 | ||
| 646 | *** Whitespace in pick Expressions | 658 | Face used to highlight the signature. |
| 647 | 659 | ||
| 648 | The "C-u / s RET" command now works. In addition, you can now add | 660 | *** mh-show-subject |
| 649 | whitespace to any of the limiting (/) commands (closes SF #1122655). | ||
| 650 | 661 | ||
| 651 | *** auto-mode-alist Updated | 662 | Renamed from `mh-show-subject-face' per new Emacs conventions. |
| 652 | 663 | ||
| 653 | MH-E originally updated auto-mode-alist to set the major mode of | 664 | *** mh-show-to |
| 654 | drafts. Now that we explicitly set the mode, there is no reason to do | ||
| 655 | this, and this behavior caused problems for people who didn't use MH-E | ||
| 656 | who were editing files that looked like MH message files (closes SF | ||
| 657 | #1032353). | ||
| 658 | 665 | ||
| 659 | *** mh-show-unquote-From Fails (read-only buffer) | 666 | Renamed from `mh-show-to-face' per new Emacs conventions. |
| 660 | 667 | ||
| 661 | MH-E quotes the "From " header field that is inserted by MTAs. | 668 | *** mh-show-xface |
| 662 | However, it was trying to do this in a read-only buffer. This has been | ||
| 663 | fixed (closes SF #1089870). | ||
| 664 | 669 | ||
| 665 | *** rmmproc Refile Complains No Such Message | 670 | Renamed from `mh-show-xface-face' per new Emacs conventions. |
| 666 | 671 | ||
| 667 | MH-E would get confused about which folder to delete messages from if | 672 | *** mh-speedbar-folder |
| 668 | you were refiling and deleting messages at the same time. This has | ||
| 669 | been fixed (closes SF #1023959). | ||
| 670 | 673 | ||
| 671 | *** ! Doesn't Do Regions | 674 | Renamed from `mh-speedbar-folder-face' per new Emacs conventions. |
| 672 | 675 | ||
| 673 | Now it does (closes SF #1046330). | 676 | *** mh-speedbar-folder-with-unseen-messages |
| 674 | 677 | ||
| 675 | *** Swish Fixes | 678 | Renamed from `mh-speedbar-folder-with-unseen-messages-face' per new |
| 679 | Emacs conventions. | ||
| 676 | 680 | ||
| 677 | Items in swish indexes that aren't mail messages are now handled more | 681 | *** mh-speedbar-selected-folder |
| 678 | gracefully. | ||
| 679 | 682 | ||
| 680 | *** Spamassassin Fixes | 683 | Renamed from `mh-speedbar-selected-folder-face' per new Emacs conventions. |
| 681 | |||
| 682 | If you use spamassassin, there was an error when you tried to junk | ||
| 683 | mail if the option mh-junk-background was set. This has been fixed. | ||
| 684 | 684 | ||
| 685 | *** Mairix Support | 685 | *** mh-speedbar-selected-folder-with-unseen-messages |
| 686 | 686 | ||
| 687 | Indexing now compatible with Mairix version 0.12 and later. | 687 | Renamed from `mh-speedbar-selected-folder-with-unseen-messages-face' |
| 688 | per new Emacs conventions. | ||
| 688 | 689 | ||
| 689 | 690 | ||
| 690 | 691 | ||
| 691 | * Changes in MH-E 7.82 | 692 | ** Faces Deleted in MH-E 8.0 |
| 692 | 693 | ||
| 693 | Version 7.82 continues to address the saga surrounding the use of CL | 694 | *** mh-folder-address-face |
| 694 | macros in CVS Emacs and fixes the auto-detection of vanilla MH (closes | ||
| 695 | SF #1014781). | ||
| 696 | 695 | ||
| 697 | * Changes in MH-E 7.81 | 696 | Renamed to `mh-folder-address' per new Emacs conventions. |
| 698 | 697 | ||
| 699 | Version 7.81 fixes a `wrong-type-argument' argument error that | 698 | *** mh-folder-body-face |
| 700 | sometimes occurred when processing the Message-ID, adds the "; | ||
| 701 | (mh-toggle-mh-decode-mime-flag)" command, and uses ":default" instead | ||
| 702 | of "default" in `mh-identity-handlers' to avoid problems with | ||
| 703 | "Default:" as a user defined field. If you have modified | ||
| 704 | `mh-identity-handlers' in your .emacs, you'll need to rename "default" | ||
| 705 | to ":default". This release also corrects the release numbering; the | ||
| 706 | previous version number was intended to be 7.80. | ||
| 707 | 699 | ||
| 708 | 700 | Renamed to `mh-folder-body' per new Emacs conventions. | |
| 709 | 701 | ||
| 710 | * Changes in MH-E 7.4.80 | 702 | *** mh-folder-cur-msg-face |
| 711 | |||
| 712 | Version 7.4.80 now supports GNU mailutils, S/MIME, picons, | ||
| 713 | which-func-mode, has an improved interface for hiding header fields, | ||
| 714 | improves upon the MH variant detection, and contains many bug fixes. | ||
| 715 | Those of you familiar with the GNU version numbering schemes will | ||
| 716 | recognize this as an alpha release. This does not reflect on the | ||
| 717 | quality of this release which is as high as it has always been. | ||
| 718 | Although we are not ready to release 8.0, we want you to have access | ||
| 719 | to the work that has been hiding in CVS. At the same time we want to | ||
| 720 | make it clear that there are incompatible changes with previous | ||
| 721 | versions. | ||
| 722 | |||
| 723 | We are planning to release the long-awaited manual update synchronized | ||
| 724 | with version 8.0. We are using documentation from the manual in the | ||
| 725 | docstrings which is hoped to make "C-h f (describe-function)" really | ||
| 726 | useful and create a seamless experience when switching back and forth | ||
| 727 | between the manual and the docstrings. This has been done in about | ||
| 728 | half of the variables and functions in this version. | ||
| 729 | |||
| 730 | The writing of the manual has revealed a few inconsistencies in the | ||
| 731 | software whose fixes have resulted in incompatible changes, and there | ||
| 732 | may well be more. So, unlike version 7 which was chock full of new | ||
| 733 | features, version 8's strengths will include complete documentation | ||
| 734 | and higher quality. | ||
| 735 | |||
| 736 | ** New Features in MH-E 7.4.80 | ||
| 737 | 703 | ||
| 738 | *** GNU mailutils Support | 704 | Deleted. Not used. |
| 739 | 705 | ||
| 740 | MH-E now supports GNU mailutils 0.4 and higher versions. | 706 | *** mh-folder-cur-msg-number-face |
| 741 | 707 | ||
| 742 | *** S/MIME Support | 708 | Renamed to `mh-folder-cur-msg-number' per new Emacs conventions. |
| 743 | 709 | ||
| 744 | MH-E now supports S/MIME using Gnus 5.10.6 or higher. | 710 | *** mh-folder-date-face |
| 745 | 711 | ||
| 746 | *** Picon Support | 712 | Renamed to `mh-folder-date' per new Emacs conventions. |
| 747 | 713 | ||
| 748 | In addition to the other methods of displaying an icon for the sender | 714 | *** mh-folder-deleted-face |
| 749 | of a message, MH-E can now display images from a picon directory. The | ||
| 750 | directory search path is found in the `mh-picon-directory-list' | ||
| 751 | variable. More documentation is found in the "facedb" sections in the | ||
| 752 | xfaces man page. [NOTE: need to make mh-picon-directory-list an option | ||
| 753 | and add xfaces facedb documentation to it.] | ||
| 754 | 715 | ||
| 755 | *** X-Image-URL Updates | 716 | Renamed to `mh-folder-deleted' per new Emacs conventions. |
| 756 | 717 | ||
| 757 | Now support the use of `curl' and `fetch' as alternatives to `wget' to | 718 | *** mh-folder-followup-face |
| 758 | obtain the image. The display of images are controlled with the | ||
| 759 | `mh-show-use-xface-flag' option while the `mh-fetch-x-image-url' | ||
| 760 | option controls how the images are fetched. | ||
| 761 | 719 | ||
| 762 | WARNING: There are security concerns with this feature. Please read | 720 | Renamed to `mh-folder-followup' per new Emacs conventions. |
| 763 | the documentation for these options carefully before changing the | ||
| 764 | default. | ||
| 765 | 721 | ||
| 766 | *** Updates to mh-identity-list | 722 | *** mh-folder-msg-number-face |
| 767 | 723 | ||
| 768 | Note that the field names found in `mh-identity-list' that refer to | 724 | Renamed to `mh-folder-msg-number' per new Emacs conventions. |
| 769 | the fields in `mh-identity-handlers' have changed in an incompatible | ||
| 770 | way from 7.4.4. In general, the symbolic names now have a ":" prefix | ||
| 771 | to avoid collisions with header fields. Before starting Emacs, edit | ||
| 772 | your .emacs and insert ":" before "signature" if you have defined it. | ||
| 773 | 725 | ||
| 774 | You can change your attribution in replies with the new "Attribution | 726 | *** mh-folder-refiled-face |
| 775 | Verb" field, and you can set your default GPG user ID with the "GPG | ||
| 776 | key ID" field. | ||
| 777 | 727 | ||
| 778 | Signatures can now be read from the `mh-signature-file-name' variable, | 728 | Renamed to `mh-folder-refiled' per new Emacs conventions. |
| 779 | or come from a function, in addition to a named file. If you write | ||
| 780 | your own function, variables that you can use include | ||
| 781 | `mh-signature-separator-regexp', `mh-signature-separator', | ||
| 782 | and `mh-signature-separator-p'. | ||
| 783 | 729 | ||
| 784 | The handling of these fields has been moved into a new | 730 | *** mh-folder-subject-face |
| 785 | `mh-identity-handlers' option, an alist of fields (strings) and | ||
| 786 | handlers (functions). Strings are lowercase. Use ":signature" for | ||
| 787 | Signature and ":pgg-default-user-id" for GPG Key ID. The function | ||
| 788 | associated with the string "default" is used if no other functions are | ||
| 789 | appropriate. For this reason, don't name a header field "Default". | ||
| 790 | 731 | ||
| 791 | If you point your signature at a vCard file with a vcf suffix, then it | 732 | Renamed to `mh-folder-subject' per new Emacs conventions. |
| 792 | will be incorporated as a vCard body part (closes SF #802723). | ||
| 793 | 733 | ||
| 794 | *** Catchup Command | 734 | *** mh-folder-tick-face |
| 795 | 735 | ||
| 796 | There is a new "F c (mh-catchup)" command that marks all unread | 736 | Renamed to `mh-folder-tick' per new Emacs conventions. |
| 797 | messages in the current folder as read. | ||
| 798 | 737 | ||
| 799 | *** Change Content-Type Renderer on the Fly in MH-Show Buffer | 738 | *** mh-folder-to-face |
| 800 | 739 | ||
| 801 | This has been implemented by adding the key binding "K e | 740 | Renamed to `mh-folder-to' per new Emacs conventions. |
| 802 | (mh-display-with-external-viewer)". For inline text/html parts, | ||
| 803 | buttons aren't displayed by default. In that case use "K t | ||
| 804 | (mh-toggle-mime-buttons)" to display the button before viewing it with | ||
| 805 | an external browser (closes SF #839318). | ||
| 806 | 741 | ||
| 807 | *** Use which-func-mode to Display Folder in Index Mode | 742 | *** mh-index-folder-face |
| 808 | 743 | ||
| 809 | Turning on `which-func-mode' displays the folder name of the message | 744 | Renamed to `mh-search-folder'. |
| 810 | under the cursor in index folders (closes SF #855520). | ||
| 811 | |||
| 812 | *** Render Signature and vCard in Italics | ||
| 813 | |||
| 814 | This has been implemented. Use `mh-show-signature-face' to customize | ||
| 815 | the face used (closes SF #802722). | ||
| 816 | 745 | ||
| 817 | *** New Print Map | 746 | *** mh-letter-header-field-face |
| 818 | 747 | ||
| 819 | There is now a keymap for the printing functions whose prefix is "P". | 748 | Renamed to `mh-letter-header-field' per new Emacs conventions. |
| 820 | The command "l (mh-print-msg)" has been replaced with "P l". Other new | ||
| 821 | functions in this keymap include: | ||
| 822 | 749 | ||
| 823 | P A mh-ps-print-toggle-mime | 750 | *** mh-show-cc-face |
| 824 | P C mh-ps-print-toggle-color | ||
| 825 | P F mh-ps-print-toggle-faces | ||
| 826 | P M mh-ps-print-toggle-mime | ||
| 827 | P f mh-ps-print-msg-file | ||
| 828 | P l mh-print-msg | ||
| 829 | P p mh-ps-print-msg | ||
| 830 | P s mh-ps-print-msg-show | ||
| 831 | 751 | ||
| 832 | *** Draft Buffer Keymap Changes | 752 | Renamed to `mh-show-cc' per new Emacs conventions. |
| 833 | |||
| 834 | The keymap in the draft buffer has been modified slightly. The old | ||
| 835 | anonymous ftp and tar composition commands have been reinstated and | ||
| 836 | letter signing and encrypting keymaps have been added. | ||
| 837 | |||
| 838 | The type of signing or encryption has been generalized so the method | ||
| 839 | is now an option rather than a part of the function's name. The option | ||
| 840 | is `mh-mml-method-default' and choices include PGP (MIME), PGP, | ||
| 841 | S/MIME, or none. | ||
| 842 | |||
| 843 | Key 7.4.4 7.4.80 | ||
| 844 | |||
| 845 | C-c RET C-e mh-mml-secure-message-encrypt-pgpmime | ||
| 846 | mh-mml-secure-message-encrypt | ||
| 847 | C-c RET C-s mh-mml-secure-message-sign-pgpmime | ||
| 848 | - | ||
| 849 | C-c RET C-g - mh-mhn-compose-anon-ftp | ||
| 850 | C-c RET C-n - mh-mml-unsecure-message | ||
| 851 | C-c RET C-s - mh-mml-secure-message-sign | ||
| 852 | C-c RET C-t - mh-mhn-compose-external-compressed-tar | ||
| 853 | C-c RET C-s mh-mml-secure-message-sign-pgpmime | ||
| 854 | mh-mml-secure-message-sign | ||
| 855 | C-c RET C-x - mh-mhn-compose-external-type | ||
| 856 | C-c RET e mh-mml-secure-message-encrypt-pgpmime | ||
| 857 | Prefix Command | ||
| 858 | C-c RET e e - mh-mml-secure-message-encrypt | ||
| 859 | C-c RET e s - mh-mml-secure-message-signencrypt | ||
| 860 | C-c RET g - mh-mhn-compose-anon-ftp | ||
| 861 | C-c RET n - mh-mml-unsecure-message | ||
| 862 | C-c RET s mh-mml-secure-message-sign-pgpmime | ||
| 863 | Prefix Command | ||
| 864 | C-c RET s e - mh-mml-secure-message-signencrypt | ||
| 865 | C-c RET s s - mh-mml-secure-message-sign | ||
| 866 | C-c RET t - mh-mhn-compose-external-compressed-tar | ||
| 867 | C-c RET x - mh-mhn-compose-external-type | ||
| 868 | |||
| 869 | *** Speedbar: Highlight Folders With Unseen | ||
| 870 | |||
| 871 | The speedbar now renders the folders with unseen messages in boldface | ||
| 872 | which makes them easier to identify (closes SF #623369). | ||
| 873 | |||
| 874 | *** Quick Key Help | ||
| 875 | |||
| 876 | The "? (mh-help)" function now displays the help in its own buffer | ||
| 877 | called *MH-E Help* (closes SF #493740 and SF #656631). | ||
| 878 | |||
| 879 | *** New Startup File mh-e-autoloads.el | ||
| 880 | |||
| 881 | If you are installing MH-E yourself, then you can replace any | ||
| 882 | autoloads you may have with "(require 'mh-e-autoloads.el)". See the | ||
| 883 | README for details. | ||
| 884 | 753 | ||
| 885 | *** Glimpse Support Removed | 754 | *** mh-show-date-face |
| 886 | 755 | ||
| 887 | Since glimpse isn't free, we cannot mention it. Glimpse has been | 756 | Renamed to `mh-show-date' per new Emacs conventions. |
| 888 | removed from the option `mh-indexer-choices' (closes SF #831276). | ||
| 889 | 757 | ||
| 890 | *** mh-msg-is-in-seq Update | 758 | *** mh-show-from-face |
| 891 | 759 | ||
| 892 | Can now specify an alternate message number to "S s | 760 | Renamed to `mh-show-from' per new Emacs conventions. |
| 893 | (mh-msg-is-in-seq)" with a prefix argument. | ||
| 894 | 761 | ||
| 895 | ** New Variables in MH-E 7.4.80 | 762 | *** mh-show-header-face |
| 896 | 763 | ||
| 897 | Variables that have been added to MH-E that have not been discussed | 764 | Renamed to `mh-show-header' per new Emacs conventions. |
| 898 | elsewhere are listed here. | ||
| 899 | 765 | ||
| 900 | *** mail-citation-hook | 766 | *** mh-show-subject-face |
| 901 | 767 | ||
| 902 | Hook for modifying a citation just inserted in the mail buffer. | 768 | Renamed to `mh-show-subject' per new Emacs conventions. |
| 903 | 769 | ||
| 904 | *** mh-alias-reloaded-hook | 770 | *** mh-show-to-face |
| 905 | 771 | ||
| 906 | Invoked by `mh-alias-reload' after reloading aliases. | 772 | Renamed to `mh-show-to' per new Emacs conventions. |
| 907 | 773 | ||
| 908 | *** mh-auto-fields-prompt-flag | 774 | *** mh-show-xface-face |
| 909 | 775 | ||
| 910 | Non-nil means to prompt before sending if fields in | 776 | Renamed to `mh-show-xface' per new Emacs conventions. |
| 911 | `mh-auto-fields-list' are inserted. | ||
| 912 | 777 | ||
| 913 | *** mh-default-folder-for-message-function | 778 | *** mh-speedbar-folder-face |
| 914 | 779 | ||
| 915 | Function to select a default folder for refiling or `Fcc'. | 780 | Renamed to `mh-speedbar-folder' per new Emacs conventions. |
| 916 | 781 | ||
| 917 | *** mh-forward-hook | 782 | *** mh-speedbar-folder-with-unseen-messages-face |
| 918 | 783 | ||
| 919 | Invoked on the forwarded letter by "f (mh-forward)". | 784 | Renamed to `mh-speedbar-folder-with-unseen-messages' per new Emacs conventions. |
| 920 | 785 | ||
| 921 | *** mh-invisible-header-fields-default | 786 | *** mh-speedbar-selected-folder-face |
| 922 | 787 | ||
| 923 | List of hidden header fields. The header fields listed in this option | 788 | Renamed to `mh-speedbar-selected-folder' per new Emacs conventions. |
| 924 | are hidden, although you can check off any field that you would like | ||
| 925 | to see. Header fields that you would like to hide that aren't listed | ||
| 926 | can be added to the `mh-invisible-header-fields' option (closes SF | ||
| 927 | #752045). | ||
| 928 | 789 | ||
| 929 | The option `mh-visible-header-fields' has been deleted. | 790 | *** mh-speedbar-selected-folder-with-unseen-messages-face |
| 930 | 791 | ||
| 931 | *** mh-junk-background | 792 | Renamed to `mh-speedbar-selected-folder-with-unseen-messages' per new |
| 793 | Emacs conventions. | ||
| 932 | 794 | ||
| 933 | If on, spam programs are run in background. This used to be the | 795 | |
| 934 | default behavior but this could overwhelm a system if many messages | ||
| 935 | were black- or whitelisted at once. The spam programs are now run in | ||
| 936 | the foreground, but this option can be used to put them back in the | ||
| 937 | background. | ||
| 938 | |||
| 939 | *** mh-signature-separator-flag | ||
| 940 | |||
| 941 | Non-nil means a signature separator should be inserted. It is not | ||
| 942 | recommended that you change this option since various mail user | ||
| 943 | agents, including MH-E, use the separator to present the signature | ||
| 944 | differently, and to suppress the signature when replying or yanking a | ||
| 945 | letter into a draft. | ||
| 946 | |||
| 947 | *** mh-variant | ||
| 948 | |||
| 949 | Specifies the variant used by MH-E. The default setting of this option | ||
| 950 | is `Auto-detect' which means that MH-E will automatically choose the | ||
| 951 | first of nmh, MH, or GNU mailutils that it finds in the directories | ||
| 952 | listed in `mh-path', `mh-sys-path', and `exec-path'. If, for example, | ||
| 953 | you have both nmh and mailutils installed and `mh-variant-in-use' was | ||
| 954 | initialized to nmh but you want to use mailutils, then you can set | ||
| 955 | this option to `mailutils'. | ||
| 956 | 796 | ||
| 957 | When this variable is changed, MH-E resets `mh-progs', `mh-lib', | 797 | ** Bug Fixes in MH-E 8.0 |
| 958 | `mh-lib-progs', `mh-flists-present-flag', and `mh-variant-in-use' | ||
| 959 | accordingly. | ||
| 960 | 798 | ||
| 961 | If you've set these variables in your .emacs, it is strongly suggested | 799 | *** Face Variable Names Now Follow Current Conventions |
| 962 | that you comment them out. The MH detection code has been completely | ||
| 963 | rewritten and it is very likely that you no longer to set them and | ||
| 964 | their setting may confuse other MH-E settings. | ||
| 965 | |||
| 966 | ** Variables Deleted in MH-E 7.4.80 | ||
| 967 | 800 | ||
| 968 | Variables that have been removed from MH-E that have not been | 801 | The -face suffix has been dropped from all face names. |
| 969 | discussed elsewhere are listed here. | ||
| 970 | 802 | ||
| 971 | *** mh-alias-system-aliases | 803 | *** Swish Fixes |
| 972 | 804 | ||
| 973 | System definitions should not be a user option. | 805 | Items in swish indexes that aren't mail messages are now handled more |
| 806 | gracefully. | ||
| 974 | 807 | ||
| 975 | *** mh-junk-mail-folder | 808 | *** Spamassassin Fixes |
| 976 | 809 | ||
| 977 | Since this variable can accept values other than folder names, it was | 810 | If you use spamassassin, there was an error when you tried to junk |
| 978 | renamed to `mh-junk-disposition' to more accurately reflect the content. | 811 | mail if the option `mh-junk-background' was set. This has been fixed. |
| 979 | 812 | ||
| 980 | ** Bug Fixes in MH-E 7.4.80 | 813 | *** Mairix Support |
| 981 | 814 | ||
| 982 | Many bugs were fixed in this version that aren't listed below. | 815 | Indexing now compatible with Mairix version 0.12 and later. |
| 983 | 816 | ||
| 984 | *** mh-extract-rejected-mail Can't Do MIME (and Other Formats) | 817 | *** mh-extract-rejected-mail Can't Do MIME (and Other Formats) |
| 985 | 818 | ||
| @@ -992,10 +825,23 @@ XEmacs (21.5.9-21.5.16). More recent versions work fine. If you think | |||
| 992 | our list is too broad, please let us know which version of XEmacs you | 825 | our list is too broad, please let us know which version of XEmacs you |
| 993 | are using (closes SF #644321). | 826 | are using (closes SF #644321). |
| 994 | 827 | ||
| 828 | *** Completions Offered by mh-refile-message Are Not Sorted | ||
| 829 | |||
| 830 | This behavior is no longer observed (closes SF #698734). | ||
| 831 | |||
| 832 | *** Add Message-ID to Outgoing Messages | ||
| 833 | |||
| 834 | If you replied to a message in your `+outbox', an `In-Reply-To:' | ||
| 835 | header field was created that broke threading at the recipient's end. | ||
| 836 | We now add a `Message-ID:' to outgoing messages which fixes this | ||
| 837 | (closes SF #725425). | ||
| 838 | |||
| 995 | *** Inconsistent Prompts | 839 | *** Inconsistent Prompts |
| 996 | 840 | ||
| 997 | Prompt formats are now consistent throughout the application (closes | 841 | Emacs changed their defaults in prompts from "Prompt: [value]" to |
| 998 | SF #730470). | 842 | "Prompt (default value): ". All MH-E prompts have been updated to |
| 843 | comply with the new standard and are therefore now consistent | ||
| 844 | throughout the application (closes SF #730470, SF #1275933). | ||
| 999 | 845 | ||
| 1000 | *** Empty Shell Comments Confuse mh-mhn-directive-present-p | 846 | *** Empty Shell Comments Confuse mh-mhn-directive-present-p |
| 1001 | 847 | ||
| @@ -1034,16 +880,10 @@ user would be flashed, but the alias would be used when sending. This | |||
| 1034 | has been fixed so that the user name that is flashed is the same as | 880 | has been fixed so that the user name that is flashed is the same as |
| 1035 | the name that is sent (closes SF #772595). | 881 | the name that is sent (closes SF #772595). |
| 1036 | 882 | ||
| 1037 | *** Args out of range | 883 | *** Initialization Fails If ~/Mail Exists |
| 1038 | |||
| 1039 | In rare and non-reproducible circumstances, compilation sometimes | ||
| 1040 | threw an "Args out of range" error. Nonetheless, this has been fixed | ||
| 1041 | (closes SF #806577). | ||
| 1042 | |||
| 1043 | *** mh-forward hard-codes '-mime' Switch on nmh | ||
| 1044 | 884 | ||
| 1045 | Added new option `mh-compose-forward-as-mime-flag' that controls whether | 885 | MH-E no longer calls `install-mh' so this issue has gone away (closes |
| 1046 | messages are forwarded as MIME attachments (closes SF #827203). | 886 | SF #835192). |
| 1047 | 887 | ||
| 1048 | *** Not Re-prompted to Sign After Pass Phrase Typo | 888 | *** Not Re-prompted to Sign After Pass Phrase Typo |
| 1049 | 889 | ||
| @@ -1059,17 +899,187 @@ to start typing their message, any line in the body with a colon would | |||
| 1059 | be fontified with a gray background. This has been fixed (closes SF | 899 | be fontified with a gray background. This has been fixed (closes SF |
| 1060 | #855479). | 900 | #855479). |
| 1061 | 901 | ||
| 902 | *** RETURN Causes Infinite Loop in mh-letter | ||
| 903 | |||
| 904 | This behavior is no longer observed (closes SF #887346). | ||
| 905 | |||
| 1062 | *** mh-refile-msg Fails to Suggest Folder for Empty Message | 906 | *** mh-refile-msg Fails to Suggest Folder for Empty Message |
| 1063 | 907 | ||
| 1064 | If you received a message with an empty body from someone who is | 908 | If you received a message with an empty body from someone who is |
| 1065 | listed in your aliases file, "o (mh-refile-msg)" failed to suggest the | 909 | listed in your aliases file, `o' (`mh-refile-msg') failed to suggest |
| 1066 | correct folder. This has been fixed (closes SF #917096). | 910 | the correct folder. This has been fixed (closes SF #917096). |
| 911 | |||
| 912 | *** Missing Headers When Replying to All | ||
| 913 | |||
| 914 | User needed to edit `replgroupcomps' (closes SF #918194). | ||
| 1067 | 915 | ||
| 1068 | *** Error Visiting Folder With no Unseen Messages | 916 | *** Error Visiting Folder With no Unseen Messages |
| 1069 | 917 | ||
| 1070 | If you visited a folder without unseen messages and the option "flist: | 918 | If you visited a folder without unseen messages and the option "flist: |
| 1071 | -noshowzero" is present in your ~/.mh_profile, you'd get an error. This | 919 | -noshowzero" is present in your `~/.mh_profile', you'd get an error. |
| 1072 | has been fixed (closes SF #933954). | 920 | This has been fixed (closes SF #933954). |
| 921 | |||
| 922 | *** Error Message When Trying to Send Using MH-E | ||
| 923 | |||
| 924 | This behavior is no longer observed (closes SF #1002103). | ||
| 925 | |||
| 926 | *** mh-find-path Doesn't Use mhparam | ||
| 927 | |||
| 928 | MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It | ||
| 929 | uses `mhparam' instead (closes SF #1016027). | ||
| 930 | |||
| 931 | *** rmmproc Refile Complains No Such Message | ||
| 932 | |||
| 933 | MH-E would get confused about which folder to delete messages from if | ||
| 934 | you were refiling and deleting messages at the same time. This has | ||
| 935 | been fixed (closes SF #1023959). | ||
| 936 | |||
| 937 | *** auto-mode-alist Updated | ||
| 938 | |||
| 939 | MH-E originally updated auto-mode-alist to set the major mode of | ||
| 940 | drafts. Now that we explicitly set the mode, there is no reason to do | ||
| 941 | this, and this behavior caused problems for people who didn't use MH-E | ||
| 942 | who were editing files that looked like MH message files (closes SF | ||
| 943 | #1032353). | ||
| 944 | |||
| 945 | *** ! Doesn't Do Regions | ||
| 946 | |||
| 947 | Now it does (closes SF #1046330). | ||
| 948 | |||
| 949 | *** mh-show-unquote-From Fails (read-only buffer) | ||
| 950 | |||
| 951 | MH-E quotes the `From ' header field that is inserted by MTAs. | ||
| 952 | However, it was trying to do this in a read-only buffer. This has been | ||
| 953 | fixed (closes SF #1089870). | ||
| 954 | |||
| 955 | *** Whitespace in pick Expressions | ||
| 956 | |||
| 957 | The `C-u / s RET' command now works. In addition, you can now add | ||
| 958 | whitespace to any of the limiting (/) commands (closes SF #1122655). | ||
| 959 | |||
| 960 | *** mh-index-previous-folder Does Not Work Correctly | ||
| 961 | |||
| 962 | If your cursor was on an item below a folder heading and you used | ||
| 963 | `M-TAB' (`mh-index-previous-folder'), you would move to the previous | ||
| 964 | folder heading. This has been fixed (closes SF #1126188). | ||
| 965 | |||
| 966 | *** Default Identity Prevents Insertion of Auto Fields | ||
| 967 | |||
| 968 | Auto insertion of an identity now occurs even when the default | ||
| 969 | identity is used (closes SF #1204506). | ||
| 970 | |||
| 971 | *** mh-compose-forward and Default Message Number | ||
| 972 | |||
| 973 | `mh-compose-forward' will now default to the sent message in the sent | ||
| 974 | folder and the `cur' message in other folders. It also takes ranges of | ||
| 975 | messages and can include multiple messages at a time (closes SF | ||
| 976 | #1205890). | ||
| 977 | |||
| 978 | *** Better Handling of Empty cur Sequence | ||
| 979 | |||
| 980 | If you refiled a message into a folder and then used `F r' | ||
| 981 | (`mh-rescan-folder') in that folder, your cursor would be taken to the | ||
| 982 | first message. The cursor now stays where it was (closes SF #1207247). | ||
| 983 | |||
| 984 | *** mh-customize Uses Group mh, Not mh-e | ||
| 985 | |||
| 986 | The `mh' customization group alias has been deleted to avoid some | ||
| 987 | problems that were found (closes SF #1213716). | ||
| 988 | |||
| 989 | *** "Args out of range" Error in Displaying Message | ||
| 990 | |||
| 991 | This behavior is no longer observed (closes SF #1227504). | ||
| 992 | |||
| 993 | *** Front-and-back Truncation in mailto: Rendering | ||
| 994 | |||
| 995 | This behavior is no longer observed (closes SF #1227510). | ||
| 996 | |||
| 997 | *** Name of the Draft File in mh-comp.el | ||
| 998 | |||
| 999 | MH is documented to use the draft file. If you use a draft file for | ||
| 1000 | something else (like Sylpheed), then use draft folders (closes SF | ||
| 1001 | #1231483). | ||
| 1002 | |||
| 1003 | *** font-lock Error in mh-letter-mode | ||
| 1004 | |||
| 1005 | An error in MH-E was introduced as a result of a change in CVS Emacs. | ||
| 1006 | This has been fixed (closes SF #1241017). | ||
| 1007 | |||
| 1008 | *** Msg Display Broken After Displaying Msg with Inline Image | ||
| 1009 | |||
| 1010 | Messages with inline images no longer trim certain message header | ||
| 1011 | fields (closes SF #1306141). | ||
| 1012 | |||
| 1013 | *** mh-visit-folder Munges font-lock-keywords | ||
| 1014 | |||
| 1015 | MH-E broke highlighting in Gnus buffers. This was actually a problem | ||
| 1016 | in CVS Emacs 22 and has been fixed there (closes SF #1393879). | ||
| 1017 | |||
| 1018 | *** Illegal Filename Chars for W32 Filesystems | ||
| 1019 | |||
| 1020 | Windows users who view `X-Image-URL:' images could not cache the | ||
| 1021 | images since the cached image file names had illegal characters. This | ||
| 1022 | has been fixed (closes SF #1396499). | ||
| 1023 | |||
| 1024 | *** mh-send Doesn't Handle mml Insertions Via mail-user-agent | ||
| 1025 | |||
| 1026 | Can now forward messages in Gnus if MH-E is your `mail-user-agent' | ||
| 1027 | (closes SF #1399307). | ||
| 1028 | |||
| 1029 | *** Can't Narrow to Subject with Regexp Chars | ||
| 1030 | |||
| 1031 | The command `/ s' could not limit subjects that had special pick | ||
| 1032 | characters (such as [, *, $, .). This has been fixed (closes SF | ||
| 1033 | #1432548). | ||
| 1034 | |||
| 1035 | *** `/ s' Can Miss the Original Mail | ||
| 1036 | |||
| 1037 | The command `/ s' failed to include the message with the "Re:" in the | ||
| 1038 | Subject. This has been fixed (closes SF #1438369). | ||
| 1039 | |||
| 1040 | *** mhparam -components Fails on mailutils | ||
| 1041 | |||
| 1042 | This error prevented MH-E from loading when using GNU mailutils. GNU | ||
| 1043 | mailutils drops the `s' in this argument, so we did too since | ||
| 1044 | -component still works in nmh and MH (closes SF #1446985). | ||
| 1045 | |||
| 1046 | *** `/ s' Still Has Problems With []'d Mail | ||
| 1047 | |||
| 1048 | On XEmacs, subjects that had special characters would prevent `/ s' | ||
| 1049 | from narrowing to the given subject. These characters are now quoted | ||
| 1050 | correctly in XEmacs (closes SF #1447598). | ||
| 1051 | |||
| 1052 | *** Variable mh-send-args Is a String, Not a List | ||
| 1053 | |||
| 1054 | This was causing errors when sending under GNU mailutils. The internal | ||
| 1055 | variable `mh-send-args' is now a list which fixes the problem (closes | ||
| 1056 | SF #1448604). | ||
| 1057 | |||
| 1058 | *** Update Icons | ||
| 1059 | |||
| 1060 | Most of the tool bar icons have been replaced by GTK or GNOME 2 icons | ||
| 1061 | (closes SF #1452715). | ||
| 1062 | |||
| 1063 | *** Strip Build Number From emacs-version in X-Mailer | ||
| 1064 | |||
| 1065 | This has been done (closes SF #1466481). | ||
| 1066 | |||
| 1067 | *** Rename Function and Variable Definers | ||
| 1068 | |||
| 1069 | If you had ever shown help for an MH-E symbol that was both a function | ||
| 1070 | or variable, you might have found that the hyperlink to the file | ||
| 1071 | brought you to the wrong definition. This has been fixed by renaming | ||
| 1072 | the macros `mh-defgroup', `mh-defcustom', `mh-defface', | ||
| 1073 | `mh-defun-compat', and `mh-defmacro-compat' to `defgroup-mh', | ||
| 1074 | `defcustom-mh', `defface-mh', `defun-mh', `defmacro-mh' respectively | ||
| 1075 | (closes SF #1472029). | ||
| 1076 | |||
| 1077 | *** mh-insert-letter Uses Wrong Default | ||
| 1078 | |||
| 1079 | If you had used `C-c TAB' (`mh-insert-letter') to insert a letter into | ||
| 1080 | your draft, specified a different folder, and chose the default | ||
| 1081 | message number, you got the wrong message. This has been fixed (closes | ||
| 1082 | SF #1473729). | ||
| 1073 | 1083 | ||
| 1074 | 1084 | ||
| 1075 | 1085 | ||
| @@ -646,26 +646,26 @@ can be edited for each replacement. | |||
| 646 | *** The current match in query-replace is highlighted in new face | 646 | *** The current match in query-replace is highlighted in new face |
| 647 | `query-replace' which by default inherits from isearch face. | 647 | `query-replace' which by default inherits from isearch face. |
| 648 | 648 | ||
| 649 | ** File operation changes: | 649 | ** Local variables lists: |
| 650 | |||
| 651 | +++ | ||
| 652 | *** Unquoted `$' in file names do not signal an error any more when | ||
| 653 | the corresponding environment variable does not exist. | ||
| 654 | Instead, the `$ENVVAR' text is left as is, so that `$$' quoting | ||
| 655 | is only rarely needed. | ||
| 656 | 650 | ||
| 657 | +++ | 651 | +++ |
| 658 | *** In processing a local variables list, Emacs strips the prefix and | 652 | *** In processing a local variables list, Emacs strips the prefix and |
| 659 | suffix from every line before processing all the lines. | 653 | suffix from every line before processing all the lines. |
| 660 | 654 | ||
| 661 | +++ | 655 | +++ |
| 656 | *** Text properties in local variables. | ||
| 657 | |||
| 658 | A file local variables list cannot specify a string with text | ||
| 659 | properties--any specified text properties are discarded. | ||
| 660 | |||
| 661 | +++ | ||
| 662 | *** If the local variables list contains any variable-value pairs that | 662 | *** If the local variables list contains any variable-value pairs that |
| 663 | are not known to be safe, Emacs shows a prompt asking whether to apply | 663 | are not known to be safe, Emacs shows a prompt asking whether to apply |
| 664 | the local variables list as a whole. In earlier versions, a prompt | 664 | the local variables list as a whole. In earlier versions, a prompt |
| 665 | was only issued for variables explicitly marked as risky (for the | 665 | was only issued for variables explicitly marked as risky (for the |
| 666 | definition of risky variables, see `risky-local-variable-p'). | 666 | definition of risky variables, see `risky-local-variable-p'). |
| 667 | 667 | ||
| 668 | At the prompt, the user can choose to save the contents of this local | 668 | At the prompt, you can choose to save the contents of this local |
| 669 | variables list to `safe-local-variable-values'. This new customizable | 669 | variables list to `safe-local-variable-values'. This new customizable |
| 670 | option is a list of variable-value pairs that are known to be safe. | 670 | option is a list of variable-value pairs that are known to be safe. |
| 671 | Variables can also be marked as safe with the existing | 671 | Variables can also be marked as safe with the existing |
| @@ -674,6 +674,38 @@ However, risky variables will not be added to | |||
| 674 | `safe-local-variable-values' in this way. | 674 | `safe-local-variable-values' in this way. |
| 675 | 675 | ||
| 676 | +++ | 676 | +++ |
| 677 | *** The variable `enable-local-variables' controls how local variable | ||
| 678 | lists are handled. t, the default, specifies the standard querying | ||
| 679 | behavior. :safe means use only safe values, and ignore the rest. | ||
| 680 | nil means ignore them all. Anything else means always query. | ||
| 681 | |||
| 682 | +++ | ||
| 683 | *** The variable `safe-local-eval-forms' specifies a list of forms that | ||
| 684 | are ok to evaluate when they appear in an `eval' local variables | ||
| 685 | specification. Normally Emacs asks for confirmation before evaluating | ||
| 686 | such a form, but if the form appears in this list, no confirmation is | ||
| 687 | needed. | ||
| 688 | |||
| 689 | +++ | ||
| 690 | *** If a function has a non-nil `safe-local-eval-function' property, | ||
| 691 | that means it is ok to evaluate some calls to that function when it | ||
| 692 | appears in an `eval' local variables specification. If the property | ||
| 693 | is t, then any form calling that function with constant arguments is | ||
| 694 | ok. If the property is a function or list of functions, they are called | ||
| 695 | with the form as argument, and if any returns t, the form is ok to call. | ||
| 696 | |||
| 697 | If the form is not "ok to call", that means Emacs asks for | ||
| 698 | confirmation as before. | ||
| 699 | |||
| 700 | ** File operation changes: | ||
| 701 | |||
| 702 | +++ | ||
| 703 | *** Unquoted `$' in file names do not signal an error any more when | ||
| 704 | the corresponding environment variable does not exist. | ||
| 705 | Instead, the `$ENVVAR' text is left as is, so that `$$' quoting | ||
| 706 | is only rarely needed. | ||
| 707 | |||
| 708 | +++ | ||
| 677 | *** find-file-read-only visits multiple files in read-only mode, | 709 | *** find-file-read-only visits multiple files in read-only mode, |
| 678 | when the file name contains wildcard characters. | 710 | when the file name contains wildcard characters. |
| 679 | 711 | ||
| @@ -3130,7 +3162,7 @@ See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. | |||
| 3130 | --- | 3162 | --- |
| 3131 | ** MH-E changes. | 3163 | ** MH-E changes. |
| 3132 | 3164 | ||
| 3133 | Upgraded to MH-E version 7.95. There have been major changes since | 3165 | Upgraded to MH-E version 8.0. There have been major changes since |
| 3134 | version 5.0.2; see MH-E-NEWS for details. | 3166 | version 5.0.2; see MH-E-NEWS for details. |
| 3135 | 3167 | ||
| 3136 | ** Calendar changes: | 3168 | ** Calendar changes: |
| @@ -3633,6 +3665,15 @@ occurrences of an element in the list, the one that's kept is the | |||
| 3633 | first one. | 3665 | first one. |
| 3634 | 3666 | ||
| 3635 | +++ | 3667 | +++ |
| 3668 | *** New function `add-to-history' adds an element to a history list. | ||
| 3669 | |||
| 3670 | Lisp packages should use this function to add elements to their | ||
| 3671 | history lists. | ||
| 3672 | |||
| 3673 | If `history-delete-duplicates' is non-nil, it removes duplicates of | ||
| 3674 | the new element from the history list it updates. | ||
| 3675 | |||
| 3676 | +++ | ||
| 3636 | *** New function `rassq-delete-all'. | 3677 | *** New function `rassq-delete-all'. |
| 3637 | 3678 | ||
| 3638 | (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose | 3679 | (rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose |
| @@ -4069,38 +4110,6 @@ the minibuffer with a default value: if DEF is non-nil, the minibuffer | |||
| 4069 | prompt provided in PROMPT is edited to show the default value provided | 4110 | prompt provided in PROMPT is edited to show the default value provided |
| 4070 | in DEF before the terminal colon and space. | 4111 | in DEF before the terminal colon and space. |
| 4071 | 4112 | ||
| 4072 | ** Local variables lists: | ||
| 4073 | |||
| 4074 | +++ | ||
| 4075 | *** Text properties in local variables. | ||
| 4076 | |||
| 4077 | A file local variables list cannot specify a string with text | ||
| 4078 | properties--any specified text properties are discarded. | ||
| 4079 | |||
| 4080 | +++ | ||
| 4081 | *** The variable `enable-local-variables' controls how local variable | ||
| 4082 | lists are handled. t, the default, specifies the standard querying | ||
| 4083 | behavior. :safe means use only safe values, and ignore the rest. | ||
| 4084 | nil means ignore them all. Anything else means always query. | ||
| 4085 | |||
| 4086 | +++ | ||
| 4087 | *** The variable `safe-local-eval-forms' specifies a list of forms that | ||
| 4088 | are ok to evaluate when they appear in an `eval' local variables | ||
| 4089 | specification. Normally Emacs asks for confirmation before evaluating | ||
| 4090 | such a form, but if the form appears in this list, no confirmation is | ||
| 4091 | needed. | ||
| 4092 | |||
| 4093 | --- | ||
| 4094 | *** If a function has a non-nil `safe-local-eval-function' property, | ||
| 4095 | that means it is ok to evaluate some calls to that function when it | ||
| 4096 | appears in an `eval' local variables specification. If the property | ||
| 4097 | is t, then any form calling that function with constant arguments is | ||
| 4098 | ok. If the property is a function or list of functions, they are called | ||
| 4099 | with the form as argument, and if any returns t, the form is ok to call. | ||
| 4100 | |||
| 4101 | If the form is not "ok to call", that means Emacs asks for | ||
| 4102 | confirmation as before. | ||
| 4103 | |||
| 4104 | ** Searching and matching changes: | 4113 | ** Searching and matching changes: |
| 4105 | 4114 | ||
| 4106 | +++ | 4115 | +++ |
| @@ -32,7 +32,6 @@ Emacs | |||
| 32 | * CL: (cl). Partial Common Lisp support for Emacs Lisp. | 32 | * CL: (cl). Partial Common Lisp support for Emacs Lisp. |
| 33 | * Dired-X: (dired-x). Dired Extra Features. | 33 | * Dired-X: (dired-x). Dired Extra Features. |
| 34 | * Ediff: (ediff). A visual interface for comparing and merging programs. | 34 | * Ediff: (ediff). A visual interface for comparing and merging programs. |
| 35 | * Emacs-Xtra: (emacs-xtra). Specialized Emacs features. | ||
| 36 | * Org Mode: (org). Outline-based notes management and organizer. | 35 | * Org Mode: (org). Outline-based notes management and organizer. |
| 37 | * PCL-CVS: (pcl-cvs). Emacs front-end to CVS. | 36 | * PCL-CVS: (pcl-cvs). Emacs front-end to CVS. |
| 38 | * Speedbar: (speedbar). File/Tag summarizing utility. | 37 | * Speedbar: (speedbar). File/Tag summarizing utility. |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 115e43c2d03..2e8581a6f57 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2006-05-02 Francesco Potort,Al(B <pot@gnu.org> | ||
| 2 | |||
| 3 | * etags.c (Perl_functions): Free space allocated for var package. | ||
| 4 | (Erlang_functions): Possibly free space allocated for var last. | ||
| 5 | (Prolog_functions): Possibly free space allocated for var last. | ||
| 6 | |||
| 1 | 2006-04-29 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2006-04-29 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * sorted-doc.c (main): Initialize docs to NULL. | 9 | * sorted-doc.c (main): Initialize docs to NULL. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index a7c98f090bb..e206443f39b 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | * configuration file containing regexp definitions for etags. | 41 | * configuration file containing regexp definitions for etags. |
| 42 | */ | 42 | */ |
| 43 | 43 | ||
| 44 | char pot_etags_version[] = "@(#) pot revision number is 17.15"; | 44 | char pot_etags_version[] = "@(#) pot revision number is 17.17"; |
| 45 | 45 | ||
| 46 | #define TRUE 1 | 46 | #define TRUE 1 |
| 47 | #define FALSE 0 | 47 | #define FALSE 0 |
| @@ -4543,6 +4543,7 @@ Perl_functions (inf) | |||
| 4543 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4543 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4544 | } | 4544 | } |
| 4545 | } | 4545 | } |
| 4546 | free (package); | ||
| 4546 | } | 4547 | } |
| 4547 | 4548 | ||
| 4548 | 4549 | ||
| @@ -5441,6 +5442,8 @@ Prolog_functions (inf) | |||
| 5441 | last[len] = '\0'; | 5442 | last[len] = '\0'; |
| 5442 | } | 5443 | } |
| 5443 | } | 5444 | } |
| 5445 | if (last != NULL) | ||
| 5446 | free (last); | ||
| 5444 | } | 5447 | } |
| 5445 | 5448 | ||
| 5446 | 5449 | ||
| @@ -5597,7 +5600,11 @@ Erlang_functions (inf) | |||
| 5597 | else if (cp[0] == '-') /* attribute, e.g. "-define" */ | 5600 | else if (cp[0] == '-') /* attribute, e.g. "-define" */ |
| 5598 | { | 5601 | { |
| 5599 | erlang_attribute (cp); | 5602 | erlang_attribute (cp); |
| 5600 | last = NULL; | 5603 | if (last != NULL) |
| 5604 | { | ||
| 5605 | free (last); | ||
| 5606 | last = NULL; | ||
| 5607 | } | ||
| 5601 | } | 5608 | } |
| 5602 | else if ((len = erlang_func (cp, last)) > 0) | 5609 | else if ((len = erlang_func (cp, last)) > 0) |
| 5603 | { | 5610 | { |
| @@ -5614,6 +5621,8 @@ Erlang_functions (inf) | |||
| 5614 | last[len] = '\0'; | 5621 | last[len] = '\0'; |
| 5615 | } | 5622 | } |
| 5616 | } | 5623 | } |
| 5624 | if (last != NULL) | ||
| 5625 | free (last); | ||
| 5617 | } | 5626 | } |
| 5618 | 5627 | ||
| 5619 | 5628 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b39bebc7215..da019cc2cbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,339 @@ | |||
| 1 | 2006-05-10 J.D. Smith <jdsmith@as.arizona.edu> | ||
| 2 | |||
| 3 | * progmodes/idlw-shell.el (idlwave-shell-move-or-history): | ||
| 4 | Remove spurious move to point-max (new comint behavior fixes). | ||
| 5 | |||
| 6 | * progmodes/idlwave.el (idlwave-push-mark): Removed obsolete | ||
| 7 | compatibility function (Emacs 18/19). | ||
| 8 | (idlwave-is-continuation-line): Always return point at start of | ||
| 9 | previous non-blank continuation line. | ||
| 10 | `keyword-parameters': Fix continued comment font-lock matcher. | ||
| 11 | (idlwave-font-lock-fontify-region): Written, use as | ||
| 12 | font-lock-fontify-region-function, to fix continued keyword | ||
| 13 | fontification issues. | ||
| 14 | |||
| 15 | 2006-05-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 16 | |||
| 17 | * term/mac-win.el (mac-font-panel-mode): Doc fix. | ||
| 18 | (mac-service-selection, mac-service-open-file) | ||
| 19 | (mac-service-open-selection, mac-service-mail-selection) | ||
| 20 | (mac-service-mail-to, mac-service-insert-text): Rename from | ||
| 21 | mac-services-*. All uses changed. | ||
| 22 | (mac-apple-event-map): Rename event symbol `services' to `service'. | ||
| 23 | |||
| 24 | 2006-05-10 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 25 | |||
| 26 | * emacs-lisp/ewoc.el (ewoc--dll-create, ewoc--node-delete) | ||
| 27 | (ewoc--node-enter-first, ewoc--node-enter-last) | ||
| 28 | (ewoc--delete-node-internal): Merge funcs into unique callers. | ||
| 29 | |||
| 30 | 2006-05-09 Chong Yidong <cyd@stupidchicken.com> | ||
| 31 | |||
| 32 | * emacs-lisp/crm.el (completing-read-multiple): Properly handle | ||
| 33 | return value of read-from-minibuffer for empty input. | ||
| 34 | |||
| 35 | 2006-05-09 Miles Bader <miles@gnu.org> | ||
| 36 | |||
| 37 | * comint.el (comint-insert-input): Remove redundant calls to setq | ||
| 38 | and goto-char. | ||
| 39 | |||
| 40 | 2006-05-10 Nick Roberts <nickrob@snap.net.nz> | ||
| 41 | |||
| 42 | * comint.el (comint-insert-input): Make it work when | ||
| 43 | comint-use-prompt-regexp is t. | ||
| 44 | |||
| 45 | 2006-05-10 Miles Bader <miles@gnu.org> | ||
| 46 | |||
| 47 | * subr.el (field-at-pos): New function. | ||
| 48 | |||
| 49 | * comint.el (comint-insert-input): Use it. | ||
| 50 | |||
| 51 | 2006-05-09 Juri Linkov <juri@jurta.org> | ||
| 52 | |||
| 53 | * battery.el (battery-linux-proc-acpi): Also try | ||
| 54 | `/proc/acpi/thermal_zone/THR2/temperature'. | ||
| 55 | |||
| 56 | * files.el <safe-local-variable>: Remove `eval' and `let' binding | ||
| 57 | for now unused lambda `string-or-null'. | ||
| 58 | |||
| 59 | * add-log.el (change-log-default-name): Put `string-or-null-p' | ||
| 60 | instead of lambda on `safe-local-variable' property. | ||
| 61 | |||
| 62 | * diff-mode.el (diff-context->unified): Use `region-beginning' and | ||
| 63 | `region-end' instead of `mark' and `point'. | ||
| 64 | (diff-unified->context, diff-reverse-direction, diff-fixup-modifs): | ||
| 65 | Operate on region in Transient Mark mode when the mark is active. | ||
| 66 | Use `region-beginning' and `region-end' instead of `mark' and | ||
| 67 | `point'. | ||
| 68 | (diff-hunk-text, diff-goto-source): Doc fix. | ||
| 69 | |||
| 70 | * startup.el (fancy-splash-screens, normal-splash-screen): Use | ||
| 71 | face `mode-line-buffer-id' for mode-line buffer face instead of | ||
| 72 | hard-coded `(:weight bold)'. | ||
| 73 | |||
| 74 | * arc-mode.el (archive-set-buffer-as-visiting-file): Bind | ||
| 75 | buffer-undo-list to t (undo-ask is reproducible by visiting | ||
| 76 | nested archives). | ||
| 77 | |||
| 78 | 2006-05-09 Kim F. Storm <storm@cua.dk> | ||
| 79 | |||
| 80 | * progmodes/grep.el (rgrep): Set default directory of *grep* | ||
| 81 | buffer if we start M-x rgrep in the *grep* buffer and choose | ||
| 82 | a different base directory. | ||
| 83 | |||
| 84 | 2006-05-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 85 | |||
| 86 | * net/tramp.el (tramp-register-file-name-handlers): Enable Tramp | ||
| 87 | completion also when ido is loaded. | ||
| 88 | |||
| 89 | 2006-05-09 Masatake YAMATO <jet@gyve.org> | ||
| 90 | |||
| 91 | * font-lock.el (cpp-font-lock-keywords-source-directives): Addded | ||
| 92 | "warning" and "import". | ||
| 93 | (cpp-font-lock-keywords): Added "warning". | ||
| 94 | |||
| 95 | 2006-05-08 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 96 | |||
| 97 | * term/xterm.el (terminal-init-xterm): Add more key bindings. | ||
| 98 | |||
| 99 | 2006-05-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 100 | |||
| 101 | * mwheel.el (mwheel-scroll): Make sure that when scrolling multiple | ||
| 102 | pages at a time, if we signal the end, we should indeed reach that end. | ||
| 103 | |||
| 104 | 2006-05-08 David Reitter <david.reitter@gmail.com> | ||
| 105 | |||
| 106 | * emacs-lisp/easy-mmode.el (define-minor-mode): Only preserve messages | ||
| 107 | output during execution of the body. | ||
| 108 | |||
| 109 | 2006-05-08 Kim F. Storm <storm@cua.dk> | ||
| 110 | |||
| 111 | * progmodes/grep.el (lgrep, rgrep): Doc fixes. | ||
| 112 | |||
| 113 | 2006-05-08 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 114 | |||
| 115 | * emacs-lisp/ewoc.el (ewoc--set-buffer-bind-dll-let*): | ||
| 116 | Use with-current-buffer. | ||
| 117 | |||
| 118 | 2006-05-07 Kim F. Storm <storm@cua.dk> | ||
| 119 | |||
| 120 | * subr.el (add-to-history): Remove keep-dups arg. | ||
| 121 | |||
| 122 | * kmacro.el (kmacro-push-ring): Let-bind history-delete-duplicates | ||
| 123 | to nil around call to add-to-history. | ||
| 124 | |||
| 125 | 2006-05-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 126 | |||
| 127 | * emacs-lisp/syntax.el (syntax-ppss): Flush the cache before rather | ||
| 128 | than after a buffer modification. | ||
| 129 | |||
| 130 | 2006-05-08 Nick Roberts <nickrob@snap.net.nz> | ||
| 131 | |||
| 132 | * progmodes/gdb-ui.el (gdb-var-create-handler): Move speedbar | ||
| 133 | call to... | ||
| 134 | (gud-watch): ...here so speedbar is raised for already watched | ||
| 135 | expressions. | ||
| 136 | (gdb-speedbar-refresh): Delete function. | ||
| 137 | (gdb-speedbar-update, gdb-speedbar-timer-fn): New functions. | ||
| 138 | Use speedbar-timer-fn instead of speedbar-refresh (reverting | ||
| 139 | earlier change). | ||
| 140 | (gdb-var-evaluate-expression-handler) | ||
| 141 | (gdb-var-list-children-handler-1, gdb-var-update-handler-1): Use it. | ||
| 142 | |||
| 143 | * speedbar.el (speedbar-timer-fn): Remove save-window-excursion. | ||
| 144 | Update localized contents for all buffers except ignored modes. | ||
| 145 | |||
| 146 | 2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 147 | |||
| 148 | * term/mac-win.el (mac-utxt-to-string): Use `eq' instead of `='. | ||
| 149 | (mac-atsu-font-table, mac-font-panel-mode): Add defvars. | ||
| 150 | (mac-bytes-to-digits, mac-handle-toolbar-switch-mode) | ||
| 151 | (mac-handle-font-panel-closed, mac-handle-font-selection): | ||
| 152 | New functions. | ||
| 153 | (mac-font-panel-mode): New minor mode. | ||
| 154 | (mac-apple-event-map): Add bindings for toolbar toggle button and | ||
| 155 | font panel. | ||
| 156 | (menu-bar-showhide-menu): Add mac-font-panel-mode. | ||
| 157 | |||
| 158 | 2006-05-07 John Paul Wallington <jpw@pobox.com> | ||
| 159 | |||
| 160 | * ibuffer.el (ibuffer-compressed-file-name-regexp): | ||
| 161 | Avoid `regexp-opt'; simplify regexp for readability. | ||
| 162 | |||
| 163 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 164 | |||
| 165 | * ldefs-boot.el (dired-do-redisplay, dired-maybe-insert-subdir): | ||
| 166 | * files.el (buffer-stale-function): | ||
| 167 | * dired-aux.el (dired-do-redisplay, dired-maybe-insert-subdir): | ||
| 168 | * autorevert.el (global-auto-revert-non-file-buffers): Point Info | ||
| 169 | links to the main manual, not to emacs-xtra. | ||
| 170 | |||
| 171 | 2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 172 | |||
| 173 | * term/mac-win.el: (mac-utxt-to-string): Don't make adjustment for | ||
| 174 | MacJapanese if text is ASCII-only. | ||
| 175 | |||
| 176 | 2006-05-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 177 | |||
| 178 | * progmodes/gdb-ui.el (gdb-goto-breakpoint): Use or instead of | ||
| 179 | unless so nil isn't returned. | ||
| 180 | (gdb-setup-windows, gdb-restore-windows): Reset gdb-source-window. | ||
| 181 | |||
| 182 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 183 | |||
| 184 | * subr.el (add-to-history): New function. | ||
| 185 | |||
| 186 | * ediff.el (ediff-files, ediff-files3, ediff-merge-files) | ||
| 187 | (ediff-merge-files-with-ancestor): | ||
| 188 | * env.el (setenv): | ||
| 189 | * isearch.el (isearch-update-ring): | ||
| 190 | * server.el (server-visit-files): | ||
| 191 | * progmodes/grep.el (lgrep, rgrep): | ||
| 192 | * progmodes/vhdl-mode.el (vhdl-generate-makefile-1): | ||
| 193 | * progmodes/xscheme.el (xscheme-insert-expression): | ||
| 194 | Use add-to-history. | ||
| 195 | |||
| 196 | * kmacro.el (kmacro-push-ring): Use add-to-history. | ||
| 197 | (kmacro-ring-length): Remove unused defun. | ||
| 198 | (kmacro-start-macro): Use kmacro-push-ring. | ||
| 199 | |||
| 200 | 2006-05-06 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 201 | |||
| 202 | * emacs-lisp/ewoc.el (ewoc-create, ewoc-set-hf): Use `insert' | ||
| 203 | directly instead of a lambda expression that calls it. | ||
| 204 | |||
| 205 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 206 | |||
| 207 | * avoid.el (mouse-avoidance-point-position): Use posn-at-point | ||
| 208 | instead of compute-motion. | ||
| 209 | |||
| 210 | 2006-05-05 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 211 | |||
| 212 | * ibuffer.el (ibuffer-compressed-file-name-regexp): Undo previous | ||
| 213 | change. | ||
| 214 | |||
| 215 | 2006-05-05 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 216 | |||
| 217 | * startup.el (command-line-1): Refer to "Pure Storage" on | ||
| 218 | pure-space-overflow. | ||
| 219 | |||
| 220 | 2006-05-05 Martin Rudalics <rudalics@gmx.at> | ||
| 221 | |||
| 222 | * emacs-lisp/re-builder.el (reb-update-overlays): Cycle through | ||
| 223 | provided faces once they all have been used up. | ||
| 224 | |||
| 225 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 226 | |||
| 227 | * startup.el (normal-splash-screen, fancy-splash-screens-1): Add a | ||
| 228 | reference to the Lisp manual to the warning about pure space | ||
| 229 | overflow. | ||
| 230 | |||
| 231 | 2006-05-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 232 | |||
| 233 | * textmodes/ispell.el (ispell-buffer-local-dict): Add a `no-reload' | ||
| 234 | argument to avoid the call to `ispell-internal-change-dictionary' | ||
| 235 | when not needed. | ||
| 236 | (ispell-change-dictionary): Use this argument and call | ||
| 237 | `ispell-internal-change-dictionary' after the possible change | ||
| 238 | to `ispell-local-dictionary'. | ||
| 239 | (ispell-internal-change-dictionary): Check for a change in | ||
| 240 | personal dictionary use too. | ||
| 241 | Cosmetic changes from Agustin Martin | ||
| 242 | <agustin.martin@hispalinux.es>. | ||
| 243 | |||
| 244 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 245 | |||
| 246 | * startup.el (command-line): On MS-Windows, probe "~", not | ||
| 247 | "~USER", for warning about non-existent home directory | ||
| 248 | |||
| 249 | * arc-mode.el (archive-l-e): New optional argument `float' means | ||
| 250 | generate a float value. | ||
| 251 | (archive-arc-summarize, archive-lzh-summarize) | ||
| 252 | (archive-zip-summarize, archive-zoo-summarize): Invoke archive-l-e | ||
| 253 | with 3rd argument non-nil when file's size is being computed. | ||
| 254 | Format the file sizes with %8.0f instead of %8d. | ||
| 255 | |||
| 256 | 2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 257 | |||
| 258 | * cus-start.el (all): Add mac-dnd-known-types. | ||
| 259 | |||
| 260 | * term/mac-win.el: (mac-utxt-to-string, mac-string-to-utxt) | ||
| 261 | (mac-TEXT-to-string, mac-string-to-TEXT, mac-furl-to-string) | ||
| 262 | (mac-TIFF-to-string): New functions. | ||
| 263 | (x-get-selection, x-selection-value) | ||
| 264 | (mac-select-convert-to-string): Use them. | ||
| 265 | (mac-text-encoding-mac-japanese-basic-variant): New constant. | ||
| 266 | (mac-dnd-types-alist): New customization variable. | ||
| 267 | (mac-dnd-handle-furl, mac-dnd-handle-hfs, mac-dnd-insert-utxt) | ||
| 268 | (mac-dnd-insert-TEXT, mac-dnd-insert-TIFF, mac-dnd-drop-data) | ||
| 269 | (mac-dnd-handle-drag-n-drop-event): New functions. | ||
| 270 | (mac-drag-n-drop): Remove function. | ||
| 271 | (global-map): Bind drag-n-drop and M-drag-n-drop to | ||
| 272 | mac-dnd-handle-drag-n-drop-event. | ||
| 273 | |||
| 274 | 2006-05-04 Karl Chen <quarl@NOSPAM.quarl.org> | ||
| 275 | |||
| 276 | * progmodes/perl-mode.el (perl-beginning-of-function): | ||
| 277 | Skip anonymous subs. | ||
| 278 | |||
| 279 | 2006-05-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 280 | |||
| 281 | * ibuffer.el (ibuffer-compressed-file-name-regexp): Avoid loading | ||
| 282 | regexp-opt at run time. | ||
| 283 | |||
| 284 | * term.el (term-handle-ansi-escape): Fix off by one error. | ||
| 285 | |||
| 286 | 2006-05-04 Nick Roberts <nickrob@snap.net.nz> | ||
| 287 | |||
| 288 | * progmodes/gdb-ui.el (gdb-force-update): Delete variable... | ||
| 289 | (gdb-init-1, gdb-post-prompt): ...and references to it. | ||
| 290 | (gdb-frame-handler): Strip directory name from filename if present. | ||
| 291 | |||
| 292 | * progmodes/gud.el (gdb-force-update): Delete defvar | ||
| 293 | (gud-speedbar-buttons): ...and references to it. Use window-start | ||
| 294 | to try to keep positon in watch expression. | ||
| 295 | |||
| 296 | 2006-05-03 Richard Stallman <rms@gnu.org> | ||
| 297 | |||
| 298 | * simple.el (next-history-element, previous-history-element): Doc fix. | ||
| 299 | |||
| 300 | * isearch.el (isearch-update-ring): Doc fix. | ||
| 301 | |||
| 302 | 2006-05-03 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 303 | |||
| 304 | * isearch.el (isearch-update-ring): Take history-delete-duplicates | ||
| 305 | into consideration. Replace one arm ifs with whens. | ||
| 306 | |||
| 307 | 2006-05-03 Nick Roberts <nickrob@snap.net.nz> | ||
| 308 | |||
| 309 | * progmodes/gdb-ui.el (gud-watch): Let user select an expression. | ||
| 310 | (menu): Fix typo. | ||
| 311 | |||
| 312 | 2006-05-02 Miles Bader <miles@gnu.org> | ||
| 313 | |||
| 314 | * replace.el (occur-engine): Bind `inhibit-field-text-motion' to t. | ||
| 315 | |||
| 316 | 2006-05-02 Jay Belanger <belanger@truman.edu> | ||
| 317 | |||
| 318 | * calc/calc-embed.el: (calc-override-minor-modes-map) | ||
| 319 | (calc-override-minor-modes): New variables. | ||
| 320 | (calc-do-embedded): Make sure that Calc keystrokes aren't | ||
| 321 | overwritten by minor modes. | ||
| 322 | |||
| 323 | 2006-05-02 Chong Yidong <cyd@mit.edu> | ||
| 324 | |||
| 325 | * msb.el (msb): If EVENT is a down event, read and discard the up event. | ||
| 326 | |||
| 327 | 2006-05-02 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 328 | |||
| 329 | * startup.el (command-line-1): Refer to Lisp manual when | ||
| 330 | pure-space-overflow occurs. | ||
| 331 | |||
| 332 | * files.el (byte-compile-dynamic, byte-compile-dynamic-docstrings) | ||
| 333 | (byte-compile-warnings, find-file-visit-truename, indent-tabs-mode) | ||
| 334 | (left-margin, no-byte-compile, no-update-autoloads, truncate-lines) | ||
| 335 | (version-control): Don't use `t' for safe-local-variable declarations. | ||
| 336 | |||
| 1 | 2006-05-01 Richard Stallman <rms@gnu.org> | 337 | 2006-05-01 Richard Stallman <rms@gnu.org> |
| 2 | 338 | ||
| 3 | * diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C, | 339 | * diff-mode.el (diff-mode-shared-map): Don't bind M-W, M-U, M-C, |
| @@ -26,35 +362,35 @@ | |||
| 26 | (tramp-completion-handle-file-name-directory) | 362 | (tramp-completion-handle-file-name-directory) |
| 27 | (tramp-completion-handle-file-name-nondirectory) | 363 | (tramp-completion-handle-file-name-nondirectory) |
| 28 | (tramp-completion-handle-expand-file-name): Remove them. | 364 | (tramp-completion-handle-expand-file-name): Remove them. |
| 29 | (tramp-handle-file-name-directory): Return the real directory | 365 | (tramp-handle-file-name-directory): Return the real directory name. |
| 30 | name. Returning "/" only doesn't need to be necessary any longer. | 366 | Returning "/" only doesn't need to be necessary any longer. |
| 31 | (tramp-file-name-handler): Make special attention when in hostname | 367 | (tramp-file-name-handler): Make special attention when in hostname |
| 32 | completion mode. | 368 | completion mode. |
| 33 | (tramp-completion-file-name-handler): Revert patch from | 369 | (tramp-completion-file-name-handler): Revert patch from 2006-04-28. |
| 34 | 2006-04-28. | 370 | (tramp-register-file-name-handlers): |
| 35 | (tramp-register-file-name-handlers): Register | 371 | Register `tramp-completion-file-name-handler' only when |
| 36 | `tramp-completion-file-name-handler' only when | 372 | `partial-completion-mode' is enabled. |
| 37 | `partial-completion-mode is enabled. | 373 | (tramp-completion-handle-file-name-all-completions): |
| 38 | (tramp-completion-handle-file-name-all-completions): Delete | 374 | Delete directory part from results. |
| 39 | directory part from results. | ||
| 40 | (tramp-get-completion-methods, tramp-get-completion-user-host): | 375 | (tramp-get-completion-methods, tramp-get-completion-user-host): |
| 41 | Discard deleting "/", it doesn't work after the change of | 376 | Discard deleting "/", it doesn't work after the change of |
| 42 | `tramp-handle-file-name-directory' above. | 377 | `tramp-handle-file-name-directory' above. |
| 43 | 378 | ||
| 44 | 2006-05-01 Kim F. Storm <storm@cua.dk> | 379 | 2006-05-01 Kim F. Storm <storm@cua.dk> |
| 45 | 380 | ||
| 46 | * progmodes/grep.el (grep-expand-template): Use save-match-data. | 381 | * progmodes/grep.el (grep-expand-template): Use save-match-data |
| 382 | and symbol-value. | ||
| 47 | 383 | ||
| 48 | 2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 384 | 2006-05-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 49 | 385 | ||
| 50 | * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): Use | 386 | * term/mac-win.el (mac-ae-open-documents, mac-drag-n-drop): |
| 51 | select-frame-set-input-focus instead of raise-frame. | 387 | Use select-frame-set-input-focus instead of raise-frame. |
| 52 | (global-map): Bind M-drag-n-drop to mac-drag-n-drop. | 388 | (global-map): Bind M-drag-n-drop to mac-drag-n-drop. |
| 53 | 389 | ||
| 54 | 2006-05-01 Nick Roberts <nickrob@snap.net.nz> | 390 | 2006-05-01 Nick Roberts <nickrob@snap.net.nz> |
| 55 | 391 | ||
| 56 | * progmodes/gud.el (gud-def): Add %c case. | 392 | * progmodes/gud.el (gud-def): Add %c case. |
| 57 | (gud-speedbar-buttons): Don'bind case-fold-search unnecessarily. | 393 | (gud-speedbar-buttons): Don't bind case-fold-search unnecessarily. |
| 58 | (gud-format-command): Make match case sensitive. Match on %F. | 394 | (gud-format-command): Make match case sensitive. Match on %F. |
| 59 | 395 | ||
| 60 | 2006-04-30 Glenn Morris <rgm@gnu.org> | 396 | 2006-04-30 Glenn Morris <rgm@gnu.org> |
| @@ -121,7 +457,7 @@ | |||
| 121 | (grep-read-regexp, grep-read-files): New helper functions. | 457 | (grep-read-regexp, grep-read-files): New helper functions. |
| 122 | (rgrep): Rename from grep-tree. Rework to use proper histories. | 458 | (rgrep): Rename from grep-tree. Rework to use proper histories. |
| 123 | Adapt to changes in defcustoms and functions above. | 459 | Adapt to changes in defcustoms and functions above. |
| 124 | (lgrep): New command, as grep, but using same interactive api as rgrep. | 460 | (lgrep): New command, as grep, but using same interactive UI as rgrep. |
| 125 | 461 | ||
| 126 | 2006-04-28 Michael Albinus <michael.albinus@gmx.de> | 462 | 2006-04-28 Michael Albinus <michael.albinus@gmx.de> |
| 127 | 463 | ||
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 @@ | |||
| 45 | :type '(choice (const :tag "default" nil) | 45 | :type '(choice (const :tag "default" nil) |
| 46 | string) | 46 | string) |
| 47 | :group 'change-log) | 47 | :group 'change-log) |
| 48 | (put 'change-log-default-name 'safe-local-variable | 48 | (put 'change-log-default-name 'safe-local-variable 'string-or-null-p) |
| 49 | (lambda (a) (or (stringp a) (null a)))) | ||
| 50 | 49 | ||
| 51 | (defcustom change-log-mode-hook nil | 50 | (defcustom change-log-mode-hook nil |
| 52 | "Normal hook run by `change-log-mode'." | 51 | "Normal hook run by `change-log-mode'." |
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index d699a78f8e8..9da83f1a635 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -480,10 +480,12 @@ Each descriptor is a vector of the form | |||
| 480 | (defsubst archive-name (suffix) | 480 | (defsubst archive-name (suffix) |
| 481 | (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) | 481 | (intern (concat "archive-" (symbol-name archive-subtype) "-" suffix))) |
| 482 | 482 | ||
| 483 | (defun archive-l-e (str &optional len) | 483 | (defun archive-l-e (str &optional len float) |
| 484 | "Convert little endian string/vector STR to integer. | 484 | "Convert little endian string/vector STR to integer. |
| 485 | Alternatively, STR may be a buffer position in the current buffer | 485 | Alternatively, STR may be a buffer position in the current buffer |
| 486 | in which case a second argument, length LEN, should be supplied." | 486 | in which case a second argument, length LEN, should be supplied. |
| 487 | FLOAT, if non-nil, means generate and return a float instead of an integer | ||
| 488 | \(use this for numbers that can overflow the Emacs integer)." | ||
| 487 | (if (stringp str) | 489 | (if (stringp str) |
| 488 | (setq len (length str)) | 490 | (setq len (length str)) |
| 489 | (setq str (buffer-substring str (+ str len)))) | 491 | (setq str (buffer-substring str (+ str len)))) |
| @@ -492,7 +494,8 @@ in which case a second argument, length LEN, should be supplied." | |||
| 492 | (i 0)) | 494 | (i 0)) |
| 493 | (while (< i len) | 495 | (while (< i len) |
| 494 | (setq i (1+ i) | 496 | (setq i (1+ i) |
| 495 | result (+ (ash result 8) (aref str (- len i))))) | 497 | result (+ (if float (* result 256.0) (ash result 8)) |
| 498 | (aref str (- len i))))) | ||
| 496 | result)) | 499 | result)) |
| 497 | 500 | ||
| 498 | (defun archive-int-to-mode (mode) | 501 | (defun archive-int-to-mode (mode) |
| @@ -882,7 +885,8 @@ using `make-temp-file', and the generated name is returned." | |||
| 882 | "Set the current buffer as if it were visiting FILENAME." | 885 | "Set the current buffer as if it were visiting FILENAME." |
| 883 | (save-excursion | 886 | (save-excursion |
| 884 | (goto-char (point-min)) | 887 | (goto-char (point-min)) |
| 885 | (let ((coding | 888 | (let ((buffer-undo-list t) |
| 889 | (coding | ||
| 886 | (or coding-system-for-read | 890 | (or coding-system-for-read |
| 887 | (and set-auto-coding-function | 891 | (and set-auto-coding-function |
| 888 | (save-excursion | 892 | (save-excursion |
| @@ -1355,13 +1359,14 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1355 | (fnlen (or (string-match "\0" namefld) 13)) | 1359 | (fnlen (or (string-match "\0" namefld) 13)) |
| 1356 | (efnname (decode-coding-string (substring namefld 0 fnlen) | 1360 | (efnname (decode-coding-string (substring namefld 0 fnlen) |
| 1357 | archive-file-name-coding-system)) | 1361 | archive-file-name-coding-system)) |
| 1358 | (csize (archive-l-e (+ p 15) 4)) | 1362 | ;; Convert to float to avoid overflow for very large files. |
| 1363 | (csize (archive-l-e (+ p 15) 4 'float)) | ||
| 1359 | (moddate (archive-l-e (+ p 19) 2)) | 1364 | (moddate (archive-l-e (+ p 19) 2)) |
| 1360 | (modtime (archive-l-e (+ p 21) 2)) | 1365 | (modtime (archive-l-e (+ p 21) 2)) |
| 1361 | (ucsize (archive-l-e (+ p 25) 4)) | 1366 | (ucsize (archive-l-e (+ p 25) 4 'float)) |
| 1362 | (fiddle (string= efnname (upcase efnname))) | 1367 | (fiddle (string= efnname (upcase efnname))) |
| 1363 | (ifnname (if fiddle (downcase efnname) efnname)) | 1368 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1364 | (text (format " %8d %-11s %-8s %s" | 1369 | (text (format " %8.0f %-11s %-8s %s" |
| 1365 | ucsize | 1370 | ucsize |
| 1366 | (archive-dosdate moddate) | 1371 | (archive-dosdate moddate) |
| 1367 | (archive-dostime modtime) | 1372 | (archive-dostime modtime) |
| @@ -1383,7 +1388,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1383 | dash) | 1388 | dash) |
| 1384 | (archive-summarize-files (nreverse visual)) | 1389 | (archive-summarize-files (nreverse visual)) |
| 1385 | (insert dash | 1390 | (insert dash |
| 1386 | (format " %8d %d file%s" | 1391 | (format " %8.0f %d file%s" |
| 1387 | totalsize | 1392 | totalsize |
| 1388 | (length files) | 1393 | (length files) |
| 1389 | (if (= 1 (length files)) "" "s")) | 1394 | (if (= 1 (length files)) "" "s")) |
| @@ -1416,9 +1421,10 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1416 | (while (progn (goto-char p) ;beginning of a base header. | 1421 | (while (progn (goto-char p) ;beginning of a base header. |
| 1417 | (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) | 1422 | (looking-at "\\(.\\|\n\\)\\(.\\|\n\\)-l[hz][0-9ds]-")) |
| 1418 | (let* ((hsize (byte-after p)) ;size of the base header (level 0 and 1) | 1423 | (let* ((hsize (byte-after p)) ;size of the base header (level 0 and 1) |
| 1419 | (csize (archive-l-e (+ p 7) 4)) ;size of a compressed file to follow (level 0 and 2), | 1424 | ;; Convert to float to avoid overflow for very large files. |
| 1425 | (csize (archive-l-e (+ p 7) 4 'float)) ;size of a compressed file to follow (level 0 and 2), | ||
| 1420 | ;size of extended headers + the compressed file to follow (level 1). | 1426 | ;size of extended headers + the compressed file to follow (level 1). |
| 1421 | (ucsize (archive-l-e (+ p 11) 4)) ;size of an uncompressed file. | 1427 | (ucsize (archive-l-e (+ p 11) 4 'float)) ;size of an uncompressed file. |
| 1422 | (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers | 1428 | (time1 (archive-l-e (+ p 15) 2)) ;date/time (MSDOS format in level 0, 1 headers |
| 1423 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) | 1429 | (time2 (archive-l-e (+ p 17) 2)) ;and UNIX format in level 2 header.) |
| 1424 | (hdrlvl (byte-after (+ p 20))) ;header level | 1430 | (hdrlvl (byte-after (+ p 20))) ;header level |
| @@ -1493,12 +1499,12 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1493 | (archive-unixtime time1 time2) | 1499 | (archive-unixtime time1 time2) |
| 1494 | (archive-dostime time1))) | 1500 | (archive-dostime time1))) |
| 1495 | (setq text (if archive-alternate-display | 1501 | (setq text (if archive-alternate-display |
| 1496 | (format " %8d %5S %5S %s" | 1502 | (format " %8.0f %5S %5S %s" |
| 1497 | ucsize | 1503 | ucsize |
| 1498 | (or uid "?") | 1504 | (or uid "?") |
| 1499 | (or gid "?") | 1505 | (or gid "?") |
| 1500 | ifnname) | 1506 | ifnname) |
| 1501 | (format " %10s %8d %-11s %-8s %s" | 1507 | (format " %10s %8.0f %-11s %-8s %s" |
| 1502 | modestr | 1508 | modestr |
| 1503 | ucsize | 1509 | ucsize |
| 1504 | moddate | 1510 | moddate |
| @@ -1527,8 +1533,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1527 | "M Length Uid Gid File\n" | 1533 | "M Length Uid Gid File\n" |
| 1528 | "M Filemode Length Date Time File\n")) | 1534 | "M Filemode Length Date Time File\n")) |
| 1529 | (sumline (if archive-alternate-display | 1535 | (sumline (if archive-alternate-display |
| 1530 | " %8d %d file%s" | 1536 | " %8.0f %d file%s" |
| 1531 | " %8d %d file%s"))) | 1537 | " %8.0f %d file%s"))) |
| 1532 | (insert header dash) | 1538 | (insert header dash) |
| 1533 | (archive-summarize-files (nreverse visual)) | 1539 | (archive-summarize-files (nreverse visual)) |
| 1534 | (insert dash | 1540 | (insert dash |
| @@ -1622,7 +1628,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1622 | ;; (method (archive-l-e (+ p 10) 2)) | 1628 | ;; (method (archive-l-e (+ p 10) 2)) |
| 1623 | (modtime (archive-l-e (+ p 12) 2)) | 1629 | (modtime (archive-l-e (+ p 12) 2)) |
| 1624 | (moddate (archive-l-e (+ p 14) 2)) | 1630 | (moddate (archive-l-e (+ p 14) 2)) |
| 1625 | (ucsize (archive-l-e (+ p 24) 4)) | 1631 | ;; Convert to float to avoid overflow for very large files. |
| 1632 | (ucsize (archive-l-e (+ p 24) 4 'float)) | ||
| 1626 | (fnlen (archive-l-e (+ p 28) 2)) | 1633 | (fnlen (archive-l-e (+ p 28) 2)) |
| 1627 | (exlen (archive-l-e (+ p 30) 2)) | 1634 | (exlen (archive-l-e (+ p 30) 2)) |
| 1628 | (fclen (archive-l-e (+ p 32) 2)) | 1635 | (fclen (archive-l-e (+ p 32) 2)) |
| @@ -1647,7 +1654,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1647 | (string= (upcase efnname) efnname))) | 1654 | (string= (upcase efnname) efnname))) |
| 1648 | (ifnname (if fiddle (downcase efnname) efnname)) | 1655 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1649 | (width (string-width ifnname)) | 1656 | (width (string-width ifnname)) |
| 1650 | (text (format " %10s %8d %-11s %-8s %s" | 1657 | (text (format " %10s %8.0f %-11s %-8s %s" |
| 1651 | modestr | 1658 | modestr |
| 1652 | ucsize | 1659 | ucsize |
| 1653 | (archive-dosdate moddate) | 1660 | (archive-dosdate moddate) |
| @@ -1673,7 +1680,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1673 | dash) | 1680 | dash) |
| 1674 | (archive-summarize-files (nreverse visual)) | 1681 | (archive-summarize-files (nreverse visual)) |
| 1675 | (insert dash | 1682 | (insert dash |
| 1676 | (format " %8d %d file%s" | 1683 | (format " %8.0f %d file%s" |
| 1677 | totalsize | 1684 | totalsize |
| 1678 | (length files) | 1685 | (length files) |
| 1679 | (if (= 1 (length files)) "" "s")) | 1686 | (if (= 1 (length files)) "" "s")) |
| @@ -1726,7 +1733,8 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1726 | (let* ((next (1+ (archive-l-e (+ p 6) 4))) | 1733 | (let* ((next (1+ (archive-l-e (+ p 6) 4))) |
| 1727 | (moddate (archive-l-e (+ p 14) 2)) | 1734 | (moddate (archive-l-e (+ p 14) 2)) |
| 1728 | (modtime (archive-l-e (+ p 16) 2)) | 1735 | (modtime (archive-l-e (+ p 16) 2)) |
| 1729 | (ucsize (archive-l-e (+ p 20) 4)) | 1736 | ;; Convert to float to avoid overflow for very large files. |
| 1737 | (ucsize (archive-l-e (+ p 20) 4 'float)) | ||
| 1730 | (namefld (buffer-substring (+ p 38) (+ p 38 13))) | 1738 | (namefld (buffer-substring (+ p 38) (+ p 38 13))) |
| 1731 | (dirtype (byte-after (+ p 4))) | 1739 | (dirtype (byte-after (+ p 4))) |
| 1732 | (lfnlen (if (= dirtype 2) (byte-after (+ p 56)) 0)) | 1740 | (lfnlen (if (= dirtype 2) (byte-after (+ p 56)) 0)) |
| @@ -1749,7 +1757,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1749 | (fiddle (and (= lfnlen 0) (string= efnname (upcase efnname)))) | 1757 | (fiddle (and (= lfnlen 0) (string= efnname (upcase efnname)))) |
| 1750 | (ifnname (if fiddle (downcase efnname) efnname)) | 1758 | (ifnname (if fiddle (downcase efnname) efnname)) |
| 1751 | (width (string-width ifnname)) | 1759 | (width (string-width ifnname)) |
| 1752 | (text (format " %8d %-11s %-8s %s" | 1760 | (text (format " %8.0f %-11s %-8s %s" |
| 1753 | ucsize | 1761 | ucsize |
| 1754 | (archive-dosdate moddate) | 1762 | (archive-dosdate moddate) |
| 1755 | (archive-dostime modtime) | 1763 | (archive-dostime modtime) |
| @@ -1771,7 +1779,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." | |||
| 1771 | dash) | 1779 | dash) |
| 1772 | (archive-summarize-files (nreverse visual)) | 1780 | (archive-summarize-files (nreverse visual)) |
| 1773 | (insert dash | 1781 | (insert dash |
| 1774 | (format " %8d %d file%s" | 1782 | (format " %8.0f %d file%s" |
| 1775 | totalsize | 1783 | totalsize |
| 1776 | (length files) | 1784 | (length files) |
| 1777 | (if (= 1 (length files)) "" "s")) | 1785 | (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., | |||
| 215 | of files. You may still sometimes want to revert them manually. | 215 | of files. You may still sometimes want to revert them manually. |
| 216 | 216 | ||
| 217 | Use this option with care since it could lead to excessive auto-reverts. | 217 | Use this option with care since it could lead to excessive auto-reverts. |
| 218 | For more information, see Info node `(emacs-xtra)Autorevert'." | 218 | For more information, see Info node `(emacs)Autorevert'." |
| 219 | :group 'auto-revert | 219 | :group 'auto-revert |
| 220 | :type 'boolean | 220 | :type 'boolean |
| 221 | :link '(info-link "(emacs-xtra)Autorevert")) | 221 | :link '(info-link "(emacs)Autorevert")) |
| 222 | 222 | ||
| 223 | (defcustom global-auto-revert-ignore-modes () | 223 | (defcustom global-auto-revert-ignore-modes () |
| 224 | "List of major modes Global Auto-Revert Mode should not check." | 224 | "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'." | |||
| 139 | (defun mouse-avoidance-point-position () | 139 | (defun mouse-avoidance-point-position () |
| 140 | "Return the position of point as (FRAME X . Y). | 140 | "Return the position of point as (FRAME X . Y). |
| 141 | Analogous to `mouse-position'." | 141 | Analogous to `mouse-position'." |
| 142 | (let* ((w (selected-window)) | 142 | (let ((edges (window-inside-edges)) |
| 143 | (edges (window-inside-edges w)) | 143 | (x-y (posn-x-y (posn-at-point)))) |
| 144 | (list | ||
| 145 | (compute-motion (max (window-start w) (point-min)) ; start pos | ||
| 146 | ;; window-start can be < point-min if the | ||
| 147 | ;; latter has changed since the last redisplay | ||
| 148 | '(0 . 0) ; start XY | ||
| 149 | (point) ; stop pos | ||
| 150 | nil ; stop XY: none | ||
| 151 | nil ; width | ||
| 152 | (cons (window-hscroll w) 0) ; 0 may not be right? | ||
| 153 | (selected-window)))) | ||
| 154 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) | ||
| 155 | ;; we want: (frame hpos . vpos) | ||
| 156 | (cons (selected-frame) | 144 | (cons (selected-frame) |
| 157 | (cons (+ (car edges) (car (cdr list))) | 145 | (cons (+ (car edges) |
| 158 | (+ (car (cdr edges)) (car (cdr (cdr list)))))))) | 146 | (/ (car x-y) (frame-char-width))) |
| 147 | (+ (car (cdr edges)) | ||
| 148 | (/ (cdr x-y) (frame-char-height))))))) | ||
| 159 | 149 | ||
| 160 | ;(defun mouse-avoidance-point-position-test () | 150 | ;(defun mouse-avoidance-point-position-test () |
| 161 | ; (interactive) | 151 | ; (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: | |||
| 386 | (when (re-search-forward | 386 | (when (re-search-forward |
| 387 | "temperature: +\\([0-9]+\\) C$" nil t) | 387 | "temperature: +\\([0-9]+\\) C$" nil t) |
| 388 | (match-string 1)))) | 388 | (match-string 1)))) |
| 389 | (when (file-exists-p | ||
| 390 | "/proc/acpi/thermal_zone/THR2/temperature") | ||
| 391 | (with-temp-buffer | ||
| 392 | (insert-file-contents | ||
| 393 | "/proc/acpi/thermal_zone/THR2/temperature") | ||
| 394 | (when (re-search-forward | ||
| 395 | "temperature: +\\([0-9]+\\) C$" nil t) | ||
| 396 | (match-string 1)))) | ||
| 389 | "N/A")) | 397 | "N/A")) |
| 390 | (cons ?r (or (and rate (concat (number-to-string rate) " " | 398 | (cons ?r (or (and rate (concat (number-to-string rate) " " |
| 391 | rate-type)) "N/A")) | 399 | rate-type)) "N/A")) |
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index adb94ef7381..e54a94e4d39 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el | |||
| @@ -206,6 +206,18 @@ | |||
| 206 | (defvar calc-embedded-firsttime-buf) | 206 | (defvar calc-embedded-firsttime-buf) |
| 207 | (defvar calc-embedded-firsttime-formula) | 207 | (defvar calc-embedded-firsttime-formula) |
| 208 | 208 | ||
| 209 | ;; The following is to take care of any minor modes which override | ||
| 210 | ;; a Calc command. | ||
| 211 | (defvar calc-override-minor-modes-map | ||
| 212 | (make-sparse-keymap) | ||
| 213 | "A list of keybindings that might be overwritten by minor modes.") | ||
| 214 | |||
| 215 | ;; Add any keys that might be overwritten here. | ||
| 216 | (define-key calc-override-minor-modes-map "`" 'calc-edit) | ||
| 217 | |||
| 218 | (defvar calc-override-minor-modes | ||
| 219 | (cons t calc-override-minor-modes-map)) | ||
| 220 | |||
| 209 | (defun calc-do-embedded (calc-embed-arg end obeg oend) | 221 | (defun calc-do-embedded (calc-embed-arg end obeg oend) |
| 210 | (if calc-embedded-info | 222 | (if calc-embedded-info |
| 211 | 223 | ||
| @@ -237,6 +249,8 @@ | |||
| 237 | truncate-lines (nth 2 mode) | 249 | truncate-lines (nth 2 mode) |
| 238 | buffer-read-only nil) | 250 | buffer-read-only nil) |
| 239 | (use-local-map (nth 1 mode)) | 251 | (use-local-map (nth 1 mode)) |
| 252 | (setq minor-mode-overriding-map-alist | ||
| 253 | (remq calc-override-minor-modes minor-mode-overriding-map-alist)) | ||
| 240 | (set-buffer-modified-p (buffer-modified-p)) | 254 | (set-buffer-modified-p (buffer-modified-p)) |
| 241 | (calc-embedded-restore-original-modes) | 255 | (calc-embedded-restore-original-modes) |
| 242 | (or calc-embedded-quiet | 256 | (or calc-embedded-quiet |
| @@ -297,6 +311,9 @@ | |||
| 297 | buffer-read-only t) | 311 | buffer-read-only t) |
| 298 | (set-buffer-modified-p (buffer-modified-p)) | 312 | (set-buffer-modified-p (buffer-modified-p)) |
| 299 | (use-local-map calc-mode-map) | 313 | (use-local-map calc-mode-map) |
| 314 | (setq minor-mode-overriding-map-alist | ||
| 315 | (cons calc-override-minor-modes | ||
| 316 | minor-mode-overriding-map-alist)) | ||
| 300 | (setq calc-no-refresh-evaltos nil) | 317 | (setq calc-no-refresh-evaltos nil) |
| 301 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) | 318 | (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos))) |
| 302 | (let (str) | 319 | (let (str) |
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." | |||
| 802 | ;; This doesn't use "e" because it is supposed to work | 802 | ;; This doesn't use "e" because it is supposed to work |
| 803 | ;; for events without parameters. | 803 | ;; for events without parameters. |
| 804 | (interactive (list last-input-event)) | 804 | (interactive (list last-input-event)) |
| 805 | (let ((pos (point))) | 805 | (when event |
| 806 | (if event (posn-set-point (event-end event))) | 806 | (posn-set-point (event-end event))) |
| 807 | (if (not (eq (get-char-property (point) 'field) 'input)) | 807 | (if comint-use-prompt-regexp |
| 808 | ;; No input at POS, fall back to the global definition. | 808 | (let ((input (funcall comint-get-old-input)) |
| 809 | (let* ((keys (this-command-keys)) | 809 | (process (get-buffer-process (current-buffer)))) |
| 810 | (last-key (and (vectorp keys) (aref keys (1- (length keys))))) | 810 | (if (not process) |
| 811 | (fun (and last-key (lookup-key global-map (vector last-key))))) | 811 | (error "Current buffer has no process") |
| 812 | (goto-char pos) | 812 | (goto-char (process-mark process)) |
| 813 | (and fun (call-interactively fun))) | 813 | (insert input))) |
| 814 | (setq pos (point)) | 814 | (let ((pos (point))) |
| 815 | ;; There's previous input at POS, insert it at the end of the buffer. | 815 | (if (not (eq (field-at-pos pos) 'input)) |
| 816 | (goto-char (point-max)) | 816 | ;; No input at POS, fall back to the global definition. |
| 817 | ;; First delete any old unsent input at the end | 817 | (let* ((keys (this-command-keys)) |
| 818 | (delete-region | 818 | (last-key (and (vectorp keys) (aref keys (1- (length keys))))) |
| 819 | (or (marker-position comint-accum-marker) | 819 | (fun (and last-key (lookup-key global-map (vector last-key))))) |
| 820 | (process-mark (get-buffer-process (current-buffer)))) | 820 | (and fun (call-interactively fun))) |
| 821 | (point)) | 821 | ;; There's previous input at POS, insert it at the end of the buffer. |
| 822 | ;; Insert the input at point | 822 | (goto-char (point-max)) |
| 823 | (insert (buffer-substring-no-properties | 823 | ;; First delete any old unsent input at the end |
| 824 | (previous-single-char-property-change (1+ pos) 'field) | 824 | (delete-region |
| 825 | (next-single-char-property-change pos 'field)))))) | 825 | (or (marker-position comint-accum-marker) |
| 826 | (process-mark (get-buffer-process (current-buffer)))) | ||
| 827 | (point)) | ||
| 828 | ;; Insert the input at point | ||
| 829 | (insert (field-string-no-properties pos)))))) | ||
| 826 | 830 | ||
| 827 | 831 | ||
| 828 | ;; Input history processing in a buffer | 832 | ;; Input history processing in a buffer |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index d6af9e999f5..79b142470d1 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -196,6 +196,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of | |||
| 196 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) | 196 | (suggest-key-bindings keyboard (choice (const :tag "off" nil) |
| 197 | (integer :tag "time" 2) | 197 | (integer :tag "time" 2) |
| 198 | (other :tag "on"))) | 198 | (other :tag "on"))) |
| 199 | ;; macselect.c | ||
| 200 | (mac-dnd-known-types mac (repeat string) "22.1") | ||
| 199 | ;; macterm.c | 201 | ;; macterm.c |
| 200 | (mac-control-modifier mac (choice (const :tag "No modifier" nil) | 202 | (mac-control-modifier mac (choice (const :tag "No modifier" nil) |
| 201 | (const control) (const meta) | 203 | (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." | |||
| 633 | "Convert unified diffs to context diffs. | 633 | "Convert unified diffs to context diffs. |
| 634 | START and END are either taken from the region (if a prefix arg is given) or | 634 | START and END are either taken from the region (if a prefix arg is given) or |
| 635 | else cover the whole bufer." | 635 | else cover the whole bufer." |
| 636 | (interactive (if current-prefix-arg | 636 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 637 | (list (mark) (point)) | 637 | (list (region-beginning) (region-end)) |
| 638 | (list (point-min) (point-max)))) | 638 | (list (point-min) (point-max)))) |
| 639 | (unless (markerp end) (setq end (copy-marker end))) | 639 | (unless (markerp end) (setq end (copy-marker end))) |
| 640 | (let (;;(diff-inhibit-after-change t) | 640 | (let (;;(diff-inhibit-after-change t) |
| @@ -722,7 +722,7 @@ START and END are either taken from the region | |||
| 722 | \(when it is highlighted) or else cover the whole buffer. | 722 | \(when it is highlighted) or else cover the whole buffer. |
| 723 | With a prefix argument, convert unified format to context format." | 723 | With a prefix argument, convert unified format to context format." |
| 724 | (interactive (if (and transient-mark-mode mark-active) | 724 | (interactive (if (and transient-mark-mode mark-active) |
| 725 | (list (mark) (point) current-prefix-arg) | 725 | (list (region-beginning) (region-end) current-prefix-arg) |
| 726 | (list (point-min) (point-max) current-prefix-arg))) | 726 | (list (point-min) (point-max) current-prefix-arg))) |
| 727 | (if to-context | 727 | (if to-context |
| 728 | (diff-unified->context start end) | 728 | (diff-unified->context start end) |
| @@ -795,8 +795,8 @@ With a prefix argument, convert unified format to context format." | |||
| 795 | "Reverse the direction of the diffs. | 795 | "Reverse the direction of the diffs. |
| 796 | START and END are either taken from the region (if a prefix arg is given) or | 796 | START and END are either taken from the region (if a prefix arg is given) or |
| 797 | else cover the whole bufer." | 797 | else cover the whole bufer." |
| 798 | (interactive (if current-prefix-arg | 798 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 799 | (list (mark) (point)) | 799 | (list (region-beginning) (region-end)) |
| 800 | (list (point-min) (point-max)))) | 800 | (list (point-min) (point-max)))) |
| 801 | (unless (markerp end) (setq end (copy-marker end))) | 801 | (unless (markerp end) (setq end (copy-marker end))) |
| 802 | (let (;;(diff-inhibit-after-change t) | 802 | (let (;;(diff-inhibit-after-change t) |
| @@ -857,8 +857,8 @@ else cover the whole bufer." | |||
| 857 | "Fixup the hunk headers (in case the buffer was modified). | 857 | "Fixup the hunk headers (in case the buffer was modified). |
| 858 | START and END are either taken from the region (if a prefix arg is given) or | 858 | START and END are either taken from the region (if a prefix arg is given) or |
| 859 | else cover the whole bufer." | 859 | else cover the whole bufer." |
| 860 | (interactive (if current-prefix-arg | 860 | (interactive (if (or current-prefix-arg (and transient-mark-mode mark-active)) |
| 861 | (list (mark) (point)) | 861 | (list (region-beginning) (region-end)) |
| 862 | (list (point-min) (point-max)))) | 862 | (list (point-min) (point-max)))) |
| 863 | (let ((inhibit-read-only t)) | 863 | (let ((inhibit-read-only t)) |
| 864 | (save-excursion | 864 | (save-excursion |
| @@ -1069,7 +1069,7 @@ Only works for unified diffs." | |||
| 1069 | 1069 | ||
| 1070 | (defun diff-hunk-text (hunk destp char-offset) | 1070 | (defun diff-hunk-text (hunk destp char-offset) |
| 1071 | "Return the literal source text from HUNK as (TEXT . OFFSET). | 1071 | "Return the literal source text from HUNK as (TEXT . OFFSET). |
| 1072 | if DESTP is nil TEXT is the source, otherwise the destination text. | 1072 | If DESTP is nil, TEXT is the source, otherwise the destination text. |
| 1073 | CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding | 1073 | CHAR-OFFSET is a char-offset in HUNK, and OFFSET is the corresponding |
| 1074 | char-offset in TEXT." | 1074 | char-offset in TEXT." |
| 1075 | (with-temp-buffer | 1075 | (with-temp-buffer |
| @@ -1302,7 +1302,7 @@ With a prefix argument, try to REVERSE the hunk." | |||
| 1302 | `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg | 1302 | `diff-jump-to-old-file' (or its opposite if the OTHER-FILE prefix arg |
| 1303 | is given) determines whether to jump to the old or the new file. | 1303 | is given) determines whether to jump to the old or the new file. |
| 1304 | If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) | 1304 | If the prefix arg is bigger than 8 (for example with \\[universal-argument] \\[universal-argument]) |
| 1305 | then `diff-jump-to-old-file' is also set, for the next invocations." | 1305 | then `diff-jump-to-old-file' is also set, for the next invocations." |
| 1306 | (interactive (list current-prefix-arg last-input-event)) | 1306 | (interactive (list current-prefix-arg last-input-event)) |
| 1307 | ;; When pointing at a removal line, we probably want to jump to | 1307 | ;; When pointing at a removal line, we probably want to jump to |
| 1308 | ;; the old location, and else to the new (i.e. as if reverting). | 1308 | ;; 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 | |||
| 918 | may have to reset some subdirectory switches after a `dired-undo'. | 918 | may have to reset some subdirectory switches after a `dired-undo'. |
| 919 | You can reset all subdirectory switches to the default using | 919 | You can reset all subdirectory switches to the default using |
| 920 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 920 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 921 | See Info node `(emacs-xtra)Subdir switches' for more details." | 921 | See Info node `(emacs)Subdir switches' for more details." |
| 922 | ;; Moves point if the next ARG files are redisplayed. | 922 | ;; Moves point if the next ARG files are redisplayed. |
| 923 | (interactive "P\np") | 923 | (interactive "P\np") |
| 924 | (if (and test-for-subdir (dired-get-subdir)) | 924 | (if (and test-for-subdir (dired-get-subdir)) |
| @@ -1761,7 +1761,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 1761 | may have to reset some subdirectory switches after a `dired-undo'. | 1761 | may have to reset some subdirectory switches after a `dired-undo'. |
| 1762 | You can reset all subdirectory switches to the default using | 1762 | You can reset all subdirectory switches to the default using |
| 1763 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 1763 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 1764 | See Info node `(emacs-xtra)Subdir switches' for more details." | 1764 | See Info node `(emacs)Subdir switches' for more details." |
| 1765 | (interactive | 1765 | (interactive |
| 1766 | (list (dired-get-filename) | 1766 | (list (dired-get-filename) |
| 1767 | (if current-prefix-arg | 1767 | (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 @@ | |||
| 210 | ediff-last-dir-B | 210 | ediff-last-dir-B |
| 211 | (file-name-directory f))) | 211 | (file-name-directory f))) |
| 212 | (progn | 212 | (progn |
| 213 | (setq file-name-history | 213 | (add-to-history 'file-name-history |
| 214 | (cons (ediff-abbreviate-file-name | 214 | (ediff-abbreviate-file-name |
| 215 | (expand-file-name | 215 | (expand-file-name |
| 216 | (file-name-nondirectory f) | 216 | (file-name-nondirectory f) |
| 217 | dir-B)) | 217 | dir-B))) |
| 218 | file-name-history)) | ||
| 219 | (ediff-get-default-file-name f 1))) | 218 | (ediff-get-default-file-name f 1))) |
| 220 | ))) | 219 | ))) |
| 221 | (ediff-files-internal file-A | 220 | (ediff-files-internal file-A |
| @@ -246,25 +245,22 @@ | |||
| 246 | ediff-last-dir-B | 245 | ediff-last-dir-B |
| 247 | (file-name-directory f))) | 246 | (file-name-directory f))) |
| 248 | (progn | 247 | (progn |
| 249 | (setq file-name-history | 248 | (add-to-history 'file-name-history |
| 250 | (cons | 249 | (ediff-abbreviate-file-name |
| 251 | (ediff-abbreviate-file-name | 250 | (expand-file-name |
| 252 | (expand-file-name | 251 | (file-name-nondirectory f) |
| 253 | (file-name-nondirectory f) | 252 | dir-B))) |
| 254 | dir-B)) | ||
| 255 | file-name-history)) | ||
| 256 | (ediff-get-default-file-name f 1)))) | 253 | (ediff-get-default-file-name f 1)))) |
| 257 | (ediff-read-file-name "File C to compare" | 254 | (ediff-read-file-name "File C to compare" |
| 258 | (setq dir-C (if ediff-use-last-dir | 255 | (setq dir-C (if ediff-use-last-dir |
| 259 | ediff-last-dir-C | 256 | ediff-last-dir-C |
| 260 | (file-name-directory ff))) | 257 | (file-name-directory ff))) |
| 261 | (progn | 258 | (progn |
| 262 | (setq file-name-history | 259 | (add-to-history 'file-name-history |
| 263 | (cons (ediff-abbreviate-file-name | 260 | (ediff-abbreviate-file-name |
| 264 | (expand-file-name | 261 | (expand-file-name |
| 265 | (file-name-nondirectory ff) | 262 | (file-name-nondirectory ff) |
| 266 | dir-C)) | 263 | dir-C))) |
| 267 | file-name-history)) | ||
| 268 | (ediff-get-default-file-name ff 2))) | 264 | (ediff-get-default-file-name ff 2))) |
| 269 | ))) | 265 | ))) |
| 270 | (ediff-files-internal file-A | 266 | (ediff-files-internal file-A |
| @@ -1109,12 +1105,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1109 | ediff-last-dir-B | 1105 | ediff-last-dir-B |
| 1110 | (file-name-directory f))) | 1106 | (file-name-directory f))) |
| 1111 | (progn | 1107 | (progn |
| 1112 | (setq file-name-history | 1108 | (add-to-history 'file-name-history |
| 1113 | (cons (ediff-abbreviate-file-name | 1109 | (ediff-abbreviate-file-name |
| 1114 | (expand-file-name | 1110 | (expand-file-name |
| 1115 | (file-name-nondirectory f) | 1111 | (file-name-nondirectory f) |
| 1116 | dir-B)) | 1112 | dir-B))) |
| 1117 | file-name-history)) | ||
| 1118 | (ediff-get-default-file-name f 1))) | 1113 | (ediff-get-default-file-name f 1))) |
| 1119 | ))) | 1114 | ))) |
| 1120 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) | 1115 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
| @@ -1153,13 +1148,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1153 | ediff-last-dir-B | 1148 | ediff-last-dir-B |
| 1154 | (file-name-directory f))) | 1149 | (file-name-directory f))) |
| 1155 | (progn | 1150 | (progn |
| 1156 | (setq file-name-history | 1151 | (add-to-history 'file-name-history |
| 1157 | (cons | 1152 | (ediff-abbreviate-file-name |
| 1158 | (ediff-abbreviate-file-name | 1153 | (expand-file-name |
| 1159 | (expand-file-name | 1154 | (file-name-nondirectory f) |
| 1160 | (file-name-nondirectory f) | 1155 | dir-B))) |
| 1161 | dir-B)) | ||
| 1162 | file-name-history)) | ||
| 1163 | (ediff-get-default-file-name f 1)))) | 1156 | (ediff-get-default-file-name f 1)))) |
| 1164 | (ediff-read-file-name "Ancestor file" | 1157 | (ediff-read-file-name "Ancestor file" |
| 1165 | (setq dir-ancestor | 1158 | (setq dir-ancestor |
| @@ -1167,12 +1160,11 @@ lines. For small regions, use `ediff-regions-wordwise'." | |||
| 1167 | ediff-last-dir-ancestor | 1160 | ediff-last-dir-ancestor |
| 1168 | (file-name-directory ff))) | 1161 | (file-name-directory ff))) |
| 1169 | (progn | 1162 | (progn |
| 1170 | (setq file-name-history | 1163 | (add-to-history 'file-name-history |
| 1171 | (cons (ediff-abbreviate-file-name | 1164 | (ediff-abbreviate-file-name |
| 1172 | (expand-file-name | 1165 | (expand-file-name |
| 1173 | (file-name-nondirectory ff) | 1166 | (file-name-nondirectory ff) |
| 1174 | dir-ancestor)) | 1167 | dir-ancestor))) |
| 1175 | file-name-history)) | ||
| 1176 | (ediff-get-default-file-name ff 2))) | 1168 | (ediff-get-default-file-name ff 2))) |
| 1177 | ))) | 1169 | ))) |
| 1178 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) | 1170 | (setq startup-hooks (cons 'ediff-merge-on-startup startup-hooks)) |
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 5a9787b5ca8..11d4d7fb2ba 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el | |||
| @@ -592,25 +592,28 @@ The return value of this function is a list of the read strings. | |||
| 592 | See the documentation for `completing-read' for details on the arguments: | 592 | See the documentation for `completing-read' for details on the arguments: |
| 593 | PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and | 593 | PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and |
| 594 | INHERIT-INPUT-METHOD." | 594 | INHERIT-INPUT-METHOD." |
| 595 | (let ((minibuffer-completion-table (function crm-collection-fn)) | 595 | (let* ((minibuffer-completion-table (function crm-collection-fn)) |
| 596 | (minibuffer-completion-predicate predicate) | 596 | (minibuffer-completion-predicate predicate) |
| 597 | ;; see completing_read in src/minibuf.c | 597 | ;; see completing_read in src/minibuf.c |
| 598 | (minibuffer-completion-confirm | 598 | (minibuffer-completion-confirm |
| 599 | (unless (eq require-match t) require-match)) | 599 | (unless (eq require-match t) require-match)) |
| 600 | (crm-completion-table table) | 600 | (crm-completion-table table) |
| 601 | crm-last-exact-completion | 601 | crm-last-exact-completion |
| 602 | crm-current-element | 602 | crm-current-element |
| 603 | crm-left-of-element | 603 | crm-left-of-element |
| 604 | crm-right-of-element | 604 | crm-right-of-element |
| 605 | crm-beginning-of-element | 605 | crm-beginning-of-element |
| 606 | crm-end-of-element | 606 | crm-end-of-element |
| 607 | (map (if require-match | 607 | (map (if require-match |
| 608 | crm-local-must-match-map | 608 | crm-local-must-match-map |
| 609 | crm-local-completion-map))) | 609 | crm-local-completion-map)) |
| 610 | (split-string (read-from-minibuffer | 610 | ;; If the user enters empty input, read-from-minibuffer returns |
| 611 | prompt initial-input map | 611 | ;; the empty string, not DEF. |
| 612 | nil hist def inherit-input-method) | 612 | (input (read-from-minibuffer |
| 613 | crm-separator))) | 613 | prompt initial-input map |
| 614 | nil hist def inherit-input-method))) | ||
| 615 | (and def (string-equal input "") (setq input def)) | ||
| 616 | (split-string input crm-separator))) | ||
| 614 | 617 | ||
| 615 | ;; testing and debugging | 618 | ;; testing and debugging |
| 616 | ;; (defun crm-init-test-environ () | 619 | ;; (defun crm-init-test-environ () |
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 | |||
| 139 | (setq body (list* lighter keymap body) lighter nil keymap nil)) | 139 | (setq body (list* lighter keymap body) lighter nil keymap nil)) |
| 140 | ((keywordp keymap) (push keymap body) (setq keymap nil))) | 140 | ((keywordp keymap) (push keymap body) (setq keymap nil))) |
| 141 | 141 | ||
| 142 | (let* ((mode-name (symbol-name mode)) | 142 | (let* ((last-message (current-message)) |
| 143 | (mode-name (symbol-name mode)) | ||
| 143 | (pretty-name (easy-mmode-pretty-mode-name mode lighter)) | 144 | (pretty-name (easy-mmode-pretty-mode-name mode lighter)) |
| 144 | (globalp nil) | 145 | (globalp nil) |
| 145 | (set nil) | 146 | (set nil) |
| @@ -236,7 +237,10 @@ With zero or negative ARG turn mode off. | |||
| 236 | (if (called-interactively-p) | 237 | (if (called-interactively-p) |
| 237 | (progn | 238 | (progn |
| 238 | ,(if globalp `(customize-mark-as-set ',mode)) | 239 | ,(if globalp `(customize-mark-as-set ',mode)) |
| 239 | (unless (current-message) | 240 | ;; Avoid overwriting a message shown by the body, |
| 241 | ;; but do overwrite previous messages. | ||
| 242 | (unless ,(and (current-message) | ||
| 243 | (not (equal last-message (current-message)))) | ||
| 240 | (message ,(format "%s %%sabled" pretty-name) | 244 | (message ,(format "%s %%sabled" pretty-name) |
| 241 | (if ,mode "en" "dis"))))) | 245 | (if ,mode "en" "dis"))))) |
| 242 | (force-mode-line-update) | 246 | (force-mode-line-update) |
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 085ae532a63..6ef14558a6a 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el | |||
| @@ -144,13 +144,6 @@ | |||
| 144 | 144 | ||
| 145 | \(fn NODE CHILD)") | 145 | \(fn NODE CHILD)") |
| 146 | 146 | ||
| 147 | (defun ewoc--dll-create () | ||
| 148 | "Create an empty doubly linked list." | ||
| 149 | (let ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST))) | ||
| 150 | (setf (ewoc--node-right dummy-node) dummy-node) | ||
| 151 | (setf (ewoc--node-left dummy-node) dummy-node) | ||
| 152 | dummy-node)) | ||
| 153 | |||
| 154 | (defun ewoc--node-enter-before (node elemnode) | 147 | (defun ewoc--node-enter-before (node elemnode) |
| 155 | "Insert ELEMNODE before NODE in a DLL." | 148 | "Insert ELEMNODE before NODE in a DLL." |
| 156 | (assert (and (null (ewoc--node-left elemnode)) (null (ewoc--node-right elemnode)))) | 149 | (assert (and (null (ewoc--node-left elemnode)) (null (ewoc--node-right elemnode)))) |
| @@ -159,14 +152,6 @@ | |||
| 159 | (setf (ewoc--node-right (ewoc--node-left node)) elemnode) | 152 | (setf (ewoc--node-right (ewoc--node-left node)) elemnode) |
| 160 | (setf (ewoc--node-left node) elemnode)) | 153 | (setf (ewoc--node-left node) elemnode)) |
| 161 | 154 | ||
| 162 | (defun ewoc--node-enter-first (dll node) | ||
| 163 | "Add a free floating NODE first in DLL." | ||
| 164 | (ewoc--node-enter-before (ewoc--node-right dll) node)) | ||
| 165 | |||
| 166 | (defun ewoc--node-enter-last (dll node) | ||
| 167 | "Add a free floating NODE last in DLL." | ||
| 168 | (ewoc--node-enter-before dll node)) | ||
| 169 | |||
| 170 | (defun ewoc--node-next (dll node) | 155 | (defun ewoc--node-next (dll node) |
| 171 | "Return the node after NODE, or nil if NODE is the last node." | 156 | "Return the node after NODE, or nil if NODE is the last node." |
| 172 | (unless (eq (ewoc--node-right node) dll) (ewoc--node-right node))) | 157 | (unless (eq (ewoc--node-right node) dll) (ewoc--node-right node))) |
| @@ -175,16 +160,6 @@ | |||
| 175 | "Return the node before NODE, or nil if NODE is the first node." | 160 | "Return the node before NODE, or nil if NODE is the first node." |
| 176 | (unless (eq (ewoc--node-left node) dll) (ewoc--node-left node))) | 161 | (unless (eq (ewoc--node-left node) dll) (ewoc--node-left node))) |
| 177 | 162 | ||
| 178 | (defun ewoc--node-delete (node) | ||
| 179 | "Unbind NODE from its doubly linked list and return it." | ||
| 180 | ;; This is a no-op when applied to the dummy node. This will return | ||
| 181 | ;; nil if applied to the dummy node since it always contains nil. | ||
| 182 | (setf (ewoc--node-right (ewoc--node-left node)) (ewoc--node-right node)) | ||
| 183 | (setf (ewoc--node-left (ewoc--node-right node)) (ewoc--node-left node)) | ||
| 184 | (setf (ewoc--node-left node) nil) | ||
| 185 | (setf (ewoc--node-right node) nil) | ||
| 186 | node) | ||
| 187 | |||
| 188 | (defun ewoc--node-nth (dll n) | 163 | (defun ewoc--node-nth (dll n) |
| 189 | "Return the Nth node from the doubly linked list DLL. | 164 | "Return the Nth node from the doubly linked list DLL. |
| 190 | N counts from zero. If DLL is not that long, nil is returned. | 165 | N counts from zero. If DLL is not that long, nil is returned. |
| @@ -221,16 +196,12 @@ dll bound to ewoc--dll, and VARLIST bound as in a let*. | |||
| 221 | dll will be bound when VARLIST is initialized, but the current | 196 | dll will be bound when VARLIST is initialized, but the current |
| 222 | buffer will *not* have been changed. | 197 | buffer will *not* have been changed. |
| 223 | Return value of last form in FORMS." | 198 | Return value of last form in FORMS." |
| 224 | (let ((old-buffer (make-symbol "old-buffer")) | 199 | (let ((hnd (make-symbol "ewoc"))) |
| 225 | (hnd (make-symbol "ewoc"))) | 200 | `(let* ((,hnd ,ewoc) |
| 226 | `(let* ((,old-buffer (current-buffer)) | ||
| 227 | (,hnd ,ewoc) | ||
| 228 | (dll (ewoc--dll ,hnd)) | 201 | (dll (ewoc--dll ,hnd)) |
| 229 | ,@varlist) | 202 | ,@varlist) |
| 230 | (set-buffer (ewoc--buffer ,hnd)) | 203 | (with-current-buffer (ewoc--buffer ,hnd) |
| 231 | (unwind-protect | 204 | ,@forms)))) |
| 232 | (progn ,@forms) | ||
| 233 | (set-buffer ,old-buffer))))) | ||
| 234 | 205 | ||
| 235 | (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) | 206 | (defmacro ewoc--set-buffer-bind-dll (ewoc &rest forms) |
| 236 | `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) | 207 | `(ewoc--set-buffer-bind-dll-let* ,ewoc nil ,@forms)) |
| @@ -261,26 +232,6 @@ start position and the element DATA." | |||
| 261 | (funcall pretty-printer data) | 232 | (funcall pretty-printer data) |
| 262 | (ewoc--node-create (copy-marker pos) data)))) | 233 | (ewoc--node-create (copy-marker pos) data)))) |
| 263 | 234 | ||
| 264 | |||
| 265 | (defun ewoc--delete-node-internal (ewoc node) | ||
| 266 | "Delete a data string from EWOC. | ||
| 267 | Can not be used on the footer. Return the wrapper that is deleted. | ||
| 268 | The start-marker in the wrapper is set to nil, so that it doesn't | ||
| 269 | consume any more resources." | ||
| 270 | (let ((dll (ewoc--dll ewoc)) | ||
| 271 | (inhibit-read-only t)) | ||
| 272 | ;; If we are about to delete the node pointed at by last-node, | ||
| 273 | ;; set last-node to nil. | ||
| 274 | (if (eq (ewoc--last-node ewoc) node) | ||
| 275 | (setf (ewoc--last-node ewoc) nil)) | ||
| 276 | |||
| 277 | (delete-region (ewoc--node-start-marker node) | ||
| 278 | (ewoc--node-start-marker (ewoc--node-next dll node))) | ||
| 279 | (set-marker (ewoc--node-start-marker node) nil) | ||
| 280 | ;; Delete the node, and return the wrapper. | ||
| 281 | (ewoc--node-delete node))) | ||
| 282 | |||
| 283 | |||
| 284 | (defun ewoc--refresh-node (pp node) | 235 | (defun ewoc--refresh-node (pp node) |
| 285 | "Redisplay the element represented by NODE using the pretty-printer PP." | 236 | "Redisplay the element represented by NODE using the pretty-printer PP." |
| 286 | (let ((inhibit-read-only t)) | 237 | (let ((inhibit-read-only t)) |
| @@ -313,19 +264,23 @@ Optional second argument HEADER is a string that will always be | |||
| 313 | present at the top of the ewoc. HEADER should end with a | 264 | present at the top of the ewoc. HEADER should end with a |
| 314 | newline. Optional third argument FOOTER is similar, and will | 265 | newline. Optional third argument FOOTER is similar, and will |
| 315 | be inserted at the bottom of the ewoc." | 266 | be inserted at the bottom of the ewoc." |
| 316 | (let ((new-ewoc | 267 | (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)) |
| 317 | (ewoc--create (current-buffer) | 268 | (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) |
| 318 | pretty-printer nil nil (ewoc--dll-create))) | 269 | (setf (ewoc--node-left dummy-node) dummy-node) |
| 319 | (pos (point))) | 270 | dummy-node)) |
| 271 | (new-ewoc | ||
| 272 | (ewoc--create (current-buffer) | ||
| 273 | pretty-printer nil nil dll)) | ||
| 274 | (pos (point))) | ||
| 320 | (ewoc--set-buffer-bind-dll new-ewoc | 275 | (ewoc--set-buffer-bind-dll new-ewoc |
| 321 | ;; Set default values | 276 | ;; Set default values |
| 322 | (unless header (setq header "")) | 277 | (unless header (setq header "")) |
| 323 | (unless footer (setq footer "")) | 278 | (unless footer (setq footer "")) |
| 324 | (setf (ewoc--node-start-marker dll) (copy-marker pos)) | 279 | (setf (ewoc--node-start-marker dll) (copy-marker pos)) |
| 325 | (let ((foot (ewoc--create-node footer (lambda (x) (insert footer)) pos)) | 280 | (let ((foot (ewoc--create-node footer 'insert pos)) |
| 326 | (head (ewoc--create-node header (lambda (x) (insert header)) pos))) | 281 | (head (ewoc--create-node header 'insert pos))) |
| 327 | (ewoc--node-enter-first dll head) | 282 | (ewoc--node-enter-before (ewoc--node-right dll) head) |
| 328 | (ewoc--node-enter-last dll foot) | 283 | (ewoc--node-enter-before dll foot) |
| 329 | (setf (ewoc--header new-ewoc) head) | 284 | (setf (ewoc--header new-ewoc) head) |
| 330 | (setf (ewoc--footer new-ewoc) foot))) | 285 | (setf (ewoc--footer new-ewoc) foot))) |
| 331 | ;; Return the ewoc | 286 | ;; Return the ewoc |
| @@ -421,11 +376,27 @@ ARGS are given they will be passed to the PREDICATE." | |||
| 421 | (ewoc--set-buffer-bind-dll-let* ewoc | 376 | (ewoc--set-buffer-bind-dll-let* ewoc |
| 422 | ((node (ewoc--node-nth dll 1)) | 377 | ((node (ewoc--node-nth dll 1)) |
| 423 | (footer (ewoc--footer ewoc)) | 378 | (footer (ewoc--footer ewoc)) |
| 424 | (next nil)) | 379 | (next nil) |
| 380 | (L nil) (R nil) | ||
| 381 | (inhibit-read-only t)) | ||
| 425 | (while (not (eq node footer)) | 382 | (while (not (eq node footer)) |
| 426 | (setq next (ewoc--node-next dll node)) | 383 | (setq next (ewoc--node-next dll node)) |
| 427 | (unless (apply predicate (ewoc--node-data node) args) | 384 | (unless (apply predicate (ewoc--node-data node) args) |
| 428 | (ewoc--delete-node-internal ewoc node)) | 385 | ;; If we are about to delete the node pointed at by last-node, |
| 386 | ;; set last-node to nil. | ||
| 387 | (if (eq (ewoc--last-node ewoc) node) | ||
| 388 | (setf (ewoc--last-node ewoc) nil)) | ||
| 389 | (delete-region (ewoc--node-start-marker node) | ||
| 390 | (ewoc--node-start-marker (ewoc--node-next dll node))) | ||
| 391 | (set-marker (ewoc--node-start-marker node) nil) | ||
| 392 | (setf L (ewoc--node-left node) | ||
| 393 | R (ewoc--node-right node) | ||
| 394 | ;; Link neighbors to each other. | ||
| 395 | (ewoc--node-right L) R | ||
| 396 | (ewoc--node-left R) L | ||
| 397 | ;; Forget neighbors. | ||
| 398 | (ewoc--node-left node) nil | ||
| 399 | (ewoc--node-right node) nil)) | ||
| 429 | (setq node next)))) | 400 | (setq node next)))) |
| 430 | 401 | ||
| 431 | (defun ewoc-locate (ewoc &optional pos guess) | 402 | (defun ewoc-locate (ewoc &optional pos guess) |
| @@ -601,8 +572,8 @@ Return nil if the buffer has been deleted." | |||
| 601 | "Set the HEADER and FOOTER of EWOC." | 572 | "Set the HEADER and FOOTER of EWOC." |
| 602 | (setf (ewoc--node-data (ewoc--header ewoc)) header) | 573 | (setf (ewoc--node-data (ewoc--header ewoc)) header) |
| 603 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) | 574 | (setf (ewoc--node-data (ewoc--footer ewoc)) footer) |
| 604 | (ewoc--refresh-node (lambda (x) (insert header)) (ewoc--header ewoc)) | 575 | (ewoc--refresh-node 'insert (ewoc--header ewoc)) |
| 605 | (ewoc--refresh-node (lambda (x) (insert footer)) (ewoc--footer ewoc))) | 576 | (ewoc--refresh-node 'insert (ewoc--footer ewoc))) |
| 606 | 577 | ||
| 607 | 578 | ||
| 608 | (provide 'ewoc) | 579 | (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 @@ | |||
| 112 | (if (not (fboundp 'make-overlay)) | 112 | (if (not (fboundp 'make-overlay)) |
| 113 | (require 'overlay)) | 113 | (require 'overlay)) |
| 114 | 114 | ||
| 115 | ;; User costomizable variables | 115 | ;; User customizable variables |
| 116 | (defgroup re-builder nil | 116 | (defgroup re-builder nil |
| 117 | "Options for the RE Builder." | 117 | "Options for the RE Builder." |
| 118 | :group 'lisp | 118 | :group 'lisp |
| @@ -627,11 +627,9 @@ Return t if the (cooked) expression changed." | |||
| 627 | beg (match-end 0))) | 627 | beg (match-end 0))) |
| 628 | i)) | 628 | i)) |
| 629 | 629 | ||
| 630 | |||
| 631 | (defun reb-update-overlays (&optional subexp) | 630 | (defun reb-update-overlays (&optional subexp) |
| 632 | "Switch to `reb-target-buffer' and mark all matches of `reb-regexp'. | 631 | "Switch to `reb-target-buffer' and mark all matches of `reb-regexp'. |
| 633 | If SUBEXP is non-nil mark only the corresponding sub-expressions." | 632 | If SUBEXP is non-nil mark only the corresponding sub-expressions." |
| 634 | |||
| 635 | (let* ((re (reb-target-binding reb-regexp)) | 633 | (let* ((re (reb-target-binding reb-regexp)) |
| 636 | (subexps (reb-count-subexps re)) | 634 | (subexps (reb-count-subexps re)) |
| 637 | (matches 0) | 635 | (matches 0) |
| @@ -645,24 +643,35 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." | |||
| 645 | (or (not reb-auto-match-limit) | 643 | (or (not reb-auto-match-limit) |
| 646 | (< matches reb-auto-match-limit))) | 644 | (< matches reb-auto-match-limit))) |
| 647 | (if (= 0 (length (match-string 0))) | 645 | (if (= 0 (length (match-string 0))) |
| 648 | (error "Empty regular expression!")) | 646 | (error "Empty regular expression!")) |
| 649 | (let ((i 0)) | 647 | (let ((i 0) |
| 648 | suffix max-suffix) | ||
| 650 | (setq matches (1+ matches)) | 649 | (setq matches (1+ matches)) |
| 651 | (while (<= i subexps) | 650 | (while (<= i subexps) |
| 652 | (if (and (or (not subexp) (= subexp i)) | 651 | (if (and (or (not subexp) (= subexp i)) |
| 653 | (match-beginning i)) | 652 | (match-beginning i)) |
| 654 | (let ((overlay (make-overlay (match-beginning i) | 653 | (let ((overlay (make-overlay (match-beginning i) |
| 655 | (match-end i))) | 654 | (match-end i))) |
| 656 | (face-name (format "reb-match-%d" i))) | 655 | ;; When we have exceeded the number of provided faces, |
| 657 | (if (not firstmatch) | 656 | ;; cycle thru them where `max-suffix' denotes the maximum |
| 658 | (setq firstmatch (match-data))) | 657 | ;; suffix for `reb-match-*' that has been defined and |
| 658 | ;; `suffix' the suffix calculated for the current match. | ||
| 659 | (face | ||
| 660 | (cond | ||
| 661 | (max-suffix | ||
| 662 | (if (= suffix max-suffix) | ||
| 663 | (setq suffix 1) | ||
| 664 | (setq suffix (1+ suffix))) | ||
| 665 | (intern-soft (format "reb-match-%d" suffix))) | ||
| 666 | ((intern-soft (format "reb-match-%d" i))) | ||
| 667 | ((setq max-suffix (1- i)) | ||
| 668 | (setq suffix 1) | ||
| 669 | ;; `reb-match-1' must exist. | ||
| 670 | 'reb-match-1)))) | ||
| 671 | (unless firstmatch (setq firstmatch (match-data))) | ||
| 659 | (setq reb-overlays (cons overlay reb-overlays) | 672 | (setq reb-overlays (cons overlay reb-overlays) |
| 660 | submatches (1+ submatches)) | 673 | submatches (1+ submatches)) |
| 661 | (overlay-put | 674 | (overlay-put overlay 'face face) |
| 662 | overlay 'face | ||
| 663 | (or (intern-soft face-name) | ||
| 664 | (error "Too many subexpressions - face `%s' not defined" | ||
| 665 | face-name ))) | ||
| 666 | (overlay-put overlay 'priority i))) | 675 | (overlay-put overlay 'priority i))) |
| 667 | (setq i (1+ i)))))) | 676 | (setq i (1+ i)))))) |
| 668 | (let ((count (if subexp submatches matches))) | 677 | (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 @@ | |||
| 27 | 27 | ||
| 28 | ;; The main exported function is `syntax-ppss'. You might also need | 28 | ;; The main exported function is `syntax-ppss'. You might also need |
| 29 | ;; to call `syntax-ppss-flush-cache' or to add it to | 29 | ;; to call `syntax-ppss-flush-cache' or to add it to |
| 30 | ;; after-change-functions'(although this is automatically done by | 30 | ;; before-change-functions'(although this is automatically done by |
| 31 | ;; syntax-ppss when needed, but that might fail if syntax-ppss is | 31 | ;; syntax-ppss when needed, but that might fail if syntax-ppss is |
| 32 | ;; called in a context where after-change-functions is temporarily | 32 | ;; called in a context where before-change-functions is temporarily |
| 33 | ;; let-bound to nil). | 33 | ;; let-bound to nil). |
| 34 | 34 | ||
| 35 | ;;; Todo: | 35 | ;;; Todo: |
| @@ -94,10 +94,9 @@ point (where the PPSS is equivalent to nil).") | |||
| 94 | (setq syntax-ppss-last nil) | 94 | (setq syntax-ppss-last nil) |
| 95 | (setcar syntax-ppss-last nil))) | 95 | (setcar syntax-ppss-last nil))) |
| 96 | ;; Unregister if there's no cache left. Sadly this doesn't work | 96 | ;; Unregister if there's no cache left. Sadly this doesn't work |
| 97 | ;; because `after-change-functions' is temporarily bound to nil here. | 97 | ;; because `before-change-functions' is temporarily bound to nil here. |
| 98 | ;; (unless syntax-ppss-cache | 98 | ;; (unless syntax-ppss-cache |
| 99 | ;; (remove-hook 'after-change-functions | 99 | ;; (remove-hook 'before-change-functions 'syntax-ppss-flush-cache t)) |
| 100 | ;; 'syntax-ppss-after-change-function t)) | ||
| 101 | ) | 100 | ) |
| 102 | 101 | ||
| 103 | (defvar syntax-ppss-stats | 102 | (defvar syntax-ppss-stats |
| @@ -148,7 +147,7 @@ Point is at POS when this function returns." | |||
| 148 | ;; too far from `pos', we could try to use other positions | 147 | ;; too far from `pos', we could try to use other positions |
| 149 | ;; in (nth 9 old-ppss), but that doesn't seem to happen in | 148 | ;; in (nth 9 old-ppss), but that doesn't seem to happen in |
| 150 | ;; practice and it would complicate this code (and the | 149 | ;; practice and it would complicate this code (and the |
| 151 | ;; after-change-function code even more). But maybe it | 150 | ;; before-change-function code even more). But maybe it |
| 152 | ;; would be useful in "degenerate" cases such as when the | 151 | ;; would be useful in "degenerate" cases such as when the |
| 153 | ;; whole file is wrapped in a set of parenthesis. | 152 | ;; whole file is wrapped in a set of parenthesis. |
| 154 | (setq pt-min (or (car (nth 9 old-ppss)) | 153 | (setq pt-min (or (car (nth 9 old-ppss)) |
| @@ -176,10 +175,10 @@ Point is at POS when this function returns." | |||
| 176 | (setq cache (cdr cache))) | 175 | (setq cache (cdr cache))) |
| 177 | (if cache (setq pt-min (caar cache) ppss (cdar cache))) | 176 | (if cache (setq pt-min (caar cache) ppss (cdar cache))) |
| 178 | 177 | ||
| 179 | ;; Setup the after-change function if necessary. | 178 | ;; Setup the before-change function if necessary. |
| 180 | (unless (or syntax-ppss-cache syntax-ppss-last) | 179 | (unless (or syntax-ppss-cache syntax-ppss-last) |
| 181 | (add-hook 'after-change-functions | 180 | (add-hook 'before-change-functions |
| 182 | 'syntax-ppss-flush-cache nil t)) | 181 | 'syntax-ppss-flush-cache t t)) |
| 183 | 182 | ||
| 184 | ;; Use the best of OLD-POS and CACHE. | 183 | ;; Use the best of OLD-POS and CACHE. |
| 185 | (if (or (not old-pos) (< old-pos pt-min)) | 184 | (if (or (not old-pos) (< old-pos pt-min)) |
diff --git a/lisp/env.el b/lisp/env.el index 1b6c038cbea..5a3de0ac712 100644 --- a/lisp/env.el +++ b/lisp/env.el | |||
| @@ -117,7 +117,7 @@ a side-effect." | |||
| 117 | (let* ((var (read-envvar-name "Set environment variable: " nil)) | 117 | (let* ((var (read-envvar-name "Set environment variable: " nil)) |
| 118 | (value (getenv var))) | 118 | (value (getenv var))) |
| 119 | (when value | 119 | (when value |
| 120 | (push value setenv-history)) | 120 | (add-to-history 'setenv-history value)) |
| 121 | ;; Here finally we specify the args to give call setenv with. | 121 | ;; Here finally we specify the args to give call setenv with. |
| 122 | (list var | 122 | (list var |
| 123 | (read-from-minibuffer (format "Set %s to value: " var) | 123 | (read-from-minibuffer (format "Set %s to value: " var) |
diff --git a/lisp/files.el b/lisp/files.el index 76167eb27cf..29cd3038500 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2349,31 +2349,29 @@ asking you for confirmation." | |||
| 2349 | ;; For variables defined in the C source code the declaration should go here: | 2349 | ;; For variables defined in the C source code the declaration should go here: |
| 2350 | 2350 | ||
| 2351 | ;; FIXME: Some variables should be moved according to the rules above. | 2351 | ;; FIXME: Some variables should be moved according to the rules above. |
| 2352 | (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) | 2352 | (mapc (lambda (pair) |
| 2353 | (eval | 2353 | (put (car pair) 'safe-local-variable (cdr pair))) |
| 2354 | `(mapc (lambda (pair) | 2354 | '((byte-compile-dynamic . booleanp) |
| 2355 | (put (car pair) 'safe-local-variable (cdr pair))) | 2355 | (byte-compile-dynamic-docstrings . booleanp) |
| 2356 | '((byte-compile-dynamic . t) | 2356 | (byte-compile-warnings . booleanp) |
| 2357 | (byte-compile-dynamic-docstrings . t) | 2357 | (c-basic-offset . integerp) |
| 2358 | (byte-compile-warnings . t) | 2358 | (c-file-style . stringp) |
| 2359 | (c-basic-offset . integerp) | 2359 | (c-indent-level . integerp) |
| 2360 | (c-file-style . stringp) | 2360 | (comment-column . integerp) |
| 2361 | (c-indent-level . integerp) | 2361 | (compile-command . string-or-null-p) |
| 2362 | (comment-column . integerp) | 2362 | (find-file-visit-truename . booleanp) |
| 2363 | (compile-command . string-or-null-p) | 2363 | (fill-column . integerp) |
| 2364 | (find-file-visit-truename . t) | 2364 | (fill-prefix . string-or-null-p) |
| 2365 | (fill-column . integerp) | 2365 | (indent-tabs-mode . booleanp) ;; C source code |
| 2366 | (fill-prefix . string-or-null-p) | 2366 | (kept-old-versions . integerp) |
| 2367 | (indent-tabs-mode . t) | 2367 | (kept-new-versions . integerp) |
| 2368 | (kept-old-versions . integerp) | 2368 | (left-margin . integerp) |
| 2369 | (kept-new-versions . integerp) | 2369 | (no-byte-compile . booleanp) |
| 2370 | (left-margin . t) | 2370 | (no-update-autoloads . booleanp) |
| 2371 | (no-byte-compile . t) | 2371 | (outline-regexp . string-or-null-p) |
| 2372 | (no-update-autoloads . t) | 2372 | (tab-width . integerp) ;; C source code |
| 2373 | (outline-regexp . string-or-null-p) | 2373 | (truncate-lines . booleanp) ;; C source code |
| 2374 | (tab-width . integerp) ;; C source code | 2374 | (version-control . symbolp))) |
| 2375 | (truncate-lines . t) ;; C source code | ||
| 2376 | (version-control . t))))) | ||
| 2377 | 2375 | ||
| 2378 | (put 'c-set-style 'safe-local-eval-function t) | 2376 | (put 'c-set-style 'safe-local-eval-function t) |
| 2379 | 2377 | ||
| @@ -3931,7 +3929,7 @@ user. In such situations, one has to be careful with potentially | |||
| 3931 | time consuming operations. | 3929 | time consuming operations. |
| 3932 | 3930 | ||
| 3933 | For more information on how this variable is used by Auto Revert mode, | 3931 | For more information on how this variable is used by Auto Revert mode, |
| 3934 | see Info node `(emacs-xtra)Supporting additional buffers'.") | 3932 | see Info node `(emacs)Supporting additional buffers'.") |
| 3935 | 3933 | ||
| 3936 | (defvar before-revert-hook nil | 3934 | (defvar before-revert-hook nil |
| 3937 | "Normal hook for `revert-buffer' to run before reverting. | 3935 | "Normal hook for `revert-buffer' to run before reverting. |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 83f7b542139..b16a0cc1096 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1975,17 +1975,17 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | |||
| 1975 | ;; | 1975 | ;; |
| 1976 | ;; (regexp-opt | 1976 | ;; (regexp-opt |
| 1977 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" | 1977 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" |
| 1978 | ;; "ifndef" "include" "line" "pragma" "undef")) | 1978 | ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning")) |
| 1979 | ;; | 1979 | ;; |
| 1980 | (defconst cpp-font-lock-keywords-source-directives | 1980 | (defconst cpp-font-lock-keywords-source-directives |
| 1981 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|nclude\\)\\|line\\|pragma\\|undef" | 1981 | "define\\|e\\(?:l\\(?:if\\|se\\)\\|ndif\\|rror\\)\\|file\\|i\\(?:f\\(?:n?def\\)?\\|mport\\|nclude\\)\\|line\\|pragma\\|undef\\|warning" |
| 1982 | "Regular expressoin used in `cpp-font-lock-keywords'.") | 1982 | "Regular expressoin used in `cpp-font-lock-keywords'.") |
| 1983 | 1983 | ||
| 1984 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: | 1984 | ;; `cpp-font-lock-keywords-source-depth' is calculated from: |
| 1985 | ;; | 1985 | ;; |
| 1986 | ;; (regexp-opt-depth (regexp-opt | 1986 | ;; (regexp-opt-depth (regexp-opt |
| 1987 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" | 1987 | ;; '("define" "elif" "else" "endif" "error" "file" "if" "ifdef" |
| 1988 | ;; "ifndef" "include" "line" "pragma" "undef"))) | 1988 | ;; "ifndef" "import" "include" "line" "pragma" "undef" "warning"))) |
| 1989 | ;; | 1989 | ;; |
| 1990 | (defconst cpp-font-lock-keywords-source-depth 0 | 1990 | (defconst cpp-font-lock-keywords-source-depth 0 |
| 1991 | "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. | 1991 | "An integer representing regular expression depth of `cpp-font-lock-keywords-source-directives'. |
| @@ -1997,7 +1997,7 @@ Used in `cpp-font-lock-keywords'.") | |||
| 1997 | (list | 1997 | (list |
| 1998 | ;; | 1998 | ;; |
| 1999 | ;; Fontify error directives. | 1999 | ;; Fontify error directives. |
| 2000 | '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) | 2000 | '("^#[ \t]*\\(?:error\\|warning\\)[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend) |
| 2001 | ;; | 2001 | ;; |
| 2002 | ;; Fontify filenames in #include <...> preprocessor directives as strings. | 2002 | ;; Fontify filenames in #include <...> preprocessor directives as strings. |
| 2003 | '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" | 2003 | '("^#[ \t]*\\(?:import\\|include\\)[ \t]*\\(<[^>\"\n]*>?\\)" |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index cecc180f522..7f0f248c7cf 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2006-05-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * mm-decode.el (mm-dissect-buffer): Remove spurious double assignment. | ||
| 4 | (mm-copy-to-buffer): Use with-current-buffer. | ||
| 5 | (mm-display-part): Simplify. | ||
| 6 | (mm-inlinable-p): Add optional arg `type'. | ||
| 7 | |||
| 8 | * gnus-art.el (gnus-mime-view-part-as-type): Add optional PRED | ||
| 9 | argument. | ||
| 10 | (gnus-mime-view-part-externally, gnus-mime-view-part-internally): | ||
| 11 | Try harder to show the attachment internally or externally using | ||
| 12 | gnus-mime-view-part-as-type. | ||
| 13 | |||
| 14 | 2006-05-04 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 15 | |||
| 16 | * gnus-art.el (gnus-mime-view-part-as-type-internal): Try to fetch | ||
| 17 | `filename' from Content-Disposition if Content-Type doesn't | ||
| 18 | provide `name'. | ||
| 19 | (gnus-mime-view-part-as-type): Set default instead of | ||
| 20 | initial-input. | ||
| 21 | |||
| 1 | 2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> | 22 | 2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 23 | ||
| 3 | * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made | 24 | * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7e3b843d500..208103f805d 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -4317,21 +4317,29 @@ Deleting parts may malfunction or destroy the article; continue? ") | |||
| 4317 | 4317 | ||
| 4318 | (defun gnus-mime-view-part-as-type-internal () | 4318 | (defun gnus-mime-view-part-as-type-internal () |
| 4319 | (gnus-article-check-buffer) | 4319 | (gnus-article-check-buffer) |
| 4320 | (let* ((name (mail-content-type-get | 4320 | (let* ((handle (get-text-property (point) 'gnus-data)) |
| 4321 | (mm-handle-type (get-text-property (point) 'gnus-data)) | 4321 | (name (or |
| 4322 | 'name)) | 4322 | ;; Content-Type: foo/bar; name=... |
| 4323 | (mail-content-type-get (mm-handle-type handle) 'name) | ||
| 4324 | ;; Content-Disposition: attachment; filename=... | ||
| 4325 | (cdr (assq 'filename (cdr (mm-handle-disposition handle)))))) | ||
| 4323 | (def-type (and name (mm-default-file-encoding name)))) | 4326 | (def-type (and name (mm-default-file-encoding name)))) |
| 4324 | (and def-type (cons def-type 0)))) | 4327 | (and def-type (cons def-type 0)))) |
| 4325 | 4328 | ||
| 4326 | (defun gnus-mime-view-part-as-type (&optional mime-type) | 4329 | (defun gnus-mime-view-part-as-type (&optional mime-type pred) |
| 4327 | "Choose a MIME media type, and view the part as such." | 4330 | "Choose a MIME media type, and view the part as such. |
| 4331 | If non-nil, PRED is a predicate to use during completion to limit the | ||
| 4332 | available media-types." | ||
| 4328 | (interactive) | 4333 | (interactive) |
| 4329 | (unless mime-type | 4334 | (unless mime-type |
| 4330 | (setq mime-type (completing-read | 4335 | (setq mime-type |
| 4331 | "View as MIME type: " | 4336 | (let ((default (gnus-mime-view-part-as-type-internal))) |
| 4332 | (mapcar #'list (mailcap-mime-types)) | 4337 | (completing-read |
| 4333 | nil nil | 4338 | (format "View as MIME type (default %s): " |
| 4334 | (gnus-mime-view-part-as-type-internal)))) | 4339 | (car default)) |
| 4340 | (mapcar #'list (mailcap-mime-types)) | ||
| 4341 | pred nil nil nil | ||
| 4342 | (car default))))) | ||
| 4335 | (gnus-article-check-buffer) | 4343 | (gnus-article-check-buffer) |
| 4336 | (let ((handle (get-text-property (point) 'gnus-data))) | 4344 | (let ((handle (get-text-property (point) 'gnus-data))) |
| 4337 | (when handle | 4345 | (when handle |
| @@ -4511,12 +4519,18 @@ specified charset." | |||
| 4511 | (mm-inlined-types nil) | 4519 | (mm-inlined-types nil) |
| 4512 | (mail-parse-charset gnus-newsgroup-charset) | 4520 | (mail-parse-charset gnus-newsgroup-charset) |
| 4513 | (mail-parse-ignored-charsets | 4521 | (mail-parse-ignored-charsets |
| 4514 | (save-excursion (set-buffer gnus-summary-buffer) | 4522 | (with-current-buffer gnus-summary-buffer |
| 4515 | gnus-newsgroup-ignored-charsets))) | 4523 | gnus-newsgroup-ignored-charsets)) |
| 4516 | (when handle | 4524 | (type (mm-handle-media-type handle)) |
| 4517 | (if (mm-handle-undisplayer handle) | 4525 | (method (mailcap-mime-info type)) |
| 4518 | (mm-remove-part handle) | 4526 | (mm-enable-external t)) |
| 4519 | (mm-display-part handle))))) | 4527 | (if (not (stringp method)) |
| 4528 | (gnus-mime-view-part-as-type | ||
| 4529 | nil (lambda (type) (stringp (mailcap-mime-info type)))) | ||
| 4530 | (when handle | ||
| 4531 | (if (mm-handle-undisplayer handle) | ||
| 4532 | (mm-remove-part handle) | ||
| 4533 | (mm-display-part handle)))))) | ||
| 4520 | 4534 | ||
| 4521 | (defun gnus-mime-view-part-internally (&optional handle) | 4535 | (defun gnus-mime-view-part-internally (&optional handle) |
| 4522 | "View the MIME part under point with an internal viewer. | 4536 | "View the MIME part under point with an internal viewer. |
| @@ -4528,13 +4542,16 @@ If no internal viewer is available, use an external viewer." | |||
| 4528 | (mm-inline-large-images t) | 4542 | (mm-inline-large-images t) |
| 4529 | (mail-parse-charset gnus-newsgroup-charset) | 4543 | (mail-parse-charset gnus-newsgroup-charset) |
| 4530 | (mail-parse-ignored-charsets | 4544 | (mail-parse-ignored-charsets |
| 4531 | (save-excursion (set-buffer gnus-summary-buffer) | 4545 | (with-current-buffer gnus-summary-buffer |
| 4532 | gnus-newsgroup-ignored-charsets)) | 4546 | gnus-newsgroup-ignored-charsets)) |
| 4533 | (inhibit-read-only t)) | 4547 | (inhibit-read-only t)) |
| 4534 | (when handle | 4548 | (if (not (mm-inlinable-p handle)) |
| 4535 | (if (mm-handle-undisplayer handle) | 4549 | (gnus-mime-view-part-as-type |
| 4536 | (mm-remove-part handle) | 4550 | nil (lambda (type) (mm-inlinable-p handle type))) |
| 4537 | (mm-display-part handle))))) | 4551 | (when handle |
| 4552 | (if (mm-handle-undisplayer handle) | ||
| 4553 | (mm-remove-part handle) | ||
| 4554 | (mm-display-part handle)))))) | ||
| 4538 | 4555 | ||
| 4539 | (defun gnus-mime-action-on-part (&optional action) | 4556 | (defun gnus-mime-action-on-part (&optional action) |
| 4540 | "Do something with the MIME attachment at \(point\)." | 4557 | "Do something with the MIME attachment at \(point\)." |
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index b79e081f0e1..c5fd5d3c258 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el | |||
| @@ -562,7 +562,7 @@ Postpone undisplaying of viewers for types in | |||
| 562 | description) | 562 | description) |
| 563 | (setq type (split-string (car ctl) "/")) | 563 | (setq type (split-string (car ctl) "/")) |
| 564 | (setq subtype (cadr type) | 564 | (setq subtype (cadr type) |
| 565 | type (pop type)) | 565 | type (car type)) |
| 566 | (setq | 566 | (setq |
| 567 | result | 567 | result |
| 568 | (cond | 568 | (cond |
| @@ -641,16 +641,15 @@ Postpone undisplaying of viewers for types in | |||
| 641 | 641 | ||
| 642 | (defun mm-copy-to-buffer () | 642 | (defun mm-copy-to-buffer () |
| 643 | "Copy the contents of the current buffer to a fresh buffer." | 643 | "Copy the contents of the current buffer to a fresh buffer." |
| 644 | (save-excursion | ||
| 645 | (let ((obuf (current-buffer)) | 644 | (let ((obuf (current-buffer)) |
| 646 | beg) | 645 | beg) |
| 647 | (goto-char (point-min)) | 646 | (goto-char (point-min)) |
| 648 | (search-forward-regexp "^\n" nil t) | 647 | (search-forward-regexp "^\n" nil t) |
| 649 | (setq beg (point)) | 648 | (setq beg (point)) |
| 650 | (set-buffer | 649 | (with-current-buffer |
| 651 | ;; Preserve the data's unibyteness (for url-insert-file-contents). | 650 | ;; Preserve the data's unibyteness (for url-insert-file-contents). |
| 652 | (let ((default-enable-multibyte-characters (mm-multibyte-p))) | 651 | (let ((default-enable-multibyte-characters (mm-multibyte-p))) |
| 653 | (generate-new-buffer " *mm*"))) | 652 | (generate-new-buffer " *mm*")) |
| 654 | (insert-buffer-substring obuf beg) | 653 | (insert-buffer-substring obuf beg) |
| 655 | (current-buffer)))) | 654 | (current-buffer)))) |
| 656 | 655 | ||
| @@ -701,7 +700,8 @@ external if displayed external." | |||
| 701 | (forward-line 1) | 700 | (forward-line 1) |
| 702 | (mm-insert-inline handle (mm-get-part handle)) | 701 | (mm-insert-inline handle (mm-get-part handle)) |
| 703 | 'inline) | 702 | 'inline) |
| 704 | (if (and method ;; If nil, we always use "save". | 703 | (setq external |
| 704 | (and method ;; If nil, we always use "save". | ||
| 705 | (stringp method) ;; 'mailcap-save-binary-file | 705 | (stringp method) ;; 'mailcap-save-binary-file |
| 706 | (or (eq mm-enable-external t) | 706 | (or (eq mm-enable-external t) |
| 707 | (and (eq mm-enable-external 'ask) | 707 | (and (eq mm-enable-external 'ask) |
| @@ -714,9 +714,7 @@ external if displayed external." | |||
| 714 | (concat | 714 | (concat |
| 715 | " \"" (format method filename) "\"") | 715 | " \"" (format method filename) "\"") |
| 716 | "") | 716 | "") |
| 717 | "? "))))) | 717 | "? ")))))) |
| 718 | (setq external t) | ||
| 719 | (setq external nil)) | ||
| 720 | (if external | 718 | (if external |
| 721 | (mm-display-external | 719 | (mm-display-external |
| 722 | handle (or method 'mailcap-save-binary-file)) | 720 | handle (or method 'mailcap-save-binary-file)) |
| @@ -1019,10 +1017,12 @@ external if displayed external." | |||
| 1019 | methods nil))) | 1017 | methods nil))) |
| 1020 | result)) | 1018 | result)) |
| 1021 | 1019 | ||
| 1022 | (defun mm-inlinable-p (handle) | 1020 | (defun mm-inlinable-p (handle &optional type) |
| 1023 | "Say whether HANDLE can be displayed inline." | 1021 | "Say whether HANDLE can be displayed inline. |
| 1022 | TYPE is the mime-type of the object; it defaults to the one given | ||
| 1023 | in HANDLE." | ||
| 1024 | (unless type (setq type (mm-handle-media-type handle))) | ||
| 1024 | (let ((alist mm-inline-media-tests) | 1025 | (let ((alist mm-inline-media-tests) |
| 1025 | (type (mm-handle-media-type handle)) | ||
| 1026 | test) | 1026 | test) |
| 1027 | (while alist | 1027 | (while alist |
| 1028 | (when (string-match (caar alist) type) | 1028 | (when (string-match (caar alist) type) |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 0a84f9b0c82..6264d2e56b5 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -325,9 +325,7 @@ directory, like `default-directory'." | |||
| 325 | :group 'ibuffer) | 325 | :group 'ibuffer) |
| 326 | 326 | ||
| 327 | (defcustom ibuffer-compressed-file-name-regexp | 327 | (defcustom ibuffer-compressed-file-name-regexp |
| 328 | (concat "\\.\\(" | 328 | "\\.\\(arj\\|bgz\\|bz2\\|gz\\|lzh\\|taz\\|tgz\\|zip\\|z\\)$" |
| 329 | (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z")) | ||
| 330 | "\\)$") | ||
| 331 | "Regexp to match compressed file names." | 329 | "Regexp to match compressed file names." |
| 332 | :type 'regexp | 330 | :type 'regexp |
| 333 | :group 'ibuffer) | 331 | :group 'ibuffer) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index c372880a5e6..356f6e9fbb1 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -826,21 +826,11 @@ NOPUSH is t and EDIT is t." | |||
| 826 | 826 | ||
| 827 | (defun isearch-update-ring (string &optional regexp) | 827 | (defun isearch-update-ring (string &optional regexp) |
| 828 | "Add STRING to the beginning of the search ring. | 828 | "Add STRING to the beginning of the search ring. |
| 829 | REGEXP says which ring to use." | 829 | REGEXP if non-nil says use the regexp search ring." |
| 830 | (if regexp | 830 | (add-to-history |
| 831 | (if (or (null regexp-search-ring) | 831 | (if regexp 'regexp-search-ring 'search-ring) |
| 832 | (not (string= string (car regexp-search-ring)))) | 832 | string |
| 833 | (progn | 833 | (if regexp regexp-search-ring-max search-ring-max))) |
| 834 | (push string regexp-search-ring) | ||
| 835 | (if (> (length regexp-search-ring) regexp-search-ring-max) | ||
| 836 | (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) | ||
| 837 | nil)))) | ||
| 838 | (if (or (null search-ring) | ||
| 839 | (not (string= string (car search-ring)))) | ||
| 840 | (progn | ||
| 841 | (push string search-ring) | ||
| 842 | (if (> (length search-ring) search-ring-max) | ||
| 843 | (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))) | ||
| 844 | 834 | ||
| 845 | ;; Switching buffers should first terminate isearch-mode. | 835 | ;; Switching buffers should first terminate isearch-mode. |
| 846 | ;; ;; For Emacs 19, the frame switch event is handled. | 836 | ;; ;; 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'.") | |||
| 349 | (defun kmacro-push-ring (&optional elt) | 349 | (defun kmacro-push-ring (&optional elt) |
| 350 | "Push ELT or current macro onto `kmacro-ring'." | 350 | "Push ELT or current macro onto `kmacro-ring'." |
| 351 | (when (setq elt (or elt (kmacro-ring-head))) | 351 | (when (setq elt (or elt (kmacro-ring-head))) |
| 352 | (let ((len (length kmacro-ring))) | 352 | (let ((history-delete-duplicates nil)) |
| 353 | (setq kmacro-ring (cons elt kmacro-ring)) | 353 | (add-to-history 'kmacro-ring elt kmacro-ring-max)))) |
| 354 | (if (>= len kmacro-ring-max) | ||
| 355 | (setcdr (nthcdr len kmacro-ring) nil))))) | ||
| 356 | 354 | ||
| 357 | 355 | ||
| 358 | (defun kmacro-split-ring-element (elt) | 356 | (defun kmacro-split-ring-element (elt) |
| @@ -377,11 +375,6 @@ Non-nil arg RAW means just return raw first element." | |||
| 377 | (kmacro-pop-ring1 raw))) | 375 | (kmacro-pop-ring1 raw))) |
| 378 | 376 | ||
| 379 | 377 | ||
| 380 | (defun kmacro-ring-length () | ||
| 381 | "Return length of macro ring, including pseudo head." | ||
| 382 | (+ (if last-kbd-macro 1 0) (length kmacro-ring))) | ||
| 383 | |||
| 384 | |||
| 385 | (defun kmacro-ring-empty-p (&optional none) | 378 | (defun kmacro-ring-empty-p (&optional none) |
| 386 | "Tell user and return t if `last-kbd-macro' is nil or `kmacro-ring' is empty. | 379 | "Tell user and return t if `last-kbd-macro' is nil or `kmacro-ring' is empty. |
| 387 | Check only `last-kbd-macro' if optional arg NONE is non-nil." | 380 | 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." | |||
| 577 | (let ((append (and arg (listp arg)))) | 570 | (let ((append (and arg (listp arg)))) |
| 578 | (unless append | 571 | (unless append |
| 579 | (if last-kbd-macro | 572 | (if last-kbd-macro |
| 580 | (let ((len (length kmacro-ring))) | 573 | (kmacro-push-ring |
| 581 | (setq kmacro-ring | 574 | (list last-kbd-macro kmacro-counter kmacro-counter-format-start))) |
| 582 | (cons | ||
| 583 | (list last-kbd-macro kmacro-counter kmacro-counter-format-start) | ||
| 584 | kmacro-ring)) | ||
| 585 | (if (>= len kmacro-ring-max) | ||
| 586 | (setcdr (nthcdr len kmacro-ring) nil)))) | ||
| 587 | (setq kmacro-counter (or (if arg (prefix-numeric-value arg)) | 575 | (setq kmacro-counter (or (if arg (prefix-numeric-value arg)) |
| 588 | kmacro-initial-counter-value | 576 | kmacro-initial-counter-value |
| 589 | 0) | 577 | 0) |
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 6e2bc5c8eb5..da95c93bb08 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el | |||
| @@ -6978,7 +6978,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 6978 | may have to reset some subdirectory switches after a `dired-undo'. | 6978 | may have to reset some subdirectory switches after a `dired-undo'. |
| 6979 | You can reset all subdirectory switches to the default using | 6979 | You can reset all subdirectory switches to the default using |
| 6980 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 6980 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 6981 | See Info node `(emacs-xtra)Subdir switches' for more details. | 6981 | See Info node `(emacs)Subdir switches' for more details. |
| 6982 | 6982 | ||
| 6983 | \(fn &optional ARG TEST-FOR-SUBDIR)" t nil) | 6983 | \(fn &optional ARG TEST-FOR-SUBDIR)" t nil) |
| 6984 | 6984 | ||
| @@ -7116,7 +7116,7 @@ or delete subdirectories can bypass this machinery. Hence, you sometimes | |||
| 7116 | may have to reset some subdirectory switches after a `dired-undo'. | 7116 | may have to reset some subdirectory switches after a `dired-undo'. |
| 7117 | You can reset all subdirectory switches to the default using | 7117 | You can reset all subdirectory switches to the default using |
| 7118 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. | 7118 | \\<dired-mode-map>\\[dired-reset-subdir-switches]. |
| 7119 | See Info node `(emacs-xtra)Subdir switches' for more details. | 7119 | See Info node `(emacs)Subdir switches' for more details. |
| 7120 | 7120 | ||
| 7121 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) | 7121 | \(fn DIRNAME &optional SWITCHES NO-ERROR-IF-NOT-DIR-P)" t nil) |
| 7122 | 7122 | ||
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 @@ | |||
| 1 | 2006-05-06 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | Release MH-E version 8.0. | ||
| 4 | |||
| 5 | * mh-e.el (Version, mh-version): Update for release 8.0. | ||
| 6 | |||
| 7 | 2006-05-05 Bill Wohler <wohler@newt.com> | ||
| 8 | |||
| 9 | * mh-e.el: Update commentary. | ||
| 10 | |||
| 1 | 2006-04-28 Bill Wohler <wohler@newt.com> | 11 | 2006-04-28 Bill Wohler <wohler@newt.com> |
| 2 | 12 | ||
| 3 | Release MH-E version 7.95. | 13 | 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 @@ | |||
| 6 | 6 | ||
| 7 | ;; Author: Bill Wohler <wohler@newt.com> | 7 | ;; Author: Bill Wohler <wohler@newt.com> |
| 8 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 8 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| 9 | ;; Version: 7.95 | 9 | ;; Version: 8.0 |
| 10 | ;; Keywords: mail | 10 | ;; Keywords: mail |
| 11 | 11 | ||
| 12 | ;; This file is part of GNU Emacs. | 12 | ;; This file is part of GNU Emacs. |
| @@ -28,6 +28,20 @@ | |||
| 28 | 28 | ||
| 29 | ;;; Commentary: | 29 | ;;; Commentary: |
| 30 | 30 | ||
| 31 | ;; MH-E is an Emacs interface to the MH mail system. | ||
| 32 | |||
| 33 | ;; MH-E is supported by GNU Emacs 21 and 22, as well as XEmacs 21 | ||
| 34 | ;; (except for versions 21.5.9-21.5.16). It is compatible with MH | ||
| 35 | ;; versions 6.8.4 and higher, all versions of nmh, and GNU mailutils | ||
| 36 | ;; 0.4 and higher. | ||
| 37 | |||
| 38 | ;; MH (Message Handler) is a powerful mail reader. See | ||
| 39 | ;; http://rand-mh.sourceforge.net/. | ||
| 40 | |||
| 41 | ;; N.B. MH must have been compiled with the MHE compiler flag or several | ||
| 42 | ;; features necessary for MH-E will be missing from MH commands, specifically | ||
| 43 | ;; the -build switch to repl and forw. | ||
| 44 | |||
| 31 | ;; How to use: | 45 | ;; How to use: |
| 32 | ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands. | 46 | ;; M-x mh-rmail to read mail. Type C-h m there for a list of commands. |
| 33 | ;; C-u M-x mh-rmail to visit any folder. | 47 | ;; C-u M-x mh-rmail to visit any folder. |
| @@ -44,23 +58,6 @@ | |||
| 44 | ;; If you want to customize MH-E before explicitly loading it, add this: | 58 | ;; If you want to customize MH-E before explicitly loading it, add this: |
| 45 | ;; (require 'mh-cus-load) | 59 | ;; (require 'mh-cus-load) |
| 46 | 60 | ||
| 47 | ;; MH (Message Handler) is a powerful mail reader. | ||
| 48 | |||
| 49 | ;; The MH newsgroup is comp.mail.mh; the mailing list is mh-users@ics.uci.edu | ||
| 50 | ;; (send to mh-users-request to be added). See the monthly Frequently Asked | ||
| 51 | ;; Questions posting there for information on getting MH and MH-E: | ||
| 52 | ;; http://www.faqs.org/faqs/mail/mh-faq/part1/preamble.html | ||
| 53 | |||
| 54 | ;; N.B. MH must have been compiled with the MHE compiler flag or several | ||
| 55 | ;; features necessary for MH-E will be missing from MH commands, specifically | ||
| 56 | ;; the -build switch to repl and forw. | ||
| 57 | |||
| 58 | ;; MH-E is an Emacs interface to the MH mail system. | ||
| 59 | |||
| 60 | ;; MH-E is supported in GNU Emacs 21 and 22 as well as XEmacs 21 | ||
| 61 | ;; (except for versions 21.5.9-21.5.16), with MH 6.8.4 on, nmh 1.0.4 | ||
| 62 | ;; on, and GNU mailutils 0.4 on. | ||
| 63 | |||
| 64 | ;; Mailing Lists: | 61 | ;; Mailing Lists: |
| 65 | ;; mh-e-users@lists.sourceforge.net | 62 | ;; mh-e-users@lists.sourceforge.net |
| 66 | ;; mh-e-announce@lists.sourceforge.net | 63 | ;; mh-e-announce@lists.sourceforge.net |
| @@ -136,7 +133,7 @@ | |||
| 136 | ;; Try to keep variables local to a single file. Provide accessors if | 133 | ;; Try to keep variables local to a single file. Provide accessors if |
| 137 | ;; variables are shared. Use this section as a last resort. | 134 | ;; variables are shared. Use this section as a last resort. |
| 138 | 135 | ||
| 139 | (defconst mh-version "7.95" "Version number of MH-E.") | 136 | (defconst mh-version "8.0" "Version number of MH-E.") |
| 140 | 137 | ||
| 141 | ;; Variants | 138 | ;; Variants |
| 142 | 139 | ||
diff --git a/lisp/msb.el b/lisp/msb.el index 95cbfc85df4..61ddce5dae0 100644 --- a/lisp/msb.el +++ b/lisp/msb.el | |||
| @@ -473,6 +473,11 @@ selects that window. | |||
| 473 | See the function `mouse-select-buffer' and the variable | 473 | See the function `mouse-select-buffer' and the variable |
| 474 | `msb-menu-cond' for more information about how the menus are split." | 474 | `msb-menu-cond' for more information about how the menus are split." |
| 475 | (interactive "e") | 475 | (interactive "e") |
| 476 | ;; If EVENT is a down-event, read and discard the | ||
| 477 | ;; corresponding up-event. | ||
| 478 | (and (eventp event) | ||
| 479 | (memq 'down (event-modifiers event)) | ||
| 480 | (read-event)) | ||
| 476 | (let ((old-window (selected-window)) | 481 | (let ((old-window (selected-window)) |
| 477 | (window (posn-window (event-start event)))) | 482 | (window (posn-window (event-start event)))) |
| 478 | (unless (framep window) (select-window window)) | 483 | (unless (framep window) (select-window window)) |
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." | |||
| 204 | (setq amt (* amt (event-click-count event)))) | 204 | (setq amt (* amt (event-click-count event)))) |
| 205 | (unwind-protect | 205 | (unwind-protect |
| 206 | (let ((button (mwheel-event-button event))) | 206 | (let ((button (mwheel-event-button event))) |
| 207 | (cond ((eq button mouse-wheel-down-event) (scroll-down amt)) | 207 | (cond ((eq button mouse-wheel-down-event) |
| 208 | ((eq button mouse-wheel-up-event) (scroll-up amt)) | 208 | (condition-case nil (scroll-down amt) |
| 209 | ;; Make sure we do indeed scroll to the beginning of | ||
| 210 | ;; the buffer. | ||
| 211 | (beginning-of-buffer | ||
| 212 | (unwind-protect | ||
| 213 | (scroll-down) | ||
| 214 | ;; If the first scroll succeeded, then some scrolling | ||
| 215 | ;; is possible: keep scrolling til the beginning but | ||
| 216 | ;; do not signal an error. For some reason, we have | ||
| 217 | ;; to do it even if the first scroll signalled an | ||
| 218 | ;; error, because otherwise the window is recentered | ||
| 219 | ;; for a reason that escapes me. This problem seems | ||
| 220 | ;; to only affect scroll-down. --Stef | ||
| 221 | (set-window-start (selected-window) (point-min)))))) | ||
| 222 | ((eq button mouse-wheel-up-event) | ||
| 223 | (condition-case nil (scroll-up amt) | ||
| 224 | ;; Make sure we do indeed scroll to the end of the buffer. | ||
| 225 | (end-of-buffer (while t (scroll-up))))) | ||
| 209 | (t (error "Bad binding in mwheel-scroll")))) | 226 | (t (error "Bad binding in mwheel-scroll")))) |
| 210 | (if curwin (select-window curwin)))) | 227 | (if curwin (select-window curwin)))) |
| 211 | (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time) | 228 | (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." | |||
| 4331 | "Add tramp file name handlers to `file-name-handler-alist'." | 4331 | "Add tramp file name handlers to `file-name-handler-alist'." |
| 4332 | (add-to-list 'file-name-handler-alist | 4332 | (add-to-list 'file-name-handler-alist |
| 4333 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) | 4333 | (cons tramp-file-name-regexp 'tramp-file-name-handler)) |
| 4334 | (when partial-completion-mode | 4334 | (when (or partial-completion-mode (featurep 'ido)) |
| 4335 | (add-to-list 'file-name-handler-alist | 4335 | (add-to-list 'file-name-handler-alist |
| 4336 | (cons tramp-completion-file-name-regexp | 4336 | (cons tramp-completion-file-name-regexp |
| 4337 | 'tramp-completion-file-name-handler)) | 4337 | 'tramp-completion-file-name-handler)) |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index a5163319fbf..a20f11e0aa2 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -114,8 +114,6 @@ Set to \"main\" at start if gdb-show-main is t.") | |||
| 114 | Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP) | 114 | Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP) |
| 115 | where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame | 115 | where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame |
| 116 | address for root variables.") | 116 | address for root variables.") |
| 117 | (defvar gdb-force-update t | ||
| 118 | "Non-nil means that view of watch expressions will be updated in the speedbar.") | ||
| 119 | (defvar gdb-main-file nil "Source file from which program execution begins.") | 117 | (defvar gdb-main-file nil "Source file from which program execution begins.") |
| 120 | (defvar gdb-overlay-arrow-position nil) | 118 | (defvar gdb-overlay-arrow-position nil) |
| 121 | (defvar gdb-server-prefix nil) | 119 | (defvar gdb-server-prefix nil) |
| @@ -527,7 +525,6 @@ With arg, use separate IO iff arg is positive." | |||
| 527 | gdb-current-language nil | 525 | gdb-current-language nil |
| 528 | gdb-frame-number nil | 526 | gdb-frame-number nil |
| 529 | gdb-var-list nil | 527 | gdb-var-list nil |
| 530 | gdb-force-update t | ||
| 531 | gdb-main-file nil | 528 | gdb-main-file nil |
| 532 | gdb-first-post-prompt t | 529 | gdb-first-post-prompt t |
| 533 | gdb-prompting nil | 530 | gdb-prompting nil |
| @@ -690,10 +687,14 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 690 | (if event (posn-set-point (event-end event))) | 687 | (if event (posn-set-point (event-end event))) |
| 691 | (require 'tooltip) | 688 | (require 'tooltip) |
| 692 | (save-selected-window | 689 | (save-selected-window |
| 693 | (let ((expr (if arg | 690 | (let ((expr |
| 694 | (completing-read "Name of variable: " | 691 | (if arg |
| 695 | 'gud-gdb-complete-command) | 692 | (completing-read "Name of variable: " |
| 696 | (tooltip-identifier-from-point (point))))) | 693 | 'gud-gdb-complete-command) |
| 694 | (if (and transient-mark-mode mark-active) | ||
| 695 | (buffer-substring (region-beginning) (region-end)) | ||
| 696 | (tooltip-identifier-from-point (point)))))) | ||
| 697 | (speedbar 1) | ||
| 697 | (catch 'already-watched | 698 | (catch 'already-watched |
| 698 | (dolist (var gdb-var-list) | 699 | (dolist (var gdb-var-list) |
| 699 | (unless (string-match "\\." (car var)) | 700 | (unless (string-match "\\." (car var)) |
| @@ -725,7 +726,6 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 725 | (match-string 3) | 726 | (match-string 3) |
| 726 | nil nil gdb-frame-address))) | 727 | nil nil gdb-frame-address))) |
| 727 | (push var gdb-var-list) | 728 | (push var gdb-var-list) |
| 728 | (speedbar 1) | ||
| 729 | (unless (string-equal | 729 | (unless (string-equal |
| 730 | speedbar-initial-expansion-list-name "GUD") | 730 | speedbar-initial-expansion-list-name "GUD") |
| 731 | (speedbar-change-initial-expansion-list "GUD")) | 731 | (speedbar-change-initial-expansion-list "GUD")) |
| @@ -741,13 +741,26 @@ With arg, enter name of variable to be watched in the minibuffer." | |||
| 741 | (message-box "Watching expressions requires gdb 6.0 onwards") | 741 | (message-box "Watching expressions requires gdb 6.0 onwards") |
| 742 | (message-box "No symbol \"%s\" in current context." expr)))) | 742 | (message-box "No symbol \"%s\" in current context." expr)))) |
| 743 | 743 | ||
| 744 | (defun gdb-speedbar-update () | ||
| 745 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 746 | ;; Dummy command to update speedbar even when idle. | ||
| 747 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-timer-fn)) | ||
| 748 | ;; Keep gdb-pending-triggers non-nil till end. | ||
| 749 | (push 'gdb-speedbar-timer gdb-pending-triggers))) | ||
| 750 | |||
| 751 | (defun gdb-speedbar-timer-fn () | ||
| 752 | (setq gdb-pending-triggers | ||
| 753 | (delq 'gdb-speedbar-timer gdb-pending-triggers)) | ||
| 754 | (speedbar-timer-fn)) | ||
| 755 | |||
| 744 | (defun gdb-var-evaluate-expression-handler (varnum changed) | 756 | (defun gdb-var-evaluate-expression-handler (varnum changed) |
| 745 | (goto-char (point-min)) | 757 | (goto-char (point-min)) |
| 746 | (re-search-forward ".*value=\\(\".*\"\\)" nil t) | 758 | (re-search-forward ".*value=\\(\".*\"\\)" nil t) |
| 747 | (let ((var (assoc varnum gdb-var-list))) | 759 | (let ((var (assoc varnum gdb-var-list))) |
| 748 | (when var | 760 | (when var |
| 749 | (if changed (setcar (nthcdr 5 var) 'changed)) | 761 | (if changed (setcar (nthcdr 5 var) 'changed)) |
| 750 | (setcar (nthcdr 4 var) (read (match-string 1)))))) | 762 | (setcar (nthcdr 4 var) (read (match-string 1))))) |
| 763 | (gdb-speedbar-update)) | ||
| 751 | 764 | ||
| 752 | (defun gdb-var-list-children (varnum) | 765 | (defun gdb-var-list-children (varnum) |
| 753 | (gdb-enqueue-input | 766 | (gdb-enqueue-input |
| @@ -811,21 +824,7 @@ type_changed=\".*?\".*?}") | |||
| 811 | varnum "\"\n") | 824 | varnum "\"\n") |
| 812 | `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))))) | 825 | `(lambda () (gdb-var-evaluate-expression-handler ,varnum t))))))) |
| 813 | (setq gdb-pending-triggers | 826 | (setq gdb-pending-triggers |
| 814 | (delq 'gdb-var-update gdb-pending-triggers)) | 827 | (delq 'gdb-var-update gdb-pending-triggers))) |
| 815 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 816 | ;; Dummy command to update speedbar at right time. | ||
| 817 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh)) | ||
| 818 | ;; Keep gdb-pending-triggers non-nil till end. | ||
| 819 | (push 'gdb-speedbar-refresh gdb-pending-triggers))) | ||
| 820 | |||
| 821 | (defun gdb-speedbar-refresh () | ||
| 822 | (setq gdb-pending-triggers | ||
| 823 | (delq 'gdb-speedbar-refresh gdb-pending-triggers)) | ||
| 824 | (with-current-buffer gud-comint-buffer | ||
| 825 | (let ((speedbar-verbosity-level 0) | ||
| 826 | (speedbar-shown-directories nil)) | ||
| 827 | (save-excursion | ||
| 828 | (speedbar-refresh))))) | ||
| 829 | 828 | ||
| 830 | (defun gdb-var-delete () | 829 | (defun gdb-var-delete () |
| 831 | "Delete watch expression at point from the speedbar." | 830 | "Delete watch expression at point from the speedbar." |
| @@ -1378,7 +1377,6 @@ happens to be appropriate." | |||
| 1378 | ;; FIXME: with GDB-6 on Darwin, this might very well work. | 1377 | ;; FIXME: with GDB-6 on Darwin, this might very well work. |
| 1379 | ;; Only needed/used with speedbar/watch expressions. | 1378 | ;; Only needed/used with speedbar/watch expressions. |
| 1380 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 1379 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) |
| 1381 | (setq gdb-force-update t) | ||
| 1382 | (if (string-equal gdb-version "pre-6.4") | 1380 | (if (string-equal gdb-version "pre-6.4") |
| 1383 | (gdb-var-update) | 1381 | (gdb-var-update) |
| 1384 | (gdb-var-update-1))))) | 1382 | (gdb-var-update-1))))) |
| @@ -1913,7 +1911,7 @@ static char *magick[] = { | |||
| 1913 | (let* ((buffer (find-file-noselect | 1911 | (let* ((buffer (find-file-noselect |
| 1914 | (if (file-exists-p file) file | 1912 | (if (file-exists-p file) file |
| 1915 | (cdr (assoc bptno gdb-location-alist))))) | 1913 | (cdr (assoc bptno gdb-location-alist))))) |
| 1916 | (window (unless (gdb-display-source-buffer buffer) | 1914 | (window (or (gdb-display-source-buffer buffer) |
| 1917 | (display-buffer buffer)))) | 1915 | (display-buffer buffer)))) |
| 1918 | (setq gdb-source-window window) | 1916 | (setq gdb-source-window window) |
| 1919 | (with-current-buffer buffer | 1917 | (with-current-buffer buffer |
| @@ -2691,7 +2689,7 @@ corresponding to the mode line clicked." | |||
| 2691 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer | 2689 | '(menu-item "Inferior IO" gdb-frame-separate-io-buffer |
| 2692 | :enable gdb-use-separate-io-buffer)) | 2690 | :enable gdb-use-separate-io-buffer)) |
| 2693 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) | 2691 | (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) |
| 2694 | (define-key menu [disassembly] '("Disassembiy" . gdb-frame-assembler-buffer)) | 2692 | (define-key menu [disassembly] '("Disassembly" . gdb-frame-assembler-buffer)) |
| 2695 | (define-key menu [breakpoints] | 2693 | (define-key menu [breakpoints] |
| 2696 | '("Breakpoints" . gdb-frame-breakpoints-buffer)) | 2694 | '("Breakpoints" . gdb-frame-breakpoints-buffer)) |
| 2697 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) | 2695 | (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) |
| @@ -2755,6 +2753,7 @@ corresponding to the mode line clicked." | |||
| 2755 | ;; Put buffer list in window if we | 2753 | ;; Put buffer list in window if we |
| 2756 | ;; can't find a source file. | 2754 | ;; can't find a source file. |
| 2757 | (list-buffers-noselect)))) | 2755 | (list-buffers-noselect)))) |
| 2756 | (setq gdb-source-window (selected-window)) | ||
| 2758 | (when gdb-use-separate-io-buffer | 2757 | (when gdb-use-separate-io-buffer |
| 2759 | (split-window-horizontally) | 2758 | (split-window-horizontally) |
| 2760 | (other-window 1) | 2759 | (other-window 1) |
| @@ -2782,6 +2781,7 @@ This arrangement depends on the value of `gdb-many-windows'." | |||
| 2782 | (if gud-last-last-frame | 2781 | (if gud-last-last-frame |
| 2783 | (gud-find-file (car gud-last-last-frame)) | 2782 | (gud-find-file (car gud-last-last-frame)) |
| 2784 | (gud-find-file gdb-main-file))) | 2783 | (gud-find-file gdb-main-file))) |
| 2784 | (setq gdb-source-window (selected-window)) | ||
| 2785 | (other-window 1)))) | 2785 | (other-window 1)))) |
| 2786 | 2786 | ||
| 2787 | (defun gdb-reset () | 2787 | (defun gdb-reset () |
| @@ -2803,8 +2803,6 @@ Kills the gdb buffers, and resets variables and the source buffers." | |||
| 2803 | (setq overlay-arrow-variable-list | 2803 | (setq overlay-arrow-variable-list |
| 2804 | (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) | 2804 | (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) |
| 2805 | (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) | 2805 | (setq fringe-indicator-alist '((overlay-arrow . right-triangle))) |
| 2806 | (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | ||
| 2807 | (speedbar-refresh)) | ||
| 2808 | (setq gud-running nil) | 2806 | (setq gud-running nil) |
| 2809 | (setq gdb-active-process nil) | 2807 | (setq gdb-active-process nil) |
| 2810 | (setq gdb-var-list nil) | 2808 | (setq gdb-var-list nil) |
| @@ -3163,7 +3161,9 @@ BUFFER nil or omitted means use the current buffer." | |||
| 3163 | (if (and (match-string 3) gud-overlay-arrow-position) | 3161 | (if (and (match-string 3) gud-overlay-arrow-position) |
| 3164 | (let ((buffer (marker-buffer gud-overlay-arrow-position)) | 3162 | (let ((buffer (marker-buffer gud-overlay-arrow-position)) |
| 3165 | (position (marker-position gud-overlay-arrow-position))) | 3163 | (position (marker-position gud-overlay-arrow-position))) |
| 3166 | (when (and buffer (string-equal (buffer-name buffer) (match-string 3))) | 3164 | (when (and buffer |
| 3165 | (string-equal (buffer-name buffer) | ||
| 3166 | (file-name-nondirectory (match-string 3)))) | ||
| 3167 | (with-current-buffer buffer | 3167 | (with-current-buffer buffer |
| 3168 | (setq fringe-indicator-alist | 3168 | (setq fringe-indicator-alist |
| 3169 | (if (string-equal gdb-frame-number "0") | 3169 | (if (string-equal gdb-frame-number "0") |
| @@ -3230,7 +3230,8 @@ numchild=\"\\(.+?\\)\",.*?value=\\(\".*?\"\\),.*?type=\"\\(.+?\\)\".*?}") | |||
| 3230 | (throw 'child-already-watched nil)) | 3230 | (throw 'child-already-watched nil)) |
| 3231 | (push varchild var-list)))) | 3231 | (push varchild var-list)))) |
| 3232 | (push var var-list))) | 3232 | (push var var-list))) |
| 3233 | (setq gdb-var-list (nreverse var-list))))) | 3233 | (setq gdb-var-list (nreverse var-list)))) |
| 3234 | (gdb-speedbar-update)) | ||
| 3234 | 3235 | ||
| 3235 | ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. | 3236 | ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. |
| 3236 | (defun gdb-var-update-1 () | 3237 | (defun gdb-var-update-1 () |
| @@ -3263,11 +3264,7 @@ in_scope=\"\\(.*?\\)\".*?}") | |||
| 3263 | (read (match-string 2))))))) | 3264 | (read (match-string 2))))))) |
| 3264 | (setq gdb-pending-triggers | 3265 | (setq gdb-pending-triggers |
| 3265 | (delq 'gdb-var-update gdb-pending-triggers)) | 3266 | (delq 'gdb-var-update gdb-pending-triggers)) |
| 3266 | (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) | 3267 | (gdb-speedbar-update)) |
| 3267 | ;; dummy command to update speedbar at right time | ||
| 3268 | (gdb-enqueue-input (list "server pwd\n" 'gdb-speedbar-refresh)) | ||
| 3269 | ;; keep gdb-pending-triggers non-nil till end | ||
| 3270 | (push 'gdb-speedbar-refresh gdb-pending-triggers))) | ||
| 3271 | 3268 | ||
| 3272 | ;; Registers buffer. | 3269 | ;; Registers buffer. |
| 3273 | ;; | 3270 | ;; |
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 0aba9d42b84..410a973d1b4 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -584,7 +584,7 @@ substitution string. Note dynamic scoping of variables.") | |||
| 584 | (setq command | 584 | (setq command |
| 585 | (replace-match | 585 | (replace-match |
| 586 | (or (if (symbolp (cdr kw)) | 586 | (or (if (symbolp (cdr kw)) |
| 587 | (eval (cdr kw)) | 587 | (symbol-value (cdr kw)) |
| 588 | (save-match-data (eval (cdr kw)))) | 588 | (save-match-data (eval (cdr kw)))) |
| 589 | "") | 589 | "") |
| 590 | t t command)))))) | 590 | t t command)))))) |
| @@ -639,9 +639,9 @@ The search is limited to file names matching shell pattern FILES. | |||
| 639 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 639 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 640 | entering `ch' is equivalent to `*.[ch]'. | 640 | entering `ch' is equivalent to `*.[ch]'. |
| 641 | 641 | ||
| 642 | With \\[universal-argument] prefix, allow user to edit the constructed | 642 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 643 | shell command line before it is executed. | 643 | before it is executed. |
| 644 | With two \\[universal-argument] prefixes, edit and run grep shell command. | 644 | With two \\[universal-argument] prefixes, directly edit and run `grep-command'. |
| 645 | 645 | ||
| 646 | Collect output in a buffer. While grep runs asynchronously, you | 646 | Collect output in a buffer. While grep runs asynchronously, you |
| 647 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] | 647 | 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]." | |||
| 676 | (setq command | 676 | (setq command |
| 677 | (read-from-minibuffer "Confirm: " | 677 | (read-from-minibuffer "Confirm: " |
| 678 | command nil nil 'grep-history)) | 678 | command nil nil 'grep-history)) |
| 679 | (push command grep-history)))) | 679 | (add-to-history 'grep-history command)))) |
| 680 | (when command | 680 | (when command |
| 681 | ;; Setting process-setup-function makes exit-message-function work | 681 | ;; Setting process-setup-function makes exit-message-function work |
| 682 | ;; even when async processes aren't supported. | 682 | ;; even when async processes aren't supported. |
| @@ -687,14 +687,14 @@ This command shares argument histories with \\[rgrep] and \\[grep]." | |||
| 687 | 687 | ||
| 688 | ;;;###autoload | 688 | ;;;###autoload |
| 689 | (defun rgrep (regexp &optional files dir) | 689 | (defun rgrep (regexp &optional files dir) |
| 690 | "Recusively grep for REGEXP in FILES in directory tree rooted at DIR. | 690 | "Recursively grep for REGEXP in FILES in directory tree rooted at DIR. |
| 691 | The search is limited to file names matching shell pattern FILES. | 691 | The search is limited to file names matching shell pattern FILES. |
| 692 | FILES may use abbreviations defined in `grep-files-aliases', e.g. | 692 | FILES may use abbreviations defined in `grep-files-aliases', e.g. |
| 693 | entering `ch' is equivalent to `*.[ch]'. | 693 | entering `ch' is equivalent to `*.[ch]'. |
| 694 | 694 | ||
| 695 | With \\[universal-argument] prefix, allow user to edit the constructed | 695 | With \\[universal-argument] prefix, you can edit the constructed shell command line |
| 696 | shell command line before it is executed. | 696 | before it is executed. |
| 697 | With two \\[universal-argument] prefixes, edit and run grep-find shell command. | 697 | With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'. |
| 698 | 698 | ||
| 699 | Collect output in a buffer. While find runs asynchronously, you | 699 | Collect output in a buffer. While find runs asynchronously, you |
| 700 | can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] | 700 | 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]." | |||
| 721 | (if (null files) | 721 | (if (null files) |
| 722 | (if (not (string= regexp grep-find-command)) | 722 | (if (not (string= regexp grep-find-command)) |
| 723 | (compilation-start regexp 'grep-mode)) | 723 | (compilation-start regexp 'grep-mode)) |
| 724 | (let* ((default-directory (file-name-as-directory (expand-file-name dir))) | 724 | (setq dir (file-name-as-directory (expand-file-name dir))) |
| 725 | (command (grep-expand-template | 725 | (let ((command (grep-expand-template |
| 726 | grep-find-template | 726 | grep-find-template |
| 727 | regexp | 727 | regexp |
| 728 | (concat "\\( -name " | 728 | (concat "\\( -name " |
| 729 | (mapconcat #'shell-quote-argument | 729 | (mapconcat #'shell-quote-argument |
| 730 | (split-string files) | 730 | (split-string files) |
| 731 | " -o -name ") | 731 | " -o -name ") |
| 732 | " \\)") | 732 | " \\)") |
| 733 | default-directory | 733 | dir |
| 734 | (and grep-find-ignored-directories | 734 | (and grep-find-ignored-directories |
| 735 | (concat "\\( -path '*/" | 735 | (concat "\\( -path '*/" |
| 736 | (mapconcat #'identity | 736 | (mapconcat #'identity |
| @@ -742,8 +742,12 @@ This command shares argument histories with \\[lgrep] and \\[grep-find]." | |||
| 742 | (setq command | 742 | (setq command |
| 743 | (read-from-minibuffer "Confirm: " | 743 | (read-from-minibuffer "Confirm: " |
| 744 | command nil nil 'grep-find-history)) | 744 | command nil nil 'grep-find-history)) |
| 745 | (push command grep-find-history)) | 745 | (add-to-history 'grep-find-history command)) |
| 746 | (compilation-start command 'grep-mode)))))) | 746 | (let ((default-directory dir)) |
| 747 | (compilation-start command 'grep-mode)) | ||
| 748 | ;; Set default-directory if we started rgrep in the *grep* buffer. | ||
| 749 | (if (eq next-error-last-buffer (current-buffer)) | ||
| 750 | (setq default-directory dir))))))) | ||
| 747 | 751 | ||
| 748 | 752 | ||
| 749 | (provide 'grep) | 753 | (provide 'grep) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 11259aa3965..5be88668353 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -49,7 +49,6 @@ | |||
| 49 | (defvar gdb-macro-info) | 49 | (defvar gdb-macro-info) |
| 50 | (defvar gdb-server-prefix) | 50 | (defvar gdb-server-prefix) |
| 51 | (defvar gdb-show-changed-values) | 51 | (defvar gdb-show-changed-values) |
| 52 | (defvar gdb-force-update) | ||
| 53 | (defvar gdb-var-list) | 52 | (defvar gdb-var-list) |
| 54 | (defvar gdb-speedbar-auto-raise) | 53 | (defvar gdb-speedbar-auto-raise) |
| 55 | (defvar tool-bar-map) | 54 | (defvar tool-bar-map) |
| @@ -442,37 +441,55 @@ required by the caller." | |||
| 442 | (buffer-name gud-comint-buffer)) | 441 | (buffer-name gud-comint-buffer)) |
| 443 | (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) | 442 | (let* ((minor-mode (with-current-buffer buffer gud-minor-mode)) |
| 444 | (window (get-buffer-window (current-buffer) 0)) | 443 | (window (get-buffer-window (current-buffer) 0)) |
| 444 | (start (window-start window)) | ||
| 445 | (p (window-point window))) | 445 | (p (window-point window))) |
| 446 | (cond | 446 | (cond |
| 447 | ((memq minor-mode '(gdbmi gdba)) | 447 | ((memq minor-mode '(gdbmi gdba)) |
| 448 | (when (or gdb-force-update | 448 | (erase-buffer) |
| 449 | (not (save-excursion | 449 | (insert "Watch Expressions:\n") |
| 450 | (goto-char (point-min)) | 450 | (if gdb-speedbar-auto-raise |
| 451 | (looking-at "Watch Expressions:")))) | 451 | (raise-frame speedbar-frame)) |
| 452 | (erase-buffer) | 452 | (let ((var-list gdb-var-list) parent) |
| 453 | (insert "Watch Expressions:\n") | 453 | (while var-list |
| 454 | (if gdb-speedbar-auto-raise | 454 | (let* (char (depth 0) (start 0) (var (car var-list)) |
| 455 | (raise-frame speedbar-frame)) | 455 | (varnum (car var)) (expr (nth 1 var)) |
| 456 | (let ((var-list gdb-var-list) parent) | 456 | (type (nth 3 var)) (value (nth 4 var)) |
| 457 | (while var-list | 457 | (status (nth 5 var))) |
| 458 | (let* (char (depth 0) (start 0) (var (car var-list)) | 458 | (put-text-property |
| 459 | (varnum (car var)) (expr (nth 1 var)) | 459 | 0 (length expr) 'face font-lock-variable-name-face expr) |
| 460 | (type (nth 3 var)) (value (nth 4 var)) | 460 | (put-text-property |
| 461 | (status (nth 5 var))) | 461 | 0 (length type) 'face font-lock-type-face type) |
| 462 | (put-text-property | 462 | (while (string-match "\\." varnum start) |
| 463 | 0 (length expr) 'face font-lock-variable-name-face expr) | 463 | (setq depth (1+ depth) |
| 464 | (put-text-property | 464 | start (1+ (match-beginning 0)))) |
| 465 | 0 (length type) 'face font-lock-type-face type) | 465 | (if (eq depth 0) (setq parent nil)) |
| 466 | (while (string-match "\\." varnum start) | 466 | (if (or (equal (nth 2 var) "0") |
| 467 | (setq depth (1+ depth) | 467 | (and (equal (nth 2 var) "1") |
| 468 | start (1+ (match-beginning 0)))) | 468 | (string-match "char \\*$" type))) |
| 469 | (if (eq depth 0) (setq parent nil)) | 469 | (speedbar-make-tag-line |
| 470 | (if (or (equal (nth 2 var) "0") | 470 | 'bracket ?? nil nil |
| 471 | (and (equal (nth 2 var) "1") | 471 | (concat expr "\t" value) |
| 472 | (string-match "char \\*$" type))) | 472 | (if (or parent (eq status 'out-of-scope)) |
| 473 | nil 'gdb-edit-value) | ||
| 474 | nil | ||
| 475 | (if gdb-show-changed-values | ||
| 476 | (or parent (case status | ||
| 477 | (changed 'font-lock-warning-face) | ||
| 478 | (out-of-scope 'shadow) | ||
| 479 | (t t))) | ||
| 480 | t) | ||
| 481 | depth) | ||
| 482 | (if (eq status 'out-of-scope) (setq parent 'shadow)) | ||
| 483 | (if (and (nth 1 var-list) | ||
| 484 | (string-match (concat varnum "\\.") | ||
| 485 | (car (nth 1 var-list)))) | ||
| 486 | (setq char ?-) | ||
| 487 | (setq char ?+)) | ||
| 488 | (if (string-match "\\*$" type) | ||
| 473 | (speedbar-make-tag-line | 489 | (speedbar-make-tag-line |
| 474 | 'bracket ?? nil nil | 490 | 'bracket char |
| 475 | (concat expr "\t" value) | 491 | 'gdb-speedbar-expand-node varnum |
| 492 | (concat expr "\t" type "\t" value) | ||
| 476 | (if (or parent (eq status 'out-of-scope)) | 493 | (if (or parent (eq status 'out-of-scope)) |
| 477 | nil 'gdb-edit-value) | 494 | nil 'gdb-edit-value) |
| 478 | nil | 495 | nil |
| @@ -483,37 +500,15 @@ required by the caller." | |||
| 483 | (t t))) | 500 | (t t))) |
| 484 | t) | 501 | t) |
| 485 | depth) | 502 | depth) |
| 486 | (if (eq status 'out-of-scope) (setq parent 'shadow)) | 503 | (speedbar-make-tag-line |
| 487 | (if (and (nth 1 var-list) | 504 | 'bracket char |
| 488 | (string-match (concat varnum "\\.") | 505 | 'gdb-speedbar-expand-node varnum |
| 489 | (car (nth 1 var-list)))) | 506 | (concat expr "\t" type) |
| 490 | (setq char ?-) | 507 | nil nil |
| 491 | (setq char ?+)) | 508 | (if (and (or parent status) gdb-show-changed-values) |
| 492 | (if (string-match "\\*$" type) | 509 | 'shadow t) |
| 493 | (speedbar-make-tag-line | 510 | depth)))) |
| 494 | 'bracket char | 511 | (setq var-list (cdr var-list))))) |
| 495 | 'gdb-speedbar-expand-node varnum | ||
| 496 | (concat expr "\t" type "\t" value) | ||
| 497 | (if (or parent (eq status 'out-of-scope)) | ||
| 498 | nil 'gdb-edit-value) | ||
| 499 | nil | ||
| 500 | (if gdb-show-changed-values | ||
| 501 | (or parent (case status | ||
| 502 | (changed 'font-lock-warning-face) | ||
| 503 | (out-of-scope 'shadow) | ||
| 504 | (t t))) | ||
| 505 | t) | ||
| 506 | depth) | ||
| 507 | (speedbar-make-tag-line | ||
| 508 | 'bracket char | ||
| 509 | 'gdb-speedbar-expand-node varnum | ||
| 510 | (concat expr "\t" type) | ||
| 511 | nil nil | ||
| 512 | (if (and (or parent status) gdb-show-changed-values) | ||
| 513 | 'shadow t) | ||
| 514 | depth)))) | ||
| 515 | (setq var-list (cdr var-list)))) | ||
| 516 | (setq gdb-force-update nil))) | ||
| 517 | (t (unless (and (save-excursion | 512 | (t (unless (and (save-excursion |
| 518 | (goto-char (point-min)) | 513 | (goto-char (point-min)) |
| 519 | (looking-at "Current Stack:")) | 514 | (looking-at "Current Stack:")) |
| @@ -544,6 +539,7 @@ required by the caller." | |||
| 544 | (t (error "Should never be here"))) | 539 | (t (error "Should never be here"))) |
| 545 | frame t)))) | 540 | frame t)))) |
| 546 | (setq gud-last-speedbar-stackframe gud-last-last-frame)))) | 541 | (setq gud-last-speedbar-stackframe gud-last-last-frame)))) |
| 542 | (set-window-start window start) | ||
| 547 | (set-window-point window p)))) | 543 | (set-window-point window p)))) |
| 548 | 544 | ||
| 549 | 545 | ||
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index 410875f2006..bdc8161c80f 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -1471,11 +1471,7 @@ Otherwise just move the line. Move down unless UP is non-nil." | |||
| 1471 | (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) | 1471 | (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) |
| 1472 | (if (and idlwave-shell-arrows-do-history | 1472 | (if (and idlwave-shell-arrows-do-history |
| 1473 | (>= (1+ (save-excursion (end-of-line) (point))) proc-pos)) | 1473 | (>= (1+ (save-excursion (end-of-line) (point))) proc-pos)) |
| 1474 | (progn | 1474 | (comint-previous-input arg) |
| 1475 | ;;(goto-char proc-pos) | ||
| 1476 | (goto-char (point-max)) | ||
| 1477 | ;;(and (not (eolp)) (kill-line nil)) | ||
| 1478 | (comint-previous-input arg)) | ||
| 1479 | (previous-line arg)))) | 1475 | (previous-line arg)))) |
| 1480 | 1476 | ||
| 1481 | (defun idlwave-shell-up-or-history (&optional arg) | 1477 | (defun idlwave-shell-up-or-history (&optional arg) |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 7a778766821..2f26c90ac21 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -1208,8 +1208,8 @@ As a user, you should not set this to t.") | |||
| 1208 | ;; Treats continuation lines, works only during whole buffer | 1208 | ;; Treats continuation lines, works only during whole buffer |
| 1209 | ;; fontification. Slow, use it only in fancy fontification. | 1209 | ;; fontification. Slow, use it only in fancy fontification. |
| 1210 | (keyword-parameters | 1210 | (keyword-parameters |
| 1211 | '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\\(\n[ \t]*;.*\\)*\n[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" | 1211 | '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" |
| 1212 | (5 font-lock-reference-face))) | 1212 | (6 font-lock-reference-face))) |
| 1213 | 1213 | ||
| 1214 | ;; System variables start with a bang. | 1214 | ;; System variables start with a bang. |
| 1215 | (system-variables | 1215 | (system-variables |
| @@ -1915,6 +1915,7 @@ The main features of this mode are | |||
| 1915 | 1915 | ||
| 1916 | (set (make-local-variable 'comment-start-skip) ";+[ \t]*") | 1916 | (set (make-local-variable 'comment-start-skip) ";+[ \t]*") |
| 1917 | (set (make-local-variable 'comment-start) ";") | 1917 | (set (make-local-variable 'comment-start) ";") |
| 1918 | (set (make-local-variable 'comment-add) 1) ; ";;" for new and regions | ||
| 1918 | (set (make-local-variable 'require-final-newline) t) | 1919 | (set (make-local-variable 'require-final-newline) t) |
| 1919 | (set (make-local-variable 'abbrev-all-caps) t) | 1920 | (set (make-local-variable 'abbrev-all-caps) t) |
| 1920 | (set (make-local-variable 'indent-tabs-mode) nil) | 1921 | (set (make-local-variable 'indent-tabs-mode) nil) |
| @@ -1947,6 +1948,10 @@ The main features of this mode are | |||
| 1947 | ;; Following line is for Emacs - XEmacs uses the corresponding property | 1948 | ;; Following line is for Emacs - XEmacs uses the corresponding property |
| 1948 | ;; on the `idlwave-mode' symbol. | 1949 | ;; on the `idlwave-mode' symbol. |
| 1949 | (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) | 1950 | (set (make-local-variable 'font-lock-defaults) idlwave-font-lock-defaults) |
| 1951 | (set (make-local-variable 'font-lock-mark-block-function) | ||
| 1952 | 'idlwave-mark-subprogram) | ||
| 1953 | (set (make-local-variable 'font-lock-fontify-region-function) | ||
| 1954 | 'idlwave-font-lock-fontify-region) | ||
| 1950 | 1955 | ||
| 1951 | ;; Imenu setup | 1956 | ;; Imenu setup |
| 1952 | (set (make-local-variable 'imenu-create-index-function) | 1957 | (set (make-local-variable 'imenu-create-index-function) |
| @@ -1956,6 +1961,15 @@ The main features of this mode are | |||
| 1956 | (set (make-local-variable 'imenu-prev-index-position-function) | 1961 | (set (make-local-variable 'imenu-prev-index-position-function) |
| 1957 | 'idlwave-prev-index-position) | 1962 | 'idlwave-prev-index-position) |
| 1958 | 1963 | ||
| 1964 | ;; HideShow setup | ||
| 1965 | (add-to-list 'hs-special-modes-alist | ||
| 1966 | (list 'idlwave-mode | ||
| 1967 | idlwave-begin-block-reg | ||
| 1968 | idlwave-end-block-reg | ||
| 1969 | ";" | ||
| 1970 | 'idlwave-forward-block nil)) | ||
| 1971 | |||
| 1972 | |||
| 1959 | ;; Make a local post-command-hook and add our hook to it | 1973 | ;; Make a local post-command-hook and add our hook to it |
| 1960 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 1974 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 1961 | ;; (make-local-hook 'post-command-hook) | 1975 | ;; (make-local-hook 'post-command-hook) |
| @@ -2000,16 +2014,22 @@ The main features of this mode are | |||
| 2000 | (idlwave-read-paths) ; we may need these early | 2014 | (idlwave-read-paths) ; we may need these early |
| 2001 | (setq idlwave-setup-done t))) | 2015 | (setq idlwave-setup-done t))) |
| 2002 | 2016 | ||
| 2017 | (defun idlwave-font-lock-fontify-region (beg end &optional verbose) | ||
| 2018 | "Fontify continuation lines correctly." | ||
| 2019 | (let (pos) | ||
| 2020 | (save-excursion | ||
| 2021 | (goto-char beg) | ||
| 2022 | (forward-line -1) | ||
| 2023 | (when (setq pos (idlwave-is-continuation-line)) | ||
| 2024 | (goto-char pos) | ||
| 2025 | (idlwave-beginning-of-statement) | ||
| 2026 | (setq beg (point))))) | ||
| 2027 | (font-lock-default-fontify-region beg end verbose)) | ||
| 2028 | |||
| 2003 | ;; | 2029 | ;; |
| 2004 | ;; Code Formatting ---------------------------------------------------- | 2030 | ;; Code Formatting ---------------------------------------------------- |
| 2005 | ;; | 2031 | ;; |
| 2006 | 2032 | ||
| 2007 | (defun idlwave-push-mark (&rest rest) | ||
| 2008 | "Push mark for compatibility with Emacs 18/19." | ||
| 2009 | (if (fboundp 'iconify-frame) | ||
| 2010 | (apply 'push-mark rest) | ||
| 2011 | (push-mark))) | ||
| 2012 | |||
| 2013 | (defun idlwave-hard-tab () | 2033 | (defun idlwave-hard-tab () |
| 2014 | "Inserts TAB in buffer in current position." | 2034 | "Inserts TAB in buffer in current position." |
| 2015 | (interactive) | 2035 | (interactive) |
| @@ -2403,7 +2423,7 @@ non-nil." | |||
| 2403 | (idlwave-end-of-statement) | 2423 | (idlwave-end-of-statement) |
| 2404 | (let ((end (point))) | 2424 | (let ((end (point))) |
| 2405 | (idlwave-beginning-of-statement) | 2425 | (idlwave-beginning-of-statement) |
| 2406 | (idlwave-push-mark end nil t))) | 2426 | (push-mark end nil t))) |
| 2407 | 2427 | ||
| 2408 | (defun idlwave-mark-block () | 2428 | (defun idlwave-mark-block () |
| 2409 | "Mark containing block." | 2429 | "Mark containing block." |
| @@ -2414,7 +2434,7 @@ non-nil." | |||
| 2414 | (let ((end (point))) | 2434 | (let ((end (point))) |
| 2415 | (idlwave-backward-block) | 2435 | (idlwave-backward-block) |
| 2416 | (idlwave-beginning-of-statement) | 2436 | (idlwave-beginning-of-statement) |
| 2417 | (idlwave-push-mark end nil t))) | 2437 | (push-mark end nil t))) |
| 2418 | 2438 | ||
| 2419 | 2439 | ||
| 2420 | (defun idlwave-mark-subprogram () | 2440 | (defun idlwave-mark-subprogram () |
| @@ -2425,7 +2445,7 @@ The marks are pushed." | |||
| 2425 | (idlwave-beginning-of-subprogram) | 2445 | (idlwave-beginning-of-subprogram) |
| 2426 | (let ((beg (point))) | 2446 | (let ((beg (point))) |
| 2427 | (idlwave-forward-block) | 2447 | (idlwave-forward-block) |
| 2428 | (idlwave-push-mark beg nil t)) | 2448 | (push-mark beg nil t)) |
| 2429 | (exchange-point-and-mark)) | 2449 | (exchange-point-and-mark)) |
| 2430 | 2450 | ||
| 2431 | (defun idlwave-backward-up-block (&optional arg) | 2451 | (defun idlwave-backward-up-block (&optional arg) |
| @@ -2446,11 +2466,12 @@ If prefix ARG < 0 then move forward to enclosing block end." | |||
| 2446 | (idlwave-block-jump-out 1 'nomark) | 2466 | (idlwave-block-jump-out 1 'nomark) |
| 2447 | (backward-word 1)) | 2467 | (backward-word 1)) |
| 2448 | 2468 | ||
| 2449 | (defun idlwave-forward-block () | 2469 | (defun idlwave-forward-block (&optional arg) |
| 2450 | "Move across next nested block." | 2470 | "Move across next nested block." |
| 2451 | (interactive) | 2471 | (interactive) |
| 2452 | (if (idlwave-down-block 1) | 2472 | (let ((arg (or arg 1))) |
| 2453 | (idlwave-block-jump-out 1 'nomark))) | 2473 | (if (idlwave-down-block arg) |
| 2474 | (idlwave-block-jump-out arg 'nomark)))) | ||
| 2454 | 2475 | ||
| 2455 | (defun idlwave-backward-block () | 2476 | (defun idlwave-backward-block () |
| 2456 | "Move backward across previous nested block." | 2477 | "Move backward across previous nested block." |
| @@ -2496,12 +2517,11 @@ The marks are pushed." | |||
| 2496 | (if (re-search-forward idlwave-doclib-end nil t) | 2517 | (if (re-search-forward idlwave-doclib-end nil t) |
| 2497 | (progn | 2518 | (progn |
| 2498 | (forward-line 1) | 2519 | (forward-line 1) |
| 2499 | (idlwave-push-mark beg nil t) | 2520 | (push-mark beg nil t) |
| 2500 | (message "Could not find end of doc library header."))) | 2521 | (message "Could not find end of doc library header."))) |
| 2501 | (message "Could not find doc library header start.") | 2522 | (message "Could not find doc library header start.") |
| 2502 | (goto-char here))))) | 2523 | (goto-char here))))) |
| 2503 | 2524 | ||
| 2504 | |||
| 2505 | (defun idlwave-current-routine () | 2525 | (defun idlwave-current-routine () |
| 2506 | "Return (NAME TYPE CLASS) of current routine." | 2526 | "Return (NAME TYPE CLASS) of current routine." |
| 2507 | (idlwave-routines) | 2527 | (idlwave-routines) |
| @@ -3194,13 +3214,14 @@ Skips any whitespace. Returns 0 if the end-of-line follows the whitespace." | |||
| 3194 | "Tests if current line is continuation line. | 3214 | "Tests if current line is continuation line. |
| 3195 | Blank or comment-only lines following regular continuation lines (with | 3215 | Blank or comment-only lines following regular continuation lines (with |
| 3196 | `$') count as continuations too." | 3216 | `$') count as continuations too." |
| 3197 | (save-excursion | 3217 | (let (p) |
| 3198 | (or | 3218 | (save-excursion |
| 3199 | (idlwave-look-at "\\<\\$") | 3219 | (or |
| 3200 | (catch 'loop | 3220 | (idlwave-look-at "\\<\\$") |
| 3201 | (while (and (looking-at "^[ \t]*\\(;.*\\)?$") | 3221 | (catch 'loop |
| 3202 | (eq (forward-line -1) 0)) | 3222 | (while (and (looking-at "^[ \t]*\\(;.*\\)?$") |
| 3203 | (if (idlwave-look-at "\\<\\$") (throw 'loop t))))))) | 3223 | (eq (forward-line -1) 0)) |
| 3224 | (if (setq p (idlwave-look-at "\\<\\$")) (throw 'loop p)))))))) | ||
| 3204 | 3225 | ||
| 3205 | (defun idlwave-is-comment-line () | 3226 | (defun idlwave-is-comment-line () |
| 3206 | "Tests if the current line is a comment line." | 3227 | "Tests if the current line is a comment line." |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 43b33aa39ae..4d63b07d87c 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -923,8 +923,9 @@ Returns new value of point in all cases." | |||
| 923 | (or arg (setq arg 1)) | 923 | (or arg (setq arg 1)) |
| 924 | (if (< arg 0) (forward-char 1)) | 924 | (if (< arg 0) (forward-char 1)) |
| 925 | (and (/= arg 0) | 925 | (and (/= arg 0) |
| 926 | (re-search-backward "^\\s(\\|^\\s-*sub\\b[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." | 926 | (re-search-backward |
| 927 | nil 'move arg) | 927 | "^\\s(\\|^\\s-*sub\\b[ \t\n]*\\_<[^{]+{\\|^\\s-*format\\b[^=]*=\\|^\\." |
| 928 | nil 'move arg) | ||
| 928 | (goto-char (1- (match-end 0)))) | 929 | (goto-char (1- (match-end 0)))) |
| 929 | (point)) | 930 | (point)) |
| 930 | 931 | ||
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." | |||
| 16723 | (progn (save-buffer) | 16723 | (progn (save-buffer) |
| 16724 | (kill-buffer (current-buffer)) | 16724 | (kill-buffer (current-buffer)) |
| 16725 | (set-buffer orig-buffer) | 16725 | (set-buffer orig-buffer) |
| 16726 | (setq file-name-history | 16726 | (add-to-history 'file-name-history makefile-path-name)) |
| 16727 | (cons makefile-path-name file-name-history))) | ||
| 16728 | (vhdl-warning-when-idle | 16727 | (vhdl-warning-when-idle |
| 16729 | (format "File not writable: \"%s\"" | 16728 | (format "File not writable: \"%s\"" |
| 16730 | (abbreviate-file-name makefile-path-name))) | 16729 | (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." | |||
| 580 | ;;;; Scheme expressions ring | 580 | ;;;; Scheme expressions ring |
| 581 | 581 | ||
| 582 | (defun xscheme-insert-expression (string) | 582 | (defun xscheme-insert-expression (string) |
| 583 | (setq xscheme-expressions-ring (cons string xscheme-expressions-ring)) | 583 | (setq xscheme-expressions-ring-yank-pointer |
| 584 | (if (> (length xscheme-expressions-ring) xscheme-expressions-ring-max) | 584 | (add-to-history 'xscheme-expressions-ring string |
| 585 | (setcdr (nthcdr (1- xscheme-expressions-ring-max) | 585 | xscheme-expressions-ring-max))) |
| 586 | xscheme-expressions-ring) | ||
| 587 | nil)) | ||
| 588 | (setq xscheme-expressions-ring-yank-pointer xscheme-expressions-ring)) | ||
| 589 | 586 | ||
| 590 | (defun xscheme-rotate-yank-pointer (arg) | 587 | (defun xscheme-rotate-yank-pointer (arg) |
| 591 | "Rotate the yanking point in the kill ring." | 588 | "Rotate the yanking point in the kill ring." |
diff --git a/lisp/replace.el b/lisp/replace.el index 3187bbbbd36..f1792b499fc 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1098,6 +1098,7 @@ See also `multi-occur'." | |||
| 1098 | (endpt nil) | 1098 | (endpt nil) |
| 1099 | (marker nil) | 1099 | (marker nil) |
| 1100 | (curstring "") | 1100 | (curstring "") |
| 1101 | (inhibit-field-text-motion t) | ||
| 1101 | (headerpt (with-current-buffer out-buf (point)))) | 1102 | (headerpt (with-current-buffer out-buf (point)))) |
| 1102 | (with-current-buffer buf | 1103 | (with-current-buffer buf |
| 1103 | (or coding | 1104 | (or coding |
diff --git a/lisp/server.el b/lisp/server.el index befcd22ad3a..43b2dc63389 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -411,7 +411,7 @@ so don't mark these buffers specially, just visit them normally." | |||
| 411 | ;; deleted file, offer to write it. | 411 | ;; deleted file, offer to write it. |
| 412 | (let* ((filen (car file)) | 412 | (let* ((filen (car file)) |
| 413 | (obuf (get-file-buffer filen))) | 413 | (obuf (get-file-buffer filen))) |
| 414 | (push filen file-name-history) | 414 | (add-to-history 'file-name-history filen) |
| 415 | (if (and obuf (set-buffer obuf)) | 415 | (if (and obuf (set-buffer obuf)) |
| 416 | (progn | 416 | (progn |
| 417 | (cond ((file-exists-p filen) | 417 | (cond ((file-exists-p filen) |
diff --git a/lisp/simple.el b/lisp/simple.el index 6b571aaba3f..9fc0770ad68 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1156,7 +1156,7 @@ they are expressions; otherwise they are strings. | |||
| 1156 | \(That convention is designed to do the right thing for | 1156 | \(That convention is designed to do the right thing for |
| 1157 | recursive uses of the minibuffer.)") | 1157 | recursive uses of the minibuffer.)") |
| 1158 | (setq minibuffer-history-variable 'minibuffer-history) | 1158 | (setq minibuffer-history-variable 'minibuffer-history) |
| 1159 | (setq minibuffer-history-position nil) | 1159 | (setq minibuffer-history-position nil) ;; Defvar is in C code. |
| 1160 | (defvar minibuffer-history-search-history nil) | 1160 | (defvar minibuffer-history-search-history nil) |
| 1161 | 1161 | ||
| 1162 | (defvar minibuffer-text-before-history nil | 1162 | (defvar minibuffer-text-before-history nil |
| @@ -1281,7 +1281,8 @@ makes the search case-sensitive." | |||
| 1281 | (defvar minibuffer-temporary-goal-position nil) | 1281 | (defvar minibuffer-temporary-goal-position nil) |
| 1282 | 1282 | ||
| 1283 | (defun next-history-element (n) | 1283 | (defun next-history-element (n) |
| 1284 | "Insert the next element of the minibuffer history into the minibuffer." | 1284 | "Puts next element of the minibuffer history in the minibuffer. |
| 1285 | With argument N, it uses the Nth following element." | ||
| 1285 | (interactive "p") | 1286 | (interactive "p") |
| 1286 | (or (zerop n) | 1287 | (or (zerop n) |
| 1287 | (let ((narg (- minibuffer-history-position n)) | 1288 | (let ((narg (- minibuffer-history-position n)) |
| @@ -1324,7 +1325,8 @@ makes the search case-sensitive." | |||
| 1324 | (goto-char (or minibuffer-temporary-goal-position (point-max)))))) | 1325 | (goto-char (or minibuffer-temporary-goal-position (point-max)))))) |
| 1325 | 1326 | ||
| 1326 | (defun previous-history-element (n) | 1327 | (defun previous-history-element (n) |
| 1327 | "Inserts the previous element of the minibuffer history into the minibuffer." | 1328 | "Puts previous element of the minibuffer history in the minibuffer. |
| 1329 | With argument N, it uses the Nth previous element." | ||
| 1328 | (interactive "p") | 1330 | (interactive "p") |
| 1329 | (next-history-element (- n))) | 1331 | (next-history-element (- n))) |
| 1330 | 1332 | ||
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." | |||
| 2529 | default-directory) | 2529 | default-directory) |
| 2530 | (speedbar-message nil)))) | 2530 | (speedbar-message nil)))) |
| 2531 | ;; Else, we can do a short cut. No text cache. | 2531 | ;; Else, we can do a short cut. No text cache. |
| 2532 | (let ((cbd (expand-file-name default-directory)) | 2532 | (let ((cbd (expand-file-name default-directory))) |
| 2533 | ) | ||
| 2534 | (set-buffer speedbar-buffer) | 2533 | (set-buffer speedbar-buffer) |
| 2535 | (speedbar-with-writable | 2534 | (speedbar-with-writable |
| 2536 | (let* ((window (get-buffer-window speedbar-buffer 0)) | 2535 | (let* ((window (get-buffer-window speedbar-buffer 0)) |
| @@ -2542,8 +2541,7 @@ name will have the function FIND-FUN and not token." | |||
| 2542 | (funcall func cbd 0)) | 2541 | (funcall func cbd 0)) |
| 2543 | (speedbar-reconfigure-keymaps) | 2542 | (speedbar-reconfigure-keymaps) |
| 2544 | (set-window-point window p) | 2543 | (set-window-point window p) |
| 2545 | (set-window-start window start))) | 2544 | (set-window-start window start))))))) |
| 2546 | )))) | ||
| 2547 | 2545 | ||
| 2548 | (defun speedbar-update-directory-contents () | 2546 | (defun speedbar-update-directory-contents () |
| 2549 | "Update the contents of the speedbar buffer based on the current directory." | 2547 | "Update the contents of the speedbar buffer based on the current directory." |
| @@ -2677,7 +2675,6 @@ Also resets scanner functions." | |||
| 2677 | (frame-visible-p (speedbar-current-frame)) | 2675 | (frame-visible-p (speedbar-current-frame)) |
| 2678 | (not (eq (frame-visible-p (speedbar-current-frame)) 'icon))) | 2676 | (not (eq (frame-visible-p (speedbar-current-frame)) 'icon))) |
| 2679 | (let ((af (selected-frame))) | 2677 | (let ((af (selected-frame))) |
| 2680 | (save-window-excursion | ||
| 2681 | (dframe-select-attached-frame speedbar-frame) | 2678 | (dframe-select-attached-frame speedbar-frame) |
| 2682 | ;; make sure we at least choose a window to | 2679 | ;; make sure we at least choose a window to |
| 2683 | ;; get a good directory from | 2680 | ;; get a good directory from |
| @@ -2704,14 +2701,8 @@ Also resets scanner functions." | |||
| 2704 | "Updating speedbar to special mode: %s...done" | 2701 | "Updating speedbar to special mode: %s...done" |
| 2705 | major-mode) | 2702 | major-mode) |
| 2706 | (speedbar-message nil)))) | 2703 | (speedbar-message nil)))) |
| 2707 | ;; Update all the contents if directories change! | 2704 | (speedbar-update-localized-contents)) |
| 2708 | (if (or (member major-mode speedbar-ignored-modes) | 2705 | (select-frame af)) |
| 2709 | (eq af (speedbar-current-frame)) | ||
| 2710 | (not (buffer-file-name))) | ||
| 2711 | nil | ||
| 2712 | (speedbar-update-localized-contents) | ||
| 2713 | )) | ||
| 2714 | (select-frame af))) | ||
| 2715 | ;; Now run stealthy updates of time-consuming items | 2706 | ;; Now run stealthy updates of time-consuming items |
| 2716 | (speedbar-stealthy-updates))))) | 2707 | (speedbar-stealthy-updates))))) |
| 2717 | (run-hooks 'speedbar-timer-hook)) | 2708 | (run-hooks 'speedbar-timer-hook)) |
diff --git a/lisp/startup.el b/lisp/startup.el index 66676c302b9..f1a68fd8509 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -821,7 +821,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." | |||
| 821 | (format "Invalid user name %s" | 821 | (format "Invalid user name %s" |
| 822 | init-file-user) | 822 | init-file-user) |
| 823 | :error) | 823 | :error) |
| 824 | (if (file-directory-p (expand-file-name (concat "~" init-file-user))) | 824 | (if (file-directory-p (expand-file-name |
| 825 | ;; We don't support ~USER on MS-Windows except | ||
| 826 | ;; for the current user, and always load .emacs | ||
| 827 | ;; from the current user's home directory (see | ||
| 828 | ;; below). So always check "~", even if invoked | ||
| 829 | ;; with "-u USER", or if $USER or $LOGNAME are | ||
| 830 | ;; set to something different. | ||
| 831 | (if (eq system-type 'windows-nt) | ||
| 832 | "~" | ||
| 833 | (concat "~" init-file-user)))) | ||
| 825 | nil | 834 | nil |
| 826 | (display-warning 'initialization | 835 | (display-warning 'initialization |
| 827 | (format "User %s has no home directory" | 836 | (format "User %s has no home directory" |
| @@ -1302,7 +1311,9 @@ where FACE is a valid face specification, as it can be used with | |||
| 1302 | (set-buffer buffer) | 1311 | (set-buffer buffer) |
| 1303 | (erase-buffer) | 1312 | (erase-buffer) |
| 1304 | (if pure-space-overflow | 1313 | (if pure-space-overflow |
| 1305 | (insert "Warning Warning Pure space overflow Warning Warning\n")) | 1314 | (insert "\ |
| 1315 | Warning Warning!!! Pure space overflow !!!Warning Warning | ||
| 1316 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | ||
| 1306 | (fancy-splash-head) | 1317 | (fancy-splash-head) |
| 1307 | (apply #'fancy-splash-insert text) | 1318 | (apply #'fancy-splash-insert text) |
| 1308 | (fancy-splash-tail) | 1319 | (fancy-splash-tail) |
| @@ -1359,7 +1370,7 @@ mouse." | |||
| 1359 | emulation-mode-map-alists nil | 1370 | emulation-mode-map-alists nil |
| 1360 | buffer-undo-list t | 1371 | buffer-undo-list t |
| 1361 | mode-line-format (propertize "---- %b %-" | 1372 | mode-line-format (propertize "---- %b %-" |
| 1362 | 'face '(:weight bold)) | 1373 | 'face 'mode-line-buffer-id) |
| 1363 | fancy-splash-stop-time (+ (float-time) | 1374 | fancy-splash-stop-time (+ (float-time) |
| 1364 | fancy-splash-max-time) | 1375 | fancy-splash-max-time) |
| 1365 | timer (run-with-timer 0 fancy-splash-delay | 1376 | timer (run-with-timer 0 fancy-splash-delay |
| @@ -1408,10 +1419,12 @@ we put it on this frame." | |||
| 1408 | (with-current-buffer (get-buffer-create "GNU Emacs") | 1419 | (with-current-buffer (get-buffer-create "GNU Emacs") |
| 1409 | (set (make-local-variable 'tab-width) 8) | 1420 | (set (make-local-variable 'tab-width) 8) |
| 1410 | (set (make-local-variable 'mode-line-format) | 1421 | (set (make-local-variable 'mode-line-format) |
| 1411 | (propertize "---- %b %-" 'face '(:weight bold))) | 1422 | (propertize "---- %b %-" 'face 'mode-line-buffer-id)) |
| 1412 | 1423 | ||
| 1413 | (if pure-space-overflow | 1424 | (if pure-space-overflow |
| 1414 | (insert "Warning Warning Pure space overflow Warning Warning\n")) | 1425 | (insert "\ |
| 1426 | Warning Warning!!! Pure space overflow !!!Warning Warning | ||
| 1427 | \(See the node Pure Storage in the Lisp manual for details.)\n")) | ||
| 1415 | 1428 | ||
| 1416 | ;; The convention for this piece of code is that | 1429 | ;; The convention for this piece of code is that |
| 1417 | ;; each piece of output starts with one or two newlines | 1430 | ;; each piece of output starts with one or two newlines |
| @@ -1624,9 +1637,7 @@ normal otherwise." | |||
| 1624 | (not noninteractive)) | 1637 | (not noninteractive)) |
| 1625 | (display-warning | 1638 | (display-warning |
| 1626 | 'initialization | 1639 | 'initialization |
| 1627 | "Building Emacs overflowed pure space." | 1640 | "Building Emacs overflowed pure space. (See the node Pure Storage in the Lisp manual for details.)" |
| 1628 | ;; FIXME: Tell the user what kind of problems are possible and how to fix | ||
| 1629 | ;; the overflow. | ||
| 1630 | :warning)) | 1641 | :warning)) |
| 1631 | 1642 | ||
| 1632 | (when command-line-args-left | 1643 | (when command-line-args-left |
diff --git a/lisp/subr.el b/lisp/subr.el index 5c0317d00c3..5cc5be5f56b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1122,6 +1122,31 @@ The return value is the new value of LIST-VAR." | |||
| 1122 | (if (and oa ob) | 1122 | (if (and oa ob) |
| 1123 | (< oa ob) | 1123 | (< oa ob) |
| 1124 | oa))))))) | 1124 | oa))))))) |
| 1125 | |||
| 1126 | (defun add-to-history (history-var newelt &optional maxelt) | ||
| 1127 | "Add NEWELT to the history list stored in the variable HISTORY-VAR. | ||
| 1128 | Return the new history list. | ||
| 1129 | If MAXELT is non-nil, it specifies the maximum length of the history. | ||
| 1130 | Otherwise, the maximum history length is the value of the `history-length' | ||
| 1131 | property on symbol HISTORY-VAR, if set, or the value of the `history-length' | ||
| 1132 | variable. | ||
| 1133 | Remove duplicates of NEWELT unless `history-delete-duplicates' is nil." | ||
| 1134 | (unless maxelt | ||
| 1135 | (setq maxelt (or (get history-var 'history-length) | ||
| 1136 | history-length))) | ||
| 1137 | (let ((history (symbol-value history-var)) | ||
| 1138 | tail) | ||
| 1139 | (if history-delete-duplicates | ||
| 1140 | (setq history (delete newelt history))) | ||
| 1141 | (setq history (cons newelt history)) | ||
| 1142 | (when (integerp maxelt) | ||
| 1143 | (if (= 0 maxelt) | ||
| 1144 | (setq history nil) | ||
| 1145 | (setq tail (nthcdr (1- maxelt) history)) | ||
| 1146 | (when (consp tail) | ||
| 1147 | (setcdr tail nil)))) | ||
| 1148 | (set history-var history))) | ||
| 1149 | |||
| 1125 | 1150 | ||
| 1126 | ;;;; Mode hooks. | 1151 | ;;;; Mode hooks. |
| 1127 | 1152 | ||
| @@ -1931,6 +1956,13 @@ Otherwise, return nil." | |||
| 1931 | "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil." | 1956 | "Return non-nil if OBJECT is one of the two canonical boolean values: t or nil." |
| 1932 | (memq object '(nil t))) | 1957 | (memq object '(nil t))) |
| 1933 | 1958 | ||
| 1959 | (defun field-at-pos (pos) | ||
| 1960 | "Return the field at position POS, taking stickiness etc into account" | ||
| 1961 | (let ((raw-field (get-char-property (field-beginning pos) 'field))) | ||
| 1962 | (if (eq raw-field 'boundary) | ||
| 1963 | (get-char-property (1- (field-end pos)) 'field) | ||
| 1964 | raw-field))) | ||
| 1965 | |||
| 1934 | 1966 | ||
| 1935 | ;;;; Support for yanking and text properties. | 1967 | ;;;; Support for yanking and text properties. |
| 1936 | 1968 | ||
diff --git a/lisp/term.el b/lisp/term.el index 97d55dc107e..64f0efc767b 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -3318,7 +3318,7 @@ See `term-prompt-regexp'." | |||
| 3318 | ((eq char ?r) | 3318 | ((eq char ?r) |
| 3319 | (term-set-scroll-region | 3319 | (term-set-scroll-region |
| 3320 | (1- term-terminal-previous-parameter) | 3320 | (1- term-terminal-previous-parameter) |
| 3321 | term-terminal-parameter)) | 3321 | (1- term-terminal-parameter))) |
| 3322 | (t))) | 3322 | (t))) |
| 3323 | 3323 | ||
| 3324 | (defun term-set-scroll-region (top bottom) | 3324 | (defun term-set-scroll-region (top bottom) |
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index fa8934aec9e..b97a3a9ec3a 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -79,9 +79,11 @@ | |||
| 79 | (eval-when-compile (require 'url)) | 79 | (eval-when-compile (require 'url)) |
| 80 | 80 | ||
| 81 | (defvar mac-charset-info-alist) | 81 | (defvar mac-charset-info-alist) |
| 82 | (defvar mac-services-selection) | 82 | (defvar mac-service-selection) |
| 83 | (defvar mac-system-script-code) | 83 | (defvar mac-system-script-code) |
| 84 | (defvar mac-apple-event-map) | 84 | (defvar mac-apple-event-map) |
| 85 | (defvar mac-atsu-font-table) | ||
| 86 | (defvar mac-font-panel-mode) | ||
| 85 | (defvar x-invocation-args) | 87 | (defvar x-invocation-args) |
| 86 | 88 | ||
| 87 | (defvar x-command-line-resources nil) | 89 | (defvar x-command-line-resources nil) |
| @@ -1128,6 +1130,17 @@ correspoinding TextEncodingBase value." | |||
| 1128 | (mac-add-charset-info "mac-dingbats" 34) | 1130 | (mac-add-charset-info "mac-dingbats" 34) |
| 1129 | (mac-add-charset-info "iso10646-1" 126) ; for ATSUI | 1131 | (mac-add-charset-info "iso10646-1" 126) ; for ATSUI |
| 1130 | 1132 | ||
| 1133 | (defconst mac-system-coding-system | ||
| 1134 | (let ((base (or (cdr (assq mac-system-script-code | ||
| 1135 | mac-script-code-coding-systems)) | ||
| 1136 | 'mac-roman))) | ||
| 1137 | (if (eq system-type 'darwin) | ||
| 1138 | base | ||
| 1139 | (coding-system-change-eol-conversion base 'mac))) | ||
| 1140 | "Coding system derived from the system script code.") | ||
| 1141 | |||
| 1142 | (set-selection-coding-system mac-system-coding-system) | ||
| 1143 | |||
| 1131 | 1144 | ||
| 1132 | ;;;; Keyboard layout/language change events | 1145 | ;;;; Keyboard layout/language change events |
| 1133 | (defun mac-handle-language-change (event) | 1146 | (defun mac-handle-language-change (event) |
| @@ -1141,6 +1154,91 @@ correspoinding TextEncodingBase value." | |||
| 1141 | (define-key key-translation-map [?\x80] "\\")))) | 1154 | (define-key key-translation-map [?\x80] "\\")))) |
| 1142 | 1155 | ||
| 1143 | (define-key special-event-map [language-change] 'mac-handle-language-change) | 1156 | (define-key special-event-map [language-change] 'mac-handle-language-change) |
| 1157 | |||
| 1158 | |||
| 1159 | ;;;; Conversion between common flavors and Lisp string. | ||
| 1160 | |||
| 1161 | (defconst mac-text-encoding-mac-japanese-basic-variant #x20001 | ||
| 1162 | "MacJapanese text encoding without Apple double-byte extensions.") | ||
| 1163 | |||
| 1164 | (defun mac-utxt-to-string (data &optional coding-system) | ||
| 1165 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1166 | (let* ((encoding | ||
| 1167 | (and (eq system-type 'darwin) | ||
| 1168 | (eq (coding-system-base coding-system) 'japanese-shift-jis) | ||
| 1169 | mac-text-encoding-mac-japanese-basic-variant)) | ||
| 1170 | (str (and (fboundp 'mac-code-convert-string) | ||
| 1171 | (mac-code-convert-string data nil | ||
| 1172 | (or encoding coding-system))))) | ||
| 1173 | (when str | ||
| 1174 | (setq str (decode-coding-string str coding-system)) | ||
| 1175 | (if (eq encoding mac-text-encoding-mac-japanese-basic-variant) | ||
| 1176 | ;; Does it contain Apple one-byte extensions other than | ||
| 1177 | ;; reverse solidus? | ||
| 1178 | (if (string-match "[\xa0\xfd-\xff]" str) | ||
| 1179 | (setq str nil) | ||
| 1180 | ;; ASCII-only? | ||
| 1181 | (unless (string-match "\\`[[:ascii:]]*\\'" str) | ||
| 1182 | (subst-char-in-string ?\x5c ?\(J\(B str t) | ||
| 1183 | (subst-char-in-string ?\x80 ?\\ str t))))) | ||
| 1184 | (or str | ||
| 1185 | (decode-coding-string data | ||
| 1186 | (if (eq (byteorder) ?B) 'utf-16be 'utf-16le))))) | ||
| 1187 | |||
| 1188 | (defun mac-string-to-utxt (string &optional coding-system) | ||
| 1189 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1190 | (let (data encoding) | ||
| 1191 | (when (and (fboundp 'mac-code-convert-string) | ||
| 1192 | (memq (coding-system-base coding-system) | ||
| 1193 | (find-coding-systems-string string))) | ||
| 1194 | (setq coding-system | ||
| 1195 | (coding-system-change-eol-conversion coding-system 'mac)) | ||
| 1196 | (when (and (eq system-type 'darwin) | ||
| 1197 | (eq coding-system 'japanese-shift-jis-mac)) | ||
| 1198 | (setq encoding mac-text-encoding-mac-japanese-basic-variant) | ||
| 1199 | (setq string (subst-char-in-string ?\\ ?\x80 string)) | ||
| 1200 | (subst-char-in-string ?\(J\(B ?\x5c string t)) | ||
| 1201 | (setq data (mac-code-convert-string | ||
| 1202 | (encode-coding-string string coding-system) | ||
| 1203 | (or encoding coding-system) nil))) | ||
| 1204 | (or data (encode-coding-string string (if (eq (byteorder) ?B) | ||
| 1205 | 'utf-16be-mac | ||
| 1206 | 'utf-16le-mac))))) | ||
| 1207 | |||
| 1208 | (defun mac-TEXT-to-string (data &optional coding-system) | ||
| 1209 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1210 | (prog1 (setq data (decode-coding-string data coding-system)) | ||
| 1211 | (when (eq (coding-system-base coding-system) 'japanese-shift-jis) | ||
| 1212 | ;; (subst-char-in-string ?\x5c ?\(J\(B data t) | ||
| 1213 | (subst-char-in-string ?\x80 ?\\ data t)))) | ||
| 1214 | |||
| 1215 | (defun mac-string-to-TEXT (string &optional coding-system) | ||
| 1216 | (or coding-system (setq coding-system mac-system-coding-system)) | ||
| 1217 | (let ((encodables (find-coding-systems-string string)) | ||
| 1218 | (rest mac-script-code-coding-systems)) | ||
| 1219 | (unless (memq (coding-system-base coding-system) encodables) | ||
| 1220 | (while (and rest (not (memq (cdar rest) encodables))) | ||
| 1221 | (setq rest (cdr rest))) | ||
| 1222 | (if rest | ||
| 1223 | (setq coding-system (cdar rest))))) | ||
| 1224 | (setq coding-system | ||
| 1225 | (coding-system-change-eol-conversion coding-system 'mac)) | ||
| 1226 | (when (eq coding-system 'japanese-shift-jis-mac) | ||
| 1227 | ;; (setq string (subst-char-in-string ?\\ ?\x80 string)) | ||
| 1228 | (setq string (subst-char-in-string ?\(J\(B ?\x5c string))) | ||
| 1229 | (encode-coding-string string coding-system)) | ||
| 1230 | |||
| 1231 | (defun mac-furl-to-string (data) | ||
| 1232 | ;; Remove a trailing nul character. | ||
| 1233 | (let ((len (length data))) | ||
| 1234 | (if (and (> len 0) (= (aref data (1- len)) ?\0)) | ||
| 1235 | (substring data 0 (1- len)) | ||
| 1236 | data))) | ||
| 1237 | |||
| 1238 | (defun mac-TIFF-to-string (data &optional text) | ||
| 1239 | (prog1 (or text (setq text (copy-sequence " "))) | ||
| 1240 | (put-text-property 0 (length text) 'display (create-image data 'tiff t) | ||
| 1241 | text))) | ||
| 1144 | 1242 | ||
| 1145 | ;;;; Selections | 1243 | ;;;; Selections |
| 1146 | 1244 | ||
| @@ -1190,22 +1288,11 @@ in `selection-converter-alist', which see." | |||
| 1190 | (when (and (stringp data) | 1288 | (when (and (stringp data) |
| 1191 | (setq data-type (get-text-property 0 'foreign-selection data))) | 1289 | (setq data-type (get-text-property 0 'foreign-selection data))) |
| 1192 | (cond ((eq data-type 'public.utf16-plain-text) | 1290 | (cond ((eq data-type 'public.utf16-plain-text) |
| 1193 | (let ((encoded (and (fboundp 'mac-code-convert-string) | 1291 | (setq data (mac-utxt-to-string data coding))) |
| 1194 | (mac-code-convert-string data nil coding)))) | ||
| 1195 | (if encoded | ||
| 1196 | (setq data (decode-coding-string encoded coding)) | ||
| 1197 | (setq data | ||
| 1198 | (decode-coding-string data | ||
| 1199 | (if (eq (byteorder) ?B) | ||
| 1200 | 'utf-16be 'utf-16le)))))) | ||
| 1201 | ((eq data-type 'com.apple.traditional-mac-plain-text) | 1292 | ((eq data-type 'com.apple.traditional-mac-plain-text) |
| 1202 | (setq data (decode-coding-string data coding))) | 1293 | (setq data (mac-TEXT-to-string data coding))) |
| 1203 | ((eq data-type 'public.file-url) | 1294 | ((eq data-type 'public.file-url) |
| 1204 | (setq data (decode-coding-string data 'utf-8)) | 1295 | (setq data (mac-furl-to-string data)))) |
| 1205 | ;; Remove a trailing nul character. | ||
| 1206 | (let ((len (length data))) | ||
| 1207 | (if (and (> len 0) (= (aref data (1- len)) ?\0)) | ||
| 1208 | (setq data (substring data 0 (1- len))))))) | ||
| 1209 | (put-text-property 0 (length data) 'foreign-selection data-type data)) | 1296 | (put-text-property 0 (length data) 'foreign-selection data-type data)) |
| 1210 | data)) | 1297 | data)) |
| 1211 | 1298 | ||
| @@ -1227,9 +1314,7 @@ in `selection-converter-alist', which see." | |||
| 1227 | (when tiff-image | 1314 | (when tiff-image |
| 1228 | (remove-text-properties 0 (length tiff-image) | 1315 | (remove-text-properties 0 (length tiff-image) |
| 1229 | '(foreign-selection nil) tiff-image) | 1316 | '(foreign-selection nil) tiff-image) |
| 1230 | (setq tiff-image (create-image tiff-image 'tiff t)) | 1317 | (setq text (mac-TIFF-to-string tiff-image text))) |
| 1231 | (or text (setq text " ")) | ||
| 1232 | (put-text-property 0 (length text) 'display tiff-image text)) | ||
| 1233 | text)) | 1318 | text)) |
| 1234 | 1319 | ||
| 1235 | ;;; Return the value of the current selection. | 1320 | ;;; Return the value of the current selection. |
| @@ -1300,11 +1385,7 @@ in `selection-converter-alist', which see." | |||
| 1300 | 1385 | ||
| 1301 | (defun mac-select-convert-to-string (selection type value) | 1386 | (defun mac-select-convert-to-string (selection type value) |
| 1302 | (let ((str (cdr (xselect-convert-to-string selection nil value))) | 1387 | (let ((str (cdr (xselect-convert-to-string selection nil value))) |
| 1303 | coding) | 1388 | (coding (or next-selection-coding-system selection-coding-system))) |
| 1304 | (setq coding (or next-selection-coding-system selection-coding-system)) | ||
| 1305 | (if coding | ||
| 1306 | (setq coding (coding-system-base coding)) | ||
| 1307 | (setq coding 'raw-text)) | ||
| 1308 | (when str | 1389 | (when str |
| 1309 | ;; If TYPE is nil, this is a local request, thus return STR as | 1390 | ;; If TYPE is nil, this is a local request, thus return STR as |
| 1310 | ;; is. Otherwise, encode STR. | 1391 | ;; is. Otherwise, encode STR. |
| @@ -1314,28 +1395,9 @@ in `selection-converter-alist', which see." | |||
| 1314 | (remove-text-properties 0 (length str) '(composition nil) str) | 1395 | (remove-text-properties 0 (length str) '(composition nil) str) |
| 1315 | (cond | 1396 | (cond |
| 1316 | ((eq type 'public.utf16-plain-text) | 1397 | ((eq type 'public.utf16-plain-text) |
| 1317 | (let (s) | 1398 | (setq str (mac-string-to-utxt str coding))) |
| 1318 | (when (and (fboundp 'mac-code-convert-string) | ||
| 1319 | (memq coding (find-coding-systems-string str))) | ||
| 1320 | (setq coding (coding-system-change-eol-conversion coding 'mac)) | ||
| 1321 | (setq s (mac-code-convert-string | ||
| 1322 | (encode-coding-string str coding) | ||
| 1323 | coding nil))) | ||
| 1324 | (setq str (or s | ||
| 1325 | (encode-coding-string str | ||
| 1326 | (if (eq (byteorder) ?B) | ||
| 1327 | 'utf-16be-mac | ||
| 1328 | 'utf-16le-mac)))))) | ||
| 1329 | ((eq type 'com.apple.traditional-mac-plain-text) | 1399 | ((eq type 'com.apple.traditional-mac-plain-text) |
| 1330 | (let ((encodables (find-coding-systems-string str)) | 1400 | (setq str (mac-string-to-TEXT str coding))) |
| 1331 | (rest mac-script-code-coding-systems)) | ||
| 1332 | (unless (memq coding encodables) | ||
| 1333 | (while (and rest (not (memq (cdar rest) encodables))) | ||
| 1334 | (setq rest (cdr rest))) | ||
| 1335 | (if rest | ||
| 1336 | (setq coding (cdar rest))))) | ||
| 1337 | (setq coding (coding-system-change-eol-conversion coding 'mac)) | ||
| 1338 | (setq str (encode-coding-string str coding))) | ||
| 1339 | (t | 1401 | (t |
| 1340 | (error "Unknown selection type: %S" type)) | 1402 | (error "Unknown selection type: %S" type)) |
| 1341 | ))) | 1403 | ))) |
| @@ -1433,6 +1495,17 @@ in `selection-converter-alist', which see." | |||
| 1433 | (ash (lsh result extended-sign-len) (- extended-sign-len)) | 1495 | (ash (lsh result extended-sign-len) (- extended-sign-len)) |
| 1434 | result))) | 1496 | result))) |
| 1435 | 1497 | ||
| 1498 | (defun mac-bytes-to-digits (bytes &optional from to) | ||
| 1499 | (or from (setq from 0)) | ||
| 1500 | (or to (setq to (length bytes))) | ||
| 1501 | (let ((len (- to from)) | ||
| 1502 | (val 0.0)) | ||
| 1503 | (dotimes (i len) | ||
| 1504 | (setq val (+ (* val 256.0) | ||
| 1505 | (aref bytes (+ from (if (eq (byteorder) ?B) i | ||
| 1506 | (- len i 1))))))) | ||
| 1507 | (format "%.0f" val))) | ||
| 1508 | |||
| 1436 | (defun mac-ae-selection-range (ae) | 1509 | (defun mac-ae-selection-range (ae) |
| 1437 | ;; #pragma options align=mac68k | 1510 | ;; #pragma options align=mac68k |
| 1438 | ;; typedef struct SelectionRange { | 1511 | ;; typedef struct SelectionRange { |
| @@ -1518,37 +1591,109 @@ Currently the `mailto' scheme is supported." | |||
| 1518 | 1591 | ||
| 1519 | (define-key mac-apple-event-map [hicommand about] 'display-splash-screen) | 1592 | (define-key mac-apple-event-map [hicommand about] 'display-splash-screen) |
| 1520 | 1593 | ||
| 1521 | (defun mac-services-open-file () | 1594 | ;;; Converted Carbon Events |
| 1595 | (defun mac-handle-toolbar-switch-mode (event) | ||
| 1596 | "Toggle visibility of tool-bars in response to EVENT. | ||
| 1597 | With no keyboard modifiers, it toggles the visibility of the | ||
| 1598 | frame where the tool-bar toggle button was pressed. With some | ||
| 1599 | modifiers, it changes global tool-bar visibility setting." | ||
| 1600 | (interactive "e") | ||
| 1601 | (let* ((ae (mac-event-ae event)) | ||
| 1602 | (modifiers (cdr (mac-ae-parameter ae "kmod")))) | ||
| 1603 | (if (and modifiers (not (string= modifiers "\000\000\000\000"))) | ||
| 1604 | ;; Globally toggle tool-bar-mode if some modifier key is pressed. | ||
| 1605 | (tool-bar-mode) | ||
| 1606 | (let ((window-id (mac-bytes-to-digits (cdr (mac-ae-parameter ae)))) | ||
| 1607 | (rest (frame-list)) | ||
| 1608 | frame) | ||
| 1609 | (while (and (null frame) rest) | ||
| 1610 | (if (string= (frame-parameter (car rest) 'window-id) window-id) | ||
| 1611 | (setq frame (car rest))) | ||
| 1612 | (setq rest (cdr rest))) | ||
| 1613 | (set-frame-parameter frame 'tool-bar-lines | ||
| 1614 | (if (= (frame-parameter frame 'tool-bar-lines) 0) | ||
| 1615 | 1 0)))))) | ||
| 1616 | |||
| 1617 | ;; kEventClassWindow/kEventWindowToolbarSwitchMode | ||
| 1618 | (define-key mac-apple-event-map [window toolbar-switch-mode] | ||
| 1619 | 'mac-handle-toolbar-switch-mode) | ||
| 1620 | |||
| 1621 | ;;; Font panel | ||
| 1622 | (when (fboundp 'mac-set-font-panel-visibility) | ||
| 1623 | |||
| 1624 | (define-minor-mode mac-font-panel-mode | ||
| 1625 | "Toggle use of the font panel. | ||
| 1626 | With numeric ARG, display the font panel if and only if ARG is positive." | ||
| 1627 | :init-value nil | ||
| 1628 | :global t | ||
| 1629 | :group 'mac | ||
| 1630 | (mac-set-font-panel-visibility mac-font-panel-mode)) | ||
| 1631 | |||
| 1632 | (defun mac-handle-font-panel-closed (event) | ||
| 1633 | "Update internal status in response to font panel closed EVENT." | ||
| 1634 | (interactive "e") | ||
| 1635 | ;; Synchronize with the minor mode variable. | ||
| 1636 | (mac-font-panel-mode 0)) | ||
| 1637 | |||
| 1638 | (defun mac-handle-font-selection (event) | ||
| 1639 | "Change default face attributes according to font selection EVENT." | ||
| 1640 | (interactive "e") | ||
| 1641 | (let* ((ae (mac-event-ae event)) | ||
| 1642 | (fm-font-size (cdr (mac-ae-parameter ae "fmsz"))) | ||
| 1643 | (atsu-font-id (cdr (mac-ae-parameter ae "auid"))) | ||
| 1644 | (attribute-values (gethash atsu-font-id mac-atsu-font-table))) | ||
| 1645 | (if fm-font-size | ||
| 1646 | (setq attribute-values | ||
| 1647 | `(:height ,(* 10 (mac-bytes-to-integer fm-font-size)) | ||
| 1648 | ,@attribute-values))) | ||
| 1649 | (apply 'set-face-attribute 'default (selected-frame) attribute-values))) | ||
| 1650 | |||
| 1651 | ;; kEventClassFont/kEventFontPanelClosed | ||
| 1652 | (define-key mac-apple-event-map [font panel-closed] | ||
| 1653 | 'mac-handle-font-panel-closed) | ||
| 1654 | ;; kEventClassFont/kEventFontSelection | ||
| 1655 | (define-key mac-apple-event-map [font selection] 'mac-handle-font-selection) | ||
| 1656 | |||
| 1657 | (define-key-after menu-bar-showhide-menu [mac-font-panel-mode] | ||
| 1658 | (menu-bar-make-mm-toggle mac-font-panel-mode | ||
| 1659 | "Font Panel" | ||
| 1660 | "Show the font panel as a floating dialog") | ||
| 1661 | 'showhide-speedbar) | ||
| 1662 | |||
| 1663 | ) ;; (fboundp 'mac-set-font-panel-visibility) | ||
| 1664 | |||
| 1665 | ;;; Services | ||
| 1666 | (defun mac-service-open-file () | ||
| 1522 | "Open the file specified by the selection value for Services." | 1667 | "Open the file specified by the selection value for Services." |
| 1523 | (interactive) | 1668 | (interactive) |
| 1524 | (find-file-existing (x-selection-value mac-services-selection))) | 1669 | (find-file-existing (x-selection-value mac-service-selection))) |
| 1525 | 1670 | ||
| 1526 | (defun mac-services-open-selection () | 1671 | (defun mac-service-open-selection () |
| 1527 | "Create a new buffer containing the selection value for Services." | 1672 | "Create a new buffer containing the selection value for Services." |
| 1528 | (interactive) | 1673 | (interactive) |
| 1529 | (switch-to-buffer (generate-new-buffer "*untitled*")) | 1674 | (switch-to-buffer (generate-new-buffer "*untitled*")) |
| 1530 | (insert (x-selection-value mac-services-selection)) | 1675 | (insert (x-selection-value mac-service-selection)) |
| 1531 | (sit-for 0) | 1676 | (sit-for 0) |
| 1532 | (save-buffer) ; It pops up the save dialog. | 1677 | (save-buffer) ; It pops up the save dialog. |
| 1533 | ) | 1678 | ) |
| 1534 | 1679 | ||
| 1535 | (defun mac-services-mail-selection () | 1680 | (defun mac-service-mail-selection () |
| 1536 | "Prepare a mail buffer containing the selection value for Services." | 1681 | "Prepare a mail buffer containing the selection value for Services." |
| 1537 | (interactive) | 1682 | (interactive) |
| 1538 | (compose-mail) | 1683 | (compose-mail) |
| 1539 | (rfc822-goto-eoh) | 1684 | (rfc822-goto-eoh) |
| 1540 | (forward-line 1) | 1685 | (forward-line 1) |
| 1541 | (insert (x-selection-value mac-services-selection) "\n")) | 1686 | (insert (x-selection-value mac-service-selection) "\n")) |
| 1542 | 1687 | ||
| 1543 | (defun mac-services-mail-to () | 1688 | (defun mac-service-mail-to () |
| 1544 | "Prepare a mail buffer to be sent to the selection value for Services." | 1689 | "Prepare a mail buffer to be sent to the selection value for Services." |
| 1545 | (interactive) | 1690 | (interactive) |
| 1546 | (compose-mail (x-selection-value mac-services-selection))) | 1691 | (compose-mail (x-selection-value mac-service-selection))) |
| 1547 | 1692 | ||
| 1548 | (defun mac-services-insert-text () | 1693 | (defun mac-service-insert-text () |
| 1549 | "Insert the selection value for Services." | 1694 | "Insert the selection value for Services." |
| 1550 | (interactive) | 1695 | (interactive) |
| 1551 | (let ((text (x-selection-value mac-services-selection))) | 1696 | (let ((text (x-selection-value mac-service-selection))) |
| 1552 | (if (not buffer-read-only) | 1697 | (if (not buffer-read-only) |
| 1553 | (insert text) | 1698 | (insert text) |
| 1554 | (kill-new text) | 1699 | (kill-new text) |
| @@ -1556,15 +1701,17 @@ Currently the `mailto' scheme is supported." | |||
| 1556 | (substitute-command-keys | 1701 | (substitute-command-keys |
| 1557 | "The text from the Services menu can be accessed with \\[yank]"))))) | 1702 | "The text from the Services menu can be accessed with \\[yank]"))))) |
| 1558 | 1703 | ||
| 1559 | (define-key mac-apple-event-map [services paste] 'mac-services-insert-text) | 1704 | ;; kEventClassService/kEventServicePaste |
| 1560 | (define-key mac-apple-event-map [services perform open-file] | 1705 | (define-key mac-apple-event-map [service paste] 'mac-service-insert-text) |
| 1561 | 'mac-services-open-file) | 1706 | ;; kEventClassService/kEventServicePerform |
| 1562 | (define-key mac-apple-event-map [services perform open-selection] | 1707 | (define-key mac-apple-event-map [service perform open-file] |
| 1563 | 'mac-services-open-selection) | 1708 | 'mac-service-open-file) |
| 1564 | (define-key mac-apple-event-map [services perform mail-selection] | 1709 | (define-key mac-apple-event-map [service perform open-selection] |
| 1565 | 'mac-services-mail-selection) | 1710 | 'mac-service-open-selection) |
| 1566 | (define-key mac-apple-event-map [services perform mail-to] | 1711 | (define-key mac-apple-event-map [service perform mail-selection] |
| 1567 | 'mac-services-mail-to) | 1712 | 'mac-service-mail-selection) |
| 1713 | (define-key mac-apple-event-map [service perform mail-to] | ||
| 1714 | 'mac-service-mail-to) | ||
| 1568 | 1715 | ||
| 1569 | (defun mac-dispatch-apple-event (event) | 1716 | (defun mac-dispatch-apple-event (event) |
| 1570 | "Dispatch EVENT according to the keymap `mac-apple-event-map'." | 1717 | "Dispatch EVENT according to the keymap `mac-apple-event-map'." |
| @@ -1589,6 +1736,83 @@ Currently the `mailto' scheme is supported." | |||
| 1589 | ;; processed when the initial frame has been created: this is where | 1736 | ;; processed when the initial frame has been created: this is where |
| 1590 | ;; the files should be opened. | 1737 | ;; the files should be opened. |
| 1591 | (add-hook 'after-init-hook 'mac-process-deferred-apple-events) | 1738 | (add-hook 'after-init-hook 'mac-process-deferred-apple-events) |
| 1739 | |||
| 1740 | |||
| 1741 | ;;;; Drag and drop | ||
| 1742 | |||
| 1743 | (defcustom mac-dnd-types-alist | ||
| 1744 | '(("furl" . mac-dnd-handle-furl) | ||
| 1745 | ("hfs " . mac-dnd-handle-hfs) | ||
| 1746 | ("utxt" . mac-dnd-insert-utxt) | ||
| 1747 | ("TEXT" . mac-dnd-insert-TEXT) | ||
| 1748 | ("TIFF" . mac-dnd-insert-TIFF)) | ||
| 1749 | "Which function to call to handle a drop of that type. | ||
| 1750 | The function takes three arguments, WINDOW, ACTION and DATA. | ||
| 1751 | WINDOW is where the drop occured, ACTION is always `private' on | ||
| 1752 | Mac. DATA is the drop data. Unlike the x-dnd counterpart, the | ||
| 1753 | return value of the function is not significant. | ||
| 1754 | |||
| 1755 | See also `mac-dnd-known-types'." | ||
| 1756 | :version "22.1" | ||
| 1757 | :type 'alist | ||
| 1758 | :group 'mac) | ||
| 1759 | |||
| 1760 | (defun mac-dnd-handle-furl (window action data) | ||
| 1761 | (dnd-handle-one-url window action (mac-furl-to-string data))) | ||
| 1762 | |||
| 1763 | (defun mac-dnd-handle-hfs (window action data) | ||
| 1764 | ;; struct HFSFlavor { | ||
| 1765 | ;; OSType fileType; | ||
| 1766 | ;; OSType fileCreator; | ||
| 1767 | ;; UInt16 fdFlags; | ||
| 1768 | ;; FSSpec fileSpec; | ||
| 1769 | ;; }; | ||
| 1770 | (let* ((file-name (mac-coerce-ae-data "fss " (substring data 10) | ||
| 1771 | 'undecoded-file-name)) | ||
| 1772 | (url (concat "file://" | ||
| 1773 | (mapconcat 'url-hexify-string | ||
| 1774 | (split-string file-name "/") "/")))) | ||
| 1775 | (dnd-handle-one-url window action url))) | ||
| 1776 | |||
| 1777 | (defun mac-dnd-insert-utxt (window action data) | ||
| 1778 | (dnd-insert-text window action (mac-utxt-to-string data))) | ||
| 1779 | |||
| 1780 | (defun mac-dnd-insert-TEXT (window action data) | ||
| 1781 | (dnd-insert-text window action (mac-TEXT-to-string data))) | ||
| 1782 | |||
| 1783 | (defun mac-dnd-insert-TIFF (window action data) | ||
| 1784 | (dnd-insert-text window action (mac-TIFF-to-string data))) | ||
| 1785 | |||
| 1786 | (defun mac-dnd-drop-data (event frame window data type) | ||
| 1787 | (let* ((type-info (assoc type mac-dnd-types-alist)) | ||
| 1788 | (handler (cdr type-info)) | ||
| 1789 | (action 'private) | ||
| 1790 | (w (posn-window (event-start event)))) | ||
| 1791 | (when handler | ||
| 1792 | (if (and (windowp w) (window-live-p w) | ||
| 1793 | (not (window-minibuffer-p w)) | ||
| 1794 | (not (window-dedicated-p w))) | ||
| 1795 | ;; If dropping in an ordinary window which we could use, | ||
| 1796 | ;; let dnd-open-file-other-window specify what to do. | ||
| 1797 | (progn | ||
| 1798 | (goto-char (posn-point (event-start event))) | ||
| 1799 | (funcall handler window action data)) | ||
| 1800 | ;; If we can't display the file here, | ||
| 1801 | ;; make a new window for it. | ||
| 1802 | (let ((dnd-open-file-other-window t)) | ||
| 1803 | (select-frame frame) | ||
| 1804 | (funcall handler window action data)))))) | ||
| 1805 | |||
| 1806 | (defun mac-dnd-handle-drag-n-drop-event (event) | ||
| 1807 | "Receive drag and drop events." | ||
| 1808 | (interactive "e") | ||
| 1809 | (let ((window (posn-window (event-start event)))) | ||
| 1810 | (when (windowp window) (select-window window)) | ||
| 1811 | (dolist (item (mac-ae-list (mac-event-ae event))) | ||
| 1812 | (if (not (equal (car item) "null")) | ||
| 1813 | (mac-dnd-drop-data event (selected-frame) window | ||
| 1814 | (cdr item) (car item))))) | ||
| 1815 | (select-frame-set-input-focus (selected-frame))) | ||
| 1592 | 1816 | ||
| 1593 | ;;; Do the actual Windows setup here; the above code just defines | 1817 | ;;; Do the actual Windows setup here; the above code just defines |
| 1594 | ;;; functions and variables that we use now. | 1818 | ;;; functions and variables that we use now. |
| @@ -1884,37 +2108,11 @@ It returns a name of the created fontset." | |||
| 1884 | ;; Enable CLIPBOARD copy/paste through menu bar commands. | 2108 | ;; Enable CLIPBOARD copy/paste through menu bar commands. |
| 1885 | (menu-bar-enable-clipboard) | 2109 | (menu-bar-enable-clipboard) |
| 1886 | 2110 | ||
| 1887 | (defconst mac-system-coding-system | 2111 | ;; Initiate drag and drop |
| 1888 | (let ((base (or (cdr (assq mac-system-script-code | ||
| 1889 | mac-script-code-coding-systems)) | ||
| 1890 | 'mac-roman))) | ||
| 1891 | (if (eq system-type 'darwin) | ||
| 1892 | base | ||
| 1893 | (coding-system-change-eol-conversion base 'mac))) | ||
| 1894 | "Coding system derived from the system script code.") | ||
| 1895 | 2112 | ||
| 1896 | (set-selection-coding-system mac-system-coding-system) | 2113 | (global-set-key [drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) |
| 2114 | (global-set-key [M-drag-n-drop] 'mac-dnd-handle-drag-n-drop-event) | ||
| 1897 | 2115 | ||
| 1898 | (defun mac-drag-n-drop (event) | ||
| 1899 | "Edit the files listed in the drag-n-drop EVENT. | ||
| 1900 | Switch to a buffer editing the last file dropped." | ||
| 1901 | (interactive "e") | ||
| 1902 | ;; Make sure the drop target has positive co-ords | ||
| 1903 | ;; before setting the selected frame - otherwise it | ||
| 1904 | ;; won't work. <skx@tardis.ed.ac.uk> | ||
| 1905 | (let* ((window (posn-window (event-start event))) | ||
| 1906 | (coords (posn-x-y (event-start event))) | ||
| 1907 | (x (car coords)) | ||
| 1908 | (y (cdr coords))) | ||
| 1909 | (if (and (> x 0) (> y 0)) | ||
| 1910 | (set-frame-selected-window nil window)) | ||
| 1911 | (dolist (file-name (nth 2 event)) | ||
| 1912 | (dnd-handle-one-url window 'private | ||
| 1913 | (concat "file:" file-name)))) | ||
| 1914 | (select-frame-set-input-focus (selected-frame))) | ||
| 1915 | |||
| 1916 | (global-set-key [drag-n-drop] 'mac-drag-n-drop) | ||
| 1917 | (global-set-key [M-drag-n-drop] 'mac-drag-n-drop) | ||
| 1918 | 2116 | ||
| 1919 | ;;;; Non-toolkit Scroll bars | 2117 | ;;;; Non-toolkit Scroll bars |
| 1920 | 2118 | ||
| @@ -1979,6 +2177,7 @@ Switch to a buffer editing the last file dropped." | |||
| 1979 | (scroll-up 1))) | 2177 | (scroll-up 1))) |
| 1980 | 2178 | ||
| 1981 | ) | 2179 | ) |
| 2180 | |||
| 1982 | 2181 | ||
| 1983 | ;;;; Others | 2182 | ;;;; Others |
| 1984 | 2183 | ||
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 9cb7253b642..9ce9f34da96 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el | |||
| @@ -227,6 +227,14 @@ | |||
| 227 | 227 | ||
| 228 | (define-key map "\e[4~" [select]) | 228 | (define-key map "\e[4~" [select]) |
| 229 | (define-key map "\e[29~" [print]) | 229 | (define-key map "\e[29~" [print]) |
| 230 | |||
| 231 | ;; These keys will be available xterm starting probably from | ||
| 232 | ;; version 214. | ||
| 233 | (define-key map "\e[27;5;8~" [(control ?\t)]) | ||
| 234 | (define-key map "\e[27;5;44~" [(control ?\,)]) | ||
| 235 | (define-key map "\e[27;5;46~" [(control ?\.)]) | ||
| 236 | (define-key map "\e[27;5;47~" [(control ?\/)]) | ||
| 237 | (define-key map "\e[27;5;92~" [(control ?\\)]) | ||
| 230 | 238 | ||
| 231 | ;; Other versions of xterm might emit these. | 239 | ;; Other versions of xterm might emit these. |
| 232 | (define-key map "\e[A" [up]) | 240 | (define-key map "\e[A" [up]) |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index b83997baa2e..5629e8feb31 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -2577,15 +2577,18 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2577 | (mapcar 'list (ispell-valid-dictionary-list))) | 2577 | (mapcar 'list (ispell-valid-dictionary-list))) |
| 2578 | nil t) | 2578 | nil t) |
| 2579 | current-prefix-arg)) | 2579 | current-prefix-arg)) |
| 2580 | (unless arg (ispell-buffer-local-dict)) | 2580 | (unless arg (ispell-buffer-local-dict 'no-reload)) |
| 2581 | (if (equal dict "default") (setq dict nil)) | 2581 | (if (equal dict "default") (setq dict nil)) |
| 2582 | ;; This relies on completing-read's bug of returning "" for no match | 2582 | ;; This relies on completing-read's bug of returning "" for no match |
| 2583 | (cond ((equal dict "") | 2583 | (cond ((equal dict "") |
| 2584 | (ispell-internal-change-dictionary) | ||
| 2584 | (message "Using %s dictionary" | 2585 | (message "Using %s dictionary" |
| 2585 | (or ispell-local-dictionary ispell-dictionary "default"))) | 2586 | (or ispell-local-dictionary ispell-dictionary "default"))) |
| 2586 | ((equal dict (or ispell-local-dictionary | 2587 | ((equal dict (or ispell-local-dictionary |
| 2587 | ispell-dictionary "default")) | 2588 | ispell-dictionary "default")) |
| 2588 | ;; Specified dictionary is the default already. No-op | 2589 | ;; Specified dictionary is the default already. Could reload |
| 2590 | ;; the dictionaries if needed. | ||
| 2591 | (ispell-internal-change-dictionary) | ||
| 2589 | (and (interactive-p) | 2592 | (and (interactive-p) |
| 2590 | (message "No change, using %s dictionary" dict))) | 2593 | (message "No change, using %s dictionary" dict))) |
| 2591 | (t ; reset dictionary! | 2594 | (t ; reset dictionary! |
| @@ -2604,13 +2607,16 @@ By just answering RET you can find out what the current dictionary is." | |||
| 2604 | dict)))) | 2607 | dict)))) |
| 2605 | 2608 | ||
| 2606 | (defun ispell-internal-change-dictionary () | 2609 | (defun ispell-internal-change-dictionary () |
| 2607 | "Update the dictionary actually used by Ispell. | 2610 | "Update the dictionary and the personal dictionary used by Ispell. |
| 2608 | This may kill the Ispell process; if so, | 2611 | This may kill the Ispell process; if so, |
| 2609 | a new one will be started when needed." | 2612 | a new one will be started when needed." |
| 2610 | (let ((dict (or ispell-local-dictionary ispell-dictionary))) | 2613 | (let ((dict (or ispell-local-dictionary ispell-dictionary)) |
| 2611 | (unless (equal ispell-current-dictionary dict) | 2614 | (pdict (or ispell-local-pdict ispell-personal-dictionary))) |
| 2615 | (unless (and (equal ispell-current-dictionary dict) | ||
| 2616 | (equal ispell-current-personal-dictionary pdict)) | ||
| 2612 | (ispell-kill-ispell t) | 2617 | (ispell-kill-ispell t) |
| 2613 | (setq ispell-current-dictionary dict)))) | 2618 | (setq ispell-current-dictionary dict |
| 2619 | ispell-current-personal-dictionary pdict)))) | ||
| 2614 | 2620 | ||
| 2615 | ;;; Spelling of comments are checked when ispell-check-comments is non-nil. | 2621 | ;;; Spelling of comments are checked when ispell-check-comments is non-nil. |
| 2616 | 2622 | ||
| @@ -3637,8 +3643,9 @@ Includes Latex/Nroff modes and extended character mode." | |||
| 3637 | 3643 | ||
| 3638 | ;;; Can kill the current ispell process | 3644 | ;;; Can kill the current ispell process |
| 3639 | 3645 | ||
| 3640 | (defun ispell-buffer-local-dict () | 3646 | (defun ispell-buffer-local-dict (&optional no-reload) |
| 3641 | "Initializes local dictionary and local personal dictionary. | 3647 | "Initializes local dictionary and local personal dictionary. |
| 3648 | If optional NO-RELOAD is non-nil, do not make any dictionary reloading. | ||
| 3642 | When a dictionary is defined in the buffer (see variable | 3649 | When a dictionary is defined in the buffer (see variable |
| 3643 | `ispell-dictionary-keyword'), it will override the local setting | 3650 | `ispell-dictionary-keyword'), it will override the local setting |
| 3644 | from \\[ispell-change-dictionary]. | 3651 | from \\[ispell-change-dictionary]. |
| @@ -3665,12 +3672,9 @@ Both should not be used to define a buffer-local dictionary." | |||
| 3665 | (if (re-search-forward " *\\([^ \"]+\\)" end t) | 3672 | (if (re-search-forward " *\\([^ \"]+\\)" end t) |
| 3666 | (setq ispell-local-pdict | 3673 | (setq ispell-local-pdict |
| 3667 | (match-string-no-properties 1))))))) | 3674 | (match-string-no-properties 1))))))) |
| 3668 | ;; Reload if new personal dictionary defined. | 3675 | (unless no-reload |
| 3669 | (if (not (equal ispell-current-personal-dictionary | 3676 | ;; Reload if new dictionary (maybe the personal one) defined. |
| 3670 | (or ispell-local-pdict ispell-personal-dictionary))) | 3677 | (ispell-internal-change-dictionary))) |
| 3671 | (ispell-kill-ispell t)) | ||
| 3672 | ;; Reload if new dictionary defined. | ||
| 3673 | (ispell-internal-change-dictionary)) | ||
| 3674 | 3678 | ||
| 3675 | 3679 | ||
| 3676 | (defun ispell-buffer-local-words () | 3680 | (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 @@ | |||
| 1 | 2006-05-05 Andreas Seltenreich <seltenreich@gmx.de> (tiny change) | ||
| 2 | |||
| 3 | * url-http.el (url-http-parse-headers): Don't reuse connection if | ||
| 4 | "Connection: close" header was seen. | ||
| 5 | |||
| 1 | 2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * url-gw.el (url-open-stream): Don't hide errors. | 8 | * 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." | |||
| 386 | (url-http-parse-response) | 386 | (url-http-parse-response) |
| 387 | (mail-narrow-to-head) | 387 | (mail-narrow-to-head) |
| 388 | ;;(narrow-to-region (point-min) url-http-end-of-headers) | 388 | ;;(narrow-to-region (point-min) url-http-end-of-headers) |
| 389 | (let ((connection (mail-fetch-field "Connection"))) | ||
| 390 | (if (and connection | ||
| 391 | (string= (downcase connection) "close")) | ||
| 392 | (delete-process url-http-process))) | ||
| 389 | (let ((class nil) | 393 | (let ((class nil) |
| 390 | (success nil)) | 394 | (success nil)) |
| 391 | (setq class (/ url-http-response-status 100)) | 395 | (setq class (/ url-http-response-status 100)) |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 020e667ec16..56e6dc9ba3f 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,48 @@ | |||
| 1 | 2006-05-10 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * variables.texi (File Local Variables): Recommend to quote lambda | ||
| 4 | expressions in safe-local-variable property. | ||
| 5 | |||
| 6 | 2006-05-09 Richard Stallman <rms@gnu.org> | ||
| 7 | |||
| 8 | * variables.texi (File Local Variables): Document | ||
| 9 | safe-local-eval-forms and safe-local-eval-function. | ||
| 10 | |||
| 11 | 2006-05-07 Kim F. Storm <storm@cua.dk> | ||
| 12 | |||
| 13 | * minibuf.texi (Minibuffer History): Remove keep-dups arg | ||
| 14 | from add-to-history. | ||
| 15 | |||
| 16 | 2006-05-07 Romain Francoise <romain@orebokech.com> | ||
| 17 | |||
| 18 | * commands.texi (Event Input Misc): | ||
| 19 | * compile.texi (Eval During Compile): | ||
| 20 | * internals.texi (Buffer Internals): | ||
| 21 | * minibuf.texi (Initial Input): | ||
| 22 | * nonascii.texi (Scanning Charsets): | ||
| 23 | * numbers.texi (Comparison of Numbers): | ||
| 24 | * windows.texi (Textual Scrolling, Vertical Scrolling): | ||
| 25 | Fix various typos. | ||
| 26 | |||
| 27 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 28 | |||
| 29 | * hooks.texi (Standard Hooks): Replace inforef to emacs-xtra by | ||
| 30 | conditional xref's to either emacs or emacs-xtra, depending on | ||
| 31 | @iftex/@ifnottex. | ||
| 32 | |||
| 33 | * minibuf.texi (Minibuffer History): Document add-to-history. | ||
| 34 | |||
| 35 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 36 | |||
| 37 | * internals.texi (Pure Storage): Mention the pure overflow message | ||
| 38 | at startup. | ||
| 39 | |||
| 40 | 2006-05-05 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> | ||
| 41 | |||
| 42 | * keymaps.texi (Active Keymaps): Fix pseudo-Lisp syntax. | ||
| 43 | (Searching Keymaps): Fix pseudo-Lisp description of keymap | ||
| 44 | search. | ||
| 45 | |||
| 1 | 2006-05-01 Richard Stallman <rms@gnu.org> | 46 | 2006-05-01 Richard Stallman <rms@gnu.org> |
| 2 | 47 | ||
| 3 | * intro.texi (nil and t): Clarify. | 48 | * 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}, | |||
| 2451 | arrival of input during those parts won't cause an abort until | 2451 | arrival of input during those parts won't cause an abort until |
| 2452 | the end of that part. | 2452 | the end of that part. |
| 2453 | 2453 | ||
| 2454 | If you want to be able to distingish all possible values computed | 2454 | If you want to be able to distinguish all possible values computed |
| 2455 | by @var{body} from both kinds of abort conditions, write the code | 2455 | by @var{body} from both kinds of abort conditions, write the code |
| 2456 | like this: | 2456 | like this: |
| 2457 | 2457 | ||
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 | |||
| 412 | compiling and executing. | 412 | compiling and executing. |
| 413 | 413 | ||
| 414 | @code{autoload} is also effectively @code{eval-and-compile} too. It's | 414 | @code{autoload} is also effectively @code{eval-and-compile} too. It's |
| 415 | recognised when compiling, so uses of such a function don't produce | 415 | recognized when compiling, so uses of such a function don't produce |
| 416 | ``not known to be defined'' warnings. | 416 | ``not known to be defined'' warnings. |
| 417 | 417 | ||
| 418 | Most uses of @code{eval-and-compile} are fairly sophisticated. | 418 | 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, | |||
| 456 | The same sort of thing goes for macros or @code{defalias}es defined | 456 | The same sort of thing goes for macros or @code{defalias}es defined |
| 457 | locally and only for use within the file. They can be defined while | 457 | locally and only for use within the file. They can be defined while |
| 458 | compiling, but then not needed when executing. This is good for code | 458 | compiling, but then not needed when executing. This is good for code |
| 459 | that's only a fallback for compability with other versions of Emacs. | 459 | that's only a fallback for compatibility with other versions of Emacs. |
| 460 | For example. | 460 | For example. |
| 461 | 461 | ||
| 462 | @lisp | 462 | @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 | |||
| 1602 | @var{filename} does not include a directory part. | 1602 | @var{filename} does not include a directory part. |
| 1603 | 1603 | ||
| 1604 | On GNU and Unix systems, a string returned by this function always | 1604 | On GNU and Unix systems, a string returned by this function always |
| 1605 | ends in a slash. On MSDOS it can also end in a colon. On VMS, it | 1605 | ends in a slash. On MS-DOS it can also end in a colon. On VMS, it |
| 1606 | returns a string ending in one of the three characters @samp{:}, | 1606 | returns a string ending in one of the three characters @samp{:}, |
| 1607 | @samp{]}, or @samp{>}. | 1607 | @samp{]}, or @samp{>}. |
| 1608 | 1608 | ||
| @@ -1809,7 +1809,7 @@ the directory name but not identical to it. (This is not quite the | |||
| 1809 | same as the usual Unix terminology.) These two different names for | 1809 | same as the usual Unix terminology.) These two different names for |
| 1810 | the same entity are related by a syntactic transformation. On GNU and | 1810 | the same entity are related by a syntactic transformation. On GNU and |
| 1811 | Unix systems, this is simple: a directory name ends in a slash, | 1811 | Unix systems, this is simple: a directory name ends in a slash, |
| 1812 | whereas the directory's name as a file lacks that slash. On MSDOS and | 1812 | whereas the directory's name as a file lacks that slash. On MS-DOS and |
| 1813 | VMS, the relationship is more complicated. | 1813 | VMS, the relationship is more complicated. |
| 1814 | 1814 | ||
| 1815 | The difference between a directory name and its name as a file is | 1815 | 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 | |||
| 87 | @xref{Lazy Properties}. | 87 | @xref{Lazy Properties}. |
| 88 | 88 | ||
| 89 | @item calendar-load-hook | 89 | @item calendar-load-hook |
| 90 | @inforef{Calendar Customizing,, emacs-xtra}. | 90 | @iftex |
| 91 | @xref{Calendar Customizing,,, emacs-xtra}. | ||
| 92 | @end iftex | ||
| 93 | @ifnottex | ||
| 94 | @xref{Calendar Customizing,,, emacs}. | ||
| 95 | @end ifnottex | ||
| 96 | |||
| 91 | 97 | ||
| 92 | @item change-major-mode-hook | 98 | @item change-major-mode-hook |
| 93 | @xref{Creating Buffer-Local}. | 99 | @xref{Creating Buffer-Local}. |
| @@ -124,7 +130,12 @@ is useful for truncating history lists, for example. @xref{Saving | |||
| 124 | Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}. | 130 | Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}. |
| 125 | 131 | ||
| 126 | @item diary-display-hook | 132 | @item diary-display-hook |
| 127 | @inforef{Fancy Diary Display,, emacs-xtra}. | 133 | @iftex |
| 134 | @xref{Fancy Diary Display,,, emacs-xtra}. | ||
| 135 | @end iftex | ||
| 136 | @ifnottex | ||
| 137 | @xref{Fancy Diary Display,,, emacs}. | ||
| 138 | @end ifnottex | ||
| 128 | 139 | ||
| 129 | @item diary-hook | 140 | @item diary-hook |
| 130 | List of functions called after the display of the diary. Can be used | 141 | List of functions called after the display of the diary. Can be used |
| @@ -170,7 +181,12 @@ for appointment notification. | |||
| 170 | @xref{Other Font Lock Variables}. | 181 | @xref{Other Font Lock Variables}. |
| 171 | 182 | ||
| 172 | @item initial-calendar-window-hook | 183 | @item initial-calendar-window-hook |
| 173 | @inforef{Calendar Customizing,, emacs-xtra}. | 184 | @iftex |
| 185 | @xref{Calendar Customizing,,, emacs-xtra}. | ||
| 186 | @end iftex | ||
| 187 | @ifnottex | ||
| 188 | @xref{Calendar Customizing,,, emacs}. | ||
| 189 | @end ifnottex | ||
| 174 | 190 | ||
| 175 | @item kbd-macro-termination-hook | 191 | @item kbd-macro-termination-hook |
| 176 | @xref{Keyboard Macros}. | 192 | @xref{Keyboard Macros}. |
| @@ -190,14 +206,24 @@ for appointment notification. | |||
| 190 | @item lisp-indent-function | 206 | @item lisp-indent-function |
| 191 | 207 | ||
| 192 | @item list-diary-entries-hook | 208 | @item list-diary-entries-hook |
| 193 | @inforef{Fancy Diary Display,, emacs-xtra}. | 209 | @iftex |
| 210 | @xref{Fancy Diary Display,,, emacs-xtra}. | ||
| 211 | @end iftex | ||
| 212 | @ifnottex | ||
| 213 | @xref{Fancy Diary Display,,, emacs}. | ||
| 214 | @end ifnottex | ||
| 194 | 215 | ||
| 195 | @item mail-setup-hook | 216 | @item mail-setup-hook |
| 196 | @xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs | 217 | @xref{Mail Mode Misc,, Mail Mode Miscellany, emacs, the GNU Emacs |
| 197 | Manual}. | 218 | Manual}. |
| 198 | 219 | ||
| 199 | @item mark-diary-entries-hook | 220 | @item mark-diary-entries-hook |
| 200 | @inforef{Fancy Diary Display,, emacs-xtra}. | 221 | @iftex |
| 222 | @xref{Fancy Diary Display,,, emacs-xtra}. | ||
| 223 | @end iftex | ||
| 224 | @ifnottex | ||
| 225 | @xref{Fancy Diary Display,,, emacs}. | ||
| 226 | @end ifnottex | ||
| 201 | 227 | ||
| 202 | @item menu-bar-update-hook | 228 | @item menu-bar-update-hook |
| 203 | @xref{Menu Bar}. | 229 | @xref{Menu Bar}. |
| @@ -212,10 +238,20 @@ Manual}. | |||
| 212 | @xref{Mouse Position}. | 238 | @xref{Mouse Position}. |
| 213 | 239 | ||
| 214 | @item nongregorian-diary-listing-hook | 240 | @item nongregorian-diary-listing-hook |
| 215 | @inforef{Hebrew/Islamic Entries,, emacs-xtra}. | 241 | @iftex |
| 242 | @xref{Hebrew/Islamic Entries,,, emacs-xtra}. | ||
| 243 | @end iftex | ||
| 244 | @ifnottex | ||
| 245 | @xref{Hebrew/Islamic Entries,,, emacs}. | ||
| 246 | @end ifnottex | ||
| 216 | 247 | ||
| 217 | @item nongregorian-diary-marking-hook | 248 | @item nongregorian-diary-marking-hook |
| 218 | @inforef{Hebrew/Islamic Entries,, emacs-xtra}. | 249 | @iftex |
| 250 | @xref{Hebrew/Islamic Entries,,, emacs-xtra}. | ||
| 251 | @end iftex | ||
| 252 | @ifnottex | ||
| 253 | @xref{Hebrew/Islamic Entries,,, emacs}. | ||
| 254 | @end ifnottex | ||
| 219 | 255 | ||
| 220 | @item occur-hook | 256 | @item occur-hook |
| 221 | 257 | ||
| @@ -229,7 +265,12 @@ Manual}. | |||
| 229 | @xref{Command Overview}. | 265 | @xref{Command Overview}. |
| 230 | 266 | ||
| 231 | @item print-diary-entries-hook | 267 | @item print-diary-entries-hook |
| 232 | @inforef{Diary Customizing,, emacs-xtra}. | 268 | @iftex |
| 269 | @xref{Diary Customizing,,, emacs-xtra}. | ||
| 270 | @end iftex | ||
| 271 | @ifnottex | ||
| 272 | @xref{Diary Customizing,,, emacs}. | ||
| 273 | @end ifnottex | ||
| 233 | 274 | ||
| 234 | @item redisplay-end-trigger-functions | 275 | @item redisplay-end-trigger-functions |
| 235 | @xref{Window Hooks}. | 276 | @xref{Window Hooks}. |
| @@ -255,10 +296,20 @@ Manual}. | |||
| 255 | @xref{Terminal-Specific}. | 296 | @xref{Terminal-Specific}. |
| 256 | 297 | ||
| 257 | @item today-visible-calendar-hook | 298 | @item today-visible-calendar-hook |
| 258 | @inforef{Calendar Customizing,, emacs-xtra}. | 299 | @iftex |
| 300 | @xref{Calendar Customizing,,, emacs-xtra}. | ||
| 301 | @end iftex | ||
| 302 | @ifnottex | ||
| 303 | @xref{Calendar Customizing,,, emacs}. | ||
| 304 | @end ifnottex | ||
| 259 | 305 | ||
| 260 | @item today-invisible-calendar-hook | 306 | @item today-invisible-calendar-hook |
| 261 | @inforef{Calendar Customizing,, emacs-xtra}. | 307 | @iftex |
| 308 | @xref{Calendar Customizing,,, emacs-xtra}. | ||
| 309 | @end iftex | ||
| 310 | @ifnottex | ||
| 311 | @xref{Calendar Customizing,,, emacs}. | ||
| 312 | @end ifnottex | ||
| 262 | 313 | ||
| 263 | @item window-configuration-change-hook | 314 | @item window-configuration-change-hook |
| 264 | @xref{Window Hooks}. | 315 | @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 | |||
| 155 | marked as read-only (on operating systems that permit this), so that | 155 | marked as read-only (on operating systems that permit this), so that |
| 156 | the memory space can be shared by all the Emacs jobs running on the | 156 | the memory space can be shared by all the Emacs jobs running on the |
| 157 | machine at once. Pure storage is not expandable; a fixed amount is | 157 | machine at once. Pure storage is not expandable; a fixed amount is |
| 158 | allocated when Emacs is compiled, and if that is not sufficient for the | 158 | allocated when Emacs is compiled, and if that is not sufficient for |
| 159 | preloaded libraries, @file{temacs} crashes. If that happens, you must | 159 | the preloaded libraries, @file{temacs} allocates dynamic memory for |
| 160 | increase the compilation parameter @code{PURESIZE} in the file | 160 | the part that didn't fit. If that happens, you should increase the |
| 161 | @file{src/puresize.h}. This normally won't happen unless you try to | 161 | compilation parameter @code{PURESIZE} in the file |
| 162 | preload additional libraries or add features to the standard ones. | 162 | @file{src/puresize.h} and rebuild Emacs, even though the resulting |
| 163 | image will work. Such an overflow normally won't happen unless you | ||
| 164 | try to preload additional libraries or add features to the standard | ||
| 165 | ones. Emacs will display a warning about the overflow when it | ||
| 166 | starts. | ||
| 163 | 167 | ||
| 164 | @defun purecopy object | 168 | @defun purecopy object |
| 165 | This function makes a copy in pure storage of @var{object}, and returns | 169 | 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 | |||
| 1015 | is @code{nil}, no mode line will be displayed. | 1019 | is @code{nil}, no mode line will be displayed. |
| 1016 | 1020 | ||
| 1017 | @item header_line_format | 1021 | @item header_line_format |
| 1018 | This field is analoguous to @code{mode_line_format} for the mode | 1022 | This field is analogous to @code{mode_line_format} for the mode |
| 1019 | line displayed at the top of windows. | 1023 | line displayed at the top of windows. |
| 1020 | 1024 | ||
| 1021 | @item keymap | 1025 | @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: | |||
| 561 | (@var{find-in-any} emulation-mode-map-alists) | 561 | (@var{find-in-any} emulation-mode-map-alists) |
| 562 | (@var{find-in-any} minor-mode-overriding-map-alist) | 562 | (@var{find-in-any} minor-mode-overriding-map-alist) |
| 563 | (@var{find-in-any} minor-mode-map-alist) | 563 | (@var{find-in-any} minor-mode-map-alist) |
| 564 | (if (get-text-property (point) 'local-map)) | 564 | (if (get-text-property (point) 'local-map) |
| 565 | (@var{find-in} (get-text-property (point) 'local-map)) | 565 | (@var{find-in} (get-text-property (point) 'local-map)) |
| 566 | (@var{find-in} (current-local-map)))))) | 566 | (@var{find-in} (current-local-map)))))) |
| 567 | (@var{find-in} (current-global-map))) | 567 | (@var{find-in} (current-global-map))) |
| @@ -670,14 +670,15 @@ description of the order in which the active keymaps are searched: | |||
| 670 | (@var{find-in-any} emulation-mode-map-alists) | 670 | (@var{find-in-any} emulation-mode-map-alists) |
| 671 | (@var{find-in-any} minor-mode-overriding-map-alist) | 671 | (@var{find-in-any} minor-mode-overriding-map-alist) |
| 672 | (@var{find-in-any} minor-mode-map-alist) | 672 | (@var{find-in-any} minor-mode-map-alist) |
| 673 | (@var{find-in} (get-text-property (point) 'local-map)) | 673 | (if (get-text-property (point) 'local-map) |
| 674 | (@var{find-in} (current-local-map))))) | 674 | (@var{find-in} (get-text-property (point) 'local-map)) |
| 675 | (@var{find-in} (current-local-map)))))) | ||
| 675 | (@var{find-in} (current-global-map))) | 676 | (@var{find-in} (current-global-map))) |
| 676 | @end lisp | 677 | @end lisp |
| 677 | 678 | ||
| 678 | @noindent | 679 | @noindent |
| 679 | The @var{find-in} and @var{find-in-any} are pseudo functions that | 680 | The @var{find-in} and @var{find-in-any} are pseudo functions that |
| 680 | searches in one keymap respectively an alist of keymaps. | 681 | search in one keymap and in an alist of keymaps, respectively. |
| 681 | 682 | ||
| 682 | @enumerate | 683 | @enumerate |
| 683 | @item | 684 | @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 | |||
| 449 | history list symbol. The variable @code{history-delete-duplicates} | 449 | history list symbol. The variable @code{history-delete-duplicates} |
| 450 | specifies whether to delete duplicates in history. | 450 | specifies whether to delete duplicates in history. |
| 451 | 451 | ||
| 452 | @defun add-to-history history-var newelt &optional maxelt | ||
| 453 | This function adds a new element @var{newelt} to the history list | ||
| 454 | stored in the variable @var{history-var}, and returns the updated | ||
| 455 | history list. By default, the list length is limited by the value | ||
| 456 | specified by @code{history-length} (described below), but the optional | ||
| 457 | argument @var{maxelt} overrides that. The possible values of | ||
| 458 | @var{maxelt} have the same meaning as the values of | ||
| 459 | @code{history-length}. | ||
| 460 | |||
| 461 | Duplicate members are removed from the history list, unless | ||
| 462 | @code{history-delete-duplicates} is @code{nil}. | ||
| 463 | @end defun | ||
| 464 | |||
| 452 | @defvar history-length | 465 | @defvar history-length |
| 453 | The value of this variable specifies the maximum length for all | 466 | The value of this variable specifies the maximum length for all |
| 454 | history lists that don't specify their own maximum lengths. If the | 467 | history lists that don't specify their own maximum lengths. If the |
| 455 | value is @code{t}, that means there no maximum (don't delete old | 468 | value is @code{t}, that means there no maximum (don't delete old |
| 456 | elements). | 469 | elements). The value of @code{history-length} property of the history |
| 470 | list variable's symbol, if set, overrides this variable for that | ||
| 471 | particular history list. | ||
| 457 | @end defvar | 472 | @end defvar |
| 458 | 473 | ||
| 459 | @defvar history-delete-duplicates | 474 | @defvar history-delete-duplicates |
| @@ -501,7 +516,7 @@ A history list for arguments that are Lisp expressions to evaluate. | |||
| 501 | 516 | ||
| 502 | Several of the functions for minibuffer input have an argument called | 517 | Several of the functions for minibuffer input have an argument called |
| 503 | @var{initial} or @var{initial-contents}. This is a mostly-deprecated | 518 | @var{initial} or @var{initial-contents}. This is a mostly-deprecated |
| 504 | feature for specifiying that the minibuffer should start out with | 519 | feature for specifying that the minibuffer should start out with |
| 505 | certain text, instead of empty as usual. | 520 | certain text, instead of empty as usual. |
| 506 | 521 | ||
| 507 | If @var{initial} is a string, the minibuffer starts out containing the | 522 | 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. | |||
| 484 | @defun charset-after &optional pos | 484 | @defun charset-after &optional pos |
| 485 | This function return the charset of a character in the current buffer | 485 | This function return the charset of a character in the current buffer |
| 486 | at position @var{pos}. If @var{pos} is omitted or @code{nil}, it | 486 | at position @var{pos}. If @var{pos} is omitted or @code{nil}, it |
| 487 | defauls to the current value of point. If @var{pos} is out of range, | 487 | defaults to the current value of point. If @var{pos} is out of range, |
| 488 | the value is @code{nil}. | 488 | the value is @code{nil}. |
| 489 | @end defun | 489 | @end defun |
| 490 | 490 | ||
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. | |||
| 322 | 322 | ||
| 323 | @defun eql value1 value2 | 323 | @defun eql value1 value2 |
| 324 | This function acts like @code{eq} except when both arguments are | 324 | This function acts like @code{eq} except when both arguments are |
| 325 | numbers. It compares numbers by type and numberic value, so that | 325 | numbers. It compares numbers by type and numeric value, so that |
| 326 | @code{(eql 1.0 1)} returns @code{nil}, but @code{(eql 1.0 1.0)} and | 326 | @code{(eql 1.0 1)} returns @code{nil}, but @code{(eql 1.0 1.0)} and |
| 327 | @code{(eql 1 1)} both return @code{t}. | 327 | @code{(eql 1 1)} both return @code{t}. |
| 328 | @end defun | 328 | @end defun |
diff --git a/lispref/variables.texi b/lispref/variables.texi index 5b4b779448e..cd7c22b0bff 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi | |||
| @@ -1784,7 +1784,8 @@ returns non-@code{nil} given that value. Many commonly encountered | |||
| 1784 | file variables standardly have @code{safe-local-variable} properties, | 1784 | file variables standardly have @code{safe-local-variable} properties, |
| 1785 | including @code{fill-column}, @code{fill-prefix}, and | 1785 | including @code{fill-column}, @code{fill-prefix}, and |
| 1786 | @code{indent-tabs-mode}. For boolean-valued variables that are safe, | 1786 | @code{indent-tabs-mode}. For boolean-valued variables that are safe, |
| 1787 | use @code{booleanp} as the property value. | 1787 | use @code{booleanp} as the property value. Lambda expressions should |
| 1788 | be quoted so that @code{describe-variable} can display the predicate. | ||
| 1788 | 1789 | ||
| 1789 | @defopt safe-local-variable-values | 1790 | @defopt safe-local-variable-values |
| 1790 | This variable provides another way to mark some variable values as | 1791 | This variable provides another way to mark some variable values as |
| @@ -1844,6 +1845,19 @@ unconditionally; @code{nil} means ignore them; anything else means ask | |||
| 1844 | the user what to do for each file. The default value is @code{maybe}. | 1845 | the user what to do for each file. The default value is @code{maybe}. |
| 1845 | @end defopt | 1846 | @end defopt |
| 1846 | 1847 | ||
| 1848 | @defopt safe-local-eval-forms | ||
| 1849 | This variable holds a list of expressions that are safe to | ||
| 1850 | evaluate when found in the @samp{Eval:} ``variable'' in a file | ||
| 1851 | local variables list. | ||
| 1852 | @end defopt | ||
| 1853 | |||
| 1854 | If the expression is a function call and the function has a | ||
| 1855 | @code{safe-local-eval-function} property, the property value | ||
| 1856 | determines whether the expression is safe to evaluate. The property | ||
| 1857 | value can be a predicate to call to test the expression, a list of | ||
| 1858 | such predicates (it's safe if any predicate succeeds), or @code{t} | ||
| 1859 | (always safe provided the arguments are constant). | ||
| 1860 | |||
| 1847 | Text properties are also potential loopholes, since their values | 1861 | Text properties are also potential loopholes, since their values |
| 1848 | could include functions to call. So Emacs discards all text | 1862 | could include functions to call. So Emacs discards all text |
| 1849 | properties from string values specified for file local variables. | 1863 | 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 | |||
| 1419 | window. @xref{Current Buffer}. | 1419 | window. @xref{Current Buffer}. |
| 1420 | 1420 | ||
| 1421 | If the window contains a row which is taller than the height of the | 1421 | If the window contains a row which is taller than the height of the |
| 1422 | window (for example in the presense of a large image), the scroll | 1422 | window (for example in the presence of a large image), the scroll |
| 1423 | functions will adjust the window vscroll to scroll the partially | 1423 | functions will adjust the window vscroll to scroll the partially |
| 1424 | visible row. To disable this feature, Lisp code may bind the variable | 1424 | visible row. To disable this feature, Lisp code may bind the variable |
| 1425 | `auto-window-vscroll' to @code{nil} (@pxref{Vertical Scrolling}). | 1425 | `auto-window-vscroll' to @code{nil} (@pxref{Vertical Scrolling}). |
| @@ -1656,7 +1656,7 @@ pixels. In this case, the return value is @var{lines}. | |||
| 1656 | If this variable is non-@code{nil}, the line-move, scroll-up, and | 1656 | If this variable is non-@code{nil}, the line-move, scroll-up, and |
| 1657 | scroll-down functions will automatically modify the window vscroll to | 1657 | scroll-down functions will automatically modify the window vscroll to |
| 1658 | scroll through display rows that are taller that the height of the | 1658 | scroll through display rows that are taller that the height of the |
| 1659 | window, for example in the presense of large images. | 1659 | window, for example in the presence of large images. |
| 1660 | @end defvar | 1660 | @end defvar |
| 1661 | 1661 | ||
| 1662 | @node Horizontal Scrolling | 1662 | @node Horizontal Scrolling |
diff --git a/man/ChangeLog b/man/ChangeLog index bd48e3f4f20..30933b5f0a3 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,233 @@ | |||
| 1 | 2006-05-09 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * tramp.texi (Filename completion): Improve wording. | ||
| 4 | |||
| 5 | 2006-05-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 6 | |||
| 7 | * xresmini.texi (GTK resources): Inserted GTK description. | ||
| 8 | |||
| 9 | * xresources.texi (GTK resources): metafont should be menufont. | ||
| 10 | |||
| 11 | 2006-05-07 Romain Francoise <romain@orebokech.com> | ||
| 12 | |||
| 13 | * faq.texi (Using regular expressions): Fix typo. | ||
| 14 | (Packages that do not come with Emacs): Fix capitalization. | ||
| 15 | (Replacing text across multiple files): Expand node to explain how | ||
| 16 | to use `dired-do-query-replace-regexp' in more detail, based on | ||
| 17 | suggestion by Eric Hanchrow <offby1@blarg.net>. | ||
| 18 | |||
| 19 | 2006-05-06 Michael Albinus <michael.albinus@gmx.de> | ||
| 20 | |||
| 21 | * mini.texi (Completion Options): | ||
| 22 | * tramp.texi (Filename completion): Completion of remote files' | ||
| 23 | method, user name and host name is active only in partial | ||
| 24 | completion mode. | ||
| 25 | |||
| 26 | 2006-05-06 Bill Wohler <wohler@newt.com> | ||
| 27 | |||
| 28 | Release MH-E manual version 8.0. | ||
| 29 | |||
| 30 | * mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for | ||
| 31 | release 8.0. | ||
| 32 | |||
| 33 | 2006-05-06 Bill Wohler <wohler@newt.com> | ||
| 34 | |||
| 35 | * mh-e.texi (MH-BOOK-HOME): Change from | ||
| 36 | http://www.ics.uci.edu/~mh/book/mh to | ||
| 37 | http://rand-mh.sourceforge.net/book/mh. | ||
| 38 | Replace .htm suffix with .html for MH book files. | ||
| 39 | (Using This Manual): Update key binding for getting relevant | ||
| 40 | chapter in Info from command key. | ||
| 41 | (Ranges): Fix itemx. | ||
| 42 | |||
| 43 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 44 | |||
| 45 | * makefile.w32-in (emacs.dvi): | ||
| 46 | * Makefile.in (emacs.dvi): Add xresmini.texi | ||
| 47 | |||
| 48 | * xresmini.texi (Table of Resources): Remove xref to non-existent | ||
| 49 | node "LessTif Resources". | ||
| 50 | |||
| 51 | * msdog.texi (Microsoft Windows): | ||
| 52 | * calendar.texi (Calendar/Diary, Displaying the Diary) | ||
| 53 | (Special Diary Entries, Importing Diary, Holidays): | ||
| 54 | * programs.texi (Program Modes): | ||
| 55 | * text.texi (Text): | ||
| 56 | * buffers.texi (Several Buffers): | ||
| 57 | * files.texi (Comparing Files): Fix cross-references to emacs-xtra. | ||
| 58 | |||
| 59 | 2006-05-06 Eli Zaretskii <eliz@gnu.org> | ||
| 60 | |||
| 61 | The following changes merge the emacs-xtra manual into the main | ||
| 62 | manual, but only for on-line version of the manual. | ||
| 63 | |||
| 64 | * vc2-xtra.texi (Version Backups, Local Version Control) | ||
| 65 | (Making Snapshots, Change Logs and VC, Version Headers) | ||
| 66 | (Customizing VC, CVS Options) [ifnottex]: Conditional xref's for | ||
| 67 | on-line manual. | ||
| 68 | |||
| 69 | * vc1-xtra.texi (VC Dired Mode) [ifnottex]: Conditional xref's | ||
| 70 | for on-line manual. | ||
| 71 | |||
| 72 | * msdog-xtra.texi (MS-DOS, MS-DOS Keyboard, MS-DOS Mouse) | ||
| 73 | (MS-DOS Display, MS-DOS File Names, MS-DOS Printing) | ||
| 74 | (MS-DOS and MULE, MS-DOS Processes) [ifnottex]: Conditional xref's | ||
| 75 | for on-line manual. | ||
| 76 | |||
| 77 | * fortran-xtra.texi (Fortran, Fortran Autofill) | ||
| 78 | (Fortran Autofill, Fortran Abbrev) [ifnottex]: Conditional xref's | ||
| 79 | for on-line manual. | ||
| 80 | |||
| 81 | * picture-xtra.texi (Basic Picture, Rectangles in Picture) [ifnottex]: | ||
| 82 | Conditional xref's for on-line manual. | ||
| 83 | |||
| 84 | * emerge-xtra.texi (Emerge, Overview of Emerge) | ||
| 85 | (Fine Points of Emerge) [ifnottex]: Conditional xref's for on-line | ||
| 86 | manual. | ||
| 87 | |||
| 88 | * Makefile.in (INFO_TARGETS): Remove ../info/emacs-xtra. | ||
| 89 | (EMACS_XTRA): New variable, lists the new *-xtra.texi files. | ||
| 90 | (EMACSSOURCES): Use EMACS_XTRA. | ||
| 91 | (../info/emacs-xtra): Remove. | ||
| 92 | (emacs-xtra.dvi): Add EMACS_XTRA to prerequisites. | ||
| 93 | |||
| 94 | * makefile.w32-in (INFO_TARGETS): Remove $(infodir)/emacs-xtra. | ||
| 95 | (EMACS_XTRA): New variable, lists the new *-xtra.texi files. | ||
| 96 | (EMACSSOURCES): Use EMACS_XTRA. | ||
| 97 | ($(infodir)/emacs-xtra): Remove. | ||
| 98 | (emacs-xtra.dvi): Add EMACS_XTRA to prerequisites. | ||
| 99 | |||
| 100 | * trouble.texi (Quitting): | ||
| 101 | * text.texi (Text): | ||
| 102 | * programs.texi (Program Modes): | ||
| 103 | * msdog.texi (Microsoft Windows): | ||
| 104 | * frames.texi (Frames): | ||
| 105 | * files.texi (Backup, Version Control, VC Concepts) | ||
| 106 | (Types of Log File, Advanced C-x v v, Log Buffer, Old Versions) | ||
| 107 | (Registering, VC Status, VC Undo, Multi-User Branching) | ||
| 108 | (Comparing Files): | ||
| 109 | * calendar.texi (Calendar/Diary, Holidays, Displaying the Diary) | ||
| 110 | (Displaying the Diary, Special Diary Entries, Importing Diary): | ||
| 111 | * buffers.texi (Several Buffers): Replace inforef to emacs-xtra by | ||
| 112 | conditional xref's, depending on @iftex/@ifnottex. | ||
| 113 | |||
| 114 | * msdog.texi (Microsoft Windows) [ifnottex]: Add menu entry for | ||
| 115 | "MS-DOS". @include msdog-xtra.texi. | ||
| 116 | |||
| 117 | * programs.texi (Programs) [ifnottex]: Add menu entry for "Fortran". | ||
| 118 | <Top Level> [ifnottex]: @include fortran-xtra.texi. | ||
| 119 | |||
| 120 | * files.texi (Secondary VC Commands) [ifnottex]: Add menu entries | ||
| 121 | for vc-xtra.texi subsections. | ||
| 122 | (VC Undo) [ifnottex]: @include vc1-xtra.texi and @lowersections it. | ||
| 123 | (Multi-User Branching) [ifnottex]: @include vc2-xtra.texi. | ||
| 124 | |||
| 125 | * sending.texi (Sending Mail): A @node line without explicit Prev, | ||
| 126 | Next, and Up links. | ||
| 127 | |||
| 128 | * abbrevs.texi (Abbrevs): A @node line without explicit Prev, | ||
| 129 | Next, and Up links. | ||
| 130 | |||
| 131 | * emacs.texi (Top) [ifnottex]: Add menu entries for "Picture Mode" | ||
| 132 | and its sections. @include picture-xtra.texi | ||
| 133 | |||
| 134 | * maintaining.texi (Maintaining) [ifnottex]: Add menu entry for | ||
| 135 | "Emerge". | ||
| 136 | (List Tags) [ifnottex]: @include emerge-xtra.texi. | ||
| 137 | |||
| 138 | * cal-xtra.texi (Daylight Savings): Remove this node: it is an | ||
| 139 | exact duplicate of its name-sake in calendar.texi. | ||
| 140 | |||
| 141 | * calendar.texi (Calendar/Diary) [ifnottex]: Add menu item for | ||
| 142 | "Advanced Calendar/Diary Usage". | ||
| 143 | (Time Intervals) [ifnottex]: @include cal-xtra.texi. | ||
| 144 | |||
| 145 | * dired.texi (Subdirectories in Dired) [ifnottex]: @include | ||
| 146 | dired-xtra.texi. | ||
| 147 | (Dired) [ifnottex]: Add menu entry for "Subdir Switches". | ||
| 148 | |||
| 149 | * files.texi (Reverting) [ifnottex]: @include arevert-xtra.texi. | ||
| 150 | (Files) [ifnottex]: Add menu entry for Autorevert. | ||
| 151 | |||
| 152 | * emacs-xtra.texi (Introduction): Reword to make consistent with | ||
| 153 | printed version only. | ||
| 154 | <Top level>: Remove the body of all chapters and move them to the | ||
| 155 | new *-xtra.texi files. Use @raisesections and @lowersections to | ||
| 156 | convert sections to chapters etc. | ||
| 157 | |||
| 158 | * msdog-xtra.texi: | ||
| 159 | * fortran-xtra.texi: | ||
| 160 | * vc-xtra.texi: | ||
| 161 | * vc1-xtra.texi: | ||
| 162 | * vc2-xtra.texi: | ||
| 163 | * emerge-xtra.texi: | ||
| 164 | * cal-xtra.texi: | ||
| 165 | * dired-xtra.texi: | ||
| 166 | * arevert-xtra.texi: New files, with text from respective chapters | ||
| 167 | of emacs-xtra.texi. Convert each @chapter into @section, @section | ||
| 168 | into @subsection, etc. | ||
| 169 | |||
| 170 | * emacs-xtra.texi (MS-DOS): Renamed from "MS-DOG". All references | ||
| 171 | updated. | ||
| 172 | |||
| 173 | * msdog.texi (Microsoft Windows): Rename from "Emacs and Microsoft | ||
| 174 | Windows". All references updated. | ||
| 175 | |||
| 176 | 2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 177 | |||
| 178 | * macos.texi (Mac Input): Mention input from Character Palette. | ||
| 179 | (Mac Font Specs): Fix typo. | ||
| 180 | |||
| 181 | 2006-05-05 Richard Stallman <rms@gnu.org> | ||
| 182 | |||
| 183 | * files.texi (Diff Mode): Minor cleanup. | ||
| 184 | |||
| 185 | 2006-05-05 Karl Berry <karl@gnu.org> | ||
| 186 | |||
| 187 | * texinfo.tex (\definetextfonsizexi, \definetextfonsizex): new cmds. | ||
| 188 | (\fonttextsize): new user-level command to change text font size. | ||
| 189 | * emacs.texi: call @fonttextsize 10, inside @tex to avoid | ||
| 190 | errors from the current release of makeinfo (4.8). | ||
| 191 | * help.texi (Library Keywords): change widest word in multitable | ||
| 192 | template from `emulations' to `convenience'. (Not sure if this is | ||
| 193 | related to the font change.) | ||
| 194 | |||
| 195 | 2006-05-05 Eli Zaretskii <eliz@gnu.org> | ||
| 196 | |||
| 197 | * files.texi (File Names): Add a footnote about limited support of | ||
| 198 | ~USER on MS-Windows. | ||
| 199 | |||
| 200 | * cmdargs.texi (Initial Options): Add a footnote about limited | ||
| 201 | support of ~USER on MS-Windows. | ||
| 202 | |||
| 203 | 2006-05-03 Richard Stallman <rms@gnu.org> | ||
| 204 | |||
| 205 | * files.texi (Diff Mode): Node moved here. | ||
| 206 | (Comparing Files): Delete what duplicates new node. | ||
| 207 | (Files): Put Diff Mode in menu. | ||
| 208 | |||
| 209 | * misc.texi (Diff Mode): Moved to files.texi. | ||
| 210 | |||
| 211 | * emacs.texi (Top): Update menu for Diff Mode. | ||
| 212 | |||
| 213 | * trouble.texi (Emergency Escape): Simplify. | ||
| 214 | |||
| 215 | * emacs.texi (Top): Minor clarification. | ||
| 216 | |||
| 217 | 2006-05-03 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 218 | |||
| 219 | * commands.texi, entering.texi, screen.texi: Many simplifications. | ||
| 220 | |||
| 221 | 2006-05-03 Richard Stallman <rms@gnu.org> | ||
| 222 | |||
| 223 | * commands.texi (Text Characters): Delete paragraph about unibyte | ||
| 224 | non-ASCII printing chars. | ||
| 225 | |||
| 226 | * killing.texi (Killing): Say "graphical displays". | ||
| 227 | * display.texi: Say "graphical displays". | ||
| 228 | |||
| 229 | * cmdargs.texi (Misc X): Say "graphical displays". | ||
| 230 | |||
| 1 | 2006-05-01 Richard Stallman <rms@gnu.org> | 231 | 2006-05-01 Richard Stallman <rms@gnu.org> |
| 2 | 232 | ||
| 3 | * emacs.texi (Top): Add Diff Mode to menu. | 233 | * emacs.texi (Top): Add Diff Mode to menu. |
| @@ -33,7 +263,7 @@ | |||
| 33 | 263 | ||
| 34 | * pgg.texi (Caching passphrase): Fix markup and typos. Simplify. | 264 | * pgg.texi (Caching passphrase): Fix markup and typos. Simplify. |
| 35 | 265 | ||
| 36 | 2006-04-26 Sascha Wilde <wilde@sha-bang.de> | 266 | 2006-04-26 Sascha Wilde <wilde@sha-bang.de> (tiny change) |
| 37 | 267 | ||
| 38 | * pgg.texi (Caching passphrase): Add pgg-gpg-use-agent. | 268 | * pgg.texi (Caching passphrase): Add pgg-gpg-use-agent. |
| 39 | 269 | ||
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@ | |||
| 33 | # The makeinfo program is part of the Texinfo distribution. | 33 | # The makeinfo program is part of the Texinfo distribution. |
| 34 | # Use --force so that it generates output even if there are errors. | 34 | # Use --force so that it generates output even if there are errors. |
| 35 | MAKEINFO = makeinfo --force | 35 | MAKEINFO = makeinfo --force |
| 36 | INFO_TARGETS = ../info/emacs ../info/emacs-xtra ../info/ccmode ../info/cl \ | 36 | INFO_TARGETS = ../info/emacs ../info/ccmode ../info/cl \ |
| 37 | ../info/dired-x ../info/ediff ../info/forms ../info/gnus \ | 37 | ../info/dired-x ../info/ediff ../info/forms ../info/gnus \ |
| 38 | ../info/message ../info/sieve ../info/pgg ../info/emacs-mime \ | 38 | ../info/message ../info/sieve ../info/pgg ../info/emacs-mime \ |
| 39 | ../info/info ../info/mh-e ../info/reftex \ | 39 | ../info/info ../info/mh-e ../info/reftex \ |
| @@ -61,6 +61,18 @@ INFOSOURCES = info.texi | |||
| 61 | TEXI2DVI = texi2dvi | 61 | TEXI2DVI = texi2dvi |
| 62 | ENVADD = TEXINPUTS="$(srcdir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)" | 62 | ENVADD = TEXINPUTS="$(srcdir):$(TEXINPUTS)" MAKEINFO="$(MAKEINFO) -I$(srcdir)" |
| 63 | 63 | ||
| 64 | EMACS_XTRA=\ | ||
| 65 | $(srcdir)/arevert-xtra.texi \ | ||
| 66 | $(srcdir)/cal-xtra.texi \ | ||
| 67 | $(srcdir)/dired-xtra.texi \ | ||
| 68 | $(srcdir)/picture-xtra.texi \ | ||
| 69 | $(srcdir)/emerge-xtra.texi \ | ||
| 70 | $(srcdir)/vc-xtra.texi \ | ||
| 71 | $(srcdir)/vc1-xtra.texi \ | ||
| 72 | $(srcdir)/vc2-xtra.texi \ | ||
| 73 | $(srcdir)/fortran-xtra.texi \ | ||
| 74 | $(srcdir)/msdog-xtra.texi | ||
| 75 | |||
| 64 | EMACSSOURCES= \ | 76 | EMACSSOURCES= \ |
| 65 | ${srcdir}/emacs.texi \ | 77 | ${srcdir}/emacs.texi \ |
| 66 | ${srcdir}/doclicense.texi \ | 78 | ${srcdir}/doclicense.texi \ |
| @@ -104,7 +116,8 @@ EMACSSOURCES= \ | |||
| 104 | ${srcdir}/gnu.texi \ | 116 | ${srcdir}/gnu.texi \ |
| 105 | ${srcdir}/glossary.texi \ | 117 | ${srcdir}/glossary.texi \ |
| 106 | ${srcdir}/ack.texi \ | 118 | ${srcdir}/ack.texi \ |
| 107 | ${srcdir}/kmacro.texi | 119 | ${srcdir}/kmacro.texi \ |
| 120 | $(EMACS_XTRA) | ||
| 108 | 121 | ||
| 109 | info: $(top_srcdir)/info $(INFO_TARGETS) | 122 | info: $(top_srcdir)/info $(INFO_TARGETS) |
| 110 | 123 | ||
| @@ -131,7 +144,7 @@ info.dvi: ${INFOSOURCES} | |||
| 131 | ../info/emacs: ${EMACSSOURCES} | 144 | ../info/emacs: ${EMACSSOURCES} |
| 132 | cd $(srcdir); $(MAKEINFO) emacs.texi | 145 | cd $(srcdir); $(MAKEINFO) emacs.texi |
| 133 | 146 | ||
| 134 | emacs.dvi: ${EMACSSOURCES} | 147 | emacs.dvi: ${EMACSSOURCES} $(srcdir)/xresmini.texi |
| 135 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi | 148 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi |
| 136 | 149 | ||
| 137 | # This target is here so you could easily get the list of the *.texi | 150 | # This target is here so you could easily get the list of the *.texi |
| @@ -176,9 +189,7 @@ dired-x.dvi: dired-x.texi | |||
| 176 | ediff.dvi: ediff.texi | 189 | ediff.dvi: ediff.texi |
| 177 | $(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi | 190 | $(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi |
| 178 | 191 | ||
| 179 | ../info/emacs-xtra: emacs-xtra.texi | 192 | emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA) |
| 180 | cd $(srcdir); $(MAKEINFO) emacs-xtra.texi | ||
| 181 | emacs-xtra.dvi: emacs-xtra.texi | ||
| 182 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi | 193 | $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi |
| 183 | 194 | ||
| 184 | ../info/forms: forms.texi | 195 | ../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 @@ | |||
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003, |
| 3 | @c 2004, 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Abbrevs, Sending Mail, Maintaining, Top | 5 | @node Abbrevs |
| 6 | @chapter Abbrevs | 6 | @chapter Abbrevs |
| 7 | @cindex abbrevs | 7 | @cindex abbrevs |
| 8 | @cindex expansion (of abbrevs) | 8 | @cindex expansion (of abbrevs) |
| @@ -63,7 +63,7 @@ all major modes. The same abbrev can have a global definition and various | |||
| 63 | mode-specific definitions for different major modes. A mode-specific | 63 | mode-specific definitions for different major modes. A mode-specific |
| 64 | definition for the current major mode overrides a global definition. | 64 | definition for the current major mode overrides a global definition. |
| 65 | 65 | ||
| 66 | Yu can define abbrevs interactively during the editing session. You | 66 | You can define abbrevs interactively during the editing session. You |
| 67 | can also save lists of abbrev definitions in files for use in later | 67 | can also save lists of abbrev definitions in files for use in later |
| 68 | sessions. Some users keep extensive lists of abbrevs that they load | 68 | sessions. Some users keep extensive lists of abbrevs that they load |
| 69 | in every session. | 69 | 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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node Autorevert | ||
| 8 | @section Auto Reverting non-file Buffers | ||
| 9 | |||
| 10 | Normally Global Auto Revert Mode only reverts file buffers. There are | ||
| 11 | two ways to auto-revert certain non-file buffers: enabling Auto Revert | ||
| 12 | Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting | ||
| 13 | @code{global-auto-revert-non-file-buffers} to @code{t}. The latter | ||
| 14 | enables Auto Reverting for all types of buffers for which it is | ||
| 15 | implemented, that is, for the types of buffers listed in the menu | ||
| 16 | below. | ||
| 17 | |||
| 18 | Like file buffers, non-file buffers should normally not revert while | ||
| 19 | you are working on them, or while they contain information that might | ||
| 20 | get lost after reverting. Therefore, they do not revert if they are | ||
| 21 | ``modified''. This can get tricky, because deciding when a non-file | ||
| 22 | buffer should be marked modified is usually more difficult than for | ||
| 23 | file buffers. | ||
| 24 | |||
| 25 | Another tricky detail is that, for efficiency reasons, Auto Revert | ||
| 26 | often does not try to detect all possible changes in the buffer, only | ||
| 27 | changes that are ``major'' or easy to detect. Hence, enabling | ||
| 28 | auto-reverting for a non-file buffer does not always guarantee that | ||
| 29 | all information in the buffer is up to date and does not necessarily | ||
| 30 | make manual reverts useless. | ||
| 31 | |||
| 32 | At the other extreme, certain buffers automatically auto-revert every | ||
| 33 | @code{auto-revert-interval} seconds. (This currently only applies to | ||
| 34 | the Buffer Menu.) In this case, Auto Revert does not print any | ||
| 35 | messages while reverting, even when @code{auto-revert-verbose} is | ||
| 36 | non-@code{nil}. | ||
| 37 | |||
| 38 | The details depend on the particular types of buffers and are | ||
| 39 | explained in the corresponding sections. | ||
| 40 | |||
| 41 | @menu | ||
| 42 | * Auto Reverting the Buffer Menu:: | ||
| 43 | * Auto Reverting Dired:: | ||
| 44 | * Supporting additional buffers:: | ||
| 45 | @end menu | ||
| 46 | |||
| 47 | @node Auto Reverting the Buffer Menu | ||
| 48 | @subsection Auto Reverting the Buffer Menu | ||
| 49 | |||
| 50 | If auto-reverting of non-file buffers is enabled, the Buffer Menu | ||
| 51 | automatically reverts every @code{auto-revert-interval} seconds, | ||
| 52 | whether there is a need for it or not. (It would probably take longer | ||
| 53 | to check whether there is a need than to actually revert.) | ||
| 54 | |||
| 55 | If the Buffer Menu inappropriately gets marked modified, just revert | ||
| 56 | it manually using @kbd{g} and auto-reverting will resume. However, if | ||
| 57 | you marked certain buffers to get deleted or to be displayed, you have | ||
| 58 | to be careful, because reverting erases all marks. The fact that | ||
| 59 | adding marks sets the buffer's modified flag prevents Auto Revert from | ||
| 60 | automatically erasing the marks. | ||
| 61 | |||
| 62 | @node Auto Reverting Dired | ||
| 63 | @subsection Auto Reverting Dired buffers | ||
| 64 | |||
| 65 | Auto-reverting Dired buffers currently works on GNU or Unix style | ||
| 66 | operating systems. It may not work satisfactorily on some other | ||
| 67 | systems. | ||
| 68 | |||
| 69 | Dired buffers only auto-revert when the file list of the buffer's main | ||
| 70 | directory changes. They do not auto-revert when information about a | ||
| 71 | particular file changes or when inserted subdirectories change. To be | ||
| 72 | sure that @emph{all} listed information is up to date, you have to | ||
| 73 | manually revert using @kbd{g}, @emph{even} if auto-reverting is | ||
| 74 | enabled in the Dired buffer. Sometimes, you might get the impression | ||
| 75 | that modifying or saving files listed in the main directory actually | ||
| 76 | does cause auto-reverting. This is because making changes to a file, | ||
| 77 | or saving it, very often causes changes in the directory itself, for | ||
| 78 | instance, through backup files or auto-save files. However, this is | ||
| 79 | not guaranteed. | ||
| 80 | |||
| 81 | If the Dired buffer is marked modified and there are no changes you | ||
| 82 | want to protect, then most of the time you can make auto-reverting | ||
| 83 | resume by manually reverting the buffer using @kbd{g}. There is one | ||
| 84 | exception. If you flag or mark files, you can safely revert the | ||
| 85 | buffer. This will not erase the flags or marks (unless the marked | ||
| 86 | file has been deleted, of course). However, the buffer will stay | ||
| 87 | modified, even after reverting, and auto-reverting will not resume. | ||
| 88 | This is because, if you flag or mark files, you may be working on the | ||
| 89 | buffer and you might not want the buffer to change without warning. | ||
| 90 | If you want auto-reverting to resume in the presence of marks and | ||
| 91 | flags, mark the buffer non-modified using @kbd{M-~}. However, adding, | ||
| 92 | deleting or changing marks or flags will mark it modified again. | ||
| 93 | |||
| 94 | Remote Dired buffers are not auto-reverted. Neither are Dired buffers | ||
| 95 | for which you used shell wildcards or file arguments to list only some | ||
| 96 | of the files. @samp{*Find*} and @samp{*Locate*} buffers do not | ||
| 97 | auto-revert either. | ||
| 98 | |||
| 99 | @node Supporting additional buffers | ||
| 100 | @subsection Adding Support for Auto-Reverting additional Buffers. | ||
| 101 | |||
| 102 | This section is intended for Elisp programmers who would like to add | ||
| 103 | support for auto-reverting new types of buffers. | ||
| 104 | |||
| 105 | To support auto-reverting the buffer must first of all have a | ||
| 106 | @code{revert-buffer-function}. @xref{Definition of | ||
| 107 | revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}. | ||
| 108 | |||
| 109 | In addition, it @emph{must} have a @code{buffer-stale-function}. | ||
| 110 | |||
| 111 | @defvar buffer-stale-function | ||
| 112 | The value of this variable is a function to check whether a non-file | ||
| 113 | buffer needs reverting. This should be a function with one optional | ||
| 114 | argument @var{noconfirm}. The function should return non-@code{nil} | ||
| 115 | if the buffer should be reverted. The buffer is current when this | ||
| 116 | function is called. | ||
| 117 | |||
| 118 | While this function is mainly intended for use in auto-reverting, it | ||
| 119 | could be used for other purposes as well. For instance, if | ||
| 120 | auto-reverting is not enabled, it could be used to warn the user that | ||
| 121 | the buffer needs reverting. The idea behind the @var{noconfirm} | ||
| 122 | argument is that it should be @code{t} if the buffer is going to be | ||
| 123 | reverted without asking the user and @code{nil} if the function is | ||
| 124 | just going to be used to warn the user that the buffer is out of date. | ||
| 125 | In particular, for use in auto-reverting, @var{noconfirm} is @code{t}. | ||
| 126 | If the function is only going to be used for auto-reverting, you can | ||
| 127 | ignore the @var{noconfirm} argument. | ||
| 128 | |||
| 129 | If you just want to automatically auto-revert every | ||
| 130 | @code{auto-revert-interval} seconds, use: | ||
| 131 | |||
| 132 | @example | ||
| 133 | (set (make-local-variable 'buffer-stale-function) | ||
| 134 | #'(lambda (&optional noconfirm) 'fast)) | ||
| 135 | @end example | ||
| 136 | |||
| 137 | @noindent | ||
| 138 | in the buffer's mode function. | ||
| 139 | |||
| 140 | The special return value @samp{fast} tells the caller that the need | ||
| 141 | for reverting was not checked, but that reverting the buffer is fast. | ||
| 142 | It also tells Auto Revert not to print any revert messages, even if | ||
| 143 | @code{auto-revert-verbose} is non-@code{nil}. This is important, as | ||
| 144 | getting revert messages every @code{auto-revert-interval} seconds can | ||
| 145 | be very annoying. The information provided by this return value could | ||
| 146 | also be useful if the function is consulted for purposes other than | ||
| 147 | auto-reverting. | ||
| 148 | @end defvar | ||
| 149 | |||
| 150 | Once the buffer has a @code{revert-buffer-function} and a | ||
| 151 | @code{buffer-stale-function}, several problems usually remain. | ||
| 152 | |||
| 153 | The buffer will only auto-revert if it is marked unmodified. Hence, | ||
| 154 | you will have to make sure that various functions mark the buffer | ||
| 155 | modified if and only if either the buffer contains information that | ||
| 156 | might be lost by reverting or there is reason to believe that the user | ||
| 157 | might be inconvenienced by auto-reverting, because he is actively | ||
| 158 | working on the buffer. The user can always override this by manually | ||
| 159 | adjusting the modified status of the buffer. To support this, calling | ||
| 160 | the @code{revert-buffer-function} on a buffer that is marked | ||
| 161 | unmodified should always keep the buffer marked unmodified. | ||
| 162 | |||
| 163 | It is important to assure that point does not continuously jump around | ||
| 164 | as a consequence of auto-reverting. Of course, moving point might be | ||
| 165 | inevitable if the buffer radically changes. | ||
| 166 | |||
| 167 | You should make sure that the @code{revert-buffer-function} does not | ||
| 168 | print messages that unnecessarily duplicate Auto Revert's own messages | ||
| 169 | if @code{auto-revert-verbose} is @code{t} and effectively override a | ||
| 170 | @code{nil} value for @code{auto-revert-verbose}. Hence, adapting a | ||
| 171 | mode for auto-reverting often involves getting rid of such messages. | ||
| 172 | This is especially important for buffers that automatically | ||
| 173 | auto-revert every @code{auto-revert-interval} seconds. | ||
| 174 | |||
| 175 | Also, you may want to update the documentation string of | ||
| 176 | @code{global-auto-revert-non-file-buffers}. | ||
| 177 | |||
| 178 | @ifinfo | ||
| 179 | Finally, you should add a node to this chapter's menu. This node | ||
| 180 | @end ifinfo | ||
| 181 | @ifnotinfo | ||
| 182 | Finally, you should add a section to this chapter. This section | ||
| 183 | @end ifnotinfo | ||
| 184 | should at the very least make clear whether enabling auto-reverting | ||
| 185 | for the buffer reliably assures that all information in the buffer is | ||
| 186 | completely up to date (or will be after @code{auto-revert-interval} | ||
| 187 | seconds). | ||
| 188 | |||
| 189 | @ignore | ||
| 190 | arch-tag: 2983e613-a272-45f6-9593-3010ad7f865e | ||
| 191 | @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 | |||
| 480 | mode in this buffer, as long as it is not marked modified. Global | 480 | mode in this buffer, as long as it is not marked modified. Global |
| 481 | Auto Revert mode applies to the @samp{*Buffer List*} buffer only if | 481 | Auto Revert mode applies to the @samp{*Buffer List*} buffer only if |
| 482 | @code{global-auto-revert-non-file-buffers} is non-@code{nil}. | 482 | @code{global-auto-revert-non-file-buffers} is non-@code{nil}. |
| 483 | @inforef{Autorevert,, emacs-xtra}, for details. | 483 | @iftex |
| 484 | @xref{Autorevert,,, emacs-xtra, Specialized Emacs Features}, for details. | ||
| 485 | @end iftex | ||
| 486 | @ifnottex | ||
| 487 | @xref{Autorevert, global-auto-revert-non-file-buffers}, for details. | ||
| 488 | @end ifnottex | ||
| 489 | |||
| 484 | 490 | ||
| 485 | The command @code{buffer-menu-other-window} works the same as | 491 | The command @code{buffer-menu-other-window} works the same as |
| 486 | @code{buffer-menu}, except that it displays the buffers list in | 492 | @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}. | |||
| 381 | (recursive grep) are more user-friendly versions of @code{grep} and | 381 | (recursive grep) are more user-friendly versions of @code{grep} and |
| 382 | @code{grep-find}, which prompt separately for the regular expression | 382 | @code{grep-find}, which prompt separately for the regular expression |
| 383 | to match, the files to search, and the base directory for the search | 383 | to match, the files to search, and the base directory for the search |
| 384 | (rgrep only). Case sensitivitivy of the search is controlled by the | 384 | (rgrep only). Case sensitivity of the search is controlled by the |
| 385 | current value of @code{case-fold-search}. | 385 | current value of @code{case-fold-search}. |
| 386 | 386 | ||
| 387 | These commands build the shell commands based on the variables | 387 | 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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | |||
| 8 | @c Moved here from the Emacs Lisp Reference Manual, 2005-03-26. | ||
| 9 | @node Advanced Calendar/Diary Usage | ||
| 10 | @section Customizing the Calendar and Diary | ||
| 11 | |||
| 12 | There are many customizations that you can use to make the calendar and | ||
| 13 | diary suit your personal tastes. | ||
| 14 | |||
| 15 | @menu | ||
| 16 | * Calendar Customizing:: Defaults you can set. | ||
| 17 | * Holiday Customizing:: Defining your own holidays. | ||
| 18 | * Date Display Format:: Changing the format. | ||
| 19 | * Time Display Format:: Changing the format. | ||
| 20 | * Diary Customizing:: Defaults you can set. | ||
| 21 | * Hebrew/Islamic Entries:: How to obtain them. | ||
| 22 | * Fancy Diary Display:: Enhancing the diary display, sorting entries, | ||
| 23 | using included diary files. | ||
| 24 | * Sexp Diary Entries:: Fancy things you can do. | ||
| 25 | @end menu | ||
| 26 | |||
| 27 | @node Calendar Customizing | ||
| 28 | @subsection Customizing the Calendar | ||
| 29 | @vindex calendar-holiday-marker | ||
| 30 | @vindex diary-entry-marker | ||
| 31 | The variable @code{calendar-holiday-marker} specifies how to mark a | ||
| 32 | date as being a holiday. Its value may be a single-character string | ||
| 33 | to insert next to the date, or a face name to use for displaying the | ||
| 34 | date. Likewise, the variable @code{diary-entry-marker} specifies how | ||
| 35 | to mark a date that has diary entries. The calendar creates faces | ||
| 36 | named @code{holiday-face} and @code{diary-face} for these purposes; | ||
| 37 | those symbols are the default values of these variables. | ||
| 38 | |||
| 39 | @vindex calendar-load-hook | ||
| 40 | The variable @code{calendar-load-hook} is a normal hook run when the | ||
| 41 | calendar package is first loaded (before actually starting to display | ||
| 42 | the calendar). | ||
| 43 | |||
| 44 | @vindex initial-calendar-window-hook | ||
| 45 | Starting the calendar runs the normal hook | ||
| 46 | @code{initial-calendar-window-hook}. Recomputation of the calendar | ||
| 47 | display does not run this hook. But if you leave the calendar with the | ||
| 48 | @kbd{q} command and reenter it, the hook runs again.@refill | ||
| 49 | |||
| 50 | @vindex today-visible-calendar-hook | ||
| 51 | The variable @code{today-visible-calendar-hook} is a normal hook run | ||
| 52 | after the calendar buffer has been prepared with the calendar when the | ||
| 53 | current date is visible in the window. One use of this hook is to | ||
| 54 | replace today's date with asterisks; to do that, use the hook function | ||
| 55 | @code{calendar-star-date}. | ||
| 56 | |||
| 57 | @findex calendar-star-date | ||
| 58 | @example | ||
| 59 | (add-hook 'today-visible-calendar-hook 'calendar-star-date) | ||
| 60 | @end example | ||
| 61 | |||
| 62 | @noindent | ||
| 63 | Another standard hook function marks the current date, either by | ||
| 64 | changing its face or by adding an asterisk. Here's how to use it: | ||
| 65 | |||
| 66 | @findex calendar-mark-today | ||
| 67 | @example | ||
| 68 | (add-hook 'today-visible-calendar-hook 'calendar-mark-today) | ||
| 69 | @end example | ||
| 70 | |||
| 71 | @noindent | ||
| 72 | @vindex calendar-today-marker | ||
| 73 | The variable @code{calendar-today-marker} specifies how to mark | ||
| 74 | today's date. Its value should be a single-character string to insert | ||
| 75 | next to the date or a face name to use for displaying the date. A | ||
| 76 | face named @code{calendar-today-face} is provided for this purpose; | ||
| 77 | that symbol is the default for this variable. | ||
| 78 | |||
| 79 | @vindex today-invisible-calendar-hook | ||
| 80 | @noindent | ||
| 81 | A similar normal hook, @code{today-invisible-calendar-hook} is run if | ||
| 82 | the current date is @emph{not} visible in the window. | ||
| 83 | |||
| 84 | @vindex calendar-move-hook | ||
| 85 | Each of the calendar cursor motion commands runs the hook | ||
| 86 | @code{calendar-move-hook} after it moves the cursor. | ||
| 87 | |||
| 88 | @node Holiday Customizing | ||
| 89 | @subsection Customizing the Holidays | ||
| 90 | |||
| 91 | @vindex calendar-holidays | ||
| 92 | @vindex christian-holidays | ||
| 93 | @vindex hebrew-holidays | ||
| 94 | @vindex islamic-holidays | ||
| 95 | Emacs knows about holidays defined by entries on one of several lists. | ||
| 96 | You can customize these lists of holidays to your own needs, adding or | ||
| 97 | deleting holidays. The lists of holidays that Emacs uses are for | ||
| 98 | general holidays (@code{general-holidays}), local holidays | ||
| 99 | (@code{local-holidays}), Christian holidays (@code{christian-holidays}), | ||
| 100 | Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim) | ||
| 101 | holidays (@code{islamic-holidays}), and other holidays | ||
| 102 | (@code{other-holidays}). | ||
| 103 | |||
| 104 | @vindex general-holidays | ||
| 105 | The general holidays are, by default, holidays common throughout the | ||
| 106 | United States. To eliminate these holidays, set @code{general-holidays} | ||
| 107 | to @code{nil}. | ||
| 108 | |||
| 109 | @vindex local-holidays | ||
| 110 | There are no default local holidays (but sites may supply some). You | ||
| 111 | can set the variable @code{local-holidays} to any list of holidays, as | ||
| 112 | described below. | ||
| 113 | |||
| 114 | @vindex all-christian-calendar-holidays | ||
| 115 | @vindex all-hebrew-calendar-holidays | ||
| 116 | @vindex all-islamic-calendar-holidays | ||
| 117 | By default, Emacs does not include all the holidays of the religions | ||
| 118 | that it knows, only those commonly found in secular calendars. For a | ||
| 119 | more extensive collection of religious holidays, you can set any (or | ||
| 120 | all) of the variables @code{all-christian-calendar-holidays}, | ||
| 121 | @code{all-hebrew-calendar-holidays}, or | ||
| 122 | @code{all-islamic-calendar-holidays} to @code{t}. If you want to | ||
| 123 | eliminate the religious holidays, set any or all of the corresponding | ||
| 124 | variables @code{christian-holidays}, @code{hebrew-holidays}, and | ||
| 125 | @code{islamic-holidays} to @code{nil}.@refill | ||
| 126 | |||
| 127 | @vindex other-holidays | ||
| 128 | You can set the variable @code{other-holidays} to any list of | ||
| 129 | holidays. This list, normally empty, is intended for individual use. | ||
| 130 | |||
| 131 | @cindex holiday forms | ||
| 132 | Each of the lists (@code{general-holidays}, @code{local-holidays}, | ||
| 133 | @code{christian-holidays}, @code{hebrew-holidays}, | ||
| 134 | @code{islamic-holidays}, and @code{other-holidays}) is a list of | ||
| 135 | @dfn{holiday forms}, each holiday form describing a holiday (or | ||
| 136 | sometimes a list of holidays). | ||
| 137 | |||
| 138 | Here is a table of the possible kinds of holiday form. Day numbers | ||
| 139 | and month numbers count starting from 1, but ``dayname'' numbers | ||
| 140 | count Sunday as 0. The element @var{string} is always the | ||
| 141 | name of the holiday, as a string. | ||
| 142 | |||
| 143 | @table @code | ||
| 144 | @item (holiday-fixed @var{month} @var{day} @var{string}) | ||
| 145 | A fixed date on the Gregorian calendar. | ||
| 146 | |||
| 147 | @item (holiday-float @var{month} @var{dayname} @var{k} @var{string}) | ||
| 148 | The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar | ||
| 149 | (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back | ||
| 150 | from the end of the month. | ||
| 151 | |||
| 152 | @item (holiday-hebrew @var{month} @var{day} @var{string}) | ||
| 153 | A fixed date on the Hebrew calendar. | ||
| 154 | |||
| 155 | @item (holiday-islamic @var{month} @var{day} @var{string}) | ||
| 156 | A fixed date on the Islamic calendar. | ||
| 157 | |||
| 158 | @item (holiday-julian @var{month} @var{day} @var{string}) | ||
| 159 | A fixed date on the Julian calendar. | ||
| 160 | |||
| 161 | @item (holiday-sexp @var{sexp} @var{string}) | ||
| 162 | A date calculated by the Lisp expression @var{sexp}. The expression | ||
| 163 | should use the variable @code{year} to compute and return the date of a | ||
| 164 | holiday, or @code{nil} if the holiday doesn't happen this year. The | ||
| 165 | value of @var{sexp} must represent the date as a list of the form | ||
| 166 | @code{(@var{month} @var{day} @var{year})}. | ||
| 167 | |||
| 168 | @item (if @var{condition} @var{holiday-form}) | ||
| 169 | A holiday that happens only if @var{condition} is true. | ||
| 170 | |||
| 171 | @item (@var{function} @r{[}@var{args}@r{]}) | ||
| 172 | A list of dates calculated by the function @var{function}, called with | ||
| 173 | arguments @var{args}. | ||
| 174 | @end table | ||
| 175 | |||
| 176 | For example, suppose you want to add Bastille Day, celebrated in | ||
| 177 | France on July 14. You can do this as follows: | ||
| 178 | |||
| 179 | @smallexample | ||
| 180 | (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) | ||
| 181 | @end smallexample | ||
| 182 | |||
| 183 | @noindent | ||
| 184 | The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the | ||
| 185 | fourteenth day of the seventh month (July). | ||
| 186 | |||
| 187 | Many holidays occur on a specific day of the week, at a specific time | ||
| 188 | of month. Here is a holiday form describing Hurricane Supplication Day, | ||
| 189 | celebrated in the Virgin Islands on the fourth Monday in August: | ||
| 190 | |||
| 191 | @smallexample | ||
| 192 | (holiday-float 8 1 4 "Hurricane Supplication Day") | ||
| 193 | @end smallexample | ||
| 194 | |||
| 195 | @noindent | ||
| 196 | Here the 8 specifies August, the 1 specifies Monday (Sunday is 0, | ||
| 197 | Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in | ||
| 198 | the month (1 specifies the first occurrence, 2 the second occurrence, | ||
| 199 | @minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and | ||
| 200 | so on). | ||
| 201 | |||
| 202 | You can specify holidays that occur on fixed days of the Hebrew, | ||
| 203 | Islamic, and Julian calendars too. For example, | ||
| 204 | |||
| 205 | @smallexample | ||
| 206 | (setq other-holidays | ||
| 207 | '((holiday-hebrew 10 2 "Last day of Hanukkah") | ||
| 208 | (holiday-islamic 3 12 "Mohammed's Birthday") | ||
| 209 | (holiday-julian 4 2 "Jefferson's Birthday"))) | ||
| 210 | @end smallexample | ||
| 211 | |||
| 212 | @noindent | ||
| 213 | adds the last day of Hanukkah (since the Hebrew months are numbered with | ||
| 214 | 1 starting from Nisan), the Islamic feast celebrating Mohammed's | ||
| 215 | birthday (since the Islamic months are numbered from 1 starting with | ||
| 216 | Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the | ||
| 217 | Julian calendar. | ||
| 218 | |||
| 219 | To include a holiday conditionally, use either Emacs Lisp's @code{if} or the | ||
| 220 | @code{holiday-sexp} form. For example, American presidential elections | ||
| 221 | occur on the first Tuesday after the first Monday in November of years | ||
| 222 | divisible by 4: | ||
| 223 | |||
| 224 | @smallexample | ||
| 225 | (holiday-sexp '(if (= 0 (% year 4)) | ||
| 226 | (calendar-gregorian-from-absolute | ||
| 227 | (1+ (calendar-dayname-on-or-before | ||
| 228 | 1 (+ 6 (calendar-absolute-from-gregorian | ||
| 229 | (list 11 1 year))))))) | ||
| 230 | "US Presidential Election") | ||
| 231 | @end smallexample | ||
| 232 | |||
| 233 | @noindent | ||
| 234 | or | ||
| 235 | |||
| 236 | @smallexample | ||
| 237 | (if (= 0 (% displayed-year 4)) | ||
| 238 | (fixed 11 | ||
| 239 | (extract-calendar-day | ||
| 240 | (calendar-gregorian-from-absolute | ||
| 241 | (1+ (calendar-dayname-on-or-before | ||
| 242 | 1 (+ 6 (calendar-absolute-from-gregorian | ||
| 243 | (list 11 1 displayed-year))))))) | ||
| 244 | "US Presidential Election")) | ||
| 245 | @end smallexample | ||
| 246 | |||
| 247 | Some holidays just don't fit into any of these forms because special | ||
| 248 | calculations are involved in their determination. In such cases you | ||
| 249 | must write a Lisp function to do the calculation. To include eclipses, | ||
| 250 | for example, add @code{(eclipses)} to @code{other-holidays} | ||
| 251 | and write an Emacs Lisp function @code{eclipses} that returns a | ||
| 252 | (possibly empty) list of the relevant Gregorian dates among the range | ||
| 253 | visible in the calendar window, with descriptive strings, like this: | ||
| 254 | |||
| 255 | @smallexample | ||
| 256 | (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... ) | ||
| 257 | @end smallexample | ||
| 258 | |||
| 259 | @node Date Display Format | ||
| 260 | @subsection Date Display Format | ||
| 261 | @vindex calendar-date-display-form | ||
| 262 | |||
| 263 | You can customize the manner of displaying dates in the diary, in mode | ||
| 264 | lines, and in messages by setting @code{calendar-date-display-form}. | ||
| 265 | This variable holds a list of expressions that can involve the variables | ||
| 266 | @code{month}, @code{day}, and @code{year}, which are all numbers in | ||
| 267 | string form, and @code{monthname} and @code{dayname}, which are both | ||
| 268 | alphabetic strings. In the American style, the default value of this | ||
| 269 | list is as follows: | ||
| 270 | |||
| 271 | @smallexample | ||
| 272 | ((if dayname (concat dayname ", ")) monthname " " day ", " year) | ||
| 273 | @end smallexample | ||
| 274 | |||
| 275 | @noindent | ||
| 276 | while in the European style this value is the default: | ||
| 277 | |||
| 278 | @smallexample | ||
| 279 | ((if dayname (concat dayname ", ")) day " " monthname " " year) | ||
| 280 | @end smallexample | ||
| 281 | |||
| 282 | @noindent | ||
| 283 | The ISO standard date representation is this: | ||
| 284 | |||
| 285 | @smallexample | ||
| 286 | (year "-" month "-" day) | ||
| 287 | @end smallexample | ||
| 288 | |||
| 289 | @noindent | ||
| 290 | This specifies a typical American format: | ||
| 291 | |||
| 292 | @smallexample | ||
| 293 | (month "/" day "/" (substring year -2)) | ||
| 294 | @end smallexample | ||
| 295 | |||
| 296 | @node Time Display Format | ||
| 297 | @subsection Time Display Format | ||
| 298 | @vindex calendar-time-display-form | ||
| 299 | |||
| 300 | The calendar and diary by default display times of day in the | ||
| 301 | conventional American style with the hours from 1 through 12, minutes, | ||
| 302 | and either @samp{am} or @samp{pm}. If you prefer the European style, | ||
| 303 | also known in the US as military, in which the hours go from 00 to 23, | ||
| 304 | you can alter the variable @code{calendar-time-display-form}. This | ||
| 305 | variable is a list of expressions that can involve the variables | ||
| 306 | @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all | ||
| 307 | numbers in string form, and @code{am-pm} and @code{time-zone}, which are | ||
| 308 | both alphabetic strings. The default value of | ||
| 309 | @code{calendar-time-display-form} is as follows: | ||
| 310 | |||
| 311 | @smallexample | ||
| 312 | (12-hours ":" minutes am-pm | ||
| 313 | (if time-zone " (") time-zone (if time-zone ")")) | ||
| 314 | @end smallexample | ||
| 315 | |||
| 316 | @noindent | ||
| 317 | Here is a value that provides European style times: | ||
| 318 | |||
| 319 | @smallexample | ||
| 320 | (24-hours ":" minutes | ||
| 321 | (if time-zone " (") time-zone (if time-zone ")")) | ||
| 322 | @end smallexample | ||
| 323 | |||
| 324 | @node Diary Customizing | ||
| 325 | @subsection Customizing the Diary | ||
| 326 | |||
| 327 | @vindex holidays-in-diary-buffer | ||
| 328 | Ordinarily, the mode line of the diary buffer window indicates any | ||
| 329 | holidays that fall on the date of the diary entries. The process of | ||
| 330 | checking for holidays can take several seconds, so including holiday | ||
| 331 | information delays the display of the diary buffer noticeably. If you'd | ||
| 332 | prefer to have a faster display of the diary buffer but without the | ||
| 333 | holiday information, set the variable @code{holidays-in-diary-buffer} to | ||
| 334 | @code{nil}.@refill | ||
| 335 | |||
| 336 | @vindex number-of-diary-entries | ||
| 337 | The variable @code{number-of-diary-entries} controls the number of | ||
| 338 | days of diary entries to be displayed at one time. It affects the | ||
| 339 | initial display when @code{view-diary-entries-initially} is @code{t}, as | ||
| 340 | well as the command @kbd{M-x diary}. For example, the default value is | ||
| 341 | 1, which says to display only the current day's diary entries. If the | ||
| 342 | value is 2, both the current day's and the next day's entries are | ||
| 343 | displayed. The value can also be a vector of seven elements: for | ||
| 344 | example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries | ||
| 345 | appear on Sunday, the current date's and the next day's diary entries | ||
| 346 | appear Monday through Thursday, Friday through Monday's entries appear | ||
| 347 | on Friday, while on Saturday only that day's entries appear. | ||
| 348 | |||
| 349 | @vindex print-diary-entries-hook | ||
| 350 | @findex print-diary-entries | ||
| 351 | The variable @code{print-diary-entries-hook} is a normal hook run | ||
| 352 | after preparation of a temporary buffer containing just the diary | ||
| 353 | entries currently visible in the diary buffer. (The other, irrelevant | ||
| 354 | diary entries are really absent from the temporary buffer; in the diary | ||
| 355 | buffer, they are merely hidden.) The default value of this hook does | ||
| 356 | the printing with the command @code{lpr-buffer}. If you want to use a | ||
| 357 | different command to do the printing, just change the value of this | ||
| 358 | hook. Other uses might include, for example, rearranging the lines into | ||
| 359 | order by day and time. | ||
| 360 | |||
| 361 | @vindex diary-date-forms | ||
| 362 | You can customize the form of dates in your diary file, if neither the | ||
| 363 | standard American nor European styles suits your needs, by setting the | ||
| 364 | variable @code{diary-date-forms}. This variable is a list of patterns | ||
| 365 | for recognizing a date. Each date pattern is a list whose elements may | ||
| 366 | be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs | ||
| 367 | Lisp Reference Manual}) or the symbols @code{month}, @code{day}, | ||
| 368 | @code{year}, @code{monthname}, and @code{dayname}. All these elements | ||
| 369 | serve as patterns that match certain kinds of text in the diary file. | ||
| 370 | In order for the date pattern, as a whole, to match, all of its elements | ||
| 371 | must match consecutively. | ||
| 372 | |||
| 373 | A regular expression in a date pattern matches in its usual fashion, | ||
| 374 | using the standard syntax table altered so that @samp{*} is a word | ||
| 375 | constituent. | ||
| 376 | |||
| 377 | The symbols @code{month}, @code{day}, @code{year}, @code{monthname}, | ||
| 378 | and @code{dayname} match the month number, day number, year number, | ||
| 379 | month name, and day name of the date being considered. The symbols that | ||
| 380 | match numbers allow leading zeros; those that match names allow | ||
| 381 | three-letter abbreviations and capitalization. All the symbols can | ||
| 382 | match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any | ||
| 383 | month'', and so on, it should match regardless of the date being | ||
| 384 | considered. | ||
| 385 | |||
| 386 | The default value of @code{diary-date-forms} in the American style is | ||
| 387 | this: | ||
| 388 | |||
| 389 | @example | ||
| 390 | ((month "/" day "[^/0-9]") | ||
| 391 | (month "/" day "/" year "[^0-9]") | ||
| 392 | (monthname " *" day "[^,0-9]") | ||
| 393 | (monthname " *" day ", *" year "[^0-9]") | ||
| 394 | (dayname "\\W")) | ||
| 395 | @end example | ||
| 396 | |||
| 397 | The date patterns in the list must be @emph{mutually exclusive} and | ||
| 398 | must not match any portion of the diary entry itself, just the date and | ||
| 399 | one character of whitespace. If, to be mutually exclusive, the pattern | ||
| 400 | must match a portion of the diary entry text---beyond the whitespace | ||
| 401 | that ends the date---then the first element of the date pattern | ||
| 402 | @emph{must} be @code{backup}. This causes the date recognizer to back | ||
| 403 | up to the beginning of the current word of the diary entry, after | ||
| 404 | finishing the match. Even if you use @code{backup}, the date pattern | ||
| 405 | must absolutely not match more than a portion of the first word of the | ||
| 406 | diary entry. The default value of @code{diary-date-forms} in the | ||
| 407 | European style is this list: | ||
| 408 | |||
| 409 | @example | ||
| 410 | ((day "/" month "[^/0-9]") | ||
| 411 | (day "/" month "/" year "[^0-9]") | ||
| 412 | (backup day " *" monthname "\\W+\\<[^*0-9]") | ||
| 413 | (day " *" monthname " *" year "[^0-9]") | ||
| 414 | (dayname "\\W")) | ||
| 415 | @end example | ||
| 416 | |||
| 417 | @noindent | ||
| 418 | Notice the use of @code{backup} in the third pattern, because it needs | ||
| 419 | to match part of a word beyond the date itself to distinguish it from | ||
| 420 | the fourth pattern. | ||
| 421 | |||
| 422 | @node Hebrew/Islamic Entries | ||
| 423 | @subsection Hebrew- and Islamic-Date Diary Entries | ||
| 424 | |||
| 425 | Your diary file can have entries based on Hebrew or Islamic dates, as | ||
| 426 | well as entries based on the world-standard Gregorian calendar. | ||
| 427 | However, because recognition of such entries is time-consuming and most | ||
| 428 | people don't use them, you must explicitly enable their use. If you | ||
| 429 | want the diary to recognize Hebrew-date diary entries, for example, | ||
| 430 | you must do this: | ||
| 431 | |||
| 432 | @vindex nongregorian-diary-listing-hook | ||
| 433 | @vindex nongregorian-diary-marking-hook | ||
| 434 | @findex list-hebrew-diary-entries | ||
| 435 | @findex mark-hebrew-diary-entries | ||
| 436 | @smallexample | ||
| 437 | (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries) | ||
| 438 | (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries) | ||
| 439 | @end smallexample | ||
| 440 | |||
| 441 | @noindent | ||
| 442 | If you want Islamic-date entries, do this: | ||
| 443 | |||
| 444 | @findex list-islamic-diary-entries | ||
| 445 | @findex mark-islamic-diary-entries | ||
| 446 | @smallexample | ||
| 447 | (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries) | ||
| 448 | (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries) | ||
| 449 | @end smallexample | ||
| 450 | |||
| 451 | Hebrew- and Islamic-date diary entries have the same formats as | ||
| 452 | Gregorian-date diary entries, except that @samp{H} precedes a Hebrew | ||
| 453 | date and @samp{I} precedes an Islamic date. Moreover, because the | ||
| 454 | Hebrew and Islamic month names are not uniquely specified by the first | ||
| 455 | three letters, you may not abbreviate them. For example, a diary entry | ||
| 456 | for the Hebrew date Heshvan 25 could look like this: | ||
| 457 | |||
| 458 | @smallexample | ||
| 459 | HHeshvan 25 Happy Hebrew birthday! | ||
| 460 | @end smallexample | ||
| 461 | |||
| 462 | @noindent | ||
| 463 | and would appear in the diary for any date that corresponds to Heshvan 25 | ||
| 464 | on the Hebrew calendar. And here is an Islamic-date diary entry that matches | ||
| 465 | Dhu al-Qada 25: | ||
| 466 | |||
| 467 | @smallexample | ||
| 468 | IDhu al-Qada 25 Happy Islamic birthday! | ||
| 469 | @end smallexample | ||
| 470 | |||
| 471 | As with Gregorian-date diary entries, Hebrew- and Islamic-date entries | ||
| 472 | are nonmarking if they are preceded with an ampersand (@samp{&}). | ||
| 473 | |||
| 474 | Here is a table of commands used in the calendar to create diary entries | ||
| 475 | that match the selected date and other dates that are similar in the Hebrew | ||
| 476 | or Islamic calendar: | ||
| 477 | |||
| 478 | @table @kbd | ||
| 479 | @item i h d | ||
| 480 | Add a diary entry for the Hebrew date corresponding to the selected date | ||
| 481 | (@code{insert-hebrew-diary-entry}). | ||
| 482 | @item i h m | ||
| 483 | Add a diary entry for the day of the Hebrew month corresponding to the | ||
| 484 | selected date (@code{insert-monthly-hebrew-diary-entry}). This diary | ||
| 485 | entry matches any date that has the same Hebrew day-within-month as the | ||
| 486 | selected date. | ||
| 487 | @item i h y | ||
| 488 | Add a diary entry for the day of the Hebrew year corresponding to the | ||
| 489 | selected date (@code{insert-yearly-hebrew-diary-entry}). This diary | ||
| 490 | entry matches any date which has the same Hebrew month and day-within-month | ||
| 491 | as the selected date. | ||
| 492 | @item i i d | ||
| 493 | Add a diary entry for the Islamic date corresponding to the selected date | ||
| 494 | (@code{insert-islamic-diary-entry}). | ||
| 495 | @item i i m | ||
| 496 | Add a diary entry for the day of the Islamic month corresponding to the | ||
| 497 | selected date (@code{insert-monthly-islamic-diary-entry}). | ||
| 498 | @item i i y | ||
| 499 | Add a diary entry for the day of the Islamic year corresponding to the | ||
| 500 | selected date (@code{insert-yearly-islamic-diary-entry}). | ||
| 501 | @end table | ||
| 502 | |||
| 503 | @findex insert-hebrew-diary-entry | ||
| 504 | @findex insert-monthly-hebrew-diary-entry | ||
| 505 | @findex insert-yearly-hebrew-diary-entry | ||
| 506 | @findex insert-islamic-diary-entry | ||
| 507 | @findex insert-monthly-islamic-diary-entry | ||
| 508 | @findex insert-yearly-islamic-diary-entry | ||
| 509 | These commands work much like the corresponding commands for ordinary | ||
| 510 | diary entries: they apply to the date that point is on in the calendar | ||
| 511 | window, and what they do is insert just the date portion of a diary entry | ||
| 512 | at the end of your diary file. You must then insert the rest of the | ||
| 513 | diary entry. | ||
| 514 | |||
| 515 | @node Fancy Diary Display | ||
| 516 | @subsection Fancy Diary Display | ||
| 517 | @vindex diary-display-hook | ||
| 518 | @findex simple-diary-display | ||
| 519 | |||
| 520 | Diary display works by preparing the diary buffer and then running the | ||
| 521 | hook @code{diary-display-hook}. The default value of this hook | ||
| 522 | (@code{simple-diary-display}) hides the irrelevant diary entries and | ||
| 523 | then displays the buffer. However, if you specify the hook as follows, | ||
| 524 | |||
| 525 | @cindex diary buffer | ||
| 526 | @findex fancy-diary-display | ||
| 527 | @example | ||
| 528 | (add-hook 'diary-display-hook 'fancy-diary-display) | ||
| 529 | @end example | ||
| 530 | |||
| 531 | @noindent | ||
| 532 | this enables fancy diary display. It displays diary entries and | ||
| 533 | holidays by copying them into a special buffer that exists only for the | ||
| 534 | sake of display. Copying to a separate buffer provides an opportunity | ||
| 535 | to change the displayed text to make it prettier---for example, to sort | ||
| 536 | the entries by the dates they apply to. | ||
| 537 | |||
| 538 | As with simple diary display, you can print a hard copy of the buffer | ||
| 539 | with @code{print-diary-entries}. To print a hard copy of a day-by-day | ||
| 540 | diary for a week, position point on Sunday of that week, type | ||
| 541 | @kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the | ||
| 542 | inclusion of the holidays slows down the display slightly; you can speed | ||
| 543 | things up by setting the variable @code{holidays-in-diary-buffer} to | ||
| 544 | @code{nil}. | ||
| 545 | |||
| 546 | @vindex diary-list-include-blanks | ||
| 547 | Ordinarily, the fancy diary buffer does not show days for which there are | ||
| 548 | no diary entries, even if that day is a holiday. If you want such days to be | ||
| 549 | shown in the fancy diary buffer, set the variable | ||
| 550 | @code{diary-list-include-blanks} to @code{t}.@refill | ||
| 551 | |||
| 552 | @cindex sorting diary entries | ||
| 553 | If you use the fancy diary display, you can use the normal hook | ||
| 554 | @code{list-diary-entries-hook} to sort each day's diary entries by their | ||
| 555 | time of day. Here's how: | ||
| 556 | |||
| 557 | @findex sort-diary-entries | ||
| 558 | @example | ||
| 559 | (add-hook 'list-diary-entries-hook 'sort-diary-entries t) | ||
| 560 | @end example | ||
| 561 | |||
| 562 | @noindent | ||
| 563 | For each day, this sorts diary entries that begin with a recognizable | ||
| 564 | time of day according to their times. Diary entries without times come | ||
| 565 | first within each day. | ||
| 566 | |||
| 567 | Fancy diary display also has the ability to process included diary | ||
| 568 | files. This permits a group of people to share a diary file for events | ||
| 569 | that apply to all of them. Lines in the diary file of this form: | ||
| 570 | |||
| 571 | @smallexample | ||
| 572 | #include "@var{filename}" | ||
| 573 | @end smallexample | ||
| 574 | |||
| 575 | @noindent | ||
| 576 | includes the diary entries from the file @var{filename} in the fancy | ||
| 577 | diary buffer. The include mechanism is recursive, so that included files | ||
| 578 | can include other files, and so on; you must be careful not to have a | ||
| 579 | cycle of inclusions, of course. Here is how to enable the include | ||
| 580 | facility: | ||
| 581 | |||
| 582 | @vindex list-diary-entries-hook | ||
| 583 | @vindex mark-diary-entries-hook | ||
| 584 | @findex include-other-diary-files | ||
| 585 | @findex mark-included-diary-files | ||
| 586 | @smallexample | ||
| 587 | (add-hook 'list-diary-entries-hook 'include-other-diary-files) | ||
| 588 | (add-hook 'mark-diary-entries-hook 'mark-included-diary-files) | ||
| 589 | @end smallexample | ||
| 590 | |||
| 591 | The include mechanism works only with the fancy diary display, because | ||
| 592 | ordinary diary display shows the entries directly from your diary file. | ||
| 593 | |||
| 594 | @node Sexp Diary Entries | ||
| 595 | @subsection Sexp Entries and the Fancy Diary Display | ||
| 596 | @cindex sexp diary entries | ||
| 597 | |||
| 598 | Sexp diary entries allow you to do more than just have complicated | ||
| 599 | conditions under which a diary entry applies. If you use the fancy | ||
| 600 | diary display, sexp entries can generate the text of the entry depending | ||
| 601 | on the date itself. For example, an anniversary diary entry can insert | ||
| 602 | the number of years since the anniversary date into the text of the | ||
| 603 | diary entry. Thus the @samp{%d} in this dairy entry: | ||
| 604 | |||
| 605 | @findex diary-anniversary | ||
| 606 | @smallexample | ||
| 607 | %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old) | ||
| 608 | @end smallexample | ||
| 609 | |||
| 610 | @noindent | ||
| 611 | gets replaced by the age, so on October 31, 1990 the entry appears in | ||
| 612 | the fancy diary buffer like this: | ||
| 613 | |||
| 614 | @smallexample | ||
| 615 | Arthur's birthday (42 years old) | ||
| 616 | @end smallexample | ||
| 617 | |||
| 618 | @noindent | ||
| 619 | If the diary file instead contains this entry: | ||
| 620 | |||
| 621 | @smallexample | ||
| 622 | %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday | ||
| 623 | @end smallexample | ||
| 624 | |||
| 625 | @noindent | ||
| 626 | the entry in the fancy diary buffer for October 31, 1990 appears like this: | ||
| 627 | |||
| 628 | @smallexample | ||
| 629 | Arthur's 42nd birthday | ||
| 630 | @end smallexample | ||
| 631 | |||
| 632 | Similarly, cyclic diary entries can interpolate the number of repetitions | ||
| 633 | that have occurred: | ||
| 634 | |||
| 635 | @findex diary-cyclic | ||
| 636 | @smallexample | ||
| 637 | %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time) | ||
| 638 | @end smallexample | ||
| 639 | |||
| 640 | @noindent | ||
| 641 | looks like this: | ||
| 642 | |||
| 643 | @smallexample | ||
| 644 | Renew medication (5th time) | ||
| 645 | @end smallexample | ||
| 646 | |||
| 647 | @noindent | ||
| 648 | in the fancy diary display on September 8, 1990. | ||
| 649 | |||
| 650 | There is an early reminder diary sexp that includes its entry in the | ||
| 651 | diary not only on the date of occurrence, but also on earlier dates. | ||
| 652 | For example, if you want a reminder a week before your anniversary, you | ||
| 653 | can use | ||
| 654 | |||
| 655 | @findex diary-remind | ||
| 656 | @smallexample | ||
| 657 | %%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary | ||
| 658 | @end smallexample | ||
| 659 | |||
| 660 | @noindent | ||
| 661 | and the fancy diary will show | ||
| 662 | @smallexample | ||
| 663 | Ed's anniversary | ||
| 664 | @end smallexample | ||
| 665 | @noindent | ||
| 666 | both on December 15 and on December 22. | ||
| 667 | |||
| 668 | @findex diary-date | ||
| 669 | The function @code{diary-date} applies to dates described by a month, | ||
| 670 | day, year combination, each of which can be an integer, a list of | ||
| 671 | integers, or @code{t}. The value @code{t} means all values. For | ||
| 672 | example, | ||
| 673 | |||
| 674 | @smallexample | ||
| 675 | %%(diary-date '(10 11 12) 22 t) Rake leaves | ||
| 676 | @end smallexample | ||
| 677 | |||
| 678 | @noindent | ||
| 679 | causes the fancy diary to show | ||
| 680 | |||
| 681 | @smallexample | ||
| 682 | Rake leaves | ||
| 683 | @end smallexample | ||
| 684 | |||
| 685 | @noindent | ||
| 686 | on October 22, November 22, and December 22 of every year. | ||
| 687 | |||
| 688 | @findex diary-float | ||
| 689 | The function @code{diary-float} allows you to describe diary entries | ||
| 690 | that apply to dates like the third Friday of November, or the last | ||
| 691 | Tuesday in April. The parameters are the @var{month}, @var{dayname}, | ||
| 692 | and an index @var{n}. The entry appears on the @var{n}th @var{dayname} | ||
| 693 | of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and | ||
| 694 | so on. If @var{n} is negative it counts backward from the end of | ||
| 695 | @var{month}. The value of @var{month} can be a list of months, a single | ||
| 696 | month, or @code{t} to specify all months. You can also use an optional | ||
| 697 | parameter @var{day} to specify the @var{n}th @var{dayname} of | ||
| 698 | @var{month} on or after/before @var{day}; the value of @var{day} defaults | ||
| 699 | to 1 if @var{n} is positive and to the last day of @var{month} if | ||
| 700 | @var{n} is negative. For example, | ||
| 701 | |||
| 702 | @smallexample | ||
| 703 | %%(diary-float t 1 -1) Pay rent | ||
| 704 | @end smallexample | ||
| 705 | |||
| 706 | @noindent | ||
| 707 | causes the fancy diary to show | ||
| 708 | |||
| 709 | @smallexample | ||
| 710 | Pay rent | ||
| 711 | @end smallexample | ||
| 712 | |||
| 713 | @noindent | ||
| 714 | on the last Monday of every month. | ||
| 715 | |||
| 716 | The generality of sexp diary entries lets you specify any diary | ||
| 717 | entry that you can describe algorithmically. A sexp diary entry | ||
| 718 | contains an expression that computes whether the entry applies to any | ||
| 719 | given date. If its value is non-@code{nil}, the entry applies to that | ||
| 720 | date; otherwise, it does not. The expression can use the variable | ||
| 721 | @code{date} to find the date being considered; its value is a list | ||
| 722 | (@var{month} @var{day} @var{year}) that refers to the Gregorian | ||
| 723 | calendar. | ||
| 724 | |||
| 725 | The sexp diary entry applies to a date when the expression's value | ||
| 726 | is non-@code{nil}, but some values have more specific meanings. If | ||
| 727 | the value is a string, that string is a description of the event which | ||
| 728 | occurs on that date. The value can also have the form | ||
| 729 | @code{(@var{mark} . @var{string})}; then @var{mark} specifies how to | ||
| 730 | mark the date in the calendar, and @var{string} is the description of | ||
| 731 | the event. If @var{mark} is a single-character string, that character | ||
| 732 | appears next to the date in the calendar. If @var{mark} is a face | ||
| 733 | name, the date is displayed in that face. If @var{mark} is | ||
| 734 | @code{nil}, that specifies no particular highlighting for the date. | ||
| 735 | |||
| 736 | Suppose you get paid on the 21st of the month if it is a weekday, and | ||
| 737 | on the Friday before if the 21st is on a weekend. Here is how to write | ||
| 738 | a sexp diary entry that matches those dates: | ||
| 739 | |||
| 740 | @smallexample | ||
| 741 | &%%(let ((dayname (calendar-day-of-week date)) | ||
| 742 | (day (car (cdr date)))) | ||
| 743 | (or (and (= day 21) (memq dayname '(1 2 3 4 5))) | ||
| 744 | (and (memq day '(19 20)) (= dayname 5))) | ||
| 745 | ) Pay check deposited | ||
| 746 | @end smallexample | ||
| 747 | |||
| 748 | The following sexp diary entries take advantage of the ability (in the fancy | ||
| 749 | diary display) to concoct diary entries whose text varies based on the date: | ||
| 750 | |||
| 751 | @findex diary-sunrise-sunset | ||
| 752 | @findex diary-phases-of-moon | ||
| 753 | @findex diary-day-of-year | ||
| 754 | @findex diary-iso-date | ||
| 755 | @findex diary-julian-date | ||
| 756 | @findex diary-astro-day-number | ||
| 757 | @findex diary-hebrew-date | ||
| 758 | @findex diary-islamic-date | ||
| 759 | @findex diary-french-date | ||
| 760 | @findex diary-mayan-date | ||
| 761 | @table @code | ||
| 762 | @item %%(diary-sunrise-sunset) | ||
| 763 | Make a diary entry for the local times of today's sunrise and sunset. | ||
| 764 | @item %%(diary-phases-of-moon) | ||
| 765 | Make a diary entry for the phases (quarters) of the moon. | ||
| 766 | @item %%(diary-day-of-year) | ||
| 767 | Make a diary entry with today's day number in the current year and the number | ||
| 768 | of days remaining in the current year. | ||
| 769 | @item %%(diary-iso-date) | ||
| 770 | Make a diary entry with today's equivalent ISO commercial date. | ||
| 771 | @item %%(diary-julian-date) | ||
| 772 | Make a diary entry with today's equivalent date on the Julian calendar. | ||
| 773 | @item %%(diary-astro-day-number) | ||
| 774 | Make a diary entry with today's equivalent astronomical (Julian) day number. | ||
| 775 | @item %%(diary-hebrew-date) | ||
| 776 | Make a diary entry with today's equivalent date on the Hebrew calendar. | ||
| 777 | @item %%(diary-islamic-date) | ||
| 778 | Make a diary entry with today's equivalent date on the Islamic calendar. | ||
| 779 | @item %%(diary-french-date) | ||
| 780 | Make a diary entry with today's equivalent date on the French Revolutionary | ||
| 781 | calendar. | ||
| 782 | @item %%(diary-mayan-date) | ||
| 783 | Make a diary entry with today's equivalent date on the Mayan calendar. | ||
| 784 | @end table | ||
| 785 | |||
| 786 | @noindent | ||
| 787 | Thus including the diary entry | ||
| 788 | |||
| 789 | @example | ||
| 790 | &%%(diary-hebrew-date) | ||
| 791 | @end example | ||
| 792 | |||
| 793 | @noindent | ||
| 794 | causes every day's diary display to contain the equivalent date on the | ||
| 795 | Hebrew calendar, if you are using the fancy diary display. (With simple | ||
| 796 | diary display, the line @samp{&%%(diary-hebrew-date)} appears in the | ||
| 797 | diary for any date, but does nothing particularly useful.) | ||
| 798 | |||
| 799 | These functions can be used to construct sexp diary entries based on | ||
| 800 | the Hebrew calendar in certain standard ways: | ||
| 801 | |||
| 802 | @cindex rosh hodesh | ||
| 803 | @findex diary-rosh-hodesh | ||
| 804 | @cindex parasha, weekly | ||
| 805 | @findex diary-parasha | ||
| 806 | @cindex candle lighting times | ||
| 807 | @findex diary-sabbath-candles | ||
| 808 | @cindex omer count | ||
| 809 | @findex diary-omer | ||
| 810 | @cindex yahrzeits | ||
| 811 | @findex diary-yahrzeit | ||
| 812 | @table @code | ||
| 813 | @item %%(diary-rosh-hodesh) | ||
| 814 | Make a diary entry that tells the occurrence and ritual announcement of each | ||
| 815 | new Hebrew month. | ||
| 816 | @item %%(diary-parasha) | ||
| 817 | Make a Saturday diary entry that tells the weekly synagogue scripture reading. | ||
| 818 | @item %%(diary-sabbath-candles) | ||
| 819 | Make a Friday diary entry that tells the @emph{local time} of Sabbath | ||
| 820 | candle lighting. | ||
| 821 | @item %%(diary-omer) | ||
| 822 | Make a diary entry that gives the omer count, when appropriate. | ||
| 823 | @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name} | ||
| 824 | Make a diary entry marking the anniversary of a date of death. The date | ||
| 825 | is the @emph{Gregorian} (civil) date of death. The diary entry appears | ||
| 826 | on the proper Hebrew calendar anniversary and on the day before. (In | ||
| 827 | the European style, the order of the parameters is changed to @var{day}, | ||
| 828 | @var{month}, @var{year}.) | ||
| 829 | @end table | ||
| 830 | |||
| 831 | All the functions documented above take an optional argument | ||
| 832 | @var{mark} which specifies how to mark the date in the calendar display. | ||
| 833 | If one of these functions decides that it applies to a certain date, | ||
| 834 | it returns a value that contains @var{mark}. | ||
| 835 | |||
| 836 | @ignore | ||
| 837 | arch-tag: 52cb299f-fd1f-4616-bfe6-91b988669431 | ||
| 838 | @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 | |||
| 24 | calendar features that are independent of any particular date. To exit | 24 | calendar features that are independent of any particular date. To exit |
| 25 | the calendar, type @kbd{q}. | 25 | the calendar, type @kbd{q}. |
| 26 | 26 | ||
| 27 | @iftex | ||
| 27 | This chapter describes the basic calendar features. | 28 | This chapter describes the basic calendar features. |
| 28 | @inforef{Advanced Calendar/Diary Usage,, emacs-xtra}, for information | 29 | @xref{Advanced Calendar/Diary Usage,,, emacs-xtra, Specialized Emacs |
| 29 | about more specialized features. | 30 | Features}, for information about more specialized features. |
| 31 | @end iftex | ||
| 30 | 32 | ||
| 31 | @menu | 33 | @menu |
| 32 | * Calendar Motion:: Moving through the calendar; selecting a date. | 34 | * Calendar Motion:: Moving through the calendar; selecting a date. |
| @@ -43,6 +45,9 @@ about more specialized features. | |||
| 43 | * Importing Diary:: Converting diary events to/from other formats. | 45 | * Importing Diary:: Converting diary events to/from other formats. |
| 44 | * Daylight Savings:: How to specify when daylight savings time is active. | 46 | * Daylight Savings:: How to specify when daylight savings time is active. |
| 45 | * Time Intervals:: Keeping track of time intervals. | 47 | * Time Intervals:: Keeping track of time intervals. |
| 48 | @ifnottex | ||
| 49 | * Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. | ||
| 50 | @end ifnottex | ||
| 46 | @end menu | 51 | @end menu |
| 47 | 52 | ||
| 48 | @node Calendar Motion | 53 | @node Calendar Motion |
| @@ -444,14 +449,20 @@ window. | |||
| 444 | To view the distribution of holidays for all the dates shown in the | 449 | To view the distribution of holidays for all the dates shown in the |
| 445 | calendar, use the @kbd{x} command. This displays the dates that are | 450 | calendar, use the @kbd{x} command. This displays the dates that are |
| 446 | holidays in a different face (or places a @samp{*} after these dates, if | 451 | holidays in a different face (or places a @samp{*} after these dates, if |
| 447 | display with multiple faces is not available). @inforef{Calendar | 452 | display with multiple faces is not available). |
| 448 | Customizing, calendar-holiday-marker, emacs-xtra}. The command applies | 453 | @iftex |
| 449 | both to the currently visible months and to other months that | 454 | @xref{Calendar Customizing, calendar-holiday-marker,, emacs-xtra, |
| 450 | subsequently become visible by scrolling. To turn marking off and erase | 455 | Specialized Emacs Features}. |
| 451 | the current marks, type @kbd{u}, which also erases any diary marks | 456 | @end iftex |
| 452 | (@pxref{Diary}). If the variable @code{mark-holidays-in-calendar} is | 457 | @ifnottex |
| 453 | non-@code{nil}, creating or updating the calendar marks holidays | 458 | @xref{Calendar Customizing, calendar-holiday-marker}. |
| 454 | automatically. | 459 | @end ifnottex |
| 460 | The command applies both to the currently visible months and to | ||
| 461 | other months that subsequently become visible by scrolling. To turn | ||
| 462 | marking off and erase the current marks, type @kbd{u}, which also | ||
| 463 | erases any diary marks (@pxref{Diary}). If the variable | ||
| 464 | @code{mark-holidays-in-calendar} is non-@code{nil}, creating or | ||
| 465 | updating the calendar marks holidays automatically. | ||
| 455 | 466 | ||
| 456 | @kindex a @r{(Calendar mode)} | 467 | @kindex a @r{(Calendar mode)} |
| 457 | @findex list-calendar-holidays | 468 | @findex list-calendar-holidays |
| @@ -1029,14 +1040,20 @@ current date is visible). | |||
| 1029 | To get a broader view of which days are mentioned in the diary, use | 1040 | To get a broader view of which days are mentioned in the diary, use |
| 1030 | the @kbd{m} command. This displays the dates that have diary entries in | 1041 | the @kbd{m} command. This displays the dates that have diary entries in |
| 1031 | a different face (or places a @samp{+} after these dates, if display | 1042 | a different face (or places a @samp{+} after these dates, if display |
| 1032 | with multiple faces is not available). @inforef{Calendar Customizing, | 1043 | with multiple faces is not available). |
| 1033 | diary-entry-marker, emacs-xtra}. The command applies both to the | 1044 | @iftex |
| 1034 | currently visible months and to other months that subsequently become | 1045 | @xref{Calendar Customizing, diary-entry-marker,, emacs-xtra, |
| 1035 | visible by scrolling. To turn marking off and erase the current marks, | 1046 | Specialized Emacs Features}. |
| 1036 | type @kbd{u}, which also turns off holiday marks (@pxref{Holidays}). | 1047 | @end iftex |
| 1037 | If the variable @code{mark-diary-entries-in-calendar} is | 1048 | @ifnottex |
| 1038 | non-@code{nil}, creating or updating the calendar marks diary dates | 1049 | @xref{Calendar Customizing, diary-entry-marker}. |
| 1039 | automatically. | 1050 | @end ifnottex |
| 1051 | The command applies both to the currently visible months and to | ||
| 1052 | other months that subsequently become visible by scrolling. To turn | ||
| 1053 | marking off and erase the current marks, type @kbd{u}, which also | ||
| 1054 | turns off holiday marks (@pxref{Holidays}). If the variable | ||
| 1055 | @code{mark-diary-entries-in-calendar} is non-@code{nil}, creating or | ||
| 1056 | updating the calendar marks diary dates automatically. | ||
| 1040 | 1057 | ||
| 1041 | @kindex s @r{(Calendar mode)} | 1058 | @kindex s @r{(Calendar mode)} |
| 1042 | @findex show-all-diary-entries | 1059 | @findex show-all-diary-entries |
| @@ -1055,7 +1072,13 @@ can customize it like @code{lpr-region} (@pxref{Printing}). | |||
| 1055 | The command @kbd{M-x diary} displays the diary entries for the current | 1072 | The command @kbd{M-x diary} displays the diary entries for the current |
| 1056 | date, independently of the calendar display, and optionally for the next | 1073 | date, independently of the calendar display, and optionally for the next |
| 1057 | few days as well; the variable @code{number-of-diary-entries} specifies | 1074 | few days as well; the variable @code{number-of-diary-entries} specifies |
| 1058 | how many days to include. @inforef{Diary Customizing,, emacs-xtra}. | 1075 | how many days to include. |
| 1076 | @iftex | ||
| 1077 | @xref{Diary Customizing,,, emacs-xtra, Specialized Emacs Features}. | ||
| 1078 | @end iftex | ||
| 1079 | @ifnottex | ||
| 1080 | @xref{Diary Customizing, number-of-diary-entries}. | ||
| 1081 | @end ifnottex | ||
| 1059 | 1082 | ||
| 1060 | If you put @code{(diary)} in your @file{.emacs} file, this | 1083 | If you put @code{(diary)} in your @file{.emacs} file, this |
| 1061 | automatically displays a window with the day's diary entries, when you | 1084 | 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 | |||
| 1360 | specifying the name of a face or a single-character string to use when | 1383 | specifying the name of a face or a single-character string to use when |
| 1361 | marking the entry in the calendar. Most generally, sexp diary entries | 1384 | marking the entry in the calendar. Most generally, sexp diary entries |
| 1362 | can perform arbitrary computations to determine when they apply. | 1385 | can perform arbitrary computations to determine when they apply. |
| 1363 | @inforef{Sexp Diary Entries,, emacs-xtra}. | 1386 | @iftex |
| 1387 | @xref{Sexp Diary Entries,,, emacs-xtra, Specialized Emacs Features}. | ||
| 1388 | @end iftex | ||
| 1389 | @ifnottex | ||
| 1390 | @inforef{Sexp Diary Entries}. | ||
| 1391 | @end ifnottex | ||
| 1364 | 1392 | ||
| 1365 | @node Appointments | 1393 | @node Appointments |
| 1366 | @section Appointments | 1394 | @section Appointments |
| @@ -1479,8 +1507,14 @@ and adds the results to an Emacs diary file. For example: | |||
| 1479 | 1507 | ||
| 1480 | @noindent | 1508 | @noindent |
| 1481 | You can use an @code{#include} directive to add the import file contents | 1509 | You can use an @code{#include} directive to add the import file contents |
| 1482 | to the main diary file, if these are different files. @inforef{Fancy Diary | 1510 | to the main diary file, if these are different files. |
| 1483 | Display,, emacs-xtra}. | 1511 | @iftex |
| 1512 | @xref{Fancy Diary Display,,, emacs-xtra, Specialized Emacs Features}. | ||
| 1513 | @end iftex | ||
| 1514 | @ifnottex | ||
| 1515 | @xref{Fancy Diary Display}. | ||
| 1516 | @end ifnottex | ||
| 1517 | |||
| 1484 | 1518 | ||
| 1485 | @findex icalendar-export-file, icalendar-export-region | 1519 | @findex icalendar-export-file, icalendar-export-region |
| 1486 | Use @code{icalendar-export-file} to interactively export an entire | 1520 | 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 | |||
| 1608 | should run the command @kbd{M-x timeclock-reread-log} to update the | 1642 | should run the command @kbd{M-x timeclock-reread-log} to update the |
| 1609 | data in Emacs from the file. | 1643 | data in Emacs from the file. |
| 1610 | 1644 | ||
| 1645 | @ifnottex | ||
| 1646 | @include cal-xtra.texi | ||
| 1647 | @end ifnottex | ||
| 1648 | |||
| 1611 | @ignore | 1649 | @ignore |
| 1612 | arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92 | 1650 | arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92 |
| 1613 | @end ignore | 1651 | @end ignore |
diff --git a/man/cmdargs.texi b/man/cmdargs.texi index f1e7c539f76..9689782decb 100644 --- a/man/cmdargs.texi +++ b/man/cmdargs.texi | |||
| @@ -293,7 +293,8 @@ Do not reload any saved desktop. @xref{Saving Emacs Sessions}. | |||
| 293 | @opindex --user | 293 | @opindex --user |
| 294 | @cindex load init file of another user | 294 | @cindex load init file of another user |
| 295 | Load @var{user}'s Emacs init file @file{~@var{user}/.emacs} instead of | 295 | Load @var{user}'s Emacs init file @file{~@var{user}/.emacs} instead of |
| 296 | your own. | 296 | your own@footnote{ |
| 297 | This option has no effect on MS-Windows.}. | ||
| 297 | 298 | ||
| 298 | @item --debug-init | 299 | @item --debug-init |
| 299 | @opindex --debug-init | 300 | @opindex --debug-init |
| @@ -1227,7 +1228,7 @@ Specify @var{pixels} as additional space to put between lines, in pixels. | |||
| 1227 | @itemx --no-blinking-cursor | 1228 | @itemx --no-blinking-cursor |
| 1228 | @opindex --no-blinking-cursor | 1229 | @opindex --no-blinking-cursor |
| 1229 | @cindex blinking cursor disable, command-line argument | 1230 | @cindex blinking cursor disable, command-line argument |
| 1230 | Disable the blinking cursor on graphical terminals. | 1231 | Disable the blinking cursor on graphical displays. |
| 1231 | 1232 | ||
| 1232 | @item -D | 1233 | @item -D |
| 1233 | @opindex -D | 1234 | @opindex -D |
diff --git a/man/commands.texi b/man/commands.texi index eba539c15b7..f798b92f829 100644 --- a/man/commands.texi +++ b/man/commands.texi | |||
| @@ -6,9 +6,9 @@ | |||
| 6 | @chapter Characters, Keys and Commands | 6 | @chapter Characters, Keys and Commands |
| 7 | 7 | ||
| 8 | This chapter explains the character sets used by Emacs for input | 8 | This chapter explains the character sets used by Emacs for input |
| 9 | commands and for the contents of files, and also explains the concepts | 9 | commands and for the contents of files, and the fundamental concepts of |
| 10 | of @dfn{keys} and @dfn{commands}, which are fundamental for understanding | 10 | @dfn{keys} and @dfn{commands}, whereby Emacs interprets your keyboard |
| 11 | how Emacs interprets your keyboard and mouse input. | 11 | and mouse input. |
| 12 | @end iftex | 12 | @end iftex |
| 13 | 13 | ||
| 14 | @ifnottex | 14 | @ifnottex |
| @@ -35,11 +35,11 @@ control characters, such as @kbd{Control-a} (usually written @kbd{C-a} | |||
| 35 | for short). @kbd{C-a} gets its name from the fact that you type it by | 35 | for short). @kbd{C-a} gets its name from the fact that you type it by |
| 36 | holding down the @key{CTRL} key while pressing @kbd{a}. | 36 | holding down the @key{CTRL} key while pressing @kbd{a}. |
| 37 | 37 | ||
| 38 | Some @acronym{ASCII} control characters have special names, and most terminals | 38 | Some @acronym{ASCII} control characters have special names, and most |
| 39 | have special keys you can type them with: for example, @key{RET}, | 39 | terminals have special keys you can type them with: for example, |
| 40 | @key{TAB}, @key{DEL} and @key{ESC}. The space character is usually | 40 | @key{RET}, @key{TAB}, @key{DEL} and @key{ESC}. The space character is |
| 41 | referred to below as @key{SPC}, even though strictly speaking it is a | 41 | usually known as @key{SPC}, even though strictly speaking it is a |
| 42 | graphic character whose graphic happens to be blank. | 42 | graphic character that is blank. |
| 43 | 43 | ||
| 44 | Emacs extends the @acronym{ASCII} character set with thousands more printing | 44 | Emacs extends the @acronym{ASCII} character set with thousands more printing |
| 45 | characters (@pxref{International}), additional control characters, and a | 45 | characters (@pxref{International}), additional control characters, and a |
| @@ -51,11 +51,11 @@ addition, the shift key is meaningless with control characters: | |||
| 51 | @kbd{C-a} and @kbd{C-A} are the same character, and Emacs cannot | 51 | @kbd{C-a} and @kbd{C-A} are the same character, and Emacs cannot |
| 52 | distinguish them. | 52 | distinguish them. |
| 53 | 53 | ||
| 54 | But the Emacs character set has room for control variants of all | 54 | The Emacs character set has room for control variants of all |
| 55 | printing characters, and for distinguishing between @kbd{C-a} and | 55 | printing characters, and distinguishes @kbd{C-A} from @kbd{C-a}. |
| 56 | @kbd{C-A}. Graphical terminals make it possible to enter all these | 56 | Graphical terminals make it possible to enter all these characters. |
| 57 | characters. For example, @kbd{C--} (that's Control-Minus) and | 57 | For example, @kbd{C--} (that's Control-Minus) and @kbd{C-5} are |
| 58 | @kbd{C-5} are meaningful Emacs commands on a graphical terminal. | 58 | meaningful Emacs commands on a graphical terminal. |
| 59 | 59 | ||
| 60 | Another Emacs character-set extension is additional modifier bits. | 60 | Another Emacs character-set extension is additional modifier bits. |
| 61 | Only one modifier bit is commonly used; it is called Meta. Every | 61 | Only one modifier bit is commonly used; it is called Meta. Every |
| @@ -106,10 +106,10 @@ two modifiers by using @kbd{C-x @@} twice for the same character, | |||
| 106 | because the first one goes to work on the @kbd{C-x}.) | 106 | because the first one goes to work on the @kbd{C-x}.) |
| 107 | 107 | ||
| 108 | Keyboard input includes keyboard keys that are not characters at | 108 | Keyboard input includes keyboard keys that are not characters at |
| 109 | all: for example function keys and arrow keys. Mouse buttons are also | 109 | all, such as function keys and arrow keys. Mouse buttons are also not |
| 110 | outside the gamut of characters. However, you can modify these events | 110 | characters. However, you can modify these events with the modifier |
| 111 | with the modifier keys @key{CTRL}, @key{META}, @key{SUPER}, | 111 | keys @key{CTRL}, @key{META}, @key{SUPER}, @key{HYPER} and @key{ALT}, |
| 112 | @key{HYPER} and @key{ALT}, just as you can modify keyboard characters. | 112 | just like keyboard characters. |
| 113 | 113 | ||
| 114 | @cindex input event | 114 | @cindex input event |
| 115 | Input characters and non-character inputs are collectively called | 115 | Input characters and non-character inputs are collectively called |
| @@ -121,7 +121,7 @@ some characters or non-character events, see @ref{Customization}. | |||
| 121 | @acronym{ASCII} terminals cannot really send anything to the computer except | 121 | @acronym{ASCII} terminals cannot really send anything to the computer except |
| 122 | @acronym{ASCII} characters. These terminals use a sequence of characters to | 122 | @acronym{ASCII} characters. These terminals use a sequence of characters to |
| 123 | represent each function key. But that is invisible to the Emacs user, | 123 | represent each function key. But that is invisible to the Emacs user, |
| 124 | because the keyboard input routines recognize these special sequences | 124 | because the keyboard input routines catch these special sequences |
| 125 | and convert them to function key events before any other part of Emacs | 125 | and convert them to function key events before any other part of Emacs |
| 126 | gets to see them. | 126 | gets to see them. |
| 127 | 127 | ||
| @@ -131,9 +131,9 @@ gets to see them. | |||
| 131 | @cindex key sequence | 131 | @cindex key sequence |
| 132 | @cindex key | 132 | @cindex key |
| 133 | A @dfn{key sequence} (@dfn{key}, for short) is a sequence of input | 133 | A @dfn{key sequence} (@dfn{key}, for short) is a sequence of input |
| 134 | events that are meaningful as a unit---as ``a single command.'' Some | 134 | events that is meaningful as a unit---a ``single command.'' Some |
| 135 | Emacs command sequences are just one character or one event; for | 135 | Emacs command sequences are invoked by just one character or one |
| 136 | example, just @kbd{C-f} is enough to move forward one character in the | 136 | event; for example, just @kbd{C-f} moves forward one character in the |
| 137 | buffer. But Emacs also has commands that take two or more events to | 137 | buffer. But Emacs also has commands that take two or more events to |
| 138 | invoke. | 138 | invoke. |
| 139 | 139 | ||
| @@ -158,33 +158,33 @@ r}, are themselves prefix keys that lead to three-event key | |||
| 158 | sequences. There's no limit to the length of a key sequence, but in | 158 | sequences. There's no limit to the length of a key sequence, but in |
| 159 | practice people rarely use sequences longer than four events. | 159 | practice people rarely use sequences longer than four events. |
| 160 | 160 | ||
| 161 | By contrast, you can't add more events onto a complete key. For | 161 | You can't add input events onto a complete key. For example, the |
| 162 | example, the two-event sequence @kbd{C-f C-k} is not a key, because | 162 | two-event sequence @kbd{C-f C-k} is not a key, because the @kbd{C-f} |
| 163 | the @kbd{C-f} is a complete key in itself. It's impossible to give | 163 | is a complete key in itself. It's impossible to give @kbd{C-f C-k} an |
| 164 | @kbd{C-f C-k} an independent meaning as a command. @kbd{C-f C-k} is two | 164 | independent meaning as a command. @kbd{C-f C-k} is two key sequences, |
| 165 | key sequences, not one.@refill | 165 | not one.@refill |
| 166 | 166 | ||
| 167 | All told, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, | 167 | All told, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, |
| 168 | @kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x | 168 | @kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x |
| 169 | n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x | 169 | n}, @w{@kbd{C-x r}}, @kbd{C-x v}, @kbd{C-x 4}, @kbd{C-x 5}, @kbd{C-x |
| 170 | 6}, @key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are | 170 | 6}, @key{ESC}, @kbd{M-g}, and @kbd{M-o}. (@key{F1} and @key{F2} are |
| 171 | aliases for @kbd{C-h} and @kbd{C-x 6}.) But this list is not cast in | 171 | aliases for @kbd{C-h} and @kbd{C-x 6}.) This list is not cast in stone; |
| 172 | concrete; it is just a matter of Emacs's standard key bindings. If | 172 | it describes the standard key bindings. If you customize Emacs, you can make |
| 173 | you customize Emacs, you can make new prefix keys, or eliminate some | 173 | new prefix keys, or eliminate some of the standard ones (not |
| 174 | of the standard ones. @xref{Key Bindings}. | 174 | recommended for most users). @xref{Key Bindings}. |
| 175 | 175 | ||
| 176 | If you do make or eliminate prefix keys, that changes the set of | 176 | If you make or eliminate prefix keys, that changes the set of |
| 177 | possible key sequences. For example, if you redefine @kbd{C-f} as a | 177 | possible key sequences. For example, if you redefine @kbd{C-f} as a |
| 178 | prefix, @kbd{C-f C-k} automatically becomes a key (complete, unless you | 178 | prefix, @kbd{C-f C-k} automatically becomes a key (complete, unless |
| 179 | define that too as a prefix). Conversely, if you remove the prefix | 179 | you define that too as a prefix). Conversely, if you remove the |
| 180 | definition of @kbd{C-x 4}, then @kbd{C-x 4 f} (or @kbd{C-x 4 | 180 | prefix definition of @kbd{C-x 4}, then @kbd{C-x 4 f} and @kbd{C-x 4 |
| 181 | @var{anything}}) is no longer a key. | 181 | @var{anything}} are no longer keys. |
| 182 | 182 | ||
| 183 | Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key | 183 | Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key |
| 184 | displays a list of the commands starting with that prefix. There are | 184 | displays a list of the commands starting with that prefix. There are |
| 185 | a few prefix keys for which @kbd{C-h} does not work---for historical | 185 | a few prefix keys after which @kbd{C-h} does not work---for historical |
| 186 | reasons, they define other meanings for @kbd{C-h} which are painful to | 186 | reasons, they define other meanings for @kbd{C-h} which are painful to |
| 187 | change. But @key{F1} should work for all prefix keys. | 187 | change. @key{F1} works after all prefix keys. |
| 188 | 188 | ||
| 189 | @node Commands, Text Characters, Keys, Top | 189 | @node Commands, Text Characters, Keys, Top |
| 190 | @section Keys and Commands | 190 | @section Keys and Commands |
| @@ -197,61 +197,65 @@ do. But Emacs does not assign meanings to keys directly. Instead, | |||
| 197 | Emacs assigns meanings to named @dfn{commands}, and then gives keys | 197 | Emacs assigns meanings to named @dfn{commands}, and then gives keys |
| 198 | their meanings by @dfn{binding} them to commands. | 198 | their meanings by @dfn{binding} them to commands. |
| 199 | 199 | ||
| 200 | Every command has a name chosen by a programmer. The name is usually | 200 | Every command has a name chosen by a programmer. The name is |
| 201 | made of a few English words separated by dashes; for example, | 201 | usually made of a few English words separated by dashes; for example, |
| 202 | @code{next-line} or @code{forward-word}. A command also has a | 202 | @code{next-line} or @code{forward-word}. A command also has a |
| 203 | @dfn{function definition} which is a Lisp program; this is what makes | 203 | @dfn{function definition} which is a Lisp program; this is how the |
| 204 | the command do what it does. In Emacs Lisp, a command is actually a | 204 | command does its work. In Emacs Lisp, a command is a Lisp function with |
| 205 | special kind of Lisp function; one which specifies how to read arguments | 205 | special options to read arguments and for interactive use. For more |
| 206 | for it and call it interactively. For more information on commands and | 206 | information on commands and functions, see @ref{What Is a Function,, |
| 207 | functions, see @ref{What Is a Function,, What Is a Function, elisp, The | 207 | What Is a Function, elisp, The Emacs Lisp Reference Manual}. (The |
| 208 | Emacs Lisp Reference Manual}. (The definition we use in this manual is | 208 | definition here is simplified slightly.) |
| 209 | simplified slightly.) | ||
| 210 | 209 | ||
| 211 | The bindings between keys and commands are recorded in various tables | 210 | The bindings between keys and commands are recorded in tables called |
| 212 | called @dfn{keymaps}. @xref{Keymaps}. | 211 | @dfn{keymaps}. @xref{Keymaps}. |
| 213 | 212 | ||
| 214 | When we say that ``@kbd{C-n} moves down vertically one line'' we are | 213 | When we say that ``@kbd{C-n} moves down vertically one line'' we are |
| 215 | glossing over a distinction that is irrelevant in ordinary use but is vital | 214 | glossing over a subtle distinction that is irrelevant in ordinary use, |
| 216 | in understanding how to customize Emacs. It is the command | 215 | but vital for Emacs customization. The command @code{next-line} does |
| 217 | @code{next-line} that is programmed to move down vertically. @kbd{C-n} has | 216 | a vertical move downward. @kbd{C-n} has this effect @emph{because} it |
| 218 | this effect @emph{because} it is bound to that command. If you rebind | 217 | is bound to @code{next-line}. If you rebind @kbd{C-n} to the command |
| 219 | @kbd{C-n} to the command @code{forward-word} then @kbd{C-n} will move | 218 | @code{forward-word}, @kbd{C-n} will move forward one word instead. |
| 220 | forward by words instead. Rebinding keys is a common method of | 219 | Rebinding keys is an important method of customization. |
| 221 | customization.@refill | ||
| 222 | 220 | ||
| 223 | In the rest of this manual, we usually ignore this distinction to | 221 | In the rest of this manual, we usually ignore this distinction to |
| 224 | keep things simple. We will often speak of keys like @kbd{C-n} as | 222 | keep things simple. We will often speak of keys like @kbd{C-n} as |
| 225 | commands, even though strictly speaking a key is bound to some | 223 | commands, even though strictly speaking the key is bound to a command. |
| 226 | command. To give the information needed for customization, we state | 224 | Usually we state the name of the command which really does the work in |
| 227 | the name of the command which really does the work in parentheses | 225 | parentheses after mentioning the key that runs it. For example, we |
| 228 | after mentioning the key that runs it. For example, we will say that | 226 | will say that ``The command @kbd{C-n} (@code{next-line}) moves point |
| 229 | ``The command @kbd{C-n} (@code{next-line}) moves point vertically | 227 | vertically down,'' meaning that the command @code{next-line} moves |
| 230 | down,'' meaning that @code{next-line} is a command that moves | 228 | vertically down, and the key @kbd{C-n} is normally bound to it. |
| 231 | vertically down, and @kbd{C-n} is a key that is normally bound to it. | 229 | |
| 232 | 230 | Since we are discussing customization, we should tell you about | |
| 233 | While we are on the subject of information for customization only, | 231 | @dfn{variables}. Often the description of a command will say, ``To |
| 234 | it's a good time to tell you about @dfn{variables}. Often the | 232 | change this, set the variable @code{mumble-foo}.'' A variable is a |
| 235 | description of a command will say, ``To change this, set the variable | 233 | name used to store a value. Most of the variables documented in this |
| 236 | @code{mumble-foo}.'' A variable is a name used to remember a value. | 234 | manual are meant for customization: some command or other part of |
| 237 | Most of the variables documented in this manual exist just to facilitate | 235 | Emacs examines the variable and behaves differently according to the |
| 238 | customization: some command or other part of Emacs examines the variable | 236 | value that you set. You can ignore the information about variables |
| 239 | and behaves differently according to the value that you set. Until you | 237 | until you are interested in customizing them. Then read the basic |
| 240 | are interested in customizing, you can ignore the information about | 238 | information on variables (@pxref{Variables}) and the information about |
| 241 | variables. When you are ready to be interested, read the basic | 239 | specific variables will make sense. |
| 242 | information on variables, and then the information on individual | ||
| 243 | variables will make sense. @xref{Variables}. | ||
| 244 | 240 | ||
| 245 | @node Text Characters, Entering Emacs, Commands, Top | 241 | @node Text Characters, Entering Emacs, Commands, Top |
| 246 | @section Character Set for Text | 242 | @section Character Set for Text |
| 247 | @cindex characters (in text) | 243 | @cindex characters (in text) |
| 248 | 244 | ||
| 249 | Text in Emacs buffers is a sequence of 8-bit bytes. Each byte can | 245 | Text in Emacs buffers is a sequence of characters. In the simplest |
| 250 | hold a single @acronym{ASCII} character. Both @acronym{ASCII} control characters (octal | 246 | case, these are @acronym{ASCII} characters, each stored in one 8-bit |
| 251 | codes 000 through 037, and 0177) and @acronym{ASCII} printing characters (codes | 247 | byte. Both @acronym{ASCII} control characters (octal codes 000 |
| 252 | 040 through 0176) are allowed; however, non-@acronym{ASCII} control characters | 248 | through 037, and 0177) and @acronym{ASCII} printing characters (codes |
| 253 | cannot appear in a buffer. The other modifier flags used in keyboard | 249 | 040 through 0176) are allowed. The other modifier flags used in |
| 254 | input, such as Meta, are not allowed in buffers either. | 250 | keyboard input, such as Meta, are not allowed in buffers. |
| 251 | |||
| 252 | Non-@acronym{ASCII} printing characters can also appear in buffers, | ||
| 253 | when multibyte characters are enabled. They have character codes | ||
| 254 | starting at 256, octal 0400, and each one is represented as a sequence | ||
| 255 | of two or more bytes. @xref{International}. Single-byte characters | ||
| 256 | with codes 128 through 255 can also appear in multibyte buffers. | ||
| 257 | However, non-@acronym{ASCII} control characters cannot appear in a | ||
| 258 | buffer. | ||
| 255 | 259 | ||
| 256 | Some @acronym{ASCII} control characters serve special purposes in text, and have | 260 | Some @acronym{ASCII} control characters serve special purposes in text, and have |
| 257 | special names. For example, the newline character (octal code 012) is | 261 | special names. For example, the newline character (octal code 012) is |
| @@ -259,16 +263,9 @@ used in the buffer to end a line, and the tab character (octal code 011) | |||
| 259 | is used for indenting to the next tab stop column (normally every 8 | 263 | is used for indenting to the next tab stop column (normally every 8 |
| 260 | columns). @xref{Text Display}. | 264 | columns). @xref{Text Display}. |
| 261 | 265 | ||
| 262 | Non-@acronym{ASCII} printing characters can also appear in buffers. When | ||
| 263 | multibyte characters are enabled, you can use any of the non-@acronym{ASCII} | ||
| 264 | printing characters that Emacs supports. They have character codes | ||
| 265 | starting at 256, octal 0400, and each one is represented as a sequence | ||
| 266 | of two or more bytes. @xref{International}. Single-byte characters | ||
| 267 | with codes 128 through 255 can also appear in multibyte buffers. | ||
| 268 | |||
| 269 | If you disable multibyte characters, then you can use only one | 266 | If you disable multibyte characters, then you can use only one |
| 270 | alphabet of non-@acronym{ASCII} characters, but they all fit in one byte. They | 267 | alphabet of non-@acronym{ASCII} characters, which all fit in one byte. |
| 271 | use codes 0200 through 0377. @xref{Unibyte Mode}. | 268 | They use octal codes 0200 through 0377. @xref{Unibyte Mode}. |
| 272 | 269 | ||
| 273 | @ifnottex | 270 | @ifnottex |
| 274 | @lowersections | 271 | @lowersections |
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. | |||
| 1977 | @subsection Disabling Commands | 1977 | @subsection Disabling Commands |
| 1978 | @cindex disabled command | 1978 | @cindex disabled command |
| 1979 | 1979 | ||
| 1980 | Disabling a command menas it requires confirmation before it can be | 1980 | Disabling a command means that invoking it interactively asks for |
| 1981 | executed. The purpose of disabling a command is to prevent users from | 1981 | confirmation from the user. The purpose of disabling a command is to |
| 1982 | executing it by accident and being confused. | 1982 | prevent users from executing it by accident; we do this for commands |
| 1983 | that might be confusing to the uninitiated. | ||
| 1983 | 1984 | ||
| 1984 | An attempt to invoke a disabled command interactively in Emacs | 1985 | Attempting to invoke a disabled command interactively in Emacs |
| 1985 | displays a window containing the command's name, its documentation, | 1986 | displays a window containing the command's name, its documentation, |
| 1986 | and some instructions on what to do immediately; then Emacs asks for | 1987 | and some instructions on what to do immediately; then Emacs asks for |
| 1987 | input saying whether to execute the command as requested, enable it | 1988 | input saying whether to execute the command as requested, enable it |
| @@ -2021,8 +2022,8 @@ because Emacs has not read your init file. | |||
| 2021 | 2022 | ||
| 2022 | Whether a command is disabled is independent of what key is used to | 2023 | Whether a command is disabled is independent of what key is used to |
| 2023 | invoke it; disabling also applies if the command is invoked using | 2024 | invoke it; disabling also applies if the command is invoked using |
| 2024 | @kbd{M-x}. Disabling a command has no effect on calling it as a | 2025 | @kbd{M-x}. However, disabling a command has no effect on calling it |
| 2025 | function from Lisp programs. | 2026 | as a function from Lisp programs. |
| 2026 | 2027 | ||
| 2027 | @node Syntax | 2028 | @node Syntax |
| 2028 | @section The Syntax Table | 2029 | @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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node Subdir Switches | ||
| 8 | @section Subdirectory Switches in Dired | ||
| 9 | |||
| 10 | You can insert subdirectories with specified @code{ls} switches in | ||
| 11 | Dired buffers, using @kbd{C-u i}. You can change the @code{ls} | ||
| 12 | switches of an already inserted subdirectory using @kbd{C-u l}. | ||
| 13 | |||
| 14 | In Emacs versions 22.1 and later, Dired remembers the switches, so | ||
| 15 | that reverting the buffer will not change them back to the main | ||
| 16 | directory's switches. Deleting a subdirectory forgets about its | ||
| 17 | switches. | ||
| 18 | |||
| 19 | Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u}) | ||
| 20 | to reinsert or delete subdirectories, that were inserted with explicit | ||
| 21 | switches, can bypass Dired's machinery for remembering (or forgetting) | ||
| 22 | switches. Deleting a subdirectory using @code{dired-undo} does not | ||
| 23 | forget its switches. When later reinserted using @kbd{i}, it will be | ||
| 24 | reinserted using its old switches. Using @code{dired-undo} to | ||
| 25 | reinsert a subdirectory that was deleted using the regular | ||
| 26 | Dired commands (not @code{dired-undo}) will originally insert it with | ||
| 27 | its old switches. However, reverting the buffer will relist it using | ||
| 28 | the buffer's default switches. If any of this yields problems, you | ||
| 29 | can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. | ||
| 30 | |||
| 31 | Dired does not remember the @code{R} switch. Inserting a subdirectory | ||
| 32 | with switches that include the @code{R} switch is equivalent with | ||
| 33 | inserting each of its subdirectories using all remaining switches. | ||
| 34 | For instance, updating or killing a subdirectory that was inserted | ||
| 35 | with the @code{R} switch will not update or kill its subdirectories. | ||
| 36 | |||
| 37 | The buffer's default switches do not affect subdirectories that were | ||
| 38 | inserted using explicitly specified switches. In particular, | ||
| 39 | commands such as @kbd{s}, that change the buffer's switches do not | ||
| 40 | affect such subdirectories. (They do affect subdirectories without | ||
| 41 | explicitly assigned switches, however.) | ||
| 42 | |||
| 43 | You can make Dired forget about all subdirectory switches and relist | ||
| 44 | all subdirectories with the buffer's default switches using | ||
| 45 | @kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer. | ||
| 46 | |||
| 47 | @ignore | ||
| 48 | arch-tag: e3865701-9179-4ffb-bc34-d321111c688d | ||
| 49 | @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. | |||
| 36 | * Transforming File Names:: Using patterns to rename multiple files. | 36 | * Transforming File Names:: Using patterns to rename multiple files. |
| 37 | * Comparison in Dired:: Running `diff' by way of Dired. | 37 | * Comparison in Dired:: Running `diff' by way of Dired. |
| 38 | * Subdirectories in Dired:: Adding subdirectories to the Dired buffer. | 38 | * Subdirectories in Dired:: Adding subdirectories to the Dired buffer. |
| 39 | @ifnottex | ||
| 40 | * Subdir Switches:: Subdirectory switches in Dired. | ||
| 41 | @end ifnottex | ||
| 39 | * Subdirectory Motion:: Moving across subdirectories, and up and down. | 42 | * Subdirectory Motion:: Moving across subdirectories, and up and down. |
| 40 | * Hiding Subdirectories:: Making subdirectories visible or invisible. | 43 | * Hiding Subdirectories:: Making subdirectories visible or invisible. |
| 41 | * Updating: Dired Updating. Discarding lines for files of no interest. | 44 | * 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 | |||
| 906 | subdirectory's contents. Use @kbd{C-u k} on the subdirectory header | 909 | subdirectory's contents. Use @kbd{C-u k} on the subdirectory header |
| 907 | line to delete the subdirectory. @xref{Dired Updating}. | 910 | line to delete the subdirectory. @xref{Dired Updating}. |
| 908 | 911 | ||
| 912 | @ifnottex | ||
| 913 | @include dired-xtra.texi | ||
| 914 | @end ifnottex | ||
| 915 | |||
| 909 | @node Subdirectory Motion | 916 | @node Subdirectory Motion |
| 910 | @section Moving Over Subdirectories | 917 | @section Moving Over Subdirectories |
| 911 | 918 | ||
| @@ -1198,7 +1205,7 @@ not appear in the other directory is ``different''. You can specify | |||
| 1198 | more stringent comparisons by entering a Lisp expression, which can | 1205 | more stringent comparisons by entering a Lisp expression, which can |
| 1199 | refer to the variables @code{size1} and @code{size2}, the respective | 1206 | refer to the variables @code{size1} and @code{size2}, the respective |
| 1200 | file sizes; @code{mtime1} and @code{mtime2}, the last modification | 1207 | file sizes; @code{mtime1} and @code{mtime2}, the last modification |
| 1201 | times in seconds, as floating point numers; and @code{fa1} and | 1208 | times in seconds, as floating point numbers; and @code{fa1} and |
| 1202 | @code{fa2}, the respective file attribute lists (as returned by the | 1209 | @code{fa2}, the respective file attribute lists (as returned by the |
| 1203 | function @code{file-attributes}). This expression is evaluated for | 1210 | function @code{file-attributes}). This expression is evaluated for |
| 1204 | each pair of like-named files, and if the expression's value is | 1211 | each pair of like-named files, and if the expression's value is |
diff --git a/man/display.texi b/man/display.texi index 83b5ae48554..eaf2ab212bc 100644 --- a/man/display.texi +++ b/man/display.texi | |||
| @@ -1026,7 +1026,7 @@ elisp, The Emacs Lisp Reference Manual}. | |||
| 1026 | @cindex cursor, blinking | 1026 | @cindex cursor, blinking |
| 1027 | You can customize the cursor's color, and whether it blinks, using | 1027 | You can customize the cursor's color, and whether it blinks, using |
| 1028 | the @code{cursor} Custom group (@pxref{Easy Customization}). On | 1028 | the @code{cursor} Custom group (@pxref{Easy Customization}). On |
| 1029 | graphical terminals, the command @kbd{M-x blink-cursor-mode} enables | 1029 | a graphical display, the command @kbd{M-x blink-cursor-mode} enables |
| 1030 | or disables the blinking of the cursor. (On text terminals, the | 1030 | or disables the blinking of the cursor. (On text terminals, the |
| 1031 | terminal itself blinks the cursor, and Emacs has no control over it.) | 1031 | terminal itself blinks the cursor, and Emacs has no control over it.) |
| 1032 | You can control how the cursor appears when it blinks off by setting | 1032 | You can control how the cursor appears when it blinks off by setting |
| @@ -1050,7 +1050,7 @@ it a @code{nil} value. | |||
| 1050 | 1050 | ||
| 1051 | @vindex x-stretch-cursor | 1051 | @vindex x-stretch-cursor |
| 1052 | @cindex wide block cursor | 1052 | @cindex wide block cursor |
| 1053 | On graphical terminals, Emacs can optionally draw the block cursor | 1053 | On graphical displays, Emacs can optionally draw the block cursor |
| 1054 | as wide as the character under the cursor---for example, if the cursor | 1054 | as wide as the character under the cursor---for example, if the cursor |
| 1055 | is on a tab character, it would cover the full width occupied by that | 1055 | is on a tab character, it would cover the full width occupied by that |
| 1056 | tab character. To enable this feature, set the variable | 1056 | tab character. To enable this feature, set the variable |
| @@ -1127,7 +1127,7 @@ fringe when positioned on that newline. | |||
| 1127 | 1127 | ||
| 1128 | @vindex indicate-buffer-boundaries | 1128 | @vindex indicate-buffer-boundaries |
| 1129 | On a graphical display, Emacs can indicate the buffer boundaries in | 1129 | On a graphical display, Emacs can indicate the buffer boundaries in |
| 1130 | the fringes. It inddicates the first line and the last line with | 1130 | the fringes. It indicates the first line and the last line with |
| 1131 | angle images in the fringes. This can be combined with up and down | 1131 | angle images in the fringes. This can be combined with up and down |
| 1132 | arrow images which say whether it is possible to scroll the window up | 1132 | arrow images which say whether it is possible to scroll the window up |
| 1133 | and down. | 1133 | 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. | |||
| 55 | @end ifnottex | 55 | @end ifnottex |
| 56 | 56 | ||
| 57 | @menu | 57 | @menu |
| 58 | * Introduction:: What documentation belongs here? | 58 | * Introduction:: What documentation belongs here? |
| 59 | * Autorevert:: Auto Reverting non-file buffers. | 59 | @iftex |
| 60 | * Subdir Switches:: Subdirectory switches in Dired. | 60 | * Picture Mode:: Editing pictures made up of characters using |
| 61 | * Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. | 61 | the quarter-plane screen model. |
| 62 | * Emerge:: A convenient way of merging two versions | ||
| 63 | of a program. | ||
| 64 | * Picture Mode:: Editing pictures made up of characters | ||
| 65 | using the quarter-plane screen model. | ||
| 66 | 62 | ||
| 67 | * Advanced VC Usage:: Advanced VC (version control) features. | 63 | * Autorevert:: Auto Reverting non-file buffers. |
| 68 | * Fortran:: Fortran mode and its special features. | 64 | * Subdir Switches:: Subdirectory switches in Dired. |
| 69 | * MS-DOG:: | 65 | * Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. |
| 66 | * Emerge:: A convenient way of merging two versions of a program. | ||
| 67 | * Advanced VC Usage:: Advanced VC (version control) features. | ||
| 68 | * Fortran:: Fortran mode and its special features. | ||
| 69 | * MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}). | ||
| 70 | @end iftex | ||
| 70 | * Index:: | 71 | * Index:: |
| 71 | @end menu | 72 | @end menu |
| 72 | 73 | ||
| @@ -74,3772 +75,44 @@ license to the document, as described in section 6 of the license. | |||
| 74 | @unnumbered Introduction | 75 | @unnumbered Introduction |
| 75 | 76 | ||
| 76 | This manual contains detailed information about various features that | 77 | This manual contains detailed information about various features that |
| 77 | are too specialized to be included in the Emacs manual. It is | 78 | are too specialized to be included in the printed Emacs manual. It is |
| 78 | intended to be readable by anyone having a basic knowledge of Emacs. | 79 | intended to be readable by anyone having a basic knowledge of Emacs. |
| 79 | However, certain sections may be intended for a more specialized | 80 | However, certain sections may be intended for a more specialized |
| 80 | audience, such as Elisp authors. This should be clearly pointed out | 81 | audience, such as Elisp authors. This should be clearly pointed out |
| 81 | at the beginning of these sections. | 82 | at the beginning of these sections. |
| 82 | 83 | ||
| 83 | This manual is intended as a complement, rather than an alternative, | 84 | Certain packages, or collections of related features, have their own |
| 84 | to other ways to gain a more detailed knowledge of Emacs than the | 85 | manuals, separate from the main Emacs User's manual. This manual is |
| 85 | Emacs manual can provide, such as browsing packages using @kbd{C-h p}, | 86 | intended as a complement, rather than an alternative, to reading those |
| 86 | accessing mode documentation using @kbd{C-h m} and browsing user | 87 | additional manuals; in a nutshell, it is a collection of smaller |
| 87 | options using Custom. Also, certain packages, or collections of | 88 | specialized features, too small or too obscure to justify their own |
| 88 | related features, have their own manuals. The present manual is | 89 | manual. |
| 89 | mainly intended to be a collection of smaller specialized features, | ||
| 90 | too small to get their own manual. | ||
| 91 | 90 | ||
| 92 | Sections intended specifically for Elisp programmers can follow the | 91 | Sections intended specifically for Elisp programmers can follow the |
| 93 | style of the Elisp manual. Other sections should follow the style of | 92 | style of the Elisp manual. Other sections should follow the style of |
| 94 | the Emacs manual. | 93 | the Emacs manual. |
| 95 | 94 | ||
| 96 | @node Autorevert | ||
| 97 | @chapter Auto Reverting non-file Buffers | ||
| 98 | |||
| 99 | Normally Global Auto Revert Mode only reverts file buffers. There are | ||
| 100 | two ways to auto-revert certain non-file buffers: enabling Auto Revert | ||
| 101 | Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting | ||
| 102 | @code{global-auto-revert-non-file-buffers} to @code{t}. The latter | ||
| 103 | enables Auto Reverting for all types of buffers for which it is | ||
| 104 | implemented, that is, for the types of buffers listed in the menu | ||
| 105 | below. | ||
| 106 | |||
| 107 | Like file buffers, non-file buffers should normally not revert while | ||
| 108 | you are working on them, or while they contain information that might | ||
| 109 | get lost after reverting. Therefore, they do not revert if they are | ||
| 110 | ``modified''. This can get tricky, because deciding when a non-file | ||
| 111 | buffer should be marked modified is usually more difficult than for | ||
| 112 | file buffers. | ||
| 113 | |||
| 114 | Another tricky detail is that, for efficiency reasons, Auto Revert | ||
| 115 | often does not try to detect all possible changes in the buffer, only | ||
| 116 | changes that are ``major'' or easy to detect. Hence, enabling | ||
| 117 | auto-reverting for a non-file buffer does not always guarantee that | ||
| 118 | all information in the buffer is up to date and does not necessarily | ||
| 119 | make manual reverts useless. | ||
| 120 | |||
| 121 | At the other extreme, certain buffers automatically auto-revert every | ||
| 122 | @code{auto-revert-interval} seconds. (This currently only applies to | ||
| 123 | the Buffer Menu.) In this case, Auto Revert does not print any | ||
| 124 | messages while reverting, even when @code{auto-revert-verbose} is | ||
| 125 | non-@code{nil}. | ||
| 126 | |||
| 127 | The details depend on the particular types of buffers and are | ||
| 128 | explained in the corresponding sections. | ||
| 129 | |||
| 130 | @menu | ||
| 131 | * Auto Reverting the Buffer Menu:: | ||
| 132 | * Auto Reverting Dired:: | ||
| 133 | * Supporting additional buffers:: | ||
| 134 | @end menu | ||
| 135 | |||
| 136 | @node Auto Reverting the Buffer Menu | ||
| 137 | @section Auto Reverting the Buffer Menu | ||
| 138 | |||
| 139 | If auto-reverting of non-file buffers is enabled, the Buffer Menu | ||
| 140 | automatically reverts every @code{auto-revert-interval} seconds, | ||
| 141 | whether there is a need for it or not. (It would probably take longer | ||
| 142 | to check whether there is a need than to actually revert.) | ||
| 143 | |||
| 144 | If the Buffer Menu inappropriately gets marked modified, just revert | ||
| 145 | it manually using @kbd{g} and auto-reverting will resume. However, if | ||
| 146 | you marked certain buffers to get deleted or to be displayed, you have | ||
| 147 | to be careful, because reverting erases all marks. The fact that | ||
| 148 | adding marks sets the buffer's modified flag prevents Auto Revert from | ||
| 149 | automatically erasing the marks. | ||
| 150 | |||
| 151 | @node Auto Reverting Dired | ||
| 152 | @section Auto Reverting Dired buffers | ||
| 153 | |||
| 154 | Auto-reverting Dired buffers currently works on GNU or Unix style | ||
| 155 | operating systems. It may not work satisfactorily on some other | ||
| 156 | systems. | ||
| 157 | |||
| 158 | Dired buffers only auto-revert when the file list of the buffer's main | ||
| 159 | directory changes. They do not auto-revert when information about a | ||
| 160 | particular file changes or when inserted subdirectories change. To be | ||
| 161 | sure that @emph{all} listed information is up to date, you have to | ||
| 162 | manually revert using @kbd{g}, @emph{even} if auto-reverting is | ||
| 163 | enabled in the Dired buffer. Sometimes, you might get the impression | ||
| 164 | that modifying or saving files listed in the main directory actually | ||
| 165 | does cause auto-reverting. This is because making changes to a file, | ||
| 166 | or saving it, very often causes changes in the directory itself, for | ||
| 167 | instance, through backup files or auto-save files. However, this is | ||
| 168 | not guaranteed. | ||
| 169 | |||
| 170 | If the Dired buffer is marked modified and there are no changes you | ||
| 171 | want to protect, then most of the time you can make auto-reverting | ||
| 172 | resume by manually reverting the buffer using @kbd{g}. There is one | ||
| 173 | exception. If you flag or mark files, you can safely revert the | ||
| 174 | buffer. This will not erase the flags or marks (unless the marked | ||
| 175 | file has been deleted, of course). However, the buffer will stay | ||
| 176 | modified, even after reverting, and auto-reverting will not resume. | ||
| 177 | This is because, if you flag or mark files, you may be working on the | ||
| 178 | buffer and you might not want the buffer to change without warning. | ||
| 179 | If you want auto-reverting to resume in the presence of marks and | ||
| 180 | flags, mark the buffer non-modified using @kbd{M-~}. However, adding, | ||
| 181 | deleting or changing marks or flags will mark it modified again. | ||
| 182 | |||
| 183 | Remote Dired buffers are not auto-reverted. Neither are Dired buffers | ||
| 184 | for which you used shell wildcards or file arguments to list only some | ||
| 185 | of the files. @samp{*Find*} and @samp{*Locate*} buffers do not | ||
| 186 | auto-revert either. | ||
| 187 | |||
| 188 | @node Supporting additional buffers | ||
| 189 | @section Adding Support for Auto-Reverting additional Buffers. | ||
| 190 | |||
| 191 | This section is intended for Elisp programmers who would like to add | ||
| 192 | support for auto-reverting new types of buffers. | ||
| 193 | |||
| 194 | To support auto-reverting the buffer must first of all have a | ||
| 195 | @code{revert-buffer-function}. @xref{Definition of | ||
| 196 | revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}. | ||
| 197 | |||
| 198 | In addition, it @emph{must} have a @code{buffer-stale-function}. | ||
| 199 | |||
| 200 | @defvar buffer-stale-function | ||
| 201 | The value of this variable is a function to check whether a non-file | ||
| 202 | buffer needs reverting. This should be a function with one optional | ||
| 203 | argument @var{noconfirm}. The function should return non-@code{nil} | ||
| 204 | if the buffer should be reverted. The buffer is current when this | ||
| 205 | function is called. | ||
| 206 | |||
| 207 | While this function is mainly intended for use in auto-reverting, it | ||
| 208 | could be used for other purposes as well. For instance, if | ||
| 209 | auto-reverting is not enabled, it could be used to warn the user that | ||
| 210 | the buffer needs reverting. The idea behind the @var{noconfirm} | ||
| 211 | argument is that it should be @code{t} if the buffer is going to be | ||
| 212 | reverted without asking the user and @code{nil} if the function is | ||
| 213 | just going to be used to warn the user that the buffer is out of date. | ||
| 214 | In particular, for use in auto-reverting, @var{noconfirm} is @code{t}. | ||
| 215 | If the function is only going to be used for auto-reverting, you can | ||
| 216 | ignore the @var{noconfirm} argument. | ||
| 217 | |||
| 218 | If you just want to automatically auto-revert every | ||
| 219 | @code{auto-revert-interval} seconds, use: | ||
| 220 | |||
| 221 | @example | ||
| 222 | (set (make-local-variable 'buffer-stale-function) | ||
| 223 | #'(lambda (&optional noconfirm) 'fast)) | ||
| 224 | @end example | ||
| 225 | |||
| 226 | @noindent | ||
| 227 | in the buffer's mode function. | ||
| 228 | |||
| 229 | The special return value @samp{fast} tells the caller that the need | ||
| 230 | for reverting was not checked, but that reverting the buffer is fast. | ||
| 231 | It also tells Auto Revert not to print any revert messages, even if | ||
| 232 | @code{auto-revert-verbose} is non-@code{nil}. This is important, as | ||
| 233 | getting revert messages every @code{auto-revert-interval} seconds can | ||
| 234 | be very annoying. The information provided by this return value could | ||
| 235 | also be useful if the function is consulted for purposes other than | ||
| 236 | auto-reverting. | ||
| 237 | @end defvar | ||
| 238 | |||
| 239 | Once the buffer has a @code{revert-buffer-function} and a | ||
| 240 | @code{buffer-stale-function}, several problems usually remain. | ||
| 241 | |||
| 242 | The buffer will only auto-revert if it is marked unmodified. Hence, | ||
| 243 | you will have to make sure that various functions mark the buffer | ||
| 244 | modified if and only if either the buffer contains information that | ||
| 245 | might be lost by reverting or there is reason to believe that the user | ||
| 246 | might be inconvenienced by auto-reverting, because he is actively | ||
| 247 | working on the buffer. The user can always override this by manually | ||
| 248 | adjusting the modified status of the buffer. To support this, calling | ||
| 249 | the @code{revert-buffer-function} on a buffer that is marked | ||
| 250 | unmodified should always keep the buffer marked unmodified. | ||
| 251 | |||
| 252 | It is important to assure that point does not continuously jump around | ||
| 253 | as a consequence of auto-reverting. Of course, moving point might be | ||
| 254 | inevitable if the buffer radically changes. | ||
| 255 | |||
| 256 | You should make sure that the @code{revert-buffer-function} does not | ||
| 257 | print messages that unnecessarily duplicate Auto Revert's own messages | ||
| 258 | if @code{auto-revert-verbose} is @code{t} and effectively override a | ||
| 259 | @code{nil} value for @code{auto-revert-verbose}. Hence, adapting a | ||
| 260 | mode for auto-reverting often involves getting rid of such messages. | ||
| 261 | This is especially important for buffers that automatically | ||
| 262 | auto-revert every @code{auto-revert-interval} seconds. | ||
| 263 | |||
| 264 | Also, you may want to update the documentation string of | ||
| 265 | @code{global-auto-revert-non-file-buffers}. | ||
| 266 | |||
| 267 | @ifinfo | ||
| 268 | Finally, you should add a node to this chapter's menu. This node | ||
| 269 | @end ifinfo | ||
| 270 | @ifnotinfo | ||
| 271 | Finally, you should add a section to this chapter. This section | ||
| 272 | @end ifnotinfo | ||
| 273 | should at the very least make clear whether enabling auto-reverting | ||
| 274 | for the buffer reliably assures that all information in the buffer is | ||
| 275 | completely up to date (or will be after @code{auto-revert-interval} | ||
| 276 | seconds). | ||
| 277 | |||
| 278 | @node Subdir Switches | ||
| 279 | @chapter Subdirectory Switches in Dired | ||
| 280 | |||
| 281 | You can insert subdirectories with specified @code{ls} switches in | ||
| 282 | Dired buffers, using @kbd{C-u i}. You can change the @code{ls} | ||
| 283 | switches of an already inserted subdirectory using @kbd{C-u l}. | ||
| 284 | |||
| 285 | In Emacs versions 22.1 and later, Dired remembers the switches, so | ||
| 286 | that reverting the buffer will not change them back to the main | ||
| 287 | directory's switches. Deleting a subdirectory forgets about its | ||
| 288 | switches. | ||
| 289 | |||
| 290 | Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u}) | ||
| 291 | to reinsert or delete subdirectories, that were inserted with explicit | ||
| 292 | switches, can bypass Dired's machinery for remembering (or forgetting) | ||
| 293 | switches. Deleting a subdirectory using @code{dired-undo} does not | ||
| 294 | forget its switches. When later reinserted using @kbd{i}, it will be | ||
| 295 | reinserted using its old switches. Using @code{dired-undo} to | ||
| 296 | reinsert a subdirectory that was deleted using the regular | ||
| 297 | Dired commands (not @code{dired-undo}) will originally insert it with | ||
| 298 | its old switches. However, reverting the buffer will relist it using | ||
| 299 | the buffer's default switches. If any of this yields problems, you | ||
| 300 | can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. | ||
| 301 | |||
| 302 | Dired does not remember the @code{R} switch. Inserting a subdirectory | ||
| 303 | with switches that include the @code{R} switch is equivalent with | ||
| 304 | inserting each of its subdirectories using all remaining switches. | ||
| 305 | For instance, updating or killing a subdirectory that was inserted | ||
| 306 | with the @code{R} switch will not update or kill its subdirectories. | ||
| 307 | |||
| 308 | The buffer's default switches do not affect subdirectories that were | ||
| 309 | inserted using explicitly specified switches. In particular, | ||
| 310 | commands such as @kbd{s}, that change the buffer's switches do not | ||
| 311 | affect such subdirectories. (They do affect subdirectories without | ||
| 312 | explicitly assigned switches, however.) | ||
| 313 | |||
| 314 | You can make Dired forget about all subdirectory switches and relist | ||
| 315 | all subdirectories with the buffer's default switches using | ||
| 316 | @kbd{M-x dired-reset-subdir-switches}. This also reverts the Dired buffer. | ||
| 317 | |||
| 318 | |||
| 319 | @c Moved here from the Emacs Lisp Reference Manual, 2005-03-26. | ||
| 320 | @node Advanced Calendar/Diary Usage | ||
| 321 | @chapter Customizing the Calendar and Diary | ||
| 322 | |||
| 323 | There are many customizations that you can use to make the calendar and | ||
| 324 | diary suit your personal tastes. | ||
| 325 | |||
| 326 | @menu | ||
| 327 | * Calendar Customizing:: Defaults you can set. | ||
| 328 | * Holiday Customizing:: Defining your own holidays. | ||
| 329 | * Date Display Format:: Changing the format. | ||
| 330 | * Time Display Format:: Changing the format. | ||
| 331 | * Daylight Savings:: Changing the default. | ||
| 332 | * Diary Customizing:: Defaults you can set. | ||
| 333 | * Hebrew/Islamic Entries:: How to obtain them. | ||
| 334 | * Fancy Diary Display:: Enhancing the diary display, sorting entries, | ||
| 335 | using included diary files. | ||
| 336 | * Sexp Diary Entries:: Fancy things you can do. | ||
| 337 | @end menu | ||
| 338 | |||
| 339 | @node Calendar Customizing | ||
| 340 | @section Customizing the Calendar | ||
| 341 | @vindex calendar-holiday-marker | ||
| 342 | @vindex diary-entry-marker | ||
| 343 | The variable @code{calendar-holiday-marker} specifies how to mark a | ||
| 344 | date as being a holiday. Its value may be a single-character string | ||
| 345 | to insert next to the date, or a face name to use for displaying the | ||
| 346 | date. Likewise, the variable @code{diary-entry-marker} specifies how | ||
| 347 | to mark a date that has diary entries. The calendar creates faces | ||
| 348 | named @code{holiday-face} and @code{diary-face} for these purposes; | ||
| 349 | those symbols are the default values of these variables. | ||
| 350 | |||
| 351 | @vindex calendar-load-hook | ||
| 352 | The variable @code{calendar-load-hook} is a normal hook run when the | ||
| 353 | calendar package is first loaded (before actually starting to display | ||
| 354 | the calendar). | ||
| 355 | |||
| 356 | @vindex initial-calendar-window-hook | ||
| 357 | Starting the calendar runs the normal hook | ||
| 358 | @code{initial-calendar-window-hook}. Recomputation of the calendar | ||
| 359 | display does not run this hook. But if you leave the calendar with the | ||
| 360 | @kbd{q} command and reenter it, the hook runs again.@refill | ||
| 361 | |||
| 362 | @vindex today-visible-calendar-hook | ||
| 363 | The variable @code{today-visible-calendar-hook} is a normal hook run | ||
| 364 | after the calendar buffer has been prepared with the calendar when the | ||
| 365 | current date is visible in the window. One use of this hook is to | ||
| 366 | replace today's date with asterisks; to do that, use the hook function | ||
| 367 | @code{calendar-star-date}. | ||
| 368 | |||
| 369 | @findex calendar-star-date | ||
| 370 | @example | ||
| 371 | (add-hook 'today-visible-calendar-hook 'calendar-star-date) | ||
| 372 | @end example | ||
| 373 | |||
| 374 | @noindent | ||
| 375 | Another standard hook function marks the current date, either by | ||
| 376 | changing its face or by adding an asterisk. Here's how to use it: | ||
| 377 | |||
| 378 | @findex calendar-mark-today | ||
| 379 | @example | ||
| 380 | (add-hook 'today-visible-calendar-hook 'calendar-mark-today) | ||
| 381 | @end example | ||
| 382 | |||
| 383 | @noindent | ||
| 384 | @vindex calendar-today-marker | ||
| 385 | The variable @code{calendar-today-marker} specifies how to mark | ||
| 386 | today's date. Its value should be a single-character string to insert | ||
| 387 | next to the date or a face name to use for displaying the date. A | ||
| 388 | face named @code{calendar-today-face} is provided for this purpose; | ||
| 389 | that symbol is the default for this variable. | ||
| 390 | |||
| 391 | @vindex today-invisible-calendar-hook | ||
| 392 | @noindent | ||
| 393 | A similar normal hook, @code{today-invisible-calendar-hook} is run if | ||
| 394 | the current date is @emph{not} visible in the window. | ||
| 395 | |||
| 396 | @vindex calendar-move-hook | ||
| 397 | Each of the calendar cursor motion commands runs the hook | ||
| 398 | @code{calendar-move-hook} after it moves the cursor. | ||
| 399 | |||
| 400 | @node Holiday Customizing | ||
| 401 | @section Customizing the Holidays | ||
| 402 | |||
| 403 | @vindex calendar-holidays | ||
| 404 | @vindex christian-holidays | ||
| 405 | @vindex hebrew-holidays | ||
| 406 | @vindex islamic-holidays | ||
| 407 | Emacs knows about holidays defined by entries on one of several lists. | ||
| 408 | You can customize these lists of holidays to your own needs, adding or | ||
| 409 | deleting holidays. The lists of holidays that Emacs uses are for | ||
| 410 | general holidays (@code{general-holidays}), local holidays | ||
| 411 | (@code{local-holidays}), Christian holidays (@code{christian-holidays}), | ||
| 412 | Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim) | ||
| 413 | holidays (@code{islamic-holidays}), and other holidays | ||
| 414 | (@code{other-holidays}). | ||
| 415 | |||
| 416 | @vindex general-holidays | ||
| 417 | The general holidays are, by default, holidays common throughout the | ||
| 418 | United States. To eliminate these holidays, set @code{general-holidays} | ||
| 419 | to @code{nil}. | ||
| 420 | |||
| 421 | @vindex local-holidays | ||
| 422 | There are no default local holidays (but sites may supply some). You | ||
| 423 | can set the variable @code{local-holidays} to any list of holidays, as | ||
| 424 | described below. | ||
| 425 | |||
| 426 | @vindex all-christian-calendar-holidays | ||
| 427 | @vindex all-hebrew-calendar-holidays | ||
| 428 | @vindex all-islamic-calendar-holidays | ||
| 429 | By default, Emacs does not include all the holidays of the religions | ||
| 430 | that it knows, only those commonly found in secular calendars. For a | ||
| 431 | more extensive collection of religious holidays, you can set any (or | ||
| 432 | all) of the variables @code{all-christian-calendar-holidays}, | ||
| 433 | @code{all-hebrew-calendar-holidays}, or | ||
| 434 | @code{all-islamic-calendar-holidays} to @code{t}. If you want to | ||
| 435 | eliminate the religious holidays, set any or all of the corresponding | ||
| 436 | variables @code{christian-holidays}, @code{hebrew-holidays}, and | ||
| 437 | @code{islamic-holidays} to @code{nil}.@refill | ||
| 438 | |||
| 439 | @vindex other-holidays | ||
| 440 | You can set the variable @code{other-holidays} to any list of | ||
| 441 | holidays. This list, normally empty, is intended for individual use. | ||
| 442 | |||
| 443 | @cindex holiday forms | ||
| 444 | Each of the lists (@code{general-holidays}, @code{local-holidays}, | ||
| 445 | @code{christian-holidays}, @code{hebrew-holidays}, | ||
| 446 | @code{islamic-holidays}, and @code{other-holidays}) is a list of | ||
| 447 | @dfn{holiday forms}, each holiday form describing a holiday (or | ||
| 448 | sometimes a list of holidays). | ||
| 449 | |||
| 450 | Here is a table of the possible kinds of holiday form. Day numbers | ||
| 451 | and month numbers count starting from 1, but ``dayname'' numbers | ||
| 452 | count Sunday as 0. The element @var{string} is always the | ||
| 453 | name of the holiday, as a string. | ||
| 454 | |||
| 455 | @table @code | ||
| 456 | @item (holiday-fixed @var{month} @var{day} @var{string}) | ||
| 457 | A fixed date on the Gregorian calendar. | ||
| 458 | |||
| 459 | @item (holiday-float @var{month} @var{dayname} @var{k} @var{string}) | ||
| 460 | The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar | ||
| 461 | (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back | ||
| 462 | from the end of the month. | ||
| 463 | |||
| 464 | @item (holiday-hebrew @var{month} @var{day} @var{string}) | ||
| 465 | A fixed date on the Hebrew calendar. | ||
| 466 | |||
| 467 | @item (holiday-islamic @var{month} @var{day} @var{string}) | ||
| 468 | A fixed date on the Islamic calendar. | ||
| 469 | |||
| 470 | @item (holiday-julian @var{month} @var{day} @var{string}) | ||
| 471 | A fixed date on the Julian calendar. | ||
| 472 | |||
| 473 | @item (holiday-sexp @var{sexp} @var{string}) | ||
| 474 | A date calculated by the Lisp expression @var{sexp}. The expression | ||
| 475 | should use the variable @code{year} to compute and return the date of a | ||
| 476 | holiday, or @code{nil} if the holiday doesn't happen this year. The | ||
| 477 | value of @var{sexp} must represent the date as a list of the form | ||
| 478 | @code{(@var{month} @var{day} @var{year})}. | ||
| 479 | |||
| 480 | @item (if @var{condition} @var{holiday-form}) | ||
| 481 | A holiday that happens only if @var{condition} is true. | ||
| 482 | |||
| 483 | @item (@var{function} @r{[}@var{args}@r{]}) | ||
| 484 | A list of dates calculated by the function @var{function}, called with | ||
| 485 | arguments @var{args}. | ||
| 486 | @end table | ||
| 487 | |||
| 488 | For example, suppose you want to add Bastille Day, celebrated in | ||
| 489 | France on July 14. You can do this as follows: | ||
| 490 | |||
| 491 | @smallexample | ||
| 492 | (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) | ||
| 493 | @end smallexample | ||
| 494 | |||
| 495 | @noindent | ||
| 496 | The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the | ||
| 497 | fourteenth day of the seventh month (July). | ||
| 498 | |||
| 499 | Many holidays occur on a specific day of the week, at a specific time | ||
| 500 | of month. Here is a holiday form describing Hurricane Supplication Day, | ||
| 501 | celebrated in the Virgin Islands on the fourth Monday in August: | ||
| 502 | |||
| 503 | @smallexample | ||
| 504 | (holiday-float 8 1 4 "Hurricane Supplication Day") | ||
| 505 | @end smallexample | ||
| 506 | |||
| 507 | @noindent | ||
| 508 | Here the 8 specifies August, the 1 specifies Monday (Sunday is 0, | ||
| 509 | Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in | ||
| 510 | the month (1 specifies the first occurrence, 2 the second occurrence, | ||
| 511 | @minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and | ||
| 512 | so on). | ||
| 513 | |||
| 514 | You can specify holidays that occur on fixed days of the Hebrew, | ||
| 515 | Islamic, and Julian calendars too. For example, | ||
| 516 | |||
| 517 | @smallexample | ||
| 518 | (setq other-holidays | ||
| 519 | '((holiday-hebrew 10 2 "Last day of Hanukkah") | ||
| 520 | (holiday-islamic 3 12 "Mohammed's Birthday") | ||
| 521 | (holiday-julian 4 2 "Jefferson's Birthday"))) | ||
| 522 | @end smallexample | ||
| 523 | |||
| 524 | @noindent | ||
| 525 | adds the last day of Hanukkah (since the Hebrew months are numbered with | ||
| 526 | 1 starting from Nisan), the Islamic feast celebrating Mohammed's | ||
| 527 | birthday (since the Islamic months are numbered from 1 starting with | ||
| 528 | Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the | ||
| 529 | Julian calendar. | ||
| 530 | |||
| 531 | To include a holiday conditionally, use either Emacs Lisp's @code{if} or the | ||
| 532 | @code{holiday-sexp} form. For example, American presidential elections | ||
| 533 | occur on the first Tuesday after the first Monday in November of years | ||
| 534 | divisible by 4: | ||
| 535 | |||
| 536 | @smallexample | ||
| 537 | (holiday-sexp '(if (= 0 (% year 4)) | ||
| 538 | (calendar-gregorian-from-absolute | ||
| 539 | (1+ (calendar-dayname-on-or-before | ||
| 540 | 1 (+ 6 (calendar-absolute-from-gregorian | ||
| 541 | (list 11 1 year))))))) | ||
| 542 | "US Presidential Election") | ||
| 543 | @end smallexample | ||
| 544 | |||
| 545 | @noindent | ||
| 546 | or | ||
| 547 | |||
| 548 | @smallexample | ||
| 549 | (if (= 0 (% displayed-year 4)) | ||
| 550 | (fixed 11 | ||
| 551 | (extract-calendar-day | ||
| 552 | (calendar-gregorian-from-absolute | ||
| 553 | (1+ (calendar-dayname-on-or-before | ||
| 554 | 1 (+ 6 (calendar-absolute-from-gregorian | ||
| 555 | (list 11 1 displayed-year))))))) | ||
| 556 | "US Presidential Election")) | ||
| 557 | @end smallexample | ||
| 558 | |||
| 559 | Some holidays just don't fit into any of these forms because special | ||
| 560 | calculations are involved in their determination. In such cases you | ||
| 561 | must write a Lisp function to do the calculation. To include eclipses, | ||
| 562 | for example, add @code{(eclipses)} to @code{other-holidays} | ||
| 563 | and write an Emacs Lisp function @code{eclipses} that returns a | ||
| 564 | (possibly empty) list of the relevant Gregorian dates among the range | ||
| 565 | visible in the calendar window, with descriptive strings, like this: | ||
| 566 | |||
| 567 | @smallexample | ||
| 568 | (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... ) | ||
| 569 | @end smallexample | ||
| 570 | |||
| 571 | @node Date Display Format | ||
| 572 | @section Date Display Format | ||
| 573 | @vindex calendar-date-display-form | ||
| 574 | |||
| 575 | You can customize the manner of displaying dates in the diary, in mode | ||
| 576 | lines, and in messages by setting @code{calendar-date-display-form}. | ||
| 577 | This variable holds a list of expressions that can involve the variables | ||
| 578 | @code{month}, @code{day}, and @code{year}, which are all numbers in | ||
| 579 | string form, and @code{monthname} and @code{dayname}, which are both | ||
| 580 | alphabetic strings. In the American style, the default value of this | ||
| 581 | list is as follows: | ||
| 582 | |||
| 583 | @smallexample | ||
| 584 | ((if dayname (concat dayname ", ")) monthname " " day ", " year) | ||
| 585 | @end smallexample | ||
| 586 | |||
| 587 | @noindent | ||
| 588 | while in the European style this value is the default: | ||
| 589 | |||
| 590 | @smallexample | ||
| 591 | ((if dayname (concat dayname ", ")) day " " monthname " " year) | ||
| 592 | @end smallexample | ||
| 593 | |||
| 594 | @noindent | ||
| 595 | The ISO standard date representation is this: | ||
| 596 | |||
| 597 | @smallexample | ||
| 598 | (year "-" month "-" day) | ||
| 599 | @end smallexample | ||
| 600 | |||
| 601 | @noindent | ||
| 602 | This specifies a typical American format: | ||
| 603 | |||
| 604 | @smallexample | ||
| 605 | (month "/" day "/" (substring year -2)) | ||
| 606 | @end smallexample | ||
| 607 | |||
| 608 | @node Time Display Format | ||
| 609 | @section Time Display Format | ||
| 610 | @vindex calendar-time-display-form | ||
| 611 | |||
| 612 | The calendar and diary by default display times of day in the | ||
| 613 | conventional American style with the hours from 1 through 12, minutes, | ||
| 614 | and either @samp{am} or @samp{pm}. If you prefer the European style, | ||
| 615 | also known in the US as military, in which the hours go from 00 to 23, | ||
| 616 | you can alter the variable @code{calendar-time-display-form}. This | ||
| 617 | variable is a list of expressions that can involve the variables | ||
| 618 | @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all | ||
| 619 | numbers in string form, and @code{am-pm} and @code{time-zone}, which are | ||
| 620 | both alphabetic strings. The default value of | ||
| 621 | @code{calendar-time-display-form} is as follows: | ||
| 622 | |||
| 623 | @smallexample | ||
| 624 | (12-hours ":" minutes am-pm | ||
| 625 | (if time-zone " (") time-zone (if time-zone ")")) | ||
| 626 | @end smallexample | ||
| 627 | |||
| 628 | @noindent | ||
| 629 | Here is a value that provides European style times: | ||
| 630 | |||
| 631 | @smallexample | ||
| 632 | (24-hours ":" minutes | ||
| 633 | (if time-zone " (") time-zone (if time-zone ")")) | ||
| 634 | @end smallexample | ||
| 635 | |||
| 636 | @node Daylight Savings | ||
| 637 | @section Daylight Savings Time | ||
| 638 | @cindex daylight savings time | ||
| 639 | |||
| 640 | Emacs understands the difference between standard time and daylight | ||
| 641 | savings time---the times given for sunrise, sunset, solstices, | ||
| 642 | equinoxes, and the phases of the moon take that into account. The rules | ||
| 643 | for daylight savings time vary from place to place and have also varied | ||
| 644 | historically from year to year. To do the job properly, Emacs needs to | ||
| 645 | know which rules to use. | ||
| 646 | |||
| 647 | Some operating systems keep track of the rules that apply to the place | ||
| 648 | where you are; on these systems, Emacs gets the information it needs | ||
| 649 | from the system automatically. If some or all of this information is | ||
| 650 | missing, Emacs fills in the gaps with the rules currently used in | ||
| 651 | Cambridge, Massachusetts, which is the center of GNU's world. | ||
| 652 | |||
| 653 | |||
| 654 | @vindex calendar-daylight-savings-starts | ||
| 655 | @vindex calendar-daylight-savings-ends | ||
| 656 | If the default choice of rules is not appropriate for your location, | ||
| 657 | you can tell Emacs the rules to use by setting the variables | ||
| 658 | @code{calendar-daylight-savings-starts} and | ||
| 659 | @code{calendar-daylight-savings-ends}. Their values should be Lisp | ||
| 660 | expressions that refer to the variable @code{year}, and evaluate to the | ||
| 661 | Gregorian date on which daylight savings time starts or (respectively) | ||
| 662 | ends, in the form of a list @code{(@var{month} @var{day} @var{year})}. | ||
| 663 | The values should be @code{nil} if your area does not use daylight | ||
| 664 | savings time. | ||
| 665 | |||
| 666 | Emacs uses these expressions to determine the start and end dates of | ||
| 667 | daylight savings time as holidays and for correcting times of day in the | ||
| 668 | solar and lunar calculations. | ||
| 669 | |||
| 670 | The values for Cambridge, Massachusetts are as follows: | ||
| 671 | |||
| 672 | @example | ||
| 673 | @group | ||
| 674 | (calendar-nth-named-day 1 0 4 year) | ||
| 675 | (calendar-nth-named-day -1 0 10 year) | ||
| 676 | @end group | ||
| 677 | @end example | ||
| 678 | |||
| 679 | @noindent | ||
| 680 | i.e., the first 0th day (Sunday) of the fourth month (April) in | ||
| 681 | the year specified by @code{year}, and the last Sunday of the tenth month | ||
| 682 | (October) of that year. If daylight savings time were | ||
| 683 | changed to start on October 1, you would set | ||
| 684 | @code{calendar-daylight-savings-starts} to this: | ||
| 685 | |||
| 686 | @example | ||
| 687 | (list 10 1 year) | ||
| 688 | @end example | ||
| 689 | |||
| 690 | For a more complex example, suppose daylight savings time begins on | ||
| 691 | the first of Nisan on the Hebrew calendar. You should set | ||
| 692 | @code{calendar-daylight-savings-starts} to this value: | ||
| 693 | |||
| 694 | @example | ||
| 695 | (calendar-gregorian-from-absolute | ||
| 696 | (calendar-absolute-from-hebrew | ||
| 697 | (list 1 1 (+ year 3760)))) | ||
| 698 | @end example | ||
| 699 | |||
| 700 | @noindent | ||
| 701 | because Nisan is the first month in the Hebrew calendar and the Hebrew | ||
| 702 | year differs from the Gregorian year by 3760 at Nisan. | ||
| 703 | |||
| 704 | If there is no daylight savings time at your location, or if you want | ||
| 705 | all times in standard time, set @code{calendar-daylight-savings-starts} | ||
| 706 | and @code{calendar-daylight-savings-ends} to @code{nil}. | ||
| 707 | |||
| 708 | @vindex calendar-daylight-time-offset | ||
| 709 | The variable @code{calendar-daylight-time-offset} specifies the | ||
| 710 | difference between daylight savings time and standard time, measured in | ||
| 711 | minutes. The value for Cambridge is 60. | ||
| 712 | |||
| 713 | @vindex calendar-daylight-savings-starts-time | ||
| 714 | @vindex calendar-daylight-savings-ends-time | ||
| 715 | The variable @code{calendar-daylight-savings-starts-time} and the | ||
| 716 | variable @code{calendar-daylight-savings-ends-time} specify the number | ||
| 717 | of minutes after midnight local time when the transition to and from | ||
| 718 | daylight savings time should occur. For Cambridge, both variables' | ||
| 719 | values are 120. | ||
| 720 | |||
| 721 | @node Diary Customizing | ||
| 722 | @section Customizing the Diary | ||
| 723 | |||
| 724 | @vindex holidays-in-diary-buffer | ||
| 725 | Ordinarily, the mode line of the diary buffer window indicates any | ||
| 726 | holidays that fall on the date of the diary entries. The process of | ||
| 727 | checking for holidays can take several seconds, so including holiday | ||
| 728 | information delays the display of the diary buffer noticeably. If you'd | ||
| 729 | prefer to have a faster display of the diary buffer but without the | ||
| 730 | holiday information, set the variable @code{holidays-in-diary-buffer} to | ||
| 731 | @code{nil}.@refill | ||
| 732 | |||
| 733 | @vindex number-of-diary-entries | ||
| 734 | The variable @code{number-of-diary-entries} controls the number of | ||
| 735 | days of diary entries to be displayed at one time. It affects the | ||
| 736 | initial display when @code{view-diary-entries-initially} is @code{t}, as | ||
| 737 | well as the command @kbd{M-x diary}. For example, the default value is | ||
| 738 | 1, which says to display only the current day's diary entries. If the | ||
| 739 | value is 2, both the current day's and the next day's entries are | ||
| 740 | displayed. The value can also be a vector of seven elements: for | ||
| 741 | example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries | ||
| 742 | appear on Sunday, the current date's and the next day's diary entries | ||
| 743 | appear Monday through Thursday, Friday through Monday's entries appear | ||
| 744 | on Friday, while on Saturday only that day's entries appear. | ||
| 745 | |||
| 746 | @vindex print-diary-entries-hook | ||
| 747 | @findex print-diary-entries | ||
| 748 | The variable @code{print-diary-entries-hook} is a normal hook run | ||
| 749 | after preparation of a temporary buffer containing just the diary | ||
| 750 | entries currently visible in the diary buffer. (The other, irrelevant | ||
| 751 | diary entries are really absent from the temporary buffer; in the diary | ||
| 752 | buffer, they are merely hidden.) The default value of this hook does | ||
| 753 | the printing with the command @code{lpr-buffer}. If you want to use a | ||
| 754 | different command to do the printing, just change the value of this | ||
| 755 | hook. Other uses might include, for example, rearranging the lines into | ||
| 756 | order by day and time. | ||
| 757 | |||
| 758 | @vindex diary-date-forms | ||
| 759 | You can customize the form of dates in your diary file, if neither the | ||
| 760 | standard American nor European styles suits your needs, by setting the | ||
| 761 | variable @code{diary-date-forms}. This variable is a list of patterns | ||
| 762 | for recognizing a date. Each date pattern is a list whose elements may | ||
| 763 | be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs | ||
| 764 | Lisp Reference Manual}) or the symbols @code{month}, @code{day}, | ||
| 765 | @code{year}, @code{monthname}, and @code{dayname}. All these elements | ||
| 766 | serve as patterns that match certain kinds of text in the diary file. | ||
| 767 | In order for the date pattern, as a whole, to match, all of its elements | ||
| 768 | must match consecutively. | ||
| 769 | |||
| 770 | A regular expression in a date pattern matches in its usual fashion, | ||
| 771 | using the standard syntax table altered so that @samp{*} is a word | ||
| 772 | constituent. | ||
| 773 | |||
| 774 | The symbols @code{month}, @code{day}, @code{year}, @code{monthname}, | ||
| 775 | and @code{dayname} match the month number, day number, year number, | ||
| 776 | month name, and day name of the date being considered. The symbols that | ||
| 777 | match numbers allow leading zeros; those that match names allow | ||
| 778 | three-letter abbreviations and capitalization. All the symbols can | ||
| 779 | match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any | ||
| 780 | month'', and so on, it should match regardless of the date being | ||
| 781 | considered. | ||
| 782 | |||
| 783 | The default value of @code{diary-date-forms} in the American style is | ||
| 784 | this: | ||
| 785 | |||
| 786 | @example | ||
| 787 | ((month "/" day "[^/0-9]") | ||
| 788 | (month "/" day "/" year "[^0-9]") | ||
| 789 | (monthname " *" day "[^,0-9]") | ||
| 790 | (monthname " *" day ", *" year "[^0-9]") | ||
| 791 | (dayname "\\W")) | ||
| 792 | @end example | ||
| 793 | |||
| 794 | The date patterns in the list must be @emph{mutually exclusive} and | ||
| 795 | must not match any portion of the diary entry itself, just the date and | ||
| 796 | one character of whitespace. If, to be mutually exclusive, the pattern | ||
| 797 | must match a portion of the diary entry text---beyond the whitespace | ||
| 798 | that ends the date---then the first element of the date pattern | ||
| 799 | @emph{must} be @code{backup}. This causes the date recognizer to back | ||
| 800 | up to the beginning of the current word of the diary entry, after | ||
| 801 | finishing the match. Even if you use @code{backup}, the date pattern | ||
| 802 | must absolutely not match more than a portion of the first word of the | ||
| 803 | diary entry. The default value of @code{diary-date-forms} in the | ||
| 804 | European style is this list: | ||
| 805 | |||
| 806 | @example | ||
| 807 | ((day "/" month "[^/0-9]") | ||
| 808 | (day "/" month "/" year "[^0-9]") | ||
| 809 | (backup day " *" monthname "\\W+\\<[^*0-9]") | ||
| 810 | (day " *" monthname " *" year "[^0-9]") | ||
| 811 | (dayname "\\W")) | ||
| 812 | @end example | ||
| 813 | |||
| 814 | @noindent | ||
| 815 | Notice the use of @code{backup} in the third pattern, because it needs | ||
| 816 | to match part of a word beyond the date itself to distinguish it from | ||
| 817 | the fourth pattern. | ||
| 818 | |||
| 819 | @node Hebrew/Islamic Entries | ||
| 820 | @section Hebrew- and Islamic-Date Diary Entries | ||
| 821 | |||
| 822 | Your diary file can have entries based on Hebrew or Islamic dates, as | ||
| 823 | well as entries based on the world-standard Gregorian calendar. | ||
| 824 | However, because recognition of such entries is time-consuming and most | ||
| 825 | people don't use them, you must explicitly enable their use. If you | ||
| 826 | want the diary to recognize Hebrew-date diary entries, for example, | ||
| 827 | you must do this: | ||
| 828 | |||
| 829 | @vindex nongregorian-diary-listing-hook | ||
| 830 | @vindex nongregorian-diary-marking-hook | ||
| 831 | @findex list-hebrew-diary-entries | ||
| 832 | @findex mark-hebrew-diary-entries | ||
| 833 | @smallexample | ||
| 834 | (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries) | ||
| 835 | (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries) | ||
| 836 | @end smallexample | ||
| 837 | |||
| 838 | @noindent | ||
| 839 | If you want Islamic-date entries, do this: | ||
| 840 | |||
| 841 | @findex list-islamic-diary-entries | ||
| 842 | @findex mark-islamic-diary-entries | ||
| 843 | @smallexample | ||
| 844 | (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries) | ||
| 845 | (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries) | ||
| 846 | @end smallexample | ||
| 847 | |||
| 848 | Hebrew- and Islamic-date diary entries have the same formats as | ||
| 849 | Gregorian-date diary entries, except that @samp{H} precedes a Hebrew | ||
| 850 | date and @samp{I} precedes an Islamic date. Moreover, because the | ||
| 851 | Hebrew and Islamic month names are not uniquely specified by the first | ||
| 852 | three letters, you may not abbreviate them. For example, a diary entry | ||
| 853 | for the Hebrew date Heshvan 25 could look like this: | ||
| 854 | |||
| 855 | @smallexample | ||
| 856 | HHeshvan 25 Happy Hebrew birthday! | ||
| 857 | @end smallexample | ||
| 858 | |||
| 859 | @noindent | ||
| 860 | and would appear in the diary for any date that corresponds to Heshvan 25 | ||
| 861 | on the Hebrew calendar. And here is an Islamic-date diary entry that matches | ||
| 862 | Dhu al-Qada 25: | ||
| 863 | |||
| 864 | @smallexample | ||
| 865 | IDhu al-Qada 25 Happy Islamic birthday! | ||
| 866 | @end smallexample | ||
| 867 | |||
| 868 | As with Gregorian-date diary entries, Hebrew- and Islamic-date entries | ||
| 869 | are nonmarking if they are preceded with an ampersand (@samp{&}). | ||
| 870 | |||
| 871 | Here is a table of commands used in the calendar to create diary entries | ||
| 872 | that match the selected date and other dates that are similar in the Hebrew | ||
| 873 | or Islamic calendar: | ||
| 874 | |||
| 875 | @table @kbd | ||
| 876 | @item i h d | ||
| 877 | Add a diary entry for the Hebrew date corresponding to the selected date | ||
| 878 | (@code{insert-hebrew-diary-entry}). | ||
| 879 | @item i h m | ||
| 880 | Add a diary entry for the day of the Hebrew month corresponding to the | ||
| 881 | selected date (@code{insert-monthly-hebrew-diary-entry}). This diary | ||
| 882 | entry matches any date that has the same Hebrew day-within-month as the | ||
| 883 | selected date. | ||
| 884 | @item i h y | ||
| 885 | Add a diary entry for the day of the Hebrew year corresponding to the | ||
| 886 | selected date (@code{insert-yearly-hebrew-diary-entry}). This diary | ||
| 887 | entry matches any date which has the same Hebrew month and day-within-month | ||
| 888 | as the selected date. | ||
| 889 | @item i i d | ||
| 890 | Add a diary entry for the Islamic date corresponding to the selected date | ||
| 891 | (@code{insert-islamic-diary-entry}). | ||
| 892 | @item i i m | ||
| 893 | Add a diary entry for the day of the Islamic month corresponding to the | ||
| 894 | selected date (@code{insert-monthly-islamic-diary-entry}). | ||
| 895 | @item i i y | ||
| 896 | Add a diary entry for the day of the Islamic year corresponding to the | ||
| 897 | selected date (@code{insert-yearly-islamic-diary-entry}). | ||
| 898 | @end table | ||
| 899 | |||
| 900 | @findex insert-hebrew-diary-entry | ||
| 901 | @findex insert-monthly-hebrew-diary-entry | ||
| 902 | @findex insert-yearly-hebrew-diary-entry | ||
| 903 | @findex insert-islamic-diary-entry | ||
| 904 | @findex insert-monthly-islamic-diary-entry | ||
| 905 | @findex insert-yearly-islamic-diary-entry | ||
| 906 | These commands work much like the corresponding commands for ordinary | ||
| 907 | diary entries: they apply to the date that point is on in the calendar | ||
| 908 | window, and what they do is insert just the date portion of a diary entry | ||
| 909 | at the end of your diary file. You must then insert the rest of the | ||
| 910 | diary entry. | ||
| 911 | |||
| 912 | @node Fancy Diary Display | ||
| 913 | @section Fancy Diary Display | ||
| 914 | @vindex diary-display-hook | ||
| 915 | @findex simple-diary-display | ||
| 916 | |||
| 917 | Diary display works by preparing the diary buffer and then running the | ||
| 918 | hook @code{diary-display-hook}. The default value of this hook | ||
| 919 | (@code{simple-diary-display}) hides the irrelevant diary entries and | ||
| 920 | then displays the buffer. However, if you specify the hook as follows, | ||
| 921 | |||
| 922 | @cindex diary buffer | ||
| 923 | @findex fancy-diary-display | ||
| 924 | @example | ||
| 925 | (add-hook 'diary-display-hook 'fancy-diary-display) | ||
| 926 | @end example | ||
| 927 | |||
| 928 | @noindent | ||
| 929 | this enables fancy diary display. It displays diary entries and | ||
| 930 | holidays by copying them into a special buffer that exists only for the | ||
| 931 | sake of display. Copying to a separate buffer provides an opportunity | ||
| 932 | to change the displayed text to make it prettier---for example, to sort | ||
| 933 | the entries by the dates they apply to. | ||
| 934 | |||
| 935 | As with simple diary display, you can print a hard copy of the buffer | ||
| 936 | with @code{print-diary-entries}. To print a hard copy of a day-by-day | ||
| 937 | diary for a week, position point on Sunday of that week, type | ||
| 938 | @kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the | ||
| 939 | inclusion of the holidays slows down the display slightly; you can speed | ||
| 940 | things up by setting the variable @code{holidays-in-diary-buffer} to | ||
| 941 | @code{nil}. | ||
| 942 | |||
| 943 | @vindex diary-list-include-blanks | ||
| 944 | Ordinarily, the fancy diary buffer does not show days for which there are | ||
| 945 | no diary entries, even if that day is a holiday. If you want such days to be | ||
| 946 | shown in the fancy diary buffer, set the variable | ||
| 947 | @code{diary-list-include-blanks} to @code{t}.@refill | ||
| 948 | |||
| 949 | @cindex sorting diary entries | ||
| 950 | If you use the fancy diary display, you can use the normal hook | ||
| 951 | @code{list-diary-entries-hook} to sort each day's diary entries by their | ||
| 952 | time of day. Here's how: | ||
| 953 | |||
| 954 | @findex sort-diary-entries | ||
| 955 | @example | ||
| 956 | (add-hook 'list-diary-entries-hook 'sort-diary-entries t) | ||
| 957 | @end example | ||
| 958 | |||
| 959 | @noindent | ||
| 960 | For each day, this sorts diary entries that begin with a recognizable | ||
| 961 | time of day according to their times. Diary entries without times come | ||
| 962 | first within each day. | ||
| 963 | |||
| 964 | Fancy diary display also has the ability to process included diary | ||
| 965 | files. This permits a group of people to share a diary file for events | ||
| 966 | that apply to all of them. Lines in the diary file of this form: | ||
| 967 | |||
| 968 | @smallexample | ||
| 969 | #include "@var{filename}" | ||
| 970 | @end smallexample | ||
| 971 | |||
| 972 | @noindent | ||
| 973 | includes the diary entries from the file @var{filename} in the fancy | ||
| 974 | diary buffer. The include mechanism is recursive, so that included files | ||
| 975 | can include other files, and so on; you must be careful not to have a | ||
| 976 | cycle of inclusions, of course. Here is how to enable the include | ||
| 977 | facility: | ||
| 978 | |||
| 979 | @vindex list-diary-entries-hook | ||
| 980 | @vindex mark-diary-entries-hook | ||
| 981 | @findex include-other-diary-files | ||
| 982 | @findex mark-included-diary-files | ||
| 983 | @smallexample | ||
| 984 | (add-hook 'list-diary-entries-hook 'include-other-diary-files) | ||
| 985 | (add-hook 'mark-diary-entries-hook 'mark-included-diary-files) | ||
| 986 | @end smallexample | ||
| 987 | |||
| 988 | The include mechanism works only with the fancy diary display, because | ||
| 989 | ordinary diary display shows the entries directly from your diary file. | ||
| 990 | |||
| 991 | @node Sexp Diary Entries | ||
| 992 | @section Sexp Entries and the Fancy Diary Display | ||
| 993 | @cindex sexp diary entries | ||
| 994 | |||
| 995 | Sexp diary entries allow you to do more than just have complicated | ||
| 996 | conditions under which a diary entry applies. If you use the fancy | ||
| 997 | diary display, sexp entries can generate the text of the entry depending | ||
| 998 | on the date itself. For example, an anniversary diary entry can insert | ||
| 999 | the number of years since the anniversary date into the text of the | ||
| 1000 | diary entry. Thus the @samp{%d} in this dairy entry: | ||
| 1001 | |||
| 1002 | @findex diary-anniversary | ||
| 1003 | @smallexample | ||
| 1004 | %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old) | ||
| 1005 | @end smallexample | ||
| 1006 | |||
| 1007 | @noindent | ||
| 1008 | gets replaced by the age, so on October 31, 1990 the entry appears in | ||
| 1009 | the fancy diary buffer like this: | ||
| 1010 | |||
| 1011 | @smallexample | ||
| 1012 | Arthur's birthday (42 years old) | ||
| 1013 | @end smallexample | ||
| 1014 | |||
| 1015 | @noindent | ||
| 1016 | If the diary file instead contains this entry: | ||
| 1017 | |||
| 1018 | @smallexample | ||
| 1019 | %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday | ||
| 1020 | @end smallexample | ||
| 1021 | |||
| 1022 | @noindent | ||
| 1023 | the entry in the fancy diary buffer for October 31, 1990 appears like this: | ||
| 1024 | |||
| 1025 | @smallexample | ||
| 1026 | Arthur's 42nd birthday | ||
| 1027 | @end smallexample | ||
| 1028 | |||
| 1029 | Similarly, cyclic diary entries can interpolate the number of repetitions | ||
| 1030 | that have occurred: | ||
| 1031 | |||
| 1032 | @findex diary-cyclic | ||
| 1033 | @smallexample | ||
| 1034 | %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time) | ||
| 1035 | @end smallexample | ||
| 1036 | |||
| 1037 | @noindent | ||
| 1038 | looks like this: | ||
| 1039 | |||
| 1040 | @smallexample | ||
| 1041 | Renew medication (5th time) | ||
| 1042 | @end smallexample | ||
| 1043 | |||
| 1044 | @noindent | ||
| 1045 | in the fancy diary display on September 8, 1990. | ||
| 1046 | |||
| 1047 | There is an early reminder diary sexp that includes its entry in the | ||
| 1048 | diary not only on the date of occurrence, but also on earlier dates. | ||
| 1049 | For example, if you want a reminder a week before your anniversary, you | ||
| 1050 | can use | ||
| 1051 | |||
| 1052 | @findex diary-remind | ||
| 1053 | @smallexample | ||
| 1054 | %%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary | ||
| 1055 | @end smallexample | ||
| 1056 | |||
| 1057 | @noindent | ||
| 1058 | and the fancy diary will show | ||
| 1059 | @smallexample | ||
| 1060 | Ed's anniversary | ||
| 1061 | @end smallexample | ||
| 1062 | @noindent | ||
| 1063 | both on December 15 and on December 22. | ||
| 1064 | |||
| 1065 | @findex diary-date | ||
| 1066 | The function @code{diary-date} applies to dates described by a month, | ||
| 1067 | day, year combination, each of which can be an integer, a list of | ||
| 1068 | integers, or @code{t}. The value @code{t} means all values. For | ||
| 1069 | example, | ||
| 1070 | |||
| 1071 | @smallexample | ||
| 1072 | %%(diary-date '(10 11 12) 22 t) Rake leaves | ||
| 1073 | @end smallexample | ||
| 1074 | |||
| 1075 | @noindent | ||
| 1076 | causes the fancy diary to show | ||
| 1077 | |||
| 1078 | @smallexample | ||
| 1079 | Rake leaves | ||
| 1080 | @end smallexample | ||
| 1081 | |||
| 1082 | @noindent | ||
| 1083 | on October 22, November 22, and December 22 of every year. | ||
| 1084 | |||
| 1085 | @findex diary-float | ||
| 1086 | The function @code{diary-float} allows you to describe diary entries | ||
| 1087 | that apply to dates like the third Friday of November, or the last | ||
| 1088 | Tuesday in April. The parameters are the @var{month}, @var{dayname}, | ||
| 1089 | and an index @var{n}. The entry appears on the @var{n}th @var{dayname} | ||
| 1090 | of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and | ||
| 1091 | so on. If @var{n} is negative it counts backward from the end of | ||
| 1092 | @var{month}. The value of @var{month} can be a list of months, a single | ||
| 1093 | month, or @code{t} to specify all months. You can also use an optional | ||
| 1094 | parameter @var{day} to specify the @var{n}th @var{dayname} of | ||
| 1095 | @var{month} on or after/before @var{day}; the value of @var{day} defaults | ||
| 1096 | to 1 if @var{n} is positive and to the last day of @var{month} if | ||
| 1097 | @var{n} is negative. For example, | ||
| 1098 | |||
| 1099 | @smallexample | ||
| 1100 | %%(diary-float t 1 -1) Pay rent | ||
| 1101 | @end smallexample | ||
| 1102 | |||
| 1103 | @noindent | ||
| 1104 | causes the fancy diary to show | ||
| 1105 | |||
| 1106 | @smallexample | ||
| 1107 | Pay rent | ||
| 1108 | @end smallexample | ||
| 1109 | |||
| 1110 | @noindent | ||
| 1111 | on the last Monday of every month. | ||
| 1112 | |||
| 1113 | The generality of sexp diary entries lets you specify any diary | ||
| 1114 | entry that you can describe algorithmically. A sexp diary entry | ||
| 1115 | contains an expression that computes whether the entry applies to any | ||
| 1116 | given date. If its value is non-@code{nil}, the entry applies to that | ||
| 1117 | date; otherwise, it does not. The expression can use the variable | ||
| 1118 | @code{date} to find the date being considered; its value is a list | ||
| 1119 | (@var{month} @var{day} @var{year}) that refers to the Gregorian | ||
| 1120 | calendar. | ||
| 1121 | |||
| 1122 | The sexp diary entry applies to a date when the expression's value | ||
| 1123 | is non-@code{nil}, but some values have more specific meanings. If | ||
| 1124 | the value is a string, that string is a description of the event which | ||
| 1125 | occurs on that date. The value can also have the form | ||
| 1126 | @code{(@var{mark} . @var{string})}; then @var{mark} specifies how to | ||
| 1127 | mark the date in the calendar, and @var{string} is the description of | ||
| 1128 | the event. If @var{mark} is a single-character string, that character | ||
| 1129 | appears next to the date in the calendar. If @var{mark} is a face | ||
| 1130 | name, the date is displayed in that face. If @var{mark} is | ||
| 1131 | @code{nil}, that specifies no particular highlighting for the date. | ||
| 1132 | |||
| 1133 | Suppose you get paid on the 21st of the month if it is a weekday, and | ||
| 1134 | on the Friday before if the 21st is on a weekend. Here is how to write | ||
| 1135 | a sexp diary entry that matches those dates: | ||
| 1136 | |||
| 1137 | @smallexample | ||
| 1138 | &%%(let ((dayname (calendar-day-of-week date)) | ||
| 1139 | (day (car (cdr date)))) | ||
| 1140 | (or (and (= day 21) (memq dayname '(1 2 3 4 5))) | ||
| 1141 | (and (memq day '(19 20)) (= dayname 5))) | ||
| 1142 | ) Pay check deposited | ||
| 1143 | @end smallexample | ||
| 1144 | |||
| 1145 | The following sexp diary entries take advantage of the ability (in the fancy | ||
| 1146 | diary display) to concoct diary entries whose text varies based on the date: | ||
| 1147 | |||
| 1148 | @findex diary-sunrise-sunset | ||
| 1149 | @findex diary-phases-of-moon | ||
| 1150 | @findex diary-day-of-year | ||
| 1151 | @findex diary-iso-date | ||
| 1152 | @findex diary-julian-date | ||
| 1153 | @findex diary-astro-day-number | ||
| 1154 | @findex diary-hebrew-date | ||
| 1155 | @findex diary-islamic-date | ||
| 1156 | @findex diary-french-date | ||
| 1157 | @findex diary-mayan-date | ||
| 1158 | @table @code | ||
| 1159 | @item %%(diary-sunrise-sunset) | ||
| 1160 | Make a diary entry for the local times of today's sunrise and sunset. | ||
| 1161 | @item %%(diary-phases-of-moon) | ||
| 1162 | Make a diary entry for the phases (quarters) of the moon. | ||
| 1163 | @item %%(diary-day-of-year) | ||
| 1164 | Make a diary entry with today's day number in the current year and the number | ||
| 1165 | of days remaining in the current year. | ||
| 1166 | @item %%(diary-iso-date) | ||
| 1167 | Make a diary entry with today's equivalent ISO commercial date. | ||
| 1168 | @item %%(diary-julian-date) | ||
| 1169 | Make a diary entry with today's equivalent date on the Julian calendar. | ||
| 1170 | @item %%(diary-astro-day-number) | ||
| 1171 | Make a diary entry with today's equivalent astronomical (Julian) day number. | ||
| 1172 | @item %%(diary-hebrew-date) | ||
| 1173 | Make a diary entry with today's equivalent date on the Hebrew calendar. | ||
| 1174 | @item %%(diary-islamic-date) | ||
| 1175 | Make a diary entry with today's equivalent date on the Islamic calendar. | ||
| 1176 | @item %%(diary-french-date) | ||
| 1177 | Make a diary entry with today's equivalent date on the French Revolutionary | ||
| 1178 | calendar. | ||
| 1179 | @item %%(diary-mayan-date) | ||
| 1180 | Make a diary entry with today's equivalent date on the Mayan calendar. | ||
| 1181 | @end table | ||
| 1182 | |||
| 1183 | @noindent | ||
| 1184 | Thus including the diary entry | ||
| 1185 | |||
| 1186 | @example | ||
| 1187 | &%%(diary-hebrew-date) | ||
| 1188 | @end example | ||
| 1189 | |||
| 1190 | @noindent | ||
| 1191 | causes every day's diary display to contain the equivalent date on the | ||
| 1192 | Hebrew calendar, if you are using the fancy diary display. (With simple | ||
| 1193 | diary display, the line @samp{&%%(diary-hebrew-date)} appears in the | ||
| 1194 | diary for any date, but does nothing particularly useful.) | ||
| 1195 | |||
| 1196 | These functions can be used to construct sexp diary entries based on | ||
| 1197 | the Hebrew calendar in certain standard ways: | ||
| 1198 | |||
| 1199 | @cindex rosh hodesh | ||
| 1200 | @findex diary-rosh-hodesh | ||
| 1201 | @cindex parasha, weekly | ||
| 1202 | @findex diary-parasha | ||
| 1203 | @cindex candle lighting times | ||
| 1204 | @findex diary-sabbath-candles | ||
| 1205 | @cindex omer count | ||
| 1206 | @findex diary-omer | ||
| 1207 | @cindex yahrzeits | ||
| 1208 | @findex diary-yahrzeit | ||
| 1209 | @table @code | ||
| 1210 | @item %%(diary-rosh-hodesh) | ||
| 1211 | Make a diary entry that tells the occurrence and ritual announcement of each | ||
| 1212 | new Hebrew month. | ||
| 1213 | @item %%(diary-parasha) | ||
| 1214 | Make a Saturday diary entry that tells the weekly synagogue scripture reading. | ||
| 1215 | @item %%(diary-sabbath-candles) | ||
| 1216 | Make a Friday diary entry that tells the @emph{local time} of Sabbath | ||
| 1217 | candle lighting. | ||
| 1218 | @item %%(diary-omer) | ||
| 1219 | Make a diary entry that gives the omer count, when appropriate. | ||
| 1220 | @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name} | ||
| 1221 | Make a diary entry marking the anniversary of a date of death. The date | ||
| 1222 | is the @emph{Gregorian} (civil) date of death. The diary entry appears | ||
| 1223 | on the proper Hebrew calendar anniversary and on the day before. (In | ||
| 1224 | the European style, the order of the parameters is changed to @var{day}, | ||
| 1225 | @var{month}, @var{year}.) | ||
| 1226 | @end table | ||
| 1227 | |||
| 1228 | All the functions documented above take an optional argument | ||
| 1229 | @var{mark} which specifies how to mark the date in the calendar display. | ||
| 1230 | If one of these functions decides that it applies to a certain date, | ||
| 1231 | it returns a value that contains @var{mark}. | ||
| 1232 | |||
| 1233 | @node Emerge | ||
| 1234 | @chapter Merging Files with Emerge | ||
| 1235 | @cindex Emerge | ||
| 1236 | @cindex merging files | ||
| 1237 | |||
| 1238 | It's not unusual for programmers to get their signals crossed and | ||
| 1239 | modify the same program in two different directions. To recover from | ||
| 1240 | this confusion, you need to merge the two versions. Emerge makes this | ||
| 1241 | easier. For other ways to compare files, see @ref{Comparing Files,,, | ||
| 1242 | emacs, the Emacs Manual} and @ref{Top, Ediff,, ediff, The Ediff | ||
| 1243 | Manual}. | ||
| 1244 | |||
| 1245 | @menu | ||
| 1246 | * Overview of Emerge:: How to start Emerge. Basic concepts. | ||
| 1247 | * Submodes of Emerge:: Fast mode vs. Edit mode. | ||
| 1248 | Skip Prefers mode and Auto Advance mode. | ||
| 1249 | * State of Difference:: You do the merge by specifying state A or B | ||
| 1250 | for each difference. | ||
| 1251 | * Merge Commands:: Commands for selecting a difference, | ||
| 1252 | changing states of differences, etc. | ||
| 1253 | * Exiting Emerge:: What to do when you've finished the merge. | ||
| 1254 | * Combining in Emerge:: How to keep both alternatives for a difference. | ||
| 1255 | * Fine Points of Emerge:: Misc. | ||
| 1256 | @end menu | ||
| 1257 | |||
| 1258 | @node Overview of Emerge | ||
| 1259 | @section Overview of Emerge | ||
| 1260 | |||
| 1261 | To start Emerge, run one of these four commands: | ||
| 1262 | |||
| 1263 | @table @kbd | ||
| 1264 | @item M-x emerge-files | ||
| 1265 | @findex emerge-files | ||
| 1266 | Merge two specified files. | ||
| 1267 | |||
| 1268 | @item M-x emerge-files-with-ancestor | ||
| 1269 | @findex emerge-files-with-ancestor | ||
| 1270 | Merge two specified files, with reference to a common ancestor. | ||
| 1271 | |||
| 1272 | @item M-x emerge-buffers | ||
| 1273 | @findex emerge-buffers | ||
| 1274 | Merge two buffers. | ||
| 1275 | |||
| 1276 | @item M-x emerge-buffers-with-ancestor | ||
| 1277 | @findex emerge-buffers-with-ancestor | ||
| 1278 | Merge two buffers with reference to a common ancestor in a third | ||
| 1279 | buffer. | ||
| 1280 | @end table | ||
| 1281 | |||
| 1282 | @cindex merge buffer (Emerge) | ||
| 1283 | @cindex A and B buffers (Emerge) | ||
| 1284 | The Emerge commands compare two files or buffers, and display the | ||
| 1285 | comparison in three buffers: one for each input text (the @dfn{A buffer} | ||
| 1286 | and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging | ||
| 1287 | takes place. The merge buffer shows the full merged text, not just the | ||
| 1288 | differences. Wherever the two input texts differ, you can choose which | ||
| 1289 | one of them to include in the merge buffer. | ||
| 1290 | |||
| 1291 | The Emerge commands that take input from existing buffers use only | ||
| 1292 | the accessible portions of those buffers, if they are narrowed. | ||
| 1293 | @xref{Narrowing,,, emacs, the Emacs Manual}. | ||
| 1294 | |||
| 1295 | |||
| 1296 | If a common ancestor version is available, from which the two texts to | ||
| 1297 | be merged were both derived, Emerge can use it to guess which | ||
| 1298 | alternative is right. Wherever one current version agrees with the | ||
| 1299 | ancestor, Emerge presumes that the other current version is a deliberate | ||
| 1300 | change which should be kept in the merged version. Use the | ||
| 1301 | @samp{with-ancestor} commands if you want to specify a common ancestor | ||
| 1302 | text. These commands read three file or buffer names---variant A, | ||
| 1303 | variant B, and the common ancestor. | ||
| 1304 | |||
| 1305 | After the comparison is done and the buffers are prepared, the | ||
| 1306 | interactive merging starts. You control the merging by typing special | ||
| 1307 | @dfn{merge commands} in the merge buffer (@pxref{Merge Commands}). | ||
| 1308 | For each run of differences between the input texts, you can choose | ||
| 1309 | which one of them to keep, or edit them both together. | ||
| 1310 | |||
| 1311 | The merge buffer uses a special major mode, Emerge mode, with commands | ||
| 1312 | for making these choices. But you can also edit the buffer with | ||
| 1313 | ordinary Emacs commands. | ||
| 1314 | |||
| 1315 | At any given time, the attention of Emerge is focused on one | ||
| 1316 | particular difference, called the @dfn{selected} difference. This | ||
| 1317 | difference is marked off in the three buffers like this: | ||
| 1318 | |||
| 1319 | @example | ||
| 1320 | vvvvvvvvvvvvvvvvvvvv | ||
| 1321 | @var{text that differs} | ||
| 1322 | ^^^^^^^^^^^^^^^^^^^^ | ||
| 1323 | @end example | ||
| 1324 | |||
| 1325 | @noindent | ||
| 1326 | Emerge numbers all the differences sequentially and the mode | ||
| 1327 | line always shows the number of the selected difference. | ||
| 1328 | |||
| 1329 | Normally, the merge buffer starts out with the A version of the text. | ||
| 1330 | But when the A version of a difference agrees with the common ancestor, | ||
| 1331 | then the B version is initially preferred for that difference. | ||
| 1332 | |||
| 1333 | Emerge leaves the merged text in the merge buffer when you exit. At | ||
| 1334 | that point, you can save it in a file with @kbd{C-x C-w}. If you give a | ||
| 1335 | numeric argument to @code{emerge-files} or | ||
| 1336 | @code{emerge-files-with-ancestor}, it reads the name of the output file | ||
| 1337 | using the minibuffer. (This is the last file name those commands read.) | ||
| 1338 | Then exiting from Emerge saves the merged text in the output file. | ||
| 1339 | |||
| 1340 | Normally, Emerge commands save the output buffer in its file when you | ||
| 1341 | exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not | ||
| 1342 | save the output buffer, but you can save it yourself if you wish. | ||
| 1343 | |||
| 1344 | @node Submodes of Emerge | ||
| 1345 | @section Submodes of Emerge | ||
| 1346 | |||
| 1347 | You can choose between two modes for giving merge commands: Fast mode | ||
| 1348 | and Edit mode. In Fast mode, basic merge commands are single | ||
| 1349 | characters, but ordinary Emacs commands are disabled. This is | ||
| 1350 | convenient if you use only merge commands. In Edit mode, all merge | ||
| 1351 | commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs | ||
| 1352 | commands are also available. This allows editing the merge buffer, but | ||
| 1353 | slows down Emerge operations. | ||
| 1354 | |||
| 1355 | Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to | ||
| 1356 | Fast mode. The mode line indicates Edit and Fast modes with @samp{E} | ||
| 1357 | and @samp{F}. | ||
| 1358 | |||
| 1359 | Emerge has two additional submodes that affect how particular merge | ||
| 1360 | commands work: Auto Advance mode and Skip Prefers mode. | ||
| 1361 | |||
| 1362 | If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands | ||
| 1363 | advance to the next difference. This lets you go through the merge | ||
| 1364 | faster as long as you simply choose one of the alternatives from the | ||
| 1365 | input. The mode line indicates Auto Advance mode with @samp{A}. | ||
| 1366 | |||
| 1367 | If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands | ||
| 1368 | skip over differences in states prefer-A and prefer-B (@pxref{State of | ||
| 1369 | Difference}). Thus you see only differences for which neither version | ||
| 1370 | is presumed ``correct.'' The mode line indicates Skip Prefers mode with | ||
| 1371 | @samp{S}. | ||
| 1372 | |||
| 1373 | @findex emerge-auto-advance-mode | ||
| 1374 | @findex emerge-skip-prefers-mode | ||
| 1375 | Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or | ||
| 1376 | clear Auto Advance mode. Use @kbd{s s} | ||
| 1377 | (@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode. | ||
| 1378 | These commands turn on the mode with a positive argument, turns it off | ||
| 1379 | with a negative or zero argument, and toggle the mode with no argument. | ||
| 1380 | |||
| 1381 | @node State of Difference | ||
| 1382 | @section State of a Difference | ||
| 1383 | |||
| 1384 | In the merge buffer, a difference is marked with lines of @samp{v} and | ||
| 1385 | @samp{^} characters. Each difference has one of these seven states: | ||
| 1386 | |||
| 1387 | @table @asis | ||
| 1388 | @item A | ||
| 1389 | The difference is showing the A version. The @kbd{a} command always | ||
| 1390 | produces this state; the mode line indicates it with @samp{A}. | ||
| 1391 | |||
| 1392 | @item B | ||
| 1393 | The difference is showing the B version. The @kbd{b} command always | ||
| 1394 | produces this state; the mode line indicates it with @samp{B}. | ||
| 1395 | |||
| 1396 | @item default-A | ||
| 1397 | @itemx default-B | ||
| 1398 | The difference is showing the A or the B state by default, because you | ||
| 1399 | haven't made a choice. All differences start in the default-A state | ||
| 1400 | (and thus the merge buffer is a copy of the A buffer), except those for | ||
| 1401 | which one alternative is ``preferred'' (see below). | ||
| 1402 | |||
| 1403 | When you select a difference, its state changes from default-A or | ||
| 1404 | default-B to plain A or B. Thus, the selected difference never has | ||
| 1405 | state default-A or default-B, and these states are never displayed in | ||
| 1406 | the mode line. | ||
| 1407 | |||
| 1408 | The command @kbd{d a} chooses default-A as the default state, and @kbd{d | ||
| 1409 | b} chooses default-B. This chosen default applies to all differences | ||
| 1410 | which you haven't ever selected and for which no alternative is preferred. | ||
| 1411 | If you are moving through the merge sequentially, the differences you | ||
| 1412 | haven't selected are those following the selected one. Thus, while | ||
| 1413 | moving sequentially, you can effectively make the A version the default | ||
| 1414 | for some sections of the merge buffer and the B version the default for | ||
| 1415 | others by using @kbd{d a} and @kbd{d b} between sections. | ||
| 1416 | |||
| 1417 | @item prefer-A | ||
| 1418 | @itemx prefer-B | ||
| 1419 | The difference is showing the A or B state because it is | ||
| 1420 | @dfn{preferred}. This means that you haven't made an explicit choice, | ||
| 1421 | but one alternative seems likely to be right because the other | ||
| 1422 | alternative agrees with the common ancestor. Thus, where the A buffer | ||
| 1423 | agrees with the common ancestor, the B version is preferred, because | ||
| 1424 | chances are it is the one that was actually changed. | ||
| 1425 | |||
| 1426 | These two states are displayed in the mode line as @samp{A*} and @samp{B*}. | ||
| 1427 | |||
| 1428 | @item combined | ||
| 1429 | The difference is showing a combination of the A and B states, as a | ||
| 1430 | result of the @kbd{x c} or @kbd{x C} commands. | ||
| 1431 | |||
| 1432 | Once a difference is in this state, the @kbd{a} and @kbd{b} commands | ||
| 1433 | don't do anything to it unless you give them a numeric argument. | ||
| 1434 | |||
| 1435 | The mode line displays this state as @samp{comb}. | ||
| 1436 | @end table | ||
| 1437 | |||
| 1438 | @node Merge Commands | ||
| 1439 | @section Merge Commands | ||
| 1440 | |||
| 1441 | Here are the Merge commands for Fast mode; in Edit mode, precede them | ||
| 1442 | with @kbd{C-c C-c}: | ||
| 1443 | |||
| 1444 | @table @kbd | ||
| 1445 | @item p | ||
| 1446 | Select the previous difference. | ||
| 1447 | |||
| 1448 | @item n | ||
| 1449 | Select the next difference. | ||
| 1450 | |||
| 1451 | @item a | ||
| 1452 | Choose the A version of this difference. | ||
| 1453 | |||
| 1454 | @item b | ||
| 1455 | Choose the B version of this difference. | ||
| 1456 | |||
| 1457 | @item C-u @var{n} j | ||
| 1458 | Select difference number @var{n}. | ||
| 1459 | |||
| 1460 | @item . | ||
| 1461 | Select the difference containing point. You can use this command in the | ||
| 1462 | merge buffer or in the A or B buffer. | ||
| 1463 | |||
| 1464 | @item q | ||
| 1465 | Quit---finish the merge. | ||
| 1466 | |||
| 1467 | @item C-] | ||
| 1468 | Abort---exit merging and do not save the output. | ||
| 1469 | |||
| 1470 | @item f | ||
| 1471 | Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.) | ||
| 1472 | |||
| 1473 | @item e | ||
| 1474 | Go into Edit mode. | ||
| 1475 | |||
| 1476 | @item l | ||
| 1477 | Recenter (like @kbd{C-l}) all three windows. | ||
| 1478 | |||
| 1479 | @item - | ||
| 1480 | Specify part of a prefix numeric argument. | ||
| 1481 | |||
| 1482 | @item @var{digit} | ||
| 1483 | Also specify part of a prefix numeric argument. | ||
| 1484 | |||
| 1485 | @item d a | ||
| 1486 | Choose the A version as the default from here down in | ||
| 1487 | the merge buffer. | ||
| 1488 | |||
| 1489 | @item d b | ||
| 1490 | Choose the B version as the default from here down in | ||
| 1491 | the merge buffer. | ||
| 1492 | |||
| 1493 | @item c a | ||
| 1494 | Copy the A version of this difference into the kill ring. | ||
| 1495 | |||
| 1496 | @item c b | ||
| 1497 | Copy the B version of this difference into the kill ring. | ||
| 1498 | |||
| 1499 | @item i a | ||
| 1500 | Insert the A version of this difference at point. | ||
| 1501 | |||
| 1502 | @item i b | ||
| 1503 | Insert the B version of this difference at point. | ||
| 1504 | |||
| 1505 | @item m | ||
| 1506 | Put point and mark around the difference. | ||
| 1507 | |||
| 1508 | @item ^ | ||
| 1509 | Scroll all three windows down (like @kbd{M-v}). | ||
| 1510 | |||
| 1511 | @item v | ||
| 1512 | Scroll all three windows up (like @kbd{C-v}). | ||
| 1513 | |||
| 1514 | @item < | ||
| 1515 | Scroll all three windows left (like @kbd{C-x <}). | ||
| 1516 | |||
| 1517 | @item > | ||
| 1518 | Scroll all three windows right (like @kbd{C-x >}). | ||
| 1519 | |||
| 1520 | @item | | ||
| 1521 | Reset horizontal scroll on all three windows. | ||
| 1522 | |||
| 1523 | @item x 1 | ||
| 1524 | Shrink the merge window to one line. (Use @kbd{C-u l} to restore it | ||
| 1525 | to full size.) | ||
| 1526 | |||
| 1527 | @item x c | ||
| 1528 | Combine the two versions of this difference (@pxref{Combining in | ||
| 1529 | Emerge}). | ||
| 1530 | |||
| 1531 | @item x f | ||
| 1532 | Show the names of the files/buffers Emerge is operating on, in a Help | ||
| 1533 | window. (Use @kbd{C-u l} to restore windows.) | ||
| 1534 | |||
| 1535 | @item x j | ||
| 1536 | Join this difference with the following one. | ||
| 1537 | (@kbd{C-u x j} joins this difference with the previous one.) | ||
| 1538 | |||
| 1539 | @item x s | ||
| 1540 | Split this difference into two differences. Before you use this | ||
| 1541 | command, position point in each of the three buffers at the place where | ||
| 1542 | you want to split the difference. | ||
| 1543 | |||
| 1544 | @item x t | ||
| 1545 | Trim identical lines off the top and bottom of the difference. | ||
| 1546 | Such lines occur when the A and B versions are | ||
| 1547 | identical but differ from the ancestor version. | ||
| 1548 | @end table | ||
| 1549 | |||
| 1550 | @node Exiting Emerge | ||
| 1551 | @section Exiting Emerge | ||
| 1552 | |||
| 1553 | The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing | ||
| 1554 | the results into the output file if you specified one. It restores the | ||
| 1555 | A and B buffers to their proper contents, or kills them if they were | ||
| 1556 | created by Emerge and you haven't changed them. It also disables the | ||
| 1557 | Emerge commands in the merge buffer, since executing them later could | ||
| 1558 | damage the contents of the various buffers. | ||
| 1559 | |||
| 1560 | @kbd{C-]} aborts the merge. This means exiting without writing the | ||
| 1561 | output file. If you didn't specify an output file, then there is no | ||
| 1562 | real difference between aborting and finishing the merge. | ||
| 1563 | |||
| 1564 | If the Emerge command was called from another Lisp program, then its | ||
| 1565 | return value is @code{t} for successful completion, or @code{nil} if you | ||
| 1566 | abort. | ||
| 1567 | |||
| 1568 | @node Combining in Emerge | ||
| 1569 | @section Combining the Two Versions | ||
| 1570 | |||
| 1571 | Sometimes you want to keep @emph{both} alternatives for a particular | ||
| 1572 | difference. To do this, use @kbd{x c}, which edits the merge buffer | ||
| 1573 | like this: | ||
| 1574 | |||
| 1575 | @example | ||
| 1576 | @group | ||
| 1577 | #ifdef NEW | ||
| 1578 | @var{version from A buffer} | ||
| 1579 | #else /* not NEW */ | ||
| 1580 | @var{version from B buffer} | ||
| 1581 | #endif /* not NEW */ | ||
| 1582 | @end group | ||
| 1583 | @end example | ||
| 1584 | |||
| 1585 | @noindent | ||
| 1586 | @vindex emerge-combine-versions-template | ||
| 1587 | While this example shows C preprocessor conditionals delimiting the two | ||
| 1588 | alternative versions, you can specify the strings to use by setting | ||
| 1589 | the variable @code{emerge-combine-versions-template} to a string of your | ||
| 1590 | choice. In the string, @samp{%a} says where to put version A, and | ||
| 1591 | @samp{%b} says where to put version B. The default setting, which | ||
| 1592 | produces the results shown above, looks like this: | ||
| 1593 | |||
| 1594 | @example | ||
| 1595 | @group | ||
| 1596 | "#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n" | ||
| 1597 | @end group | ||
| 1598 | @end example | ||
| 1599 | |||
| 1600 | @node Fine Points of Emerge | ||
| 1601 | @section Fine Points of Emerge | ||
| 1602 | |||
| 1603 | During the merge, you mustn't try to edit the A and B buffers yourself. | ||
| 1604 | Emerge modifies them temporarily, but ultimately puts them back the way | ||
| 1605 | they were. | ||
| 1606 | |||
| 1607 | You can have any number of merges going at once---just don't use any one | ||
| 1608 | buffer as input to more than one merge at once, since the temporary | ||
| 1609 | changes made in these buffers would get in each other's way. | ||
| 1610 | |||
| 1611 | Starting Emerge can take a long time because it needs to compare the | ||
| 1612 | files fully. Emacs can't do anything else until @code{diff} finishes. | ||
| 1613 | Perhaps in the future someone will change Emerge to do the comparison in | ||
| 1614 | the background when the input files are large---then you could keep on | ||
| 1615 | doing other things with Emacs until Emerge is ready to accept | ||
| 1616 | commands. | ||
| 1617 | |||
| 1618 | @vindex emerge-startup-hook | ||
| 1619 | After setting up the merge, Emerge runs the hook | ||
| 1620 | @code{emerge-startup-hook}. @xref{Hooks,,, emacs, the Emacs Manual}. | ||
| 1621 | |||
| 1622 | @node Picture Mode | ||
| 1623 | @chapter Editing Pictures | ||
| 1624 | @cindex pictures | ||
| 1625 | @cindex making pictures out of text characters | ||
| 1626 | @findex edit-picture | ||
| 1627 | |||
| 1628 | To edit a picture made out of text characters (for example, a picture | ||
| 1629 | of the division of a register into fields, as a comment in a program), | ||
| 1630 | use the command @kbd{M-x edit-picture} to enter Picture mode. | ||
| 1631 | |||
| 1632 | In Picture mode, editing is based on the @dfn{quarter-plane} model of | ||
| 1633 | text, according to which the text characters lie studded on an area that | ||
| 1634 | stretches infinitely far to the right and downward. The concept of the end | ||
| 1635 | of a line does not exist in this model; the most you can say is where the | ||
| 1636 | last nonblank character on the line is found. | ||
| 1637 | |||
| 1638 | Of course, Emacs really always considers text as a sequence of | ||
| 1639 | characters, and lines really do have ends. But Picture mode replaces | ||
| 1640 | the most frequently-used commands with variants that simulate the | ||
| 1641 | quarter-plane model of text. They do this by inserting spaces or by | ||
| 1642 | converting tabs to spaces. | ||
| 1643 | |||
| 1644 | Most of the basic editing commands of Emacs are redefined by Picture mode | ||
| 1645 | to do essentially the same thing but in a quarter-plane way. In addition, | ||
| 1646 | Picture mode defines various keys starting with the @kbd{C-c} prefix to | ||
| 1647 | run special picture editing commands. | ||
| 1648 | |||
| 1649 | One of these keys, @kbd{C-c C-c}, is particularly important. Often a | ||
| 1650 | picture is part of a larger file that is usually edited in some other | ||
| 1651 | major mode. @kbd{M-x edit-picture} records the name of the previous | ||
| 1652 | major mode so you can use the @kbd{C-c C-c} command | ||
| 1653 | (@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c} | ||
| 1654 | also deletes spaces from the ends of lines, unless given a numeric | ||
| 1655 | argument. | ||
| 1656 | |||
| 1657 | The special commands of Picture mode all work in other modes (provided | ||
| 1658 | the @file{picture} library is loaded), but are not bound to keys except | ||
| 1659 | in Picture mode. The descriptions below talk of moving ``one column'' | ||
| 1660 | and so on, but all the picture mode commands handle numeric arguments as | ||
| 1661 | their normal equivalents do. | ||
| 1662 | |||
| 1663 | @vindex picture-mode-hook | ||
| 1664 | Turning on Picture mode runs the hook @code{picture-mode-hook}. | ||
| 1665 | Additional extensions to Picture mode can be found in | ||
| 1666 | @file{artist.el}. | ||
| 1667 | |||
| 1668 | @menu | ||
| 1669 | * Basic Picture:: Basic concepts and simple commands of Picture Mode. | ||
| 1670 | * Insert in Picture:: Controlling direction of cursor motion | ||
| 1671 | after "self-inserting" characters. | ||
| 1672 | * Tabs in Picture:: Various features for tab stops and indentation. | ||
| 1673 | * Rectangles in Picture:: Clearing and superimposing rectangles. | ||
| 1674 | @end menu | ||
| 1675 | |||
| 1676 | @node Basic Picture | ||
| 1677 | @section Basic Editing in Picture Mode | ||
| 1678 | |||
| 1679 | @findex picture-forward-column | ||
| 1680 | @findex picture-backward-column | ||
| 1681 | @findex picture-move-down | ||
| 1682 | @findex picture-move-up | ||
| 1683 | @cindex editing in Picture mode | ||
| 1684 | |||
| 1685 | Most keys do the same thing in Picture mode that they usually do, but | ||
| 1686 | do it in a quarter-plane style. For example, @kbd{C-f} is rebound to | ||
| 1687 | run @code{picture-forward-column}, a command which moves point one | ||
| 1688 | column to the right, inserting a space if necessary so that the actual | ||
| 1689 | end of the line makes no difference. @kbd{C-b} is rebound to run | ||
| 1690 | @code{picture-backward-column}, which always moves point left one | ||
| 1691 | column, converting a tab to multiple spaces if necessary. @kbd{C-n} and | ||
| 1692 | @kbd{C-p} are rebound to run @code{picture-move-down} and | ||
| 1693 | @code{picture-move-up}, which can either insert spaces or convert tabs | ||
| 1694 | as necessary to make sure that point stays in exactly the same column. | ||
| 1695 | @kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last | ||
| 1696 | nonblank character on the line. There is no need to change @kbd{C-a}, | ||
| 1697 | as the choice of screen model does not affect beginnings of | ||
| 1698 | lines. | ||
| 1699 | |||
| 1700 | @findex picture-newline | ||
| 1701 | Insertion of text is adapted to the quarter-plane screen model | ||
| 1702 | through the use of Overwrite mode (@pxref{Minor Modes,,, emacs, the | ||
| 1703 | Emacs Manual}.) Self-inserting characters replace existing text, | ||
| 1704 | column by column, rather than pushing existing text to the right. | ||
| 1705 | @key{RET} runs @code{picture-newline}, which just moves to the | ||
| 1706 | beginning of the following line so that new text will replace that | ||
| 1707 | line. | ||
| 1708 | |||
| 1709 | @findex picture-backward-clear-column | ||
| 1710 | @findex picture-clear-column | ||
| 1711 | @findex picture-clear-line | ||
| 1712 | In Picture mode, the commands that normally delete or kill text, | ||
| 1713 | instead erase text (replacing it with spaces). @key{DEL} | ||
| 1714 | (@code{picture-backward-clear-column}) replaces the preceding | ||
| 1715 | character with a space rather than removing it; this moves point | ||
| 1716 | backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next | ||
| 1717 | character or characters with spaces, but does not move point. (If you | ||
| 1718 | want to clear characters to spaces and move forward over them, use | ||
| 1719 | @key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the | ||
| 1720 | contents of lines, but does not delete the newlines from the buffer. | ||
| 1721 | |||
| 1722 | @findex picture-open-line | ||
| 1723 | To do actual insertion, you must use special commands. @kbd{C-o} | ||
| 1724 | (@code{picture-open-line}) creates a blank line after the current | ||
| 1725 | line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes | ||
| 1726 | sense in Picture mode, so it is not changed. @kbd{C-j} | ||
| 1727 | (@code{picture-duplicate-line}) inserts another line with the same | ||
| 1728 | contents below the current line. | ||
| 1729 | |||
| 1730 | @kindex C-c C-d @r{(Picture mode)} | ||
| 1731 | To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d} | ||
| 1732 | (which is defined as @code{delete-char}, as @kbd{C-d} is in other | ||
| 1733 | modes), or one of the picture rectangle commands (@pxref{Rectangles in | ||
| 1734 | Picture}). | ||
| 1735 | |||
| 1736 | @node Insert in Picture | ||
| 1737 | @section Controlling Motion after Insert | ||
| 1738 | |||
| 1739 | @findex picture-movement-up | ||
| 1740 | @findex picture-movement-down | ||
| 1741 | @findex picture-movement-left | ||
| 1742 | @findex picture-movement-right | ||
| 1743 | @findex picture-movement-nw | ||
| 1744 | @findex picture-movement-ne | ||
| 1745 | @findex picture-movement-sw | ||
| 1746 | @findex picture-movement-se | ||
| 1747 | @kindex C-c < @r{(Picture mode)} | ||
| 1748 | @kindex C-c > @r{(Picture mode)} | ||
| 1749 | @kindex C-c ^ @r{(Picture mode)} | ||
| 1750 | @kindex C-c . @r{(Picture mode)} | ||
| 1751 | @kindex C-c ` @r{(Picture mode)} | ||
| 1752 | @kindex C-c ' @r{(Picture mode)} | ||
| 1753 | @kindex C-c / @r{(Picture mode)} | ||
| 1754 | @kindex C-c \ @r{(Picture mode)} | ||
| 1755 | Since ``self-inserting'' characters in Picture mode overwrite and move | ||
| 1756 | point, there is no essential restriction on how point should be moved. | ||
| 1757 | Normally point moves right, but you can specify any of the eight | ||
| 1758 | orthogonal or diagonal directions for motion after a ``self-inserting'' | ||
| 1759 | character. This is useful for drawing lines in the buffer. | ||
| 1760 | |||
| 1761 | @table @kbd | ||
| 1762 | @item C-c < | ||
| 1763 | @itemx C-c @key{LEFT} | ||
| 1764 | Move left after insertion (@code{picture-movement-left}). | ||
| 1765 | @item C-c > | ||
| 1766 | @itemx C-c @key{RIGHT} | ||
| 1767 | Move right after insertion (@code{picture-movement-right}). | ||
| 1768 | @item C-c ^ | ||
| 1769 | @itemx C-c @key{UP} | ||
| 1770 | Move up after insertion (@code{picture-movement-up}). | ||
| 1771 | @item C-c . | ||
| 1772 | @itemx C-c @key{DOWN} | ||
| 1773 | Move down after insertion (@code{picture-movement-down}). | ||
| 1774 | @item C-c ` | ||
| 1775 | @itemx C-c @key{HOME} | ||
| 1776 | Move up and left (``northwest'') after insertion (@code{picture-movement-nw}). | ||
| 1777 | @item C-c ' | ||
| 1778 | @itemx C-c @key{PAGEUP} | ||
| 1779 | Move up and right (``northeast'') after insertion | ||
| 1780 | (@code{picture-movement-ne}). | ||
| 1781 | @item C-c / | ||
| 1782 | @itemx C-c @key{END} | ||
| 1783 | Move down and left (``southwest'') after insertion | ||
| 1784 | @*(@code{picture-movement-sw}). | ||
| 1785 | @item C-c \ | ||
| 1786 | @itemx C-c @key{PAGEDOWN} | ||
| 1787 | Move down and right (``southeast'') after insertion | ||
| 1788 | @*(@code{picture-movement-se}). | ||
| 1789 | @end table | ||
| 1790 | |||
| 1791 | @kindex C-c C-f @r{(Picture mode)} | ||
| 1792 | @kindex C-c C-b @r{(Picture mode)} | ||
| 1793 | @findex picture-motion | ||
| 1794 | @findex picture-motion-reverse | ||
| 1795 | Two motion commands move based on the current Picture insertion | ||
| 1796 | direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the | ||
| 1797 | same direction as motion after ``insertion'' currently does, while @kbd{C-c | ||
| 1798 | C-b} (@code{picture-motion-reverse}) moves in the opposite direction. | ||
| 1799 | |||
| 1800 | @node Tabs in Picture | ||
| 1801 | @section Picture Mode Tabs | ||
| 1802 | |||
| 1803 | @kindex M-TAB @r{(Picture mode)} | ||
| 1804 | @findex picture-tab-search | ||
| 1805 | @vindex picture-tab-chars | ||
| 1806 | Two kinds of tab-like action are provided in Picture mode. Use | ||
| 1807 | @kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing. | ||
| 1808 | With no argument, it moves to a point underneath the next | ||
| 1809 | ``interesting'' character that follows whitespace in the previous | ||
| 1810 | nonblank line. ``Next'' here means ``appearing at a horizontal position | ||
| 1811 | greater than the one point starts out at.'' With an argument, as in | ||
| 1812 | @kbd{C-u M-@key{TAB}}, this command moves to the next such interesting | ||
| 1813 | character in the current line. @kbd{M-@key{TAB}} does not change the | ||
| 1814 | text; it only moves point. ``Interesting'' characters are defined by | ||
| 1815 | the variable @code{picture-tab-chars}, which should define a set of | ||
| 1816 | characters. The syntax for this variable is like the syntax used inside | ||
| 1817 | of @samp{[@dots{}]} in a regular expression---but without the @samp{[} | ||
| 1818 | and the @samp{]}. Its default value is @code{"!-~"}. | ||
| 1819 | |||
| 1820 | @findex picture-tab | ||
| 1821 | @key{TAB} itself runs @code{picture-tab}, which operates based on the | ||
| 1822 | current tab stop settings; it is the Picture mode equivalent of | ||
| 1823 | @code{tab-to-tab-stop}. Normally it just moves point, but with a numeric | ||
| 1824 | argument it clears the text that it moves over. | ||
| 1825 | |||
| 1826 | @kindex C-c TAB @r{(Picture mode)} | ||
| 1827 | @findex picture-set-tab-stops | ||
| 1828 | The context-based and tab-stop-based forms of tabbing are brought | ||
| 1829 | together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}). | ||
| 1830 | This command sets the tab stops to the positions which @kbd{M-@key{TAB}} | ||
| 1831 | would consider significant in the current line. The use of this command, | ||
| 1832 | together with @key{TAB}, can get the effect of context-based tabbing. But | ||
| 1833 | @kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient. | ||
| 1834 | |||
| 1835 | It may be convenient to prevent use of actual tab characters in | ||
| 1836 | pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing | ||
| 1837 | up the picture. You can do this by setting the variable | ||
| 1838 | @code{indent-tabs-mode} to @code{nil}. | ||
| 1839 | |||
| 1840 | @node Rectangles in Picture | ||
| 1841 | @section Picture Mode Rectangle Commands | ||
| 1842 | @cindex rectangles and Picture mode | ||
| 1843 | @cindex Picture mode and rectangles | ||
| 1844 | |||
| 1845 | Picture mode defines commands for working on rectangular pieces of | ||
| 1846 | the text in ways that fit with the quarter-plane model. The standard | ||
| 1847 | rectangle commands may also be useful. @xref{Rectangles,,, emacs, the | ||
| 1848 | Emacs Manual}. | ||
| 1849 | |||
| 1850 | @table @kbd | ||
| 1851 | @item C-c C-k | ||
| 1852 | Clear out the region-rectangle with spaces | ||
| 1853 | (@code{picture-clear-rectangle}). With argument, delete the text. | ||
| 1854 | @item C-c C-w @var{r} | ||
| 1855 | Similar, but save rectangle contents in register @var{r} first | ||
| 1856 | (@code{picture-clear-rectangle-to-register}). | ||
| 1857 | @item C-c C-y | ||
| 1858 | Copy last killed rectangle into the buffer by overwriting, with upper | ||
| 1859 | left corner at point (@code{picture-yank-rectangle}). With argument, | ||
| 1860 | insert instead. | ||
| 1861 | @item C-c C-x @var{r} | ||
| 1862 | Similar, but use the rectangle in register @var{r} | ||
| 1863 | (@code{picture-yank-rectangle-from-register}). | ||
| 1864 | @end table | ||
| 1865 | |||
| 1866 | @kindex C-c C-k @r{(Picture mode)} | ||
| 1867 | @kindex C-c C-w @r{(Picture mode)} | ||
| 1868 | @findex picture-clear-rectangle | ||
| 1869 | @findex picture-clear-rectangle-to-register | ||
| 1870 | The picture rectangle commands @kbd{C-c C-k} | ||
| 1871 | (@code{picture-clear-rectangle}) and @kbd{C-c C-w} | ||
| 1872 | (@code{picture-clear-rectangle-to-register}) differ from the standard | ||
| 1873 | rectangle commands in that they normally clear the rectangle instead of | ||
| 1874 | deleting it; this is analogous with the way @kbd{C-d} is changed in Picture | ||
| 1875 | mode. | ||
| 1876 | |||
| 1877 | However, deletion of rectangles can be useful in Picture mode, so | ||
| 1878 | these commands delete the rectangle if given a numeric argument. | ||
| 1879 | @kbd{C-c C-k} either with or without a numeric argument saves the | ||
| 1880 | rectangle for @kbd{C-c C-y}. | ||
| 1881 | |||
| 1882 | @kindex C-c C-y @r{(Picture mode)} | ||
| 1883 | @kindex C-c C-x @r{(Picture mode)} | ||
| 1884 | @findex picture-yank-rectangle | ||
| 1885 | @findex picture-yank-rectangle-from-register | ||
| 1886 | The Picture mode commands for yanking rectangles differ from the | ||
| 1887 | standard ones in that they overwrite instead of inserting. This is | ||
| 1888 | the same way that Picture mode insertion of other text differs from | ||
| 1889 | other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts | ||
| 1890 | (by overwriting) the rectangle that was most recently killed, while | ||
| 1891 | @kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does | ||
| 1892 | likewise for the rectangle found in a specified register. | ||
| 1893 | |||
| 1894 | @node Advanced VC Usage | ||
| 1895 | @chapter Advanced VC Usage | ||
| 1896 | |||
| 1897 | Commonly used features of Emacs' version control (VC) support are | ||
| 1898 | described in the main Emacs manual (@pxref{Version Control,,,emacs, | ||
| 1899 | the Emacs Manual}). This chapter describes more advanced VC usage. | ||
| 1900 | |||
| 1901 | @menu | ||
| 1902 | * VC Dired Mode:: Listing files managed by version control. | ||
| 1903 | * VC Dired Commands:: Commands to use in a VC Dired buffer. | ||
| 1904 | * Remote Repositories:: Efficient access to remote CVS servers. | ||
| 1905 | * Snapshots:: Sets of file versions treated as a unit. | ||
| 1906 | * Miscellaneous VC:: Various other commands and features of VC. | ||
| 1907 | * Customizing VC:: Variables that change VC's behavior. | ||
| 1908 | @end menu | ||
| 1909 | |||
| 1910 | @node VC Dired Mode | ||
| 1911 | @section Dired under VC | ||
| 1912 | |||
| 1913 | @cindex PCL-CVS | ||
| 1914 | @pindex cvs | ||
| 1915 | @cindex CVS Dired Mode | ||
| 1916 | The VC Dired Mode described here works with all the version control | ||
| 1917 | systems that VC supports. Another more powerful facility, designed | ||
| 1918 | specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS, | ||
| 1919 | pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}. | ||
| 1920 | |||
| 1921 | @kindex C-x v d | ||
| 1922 | @findex vc-directory | ||
| 1923 | When you are working on a large program, it is often useful to find | ||
| 1924 | out which files have changed within an entire directory tree, or to view | ||
| 1925 | the status of all files under version control at once, and to perform | ||
| 1926 | version control operations on collections of files. You can use the | ||
| 1927 | command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing | ||
| 1928 | that includes only files relevant for version control. | ||
| 1929 | |||
| 1930 | @vindex vc-dired-terse-display | ||
| 1931 | @kbd{C-x v d} creates a buffer which uses VC Dired Mode. This looks | ||
| 1932 | much like an ordinary Dired buffer (@pxref{Dired,,,emacs, the | ||
| 1933 | Emacs Manual}); however, normally it shows only the noteworthy files | ||
| 1934 | (those locked or not up-to-date). This is called @dfn{terse display}. | ||
| 1935 | If you set the variable @code{vc-dired-terse-display} to @code{nil}, | ||
| 1936 | then VC Dired shows all relevant files---those managed under version | ||
| 1937 | control, plus all subdirectories (@dfn{full display}). The command | ||
| 1938 | @kbd{v t} in a VC Dired buffer toggles between terse display and full | ||
| 1939 | display (@pxref{VC Dired Commands}). | ||
| 1940 | |||
| 1941 | @vindex vc-dired-recurse | ||
| 1942 | By default, VC Dired produces a recursive listing of noteworthy or | ||
| 1943 | relevant files at or below the given directory. You can change this by | ||
| 1944 | setting the variable @code{vc-dired-recurse} to @code{nil}; then VC | ||
| 1945 | Dired shows only the files in the given directory. | ||
| 1946 | |||
| 1947 | The line for an individual file shows the version control state in the | ||
| 1948 | place of the hard link count, owner, group, and size of the file. If | ||
| 1949 | the file is unmodified, in sync with the master file, the version | ||
| 1950 | control state shown is blank. Otherwise it consists of text in | ||
| 1951 | parentheses. Under RCS and SCCS, the name of the user locking the file | ||
| 1952 | is shown; under CVS, an abbreviated version of the @samp{cvs status} | ||
| 1953 | output is used. Here is an example using RCS: | ||
| 1954 | |||
| 1955 | @smallexample | ||
| 1956 | @group | ||
| 1957 | /home/jim/project: | ||
| 1958 | |||
| 1959 | -rw-r--r-- (jim) Apr 2 23:39 file1 | ||
| 1960 | -r--r--r-- Apr 5 20:21 file2 | ||
| 1961 | @end group | ||
| 1962 | @end smallexample | ||
| 1963 | |||
| 1964 | @noindent | ||
| 1965 | The files @samp{file1} and @samp{file2} are under version control, | ||
| 1966 | @samp{file1} is locked by user jim, and @samp{file2} is unlocked. | ||
| 1967 | |||
| 1968 | Here is an example using CVS: | ||
| 1969 | |||
| 1970 | @smallexample | ||
| 1971 | @group | ||
| 1972 | /home/joe/develop: | ||
| 1973 | |||
| 1974 | -rw-r--r-- (modified) Aug 2 1997 file1.c | ||
| 1975 | -rw-r--r-- Apr 4 20:09 file2.c | ||
| 1976 | -rw-r--r-- (merge) Sep 13 1996 file3.c | ||
| 1977 | @end group | ||
| 1978 | @end smallexample | ||
| 1979 | |||
| 1980 | Here @samp{file1.c} is modified with respect to the repository, and | ||
| 1981 | @samp{file2.c} is not. @samp{file3.c} is modified, but other changes | ||
| 1982 | have also been checked in to the repository---you need to merge them | ||
| 1983 | with the work file before you can check it in. | ||
| 1984 | |||
| 1985 | @vindex vc-stay-local | ||
| 1986 | @vindex vc-cvs-stay-local | ||
| 1987 | In the above, if the repository were on a remote machine, VC would | ||
| 1988 | only contact it when the variable @code{vc-stay-local} (or | ||
| 1989 | @code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is | ||
| 1990 | because access to the repository may be slow, or you may be working | ||
| 1991 | offline and not have access to the repository at all. As a | ||
| 1992 | consequence, VC would not be able to tell you that @samp{file3.c} is | ||
| 1993 | in the ``merge'' state; you would learn that only when you try to | ||
| 1994 | check-in your modified copy of the file, or use a command such as | ||
| 1995 | @kbd{C-x v m}. | ||
| 1996 | |||
| 1997 | In practice, this is not a problem because CVS handles this case | ||
| 1998 | consistently whenever it arises. In VC, you'll simply get prompted to | ||
| 1999 | merge the remote changes into your work file first. The benefits of | ||
| 2000 | less network communication usually outweigh the disadvantage of not | ||
| 2001 | seeing remote changes immediately. | ||
| 2002 | |||
| 2003 | @vindex vc-directory-exclusion-list | ||
| 2004 | When VC Dired displays subdirectories (in the ``full'' display mode), | ||
| 2005 | it omits some that should never contain any files under version control. | ||
| 2006 | By default, this includes Version Control subdirectories such as | ||
| 2007 | @samp{RCS} and @samp{CVS}; you can customize this by setting the | ||
| 2008 | variable @code{vc-directory-exclusion-list}. | ||
| 2009 | |||
| 2010 | You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in | ||
| 2011 | ordinary Dired, that allows you to specify additional switches for the | ||
| 2012 | @samp{ls} command. | ||
| 2013 | |||
| 2014 | @node VC Dired Commands | ||
| 2015 | @section VC Dired Commands | ||
| 2016 | |||
| 2017 | All the usual Dired commands work normally in VC Dired mode, except | ||
| 2018 | for @kbd{v}, which is redefined as the version control prefix. You can | ||
| 2019 | invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by | ||
| 2020 | typing @kbd{v =}, or @kbd{v l}, and so on. Most of these commands apply | ||
| 2021 | to the file name on the current line. | ||
| 2022 | |||
| 2023 | The command @kbd{v v} (@code{vc-next-action}) operates on all the | ||
| 2024 | marked files, so that you can lock or check in several files at once. | ||
| 2025 | If it operates on more than one file, it handles each file according to | ||
| 2026 | its current state; thus, it might lock one file, but check in another | ||
| 2027 | file. This could be confusing; it is up to you to avoid confusing | ||
| 2028 | behavior by marking a set of files that are in a similar state. If no | ||
| 2029 | files are marked, @kbd{v v} operates on the file in the current line. | ||
| 2030 | |||
| 2031 | If any files call for check-in, @kbd{v v} reads a single log entry, | ||
| 2032 | then uses it for all the files being checked in. This is convenient for | ||
| 2033 | registering or checking in several files at once, as part of the same | ||
| 2034 | change. | ||
| 2035 | |||
| 2036 | @findex vc-dired-toggle-terse-mode | ||
| 2037 | @findex vc-dired-mark-locked | ||
| 2038 | You can toggle between terse display (only locked files, or files not | ||
| 2039 | up-to-date) and full display at any time by typing @kbd{v t} | ||
| 2040 | (@code{vc-dired-toggle-terse-mode}). There is also a special command | ||
| 2041 | @kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently | ||
| 2042 | locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l | ||
| 2043 | t k} is another way to delete from the buffer all files except those | ||
| 2044 | currently locked. | ||
| 2045 | |||
| 2046 | @node Remote Repositories | ||
| 2047 | @section Remote Repositories | ||
| 2048 | @cindex remote repositories (CVS) | ||
| 2049 | |||
| 2050 | A common way of using CVS is to set up a central CVS repository on | ||
| 2051 | some Internet host, then have each developer check out a personal | ||
| 2052 | working copy of the files on his local machine. Committing changes to | ||
| 2053 | the repository, and picking up changes from other users into one's own | ||
| 2054 | working area, then works by direct interactions with the CVS server. | ||
| 2055 | |||
| 2056 | One difficulty is that access to the CVS server is often slow, and | ||
| 2057 | that developers might need to work off-line as well. VC is designed | ||
| 2058 | to reduce the amount of network interaction necessary. | ||
| 2059 | |||
| 2060 | @menu | ||
| 2061 | * Version Backups:: Keeping local copies of repository versions. | ||
| 2062 | * Local Version Control:: Using another version system for local editing. | ||
| 2063 | @end menu | ||
| 2064 | |||
| 2065 | @node Version Backups | ||
| 2066 | @subsection Version Backups | ||
| 2067 | @cindex version backups | ||
| 2068 | |||
| 2069 | @cindex automatic version backups | ||
| 2070 | When VC sees that the CVS repository for a file is on a remote | ||
| 2071 | machine, it automatically makes local backups of unmodified versions | ||
| 2072 | of the file---@dfn{automatic version backups}. This means that you | ||
| 2073 | can compare the file to the repository version (@kbd{C-x v =}), or | ||
| 2074 | revert to that version (@kbd{C-x v u}), without any network | ||
| 2075 | interactions. | ||
| 2076 | |||
| 2077 | The local copy of the unmodified file is called a @dfn{version | ||
| 2078 | backup} to indicate that it corresponds exactly to a version that is | ||
| 2079 | stored in the repository. Note that version backups are not the same | ||
| 2080 | as ordinary Emacs backup files (@pxref{Backup,,,emacs, the Emacs | ||
| 2081 | Manual}). But they follow a similar naming convention. | ||
| 2082 | |||
| 2083 | For a file that comes from a remote CVS repository, VC makes a | ||
| 2084 | version backup whenever you save the first changes to the file, and | ||
| 2085 | removes it after you have committed your modified version to the | ||
| 2086 | repository. You can disable the making of automatic version backups by | ||
| 2087 | setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}). | ||
| 2088 | |||
| 2089 | @cindex manual version backups | ||
| 2090 | The name of the automatic version backup for version @var{version} | ||
| 2091 | of file @var{file} is @code{@var{file}.~@var{version}.~}. This is | ||
| 2092 | almost the same as the name used by @kbd{C-x v ~} (@pxref{Old | ||
| 2093 | Versions,,,emacs, the Emacs Manual}), the only difference being | ||
| 2094 | the additional dot (@samp{.}) after the version number. This | ||
| 2095 | similarity is intentional, because both kinds of files store the same | ||
| 2096 | kind of information. The file made by @kbd{C-x v ~} acts as a | ||
| 2097 | @dfn{manual version backup}. | ||
| 2098 | |||
| 2099 | All the VC commands that operate on old versions of a file can use | ||
| 2100 | both kinds of version backups. For instance, @kbd{C-x v ~} uses | ||
| 2101 | either an automatic or a manual version backup, if possible, to get | ||
| 2102 | the contents of the version you request. Likewise, @kbd{C-x v =} and | ||
| 2103 | @kbd{C-x v u} use either an automatic or a manual version backup, if | ||
| 2104 | one of them exists, to get the contents of a version to compare or | ||
| 2105 | revert to. If you changed a file outside of Emacs, so that no | ||
| 2106 | automatic version backup was created for the previous text, you can | ||
| 2107 | create a manual backup of that version using @kbd{C-x v ~}, and thus | ||
| 2108 | obtain the benefit of the local copy for Emacs commands. | ||
| 2109 | |||
| 2110 | The only difference in Emacs's handling of manual and automatic | ||
| 2111 | version backups, once they exist, is that Emacs deletes automatic | ||
| 2112 | version backups when you commit to the repository. By contrast, | ||
| 2113 | manual version backups remain until you delete them. | ||
| 2114 | |||
| 2115 | @node Local Version Control | ||
| 2116 | @subsection Local Version Control | ||
| 2117 | @cindex local version control | ||
| 2118 | @cindex local back end (version control) | ||
| 2119 | |||
| 2120 | When you make many changes to a file that comes from a remote | ||
| 2121 | repository, it can be convenient to have version control on your local | ||
| 2122 | machine as well. You can then record intermediate versions, revert to | ||
| 2123 | a previous state, etc., before you actually commit your changes to the | ||
| 2124 | remote server. | ||
| 2125 | |||
| 2126 | VC lets you do this by putting a file under a second, local version | ||
| 2127 | control system, so that the file is effectively registered in two | ||
| 2128 | systems at the same time. For the description here, we will assume | ||
| 2129 | that the remote system is CVS, and you use RCS locally, although the | ||
| 2130 | mechanism works with any combination of version control systems | ||
| 2131 | (@dfn{back ends}). | ||
| 2132 | |||
| 2133 | To make it work with other back ends, you must make sure that the | ||
| 2134 | ``more local'' back end comes before the ``more remote'' back end in | ||
| 2135 | the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By | ||
| 2136 | default, this variable is set up so that you can use remote CVS and | ||
| 2137 | local RCS as described here. | ||
| 2138 | |||
| 2139 | To start using local RCS for a file that comes from a remote CVS | ||
| 2140 | server, you must @emph{register the file in RCS}, by typing @kbd{C-u | ||
| 2141 | C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a | ||
| 2142 | prefix argument, and specify RCS as the back end.) | ||
| 2143 | |||
| 2144 | You can do this at any time; it does not matter whether you have | ||
| 2145 | already modified the file with respect to the version in the CVS | ||
| 2146 | repository. If possible, VC tries to make the RCS master start with | ||
| 2147 | the unmodified repository version, then checks in any local changes | ||
| 2148 | as a new version. This works if you have not made any changes yet, or | ||
| 2149 | if the unmodified repository version exists locally as a version | ||
| 2150 | backup (@pxref{Version Backups}). If the unmodified version is not | ||
| 2151 | available locally, the RCS master starts with the modified version; | ||
| 2152 | the only drawback to this is that you cannot compare your changes | ||
| 2153 | locally to what is stored in the repository. | ||
| 2154 | |||
| 2155 | The version number of the RCS master is derived from the current CVS | ||
| 2156 | version, starting a branch from it. For example, if the current CVS | ||
| 2157 | version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in | ||
| 2158 | the RCS master will be identical to version 1.23 under CVS; your first | ||
| 2159 | changes are checked in as 1.23.1.1. (If the unmodified file is not | ||
| 2160 | available locally, VC will check in the modified file twice, both as | ||
| 2161 | 1.23 and 1.23.1.1, to make the revision numbers consistent.) | ||
| 2162 | |||
| 2163 | If you do not use locking under CVS (the default), locking is also | ||
| 2164 | disabled for RCS, so that editing under RCS works exactly as under | ||
| 2165 | CVS. | ||
| 2166 | |||
| 2167 | When you are done with local editing, you can commit the final version | ||
| 2168 | back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}. | ||
| 2169 | This initializes the log entry buffer (@pxref{Log Buffer,,,emacs, the | ||
| 2170 | Emacs Manual}) to contain all the log entries you have recorded in the | ||
| 2171 | RCS master; you can edit them as you wish, and then commit in CVS by | ||
| 2172 | typing @kbd{C-c C-c}. If the commit is successful, VC removes the RCS | ||
| 2173 | master, so that the file is once again registered under CVS only. | ||
| 2174 | (The RCS master is not actually deleted, just renamed by appending | ||
| 2175 | @samp{~} to the name, so that you can refer to it later if you wish.) | ||
| 2176 | |||
| 2177 | While using local RCS, you can pick up recent changes from the CVS | ||
| 2178 | repository into your local file, or commit some of your changes back | ||
| 2179 | to CVS, without terminating local RCS version control. To do this, | ||
| 2180 | switch to the CVS back end temporarily, with the @kbd{C-x v b} command: | ||
| 2181 | |||
| 2182 | @table @kbd | ||
| 2183 | @item C-x v b | ||
| 2184 | Switch to another back end that the current file is registered | ||
| 2185 | under (@code{vc-switch-backend}). | ||
| 2186 | |||
| 2187 | @item C-u C-x v b @var{backend} @key{RET} | ||
| 2188 | Switch to @var{backend} for the current file. | ||
| 2189 | @end table | ||
| 2190 | |||
| 2191 | @kindex C-x v b | ||
| 2192 | @findex vc-switch-backend | ||
| 2193 | @kbd{C-x v b} does not change the buffer contents, or any files; it | ||
| 2194 | only changes VC's perspective on how to handle the file. Any | ||
| 2195 | subsequent VC commands for that file will operate on the back end that | ||
| 2196 | is currently selected. | ||
| 2197 | |||
| 2198 | If the current file is registered in more than one back end, typing | ||
| 2199 | @kbd{C-x v b} ``cycles'' through all of these back ends. With a | ||
| 2200 | prefix argument, it asks for the back end to use in the minibuffer. | ||
| 2201 | |||
| 2202 | Thus, if you are using local RCS, and you want to pick up some recent | ||
| 2203 | changes in the file from remote CVS, first visit the file, then type | ||
| 2204 | @kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m | ||
| 2205 | @key{RET}} to merge the news (@pxref{Merging,,,emacs, the Emacs | ||
| 2206 | Manual}). You can then switch back to RCS by typing @kbd{C-x v b} | ||
| 2207 | again, and continue to edit locally. | ||
| 2208 | |||
| 2209 | But if you do this, the revision numbers in the RCS master no longer | ||
| 2210 | correspond to those of CVS. Technically, this is not a problem, but | ||
| 2211 | it can become difficult to keep track of what is in the CVS repository | ||
| 2212 | and what is not. So we suggest that you return from time to time to | ||
| 2213 | CVS-only operation, by committing your local changes back to the | ||
| 2214 | repository using @kbd{C-u C-x v v cvs @key{RET}}. | ||
| 2215 | |||
| 2216 | @node Snapshots | ||
| 2217 | @section Snapshots | ||
| 2218 | @cindex snapshots and version control | ||
| 2219 | |||
| 2220 | A @dfn{snapshot} is a named set of file versions (one for each | ||
| 2221 | registered file) that you can treat as a unit. One important kind of | ||
| 2222 | snapshot is a @dfn{release}, a (theoretically) stable version of the | ||
| 2223 | system that is ready for distribution to users. | ||
| 2224 | |||
| 2225 | @menu | ||
| 2226 | * Making Snapshots:: The snapshot facilities. | ||
| 2227 | * Snapshot Caveats:: Things to be careful of when using snapshots. | ||
| 2228 | @end menu | ||
| 2229 | |||
| 2230 | @node Making Snapshots | ||
| 2231 | @subsection Making and Using Snapshots | ||
| 2232 | |||
| 2233 | There are two basic commands for snapshots; one makes a | ||
| 2234 | snapshot with a given name, the other retrieves a named snapshot. | ||
| 2235 | |||
| 2236 | @table @code | ||
| 2237 | @kindex C-x v s | ||
| 2238 | @findex vc-create-snapshot | ||
| 2239 | @item C-x v s @var{name} @key{RET} | ||
| 2240 | Define the last saved versions of every registered file in or under the | ||
| 2241 | current directory as a snapshot named @var{name} | ||
| 2242 | (@code{vc-create-snapshot}). | ||
| 2243 | |||
| 2244 | @kindex C-x v r | ||
| 2245 | @findex vc-retrieve-snapshot | ||
| 2246 | @item C-x v r @var{name} @key{RET} | ||
| 2247 | For all registered files at or below the current directory level, select | ||
| 2248 | whatever versions correspond to the snapshot @var{name} | ||
| 2249 | (@code{vc-retrieve-snapshot}). | ||
| 2250 | |||
| 2251 | This command reports an error if any files are locked at or below the | ||
| 2252 | current directory, without changing anything; this is to avoid | ||
| 2253 | overwriting work in progress. | ||
| 2254 | @end table | ||
| 2255 | |||
| 2256 | A snapshot uses a very small amount of resources---just enough to record | ||
| 2257 | the list of file names and which version belongs to the snapshot. Thus, | ||
| 2258 | you need not hesitate to create snapshots whenever they are useful. | ||
| 2259 | |||
| 2260 | You can give a snapshot name as an argument to @kbd{C-x v =} or | ||
| 2261 | @kbd{C-x v ~} (@pxref{Old Versions,,,emacs, the Emacs Manual}). | ||
| 2262 | Thus, you can use it to compare a snapshot against the current files, | ||
| 2263 | or two snapshots against each other, or a snapshot against a named | ||
| 2264 | version. | ||
| 2265 | |||
| 2266 | @node Snapshot Caveats | ||
| 2267 | @subsection Snapshot Caveats | ||
| 2268 | |||
| 2269 | @cindex named configurations (RCS) | ||
| 2270 | VC's snapshot facilities are modeled on RCS's named-configuration | ||
| 2271 | support. They use RCS's native facilities for this, so | ||
| 2272 | snapshots made using RCS through VC are visible even when you bypass VC. | ||
| 2273 | |||
| 2274 | With CVS, Meta-CVS, and Subversion, VC also uses the native | ||
| 2275 | mechanism provided by that back end to make snapshots and retrieve them | ||
| 2276 | (@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion). | ||
| 2277 | |||
| 2278 | @c worded verbosely to avoid overfull hbox. | ||
| 2279 | For SCCS, VC implements snapshots itself. The files it uses contain | ||
| 2280 | name/file/version-number triples. These snapshots are visible only | ||
| 2281 | through VC. | ||
| 2282 | |||
| 2283 | There is no support for VC snapshots using GNU Arch yet. | ||
| 2284 | |||
| 2285 | A snapshot is a set of checked-in versions. So make sure that all the | ||
| 2286 | files are checked in and not locked when you make a snapshot. | ||
| 2287 | |||
| 2288 | File renaming and deletion can create some difficulties with snapshots. | ||
| 2289 | This is not a VC-specific problem, but a general design issue in version | ||
| 2290 | control systems that no one has solved very well yet. | ||
| 2291 | |||
| 2292 | If you rename a registered file, you need to rename its master along | ||
| 2293 | with it (the command @code{vc-rename-file} does this automatically). If | ||
| 2294 | you are using SCCS, you must also update the records of the snapshot, to | ||
| 2295 | mention the file by its new name (@code{vc-rename-file} does this, | ||
| 2296 | too). An old snapshot that refers to a master file that no longer | ||
| 2297 | exists under the recorded name is invalid; VC can no longer retrieve | ||
| 2298 | it. It would be beyond the scope of this manual to explain enough about | ||
| 2299 | RCS and SCCS to explain how to update the snapshots by hand. | ||
| 2300 | |||
| 2301 | Using @code{vc-rename-file} makes the snapshot remain valid for | ||
| 2302 | retrieval, but it does not solve all problems. For example, some of the | ||
| 2303 | files in your program probably refer to others by name. At the very | ||
| 2304 | least, the makefile probably mentions the file that you renamed. If you | ||
| 2305 | retrieve an old snapshot, the renamed file is retrieved under its new | ||
| 2306 | name, which is not the name that the makefile expects. So the program | ||
| 2307 | won't really work as retrieved. | ||
| 2308 | |||
| 2309 | @node Miscellaneous VC | ||
| 2310 | @section Miscellaneous Commands and Features of VC | ||
| 2311 | |||
| 2312 | This section explains the less-frequently-used features of VC. | ||
| 2313 | |||
| 2314 | @menu | ||
| 2315 | * Change Logs and VC:: Generating a change log file from log entries. | ||
| 2316 | * Renaming and VC:: A command to rename both the source and master | ||
| 2317 | file correctly. | ||
| 2318 | * Version Headers:: Inserting version control headers into working files. | ||
| 2319 | @end menu | ||
| 2320 | |||
| 2321 | @node Change Logs and VC | ||
| 2322 | @subsection Change Logs and VC | ||
| 2323 | |||
| 2324 | If you use RCS or CVS for a program and also maintain a change log | ||
| 2325 | file for it (@pxref{Change Log,,,emacs, the Emacs Manual}), you | ||
| 2326 | can generate change log entries automatically from the version control | ||
| 2327 | log entries: | ||
| 2328 | |||
| 2329 | @table @kbd | ||
| 2330 | @item C-x v a | ||
| 2331 | @kindex C-x v a | ||
| 2332 | @findex vc-update-change-log | ||
| 2333 | Visit the current directory's change log file and, for registered files | ||
| 2334 | in that directory, create new entries for versions checked in since the | ||
| 2335 | most recent entry in the change log file. | ||
| 2336 | (@code{vc-update-change-log}). | ||
| 2337 | |||
| 2338 | This command works with RCS or CVS only, not with any of the other | ||
| 2339 | back ends. | ||
| 2340 | |||
| 2341 | @item C-u C-x v a | ||
| 2342 | As above, but only find entries for the current buffer's file. | ||
| 2343 | |||
| 2344 | @item M-1 C-x v a | ||
| 2345 | As above, but find entries for all the currently visited files that are | ||
| 2346 | maintained with version control. This works only with RCS, and it puts | ||
| 2347 | all entries in the log for the default directory, which may not be | ||
| 2348 | appropriate. | ||
| 2349 | @end table | ||
| 2350 | |||
| 2351 | For example, suppose the first line of @file{ChangeLog} is dated | ||
| 2352 | 1999-04-10, and that the only check-in since then was by Nathaniel | ||
| 2353 | Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log | ||
| 2354 | messages that start with `#'.}. Then @kbd{C-x v a} visits | ||
| 2355 | @file{ChangeLog} and inserts text like this: | ||
| 2356 | |||
| 2357 | @iftex | 95 | @iftex |
| 2358 | @medbreak | 96 | @c ``Picture Mode'' is a chapter, not a section, so it's outside @raisesections. |
| 2359 | @end iftex | 97 | @include picture-xtra.texi |
| 2360 | @smallexample | ||
| 2361 | @group | ||
| 2362 | 1999-05-22 Nathaniel Bowditch <nat@@apn.org> | ||
| 2363 | 98 | ||
| 2364 | * rcs2log: Ignore log messages that start with `#'. | 99 | @raisesections |
| 2365 | @end group | 100 | @include arevert-xtra.texi |
| 2366 | @end smallexample | ||
| 2367 | @iftex | ||
| 2368 | @medbreak | ||
| 2369 | @end iftex | ||
| 2370 | 101 | ||
| 2371 | @noindent | 102 | @include dired-xtra.texi |
| 2372 | You can then edit the new change log entry further as you wish. | ||
| 2373 | 103 | ||
| 2374 | Some of the new change log entries may duplicate what's already in | 104 | @include cal-xtra.texi |
| 2375 | ChangeLog. You will have to remove these duplicates by hand. | ||
| 2376 | 105 | ||
| 2377 | Normally, the log entry for file @file{foo} is displayed as @samp{* | 106 | @include emerge-xtra.texi |
| 2378 | foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted | ||
| 2379 | if the text of the log entry starts with @w{@samp{(@var{functionname}): | ||
| 2380 | }}. For example, if the log entry for @file{vc.el} is | ||
| 2381 | @samp{(vc-do-command): Check call-process status.}, then the text in | ||
| 2382 | @file{ChangeLog} looks like this: | ||
| 2383 | 107 | ||
| 2384 | @iftex | 108 | @include vc-xtra.texi |
| 2385 | @medbreak | ||
| 2386 | @end iftex | ||
| 2387 | @smallexample | ||
| 2388 | @group | ||
| 2389 | 1999-05-06 Nathaniel Bowditch <nat@@apn.org> | ||
| 2390 | 109 | ||
| 2391 | * vc.el (vc-do-command): Check call-process status. | 110 | @include fortran-xtra.texi |
| 2392 | @end group | ||
| 2393 | @end smallexample | ||
| 2394 | @iftex | ||
| 2395 | @medbreak | ||
| 2396 | @end iftex | ||
| 2397 | |||
| 2398 | When @kbd{C-x v a} adds several change log entries at once, it groups | ||
| 2399 | related log entries together if they all are checked in by the same | ||
| 2400 | author at nearly the same time. If the log entries for several such | ||
| 2401 | files all have the same text, it coalesces them into a single entry. | ||
| 2402 | For example, suppose the most recent check-ins have the following log | ||
| 2403 | entries: | ||
| 2404 | 111 | ||
| 2405 | @flushleft | 112 | @include msdog-xtra.texi |
| 2406 | @bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.} | ||
| 2407 | @bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.} | ||
| 2408 | @bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.} | ||
| 2409 | @end flushleft | ||
| 2410 | 113 | ||
| 2411 | @noindent | 114 | @lowersections |
| 2412 | They appear like this in @file{ChangeLog}: | ||
| 2413 | |||
| 2414 | @iftex | ||
| 2415 | @medbreak | ||
| 2416 | @end iftex | ||
| 2417 | @smallexample | ||
| 2418 | @group | ||
| 2419 | 1999-04-01 Nathaniel Bowditch <nat@@apn.org> | ||
| 2420 | |||
| 2421 | * vc.texinfo: Fix expansion typos. | ||
| 2422 | |||
| 2423 | * vc.el, vc-hooks.el: Don't call expand-file-name. | ||
| 2424 | @end group | ||
| 2425 | @end smallexample | ||
| 2426 | @iftex | ||
| 2427 | @medbreak | ||
| 2428 | @end iftex | ||
| 2429 | |||
| 2430 | Normally, @kbd{C-x v a} separates log entries by a blank line, but you | ||
| 2431 | can mark several related log entries to be clumped together (without an | ||
| 2432 | intervening blank line) by starting the text of each related log entry | ||
| 2433 | with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label | ||
| 2434 | itself is not copied to @file{ChangeLog}. For example, suppose the log | ||
| 2435 | entries are: | ||
| 2436 | |||
| 2437 | @flushleft | ||
| 2438 | @bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.} | ||
| 2439 | @bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.} | ||
| 2440 | @bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.} | ||
| 2441 | @end flushleft | ||
| 2442 | |||
| 2443 | @noindent | ||
| 2444 | Then the text in @file{ChangeLog} looks like this: | ||
| 2445 | |||
| 2446 | @iftex | ||
| 2447 | @medbreak | ||
| 2448 | @end iftex | 115 | @end iftex |
| 2449 | @smallexample | ||
| 2450 | @group | ||
| 2451 | 1999-04-01 Nathaniel Bowditch <nat@@apn.org> | ||
| 2452 | |||
| 2453 | * vc.texinfo: Fix expansion typos. | ||
| 2454 | * vc.el, vc-hooks.el: Don't call expand-file-name. | ||
| 2455 | @end group | ||
| 2456 | @end smallexample | ||
| 2457 | @iftex | ||
| 2458 | @medbreak | ||
| 2459 | @end iftex | ||
| 2460 | |||
| 2461 | A log entry whose text begins with @samp{#} is not copied to | ||
| 2462 | @file{ChangeLog}. For example, if you merely fix some misspellings in | ||
| 2463 | comments, you can log the change with an entry beginning with @samp{#} | ||
| 2464 | to avoid putting such trivia into @file{ChangeLog}. | ||
| 2465 | |||
| 2466 | @node Renaming and VC | ||
| 2467 | @subsection Renaming VC Work Files and Master Files | ||
| 2468 | |||
| 2469 | @findex vc-rename-file | ||
| 2470 | When you rename a registered file, you must also rename its master | ||
| 2471 | file correspondingly to get proper results. Use @code{vc-rename-file} | ||
| 2472 | to rename the source file as you specify, and rename its master file | ||
| 2473 | accordingly. It also updates any snapshots (@pxref{Snapshots}) that | ||
| 2474 | mention the file, so that they use the new name; despite this, the | ||
| 2475 | snapshot thus modified may not completely work (@pxref{Snapshot | ||
| 2476 | Caveats}). | ||
| 2477 | |||
| 2478 | Some back ends do not provide an explicit rename operation to their | ||
| 2479 | repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} | ||
| 2480 | on the original and renamed buffers and provide the necessary edit | ||
| 2481 | log. | ||
| 2482 | |||
| 2483 | You cannot use @code{vc-rename-file} on a file that is locked by | ||
| 2484 | someone else. | ||
| 2485 | |||
| 2486 | @node Version Headers | ||
| 2487 | @subsection Inserting Version Control Headers | ||
| 2488 | |||
| 2489 | Sometimes it is convenient to put version identification strings | ||
| 2490 | directly into working files. Certain special strings called | ||
| 2491 | @dfn{version headers} are replaced in each successive version by the | ||
| 2492 | number of that version, the name of the user who created it, and other | ||
| 2493 | relevant information. All of the back ends that VC supports have such | ||
| 2494 | a mechanism, except GNU Arch. | ||
| 2495 | |||
| 2496 | VC does not normally use the information contained in these headers. | ||
| 2497 | The exception is RCS---with RCS, version headers are sometimes more | ||
| 2498 | reliable than the master file to determine which version of the file | ||
| 2499 | you are editing. Note that in a multi-branch environment, version | ||
| 2500 | headers are necessary to make VC behave correctly (@pxref{Multi-User | ||
| 2501 | Branching,,,emacs, the Emacs Manual}). | ||
| 2502 | |||
| 2503 | Searching for RCS version headers is controlled by the variable | ||
| 2504 | @code{vc-consult-headers}. If it is non-@code{nil} (the default), | ||
| 2505 | Emacs searches for headers to determine the version number you are | ||
| 2506 | editing. Setting it to @code{nil} disables this feature. | ||
| 2507 | |||
| 2508 | Note that although CVS uses the same kind of version headers as RCS | ||
| 2509 | does, VC never searches for these headers if you are using CVS, | ||
| 2510 | regardless of the above setting. | ||
| 2511 | |||
| 2512 | @kindex C-x v h | ||
| 2513 | @findex vc-insert-headers | ||
| 2514 | You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to | ||
| 2515 | insert a suitable header string. | ||
| 2516 | |||
| 2517 | @table @kbd | ||
| 2518 | @item C-x v h | ||
| 2519 | Insert headers in a file for use with your version-control system. | ||
| 2520 | @end table | ||
| 2521 | |||
| 2522 | @vindex vc-@var{backend}-header | ||
| 2523 | The default header string is @samp{@w{$}Id$} for RCS and | ||
| 2524 | @samp{@w{%}W%} for SCCS. You can specify other headers to insert by | ||
| 2525 | setting the variables @code{vc-@var{backend}-header} where | ||
| 2526 | @var{backend} is @code{rcs} or @code{sccs}. | ||
| 2527 | |||
| 2528 | Instead of a single string, you can specify a list of strings; then | ||
| 2529 | each string in the list is inserted as a separate header on a line of | ||
| 2530 | its own. | ||
| 2531 | |||
| 2532 | It may be necessary to use apparently-superfluous backslashes when | ||
| 2533 | writing the strings that you put in this variable. For instance, you | ||
| 2534 | might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra | ||
| 2535 | backslash prevents the string constant from being interpreted as a | ||
| 2536 | header, if the Emacs Lisp file containing it is maintained with | ||
| 2537 | version control. | ||
| 2538 | |||
| 2539 | @vindex vc-comment-alist | ||
| 2540 | Each header is inserted surrounded by tabs, inside comment delimiters, | ||
| 2541 | on a new line at point. Normally the ordinary comment | ||
| 2542 | start and comment end strings of the current mode are used, but for | ||
| 2543 | certain modes, there are special comment delimiters for this purpose; | ||
| 2544 | the variable @code{vc-comment-alist} specifies them. Each element of | ||
| 2545 | this list has the form @code{(@var{mode} @var{starter} @var{ender})}. | ||
| 2546 | |||
| 2547 | @vindex vc-static-header-alist | ||
| 2548 | The variable @code{vc-static-header-alist} specifies further strings | ||
| 2549 | to add based on the name of the buffer. Its value should be a list of | ||
| 2550 | elements of the form @code{(@var{regexp} . @var{format})}. Whenever | ||
| 2551 | @var{regexp} matches the buffer name, @var{format} is inserted as part | ||
| 2552 | of the header. A header line is inserted for each element that matches | ||
| 2553 | the buffer name, and for each string specified by | ||
| 2554 | @code{vc-@var{backend}-header}. The header line is made by processing the | ||
| 2555 | string from @code{vc-@var{backend}-header} with the format taken from the | ||
| 2556 | element. The default value for @code{vc-static-header-alist} is as follows: | ||
| 2557 | |||
| 2558 | @example | ||
| 2559 | @group | ||
| 2560 | (("\\.c$" . | ||
| 2561 | "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\ | ||
| 2562 | #endif /* lint */\n")) | ||
| 2563 | @end group | ||
| 2564 | @end example | ||
| 2565 | |||
| 2566 | @noindent | ||
| 2567 | It specifies insertion of text of this form: | ||
| 2568 | |||
| 2569 | @example | ||
| 2570 | @group | ||
| 2571 | |||
| 2572 | #ifndef lint | ||
| 2573 | static char vcid[] = "@var{string}"; | ||
| 2574 | #endif /* lint */ | ||
| 2575 | @end group | ||
| 2576 | @end example | ||
| 2577 | |||
| 2578 | @noindent | ||
| 2579 | Note that the text above starts with a blank line. | ||
| 2580 | |||
| 2581 | If you use more than one version header in a file, put them close | ||
| 2582 | together in the file. The mechanism in @code{revert-buffer} that | ||
| 2583 | preserves markers may not handle markers positioned between two version | ||
| 2584 | headers. | ||
| 2585 | |||
| 2586 | @node Customizing VC | ||
| 2587 | @section Customizing VC | ||
| 2588 | |||
| 2589 | @vindex vc-handled-backends | ||
| 2590 | The variable @code{vc-handled-backends} determines which version | ||
| 2591 | control systems VC should handle. The default value is @code{(RCS CVS | ||
| 2592 | SVN SCCS Arch MCVS)}, so it contains all six version systems that are | ||
| 2593 | currently supported. If you want VC to ignore one or more of these | ||
| 2594 | systems, exclude its name from the list. To disable VC entirely, set | ||
| 2595 | this variable to @code{nil}. | ||
| 2596 | |||
| 2597 | The order of systems in the list is significant: when you visit a file | ||
| 2598 | registered in more than one system (@pxref{Local Version Control}), VC | ||
| 2599 | uses the system that comes first in @code{vc-handled-backends} by | ||
| 2600 | default. The order is also significant when you register a file for | ||
| 2601 | the first time, @pxref{Registering,,,emacs, the Emacs Manual} for | ||
| 2602 | details. | ||
| 2603 | |||
| 2604 | @menu | ||
| 2605 | * General VC Options:: Options that apply to multiple back ends. | ||
| 2606 | * RCS and SCCS:: Options for RCS and SCCS. | ||
| 2607 | * CVS Options:: Options for CVS. | ||
| 2608 | @end menu | ||
| 2609 | |||
| 2610 | @node General VC Options | ||
| 2611 | @subsection General Options | ||
| 2612 | |||
| 2613 | @vindex vc-make-backup-files | ||
| 2614 | Emacs normally does not save backup files for source files that are | ||
| 2615 | maintained with version control. If you want to make backup files even | ||
| 2616 | for files that use version control, set the variable | ||
| 2617 | @code{vc-make-backup-files} to a non-@code{nil} value. | ||
| 2618 | |||
| 2619 | @vindex vc-keep-workfiles | ||
| 2620 | Normally the work file exists all the time, whether it is locked or | ||
| 2621 | not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking | ||
| 2622 | in a new version with @kbd{C-x v v} deletes the work file; but any | ||
| 2623 | attempt to visit the file with Emacs creates it again. (With CVS, work | ||
| 2624 | files are always kept.) | ||
| 2625 | |||
| 2626 | @vindex vc-follow-symlinks | ||
| 2627 | Editing a version-controlled file through a symbolic link can be | ||
| 2628 | dangerous. It bypasses the version control system---you can edit the | ||
| 2629 | file without locking it, and fail to check your changes in. Also, | ||
| 2630 | your changes might overwrite those of another user. To protect against | ||
| 2631 | this, VC checks each symbolic link that you visit, to see if it points | ||
| 2632 | to a file under version control. | ||
| 2633 | |||
| 2634 | The variable @code{vc-follow-symlinks} controls what to do when a | ||
| 2635 | symbolic link points to a version-controlled file. If it is @code{nil}, | ||
| 2636 | VC only displays a warning message. If it is @code{t}, VC automatically | ||
| 2637 | follows the link, and visits the real file instead, telling you about | ||
| 2638 | this in the echo area. If the value is @code{ask} (the default), VC | ||
| 2639 | asks you each time whether to follow the link. | ||
| 2640 | |||
| 2641 | @vindex vc-suppress-confirm | ||
| 2642 | If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v} | ||
| 2643 | and @kbd{C-x v i} can save the current buffer without asking, and | ||
| 2644 | @kbd{C-x v u} also operates without asking for confirmation. (This | ||
| 2645 | variable does not affect @kbd{C-x v c}; that operation is so drastic | ||
| 2646 | that it should always ask for confirmation.) | ||
| 2647 | |||
| 2648 | @vindex vc-command-messages | ||
| 2649 | VC mode does much of its work by running the shell commands for RCS, | ||
| 2650 | CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC | ||
| 2651 | displays messages to indicate which shell commands it runs, and | ||
| 2652 | additional messages when the commands finish. | ||
| 2653 | |||
| 2654 | @vindex vc-path | ||
| 2655 | You can specify additional directories to search for version control | ||
| 2656 | programs by setting the variable @code{vc-path}. These directories | ||
| 2657 | are searched before the usual search path. It is rarely necessary to | ||
| 2658 | set this variable, because VC normally finds the proper files | ||
| 2659 | automatically. | ||
| 2660 | |||
| 2661 | @node RCS and SCCS | ||
| 2662 | @subsection Options for RCS and SCCS | ||
| 2663 | |||
| 2664 | @cindex non-strict locking (RCS) | ||
| 2665 | @cindex locking, non-strict (RCS) | ||
| 2666 | By default, RCS uses locking to coordinate the activities of several | ||
| 2667 | users, but there is a mode called @dfn{non-strict locking} in which | ||
| 2668 | you can check-in changes without locking the file first. Use | ||
| 2669 | @samp{rcs -U} to switch to non-strict locking for a particular file, | ||
| 2670 | see the @code{rcs} manual page for details. | ||
| 2671 | |||
| 2672 | When deducing the version control state of an RCS file, VC first | ||
| 2673 | looks for an RCS version header string in the file (@pxref{Version | ||
| 2674 | Headers}). If there is no header string, VC normally looks at the | ||
| 2675 | file permissions of the work file; this is fast. But there might be | ||
| 2676 | situations when the file permissions cannot be trusted. In this case | ||
| 2677 | the master file has to be consulted, which is rather expensive. Also | ||
| 2678 | the master file can only tell you @emph{if} there's any lock on the | ||
| 2679 | file, but not whether your work file really contains that locked | ||
| 2680 | version. | ||
| 2681 | |||
| 2682 | @vindex vc-consult-headers | ||
| 2683 | You can tell VC not to use version headers to determine the file | ||
| 2684 | status by setting @code{vc-consult-headers} to @code{nil}. VC then | ||
| 2685 | always uses the file permissions (if it is supposed to trust them), or | ||
| 2686 | else checks the master file. | ||
| 2687 | |||
| 2688 | @vindex vc-mistrust-permissions | ||
| 2689 | You can specify the criterion for whether to trust the file | ||
| 2690 | permissions by setting the variable @code{vc-mistrust-permissions}. | ||
| 2691 | Its value can be @code{t} (always mistrust the file permissions and | ||
| 2692 | check the master file), @code{nil} (always trust the file | ||
| 2693 | permissions), or a function of one argument which makes the decision. | ||
| 2694 | The argument is the directory name of the @file{RCS} subdirectory. A | ||
| 2695 | non-@code{nil} value from the function says to mistrust the file | ||
| 2696 | permissions. If you find that the file permissions of work files are | ||
| 2697 | changed erroneously, set @code{vc-mistrust-permissions} to @code{t}. | ||
| 2698 | Then VC always checks the master file to determine the file's status. | ||
| 2699 | |||
| 2700 | VC determines the version control state of files under SCCS much as | ||
| 2701 | with RCS. It does not consider SCCS version headers, though. Thus, | ||
| 2702 | the variable @code{vc-mistrust-permissions} affects SCCS use, but | ||
| 2703 | @code{vc-consult-headers} does not. | ||
| 2704 | |||
| 2705 | @node CVS Options | ||
| 2706 | @subsection Options specific for CVS | ||
| 2707 | |||
| 2708 | @cindex locking (CVS) | ||
| 2709 | By default, CVS does not use locking to coordinate the activities of | ||
| 2710 | several users; anyone can change a work file at any time. However, | ||
| 2711 | there are ways to restrict this, resulting in behavior that resembles | ||
| 2712 | locking. | ||
| 2713 | |||
| 2714 | @cindex CVSREAD environment variable (CVS) | ||
| 2715 | For one thing, you can set the @env{CVSREAD} environment variable | ||
| 2716 | (the value you use makes no difference). If this variable is defined, | ||
| 2717 | CVS makes your work files read-only by default. In Emacs, you must | ||
| 2718 | type @kbd{C-x v v} to make the file writable, so that editing works | ||
| 2719 | in fact similar as if locking was used. Note however, that no actual | ||
| 2720 | locking is performed, so several users can make their files writable | ||
| 2721 | at the same time. When setting @env{CVSREAD} for the first time, make | ||
| 2722 | sure to check out all your modules anew, so that the file protections | ||
| 2723 | are set correctly. | ||
| 2724 | |||
| 2725 | @cindex cvs watch feature | ||
| 2726 | @cindex watching files (CVS) | ||
| 2727 | Another way to achieve something similar to locking is to use the | ||
| 2728 | @dfn{watch} feature of CVS. If a file is being watched, CVS makes it | ||
| 2729 | read-only by default, and you must also use @kbd{C-x v v} in Emacs to | ||
| 2730 | make it writable. VC calls @code{cvs edit} to make the file writable, | ||
| 2731 | and CVS takes care to notify other developers of the fact that you | ||
| 2732 | intend to change the file. See the CVS documentation for details on | ||
| 2733 | using the watch feature. | ||
| 2734 | |||
| 2735 | @vindex vc-stay-local | ||
| 2736 | @vindex vc-cvs-stay-local | ||
| 2737 | @cindex remote repositories (CVS) | ||
| 2738 | When a file's repository is on a remote machine, VC tries to keep | ||
| 2739 | network interactions to a minimum. This is controlled by the variable | ||
| 2740 | @code{vc-cvs-stay-local}. There is another variable, | ||
| 2741 | @code{vc-stay-local}, which enables the feature also for other back | ||
| 2742 | ends that support it, including CVS. In the following, we will talk | ||
| 2743 | only about @code{vc-cvs-stay-local}, but everything applies to | ||
| 2744 | @code{vc-stay-local} as well. | ||
| 2745 | |||
| 2746 | If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses | ||
| 2747 | only the entry in the local CVS subdirectory to determine the file's | ||
| 2748 | state (and possibly information returned by previous CVS commands). | ||
| 2749 | One consequence of this is that when you have modified a file, and | ||
| 2750 | somebody else has already checked in other changes to the file, you | ||
| 2751 | are not notified of it until you actually try to commit. (But you can | ||
| 2752 | try to pick up any recent changes from the repository first, using | ||
| 2753 | @kbd{C-x v m @key{RET}}, @pxref{Merging,,,emacs, the Emacs Manual}). | ||
| 2754 | |||
| 2755 | When @code{vc-cvs-stay-local} is @code{t}, VC also makes local | ||
| 2756 | version backups, so that simple diff and revert operations are | ||
| 2757 | completely local (@pxref{Version Backups}). | ||
| 2758 | |||
| 2759 | On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil}, | ||
| 2760 | then VC queries the remote repository @emph{before} it decides what to | ||
| 2761 | do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local | ||
| 2762 | repositories. It also does not make any version backups. | ||
| 2763 | |||
| 2764 | You can also set @code{vc-cvs-stay-local} to a regular expression | ||
| 2765 | that is matched against the repository host name; VC then stays local | ||
| 2766 | only for repositories from hosts that match the pattern. | ||
| 2767 | |||
| 2768 | @vindex vc-cvs-global-switches | ||
| 2769 | You can specify additional command line options to pass to all CVS | ||
| 2770 | operations in the variable @code{vc-cvs-global-switches}. These | ||
| 2771 | switches are inserted immediately after the @code{cvs} command, before | ||
| 2772 | the name of the operation to invoke. | ||
| 2773 | |||
| 2774 | |||
| 2775 | @node Fortran | ||
| 2776 | @chapter Fortran Mode | ||
| 2777 | @cindex Fortran mode | ||
| 2778 | @cindex mode, Fortran | ||
| 2779 | |||
| 2780 | Fortran mode provides special motion commands for Fortran statements | ||
| 2781 | and subprograms, and indentation commands that understand Fortran | ||
| 2782 | conventions of nesting, line numbers and continuation statements. | ||
| 2783 | Fortran mode has support for Auto Fill mode that breaks long lines into | ||
| 2784 | proper Fortran continuation lines. | ||
| 2785 | |||
| 2786 | Special commands for comments are provided because Fortran comments | ||
| 2787 | are unlike those of other languages. Built-in abbrevs optionally save | ||
| 2788 | typing when you insert Fortran keywords. | ||
| 2789 | |||
| 2790 | Use @kbd{M-x fortran-mode} to switch to this major mode. This | ||
| 2791 | command runs the hook @code{fortran-mode-hook}. @xref{Hooks,,, emacs, | ||
| 2792 | the Emacs Manual}. | ||
| 2793 | |||
| 2794 | @cindex Fortran77 and Fortran90 | ||
| 2795 | @findex f90-mode | ||
| 2796 | @findex fortran-mode | ||
| 2797 | Fortran mode is meant for editing Fortran77 ``fixed format'' (and also | ||
| 2798 | ``tab format'') source code. For editing the modern Fortran90 or | ||
| 2799 | Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}). | ||
| 2800 | Emacs normally uses Fortran mode for files with extension @samp{.f}, | ||
| 2801 | @samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and | ||
| 2802 | @samp{.f95}. GNU Fortran supports both kinds of format. | ||
| 2803 | |||
| 2804 | @menu | ||
| 2805 | * Motion: Fortran Motion. Moving point by statements or subprograms. | ||
| 2806 | * Indent: Fortran Indent. Indentation commands for Fortran. | ||
| 2807 | * Comments: Fortran Comments. Inserting and aligning comments. | ||
| 2808 | * Autofill: Fortran Autofill. Auto fill support for Fortran. | ||
| 2809 | * Columns: Fortran Columns. Measuring columns for valid Fortran. | ||
| 2810 | * Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords. | ||
| 2811 | @end menu | ||
| 2812 | |||
| 2813 | @node Fortran Motion | ||
| 2814 | @section Motion Commands | ||
| 2815 | |||
| 2816 | In addition to the normal commands for moving by and operating on | ||
| 2817 | ``defuns'' (Fortran subprograms---functions and subroutines, as well as | ||
| 2818 | modules for F90 mode), Fortran mode provides special commands to move by | ||
| 2819 | statements and other program units. | ||
| 2820 | |||
| 2821 | @table @kbd | ||
| 2822 | @kindex C-c C-n @r{(Fortran mode)} | ||
| 2823 | @findex fortran-next-statement | ||
| 2824 | @findex f90-next-statement | ||
| 2825 | @item C-c C-n | ||
| 2826 | Move to the beginning of the next statement | ||
| 2827 | (@code{fortran-next-statement}/@code{f90-next-statement}). | ||
| 2828 | |||
| 2829 | @kindex C-c C-p @r{(Fortran mode)} | ||
| 2830 | @findex fortran-previous-statement | ||
| 2831 | @findex f90-previous-statement | ||
| 2832 | @item C-c C-p | ||
| 2833 | Move to the beginning of the previous statement | ||
| 2834 | (@code{fortran-previous-statement}/@code{f90-previous-statement}). | ||
| 2835 | If there is no previous statement (i.e. if called from the first | ||
| 2836 | statement in the buffer), move to the start of the buffer. | ||
| 2837 | |||
| 2838 | @kindex C-c C-e @r{(F90 mode)} | ||
| 2839 | @findex f90-next-block | ||
| 2840 | @item C-c C-e | ||
| 2841 | Move point forward to the start of the next code block | ||
| 2842 | (@code{f90-next-block}). A code block is a subroutine, | ||
| 2843 | @code{if}--@code{endif} statement, and so forth. This command exists | ||
| 2844 | for F90 mode only, not Fortran mode. With a numeric argument, this | ||
| 2845 | moves forward that many blocks. | ||
| 2846 | |||
| 2847 | @kindex C-c C-a @r{(F90 mode)} | ||
| 2848 | @findex f90-previous-block | ||
| 2849 | @item C-c C-a | ||
| 2850 | Move point backward to the previous code block | ||
| 2851 | (@code{f90-previous-block}). This is like @code{f90-next-block}, but | ||
| 2852 | moves backwards. | ||
| 2853 | |||
| 2854 | @kindex C-M-n @r{(Fortran mode)} | ||
| 2855 | @findex fortran-end-of-block | ||
| 2856 | @findex f90-end-of-block | ||
| 2857 | @item C-M-n | ||
| 2858 | Move to the end of the current code block | ||
| 2859 | (@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric | ||
| 2860 | agument, move forward that number of blocks. The mark is set before | ||
| 2861 | moving point. The F90 mode version of this command checks for | ||
| 2862 | consistency of block types and labels (if present), but it does not | ||
| 2863 | check the outermost block since that may be incomplete. | ||
| 2864 | |||
| 2865 | @kindex C-M-p @r{(Fortran mode)} | ||
| 2866 | @findex fortran-beginning-of-block | ||
| 2867 | @findex f90-beginning-of-block | ||
| 2868 | @item C-M-p | ||
| 2869 | Move to the start of the current code block | ||
| 2870 | (@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This | ||
| 2871 | is like @code{fortran-end-of-block}, but moves backwards. | ||
| 2872 | @end table | ||
| 2873 | |||
| 2874 | @node Fortran Indent | ||
| 2875 | @section Fortran Indentation | ||
| 2876 | |||
| 2877 | Special commands and features are needed for indenting Fortran code in | ||
| 2878 | order to make sure various syntactic entities (line numbers, comment line | ||
| 2879 | indicators and continuation line flags) appear in the columns that are | ||
| 2880 | required for standard, fixed (or tab) format Fortran. | ||
| 2881 | |||
| 2882 | @menu | ||
| 2883 | * Commands: ForIndent Commands. Commands for indenting and filling Fortran. | ||
| 2884 | * Contline: ForIndent Cont. How continuation lines indent. | ||
| 2885 | * Numbers: ForIndent Num. How line numbers auto-indent. | ||
| 2886 | * Conv: ForIndent Conv. Conventions you must obey to avoid trouble. | ||
| 2887 | * Vars: ForIndent Vars. Variables controlling Fortran indent style. | ||
| 2888 | @end menu | ||
| 2889 | |||
| 2890 | @node ForIndent Commands | ||
| 2891 | @subsection Fortran Indentation and Filling Commands | ||
| 2892 | |||
| 2893 | @table @kbd | ||
| 2894 | @item C-M-j | ||
| 2895 | Break the current line at point and set up a continuation line | ||
| 2896 | (@code{fortran-split-line}). | ||
| 2897 | @item M-^ | ||
| 2898 | Join this line to the previous line (@code{fortran-join-line}). | ||
| 2899 | @item C-M-q | ||
| 2900 | Indent all the lines of the subprogram point is in | ||
| 2901 | (@code{fortran-indent-subprogram}). | ||
| 2902 | @item M-q | ||
| 2903 | Fill a comment block or statement. | ||
| 2904 | @end table | ||
| 2905 | |||
| 2906 | @kindex C-M-q @r{(Fortran mode)} | ||
| 2907 | @findex fortran-indent-subprogram | ||
| 2908 | The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command | ||
| 2909 | to reindent all the lines of the Fortran subprogram (function or | ||
| 2910 | subroutine) containing point. | ||
| 2911 | |||
| 2912 | @kindex C-M-j @r{(Fortran mode)} | ||
| 2913 | @findex fortran-split-line | ||
| 2914 | The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits | ||
| 2915 | a line in the appropriate fashion for Fortran. In a non-comment line, | ||
| 2916 | the second half becomes a continuation line and is indented | ||
| 2917 | accordingly. In a comment line, both halves become separate comment | ||
| 2918 | lines. | ||
| 2919 | |||
| 2920 | @kindex M-^ @r{(Fortran mode)} | ||
| 2921 | @kindex C-c C-d @r{(Fortran mode)} | ||
| 2922 | @findex fortran-join-line | ||
| 2923 | @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line}, | ||
| 2924 | which joins a continuation line back to the previous line, roughly as | ||
| 2925 | the inverse of @code{fortran-split-line}. The point must be on a | ||
| 2926 | continuation line when this command is invoked. | ||
| 2927 | |||
| 2928 | @kindex M-q @r{(Fortran mode)} | ||
| 2929 | @kbd{M-q} in Fortran mode fills the comment block or statement that | ||
| 2930 | point is in. This removes any excess statement continuations. | ||
| 2931 | |||
| 2932 | @node ForIndent Cont | ||
| 2933 | @subsection Continuation Lines | ||
| 2934 | @cindex Fortran continuation lines | ||
| 2935 | |||
| 2936 | @vindex fortran-continuation-string | ||
| 2937 | Most Fortran77 compilers allow two ways of writing continuation lines. | ||
| 2938 | If the first non-space character on a line is in column 5, then that | ||
| 2939 | line is a continuation of the previous line. We call this @dfn{fixed | ||
| 2940 | format}. (In GNU Emacs we always count columns from 0; but note that | ||
| 2941 | the Fortran standard counts from 1.) The variable | ||
| 2942 | @code{fortran-continuation-string} specifies what character to put in | ||
| 2943 | column 5. A line that starts with a tab character followed by any digit | ||
| 2944 | except @samp{0} is also a continuation line. We call this style of | ||
| 2945 | continuation @dfn{tab format}. (Fortran90 introduced ``free format'', | ||
| 2946 | with another style of continuation lines). | ||
| 2947 | |||
| 2948 | @vindex indent-tabs-mode @r{(Fortran mode)} | ||
| 2949 | @vindex fortran-analyze-depth | ||
| 2950 | @vindex fortran-tab-mode-default | ||
| 2951 | Fortran mode can use either style of continuation line. When you | ||
| 2952 | enter Fortran mode, it tries to deduce the proper continuation style | ||
| 2953 | automatically from the buffer contents. It does this by scanning up to | ||
| 2954 | @code{fortran-analyze-depth} (default 100) lines from the start of the | ||
| 2955 | buffer. The first line that begins with either a tab character or six | ||
| 2956 | spaces determines the choice. If the scan fails (for example, if the | ||
| 2957 | buffer is new and therefore empty), the value of | ||
| 2958 | @code{fortran-tab-mode-default} (@code{nil} for fixed format, and | ||
| 2959 | non-@code{nil} for tab format) is used. @samp{/t} in the mode line | ||
| 2960 | indicates tab format is selected. Fortran mode sets the value of | ||
| 2961 | @code{indent-tabs-mode} accordingly. | ||
| 2962 | |||
| 2963 | If the text on a line starts with the Fortran continuation marker | ||
| 2964 | @samp{$}, or if it begins with any non-whitespace character in column | ||
| 2965 | 5, Fortran mode treats it as a continuation line. When you indent a | ||
| 2966 | continuation line with @key{TAB}, it converts the line to the current | ||
| 2967 | continuation style. When you split a Fortran statement with | ||
| 2968 | @kbd{C-M-j}, the continuation marker on the newline is created according | ||
| 2969 | to the continuation style. | ||
| 2970 | |||
| 2971 | The setting of continuation style affects several other aspects of | ||
| 2972 | editing in Fortran mode. In fixed format mode, the minimum column | ||
| 2973 | number for the body of a statement is 6. Lines inside of Fortran | ||
| 2974 | blocks that are indented to larger column numbers always use only the | ||
| 2975 | space character for whitespace. In tab format mode, the minimum | ||
| 2976 | column number for the statement body is 8, and the whitespace before | ||
| 2977 | column 8 must always consist of one tab character. | ||
| 2978 | |||
| 2979 | @node ForIndent Num | ||
| 2980 | @subsection Line Numbers | ||
| 2981 | |||
| 2982 | If a number is the first non-whitespace in the line, Fortran | ||
| 2983 | indentation assumes it is a line number and moves it to columns 0 | ||
| 2984 | through 4. (Columns always count from 0 in GNU Emacs.) | ||
| 2985 | |||
| 2986 | @vindex fortran-line-number-indent | ||
| 2987 | Line numbers of four digits or less are normally indented one space. | ||
| 2988 | The variable @code{fortran-line-number-indent} controls this; it | ||
| 2989 | specifies the maximum indentation a line number can have. The default | ||
| 2990 | value of the variable is 1. Fortran mode tries to prevent line number | ||
| 2991 | digits passing column 4, reducing the indentation below the specified | ||
| 2992 | maximum if necessary. If @code{fortran-line-number-indent} has the | ||
| 2993 | value 5, line numbers are right-justified to end in column 4. | ||
| 2994 | |||
| 2995 | @vindex fortran-electric-line-number | ||
| 2996 | Simply inserting a line number is enough to indent it according to | ||
| 2997 | these rules. As each digit is inserted, the indentation is recomputed. | ||
| 2998 | To turn off this feature, set the variable | ||
| 2999 | @code{fortran-electric-line-number} to @code{nil}. | ||
| 3000 | |||
| 3001 | |||
| 3002 | @node ForIndent Conv | ||
| 3003 | @subsection Syntactic Conventions | ||
| 3004 | |||
| 3005 | Fortran mode assumes that you follow certain conventions that simplify | ||
| 3006 | the task of understanding a Fortran program well enough to indent it | ||
| 3007 | properly: | ||
| 3008 | |||
| 3009 | @itemize @bullet | ||
| 3010 | @item | ||
| 3011 | Two nested @samp{do} loops never share a @samp{continue} statement. | ||
| 3012 | |||
| 3013 | @item | ||
| 3014 | Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do} | ||
| 3015 | and others are written without embedded whitespace or line breaks. | ||
| 3016 | |||
| 3017 | Fortran compilers generally ignore whitespace outside of string | ||
| 3018 | constants, but Fortran mode does not recognize these keywords if they | ||
| 3019 | are not contiguous. Constructs such as @samp{else if} or @samp{end do} | ||
| 3020 | are acceptable, but the second word should be on the same line as the | ||
| 3021 | first and not on a continuation line. | ||
| 3022 | @end itemize | ||
| 3023 | |||
| 3024 | @noindent | ||
| 3025 | If you fail to follow these conventions, the indentation commands may | ||
| 3026 | indent some lines unaesthetically. However, a correct Fortran program | ||
| 3027 | retains its meaning when reindented even if the conventions are not | ||
| 3028 | followed. | ||
| 3029 | |||
| 3030 | @node ForIndent Vars | ||
| 3031 | @subsection Variables for Fortran Indentation | ||
| 3032 | |||
| 3033 | @vindex fortran-do-indent | ||
| 3034 | @vindex fortran-if-indent | ||
| 3035 | @vindex fortran-structure-indent | ||
| 3036 | @vindex fortran-continuation-indent | ||
| 3037 | @vindex fortran-check-all-num@dots{} | ||
| 3038 | @vindex fortran-minimum-statement-indent@dots{} | ||
| 3039 | Several additional variables control how Fortran indentation works: | ||
| 3040 | |||
| 3041 | @table @code | ||
| 3042 | @item fortran-do-indent | ||
| 3043 | Extra indentation within each level of @samp{do} statement (default 3). | ||
| 3044 | |||
| 3045 | @item fortran-if-indent | ||
| 3046 | Extra indentation within each level of @samp{if}, @samp{select case}, or | ||
| 3047 | @samp{where} statements (default 3). | ||
| 3048 | |||
| 3049 | @item fortran-structure-indent | ||
| 3050 | Extra indentation within each level of @samp{structure}, @samp{union}, | ||
| 3051 | @samp{map}, or @samp{interface} statements (default 3). | ||
| 3052 | |||
| 3053 | @item fortran-continuation-indent | ||
| 3054 | Extra indentation for bodies of continuation lines (default 5). | ||
| 3055 | |||
| 3056 | @item fortran-check-all-num-for-matching-do | ||
| 3057 | In Fortran77, a numbered @samp{do} statement is ended by any statement | ||
| 3058 | with a matching line number. It is common (but not compulsory) to use a | ||
| 3059 | @samp{continue} statement for this purpose. If this variable has a | ||
| 3060 | non-@code{nil} value, indenting any numbered statement must check for a | ||
| 3061 | @samp{do} that ends there. If you always end @samp{do} statements with | ||
| 3062 | a @samp{continue} line (or if you use the more modern @samp{enddo}), | ||
| 3063 | then you can speed up indentation by setting this variable to | ||
| 3064 | @code{nil}. The default is @code{nil}. | ||
| 3065 | |||
| 3066 | @item fortran-blink-matching-if | ||
| 3067 | If this is @code{t}, indenting an @samp{endif} (or @samp{enddo} | ||
| 3068 | statement moves the cursor momentarily to the matching @samp{if} (or | ||
| 3069 | @samp{do}) statement to show where it is. The default is @code{nil}. | ||
| 3070 | |||
| 3071 | @item fortran-minimum-statement-indent-fixed | ||
| 3072 | Minimum indentation for Fortran statements when using fixed format | ||
| 3073 | continuation line style. Statement bodies are never indented less than | ||
| 3074 | this much. The default is 6. | ||
| 3075 | |||
| 3076 | @item fortran-minimum-statement-indent-tab | ||
| 3077 | Minimum indentation for Fortran statements for tab format continuation line | ||
| 3078 | style. Statement bodies are never indented less than this much. The | ||
| 3079 | default is 8. | ||
| 3080 | @end table | ||
| 3081 | |||
| 3082 | The variables controlling the indentation of comments are described in | ||
| 3083 | the following section. | ||
| 3084 | |||
| 3085 | @node Fortran Comments | ||
| 3086 | @section Fortran Comments | ||
| 3087 | |||
| 3088 | The usual Emacs comment commands assume that a comment can follow a | ||
| 3089 | line of code. In Fortran77, the standard comment syntax requires an | ||
| 3090 | entire line to be just a comment. Therefore, Fortran mode replaces the | ||
| 3091 | standard Emacs comment commands and defines some new variables. | ||
| 3092 | |||
| 3093 | @vindex fortran-comment-line-start | ||
| 3094 | Fortran mode can also handle the Fortran90 comment syntax where comments | ||
| 3095 | start with @samp{!} and can follow other text. Because only some Fortran77 | ||
| 3096 | compilers accept this syntax, Fortran mode will not insert such comments | ||
| 3097 | unless you have said in advance to do so. To do this, set the variable | ||
| 3098 | @code{fortran-comment-line-start} to @samp{"!"}. | ||
| 3099 | |||
| 3100 | @table @kbd | ||
| 3101 | @item M-; | ||
| 3102 | Align comment or insert new comment (@code{fortran-indent-comment}). | ||
| 3103 | |||
| 3104 | @item C-x ; | ||
| 3105 | Applies to nonstandard @samp{!} comments only. | ||
| 3106 | |||
| 3107 | @item C-c ; | ||
| 3108 | Turn all lines of the region into comments, or (with argument) turn them back | ||
| 3109 | into real code (@code{fortran-comment-region}). | ||
| 3110 | @end table | ||
| 3111 | |||
| 3112 | @findex fortran-indent-comment | ||
| 3113 | @kbd{M-;} in Fortran mode is redefined as the command | ||
| 3114 | @code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this | ||
| 3115 | recognizes any kind of existing comment and aligns its text appropriately; | ||
| 3116 | if there is no existing comment, a comment is inserted and aligned. But | ||
| 3117 | inserting and aligning comments are not the same in Fortran mode as in | ||
| 3118 | other modes. | ||
| 3119 | |||
| 3120 | When a new comment must be inserted, if the current line is blank, a | ||
| 3121 | full-line comment is inserted. On a non-blank line, a nonstandard @samp{!} | ||
| 3122 | comment is inserted if you have said you want to use them. Otherwise a | ||
| 3123 | full-line comment is inserted on a new line before the current line. | ||
| 3124 | |||
| 3125 | Nonstandard @samp{!} comments are aligned like comments in other | ||
| 3126 | languages, but full-line comments are different. In a standard full-line | ||
| 3127 | comment, the comment delimiter itself must always appear in column zero. | ||
| 3128 | What can be aligned is the text within the comment. You can choose from | ||
| 3129 | three styles of alignment by setting the variable | ||
| 3130 | @code{fortran-comment-indent-style} to one of these values: | ||
| 3131 | |||
| 3132 | @vindex fortran-comment-indent-style | ||
| 3133 | @vindex fortran-comment-line-extra-indent | ||
| 3134 | @table @code | ||
| 3135 | @item fixed | ||
| 3136 | Align the text at a fixed column, which is the sum of | ||
| 3137 | @code{fortran-comment-line-extra-indent} and the minimum statement | ||
| 3138 | indentation. This is the default. | ||
| 3139 | |||
| 3140 | The minimum statement indentation is | ||
| 3141 | @code{fortran-minimum-statement-indent-fixed} for fixed format | ||
| 3142 | continuation line style and @code{fortran-minimum-statement-indent-tab} | ||
| 3143 | for tab format style. | ||
| 3144 | |||
| 3145 | @item relative | ||
| 3146 | Align the text as if it were a line of code, but with an additional | ||
| 3147 | @code{fortran-comment-line-extra-indent} columns of indentation. | ||
| 3148 | |||
| 3149 | @item nil | ||
| 3150 | Don't move text in full-line comments automatically. | ||
| 3151 | @end table | ||
| 3152 | |||
| 3153 | @vindex fortran-comment-indent-char | ||
| 3154 | In addition, you can specify the character to be used to indent within | ||
| 3155 | full-line comments by setting the variable | ||
| 3156 | @code{fortran-comment-indent-char} to the single-character string you want | ||
| 3157 | to use. | ||
| 3158 | |||
| 3159 | @vindex fortran-directive-re | ||
| 3160 | Compiler directive lines, or preprocessor lines, have much the same | ||
| 3161 | appearance as comment lines. It is important, though, that such lines | ||
| 3162 | never be indented at all, no matter what the value of | ||
| 3163 | @code{fortran-comment-indent-style}. The variable | ||
| 3164 | @code{fortran-directive-re} is a regular expression that specifies which | ||
| 3165 | lines are directives. Matching lines are never indented, and receive | ||
| 3166 | distinctive font-locking. | ||
| 3167 | |||
| 3168 | The normal Emacs comment command @kbd{C-x ;} has not been redefined. If | ||
| 3169 | you use @samp{!} comments, this command can be used with them. Otherwise | ||
| 3170 | it is useless in Fortran mode. | ||
| 3171 | |||
| 3172 | @kindex C-c ; @r{(Fortran mode)} | ||
| 3173 | @findex fortran-comment-region | ||
| 3174 | @vindex fortran-comment-region | ||
| 3175 | The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the | ||
| 3176 | lines of the region into comments by inserting the string @samp{C$$$} at | ||
| 3177 | the front of each one. With a numeric argument, it turns the region | ||
| 3178 | back into live code by deleting @samp{C$$$} from the front of each line | ||
| 3179 | in it. The string used for these comments can be controlled by setting | ||
| 3180 | the variable @code{fortran-comment-region}. Note that here we have an | ||
| 3181 | example of a command and a variable with the same name; these two uses | ||
| 3182 | of the name never conflict because in Lisp and in Emacs it is always | ||
| 3183 | clear from the context which one is meant. | ||
| 3184 | |||
| 3185 | @node Fortran Autofill | ||
| 3186 | @section Auto Fill in Fortran Mode | ||
| 3187 | |||
| 3188 | Fortran mode has specialized support for Auto Fill mode, which is a | ||
| 3189 | minor mode that automatically splits statements as you insert them | ||
| 3190 | when they become too wide. Splitting a statement involves making | ||
| 3191 | continuation lines using @code{fortran-continuation-string} | ||
| 3192 | (@pxref{ForIndent Cont}). This splitting happens when you type | ||
| 3193 | @key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran | ||
| 3194 | indentation commands. You activate Auto Fill in Fortran mode in the | ||
| 3195 | normal way. @xref{Auto Fill,,, emacs, the Emacs Manual}. | ||
| 3196 | |||
| 3197 | @vindex fortran-break-before-delimiters | ||
| 3198 | Auto Fill breaks lines at spaces or delimiters when the lines get | ||
| 3199 | longer than the desired width (the value of @code{fill-column}). The | ||
| 3200 | delimiters (besides whitespace) that Auto Fill can break at are | ||
| 3201 | @samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>}, | ||
| 3202 | and @samp{,}. The line break comes after the delimiter if the | ||
| 3203 | variable @code{fortran-break-before-delimiters} is @code{nil}. | ||
| 3204 | Otherwise (and by default), the break comes before the delimiter. | ||
| 3205 | |||
| 3206 | To enable Auto Fill in all Fortran buffers, add | ||
| 3207 | @code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks,,, | ||
| 3208 | emacs, the Emacs Manual}. | ||
| 3209 | |||
| 3210 | @node Fortran Columns | ||
| 3211 | @section Checking Columns in Fortran | ||
| 3212 | |||
| 3213 | @table @kbd | ||
| 3214 | @item C-c C-r | ||
| 3215 | Display a ``column ruler'' momentarily above the current line | ||
| 3216 | (@code{fortran-column-ruler}). | ||
| 3217 | @item C-c C-w | ||
| 3218 | Split the current window horizontally temporarily so that it is 72 | ||
| 3219 | columns wide (@code{fortran-window-create-momentarily}). This may | ||
| 3220 | help you avoid making lines longer than the 72-character limit that | ||
| 3221 | some Fortran compilers impose. | ||
| 3222 | @item C-u C-c C-w | ||
| 3223 | Split the current window horizontally so that it is 72 columns wide | ||
| 3224 | (@code{fortran-window-create}). You can then continue editing. | ||
| 3225 | @item M-x fortran-strip-sequence-nos | ||
| 3226 | Delete all text in column 72 and beyond. | ||
| 3227 | @end table | ||
| 3228 | |||
| 3229 | @kindex C-c C-r @r{(Fortran mode)} | ||
| 3230 | @findex fortran-column-ruler | ||
| 3231 | The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column | ||
| 3232 | ruler momentarily above the current line. The comment ruler is two lines | ||
| 3233 | of text that show you the locations of columns with special significance in | ||
| 3234 | Fortran programs. Square brackets show the limits of the columns for line | ||
| 3235 | numbers, and curly brackets show the limits of the columns for the | ||
| 3236 | statement body. Column numbers appear above them. | ||
| 3237 | |||
| 3238 | Note that the column numbers count from zero, as always in GNU Emacs. | ||
| 3239 | As a result, the numbers may be one less than those you are familiar | ||
| 3240 | with; but the positions they indicate in the line are standard for | ||
| 3241 | Fortran. | ||
| 3242 | |||
| 3243 | @vindex fortran-column-ruler-fixed | ||
| 3244 | @vindex fortran-column-ruler-tabs | ||
| 3245 | The text used to display the column ruler depends on the value of the | ||
| 3246 | variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is | ||
| 3247 | @code{nil}, then the value of the variable | ||
| 3248 | @code{fortran-column-ruler-fixed} is used as the column ruler. | ||
| 3249 | Otherwise, the value of the variable @code{fortran-column-ruler-tab} is | ||
| 3250 | displayed. By changing these variables, you can change the column ruler | ||
| 3251 | display. | ||
| 3252 | |||
| 3253 | @kindex C-c C-w @r{(Fortran mode)} | ||
| 3254 | @findex fortran-window-create-momentarily | ||
| 3255 | @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily | ||
| 3256 | splits the current window horizontally, making a window 72 columns | ||
| 3257 | wide, so you can see any lines that are too long. Type a space to | ||
| 3258 | restore the normal width. | ||
| 3259 | |||
| 3260 | @kindex C-u C-c C-w @r{(Fortran mode)} | ||
| 3261 | @findex fortran-window-create | ||
| 3262 | You can also split the window horizontally and continue editing with | ||
| 3263 | the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x | ||
| 3264 | fortran-window-create}). By editing in this window you can | ||
| 3265 | immediately see when you make a line too wide to be correct Fortran. | ||
| 3266 | |||
| 3267 | @findex fortran-strip-sequence-nos | ||
| 3268 | The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in | ||
| 3269 | column 72 and beyond, on all lines in the current buffer. This is the | ||
| 3270 | easiest way to get rid of old sequence numbers. | ||
| 3271 | |||
| 3272 | @node Fortran Abbrev | ||
| 3273 | @section Fortran Keyword Abbrevs | ||
| 3274 | |||
| 3275 | Fortran mode provides many built-in abbrevs for common keywords and | ||
| 3276 | declarations. These are the same sort of abbrev that you can define | ||
| 3277 | yourself. To use them, you must turn on Abbrev mode. | ||
| 3278 | @xref{Abbrevs,,, emacs, the Emacs Manual}. | ||
| 3279 | |||
| 3280 | The built-in abbrevs are unusual in one way: they all start with a | ||
| 3281 | semicolon. You cannot normally use semicolon in an abbrev, but Fortran | ||
| 3282 | mode makes this possible by changing the syntax of semicolon to ``word | ||
| 3283 | constituent.'' | ||
| 3284 | |||
| 3285 | For example, one built-in Fortran abbrev is @samp{;c} for | ||
| 3286 | @samp{continue}. If you insert @samp{;c} and then insert a punctuation | ||
| 3287 | character such as a space or a newline, the @samp{;c} expands automatically | ||
| 3288 | to @samp{continue}, provided Abbrev mode is enabled.@refill | ||
| 3289 | |||
| 3290 | Type @samp{;?} or @samp{;C-h} to display a list of all the built-in | ||
| 3291 | Fortran abbrevs and what they stand for. | ||
| 3292 | |||
| 3293 | |||
| 3294 | @node MS-DOG | ||
| 3295 | @chapter Emacs and MS-DOS | ||
| 3296 | @cindex MS-DOG | ||
| 3297 | @cindex MS-DOS peculiarities | ||
| 3298 | |||
| 3299 | This section briefly describes the peculiarities of using Emacs on | ||
| 3300 | the MS-DOS ``operating system'' (also known as ``MS-DOG''). | ||
| 3301 | Information about Emacs and Microsoft's current operating system | ||
| 3302 | Windows (also known as ``Losedows) is in the main Emacs manual | ||
| 3303 | (@pxref{Emacs and Microsoft Systems,,, emacs, the Emacs Manual}). | ||
| 3304 | |||
| 3305 | If you build Emacs for MS-DOS, the binary will also run on Windows | ||
| 3306 | 3.X, Windows NT, Windows 9X/ME, Windows 2000, or OS/2 as a DOS | ||
| 3307 | application; all of this chapter applies for all of those systems, if | ||
| 3308 | you use an Emacs that was built for MS-DOS. | ||
| 3309 | |||
| 3310 | @xref{Text and Binary,,,emacs, the Emacs Manual}, for information | ||
| 3311 | about Emacs' special handling of text files under MS-DOS (and | ||
| 3312 | Windows). | ||
| 3313 | |||
| 3314 | @menu | ||
| 3315 | * Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS. | ||
| 3316 | * Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS. | ||
| 3317 | * Display: MS-DOS Display. Fonts, frames and display size on MS-DOS. | ||
| 3318 | * Files: MS-DOS File Names. File name conventions on MS-DOS. | ||
| 3319 | * Printing: MS-DOS Printing. Printing specifics on MS-DOS. | ||
| 3320 | * I18N: MS-DOS and MULE. Support for internationalization on MS-DOS. | ||
| 3321 | * Processes: MS-DOS Processes. Running subprocesses on MS-DOS. | ||
| 3322 | @end menu | ||
| 3323 | |||
| 3324 | @node MS-DOS Keyboard | ||
| 3325 | @section Keyboard Usage on MS-DOS | ||
| 3326 | |||
| 3327 | @kindex DEL @r{(MS-DOS)} | ||
| 3328 | @kindex BS @r{(MS-DOS)} | ||
| 3329 | The key that is called @key{DEL} in Emacs (because that's how it is | ||
| 3330 | designated on most workstations) is known as @key{BS} (backspace) on a | ||
| 3331 | PC. That is why the PC-specific terminal initialization remaps the | ||
| 3332 | @key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act | ||
| 3333 | as @kbd{C-d} for the same reasons. | ||
| 3334 | |||
| 3335 | @kindex C-g @r{(MS-DOS)} | ||
| 3336 | @kindex C-BREAK @r{(MS-DOS)} | ||
| 3337 | @cindex quitting on MS-DOS | ||
| 3338 | Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit | ||
| 3339 | character, just like @kbd{C-g}. This is because Emacs cannot detect | ||
| 3340 | that you have typed @kbd{C-g} until it is ready for more input. As a | ||
| 3341 | consequence, you cannot use @kbd{C-g} to stop a running command | ||
| 3342 | (@pxref{Quitting,,,emacs, the Emacs Manual}). By contrast, | ||
| 3343 | @kbd{C-@key{BREAK}} @emph{is} detected as soon as you type it (as | ||
| 3344 | @kbd{C-g} is on other systems), so it can be used to stop a running | ||
| 3345 | command and for emergency escape (@pxref{Emergency Escape,,,emacs, the | ||
| 3346 | Emacs Manual}). | ||
| 3347 | |||
| 3348 | @cindex Meta (under MS-DOS) | ||
| 3349 | @cindex Hyper (under MS-DOS) | ||
| 3350 | @cindex Super (under MS-DOS) | ||
| 3351 | @vindex dos-super-key | ||
| 3352 | @vindex dos-hyper-key | ||
| 3353 | The PC keyboard maps use the left @key{ALT} key as the @key{META} key. | ||
| 3354 | You have two choices for emulating the @key{SUPER} and @key{HYPER} keys: | ||
| 3355 | choose either the right @key{CTRL} key or the right @key{ALT} key by | ||
| 3356 | setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 | ||
| 3357 | or 2 respectively. If neither @code{dos-super-key} nor | ||
| 3358 | @code{dos-hyper-key} is 1, then by default the right @key{ALT} key is | ||
| 3359 | also mapped to the @key{META} key. However, if the MS-DOS international | ||
| 3360 | keyboard support program @file{KEYB.COM} is installed, Emacs will | ||
| 3361 | @emph{not} map the right @key{ALT} to @key{META}, since it is used for | ||
| 3362 | accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard | ||
| 3363 | layouts; in this case, you may only use the left @key{ALT} as @key{META} | ||
| 3364 | key. | ||
| 3365 | |||
| 3366 | @kindex C-j @r{(MS-DOS)} | ||
| 3367 | @vindex dos-keypad-mode | ||
| 3368 | The variable @code{dos-keypad-mode} is a flag variable that controls | ||
| 3369 | what key codes are returned by keys in the numeric keypad. You can also | ||
| 3370 | define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the | ||
| 3371 | following line into your @file{_emacs} file: | ||
| 3372 | |||
| 3373 | @smallexample | ||
| 3374 | ;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.} | ||
| 3375 | (define-key function-key-map [kp-enter] [?\C-j]) | ||
| 3376 | @end smallexample | ||
| 3377 | |||
| 3378 | @node MS-DOS Mouse | ||
| 3379 | @section Mouse Usage on MS-DOS | ||
| 3380 | |||
| 3381 | @cindex mouse support under MS-DOS | ||
| 3382 | Emacs on MS-DOS supports a mouse (on the default terminal only). | ||
| 3383 | The mouse commands work as documented, including those that use menus | ||
| 3384 | and the menu bar (@pxref{Menu Bar,,,emacs, the Emacs Manual}). Scroll | ||
| 3385 | bars don't work in MS-DOS Emacs. PC mice usually have only two | ||
| 3386 | buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you | ||
| 3387 | press both of them together, that has the effect of @kbd{Mouse-3}. If | ||
| 3388 | the mouse does have 3 buttons, Emacs detects that at startup, and all | ||
| 3389 | the 3 buttons function normally, as on X. | ||
| 3390 | |||
| 3391 | Help strings for menu-bar and pop-up menus are displayed in the echo | ||
| 3392 | area when the mouse pointer moves across the menu items. Highlighting | ||
| 3393 | of mouse-sensitive text (@pxref{Mouse References,,,emacs, the Emacs | ||
| 3394 | Manual}) is also supported. | ||
| 3395 | |||
| 3396 | @cindex mouse, set number of buttons | ||
| 3397 | @findex msdos-set-mouse-buttons | ||
| 3398 | Some versions of mouse drivers don't report the number of mouse | ||
| 3399 | buttons correctly. For example, mice with a wheel report that they | ||
| 3400 | have 3 buttons, but only 2 of them are passed to Emacs; the clicks on | ||
| 3401 | the wheel, which serves as the middle button, are not passed. In | ||
| 3402 | these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command | ||
| 3403 | to tell Emacs how many mouse buttons to expect. You could make such a | ||
| 3404 | setting permanent by adding this fragment to your @file{_emacs} init | ||
| 3405 | file: | ||
| 3406 | |||
| 3407 | @example | ||
| 3408 | ;; @r{Treat the mouse like a 2-button mouse.} | ||
| 3409 | (msdos-set-mouse-buttons 2) | ||
| 3410 | @end example | ||
| 3411 | |||
| 3412 | @cindex Windows clipboard support | ||
| 3413 | Emacs built for MS-DOS supports clipboard operations when it runs on | ||
| 3414 | Windows. Commands that put text on the kill ring, or yank text from | ||
| 3415 | the ring, check the Windows clipboard first, just as Emacs does on the | ||
| 3416 | X Window System (@pxref{Mouse Commands,,,emacs, the Emacs Manual}). | ||
| 3417 | Only the primary selection and the cut buffer are supported by MS-DOS | ||
| 3418 | Emacs on Windows; the secondary selection always appears as empty. | ||
| 3419 | |||
| 3420 | Due to the way clipboard access is implemented by Windows, the | ||
| 3421 | length of text you can put into the clipboard is limited by the amount | ||
| 3422 | of free DOS memory that is available to Emacs. Usually, up to 620KB of | ||
| 3423 | text can be put into the clipboard, but this limit depends on the system | ||
| 3424 | configuration and is lower if you run Emacs as a subprocess of | ||
| 3425 | another program. If the killed text does not fit, Emacs outputs a | ||
| 3426 | message saying so, and does not put the text into the clipboard. | ||
| 3427 | |||
| 3428 | Null characters also cannot be put into the Windows clipboard. If the | ||
| 3429 | killed text includes null characters, Emacs does not put such text into | ||
| 3430 | the clipboard, and displays in the echo area a message to that effect. | ||
| 3431 | |||
| 3432 | @vindex dos-display-scancodes | ||
| 3433 | The variable @code{dos-display-scancodes}, when non-@code{nil}, | ||
| 3434 | directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of | ||
| 3435 | each keystroke; this feature serves as a complement to the | ||
| 3436 | @code{view-lossage} command, for debugging. | ||
| 3437 | |||
| 3438 | @node MS-DOS Display | ||
| 3439 | @section Display on MS-DOS | ||
| 3440 | @cindex faces under MS-DOS | ||
| 3441 | @cindex fonts, emulating under MS-DOS | ||
| 3442 | |||
| 3443 | Display on MS-DOS cannot use font variants, like bold or italic, but | ||
| 3444 | it does support multiple faces, each of which can specify a foreground | ||
| 3445 | and a background color. Therefore, you can get the full functionality | ||
| 3446 | of Emacs packages that use fonts (such as @code{font-lock}, Enriched | ||
| 3447 | Text mode, and others) by defining the relevant faces to use different | ||
| 3448 | colors. Use the @code{list-colors-display} command (@pxref{Frame | ||
| 3449 | Parameters,,,emacs, the Emacs Manual}) and the | ||
| 3450 | @code{list-faces-display} command (@pxref{Faces,,,emacs, the Emacs | ||
| 3451 | Manual}) to see what colors and faces are available and what they look | ||
| 3452 | like. | ||
| 3453 | |||
| 3454 | @xref{MS-DOS and MULE}, later in this chapter, for information on | ||
| 3455 | how Emacs displays glyphs and characters that aren't supported by the | ||
| 3456 | native font built into the DOS display. | ||
| 3457 | |||
| 3458 | @cindex cursor shape on MS-DOS | ||
| 3459 | When Emacs starts, it changes the cursor shape to a solid box. This | ||
| 3460 | is for compatibility with other systems, where the box cursor is the | ||
| 3461 | default in Emacs. This default shape can be changed to a bar by | ||
| 3462 | specifying the @code{cursor-type} parameter in the variable | ||
| 3463 | @code{default-frame-alist} (@pxref{Creating Frames,,,emacs, the Emacs | ||
| 3464 | Manual}). The MS-DOS terminal doesn't support a vertical-bar cursor, | ||
| 3465 | so the bar cursor is horizontal, and the @code{@var{width}} parameter, | ||
| 3466 | if specified by the frame parameters, actually determines its height. | ||
| 3467 | For this reason, the @code{bar} and @code{hbar} cursor types produce | ||
| 3468 | the same effect on MS-DOS. As an extension, the bar cursor | ||
| 3469 | specification can include the starting scan line of the cursor as well | ||
| 3470 | as its width, like this: | ||
| 3471 | |||
| 3472 | @example | ||
| 3473 | '(cursor-type bar @var{width} . @var{start}) | ||
| 3474 | @end example | ||
| 3475 | |||
| 3476 | @noindent | ||
| 3477 | In addition, if the @var{width} parameter is negative, the cursor bar | ||
| 3478 | begins at the top of the character cell. | ||
| 3479 | |||
| 3480 | @cindex frames on MS-DOS | ||
| 3481 | The MS-DOS terminal can only display a single frame at a time. The | ||
| 3482 | Emacs frame facilities work on MS-DOS much as they do on text-only | ||
| 3483 | terminals (@pxref{Frames,,,emacs, the Emacs Manual}). When you run | ||
| 3484 | Emacs from a DOS window on MS-Windows, you can make the visible frame | ||
| 3485 | smaller than the full screen, but Emacs still cannot display more than | ||
| 3486 | a single frame at a time. | ||
| 3487 | |||
| 3488 | @cindex frame size under MS-DOS | ||
| 3489 | @findex mode4350 | ||
| 3490 | @findex mode25 | ||
| 3491 | The @code{mode4350} command switches the display to 43 or 50 | ||
| 3492 | lines, depending on your hardware; the @code{mode25} command switches | ||
| 3493 | to the default 80x25 screen size. | ||
| 3494 | |||
| 3495 | By default, Emacs only knows how to set screen sizes of 80 columns by | ||
| 3496 | 25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has | ||
| 3497 | special video modes that will switch the display to other sizes, you can | ||
| 3498 | have Emacs support those too. When you ask Emacs to switch the frame to | ||
| 3499 | @var{n} rows by @var{m} columns dimensions, it checks if there is a | ||
| 3500 | variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so, | ||
| 3501 | uses its value (which must be an integer) as the video mode to switch | ||
| 3502 | to. (Emacs switches to that video mode by calling the BIOS @code{Set | ||
| 3503 | Video Mode} function with the value of | ||
| 3504 | @code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.) | ||
| 3505 | For example, suppose your adapter will switch to 66x80 dimensions when | ||
| 3506 | put into video mode 85. Then you can make Emacs support this screen | ||
| 3507 | size by putting the following into your @file{_emacs} file: | ||
| 3508 | |||
| 3509 | @example | ||
| 3510 | (setq screen-dimensions-66x80 85) | ||
| 3511 | @end example | ||
| 3512 | |||
| 3513 | Since Emacs on MS-DOS can only set the frame size to specific | ||
| 3514 | supported dimensions, it cannot honor every possible frame resizing | ||
| 3515 | request. When an unsupported size is requested, Emacs chooses the next | ||
| 3516 | larger supported size beyond the specified size. For example, if you | ||
| 3517 | ask for 36x80 frame, you will get 40x80 instead. | ||
| 3518 | |||
| 3519 | The variables @code{screen-dimensions-@var{n}x@var{m}} are used only | ||
| 3520 | when they exactly match the specified size; the search for the next | ||
| 3521 | larger supported size ignores them. In the above example, even if your | ||
| 3522 | VGA supports 38x80 dimensions and you define a variable | ||
| 3523 | @code{screen-dimensions-38x80} with a suitable value, you will still get | ||
| 3524 | 40x80 screen when you ask for a 36x80 frame. If you want to get the | ||
| 3525 | 38x80 size in this case, you can do it by setting the variable named | ||
| 3526 | @code{screen-dimensions-36x80} with the same video mode value as | ||
| 3527 | @code{screen-dimensions-38x80}. | ||
| 3528 | |||
| 3529 | Changing frame dimensions on MS-DOS has the effect of changing all the | ||
| 3530 | other frames to the new dimensions. | ||
| 3531 | |||
| 3532 | @node MS-DOS File Names | ||
| 3533 | @section File Names on MS-DOS | ||
| 3534 | @cindex file names under MS-DOS | ||
| 3535 | @cindex init file, default name under MS-DOS | ||
| 3536 | |||
| 3537 | On MS-DOS, file names are case-insensitive and limited to eight | ||
| 3538 | characters, plus optionally a period and three more characters. Emacs | ||
| 3539 | knows enough about these limitations to handle file names that were | ||
| 3540 | meant for other operating systems. For instance, leading dots | ||
| 3541 | @samp{.} in file names are invalid in MS-DOS, so Emacs transparently | ||
| 3542 | converts them to underscores @samp{_}; thus your default init file | ||
| 3543 | (@pxref{Init File,,,emacs, the Emacs Manual}) is called @file{_emacs} | ||
| 3544 | on MS-DOS. Excess characters before or after the period are generally | ||
| 3545 | ignored by MS-DOS itself; thus, if you visit the file | ||
| 3546 | @file{LongFileName.EvenLongerExtension}, you will silently get | ||
| 3547 | @file{longfile.eve}, but Emacs will still display the long file name | ||
| 3548 | on the mode line. Other than that, it's up to you to specify file | ||
| 3549 | names which are valid under MS-DOS; the transparent conversion as | ||
| 3550 | described above only works on file names built into Emacs. | ||
| 3551 | |||
| 3552 | @cindex backup file names on MS-DOS | ||
| 3553 | The above restrictions on the file names on MS-DOS make it almost | ||
| 3554 | impossible to construct the name of a backup file (@pxref{Backup | ||
| 3555 | Names,,,emacs, the Emacs Manual}) without losing some of the original | ||
| 3556 | file name characters. For example, the name of a backup file for | ||
| 3557 | @file{docs.txt} is @file{docs.tx~} even if single backup is used. | ||
| 3558 | |||
| 3559 | @cindex file names under Windows 95/NT | ||
| 3560 | @cindex long file names in DOS box under Windows 95/NT | ||
| 3561 | If you run Emacs as a DOS application under Windows 9X, Windows ME, or | ||
| 3562 | Windows 2000, you can turn on support for long file names. If you do | ||
| 3563 | that, Emacs doesn't truncate file names or convert them to lower case; | ||
| 3564 | instead, it uses the file names that you specify, verbatim. To enable | ||
| 3565 | long file name support, set the environment variable @env{LFN} to | ||
| 3566 | @samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow | ||
| 3567 | DOS programs to access long file names, so Emacs built for MS-DOS will | ||
| 3568 | only see their short 8+3 aliases. | ||
| 3569 | |||
| 3570 | @cindex @env{HOME} directory under MS-DOS | ||
| 3571 | MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends | ||
| 3572 | that the directory where it is installed is the value of the @env{HOME} | ||
| 3573 | environment variable. That is, if your Emacs binary, | ||
| 3574 | @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then | ||
| 3575 | Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In | ||
| 3576 | particular, that is where Emacs looks for the init file @file{_emacs}. | ||
| 3577 | With this in mind, you can use @samp{~} in file names as an alias for | ||
| 3578 | the home directory, as you would on GNU or Unix. You can also set | ||
| 3579 | @env{HOME} variable in the environment before starting Emacs; its | ||
| 3580 | value will then override the above default behavior. | ||
| 3581 | |||
| 3582 | Emacs on MS-DOS handles the directory name @file{/dev} specially, | ||
| 3583 | because of a feature in the emulator libraries of DJGPP that pretends | ||
| 3584 | I/O devices have names in that directory. We recommend that you avoid | ||
| 3585 | using an actual directory named @file{/dev} on any disk. | ||
| 3586 | |||
| 3587 | @node MS-DOS Printing | ||
| 3588 | @section Printing and MS-DOS | ||
| 3589 | |||
| 3590 | Printing commands, such as @code{lpr-buffer} | ||
| 3591 | (@pxref{Printing,,,emacs, the Emacs Manual}) and | ||
| 3592 | @code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}) | ||
| 3593 | can work on MS-DOS by sending the output to one of the printer ports, | ||
| 3594 | if a Posix-style @code{lpr} program is unavailable. The same Emacs | ||
| 3595 | variables control printing on all systems, but in some cases they have | ||
| 3596 | different default values on MS-DOS. | ||
| 3597 | |||
| 3598 | @xref{MS-Windows Printing,,,emacs, the Emacs Manual}, for details. | ||
| 3599 | |||
| 3600 | Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even | ||
| 3601 | though they are connected to a Windows machine which uses a different | ||
| 3602 | encoding for the same locale. For example, in the Latin-1 locale, DOS | ||
| 3603 | uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and | ||
| 3604 | MULE}. When you print to such printers from Windows, you can use the | ||
| 3605 | @kbd{C-x RET c} (@code{universal-coding-system-argument}) command before | ||
| 3606 | @kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS | ||
| 3607 | codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET | ||
| 3608 | M-x lpr-region RET} will print the region while converting it to the | ||
| 3609 | codepage 850 encoding. You may need to create the @code{cp@var{nnn}} | ||
| 3610 | coding system with @kbd{M-x codepage-setup}. | ||
| 3611 | |||
| 3612 | @vindex dos-printer | ||
| 3613 | @vindex dos-ps-printer | ||
| 3614 | For backwards compatibility, the value of @code{dos-printer} | ||
| 3615 | (@code{dos-ps-printer}), if it has a value, overrides the value of | ||
| 3616 | @code{printer-name} (@code{ps-printer-name}), on MS-DOS. | ||
| 3617 | |||
| 3618 | |||
| 3619 | @node MS-DOS and MULE | ||
| 3620 | @section International Support on MS-DOS | ||
| 3621 | @cindex international support @r{(MS-DOS)} | ||
| 3622 | |||
| 3623 | Emacs on MS-DOS supports the same international character sets as it | ||
| 3624 | does on GNU, Unix and other platforms (@pxref{International,,,emacs, | ||
| 3625 | the Emacs Manual}), including coding systems for converting between | ||
| 3626 | the different character sets. However, due to incompatibilities | ||
| 3627 | between MS-DOS/MS-Windows and other systems, there are several | ||
| 3628 | DOS-specific aspects of this support that you should be aware of. | ||
| 3629 | This section describes these aspects. | ||
| 3630 | |||
| 3631 | The description below is largely specific to the MS-DOS port of | ||
| 3632 | Emacs, especially where it talks about practical implications for | ||
| 3633 | Emacs users. For other operating systems, see the @file{code-pages.el} | ||
| 3634 | package, which implements support for MS-DOS- and MS-Windows-specific | ||
| 3635 | encodings for all platforms other than MS-DOS. | ||
| 3636 | |||
| 3637 | @table @kbd | ||
| 3638 | @item M-x dos-codepage-setup | ||
| 3639 | Set up Emacs display and coding systems as appropriate for the current | ||
| 3640 | DOS codepage. | ||
| 3641 | |||
| 3642 | @item M-x codepage-setup | ||
| 3643 | Create a coding system for a certain DOS codepage. | ||
| 3644 | @end table | ||
| 3645 | |||
| 3646 | @cindex codepage, MS-DOS | ||
| 3647 | @cindex DOS codepages | ||
| 3648 | MS-DOS is designed to support one character set of 256 characters at | ||
| 3649 | any given time, but gives you a variety of character sets to choose | ||
| 3650 | from. The alternative character sets are known as @dfn{DOS codepages}. | ||
| 3651 | Each codepage includes all 128 @acronym{ASCII} characters, but the other 128 | ||
| 3652 | characters (codes 128 through 255) vary from one codepage to another. | ||
| 3653 | Each DOS codepage is identified by a 3-digit number, such as 850, 862, | ||
| 3654 | etc. | ||
| 3655 | |||
| 3656 | In contrast to X, which lets you use several fonts at the same time, | ||
| 3657 | MS-DOS normally doesn't allow use of several codepages in a single | ||
| 3658 | session. MS-DOS was designed to load a single codepage at system | ||
| 3659 | startup, and require you to reboot in order to change | ||
| 3660 | it@footnote{Normally, one particular codepage is burnt into the | ||
| 3661 | display memory, while other codepages can be installed by modifying | ||
| 3662 | system configuration files, such as @file{CONFIG.SYS}, and rebooting. | ||
| 3663 | While there is third-party software that allows changing the codepage | ||
| 3664 | without rebooting, we describe here how a stock MS-DOS system | ||
| 3665 | behaves.}. Much the same limitation applies when you run DOS | ||
| 3666 | executables on other systems such as MS-Windows. | ||
| 3667 | |||
| 3668 | @cindex unibyte operation @r{(MS-DOS)} | ||
| 3669 | If you invoke Emacs on MS-DOS with the @samp{--unibyte} option | ||
| 3670 | (@pxref{Initial Options,,,emacs, the Emacs Manual}), Emacs does not | ||
| 3671 | perform any conversion of non-@acronym{ASCII} characters. Instead, it | ||
| 3672 | reads and writes any non-@acronym{ASCII} characters verbatim, and | ||
| 3673 | sends their 8-bit codes to the display verbatim. Thus, unibyte Emacs | ||
| 3674 | on MS-DOS supports the current codepage, whatever it may be, but | ||
| 3675 | cannot even represent any other characters. | ||
| 3676 | |||
| 3677 | @vindex dos-codepage | ||
| 3678 | For multibyte operation on MS-DOS, Emacs needs to know which | ||
| 3679 | characters the chosen DOS codepage can display. So it queries the | ||
| 3680 | system shortly after startup to get the chosen codepage number, and | ||
| 3681 | stores the number in the variable @code{dos-codepage}. Some systems | ||
| 3682 | return the default value 437 for the current codepage, even though the | ||
| 3683 | actual codepage is different. (This typically happens when you use the | ||
| 3684 | codepage built into the display hardware.) You can specify a different | ||
| 3685 | codepage for Emacs to use by setting the variable @code{dos-codepage} in | ||
| 3686 | your init file. | ||
| 3687 | |||
| 3688 | @cindex language environment, automatic selection on @r{MS-DOS} | ||
| 3689 | Multibyte Emacs supports only certain DOS codepages: those which can | ||
| 3690 | display Far-Eastern scripts, like the Japanese codepage 932, and those | ||
| 3691 | that encode a single ISO 8859 character set. | ||
| 3692 | |||
| 3693 | The Far-Eastern codepages can directly display one of the MULE | ||
| 3694 | character sets for these countries, so Emacs simply sets up to use the | ||
| 3695 | appropriate terminal coding system that is supported by the codepage. | ||
| 3696 | The special features described in the rest of this section mostly | ||
| 3697 | pertain to codepages that encode ISO 8859 character sets. | ||
| 3698 | |||
| 3699 | For the codepages which correspond to one of the ISO character sets, | ||
| 3700 | Emacs knows the character set name based on the codepage number. Emacs | ||
| 3701 | automatically creates a coding system to support reading and writing | ||
| 3702 | files that use the current codepage, and uses this coding system by | ||
| 3703 | default. The name of this coding system is @code{cp@var{nnn}}, where | ||
| 3704 | @var{nnn} is the codepage number.@footnote{The standard Emacs coding | ||
| 3705 | systems for ISO 8859 are not quite right for the purpose, because | ||
| 3706 | typically the DOS codepage does not match the standard ISO character | ||
| 3707 | codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has | ||
| 3708 | code 231 in the standard Latin-1 character set, but the corresponding | ||
| 3709 | DOS codepage 850 uses code 135 for this glyph.} | ||
| 3710 | |||
| 3711 | @cindex mode line @r{(MS-DOS)} | ||
| 3712 | All the @code{cp@var{nnn}} coding systems use the letter @samp{D} | ||
| 3713 | (for ``DOS'') as their mode-line mnemonic. Since both the terminal | ||
| 3714 | coding system and the default coding system for file I/O are set to | ||
| 3715 | the proper @code{cp@var{nnn}} coding system at startup, it is normal | ||
| 3716 | for the mode line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode | ||
| 3717 | Line,,,emacs, the Emacs Manual}. Far-Eastern DOS terminals do not use | ||
| 3718 | the @code{cp@var{nnn}} coding systems, and thus their initial mode | ||
| 3719 | line looks like the Emacs default. | ||
| 3720 | |||
| 3721 | Since the codepage number also indicates which script you are using, | ||
| 3722 | Emacs automatically runs @code{set-language-environment} to select the | ||
| 3723 | language environment for that script (@pxref{Language | ||
| 3724 | Environments,,,emacs, the Emacs Manual}). | ||
| 3725 | |||
| 3726 | If a buffer contains a character belonging to some other ISO 8859 | ||
| 3727 | character set, not the one that the chosen DOS codepage supports, Emacs | ||
| 3728 | displays it using a sequence of @acronym{ASCII} characters. For example, if the | ||
| 3729 | current codepage doesn't have a glyph for the letter @samp{@`o} (small | ||
| 3730 | @samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where | ||
| 3731 | the braces serve as a visual indication that this is a single character. | ||
| 3732 | (This may look awkward for some non-Latin characters, such as those from | ||
| 3733 | Greek or Hebrew alphabets, but it is still readable by a person who | ||
| 3734 | knows the language.) Even though the character may occupy several | ||
| 3735 | columns on the screen, it is really still just a single character, and | ||
| 3736 | all Emacs commands treat it as one. | ||
| 3737 | |||
| 3738 | @cindex IBM graphics characters (MS-DOS) | ||
| 3739 | @cindex box-drawing characters (MS-DOS) | ||
| 3740 | @cindex line-drawing characters (MS-DOS) | ||
| 3741 | Not all characters in DOS codepages correspond to ISO 8859 | ||
| 3742 | characters---some are used for other purposes, such as box-drawing | ||
| 3743 | characters and other graphics. Emacs maps these characters to two | ||
| 3744 | special character sets called @code{eight-bit-control} and | ||
| 3745 | @code{eight-bit-graphic}, and displays them as their IBM glyphs. | ||
| 3746 | However, you should be aware that other systems might display these | ||
| 3747 | characters differently, so you should avoid them in text that might be | ||
| 3748 | copied to a different operating system, or even to another DOS machine | ||
| 3749 | that uses a different codepage. | ||
| 3750 | |||
| 3751 | @vindex dos-unsupported-character-glyph | ||
| 3752 | Emacs supports many other characters sets aside from ISO 8859, but it | ||
| 3753 | cannot display them on MS-DOS. So if one of these multibyte characters | ||
| 3754 | appears in a buffer, Emacs on MS-DOS displays them as specified by the | ||
| 3755 | @code{dos-unsupported-character-glyph} variable; by default, this glyph | ||
| 3756 | is an empty triangle. Use the @kbd{C-u C-x =} command to display the | ||
| 3757 | actual code and character set of such characters. @xref{Position | ||
| 3758 | Info,,,emacs, the Emacs Manual}. | ||
| 3759 | |||
| 3760 | @findex codepage-setup | ||
| 3761 | By default, Emacs defines a coding system to support the current | ||
| 3762 | codepage. To define a coding system for some other codepage (e.g., to | ||
| 3763 | visit a file written on a DOS machine in another country), use the | ||
| 3764 | @kbd{M-x codepage-setup} command. It prompts for the 3-digit code of | ||
| 3765 | the codepage, with completion, then creates the coding system for the | ||
| 3766 | specified codepage. You can then use the new coding system to read and | ||
| 3767 | write files, but you must specify it explicitly for the file command | ||
| 3768 | when you want to use it (@pxref{Text Coding,,,emacs, the Emacs Manual}). | ||
| 3769 | |||
| 3770 | These coding systems are also useful for visiting a file encoded using | ||
| 3771 | a DOS codepage, using Emacs running on some other operating system. | ||
| 3772 | |||
| 3773 | @cindex MS-Windows codepages | ||
| 3774 | MS-Windows provides its own codepages, which are different from the | ||
| 3775 | DOS codepages for the same locale. For example, DOS codepage 850 | ||
| 3776 | supports the same character set as Windows codepage 1252; DOS codepage | ||
| 3777 | 855 supports the same character set as Windows codepage 1251, etc. | ||
| 3778 | The MS-Windows version of Emacs uses the current codepage for display | ||
| 3779 | when invoked with the @samp{-nw} option. Support for codepages in the | ||
| 3780 | Windows port of Emacs is part of the @file{code-pages.el} package. | ||
| 3781 | |||
| 3782 | @node MS-DOS Processes | ||
| 3783 | @section Subprocesses on MS-DOS | ||
| 3784 | |||
| 3785 | @cindex compilation under MS-DOS | ||
| 3786 | @cindex inferior processes under MS-DOS | ||
| 3787 | @findex compile @r{(MS-DOS)} | ||
| 3788 | @findex grep @r{(MS-DOS)} | ||
| 3789 | Because MS-DOS is a single-process ``operating system,'' | ||
| 3790 | asynchronous subprocesses are not available. In particular, Shell | ||
| 3791 | mode and its variants do not work. Most Emacs features that use | ||
| 3792 | asynchronous subprocesses also don't work on MS-DOS, including | ||
| 3793 | Shell mode and GUD. When in doubt, try and see; commands that | ||
| 3794 | don't work output an error message saying that asynchronous processes | ||
| 3795 | aren't supported. | ||
| 3796 | |||
| 3797 | Compilation under Emacs with @kbd{M-x compile}, searching files with | ||
| 3798 | @kbd{M-x grep} and displaying differences between files with @kbd{M-x | ||
| 3799 | diff} do work, by running the inferior processes synchronously. This | ||
| 3800 | means you cannot do any more editing until the inferior process | ||
| 3801 | finishes. | ||
| 3802 | |||
| 3803 | Spell checking also works, by means of special support for synchronous | ||
| 3804 | invocation of the @code{ispell} program. This is slower than the | ||
| 3805 | asynchronous invocation on other platforms | ||
| 3806 | |||
| 3807 | Instead of the Shell mode, which doesn't work on MS-DOS, you can use | ||
| 3808 | the @kbd{M-x eshell} command. This invokes the Eshell package that | ||
| 3809 | implements a Posix-like shell entirely in Emacs Lisp. | ||
| 3810 | |||
| 3811 | By contrast, Emacs compiled as a native Windows application | ||
| 3812 | @strong{does} support asynchronous subprocesses. @xref{Windows | ||
| 3813 | Processes,,,emacs, the Emacs Manual}. | ||
| 3814 | |||
| 3815 | @cindex printing under MS-DOS | ||
| 3816 | Printing commands, such as @code{lpr-buffer} | ||
| 3817 | (@pxref{Printing,,,emacs, the Emacs Manual}) and | ||
| 3818 | @code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}), | ||
| 3819 | work in MS-DOS by sending the output to one of the printer ports. | ||
| 3820 | @xref{MS-DOS Printing,,,emacs, the Emacs Manual}. | ||
| 3821 | |||
| 3822 | When you run a subprocess synchronously on MS-DOS, make sure the | ||
| 3823 | program terminates and does not try to read keyboard input. If the | ||
| 3824 | program does not terminate on its own, you will be unable to terminate | ||
| 3825 | it, because MS-DOS provides no general way to terminate a process. | ||
| 3826 | Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these | ||
| 3827 | cases. | ||
| 3828 | |||
| 3829 | Accessing files on other machines is not supported on MS-DOS. Other | ||
| 3830 | network-oriented commands such as sending mail, Web browsing, remote | ||
| 3831 | login, etc., don't work either, unless network access is built into | ||
| 3832 | MS-DOS with some network redirector. | ||
| 3833 | |||
| 3834 | @cindex directory listing on MS-DOS | ||
| 3835 | @vindex dired-listing-switches @r{(MS-DOS)} | ||
| 3836 | Dired on MS-DOS uses the @code{ls-lisp} package where other | ||
| 3837 | platforms use the system @code{ls} command. Therefore, Dired on | ||
| 3838 | MS-DOS supports only some of the possible options you can mention in | ||
| 3839 | the @code{dired-listing-switches} variable. The options that work are | ||
| 3840 | @samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S}, | ||
| 3841 | @samp{-s}, @samp{-t}, and @samp{-u}. | ||
| 3842 | |||
| 3843 | 116 | ||
| 3844 | @node Index | 117 | @node Index |
| 3845 | @unnumbered Index | 118 | @unnumbered Index |
diff --git a/man/emacs.texi b/man/emacs.texi index c058e02d8eb..94ec0cc52a6 100644 --- a/man/emacs.texi +++ b/man/emacs.texi | |||
| @@ -42,7 +42,13 @@ Software Foundation raise funds for GNU development.'' | |||
| 42 | 42 | ||
| 43 | @smallbook | 43 | @smallbook |
| 44 | 44 | ||
| 45 | @setchapternewpage odd | 45 | @c per rms and peterb, use 10pt fonts for the main text, mostly to |
| 46 | @c save on paper cost. Also do not declare @setchapternewpage odd. | ||
| 47 | @c Do this inside @tex for now, so current makeinfo does not complain. | ||
| 48 | @tex | ||
| 49 | @fonttextsize 10 | ||
| 50 | @end tex | ||
| 51 | |||
| 46 | @defcodeindex op | 52 | @defcodeindex op |
| 47 | @synindex pg cp | 53 | @synindex pg cp |
| 48 | 54 | ||
| @@ -127,7 +133,7 @@ and Sending Mail and Registers and Minibuffer. | |||
| 127 | * Glossary:: The glossary. | 133 | * Glossary:: The glossary. |
| 128 | * Antinews:: Information about Emacs version 21. | 134 | * Antinews:: Information about Emacs version 21. |
| 129 | * Mac OS:: Using Emacs in the Mac. | 135 | * Mac OS:: Using Emacs in the Mac. |
| 130 | * Emacs and Microsoft Windows:: Using Emacs on Microsoft Windows. | 136 | * Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS. |
| 131 | * Manifesto:: What's GNU? Gnu's Not Unix! | 137 | * Manifesto:: What's GNU? Gnu's Not Unix! |
| 132 | * Acknowledgments:: Major contributors to GNU Emacs. | 138 | * Acknowledgments:: Major contributors to GNU Emacs. |
| 133 | 139 | ||
| @@ -186,6 +192,10 @@ Advanced Features | |||
| 186 | * Maintaining:: Features for maintaining large programs. | 192 | * Maintaining:: Features for maintaining large programs. |
| 187 | * Abbrevs:: How to define text abbreviations to reduce | 193 | * Abbrevs:: How to define text abbreviations to reduce |
| 188 | the number of characters you must type. | 194 | the number of characters you must type. |
| 195 | @ifnottex | ||
| 196 | * Picture Mode:: Editing pictures made up of characters using | ||
| 197 | the quarter-plane screen model. | ||
| 198 | @end ifnottex | ||
| 189 | * Sending Mail:: Sending mail in Emacs. | 199 | * Sending Mail:: Sending mail in Emacs. |
| 190 | * Rmail:: Reading mail in Emacs. | 200 | * Rmail:: Reading mail in Emacs. |
| 191 | * Dired:: You can ``edit'' a directory to manage files in it. | 201 | * Dired:: You can ``edit'' a directory to manage files in it. |
| @@ -197,7 +207,6 @@ Advanced Features | |||
| 197 | * Sorting:: Sorting lines, paragraphs or pages within Emacs. | 207 | * Sorting:: Sorting lines, paragraphs or pages within Emacs. |
| 198 | * Narrowing:: Restricting display and editing to a portion | 208 | * Narrowing:: Restricting display and editing to a portion |
| 199 | of the buffer. | 209 | of the buffer. |
| 200 | * Diff Mode:: Editing diff output. | ||
| 201 | * Two-Column:: Splitting apart columns to edit them | 210 | * Two-Column:: Splitting apart columns to edit them |
| 202 | in side-by-side windows. | 211 | in side-by-side windows. |
| 203 | * Editing Binary Files::Using Hexl mode to edit binary files. | 212 | * Editing Binary Files::Using Hexl mode to edit binary files. |
| @@ -373,6 +382,7 @@ File Handling | |||
| 373 | * Version Control:: Version control systems (RCS, CVS and SCCS). | 382 | * Version Control:: Version control systems (RCS, CVS and SCCS). |
| 374 | * Directories:: Creating, deleting, and listing file directories. | 383 | * Directories:: Creating, deleting, and listing file directories. |
| 375 | * Comparing Files:: Finding where two files differ. | 384 | * Comparing Files:: Finding where two files differ. |
| 385 | * Diff Mode:: Editing diff output. | ||
| 376 | * Misc File Ops:: Other things you can do on files. | 386 | * Misc File Ops:: Other things you can do on files. |
| 377 | * Compressed Files:: Accessing compressed files. | 387 | * Compressed Files:: Accessing compressed files. |
| 378 | * File Archives:: Operating on tar, zip, jar etc. archive files. | 388 | * File Archives:: Operating on tar, zip, jar etc. archive files. |
| @@ -626,6 +636,16 @@ Abbrevs | |||
| 626 | * Dynamic Abbrevs:: Abbreviations for words already in the buffer. | 636 | * Dynamic Abbrevs:: Abbreviations for words already in the buffer. |
| 627 | * Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling. | 637 | * Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling. |
| 628 | 638 | ||
| 639 | @ifnottex | ||
| 640 | Editing Pictures | ||
| 641 | |||
| 642 | * Basic Picture:: Basic concepts and simple commands of Picture Mode. | ||
| 643 | * Insert in Picture:: Controlling direction of cursor motion | ||
| 644 | after "self-inserting" characters. | ||
| 645 | * Tabs in Picture:: Various features for tab stops and indentation. | ||
| 646 | * Rectangles in Picture:: Clearing and superimposing rectangles. | ||
| 647 | @end ifnottex | ||
| 648 | |||
| 629 | Sending Mail | 649 | Sending Mail |
| 630 | 650 | ||
| 631 | * Mail Format:: Format of the mail being composed. | 651 | * Mail Format:: Format of the mail being composed. |
| @@ -873,7 +893,7 @@ programmer, but if you are not interested in customizing, you can | |||
| 873 | ignore the customization hints. | 893 | ignore the customization hints. |
| 874 | 894 | ||
| 875 | This is primarily a reference manual, but can also be used as a | 895 | This is primarily a reference manual, but can also be used as a |
| 876 | primer. If you are a complete beginner, we recommend you start with | 896 | primer. If you are new to Emacs, we recommend you start with |
| 877 | the on-line, learn-by-doing tutorial, before reading the manual. To | 897 | the on-line, learn-by-doing tutorial, before reading the manual. To |
| 878 | run the tutorial, start Emacs and type @kbd{C-h t}. The tutorial | 898 | run the tutorial, start Emacs and type @kbd{C-h t}. The tutorial |
| 879 | describes commands, tells you when to try them, and explains the | 899 | describes commands, tells you when to try them, and explains the |
| @@ -921,8 +941,8 @@ This edition of the manual is intended for use with GNU Emacs | |||
| 921 | installed on GNU and Unix systems. GNU Emacs can also be used on VMS, | 941 | installed on GNU and Unix systems. GNU Emacs can also be used on VMS, |
| 922 | MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems. | 942 | MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems. |
| 923 | Those systems use different file name syntax; in addition, VMS and | 943 | Those systems use different file name syntax; in addition, VMS and |
| 924 | MS-DOS do not support all GNU Emacs features. @xref{Emacs and | 944 | MS-DOS do not support all GNU Emacs features. @xref{Microsoft |
| 925 | Microsoft Windows}, for information about using Emacs on Windows. | 945 | Windows}, for information about using Emacs on Windows. |
| 926 | @xref{Mac OS}, for information about using Emacs on Macintosh. We | 946 | @xref{Mac OS}, for information about using Emacs on Macintosh. We |
| 927 | don't try to describe VMS usage in this manual. | 947 | don't try to describe VMS usage in this manual. |
| 928 | @end iftex | 948 | @end iftex |
| @@ -1131,6 +1151,9 @@ while running shell commands. | |||
| 1131 | @include building.texi | 1151 | @include building.texi |
| 1132 | @include maintaining.texi | 1152 | @include maintaining.texi |
| 1133 | @include abbrevs.texi | 1153 | @include abbrevs.texi |
| 1154 | @ifnottex | ||
| 1155 | @include picture-xtra.texi | ||
| 1156 | @end ifnottex | ||
| 1134 | @include sending.texi | 1157 | @include sending.texi |
| 1135 | @include rmail.texi | 1158 | @include rmail.texi |
| 1136 | @include dired.texi | 1159 | @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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node Emerge | ||
| 8 | @section Merging Files with Emerge | ||
| 9 | @cindex Emerge | ||
| 10 | @cindex merging files | ||
| 11 | |||
| 12 | It's not unusual for programmers to get their signals crossed and | ||
| 13 | modify the same program in two different directions. To recover from | ||
| 14 | this confusion, you need to merge the two versions. Emerge makes this | ||
| 15 | easier. For other ways to compare files, see | ||
| 16 | @iftex | ||
| 17 | @ref{Comparing Files,,, emacs, the Emacs Manual}, | ||
| 18 | @end iftex | ||
| 19 | @ifnottex | ||
| 20 | @ref{Comparing Files}, | ||
| 21 | @end ifnottex | ||
| 22 | and @ref{Top, Ediff,, ediff, The Ediff Manual}. | ||
| 23 | |||
| 24 | @menu | ||
| 25 | * Overview of Emerge:: How to start Emerge. Basic concepts. | ||
| 26 | * Submodes of Emerge:: Fast mode vs. Edit mode. | ||
| 27 | Skip Prefers mode and Auto Advance mode. | ||
| 28 | * State of Difference:: You do the merge by specifying state A or B | ||
| 29 | for each difference. | ||
| 30 | * Merge Commands:: Commands for selecting a difference, | ||
| 31 | changing states of differences, etc. | ||
| 32 | * Exiting Emerge:: What to do when you've finished the merge. | ||
| 33 | * Combining in Emerge:: How to keep both alternatives for a difference. | ||
| 34 | * Fine Points of Emerge:: Misc. | ||
| 35 | @end menu | ||
| 36 | |||
| 37 | @node Overview of Emerge | ||
| 38 | @subsection Overview of Emerge | ||
| 39 | |||
| 40 | To start Emerge, run one of these four commands: | ||
| 41 | |||
| 42 | @table @kbd | ||
| 43 | @item M-x emerge-files | ||
| 44 | @findex emerge-files | ||
| 45 | Merge two specified files. | ||
| 46 | |||
| 47 | @item M-x emerge-files-with-ancestor | ||
| 48 | @findex emerge-files-with-ancestor | ||
| 49 | Merge two specified files, with reference to a common ancestor. | ||
| 50 | |||
| 51 | @item M-x emerge-buffers | ||
| 52 | @findex emerge-buffers | ||
| 53 | Merge two buffers. | ||
| 54 | |||
| 55 | @item M-x emerge-buffers-with-ancestor | ||
| 56 | @findex emerge-buffers-with-ancestor | ||
| 57 | Merge two buffers with reference to a common ancestor in a third | ||
| 58 | buffer. | ||
| 59 | @end table | ||
| 60 | |||
| 61 | @cindex merge buffer (Emerge) | ||
| 62 | @cindex A and B buffers (Emerge) | ||
| 63 | The Emerge commands compare two files or buffers, and display the | ||
| 64 | comparison in three buffers: one for each input text (the @dfn{A buffer} | ||
| 65 | and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging | ||
| 66 | takes place. The merge buffer shows the full merged text, not just the | ||
| 67 | differences. Wherever the two input texts differ, you can choose which | ||
| 68 | one of them to include in the merge buffer. | ||
| 69 | |||
| 70 | The Emerge commands that take input from existing buffers use only | ||
| 71 | the accessible portions of those buffers, if they are narrowed. | ||
| 72 | @iftex | ||
| 73 | @xref{Narrowing,,, emacs, the Emacs Manual}. | ||
| 74 | @end iftex | ||
| 75 | @ifnottex | ||
| 76 | @xref{Narrowing}. | ||
| 77 | @end ifnottex | ||
| 78 | |||
| 79 | |||
| 80 | If a common ancestor version is available, from which the two texts to | ||
| 81 | be merged were both derived, Emerge can use it to guess which | ||
| 82 | alternative is right. Wherever one current version agrees with the | ||
| 83 | ancestor, Emerge presumes that the other current version is a deliberate | ||
| 84 | change which should be kept in the merged version. Use the | ||
| 85 | @samp{with-ancestor} commands if you want to specify a common ancestor | ||
| 86 | text. These commands read three file or buffer names---variant A, | ||
| 87 | variant B, and the common ancestor. | ||
| 88 | |||
| 89 | After the comparison is done and the buffers are prepared, the | ||
| 90 | interactive merging starts. You control the merging by typing special | ||
| 91 | @dfn{merge commands} in the merge buffer (@pxref{Merge Commands}). | ||
| 92 | For each run of differences between the input texts, you can choose | ||
| 93 | which one of them to keep, or edit them both together. | ||
| 94 | |||
| 95 | The merge buffer uses a special major mode, Emerge mode, with commands | ||
| 96 | for making these choices. But you can also edit the buffer with | ||
| 97 | ordinary Emacs commands. | ||
| 98 | |||
| 99 | At any given time, the attention of Emerge is focused on one | ||
| 100 | particular difference, called the @dfn{selected} difference. This | ||
| 101 | difference is marked off in the three buffers like this: | ||
| 102 | |||
| 103 | @example | ||
| 104 | vvvvvvvvvvvvvvvvvvvv | ||
| 105 | @var{text that differs} | ||
| 106 | ^^^^^^^^^^^^^^^^^^^^ | ||
| 107 | @end example | ||
| 108 | |||
| 109 | @noindent | ||
| 110 | Emerge numbers all the differences sequentially and the mode | ||
| 111 | line always shows the number of the selected difference. | ||
| 112 | |||
| 113 | Normally, the merge buffer starts out with the A version of the text. | ||
| 114 | But when the A version of a difference agrees with the common ancestor, | ||
| 115 | then the B version is initially preferred for that difference. | ||
| 116 | |||
| 117 | Emerge leaves the merged text in the merge buffer when you exit. At | ||
| 118 | that point, you can save it in a file with @kbd{C-x C-w}. If you give a | ||
| 119 | numeric argument to @code{emerge-files} or | ||
| 120 | @code{emerge-files-with-ancestor}, it reads the name of the output file | ||
| 121 | using the minibuffer. (This is the last file name those commands read.) | ||
| 122 | Then exiting from Emerge saves the merged text in the output file. | ||
| 123 | |||
| 124 | Normally, Emerge commands save the output buffer in its file when you | ||
| 125 | exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not | ||
| 126 | save the output buffer, but you can save it yourself if you wish. | ||
| 127 | |||
| 128 | @node Submodes of Emerge | ||
| 129 | @subsection Submodes of Emerge | ||
| 130 | |||
| 131 | You can choose between two modes for giving merge commands: Fast mode | ||
| 132 | and Edit mode. In Fast mode, basic merge commands are single | ||
| 133 | characters, but ordinary Emacs commands are disabled. This is | ||
| 134 | convenient if you use only merge commands. In Edit mode, all merge | ||
| 135 | commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs | ||
| 136 | commands are also available. This allows editing the merge buffer, but | ||
| 137 | slows down Emerge operations. | ||
| 138 | |||
| 139 | Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to | ||
| 140 | Fast mode. The mode line indicates Edit and Fast modes with @samp{E} | ||
| 141 | and @samp{F}. | ||
| 142 | |||
| 143 | Emerge has two additional submodes that affect how particular merge | ||
| 144 | commands work: Auto Advance mode and Skip Prefers mode. | ||
| 145 | |||
| 146 | If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands | ||
| 147 | advance to the next difference. This lets you go through the merge | ||
| 148 | faster as long as you simply choose one of the alternatives from the | ||
| 149 | input. The mode line indicates Auto Advance mode with @samp{A}. | ||
| 150 | |||
| 151 | If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands | ||
| 152 | skip over differences in states prefer-A and prefer-B (@pxref{State of | ||
| 153 | Difference}). Thus you see only differences for which neither version | ||
| 154 | is presumed ``correct.'' The mode line indicates Skip Prefers mode with | ||
| 155 | @samp{S}. | ||
| 156 | |||
| 157 | @findex emerge-auto-advance-mode | ||
| 158 | @findex emerge-skip-prefers-mode | ||
| 159 | Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or | ||
| 160 | clear Auto Advance mode. Use @kbd{s s} | ||
| 161 | (@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode. | ||
| 162 | These commands turn on the mode with a positive argument, turns it off | ||
| 163 | with a negative or zero argument, and toggle the mode with no argument. | ||
| 164 | |||
| 165 | @node State of Difference | ||
| 166 | @subsection State of a Difference | ||
| 167 | |||
| 168 | In the merge buffer, a difference is marked with lines of @samp{v} and | ||
| 169 | @samp{^} characters. Each difference has one of these seven states: | ||
| 170 | |||
| 171 | @table @asis | ||
| 172 | @item A | ||
| 173 | The difference is showing the A version. The @kbd{a} command always | ||
| 174 | produces this state; the mode line indicates it with @samp{A}. | ||
| 175 | |||
| 176 | @item B | ||
| 177 | The difference is showing the B version. The @kbd{b} command always | ||
| 178 | produces this state; the mode line indicates it with @samp{B}. | ||
| 179 | |||
| 180 | @item default-A | ||
| 181 | @itemx default-B | ||
| 182 | The difference is showing the A or the B state by default, because you | ||
| 183 | haven't made a choice. All differences start in the default-A state | ||
| 184 | (and thus the merge buffer is a copy of the A buffer), except those for | ||
| 185 | which one alternative is ``preferred'' (see below). | ||
| 186 | |||
| 187 | When you select a difference, its state changes from default-A or | ||
| 188 | default-B to plain A or B. Thus, the selected difference never has | ||
| 189 | state default-A or default-B, and these states are never displayed in | ||
| 190 | the mode line. | ||
| 191 | |||
| 192 | The command @kbd{d a} chooses default-A as the default state, and @kbd{d | ||
| 193 | b} chooses default-B. This chosen default applies to all differences | ||
| 194 | which you haven't ever selected and for which no alternative is preferred. | ||
| 195 | If you are moving through the merge sequentially, the differences you | ||
| 196 | haven't selected are those following the selected one. Thus, while | ||
| 197 | moving sequentially, you can effectively make the A version the default | ||
| 198 | for some sections of the merge buffer and the B version the default for | ||
| 199 | others by using @kbd{d a} and @kbd{d b} between sections. | ||
| 200 | |||
| 201 | @item prefer-A | ||
| 202 | @itemx prefer-B | ||
| 203 | The difference is showing the A or B state because it is | ||
| 204 | @dfn{preferred}. This means that you haven't made an explicit choice, | ||
| 205 | but one alternative seems likely to be right because the other | ||
| 206 | alternative agrees with the common ancestor. Thus, where the A buffer | ||
| 207 | agrees with the common ancestor, the B version is preferred, because | ||
| 208 | chances are it is the one that was actually changed. | ||
| 209 | |||
| 210 | These two states are displayed in the mode line as @samp{A*} and @samp{B*}. | ||
| 211 | |||
| 212 | @item combined | ||
| 213 | The difference is showing a combination of the A and B states, as a | ||
| 214 | result of the @kbd{x c} or @kbd{x C} commands. | ||
| 215 | |||
| 216 | Once a difference is in this state, the @kbd{a} and @kbd{b} commands | ||
| 217 | don't do anything to it unless you give them a numeric argument. | ||
| 218 | |||
| 219 | The mode line displays this state as @samp{comb}. | ||
| 220 | @end table | ||
| 221 | |||
| 222 | @node Merge Commands | ||
| 223 | @subsection Merge Commands | ||
| 224 | |||
| 225 | Here are the Merge commands for Fast mode; in Edit mode, precede them | ||
| 226 | with @kbd{C-c C-c}: | ||
| 227 | |||
| 228 | @table @kbd | ||
| 229 | @item p | ||
| 230 | Select the previous difference. | ||
| 231 | |||
| 232 | @item n | ||
| 233 | Select the next difference. | ||
| 234 | |||
| 235 | @item a | ||
| 236 | Choose the A version of this difference. | ||
| 237 | |||
| 238 | @item b | ||
| 239 | Choose the B version of this difference. | ||
| 240 | |||
| 241 | @item C-u @var{n} j | ||
| 242 | Select difference number @var{n}. | ||
| 243 | |||
| 244 | @item . | ||
| 245 | Select the difference containing point. You can use this command in the | ||
| 246 | merge buffer or in the A or B buffer. | ||
| 247 | |||
| 248 | @item q | ||
| 249 | Quit---finish the merge. | ||
| 250 | |||
| 251 | @item C-] | ||
| 252 | Abort---exit merging and do not save the output. | ||
| 253 | |||
| 254 | @item f | ||
| 255 | Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.) | ||
| 256 | |||
| 257 | @item e | ||
| 258 | Go into Edit mode. | ||
| 259 | |||
| 260 | @item l | ||
| 261 | Recenter (like @kbd{C-l}) all three windows. | ||
| 262 | |||
| 263 | @item - | ||
| 264 | Specify part of a prefix numeric argument. | ||
| 265 | |||
| 266 | @item @var{digit} | ||
| 267 | Also specify part of a prefix numeric argument. | ||
| 268 | |||
| 269 | @item d a | ||
| 270 | Choose the A version as the default from here down in | ||
| 271 | the merge buffer. | ||
| 272 | |||
| 273 | @item d b | ||
| 274 | Choose the B version as the default from here down in | ||
| 275 | the merge buffer. | ||
| 276 | |||
| 277 | @item c a | ||
| 278 | Copy the A version of this difference into the kill ring. | ||
| 279 | |||
| 280 | @item c b | ||
| 281 | Copy the B version of this difference into the kill ring. | ||
| 282 | |||
| 283 | @item i a | ||
| 284 | Insert the A version of this difference at point. | ||
| 285 | |||
| 286 | @item i b | ||
| 287 | Insert the B version of this difference at point. | ||
| 288 | |||
| 289 | @item m | ||
| 290 | Put point and mark around the difference. | ||
| 291 | |||
| 292 | @item ^ | ||
| 293 | Scroll all three windows down (like @kbd{M-v}). | ||
| 294 | |||
| 295 | @item v | ||
| 296 | Scroll all three windows up (like @kbd{C-v}). | ||
| 297 | |||
| 298 | @item < | ||
| 299 | Scroll all three windows left (like @kbd{C-x <}). | ||
| 300 | |||
| 301 | @item > | ||
| 302 | Scroll all three windows right (like @kbd{C-x >}). | ||
| 303 | |||
| 304 | @item | | ||
| 305 | Reset horizontal scroll on all three windows. | ||
| 306 | |||
| 307 | @item x 1 | ||
| 308 | Shrink the merge window to one line. (Use @kbd{C-u l} to restore it | ||
| 309 | to full size.) | ||
| 310 | |||
| 311 | @item x c | ||
| 312 | Combine the two versions of this difference (@pxref{Combining in | ||
| 313 | Emerge}). | ||
| 314 | |||
| 315 | @item x f | ||
| 316 | Show the names of the files/buffers Emerge is operating on, in a Help | ||
| 317 | window. (Use @kbd{C-u l} to restore windows.) | ||
| 318 | |||
| 319 | @item x j | ||
| 320 | Join this difference with the following one. | ||
| 321 | (@kbd{C-u x j} joins this difference with the previous one.) | ||
| 322 | |||
| 323 | @item x s | ||
| 324 | Split this difference into two differences. Before you use this | ||
| 325 | command, position point in each of the three buffers at the place where | ||
| 326 | you want to split the difference. | ||
| 327 | |||
| 328 | @item x t | ||
| 329 | Trim identical lines off the top and bottom of the difference. | ||
| 330 | Such lines occur when the A and B versions are | ||
| 331 | identical but differ from the ancestor version. | ||
| 332 | @end table | ||
| 333 | |||
| 334 | @node Exiting Emerge | ||
| 335 | @subsection Exiting Emerge | ||
| 336 | |||
| 337 | The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing | ||
| 338 | the results into the output file if you specified one. It restores the | ||
| 339 | A and B buffers to their proper contents, or kills them if they were | ||
| 340 | created by Emerge and you haven't changed them. It also disables the | ||
| 341 | Emerge commands in the merge buffer, since executing them later could | ||
| 342 | damage the contents of the various buffers. | ||
| 343 | |||
| 344 | @kbd{C-]} aborts the merge. This means exiting without writing the | ||
| 345 | output file. If you didn't specify an output file, then there is no | ||
| 346 | real difference between aborting and finishing the merge. | ||
| 347 | |||
| 348 | If the Emerge command was called from another Lisp program, then its | ||
| 349 | return value is @code{t} for successful completion, or @code{nil} if you | ||
| 350 | abort. | ||
| 351 | |||
| 352 | @node Combining in Emerge | ||
| 353 | @subsection Combining the Two Versions | ||
| 354 | |||
| 355 | Sometimes you want to keep @emph{both} alternatives for a particular | ||
| 356 | difference. To do this, use @kbd{x c}, which edits the merge buffer | ||
| 357 | like this: | ||
| 358 | |||
| 359 | @example | ||
| 360 | @group | ||
| 361 | #ifdef NEW | ||
| 362 | @var{version from A buffer} | ||
| 363 | #else /* not NEW */ | ||
| 364 | @var{version from B buffer} | ||
| 365 | #endif /* not NEW */ | ||
| 366 | @end group | ||
| 367 | @end example | ||
| 368 | |||
| 369 | @noindent | ||
| 370 | @vindex emerge-combine-versions-template | ||
| 371 | While this example shows C preprocessor conditionals delimiting the two | ||
| 372 | alternative versions, you can specify the strings to use by setting | ||
| 373 | the variable @code{emerge-combine-versions-template} to a string of your | ||
| 374 | choice. In the string, @samp{%a} says where to put version A, and | ||
| 375 | @samp{%b} says where to put version B. The default setting, which | ||
| 376 | produces the results shown above, looks like this: | ||
| 377 | |||
| 378 | @example | ||
| 379 | @group | ||
| 380 | "#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n" | ||
| 381 | @end group | ||
| 382 | @end example | ||
| 383 | |||
| 384 | @node Fine Points of Emerge | ||
| 385 | @subsection Fine Points of Emerge | ||
| 386 | |||
| 387 | During the merge, you mustn't try to edit the A and B buffers yourself. | ||
| 388 | Emerge modifies them temporarily, but ultimately puts them back the way | ||
| 389 | they were. | ||
| 390 | |||
| 391 | You can have any number of merges going at once---just don't use any one | ||
| 392 | buffer as input to more than one merge at once, since the temporary | ||
| 393 | changes made in these buffers would get in each other's way. | ||
| 394 | |||
| 395 | Starting Emerge can take a long time because it needs to compare the | ||
| 396 | files fully. Emacs can't do anything else until @code{diff} finishes. | ||
| 397 | Perhaps in the future someone will change Emerge to do the comparison in | ||
| 398 | the background when the input files are large---then you could keep on | ||
| 399 | doing other things with Emacs until Emerge is ready to accept | ||
| 400 | commands. | ||
| 401 | |||
| 402 | @vindex emerge-startup-hook | ||
| 403 | After setting up the merge, Emerge runs the hook | ||
| 404 | @code{emerge-startup-hook}. | ||
| 405 | @iftex | ||
| 406 | @xref{Hooks,,, emacs, the Emacs Manual}. | ||
| 407 | @end iftex | ||
| 408 | @ifnottex | ||
| 409 | @xref{Hooks}. | ||
| 410 | @end ifnottex | ||
| 411 | |||
| 412 | @ignore | ||
| 413 | arch-tag: cda63f09-9c5f-4ea1-adb9-4a820fdfb24e | ||
| 414 | @end ignore | ||
diff --git a/man/entering.texi b/man/entering.texi index 6a9ac0e8347..bef6a5a4db0 100644 --- a/man/entering.texi +++ b/man/entering.texi | |||
| @@ -8,58 +8,54 @@ | |||
| 8 | @cindex starting Emacs | 8 | @cindex starting Emacs |
| 9 | 9 | ||
| 10 | The usual way to invoke Emacs is with the shell command | 10 | The usual way to invoke Emacs is with the shell command |
| 11 | @command{emacs}. Emacs clears the screen and then displays an initial | 11 | @command{emacs}. Emacs clears the screen, then displays an initial |
| 12 | help message and copyright notice. Some operating systems discard all | 12 | help message and copyright notice. Some operating systems discard |
| 13 | type-ahead when Emacs starts up; they give Emacs no way to prevent | 13 | your type-ahead when Emacs starts up; they give Emacs no way to |
| 14 | this. If you ever use those systems, learn the habit of waiting for | 14 | prevent this. On those systems, wait for Emacs to clear the screen |
| 15 | Emacs to clear the screen before typing your first editing command. | 15 | before you start typing. |
| 16 | 16 | ||
| 17 | If you run Emacs from a shell window under the X Window System, run it | 17 | From a shell window under the X Window System, run Emacs in the |
| 18 | in the background with @command{emacs&}. This way, Emacs does not tie up | 18 | background with @command{emacs&}. This way, Emacs won't tie up the |
| 19 | the shell window, so you can use that to run other shell commands while | 19 | shell window, so you can use it to run other shell commands while |
| 20 | Emacs operates its own X windows. You can begin typing Emacs commands | 20 | Emacs is running. You can type Emacs commands as soon as you direct |
| 21 | as soon as you direct your keyboard input to the Emacs frame. | 21 | your keyboard input to an Emacs frame. |
| 22 | 22 | ||
| 23 | @vindex initial-major-mode | 23 | @vindex initial-major-mode |
| 24 | When Emacs starts up, it creates a buffer named @samp{*scratch*}. | 24 | When Emacs starts up, it creates a buffer named @samp{*scratch*}. |
| 25 | That's the buffer you start out in. The @samp{*scratch*} buffer uses | 25 | That's the buffer you start out in. The @samp{*scratch*} buffer uses |
| 26 | Lisp Interaction mode; you can use it to type Lisp expressions and | 26 | Lisp Interaction mode; you can use it to type Lisp expressions and |
| 27 | evaluate them, or you can ignore that capability and just write notes | 27 | evaluate them. You can also ignore that capability and just write notes |
| 28 | in it. (You can specify a different major mode for this buffer by | 28 | there. You can specify a different major mode for this buffer by |
| 29 | setting the variable @code{initial-major-mode} in your init file. | 29 | setting the variable @code{initial-major-mode} in your init file. |
| 30 | @xref{Init File}.) | 30 | @xref{Init File}. |
| 31 | 31 | ||
| 32 | It is possible to specify files to be visited, Lisp files to be | 32 | It is possible to specify files to be visited, Lisp files to be |
| 33 | loaded, and functions to be called, by giving Emacs arguments in the | 33 | loaded, and functions to be called through Emacs command-line |
| 34 | shell command line. @xref{Emacs Invocation}. But we don't recommend | 34 | arguments. @xref{Emacs Invocation}. The feature exists mainly for |
| 35 | doing this. The feature exists mainly for compatibility with other | 35 | compatibility with other editors, and for scripts. |
| 36 | editors. | 36 | |
| 37 | 37 | Many editors are designed to edit one file. When done with that | |
| 38 | Many other editors are designed to be started afresh each time you | 38 | file, you exit the editor. The next time you want to edit a file, you |
| 39 | want to edit. You edit one file and then exit the editor. The next | 39 | must start the editor again. Working this way, it is convenient to |
| 40 | time you want to edit either another file or the same one, you must run | 40 | use a command-line argument to say which file to edit. |
| 41 | the editor again. With these editors, it makes sense to use a | 41 | |
| 42 | command-line argument to say which file to edit. | 42 | It's not smart to start Emacs afresh for every file you edit. Emacs |
| 43 | 43 | can visit more than one file in a single editing session, and upon | |
| 44 | But starting a new Emacs each time you want to edit a different file | 44 | exit Emacs loses valuable accumulated context, such as the kill ring, |
| 45 | does not make sense. This would fail to take advantage of Emacs's | 45 | registers, undo history, and mark ring. These features are useful for |
| 46 | ability to visit more than one file in a single editing session, and | 46 | operating on multiple files, or even one. If you kill Emacs after |
| 47 | it would lose the other accumulated context, such as the kill ring, | 47 | each file, you don't take advantage of them. |
| 48 | registers, undo history, and mark ring, that are useful for operating | ||
| 49 | on multiple files or even one. | ||
| 50 | 48 | ||
| 51 | The recommended way to use GNU Emacs is to start it only once, just | 49 | The recommended way to use GNU Emacs is to start it only once, just |
| 52 | after you log in, and do all your editing in the same Emacs session. | 50 | after you log in, and do all your editing in the same Emacs session. |
| 53 | Each time you want to edit a different file, you visit it with the | 51 | Each time you edit a file, you visit it with the existing Emacs, which |
| 54 | existing Emacs, which eventually comes to have many files in it ready | 52 | eventually has many files in it ready for editing. Usually you do not |
| 55 | for editing. Usually you do not kill the Emacs until you are about to | 53 | kill Emacs until you are about to log out. @xref{Files}, for more |
| 56 | log out. @xref{Files}, for more information on visiting more than one | 54 | information on visiting more than one file. |
| 57 | file. | ||
| 58 | 55 | ||
| 59 | If you want to edit a file from another program and already have | 56 | To edit a file from another program while Emacs is running, you can |
| 60 | Emacs running, you can use the @command{emacsclient} program to open a | 57 | use the @command{emacsclient} helper program to open a file in the |
| 61 | file in the already running Emacs. @xref{Emacs Server}, for more | 58 | already running Emacs. @xref{Emacs Server}. |
| 62 | information on editing files with Emacs from other programs. | ||
| 63 | 59 | ||
| 64 | @ifnottex | 60 | @ifnottex |
| 65 | @raisesections | 61 | @raisesections |
| @@ -73,9 +69,9 @@ information on editing files with Emacs from other programs. | |||
| 73 | @cindex leaving Emacs | 69 | @cindex leaving Emacs |
| 74 | @cindex quitting Emacs | 70 | @cindex quitting Emacs |
| 75 | 71 | ||
| 76 | There are two commands for exiting Emacs because there are three | 72 | There are two commands for exiting Emacs, and three kinds of exiting: |
| 77 | kinds of exiting: @dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and | 73 | @dfn{suspending} Emacs, @dfn{Iconifying} Emacs, and @dfn{killing} |
| 78 | @dfn{killing} Emacs. | 74 | Emacs. |
| 79 | 75 | ||
| 80 | @dfn{Suspending} means stopping Emacs temporarily and returning | 76 | @dfn{Suspending} means stopping Emacs temporarily and returning |
| 81 | control to its parent process (usually a shell), allowing you to resume | 77 | control to its parent process (usually a shell), allowing you to resume |
| @@ -110,11 +106,11 @@ it iconifies the Emacs frame. | |||
| 110 | Emacs. You can resume Emacs with the shell command @command{%emacs} | 106 | Emacs. You can resume Emacs with the shell command @command{%emacs} |
| 111 | in most common shells. On systems that don't support suspending | 107 | in most common shells. On systems that don't support suspending |
| 112 | programs, @kbd{C-z} starts an inferior shell that communicates | 108 | programs, @kbd{C-z} starts an inferior shell that communicates |
| 113 | directly with the terminal, and Emacs waits until you exit the subshell. | 109 | directly with the terminal, and Emacs waits until you exit the |
| 114 | (The way to do that is probably with @kbd{C-d} or @command{exit}, but | 110 | subshell. (The way to do that is probably with @kbd{C-d} or |
| 115 | it depends on which shell you use.) The only way on these systems to | 111 | @command{exit}, but it depends on which shell you use.) On these |
| 116 | get back to the shell from which Emacs was run (to log out, for | 112 | systems, you can only get back to the shell from which Emacs was run |
| 117 | example) is to kill Emacs. | 113 | (to log out, for example) when you kill Emacs. |
| 118 | 114 | ||
| 119 | Suspending can fail if you run Emacs under a shell that doesn't | 115 | Suspending can fail if you run Emacs under a shell that doesn't |
| 120 | support suspending programs, even if the system itself does support | 116 | support suspending programs, even if the system itself does support |
| @@ -133,13 +129,13 @@ a shell window. | |||
| 133 | @kindex C-x C-c | 129 | @kindex C-x C-c |
| 134 | @findex save-buffers-kill-emacs | 130 | @findex save-buffers-kill-emacs |
| 135 | To exit and kill Emacs, type @kbd{C-x C-c} | 131 | To exit and kill Emacs, type @kbd{C-x C-c} |
| 136 | (@code{save-buffers-kill-emacs}). A two-character key is used for | 132 | (@code{save-buffers-kill-emacs}). A two-character key is used to make |
| 137 | this to make it harder to type by accident. This command first offers | 133 | it harder to type by accident. This command first offers to save any |
| 138 | to save any modified file-visiting buffers. If you do not save them | 134 | modified file-visiting buffers. If you do not save them all, it asks |
| 139 | all, it asks for reconfirmation with @kbd{yes} before killing Emacs, | 135 | for confirmation with @kbd{yes} before killing Emacs, since any |
| 140 | since any changes not saved will be lost forever. Also, if any | 136 | changes not saved now will be lost forever. Also, if any subprocesses are |
| 141 | subprocesses are still running, @kbd{C-x C-c} asks for confirmation | 137 | still running, @kbd{C-x C-c} asks for confirmation about them, since |
| 142 | about them, since killing Emacs will also kill the subprocesses. | 138 | killing Emacs will also kill the subprocesses. |
| 143 | 139 | ||
| 144 | @vindex confirm-kill-emacs | 140 | @vindex confirm-kill-emacs |
| 145 | If the value of the variable @code{confirm-kill-emacs} is | 141 | If the value of the variable @code{confirm-kill-emacs} is |
| @@ -150,11 +146,10 @@ function to use as the value of @code{confirm-kill-emacs} is the | |||
| 150 | function @code{yes-or-no-p}. The default value of | 146 | function @code{yes-or-no-p}. The default value of |
| 151 | @code{confirm-kill-emacs} is @code{nil}. | 147 | @code{confirm-kill-emacs} is @code{nil}. |
| 152 | 148 | ||
| 153 | There is no way to resume an Emacs session once you have killed it. | 149 | You can't resume an Emacs session after killing it. Emacs can, |
| 154 | You can, however, arrange for Emacs to record certain session | 150 | however, record certain session information when you kill it, such as |
| 155 | information when you kill it, such as which files are visited, so that | 151 | which files you visited, so the next time you start Emacs it will try |
| 156 | the next time you start Emacs it will try to visit the same files and | 152 | to visit the same files. @xref{Saving Emacs Sessions}. |
| 157 | so on. @xref{Saving Emacs Sessions}. | ||
| 158 | 153 | ||
| 159 | The operating system usually listens for certain special characters | 154 | The operating system usually listens for certain special characters |
| 160 | whose meaning is to kill or suspend the program you are running. | 155 | whose meaning is to kill or suspend the program you are running. |
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}. | |||
| 2229 | @cindex Regexps | 2229 | @cindex Regexps |
| 2230 | @cindex Regular expressions | 2230 | @cindex Regular expressions |
| 2231 | @cindex Differences between Unix and Emacs regexps | 2231 | @cindex Differences between Unix and Emacs regexps |
| 2232 | @cindex Unix regeps, differences from Emacs | 2232 | @cindex Unix regexps, differences from Emacs |
| 2233 | @cindex Text strings, putting regexps in | 2233 | @cindex Text strings, putting regexps in |
| 2234 | 2234 | ||
| 2235 | @inforef{Regexp Backslash, Regexp Backslash, emacs}. | 2235 | @inforef{Regexp Backslash, Regexp Backslash, emacs}. |
| @@ -2261,15 +2261,35 @@ is actually typical for regexp syntax.) | |||
| 2261 | @cindex Replacing strings across files | 2261 | @cindex Replacing strings across files |
| 2262 | @cindex Multiple files, replacing across | 2262 | @cindex Multiple files, replacing across |
| 2263 | @cindex Files, replacing strings across multiple | 2263 | @cindex Files, replacing strings across multiple |
| 2264 | @cindex Recursive search/replace operations | ||
| 2264 | 2265 | ||
| 2265 | The ``tags'' feature of Emacs includes the command | 2266 | As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x |
| 2266 | @code{tags-query-replace} which performs a query-replace across all the | 2267 | d}) supports the command @code{dired-do-query-replace} (@kbd{Q}), which |
| 2267 | files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search, | 2268 | allows users to replace regular expressions in multiple files. |
| 2268 | emacs}. | 2269 | |
| 2270 | You can use this command to perform search/replace operations on | ||
| 2271 | multiple files by following the following steps: | ||
| 2272 | |||
| 2273 | @itemize @bullet | ||
| 2274 | @item | ||
| 2275 | Assemble a list of files you want to operate on with either | ||
| 2276 | @code{find-dired}, @code{find-name-dired} or @code{find-grep-dired}. | ||
| 2277 | |||
| 2278 | @item | ||
| 2279 | Mark all files in the resulting Dired buffer using @kbd{t}. | ||
| 2280 | |||
| 2281 | @item | ||
| 2282 | Use @kbd{Q} to start a @code{query-replace-regexp} session on the marked | ||
| 2283 | files. | ||
| 2284 | |||
| 2285 | @item | ||
| 2286 | To accept all replacements in each file, hit @kbd{!}. | ||
| 2287 | @end itemize | ||
| 2269 | 2288 | ||
| 2270 | As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) | 2289 | Another way to do the same thing is to use the ``tags'' feature of |
| 2271 | supports the command @code{dired-do-query-replace} (@kbd{Q}), which allows | 2290 | Emacs: it includes the command @code{tags-query-replace} which performs |
| 2272 | users to replace regular expressions in multiple files. | 2291 | a query-replace across all the files mentioned in the @file{TAGS} file. |
| 2292 | @inforef{Tags Search, Tags Search, emacs}. | ||
| 2273 | 2293 | ||
| 2274 | @node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests | 2294 | @node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests |
| 2275 | @section Where is the documentation for @code{etags}? | 2295 | @section Where is the documentation for @code{etags}? |
| @@ -3474,7 +3494,7 @@ see @ref{Packages that do not come with Emacs}. | |||
| 3474 | @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.html, The Emacs Lisp | 3494 | @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.html, The Emacs Lisp |
| 3475 | List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen}, | 3495 | List (ELL)}, maintained by @email{stephen@@anc.ed.ac.uk, Stephen Eglen}, |
| 3476 | aims to provide one compact list with links to all of the current Emacs | 3496 | aims to provide one compact list with links to all of the current Emacs |
| 3477 | Lisp files on the internet. The ELL can be browsed over the web, or | 3497 | Lisp files on the Internet. The ELL can be browsed over the web, or |
| 3478 | from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, | 3498 | from Emacs with @uref{http://www.anc.ed.ac.uk/~stephen/emacs/ell.el, |
| 3479 | the @file{ell} package}. | 3499 | the @file{ell} package}. |
| 3480 | 3500 | ||
diff --git a/man/files.texi b/man/files.texi index ab3fe7bb583..ad90a2758b2 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -25,11 +25,15 @@ on file directories. | |||
| 25 | * Visiting:: Visiting a file prepares Emacs to edit the file. | 25 | * Visiting:: Visiting a file prepares Emacs to edit the file. |
| 26 | * Saving:: Saving makes your changes permanent. | 26 | * Saving:: Saving makes your changes permanent. |
| 27 | * Reverting:: Reverting cancels all the changes not saved. | 27 | * Reverting:: Reverting cancels all the changes not saved. |
| 28 | @ifnottex | ||
| 29 | * Autorevert:: Auto Reverting non-file buffers. | ||
| 30 | @end ifnottex | ||
| 28 | * Auto Save:: Auto Save periodically protects against loss of data. | 31 | * Auto Save:: Auto Save periodically protects against loss of data. |
| 29 | * File Aliases:: Handling multiple names for one file. | 32 | * File Aliases:: Handling multiple names for one file. |
| 30 | * Version Control:: Version control systems (RCS, CVS and SCCS). | 33 | * Version Control:: Version control systems (RCS, CVS and SCCS). |
| 31 | * Directories:: Creating, deleting, and listing file directories. | 34 | * Directories:: Creating, deleting, and listing file directories. |
| 32 | * Comparing Files:: Finding where two files differ. | 35 | * Comparing Files:: Finding where two files differ. |
| 36 | * Diff Mode:: Mode for editing file differences. | ||
| 33 | * Misc File Ops:: Other things you can do on files. | 37 | * Misc File Ops:: Other things you can do on files. |
| 34 | * Compressed Files:: Accessing compressed files. | 38 | * Compressed Files:: Accessing compressed files. |
| 35 | * File Archives:: Operating on tar, zip, jar etc. archive files. | 39 | * File Archives:: Operating on tar, zip, jar etc. archive files. |
| @@ -106,10 +110,13 @@ first slash in the double slash; the result is @samp{/x1/rms/foo}. | |||
| 106 | @cindex home directory shorthand | 110 | @cindex home directory shorthand |
| 107 | You can use @file{~/} in a file name to mean your home directory, | 111 | You can use @file{~/} in a file name to mean your home directory, |
| 108 | or @file{~@var{user-id}/} to mean the home directory of a user whose | 112 | or @file{~@var{user-id}/} to mean the home directory of a user whose |
| 109 | login name is @code{user-id}. (On DOS and Windows systems, where a user | 113 | login name is @code{user-id}@footnote{ |
| 110 | doesn't have a home directory, Emacs substitutes @file{~/} with the | 114 | On MS-Windows and MS-DOS systems, where a user doesn't have a home |
| 111 | value of the environment variable @code{HOME}; see @ref{General | 115 | directory, Emacs substitutes @file{~/} with the value of the |
| 112 | Variables}.) | 116 | environment variable @code{HOME}; see @ref{General Variables}. The |
| 117 | @file{~@var{user-id}/} construct is supported on those systems only | ||
| 118 | for the current user, i.e., only if @var{user-id} is the current | ||
| 119 | user's login name.}. | ||
| 113 | 120 | ||
| 114 | @cindex environment variables in file names | 121 | @cindex environment variables in file names |
| 115 | @cindex expansion of environment variables | 122 | @cindex expansion of environment variables |
| @@ -517,8 +524,14 @@ value is @code{t}, so that Emacs does write backup files. | |||
| 517 | Control}), the variable @code{vc-make-backup-files} determines whether | 524 | Control}), the variable @code{vc-make-backup-files} determines whether |
| 518 | to make backup files. By default it is @code{nil}, since backup files | 525 | to make backup files. By default it is @code{nil}, since backup files |
| 519 | are redundant when you store all the previous versions in a version | 526 | are redundant when you store all the previous versions in a version |
| 520 | control system. @xref{General VC Options,,,emacs-xtra, Specialized | 527 | control system. |
| 521 | Emacs Features}. | 528 | @iftex |
| 529 | @xref{General VC Options,,,emacs-xtra, Specialized Emacs Features}. | ||
| 530 | @end iftex | ||
| 531 | @ifnottex | ||
| 532 | @xref{General VC Options}. | ||
| 533 | @end ifnottex | ||
| 534 | |||
| 522 | 535 | ||
| 523 | At your option, Emacs can keep either a single backup for each file, | 536 | At your option, Emacs can keep either a single backup for each file, |
| 524 | or make a series of numbered backup files for each file that you edit. | 537 | or make a series of numbered backup files for each file that you edit. |
| @@ -972,6 +985,10 @@ modes do not check or revert remote files. | |||
| 972 | @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that | 985 | @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that |
| 973 | visit files under version control. | 986 | visit files under version control. |
| 974 | 987 | ||
| 988 | @ifnottex | ||
| 989 | @include arevert-xtra.texi | ||
| 990 | @end ifnottex | ||
| 991 | |||
| 975 | @node Auto Save | 992 | @node Auto Save |
| 976 | @section Auto-Saving: Protection Against Disasters | 993 | @section Auto-Saving: Protection Against Disasters |
| 977 | @cindex Auto Save mode | 994 | @cindex Auto Save mode |
| @@ -1201,7 +1218,13 @@ RCS or CVS, you can switch to CSSC. | |||
| 1201 | 1218 | ||
| 1202 | VC is enabled by default in Emacs. To disable it, set the | 1219 | VC is enabled by default in Emacs. To disable it, set the |
| 1203 | customizable variable @code{vc-handled-backends} to @code{nil} | 1220 | customizable variable @code{vc-handled-backends} to @code{nil} |
| 1221 | @iftex | ||
| 1204 | (@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). | 1222 | (@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). |
| 1223 | @end iftex | ||
| 1224 | @ifnottex | ||
| 1225 | (@pxref{Customizing VC}). | ||
| 1226 | @end ifnottex | ||
| 1227 | |||
| 1205 | 1228 | ||
| 1206 | @menu | 1229 | @menu |
| 1207 | * Introduction to VC:: How version control works in general. | 1230 | * Introduction to VC:: How version control works in general. |
| @@ -1210,6 +1233,12 @@ customizable variable @code{vc-handled-backends} to @code{nil} | |||
| 1210 | * Old Versions:: Examining and comparing old versions. | 1233 | * Old Versions:: Examining and comparing old versions. |
| 1211 | * Secondary VC Commands:: The commands used a little less frequently. | 1234 | * Secondary VC Commands:: The commands used a little less frequently. |
| 1212 | * Branches:: Multiple lines of development. | 1235 | * Branches:: Multiple lines of development. |
| 1236 | @ifnottex | ||
| 1237 | * Remote Repositories:: Efficient access to remote CVS servers. | ||
| 1238 | * Snapshots:: Sets of file versions treated as a unit. | ||
| 1239 | * Miscellaneous VC:: Various other commands and features of VC. | ||
| 1240 | * Customizing VC:: Variables that change VC's behavior. | ||
| 1241 | @end ifnottex | ||
| 1213 | @end menu | 1242 | @end menu |
| 1214 | 1243 | ||
| 1215 | @node Introduction to VC | 1244 | @node Introduction to VC |
| @@ -1347,7 +1376,13 @@ permitted; check-in is still the way to record a new version. | |||
| 1347 | CVS normally allows each user to modify his own copy of the work file | 1376 | CVS normally allows each user to modify his own copy of the work file |
| 1348 | at any time, but requires merging with changes from other users at | 1377 | at any time, but requires merging with changes from other users at |
| 1349 | check-in time. However, CVS can also be set up to require locking. | 1378 | check-in time. However, CVS can also be set up to require locking. |
| 1379 | @iftex | ||
| 1350 | (@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}). | 1380 | (@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}). |
| 1381 | @end iftex | ||
| 1382 | @ifnottex | ||
| 1383 | (@pxref{CVS Options}). | ||
| 1384 | @end ifnottex | ||
| 1385 | |||
| 1351 | 1386 | ||
| 1352 | @node Types of Log File | 1387 | @node Types of Log File |
| 1353 | @subsubsection Types of Log File | 1388 | @subsubsection Types of Log File |
| @@ -1379,8 +1414,14 @@ for each change just once, then put it into both logs. You can write | |||
| 1379 | the entry in @file{ChangeLog}, then copy it to the log buffer when you | 1414 | the entry in @file{ChangeLog}, then copy it to the log buffer when you |
| 1380 | check in the change. Or you can write the entry in the log buffer | 1415 | check in the change. Or you can write the entry in the log buffer |
| 1381 | while checking in the change, and later use the @kbd{C-x v a} command | 1416 | while checking in the change, and later use the @kbd{C-x v a} command |
| 1382 | to copy it to @file{ChangeLog} (@pxref{Change Logs and | 1417 | to copy it to @file{ChangeLog} |
| 1383 | VC,,,emacs-xtra, Specialized Emacs Features}). | 1418 | @iftex |
| 1419 | (@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}). | ||
| 1420 | @end iftex | ||
| 1421 | @ifnottex | ||
| 1422 | (@pxref{Change Logs and VC}). | ||
| 1423 | @end ifnottex | ||
| 1424 | |||
| 1384 | 1425 | ||
| 1385 | @node VC Mode Line | 1426 | @node VC Mode Line |
| 1386 | @subsection Version Control and the Mode Line | 1427 | @subsection Version Control and the Mode Line |
| @@ -1544,8 +1585,15 @@ the repository. | |||
| 1544 | @cindex specific version control system | 1585 | @cindex specific version control system |
| 1545 | Instead of the version number, you can also specify the name of a | 1586 | Instead of the version number, you can also specify the name of a |
| 1546 | version control system. This is useful when one file is being managed | 1587 | version control system. This is useful when one file is being managed |
| 1547 | with two version control systems at the same time (@pxref{Local | 1588 | with two version control systems at the same time |
| 1548 | Version Control,,,emacs-xtra, Specialized Emacs Features}). | 1589 | @iftex |
| 1590 | (@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs | ||
| 1591 | Features}). | ||
| 1592 | @end iftex | ||
| 1593 | @ifnottex | ||
| 1594 | (@pxref{Local Version Control}). | ||
| 1595 | @end ifnottex | ||
| 1596 | |||
| 1549 | @end itemize | 1597 | @end itemize |
| 1550 | 1598 | ||
| 1551 | @node Log Buffer | 1599 | @node Log Buffer |
| @@ -1567,16 +1615,27 @@ control, you can generate the Log Edit text from the ChangeLog using | |||
| 1567 | entries for the file(s) concerned in the top entry in the ChangeLog | 1615 | entries for the file(s) concerned in the top entry in the ChangeLog |
| 1568 | and uses those paragraphs as the log text. This text is only inserted | 1616 | and uses those paragraphs as the log text. This text is only inserted |
| 1569 | if the top entry was made under your user name on the current date. | 1617 | if the top entry was made under your user name on the current date. |
| 1618 | @iftex | ||
| 1570 | @xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}, | 1619 | @xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}, |
| 1620 | @end iftex | ||
| 1621 | @ifnottex | ||
| 1622 | @xref{Change Logs and VC}, | ||
| 1623 | @end ifnottex | ||
| 1571 | for the opposite way of working---generating ChangeLog entries from | 1624 | for the opposite way of working---generating ChangeLog entries from |
| 1572 | the revision control log. | 1625 | the revision control log. |
| 1573 | 1626 | ||
| 1574 | In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x | 1627 | In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x |
| 1575 | log-edit-show-files}) shows the list of files to be committed in case | 1628 | log-edit-show-files}) shows the list of files to be committed in case |
| 1576 | you need to check that. (This can be a list of more than one file if | 1629 | you need to check that. (This can be a list of more than one file if |
| 1577 | you use VC Dired mode or PCL-CVS. @xref{VC Dired Mode,,,emacs-xtra, | 1630 | you use VC Dired mode or PCL-CVS. |
| 1578 | Specialized Emacs Features}, and @ref{Top, , About PCL-CVS, pcl-cvs, | 1631 | @iftex |
| 1579 | PCL-CVS --- The Emacs Front-End to CVS}.) | 1632 | @xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}, |
| 1633 | @end iftex | ||
| 1634 | @ifnottex | ||
| 1635 | @xref{VC Dired Mode}, | ||
| 1636 | @end ifnottex | ||
| 1637 | and @ref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs | ||
| 1638 | Front-End to CVS}.) | ||
| 1580 | 1639 | ||
| 1581 | When you have finished editing the log message, type @kbd{C-c C-c} to | 1640 | When you have finished editing the log message, type @kbd{C-c C-c} to |
| 1582 | exit the buffer and commit the change. | 1641 | exit the buffer and commit the change. |
| @@ -1644,7 +1703,13 @@ Both forms display the output in a special buffer in another window. | |||
| 1644 | You can specify a checked-in version by its number; an empty input | 1703 | You can specify a checked-in version by its number; an empty input |
| 1645 | specifies the current contents of the work file (which may be different | 1704 | specifies the current contents of the work file (which may be different |
| 1646 | from all the checked-in versions). You can also specify a snapshot name | 1705 | from all the checked-in versions). You can also specify a snapshot name |
| 1647 | (@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) instead of one or both version numbers. | 1706 | @iftex |
| 1707 | (@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) | ||
| 1708 | @end iftex | ||
| 1709 | @ifnottex | ||
| 1710 | (@pxref{Snapshots}) | ||
| 1711 | @end ifnottex | ||
| 1712 | instead of one or both version numbers. | ||
| 1648 | 1713 | ||
| 1649 | If you supply a directory name instead of the name of a registered | 1714 | If you supply a directory name instead of the name of a registered |
| 1650 | file, this command compares the two specified versions of all registered | 1715 | file, this command compares the two specified versions of all registered |
| @@ -1733,6 +1798,10 @@ use once a day. | |||
| 1733 | * Registering:: Putting a file under version control. | 1798 | * Registering:: Putting a file under version control. |
| 1734 | * VC Status:: Viewing the VC status of files. | 1799 | * VC Status:: Viewing the VC status of files. |
| 1735 | * VC Undo:: Canceling changes before or after check-in. | 1800 | * VC Undo:: Canceling changes before or after check-in. |
| 1801 | @ifnottex | ||
| 1802 | * VC Dired Mode:: Listing files managed by version control. | ||
| 1803 | * VC Dired Commands:: Commands to use in a VC Dired buffer. | ||
| 1804 | @end ifnottex | ||
| 1736 | @end menu | 1805 | @end menu |
| 1737 | 1806 | ||
| 1738 | @node Registering | 1807 | @node Registering |
| @@ -1753,8 +1822,13 @@ to use for it. If the file's directory already contains files | |||
| 1753 | registered in a version control system, Emacs uses that system. If | 1822 | registered in a version control system, Emacs uses that system. If |
| 1754 | there is more than one system in use for a directory, Emacs uses the | 1823 | there is more than one system in use for a directory, Emacs uses the |
| 1755 | one that appears first in @code{vc-handled-backends} | 1824 | one that appears first in @code{vc-handled-backends} |
| 1756 | (@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). On | 1825 | @iftex |
| 1757 | the other hand, if there are no files already registered, Emacs uses | 1826 | (@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). |
| 1827 | @end iftex | ||
| 1828 | @ifnottex | ||
| 1829 | (@pxref{Customizing VC}). | ||
| 1830 | @end ifnottex | ||
| 1831 | On the other hand, if there are no files already registered, Emacs uses | ||
| 1758 | the first system from @code{vc-handled-backends} that could register | 1832 | the first system from @code{vc-handled-backends} that could register |
| 1759 | the file (for example, you cannot register a file under CVS if its | 1833 | the file (for example, you cannot register a file under CVS if its |
| 1760 | directory is not already part of a CVS tree); with the default value | 1834 | directory is not already part of a CVS tree); with the default value |
| @@ -1814,16 +1888,27 @@ count. | |||
| 1814 | 1888 | ||
| 1815 | @item P | 1889 | @item P |
| 1816 | Move to the log of the previous file, when the logs of multiple files | 1890 | Move to the log of the previous file, when the logs of multiple files |
| 1817 | are in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized | 1891 | are in the log buffer |
| 1818 | Emacs Features}). Otherwise, just move to the beginning of the log. A | 1892 | @iftex |
| 1819 | numeric prefix argument is a repeat count, so @kbd{C-u 10 P} would | 1893 | (@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}). |
| 1820 | move backward 10 files. | 1894 | @end iftex |
| 1895 | @ifnottex | ||
| 1896 | (@pxref{VC Dired Mode}). | ||
| 1897 | @end ifnottex | ||
| 1898 | Otherwise, just move to the beginning of the log. A numeric prefix | ||
| 1899 | argument is a repeat count, so @kbd{C-u 10 P} would move backward 10 | ||
| 1900 | files. | ||
| 1821 | 1901 | ||
| 1822 | @item N | 1902 | @item N |
| 1823 | Move to the log of the next file, when the logs of multiple files are | 1903 | Move to the log of the next file, when the logs of multiple files are |
| 1824 | in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized | 1904 | in the log buffer |
| 1825 | Emacs Features}). It also takes a numeric prefix argument as a repeat | 1905 | @iftex |
| 1826 | count. | 1906 | (@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}). |
| 1907 | @end iftex | ||
| 1908 | @ifnottex | ||
| 1909 | (@pxref{VC Dired Mode}). | ||
| 1910 | @end ifnottex | ||
| 1911 | It also takes a numeric prefix argument as a repeat count. | ||
| 1827 | 1912 | ||
| 1828 | @item f | 1913 | @item f |
| 1829 | Visit the revision indicated at the current line, like typing @kbd{C-x | 1914 | Visit the revision indicated at the current line, like typing @kbd{C-x |
| @@ -1877,11 +1962,16 @@ change and then discover a trivial error in it; you can cancel the | |||
| 1877 | erroneous check-in, fix the error, and check the file in again. | 1962 | erroneous check-in, fix the error, and check the file in again. |
| 1878 | 1963 | ||
| 1879 | When @kbd{C-x v c} does not revert the buffer, it unexpands all | 1964 | When @kbd{C-x v c} does not revert the buffer, it unexpands all |
| 1880 | version control headers in the buffer instead (@pxref{Version | 1965 | version control headers in the buffer instead |
| 1881 | Headers,,,emacs-xtra, Specialized Emacs Features}). This is because | 1966 | @iftex |
| 1882 | the buffer no longer corresponds to any existing version. If you | 1967 | (@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}). |
| 1883 | check it in again, the check-in process will expand the headers | 1968 | @end iftex |
| 1884 | properly for the new version number. | 1969 | @ifnottex |
| 1970 | (@pxref{Version Headers}). | ||
| 1971 | @end ifnottex | ||
| 1972 | This is because the buffer no longer corresponds to any existing | ||
| 1973 | version. If you check it in again, the check-in process will expand | ||
| 1974 | the headers properly for the new version number. | ||
| 1885 | 1975 | ||
| 1886 | However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header | 1976 | However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header |
| 1887 | automatically. If you use that header feature, you have to unexpand it | 1977 | automatically. If you use that header feature, you have to unexpand it |
| @@ -1893,6 +1983,13 @@ confirmation with @kbd{yes}. Note also that this command is disabled | |||
| 1893 | under CVS, because canceling versions is very dangerous and discouraged | 1983 | under CVS, because canceling versions is very dangerous and discouraged |
| 1894 | with CVS. | 1984 | with CVS. |
| 1895 | 1985 | ||
| 1986 | @ifnottex | ||
| 1987 | @c vc1-xtra.texi needs extra level of lowering. | ||
| 1988 | @lowersections | ||
| 1989 | @include vc1-xtra.texi | ||
| 1990 | @raisesections | ||
| 1991 | @end ifnottex | ||
| 1992 | |||
| 1896 | @node Branches | 1993 | @node Branches |
| 1897 | @subsection Multiple Branches of a File | 1994 | @subsection Multiple Branches of a File |
| 1898 | @cindex branch (version control) | 1995 | @cindex branch (version control) |
| @@ -2071,10 +2168,15 @@ own choice of selected versions, but all share the same common RCS | |||
| 2071 | records. | 2168 | records. |
| 2072 | 2169 | ||
| 2073 | This technique works reliably and automatically, provided that the | 2170 | This technique works reliably and automatically, provided that the |
| 2074 | source files contain RCS version headers (@pxref{Version | 2171 | source files contain RCS version headers |
| 2075 | Headers,,,emacs-xtra, Specialized Emacs Features}). The headers enable | 2172 | @iftex |
| 2076 | Emacs to be sure, at all times, which version number is present in the | 2173 | (@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}). |
| 2077 | work file. | 2174 | @end iftex |
| 2175 | @ifnottex | ||
| 2176 | (@pxref{Version Headers}). | ||
| 2177 | @end ifnottex | ||
| 2178 | The headers enable Emacs to be sure, at all times, which version | ||
| 2179 | number is present in the work file. | ||
| 2078 | 2180 | ||
| 2079 | If the files do not have version headers, you must instead tell Emacs | 2181 | If the files do not have version headers, you must instead tell Emacs |
| 2080 | explicitly in each session which branch you are working on. To do this, | 2182 | explicitly in each session which branch you are working on. To do this, |
| @@ -2082,6 +2184,10 @@ first find the file, then type @kbd{C-u C-x v v} and specify the correct | |||
| 2082 | branch number. This ensures that Emacs knows which branch it is using | 2184 | branch number. This ensures that Emacs knows which branch it is using |
| 2083 | during this particular editing session. | 2185 | during this particular editing session. |
| 2084 | 2186 | ||
| 2187 | @ifnottex | ||
| 2188 | @include vc2-xtra.texi | ||
| 2189 | @end ifnottex | ||
| 2190 | |||
| 2085 | @node Directories | 2191 | @node Directories |
| 2086 | @section File Directories | 2192 | @section File Directories |
| 2087 | 2193 | ||
| @@ -2159,6 +2265,8 @@ differences in an Emacs buffer named @samp{*diff*}. It works by | |||
| 2159 | running the @code{diff} program, using options taken from the variable | 2265 | running the @code{diff} program, using options taken from the variable |
| 2160 | @code{diff-switches}. The value of @code{diff-switches} should be a | 2266 | @code{diff-switches}. The value of @code{diff-switches} should be a |
| 2161 | string; the default is @code{"-c"} to specify a context diff. | 2267 | string; the default is @code{"-c"} to specify a context diff. |
| 2268 | @xref{Top,, Diff, diff, Comparing and Merging Files}, for more | ||
| 2269 | information about @command{diff} output formats. | ||
| 2162 | 2270 | ||
| 2163 | @findex diff-backup | 2271 | @findex diff-backup |
| 2164 | The command @kbd{M-x diff-backup} compares a specified file with its most | 2272 | The command @kbd{M-x diff-backup} compares a specified file with its most |
| @@ -2166,20 +2274,6 @@ recent backup. If you specify the name of a backup file, | |||
| 2166 | @code{diff-backup} compares it with the source file that it is a backup | 2274 | @code{diff-backup} compares it with the source file that it is a backup |
| 2167 | of. | 2275 | of. |
| 2168 | 2276 | ||
| 2169 | @findex diff-goto-source | ||
| 2170 | @findex diff-mode | ||
| 2171 | @cindex Diff mode | ||
| 2172 | The @samp{*diff*} buffer uses Diff mode, which enables you to use | ||
| 2173 | @kbd{C-x `} to visit successive changed locations in the two source | ||
| 2174 | files, as in Compilation mode (@pxref{Compilation Mode}.) You can | ||
| 2175 | also move to a particular hunk of changes and type @kbd{C-c C-c} | ||
| 2176 | (@code{diff-goto-source}) to visit the corresponding source location. | ||
| 2177 | |||
| 2178 | @cindex patches | ||
| 2179 | Differences between versions of files are often distributed as | ||
| 2180 | patches, which are the output from the @command{diff} program. You | ||
| 2181 | can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}. | ||
| 2182 | |||
| 2183 | @findex compare-windows | 2277 | @findex compare-windows |
| 2184 | The command @kbd{M-x compare-windows} compares the text in the | 2278 | The command @kbd{M-x compare-windows} compares the text in the |
| 2185 | current window with that in the next window. (For more information | 2279 | current window with that in the next window. (For more information |
| @@ -2216,8 +2310,94 @@ typically the result of a failed merge from a version control system | |||
| 2216 | mode provides commands to resolve conflicts by selecting specific | 2310 | mode provides commands to resolve conflicts by selecting specific |
| 2217 | changes. | 2311 | changes. |
| 2218 | 2312 | ||
| 2219 | @inforef{Emerge,, emacs-xtra} for the Emerge facility, which | 2313 | @iftex |
| 2220 | provides a powerful interface for merging files. | 2314 | @xref{Emerge,,, emacs-xtra, Specialized Emacs Features}, |
| 2315 | @end iftex | ||
| 2316 | @ifnottex | ||
| 2317 | @xref{Emerge}, | ||
| 2318 | @end ifnottex | ||
| 2319 | for the Emerge facility, which provides a powerful interface for | ||
| 2320 | merging files. | ||
| 2321 | |||
| 2322 | @node Diff Mode | ||
| 2323 | @section Diff Mode | ||
| 2324 | @cindex Diff mode | ||
| 2325 | @findex diff-mode | ||
| 2326 | @cindex patches, editing | ||
| 2327 | |||
| 2328 | Diff mode is used for the output of @kbd{M-x diff}; it is also | ||
| 2329 | useful for editing patches and comparisons produced by the | ||
| 2330 | @command{diff} program. To select Diff mode manually, type @kbd{M-x | ||
| 2331 | diff-mode}. | ||
| 2332 | |||
| 2333 | One general feature of Diff mode is that manual edits to the patch | ||
| 2334 | automatically correct line numbers, including those in the hunk | ||
| 2335 | header, so that you can actually apply the edited patch. Diff mode | ||
| 2336 | also provides the following commands to navigate, manipulate and apply | ||
| 2337 | parts of patches: | ||
| 2338 | |||
| 2339 | @table @kbd | ||
| 2340 | @item M-n | ||
| 2341 | Move to the next hunk-start (@code{diff-hunk-next}). | ||
| 2342 | |||
| 2343 | @item M-p | ||
| 2344 | Move to the previous hunk-start (@code{diff-hunk-prev}). | ||
| 2345 | |||
| 2346 | @item M-@} | ||
| 2347 | Move to the next file-start, in a multi-file patch | ||
| 2348 | (@code{diff-file-next}). | ||
| 2349 | |||
| 2350 | @item M-@{ | ||
| 2351 | Move to the previous file-start, in a multi-file patch | ||
| 2352 | (@code{diff-file-prev}). | ||
| 2353 | |||
| 2354 | @item M-k | ||
| 2355 | Kill the hunk at point (@code{diff-hunk-kill}). | ||
| 2356 | |||
| 2357 | @item M-K | ||
| 2358 | In a multi-file patch, kill the current file part. | ||
| 2359 | (@code{diff-file-kill}). | ||
| 2360 | |||
| 2361 | @item C-c C-a | ||
| 2362 | Apply this hunk to its target file (@code{diff-apply-hunk}). With a | ||
| 2363 | prefix argument of @kbd{C-u}, revert this hunk. | ||
| 2364 | |||
| 2365 | @item C-c C-c | ||
| 2366 | Go to the source corresponding to this hunk (@code{diff-goto-source}). | ||
| 2367 | |||
| 2368 | @item C-c C-e | ||
| 2369 | Start an Ediff session with the patch (@code{diff-ediff-patch}). | ||
| 2370 | @xref{Top, Ediff, Ediff, ediff, The Ediff Manual}. | ||
| 2371 | |||
| 2372 | @item C-c C-n | ||
| 2373 | Restrict the view to the current hunk (@code{diff-restrict-view}). | ||
| 2374 | @xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the | ||
| 2375 | view to the current patch of a multiple file patch. To widen again, | ||
| 2376 | use @kbd{C-x n w}. | ||
| 2377 | |||
| 2378 | @item C-c C-r | ||
| 2379 | Reverse the direction of comparison for the entire buffer | ||
| 2380 | (@code{diff-reverse-direction}). | ||
| 2381 | |||
| 2382 | @item C-c C-s | ||
| 2383 | Split the hunk at point (@code{diff-split-hunk}). This is for | ||
| 2384 | manually editing patches, and only works with the unified diff format. | ||
| 2385 | |||
| 2386 | @item C-c C-u | ||
| 2387 | Convert the entire buffer to unified format | ||
| 2388 | (@code{diff-context->unified}). With a prefix argument, convert | ||
| 2389 | unified format to context format. In Transient Mark mode, when the | ||
| 2390 | mark is active, this command operates only on the region. | ||
| 2391 | |||
| 2392 | @item C-c C-w | ||
| 2393 | Refine the current hunk so that it disregards changes in whitespace | ||
| 2394 | (@code{diff-refine-hunk}). | ||
| 2395 | @end table | ||
| 2396 | |||
| 2397 | @kbd{C-x 4 a} in Diff mode operates on behalf of the target file, | ||
| 2398 | but gets the function name from the patch itself. @xref{Change Log}. | ||
| 2399 | This is useful for making log entries for functions that are deleted | ||
| 2400 | by the patch. | ||
| 2221 | 2401 | ||
| 2222 | @node Misc File Ops | 2402 | @node Misc File Ops |
| 2223 | @section Miscellaneous File Operations | 2403 | @section Miscellaneous File Operations |
| @@ -2328,7 +2508,7 @@ compiling it. | |||
| 2328 | @findex auto-compression-mode | 2508 | @findex auto-compression-mode |
| 2329 | @vindex auto-compression-mode | 2509 | @vindex auto-compression-mode |
| 2330 | To disable this feature, type the command @kbd{M-x | 2510 | To disable this feature, type the command @kbd{M-x |
| 2331 | auto-compression-mode}. You can disenable it permanently by | 2511 | auto-compression-mode}. You can disable it permanently by |
| 2332 | customizing the variable @code{auto-compression-mode}. | 2512 | customizing the variable @code{auto-compression-mode}. |
| 2333 | 2513 | ||
| 2334 | @node File Archives | 2514 | @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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node Fortran | ||
| 8 | @section Fortran Mode | ||
| 9 | @cindex Fortran mode | ||
| 10 | @cindex mode, Fortran | ||
| 11 | |||
| 12 | Fortran mode provides special motion commands for Fortran statements | ||
| 13 | and subprograms, and indentation commands that understand Fortran | ||
| 14 | conventions of nesting, line numbers and continuation statements. | ||
| 15 | Fortran mode has support for Auto Fill mode that breaks long lines into | ||
| 16 | proper Fortran continuation lines. | ||
| 17 | |||
| 18 | Special commands for comments are provided because Fortran comments | ||
| 19 | are unlike those of other languages. Built-in abbrevs optionally save | ||
| 20 | typing when you insert Fortran keywords. | ||
| 21 | |||
| 22 | Use @kbd{M-x fortran-mode} to switch to this major mode. This | ||
| 23 | command runs the hook @code{fortran-mode-hook}. | ||
| 24 | @iftex | ||
| 25 | @xref{Hooks,,, emacs, the Emacs Manual}. | ||
| 26 | @end iftex | ||
| 27 | @ifnottex | ||
| 28 | @xref{Hooks}. | ||
| 29 | @end ifnottex | ||
| 30 | |||
| 31 | @cindex Fortran77 and Fortran90 | ||
| 32 | @findex f90-mode | ||
| 33 | @findex fortran-mode | ||
| 34 | Fortran mode is meant for editing Fortran77 ``fixed format'' (and also | ||
| 35 | ``tab format'') source code. For editing the modern Fortran90 or | ||
| 36 | Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}). | ||
| 37 | Emacs normally uses Fortran mode for files with extension @samp{.f}, | ||
| 38 | @samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and | ||
| 39 | @samp{.f95}. GNU Fortran supports both kinds of format. | ||
| 40 | |||
| 41 | @menu | ||
| 42 | * Motion: Fortran Motion. Moving point by statements or subprograms. | ||
| 43 | * Indent: Fortran Indent. Indentation commands for Fortran. | ||
| 44 | * Comments: Fortran Comments. Inserting and aligning comments. | ||
| 45 | * Autofill: Fortran Autofill. Auto fill support for Fortran. | ||
| 46 | * Columns: Fortran Columns. Measuring columns for valid Fortran. | ||
| 47 | * Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords. | ||
| 48 | @end menu | ||
| 49 | |||
| 50 | @node Fortran Motion | ||
| 51 | @subsection Motion Commands | ||
| 52 | |||
| 53 | In addition to the normal commands for moving by and operating on | ||
| 54 | ``defuns'' (Fortran subprograms---functions and subroutines, as well as | ||
| 55 | modules for F90 mode), Fortran mode provides special commands to move by | ||
| 56 | statements and other program units. | ||
| 57 | |||
| 58 | @table @kbd | ||
| 59 | @kindex C-c C-n @r{(Fortran mode)} | ||
| 60 | @findex fortran-next-statement | ||
| 61 | @findex f90-next-statement | ||
| 62 | @item C-c C-n | ||
| 63 | Move to the beginning of the next statement | ||
| 64 | (@code{fortran-next-statement}/@code{f90-next-statement}). | ||
| 65 | |||
| 66 | @kindex C-c C-p @r{(Fortran mode)} | ||
| 67 | @findex fortran-previous-statement | ||
| 68 | @findex f90-previous-statement | ||
| 69 | @item C-c C-p | ||
| 70 | Move to the beginning of the previous statement | ||
| 71 | (@code{fortran-previous-statement}/@code{f90-previous-statement}). | ||
| 72 | If there is no previous statement (i.e. if called from the first | ||
| 73 | statement in the buffer), move to the start of the buffer. | ||
| 74 | |||
| 75 | @kindex C-c C-e @r{(F90 mode)} | ||
| 76 | @findex f90-next-block | ||
| 77 | @item C-c C-e | ||
| 78 | Move point forward to the start of the next code block | ||
| 79 | (@code{f90-next-block}). A code block is a subroutine, | ||
| 80 | @code{if}--@code{endif} statement, and so forth. This command exists | ||
| 81 | for F90 mode only, not Fortran mode. With a numeric argument, this | ||
| 82 | moves forward that many blocks. | ||
| 83 | |||
| 84 | @kindex C-c C-a @r{(F90 mode)} | ||
| 85 | @findex f90-previous-block | ||
| 86 | @item C-c C-a | ||
| 87 | Move point backward to the previous code block | ||
| 88 | (@code{f90-previous-block}). This is like @code{f90-next-block}, but | ||
| 89 | moves backwards. | ||
| 90 | |||
| 91 | @kindex C-M-n @r{(Fortran mode)} | ||
| 92 | @findex fortran-end-of-block | ||
| 93 | @findex f90-end-of-block | ||
| 94 | @item C-M-n | ||
| 95 | Move to the end of the current code block | ||
| 96 | (@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric | ||
| 97 | argument, move forward that number of blocks. The mark is set before | ||
| 98 | moving point. The F90 mode version of this command checks for | ||
| 99 | consistency of block types and labels (if present), but it does not | ||
| 100 | check the outermost block since that may be incomplete. | ||
| 101 | |||
| 102 | @kindex C-M-p @r{(Fortran mode)} | ||
| 103 | @findex fortran-beginning-of-block | ||
| 104 | @findex f90-beginning-of-block | ||
| 105 | @item C-M-p | ||
| 106 | Move to the start of the current code block | ||
| 107 | (@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This | ||
| 108 | is like @code{fortran-end-of-block}, but moves backwards. | ||
| 109 | @end table | ||
| 110 | |||
| 111 | @node Fortran Indent | ||
| 112 | @subsection Fortran Indentation | ||
| 113 | |||
| 114 | Special commands and features are needed for indenting Fortran code in | ||
| 115 | order to make sure various syntactic entities (line numbers, comment line | ||
| 116 | indicators and continuation line flags) appear in the columns that are | ||
| 117 | required for standard, fixed (or tab) format Fortran. | ||
| 118 | |||
| 119 | @menu | ||
| 120 | * Commands: ForIndent Commands. Commands for indenting and filling Fortran. | ||
| 121 | * Contline: ForIndent Cont. How continuation lines indent. | ||
| 122 | * Numbers: ForIndent Num. How line numbers auto-indent. | ||
| 123 | * Conv: ForIndent Conv. Conventions you must obey to avoid trouble. | ||
| 124 | * Vars: ForIndent Vars. Variables controlling Fortran indent style. | ||
| 125 | @end menu | ||
| 126 | |||
| 127 | @node ForIndent Commands | ||
| 128 | @subsubsection Fortran Indentation and Filling Commands | ||
| 129 | |||
| 130 | @table @kbd | ||
| 131 | @item C-M-j | ||
| 132 | Break the current line at point and set up a continuation line | ||
| 133 | (@code{fortran-split-line}). | ||
| 134 | @item M-^ | ||
| 135 | Join this line to the previous line (@code{fortran-join-line}). | ||
| 136 | @item C-M-q | ||
| 137 | Indent all the lines of the subprogram point is in | ||
| 138 | (@code{fortran-indent-subprogram}). | ||
| 139 | @item M-q | ||
| 140 | Fill a comment block or statement. | ||
| 141 | @end table | ||
| 142 | |||
| 143 | @kindex C-M-q @r{(Fortran mode)} | ||
| 144 | @findex fortran-indent-subprogram | ||
| 145 | The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command | ||
| 146 | to reindent all the lines of the Fortran subprogram (function or | ||
| 147 | subroutine) containing point. | ||
| 148 | |||
| 149 | @kindex C-M-j @r{(Fortran mode)} | ||
| 150 | @findex fortran-split-line | ||
| 151 | The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits | ||
| 152 | a line in the appropriate fashion for Fortran. In a non-comment line, | ||
| 153 | the second half becomes a continuation line and is indented | ||
| 154 | accordingly. In a comment line, both halves become separate comment | ||
| 155 | lines. | ||
| 156 | |||
| 157 | @kindex M-^ @r{(Fortran mode)} | ||
| 158 | @kindex C-c C-d @r{(Fortran mode)} | ||
| 159 | @findex fortran-join-line | ||
| 160 | @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line}, | ||
| 161 | which joins a continuation line back to the previous line, roughly as | ||
| 162 | the inverse of @code{fortran-split-line}. The point must be on a | ||
| 163 | continuation line when this command is invoked. | ||
| 164 | |||
| 165 | @kindex M-q @r{(Fortran mode)} | ||
| 166 | @kbd{M-q} in Fortran mode fills the comment block or statement that | ||
| 167 | point is in. This removes any excess statement continuations. | ||
| 168 | |||
| 169 | @node ForIndent Cont | ||
| 170 | @subsubsection Continuation Lines | ||
| 171 | @cindex Fortran continuation lines | ||
| 172 | |||
| 173 | @vindex fortran-continuation-string | ||
| 174 | Most Fortran77 compilers allow two ways of writing continuation lines. | ||
| 175 | If the first non-space character on a line is in column 5, then that | ||
| 176 | line is a continuation of the previous line. We call this @dfn{fixed | ||
| 177 | format}. (In GNU Emacs we always count columns from 0; but note that | ||
| 178 | the Fortran standard counts from 1.) The variable | ||
| 179 | @code{fortran-continuation-string} specifies what character to put in | ||
| 180 | column 5. A line that starts with a tab character followed by any digit | ||
| 181 | except @samp{0} is also a continuation line. We call this style of | ||
| 182 | continuation @dfn{tab format}. (Fortran90 introduced ``free format'', | ||
| 183 | with another style of continuation lines). | ||
| 184 | |||
| 185 | @vindex indent-tabs-mode @r{(Fortran mode)} | ||
| 186 | @vindex fortran-analyze-depth | ||
| 187 | @vindex fortran-tab-mode-default | ||
| 188 | Fortran mode can use either style of continuation line. When you | ||
| 189 | enter Fortran mode, it tries to deduce the proper continuation style | ||
| 190 | automatically from the buffer contents. It does this by scanning up to | ||
| 191 | @code{fortran-analyze-depth} (default 100) lines from the start of the | ||
| 192 | buffer. The first line that begins with either a tab character or six | ||
| 193 | spaces determines the choice. If the scan fails (for example, if the | ||
| 194 | buffer is new and therefore empty), the value of | ||
| 195 | @code{fortran-tab-mode-default} (@code{nil} for fixed format, and | ||
| 196 | non-@code{nil} for tab format) is used. @samp{/t} in the mode line | ||
| 197 | indicates tab format is selected. Fortran mode sets the value of | ||
| 198 | @code{indent-tabs-mode} accordingly. | ||
| 199 | |||
| 200 | If the text on a line starts with the Fortran continuation marker | ||
| 201 | @samp{$}, or if it begins with any non-whitespace character in column | ||
| 202 | 5, Fortran mode treats it as a continuation line. When you indent a | ||
| 203 | continuation line with @key{TAB}, it converts the line to the current | ||
| 204 | continuation style. When you split a Fortran statement with | ||
| 205 | @kbd{C-M-j}, the continuation marker on the newline is created according | ||
| 206 | to the continuation style. | ||
| 207 | |||
| 208 | The setting of continuation style affects several other aspects of | ||
| 209 | editing in Fortran mode. In fixed format mode, the minimum column | ||
| 210 | number for the body of a statement is 6. Lines inside of Fortran | ||
| 211 | blocks that are indented to larger column numbers always use only the | ||
| 212 | space character for whitespace. In tab format mode, the minimum | ||
| 213 | column number for the statement body is 8, and the whitespace before | ||
| 214 | column 8 must always consist of one tab character. | ||
| 215 | |||
| 216 | @node ForIndent Num | ||
| 217 | @subsubsection Line Numbers | ||
| 218 | |||
| 219 | If a number is the first non-whitespace in the line, Fortran | ||
| 220 | indentation assumes it is a line number and moves it to columns 0 | ||
| 221 | through 4. (Columns always count from 0 in GNU Emacs.) | ||
| 222 | |||
| 223 | @vindex fortran-line-number-indent | ||
| 224 | Line numbers of four digits or less are normally indented one space. | ||
| 225 | The variable @code{fortran-line-number-indent} controls this; it | ||
| 226 | specifies the maximum indentation a line number can have. The default | ||
| 227 | value of the variable is 1. Fortran mode tries to prevent line number | ||
| 228 | digits passing column 4, reducing the indentation below the specified | ||
| 229 | maximum if necessary. If @code{fortran-line-number-indent} has the | ||
| 230 | value 5, line numbers are right-justified to end in column 4. | ||
| 231 | |||
| 232 | @vindex fortran-electric-line-number | ||
| 233 | Simply inserting a line number is enough to indent it according to | ||
| 234 | these rules. As each digit is inserted, the indentation is recomputed. | ||
| 235 | To turn off this feature, set the variable | ||
| 236 | @code{fortran-electric-line-number} to @code{nil}. | ||
| 237 | |||
| 238 | |||
| 239 | @node ForIndent Conv | ||
| 240 | @subsubsection Syntactic Conventions | ||
| 241 | |||
| 242 | Fortran mode assumes that you follow certain conventions that simplify | ||
| 243 | the task of understanding a Fortran program well enough to indent it | ||
| 244 | properly: | ||
| 245 | |||
| 246 | @itemize @bullet | ||
| 247 | @item | ||
| 248 | Two nested @samp{do} loops never share a @samp{continue} statement. | ||
| 249 | |||
| 250 | @item | ||
| 251 | Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do} | ||
| 252 | and others are written without embedded whitespace or line breaks. | ||
| 253 | |||
| 254 | Fortran compilers generally ignore whitespace outside of string | ||
| 255 | constants, but Fortran mode does not recognize these keywords if they | ||
| 256 | are not contiguous. Constructs such as @samp{else if} or @samp{end do} | ||
| 257 | are acceptable, but the second word should be on the same line as the | ||
| 258 | first and not on a continuation line. | ||
| 259 | @end itemize | ||
| 260 | |||
| 261 | @noindent | ||
| 262 | If you fail to follow these conventions, the indentation commands may | ||
| 263 | indent some lines unaesthetically. However, a correct Fortran program | ||
| 264 | retains its meaning when reindented even if the conventions are not | ||
| 265 | followed. | ||
| 266 | |||
| 267 | @node ForIndent Vars | ||
| 268 | @subsubsection Variables for Fortran Indentation | ||
| 269 | |||
| 270 | @vindex fortran-do-indent | ||
| 271 | @vindex fortran-if-indent | ||
| 272 | @vindex fortran-structure-indent | ||
| 273 | @vindex fortran-continuation-indent | ||
| 274 | @vindex fortran-check-all-num@dots{} | ||
| 275 | @vindex fortran-minimum-statement-indent@dots{} | ||
| 276 | Several additional variables control how Fortran indentation works: | ||
| 277 | |||
| 278 | @table @code | ||
| 279 | @item fortran-do-indent | ||
| 280 | Extra indentation within each level of @samp{do} statement (default 3). | ||
| 281 | |||
| 282 | @item fortran-if-indent | ||
| 283 | Extra indentation within each level of @samp{if}, @samp{select case}, or | ||
| 284 | @samp{where} statements (default 3). | ||
| 285 | |||
| 286 | @item fortran-structure-indent | ||
| 287 | Extra indentation within each level of @samp{structure}, @samp{union}, | ||
| 288 | @samp{map}, or @samp{interface} statements (default 3). | ||
| 289 | |||
| 290 | @item fortran-continuation-indent | ||
| 291 | Extra indentation for bodies of continuation lines (default 5). | ||
| 292 | |||
| 293 | @item fortran-check-all-num-for-matching-do | ||
| 294 | In Fortran77, a numbered @samp{do} statement is ended by any statement | ||
| 295 | with a matching line number. It is common (but not compulsory) to use a | ||
| 296 | @samp{continue} statement for this purpose. If this variable has a | ||
| 297 | non-@code{nil} value, indenting any numbered statement must check for a | ||
| 298 | @samp{do} that ends there. If you always end @samp{do} statements with | ||
| 299 | a @samp{continue} line (or if you use the more modern @samp{enddo}), | ||
| 300 | then you can speed up indentation by setting this variable to | ||
| 301 | @code{nil}. The default is @code{nil}. | ||
| 302 | |||
| 303 | @item fortran-blink-matching-if | ||
| 304 | If this is @code{t}, indenting an @samp{endif} (or @samp{enddo} | ||
| 305 | statement moves the cursor momentarily to the matching @samp{if} (or | ||
| 306 | @samp{do}) statement to show where it is. The default is @code{nil}. | ||
| 307 | |||
| 308 | @item fortran-minimum-statement-indent-fixed | ||
| 309 | Minimum indentation for Fortran statements when using fixed format | ||
| 310 | continuation line style. Statement bodies are never indented less than | ||
| 311 | this much. The default is 6. | ||
| 312 | |||
| 313 | @item fortran-minimum-statement-indent-tab | ||
| 314 | Minimum indentation for Fortran statements for tab format continuation line | ||
| 315 | style. Statement bodies are never indented less than this much. The | ||
| 316 | default is 8. | ||
| 317 | @end table | ||
| 318 | |||
| 319 | The variables controlling the indentation of comments are described in | ||
| 320 | the following section. | ||
| 321 | |||
| 322 | @node Fortran Comments | ||
| 323 | @subsection Fortran Comments | ||
| 324 | |||
| 325 | The usual Emacs comment commands assume that a comment can follow a | ||
| 326 | line of code. In Fortran77, the standard comment syntax requires an | ||
| 327 | entire line to be just a comment. Therefore, Fortran mode replaces the | ||
| 328 | standard Emacs comment commands and defines some new variables. | ||
| 329 | |||
| 330 | @vindex fortran-comment-line-start | ||
| 331 | Fortran mode can also handle the Fortran90 comment syntax where comments | ||
| 332 | start with @samp{!} and can follow other text. Because only some Fortran77 | ||
| 333 | compilers accept this syntax, Fortran mode will not insert such comments | ||
| 334 | unless you have said in advance to do so. To do this, set the variable | ||
| 335 | @code{fortran-comment-line-start} to @samp{"!"}. | ||
| 336 | |||
| 337 | @table @kbd | ||
| 338 | @item M-; | ||
| 339 | Align comment or insert new comment (@code{fortran-indent-comment}). | ||
| 340 | |||
| 341 | @item C-x ; | ||
| 342 | Applies to nonstandard @samp{!} comments only. | ||
| 343 | |||
| 344 | @item C-c ; | ||
| 345 | Turn all lines of the region into comments, or (with argument) turn them back | ||
| 346 | into real code (@code{fortran-comment-region}). | ||
| 347 | @end table | ||
| 348 | |||
| 349 | @findex fortran-indent-comment | ||
| 350 | @kbd{M-;} in Fortran mode is redefined as the command | ||
| 351 | @code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this | ||
| 352 | recognizes any kind of existing comment and aligns its text appropriately; | ||
| 353 | if there is no existing comment, a comment is inserted and aligned. But | ||
| 354 | inserting and aligning comments are not the same in Fortran mode as in | ||
| 355 | other modes. | ||
| 356 | |||
| 357 | When a new comment must be inserted, if the current line is blank, a | ||
| 358 | full-line comment is inserted. On a non-blank line, a nonstandard @samp{!} | ||
| 359 | comment is inserted if you have said you want to use them. Otherwise a | ||
| 360 | full-line comment is inserted on a new line before the current line. | ||
| 361 | |||
| 362 | Nonstandard @samp{!} comments are aligned like comments in other | ||
| 363 | languages, but full-line comments are different. In a standard full-line | ||
| 364 | comment, the comment delimiter itself must always appear in column zero. | ||
| 365 | What can be aligned is the text within the comment. You can choose from | ||
| 366 | three styles of alignment by setting the variable | ||
| 367 | @code{fortran-comment-indent-style} to one of these values: | ||
| 368 | |||
| 369 | @vindex fortran-comment-indent-style | ||
| 370 | @vindex fortran-comment-line-extra-indent | ||
| 371 | @table @code | ||
| 372 | @item fixed | ||
| 373 | Align the text at a fixed column, which is the sum of | ||
| 374 | @code{fortran-comment-line-extra-indent} and the minimum statement | ||
| 375 | indentation. This is the default. | ||
| 376 | |||
| 377 | The minimum statement indentation is | ||
| 378 | @code{fortran-minimum-statement-indent-fixed} for fixed format | ||
| 379 | continuation line style and @code{fortran-minimum-statement-indent-tab} | ||
| 380 | for tab format style. | ||
| 381 | |||
| 382 | @item relative | ||
| 383 | Align the text as if it were a line of code, but with an additional | ||
| 384 | @code{fortran-comment-line-extra-indent} columns of indentation. | ||
| 385 | |||
| 386 | @item nil | ||
| 387 | Don't move text in full-line comments automatically. | ||
| 388 | @end table | ||
| 389 | |||
| 390 | @vindex fortran-comment-indent-char | ||
| 391 | In addition, you can specify the character to be used to indent within | ||
| 392 | full-line comments by setting the variable | ||
| 393 | @code{fortran-comment-indent-char} to the single-character string you want | ||
| 394 | to use. | ||
| 395 | |||
| 396 | @vindex fortran-directive-re | ||
| 397 | Compiler directive lines, or preprocessor lines, have much the same | ||
| 398 | appearance as comment lines. It is important, though, that such lines | ||
| 399 | never be indented at all, no matter what the value of | ||
| 400 | @code{fortran-comment-indent-style}. The variable | ||
| 401 | @code{fortran-directive-re} is a regular expression that specifies which | ||
| 402 | lines are directives. Matching lines are never indented, and receive | ||
| 403 | distinctive font-locking. | ||
| 404 | |||
| 405 | The normal Emacs comment command @kbd{C-x ;} has not been redefined. If | ||
| 406 | you use @samp{!} comments, this command can be used with them. Otherwise | ||
| 407 | it is useless in Fortran mode. | ||
| 408 | |||
| 409 | @kindex C-c ; @r{(Fortran mode)} | ||
| 410 | @findex fortran-comment-region | ||
| 411 | @vindex fortran-comment-region | ||
| 412 | The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the | ||
| 413 | lines of the region into comments by inserting the string @samp{C$$$} at | ||
| 414 | the front of each one. With a numeric argument, it turns the region | ||
| 415 | back into live code by deleting @samp{C$$$} from the front of each line | ||
| 416 | in it. The string used for these comments can be controlled by setting | ||
| 417 | the variable @code{fortran-comment-region}. Note that here we have an | ||
| 418 | example of a command and a variable with the same name; these two uses | ||
| 419 | of the name never conflict because in Lisp and in Emacs it is always | ||
| 420 | clear from the context which one is meant. | ||
| 421 | |||
| 422 | @node Fortran Autofill | ||
| 423 | @subsection Auto Fill in Fortran Mode | ||
| 424 | |||
| 425 | Fortran mode has specialized support for Auto Fill mode, which is a | ||
| 426 | minor mode that automatically splits statements as you insert them | ||
| 427 | when they become too wide. Splitting a statement involves making | ||
| 428 | continuation lines using @code{fortran-continuation-string} | ||
| 429 | (@pxref{ForIndent Cont}). This splitting happens when you type | ||
| 430 | @key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran | ||
| 431 | indentation commands. You activate Auto Fill in Fortran mode in the | ||
| 432 | normal way. | ||
| 433 | @iftex | ||
| 434 | @xref{Auto Fill,,, emacs, the Emacs Manual}. | ||
| 435 | @end iftex | ||
| 436 | @ifnottex | ||
| 437 | @xref{Auto Fill}. | ||
| 438 | @end ifnottex | ||
| 439 | |||
| 440 | @vindex fortran-break-before-delimiters | ||
| 441 | Auto Fill breaks lines at spaces or delimiters when the lines get | ||
| 442 | longer than the desired width (the value of @code{fill-column}). The | ||
| 443 | delimiters (besides whitespace) that Auto Fill can break at are | ||
| 444 | @samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>}, | ||
| 445 | and @samp{,}. The line break comes after the delimiter if the | ||
| 446 | variable @code{fortran-break-before-delimiters} is @code{nil}. | ||
| 447 | Otherwise (and by default), the break comes before the delimiter. | ||
| 448 | |||
| 449 | To enable Auto Fill in all Fortran buffers, add | ||
| 450 | @code{turn-on-auto-fill} to @code{fortran-mode-hook}. | ||
| 451 | @iftex | ||
| 452 | @xref{Hooks,,, emacs, the Emacs Manual}. | ||
| 453 | @end iftex | ||
| 454 | @ifnottex | ||
| 455 | @xref{Hooks}. | ||
| 456 | @end ifnottex | ||
| 457 | |||
| 458 | @node Fortran Columns | ||
| 459 | @subsection Checking Columns in Fortran | ||
| 460 | |||
| 461 | @table @kbd | ||
| 462 | @item C-c C-r | ||
| 463 | Display a ``column ruler'' momentarily above the current line | ||
| 464 | (@code{fortran-column-ruler}). | ||
| 465 | @item C-c C-w | ||
| 466 | Split the current window horizontally temporarily so that it is 72 | ||
| 467 | columns wide (@code{fortran-window-create-momentarily}). This may | ||
| 468 | help you avoid making lines longer than the 72-character limit that | ||
| 469 | some Fortran compilers impose. | ||
| 470 | @item C-u C-c C-w | ||
| 471 | Split the current window horizontally so that it is 72 columns wide | ||
| 472 | (@code{fortran-window-create}). You can then continue editing. | ||
| 473 | @item M-x fortran-strip-sequence-nos | ||
| 474 | Delete all text in column 72 and beyond. | ||
| 475 | @end table | ||
| 476 | |||
| 477 | @kindex C-c C-r @r{(Fortran mode)} | ||
| 478 | @findex fortran-column-ruler | ||
| 479 | The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column | ||
| 480 | ruler momentarily above the current line. The comment ruler is two lines | ||
| 481 | of text that show you the locations of columns with special significance in | ||
| 482 | Fortran programs. Square brackets show the limits of the columns for line | ||
| 483 | numbers, and curly brackets show the limits of the columns for the | ||
| 484 | statement body. Column numbers appear above them. | ||
| 485 | |||
| 486 | Note that the column numbers count from zero, as always in GNU Emacs. | ||
| 487 | As a result, the numbers may be one less than those you are familiar | ||
| 488 | with; but the positions they indicate in the line are standard for | ||
| 489 | Fortran. | ||
| 490 | |||
| 491 | @vindex fortran-column-ruler-fixed | ||
| 492 | @vindex fortran-column-ruler-tabs | ||
| 493 | The text used to display the column ruler depends on the value of the | ||
| 494 | variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is | ||
| 495 | @code{nil}, then the value of the variable | ||
| 496 | @code{fortran-column-ruler-fixed} is used as the column ruler. | ||
| 497 | Otherwise, the value of the variable @code{fortran-column-ruler-tab} is | ||
| 498 | displayed. By changing these variables, you can change the column ruler | ||
| 499 | display. | ||
| 500 | |||
| 501 | @kindex C-c C-w @r{(Fortran mode)} | ||
| 502 | @findex fortran-window-create-momentarily | ||
| 503 | @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily | ||
| 504 | splits the current window horizontally, making a window 72 columns | ||
| 505 | wide, so you can see any lines that are too long. Type a space to | ||
| 506 | restore the normal width. | ||
| 507 | |||
| 508 | @kindex C-u C-c C-w @r{(Fortran mode)} | ||
| 509 | @findex fortran-window-create | ||
| 510 | You can also split the window horizontally and continue editing with | ||
| 511 | the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x | ||
| 512 | fortran-window-create}). By editing in this window you can | ||
| 513 | immediately see when you make a line too wide to be correct Fortran. | ||
| 514 | |||
| 515 | @findex fortran-strip-sequence-nos | ||
| 516 | The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in | ||
| 517 | column 72 and beyond, on all lines in the current buffer. This is the | ||
| 518 | easiest way to get rid of old sequence numbers. | ||
| 519 | |||
| 520 | @node Fortran Abbrev | ||
| 521 | @subsection Fortran Keyword Abbrevs | ||
| 522 | |||
| 523 | Fortran mode provides many built-in abbrevs for common keywords and | ||
| 524 | declarations. These are the same sort of abbrev that you can define | ||
| 525 | yourself. To use them, you must turn on Abbrev mode. | ||
| 526 | @iftex | ||
| 527 | @xref{Abbrevs,,, emacs, the Emacs Manual}. | ||
| 528 | @end iftex | ||
| 529 | @ifnottex | ||
| 530 | @xref{Abbrevs}. | ||
| 531 | @end ifnottex | ||
| 532 | |||
| 533 | The built-in abbrevs are unusual in one way: they all start with a | ||
| 534 | semicolon. You cannot normally use semicolon in an abbrev, but Fortran | ||
| 535 | mode makes this possible by changing the syntax of semicolon to ``word | ||
| 536 | constituent.'' | ||
| 537 | |||
| 538 | For example, one built-in Fortran abbrev is @samp{;c} for | ||
| 539 | @samp{continue}. If you insert @samp{;c} and then insert a punctuation | ||
| 540 | character such as a space or a newline, the @samp{;c} expands automatically | ||
| 541 | to @samp{continue}, provided Abbrev mode is enabled.@refill | ||
| 542 | |||
| 543 | Type @samp{;?} or @samp{;C-h} to display a list of all the built-in | ||
| 544 | Fortran abbrevs and what they stand for. | ||
| 545 | |||
| 546 | @ignore | ||
| 547 | arch-tag: 23ed7c36-1517-4646-9235-2d5ade5f06f6 | ||
| 548 | @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 | |||
| 27 | 27 | ||
| 28 | Emacs compiled for MS-DOS emulates some windowing functionality, | 28 | Emacs compiled for MS-DOS emulates some windowing functionality, |
| 29 | so that you can use many of the features described in this chapter. | 29 | so that you can use many of the features described in this chapter. |
| 30 | @iftex | ||
| 30 | @xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}. | 31 | @xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}. |
| 32 | @end iftex | ||
| 33 | @ifnottex | ||
| 34 | @xref{MS-DOS Mouse}. | ||
| 35 | @end ifnottex | ||
| 36 | |||
| 31 | 37 | ||
| 32 | @menu | 38 | @menu |
| 33 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. | 39 | * Mouse Commands:: Moving, cutting, and pasting, with the mouse. |
| @@ -512,7 +518,7 @@ Here's a similar example for specifying a foreground color: | |||
| 512 | Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}). | 518 | Iconify the selected Emacs frame (@code{iconify-or-deiconify-frame}). |
| 513 | The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under | 519 | The normal meaning of @kbd{C-z}, to suspend Emacs, is not useful under |
| 514 | a graphical display that allows multiple applications to operate | 520 | a graphical display that allows multiple applications to operate |
| 515 | simultaneously in their own windies, so Emacs gives @kbd{C-z} a | 521 | simultaneously in their own windows, so Emacs gives @kbd{C-z} a |
| 516 | different binding in that case. | 522 | different binding in that case. |
| 517 | 523 | ||
| 518 | If you type this command on an Emacs frame's icon, it deiconifies the frame. | 524 | 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 @@ | |||
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004, |
| 3 | @c 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2005, 2006 Free Software Foundation, Inc. |
| 4 | @ifclear justgnu | 4 | @ifclear justgnu |
| 5 | @node Manifesto,, Emacs and Microsoft Windows, Top | 5 | @node Manifesto,, Microsoft Windows, Top |
| 6 | @unnumbered The GNU Manifesto | 6 | @unnumbered The GNU Manifesto |
| 7 | @end ifclear | 7 | @end ifclear |
| 8 | @ifset justgnu | 8 | @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 | |||
| 401 | libraries by topic keywords. Here is a partial list of keywords you can | 401 | libraries by topic keywords. Here is a partial list of keywords you can |
| 402 | use: | 402 | use: |
| 403 | 403 | ||
| 404 | @multitable {emulations} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} | 404 | @multitable {convenience} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} |
| 405 | @item abbrev@tab abbreviation handling, typing shortcuts, macros. | 405 | @item abbrev@tab abbreviation handling, typing shortcuts, macros. |
| 406 | @item bib@tab code related to the @code{bib} bibliography processor. | 406 | @item bib@tab code related to the @code{bib} bibliography processor. |
| 407 | @item c@tab support for the C language and related languages. | 407 | @item c@tab support for the C language and related languages. |
diff --git a/man/killing.texi b/man/killing.texi index c69f6ca2805..ad79e5595ca 100644 --- a/man/killing.texi +++ b/man/killing.texi | |||
| @@ -62,7 +62,7 @@ message in the echo area to explain why the text has not been erased. | |||
| 62 | * Killing by Lines:: How to kill entire lines of text at one time. | 62 | * Killing by Lines:: How to kill entire lines of text at one time. |
| 63 | * Other Kill Commands:: Commands to kill large regions of text and | 63 | * Other Kill Commands:: Commands to kill large regions of text and |
| 64 | syntactic units such as words and sentences. | 64 | syntactic units such as words and sentences. |
| 65 | * Graphical Kill:: The kill ring on graphical terminals: | 65 | * Graphical Kill:: The kill ring on graphical displays: |
| 66 | yanking between applications. | 66 | yanking between applications. |
| 67 | @end menu | 67 | @end menu |
| 68 | 68 | ||
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 @@ | |||
| 2 | @c Copyright (C) 2000, 2001, 2002, 2003, 2004, | 2 | @c Copyright (C) 2000, 2001, 2002, 2003, 2004, |
| 3 | @c 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Mac OS, Emacs and Microsoft Windows, Antinews, Top | 5 | @node Mac OS, Microsoft Windows, Antinews, Top |
| 6 | @appendix Emacs and Mac OS | 6 | @appendix Emacs and Mac OS |
| 7 | @cindex Mac OS | 7 | @cindex Mac OS |
| 8 | @cindex Macintosh | 8 | @cindex Macintosh |
| @@ -67,7 +67,8 @@ Classic) or the International system preference pane (Mac OS X) and | |||
| 67 | supports international and alternative keyboard layouts (e.g., Dvorak) | 67 | supports international and alternative keyboard layouts (e.g., Dvorak) |
| 68 | if its script is either Roman, Japanese, Traditional Chinese, Korean, | 68 | if its script is either Roman, Japanese, Traditional Chinese, Korean, |
| 69 | Cyrillic, Simplified Chinese, or Central European. Keyboard layouts | 69 | Cyrillic, Simplified Chinese, or Central European. Keyboard layouts |
| 70 | based on Unicode may not work properly. Selecting one of the layouts | 70 | based on Unicode may not work properly. (Try drag-and-drop if input |
| 71 | from the Character Palette does not work.) Selecting one of the layouts | ||
| 71 | from the keyboard layout pull-down menu will affect how the keys typed | 72 | from the keyboard layout pull-down menu will affect how the keys typed |
| 72 | on the keyboard are interpreted. | 73 | on the keyboard are interpreted. |
| 73 | 74 | ||
| @@ -318,7 +319,7 @@ charset @code{iso10646-1}. For example 12-point Monaco can be specified | |||
| 318 | by the name | 319 | by the name |
| 319 | @samp{-apple-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1}. Note | 320 | @samp{-apple-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1}. Note |
| 320 | that it must be specified in a format containing 14 @samp{-}s (i.e., not | 321 | that it must be specified in a format containing 14 @samp{-}s (i.e., not |
| 321 | by @samp{-apple-monaco-medium-r-normal-12-*-iso10646-1}) because every | 322 | by @samp{-apple-monaco-medium-r-normal--12-*-iso10646-1}) because every |
| 322 | @acronym{ATSUI}-compatible font is a scalable one. | 323 | @acronym{ATSUI}-compatible font is a scalable one. |
| 323 | 324 | ||
| 324 | QuickDraw Text fonts have maker name @code{apple} and various charset | 325 | 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. | |||
| 14 | * Format of ChangeLog:: What the change log file looks like. | 14 | * Format of ChangeLog:: What the change log file looks like. |
| 15 | * Tags:: Go direct to any function in your program in one | 15 | * Tags:: Go direct to any function in your program in one |
| 16 | command. Tags remembers which file it is in. | 16 | command. Tags remembers which file it is in. |
| 17 | @ifnottex | ||
| 18 | * Emerge:: A convenient way of merging two versions of a program. | ||
| 19 | @end ifnottex | ||
| 17 | @end menu | 20 | @end menu |
| 18 | 21 | ||
| 19 | @node Change Log | 22 | @node Change Log |
| @@ -845,6 +848,10 @@ details. | |||
| 845 | You can also use the collection of tag names to complete a symbol | 848 | You can also use the collection of tag names to complete a symbol |
| 846 | name in the buffer. @xref{Symbol Completion}. | 849 | name in the buffer. @xref{Symbol Completion}. |
| 847 | 850 | ||
| 851 | @ifnottex | ||
| 852 | @include emerge-xtra.texi | ||
| 853 | @end ifnottex | ||
| 854 | |||
| 848 | @ignore | 855 | @ignore |
| 849 | arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb | 856 | arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb |
| 850 | @end ignore | 857 | @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 | |||
| 30 | # The makeinfo program is part of the Texinfo distribution. | 30 | # The makeinfo program is part of the Texinfo distribution. |
| 31 | MAKEINFO = makeinfo --force | 31 | MAKEINFO = makeinfo --force |
| 32 | MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat | 32 | MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat |
| 33 | INFO_TARGETS = $(infodir)/emacs $(infodir)/emacs-xtra $(infodir)/ccmode \ | 33 | INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \ |
| 34 | $(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \ | 34 | $(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \ |
| 35 | $(infodir)/forms $(infodir)/gnus $(infodir)/message \ | 35 | $(infodir)/forms $(infodir)/gnus $(infodir)/message \ |
| 36 | $(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \ | 36 | $(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \ |
| @@ -62,6 +62,18 @@ TEXI2DVI = texi2dvi | |||
| 62 | ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ | 62 | ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ |
| 63 | "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C | 63 | "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C |
| 64 | 64 | ||
| 65 | EMACS_XTRA=\ | ||
| 66 | $(srcdir)/arevert-xtra.texi \ | ||
| 67 | $(srcdir)/cal-xtra.texi \ | ||
| 68 | $(srcdir)/dired-xtra.texi \ | ||
| 69 | $(srcdir)/picture-xtra.texi \ | ||
| 70 | $(srcdir)/emerge-xtra.texi \ | ||
| 71 | $(srcdir)/vc-xtra.texi \ | ||
| 72 | $(srcdir)/vc1-xtra.texi \ | ||
| 73 | $(srcdir)/vc2-xtra.texi \ | ||
| 74 | $(srcdir)/fortran-xtra.texi \ | ||
| 75 | $(srcdir)/msdog-xtra.texi | ||
| 76 | |||
| 65 | EMACSSOURCES= \ | 77 | EMACSSOURCES= \ |
| 66 | $(srcdir)/emacs.texi \ | 78 | $(srcdir)/emacs.texi \ |
| 67 | $(srcdir)/doclicense.texi \ | 79 | $(srcdir)/doclicense.texi \ |
| @@ -105,7 +117,8 @@ EMACSSOURCES= \ | |||
| 105 | $(srcdir)/gnu.texi \ | 117 | $(srcdir)/gnu.texi \ |
| 106 | $(srcdir)/glossary.texi \ | 118 | $(srcdir)/glossary.texi \ |
| 107 | $(srcdir)/ack.texi \ | 119 | $(srcdir)/ack.texi \ |
| 108 | $(srcdir)/kmacro.texi | 120 | $(srcdir)/kmacro.texi \ |
| 121 | $(EMACS_XTRA) | ||
| 109 | 122 | ||
| 110 | info: $(INFO_TARGETS) | 123 | info: $(INFO_TARGETS) |
| 111 | 124 | ||
| @@ -134,7 +147,7 @@ info.dvi: $(INFOSOURCES) | |||
| 134 | $(infodir)/emacs: $(EMACSSOURCES) | 147 | $(infodir)/emacs: $(EMACSSOURCES) |
| 135 | $(MAKEINFO) emacs.texi | 148 | $(MAKEINFO) emacs.texi |
| 136 | 149 | ||
| 137 | emacs.dvi: $(EMACSSOURCES) | 150 | emacs.dvi: $(EMACSSOURCES) $(srcdir)/xresmini.texi |
| 138 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi | 151 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi |
| 139 | 152 | ||
| 140 | # This target is here so you could easily get the list of the *.texi | 153 | # This target is here so you could easily get the list of the *.texi |
| @@ -309,10 +322,7 @@ $(infodir)/smtpmail: smtpmail.texi | |||
| 309 | smtpmail.dvi: smtpmail.texi | 322 | smtpmail.dvi: smtpmail.texi |
| 310 | $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi | 323 | $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi |
| 311 | 324 | ||
| 312 | $(infodir)/emacs-xtra: emacs-xtra.texi | 325 | emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA) |
| 313 | $(MAKEINFO) emacs-xtra.texi | ||
| 314 | |||
| 315 | emacs-xtra.dvi: emacs-xtra.texi | ||
| 316 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi | 326 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi |
| 317 | 327 | ||
| 318 | $(infodir)/org: org.texi | 328 | $(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 @@ | |||
| 8 | @c %**end of header | 8 | @c %**end of header |
| 9 | 9 | ||
| 10 | @c Version of the software and manual. | 10 | @c Version of the software and manual. |
| 11 | @set VERSION 7.94 | 11 | @set VERSION 8.0 |
| 12 | @c Edition of the manual. It is either empty for the first edition or | 12 | @c Edition of the manual. It is either empty for the first edition or |
| 13 | @c has the form ", nth Edition" (without the quotes). | 13 | @c has the form ", nth Edition" (without the quotes). |
| 14 | @set EDITION , 2nd Edition | 14 | @set EDITION |
| 15 | @set UPDATED 2006-04-24 | 15 | @set UPDATED 2006-05-06 |
| 16 | @set UPDATE-MONTH April, 2006 | 16 | @set UPDATE-MONTH May, 2006 |
| 17 | 17 | ||
| 18 | @c Other variables. | 18 | @c Other variables. |
| 19 | @set MH-BOOK-HOME http://www.ics.uci.edu/~mh/book/mh | 19 | @set MH-BOOK-HOME http://rand-mh.sourceforge.net/book/mh |
| 20 | @set MH-E-HOME http://mh-e.sourceforge.net/ | 20 | @set MH-E-HOME http://mh-e.sourceforge.net/ |
| 21 | 21 | ||
| 22 | @c Copyright | 22 | @c Copyright |
| @@ -564,12 +564,12 @@ has packages for both of these. | |||
| 564 | If you've never run MH before, you need to run @command{install-mh} | 564 | If you've never run MH before, you need to run @command{install-mh} |
| 565 | from the shell before you continue. This sets up your personal MH | 565 | from the shell before you continue. This sets up your personal MH |
| 566 | environment@footnote{See the section | 566 | environment@footnote{See the section |
| 567 | @uref{@value{MH-BOOK-HOME}/../overall/setup.htm, Setting Up MH} in the | 567 | @uref{@value{MH-BOOK-HOME}/../overall/setup.html, Setting Up MH} in the |
| 568 | MH book.}. If you don't, you'll be greeted with the error message: | 568 | MH book.}. If you don't, you'll be greeted with the error message: |
| 569 | @samp{Install MH and run install-mh before running MH-E}. This is all | 569 | @samp{Install MH and run install-mh before running MH-E}. This is all |
| 570 | you need to know about MH to use MH-E, but the more you know about MH, | 570 | you need to know about MH to use MH-E, but the more you know about MH, |
| 571 | the more you can leverage its power. See the | 571 | the more you can leverage its power. See the |
| 572 | @uref{@value{MH-BOOK-HOME}, MH book} to learn more about MH. | 572 | @uref{@value{MH-BOOK-HOME}/../, MH book} to learn more about MH. |
| 573 | 573 | ||
| 574 | @cindex @samp{Path:} MH profile component | 574 | @cindex @samp{Path:} MH profile component |
| 575 | @cindex MH profile | 575 | @cindex MH profile |
| @@ -763,10 +763,10 @@ message. Type @kbd{C-c C-c} now. That's all there is to it! | |||
| 763 | To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. | 763 | To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. |
| 764 | This incorporates the new mail and puts the output from | 764 | This incorporates the new mail and puts the output from |
| 765 | @command{inc}@footnote{See the section | 765 | @command{inc}@footnote{See the section |
| 766 | @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next | 766 | @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next |
| 767 | prev} in the MH book.} (called @dfn{scan lines} after the MH program | 767 | prev} in the MH book.} (called @dfn{scan lines} after the MH program |
| 768 | @command{scan}@footnote{See the section | 768 | @command{scan}@footnote{See the section |
| 769 | @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan | 769 | @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan |
| 770 | pick Ranges Sequences} in the MH book.} which prints a one-line | 770 | pick Ranges Sequences} in the MH book.} which prints a one-line |
| 771 | summary of each message) into a buffer called @samp{+inbox} whose | 771 | summary of each message) into a buffer called @samp{+inbox} whose |
| 772 | major mode is MH-Folder. | 772 | major mode is MH-Folder. |
| @@ -1088,7 +1088,7 @@ i} to read this manual via Info. The online help is quite good; try | |||
| 1088 | running @kbd{C-h C-h}. This brings up a list of available help topics, | 1088 | running @kbd{C-h C-h}. This brings up a list of available help topics, |
| 1089 | one of which displays the documentation for a given key (like @kbd{C-h | 1089 | one of which displays the documentation for a given key (like @kbd{C-h |
| 1090 | k C-n}). Another useful help feature is to view the manual section | 1090 | k C-n}). Another useful help feature is to view the manual section |
| 1091 | that describes a given key (such as @kbd{C-h C-k i}). In addition, | 1091 | that describes a given key (such as @kbd{C-h K i}). In addition, |
| 1092 | review @ref{Conventions}, if any of the GNU Emacs conventions are | 1092 | review @ref{Conventions}, if any of the GNU Emacs conventions are |
| 1093 | strange to you. | 1093 | strange to you. |
| 1094 | 1094 | ||
| @@ -1158,7 +1158,7 @@ mh-execute-commands @key{RET}}. If you write your own functions, | |||
| 1158 | please do not prefix your symbols (variables and functions) with | 1158 | please do not prefix your symbols (variables and functions) with |
| 1159 | @samp{mh-}. This prefix is reserved for the MH-E package. To avoid | 1159 | @samp{mh-}. This prefix is reserved for the MH-E package. To avoid |
| 1160 | conflicts with existing MH-E symbols, use a prefix like @samp{my-} or | 1160 | conflicts with existing MH-E symbols, use a prefix like @samp{my-} or |
| 1161 | your initials. | 1161 | your initials. (Unless, of course, your initials happen to be @emph{mh}!) |
| 1162 | 1162 | ||
| 1163 | @menu | 1163 | @menu |
| 1164 | * Options:: | 1164 | * Options:: |
| @@ -1252,7 +1252,7 @@ Indicates all messages in the range <num1> to <num2>, inclusive. The | |||
| 1252 | range must be nonempty. | 1252 | range must be nonempty. |
| 1253 | @c ------------------------- | 1253 | @c ------------------------- |
| 1254 | @item <num>:N | 1254 | @item <num>:N |
| 1255 | @item <num>:+N | 1255 | @itemx <num>:+N |
| 1256 | @itemx <num>:-N | 1256 | @itemx <num>:-N |
| 1257 | Up to N messages beginning with (or ending with) message num. Num may | 1257 | Up to N messages beginning with (or ending with) message num. Num may |
| 1258 | be any of the predefined symbols: first, prev, cur, next or last. | 1258 | 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 | |||
| 1459 | @code{mh-progs} directory (@pxref{Getting Started}). You may also link | 1459 | @code{mh-progs} directory (@pxref{Getting Started}). You may also link |
| 1460 | a file to @command{inc} that uses a different format (see | 1460 | a file to @command{inc} that uses a different format (see |
| 1461 | @samp{mh-profile}(5), and sections | 1461 | @samp{mh-profile}(5), and sections |
| 1462 | @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next | 1462 | @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next |
| 1463 | prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in | 1463 | prev} and @uref{@value{MH-BOOK-HOME}/mhstr.html, MH Format Strings} in |
| 1464 | the MH book). You'll then need to modify several variables | 1464 | the MH book). You'll then need to modify several variables |
| 1465 | appropriately (@pxref{Scan Line Formats}). | 1465 | appropriately (@pxref{Scan Line Formats}). |
| 1466 | 1466 | ||
| @@ -2169,7 +2169,7 @@ Default mhl Format} to get the same output as you would get if you ran | |||
| 2169 | @command{mhl} from the shell. If you have a format file that you want | 2169 | @command{mhl} from the shell. If you have a format file that you want |
| 2170 | MH-E to use, you can set this option to @samp{Specify an mhl Format | 2170 | MH-E to use, you can set this option to @samp{Specify an mhl Format |
| 2171 | File} and enter the name of your format file (@command{mhl}(1) or | 2171 | File} and enter the name of your format file (@command{mhl}(1) or |
| 2172 | section @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in | 2172 | section @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in |
| 2173 | the MH book tells you how to write one). Your format file should | 2173 | the MH book tells you how to write one). Your format file should |
| 2174 | specify a non-zero value for @samp{overflowoffset} to allow MH-E to | 2174 | specify a non-zero value for @samp{overflowoffset} to allow MH-E to |
| 2175 | parse the header. Note that @command{mhl} is always used for printing | 2175 | 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 | |||
| 2291 | Mail Extensions) messages which are simply messages with additional | 2291 | Mail Extensions) messages which are simply messages with additional |
| 2292 | @dfn{body parts} or @dfn{attachments}. You can use the MH commands | 2292 | @dfn{body parts} or @dfn{attachments}. You can use the MH commands |
| 2293 | @command{show}@footnote{See the section | 2293 | @command{show}@footnote{See the section |
| 2294 | @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next | 2294 | @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next |
| 2295 | prev} in the MH book.} or @command{mhshow}@footnote{See the section | 2295 | prev} in the MH book.} or @command{mhshow}@footnote{See the section |
| 2296 | @uref{@value{MH-BOOK-HOME}/usimim.htm#ReMIMa, Reading MIME Mail} in | 2296 | @uref{@value{MH-BOOK-HOME}/usimim.html#ReMIMa, Reading MIME Mail} in |
| 2297 | the MH book.} from the shell to read @sc{mime} messages@footnote{You | 2297 | the MH book.} from the shell to read @sc{mime} messages@footnote{You |
| 2298 | can call them directly from Emacs if you're running the X Window | 2298 | can call them directly from Emacs if you're running the X Window |
| 2299 | System: type @kbd{M-! xterm -e mhshow @var{message-number}}. You can | 2299 | 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}). | |||
| 2656 | 2656 | ||
| 2657 | Another handy command is @kbd{D b} (@code{mh-burst-digest}). This | 2657 | Another handy command is @kbd{D b} (@code{mh-burst-digest}). This |
| 2658 | command uses the MH command @command{burst}@footnote{See the section | 2658 | command uses the MH command @command{burst}@footnote{See the section |
| 2659 | @uref{@value{MH-BOOK-HOME}/burdig.htm, Bursting Messages} in the MH | 2659 | @uref{@value{MH-BOOK-HOME}/burdig.html, Bursting Messages} in the MH |
| 2660 | book.} to break out each message in the digest into its own message. | 2660 | book.} to break out each message in the digest into its own message. |
| 2661 | Using this command, you can quickly delete unwanted messages, like | 2661 | Using this command, you can quickly delete unwanted messages, like |
| 2662 | this: Once the digest is split up, toggle out of MH-Folder Show mode | 2662 | 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 | |||
| 2867 | @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or | 2867 | @kbd{P l} (@code{mh-print-msg}) (the @i{l} is for @i{l}ine printer or |
| 2868 | @i{l}pr). You can print all the messages in a range. The message is | 2868 | @i{l}pr). You can print all the messages in a range. The message is |
| 2869 | formatted with @command{mhl}@footnote{See the section | 2869 | formatted with @command{mhl}@footnote{See the section |
| 2870 | @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH | 2870 | @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH |
| 2871 | book.} and printed with the @command{lpr} command. | 2871 | book.} and printed with the @command{lpr} command. |
| 2872 | 2872 | ||
| 2873 | @kindex P f | 2873 | @kindex P f |
| @@ -3471,8 +3471,8 @@ bindings, for example: | |||
| 3471 | 3471 | ||
| 3472 | MH-E has analogies for each of the MH @command{folder} and | 3472 | MH-E has analogies for each of the MH @command{folder} and |
| 3473 | @command{refile} commands@footnote{See the sections | 3473 | @command{refile} commands@footnote{See the sections |
| 3474 | @uref{@value{MH-BOOK-HOME}/fol.htm#Youfol, Your Current Folder: | 3474 | @uref{@value{MH-BOOK-HOME}/fol.html#Youfol, Your Current Folder: |
| 3475 | folder} and @uref{@value{MH-BOOK-HOME}/fol.htm#Movref, Moving and | 3475 | folder} and @uref{@value{MH-BOOK-HOME}/fol.html#Movref, Moving and |
| 3476 | Linking Messages: refile} in the MH book.}. To refile a message in | 3476 | Linking Messages: refile} in the MH book.}. To refile a message in |
| 3477 | another folder, use the command @kbd{o} (@code{mh-refile-msg}) | 3477 | another folder, use the command @kbd{o} (@code{mh-refile-msg}) |
| 3478 | (mnemonic: ``output''). You are prompted for the folder name | 3478 | (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 | |||
| 3720 | 3720 | ||
| 3721 | The option @code{mh-sortm-args} holds extra arguments to pass on to | 3721 | The option @code{mh-sortm-args} holds extra arguments to pass on to |
| 3722 | the command @command{sortm}@footnote{See the section | 3722 | the command @command{sortm}@footnote{See the section |
| 3723 | @uref{@value{MH-BOOK-HOME}/sorsor.htm, Sorting Messages: sortm} in the | 3723 | @uref{@value{MH-BOOK-HOME}/sorsor.html, Sorting Messages: sortm} in the |
| 3724 | MH book.} when a prefix argument is used with @kbd{F S}. Normally | 3724 | MH book.} when a prefix argument is used with @kbd{F S}. Normally |
| 3725 | default arguments to @command{sortm} are specified in the MH profile. | 3725 | default arguments to @command{sortm} are specified in the MH profile. |
| 3726 | This option may be used to provide an alternate view. For example, | 3726 | This option may be used to provide an alternate view. For example, |
| @@ -4103,7 +4103,7 @@ recipients. | |||
| 4103 | @vindex mh-reply-default-reply-to | 4103 | @vindex mh-reply-default-reply-to |
| 4104 | 4104 | ||
| 4105 | Depending on your answer, @command{repl}@footnote{See the section | 4105 | Depending on your answer, @command{repl}@footnote{See the section |
| 4106 | @uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in | 4106 | @uref{@value{MH-BOOK-HOME}/reprep.html, Replying to Messages: repl} in |
| 4107 | the MH book.} is given a different argument to form your reply. | 4107 | the MH book.} is given a different argument to form your reply. |
| 4108 | Specifically, a choice of @kbd{from} or none at all runs @samp{repl | 4108 | Specifically, a choice of @kbd{from} or none at all runs @samp{repl |
| 4109 | -nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally, | 4109 | -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 | |||
| 4133 | are replying to is inserted in your reply after having first been run | 4133 | are replying to is inserted in your reply after having first been run |
| 4134 | through @command{mhl} with the format file @file{mhl.reply}. See | 4134 | through @command{mhl} with the format file @file{mhl.reply}. See |
| 4135 | @command{mhl}(1) or the section | 4135 | @command{mhl}(1) or the section |
| 4136 | @uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH | 4136 | @uref{@value{MH-BOOK-HOME}/shomes.html#Usisho, Using mhl} in the MH |
| 4137 | book to see how you can modify the default @file{mhl.reply} file. | 4137 | book to see how you can modify the default @file{mhl.reply} file. |
| 4138 | 4138 | ||
| 4139 | @vindex mh-yank-behavior | 4139 | @vindex mh-yank-behavior |
| @@ -4169,7 +4169,7 @@ To forward a message, use the @kbd{f} (@code{mh-forward}) command. You | |||
| 4169 | are prompted for the @samp{To:} and @samp{cc:} recipients. You are | 4169 | are prompted for the @samp{To:} and @samp{cc:} recipients. You are |
| 4170 | given a draft to edit that looks like it would if you had run the MH | 4170 | given a draft to edit that looks like it would if you had run the MH |
| 4171 | command @command{forw}@footnote{See the section | 4171 | command @command{forw}@footnote{See the section |
| 4172 | @uref{@value{MH-BOOK-HOME}/forfor.htm, Forwarding Messages: forw} in | 4172 | @uref{@value{MH-BOOK-HOME}/forfor.html, Forwarding Messages: forw} in |
| 4173 | the MH book.}. You can then add some text (@pxref{Editing Drafts}). | 4173 | the MH book.}. You can then add some text (@pxref{Editing Drafts}). |
| 4174 | You can forward several messages by using a range (@pxref{Ranges}). | 4174 | You can forward several messages by using a range (@pxref{Ranges}). |
| 4175 | All of the messages in the range are inserted into your draft. The | 4175 | All of the messages in the range are inserted into your draft. The |
| @@ -4243,10 +4243,10 @@ For more information on redistributing messages, see | |||
| 4243 | 4243 | ||
| 4244 | The option @code{mh-redist-full-contents-flag} must be turned on if | 4244 | The option @code{mh-redist-full-contents-flag} must be turned on if |
| 4245 | @command{dist}@footnote{See the section | 4245 | @command{dist}@footnote{See the section |
| 4246 | @uref{@value{MH-BOOK-HOME}/disdis.htm, Distributing Messages with | 4246 | @uref{@value{MH-BOOK-HOME}/disdis.html, Distributing Messages with |
| 4247 | dist} in the MH book.} requires the whole letter for redistribution, | 4247 | dist} in the MH book.} requires the whole letter for redistribution, |
| 4248 | which is the case if @command{send}@footnote{See the section | 4248 | which is the case if @command{send}@footnote{See the section |
| 4249 | @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send} | 4249 | @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} |
| 4250 | in the MH book.} is compiled with the @sc{berk} option (which many | 4250 | in the MH book.} is compiled with the @sc{berk} option (which many |
| 4251 | people abhor). If you find that MH will not allow you to redistribute | 4251 | people abhor). If you find that MH will not allow you to redistribute |
| 4252 | a message that has been redistributed before, turn off this option. | 4252 | 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} | |||
| 5143 | to insert the directives so you don't need to remember the syntax of | 5143 | to insert the directives so you don't need to remember the syntax of |
| 5144 | them. Remember: you can always add MH-style directives by | 5144 | them. Remember: you can always add MH-style directives by |
| 5145 | hand@footnote{See the section | 5145 | hand@footnote{See the section |
| 5146 | @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in | 5146 | @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in |
| 5147 | the MH book.}. | 5147 | the MH book.}. |
| 5148 | 5148 | ||
| 5149 | @cindex MIME Meta Language (MML) | 5149 | @cindex MIME Meta Language (MML) |
| @@ -5432,7 +5432,7 @@ If you're using MH-style directives, use @kbd{C-c C-e} | |||
| 5432 | (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the | 5432 | (@code{mh-mh-to-mime}) instead of @kbd{C-c C-m C-m}. This runs the |
| 5433 | command @command{mhbuild} (@command{mhn}) on the message which expands | 5433 | command @command{mhbuild} (@command{mhn}) on the message which expands |
| 5434 | the tags@footnote{See the section | 5434 | the tags@footnote{See the section |
| 5435 | @uref{@value{MH-BOOK-HOME}/usimim.htm#SeMIMa, Sending MIME Mail} in | 5435 | @uref{@value{MH-BOOK-HOME}/usimim.html#SeMIMa, Sending MIME Mail} in |
| 5436 | the MH book.}. This action can be undone by running @kbd{C-c C-m C-u} | 5436 | the MH book.}. This action can be undone by running @kbd{C-c C-m C-u} |
| 5437 | (@code{mh-mh-to-mime-undo}), which works by reverting to a backup | 5437 | (@code{mh-mh-to-mime-undo}), which works by reverting to a backup |
| 5438 | file. You are prompted to confirm this action, but you can avoid the | 5438 | 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 | |||
| 5565 | you can check the actual address(es) in the alias. A new buffer named | 5565 | you can check the actual address(es) in the alias. A new buffer named |
| 5566 | @samp{*MH-E Recipients*} is created with the output of @command{whom} | 5566 | @samp{*MH-E Recipients*} is created with the output of @command{whom} |
| 5567 | (@pxref{Miscellaneous})@footnote{See the section | 5567 | (@pxref{Miscellaneous})@footnote{See the section |
| 5568 | @uref{@value{MH-BOOK-HOME}/senove.htm#WhaPro, What now? -- and the | 5568 | @uref{@value{MH-BOOK-HOME}/senove.html#WhaPro, What now? -- and the |
| 5569 | whatnow Program} in the MH book.}. | 5569 | whatnow Program} in the MH book.}. |
| 5570 | 5570 | ||
| 5571 | @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts | 5571 | @node Sending Message, Killing Draft, Checking Recipients, Editing Drafts |
| @@ -5599,7 +5599,7 @@ spelling in your message before sending, add the function | |||
| 5599 | @vindex mh-send-prog | 5599 | @vindex mh-send-prog |
| 5600 | 5600 | ||
| 5601 | In case the MH @command{send} program@footnote{See the section | 5601 | In case the MH @command{send} program@footnote{See the section |
| 5602 | @uref{@value{MH-BOOK-HOME}/sensen.htm, Sending Some Mail: comp send} | 5602 | @uref{@value{MH-BOOK-HOME}/sensen.html, Sending Some Mail: comp send} |
| 5603 | in the MH book.} is installed under a different name, use | 5603 | in the MH book.} is installed under a different name, use |
| 5604 | @code{mh-send-prog} to tell MH-E the name. | 5604 | @code{mh-send-prog} to tell MH-E the name. |
| 5605 | 5605 | ||
| @@ -5780,7 +5780,7 @@ Recipients}. | |||
| 5780 | 5780 | ||
| 5781 | MH-E loads aliases for completion and folder name hints from various | 5781 | MH-E loads aliases for completion and folder name hints from various |
| 5782 | places. It uses the MH command @command{ali}@footnote{See the section | 5782 | places. It uses the MH command @command{ali}@footnote{See the section |
| 5783 | @uref{@value{MH-BOOK-HOME}/mh.htm, MH Aliases} in the MH book.} to | 5783 | @uref{@value{MH-BOOK-HOME}/mh.html, MH Aliases} in the MH book.} to |
| 5784 | read aliases from the files listed in the profile component | 5784 | read aliases from the files listed in the profile component |
| 5785 | @samp{Aliasfile:} as well as system-wide aliases (for example, | 5785 | @samp{Aliasfile:} as well as system-wide aliases (for example, |
| 5786 | @file{/etc/nmh/MailAliases}). | 5786 | @file{/etc/nmh/MailAliases}). |
| @@ -6253,7 +6253,7 @@ contains these items. Dismiss the speedbar with @kbd{C-x 5 0} | |||
| 6253 | @cindex customization group, @samp{mh-speedbar} | 6253 | @cindex customization group, @samp{mh-speedbar} |
| 6254 | 6254 | ||
| 6255 | The MH-E speedbar uses the MH command @command{flists}@footnote{See | 6255 | The MH-E speedbar uses the MH command @command{flists}@footnote{See |
| 6256 | the section @uref{@value{MH-BOOK-HOME}/morseq.htm#flist, Searching for | 6256 | the section @uref{@value{MH-BOOK-HOME}/morseq.html#flist, Searching for |
| 6257 | Sequences with flist} in the MH book.} to generate the list of | 6257 | Sequences with flist} in the MH book.} to generate the list of |
| 6258 | folders. The @samp{mh-speedbar} customization group contains the | 6258 | folders. The @samp{mh-speedbar} customization group contains the |
| 6259 | following option which controls how often the speedbar calls | 6259 | 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 \ | |||
| 6951 | This search method does not require any setup. | 6951 | This search method does not require any setup. |
| 6952 | 6952 | ||
| 6953 | Read @command{pick}(1) or the section | 6953 | Read @command{pick}(1) or the section |
| 6954 | @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in | 6954 | @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in |
| 6955 | the MH book to find out more about how to enter the criteria. | 6955 | the MH book to find out more about how to enter the criteria. |
| 6956 | 6956 | ||
| 6957 | @subsection grep | 6957 | @subsection grep |
| @@ -7180,7 +7180,7 @@ messages matching the content of the respective field in the current | |||
| 7180 | message. However, you can give any of these a prefix argument to edit | 7180 | message. However, you can give any of these a prefix argument to edit |
| 7181 | the @command{pick} expression used to narrow the view@footnote{See | 7181 | the @command{pick} expression used to narrow the view@footnote{See |
| 7182 | @command{pick}(1) or the section | 7182 | @command{pick}(1) or the section |
| 7183 | @uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in | 7183 | @uref{@value{MH-BOOK-HOME}/finpic.html, Finding Messages with pick} in |
| 7184 | the MH book.}. | 7184 | the MH book.}. |
| 7185 | 7185 | ||
| 7186 | @cindex @samp{tick} sequence | 7186 | @cindex @samp{tick} sequence |
| @@ -7212,7 +7212,7 @@ command. Give this command a prefix argument to remove all limits. | |||
| 7212 | 7212 | ||
| 7213 | For the whole scoop on MH sequences, refer to | 7213 | For the whole scoop on MH sequences, refer to |
| 7214 | @samp{mh-sequence}(5)@footnote{See the section | 7214 | @samp{mh-sequence}(5)@footnote{See the section |
| 7215 | @uref{@value{MH-BOOK-HOME}/morseq.htm, More About Sequences} in the MH | 7215 | @uref{@value{MH-BOOK-HOME}/morseq.html, More About Sequences} in the MH |
| 7216 | book.}. As you've read, several of the MH-E commands can operate on a | 7216 | book.}. As you've read, several of the MH-E commands can operate on a |
| 7217 | sequence, which is a shorthand for a range or group of messages. For | 7217 | sequence, which is a shorthand for a range or group of messages. For |
| 7218 | example, you might want to forward several messages to a friend or | 7218 | example, you might want to forward several messages to a friend or |
| @@ -7452,7 +7452,7 @@ from the unseen sequence. | |||
| 7452 | 7452 | ||
| 7453 | With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH | 7453 | With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH |
| 7454 | command dealing with sequences is @command{mark}@footnote{See the | 7454 | command dealing with sequences is @command{mark}@footnote{See the |
| 7455 | section @uref{@value{MH-BOOK-HOME}/mmbwm.htm, Make Message Bookmarks | 7455 | section @uref{@value{MH-BOOK-HOME}/mmbwm.html, Make Message Bookmarks |
| 7456 | with mark} in the MH book.}. | 7456 | with mark} in the MH book.}. |
| 7457 | 7457 | ||
| 7458 | @node Junk, Miscellaneous, Sequences, Top | 7458 | @node Junk, Miscellaneous, Sequences, Top |
| @@ -8050,7 +8050,7 @@ Unless this variable contains an absolute pathname, it is assumed to | |||
| 8050 | be in the @code{mh-progs} directory (@pxref{Getting Started}). You may | 8050 | be in the @code{mh-progs} directory (@pxref{Getting Started}). You may |
| 8051 | link another program to @command{scan} (see @samp{mh-profile}(5)) to | 8051 | link another program to @command{scan} (see @samp{mh-profile}(5)) to |
| 8052 | produce a different type of listing@footnote{See the section | 8052 | produce a different type of listing@footnote{See the section |
| 8053 | @uref{@value{MH-BOOK-HOME}/faswsprs.htm, Find and Specify with scan | 8053 | @uref{@value{MH-BOOK-HOME}/faswsprs.html, Find and Specify with scan |
| 8054 | pick Ranges Sequences} in the MH book.}. | 8054 | pick Ranges Sequences} in the MH book.}. |
| 8055 | 8055 | ||
| 8056 | @cindex regular expressions, scan line formats | 8056 | @cindex regular expressions, scan line formats |
| @@ -8087,7 +8087,7 @@ The first variable has to do with pruning out garbage. | |||
| 8087 | This regular expression describes a valid scan line. This is used to | 8087 | This regular expression describes a valid scan line. This is used to |
| 8088 | eliminate error messages that are occasionally produced by | 8088 | eliminate error messages that are occasionally produced by |
| 8089 | @command{inc}@footnote{See the section | 8089 | @command{inc}@footnote{See the section |
| 8090 | @uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next | 8090 | @uref{@value{MH-BOOK-HOME}/reapre.html, Reading Mail: inc show next |
| 8091 | prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}). | 8091 | prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}). |
| 8092 | @end vtable | 8092 | @end vtable |
| 8093 | 8093 | ||
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}. | |||
| 415 | indicate the places for completion; thus, @file{/u*/b*/f*} might | 415 | indicate the places for completion; thus, @file{/u*/b*/f*} might |
| 416 | complete to @file{/usr/bin/foo}. | 416 | complete to @file{/usr/bin/foo}. |
| 417 | 417 | ||
| 418 | For remote files, partial completion enables completion of methods, | ||
| 419 | user names and host names. @xref{Remote Files}. | ||
| 420 | |||
| 418 | To enable this mode, use the command @kbd{M-x | 421 | To enable this mode, use the command @kbd{M-x |
| 419 | partial-completion-mode}, or customize the variable | 422 | partial-completion-mode}, or customize the variable |
| 420 | @code{partial-completion-mode}. This binds the partial completion | 423 | @code{partial-completion-mode}. This binds the partial completion |
diff --git a/man/misc.texi b/man/misc.texi index 71f4aba2b49..9e5d2835e20 100644 --- a/man/misc.texi +++ b/man/misc.texi | |||
| @@ -1761,7 +1761,7 @@ rectangle moves along with the text inside the rectangle. | |||
| 1761 | Many of the sort commands ignore case differences when comparing, if | 1761 | Many of the sort commands ignore case differences when comparing, if |
| 1762 | @code{sort-fold-case} is non-@code{nil}. | 1762 | @code{sort-fold-case} is non-@code{nil}. |
| 1763 | 1763 | ||
| 1764 | @node Narrowing, Diff Mode, Sorting, Top | 1764 | @node Narrowing, Two-Column, Sorting, Top |
| 1765 | @section Narrowing | 1765 | @section Narrowing |
| 1766 | @cindex widening | 1766 | @cindex widening |
| 1767 | @cindex restriction | 1767 | @cindex restriction |
| @@ -1827,86 +1827,7 @@ this command asks for confirmation and gives you the option of enabling it; | |||
| 1827 | if you enable the command, confirmation will no longer be required for | 1827 | if you enable the command, confirmation will no longer be required for |
| 1828 | it. @xref{Disabling}. | 1828 | it. @xref{Disabling}. |
| 1829 | 1829 | ||
| 1830 | @node Diff Mode, Two-Column, Narrowing, Top | 1830 | @node Two-Column, Editing Binary Files, Narrowing, Top |
| 1831 | @section Diff Mode | ||
| 1832 | @cindex Diff mode | ||
| 1833 | |||
| 1834 | Diff mode is useful for editing patches and comparisons produced by | ||
| 1835 | the @command{diff} program. You can select Diff mode by typing | ||
| 1836 | @kbd{M-x diff-mode}; Emacs commands that compare files automatically | ||
| 1837 | select Diff mode. @xref{Top,, Diff, diff, Comparing and Merging Files}, | ||
| 1838 | for more information about @command{diff} output formats. | ||
| 1839 | |||
| 1840 | One general feature of Diff mode is that manual edits to the patch | ||
| 1841 | automatically correct line numbers, including those in the hunk | ||
| 1842 | header, so that you can actually apply the edited patch. Diff mode | ||
| 1843 | also provides the following commands to navigate, manipulate and apply | ||
| 1844 | parts of patches: | ||
| 1845 | |||
| 1846 | @table @kbd | ||
| 1847 | @item M-n | ||
| 1848 | Move to the next hunk-start (@code{diff-hunk-next}). | ||
| 1849 | |||
| 1850 | @item M-p | ||
| 1851 | Move to the previous hunk-start (@code{diff-hunk-prev}). | ||
| 1852 | |||
| 1853 | @item M-@} | ||
| 1854 | Move to the next file-start, in a multi-file patch | ||
| 1855 | (@code{diff-file-next}). | ||
| 1856 | |||
| 1857 | @item M-@{ | ||
| 1858 | Move to the previous file-start, in a multi-file patch | ||
| 1859 | (@code{diff-file-prev}). | ||
| 1860 | |||
| 1861 | @item M-k | ||
| 1862 | Kill the hunk at point (@code{diff-hunk-kill}). | ||
| 1863 | |||
| 1864 | @item M-K | ||
| 1865 | In a multi-file patch, kill the current file part. | ||
| 1866 | (@code{diff-file-kill}). | ||
| 1867 | |||
| 1868 | @item C-c C-a | ||
| 1869 | Apply this hunk to its target file (@code{diff-apply-hunk}). With a | ||
| 1870 | prefix argument of @kbd{C-u}, revert this hunk. | ||
| 1871 | |||
| 1872 | @item C-c C-c | ||
| 1873 | Go to the source corresponding to this hunk (@code{diff-goto-source}). | ||
| 1874 | |||
| 1875 | @item C-c C-e | ||
| 1876 | Start an Ediff session with the patch (@code{diff-ediff-patch}). | ||
| 1877 | @xref{Top, Ediff, Ediff, ediff, The Ediff Manual}. | ||
| 1878 | |||
| 1879 | @item C-c C-n | ||
| 1880 | Restrict the view to the current hunk (@code{diff-restrict-view}). | ||
| 1881 | @xref{Narrowing}. With a prefix argument of @kbd{C-u}, restrict the | ||
| 1882 | view to the current patch of a multiple file patch. To widen again, | ||
| 1883 | use @kbd{C-x n w}. | ||
| 1884 | |||
| 1885 | @item C-c C-r | ||
| 1886 | Reverse the direction of comparison for the entire buffer | ||
| 1887 | (@code{diff-reverse-direction}). | ||
| 1888 | |||
| 1889 | @item C-c C-s | ||
| 1890 | Split the hunk at point (@code{diff-split-hunk}). This is for | ||
| 1891 | manually editing patches, and only works with the unified diff format. | ||
| 1892 | |||
| 1893 | @item C-c C-u | ||
| 1894 | Convert the entire buffer to unified format | ||
| 1895 | (@code{diff-context->unified}). With a prefix argument, convert | ||
| 1896 | unified format to context format. In Transient Mark mode, when the | ||
| 1897 | mark is active, this command operates only on the region. | ||
| 1898 | |||
| 1899 | @item C-c C-w | ||
| 1900 | Refine the current hunk so that it disregards changes in whitespace | ||
| 1901 | (@code{diff-refine-hunk}). | ||
| 1902 | @end table | ||
| 1903 | |||
| 1904 | @kbd{C-x 4 a} in Diff mode operates on behalf of the target file, | ||
| 1905 | but gets the function name from the patch itself. @xref{Change Log}. | ||
| 1906 | This is useful for making log entries for functions that are deleted | ||
| 1907 | by the patch. | ||
| 1908 | |||
| 1909 | @node Two-Column, Editing Binary Files, Diff Mode, Top | ||
| 1910 | @section Two-Column Editing | 1831 | @section Two-Column Editing |
| 1911 | @cindex two-column editing | 1832 | @cindex two-column editing |
| 1912 | @cindex splitting columns | 1833 | @cindex splitting columns |
| @@ -2462,7 +2383,7 @@ a buffer containing thumbnails, corresponding to the marked files. | |||
| 2462 | (@code{tumme-display-thumbnail-original-image}) to display a sized | 2383 | (@code{tumme-display-thumbnail-original-image}) to display a sized |
| 2463 | version of it in another window. This sizes the image to fit the | 2384 | version of it in another window. This sizes the image to fit the |
| 2464 | window. Use the arrow keys to move around in the buffer. For easy | 2385 | window. Use the arrow keys to move around in the buffer. For easy |
| 2465 | browing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original}) | 2386 | browsing, type @kbd{SPC} (@code{tumme-display-next-thumbnail-original}) |
| 2466 | to advance and display the next image. Typing @kbd{DEL} | 2387 | to advance and display the next image. Typing @kbd{DEL} |
| 2467 | (@code{tumme-display-previous-thumbnail-original}) backs up to the | 2388 | (@code{tumme-display-previous-thumbnail-original}) backs up to the |
| 2468 | previous thumbnail and displays that instead. | 2389 | 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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node MS-DOS | ||
| 8 | @section Emacs and MS-DOS | ||
| 9 | @cindex MS-DOG | ||
| 10 | @cindex MS-DOS peculiarities | ||
| 11 | |||
| 12 | This section briefly describes the peculiarities of using Emacs on | ||
| 13 | the MS-DOS ``operating system'' (also known as ``MS-DOG''). | ||
| 14 | @iftex | ||
| 15 | Information about Emacs and Microsoft's current operating system | ||
| 16 | Windows (also known as ``Losedows) is in the main Emacs manual | ||
| 17 | (@pxref{Microsoft Systems,,, emacs, the Emacs Manual}). | ||
| 18 | @end iftex | ||
| 19 | @ifnottex | ||
| 20 | Information about peculiarities common to MS-DOS and Microsoft's | ||
| 21 | current operating systems Windows (also known as ``Losedows) is in | ||
| 22 | @ref{Microsoft Windows}. | ||
| 23 | @end ifnottex | ||
| 24 | |||
| 25 | If you build Emacs for MS-DOS, the binary will also run on Windows | ||
| 26 | 3.X, Windows NT, Windows 9X/ME, Windows 2000/XP, or OS/2 as a DOS | ||
| 27 | application; all of this chapter applies for all of those systems, if | ||
| 28 | you use an Emacs that was built for MS-DOS. | ||
| 29 | |||
| 30 | @iftex | ||
| 31 | @xref{Text and Binary,,,emacs, the Emacs Manual}, for information | ||
| 32 | @end iftex | ||
| 33 | @ifnottex | ||
| 34 | @xref{Text and Binary}, for information | ||
| 35 | @end ifnottex | ||
| 36 | about Emacs' special handling of text files under MS-DOS (and Windows). | ||
| 37 | |||
| 38 | @menu | ||
| 39 | * Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS. | ||
| 40 | * Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS. | ||
| 41 | * Display: MS-DOS Display. Fonts, frames and display size on MS-DOS. | ||
| 42 | * Files: MS-DOS File Names. File name conventions on MS-DOS. | ||
| 43 | * Printing: MS-DOS Printing. Printing specifics on MS-DOS. | ||
| 44 | * I18N: MS-DOS and MULE. Support for internationalization on MS-DOS. | ||
| 45 | * Processes: MS-DOS Processes. Running subprocesses on MS-DOS. | ||
| 46 | @end menu | ||
| 47 | |||
| 48 | @node MS-DOS Keyboard | ||
| 49 | @subsection Keyboard Usage on MS-DOS | ||
| 50 | |||
| 51 | @kindex DEL @r{(MS-DOS)} | ||
| 52 | @kindex BS @r{(MS-DOS)} | ||
| 53 | The key that is called @key{DEL} in Emacs (because that's how it is | ||
| 54 | designated on most workstations) is known as @key{BS} (backspace) on a | ||
| 55 | PC. That is why the PC-specific terminal initialization remaps the | ||
| 56 | @key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act | ||
| 57 | as @kbd{C-d} for the same reasons. | ||
| 58 | |||
| 59 | @kindex C-g @r{(MS-DOS)} | ||
| 60 | @kindex C-BREAK @r{(MS-DOS)} | ||
| 61 | @cindex quitting on MS-DOS | ||
| 62 | Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit | ||
| 63 | character, just like @kbd{C-g}. This is because Emacs cannot detect | ||
| 64 | that you have typed @kbd{C-g} until it is ready for more input. As a | ||
| 65 | consequence, you cannot use @kbd{C-g} to stop a running command | ||
| 66 | @iftex | ||
| 67 | (@pxref{Quitting,,,emacs, the Emacs Manual}). | ||
| 68 | @end iftex | ||
| 69 | @ifnottex | ||
| 70 | (@pxref{Quitting}). | ||
| 71 | @end ifnottex | ||
| 72 | By contrast, @kbd{C-@key{BREAK}} @emph{is} detected as soon as you | ||
| 73 | type it (as @kbd{C-g} is on other systems), so it can be used to stop | ||
| 74 | a running command and for emergency escape | ||
| 75 | @iftex | ||
| 76 | (@pxref{Emergency Escape,,,emacs, the Emacs Manual}). | ||
| 77 | @end iftex | ||
| 78 | @ifnottex | ||
| 79 | (@pxref{Emergency Escape}). | ||
| 80 | @end ifnottex | ||
| 81 | |||
| 82 | @cindex Meta (under MS-DOS) | ||
| 83 | @cindex Hyper (under MS-DOS) | ||
| 84 | @cindex Super (under MS-DOS) | ||
| 85 | @vindex dos-super-key | ||
| 86 | @vindex dos-hyper-key | ||
| 87 | The PC keyboard maps use the left @key{ALT} key as the @key{META} key. | ||
| 88 | You have two choices for emulating the @key{SUPER} and @key{HYPER} keys: | ||
| 89 | choose either the right @key{CTRL} key or the right @key{ALT} key by | ||
| 90 | setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 | ||
| 91 | or 2 respectively. If neither @code{dos-super-key} nor | ||
| 92 | @code{dos-hyper-key} is 1, then by default the right @key{ALT} key is | ||
| 93 | also mapped to the @key{META} key. However, if the MS-DOS international | ||
| 94 | keyboard support program @file{KEYB.COM} is installed, Emacs will | ||
| 95 | @emph{not} map the right @key{ALT} to @key{META}, since it is used for | ||
| 96 | accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard | ||
| 97 | layouts; in this case, you may only use the left @key{ALT} as @key{META} | ||
| 98 | key. | ||
| 99 | |||
| 100 | @kindex C-j @r{(MS-DOS)} | ||
| 101 | @vindex dos-keypad-mode | ||
| 102 | The variable @code{dos-keypad-mode} is a flag variable that controls | ||
| 103 | what key codes are returned by keys in the numeric keypad. You can also | ||
| 104 | define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the | ||
| 105 | following line into your @file{_emacs} file: | ||
| 106 | |||
| 107 | @smallexample | ||
| 108 | ;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.} | ||
| 109 | (define-key function-key-map [kp-enter] [?\C-j]) | ||
| 110 | @end smallexample | ||
| 111 | |||
| 112 | @node MS-DOS Mouse | ||
| 113 | @subsection Mouse Usage on MS-DOS | ||
| 114 | |||
| 115 | @cindex mouse support under MS-DOS | ||
| 116 | Emacs on MS-DOS supports a mouse (on the default terminal only). | ||
| 117 | The mouse commands work as documented, including those that use menus | ||
| 118 | and the menu bar | ||
| 119 | @iftex | ||
| 120 | (@pxref{Menu Bar,,,emacs, the Emacs Manual}). | ||
| 121 | @end iftex | ||
| 122 | @ifnottex | ||
| 123 | (@pxref{Menu Bar}). | ||
| 124 | @end ifnottex | ||
| 125 | Scroll bars don't work in MS-DOS Emacs. PC mice usually have only | ||
| 126 | two buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you | ||
| 127 | press both of them together, that has the effect of @kbd{Mouse-3}. If | ||
| 128 | the mouse does have 3 buttons, Emacs detects that at startup, and all | ||
| 129 | the 3 buttons function normally, as on X. | ||
| 130 | |||
| 131 | Help strings for menu-bar and pop-up menus are displayed in the echo | ||
| 132 | area when the mouse pointer moves across the menu items. Highlighting | ||
| 133 | of mouse-sensitive text | ||
| 134 | @iftex | ||
| 135 | (@pxref{Mouse References,,,emacs, the Emacs Manual}) | ||
| 136 | @end iftex | ||
| 137 | @ifnottex | ||
| 138 | (@pxref{Mouse References}) | ||
| 139 | @end ifnottex | ||
| 140 | is also supported. | ||
| 141 | |||
| 142 | @cindex mouse, set number of buttons | ||
| 143 | @findex msdos-set-mouse-buttons | ||
| 144 | Some versions of mouse drivers don't report the number of mouse | ||
| 145 | buttons correctly. For example, mice with a wheel report that they | ||
| 146 | have 3 buttons, but only 2 of them are passed to Emacs; the clicks on | ||
| 147 | the wheel, which serves as the middle button, are not passed. In | ||
| 148 | these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command | ||
| 149 | to tell Emacs how many mouse buttons to expect. You could make such a | ||
| 150 | setting permanent by adding this fragment to your @file{_emacs} init | ||
| 151 | file: | ||
| 152 | |||
| 153 | @example | ||
| 154 | ;; @r{Treat the mouse like a 2-button mouse.} | ||
| 155 | (msdos-set-mouse-buttons 2) | ||
| 156 | @end example | ||
| 157 | |||
| 158 | @cindex Windows clipboard support | ||
| 159 | Emacs built for MS-DOS supports clipboard operations when it runs on | ||
| 160 | Windows. Commands that put text on the kill ring, or yank text from | ||
| 161 | the ring, check the Windows clipboard first, just as Emacs does on the | ||
| 162 | X Window System | ||
| 163 | @iftex | ||
| 164 | (@pxref{Mouse Commands,,,emacs, the Emacs Manual}). | ||
| 165 | @end iftex | ||
| 166 | @ifnottex | ||
| 167 | (@pxref{Mouse Commands}). | ||
| 168 | @end ifnottex | ||
| 169 | Only the primary selection and the cut buffer are supported by MS-DOS | ||
| 170 | Emacs on Windows; the secondary selection always appears as empty. | ||
| 171 | |||
| 172 | Due to the way clipboard access is implemented by Windows, the | ||
| 173 | length of text you can put into the clipboard is limited by the amount | ||
| 174 | of free DOS memory that is available to Emacs. Usually, up to 620KB of | ||
| 175 | text can be put into the clipboard, but this limit depends on the system | ||
| 176 | configuration and is lower if you run Emacs as a subprocess of | ||
| 177 | another program. If the killed text does not fit, Emacs outputs a | ||
| 178 | message saying so, and does not put the text into the clipboard. | ||
| 179 | |||
| 180 | Null characters also cannot be put into the Windows clipboard. If the | ||
| 181 | killed text includes null characters, Emacs does not put such text into | ||
| 182 | the clipboard, and displays in the echo area a message to that effect. | ||
| 183 | |||
| 184 | @vindex dos-display-scancodes | ||
| 185 | The variable @code{dos-display-scancodes}, when non-@code{nil}, | ||
| 186 | directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of | ||
| 187 | each keystroke; this feature serves as a complement to the | ||
| 188 | @code{view-lossage} command, for debugging. | ||
| 189 | |||
| 190 | @node MS-DOS Display | ||
| 191 | @subsection Display on MS-DOS | ||
| 192 | @cindex faces under MS-DOS | ||
| 193 | @cindex fonts, emulating under MS-DOS | ||
| 194 | |||
| 195 | Display on MS-DOS cannot use font variants, like bold or italic, but | ||
| 196 | it does support multiple faces, each of which can specify a foreground | ||
| 197 | and a background color. Therefore, you can get the full functionality | ||
| 198 | of Emacs packages that use fonts (such as @code{font-lock}, Enriched | ||
| 199 | Text mode, and others) by defining the relevant faces to use different | ||
| 200 | colors. Use the @code{list-colors-display} command | ||
| 201 | @iftex | ||
| 202 | (@pxref{Frame Parameters,,,emacs, the Emacs Manual}) | ||
| 203 | @end iftex | ||
| 204 | @ifnottex | ||
| 205 | (@pxref{Frame Parameters}) | ||
| 206 | @end ifnottex | ||
| 207 | and the @code{list-faces-display} command | ||
| 208 | @iftex | ||
| 209 | (@pxref{Faces,,,emacs, the Emacs Manual}) | ||
| 210 | @end iftex | ||
| 211 | @ifnottex | ||
| 212 | (@pxref{Faces}) | ||
| 213 | @end ifnottex | ||
| 214 | to see what colors and faces are available and what they look like. | ||
| 215 | |||
| 216 | @xref{MS-DOS and MULE}, later in this chapter, for information on | ||
| 217 | how Emacs displays glyphs and characters that aren't supported by the | ||
| 218 | native font built into the DOS display. | ||
| 219 | |||
| 220 | @cindex cursor shape on MS-DOS | ||
| 221 | When Emacs starts, it changes the cursor shape to a solid box. This | ||
| 222 | is for compatibility with other systems, where the box cursor is the | ||
| 223 | default in Emacs. This default shape can be changed to a bar by | ||
| 224 | specifying the @code{cursor-type} parameter in the variable | ||
| 225 | @code{default-frame-alist} | ||
| 226 | @iftex | ||
| 227 | (@pxref{Creating Frames,,,emacs, the Emacs Manual}). | ||
| 228 | @end iftex | ||
| 229 | @ifnottex | ||
| 230 | (@pxref{Creating Frames}). | ||
| 231 | @end ifnottex | ||
| 232 | The MS-DOS terminal doesn't support a vertical-bar cursor, | ||
| 233 | so the bar cursor is horizontal, and the @code{@var{width}} parameter, | ||
| 234 | if specified by the frame parameters, actually determines its height. | ||
| 235 | For this reason, the @code{bar} and @code{hbar} cursor types produce | ||
| 236 | the same effect on MS-DOS. As an extension, the bar cursor | ||
| 237 | specification can include the starting scan line of the cursor as well | ||
| 238 | as its width, like this: | ||
| 239 | |||
| 240 | @example | ||
| 241 | '(cursor-type bar @var{width} . @var{start}) | ||
| 242 | @end example | ||
| 243 | |||
| 244 | @noindent | ||
| 245 | In addition, if the @var{width} parameter is negative, the cursor bar | ||
| 246 | begins at the top of the character cell. | ||
| 247 | |||
| 248 | @cindex frames on MS-DOS | ||
| 249 | The MS-DOS terminal can only display a single frame at a time. The | ||
| 250 | Emacs frame facilities work on MS-DOS much as they do on text-only | ||
| 251 | terminals | ||
| 252 | @iftex | ||
| 253 | (@pxref{Frames,,,emacs, the Emacs Manual}). | ||
| 254 | @end iftex | ||
| 255 | @ifnottex | ||
| 256 | (@pxref{Frames}). | ||
| 257 | @end ifnottex | ||
| 258 | When you run Emacs from a DOS window on MS-Windows, you can make the | ||
| 259 | visible frame smaller than the full screen, but Emacs still cannot | ||
| 260 | display more than a single frame at a time. | ||
| 261 | |||
| 262 | @cindex frame size under MS-DOS | ||
| 263 | @findex mode4350 | ||
| 264 | @findex mode25 | ||
| 265 | The @code{mode4350} command switches the display to 43 or 50 | ||
| 266 | lines, depending on your hardware; the @code{mode25} command switches | ||
| 267 | to the default 80x25 screen size. | ||
| 268 | |||
| 269 | By default, Emacs only knows how to set screen sizes of 80 columns by | ||
| 270 | 25, 28, 35, 40, 43 or 50 rows. However, if your video adapter has | ||
| 271 | special video modes that will switch the display to other sizes, you can | ||
| 272 | have Emacs support those too. When you ask Emacs to switch the frame to | ||
| 273 | @var{n} rows by @var{m} columns dimensions, it checks if there is a | ||
| 274 | variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so, | ||
| 275 | uses its value (which must be an integer) as the video mode to switch | ||
| 276 | to. (Emacs switches to that video mode by calling the BIOS @code{Set | ||
| 277 | Video Mode} function with the value of | ||
| 278 | @code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.) | ||
| 279 | For example, suppose your adapter will switch to 66x80 dimensions when | ||
| 280 | put into video mode 85. Then you can make Emacs support this screen | ||
| 281 | size by putting the following into your @file{_emacs} file: | ||
| 282 | |||
| 283 | @example | ||
| 284 | (setq screen-dimensions-66x80 85) | ||
| 285 | @end example | ||
| 286 | |||
| 287 | Since Emacs on MS-DOS can only set the frame size to specific | ||
| 288 | supported dimensions, it cannot honor every possible frame resizing | ||
| 289 | request. When an unsupported size is requested, Emacs chooses the next | ||
| 290 | larger supported size beyond the specified size. For example, if you | ||
| 291 | ask for 36x80 frame, you will get 40x80 instead. | ||
| 292 | |||
| 293 | The variables @code{screen-dimensions-@var{n}x@var{m}} are used only | ||
| 294 | when they exactly match the specified size; the search for the next | ||
| 295 | larger supported size ignores them. In the above example, even if your | ||
| 296 | VGA supports 38x80 dimensions and you define a variable | ||
| 297 | @code{screen-dimensions-38x80} with a suitable value, you will still get | ||
| 298 | 40x80 screen when you ask for a 36x80 frame. If you want to get the | ||
| 299 | 38x80 size in this case, you can do it by setting the variable named | ||
| 300 | @code{screen-dimensions-36x80} with the same video mode value as | ||
| 301 | @code{screen-dimensions-38x80}. | ||
| 302 | |||
| 303 | Changing frame dimensions on MS-DOS has the effect of changing all the | ||
| 304 | other frames to the new dimensions. | ||
| 305 | |||
| 306 | @node MS-DOS File Names | ||
| 307 | @subsection File Names on MS-DOS | ||
| 308 | @cindex file names under MS-DOS | ||
| 309 | @cindex init file, default name under MS-DOS | ||
| 310 | |||
| 311 | On MS-DOS, file names are case-insensitive and limited to eight | ||
| 312 | characters, plus optionally a period and three more characters. Emacs | ||
| 313 | knows enough about these limitations to handle file names that were | ||
| 314 | meant for other operating systems. For instance, leading dots | ||
| 315 | @samp{.} in file names are invalid in MS-DOS, so Emacs transparently | ||
| 316 | converts them to underscores @samp{_}; thus your default init file | ||
| 317 | @iftex | ||
| 318 | (@pxref{Init File,,,emacs, the Emacs Manual}) | ||
| 319 | @end iftex | ||
| 320 | @ifnottex | ||
| 321 | (@pxref{Init File}) | ||
| 322 | @end ifnottex | ||
| 323 | is called @file{_emacs} on MS-DOS. Excess characters before or after | ||
| 324 | the period are generally ignored by MS-DOS itself; thus, if you visit | ||
| 325 | the file @file{LongFileName.EvenLongerExtension}, you will silently | ||
| 326 | get @file{longfile.eve}, but Emacs will still display the long file | ||
| 327 | name on the mode line. Other than that, it's up to you to specify | ||
| 328 | file names which are valid under MS-DOS; the transparent conversion as | ||
| 329 | described above only works on file names built into Emacs. | ||
| 330 | |||
| 331 | @cindex backup file names on MS-DOS | ||
| 332 | The above restrictions on the file names on MS-DOS make it almost | ||
| 333 | impossible to construct the name of a backup file | ||
| 334 | @iftex | ||
| 335 | (@pxref{Backup Names,,,emacs, the Emacs Manual}) | ||
| 336 | @end iftex | ||
| 337 | @ifnottex | ||
| 338 | (@pxref{Backup Names}) | ||
| 339 | @end ifnottex | ||
| 340 | without losing some of the original file name characters. For | ||
| 341 | example, the name of a backup file for @file{docs.txt} is | ||
| 342 | @file{docs.tx~} even if single backup is used. | ||
| 343 | |||
| 344 | @cindex file names under Windows 95/NT | ||
| 345 | @cindex long file names in DOS box under Windows 95/NT | ||
| 346 | If you run Emacs as a DOS application under Windows 9X, Windows ME, or | ||
| 347 | Windows 2000/XP, you can turn on support for long file names. If you do | ||
| 348 | that, Emacs doesn't truncate file names or convert them to lower case; | ||
| 349 | instead, it uses the file names that you specify, verbatim. To enable | ||
| 350 | long file name support, set the environment variable @env{LFN} to | ||
| 351 | @samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow | ||
| 352 | DOS programs to access long file names, so Emacs built for MS-DOS will | ||
| 353 | only see their short 8+3 aliases. | ||
| 354 | |||
| 355 | @cindex @env{HOME} directory under MS-DOS | ||
| 356 | MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends | ||
| 357 | that the directory where it is installed is the value of the @env{HOME} | ||
| 358 | environment variable. That is, if your Emacs binary, | ||
| 359 | @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then | ||
| 360 | Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In | ||
| 361 | particular, that is where Emacs looks for the init file @file{_emacs}. | ||
| 362 | With this in mind, you can use @samp{~} in file names as an alias for | ||
| 363 | the home directory, as you would on GNU or Unix. You can also set | ||
| 364 | @env{HOME} variable in the environment before starting Emacs; its | ||
| 365 | value will then override the above default behavior. | ||
| 366 | |||
| 367 | Emacs on MS-DOS handles the directory name @file{/dev} specially, | ||
| 368 | because of a feature in the emulator libraries of DJGPP that pretends | ||
| 369 | I/O devices have names in that directory. We recommend that you avoid | ||
| 370 | using an actual directory named @file{/dev} on any disk. | ||
| 371 | |||
| 372 | @node MS-DOS Printing | ||
| 373 | @subsection Printing and MS-DOS | ||
| 374 | |||
| 375 | Printing commands, such as @code{lpr-buffer} | ||
| 376 | @iftex | ||
| 377 | (@pxref{Printing,,,emacs, the Emacs Manual}) and @code{ps-print-buffer} | ||
| 378 | (@pxref{PostScript,,,emacs, the Emacs Manual}) | ||
| 379 | @end iftex | ||
| 380 | @ifnottex | ||
| 381 | (@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}) | ||
| 382 | @end ifnottex | ||
| 383 | can work on MS-DOS by sending the output to one of the printer ports, | ||
| 384 | if a Posix-style @code{lpr} program is unavailable. The same Emacs | ||
| 385 | variables control printing on all systems, but in some cases they have | ||
| 386 | different default values on MS-DOS. | ||
| 387 | |||
| 388 | @iftex | ||
| 389 | @xref{Windows Printing,,,emacs, the Emacs Manual}, | ||
| 390 | @end iftex | ||
| 391 | @ifnottex | ||
| 392 | @xref{Windows Printing}, | ||
| 393 | @end ifnottex | ||
| 394 | for details about setting up printing to a networked printer. | ||
| 395 | |||
| 396 | Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even | ||
| 397 | though they are connected to a Windows machine which uses a different | ||
| 398 | encoding for the same locale. For example, in the Latin-1 locale, DOS | ||
| 399 | uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and | ||
| 400 | MULE}. When you print to such printers from Windows, you can use the | ||
| 401 | @kbd{C-x RET c} (@code{universal-coding-system-argument}) command before | ||
| 402 | @kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS | ||
| 403 | codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET | ||
| 404 | M-x lpr-region RET} will print the region while converting it to the | ||
| 405 | codepage 850 encoding. You may need to create the @code{cp@var{nnn}} | ||
| 406 | coding system with @kbd{M-x codepage-setup}. | ||
| 407 | |||
| 408 | @vindex dos-printer | ||
| 409 | @vindex dos-ps-printer | ||
| 410 | For backwards compatibility, the value of @code{dos-printer} | ||
| 411 | (@code{dos-ps-printer}), if it has a value, overrides the value of | ||
| 412 | @code{printer-name} (@code{ps-printer-name}), on MS-DOS. | ||
| 413 | |||
| 414 | |||
| 415 | @node MS-DOS and MULE | ||
| 416 | @subsection International Support on MS-DOS | ||
| 417 | @cindex international support @r{(MS-DOS)} | ||
| 418 | |||
| 419 | Emacs on MS-DOS supports the same international character sets as it | ||
| 420 | does on GNU, Unix and other platforms | ||
| 421 | @iftex | ||
| 422 | (@pxref{International,,,emacs, the Emacs Manual}), | ||
| 423 | @end iftex | ||
| 424 | @ifnottex | ||
| 425 | (@pxref{International}), | ||
| 426 | @end ifnottex | ||
| 427 | including coding systems for converting between the different | ||
| 428 | character sets. However, due to incompatibilities between | ||
| 429 | MS-DOS/MS-Windows and other systems, there are several DOS-specific | ||
| 430 | aspects of this support that you should be aware of. This section | ||
| 431 | describes these aspects. | ||
| 432 | |||
| 433 | The description below is largely specific to the MS-DOS port of | ||
| 434 | Emacs, especially where it talks about practical implications for | ||
| 435 | Emacs users. For other operating systems, see the @file{code-pages.el} | ||
| 436 | package, which implements support for MS-DOS- and MS-Windows-specific | ||
| 437 | encodings for all platforms other than MS-DOS. | ||
| 438 | |||
| 439 | @table @kbd | ||
| 440 | @item M-x dos-codepage-setup | ||
| 441 | Set up Emacs display and coding systems as appropriate for the current | ||
| 442 | DOS codepage. | ||
| 443 | |||
| 444 | @item M-x codepage-setup | ||
| 445 | Create a coding system for a certain DOS codepage. | ||
| 446 | @end table | ||
| 447 | |||
| 448 | @cindex codepage, MS-DOS | ||
| 449 | @cindex DOS codepages | ||
| 450 | MS-DOS is designed to support one character set of 256 characters at | ||
| 451 | any given time, but gives you a variety of character sets to choose | ||
| 452 | from. The alternative character sets are known as @dfn{DOS codepages}. | ||
| 453 | Each codepage includes all 128 @acronym{ASCII} characters, but the other 128 | ||
| 454 | characters (codes 128 through 255) vary from one codepage to another. | ||
| 455 | Each DOS codepage is identified by a 3-digit number, such as 850, 862, | ||
| 456 | etc. | ||
| 457 | |||
| 458 | In contrast to X, which lets you use several fonts at the same time, | ||
| 459 | MS-DOS normally doesn't allow use of several codepages in a single | ||
| 460 | session. MS-DOS was designed to load a single codepage at system | ||
| 461 | startup, and require you to reboot in order to change | ||
| 462 | it@footnote{Normally, one particular codepage is burnt into the | ||
| 463 | display memory, while other codepages can be installed by modifying | ||
| 464 | system configuration files, such as @file{CONFIG.SYS}, and rebooting. | ||
| 465 | While there is third-party software that allows changing the codepage | ||
| 466 | without rebooting, we describe here how a stock MS-DOS system | ||
| 467 | behaves.}. Much the same limitation applies when you run DOS | ||
| 468 | executables on other systems such as MS-Windows. | ||
| 469 | |||
| 470 | @cindex unibyte operation @r{(MS-DOS)} | ||
| 471 | If you invoke Emacs on MS-DOS with the @samp{--unibyte} option | ||
| 472 | @iftex | ||
| 473 | (@pxref{Initial Options,,,emacs, the Emacs Manual}), | ||
| 474 | @end iftex | ||
| 475 | @ifnottex | ||
| 476 | (@pxref{Initial Options}), | ||
| 477 | @end ifnottex | ||
| 478 | Emacs does not perform any conversion of non-@acronym{ASCII} | ||
| 479 | characters. Instead, it reads and writes any non-@acronym{ASCII} | ||
| 480 | characters verbatim, and sends their 8-bit codes to the display | ||
| 481 | verbatim. Thus, unibyte Emacs on MS-DOS supports the current | ||
| 482 | codepage, whatever it may be, but cannot even represent any other | ||
| 483 | characters. | ||
| 484 | |||
| 485 | @vindex dos-codepage | ||
| 486 | For multibyte operation on MS-DOS, Emacs needs to know which | ||
| 487 | characters the chosen DOS codepage can display. So it queries the | ||
| 488 | system shortly after startup to get the chosen codepage number, and | ||
| 489 | stores the number in the variable @code{dos-codepage}. Some systems | ||
| 490 | return the default value 437 for the current codepage, even though the | ||
| 491 | actual codepage is different. (This typically happens when you use the | ||
| 492 | codepage built into the display hardware.) You can specify a different | ||
| 493 | codepage for Emacs to use by setting the variable @code{dos-codepage} in | ||
| 494 | your init file. | ||
| 495 | |||
| 496 | @cindex language environment, automatic selection on @r{MS-DOS} | ||
| 497 | Multibyte Emacs supports only certain DOS codepages: those which can | ||
| 498 | display Far-Eastern scripts, like the Japanese codepage 932, and those | ||
| 499 | that encode a single ISO 8859 character set. | ||
| 500 | |||
| 501 | The Far-Eastern codepages can directly display one of the MULE | ||
| 502 | character sets for these countries, so Emacs simply sets up to use the | ||
| 503 | appropriate terminal coding system that is supported by the codepage. | ||
| 504 | The special features described in the rest of this section mostly | ||
| 505 | pertain to codepages that encode ISO 8859 character sets. | ||
| 506 | |||
| 507 | For the codepages which correspond to one of the ISO character sets, | ||
| 508 | Emacs knows the character set name based on the codepage number. Emacs | ||
| 509 | automatically creates a coding system to support reading and writing | ||
| 510 | files that use the current codepage, and uses this coding system by | ||
| 511 | default. The name of this coding system is @code{cp@var{nnn}}, where | ||
| 512 | @var{nnn} is the codepage number.@footnote{The standard Emacs coding | ||
| 513 | systems for ISO 8859 are not quite right for the purpose, because | ||
| 514 | typically the DOS codepage does not match the standard ISO character | ||
| 515 | codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has | ||
| 516 | code 231 in the standard Latin-1 character set, but the corresponding | ||
| 517 | DOS codepage 850 uses code 135 for this glyph.} | ||
| 518 | |||
| 519 | @cindex mode line @r{(MS-DOS)} | ||
| 520 | All the @code{cp@var{nnn}} coding systems use the letter @samp{D} | ||
| 521 | (for ``DOS'') as their mode-line mnemonic. Since both the terminal | ||
| 522 | coding system and the default coding system for file I/O are set to | ||
| 523 | the proper @code{cp@var{nnn}} coding system at startup, it is normal | ||
| 524 | for the mode line on MS-DOS to begin with @samp{-DD\-}. | ||
| 525 | @iftex | ||
| 526 | @xref{Mode Line,,,emacs, the Emacs Manual}. | ||
| 527 | @end iftex | ||
| 528 | @ifnottex | ||
| 529 | @xref{Mode Line}. | ||
| 530 | @end ifnottex | ||
| 531 | Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding | ||
| 532 | systems, and thus their initial mode line looks like the Emacs | ||
| 533 | default. | ||
| 534 | |||
| 535 | Since the codepage number also indicates which script you are using, | ||
| 536 | Emacs automatically runs @code{set-language-environment} to select the | ||
| 537 | language environment for that script | ||
| 538 | @iftex | ||
| 539 | (@pxref{Language Environments,,,emacs, the Emacs Manual}). | ||
| 540 | @end iftex | ||
| 541 | @ifnottex | ||
| 542 | (@pxref{Language Environments}). | ||
| 543 | @end ifnottex | ||
| 544 | |||
| 545 | If a buffer contains a character belonging to some other ISO 8859 | ||
| 546 | character set, not the one that the chosen DOS codepage supports, Emacs | ||
| 547 | displays it using a sequence of @acronym{ASCII} characters. For example, if the | ||
| 548 | current codepage doesn't have a glyph for the letter @samp{@`o} (small | ||
| 549 | @samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where | ||
| 550 | the braces serve as a visual indication that this is a single character. | ||
| 551 | (This may look awkward for some non-Latin characters, such as those from | ||
| 552 | Greek or Hebrew alphabets, but it is still readable by a person who | ||
| 553 | knows the language.) Even though the character may occupy several | ||
| 554 | columns on the screen, it is really still just a single character, and | ||
| 555 | all Emacs commands treat it as one. | ||
| 556 | |||
| 557 | @cindex IBM graphics characters (MS-DOS) | ||
| 558 | @cindex box-drawing characters (MS-DOS) | ||
| 559 | @cindex line-drawing characters (MS-DOS) | ||
| 560 | Not all characters in DOS codepages correspond to ISO 8859 | ||
| 561 | characters---some are used for other purposes, such as box-drawing | ||
| 562 | characters and other graphics. Emacs maps these characters to two | ||
| 563 | special character sets called @code{eight-bit-control} and | ||
| 564 | @code{eight-bit-graphic}, and displays them as their IBM glyphs. | ||
| 565 | However, you should be aware that other systems might display these | ||
| 566 | characters differently, so you should avoid them in text that might be | ||
| 567 | copied to a different operating system, or even to another DOS machine | ||
| 568 | that uses a different codepage. | ||
| 569 | |||
| 570 | @vindex dos-unsupported-character-glyph | ||
| 571 | Emacs supports many other characters sets aside from ISO 8859, but it | ||
| 572 | cannot display them on MS-DOS. So if one of these multibyte characters | ||
| 573 | appears in a buffer, Emacs on MS-DOS displays them as specified by the | ||
| 574 | @code{dos-unsupported-character-glyph} variable; by default, this glyph | ||
| 575 | is an empty triangle. Use the @kbd{C-u C-x =} command to display the | ||
| 576 | actual code and character set of such characters. | ||
| 577 | @iftex | ||
| 578 | @xref{Position Info,,,emacs, the Emacs Manual}. | ||
| 579 | @end iftex | ||
| 580 | @ifnottex | ||
| 581 | @xref{Position Info}. | ||
| 582 | @end ifnottex | ||
| 583 | |||
| 584 | @findex codepage-setup | ||
| 585 | By default, Emacs defines a coding system to support the current | ||
| 586 | codepage. To define a coding system for some other codepage (e.g., to | ||
| 587 | visit a file written on a DOS machine in another country), use the | ||
| 588 | @kbd{M-x codepage-setup} command. It prompts for the 3-digit code of | ||
| 589 | the codepage, with completion, then creates the coding system for the | ||
| 590 | specified codepage. You can then use the new coding system to read and | ||
| 591 | write files, but you must specify it explicitly for the file command | ||
| 592 | when you want to use it | ||
| 593 | @iftex | ||
| 594 | (@pxref{Text Coding,,,emacs, the Emacs Manual}). | ||
| 595 | @end iftex | ||
| 596 | @ifnottex | ||
| 597 | (@pxref{Text Coding}). | ||
| 598 | @end ifnottex | ||
| 599 | |||
| 600 | These coding systems are also useful for visiting a file encoded using | ||
| 601 | a DOS codepage, using Emacs running on some other operating system. | ||
| 602 | |||
| 603 | @cindex MS-Windows codepages | ||
| 604 | MS-Windows provides its own codepages, which are different from the | ||
| 605 | DOS codepages for the same locale. For example, DOS codepage 850 | ||
| 606 | supports the same character set as Windows codepage 1252; DOS codepage | ||
| 607 | 855 supports the same character set as Windows codepage 1251, etc. | ||
| 608 | The MS-Windows version of Emacs uses the current codepage for display | ||
| 609 | when invoked with the @samp{-nw} option. Support for codepages in the | ||
| 610 | Windows port of Emacs is part of the @file{code-pages.el} package. | ||
| 611 | |||
| 612 | @node MS-DOS Processes | ||
| 613 | @subsection Subprocesses on MS-DOS | ||
| 614 | |||
| 615 | @cindex compilation under MS-DOS | ||
| 616 | @cindex inferior processes under MS-DOS | ||
| 617 | @findex compile @r{(MS-DOS)} | ||
| 618 | @findex grep @r{(MS-DOS)} | ||
| 619 | Because MS-DOS is a single-process ``operating system,'' | ||
| 620 | asynchronous subprocesses are not available. In particular, Shell | ||
| 621 | mode and its variants do not work. Most Emacs features that use | ||
| 622 | asynchronous subprocesses also don't work on MS-DOS, including | ||
| 623 | Shell mode and GUD. When in doubt, try and see; commands that | ||
| 624 | don't work output an error message saying that asynchronous processes | ||
| 625 | aren't supported. | ||
| 626 | |||
| 627 | Compilation under Emacs with @kbd{M-x compile}, searching files with | ||
| 628 | @kbd{M-x grep} and displaying differences between files with @kbd{M-x | ||
| 629 | diff} do work, by running the inferior processes synchronously. This | ||
| 630 | means you cannot do any more editing until the inferior process | ||
| 631 | finishes. | ||
| 632 | |||
| 633 | Spell checking also works, by means of special support for synchronous | ||
| 634 | invocation of the @code{ispell} program. This is slower than the | ||
| 635 | asynchronous invocation on other platforms | ||
| 636 | |||
| 637 | Instead of the Shell mode, which doesn't work on MS-DOS, you can use | ||
| 638 | the @kbd{M-x eshell} command. This invokes the Eshell package that | ||
| 639 | implements a Posix-like shell entirely in Emacs Lisp. | ||
| 640 | |||
| 641 | By contrast, Emacs compiled as a native Windows application | ||
| 642 | @strong{does} support asynchronous subprocesses. | ||
| 643 | @iftex | ||
| 644 | @xref{Windows Processes,,,emacs, the Emacs Manual}. | ||
| 645 | @end iftex | ||
| 646 | @ifnottex | ||
| 647 | @xref{Windows Processes}. | ||
| 648 | @end ifnottex | ||
| 649 | |||
| 650 | @cindex printing under MS-DOS | ||
| 651 | Printing commands, such as @code{lpr-buffer} | ||
| 652 | @iftex | ||
| 653 | (@pxref{Printing,,,emacs, the Emacs Manual}) and | ||
| 654 | @code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}), | ||
| 655 | work in MS-DOS by sending the output to one of the printer ports. | ||
| 656 | @xref{MS-DOS Printing,,,emacs, the Emacs Manual}. | ||
| 657 | @end iftex | ||
| 658 | @ifnottex | ||
| 659 | (@pxref{Printing}) and @code{ps-print-buffer} (@pxref{PostScript}), | ||
| 660 | work in MS-DOS by sending the output to one of the printer ports. | ||
| 661 | @xref{MS-DOS Printing}. | ||
| 662 | @end ifnottex | ||
| 663 | |||
| 664 | When you run a subprocess synchronously on MS-DOS, make sure the | ||
| 665 | program terminates and does not try to read keyboard input. If the | ||
| 666 | program does not terminate on its own, you will be unable to terminate | ||
| 667 | it, because MS-DOS provides no general way to terminate a process. | ||
| 668 | Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these | ||
| 669 | cases. | ||
| 670 | |||
| 671 | Accessing files on other machines is not supported on MS-DOS. Other | ||
| 672 | network-oriented commands such as sending mail, Web browsing, remote | ||
| 673 | login, etc., don't work either, unless network access is built into | ||
| 674 | MS-DOS with some network redirector. | ||
| 675 | |||
| 676 | @cindex directory listing on MS-DOS | ||
| 677 | @vindex dired-listing-switches @r{(MS-DOS)} | ||
| 678 | Dired on MS-DOS uses the @code{ls-lisp} package where other | ||
| 679 | platforms use the system @code{ls} command. Therefore, Dired on | ||
| 680 | MS-DOS supports only some of the possible options you can mention in | ||
| 681 | the @code{dired-listing-switches} variable. The options that work are | ||
| 682 | @samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S}, | ||
| 683 | @samp{-s}, @samp{-t}, and @samp{-u}. | ||
| 684 | |||
| 685 | @ignore | ||
| 686 | arch-tag: 868d50ff-07f8-4a13-a807-dab6f1cdb431 | ||
| 687 | @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 @@ | |||
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, |
| 3 | @c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Emacs and Microsoft Windows, Manifesto, Mac OS, Top | 5 | @node Microsoft Windows, Manifesto, Mac OS, Top |
| 6 | @appendix Emacs and Microsoft Windows | 6 | @appendix Emacs and Microsoft Windows/MS-DOS |
| 7 | @cindex Microsoft Windows | 7 | @cindex Microsoft Windows |
| 8 | @cindex MS-Windows, Emacs peculiarities | 8 | @cindex MS-Windows, Emacs peculiarities |
| 9 | 9 | ||
| @@ -11,7 +11,14 @@ | |||
| 11 | Windows. Some of these peculiarities are also relevant to Microsoft's | 11 | Windows. Some of these peculiarities are also relevant to Microsoft's |
| 12 | older MS-DOS ``operating system'' (also known as ``MS-DOG''). | 12 | older MS-DOS ``operating system'' (also known as ``MS-DOG''). |
| 13 | However, Emacs features that are relevant @emph{only} to MS-DOS are | 13 | However, Emacs features that are relevant @emph{only} to MS-DOS are |
| 14 | described in a separate manual (@inforef{MS-DOG,, emacs-xtra}). | 14 | described in a separate |
| 15 | @iftex | ||
| 16 | manual (@pxref{MS-DOS,,, emacs-xtra, Specialized Emacs Features}). | ||
| 17 | @end iftex | ||
| 18 | @ifnottex | ||
| 19 | section (@pxref{MS-DOS}). | ||
| 20 | @end ifnottex | ||
| 21 | |||
| 15 | 22 | ||
| 16 | The behavior of Emacs on MS-Windows is reasonably similar to what is | 23 | The behavior of Emacs on MS-Windows is reasonably similar to what is |
| 17 | documented in the rest of the manual, including support for long file | 24 | 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 | |||
| 20 | here. | 27 | here. |
| 21 | 28 | ||
| 22 | @menu | 29 | @menu |
| 23 | * Text and Binary:: Text files use CRLF to terminate lines. | 30 | * Text and Binary:: Text files use CRLF to terminate lines. |
| 24 | * Windows Files:: File-name conventions on Windows. | 31 | * Windows Files:: File-name conventions on Windows. |
| 25 | * Windows HOME:: Where Emacs looks for your @file{.emacs}. | 32 | * Windows HOME:: Where Emacs looks for your @file{.emacs}. |
| 26 | * Windows Processes:: Running subprocesses on Windows. | 33 | * Windows Processes:: Running subprocesses on Windows. |
| 27 | * Windows Printing:: How to specify the printer on MS-Windows. | 34 | * Windows Printing:: How to specify the printer on MS-Windows. |
| 28 | * Windows System Menu:: Controlling what the ALT key does. | 35 | * Windows System Menu:: Controlling what the ALT key does. |
| 36 | @ifnottex | ||
| 37 | * MS-DOS:: Using Emacs on MS-DOS (otherwise known as @dfn{MS-DOG}). | ||
| 38 | @end ifnottex | ||
| 29 | @end menu | 39 | @end menu |
| 30 | 40 | ||
| 31 | @node Text and Binary | 41 | @node Text and Binary |
| @@ -408,6 +418,10 @@ users find this frustrating. | |||
| 408 | You can re-enable Windows' default handling of tapping the @key{ALT} key | 418 | You can re-enable Windows' default handling of tapping the @key{ALT} key |
| 409 | by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. | 419 | by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. |
| 410 | 420 | ||
| 421 | @ifnottex | ||
| 422 | @include msdog-xtra.texi | ||
| 423 | @end ifnottex | ||
| 424 | |||
| 411 | @ignore | 425 | @ignore |
| 412 | arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2 | 426 | arch-tag: f39d2590-5dcc-4318-88d9-0eb73ca10fa2 |
| 413 | @end ignore | 427 | @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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node Picture Mode | ||
| 8 | @chapter Editing Pictures | ||
| 9 | @cindex pictures | ||
| 10 | @cindex making pictures out of text characters | ||
| 11 | @findex edit-picture | ||
| 12 | |||
| 13 | To edit a picture made out of text characters (for example, a picture | ||
| 14 | of the division of a register into fields, as a comment in a program), | ||
| 15 | use the command @kbd{M-x edit-picture} to enter Picture mode. | ||
| 16 | |||
| 17 | In Picture mode, editing is based on the @dfn{quarter-plane} model of | ||
| 18 | text, according to which the text characters lie studded on an area that | ||
| 19 | stretches infinitely far to the right and downward. The concept of the end | ||
| 20 | of a line does not exist in this model; the most you can say is where the | ||
| 21 | last nonblank character on the line is found. | ||
| 22 | |||
| 23 | Of course, Emacs really always considers text as a sequence of | ||
| 24 | characters, and lines really do have ends. But Picture mode replaces | ||
| 25 | the most frequently-used commands with variants that simulate the | ||
| 26 | quarter-plane model of text. They do this by inserting spaces or by | ||
| 27 | converting tabs to spaces. | ||
| 28 | |||
| 29 | Most of the basic editing commands of Emacs are redefined by Picture mode | ||
| 30 | to do essentially the same thing but in a quarter-plane way. In addition, | ||
| 31 | Picture mode defines various keys starting with the @kbd{C-c} prefix to | ||
| 32 | run special picture editing commands. | ||
| 33 | |||
| 34 | One of these keys, @kbd{C-c C-c}, is particularly important. Often a | ||
| 35 | picture is part of a larger file that is usually edited in some other | ||
| 36 | major mode. @kbd{M-x edit-picture} records the name of the previous | ||
| 37 | major mode so you can use the @kbd{C-c C-c} command | ||
| 38 | (@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c} | ||
| 39 | also deletes spaces from the ends of lines, unless given a numeric | ||
| 40 | argument. | ||
| 41 | |||
| 42 | The special commands of Picture mode all work in other modes (provided | ||
| 43 | the @file{picture} library is loaded), but are not bound to keys except | ||
| 44 | in Picture mode. The descriptions below talk of moving ``one column'' | ||
| 45 | and so on, but all the picture mode commands handle numeric arguments as | ||
| 46 | their normal equivalents do. | ||
| 47 | |||
| 48 | @vindex picture-mode-hook | ||
| 49 | Turning on Picture mode runs the hook @code{picture-mode-hook}. | ||
| 50 | Additional extensions to Picture mode can be found in | ||
| 51 | @file{artist.el}. | ||
| 52 | |||
| 53 | @menu | ||
| 54 | * Basic Picture:: Basic concepts and simple commands of Picture Mode. | ||
| 55 | * Insert in Picture:: Controlling direction of cursor motion | ||
| 56 | after "self-inserting" characters. | ||
| 57 | * Tabs in Picture:: Various features for tab stops and indentation. | ||
| 58 | * Rectangles in Picture:: Clearing and superimposing rectangles. | ||
| 59 | @end menu | ||
| 60 | |||
| 61 | @node Basic Picture | ||
| 62 | @section Basic Editing in Picture Mode | ||
| 63 | |||
| 64 | @findex picture-forward-column | ||
| 65 | @findex picture-backward-column | ||
| 66 | @findex picture-move-down | ||
| 67 | @findex picture-move-up | ||
| 68 | @cindex editing in Picture mode | ||
| 69 | |||
| 70 | Most keys do the same thing in Picture mode that they usually do, but | ||
| 71 | do it in a quarter-plane style. For example, @kbd{C-f} is rebound to | ||
| 72 | run @code{picture-forward-column}, a command which moves point one | ||
| 73 | column to the right, inserting a space if necessary so that the actual | ||
| 74 | end of the line makes no difference. @kbd{C-b} is rebound to run | ||
| 75 | @code{picture-backward-column}, which always moves point left one | ||
| 76 | column, converting a tab to multiple spaces if necessary. @kbd{C-n} and | ||
| 77 | @kbd{C-p} are rebound to run @code{picture-move-down} and | ||
| 78 | @code{picture-move-up}, which can either insert spaces or convert tabs | ||
| 79 | as necessary to make sure that point stays in exactly the same column. | ||
| 80 | @kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last | ||
| 81 | nonblank character on the line. There is no need to change @kbd{C-a}, | ||
| 82 | as the choice of screen model does not affect beginnings of | ||
| 83 | lines. | ||
| 84 | |||
| 85 | @findex picture-newline | ||
| 86 | Insertion of text is adapted to the quarter-plane screen model | ||
| 87 | through the use of Overwrite mode | ||
| 88 | @iftex | ||
| 89 | (@pxref{Minor Modes,,, emacs, the Emacs Manual}.) | ||
| 90 | @end iftex | ||
| 91 | @ifnottex | ||
| 92 | (@pxref{Minor Modes}.) | ||
| 93 | @end ifnottex | ||
| 94 | Self-inserting characters replace existing text, column by column, | ||
| 95 | rather than pushing existing text to the right. @key{RET} runs | ||
| 96 | @code{picture-newline}, which just moves to the beginning of the | ||
| 97 | following line so that new text will replace that line. | ||
| 98 | |||
| 99 | @findex picture-backward-clear-column | ||
| 100 | @findex picture-clear-column | ||
| 101 | @findex picture-clear-line | ||
| 102 | In Picture mode, the commands that normally delete or kill text, | ||
| 103 | instead erase text (replacing it with spaces). @key{DEL} | ||
| 104 | (@code{picture-backward-clear-column}) replaces the preceding | ||
| 105 | character with a space rather than removing it; this moves point | ||
| 106 | backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next | ||
| 107 | character or characters with spaces, but does not move point. (If you | ||
| 108 | want to clear characters to spaces and move forward over them, use | ||
| 109 | @key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the | ||
| 110 | contents of lines, but does not delete the newlines from the buffer. | ||
| 111 | |||
| 112 | @findex picture-open-line | ||
| 113 | To do actual insertion, you must use special commands. @kbd{C-o} | ||
| 114 | (@code{picture-open-line}) creates a blank line after the current | ||
| 115 | line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes | ||
| 116 | sense in Picture mode, so it is not changed. @kbd{C-j} | ||
| 117 | (@code{picture-duplicate-line}) inserts another line with the same | ||
| 118 | contents below the current line. | ||
| 119 | |||
| 120 | @kindex C-c C-d @r{(Picture mode)} | ||
| 121 | To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d} | ||
| 122 | (which is defined as @code{delete-char}, as @kbd{C-d} is in other | ||
| 123 | modes), or one of the picture rectangle commands (@pxref{Rectangles in | ||
| 124 | Picture}). | ||
| 125 | |||
| 126 | @node Insert in Picture | ||
| 127 | @section Controlling Motion after Insert | ||
| 128 | |||
| 129 | @findex picture-movement-up | ||
| 130 | @findex picture-movement-down | ||
| 131 | @findex picture-movement-left | ||
| 132 | @findex picture-movement-right | ||
| 133 | @findex picture-movement-nw | ||
| 134 | @findex picture-movement-ne | ||
| 135 | @findex picture-movement-sw | ||
| 136 | @findex picture-movement-se | ||
| 137 | @kindex C-c < @r{(Picture mode)} | ||
| 138 | @kindex C-c > @r{(Picture mode)} | ||
| 139 | @kindex C-c ^ @r{(Picture mode)} | ||
| 140 | @kindex C-c . @r{(Picture mode)} | ||
| 141 | @kindex C-c ` @r{(Picture mode)} | ||
| 142 | @kindex C-c ' @r{(Picture mode)} | ||
| 143 | @kindex C-c / @r{(Picture mode)} | ||
| 144 | @kindex C-c \ @r{(Picture mode)} | ||
| 145 | Since ``self-inserting'' characters in Picture mode overwrite and move | ||
| 146 | point, there is no essential restriction on how point should be moved. | ||
| 147 | Normally point moves right, but you can specify any of the eight | ||
| 148 | orthogonal or diagonal directions for motion after a ``self-inserting'' | ||
| 149 | character. This is useful for drawing lines in the buffer. | ||
| 150 | |||
| 151 | @table @kbd | ||
| 152 | @item C-c < | ||
| 153 | @itemx C-c @key{LEFT} | ||
| 154 | Move left after insertion (@code{picture-movement-left}). | ||
| 155 | @item C-c > | ||
| 156 | @itemx C-c @key{RIGHT} | ||
| 157 | Move right after insertion (@code{picture-movement-right}). | ||
| 158 | @item C-c ^ | ||
| 159 | @itemx C-c @key{UP} | ||
| 160 | Move up after insertion (@code{picture-movement-up}). | ||
| 161 | @item C-c . | ||
| 162 | @itemx C-c @key{DOWN} | ||
| 163 | Move down after insertion (@code{picture-movement-down}). | ||
| 164 | @item C-c ` | ||
| 165 | @itemx C-c @key{HOME} | ||
| 166 | Move up and left (``northwest'') after insertion (@code{picture-movement-nw}). | ||
| 167 | @item C-c ' | ||
| 168 | @itemx C-c @key{PAGEUP} | ||
| 169 | Move up and right (``northeast'') after insertion | ||
| 170 | (@code{picture-movement-ne}). | ||
| 171 | @item C-c / | ||
| 172 | @itemx C-c @key{END} | ||
| 173 | Move down and left (``southwest'') after insertion | ||
| 174 | @*(@code{picture-movement-sw}). | ||
| 175 | @item C-c \ | ||
| 176 | @itemx C-c @key{PAGEDOWN} | ||
| 177 | Move down and right (``southeast'') after insertion | ||
| 178 | @*(@code{picture-movement-se}). | ||
| 179 | @end table | ||
| 180 | |||
| 181 | @kindex C-c C-f @r{(Picture mode)} | ||
| 182 | @kindex C-c C-b @r{(Picture mode)} | ||
| 183 | @findex picture-motion | ||
| 184 | @findex picture-motion-reverse | ||
| 185 | Two motion commands move based on the current Picture insertion | ||
| 186 | direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the | ||
| 187 | same direction as motion after ``insertion'' currently does, while @kbd{C-c | ||
| 188 | C-b} (@code{picture-motion-reverse}) moves in the opposite direction. | ||
| 189 | |||
| 190 | @node Tabs in Picture | ||
| 191 | @section Picture Mode Tabs | ||
| 192 | |||
| 193 | @kindex M-TAB @r{(Picture mode)} | ||
| 194 | @findex picture-tab-search | ||
| 195 | @vindex picture-tab-chars | ||
| 196 | Two kinds of tab-like action are provided in Picture mode. Use | ||
| 197 | @kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing. | ||
| 198 | With no argument, it moves to a point underneath the next | ||
| 199 | ``interesting'' character that follows whitespace in the previous | ||
| 200 | nonblank line. ``Next'' here means ``appearing at a horizontal position | ||
| 201 | greater than the one point starts out at.'' With an argument, as in | ||
| 202 | @kbd{C-u M-@key{TAB}}, this command moves to the next such interesting | ||
| 203 | character in the current line. @kbd{M-@key{TAB}} does not change the | ||
| 204 | text; it only moves point. ``Interesting'' characters are defined by | ||
| 205 | the variable @code{picture-tab-chars}, which should define a set of | ||
| 206 | characters. The syntax for this variable is like the syntax used inside | ||
| 207 | of @samp{[@dots{}]} in a regular expression---but without the @samp{[} | ||
| 208 | and the @samp{]}. Its default value is @code{"!-~"}. | ||
| 209 | |||
| 210 | @findex picture-tab | ||
| 211 | @key{TAB} itself runs @code{picture-tab}, which operates based on the | ||
| 212 | current tab stop settings; it is the Picture mode equivalent of | ||
| 213 | @code{tab-to-tab-stop}. Normally it just moves point, but with a numeric | ||
| 214 | argument it clears the text that it moves over. | ||
| 215 | |||
| 216 | @kindex C-c TAB @r{(Picture mode)} | ||
| 217 | @findex picture-set-tab-stops | ||
| 218 | The context-based and tab-stop-based forms of tabbing are brought | ||
| 219 | together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}). | ||
| 220 | This command sets the tab stops to the positions which @kbd{M-@key{TAB}} | ||
| 221 | would consider significant in the current line. The use of this command, | ||
| 222 | together with @key{TAB}, can get the effect of context-based tabbing. But | ||
| 223 | @kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient. | ||
| 224 | |||
| 225 | It may be convenient to prevent use of actual tab characters in | ||
| 226 | pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing | ||
| 227 | up the picture. You can do this by setting the variable | ||
| 228 | @code{indent-tabs-mode} to @code{nil}. | ||
| 229 | |||
| 230 | @node Rectangles in Picture | ||
| 231 | @section Picture Mode Rectangle Commands | ||
| 232 | @cindex rectangles and Picture mode | ||
| 233 | @cindex Picture mode and rectangles | ||
| 234 | |||
| 235 | Picture mode defines commands for working on rectangular pieces of | ||
| 236 | the text in ways that fit with the quarter-plane model. The standard | ||
| 237 | rectangle commands may also be useful. | ||
| 238 | @iftex | ||
| 239 | @xref{Rectangles,,, emacs, the Emacs Manual}. | ||
| 240 | @end iftex | ||
| 241 | @ifnottex | ||
| 242 | @xref{Rectangles}. | ||
| 243 | @end ifnottex | ||
| 244 | |||
| 245 | @table @kbd | ||
| 246 | @item C-c C-k | ||
| 247 | Clear out the region-rectangle with spaces | ||
| 248 | (@code{picture-clear-rectangle}). With argument, delete the text. | ||
| 249 | @item C-c C-w @var{r} | ||
| 250 | Similar, but save rectangle contents in register @var{r} first | ||
| 251 | (@code{picture-clear-rectangle-to-register}). | ||
| 252 | @item C-c C-y | ||
| 253 | Copy last killed rectangle into the buffer by overwriting, with upper | ||
| 254 | left corner at point (@code{picture-yank-rectangle}). With argument, | ||
| 255 | insert instead. | ||
| 256 | @item C-c C-x @var{r} | ||
| 257 | Similar, but use the rectangle in register @var{r} | ||
| 258 | (@code{picture-yank-rectangle-from-register}). | ||
| 259 | @end table | ||
| 260 | |||
| 261 | @kindex C-c C-k @r{(Picture mode)} | ||
| 262 | @kindex C-c C-w @r{(Picture mode)} | ||
| 263 | @findex picture-clear-rectangle | ||
| 264 | @findex picture-clear-rectangle-to-register | ||
| 265 | The picture rectangle commands @kbd{C-c C-k} | ||
| 266 | (@code{picture-clear-rectangle}) and @kbd{C-c C-w} | ||
| 267 | (@code{picture-clear-rectangle-to-register}) differ from the standard | ||
| 268 | rectangle commands in that they normally clear the rectangle instead of | ||
| 269 | deleting it; this is analogous with the way @kbd{C-d} is changed in Picture | ||
| 270 | mode. | ||
| 271 | |||
| 272 | However, deletion of rectangles can be useful in Picture mode, so | ||
| 273 | these commands delete the rectangle if given a numeric argument. | ||
| 274 | @kbd{C-c C-k} either with or without a numeric argument saves the | ||
| 275 | rectangle for @kbd{C-c C-y}. | ||
| 276 | |||
| 277 | @kindex C-c C-y @r{(Picture mode)} | ||
| 278 | @kindex C-c C-x @r{(Picture mode)} | ||
| 279 | @findex picture-yank-rectangle | ||
| 280 | @findex picture-yank-rectangle-from-register | ||
| 281 | The Picture mode commands for yanking rectangles differ from the | ||
| 282 | standard ones in that they overwrite instead of inserting. This is | ||
| 283 | the same way that Picture mode insertion of other text differs from | ||
| 284 | other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts | ||
| 285 | (by overwriting) the rectangle that was most recently killed, while | ||
| 286 | @kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does | ||
| 287 | likewise for the rectangle found in a specified register. | ||
| 288 | |||
| 289 | @ignore | ||
| 290 | arch-tag: 10e423ad-d896-42f2-a7e8-7018adeaf8c2 | ||
| 291 | @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}). | |||
| 42 | * C Modes:: Special commands of C, C++, Objective-C, | 42 | * C Modes:: Special commands of C, C++, Objective-C, |
| 43 | Java, and Pike modes. | 43 | Java, and Pike modes. |
| 44 | * Asm Mode:: Asm mode and its special features. | 44 | * Asm Mode:: Asm mode and its special features. |
| 45 | @ifnottex | ||
| 46 | * Fortran:: Fortran mode and its special features. | ||
| 47 | @end ifnottex | ||
| 45 | @end menu | 48 | @end menu |
| 46 | 49 | ||
| 47 | @node Program Modes | 50 | @node Program Modes |
| @@ -109,7 +112,14 @@ tab character before point, in these modes. | |||
| 109 | Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK | 112 | Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK |
| 110 | (@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes | 113 | (@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes |
| 111 | (@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran | 114 | (@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran |
| 112 | mode, @inforef{Fortran,, emacs-xtra}. | 115 | mode, see |
| 116 | @iftex | ||
| 117 | @ref{Fortran,,, emacs-xtra, Specialized Emacs Features}. | ||
| 118 | @end iftex | ||
| 119 | @ifnottex | ||
| 120 | @ref{Fortran}. | ||
| 121 | @end ifnottex | ||
| 122 | |||
| 113 | 123 | ||
| 114 | @cindex mode hook | 124 | @cindex mode hook |
| 115 | @vindex c-mode-hook | 125 | @vindex c-mode-hook |
| @@ -1591,7 +1601,7 @@ hungry-delete feature is enabled. | |||
| 1591 | @itemx M-x c-subword-mode | 1601 | @itemx M-x c-subword-mode |
| 1592 | @findex c-subword-mode | 1602 | @findex c-subword-mode |
| 1593 | Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word | 1603 | Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word |
| 1594 | commands then recognize upper case letters in | 1604 | commands recognize upper case letters in |
| 1595 | @samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by | 1605 | @samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by |
| 1596 | the flag @samp{/w} on the mode line after the mode name | 1606 | the flag @samp{/w} on the mode line after the mode name |
| 1597 | (e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in | 1607 | (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. | |||
| 1742 | The variable @code{asm-comment-char} specifies which character | 1752 | The variable @code{asm-comment-char} specifies which character |
| 1743 | starts comments in assembler syntax. | 1753 | starts comments in assembler syntax. |
| 1744 | 1754 | ||
| 1755 | @ifnottex | ||
| 1756 | @include fortran-xtra.texi | ||
| 1757 | @end ifnottex | ||
| 1758 | |||
| 1745 | @ignore | 1759 | @ignore |
| 1746 | arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0 | 1760 | arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0 |
| 1747 | @end ignore | 1761 | @end ignore |
diff --git a/man/screen.texi b/man/screen.texi index 72ed3261f01..b1b37be6239 100644 --- a/man/screen.texi +++ b/man/screen.texi | |||
| @@ -24,8 +24,8 @@ be a @dfn{tool bar}, a row of icons that perform editing commands if | |||
| 24 | you click on them. Below this, the window begins, often with a | 24 | you click on them. Below this, the window begins, often with a |
| 25 | @dfn{scroll bar} on one side. Below the window comes the last line of | 25 | @dfn{scroll bar} on one side. Below the window comes the last line of |
| 26 | the frame, a special @dfn{echo area} or @dfn{minibuffer window}, where | 26 | the frame, a special @dfn{echo area} or @dfn{minibuffer window}, where |
| 27 | prompts appear and where you enter information when Emacs asks for it. | 27 | prompts appear and you enter information when Emacs asks for it. See |
| 28 | See following sections for more information about these special lines. | 28 | following sections for more information about these special lines. |
| 29 | 29 | ||
| 30 | You can subdivide the window horizontally or vertically to make | 30 | You can subdivide the window horizontally or vertically to make |
| 31 | multiple text windows, each of which can independently display some | 31 | multiple text windows, each of which can independently display some |
| @@ -34,22 +34,22 @@ refers to the initial large window if not subdivided, or any one of | |||
| 34 | the multiple windows you have subdivided it into. | 34 | the multiple windows you have subdivided it into. |
| 35 | 35 | ||
| 36 | At any time, one window is the @dfn{selected window}. On graphical | 36 | At any time, one window is the @dfn{selected window}. On graphical |
| 37 | terminals, the selected window normally shows a more prominent cursor | 37 | displays, the selected window normally shows a more prominent cursor |
| 38 | (usually solid and blinking) while other windows show a weaker cursor | 38 | (usually solid and blinking) while other windows show a weaker cursor |
| 39 | (such as a hollow box). On text terminals, which have just one | 39 | (such as a hollow box). Text terminals have just one cursor, so it |
| 40 | cursor, that cursor always appears in the selected window. | 40 | always appears in the selected window. |
| 41 | 41 | ||
| 42 | Most Emacs commands implicitly apply to the text in the selected | 42 | Most Emacs commands implicitly apply to the text in the selected |
| 43 | window (though mouse commands generally operate on whatever window you | 43 | window; the text in unselected windows is mostly visible for |
| 44 | click them in, whether selected or not). The text in other windows is | 44 | reference. However, mouse commands generally operate on whatever |
| 45 | mostly visible for reference, unless/until you select them. If you | 45 | window you click them in, whether selected or not. If you use |
| 46 | use multiple frames on a graphical display, then giving the input | 46 | multiple frames on a graphical display, then giving the input focus to |
| 47 | focus to a particular frame selects a window in that frame. | 47 | a particular frame selects a window in that frame. |
| 48 | 48 | ||
| 49 | Each window's last line is a @dfn{mode line}, which describes what | 49 | Each window's last line is a @dfn{mode line}, which describes what |
| 50 | is going on in that window. It appears in different color and/or a | 50 | is going on in that window. It appears in different color and/or a ``3D'' |
| 51 | ``3D'' box, if the terminal supports that; its contents normally begin | 51 | box if the terminal supports them; its contents normally begin with |
| 52 | with @w{@samp{--:-- @ *scratch*}} when Emacs starts. The mode line | 52 | @w{@samp{--:-- @ *scratch*}} when Emacs starts. The mode line |
| 53 | displays status information such as what buffer is being displayed | 53 | displays status information such as what buffer is being displayed |
| 54 | above it in the window, what major and minor modes are in use, and | 54 | above it in the window, what major and minor modes are in use, and |
| 55 | whether the buffer contains unsaved changes. | 55 | whether the buffer contains unsaved changes. |
| @@ -89,18 +89,17 @@ each buffer has its own point location. A buffer that is not | |||
| 89 | currently displayed remembers its point location in case you display | 89 | currently displayed remembers its point location in case you display |
| 90 | it again later. When Emacs displays multiple windows, each window has | 90 | it again later. When Emacs displays multiple windows, each window has |
| 91 | its own point location. If the same buffer appears in more than one | 91 | its own point location. If the same buffer appears in more than one |
| 92 | window, each window has its own position for point in that buffer, and | 92 | window, each window has its own point position in that buffer, and (when |
| 93 | (when possible) its own cursor. | 93 | possible) its own cursor. |
| 94 | 94 | ||
| 95 | A text-only terminal has just one cursor, so Emacs puts it | 95 | A text-only terminal has just one cursor, in the selected window. |
| 96 | in the selected window. The other windows do not show a cursor, even | 96 | The other windows do not show a cursor, even though they do have their |
| 97 | though they do have a location of point. When Emacs updates the | 97 | own position of point. When Emacs updates the screen on a text-only |
| 98 | screen on a text-only terminal, it has to put the cursor temporarily | 98 | terminal, it has to put the cursor temporarily at the place the output |
| 99 | at the place the output goes. This doesn't mean point is there, | 99 | goes. This doesn't mean point is there, though. Once display |
| 100 | though. Once display updating finishes, Emacs puts the cursor where | 100 | updating finishes, Emacs puts the cursor where point is. |
| 101 | point is. | 101 | |
| 102 | 102 | On graphical displays, Emacs shows a cursor in each window; the | |
| 103 | On graphical terminals, Emacs shows a cursor in each window; the | ||
| 104 | selected window's cursor is solid and blinking, and the other cursors | 103 | selected window's cursor is solid and blinking, and the other cursors |
| 105 | are just hollow. Thus, the most prominent cursor always shows you the | 104 | are just hollow. Thus, the most prominent cursor always shows you the |
| 106 | selected window, on all kinds of terminals. | 105 | selected window, on all kinds of terminals. |
| @@ -165,18 +164,19 @@ that appears briefly on the screen, you can switch to the | |||
| 165 | are often collapsed into one in that buffer.) | 164 | are often collapsed into one in that buffer.) |
| 166 | 165 | ||
| 167 | @vindex message-log-max | 166 | @vindex message-log-max |
| 168 | The size of @samp{*Messages*} is limited to a certain number of lines. | 167 | The size of @samp{*Messages*} is limited to a certain number of |
| 169 | The variable @code{message-log-max} specifies how many lines. Once the | 168 | lines. The variable @code{message-log-max} specifies how many lines. |
| 170 | buffer has that many lines, each line added at the end deletes one line | 169 | Once the buffer has that many lines, adding lines at the end deletes lines |
| 171 | from the beginning. @xref{Variables}, for how to set variables such as | 170 | from the beginning, to keep the size constant. @xref{Variables}, for |
| 172 | @code{message-log-max}. | 171 | how to set variables such as @code{message-log-max}. |
| 173 | 172 | ||
| 174 | The echo area is also used to display the @dfn{minibuffer}, a window that | 173 | The echo area is also used to display the @dfn{minibuffer}, a window |
| 175 | is used for reading arguments to commands, such as the name of a file to be | 174 | where you can input arguments to commands, such as the name of a file |
| 176 | edited. When the minibuffer is in use, the echo area begins with a prompt | 175 | to be edited. When the minibuffer is in use, the echo area begins |
| 177 | string that usually ends with a colon; also, the cursor appears in that line | 176 | with a prompt string that usually ends with a colon; also, the cursor |
| 178 | because it is the selected window. You can always get out of the | 177 | appears in that line because it is the selected window. You can |
| 179 | minibuffer by typing @kbd{C-g}. @xref{Minibuffer}. | 178 | always get out of the minibuffer by typing @kbd{C-g}. |
| 179 | @xref{Minibuffer}. | ||
| 180 | 180 | ||
| 181 | @node Mode Line | 181 | @node Mode Line |
| 182 | @section The Mode Line | 182 | @section The Mode Line |
| @@ -188,11 +188,11 @@ minibuffer by typing @kbd{C-g}. @xref{Minibuffer}. | |||
| 188 | what is going on in that window. The mode line starts and ends with | 188 | what is going on in that window. The mode line starts and ends with |
| 189 | dashes. When there is only one text window, the mode line appears | 189 | dashes. When there is only one text window, the mode line appears |
| 190 | right above the echo area; it is the next-to-last line in the frame. | 190 | right above the echo area; it is the next-to-last line in the frame. |
| 191 | On a text-mode display, the mode line is in inverse video if the | 191 | On a text-only terminal, the mode line is in inverse video if the |
| 192 | terminal supports that; on a graphics display, the mode line has a 3D | 192 | terminal supports that; on a graphics display, the mode line has a 3D |
| 193 | box appearance to help it stand out. The mode line of the selected | 193 | box appearance to help it stand out. The mode line of the selected |
| 194 | window has a slightly different appearance than those of other | 194 | window is highlighted if possible; see @ref{Optional Mode Line}, for |
| 195 | windows; see @ref{Optional Mode Line}, for more about this. | 195 | more information. |
| 196 | 196 | ||
| 197 | Normally, the mode line looks like this: | 197 | Normally, the mode line looks like this: |
| 198 | 198 | ||
| @@ -201,26 +201,26 @@ windows; see @ref{Optional Mode Line}, for more about this. | |||
| 201 | @end example | 201 | @end example |
| 202 | 202 | ||
| 203 | @noindent | 203 | @noindent |
| 204 | This gives information about the buffer being displayed in the window: the | 204 | This gives information about the window and the buffer it displays: the |
| 205 | buffer's name, what major and minor modes are in use, whether the buffer's | 205 | buffer's name, what major and minor modes are in use, whether the |
| 206 | text has been changed, and how far down the buffer you are currently | 206 | buffer's text has been changed, and how far down the buffer you are |
| 207 | looking. | 207 | currently looking. |
| 208 | 208 | ||
| 209 | @var{ch} contains two stars @samp{**} if the text in the buffer has | 209 | @var{ch} contains two stars @samp{**} if the text in the buffer has |
| 210 | been edited (the buffer is ``modified''), or @samp{--} if the buffer has | 210 | been edited (the buffer is ``modified''), or @samp{--} if the buffer has |
| 211 | not been edited. For a read-only buffer, it is @samp{%*} if the buffer | 211 | not been edited. For a read-only buffer, it is @samp{%*} if the buffer |
| 212 | is modified, and @samp{%%} otherwise. | 212 | is modified, and @samp{%%} otherwise. |
| 213 | 213 | ||
| 214 | @var{fr} appears only on text-only terminals, to show the selected | 214 | @var{fr} gives the selected frame name (@pxref{Frames}). It appears |
| 215 | frame name. @xref{Frames}. The initial frame's name is @samp{F1}. | 215 | only on text-only terminals. The initial frame's name is @samp{F1}. |
| 216 | 216 | ||
| 217 | @var{buf} is the name of the window's @dfn{buffer}. In most cases | 217 | @var{buf} is the name of the window's @dfn{buffer}. Usually this is |
| 218 | this is the same as the name of a file you are editing. @xref{Buffers}. | 218 | the same as the name of a file you are editing. @xref{Buffers}. |
| 219 | 219 | ||
| 220 | The buffer displayed in the selected window (the window that the | 220 | The buffer displayed in the selected window (the window with the |
| 221 | cursor is in) is the @dfn{current buffer}--the one that editing takes | 221 | cursor) is the @dfn{current buffer}, where editing happens. When a |
| 222 | place in. When we speak of what some command does to ``the buffer,'' | 222 | command's effect applies to ``the buffer,'' we mean it does those |
| 223 | we mean it does those things to the current buffer. | 223 | things to the current buffer. |
| 224 | 224 | ||
| 225 | @var{pos} tells you whether there is additional text above the top of | 225 | @var{pos} tells you whether there is additional text above the top of |
| 226 | the window, or below the bottom. If your buffer is small and it is all | 226 | the window, or below the bottom. If your buffer is small and it is all |
| @@ -232,17 +232,17 @@ With Size Indication mode, you can display the size of the buffer as | |||
| 232 | well. @xref{Optional Mode Line}. | 232 | well. @xref{Optional Mode Line}. |
| 233 | 233 | ||
| 234 | @var{line} is @samp{L} followed by the current line number of point. | 234 | @var{line} is @samp{L} followed by the current line number of point. |
| 235 | This is present when Line Number mode is enabled (which it normally is). | 235 | This is present when Line Number mode is enabled (it normally is). |
| 236 | You can optionally display the current column number too, by turning on | 236 | You can display the current column number too, by turning on Column |
| 237 | Column Number mode (which is not enabled by default because it is | 237 | Number mode. It is not enabled by default because it is somewhat |
| 238 | somewhat slower). @xref{Optional Mode Line}. | 238 | slower. @xref{Optional Mode Line}. |
| 239 | 239 | ||
| 240 | @var{major} is the name of the @dfn{major mode} in effect in the | 240 | @var{major} is the name of the @dfn{major mode} in effect in the |
| 241 | buffer. At any time, each buffer is in one and only one of the possible | 241 | buffer. A buffer can only be in one major mode at a time. The major |
| 242 | major modes. The major modes available include Fundamental mode (the | 242 | modes available include Fundamental mode (the least specialized), Text |
| 243 | least specialized), Text mode, Lisp mode, C mode, Texinfo mode, and many | 243 | mode, Lisp mode, C mode, Texinfo mode, and many others. @xref{Major |
| 244 | others. @xref{Major Modes}, for details of how the modes differ and how | 244 | Modes}, for details of how the modes differ and how to select |
| 245 | to select one.@refill | 245 | them. |
| 246 | 246 | ||
| 247 | Some major modes display additional information after the major mode | 247 | Some major modes display additional information after the major mode |
| 248 | name. For example, Rmail buffers display the current message number and | 248 | name. For example, Rmail buffers display the current message number and |
| @@ -253,14 +253,15 @@ display the status of the subprocess. | |||
| 253 | turned on at the moment in the window's chosen buffer. For example, | 253 | turned on at the moment in the window's chosen buffer. For example, |
| 254 | @samp{Fill} means that Auto Fill mode is on. @samp{Abbrev} means that | 254 | @samp{Fill} means that Auto Fill mode is on. @samp{Abbrev} means that |
| 255 | Word Abbrev mode is on. @samp{Ovwrt} means that Overwrite mode is on. | 255 | Word Abbrev mode is on. @samp{Ovwrt} means that Overwrite mode is on. |
| 256 | @xref{Minor Modes}, for more information. @samp{Narrow} means that | 256 | @xref{Minor Modes}, for more information. |
| 257 | the buffer being displayed has editing restricted to only a portion of | 257 | |
| 258 | its text. (This is not really a minor mode, but is like one.) | 258 | @samp{Narrow} means that the buffer being displayed has editing |
| 259 | @xref{Narrowing}. @samp{Def} means that a keyboard macro is being | 259 | restricted to only a portion of its text. (This is not really a minor |
| 260 | defined. @xref{Keyboard Macros}. | 260 | mode, but is like one.) @xref{Narrowing}. @samp{Def} means that a |
| 261 | 261 | keyboard macro is being defined. @xref{Keyboard Macros}. | |
| 262 | In addition, if Emacs is currently inside a recursive editing level, | 262 | |
| 263 | square brackets (@samp{[@dots{}]}) appear around the parentheses that | 263 | In addition, if Emacs is inside a recursive editing level, square |
| 264 | brackets (@samp{[@dots{}]}) appear around the parentheses that | ||
| 264 | surround the modes. If Emacs is in one recursive editing level within | 265 | surround the modes. If Emacs is in one recursive editing level within |
| 265 | another, double square brackets appear, and so on. Since recursive | 266 | another, double square brackets appear, and so on. Since recursive |
| 266 | editing levels affect Emacs globally, not just one buffer, the square | 267 | editing levels affect Emacs globally, not just one buffer, the square |
| @@ -288,22 +289,21 @@ identifies the input method. (Some input methods show @samp{+} or | |||
| 288 | all. @xref{Enabling Multibyte}. | 289 | all. @xref{Enabling Multibyte}. |
| 289 | 290 | ||
| 290 | @cindex end-of-line conversion, mode-line indication | 291 | @cindex end-of-line conversion, mode-line indication |
| 291 | The colon after @var{cs} can change to another string in certain | 292 | The colon after @var{cs} changes to another string in some cases. |
| 292 | circumstances. Emacs uses newline characters to separate lines in the buffer. | 293 | Emacs uses newline characters to separate lines in the buffer. Some |
| 293 | Some files use different conventions for separating lines: either | 294 | files use different conventions for separating lines: either |
| 294 | carriage-return linefeed (the MS-DOS convention) or just carriage-return | 295 | carriage-return linefeed (the MS-DOS convention) or just |
| 295 | (the Macintosh convention). If the buffer's file uses carriage-return | 296 | carriage-return (the Macintosh convention). If the buffer's file uses |
| 296 | linefeed, the colon changes to either a backslash (@samp{\}) or | 297 | carriage-return linefeed, the colon changes to either a backslash |
| 297 | @samp{(DOS)}, depending on the operating system. If the file uses just | 298 | (@samp{\}) or @samp{(DOS)}, depending on the operating system. If the |
| 298 | carriage-return, the colon indicator changes to either a forward slash | 299 | file uses just carriage-return, the colon indicator changes to either |
| 299 | (@samp{/}) or @samp{(Mac)}. On some systems, Emacs displays | 300 | a forward slash (@samp{/}) or @samp{(Mac)}. On some systems, Emacs |
| 300 | @samp{(Unix)} instead of the colon even for files that use newline to | 301 | displays @samp{(Unix)} instead of the colon for files that use newline |
| 301 | separate lines. | 302 | as the line separator. |
| 302 | 303 | ||
| 303 | @xref{Optional Mode Line}, for features that add other handy | 304 | @xref{Optional Mode Line}, to add other handy information to the |
| 304 | information to the mode line, such as the size of the buffer, the | 305 | mode line, such as the size of the buffer, the current column number |
| 305 | current column number of point, and whether new mail for you has | 306 | of point, and whether new mail for you has arrived. |
| 306 | arrived. | ||
| 307 | 307 | ||
| 308 | The mode line is mouse-sensitive; when you move the mouse across | 308 | The mode line is mouse-sensitive; when you move the mouse across |
| 309 | various parts of it, Emacs displays help text to say what a click in | 309 | various parts of it, Emacs displays help text to say what a click in |
| @@ -314,17 +314,17 @@ that place will do. @xref{Mode Line Mouse}. | |||
| 314 | @cindex menu bar | 314 | @cindex menu bar |
| 315 | 315 | ||
| 316 | Each Emacs frame normally has a @dfn{menu bar} at the top which you | 316 | Each Emacs frame normally has a @dfn{menu bar} at the top which you |
| 317 | can use to perform certain common operations. There's no need to list | 317 | can use to perform common operations. There's no need to list them |
| 318 | them here, as you can more easily see for yourself. | 318 | here, as you can more easily see them yourself. |
| 319 | 319 | ||
| 320 | @kindex M-` | 320 | @kindex M-` |
| 321 | @kindex F10 | 321 | @kindex F10 |
| 322 | @findex tmm-menubar | 322 | @findex tmm-menubar |
| 323 | On a graphical terminal, you can use the mouse to choose a command | 323 | On a graphical display, you can use the mouse to choose a command |
| 324 | from the menu bar. An arrow pointing right, after the menu item, | 324 | from the menu bar. A right-arrow at the end of the menu item means it |
| 325 | indicates that the item leads to a subsidiary menu; @samp{...} at the | 325 | leads to a subsidiary menu; @samp{...} at the end means that the |
| 326 | end means that the command will read arguments (further input from | 326 | command invoked will read arguments (further input from you) before it |
| 327 | you) before it actually does anything. | 327 | actually does anything. |
| 328 | 328 | ||
| 329 | To view the full command name and documentation for a menu item, type | 329 | To view the full command name and documentation for a menu item, type |
| 330 | @kbd{C-h k}, and then select the menu bar with the mouse in the usual | 330 | @kbd{C-h k}, and then select the menu bar with the mouse in the usual |
| @@ -332,11 +332,10 @@ way (@pxref{Key Help}). | |||
| 332 | 332 | ||
| 333 | On text-only terminals with no mouse, you can use the menu bar by | 333 | On text-only terminals with no mouse, you can use the menu bar by |
| 334 | typing @kbd{M-`} or @key{F10} (these run the command | 334 | typing @kbd{M-`} or @key{F10} (these run the command |
| 335 | @code{tmm-menubar}). This command enters a mode in which you can select | 335 | @code{tmm-menubar}). This lets you select a menu item with the |
| 336 | a menu item from the keyboard. A provisional choice appears in the echo | 336 | keyboard. A provisional choice appears in the echo area. You can use |
| 337 | area. You can use the up and down arrow keys to move through the | 337 | the up and down arrow keys to move through the menu to different |
| 338 | menu to different choices. When you have found the choice you want, | 338 | items, and then you can type @key{RET} to select the item. |
| 339 | type @key{RET} to select it. | ||
| 340 | 339 | ||
| 341 | Each menu item also has an assigned letter or digit which designates | 340 | Each menu item also has an assigned letter or digit which designates |
| 342 | that item; it is usually the initial of some word in the item's name. | 341 | that item; it is usually the initial of some word in the item's name. |
| @@ -344,8 +343,7 @@ This letter or digit is separated from the item name by @samp{=>}. You | |||
| 344 | can type the item's letter or digit to select the item. | 343 | can type the item's letter or digit to select the item. |
| 345 | 344 | ||
| 346 | Some of the commands in the menu bar have ordinary key bindings as | 345 | Some of the commands in the menu bar have ordinary key bindings as |
| 347 | well; if so, the menu lists one equivalent key binding in parentheses | 346 | well; one such binding is shown in parentheses after the item itself. |
| 348 | after the item itself. | ||
| 349 | 347 | ||
| 350 | @ignore | 348 | @ignore |
| 351 | arch-tag: 104ba40e-d972-4866-a542-a98be94bdf2f | 349 | arch-tag: 104ba40e-d972-4866-a542-a98be94bdf2f |
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 @@ | |||
| 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002, | 2 | @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002, |
| 3 | @c 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | 3 | @c 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Sending Mail, Rmail, Abbrevs, Top | 5 | @node Sending Mail |
| 6 | @chapter Sending Mail | 6 | @chapter Sending Mail |
| 7 | @cindex sending mail | 7 | @cindex sending mail |
| 8 | @cindex mail | 8 | @cindex mail |
diff --git a/man/texinfo.tex b/man/texinfo.tex index 7ed20f016b1..fcddd268999 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | % Load plain if necessary, i.e., if running under initex. | 3 | % Load plain if necessary, i.e., if running under initex. |
| 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 | \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
| 5 | % | 5 | % |
| 6 | \def\texinfoversion{2006-03-21.13} | 6 | \def\texinfoversion{2006-05-07.15} |
| 7 | % | 7 | % |
| 8 | % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 | % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
| 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free | 9 | % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free |
| @@ -1237,9 +1237,10 @@ where each line of input produces a line of output.} | |||
| 1237 | \ifpdf | 1237 | \ifpdf |
| 1238 | \input pdfcolor | 1238 | \input pdfcolor |
| 1239 | \pdfcatalog{/PageMode /UseOutlines}% | 1239 | \pdfcatalog{/PageMode /UseOutlines}% |
| 1240 | % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). | ||
| 1240 | \def\dopdfimage#1#2#3{% | 1241 | \def\dopdfimage#1#2#3{% |
| 1241 | \def\imagewidth{#2}% | 1242 | \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% |
| 1242 | \def\imageheight{#3}% | 1243 | \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% |
| 1243 | % without \immediate, pdftex seg faults when the same image is | 1244 | % without \immediate, pdftex seg faults when the same image is |
| 1244 | % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) | 1245 | % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) |
| 1245 | \ifnum\pdftexversion < 14 | 1246 | \ifnum\pdftexversion < 14 |
| @@ -1247,8 +1248,8 @@ where each line of input produces a line of output.} | |||
| 1247 | \else | 1248 | \else |
| 1248 | \immediate\pdfximage | 1249 | \immediate\pdfximage |
| 1249 | \fi | 1250 | \fi |
| 1250 | \ifx\empty\imagewidth\else width \imagewidth \fi | 1251 | \ifdim \wd0 >0pt width \imagewidth \fi |
| 1251 | \ifx\empty\imageheight\else height \imageheight \fi | 1252 | \ifdim \wd2 >0pt height \imageheight \fi |
| 1252 | \ifnum\pdftexversion<13 | 1253 | \ifnum\pdftexversion<13 |
| 1253 | #1.pdf% | 1254 | #1.pdf% |
| 1254 | \else | 1255 | \else |
| @@ -1471,6 +1472,7 @@ where each line of input produces a line of output.} | |||
| 1471 | % We don't need math for this font style. | 1472 | % We don't need math for this font style. |
| 1472 | \def\ttsl{\setfontstyle{ttsl}} | 1473 | \def\ttsl{\setfontstyle{ttsl}} |
| 1473 | 1474 | ||
| 1475 | |||
| 1474 | % Default leading. | 1476 | % Default leading. |
| 1475 | \newdimen\textleading \textleading = 13.2pt | 1477 | \newdimen\textleading \textleading = 13.2pt |
| 1476 | 1478 | ||
| @@ -1492,11 +1494,13 @@ where each line of input produces a line of output.} | |||
| 1492 | }% | 1494 | }% |
| 1493 | } | 1495 | } |
| 1494 | 1496 | ||
| 1497 | |||
| 1495 | % Set the font macro #1 to the font named #2, adding on the | 1498 | % Set the font macro #1 to the font named #2, adding on the |
| 1496 | % specified font prefix (normally `cm'). | 1499 | % specified font prefix (normally `cm'). |
| 1497 | % #3 is the font's design size, #4 is a scale factor | 1500 | % #3 is the font's design size, #4 is a scale factor |
| 1498 | \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} | 1501 | \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} |
| 1499 | 1502 | ||
| 1503 | |||
| 1500 | % Use cm as the default font prefix. | 1504 | % Use cm as the default font prefix. |
| 1501 | % To specify the font prefix, you must define \fontprefix | 1505 | % To specify the font prefix, you must define \fontprefix |
| 1502 | % before you read in texinfo.tex. | 1506 | % before you read in texinfo.tex. |
| @@ -1520,6 +1524,10 @@ where each line of input produces a line of output.} | |||
| 1520 | \def\scshape{csc} | 1524 | \def\scshape{csc} |
| 1521 | \def\scbshape{csc} | 1525 | \def\scbshape{csc} |
| 1522 | 1526 | ||
| 1527 | % Definitions for a main text size of 11pt. This is the default in | ||
| 1528 | % Texinfo. | ||
| 1529 | % | ||
| 1530 | \def\definetextfontsizexi{ | ||
| 1523 | % Text fonts (11.2pt, magstep1). | 1531 | % Text fonts (11.2pt, magstep1). |
| 1524 | \def\textnominalsize{11pt} | 1532 | \def\textnominalsize{11pt} |
| 1525 | \edef\mainmagstep{\magstephalf} | 1533 | \edef\mainmagstep{\magstephalf} |
| @@ -1633,6 +1641,165 @@ where each line of input produces a line of output.} | |||
| 1633 | \font\reducedi=cmmi10 | 1641 | \font\reducedi=cmmi10 |
| 1634 | \font\reducedsy=cmsy10 | 1642 | \font\reducedsy=cmsy10 |
| 1635 | 1643 | ||
| 1644 | % reset the current fonts | ||
| 1645 | \textfonts | ||
| 1646 | \rm | ||
| 1647 | } % end of 11pt text font size definitions | ||
| 1648 | |||
| 1649 | |||
| 1650 | % Definitions to make the main text be 10pt Computer Modern, with | ||
| 1651 | % section, chapter, etc., sizes following suit. This is for the GNU | ||
| 1652 | % Press printing of the Emacs 22 manual. Maybe other manuals in the | ||
| 1653 | % future. Used with @smallbook, which sets the leading to 12pt. | ||
| 1654 | % | ||
| 1655 | \def\definetextfontsizex{% | ||
| 1656 | % Text fonts (10pt). | ||
| 1657 | \def\textnominalsize{10pt} | ||
| 1658 | \edef\mainmagstep{1000} | ||
| 1659 | \setfont\textrm\rmshape{10}{\mainmagstep} | ||
| 1660 | \setfont\texttt\ttshape{10}{\mainmagstep} | ||
| 1661 | \setfont\textbf\bfshape{10}{\mainmagstep} | ||
| 1662 | \setfont\textit\itshape{10}{\mainmagstep} | ||
| 1663 | \setfont\textsl\slshape{10}{\mainmagstep} | ||
| 1664 | \setfont\textsf\sfshape{10}{\mainmagstep} | ||
| 1665 | \setfont\textsc\scshape{10}{\mainmagstep} | ||
| 1666 | \setfont\textttsl\ttslshape{10}{\mainmagstep} | ||
| 1667 | \font\texti=cmmi10 scaled \mainmagstep | ||
| 1668 | \font\textsy=cmsy10 scaled \mainmagstep | ||
| 1669 | |||
| 1670 | % A few fonts for @defun names and args. | ||
| 1671 | \setfont\defbf\bfshape{10}{\magstephalf} | ||
| 1672 | \setfont\deftt\ttshape{10}{\magstephalf} | ||
| 1673 | \setfont\defttsl\ttslshape{10}{\magstephalf} | ||
| 1674 | \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} | ||
| 1675 | |||
| 1676 | % Fonts for indices, footnotes, small examples (9pt). | ||
| 1677 | \def\smallnominalsize{9pt} | ||
| 1678 | \setfont\smallrm\rmshape{9}{1000} | ||
| 1679 | \setfont\smalltt\ttshape{9}{1000} | ||
| 1680 | \setfont\smallbf\bfshape{10}{900} | ||
| 1681 | \setfont\smallit\itshape{9}{1000} | ||
| 1682 | \setfont\smallsl\slshape{9}{1000} | ||
| 1683 | \setfont\smallsf\sfshape{9}{1000} | ||
| 1684 | \setfont\smallsc\scshape{10}{900} | ||
| 1685 | \setfont\smallttsl\ttslshape{10}{900} | ||
| 1686 | \font\smalli=cmmi9 | ||
| 1687 | \font\smallsy=cmsy9 | ||
| 1688 | |||
| 1689 | % Fonts for small examples (8pt). | ||
| 1690 | \def\smallernominalsize{8pt} | ||
| 1691 | \setfont\smallerrm\rmshape{8}{1000} | ||
| 1692 | \setfont\smallertt\ttshape{8}{1000} | ||
| 1693 | \setfont\smallerbf\bfshape{10}{800} | ||
| 1694 | \setfont\smallerit\itshape{8}{1000} | ||
| 1695 | \setfont\smallersl\slshape{8}{1000} | ||
| 1696 | \setfont\smallersf\sfshape{8}{1000} | ||
| 1697 | \setfont\smallersc\scshape{10}{800} | ||
| 1698 | \setfont\smallerttsl\ttslshape{10}{800} | ||
| 1699 | \font\smalleri=cmmi8 | ||
| 1700 | \font\smallersy=cmsy8 | ||
| 1701 | |||
| 1702 | % Fonts for title page (20.4pt): | ||
| 1703 | \def\titlenominalsize{20pt} | ||
| 1704 | \setfont\titlerm\rmbshape{12}{\magstep3} | ||
| 1705 | \setfont\titleit\itbshape{10}{\magstep4} | ||
| 1706 | \setfont\titlesl\slbshape{10}{\magstep4} | ||
| 1707 | \setfont\titlett\ttbshape{12}{\magstep3} | ||
| 1708 | \setfont\titlettsl\ttslshape{10}{\magstep4} | ||
| 1709 | \setfont\titlesf\sfbshape{17}{\magstep1} | ||
| 1710 | \let\titlebf=\titlerm | ||
| 1711 | \setfont\titlesc\scbshape{10}{\magstep4} | ||
| 1712 | \font\titlei=cmmi12 scaled \magstep3 | ||
| 1713 | \font\titlesy=cmsy10 scaled \magstep4 | ||
| 1714 | \def\authorrm{\secrm} | ||
| 1715 | \def\authortt{\sectt} | ||
| 1716 | |||
| 1717 | % Chapter fonts (14.4pt). | ||
| 1718 | \def\chapnominalsize{14pt} | ||
| 1719 | \setfont\chaprm\rmbshape{12}{\magstep1} | ||
| 1720 | \setfont\chapit\itbshape{10}{\magstep2} | ||
| 1721 | \setfont\chapsl\slbshape{10}{\magstep2} | ||
| 1722 | \setfont\chaptt\ttbshape{12}{\magstep1} | ||
| 1723 | \setfont\chapttsl\ttslshape{10}{\magstep2} | ||
| 1724 | \setfont\chapsf\sfbshape{12}{\magstep1} | ||
| 1725 | \let\chapbf\chaprm | ||
| 1726 | \setfont\chapsc\scbshape{10}{\magstep2} | ||
| 1727 | \font\chapi=cmmi12 scaled \magstep1 | ||
| 1728 | \font\chapsy=cmsy10 scaled \magstep2 | ||
| 1729 | |||
| 1730 | % Section fonts (12pt). | ||
| 1731 | \def\secnominalsize{12pt} | ||
| 1732 | \setfont\secrm\rmbshape{12}{1000} | ||
| 1733 | \setfont\secit\itbshape{10}{\magstep1} | ||
| 1734 | \setfont\secsl\slbshape{10}{\magstep1} | ||
| 1735 | \setfont\sectt\ttbshape{12}{1000} | ||
| 1736 | \setfont\secttsl\ttslshape{10}{\magstep1} | ||
| 1737 | \setfont\secsf\sfbshape{12}{1000} | ||
| 1738 | \let\secbf\secrm | ||
| 1739 | \setfont\secsc\scbshape{10}{\magstep1} | ||
| 1740 | \font\seci=cmmi12 | ||
| 1741 | \font\secsy=cmsy10 scaled \magstep1 | ||
| 1742 | |||
| 1743 | % Subsection fonts (10pt). | ||
| 1744 | \def\ssecnominalsize{10pt} | ||
| 1745 | \setfont\ssecrm\rmbshape{10}{1000} | ||
| 1746 | \setfont\ssecit\itbshape{10}{1000} | ||
| 1747 | \setfont\ssecsl\slbshape{10}{1000} | ||
| 1748 | \setfont\ssectt\ttbshape{10}{1000} | ||
| 1749 | \setfont\ssecttsl\ttslshape{10}{1000} | ||
| 1750 | \setfont\ssecsf\sfbshape{10}{1000} | ||
| 1751 | \let\ssecbf\ssecrm | ||
| 1752 | \setfont\ssecsc\scbshape{10}{1000} | ||
| 1753 | \font\sseci=cmmi10 | ||
| 1754 | \font\ssecsy=cmsy10 | ||
| 1755 | |||
| 1756 | % Reduced fonts for @acro in text (9pt). | ||
| 1757 | \def\reducednominalsize{9pt} | ||
| 1758 | \setfont\reducedrm\rmshape{9}{1000} | ||
| 1759 | \setfont\reducedtt\ttshape{9}{1000} | ||
| 1760 | \setfont\reducedbf\bfshape{10}{900} | ||
| 1761 | \setfont\reducedit\itshape{9}{1000} | ||
| 1762 | \setfont\reducedsl\slshape{9}{1000} | ||
| 1763 | \setfont\reducedsf\sfshape{9}{1000} | ||
| 1764 | \setfont\reducedsc\scshape{10}{900} | ||
| 1765 | \setfont\reducedttsl\ttslshape{10}{900} | ||
| 1766 | \font\reducedi=cmmi9 | ||
| 1767 | \font\reducedsy=cmsy9 | ||
| 1768 | |||
| 1769 | % reduce space between paragraphs | ||
| 1770 | \divide\parskip by 2 | ||
| 1771 | |||
| 1772 | % reset the current fonts | ||
| 1773 | \textfonts | ||
| 1774 | \rm | ||
| 1775 | } % end of 10pt text font size definitions | ||
| 1776 | |||
| 1777 | |||
| 1778 | % We provide the user-level command | ||
| 1779 | % @fonttextsize 10 | ||
| 1780 | % (or 11) to redefine the text font size. pt is assumed. | ||
| 1781 | % | ||
| 1782 | \def\xword{10} | ||
| 1783 | \def\xiword{11} | ||
| 1784 | % | ||
| 1785 | \parseargdef\fonttextsize{% | ||
| 1786 | \def\textsizearg{#1}% | ||
| 1787 | \wlog{doing @fonttextsize \textsizearg}% | ||
| 1788 | % | ||
| 1789 | % Set \globaldefs so that documents can use this inside @tex, since | ||
| 1790 | % makeinfo 4.8 does not support it, but we need it nonetheless. | ||
| 1791 | % | ||
| 1792 | \begingroup \globaldefs=1 | ||
| 1793 | \ifx\textsizearg\xword \definetextfontsizex | ||
| 1794 | \else \ifx\textsizearg\xiword \definetextfontsizexi | ||
| 1795 | \else | ||
| 1796 | \errhelp=\EMsimple | ||
| 1797 | \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} | ||
| 1798 | \fi\fi | ||
| 1799 | \endgroup | ||
| 1800 | } | ||
| 1801 | |||
| 1802 | |||
| 1636 | % In order for the font changes to affect most math symbols and letters, | 1803 | % In order for the font changes to affect most math symbols and letters, |
| 1637 | % we have to define the \textfont of the standard families. Since | 1804 | % we have to define the \textfont of the standard families. Since |
| 1638 | % texinfo doesn't allow for producing subscripts and superscripts except | 1805 | % texinfo doesn't allow for producing subscripts and superscripts except |
| @@ -1743,7 +1910,7 @@ where each line of input produces a line of output.} | |||
| 1743 | 1910 | ||
| 1744 | % Set up the default fonts, so we can use them for creating boxes. | 1911 | % Set up the default fonts, so we can use them for creating boxes. |
| 1745 | % | 1912 | % |
| 1746 | \textfonts \rm | 1913 | \definetextfontsizexi |
| 1747 | 1914 | ||
| 1748 | % Define these so they can be easily changed for other fonts. | 1915 | % Define these so they can be easily changed for other fonts. |
| 1749 | \def\angleleft{$\langle$} | 1916 | \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. | |||
| 55 | If you need to edit pictures made out of text characters (commonly | 55 | If you need to edit pictures made out of text characters (commonly |
| 56 | referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter | 56 | referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter |
| 57 | Picture mode, a special major mode for editing such pictures. | 57 | Picture mode, a special major mode for editing such pictures. |
| 58 | @inforef{Picture Mode,, emacs-xtra}. | 58 | @iftex |
| 59 | @xref{Picture Mode,,, emacs-xtra, Specialized Emacs Features}. | ||
| 60 | @end iftex | ||
| 61 | @ifnottex | ||
| 62 | @xref{Picture Mode}. | ||
| 63 | @end ifnottex | ||
| 64 | |||
| 59 | 65 | ||
| 60 | @cindex skeletons | 66 | @cindex skeletons |
| 61 | @cindex templates | 67 | @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. | |||
| 1831 | @section Filename completion | 1831 | @section Filename completion |
| 1832 | @cindex filename completion | 1832 | @cindex filename completion |
| 1833 | 1833 | ||
| 1834 | Filename completion works with @value{tramp} for both completing methods, | 1834 | Filename completion works with @value{tramp} for completion of method |
| 1835 | user names and machine names (except multi hop methods) as well as for | 1835 | names, of user names and of machine names (except multi-hop methods) |
| 1836 | files on remote machines. | 1836 | as well as for completion of file names on remote machines. |
| 1837 | @ifset emacs | ||
| 1838 | In order to enable this, Partial Completion mode must be set on. | ||
| 1839 | @ifinfo | ||
| 1840 | @xref{Completion Options, , , @value{emacsdir}}. | ||
| 1841 | @end ifinfo | ||
| 1842 | @end ifset | ||
| 1837 | 1843 | ||
| 1838 | If you, for example, type @kbd{C-x C-f @value{prefix}t | 1844 | If you, for example, type @kbd{C-x C-f @value{prefix}t |
| 1839 | @key{TAB}}, @value{tramp} might give you as result the choice for | 1845 | @key{TAB}}, @value{tramp} might give you as result the choice for |
diff --git a/man/trouble.texi b/man/trouble.texi index f44862598c4..9e09dac4d43 100644 --- a/man/trouble.texi +++ b/man/trouble.texi | |||
| @@ -58,8 +58,14 @@ Search}). | |||
| 58 | like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to | 58 | like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to |
| 59 | recognize @kbd{C-g} while a command is running, between interactions | 59 | recognize @kbd{C-g} while a command is running, between interactions |
| 60 | with the user. By contrast, it @emph{is} feasible to recognize | 60 | with the user. By contrast, it @emph{is} feasible to recognize |
| 61 | @kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard,,,emacs-xtra, | 61 | @kbd{C-@key{BREAK}} at all times. |
| 62 | Specialized Emacs Features}. | 62 | @iftex |
| 63 | @xref{MS-DOS Keyboard,,,emacs-xtra, Specialized Emacs Features}. | ||
| 64 | @end iftex | ||
| 65 | @ifnottex | ||
| 66 | @xref{MS-DOS Keyboard}. | ||
| 67 | @end ifnottex | ||
| 68 | |||
| 63 | 69 | ||
| 64 | @findex keyboard-quit | 70 | @findex keyboard-quit |
| 65 | @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} | 71 | @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} |
| @@ -381,9 +387,9 @@ subsequent @kbd{C-g} invokes emergency escape again. | |||
| 381 | answer @kbd{n} to both questions, and you will get back to the former | 387 | answer @kbd{n} to both questions, and you will get back to the former |
| 382 | state. The quit you requested will happen by and by. | 388 | state. The quit you requested will happen by and by. |
| 383 | 389 | ||
| 384 | Emergency escape is active only for text terminals. On a graphical | 390 | Emergency escape is active only for text terminals. On graphical |
| 385 | display that supports multiple windows, you can use the window manager | 391 | displays, you can use the mouse to kill Emacs or switch to another |
| 386 | to kill Emacs, or to switch to some other program. | 392 | program. |
| 387 | 393 | ||
| 388 | On MS-DOS, you must type @kbd{C-@key{BREAK}} (twice) to cause | 394 | On MS-DOS, you must type @kbd{C-@key{BREAK}} (twice) to cause |
| 389 | emergency escape---but there are cases where it won't work, when | 395 | emergency escape---but there are cases where it won't work, when |
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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included in emacs-xtra.texi when producing the printed | ||
| 6 | @c version. | ||
| 7 | @iftex | ||
| 8 | @node Advanced VC Usage | ||
| 9 | @section Advanced VC Usage | ||
| 10 | |||
| 11 | Commonly used features of Emacs' version control (VC) support are | ||
| 12 | described in the main Emacs manual (@pxref{Version Control,,,emacs, | ||
| 13 | the Emacs Manual}). This chapter describes more advanced VC usage. | ||
| 14 | |||
| 15 | @menu | ||
| 16 | * VC Dired Mode:: Listing files managed by version control. | ||
| 17 | * VC Dired Commands:: Commands to use in a VC Dired buffer. | ||
| 18 | * Remote Repositories:: Efficient access to remote CVS servers. | ||
| 19 | * Snapshots:: Sets of file versions treated as a unit. | ||
| 20 | * Miscellaneous VC:: Various other commands and features of VC. | ||
| 21 | * Customizing VC:: Variables that change VC's behavior. | ||
| 22 | @end menu | ||
| 23 | @end iftex | ||
| 24 | |||
| 25 | @iftex | ||
| 26 | @include vc1-xtra.texi | ||
| 27 | @include vc2-xtra.texi | ||
| 28 | @end iftex | ||
| 29 | |||
| 30 | @ignore | ||
| 31 | arch-tag: 11a18d0e-1baf-49da-8e38-f61195ae4dc3 | ||
| 32 | @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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in vc-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node VC Dired Mode | ||
| 8 | @subsection Dired under VC | ||
| 9 | |||
| 10 | @cindex PCL-CVS | ||
| 11 | @pindex cvs | ||
| 12 | @cindex CVS Dired Mode | ||
| 13 | The VC Dired Mode described here works with all the version control | ||
| 14 | systems that VC supports. Another more powerful facility, designed | ||
| 15 | specifically for CVS, is called PCL-CVS. @xref{Top, , About PCL-CVS, | ||
| 16 | pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}. | ||
| 17 | |||
| 18 | @kindex C-x v d | ||
| 19 | @findex vc-directory | ||
| 20 | When you are working on a large program, it is often useful to find | ||
| 21 | out which files have changed within an entire directory tree, or to view | ||
| 22 | the status of all files under version control at once, and to perform | ||
| 23 | version control operations on collections of files. You can use the | ||
| 24 | command @kbd{C-x v d} (@code{vc-directory}) to make a directory listing | ||
| 25 | that includes only files relevant for version control. | ||
| 26 | |||
| 27 | @vindex vc-dired-terse-display | ||
| 28 | @kbd{C-x v d} creates a buffer which uses VC Dired Mode. This looks | ||
| 29 | much like an ordinary Dired buffer | ||
| 30 | @iftex | ||
| 31 | (@pxref{Dired,,,emacs, the Emacs Manual}); | ||
| 32 | @end iftex | ||
| 33 | @ifnottex | ||
| 34 | (@pxref{Dired}); | ||
| 35 | @end ifnottex | ||
| 36 | however, normally it shows only the noteworthy files (those locked or | ||
| 37 | not up-to-date). This is called @dfn{terse display}. If you set the | ||
| 38 | variable @code{vc-dired-terse-display} to @code{nil}, then VC Dired | ||
| 39 | shows all relevant files---those managed under version control, plus | ||
| 40 | all subdirectories (@dfn{full display}). The command @kbd{v t} in a | ||
| 41 | VC Dired buffer toggles between terse display and full display | ||
| 42 | (@pxref{VC Dired Commands}). | ||
| 43 | |||
| 44 | @vindex vc-dired-recurse | ||
| 45 | By default, VC Dired produces a recursive listing of noteworthy or | ||
| 46 | relevant files at or below the given directory. You can change this by | ||
| 47 | setting the variable @code{vc-dired-recurse} to @code{nil}; then VC | ||
| 48 | Dired shows only the files in the given directory. | ||
| 49 | |||
| 50 | The line for an individual file shows the version control state in the | ||
| 51 | place of the hard link count, owner, group, and size of the file. If | ||
| 52 | the file is unmodified, in sync with the master file, the version | ||
| 53 | control state shown is blank. Otherwise it consists of text in | ||
| 54 | parentheses. Under RCS and SCCS, the name of the user locking the file | ||
| 55 | is shown; under CVS, an abbreviated version of the @samp{cvs status} | ||
| 56 | output is used. Here is an example using RCS: | ||
| 57 | |||
| 58 | @smallexample | ||
| 59 | @group | ||
| 60 | /home/jim/project: | ||
| 61 | |||
| 62 | -rw-r--r-- (jim) Apr 2 23:39 file1 | ||
| 63 | -r--r--r-- Apr 5 20:21 file2 | ||
| 64 | @end group | ||
| 65 | @end smallexample | ||
| 66 | |||
| 67 | @noindent | ||
| 68 | The files @samp{file1} and @samp{file2} are under version control, | ||
| 69 | @samp{file1} is locked by user jim, and @samp{file2} is unlocked. | ||
| 70 | |||
| 71 | Here is an example using CVS: | ||
| 72 | |||
| 73 | @smallexample | ||
| 74 | @group | ||
| 75 | /home/joe/develop: | ||
| 76 | |||
| 77 | -rw-r--r-- (modified) Aug 2 1997 file1.c | ||
| 78 | -rw-r--r-- Apr 4 20:09 file2.c | ||
| 79 | -rw-r--r-- (merge) Sep 13 1996 file3.c | ||
| 80 | @end group | ||
| 81 | @end smallexample | ||
| 82 | |||
| 83 | Here @samp{file1.c} is modified with respect to the repository, and | ||
| 84 | @samp{file2.c} is not. @samp{file3.c} is modified, but other changes | ||
| 85 | have also been checked in to the repository---you need to merge them | ||
| 86 | with the work file before you can check it in. | ||
| 87 | |||
| 88 | @vindex vc-stay-local | ||
| 89 | @vindex vc-cvs-stay-local | ||
| 90 | In the above, if the repository were on a remote machine, VC would | ||
| 91 | only contact it when the variable @code{vc-stay-local} (or | ||
| 92 | @code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is | ||
| 93 | because access to the repository may be slow, or you may be working | ||
| 94 | offline and not have access to the repository at all. As a | ||
| 95 | consequence, VC would not be able to tell you that @samp{file3.c} is | ||
| 96 | in the ``merge'' state; you would learn that only when you try to | ||
| 97 | check-in your modified copy of the file, or use a command such as | ||
| 98 | @kbd{C-x v m}. | ||
| 99 | |||
| 100 | In practice, this is not a problem because CVS handles this case | ||
| 101 | consistently whenever it arises. In VC, you'll simply get prompted to | ||
| 102 | merge the remote changes into your work file first. The benefits of | ||
| 103 | less network communication usually outweigh the disadvantage of not | ||
| 104 | seeing remote changes immediately. | ||
| 105 | |||
| 106 | @vindex vc-directory-exclusion-list | ||
| 107 | When VC Dired displays subdirectories (in the ``full'' display mode), | ||
| 108 | it omits some that should never contain any files under version control. | ||
| 109 | By default, this includes Version Control subdirectories such as | ||
| 110 | @samp{RCS} and @samp{CVS}; you can customize this by setting the | ||
| 111 | variable @code{vc-directory-exclusion-list}. | ||
| 112 | |||
| 113 | You can fine-tune VC Dired's format by typing @kbd{C-u C-x v d}---as in | ||
| 114 | ordinary Dired, that allows you to specify additional switches for the | ||
| 115 | @samp{ls} command. | ||
| 116 | |||
| 117 | @node VC Dired Commands | ||
| 118 | @subsection VC Dired Commands | ||
| 119 | |||
| 120 | All the usual Dired commands work normally in VC Dired mode, except | ||
| 121 | for @kbd{v}, which is redefined as the version control prefix. You can | ||
| 122 | invoke VC commands such as @code{vc-diff} and @code{vc-print-log} by | ||
| 123 | typing @kbd{v =}, or @kbd{v l}, and so on. Most of these commands apply | ||
| 124 | to the file name on the current line. | ||
| 125 | |||
| 126 | The command @kbd{v v} (@code{vc-next-action}) operates on all the | ||
| 127 | marked files, so that you can lock or check in several files at once. | ||
| 128 | If it operates on more than one file, it handles each file according to | ||
| 129 | its current state; thus, it might lock one file, but check in another | ||
| 130 | file. This could be confusing; it is up to you to avoid confusing | ||
| 131 | behavior by marking a set of files that are in a similar state. If no | ||
| 132 | files are marked, @kbd{v v} operates on the file in the current line. | ||
| 133 | |||
| 134 | If any files call for check-in, @kbd{v v} reads a single log entry, | ||
| 135 | then uses it for all the files being checked in. This is convenient for | ||
| 136 | registering or checking in several files at once, as part of the same | ||
| 137 | change. | ||
| 138 | |||
| 139 | @findex vc-dired-toggle-terse-mode | ||
| 140 | @findex vc-dired-mark-locked | ||
| 141 | You can toggle between terse display (only locked files, or files not | ||
| 142 | up-to-date) and full display at any time by typing @kbd{v t} | ||
| 143 | (@code{vc-dired-toggle-terse-mode}). There is also a special command | ||
| 144 | @kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently | ||
| 145 | locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l | ||
| 146 | t k} is another way to delete from the buffer all files except those | ||
| 147 | currently locked. | ||
| 148 | |||
| 149 | @ignore | ||
| 150 | arch-tag: 8e8c2a01-ad41-4e61-a89a-60131ad67263 | ||
| 151 | @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 @@ | |||
| 1 | @c This is part of the Emacs manual. | ||
| 2 | @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | ||
| 4 | @c | ||
| 5 | @c This file is included either in vc-xtra.texi (when producing the | ||
| 6 | @c printed version) or in the main Emacs manual (for the on-line version). | ||
| 7 | @node Remote Repositories | ||
| 8 | @subsection Remote Repositories | ||
| 9 | @cindex remote repositories (CVS) | ||
| 10 | |||
| 11 | A common way of using CVS is to set up a central CVS repository on | ||
| 12 | some Internet host, then have each developer check out a personal | ||
| 13 | working copy of the files on his local machine. Committing changes to | ||
| 14 | the repository, and picking up changes from other users into one's own | ||
| 15 | working area, then works by direct interactions with the CVS server. | ||
| 16 | |||
| 17 | One difficulty is that access to the CVS server is often slow, and | ||
| 18 | that developers might need to work off-line as well. VC is designed | ||
| 19 | to reduce the amount of network interaction necessary. | ||
| 20 | |||
| 21 | @menu | ||
| 22 | * Version Backups:: Keeping local copies of repository versions. | ||
| 23 | * Local Version Control:: Using another version system for local editing. | ||
| 24 | @end menu | ||
| 25 | |||
| 26 | @node Version Backups | ||
| 27 | @subsubsection Version Backups | ||
| 28 | @cindex version backups | ||
| 29 | |||
| 30 | @cindex automatic version backups | ||
| 31 | When VC sees that the CVS repository for a file is on a remote | ||
| 32 | machine, it automatically makes local backups of unmodified versions | ||
| 33 | of the file---@dfn{automatic version backups}. This means that you | ||
| 34 | can compare the file to the repository version (@kbd{C-x v =}), or | ||
| 35 | revert to that version (@kbd{C-x v u}), without any network | ||
| 36 | interactions. | ||
| 37 | |||
| 38 | The local copy of the unmodified file is called a @dfn{version | ||
| 39 | backup} to indicate that it corresponds exactly to a version that is | ||
| 40 | stored in the repository. Note that version backups are not the same | ||
| 41 | as ordinary Emacs backup files | ||
| 42 | @iftex | ||
| 43 | (@pxref{Backup,,,emacs, the Emacs Manual}). | ||
| 44 | @end iftex | ||
| 45 | @ifnottex | ||
| 46 | (@pxref{Backup}). | ||
| 47 | @end ifnottex | ||
| 48 | But they follow a similar naming convention. | ||
| 49 | |||
| 50 | For a file that comes from a remote CVS repository, VC makes a | ||
| 51 | version backup whenever you save the first changes to the file, and | ||
| 52 | removes it after you have committed your modified version to the | ||
| 53 | repository. You can disable the making of automatic version backups by | ||
| 54 | setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}). | ||
| 55 | |||
| 56 | @cindex manual version backups | ||
| 57 | The name of the automatic version backup for version @var{version} | ||
| 58 | of file @var{file} is @code{@var{file}.~@var{version}.~}. This is | ||
| 59 | almost the same as the name used by @kbd{C-x v ~} | ||
| 60 | @iftex | ||
| 61 | (@pxref{Old Versions,,,emacs, the Emacs Manual}), | ||
| 62 | @end iftex | ||
| 63 | @ifnottex | ||
| 64 | (@pxref{Old Versions}), | ||
| 65 | @end ifnottex | ||
| 66 | the only difference being the additional dot (@samp{.}) after the | ||
| 67 | version number. This similarity is intentional, because both kinds of | ||
| 68 | files store the same kind of information. The file made by @kbd{C-x v | ||
| 69 | ~} acts as a @dfn{manual version backup}. | ||
| 70 | |||
| 71 | All the VC commands that operate on old versions of a file can use | ||
| 72 | both kinds of version backups. For instance, @kbd{C-x v ~} uses | ||
| 73 | either an automatic or a manual version backup, if possible, to get | ||
| 74 | the contents of the version you request. Likewise, @kbd{C-x v =} and | ||
| 75 | @kbd{C-x v u} use either an automatic or a manual version backup, if | ||
| 76 | one of them exists, to get the contents of a version to compare or | ||
| 77 | revert to. If you changed a file outside of Emacs, so that no | ||
| 78 | automatic version backup was created for the previous text, you can | ||
| 79 | create a manual backup of that version using @kbd{C-x v ~}, and thus | ||
| 80 | obtain the benefit of the local copy for Emacs commands. | ||
| 81 | |||
| 82 | The only difference in Emacs's handling of manual and automatic | ||
| 83 | version backups, once they exist, is that Emacs deletes automatic | ||
| 84 | version backups when you commit to the repository. By contrast, | ||
| 85 | manual version backups remain until you delete them. | ||
| 86 | |||
| 87 | @node Local Version Control | ||
| 88 | @subsubsection Local Version Control | ||
| 89 | @cindex local version control | ||
| 90 | @cindex local back end (version control) | ||
| 91 | |||
| 92 | When you make many changes to a file that comes from a remote | ||
| 93 | repository, it can be convenient to have version control on your local | ||
| 94 | machine as well. You can then record intermediate versions, revert to | ||
| 95 | a previous state, etc., before you actually commit your changes to the | ||
| 96 | remote server. | ||
| 97 | |||
| 98 | VC lets you do this by putting a file under a second, local version | ||
| 99 | control system, so that the file is effectively registered in two | ||
| 100 | systems at the same time. For the description here, we will assume | ||
| 101 | that the remote system is CVS, and you use RCS locally, although the | ||
| 102 | mechanism works with any combination of version control systems | ||
| 103 | (@dfn{back ends}). | ||
| 104 | |||
| 105 | To make it work with other back ends, you must make sure that the | ||
| 106 | ``more local'' back end comes before the ``more remote'' back end in | ||
| 107 | the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By | ||
| 108 | default, this variable is set up so that you can use remote CVS and | ||
| 109 | local RCS as described here. | ||
| 110 | |||
| 111 | To start using local RCS for a file that comes from a remote CVS | ||
| 112 | server, you must @emph{register the file in RCS}, by typing @kbd{C-u | ||
| 113 | C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a | ||
| 114 | prefix argument, and specify RCS as the back end.) | ||
| 115 | |||
| 116 | You can do this at any time; it does not matter whether you have | ||
| 117 | already modified the file with respect to the version in the CVS | ||
| 118 | repository. If possible, VC tries to make the RCS master start with | ||
| 119 | the unmodified repository version, then checks in any local changes | ||
| 120 | as a new version. This works if you have not made any changes yet, or | ||
| 121 | if the unmodified repository version exists locally as a version | ||
| 122 | backup (@pxref{Version Backups}). If the unmodified version is not | ||
| 123 | available locally, the RCS master starts with the modified version; | ||
| 124 | the only drawback to this is that you cannot compare your changes | ||
| 125 | locally to what is stored in the repository. | ||
| 126 | |||
| 127 | The version number of the RCS master is derived from the current CVS | ||
| 128 | version, starting a branch from it. For example, if the current CVS | ||
| 129 | version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in | ||
| 130 | the RCS master will be identical to version 1.23 under CVS; your first | ||
| 131 | changes are checked in as 1.23.1.1. (If the unmodified file is not | ||
| 132 | available locally, VC will check in the modified file twice, both as | ||
| 133 | 1.23 and 1.23.1.1, to make the revision numbers consistent.) | ||
| 134 | |||
| 135 | If you do not use locking under CVS (the default), locking is also | ||
| 136 | disabled for RCS, so that editing under RCS works exactly as under | ||
| 137 | CVS. | ||
| 138 | |||
| 139 | When you are done with local editing, you can commit the final version | ||
| 140 | back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}. | ||
| 141 | This initializes the log entry buffer | ||
| 142 | @iftex | ||
| 143 | (@pxref{Log Buffer,,,emacs, the Emacs Manual}) | ||
| 144 | @end iftex | ||
| 145 | @ifnottex | ||
| 146 | (@pxref{Log Buffer}) | ||
| 147 | @end ifnottex | ||
| 148 | to contain all the log entries you have recorded in the RCS master; | ||
| 149 | you can edit them as you wish, and then commit in CVS by typing | ||
| 150 | @kbd{C-c C-c}. If the commit is successful, VC removes the RCS | ||
| 151 | master, so that the file is once again registered under CVS only. | ||
| 152 | (The RCS master is not actually deleted, just renamed by appending | ||
| 153 | @samp{~} to the name, so that you can refer to it later if you wish.) | ||
| 154 | |||
| 155 | While using local RCS, you can pick up recent changes from the CVS | ||
| 156 | repository into your local file, or commit some of your changes back | ||
| 157 | to CVS, without terminating local RCS version control. To do this, | ||
| 158 | switch to the CVS back end temporarily, with the @kbd{C-x v b} command: | ||
| 159 | |||
| 160 | @table @kbd | ||
| 161 | @item C-x v b | ||
| 162 | Switch to another back end that the current file is registered | ||
| 163 | under (@code{vc-switch-backend}). | ||
| 164 | |||
| 165 | @item C-u C-x v b @var{backend} @key{RET} | ||
| 166 | Switch to @var{backend} for the current file. | ||
| 167 | @end table | ||
| 168 | |||
| 169 | @kindex C-x v b | ||
| 170 | @findex vc-switch-backend | ||
| 171 | @kbd{C-x v b} does not change the buffer contents, or any files; it | ||
| 172 | only changes VC's perspective on how to handle the file. Any | ||
| 173 | subsequent VC commands for that file will operate on the back end that | ||
| 174 | is currently selected. | ||
| 175 | |||
| 176 | If the current file is registered in more than one back end, typing | ||
| 177 | @kbd{C-x v b} ``cycles'' through all of these back ends. With a | ||
| 178 | prefix argument, it asks for the back end to use in the minibuffer. | ||
| 179 | |||
| 180 | Thus, if you are using local RCS, and you want to pick up some recent | ||
| 181 | changes in the file from remote CVS, first visit the file, then type | ||
| 182 | @kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m | ||
| 183 | @key{RET}} to merge the news | ||
| 184 | @iftex | ||
| 185 | (@pxref{Merging,,,emacs, the Emacs Manual}). | ||
| 186 | @end iftex | ||
| 187 | @ifnottex | ||
| 188 | (@pxref{Merging}). | ||
| 189 | @end ifnottex | ||
| 190 | You can then switch back to RCS by typing @kbd{C-x v b} again, and | ||
| 191 | continue to edit locally. | ||
| 192 | |||
| 193 | But if you do this, the revision numbers in the RCS master no longer | ||
| 194 | correspond to those of CVS. Technically, this is not a problem, but | ||
| 195 | it can become difficult to keep track of what is in the CVS repository | ||
| 196 | and what is not. So we suggest that you return from time to time to | ||
| 197 | CVS-only operation, by committing your local changes back to the | ||
| 198 | repository using @kbd{C-u C-x v v cvs @key{RET}}. | ||
| 199 | |||
| 200 | @node Snapshots | ||
| 201 | @subsection Snapshots | ||
| 202 | @cindex snapshots and version control | ||
| 203 | |||
| 204 | A @dfn{snapshot} is a named set of file versions (one for each | ||
| 205 | registered file) that you can treat as a unit. One important kind of | ||
| 206 | snapshot is a @dfn{release}, a (theoretically) stable version of the | ||
| 207 | system that is ready for distribution to users. | ||
| 208 | |||
| 209 | @menu | ||
| 210 | * Making Snapshots:: The snapshot facilities. | ||
| 211 | * Snapshot Caveats:: Things to be careful of when using snapshots. | ||
| 212 | @end menu | ||
| 213 | |||
| 214 | @node Making Snapshots | ||
| 215 | @subsubsection Making and Using Snapshots | ||
| 216 | |||
| 217 | There are two basic commands for snapshots; one makes a | ||
| 218 | snapshot with a given name, the other retrieves a named snapshot. | ||
| 219 | |||
| 220 | @table @code | ||
| 221 | @kindex C-x v s | ||
| 222 | @findex vc-create-snapshot | ||
| 223 | @item C-x v s @var{name} @key{RET} | ||
| 224 | Define the last saved versions of every registered file in or under the | ||
| 225 | current directory as a snapshot named @var{name} | ||
| 226 | (@code{vc-create-snapshot}). | ||
| 227 | |||
| 228 | @kindex C-x v r | ||
| 229 | @findex vc-retrieve-snapshot | ||
| 230 | @item C-x v r @var{name} @key{RET} | ||
| 231 | For all registered files at or below the current directory level, select | ||
| 232 | whatever versions correspond to the snapshot @var{name} | ||
| 233 | (@code{vc-retrieve-snapshot}). | ||
| 234 | |||
| 235 | This command reports an error if any files are locked at or below the | ||
| 236 | current directory, without changing anything; this is to avoid | ||
| 237 | overwriting work in progress. | ||
| 238 | @end table | ||
| 239 | |||
| 240 | A snapshot uses a very small amount of resources---just enough to record | ||
| 241 | the list of file names and which version belongs to the snapshot. Thus, | ||
| 242 | you need not hesitate to create snapshots whenever they are useful. | ||
| 243 | |||
| 244 | You can give a snapshot name as an argument to @kbd{C-x v =} or | ||
| 245 | @kbd{C-x v ~} | ||
| 246 | @iftex | ||
| 247 | (@pxref{Old Versions,,,emacs, the Emacs Manual}). | ||
| 248 | @end iftex | ||
| 249 | @ifnottex | ||
| 250 | (@pxref{Old Versions}). | ||
| 251 | @end ifnottex | ||
| 252 | Thus, you can use it to compare a snapshot against the current files, | ||
| 253 | or two snapshots against each other, or a snapshot against a named | ||
| 254 | version. | ||
| 255 | |||
| 256 | @node Snapshot Caveats | ||
| 257 | @subsubsection Snapshot Caveats | ||
| 258 | |||
| 259 | @cindex named configurations (RCS) | ||
| 260 | VC's snapshot facilities are modeled on RCS's named-configuration | ||
| 261 | support. They use RCS's native facilities for this, so | ||
| 262 | snapshots made using RCS through VC are visible even when you bypass VC. | ||
| 263 | |||
| 264 | With CVS, Meta-CVS, and Subversion, VC also uses the native | ||
| 265 | mechanism provided by that back end to make snapshots and retrieve them | ||
| 266 | (@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion). | ||
| 267 | |||
| 268 | @c worded verbosely to avoid overfull hbox. | ||
| 269 | For SCCS, VC implements snapshots itself. The files it uses contain | ||
| 270 | name/file/version-number triples. These snapshots are visible only | ||
| 271 | through VC. | ||
| 272 | |||
| 273 | There is no support for VC snapshots using GNU Arch yet. | ||
| 274 | |||
| 275 | A snapshot is a set of checked-in versions. So make sure that all the | ||
| 276 | files are checked in and not locked when you make a snapshot. | ||
| 277 | |||
| 278 | File renaming and deletion can create some difficulties with snapshots. | ||
| 279 | This is not a VC-specific problem, but a general design issue in version | ||
| 280 | control systems that no one has solved very well yet. | ||
| 281 | |||
| 282 | If you rename a registered file, you need to rename its master along | ||
| 283 | with it (the command @code{vc-rename-file} does this automatically). If | ||
| 284 | you are using SCCS, you must also update the records of the snapshot, to | ||
| 285 | mention the file by its new name (@code{vc-rename-file} does this, | ||
| 286 | too). An old snapshot that refers to a master file that no longer | ||
| 287 | exists under the recorded name is invalid; VC can no longer retrieve | ||
| 288 | it. It would be beyond the scope of this manual to explain enough about | ||
| 289 | RCS and SCCS to explain how to update the snapshots by hand. | ||
| 290 | |||
| 291 | Using @code{vc-rename-file} makes the snapshot remain valid for | ||
| 292 | retrieval, but it does not solve all problems. For example, some of the | ||
| 293 | files in your program probably refer to others by name. At the very | ||
| 294 | least, the makefile probably mentions the file that you renamed. If you | ||
| 295 | retrieve an old snapshot, the renamed file is retrieved under its new | ||
| 296 | name, which is not the name that the makefile expects. So the program | ||
| 297 | won't really work as retrieved. | ||
| 298 | |||
| 299 | @node Miscellaneous VC | ||
| 300 | @subsection Miscellaneous Commands and Features of VC | ||
| 301 | |||
| 302 | This section explains the less-frequently-used features of VC. | ||
| 303 | |||
| 304 | @menu | ||
| 305 | * Change Logs and VC:: Generating a change log file from log entries. | ||
| 306 | * Renaming and VC:: A command to rename both the source and master | ||
| 307 | file correctly. | ||
| 308 | * Version Headers:: Inserting version control headers into working files. | ||
| 309 | @end menu | ||
| 310 | |||
| 311 | @node Change Logs and VC | ||
| 312 | @subsubsection Change Logs and VC | ||
| 313 | |||
| 314 | If you use RCS or CVS for a program and also maintain a change log | ||
| 315 | file for it | ||
| 316 | @iftex | ||
| 317 | (@pxref{Change Log,,,emacs, the Emacs Manual}), | ||
| 318 | @end iftex | ||
| 319 | @ifnottex | ||
| 320 | (@pxref{Change Log}), | ||
| 321 | @end ifnottex | ||
| 322 | you can generate change log entries automatically from the version | ||
| 323 | control log entries: | ||
| 324 | |||
| 325 | @table @kbd | ||
| 326 | @item C-x v a | ||
| 327 | @kindex C-x v a | ||
| 328 | @findex vc-update-change-log | ||
| 329 | Visit the current directory's change log file and, for registered files | ||
| 330 | in that directory, create new entries for versions checked in since the | ||
| 331 | most recent entry in the change log file. | ||
| 332 | (@code{vc-update-change-log}). | ||
| 333 | |||
| 334 | This command works with RCS or CVS only, not with any of the other | ||
| 335 | back ends. | ||
| 336 | |||
| 337 | @item C-u C-x v a | ||
| 338 | As above, but only find entries for the current buffer's file. | ||
| 339 | |||
| 340 | @item M-1 C-x v a | ||
| 341 | As above, but find entries for all the currently visited files that are | ||
| 342 | maintained with version control. This works only with RCS, and it puts | ||
| 343 | all entries in the log for the default directory, which may not be | ||
| 344 | appropriate. | ||
| 345 | @end table | ||
| 346 | |||
| 347 | For example, suppose the first line of @file{ChangeLog} is dated | ||
| 348 | 1999-04-10, and that the only check-in since then was by Nathaniel | ||
| 349 | Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log | ||
| 350 | messages that start with `#'.}. Then @kbd{C-x v a} visits | ||
| 351 | @file{ChangeLog} and inserts text like this: | ||
| 352 | |||
| 353 | @iftex | ||
| 354 | @medbreak | ||
| 355 | @end iftex | ||
| 356 | @smallexample | ||
| 357 | @group | ||
| 358 | 1999-05-22 Nathaniel Bowditch <nat@@apn.org> | ||
| 359 | |||
| 360 | * rcs2log: Ignore log messages that start with `#'. | ||
| 361 | @end group | ||
| 362 | @end smallexample | ||
| 363 | @iftex | ||
| 364 | @medbreak | ||
| 365 | @end iftex | ||
| 366 | |||
| 367 | @noindent | ||
| 368 | You can then edit the new change log entry further as you wish. | ||
| 369 | |||
| 370 | Some of the new change log entries may duplicate what's already in | ||
| 371 | ChangeLog. You will have to remove these duplicates by hand. | ||
| 372 | |||
| 373 | Normally, the log entry for file @file{foo} is displayed as @samp{* | ||
| 374 | foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted | ||
| 375 | if the text of the log entry starts with @w{@samp{(@var{functionname}): | ||
| 376 | }}. For example, if the log entry for @file{vc.el} is | ||
| 377 | @samp{(vc-do-command): Check call-process status.}, then the text in | ||
| 378 | @file{ChangeLog} looks like this: | ||
| 379 | |||
| 380 | @iftex | ||
| 381 | @medbreak | ||
| 382 | @end iftex | ||
| 383 | @smallexample | ||
| 384 | @group | ||
| 385 | 1999-05-06 Nathaniel Bowditch <nat@@apn.org> | ||
| 386 | |||
| 387 | * vc.el (vc-do-command): Check call-process status. | ||
| 388 | @end group | ||
| 389 | @end smallexample | ||
| 390 | @iftex | ||
| 391 | @medbreak | ||
| 392 | @end iftex | ||
| 393 | |||
| 394 | When @kbd{C-x v a} adds several change log entries at once, it groups | ||
| 395 | related log entries together if they all are checked in by the same | ||
| 396 | author at nearly the same time. If the log entries for several such | ||
| 397 | files all have the same text, it coalesces them into a single entry. | ||
| 398 | For example, suppose the most recent check-ins have the following log | ||
| 399 | entries: | ||
| 400 | |||
| 401 | @flushleft | ||
| 402 | @bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.} | ||
| 403 | @bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.} | ||
| 404 | @bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.} | ||
| 405 | @end flushleft | ||
| 406 | |||
| 407 | @noindent | ||
| 408 | They appear like this in @file{ChangeLog}: | ||
| 409 | |||
| 410 | @iftex | ||
| 411 | @medbreak | ||
| 412 | @end iftex | ||
| 413 | @smallexample | ||
| 414 | @group | ||
| 415 | 1999-04-01 Nathaniel Bowditch <nat@@apn.org> | ||
| 416 | |||
| 417 | * vc.texinfo: Fix expansion typos. | ||
| 418 | |||
| 419 | * vc.el, vc-hooks.el: Don't call expand-file-name. | ||
| 420 | @end group | ||
| 421 | @end smallexample | ||
| 422 | @iftex | ||
| 423 | @medbreak | ||
| 424 | @end iftex | ||
| 425 | |||
| 426 | Normally, @kbd{C-x v a} separates log entries by a blank line, but you | ||
| 427 | can mark several related log entries to be clumped together (without an | ||
| 428 | intervening blank line) by starting the text of each related log entry | ||
| 429 | with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label | ||
| 430 | itself is not copied to @file{ChangeLog}. For example, suppose the log | ||
| 431 | entries are: | ||
| 432 | |||
| 433 | @flushleft | ||
| 434 | @bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.} | ||
| 435 | @bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.} | ||
| 436 | @bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.} | ||
| 437 | @end flushleft | ||
| 438 | |||
| 439 | @noindent | ||
| 440 | Then the text in @file{ChangeLog} looks like this: | ||
| 441 | |||
| 442 | @iftex | ||
| 443 | @medbreak | ||
| 444 | @end iftex | ||
| 445 | @smallexample | ||
| 446 | @group | ||
| 447 | 1999-04-01 Nathaniel Bowditch <nat@@apn.org> | ||
| 448 | |||
| 449 | * vc.texinfo: Fix expansion typos. | ||
| 450 | * vc.el, vc-hooks.el: Don't call expand-file-name. | ||
| 451 | @end group | ||
| 452 | @end smallexample | ||
| 453 | @iftex | ||
| 454 | @medbreak | ||
| 455 | @end iftex | ||
| 456 | |||
| 457 | A log entry whose text begins with @samp{#} is not copied to | ||
| 458 | @file{ChangeLog}. For example, if you merely fix some misspellings in | ||
| 459 | comments, you can log the change with an entry beginning with @samp{#} | ||
| 460 | to avoid putting such trivia into @file{ChangeLog}. | ||
| 461 | |||
| 462 | @node Renaming and VC | ||
| 463 | @subsubsection Renaming VC Work Files and Master Files | ||
| 464 | |||
| 465 | @findex vc-rename-file | ||
| 466 | When you rename a registered file, you must also rename its master | ||
| 467 | file correspondingly to get proper results. Use @code{vc-rename-file} | ||
| 468 | to rename the source file as you specify, and rename its master file | ||
| 469 | accordingly. It also updates any snapshots (@pxref{Snapshots}) that | ||
| 470 | mention the file, so that they use the new name; despite this, the | ||
| 471 | snapshot thus modified may not completely work (@pxref{Snapshot | ||
| 472 | Caveats}). | ||
| 473 | |||
| 474 | Some back ends do not provide an explicit rename operation to their | ||
| 475 | repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} | ||
| 476 | on the original and renamed buffers and provide the necessary edit | ||
| 477 | log. | ||
| 478 | |||
| 479 | You cannot use @code{vc-rename-file} on a file that is locked by | ||
| 480 | someone else. | ||
| 481 | |||
| 482 | @node Version Headers | ||
| 483 | @subsubsection Inserting Version Control Headers | ||
| 484 | |||
| 485 | Sometimes it is convenient to put version identification strings | ||
| 486 | directly into working files. Certain special strings called | ||
| 487 | @dfn{version headers} are replaced in each successive version by the | ||
| 488 | number of that version, the name of the user who created it, and other | ||
| 489 | relevant information. All of the back ends that VC supports have such | ||
| 490 | a mechanism, except GNU Arch. | ||
| 491 | |||
| 492 | VC does not normally use the information contained in these headers. | ||
| 493 | The exception is RCS---with RCS, version headers are sometimes more | ||
| 494 | reliable than the master file to determine which version of the file | ||
| 495 | you are editing. Note that in a multi-branch environment, version | ||
| 496 | headers are necessary to make VC behave correctly | ||
| 497 | @iftex | ||
| 498 | (@pxref{Multi-User Branching,,,emacs, the Emacs Manual}). | ||
| 499 | @end iftex | ||
| 500 | @ifnottex | ||
| 501 | (@pxref{Multi-User Branching}). | ||
| 502 | @end ifnottex | ||
| 503 | |||
| 504 | Searching for RCS version headers is controlled by the variable | ||
| 505 | @code{vc-consult-headers}. If it is non-@code{nil} (the default), | ||
| 506 | Emacs searches for headers to determine the version number you are | ||
| 507 | editing. Setting it to @code{nil} disables this feature. | ||
| 508 | |||
| 509 | Note that although CVS uses the same kind of version headers as RCS | ||
| 510 | does, VC never searches for these headers if you are using CVS, | ||
| 511 | regardless of the above setting. | ||
| 512 | |||
| 513 | @kindex C-x v h | ||
| 514 | @findex vc-insert-headers | ||
| 515 | You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to | ||
| 516 | insert a suitable header string. | ||
| 517 | |||
| 518 | @table @kbd | ||
| 519 | @item C-x v h | ||
| 520 | Insert headers in a file for use with your version-control system. | ||
| 521 | @end table | ||
| 522 | |||
| 523 | @vindex vc-@var{backend}-header | ||
| 524 | The default header string is @samp{@w{$}Id$} for RCS and | ||
| 525 | @samp{@w{%}W%} for SCCS. You can specify other headers to insert by | ||
| 526 | setting the variables @code{vc-@var{backend}-header} where | ||
| 527 | @var{backend} is @code{rcs} or @code{sccs}. | ||
| 528 | |||
| 529 | Instead of a single string, you can specify a list of strings; then | ||
| 530 | each string in the list is inserted as a separate header on a line of | ||
| 531 | its own. | ||
| 532 | |||
| 533 | It may be necessary to use apparently-superfluous backslashes when | ||
| 534 | writing the strings that you put in this variable. For instance, you | ||
| 535 | might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra | ||
| 536 | backslash prevents the string constant from being interpreted as a | ||
| 537 | header, if the Emacs Lisp file containing it is maintained with | ||
| 538 | version control. | ||
| 539 | |||
| 540 | @vindex vc-comment-alist | ||
| 541 | Each header is inserted surrounded by tabs, inside comment delimiters, | ||
| 542 | on a new line at point. Normally the ordinary comment | ||
| 543 | start and comment end strings of the current mode are used, but for | ||
| 544 | certain modes, there are special comment delimiters for this purpose; | ||
| 545 | the variable @code{vc-comment-alist} specifies them. Each element of | ||
| 546 | this list has the form @code{(@var{mode} @var{starter} @var{ender})}. | ||
| 547 | |||
| 548 | @vindex vc-static-header-alist | ||
| 549 | The variable @code{vc-static-header-alist} specifies further strings | ||
| 550 | to add based on the name of the buffer. Its value should be a list of | ||
| 551 | elements of the form @code{(@var{regexp} . @var{format})}. Whenever | ||
| 552 | @var{regexp} matches the buffer name, @var{format} is inserted as part | ||
| 553 | of the header. A header line is inserted for each element that matches | ||
| 554 | the buffer name, and for each string specified by | ||
| 555 | @code{vc-@var{backend}-header}. The header line is made by processing the | ||
| 556 | string from @code{vc-@var{backend}-header} with the format taken from the | ||
| 557 | element. The default value for @code{vc-static-header-alist} is as follows: | ||
| 558 | |||
| 559 | @example | ||
| 560 | @group | ||
| 561 | (("\\.c$" . | ||
| 562 | "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\ | ||
| 563 | #endif /* lint */\n")) | ||
| 564 | @end group | ||
| 565 | @end example | ||
| 566 | |||
| 567 | @noindent | ||
| 568 | It specifies insertion of text of this form: | ||
| 569 | |||
| 570 | @example | ||
| 571 | @group | ||
| 572 | |||
| 573 | #ifndef lint | ||
| 574 | static char vcid[] = "@var{string}"; | ||
| 575 | #endif /* lint */ | ||
| 576 | @end group | ||
| 577 | @end example | ||
| 578 | |||
| 579 | @noindent | ||
| 580 | Note that the text above starts with a blank line. | ||
| 581 | |||
| 582 | If you use more than one version header in a file, put them close | ||
| 583 | together in the file. The mechanism in @code{revert-buffer} that | ||
| 584 | preserves markers may not handle markers positioned between two version | ||
| 585 | headers. | ||
| 586 | |||
| 587 | @node Customizing VC | ||
| 588 | @subsection Customizing VC | ||
| 589 | |||
| 590 | @vindex vc-handled-backends | ||
| 591 | The variable @code{vc-handled-backends} determines which version | ||
| 592 | control systems VC should handle. The default value is @code{(RCS CVS | ||
| 593 | SVN SCCS Arch MCVS)}, so it contains all six version systems that are | ||
| 594 | currently supported. If you want VC to ignore one or more of these | ||
| 595 | systems, exclude its name from the list. To disable VC entirely, set | ||
| 596 | this variable to @code{nil}. | ||
| 597 | |||
| 598 | The order of systems in the list is significant: when you visit a file | ||
| 599 | registered in more than one system (@pxref{Local Version Control}), VC | ||
| 600 | uses the system that comes first in @code{vc-handled-backends} by | ||
| 601 | default. The order is also significant when you register a file for | ||
| 602 | the first time, see | ||
| 603 | @iftex | ||
| 604 | @ref{Registering,,,emacs, the Emacs Manual}, | ||
| 605 | @end iftex | ||
| 606 | @ifnottex | ||
| 607 | @ref{Registering}, | ||
| 608 | @end ifnottex | ||
| 609 | for details. | ||
| 610 | |||
| 611 | @menu | ||
| 612 | * General VC Options:: Options that apply to multiple back ends. | ||
| 613 | * RCS and SCCS:: Options for RCS and SCCS. | ||
| 614 | * CVS Options:: Options for CVS. | ||
| 615 | @end menu | ||
| 616 | |||
| 617 | @node General VC Options | ||
| 618 | @subsubsection General Options | ||
| 619 | |||
| 620 | @vindex vc-make-backup-files | ||
| 621 | Emacs normally does not save backup files for source files that are | ||
| 622 | maintained with version control. If you want to make backup files even | ||
| 623 | for files that use version control, set the variable | ||
| 624 | @code{vc-make-backup-files} to a non-@code{nil} value. | ||
| 625 | |||
| 626 | @vindex vc-keep-workfiles | ||
| 627 | Normally the work file exists all the time, whether it is locked or | ||
| 628 | not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking | ||
| 629 | in a new version with @kbd{C-x v v} deletes the work file; but any | ||
| 630 | attempt to visit the file with Emacs creates it again. (With CVS, work | ||
| 631 | files are always kept.) | ||
| 632 | |||
| 633 | @vindex vc-follow-symlinks | ||
| 634 | Editing a version-controlled file through a symbolic link can be | ||
| 635 | dangerous. It bypasses the version control system---you can edit the | ||
| 636 | file without locking it, and fail to check your changes in. Also, | ||
| 637 | your changes might overwrite those of another user. To protect against | ||
| 638 | this, VC checks each symbolic link that you visit, to see if it points | ||
| 639 | to a file under version control. | ||
| 640 | |||
| 641 | The variable @code{vc-follow-symlinks} controls what to do when a | ||
| 642 | symbolic link points to a version-controlled file. If it is @code{nil}, | ||
| 643 | VC only displays a warning message. If it is @code{t}, VC automatically | ||
| 644 | follows the link, and visits the real file instead, telling you about | ||
| 645 | this in the echo area. If the value is @code{ask} (the default), VC | ||
| 646 | asks you each time whether to follow the link. | ||
| 647 | |||
| 648 | @vindex vc-suppress-confirm | ||
| 649 | If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v} | ||
| 650 | and @kbd{C-x v i} can save the current buffer without asking, and | ||
| 651 | @kbd{C-x v u} also operates without asking for confirmation. (This | ||
| 652 | variable does not affect @kbd{C-x v c}; that operation is so drastic | ||
| 653 | that it should always ask for confirmation.) | ||
| 654 | |||
| 655 | @vindex vc-command-messages | ||
| 656 | VC mode does much of its work by running the shell commands for RCS, | ||
| 657 | CVS and SCCS. If @code{vc-command-messages} is non-@code{nil}, VC | ||
| 658 | displays messages to indicate which shell commands it runs, and | ||
| 659 | additional messages when the commands finish. | ||
| 660 | |||
| 661 | @vindex vc-path | ||
| 662 | You can specify additional directories to search for version control | ||
| 663 | programs by setting the variable @code{vc-path}. These directories | ||
| 664 | are searched before the usual search path. It is rarely necessary to | ||
| 665 | set this variable, because VC normally finds the proper files | ||
| 666 | automatically. | ||
| 667 | |||
| 668 | @node RCS and SCCS | ||
| 669 | @subsubsection Options for RCS and SCCS | ||
| 670 | |||
| 671 | @cindex non-strict locking (RCS) | ||
| 672 | @cindex locking, non-strict (RCS) | ||
| 673 | By default, RCS uses locking to coordinate the activities of several | ||
| 674 | users, but there is a mode called @dfn{non-strict locking} in which | ||
| 675 | you can check-in changes without locking the file first. Use | ||
| 676 | @samp{rcs -U} to switch to non-strict locking for a particular file, | ||
| 677 | see the @code{rcs} manual page for details. | ||
| 678 | |||
| 679 | When deducing the version control state of an RCS file, VC first | ||
| 680 | looks for an RCS version header string in the file (@pxref{Version | ||
| 681 | Headers}). If there is no header string, VC normally looks at the | ||
| 682 | file permissions of the work file; this is fast. But there might be | ||
| 683 | situations when the file permissions cannot be trusted. In this case | ||
| 684 | the master file has to be consulted, which is rather expensive. Also | ||
| 685 | the master file can only tell you @emph{if} there's any lock on the | ||
| 686 | file, but not whether your work file really contains that locked | ||
| 687 | version. | ||
| 688 | |||
| 689 | @vindex vc-consult-headers | ||
| 690 | You can tell VC not to use version headers to determine the file | ||
| 691 | status by setting @code{vc-consult-headers} to @code{nil}. VC then | ||
| 692 | always uses the file permissions (if it is supposed to trust them), or | ||
| 693 | else checks the master file. | ||
| 694 | |||
| 695 | @vindex vc-mistrust-permissions | ||
| 696 | You can specify the criterion for whether to trust the file | ||
| 697 | permissions by setting the variable @code{vc-mistrust-permissions}. | ||
| 698 | Its value can be @code{t} (always mistrust the file permissions and | ||
| 699 | check the master file), @code{nil} (always trust the file | ||
| 700 | permissions), or a function of one argument which makes the decision. | ||
| 701 | The argument is the directory name of the @file{RCS} subdirectory. A | ||
| 702 | non-@code{nil} value from the function says to mistrust the file | ||
| 703 | permissions. If you find that the file permissions of work files are | ||
| 704 | changed erroneously, set @code{vc-mistrust-permissions} to @code{t}. | ||
| 705 | Then VC always checks the master file to determine the file's status. | ||
| 706 | |||
| 707 | VC determines the version control state of files under SCCS much as | ||
| 708 | with RCS. It does not consider SCCS version headers, though. Thus, | ||
| 709 | the variable @code{vc-mistrust-permissions} affects SCCS use, but | ||
| 710 | @code{vc-consult-headers} does not. | ||
| 711 | |||
| 712 | @node CVS Options | ||
| 713 | @subsubsection Options specific for CVS | ||
| 714 | |||
| 715 | @cindex locking (CVS) | ||
| 716 | By default, CVS does not use locking to coordinate the activities of | ||
| 717 | several users; anyone can change a work file at any time. However, | ||
| 718 | there are ways to restrict this, resulting in behavior that resembles | ||
| 719 | locking. | ||
| 720 | |||
| 721 | @cindex CVSREAD environment variable (CVS) | ||
| 722 | For one thing, you can set the @env{CVSREAD} environment variable | ||
| 723 | (the value you use makes no difference). If this variable is defined, | ||
| 724 | CVS makes your work files read-only by default. In Emacs, you must | ||
| 725 | type @kbd{C-x v v} to make the file writable, so that editing works | ||
| 726 | in fact similar as if locking was used. Note however, that no actual | ||
| 727 | locking is performed, so several users can make their files writable | ||
| 728 | at the same time. When setting @env{CVSREAD} for the first time, make | ||
| 729 | sure to check out all your modules anew, so that the file protections | ||
| 730 | are set correctly. | ||
| 731 | |||
| 732 | @cindex cvs watch feature | ||
| 733 | @cindex watching files (CVS) | ||
| 734 | Another way to achieve something similar to locking is to use the | ||
| 735 | @dfn{watch} feature of CVS. If a file is being watched, CVS makes it | ||
| 736 | read-only by default, and you must also use @kbd{C-x v v} in Emacs to | ||
| 737 | make it writable. VC calls @code{cvs edit} to make the file writable, | ||
| 738 | and CVS takes care to notify other developers of the fact that you | ||
| 739 | intend to change the file. See the CVS documentation for details on | ||
| 740 | using the watch feature. | ||
| 741 | |||
| 742 | @vindex vc-stay-local | ||
| 743 | @vindex vc-cvs-stay-local | ||
| 744 | @cindex remote repositories (CVS) | ||
| 745 | When a file's repository is on a remote machine, VC tries to keep | ||
| 746 | network interactions to a minimum. This is controlled by the variable | ||
| 747 | @code{vc-cvs-stay-local}. There is another variable, | ||
| 748 | @code{vc-stay-local}, which enables the feature also for other back | ||
| 749 | ends that support it, including CVS. In the following, we will talk | ||
| 750 | only about @code{vc-cvs-stay-local}, but everything applies to | ||
| 751 | @code{vc-stay-local} as well. | ||
| 752 | |||
| 753 | If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses | ||
| 754 | only the entry in the local CVS subdirectory to determine the file's | ||
| 755 | state (and possibly information returned by previous CVS commands). | ||
| 756 | One consequence of this is that when you have modified a file, and | ||
| 757 | somebody else has already checked in other changes to the file, you | ||
| 758 | are not notified of it until you actually try to commit. (But you can | ||
| 759 | try to pick up any recent changes from the repository first, using | ||
| 760 | @kbd{C-x v m @key{RET}}, | ||
| 761 | @iftex | ||
| 762 | @pxref{Merging,,,emacs, the Emacs Manual}). | ||
| 763 | @end iftex | ||
| 764 | @ifnottex | ||
| 765 | @pxref{Merging}). | ||
| 766 | @end ifnottex | ||
| 767 | |||
| 768 | When @code{vc-cvs-stay-local} is @code{t}, VC also makes local | ||
| 769 | version backups, so that simple diff and revert operations are | ||
| 770 | completely local (@pxref{Version Backups}). | ||
| 771 | |||
| 772 | On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil}, | ||
| 773 | then VC queries the remote repository @emph{before} it decides what to | ||
| 774 | do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local | ||
| 775 | repositories. It also does not make any version backups. | ||
| 776 | |||
| 777 | You can also set @code{vc-cvs-stay-local} to a regular expression | ||
| 778 | that is matched against the repository host name; VC then stays local | ||
| 779 | only for repositories from hosts that match the pattern. | ||
| 780 | |||
| 781 | @vindex vc-cvs-global-switches | ||
| 782 | You can specify additional command line options to pass to all CVS | ||
| 783 | operations in the variable @code{vc-cvs-global-switches}. These | ||
| 784 | switches are inserted immediately after the @code{cvs} command, before | ||
| 785 | the name of the operation to invoke. | ||
| 786 | |||
| 787 | @ignore | ||
| 788 | arch-tag: 140b8629-4339-4b5e-9e50-72453e51615e | ||
| 789 | @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. | |||
| 131 | @item @code{menuBar} (class @code{MenuBar}) | 131 | @item @code{menuBar} (class @code{MenuBar}) |
| 132 | @cindex menu bar | 132 | @cindex menu bar |
| 133 | Give frames menu bars if @samp{on}; don't have menu bars if | 133 | Give frames menu bars if @samp{on}; don't have menu bars if |
| 134 | @samp{off}. @xref{Lucid Resources}, and @ref{LessTif Resources}, for | 134 | @samp{off}. @xref{Lucid Resources}, for how to control the appearance |
| 135 | how to control the appearance of the menu bar if you have one. | 135 | of the menu bar if you have one. |
| 136 | 136 | ||
| 137 | @item @code{pointerColor} (class @code{Foreground}) | 137 | @item @code{pointerColor} (class @code{Foreground}) |
| 138 | Color of the mouse cursor. | 138 | Color of the mouse cursor. |
| @@ -296,7 +296,136 @@ The margin of the menu bar, in characters. Default is 1. | |||
| 296 | @node GTK resources | 296 | @node GTK resources |
| 297 | @appendixsec GTK resources | 297 | @appendixsec GTK resources |
| 298 | 298 | ||
| 299 | @c Waiting for contents | 299 | The most common way to customize the GTK widgets Emacs uses (menus, dialogs |
| 300 | tool bars and scroll bars) is by choosing an appropriate theme, for example | ||
| 301 | with the GNOME theme selector. You can also do Emacs specific customization | ||
| 302 | by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK | ||
| 303 | themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything | ||
| 304 | works with all themes. To customize Emacs font, background, faces, etc., use | ||
| 305 | the normal X resources (@pxref{Resources}). We will present some examples of | ||
| 306 | customizations here, but for a more detailed description, see the online manual. | ||
| 307 | |||
| 308 | The first example is just one line. It changes the font on all GTK widgets | ||
| 309 | to courier with size 12: | ||
| 310 | |||
| 311 | @smallexample | ||
| 312 | gtk-font-name = "courier 12" | ||
| 313 | @end smallexample | ||
| 314 | |||
| 315 | The thing to note is that the font name is not an X font name, like | ||
| 316 | -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*, but a Pango font name. A Pango | ||
| 317 | font name is basically of the format "family style size", where the style | ||
| 318 | is optional as in the case above. A name with a style could be for example: | ||
| 319 | |||
| 320 | @smallexample | ||
| 321 | gtk-font-name = "helvetica bold 10" | ||
| 322 | @end smallexample | ||
| 323 | |||
| 324 | To customize widgets you first define a style and then apply the style to | ||
| 325 | the widgets. Here is an example that sets the font for menus, but not | ||
| 326 | for other widgets: | ||
| 327 | |||
| 328 | @smallexample | ||
| 329 | # @r{Define the style @samp{menufont}.} | ||
| 330 | style "menufont" | ||
| 331 | @{ | ||
| 332 | font_name = "helvetica bold 14" # This is a Pango font name | ||
| 333 | @} | ||
| 334 | |||
| 335 | # @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{menufont}.} | ||
| 336 | widget "*emacs-menuitem*" style "menufont" | ||
| 337 | @end smallexample | ||
| 338 | |||
| 339 | The widget name in this example contains wildcards, so the style will be | ||
| 340 | applied to all widgets that match "*emacs-menuitem*". The widgets are | ||
| 341 | named by the way they are contained, from the outer widget to the inner widget. | ||
| 342 | So to apply the style "my_style" (not shown) with the full, absolute name, for | ||
| 343 | the menubar and the scroll bar in Emacs we use: | ||
| 344 | |||
| 345 | @smallexample | ||
| 346 | widget "Emacs.pane.menubar" style "my_style" | ||
| 347 | widget "Emacs.pane.emacs.verticalScrollBar" style "my_style" | ||
| 348 | @end smallexample | ||
| 349 | |||
| 350 | But to aoid having to type it all, wildcards are often used. @samp{*} | ||
| 351 | matches zero or more characters and @samp{?} matches one character. So "*" | ||
| 352 | matches all widgets. | ||
| 353 | |||
| 354 | Each widget has a class (for example GtkMenuItem) and a name (emacs-menuitem). | ||
| 355 | You can assign styles by name or by class. In this example we have used the | ||
| 356 | class: | ||
| 357 | |||
| 358 | @smallexample | ||
| 359 | style "menufont" | ||
| 360 | @{ | ||
| 361 | font_name = "helvetica bold 14" | ||
| 362 | @} | ||
| 363 | |||
| 364 | widget_class "*GtkMenuBar" style "menufont" | ||
| 365 | @end smallexample | ||
| 366 | |||
| 367 | @noindent | ||
| 368 | The names and classes for the GTK widgets Emacs uses are: | ||
| 369 | |||
| 370 | @multitable {@code{verticalScrollbar plus}} {@code{GtkFileSelection} and some} | ||
| 371 | @item @code{emacs-filedialog} | ||
| 372 | @tab @code{GtkFileSelection} | ||
| 373 | @item @code{emacs-dialog} | ||
| 374 | @tab @code{GtkDialog} | ||
| 375 | @item @code{Emacs} | ||
| 376 | @tab @code{GtkWindow} | ||
| 377 | @item @code{pane} | ||
| 378 | @tab @code{GtkVHbox} | ||
| 379 | @item @code{emacs} | ||
| 380 | @tab @code{GtkFixed} | ||
| 381 | @item @code{verticalScrollBar} | ||
| 382 | @tab @code{GtkVScrollbar} | ||
| 383 | @item @code{emacs-toolbar} | ||
| 384 | @tab @code{GtkToolbar} | ||
| 385 | @item @code{menubar} | ||
| 386 | @tab @code{GtkMenuBar} | ||
| 387 | @item @code{emacs-menuitem} | ||
| 388 | @tab anything in menus | ||
| 389 | @end multitable | ||
| 390 | |||
| 391 | GTK absolute names are quite strange when it comes to menus | ||
| 392 | and dialogs. The names do not start with @samp{Emacs}, as they are | ||
| 393 | free-standing windows and not contained (in the GTK sense) by the | ||
| 394 | Emacs GtkWindow. To customize the dialogs and menus, use wildcards like this: | ||
| 395 | |||
| 396 | @smallexample | ||
| 397 | widget "*emacs-dialog*" style "my_dialog_style" | ||
| 398 | widget "*emacs-filedialog* style "my_file_style" | ||
| 399 | widget "*emacs-menuitem* style "my_menu_style" | ||
| 400 | @end smallexample | ||
| 401 | |||
| 402 | If you specify a customization in @file{~/.emacs.d/gtkrc}, then it | ||
| 403 | automatically applies only to Emacs, since other programs don't read | ||
| 404 | that file. For example, the drop down menu in the file dialog can not | ||
| 405 | be customized by any absolute widget name, only by an absolute class | ||
| 406 | name. This is because the widgets in the drop down menu do not | ||
| 407 | have names and the menu is not contained in the Emacs GtkWindow. To | ||
| 408 | have all menus in Emacs look the same, use this in | ||
| 409 | @file{~/.emacs.d/gtkrc}: | ||
| 410 | |||
| 411 | @smallexample | ||
| 412 | widget_class "*Menu*" style "my_menu_style" | ||
| 413 | @end smallexample | ||
| 414 | |||
| 415 | Here is a more elaborate example, showing how to change the parts of | ||
| 416 | the scroll bar: | ||
| 417 | |||
| 418 | @smallexample | ||
| 419 | style "scroll" | ||
| 420 | @{ | ||
| 421 | fg[NORMAL] = "red"@ @ @ @ @ # @r{The arrow color.} | ||
| 422 | bg[NORMAL] = "yellow"@ @ # @r{The thumb and background around the arrow.} | ||
| 423 | bg[ACTIVE] = "blue"@ @ @ @ # @r{The trough color.} | ||
| 424 | bg[PRELIGHT] = "white"@ # @r{The thumb color when the mouse is over it.} | ||
| 425 | @} | ||
| 426 | |||
| 427 | widget "*verticalScrollBar*" style "scroll" | ||
| 428 | @end smallexample | ||
| 300 | 429 | ||
| 301 | @ignore | 430 | @ignore |
| 302 | arch-tag: e1856f29-2482-42c0-a990-233cdccd1f21 | 431 | 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. | |||
| 585 | @cindex @file{~/.gtkrc-2.0} file | 585 | @cindex @file{~/.gtkrc-2.0} file |
| 586 | @cindex @file{~/.emacs.d/gtkrc} file | 586 | @cindex @file{~/.emacs.d/gtkrc} file |
| 587 | 587 | ||
| 588 | If Emacs was built to use the GTK widget set, then the menu bar, | 588 | If Emacs was built to use the GTK widget set, then the menu bar, tool bar, |
| 589 | scroll bar and the dialogs are customized with the standard GTK | 589 | scroll bar and the dialogs are customized with the standard GTK |
| 590 | customization file, @file{~/.gtkrc-2.0}, or with the Emacs specific | 590 | customization file, @file{~/.gtkrc-2.0}, or with the Emacs specific |
| 591 | file @file{~/.emacs.d/gtkrc}. We recommend that you use | 591 | 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 | |||
| 603 | Emacs menus: | 603 | Emacs menus: |
| 604 | 604 | ||
| 605 | @smallexample | 605 | @smallexample |
| 606 | # @r{Define the style @samp{metafont}.} | 606 | # @r{Define the style @samp{menufont}.} |
| 607 | style "menufont" | 607 | style "menufont" |
| 608 | @{ | 608 | @{ |
| 609 | font_name = "helvetica bold 14" # This is a Pango font name | 609 | font_name = "helvetica bold 14" # This is a Pango font name |
| 610 | @} | 610 | @} |
| 611 | 611 | ||
| 612 | # @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{metafont}.} | 612 | # @r{Specify that widget type @samp{*emacs-menuitem*} uses @samp{menufont}.} |
| 613 | widget "*emacs-menuitem*" style "menufont" | 613 | widget "*emacs-menuitem*" style "menufont" |
| 614 | @end smallexample | 614 | @end smallexample |
| 615 | 615 | ||
diff --git a/src/.gdbinit b/src/.gdbinit index 881a11dc8c0..7de361fddfb 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -211,6 +211,7 @@ define pitx | |||
| 211 | printf "vpos=%d hpos=%d", $it->vpos, $it->hpos, | 211 | printf "vpos=%d hpos=%d", $it->vpos, $it->hpos, |
| 212 | printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y | 212 | printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y |
| 213 | printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x | 213 | printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x |
| 214 | printf " w=%d", $it->pixel_width | ||
| 214 | printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent | 215 | printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent |
| 215 | printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent | 216 | printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent |
| 216 | printf "\n" | 217 | printf "\n" |
| @@ -544,6 +545,10 @@ end | |||
| 544 | define xframe | 545 | define xframe |
| 545 | xgetptr $ | 546 | xgetptr $ |
| 546 | print (struct frame *) $ptr | 547 | print (struct frame *) $ptr |
| 548 | xgetptr $->name | ||
| 549 | set $ptr = (struct Lisp_String *) $ptr | ||
| 550 | xprintstr $ptr | ||
| 551 | echo \n | ||
| 547 | end | 552 | end |
| 548 | document xframe | 553 | document xframe |
| 549 | Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. | 554 | Print $ as a frame pointer, assuming it is an Emacs Lisp frame value. |
| @@ -676,6 +681,31 @@ document xcdr | |||
| 676 | Print the cdr of $, assuming it is an Emacs Lisp pair. | 681 | Print the cdr of $, assuming it is an Emacs Lisp pair. |
| 677 | end | 682 | end |
| 678 | 683 | ||
| 684 | define xlist | ||
| 685 | xgetptr $ | ||
| 686 | set $cons = (struct Lisp_Cons *) $ptr | ||
| 687 | xgetptr Qnil | ||
| 688 | set $nil = $ptr | ||
| 689 | set $i = 0 | ||
| 690 | while $cons != $nil && $i < 10 | ||
| 691 | p/x $cons->car | ||
| 692 | xpr | ||
| 693 | xgetptr $cons->u.cdr | ||
| 694 | set $cons = (struct Lisp_Cons *) $ptr | ||
| 695 | set $i = $i + 1 | ||
| 696 | printf "---\n" | ||
| 697 | end | ||
| 698 | if $cons == $nil | ||
| 699 | printf "nil\n" | ||
| 700 | else | ||
| 701 | printf "...\n" | ||
| 702 | p $ptr | ||
| 703 | end | ||
| 704 | end | ||
| 705 | document xlist | ||
| 706 | Print $ assuming it is a list. | ||
| 707 | end | ||
| 708 | |||
| 679 | define xfloat | 709 | define xfloat |
| 680 | xgetptr $ | 710 | xgetptr $ |
| 681 | print ((struct Lisp_Float *) $ptr)->u.data | 711 | print ((struct Lisp_Float *) $ptr)->u.data |
| @@ -694,6 +724,108 @@ document xscrollbar | |||
| 694 | Print $ as a scrollbar pointer. | 724 | Print $ as a scrollbar pointer. |
| 695 | end | 725 | end |
| 696 | 726 | ||
| 727 | define xpr | ||
| 728 | xtype | ||
| 729 | if $type == Lisp_Int | ||
| 730 | xint | ||
| 731 | end | ||
| 732 | if $type == Lisp_Symbol | ||
| 733 | xsymbol | ||
| 734 | end | ||
| 735 | if $type == Lisp_String | ||
| 736 | xstring | ||
| 737 | end | ||
| 738 | if $type == Lisp_Cons | ||
| 739 | xcons | ||
| 740 | end | ||
| 741 | if $type == Lisp_Float | ||
| 742 | xfloat | ||
| 743 | end | ||
| 744 | if $type == Lisp_Misc | ||
| 745 | set $misc = (enum Lisp_Misc_Type) (((struct Lisp_Free *) $ptr)->type) | ||
| 746 | if $misc == Lisp_Misc_Free | ||
| 747 | xmiscfree | ||
| 748 | end | ||
| 749 | if $misc == Lisp_Misc_Boolfwd | ||
| 750 | xboolfwd | ||
| 751 | end | ||
| 752 | if $misc == Lisp_Misc_Marker | ||
| 753 | xmarker | ||
| 754 | end | ||
| 755 | if $misc == Lisp_Misc_Intfwd | ||
| 756 | xintfwd | ||
| 757 | end | ||
| 758 | if $misc == Lisp_Misc_Boolfwd | ||
| 759 | xboolfwd | ||
| 760 | end | ||
| 761 | if $misc == Lisp_Misc_Objfwd | ||
| 762 | xobjfwd | ||
| 763 | end | ||
| 764 | if $misc == Lisp_Misc_Buffer_Objfwd | ||
| 765 | xbufobjfwd | ||
| 766 | end | ||
| 767 | if $misc == Lisp_Misc_Buffer_Local_Value | ||
| 768 | xbuflocal | ||
| 769 | end | ||
| 770 | # if $misc == Lisp_Misc_Some_Buffer_Local_Value | ||
| 771 | # xvalue | ||
| 772 | # end | ||
| 773 | if $misc == Lisp_Misc_Overlay | ||
| 774 | xoverlay | ||
| 775 | end | ||
| 776 | if $misc == Lisp_Misc_Kboard_Objfwd | ||
| 777 | xkbobjfwd | ||
| 778 | end | ||
| 779 | # if $misc == Lisp_Misc_Save_Value | ||
| 780 | # xsavevalue | ||
| 781 | # end | ||
| 782 | end | ||
| 783 | if $type == Lisp_Vectorlike | ||
| 784 | set $size = ((struct Lisp_Vector *) $ptr)->size | ||
| 785 | if ($size & PVEC_FLAG) | ||
| 786 | set $vec = (enum pvec_type) ($size & PVEC_TYPE_MASK) | ||
| 787 | if $vec == PVEC_NORMAL_VECTOR | ||
| 788 | xvector | ||
| 789 | end | ||
| 790 | if $vec == PVEC_PROCESS | ||
| 791 | xprocess | ||
| 792 | end | ||
| 793 | if $vec == PVEC_FRAME | ||
| 794 | xframe | ||
| 795 | end | ||
| 796 | if $vec == PVEC_COMPILED | ||
| 797 | xcompiled | ||
| 798 | end | ||
| 799 | if $vec == PVEC_WINDOW | ||
| 800 | xwindow | ||
| 801 | end | ||
| 802 | if $vec == PVEC_WINDOW_CONFIGURATION | ||
| 803 | xwinconfig | ||
| 804 | end | ||
| 805 | if $vec == PVEC_SUBR | ||
| 806 | xsubr | ||
| 807 | end | ||
| 808 | if $vec == PVEC_CHAR_TABLE | ||
| 809 | xchartable | ||
| 810 | end | ||
| 811 | if $vec == PVEC_BOOL_VECTOR | ||
| 812 | xboolvector | ||
| 813 | end | ||
| 814 | if $vec == PVEC_BUFFER | ||
| 815 | xbuffer | ||
| 816 | end | ||
| 817 | if $vec == PVEC_HASH_TABLE | ||
| 818 | xhashtable | ||
| 819 | end | ||
| 820 | else | ||
| 821 | xvector | ||
| 822 | end | ||
| 823 | end | ||
| 824 | end | ||
| 825 | document xpr | ||
| 826 | Print $ as a lisp object of any type. | ||
| 827 | end | ||
| 828 | |||
| 697 | define xprintstr | 829 | define xprintstr |
| 698 | set $data = $arg0->data | 830 | set $data = $arg0->data |
| 699 | output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte) | 831 | output ($arg0->size > 1000) ? 0 : ($data[0])@($arg0->size_byte < 0 ? $arg0->size & ~gdb_array_mark_flag : $arg0->size_byte) |
| @@ -739,7 +871,7 @@ define xbacktrace | |||
| 739 | xgettype (*$bt->function) | 871 | xgettype (*$bt->function) |
| 740 | if $type == Lisp_Symbol | 872 | if $type == Lisp_Symbol |
| 741 | xprintsym (*$bt->function) | 873 | xprintsym (*$bt->function) |
| 742 | echo \n | 874 | printf " (0x%x)\n", *$bt->args |
| 743 | else | 875 | else |
| 744 | printf "0x%x ", *$bt->function | 876 | printf "0x%x ", *$bt->function |
| 745 | if $type == Lisp_Vectorlike | 877 | if $type == Lisp_Vectorlike |
| @@ -760,6 +892,27 @@ document xbacktrace | |||
| 760 | an error was signaled. | 892 | an error was signaled. |
| 761 | end | 893 | end |
| 762 | 894 | ||
| 895 | define which | ||
| 896 | set debug_print (which_symbols ($arg0)) | ||
| 897 | end | ||
| 898 | document which | ||
| 899 | Print symbols which references a given lisp object, | ||
| 900 | either as its symbol value or symbol function. | ||
| 901 | end | ||
| 902 | |||
| 903 | define xbytecode | ||
| 904 | set $bt = byte_stack_list | ||
| 905 | while $bt | ||
| 906 | xgettype ($bt->byte_string) | ||
| 907 | printf "0x%x => ", $bt->byte_string | ||
| 908 | which $bt->byte_string | ||
| 909 | set $bt = $bt->next | ||
| 910 | end | ||
| 911 | end | ||
| 912 | document xbytecode | ||
| 913 | Print a backtrace of the byte code stack. | ||
| 914 | end | ||
| 915 | |||
| 763 | # Show Lisp backtrace after normal backtrace. | 916 | # Show Lisp backtrace after normal backtrace. |
| 764 | define hookpost-backtrace | 917 | define hookpost-backtrace |
| 765 | set $bt = backtrace_list | 918 | set $bt = backtrace_list |
diff --git a/src/ChangeLog b/src/ChangeLog index f68510f2fb4..d7e8293ad27 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,203 @@ | |||
| 1 | 2006-05-10 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * xfaces.c (realize_default_face) [HAVE_X_WINDOWS]: If the font | ||
| 4 | chosen for the default face was different from the frame font, | ||
| 5 | adjust the frame font. | ||
| 6 | |||
| 7 | 2006-05-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 8 | |||
| 9 | * image.c (Qduration) [MAC_OS]: Undo previous change. | ||
| 10 | (syms_of_image) [MAC_OS]: Likewise. | ||
| 11 | [MAC_OS] (gif_load): Emulate Graphic Control Extension block. | ||
| 12 | |||
| 13 | * macfns.c (x_to_mac_color): Fix shift amount change. | ||
| 14 | [USE_MAC_FONT_PANEL] (mac_set_font): Use x_get_focus_frame. | ||
| 15 | [USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): Doc fix. | ||
| 16 | |||
| 17 | * macselect.c (Vmac_service_selection) [MAC_OSX]: Rename from | ||
| 18 | Vmac_services_selection. All uses changed. | ||
| 19 | (mac_store_service_event): Rename from mac_store_services_event in | ||
| 20 | extern and calls. | ||
| 21 | |||
| 22 | * macterm.c (Qservice) [MAC_OSX]: Rename from Qservices. All uses | ||
| 23 | changed. | ||
| 24 | [MAC_OSX] (mac_store_service_event): Rename from | ||
| 25 | mac_store_services_event. All callers changed. | ||
| 26 | [USE_MAC_FONT_PANEL] (mac_set_font_info_for_selection): Add args | ||
| 27 | FACE_ID and C. All callers changed. | ||
| 28 | (x_free_frame_resources) [USE_MAC_FONT_PANEL]: Call | ||
| 29 | mac_set_font_info_for_selection when focus frame is destroyed. | ||
| 30 | (XTread_socket): Revert to FrontNonFloatingWindow/FrontWindow. | ||
| 31 | |||
| 32 | * macterm.h (mac_set_font_info_for_selection): Add 2nd and 3rd | ||
| 33 | args in extern. | ||
| 34 | |||
| 35 | 2006-05-09 Chong Yidong <cyd@stupidchicken.com> | ||
| 36 | |||
| 37 | * keymap.c (describe_map): Avoid generating duplicate entries if | ||
| 38 | the shadowed binding has the same definition. | ||
| 39 | |||
| 40 | 2006-05-09 Kenichi Handa <handa@m17n.org> | ||
| 41 | |||
| 42 | * keymap.c (push_key_description): Handle invalid character key. | ||
| 43 | |||
| 44 | 2006-05-08 Kenichi Handa <handa@m17n.org> | ||
| 45 | |||
| 46 | * callproc.c (Fcall_process): Use system_eol_type for encoding | ||
| 47 | arguments if eol_type is not yet decided. | ||
| 48 | |||
| 49 | * coding.h (system_eol_type): Extern it. | ||
| 50 | |||
| 51 | * coding.c (setup_coding_system): For invalid coding-system, set | ||
| 52 | coding->eol_type to CODING_EOL_UNDECIDED. | ||
| 53 | (encode_coding): Cancel previous change. | ||
| 54 | (shrink_encoding_region): Likewise. | ||
| 55 | (code_convert_region1): Likewise. | ||
| 56 | (code_convert_string1): Likewise. | ||
| 57 | (code_convert_string_norecord): Likewise. | ||
| 58 | |||
| 59 | * fileio.c (choose_write_coding_system): Use system_eol_type for | ||
| 60 | encoding if eol_type is not yet decided. | ||
| 61 | |||
| 62 | * process.c (setup_process_coding_systems): Use system_eol_type | ||
| 63 | for encoding if eol_type is not yet decided. | ||
| 64 | (read_process_output): Likewise. | ||
| 65 | (send_process): Likewise. | ||
| 66 | |||
| 67 | 2006-05-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 68 | |||
| 69 | * minibuf.c (syms_of_minibuf) <history-length>: Fix typo in doc. | ||
| 70 | |||
| 71 | 2006-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 72 | |||
| 73 | * mac.c (Fmac_clear_font_name_table): Move defun to macfns.c. | ||
| 74 | (syms_of_mac): Likewise for defsubr. | ||
| 75 | |||
| 76 | * macfns.c (mac_set_font): New function. | ||
| 77 | (mac_frame_parm_handlers, syms_of_macfns): Replace x_set_font with it. | ||
| 78 | (mac_window) [TARGET_API_MAC_CARBON && MAC_OSX]: Specify | ||
| 79 | kWindowToolbarButtonAttribute when creating window. | ||
| 80 | (Fmac_clear_font_name_table): Move from macfns.c. | ||
| 81 | (syms_of_macfns): Likewise for defsubr. | ||
| 82 | [USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): New defun. | ||
| 83 | (syms_of_macfns) [USE_MAC_FONT_PANEL]: Defsubr it. | ||
| 84 | |||
| 85 | * macgui.h (USE_MAC_FONT_PANEL): Define to 1 if USE_ATSUI is set | ||
| 86 | and build is done on Mac OS X 10.2 and later. | ||
| 87 | |||
| 88 | * macselect.c (mac_do_receive_drag): Remove unused variable `index'. | ||
| 89 | (mac_store_services_event): Change return type in extern. | ||
| 90 | |||
| 91 | * macterm.c (XLoadQueryFont) [USE_ATSUI]: Set font->mac_fontnum to | ||
| 92 | FMFontFamily value. | ||
| 93 | [USE_MAC_FONT_PANEL] (mac_set_font_info_for_selection): New function. | ||
| 94 | (x_new_focus_frame) [USE_MAC_FONT_PANEL]: Use it. | ||
| 95 | (QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic): Add extern. | ||
| 96 | (QWindow) [MAC_OSX]: Likewise. | ||
| 97 | (Qfont) [USE_MAC_FONT_PANEL]: Likewise. | ||
| 98 | (Vmac_atsu_font_table) [USE_ATSUI]: New variable. | ||
| 99 | (syms_of_macterm) [USE_ATSUI]: Defvar it. | ||
| 100 | (Qtoolbar_switch_mode) [MAC_OSX]: New variable. | ||
| 101 | (Qpanel_closed, Qselection) [USE_MAC_FONT_PANEL]: Likewise. | ||
| 102 | (syms_of_macterm): Intern and staticpro them. | ||
| 103 | (init_font_name_table) [USE_ATSUI]: Add data to Vmac_atsu_font_table. | ||
| 104 | [TARGET_API_MAC_CARBON] (mac_store_event_ref_as_apple_event): New | ||
| 105 | function. | ||
| 106 | [USE_CARBON_EVENTS] (mac_handle_command_event): Use it. | ||
| 107 | [MAC_OSX] (mac_store_services_event): Likewise. | ||
| 108 | [USE_CARBON_EVENTS] (mac_handle_window_event) [MAC_OSX]: Handle | ||
| 109 | kEventWindowToolbarSwitchMode event. | ||
| 110 | (install_window_handler) [USE_CARBON_EVENTS && MAC_OSX]: Register it. | ||
| 111 | [MAC_OSX] (mac_store_services_event): Change return type to OSStatus. | ||
| 112 | [USE_MAC_FONT_PANEL] (mac_handle_font_event): New function. | ||
| 113 | (install_window_handler) [USE_MAC_FONT_PANEL]: Install it. | ||
| 114 | (XTread_socket): Select window on mouse click if x_focus_frame is NULL. | ||
| 115 | |||
| 116 | * macterm.h (mac_set_font_info_for_selection): Add extern. | ||
| 117 | |||
| 118 | 2006-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 119 | |||
| 120 | * image.c (Qduration) [MAC_OS]: New variable. | ||
| 121 | (syms_of_image) [MAC_OS]: Intern and staticpro it. | ||
| 122 | [MAC_OS] (gif_load): Save image extension data in img->data.lisp_val. | ||
| 123 | [MAC_OSX] (image_load_quartz2d): Use cfstring_create_with_utf8_cstring | ||
| 124 | instead of cfstring_create_with_string. | ||
| 125 | |||
| 126 | 2006-05-06 Kim F. Storm <storm@cua.dk> | ||
| 127 | |||
| 128 | * .gdbinit (xframe): Print frame name. | ||
| 129 | (xlist): New command to print a list (max 10 elements). | ||
| 130 | (xpr): Print lisp object of any type. | ||
| 131 | (pitx): Print it->pixel_width. | ||
| 132 | |||
| 133 | 2006-05-05 Kenichi Handa <handa@m17n.org> | ||
| 134 | |||
| 135 | * xdisp.c (handle_composition_prop): Fix for the case of empty | ||
| 136 | composition component. | ||
| 137 | |||
| 138 | 2006-05-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 139 | |||
| 140 | * keyboard.c (make_lispy_event) [MAC_OS]: Get Apple event info | ||
| 141 | from event->arg. | ||
| 142 | |||
| 143 | * termhooks.h (enum event_kind) [MAC_OS]: Update comment for | ||
| 144 | MAC_APPLE_EVENT. | ||
| 145 | |||
| 146 | * macterm.h (mac_make_lispy_event_code): Remove extern. | ||
| 147 | (mac_post_mouse_moved_event): Add extern. | ||
| 148 | (mac_aelist_to_lisp, mac_aedesc_to_lisp): Change arg 1 to | ||
| 149 | `const AEDesc *' in externs. | ||
| 150 | (create_apple_event_from_drag_ref) [TARGET_API_MAC_CARBON]: New extern. | ||
| 151 | |||
| 152 | * mac.c (mac_aelist_to_lisp, mac_aedesc_to_lisp): Change arg 1 to | ||
| 153 | `const AEDesc *'. | ||
| 154 | [TARGET_API_MAC_CARBON] (create_apple_event): New function. | ||
| 155 | [TARGET_API_MAC_CARBON] (create_apple_event_from_event_ref): Use it. | ||
| 156 | Use xrealloc instead of repeated xmalloc/xfree. | ||
| 157 | [TARGET_API_MAC_CARBON] (create_apple_event_from_drag_ref): New | ||
| 158 | function. | ||
| 159 | |||
| 160 | * macmenu.c (restore_menu_items, cleanup_popup_menu): Return a value. | ||
| 161 | |||
| 162 | * macselect.c: Update copyright year. | ||
| 163 | (mac_store_apple_event): Change return type to void in extern. | ||
| 164 | (mac_handle_apple_event): Don't get return value from | ||
| 165 | mac_store_apple_event. | ||
| 166 | [TARGET_API_MAC_CARBON] (Vmac_dnd_known_types): New variable. | ||
| 167 | (syms_of_macselect) [TARGET_API_MAC_CARBON]: Defvar it. | ||
| 168 | [TARGET_API_MAC_CARBON] (mac_do_track_drag): Move function from | ||
| 169 | macterm.c. Use Vmac_dnd_known_types as acceptable flavors. | ||
| 170 | [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. New | ||
| 171 | implementation using create_apple_event_from_drag_ref. | ||
| 172 | [TARGET_API_MAC_CARBON] (mac_do_track_dragUPP) | ||
| 173 | (mac_do_receive_dragUPP): Move variables from macterm.c. | ||
| 174 | (install_drag_handler, remove_drag_handler): New functions. | ||
| 175 | |||
| 176 | * macterm.c (XTread_socket) [TARGET_API_MAC_CARBON]: Try window | ||
| 177 | path select also for proxy icon click. | ||
| 178 | [TARGET_API_MAC_CARBON] (mac_post_mouse_moved_event): New function. | ||
| 179 | [USE_TOOLKIT_SCROLL_BARS] (scroll_bar_timer_callback): Use it. | ||
| 180 | (xlfdpat_create): Remove unused label `error' and trailing sentences. | ||
| 181 | (mac_do_track_drag, mac_do_receive_drag): Move functions to macselect.c. | ||
| 182 | (mac_do_track_dragUPP, mac_do_receive_dragUPP): Move variables to | ||
| 183 | macselect.c. | ||
| 184 | (install_drag_handler, remove_drag_handler): Add extern. | ||
| 185 | (mac_store_apple_event): Change return type to void. All uses changed. | ||
| 186 | Create Lisp object from Apple event and store it into input event. | ||
| 187 | (mac_make_lispy_event_code): Remove function. | ||
| 188 | [TARGET_API_MAC_CARBON] (mac_store_drag_event): New function. | ||
| 189 | (install_window_handler): Call install_drag_handler. | ||
| 190 | (remove_window_handler): Call remove_drag_handler. | ||
| 191 | |||
| 192 | 2006-05-03 Richard Stallman <rms@gnu.org> | ||
| 193 | |||
| 194 | * sound.c (Fplay_sound_internal): Dynamically allocate | ||
| 195 | current_sound_device and current_sound. | ||
| 196 | (sound_cleanup): Free them. | ||
| 197 | |||
| 198 | * minibuf.c (read_minibuf): Don't use read_minibuf_noninteractive | ||
| 199 | when inside a keyboard macro. | ||
| 200 | |||
| 1 | 2006-05-02 Andreas Schwab <schwab@suse.de> | 201 | 2006-05-02 Andreas Schwab <schwab@suse.de> |
| 2 | 202 | ||
| 3 | * xmenu.c (restore_menu_items): Return a value. | 203 | * xmenu.c (restore_menu_items): Return a value. |
diff --git a/src/callproc.c b/src/callproc.c index 54ebf53979e..5f314f4de2a 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -295,6 +295,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 295 | val = Qnil; | 295 | val = Qnil; |
| 296 | } | 296 | } |
| 297 | setup_coding_system (Fcheck_coding_system (val), &argument_coding); | 297 | setup_coding_system (Fcheck_coding_system (val), &argument_coding); |
| 298 | if (argument_coding.eol_type == CODING_EOL_UNDECIDED) | ||
| 299 | argument_coding.eol_type = system_eol_type; | ||
| 298 | } | 300 | } |
| 299 | } | 301 | } |
| 300 | 302 | ||
diff --git a/src/coding.h b/src/coding.h index 41f4aab509c..aa5c8f05015 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -717,6 +717,9 @@ extern Lisp_Object eol_mnemonic_unix, eol_mnemonic_dos, eol_mnemonic_mac; | |||
| 717 | /* Mnemonic string to indicate type of end-of-line is not yet decided. */ | 717 | /* Mnemonic string to indicate type of end-of-line is not yet decided. */ |
| 718 | extern Lisp_Object eol_mnemonic_undecided; | 718 | extern Lisp_Object eol_mnemonic_undecided; |
| 719 | 719 | ||
| 720 | /* Format of end-of-line decided by system. */ | ||
| 721 | extern int system_eol_type; | ||
| 722 | |||
| 720 | #ifdef emacs | 723 | #ifdef emacs |
| 721 | extern Lisp_Object Qfile_coding_system; | 724 | extern Lisp_Object Qfile_coding_system; |
| 722 | extern Lisp_Object Qcall_process, Qcall_process_region; | 725 | extern Lisp_Object Qcall_process, Qcall_process_region; |
diff --git a/src/image.c b/src/image.c index 688ff200055..f309a401139 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -2628,7 +2628,7 @@ image_load_quartz2d (f, img, png_p) | |||
| 2628 | UNGCPRO; | 2628 | UNGCPRO; |
| 2629 | return 0; | 2629 | return 0; |
| 2630 | } | 2630 | } |
| 2631 | path = cfstring_create_with_string (file); | 2631 | path = cfstring_create_with_utf8_cstring (SDATA (file)); |
| 2632 | url = CFURLCreateWithFileSystemPath (NULL, path, | 2632 | url = CFURLCreateWithFileSystemPath (NULL, path, |
| 2633 | kCFURLPOSIXPathStyle, 0); | 2633 | kCFURLPOSIXPathStyle, 0); |
| 2634 | CFRelease (path); | 2634 | CFRelease (path); |
| @@ -7920,7 +7920,8 @@ gif_load (f, img) | |||
| 7920 | RGBColor bg_color; | 7920 | RGBColor bg_color; |
| 7921 | int width, height; | 7921 | int width, height; |
| 7922 | XImagePtr ximg; | 7922 | XImagePtr ximg; |
| 7923 | TimeValue time; | 7923 | TimeScale time_scale; |
| 7924 | TimeValue time, duration; | ||
| 7924 | int ino; | 7925 | int ino; |
| 7925 | CGrafPtr old_port; | 7926 | CGrafPtr old_port; |
| 7926 | GDHandle old_gdh; | 7927 | GDHandle old_gdh; |
| @@ -8028,6 +8029,7 @@ gif_load (f, img) | |||
| 8028 | image, img->spec); | 8029 | image, img->spec); |
| 8029 | goto error; | 8030 | goto error; |
| 8030 | } | 8031 | } |
| 8032 | time_scale = GetMediaTimeScale (media); | ||
| 8031 | 8033 | ||
| 8032 | specified_bg = image_spec_value (img->spec, QCbackground, NULL); | 8034 | specified_bg = image_spec_value (img->spec, QCbackground, NULL); |
| 8033 | if (!STRINGP (specified_bg) || | 8035 | if (!STRINGP (specified_bg) || |
| @@ -8053,7 +8055,7 @@ gif_load (f, img) | |||
| 8053 | SetGWorld (old_port, old_gdh); | 8055 | SetGWorld (old_port, old_gdh); |
| 8054 | SetMovieActive (movie, 1); | 8056 | SetMovieActive (movie, 1); |
| 8055 | SetMovieGWorld (movie, ximg, NULL); | 8057 | SetMovieGWorld (movie, ximg, NULL); |
| 8056 | SampleNumToMediaTime (media, ino + 1, &time, NULL); | 8058 | SampleNumToMediaTime (media, ino + 1, &time, &duration); |
| 8057 | SetMovieTimeValue (movie, time); | 8059 | SetMovieTimeValue (movie, time); |
| 8058 | MoviesTask (movie, 0L); | 8060 | MoviesTask (movie, 0L); |
| 8059 | DisposeTrackMedia (media); | 8061 | DisposeTrackMedia (media); |
| @@ -8061,6 +8063,24 @@ gif_load (f, img) | |||
| 8061 | DisposeMovie (movie); | 8063 | DisposeMovie (movie); |
| 8062 | if (dh) | 8064 | if (dh) |
| 8063 | DisposeHandle (dh); | 8065 | DisposeHandle (dh); |
| 8066 | |||
| 8067 | /* Save GIF image extension data for `image-extension-data'. | ||
| 8068 | Format is (count IMAGES 0xf9 GRAPHIC_CONTROL_EXTENSION_BLOCK). */ | ||
| 8069 | { | ||
| 8070 | unsigned char gce[4]; | ||
| 8071 | int centisec = ((float)duration / time_scale) * 100.0f + 0.5f; | ||
| 8072 | |||
| 8073 | /* Fill the delay time field. */ | ||
| 8074 | gce[1] = centisec & 0xff; | ||
| 8075 | gce[2] = (centisec >> 8) & 0xff; | ||
| 8076 | /* We don't know about other fields. */ | ||
| 8077 | gce[0] = gce[3] = 0; | ||
| 8078 | |||
| 8079 | img->data.lisp_val = list4 (Qcount, make_number (nsamples), | ||
| 8080 | make_number (0xf9), | ||
| 8081 | make_unibyte_string (gce, 4)); | ||
| 8082 | } | ||
| 8083 | |||
| 8064 | /* Maybe fill in the background field while we have ximg handy. */ | 8084 | /* Maybe fill in the background field while we have ximg handy. */ |
| 8065 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 8085 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 8066 | IMAGE_BACKGROUND (img, f, ximg); | 8086 | IMAGE_BACKGROUND (img, f, ximg); |
diff --git a/src/keyboard.c b/src/keyboard.c index e3a77653ed6..b47df2bec7a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -5881,8 +5881,7 @@ make_lispy_event (event) | |||
| 5881 | spec[1] = event->y; | 5881 | spec[1] = event->y; |
| 5882 | return Fcons (Qmac_apple_event, | 5882 | return Fcons (Qmac_apple_event, |
| 5883 | Fcons (Fvector (2, spec), | 5883 | Fcons (Fvector (2, spec), |
| 5884 | Fcons (mac_make_lispy_event_code (event->code), | 5884 | Fcons (event->arg, Qnil))); |
| 5885 | Qnil))); | ||
| 5886 | } | 5885 | } |
| 5887 | #endif | 5886 | #endif |
| 5888 | 5887 | ||
diff --git a/src/keymap.c b/src/keymap.c index f5aea3b3902..fb506200a1c 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2120,12 +2120,21 @@ push_key_description (c, p, force_multibyte) | |||
| 2120 | int force_multibyte; | 2120 | int force_multibyte; |
| 2121 | { | 2121 | { |
| 2122 | unsigned c2; | 2122 | unsigned c2; |
| 2123 | int valid_p; | ||
| 2123 | 2124 | ||
| 2124 | /* Clear all the meaningless bits above the meta bit. */ | 2125 | /* Clear all the meaningless bits above the meta bit. */ |
| 2125 | c &= meta_modifier | ~ - meta_modifier; | 2126 | c &= meta_modifier | ~ - meta_modifier; |
| 2126 | c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier | 2127 | c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier |
| 2127 | | meta_modifier | shift_modifier | super_modifier); | 2128 | | meta_modifier | shift_modifier | super_modifier); |
| 2128 | 2129 | ||
| 2130 | valid_p = SINGLE_BYTE_CHAR_P (c2) || char_valid_p (c2, 0); | ||
| 2131 | if (! valid_p) | ||
| 2132 | { | ||
| 2133 | /* KEY_DESCRIPTION_SIZE is large enough for this. */ | ||
| 2134 | p += sprintf (p, "[%d]", c); | ||
| 2135 | return p; | ||
| 2136 | } | ||
| 2137 | |||
| 2129 | if (c & alt_modifier) | 2138 | if (c & alt_modifier) |
| 2130 | { | 2139 | { |
| 2131 | *p++ = 'A'; | 2140 | *p++ = 'A'; |
| @@ -3310,7 +3319,9 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3310 | tem = shadow_lookup (shadow, kludge, Qt); | 3319 | tem = shadow_lookup (shadow, kludge, Qt); |
| 3311 | if (!NILP (tem)) | 3320 | if (!NILP (tem)) |
| 3312 | { | 3321 | { |
| 3313 | if (mention_shadow) | 3322 | /* Avoid generating duplicate entries if the |
| 3323 | shadowed binding has the same definition. */ | ||
| 3324 | if (mention_shadow && !EQ (tem, definition)) | ||
| 3314 | this_shadowed = 1; | 3325 | this_shadowed = 1; |
| 3315 | else | 3326 | else |
| 3316 | continue; | 3327 | continue; |
| @@ -272,7 +272,7 @@ static Lisp_Object Qundecoded_file_name; | |||
| 272 | 272 | ||
| 273 | static Lisp_Object | 273 | static Lisp_Object |
| 274 | mac_aelist_to_lisp (desc_list) | 274 | mac_aelist_to_lisp (desc_list) |
| 275 | AEDescList *desc_list; | 275 | const AEDescList *desc_list; |
| 276 | { | 276 | { |
| 277 | OSErr err; | 277 | OSErr err; |
| 278 | long count; | 278 | long count; |
| @@ -337,7 +337,7 @@ mac_aelist_to_lisp (desc_list) | |||
| 337 | 337 | ||
| 338 | Lisp_Object | 338 | Lisp_Object |
| 339 | mac_aedesc_to_lisp (desc) | 339 | mac_aedesc_to_lisp (desc) |
| 340 | AEDesc *desc; | 340 | const AEDesc *desc; |
| 341 | { | 341 | { |
| 342 | OSErr err = noErr; | 342 | OSErr err = noErr; |
| 343 | DescType desc_type = desc->descriptorType; | 343 | DescType desc_type = desc->descriptorType; |
| @@ -665,33 +665,46 @@ init_coercion_handler () | |||
| 665 | } | 665 | } |
| 666 | 666 | ||
| 667 | #if TARGET_API_MAC_CARBON | 667 | #if TARGET_API_MAC_CARBON |
| 668 | OSErr | 668 | static OSErr |
| 669 | create_apple_event_from_event_ref (event, num_params, names, types, result) | 669 | create_apple_event (class, id, result) |
| 670 | EventRef event; | 670 | AEEventClass class; |
| 671 | UInt32 num_params; | 671 | AEEventID id; |
| 672 | EventParamName *names; | ||
| 673 | EventParamType *types; | ||
| 674 | AppleEvent *result; | 672 | AppleEvent *result; |
| 675 | { | 673 | { |
| 676 | OSErr err; | 674 | OSErr err; |
| 677 | static const ProcessSerialNumber psn = {0, kCurrentProcess}; | 675 | static const ProcessSerialNumber psn = {0, kCurrentProcess}; |
| 678 | AEAddressDesc address_desc; | 676 | AEAddressDesc address_desc; |
| 679 | UInt32 i, size; | ||
| 680 | CFStringRef string; | ||
| 681 | CFDataRef data; | ||
| 682 | char *buf; | ||
| 683 | 677 | ||
| 684 | err = AECreateDesc (typeProcessSerialNumber, &psn, | 678 | err = AECreateDesc (typeProcessSerialNumber, &psn, |
| 685 | sizeof (ProcessSerialNumber), &address_desc); | 679 | sizeof (ProcessSerialNumber), &address_desc); |
| 686 | if (err == noErr) | 680 | if (err == noErr) |
| 687 | { | 681 | { |
| 688 | err = AECreateAppleEvent (0, 0, /* Dummy class and ID. */ | 682 | err = AECreateAppleEvent (class, id, |
| 689 | &address_desc, /* NULL is not allowed | 683 | &address_desc, /* NULL is not allowed |
| 690 | on Mac OS Classic. */ | 684 | on Mac OS Classic. */ |
| 691 | kAutoGenerateReturnID, | 685 | kAutoGenerateReturnID, |
| 692 | kAnyTransactionID, result); | 686 | kAnyTransactionID, result); |
| 693 | AEDisposeDesc (&address_desc); | 687 | AEDisposeDesc (&address_desc); |
| 694 | } | 688 | } |
| 689 | |||
| 690 | return err; | ||
| 691 | } | ||
| 692 | |||
| 693 | OSErr | ||
| 694 | create_apple_event_from_event_ref (event, num_params, names, types, result) | ||
| 695 | EventRef event; | ||
| 696 | UInt32 num_params; | ||
| 697 | EventParamName *names; | ||
| 698 | EventParamType *types; | ||
| 699 | AppleEvent *result; | ||
| 700 | { | ||
| 701 | OSErr err; | ||
| 702 | UInt32 i, size; | ||
| 703 | CFStringRef string; | ||
| 704 | CFDataRef data; | ||
| 705 | char *buf = NULL; | ||
| 706 | |||
| 707 | err = create_apple_event (0, 0, result); /* Dummy class and ID. */ | ||
| 695 | if (err != noErr) | 708 | if (err != noErr) |
| 696 | return err; | 709 | return err; |
| 697 | 710 | ||
| @@ -721,19 +734,88 @@ create_apple_event_from_event_ref (event, num_params, names, types, result) | |||
| 721 | 0, &size, NULL); | 734 | 0, &size, NULL); |
| 722 | if (err != noErr) | 735 | if (err != noErr) |
| 723 | break; | 736 | break; |
| 724 | buf = xmalloc (size); | 737 | buf = xrealloc (buf, size); |
| 725 | err = GetEventParameter (event, names[i], types[i], NULL, | 738 | err = GetEventParameter (event, names[i], types[i], NULL, |
| 726 | size, NULL, buf); | 739 | size, NULL, buf); |
| 727 | if (err == noErr) | 740 | if (err == noErr) |
| 728 | AEPutParamPtr (result, names[i], types[i], buf, size); | 741 | AEPutParamPtr (result, names[i], types[i], buf, size); |
| 729 | xfree (buf); | ||
| 730 | break; | 742 | break; |
| 731 | } | 743 | } |
| 744 | if (buf) | ||
| 745 | xfree (buf); | ||
| 732 | 746 | ||
| 733 | return noErr; | 747 | return noErr; |
| 734 | } | 748 | } |
| 735 | #endif | ||
| 736 | 749 | ||
| 750 | OSErr | ||
| 751 | create_apple_event_from_drag_ref (drag, num_types, types, result) | ||
| 752 | DragRef drag; | ||
| 753 | UInt32 num_types; | ||
| 754 | FlavorType *types; | ||
| 755 | AppleEvent *result; | ||
| 756 | { | ||
| 757 | OSErr err; | ||
| 758 | UInt16 num_items; | ||
| 759 | AppleEvent items; | ||
| 760 | long index; | ||
| 761 | char *buf = NULL; | ||
| 762 | |||
| 763 | err = CountDragItems (drag, &num_items); | ||
| 764 | if (err != noErr) | ||
| 765 | return err; | ||
| 766 | err = AECreateList (NULL, 0, false, &items); | ||
| 767 | if (err != noErr) | ||
| 768 | return err; | ||
| 769 | |||
| 770 | for (index = 1; index <= num_items; index++) | ||
| 771 | { | ||
| 772 | ItemReference item; | ||
| 773 | DescType desc_type = typeNull; | ||
| 774 | Size size; | ||
| 775 | |||
| 776 | err = GetDragItemReferenceNumber (drag, index, &item); | ||
| 777 | if (err == noErr) | ||
| 778 | { | ||
| 779 | int i; | ||
| 780 | |||
| 781 | for (i = 0; i < num_types; i++) | ||
| 782 | { | ||
| 783 | err = GetFlavorDataSize (drag, item, types[i], &size); | ||
| 784 | if (err == noErr) | ||
| 785 | { | ||
| 786 | buf = xrealloc (buf, size); | ||
| 787 | err = GetFlavorData (drag, item, types[i], buf, &size, 0); | ||
| 788 | } | ||
| 789 | if (err == noErr) | ||
| 790 | { | ||
| 791 | desc_type = types[i]; | ||
| 792 | break; | ||
| 793 | } | ||
| 794 | } | ||
| 795 | } | ||
| 796 | err = AEPutPtr (&items, index, desc_type, | ||
| 797 | desc_type != typeNull ? buf : NULL, | ||
| 798 | desc_type != typeNull ? size : 0); | ||
| 799 | if (err != noErr) | ||
| 800 | break; | ||
| 801 | } | ||
| 802 | if (buf) | ||
| 803 | xfree (buf); | ||
| 804 | |||
| 805 | if (err == noErr) | ||
| 806 | { | ||
| 807 | err = create_apple_event (0, 0, result); /* Dummy class and ID. */ | ||
| 808 | if (err == noErr) | ||
| 809 | err = AEPutParamDesc (result, keyDirectObject, &items); | ||
| 810 | if (err != noErr) | ||
| 811 | AEDisposeDesc (result); | ||
| 812 | } | ||
| 813 | |||
| 814 | AEDisposeDesc (&items); | ||
| 815 | |||
| 816 | return err; | ||
| 817 | } | ||
| 818 | #endif /* TARGET_API_MAC_CARBON */ | ||
| 737 | 819 | ||
| 738 | /*********************************************************************** | 820 | /*********************************************************************** |
| 739 | Conversion between Lisp and Core Foundation objects | 821 | Conversion between Lisp and Core Foundation objects |
| @@ -4686,16 +4768,6 @@ On successful conversion, return the result string, else return nil. */) | |||
| 4686 | #endif /* TARGET_API_MAC_CARBON */ | 4768 | #endif /* TARGET_API_MAC_CARBON */ |
| 4687 | 4769 | ||
| 4688 | 4770 | ||
| 4689 | DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, Smac_clear_font_name_table, 0, 0, 0, | ||
| 4690 | doc: /* Clear the font name table. */) | ||
| 4691 | () | ||
| 4692 | { | ||
| 4693 | check_mac (); | ||
| 4694 | mac_clear_font_name_table (); | ||
| 4695 | return Qnil; | ||
| 4696 | } | ||
| 4697 | |||
| 4698 | |||
| 4699 | static Lisp_Object | 4771 | static Lisp_Object |
| 4700 | mac_get_system_locale () | 4772 | mac_get_system_locale () |
| 4701 | { | 4773 | { |
| @@ -5167,7 +5239,6 @@ syms_of_mac () | |||
| 5167 | defsubr (&Smac_get_preference); | 5239 | defsubr (&Smac_get_preference); |
| 5168 | defsubr (&Smac_code_convert_string); | 5240 | defsubr (&Smac_code_convert_string); |
| 5169 | #endif | 5241 | #endif |
| 5170 | defsubr (&Smac_clear_font_name_table); | ||
| 5171 | 5242 | ||
| 5172 | defsubr (&Smac_set_file_creator); | 5243 | defsubr (&Smac_set_file_creator); |
| 5173 | defsubr (&Smac_set_file_type); | 5244 | defsubr (&Smac_set_file_type); |
diff --git a/src/macfns.c b/src/macfns.c index 74b5288e781..8e0d5153034 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -1091,7 +1091,7 @@ x_to_mac_color (colorname) | |||
| 1091 | char *color; | 1091 | char *color; |
| 1092 | unsigned long colorval; | 1092 | unsigned long colorval; |
| 1093 | int i, pos; | 1093 | int i, pos; |
| 1094 | pos = 0; | 1094 | pos = 16; |
| 1095 | 1095 | ||
| 1096 | colorval = 0; | 1096 | colorval = 0; |
| 1097 | color = colorname + 4; | 1097 | color = colorname + 4; |
| @@ -1127,7 +1127,7 @@ x_to_mac_color (colorname) | |||
| 1127 | if (value == ULONG_MAX) | 1127 | if (value == ULONG_MAX) |
| 1128 | break; | 1128 | break; |
| 1129 | colorval |= (value << pos); | 1129 | colorval |= (value << pos); |
| 1130 | pos += 0x8; | 1130 | pos -= 0x8; |
| 1131 | if (i == 2) | 1131 | if (i == 2) |
| 1132 | { | 1132 | { |
| 1133 | if (*end != '\0') | 1133 | if (*end != '\0') |
| @@ -1146,7 +1146,7 @@ x_to_mac_color (colorname) | |||
| 1146 | char *color; | 1146 | char *color; |
| 1147 | unsigned long colorval; | 1147 | unsigned long colorval; |
| 1148 | int i, pos; | 1148 | int i, pos; |
| 1149 | pos = 0; | 1149 | pos = 16; |
| 1150 | 1150 | ||
| 1151 | colorval = 0; | 1151 | colorval = 0; |
| 1152 | color = colorname + 5; | 1152 | color = colorname + 5; |
| @@ -1168,7 +1168,7 @@ x_to_mac_color (colorname) | |||
| 1168 | if (val == 0x100) | 1168 | if (val == 0x100) |
| 1169 | val = 0xFF; | 1169 | val = 0xFF; |
| 1170 | colorval |= (val << pos); | 1170 | colorval |= (val << pos); |
| 1171 | pos += 0x8; | 1171 | pos -= 0x8; |
| 1172 | if (i == 2) | 1172 | if (i == 2) |
| 1173 | { | 1173 | { |
| 1174 | if (*end != '\0') | 1174 | if (*end != '\0') |
| @@ -1919,6 +1919,27 @@ mac_set_scroll_bar_width (f, arg, oldval) | |||
| 1919 | x_set_scroll_bar_width (f, arg, oldval); | 1919 | x_set_scroll_bar_width (f, arg, oldval); |
| 1920 | } | 1920 | } |
| 1921 | 1921 | ||
| 1922 | static void | ||
| 1923 | mac_set_font (f, arg, oldval) | ||
| 1924 | struct frame *f; | ||
| 1925 | Lisp_Object arg, oldval; | ||
| 1926 | { | ||
| 1927 | x_set_font (f, arg, oldval); | ||
| 1928 | #if USE_MAC_FONT_PANEL | ||
| 1929 | { | ||
| 1930 | Lisp_Object focus_frame = x_get_focus_frame (f); | ||
| 1931 | |||
| 1932 | if ((NILP (focus_frame) && f == SELECTED_FRAME ()) | ||
| 1933 | || XFRAME (focus_frame) == f) | ||
| 1934 | { | ||
| 1935 | BLOCK_INPUT; | ||
| 1936 | mac_set_font_info_for_selection (f, DEFAULT_FACE_ID, 0); | ||
| 1937 | UNBLOCK_INPUT; | ||
| 1938 | } | ||
| 1939 | } | ||
| 1940 | #endif | ||
| 1941 | } | ||
| 1942 | |||
| 1922 | #if TARGET_API_MAC_CARBON | 1943 | #if TARGET_API_MAC_CARBON |
| 1923 | static void | 1944 | static void |
| 1924 | mac_update_proxy_icon (f) | 1945 | mac_update_proxy_icon (f) |
| @@ -2213,8 +2234,10 @@ mac_window (f) | |||
| 2213 | #if TARGET_API_MAC_CARBON | 2234 | #if TARGET_API_MAC_CARBON |
| 2214 | CreateNewWindow (kDocumentWindowClass, | 2235 | CreateNewWindow (kDocumentWindowClass, |
| 2215 | kWindowStandardDocumentAttributes | 2236 | kWindowStandardDocumentAttributes |
| 2216 | /* | kWindowToolbarButtonAttribute */, | 2237 | #ifdef MAC_OSX |
| 2217 | &r, &FRAME_MAC_WINDOW (f)); | 2238 | | kWindowToolbarButtonAttribute |
| 2239 | #endif | ||
| 2240 | , &r, &FRAME_MAC_WINDOW (f)); | ||
| 2218 | if (FRAME_MAC_WINDOW (f)) | 2241 | if (FRAME_MAC_WINDOW (f)) |
| 2219 | { | 2242 | { |
| 2220 | SetWRefCon (FRAME_MAC_WINDOW (f), (long) f->output_data.mac); | 2243 | SetWRefCon (FRAME_MAC_WINDOW (f), (long) f->output_data.mac); |
| @@ -4469,6 +4492,43 @@ mac_nav_event_callback (selector, parms, data) | |||
| 4469 | #endif | 4492 | #endif |
| 4470 | 4493 | ||
| 4471 | /*********************************************************************** | 4494 | /*********************************************************************** |
| 4495 | Fonts | ||
| 4496 | ***********************************************************************/ | ||
| 4497 | |||
| 4498 | DEFUN ("mac-clear-font-name-table", Fmac_clear_font_name_table, | ||
| 4499 | Smac_clear_font_name_table, 0, 0, 0, | ||
| 4500 | doc: /* Clear the font name table. */) | ||
| 4501 | () | ||
| 4502 | { | ||
| 4503 | check_mac (); | ||
| 4504 | mac_clear_font_name_table (); | ||
| 4505 | return Qnil; | ||
| 4506 | } | ||
| 4507 | |||
| 4508 | #if USE_MAC_FONT_PANEL | ||
| 4509 | DEFUN ("mac-set-font-panel-visibility", Fmac_set_font_panel_visibility, | ||
| 4510 | Smac_set_font_panel_visibility, 1, 1, 0, | ||
| 4511 | doc: /* Make the font panel visible if and only if VISIBLE is non-nil. | ||
| 4512 | This is for internal use only. Use `mac-font-panel-mode' instead. */) | ||
| 4513 | (visible) | ||
| 4514 | Lisp_Object visible; | ||
| 4515 | { | ||
| 4516 | OSStatus err = noErr; | ||
| 4517 | |||
| 4518 | check_mac (); | ||
| 4519 | |||
| 4520 | BLOCK_INPUT; | ||
| 4521 | if (NILP (visible) == (FPIsFontPanelVisible () == true)) | ||
| 4522 | err = FPShowHideFontPanel (); | ||
| 4523 | UNBLOCK_INPUT; | ||
| 4524 | |||
| 4525 | if (err != noErr) | ||
| 4526 | error ("Cannot change visibility of the font panel"); | ||
| 4527 | return Qnil; | ||
| 4528 | } | ||
| 4529 | #endif | ||
| 4530 | |||
| 4531 | /*********************************************************************** | ||
| 4472 | Initialization | 4532 | Initialization |
| 4473 | ***********************************************************************/ | 4533 | ***********************************************************************/ |
| 4474 | 4534 | ||
| @@ -4484,7 +4544,7 @@ frame_parm_handler mac_frame_parm_handlers[] = | |||
| 4484 | x_set_border_width, | 4544 | x_set_border_width, |
| 4485 | x_set_cursor_color, | 4545 | x_set_cursor_color, |
| 4486 | x_set_cursor_type, | 4546 | x_set_cursor_type, |
| 4487 | x_set_font, | 4547 | mac_set_font, |
| 4488 | x_set_foreground_color, | 4548 | x_set_foreground_color, |
| 4489 | x_set_icon_name, | 4549 | x_set_icon_name, |
| 4490 | 0, /* MAC_TODO: x_set_icon_type, */ | 4550 | 0, /* MAC_TODO: x_set_icon_type, */ |
| @@ -4660,7 +4720,7 @@ Chinese, Japanese, and Korean. */); | |||
| 4660 | load_font_func = x_load_font; | 4720 | load_font_func = x_load_font; |
| 4661 | find_ccl_program_func = x_find_ccl_program; | 4721 | find_ccl_program_func = x_find_ccl_program; |
| 4662 | query_font_func = x_query_font; | 4722 | query_font_func = x_query_font; |
| 4663 | set_frame_fontset_func = x_set_font; | 4723 | set_frame_fontset_func = mac_set_font; |
| 4664 | check_window_system_func = check_mac; | 4724 | check_window_system_func = check_mac; |
| 4665 | 4725 | ||
| 4666 | hourglass_atimer = NULL; | 4726 | hourglass_atimer = NULL; |
| @@ -4679,6 +4739,10 @@ Chinese, Japanese, and Korean. */); | |||
| 4679 | #if TARGET_API_MAC_CARBON | 4739 | #if TARGET_API_MAC_CARBON |
| 4680 | defsubr (&Sx_file_dialog); | 4740 | defsubr (&Sx_file_dialog); |
| 4681 | #endif | 4741 | #endif |
| 4742 | defsubr (&Smac_clear_font_name_table); | ||
| 4743 | #if USE_MAC_FONT_PANEL | ||
| 4744 | defsubr (&Smac_set_font_panel_visibility); | ||
| 4745 | #endif | ||
| 4682 | } | 4746 | } |
| 4683 | 4747 | ||
| 4684 | /* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc | 4748 | /* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc |
diff --git a/src/macgui.h b/src/macgui.h index c09f1a8d173..690840c6c33 100644 --- a/src/macgui.h +++ b/src/macgui.h | |||
| @@ -105,6 +105,13 @@ typedef unsigned long Time; | |||
| 105 | #endif | 105 | #endif |
| 106 | #endif | 106 | #endif |
| 107 | 107 | ||
| 108 | /* Whether to use the standard Font Panel floating dialog. */ | ||
| 109 | #ifndef USE_MAC_FONT_PANEL | ||
| 110 | #if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 | ||
| 111 | #define USE_MAC_FONT_PANEL 1 | ||
| 112 | #endif | ||
| 113 | #endif | ||
| 114 | |||
| 108 | typedef WindowPtr Window; | 115 | typedef WindowPtr Window; |
| 109 | typedef GWorldPtr Pixmap; | 116 | typedef GWorldPtr Pixmap; |
| 110 | 117 | ||
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) | |||
| 318 | menu_items_n_panes = XINT (XCAR (saved)); | 318 | menu_items_n_panes = XINT (XCAR (saved)); |
| 319 | saved = XCDR (saved); | 319 | saved = XCDR (saved); |
| 320 | menu_items_submenu_depth = XINT (XCAR (saved)); | 320 | menu_items_submenu_depth = XINT (XCAR (saved)); |
| 321 | return Qnil; | ||
| 321 | } | 322 | } |
| 322 | 323 | ||
| 323 | /* Push the whole state of menu_items processing onto the specpdl. | 324 | /* Push the whole state of menu_items processing onto the specpdl. |
| @@ -634,6 +635,7 @@ cleanup_popup_menu (arg) | |||
| 634 | Lisp_Object arg; | 635 | Lisp_Object arg; |
| 635 | { | 636 | { |
| 636 | discard_menu_items (); | 637 | discard_menu_items (); |
| 638 | return Qnil; | ||
| 637 | } | 639 | } |
| 638 | 640 | ||
| 639 | DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0, | 641 | 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..1b6a1a46cc3 100644 --- a/src/macselect.c +++ b/src/macselect.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Selection processing for Emacs on Mac OS. | 1 | /* Selection processing for Emacs on Mac OS. |
| 2 | Copyright (C) 2005 Free Software Foundation, Inc. | 2 | Copyright (C) 2005, 2006 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -101,7 +101,7 @@ static Lisp_Object Qmac_scrap_name, Qmac_ostype; | |||
| 101 | 101 | ||
| 102 | #ifdef MAC_OSX | 102 | #ifdef MAC_OSX |
| 103 | /* Selection name for communication via Services menu. */ | 103 | /* Selection name for communication via Services menu. */ |
| 104 | static Lisp_Object Vmac_services_selection; | 104 | static Lisp_Object Vmac_service_selection; |
| 105 | #endif | 105 | #endif |
| 106 | 106 | ||
| 107 | /* Get a reference to the scrap corresponding to the symbol SYM. The | 107 | /* Get a reference to the scrap corresponding to the symbol SYM. The |
| @@ -918,8 +918,8 @@ static struct | |||
| 918 | int size, count; | 918 | int size, count; |
| 919 | } deferred_apple_events; | 919 | } deferred_apple_events; |
| 920 | extern Lisp_Object Qundefined; | 920 | extern Lisp_Object Qundefined; |
| 921 | extern OSErr mac_store_apple_event P_ ((Lisp_Object, Lisp_Object, | 921 | extern void mac_store_apple_event P_ ((Lisp_Object, Lisp_Object, |
| 922 | const AEDesc *)); | 922 | const AEDesc *)); |
| 923 | 923 | ||
| 924 | struct apple_event_binding | 924 | struct apple_event_binding |
| 925 | { | 925 | { |
| @@ -1079,9 +1079,8 @@ mac_handle_apple_event (apple_event, reply, refcon) | |||
| 1079 | { | 1079 | { |
| 1080 | if (INTEGERP (binding)) | 1080 | if (INTEGERP (binding)) |
| 1081 | return XINT (binding); | 1081 | return XINT (binding); |
| 1082 | err = mac_store_apple_event (class_key, id_key, apple_event); | 1082 | mac_store_apple_event (class_key, id_key, apple_event); |
| 1083 | if (err == noErr) | 1083 | return noErr; |
| 1084 | return noErr; | ||
| 1085 | } | 1084 | } |
| 1086 | } | 1085 | } |
| 1087 | return errAEEventNotHandled; | 1086 | return errAEEventNotHandled; |
| @@ -1146,6 +1145,198 @@ DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events, | |||
| 1146 | } | 1145 | } |
| 1147 | 1146 | ||
| 1148 | 1147 | ||
| 1148 | #if TARGET_API_MAC_CARBON | ||
| 1149 | static Lisp_Object Vmac_dnd_known_types; | ||
| 1150 | static pascal OSErr mac_do_track_drag P_ ((DragTrackingMessage, WindowRef, | ||
| 1151 | void *, DragRef)); | ||
| 1152 | static pascal OSErr mac_do_receive_drag P_ ((WindowRef, void *, DragRef)); | ||
| 1153 | static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL; | ||
| 1154 | static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL; | ||
| 1155 | |||
| 1156 | extern void mac_store_drag_event P_ ((WindowRef, Point, SInt16, | ||
| 1157 | const AEDesc *)); | ||
| 1158 | |||
| 1159 | static pascal OSErr | ||
| 1160 | mac_do_track_drag (message, window, refcon, drag) | ||
| 1161 | DragTrackingMessage message; | ||
| 1162 | WindowRef window; | ||
| 1163 | void *refcon; | ||
| 1164 | DragRef drag; | ||
| 1165 | { | ||
| 1166 | OSErr err = noErr; | ||
| 1167 | static int can_accept; | ||
| 1168 | UInt16 num_items, index; | ||
| 1169 | |||
| 1170 | if (GetFrontWindowOfClass (kMovableModalWindowClass, false)) | ||
| 1171 | return dragNotAcceptedErr; | ||
| 1172 | |||
| 1173 | switch (message) | ||
| 1174 | { | ||
| 1175 | case kDragTrackingEnterHandler: | ||
| 1176 | err = CountDragItems (drag, &num_items); | ||
| 1177 | if (err != noErr) | ||
| 1178 | break; | ||
| 1179 | can_accept = 0; | ||
| 1180 | for (index = 1; index <= num_items; index++) | ||
| 1181 | { | ||
| 1182 | ItemReference item; | ||
| 1183 | FlavorFlags flags; | ||
| 1184 | Lisp_Object rest; | ||
| 1185 | |||
| 1186 | err = GetDragItemReferenceNumber (drag, index, &item); | ||
| 1187 | if (err != noErr) | ||
| 1188 | continue; | ||
| 1189 | for (rest = Vmac_dnd_known_types; CONSP (rest); rest = XCDR (rest)) | ||
| 1190 | { | ||
| 1191 | Lisp_Object str; | ||
| 1192 | FlavorType type; | ||
| 1193 | |||
| 1194 | str = XCAR (rest); | ||
| 1195 | if (!(STRINGP (str) && SBYTES (str) == 4)) | ||
| 1196 | continue; | ||
| 1197 | type = EndianU32_BtoN (*((UInt32 *) SDATA (str))); | ||
| 1198 | |||
| 1199 | err = GetFlavorFlags (drag, item, type, &flags); | ||
| 1200 | if (err == noErr) | ||
| 1201 | { | ||
| 1202 | can_accept = 1; | ||
| 1203 | break; | ||
| 1204 | } | ||
| 1205 | } | ||
| 1206 | } | ||
| 1207 | break; | ||
| 1208 | |||
| 1209 | case kDragTrackingEnterWindow: | ||
| 1210 | if (can_accept) | ||
| 1211 | { | ||
| 1212 | RgnHandle hilite_rgn = NewRgn (); | ||
| 1213 | |||
| 1214 | if (hilite_rgn) | ||
| 1215 | { | ||
| 1216 | Rect r; | ||
| 1217 | |||
| 1218 | GetWindowPortBounds (window, &r); | ||
| 1219 | OffsetRect (&r, -r.left, -r.top); | ||
| 1220 | RectRgn (hilite_rgn, &r); | ||
| 1221 | ShowDragHilite (drag, hilite_rgn, true); | ||
| 1222 | DisposeRgn (hilite_rgn); | ||
| 1223 | } | ||
| 1224 | SetThemeCursor (kThemeCopyArrowCursor); | ||
| 1225 | } | ||
| 1226 | break; | ||
| 1227 | |||
| 1228 | case kDragTrackingInWindow: | ||
| 1229 | break; | ||
| 1230 | |||
| 1231 | case kDragTrackingLeaveWindow: | ||
| 1232 | if (can_accept) | ||
| 1233 | { | ||
| 1234 | HideDragHilite (drag); | ||
| 1235 | SetThemeCursor (kThemeArrowCursor); | ||
| 1236 | } | ||
| 1237 | break; | ||
| 1238 | |||
| 1239 | case kDragTrackingLeaveHandler: | ||
| 1240 | break; | ||
| 1241 | } | ||
| 1242 | |||
| 1243 | if (err != noErr) | ||
| 1244 | return dragNotAcceptedErr; | ||
| 1245 | return noErr; | ||
| 1246 | } | ||
| 1247 | |||
| 1248 | static pascal OSErr | ||
| 1249 | mac_do_receive_drag (window, refcon, drag) | ||
| 1250 | WindowRef window; | ||
| 1251 | void *refcon; | ||
| 1252 | DragRef drag; | ||
| 1253 | { | ||
| 1254 | OSErr err; | ||
| 1255 | int num_types, i; | ||
| 1256 | Lisp_Object rest, str; | ||
| 1257 | FlavorType *types; | ||
| 1258 | AppleEvent apple_event; | ||
| 1259 | Point mouse_pos; | ||
| 1260 | SInt16 modifiers; | ||
| 1261 | |||
| 1262 | if (GetFrontWindowOfClass (kMovableModalWindowClass, false)) | ||
| 1263 | return dragNotAcceptedErr; | ||
| 1264 | |||
| 1265 | num_types = 0; | ||
| 1266 | for (rest = Vmac_dnd_known_types; CONSP (rest); rest = XCDR (rest)) | ||
| 1267 | { | ||
| 1268 | str = XCAR (rest); | ||
| 1269 | if (STRINGP (str) && SBYTES (str) == 4) | ||
| 1270 | num_types++; | ||
| 1271 | } | ||
| 1272 | |||
| 1273 | types = xmalloc (sizeof (FlavorType) * num_types); | ||
| 1274 | i = 0; | ||
| 1275 | for (rest = Vmac_dnd_known_types; CONSP (rest); rest = XCDR (rest)) | ||
| 1276 | { | ||
| 1277 | str = XCAR (rest); | ||
| 1278 | if (STRINGP (str) && SBYTES (str) == 4) | ||
| 1279 | types[i++] = EndianU32_BtoN (*((UInt32 *) SDATA (str))); | ||
| 1280 | } | ||
| 1281 | |||
| 1282 | err = create_apple_event_from_drag_ref (drag, num_types, types, | ||
| 1283 | &apple_event); | ||
| 1284 | xfree (types); | ||
| 1285 | |||
| 1286 | if (err == noErr) | ||
| 1287 | err = GetDragMouse (drag, &mouse_pos, NULL); | ||
| 1288 | if (err == noErr) | ||
| 1289 | { | ||
| 1290 | GlobalToLocal (&mouse_pos); | ||
| 1291 | err = GetDragModifiers (drag, NULL, NULL, &modifiers); | ||
| 1292 | } | ||
| 1293 | |||
| 1294 | if (err == noErr) | ||
| 1295 | { | ||
| 1296 | mac_store_drag_event (window, mouse_pos, modifiers, &apple_event); | ||
| 1297 | AEDisposeDesc (&apple_event); | ||
| 1298 | /* Post a harmless event so as to wake up from ReceiveNextEvent. */ | ||
| 1299 | mac_post_mouse_moved_event (); | ||
| 1300 | return noErr; | ||
| 1301 | } | ||
| 1302 | else | ||
| 1303 | return dragNotAcceptedErr; | ||
| 1304 | } | ||
| 1305 | #endif /* TARGET_API_MAC_CARBON */ | ||
| 1306 | |||
| 1307 | OSErr | ||
| 1308 | install_drag_handler (window) | ||
| 1309 | WindowRef window; | ||
| 1310 | { | ||
| 1311 | OSErr err = noErr; | ||
| 1312 | |||
| 1313 | #if TARGET_API_MAC_CARBON | ||
| 1314 | if (mac_do_track_dragUPP == NULL) | ||
| 1315 | mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag); | ||
| 1316 | if (mac_do_receive_dragUPP == NULL) | ||
| 1317 | mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag); | ||
| 1318 | |||
| 1319 | err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL); | ||
| 1320 | if (err == noErr) | ||
| 1321 | err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL); | ||
| 1322 | #endif | ||
| 1323 | |||
| 1324 | return err; | ||
| 1325 | } | ||
| 1326 | |||
| 1327 | void | ||
| 1328 | remove_drag_handler (window) | ||
| 1329 | WindowRef window; | ||
| 1330 | { | ||
| 1331 | #if TARGET_API_MAC_CARBON | ||
| 1332 | if (mac_do_track_dragUPP) | ||
| 1333 | RemoveTrackingHandler (mac_do_track_dragUPP, window); | ||
| 1334 | if (mac_do_receive_dragUPP) | ||
| 1335 | RemoveReceiveHandler (mac_do_receive_dragUPP, window); | ||
| 1336 | #endif | ||
| 1337 | } | ||
| 1338 | |||
| 1339 | |||
| 1149 | #ifdef MAC_OSX | 1340 | #ifdef MAC_OSX |
| 1150 | void | 1341 | void |
| 1151 | init_service_handler () | 1342 | init_service_handler () |
| @@ -1158,7 +1349,7 @@ init_service_handler () | |||
| 1158 | GetEventTypeCount (specs), specs, NULL, NULL); | 1349 | GetEventTypeCount (specs), specs, NULL, NULL); |
| 1159 | } | 1350 | } |
| 1160 | 1351 | ||
| 1161 | extern OSErr mac_store_services_event P_ ((EventRef)); | 1352 | extern OSStatus mac_store_service_event P_ ((EventRef)); |
| 1162 | 1353 | ||
| 1163 | static OSStatus | 1354 | static OSStatus |
| 1164 | copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type) | 1355 | copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type) |
| @@ -1215,12 +1406,12 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1215 | Lisp_Object rest; | 1406 | Lisp_Object rest; |
| 1216 | ScrapFlavorType flavor_type; | 1407 | ScrapFlavorType flavor_type; |
| 1217 | 1408 | ||
| 1218 | /* Check if Vmac_services_selection is a valid selection that has a | 1409 | /* Check if Vmac_service_selection is a valid selection that has a |
| 1219 | corresponding scrap. */ | 1410 | corresponding scrap. */ |
| 1220 | if (!SYMBOLP (Vmac_services_selection)) | 1411 | if (!SYMBOLP (Vmac_service_selection)) |
| 1221 | err = eventNotHandledErr; | 1412 | err = eventNotHandledErr; |
| 1222 | else | 1413 | else |
| 1223 | err = get_scrap_from_symbol (Vmac_services_selection, 0, &cur_scrap); | 1414 | err = get_scrap_from_symbol (Vmac_service_selection, 0, &cur_scrap); |
| 1224 | if (!(err == noErr && cur_scrap)) | 1415 | if (!(err == noErr && cur_scrap)) |
| 1225 | return eventNotHandledErr; | 1416 | return eventNotHandledErr; |
| 1226 | 1417 | ||
| @@ -1257,7 +1448,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1257 | if (err != noErr) | 1448 | if (err != noErr) |
| 1258 | break; | 1449 | break; |
| 1259 | 1450 | ||
| 1260 | if (NILP (Fx_selection_owner_p (Vmac_services_selection))) | 1451 | if (NILP (Fx_selection_owner_p (Vmac_service_selection))) |
| 1261 | break; | 1452 | break; |
| 1262 | else | 1453 | else |
| 1263 | goto copy_all_flavors; | 1454 | goto copy_all_flavors; |
| @@ -1267,7 +1458,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1267 | typeScrapRef, NULL, | 1458 | typeScrapRef, NULL, |
| 1268 | sizeof (ScrapRef), NULL, &specific_scrap); | 1459 | sizeof (ScrapRef), NULL, &specific_scrap); |
| 1269 | if (err != noErr | 1460 | if (err != noErr |
| 1270 | || NILP (Fx_selection_owner_p (Vmac_services_selection))) | 1461 | || NILP (Fx_selection_owner_p (Vmac_service_selection))) |
| 1271 | { | 1462 | { |
| 1272 | err = eventNotHandledErr; | 1463 | err = eventNotHandledErr; |
| 1273 | break; | 1464 | break; |
| @@ -1342,7 +1533,7 @@ mac_handle_service_event (call_ref, event, data) | |||
| 1342 | if (!data_exists_p) | 1533 | if (!data_exists_p) |
| 1343 | err = eventNotHandledErr; | 1534 | err = eventNotHandledErr; |
| 1344 | else | 1535 | else |
| 1345 | err = mac_store_services_event (event); | 1536 | err = mac_store_service_event (event); |
| 1346 | } | 1537 | } |
| 1347 | break; | 1538 | break; |
| 1348 | } | 1539 | } |
| @@ -1408,10 +1599,21 @@ set to nil. */); | |||
| 1408 | doc: /* Keymap for Apple events handled by Emacs. */); | 1599 | doc: /* Keymap for Apple events handled by Emacs. */); |
| 1409 | Vmac_apple_event_map = Qnil; | 1600 | Vmac_apple_event_map = Qnil; |
| 1410 | 1601 | ||
| 1602 | #if TARGET_API_MAC_CARBON | ||
| 1603 | DEFVAR_LISP ("mac-dnd-known-types", &Vmac_dnd_known_types, | ||
| 1604 | doc: /* The types accepted by default for dropped data. | ||
| 1605 | The types are chosen in the order they appear in the list. */); | ||
| 1606 | Vmac_dnd_known_types = list4 (build_string ("hfs "), build_string ("utxt"), | ||
| 1607 | build_string ("TEXT"), build_string ("TIFF")); | ||
| 1608 | #ifdef MAC_OSX | ||
| 1609 | Vmac_dnd_known_types = Fcons (build_string ("furl"), Vmac_dnd_known_types); | ||
| 1610 | #endif | ||
| 1611 | #endif | ||
| 1612 | |||
| 1411 | #ifdef MAC_OSX | 1613 | #ifdef MAC_OSX |
| 1412 | DEFVAR_LISP ("mac-services-selection", &Vmac_services_selection, | 1614 | DEFVAR_LISP ("mac-service-selection", &Vmac_service_selection, |
| 1413 | doc: /* Selection name for communication via Services menu. */); | 1615 | doc: /* Selection name for communication via Services menu. */); |
| 1414 | Vmac_services_selection = intern ("PRIMARY"); | 1616 | Vmac_service_selection = intern ("PRIMARY"); |
| 1415 | #endif | 1617 | #endif |
| 1416 | 1618 | ||
| 1417 | QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); | 1619 | QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); |
diff --git a/src/macterm.c b/src/macterm.c index 8ddd8febd69..e3b8b3b5881 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4099,6 +4099,11 @@ x_new_focus_frame (dpyinfo, frame) | |||
| 4099 | pending_autoraise_frame = dpyinfo->x_focus_frame; | 4099 | pending_autoraise_frame = dpyinfo->x_focus_frame; |
| 4100 | else | 4100 | else |
| 4101 | pending_autoraise_frame = 0; | 4101 | pending_autoraise_frame = 0; |
| 4102 | |||
| 4103 | #if USE_MAC_FONT_PANEL | ||
| 4104 | if (frame) | ||
| 4105 | mac_set_font_info_for_selection (frame, DEFAULT_FACE_ID, 0); | ||
| 4106 | #endif | ||
| 4102 | } | 4107 | } |
| 4103 | 4108 | ||
| 4104 | x_frame_rehighlight (dpyinfo); | 4109 | x_frame_rehighlight (dpyinfo); |
| @@ -4456,35 +4461,11 @@ scroll_bar_timer_callback (timer, data) | |||
| 4456 | EventLoopTimerRef timer; | 4461 | EventLoopTimerRef timer; |
| 4457 | void *data; | 4462 | void *data; |
| 4458 | { | 4463 | { |
| 4459 | EventRef event = NULL; | 4464 | OSStatus err; |
| 4460 | OSErr err; | ||
| 4461 | |||
| 4462 | err = CreateEvent (NULL, kEventClassMouse, kEventMouseMoved, 0, | ||
| 4463 | kEventAttributeNone, &event); | ||
| 4464 | if (err == noErr) | ||
| 4465 | { | ||
| 4466 | Point mouse_pos; | ||
| 4467 | |||
| 4468 | GetMouse (&mouse_pos); | ||
| 4469 | LocalToGlobal (&mouse_pos); | ||
| 4470 | err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint, | ||
| 4471 | sizeof (Point), &mouse_pos); | ||
| 4472 | } | ||
| 4473 | if (err == noErr) | ||
| 4474 | { | ||
| 4475 | UInt32 modifiers = GetCurrentKeyModifiers (); | ||
| 4476 | 4465 | ||
| 4477 | err = SetEventParameter (event, kEventParamKeyModifiers, typeUInt32, | 4466 | err = mac_post_mouse_moved_event (); |
| 4478 | sizeof (UInt32), &modifiers); | ||
| 4479 | } | ||
| 4480 | if (err == noErr) | ||
| 4481 | err = PostEventToQueue (GetCurrentEventQueue (), event, | ||
| 4482 | kEventPriorityStandard); | ||
| 4483 | if (err == noErr) | 4467 | if (err == noErr) |
| 4484 | scroll_bar_timer_event_posted_p = 1; | 4468 | scroll_bar_timer_event_posted_p = 1; |
| 4485 | |||
| 4486 | if (event) | ||
| 4487 | ReleaseEvent (event); | ||
| 4488 | } | 4469 | } |
| 4489 | 4470 | ||
| 4490 | static OSStatus | 4471 | static OSStatus |
| @@ -6386,7 +6367,12 @@ x_free_frame_resources (f) | |||
| 6386 | f->output_data.mac = NULL; | 6367 | f->output_data.mac = NULL; |
| 6387 | 6368 | ||
| 6388 | if (f == dpyinfo->x_focus_frame) | 6369 | if (f == dpyinfo->x_focus_frame) |
| 6389 | dpyinfo->x_focus_frame = 0; | 6370 | { |
| 6371 | dpyinfo->x_focus_frame = 0; | ||
| 6372 | #if USE_MAC_FONT_PANEL | ||
| 6373 | mac_set_font_info_for_selection (NULL, DEFAULT_FACE_ID, 0); | ||
| 6374 | #endif | ||
| 6375 | } | ||
| 6390 | if (f == dpyinfo->x_focus_event_frame) | 6376 | if (f == dpyinfo->x_focus_event_frame) |
| 6391 | dpyinfo->x_focus_event_frame = 0; | 6377 | dpyinfo->x_focus_event_frame = 0; |
| 6392 | if (f == dpyinfo->x_highlight_frame) | 6378 | if (f == dpyinfo->x_highlight_frame) |
| @@ -6742,10 +6728,6 @@ xlfdpat_create (pattern) | |||
| 6742 | } | 6728 | } |
| 6743 | 6729 | ||
| 6744 | return pat; | 6730 | return pat; |
| 6745 | |||
| 6746 | error: | ||
| 6747 | xlfdpat_destroy (pat); | ||
| 6748 | return NULL; | ||
| 6749 | } | 6731 | } |
| 6750 | 6732 | ||
| 6751 | static INLINE int | 6733 | static INLINE int |
| @@ -6914,6 +6896,8 @@ static Lisp_Object fm_font_family_alist; | |||
| 6914 | #if USE_ATSUI | 6896 | #if USE_ATSUI |
| 6915 | /* Hash table linking font family names to ATSU font IDs. */ | 6897 | /* Hash table linking font family names to ATSU font IDs. */ |
| 6916 | static Lisp_Object atsu_font_id_hash; | 6898 | static Lisp_Object atsu_font_id_hash; |
| 6899 | static Lisp_Object Vmac_atsu_font_table; | ||
| 6900 | extern Lisp_Object QCfamily, QCweight, QCslant, Qnormal, Qbold, Qitalic; | ||
| 6917 | #endif | 6901 | #endif |
| 6918 | 6902 | ||
| 6919 | /* Alist linking character set strings to Mac text encoding and Emacs | 6903 | /* Alist linking character set strings to Mac text encoding and Emacs |
| @@ -7209,8 +7193,21 @@ init_font_name_table () | |||
| 7209 | NULL, NULL); | 7193 | NULL, NULL); |
| 7210 | if (err == noErr) | 7194 | if (err == noErr) |
| 7211 | { | 7195 | { |
| 7196 | FMFontFamily ff; | ||
| 7197 | FMFontStyle style = normal; | ||
| 7198 | |||
| 7212 | decode_mac_font_name (name, name_len + 1, Qnil); | 7199 | decode_mac_font_name (name, name_len + 1, Qnil); |
| 7213 | family = make_unibyte_string (name, name_len); | 7200 | family = make_unibyte_string (name, name_len); |
| 7201 | FMGetFontFamilyInstanceFromFont (font_ids[i], &ff, &style); | ||
| 7202 | Fputhash (make_unibyte_string ((char *)(font_ids + i), | ||
| 7203 | sizeof (ATSUFontID)), | ||
| 7204 | Fcons (QCfamily, | ||
| 7205 | list5 (family, | ||
| 7206 | QCweight, | ||
| 7207 | style & bold ? Qbold : Qnormal, | ||
| 7208 | QCslant, | ||
| 7209 | style & italic ? Qitalic : Qnormal)), | ||
| 7210 | Vmac_atsu_font_table); | ||
| 7214 | if (*name != '.' | 7211 | if (*name != '.' |
| 7215 | && hash_lookup (h, family, &hash_code) < 0) | 7212 | && hash_lookup (h, family, &hash_code) < 0) |
| 7216 | { | 7213 | { |
| @@ -7756,6 +7753,7 @@ XLoadQueryFont (Display *dpy, char *fontname) | |||
| 7756 | ATSUFontFeatureSelector selectors[] = {kAllTypeFeaturesOffSelector, | 7753 | ATSUFontFeatureSelector selectors[] = {kAllTypeFeaturesOffSelector, |
| 7757 | kDecomposeDiacriticsSelector}; | 7754 | kDecomposeDiacriticsSelector}; |
| 7758 | Lisp_Object font_id_cons; | 7755 | Lisp_Object font_id_cons; |
| 7756 | FMFontStyle style; | ||
| 7759 | 7757 | ||
| 7760 | font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)), | 7758 | font_id_cons = Fgethash (make_unibyte_string (family, strlen (family)), |
| 7761 | atsu_font_id_hash, Qnil); | 7759 | atsu_font_id_hash, Qnil); |
| @@ -7774,7 +7772,11 @@ XLoadQueryFont (Display *dpy, char *fontname) | |||
| 7774 | return NULL; | 7772 | return NULL; |
| 7775 | err = ATSUSetAttributes (mac_style, sizeof (tags) / sizeof (tags[0]), | 7773 | err = ATSUSetAttributes (mac_style, sizeof (tags) / sizeof (tags[0]), |
| 7776 | tags, sizes, values); | 7774 | tags, sizes, values); |
| 7777 | fontnum = -1; | 7775 | if (err != noErr) |
| 7776 | return NULL; | ||
| 7777 | err = FMGetFontFamilyInstanceFromFont (font_id, &fontnum, &style); | ||
| 7778 | if (err != noErr) | ||
| 7779 | fontnum = -1; | ||
| 7778 | scriptcode = kTextEncodingMacUnicode; | 7780 | scriptcode = kTextEncodingMacUnicode; |
| 7779 | } | 7781 | } |
| 7780 | else | 7782 | else |
| @@ -7834,22 +7836,20 @@ XLoadQueryFont (Display *dpy, char *fontname) | |||
| 7834 | pcm_init (font->bounds.rows[0], 0x100); | 7836 | pcm_init (font->bounds.rows[0], 0x100); |
| 7835 | 7837 | ||
| 7836 | #if USE_CG_TEXT_DRAWING | 7838 | #if USE_CG_TEXT_DRAWING |
| 7837 | { | 7839 | if (fontnum != -1) |
| 7838 | FMFontFamily font_family; | 7840 | { |
| 7839 | FMFontStyle style; | 7841 | FMFontStyle style; |
| 7840 | ATSFontRef ats_font; | 7842 | ATSFontRef ats_font; |
| 7841 | 7843 | ||
| 7842 | err = FMGetFontFamilyInstanceFromFont (font_id, &font_family, &style); | 7844 | err = FMGetFontFromFontFamilyInstance (fontnum, fontface, |
| 7843 | if (err == noErr) | ||
| 7844 | err = FMGetFontFromFontFamilyInstance (font_family, fontface, | ||
| 7845 | &font_id, &style); | 7845 | &font_id, &style); |
| 7846 | /* Use CG text drawing if italic/bold is not synthesized. */ | 7846 | /* Use CG text drawing if italic/bold is not synthesized. */ |
| 7847 | if (err == noErr && style == fontface) | 7847 | if (err == noErr && style == fontface) |
| 7848 | { | 7848 | { |
| 7849 | ats_font = FMGetATSFontRefFromFont (font_id); | 7849 | ats_font = FMGetATSFontRefFromFont (font_id); |
| 7850 | font->cg_font = CGFontCreateWithPlatformFont (&ats_font); | 7850 | font->cg_font = CGFontCreateWithPlatformFont (&ats_font); |
| 7851 | } | 7851 | } |
| 7852 | } | 7852 | } |
| 7853 | 7853 | ||
| 7854 | if (font->cg_font) | 7854 | if (font->cg_font) |
| 7855 | { | 7855 | { |
| @@ -8340,6 +8340,55 @@ x_find_ccl_program (fontp) | |||
| 8340 | } | 8340 | } |
| 8341 | } | 8341 | } |
| 8342 | 8342 | ||
| 8343 | #if USE_MAC_FONT_PANEL | ||
| 8344 | OSStatus | ||
| 8345 | mac_set_font_info_for_selection (f, face_id, c) | ||
| 8346 | struct frame *f; | ||
| 8347 | int face_id, c; | ||
| 8348 | { | ||
| 8349 | OSStatus err; | ||
| 8350 | EventTargetRef target = NULL; | ||
| 8351 | XFontStruct *font = NULL; | ||
| 8352 | |||
| 8353 | if (f) | ||
| 8354 | { | ||
| 8355 | target = GetWindowEventTarget (FRAME_MAC_WINDOW (f)); | ||
| 8356 | |||
| 8357 | if (FRAME_FACE_CACHE (f) && CHAR_VALID_P (c, 0)) | ||
| 8358 | { | ||
| 8359 | struct face *face; | ||
| 8360 | |||
| 8361 | face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c); | ||
| 8362 | face = FACE_FROM_ID (f, face_id); | ||
| 8363 | font = face->font; | ||
| 8364 | } | ||
| 8365 | } | ||
| 8366 | |||
| 8367 | if (font == NULL) | ||
| 8368 | err = SetFontInfoForSelection (kFontSelectionATSUIType, 0, NULL, target); | ||
| 8369 | else | ||
| 8370 | { | ||
| 8371 | if (font->mac_fontnum != -1) | ||
| 8372 | { | ||
| 8373 | FontSelectionQDStyle qd_style; | ||
| 8374 | |||
| 8375 | qd_style.version = kFontSelectionQDStyleVersionZero; | ||
| 8376 | qd_style.instance.fontFamily = font->mac_fontnum; | ||
| 8377 | qd_style.instance.fontStyle = font->mac_fontface; | ||
| 8378 | qd_style.size = font->mac_fontsize; | ||
| 8379 | qd_style.hasColor = false; | ||
| 8380 | |||
| 8381 | err = SetFontInfoForSelection (kFontSelectionQDType, | ||
| 8382 | 1, &qd_style, target); | ||
| 8383 | } | ||
| 8384 | else | ||
| 8385 | err = SetFontInfoForSelection (kFontSelectionATSUIType, | ||
| 8386 | 1, &font->mac_style, target); | ||
| 8387 | } | ||
| 8388 | |||
| 8389 | return err; | ||
| 8390 | } | ||
| 8391 | #endif | ||
| 8343 | 8392 | ||
| 8344 | 8393 | ||
| 8345 | /* The Mac Event loop code */ | 8394 | /* The Mac Event loop code */ |
| @@ -8427,6 +8476,14 @@ Point saved_menu_event_location; | |||
| 8427 | /* Apple Events */ | 8476 | /* Apple Events */ |
| 8428 | #if USE_CARBON_EVENTS | 8477 | #if USE_CARBON_EVENTS |
| 8429 | static Lisp_Object Qhicommand; | 8478 | static Lisp_Object Qhicommand; |
| 8479 | #ifdef MAC_OSX | ||
| 8480 | extern Lisp_Object Qwindow; | ||
| 8481 | static Lisp_Object Qtoolbar_switch_mode; | ||
| 8482 | #endif | ||
| 8483 | #if USE_MAC_FONT_PANEL | ||
| 8484 | extern Lisp_Object Qfont; | ||
| 8485 | static Lisp_Object Qpanel_closed, Qselection; | ||
| 8486 | #endif | ||
| 8430 | #endif | 8487 | #endif |
| 8431 | extern int mac_ready_for_apple_events; | 8488 | extern int mac_ready_for_apple_events; |
| 8432 | extern Lisp_Object Qundefined; | 8489 | extern Lisp_Object Qundefined; |
| @@ -8436,18 +8493,14 @@ extern void mac_find_apple_event_spec P_ ((AEEventClass, AEEventID, | |||
| 8436 | Lisp_Object *)); | 8493 | Lisp_Object *)); |
| 8437 | extern OSErr init_coercion_handler P_ ((void)); | 8494 | extern OSErr init_coercion_handler P_ ((void)); |
| 8438 | 8495 | ||
| 8439 | #if TARGET_API_MAC_CARBON | ||
| 8440 | /* Drag and Drop */ | 8496 | /* Drag and Drop */ |
| 8441 | static pascal OSErr mac_do_track_drag (DragTrackingMessage, WindowPtr, void*, DragReference); | 8497 | OSErr install_drag_handler P_ ((WindowRef)); |
| 8442 | static pascal OSErr mac_do_receive_drag (WindowPtr, void*, DragReference); | 8498 | void remove_drag_handler P_ ((WindowRef)); |
| 8443 | static DragTrackingHandlerUPP mac_do_track_dragUPP = NULL; | ||
| 8444 | static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL; | ||
| 8445 | #endif | ||
| 8446 | 8499 | ||
| 8447 | #if USE_CARBON_EVENTS | 8500 | #if USE_CARBON_EVENTS |
| 8448 | #ifdef MAC_OSX | 8501 | #ifdef MAC_OSX |
| 8449 | extern void init_service_handler (); | 8502 | extern void init_service_handler (); |
| 8450 | static Lisp_Object Qservices, Qpaste, Qperform; | 8503 | static Lisp_Object Qservice, Qpaste, Qperform; |
| 8451 | #endif | 8504 | #endif |
| 8452 | /* Window Event Handler */ | 8505 | /* Window Event Handler */ |
| 8453 | static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, | 8506 | static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, |
| @@ -8998,47 +9051,84 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 8998 | x_real_positions (f, &f->left_pos, &f->top_pos); | 9051 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 8999 | } | 9052 | } |
| 9000 | 9053 | ||
| 9001 | OSErr | 9054 | void |
| 9002 | mac_store_apple_event (class, id, desc) | 9055 | mac_store_apple_event (class, id, desc) |
| 9003 | Lisp_Object class, id; | 9056 | Lisp_Object class, id; |
| 9004 | const AEDesc *desc; | 9057 | const AEDesc *desc; |
| 9005 | { | 9058 | { |
| 9006 | OSErr err; | ||
| 9007 | struct input_event buf; | 9059 | struct input_event buf; |
| 9008 | AEDesc *desc_copy; | ||
| 9009 | 9060 | ||
| 9010 | desc_copy = xmalloc (sizeof (AEDesc)); | 9061 | EVENT_INIT (buf); |
| 9011 | err = AEDuplicateDesc (desc, desc_copy); | 9062 | |
| 9012 | if (err == noErr) | 9063 | buf.kind = MAC_APPLE_EVENT; |
| 9013 | { | 9064 | buf.x = class; |
| 9014 | EVENT_INIT (buf); | 9065 | buf.y = id; |
| 9066 | XSETFRAME (buf.frame_or_window, | ||
| 9067 | mac_focus_frame (&one_mac_display_info)); | ||
| 9068 | /* Now that Lisp object allocations are protected by BLOCK_INPUT, it | ||
| 9069 | is safe to use them during read_socket_hook. */ | ||
| 9070 | buf.arg = mac_aedesc_to_lisp (desc); | ||
| 9071 | kbd_buffer_store_event (&buf); | ||
| 9072 | } | ||
| 9015 | 9073 | ||
| 9016 | buf.kind = MAC_APPLE_EVENT; | 9074 | #if TARGET_API_MAC_CARBON |
| 9017 | buf.x = class; | 9075 | static OSStatus |
| 9018 | buf.y = id; | 9076 | mac_store_event_ref_as_apple_event (class, id, class_key, id_key, |
| 9019 | buf.code = (int)desc_copy; | 9077 | event, num_params, names, types) |
| 9020 | XSETFRAME (buf.frame_or_window, | 9078 | AEEventClass class; |
| 9021 | mac_focus_frame (&one_mac_display_info)); | 9079 | AEEventID id; |
| 9022 | buf.arg = Qnil; | 9080 | Lisp_Object class_key, id_key; |
| 9023 | kbd_buffer_store_event (&buf); | 9081 | EventRef event; |
| 9082 | UInt32 num_params; | ||
| 9083 | EventParamName *names; | ||
| 9084 | EventParamType *types; | ||
| 9085 | { | ||
| 9086 | OSStatus err = eventNotHandledErr; | ||
| 9087 | Lisp_Object binding; | ||
| 9088 | |||
| 9089 | mac_find_apple_event_spec (class, id, &class_key, &id_key, &binding); | ||
| 9090 | if (!NILP (binding) && !EQ (binding, Qundefined)) | ||
| 9091 | { | ||
| 9092 | if (INTEGERP (binding)) | ||
| 9093 | err = XINT (binding); | ||
| 9094 | else | ||
| 9095 | { | ||
| 9096 | AppleEvent apple_event; | ||
| 9097 | err = create_apple_event_from_event_ref (event, num_params, | ||
| 9098 | names, types, | ||
| 9099 | &apple_event); | ||
| 9100 | if (err == noErr) | ||
| 9101 | { | ||
| 9102 | mac_store_apple_event (class_key, id_key, &apple_event); | ||
| 9103 | AEDisposeDesc (&apple_event); | ||
| 9104 | } | ||
| 9105 | } | ||
| 9024 | } | 9106 | } |
| 9025 | 9107 | ||
| 9026 | return err; | 9108 | return err; |
| 9027 | } | 9109 | } |
| 9028 | 9110 | ||
| 9029 | Lisp_Object | 9111 | void |
| 9030 | mac_make_lispy_event_code (code) | 9112 | mac_store_drag_event (window, mouse_pos, modifiers, desc) |
| 9031 | int code; | 9113 | WindowRef window; |
| 9114 | Point mouse_pos; | ||
| 9115 | SInt16 modifiers; | ||
| 9116 | const AEDesc *desc; | ||
| 9032 | { | 9117 | { |
| 9033 | AEDesc *desc = (AEDesc *)code; | 9118 | struct input_event buf; |
| 9034 | Lisp_Object obj; | ||
| 9035 | 9119 | ||
| 9036 | obj = mac_aedesc_to_lisp (desc); | 9120 | EVENT_INIT (buf); |
| 9037 | AEDisposeDesc (desc); | ||
| 9038 | xfree (desc); | ||
| 9039 | 9121 | ||
| 9040 | return obj; | 9122 | buf.kind = DRAG_N_DROP_EVENT; |
| 9123 | buf.modifiers = mac_to_emacs_modifiers (modifiers); | ||
| 9124 | buf.timestamp = TickCount () * (1000 / 60); | ||
| 9125 | XSETINT (buf.x, mouse_pos.h); | ||
| 9126 | XSETINT (buf.y, mouse_pos.v); | ||
| 9127 | XSETFRAME (buf.frame_or_window, mac_window_to_frame (window)); | ||
| 9128 | buf.arg = mac_aedesc_to_lisp (desc); | ||
| 9129 | kbd_buffer_store_event (&buf); | ||
| 9041 | } | 9130 | } |
| 9131 | #endif | ||
| 9042 | 9132 | ||
| 9043 | #if USE_CARBON_EVENTS | 9133 | #if USE_CARBON_EVENTS |
| 9044 | static pascal OSStatus | 9134 | static pascal OSStatus |
| @@ -9049,7 +9139,11 @@ mac_handle_command_event (next_handler, event, data) | |||
| 9049 | { | 9139 | { |
| 9050 | OSStatus result, err; | 9140 | OSStatus result, err; |
| 9051 | HICommand command; | 9141 | HICommand command; |
| 9052 | Lisp_Object class_key, id_key, binding; | 9142 | static EventParamName names[] = {kEventParamDirectObject, |
| 9143 | kEventParamKeyModifiers}; | ||
| 9144 | static EventParamType types[] = {typeHICommand, | ||
| 9145 | typeUInt32}; | ||
| 9146 | int num_params = sizeof (names) / sizeof (names[0]); | ||
| 9053 | 9147 | ||
| 9054 | result = CallNextEventHandler (next_handler, event); | 9148 | result = CallNextEventHandler (next_handler, event); |
| 9055 | if (result != eventNotHandledErr) | 9149 | if (result != eventNotHandledErr) |
| @@ -9063,33 +9157,10 @@ mac_handle_command_event (next_handler, event, data) | |||
| 9063 | 9157 | ||
| 9064 | /* A HICommand event is mapped to an Apple event whose event class | 9158 | /* A HICommand event is mapped to an Apple event whose event class |
| 9065 | symbol is `hicommand' and event ID is its command ID. */ | 9159 | symbol is `hicommand' and event ID is its command ID. */ |
| 9066 | class_key = Qhicommand; | 9160 | err = mac_store_event_ref_as_apple_event (0, command.commandID, |
| 9067 | mac_find_apple_event_spec (0, command.commandID, | 9161 | Qhicommand, Qnil, |
| 9068 | &class_key, &id_key, &binding); | 9162 | event, num_params, names, types); |
| 9069 | if (!NILP (binding) && !EQ (binding, Qundefined)) | 9163 | return err == noErr ? noErr : eventNotHandledErr; |
| 9070 | { | ||
| 9071 | if (INTEGERP (binding)) | ||
| 9072 | return XINT (binding); | ||
| 9073 | else | ||
| 9074 | { | ||
| 9075 | AppleEvent apple_event; | ||
| 9076 | static EventParamName names[] = {kEventParamDirectObject, | ||
| 9077 | kEventParamKeyModifiers}; | ||
| 9078 | static EventParamType types[] = {typeHICommand, | ||
| 9079 | typeUInt32}; | ||
| 9080 | err = create_apple_event_from_event_ref (event, 2, names, types, | ||
| 9081 | &apple_event); | ||
| 9082 | if (err == noErr) | ||
| 9083 | { | ||
| 9084 | err = mac_store_apple_event (class_key, id_key, &apple_event); | ||
| 9085 | AEDisposeDesc (&apple_event); | ||
| 9086 | } | ||
| 9087 | if (err == noErr) | ||
| 9088 | return noErr; | ||
| 9089 | } | ||
| 9090 | } | ||
| 9091 | |||
| 9092 | return eventNotHandledErr; | ||
| 9093 | } | 9164 | } |
| 9094 | 9165 | ||
| 9095 | static OSErr | 9166 | static OSErr |
| @@ -9192,6 +9263,33 @@ mac_handle_window_event (next_handler, event, data) | |||
| 9192 | return noErr; | 9263 | return noErr; |
| 9193 | 9264 | ||
| 9194 | break; | 9265 | break; |
| 9266 | |||
| 9267 | #ifdef MAC_OSX | ||
| 9268 | case kEventWindowToolbarSwitchMode: | ||
| 9269 | result = CallNextEventHandler (next_handler, event); | ||
| 9270 | { | ||
| 9271 | static EventParamName names[] = {kEventParamDirectObject, | ||
| 9272 | kEventParamWindowMouseLocation, | ||
| 9273 | kEventParamKeyModifiers, | ||
| 9274 | kEventParamMouseButton, | ||
| 9275 | kEventParamClickCount, | ||
| 9276 | kEventParamMouseChord}; | ||
| 9277 | static EventParamType types[] = {typeWindowRef, | ||
| 9278 | typeQDPoint, | ||
| 9279 | typeUInt32, | ||
| 9280 | typeMouseButton, | ||
| 9281 | typeUInt32, | ||
| 9282 | typeUInt32}; | ||
| 9283 | int num_params = sizeof (names) / sizeof (names[0]); | ||
| 9284 | |||
| 9285 | err = mac_store_event_ref_as_apple_event (0, 0, | ||
| 9286 | Qwindow, | ||
| 9287 | Qtoolbar_switch_mode, | ||
| 9288 | event, num_params, | ||
| 9289 | names, types); | ||
| 9290 | } | ||
| 9291 | return err == noErr ? noErr : result; | ||
| 9292 | #endif | ||
| 9195 | } | 9293 | } |
| 9196 | 9294 | ||
| 9197 | return eventNotHandledErr; | 9295 | return eventNotHandledErr; |
| @@ -9266,45 +9364,96 @@ mac_handle_mouse_event (next_handler, event, data) | |||
| 9266 | return eventNotHandledErr; | 9364 | return eventNotHandledErr; |
| 9267 | } | 9365 | } |
| 9268 | 9366 | ||
| 9367 | #if USE_MAC_FONT_PANEL | ||
| 9368 | static pascal OSStatus | ||
| 9369 | mac_handle_font_event (next_handler, event, data) | ||
| 9370 | EventHandlerCallRef next_handler; | ||
| 9371 | EventRef event; | ||
| 9372 | void *data; | ||
| 9373 | { | ||
| 9374 | OSStatus result, err; | ||
| 9375 | Lisp_Object id_key; | ||
| 9376 | int num_params; | ||
| 9377 | EventParamName *names; | ||
| 9378 | EventParamType *types; | ||
| 9379 | static EventParamName names_sel[] = {kEventParamATSUFontID, | ||
| 9380 | kEventParamATSUFontSize, | ||
| 9381 | kEventParamFMFontFamily, | ||
| 9382 | kEventParamFMFontSize, | ||
| 9383 | kEventParamFontColor}; | ||
| 9384 | static EventParamType types_sel[] = {typeATSUFontID, | ||
| 9385 | typeATSUSize, | ||
| 9386 | typeFMFontFamily, | ||
| 9387 | typeFMFontSize, | ||
| 9388 | typeFontColor}; | ||
| 9389 | |||
| 9390 | result = CallNextEventHandler (next_handler, event); | ||
| 9391 | if (result != eventNotHandledErr) | ||
| 9392 | return result; | ||
| 9393 | |||
| 9394 | switch (GetEventKind (event)) | ||
| 9395 | { | ||
| 9396 | case kEventFontPanelClosed: | ||
| 9397 | id_key = Qpanel_closed; | ||
| 9398 | num_params = 0; | ||
| 9399 | names = NULL; | ||
| 9400 | types = NULL; | ||
| 9401 | break; | ||
| 9402 | |||
| 9403 | case kEventFontSelection: | ||
| 9404 | id_key = Qselection; | ||
| 9405 | num_params = sizeof (names_sel) / sizeof (names_sel[0]); | ||
| 9406 | names = names_sel; | ||
| 9407 | types = types_sel; | ||
| 9408 | break; | ||
| 9409 | } | ||
| 9410 | |||
| 9411 | err = mac_store_event_ref_as_apple_event (0, 0, Qfont, id_key, | ||
| 9412 | event, num_params, | ||
| 9413 | names, types); | ||
| 9414 | |||
| 9415 | return err == noErr ? noErr : eventNotHandledErr; | ||
| 9416 | } | ||
| 9417 | #endif | ||
| 9418 | |||
| 9269 | #ifdef MAC_OSX | 9419 | #ifdef MAC_OSX |
| 9270 | OSErr | 9420 | OSStatus |
| 9271 | mac_store_services_event (event) | 9421 | mac_store_service_event (event) |
| 9272 | EventRef event; | 9422 | EventRef event; |
| 9273 | { | 9423 | { |
| 9274 | OSErr err; | 9424 | OSStatus err; |
| 9275 | AppleEvent apple_event; | ||
| 9276 | Lisp_Object id_key; | 9425 | Lisp_Object id_key; |
| 9426 | int num_params; | ||
| 9427 | EventParamName *names; | ||
| 9428 | EventParamType *types; | ||
| 9429 | static EventParamName names_pfm[] = {kEventParamServiceMessageName, | ||
| 9430 | kEventParamServiceUserData}; | ||
| 9431 | static EventParamType types_pfm[] = {typeCFStringRef, | ||
| 9432 | typeCFStringRef}; | ||
| 9277 | 9433 | ||
| 9278 | switch (GetEventKind (event)) | 9434 | switch (GetEventKind (event)) |
| 9279 | { | 9435 | { |
| 9280 | case kEventServicePaste: | 9436 | case kEventServicePaste: |
| 9281 | id_key = Qpaste; | 9437 | id_key = Qpaste; |
| 9282 | err = create_apple_event_from_event_ref (event, 0, NULL, NULL, | 9438 | num_params = 0; |
| 9283 | &apple_event); | 9439 | names = NULL; |
| 9440 | types = NULL; | ||
| 9284 | break; | 9441 | break; |
| 9285 | 9442 | ||
| 9286 | case kEventServicePerform: | 9443 | case kEventServicePerform: |
| 9287 | { | 9444 | id_key = Qperform; |
| 9288 | static EventParamName names[] = {kEventParamServiceMessageName, | 9445 | num_params = sizeof (names_pfm) / sizeof (names_pfm[0]); |
| 9289 | kEventParamServiceUserData}; | 9446 | names = names_pfm; |
| 9290 | static EventParamType types[] = {typeCFStringRef, | 9447 | types = types_pfm; |
| 9291 | typeCFStringRef}; | ||
| 9292 | |||
| 9293 | id_key = Qperform; | ||
| 9294 | err = create_apple_event_from_event_ref (event, 2, names, types, | ||
| 9295 | &apple_event); | ||
| 9296 | } | ||
| 9297 | break; | 9448 | break; |
| 9298 | 9449 | ||
| 9299 | default: | 9450 | default: |
| 9300 | abort (); | 9451 | abort (); |
| 9301 | } | 9452 | } |
| 9302 | 9453 | ||
| 9303 | if (err == noErr) | 9454 | err = mac_store_event_ref_as_apple_event (0, 0, Qservice, id_key, |
| 9304 | { | 9455 | event, num_params, |
| 9305 | err = mac_store_apple_event (Qservices, id_key, &apple_event); | 9456 | names, types); |
| 9306 | AEDisposeDesc (&apple_event); | ||
| 9307 | } | ||
| 9308 | 9457 | ||
| 9309 | return err; | 9458 | return err; |
| 9310 | } | 9459 | } |
| @@ -9324,15 +9473,28 @@ install_window_handler (window) | |||
| 9324 | {kEventClassWindow, kEventWindowShown}, | 9473 | {kEventClassWindow, kEventWindowShown}, |
| 9325 | {kEventClassWindow, kEventWindowHidden}, | 9474 | {kEventClassWindow, kEventWindowHidden}, |
| 9326 | {kEventClassWindow, kEventWindowExpanded}, | 9475 | {kEventClassWindow, kEventWindowExpanded}, |
| 9327 | {kEventClassWindow, kEventWindowCollapsed}}; | 9476 | {kEventClassWindow, kEventWindowCollapsed}, |
| 9477 | #ifdef MAC_OSX | ||
| 9478 | {kEventClassWindow, kEventWindowToolbarSwitchMode}, | ||
| 9479 | #endif | ||
| 9480 | }; | ||
| 9328 | EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}}; | 9481 | EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}}; |
| 9329 | static EventHandlerUPP handle_window_eventUPP = NULL; | 9482 | static EventHandlerUPP handle_window_eventUPP = NULL; |
| 9330 | static EventHandlerUPP handle_mouse_eventUPP = NULL; | 9483 | static EventHandlerUPP handle_mouse_eventUPP = NULL; |
| 9484 | #if USE_MAC_FONT_PANEL | ||
| 9485 | EventTypeSpec specs_font[] = {{kEventClassFont, kEventFontPanelClosed}, | ||
| 9486 | {kEventClassFont, kEventFontSelection}}; | ||
| 9487 | static EventHandlerUPP handle_font_eventUPP = NULL; | ||
| 9488 | #endif | ||
| 9331 | 9489 | ||
| 9332 | if (handle_window_eventUPP == NULL) | 9490 | if (handle_window_eventUPP == NULL) |
| 9333 | handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event); | 9491 | handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event); |
| 9334 | if (handle_mouse_eventUPP == NULL) | 9492 | if (handle_mouse_eventUPP == NULL) |
| 9335 | handle_mouse_eventUPP = NewEventHandlerUPP (mac_handle_mouse_event); | 9493 | handle_mouse_eventUPP = NewEventHandlerUPP (mac_handle_mouse_event); |
| 9494 | #if USE_MAC_FONT_PANEL | ||
| 9495 | if (handle_font_eventUPP == NULL) | ||
| 9496 | handle_font_eventUPP = NewEventHandlerUPP (mac_handle_font_event); | ||
| 9497 | #endif | ||
| 9336 | err = InstallWindowEventHandler (window, handle_window_eventUPP, | 9498 | err = InstallWindowEventHandler (window, handle_window_eventUPP, |
| 9337 | GetEventTypeCount (specs_window), | 9499 | GetEventTypeCount (specs_window), |
| 9338 | specs_window, NULL, NULL); | 9500 | specs_window, NULL, NULL); |
| @@ -9340,18 +9502,16 @@ install_window_handler (window) | |||
| 9340 | err = InstallWindowEventHandler (window, handle_mouse_eventUPP, | 9502 | err = InstallWindowEventHandler (window, handle_mouse_eventUPP, |
| 9341 | GetEventTypeCount (specs_mouse), | 9503 | GetEventTypeCount (specs_mouse), |
| 9342 | specs_mouse, NULL, NULL); | 9504 | specs_mouse, NULL, NULL); |
| 9343 | #endif | 9505 | #if USE_MAC_FONT_PANEL |
| 9344 | #if TARGET_API_MAC_CARBON | ||
| 9345 | if (mac_do_track_dragUPP == NULL) | ||
| 9346 | mac_do_track_dragUPP = NewDragTrackingHandlerUPP (mac_do_track_drag); | ||
| 9347 | if (mac_do_receive_dragUPP == NULL) | ||
| 9348 | mac_do_receive_dragUPP = NewDragReceiveHandlerUPP (mac_do_receive_drag); | ||
| 9349 | |||
| 9350 | if (err == noErr) | 9506 | if (err == noErr) |
| 9351 | err = InstallTrackingHandler (mac_do_track_dragUPP, window, NULL); | 9507 | err = InstallWindowEventHandler (window, handle_font_eventUPP, |
| 9352 | if (err == noErr) | 9508 | GetEventTypeCount (specs_font), |
| 9353 | err = InstallReceiveHandler (mac_do_receive_dragUPP, window, NULL); | 9509 | specs_font, NULL, NULL); |
| 9510 | #endif | ||
| 9354 | #endif | 9511 | #endif |
| 9512 | if (err == noErr) | ||
| 9513 | err = install_drag_handler (window); | ||
| 9514 | |||
| 9355 | return err; | 9515 | return err; |
| 9356 | } | 9516 | } |
| 9357 | 9517 | ||
| @@ -9359,167 +9519,9 @@ void | |||
| 9359 | remove_window_handler (window) | 9519 | remove_window_handler (window) |
| 9360 | WindowPtr window; | 9520 | WindowPtr window; |
| 9361 | { | 9521 | { |
| 9362 | #if TARGET_API_MAC_CARBON | 9522 | remove_drag_handler (window); |
| 9363 | if (mac_do_track_dragUPP) | ||
| 9364 | RemoveTrackingHandler (mac_do_track_dragUPP, window); | ||
| 9365 | if (mac_do_receive_dragUPP) | ||
| 9366 | RemoveReceiveHandler (mac_do_receive_dragUPP, window); | ||
| 9367 | #endif | ||
| 9368 | } | 9523 | } |
| 9369 | 9524 | ||
| 9370 | #if TARGET_API_MAC_CARBON | ||
| 9371 | static pascal OSErr | ||
| 9372 | mac_do_track_drag (DragTrackingMessage message, WindowPtr window, | ||
| 9373 | void *handlerRefCon, DragReference theDrag) | ||
| 9374 | { | ||
| 9375 | static int can_accept; | ||
| 9376 | short items; | ||
| 9377 | short index; | ||
| 9378 | ItemReference theItem; | ||
| 9379 | FlavorFlags theFlags; | ||
| 9380 | OSErr result; | ||
| 9381 | |||
| 9382 | if (GetFrontWindowOfClass (kMovableModalWindowClass, false)) | ||
| 9383 | return dragNotAcceptedErr; | ||
| 9384 | |||
| 9385 | switch (message) | ||
| 9386 | { | ||
| 9387 | case kDragTrackingEnterHandler: | ||
| 9388 | CountDragItems (theDrag, &items); | ||
| 9389 | can_accept = 0; | ||
| 9390 | for (index = 1; index <= items; index++) | ||
| 9391 | { | ||
| 9392 | GetDragItemReferenceNumber (theDrag, index, &theItem); | ||
| 9393 | result = GetFlavorFlags (theDrag, theItem, flavorTypeHFS, &theFlags); | ||
| 9394 | if (result == noErr) | ||
| 9395 | { | ||
| 9396 | can_accept = 1; | ||
| 9397 | break; | ||
| 9398 | } | ||
| 9399 | } | ||
| 9400 | break; | ||
| 9401 | |||
| 9402 | case kDragTrackingEnterWindow: | ||
| 9403 | if (can_accept) | ||
| 9404 | { | ||
| 9405 | RgnHandle hilite_rgn = NewRgn (); | ||
| 9406 | Rect r; | ||
| 9407 | struct frame *f = mac_window_to_frame (window); | ||
| 9408 | |||
| 9409 | GetWindowPortBounds (window, &r); | ||
| 9410 | OffsetRect (&r, -r.left, -r.top); | ||
| 9411 | RectRgn (hilite_rgn, &r); | ||
| 9412 | ShowDragHilite (theDrag, hilite_rgn, true); | ||
| 9413 | DisposeRgn (hilite_rgn); | ||
| 9414 | SetThemeCursor (kThemeCopyArrowCursor); | ||
| 9415 | } | ||
| 9416 | break; | ||
| 9417 | |||
| 9418 | case kDragTrackingInWindow: | ||
| 9419 | break; | ||
| 9420 | |||
| 9421 | case kDragTrackingLeaveWindow: | ||
| 9422 | if (can_accept) | ||
| 9423 | { | ||
| 9424 | struct frame *f = mac_window_to_frame (window); | ||
| 9425 | |||
| 9426 | HideDragHilite (theDrag); | ||
| 9427 | SetThemeCursor (kThemeArrowCursor); | ||
| 9428 | } | ||
| 9429 | break; | ||
| 9430 | |||
| 9431 | case kDragTrackingLeaveHandler: | ||
| 9432 | break; | ||
| 9433 | } | ||
| 9434 | |||
| 9435 | return noErr; | ||
| 9436 | } | ||
| 9437 | |||
| 9438 | static pascal OSErr | ||
| 9439 | mac_do_receive_drag (WindowPtr window, void *handlerRefCon, | ||
| 9440 | DragReference theDrag) | ||
| 9441 | { | ||
| 9442 | short items; | ||
| 9443 | short index; | ||
| 9444 | FlavorFlags theFlags; | ||
| 9445 | Point mouse; | ||
| 9446 | OSErr result; | ||
| 9447 | ItemReference theItem; | ||
| 9448 | HFSFlavor data; | ||
| 9449 | Size size = sizeof (HFSFlavor); | ||
| 9450 | Lisp_Object file_list; | ||
| 9451 | |||
| 9452 | if (GetFrontWindowOfClass (kMovableModalWindowClass, false)) | ||
| 9453 | return dragNotAcceptedErr; | ||
| 9454 | |||
| 9455 | file_list = Qnil; | ||
| 9456 | GetDragMouse (theDrag, &mouse, 0L); | ||
| 9457 | CountDragItems (theDrag, &items); | ||
| 9458 | for (index = 1; index <= items; index++) | ||
| 9459 | { | ||
| 9460 | /* Only handle file references. */ | ||
| 9461 | GetDragItemReferenceNumber (theDrag, index, &theItem); | ||
| 9462 | result = GetFlavorFlags (theDrag, theItem, flavorTypeHFS, &theFlags); | ||
| 9463 | if (result == noErr) | ||
| 9464 | { | ||
| 9465 | OSErr err; | ||
| 9466 | AEDesc desc; | ||
| 9467 | |||
| 9468 | err = GetFlavorData (theDrag, theItem, flavorTypeHFS, | ||
| 9469 | &data, &size, 0L); | ||
| 9470 | if (err == noErr) | ||
| 9471 | err = AECoercePtr (typeFSS, &data.fileSpec, sizeof (FSSpec), | ||
| 9472 | TYPE_FILE_NAME, &desc); | ||
| 9473 | if (err == noErr) | ||
| 9474 | { | ||
| 9475 | Lisp_Object file; | ||
| 9476 | |||
| 9477 | /* x-dnd functions expect undecoded filenames. */ | ||
| 9478 | file = make_uninit_string (AEGetDescDataSize (&desc)); | ||
| 9479 | err = AEGetDescData (&desc, SDATA (file), SBYTES (file)); | ||
| 9480 | if (err == noErr) | ||
| 9481 | file_list = Fcons (file, file_list); | ||
| 9482 | AEDisposeDesc (&desc); | ||
| 9483 | } | ||
| 9484 | } | ||
| 9485 | } | ||
| 9486 | /* If there are items in the list, construct an event and post it to | ||
| 9487 | the queue like an interrupt using kbd_buffer_store_event. */ | ||
| 9488 | if (!NILP (file_list)) | ||
| 9489 | { | ||
| 9490 | struct input_event event; | ||
| 9491 | Lisp_Object frame; | ||
| 9492 | struct frame *f = mac_window_to_frame (window); | ||
| 9493 | SInt16 modifiers; | ||
| 9494 | |||
| 9495 | GlobalToLocal (&mouse); | ||
| 9496 | GetDragModifiers (theDrag, NULL, NULL, &modifiers); | ||
| 9497 | |||
| 9498 | event.kind = DRAG_N_DROP_EVENT; | ||
| 9499 | event.code = 0; | ||
| 9500 | event.modifiers = mac_to_emacs_modifiers (modifiers); | ||
| 9501 | event.timestamp = TickCount () * (1000 / 60); | ||
| 9502 | XSETINT (event.x, mouse.h); | ||
| 9503 | XSETINT (event.y, mouse.v); | ||
| 9504 | XSETFRAME (frame, f); | ||
| 9505 | event.frame_or_window = frame; | ||
| 9506 | event.arg = file_list; | ||
| 9507 | /* Post to the interrupt queue */ | ||
| 9508 | kbd_buffer_store_event (&event); | ||
| 9509 | /* MAC_TODO: Mimic behavior of windows by switching contexts to Emacs */ | ||
| 9510 | { | ||
| 9511 | ProcessSerialNumber psn; | ||
| 9512 | GetCurrentProcess (&psn); | ||
| 9513 | SetFrontProcess (&psn); | ||
| 9514 | } | ||
| 9515 | |||
| 9516 | return noErr; | ||
| 9517 | } | ||
| 9518 | else | ||
| 9519 | return dragNotAcceptedErr; | ||
| 9520 | } | ||
| 9521 | #endif | ||
| 9522 | |||
| 9523 | 9525 | ||
| 9524 | #if __profile__ | 9526 | #if __profile__ |
| 9525 | void | 9527 | void |
| @@ -9805,6 +9807,41 @@ mac_wait_next_event (er, sleep_time, dequeue) | |||
| 9805 | } | 9807 | } |
| 9806 | #endif /* not USE_CARBON_EVENTS */ | 9808 | #endif /* not USE_CARBON_EVENTS */ |
| 9807 | 9809 | ||
| 9810 | #if TARGET_API_MAC_CARBON | ||
| 9811 | OSStatus | ||
| 9812 | mac_post_mouse_moved_event () | ||
| 9813 | { | ||
| 9814 | EventRef event = NULL; | ||
| 9815 | OSStatus err; | ||
| 9816 | |||
| 9817 | err = CreateEvent (NULL, kEventClassMouse, kEventMouseMoved, 0, | ||
| 9818 | kEventAttributeNone, &event); | ||
| 9819 | if (err == noErr) | ||
| 9820 | { | ||
| 9821 | Point mouse_pos; | ||
| 9822 | |||
| 9823 | GetMouse (&mouse_pos); | ||
| 9824 | LocalToGlobal (&mouse_pos); | ||
| 9825 | err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint, | ||
| 9826 | sizeof (Point), &mouse_pos); | ||
| 9827 | } | ||
| 9828 | if (err == noErr) | ||
| 9829 | { | ||
| 9830 | UInt32 modifiers = GetCurrentKeyModifiers (); | ||
| 9831 | |||
| 9832 | err = SetEventParameter (event, kEventParamKeyModifiers, typeUInt32, | ||
| 9833 | sizeof (UInt32), &modifiers); | ||
| 9834 | } | ||
| 9835 | if (err == noErr) | ||
| 9836 | err = PostEventToQueue (GetCurrentEventQueue (), event, | ||
| 9837 | kEventPriorityStandard); | ||
| 9838 | if (event) | ||
| 9839 | ReleaseEvent (event); | ||
| 9840 | |||
| 9841 | return err; | ||
| 9842 | } | ||
| 9843 | #endif | ||
| 9844 | |||
| 9808 | /* Emacs calls this whenever it wants to read an input event from the | 9845 | /* Emacs calls this whenever it wants to read an input event from the |
| 9809 | user. */ | 9846 | user. */ |
| 9810 | int | 9847 | int |
| @@ -9932,7 +9969,13 @@ XTread_socket (sd, expected, hold_quit) | |||
| 9932 | break; | 9969 | break; |
| 9933 | 9970 | ||
| 9934 | case inContent: | 9971 | case inContent: |
| 9935 | if (window_ptr != FRAME_MAC_WINDOW (mac_focus_frame (dpyinfo))) | 9972 | if ( |
| 9973 | #if TARGET_API_MAC_CARBON | ||
| 9974 | FrontNonFloatingWindow () | ||
| 9975 | #else | ||
| 9976 | FrontWindow () | ||
| 9977 | #endif | ||
| 9978 | != window_ptr) | ||
| 9936 | SelectWindow (window_ptr); | 9979 | SelectWindow (window_ptr); |
| 9937 | else | 9980 | else |
| 9938 | { | 9981 | { |
| @@ -10079,20 +10122,18 @@ XTread_socket (sd, expected, hold_quit) | |||
| 10079 | } | 10122 | } |
| 10080 | break; | 10123 | break; |
| 10081 | 10124 | ||
| 10082 | #if TARGET_API_MAC_CARBON | ||
| 10083 | case inProxyIcon: | ||
| 10084 | if (TrackWindowProxyDrag (window_ptr, er.where) | ||
| 10085 | != errUserWantsToDragWindow) | ||
| 10086 | break; | ||
| 10087 | /* fall through */ | ||
| 10088 | #endif | ||
| 10089 | case inDrag: | 10125 | case inDrag: |
| 10090 | #if TARGET_API_MAC_CARBON | 10126 | #if TARGET_API_MAC_CARBON |
| 10127 | case inProxyIcon: | ||
| 10091 | if (IsWindowPathSelectClick (window_ptr, &er)) | 10128 | if (IsWindowPathSelectClick (window_ptr, &er)) |
| 10092 | { | 10129 | { |
| 10093 | WindowPathSelect (window_ptr, NULL, NULL); | 10130 | WindowPathSelect (window_ptr, NULL, NULL); |
| 10094 | break; | 10131 | break; |
| 10095 | } | 10132 | } |
| 10133 | if (part_code == inProxyIcon | ||
| 10134 | && (TrackWindowProxyDrag (window_ptr, er.where) | ||
| 10135 | != errUserWantsToDragWindow)) | ||
| 10136 | break; | ||
| 10096 | DragWindow (window_ptr, er.where, NULL); | 10137 | DragWindow (window_ptr, er.where, NULL); |
| 10097 | #else /* not TARGET_API_MAC_CARBON */ | 10138 | #else /* not TARGET_API_MAC_CARBON */ |
| 10098 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); | 10139 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); |
| @@ -11030,7 +11071,14 @@ syms_of_macterm () | |||
| 11030 | #if USE_CARBON_EVENTS | 11071 | #if USE_CARBON_EVENTS |
| 11031 | Qhicommand = intern ("hicommand"); staticpro (&Qhicommand); | 11072 | Qhicommand = intern ("hicommand"); staticpro (&Qhicommand); |
| 11032 | #ifdef MAC_OSX | 11073 | #ifdef MAC_OSX |
| 11033 | Qservices = intern ("services"); staticpro (&Qservices); | 11074 | Qtoolbar_switch_mode = intern ("toolbar-switch-mode"); |
| 11075 | staticpro (&Qtoolbar_switch_mode); | ||
| 11076 | #if USE_MAC_FONT_PANEL | ||
| 11077 | Qpanel_closed = intern ("panel-closed"); staticpro (&Qpanel_closed); | ||
| 11078 | Qselection = intern ("selection"); staticpro (&Qselection); | ||
| 11079 | #endif | ||
| 11080 | |||
| 11081 | Qservice = intern ("service"); staticpro (&Qservice); | ||
| 11034 | Qpaste = intern ("paste"); staticpro (&Qpaste); | 11082 | Qpaste = intern ("paste"); staticpro (&Qpaste); |
| 11035 | Qperform = intern ("perform"); staticpro (&Qperform); | 11083 | Qperform = intern ("perform"); staticpro (&Qperform); |
| 11036 | #endif | 11084 | #endif |
| @@ -11070,7 +11118,7 @@ NOTE: Not supported on Mac yet. */); | |||
| 11070 | x_use_underline_position_properties = 0; | 11118 | x_use_underline_position_properties = 0; |
| 11071 | 11119 | ||
| 11072 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 11120 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| 11073 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | 11121 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); |
| 11074 | #ifdef USE_TOOLKIT_SCROLL_BARS | 11122 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 11075 | Vx_toolkit_scroll_bars = Qt; | 11123 | Vx_toolkit_scroll_bars = Qt; |
| 11076 | #else | 11124 | #else |
| @@ -11124,23 +11172,23 @@ mouse-3 and the command-key will register for mouse-2. */); | |||
| 11124 | 11172 | ||
| 11125 | #if USE_CARBON_EVENTS | 11173 | #if USE_CARBON_EVENTS |
| 11126 | DEFVAR_BOOL ("mac-wheel-button-is-mouse-2", &mac_wheel_button_is_mouse_2, | 11174 | DEFVAR_BOOL ("mac-wheel-button-is-mouse-2", &mac_wheel_button_is_mouse_2, |
| 11127 | doc: /* *Non-nil if the wheel button is mouse-2 and the right click mouse-3. | 11175 | doc: /* *Non-nil if the wheel button is mouse-2 and the right click mouse-3. |
| 11128 | Otherwise, the right click will be treated as mouse-2 and the wheel | 11176 | Otherwise, the right click will be treated as mouse-2 and the wheel |
| 11129 | button will be mouse-3. */); | 11177 | button will be mouse-3. */); |
| 11130 | mac_wheel_button_is_mouse_2 = 1; | 11178 | mac_wheel_button_is_mouse_2 = 1; |
| 11131 | 11179 | ||
| 11132 | DEFVAR_BOOL ("mac-pass-command-to-system", &mac_pass_command_to_system, | 11180 | DEFVAR_BOOL ("mac-pass-command-to-system", &mac_pass_command_to_system, |
| 11133 | doc: /* *Non-nil if command key presses are passed on to the Mac Toolbox. */); | 11181 | doc: /* *Non-nil if command key presses are passed on to the Mac Toolbox. */); |
| 11134 | mac_pass_command_to_system = 1; | 11182 | mac_pass_command_to_system = 1; |
| 11135 | 11183 | ||
| 11136 | DEFVAR_BOOL ("mac-pass-control-to-system", &mac_pass_control_to_system, | 11184 | DEFVAR_BOOL ("mac-pass-control-to-system", &mac_pass_control_to_system, |
| 11137 | doc: /* *Non-nil if control key presses are passed on to the Mac Toolbox. */); | 11185 | doc: /* *Non-nil if control key presses are passed on to the Mac Toolbox. */); |
| 11138 | mac_pass_control_to_system = 1; | 11186 | mac_pass_control_to_system = 1; |
| 11139 | 11187 | ||
| 11140 | #endif | 11188 | #endif |
| 11141 | 11189 | ||
| 11142 | DEFVAR_BOOL ("mac-allow-anti-aliasing", &mac_use_core_graphics, | 11190 | DEFVAR_BOOL ("mac-allow-anti-aliasing", &mac_use_core_graphics, |
| 11143 | doc: /* *If non-nil, allow anti-aliasing. | 11191 | doc: /* *If non-nil, allow anti-aliasing. |
| 11144 | The text will be rendered using Core Graphics text rendering which | 11192 | The text will be rendered using Core Graphics text rendering which |
| 11145 | may anti-alias the text. */); | 11193 | may anti-alias the text. */); |
| 11146 | #if USE_CG_DRAWING | 11194 | #if USE_CG_DRAWING |
| @@ -11153,7 +11201,7 @@ may anti-alias the text. */); | |||
| 11153 | creating the terminal frame on Mac OS 9 before loading | 11201 | creating the terminal frame on Mac OS 9 before loading |
| 11154 | term/mac-win.elc. */ | 11202 | term/mac-win.elc. */ |
| 11155 | DEFVAR_LISP ("mac-charset-info-alist", &Vmac_charset_info_alist, | 11203 | DEFVAR_LISP ("mac-charset-info-alist", &Vmac_charset_info_alist, |
| 11156 | doc: /* Alist of Emacs character sets vs text encodings and coding systems. | 11204 | doc: /* Alist of Emacs character sets vs text encodings and coding systems. |
| 11157 | Each entry should be of the form: | 11205 | Each entry should be of the form: |
| 11158 | 11206 | ||
| 11159 | (CHARSET-NAME TEXT-ENCODING CODING-SYSTEM) | 11207 | (CHARSET-NAME TEXT-ENCODING CODING-SYSTEM) |
| @@ -11164,6 +11212,18 @@ CODING_SYSTEM is a coding system corresponding to TEXT-ENCODING. */); | |||
| 11164 | Vmac_charset_info_alist = | 11212 | Vmac_charset_info_alist = |
| 11165 | Fcons (list3 (build_string ("mac-roman"), | 11213 | Fcons (list3 (build_string ("mac-roman"), |
| 11166 | make_number (smRoman), Qnil), Qnil); | 11214 | make_number (smRoman), Qnil), Qnil); |
| 11215 | |||
| 11216 | #if USE_ATSUI | ||
| 11217 | DEFVAR_LISP ("mac-atsu-font-table", &Vmac_atsu_font_table, | ||
| 11218 | doc: /* Hash table of ATSU font IDs vs plist of attributes and values. | ||
| 11219 | Each font ID is represented as a four-byte string in native byte | ||
| 11220 | order. */); | ||
| 11221 | Vmac_atsu_font_table = | ||
| 11222 | make_hash_table (Qequal, make_number (DEFAULT_HASH_SIZE), | ||
| 11223 | make_float (DEFAULT_REHASH_SIZE), | ||
| 11224 | make_float (DEFAULT_REHASH_THRESHOLD), | ||
| 11225 | Qnil, Qnil, Qnil); | ||
| 11226 | #endif | ||
| 11167 | } | 11227 | } |
| 11168 | 11228 | ||
| 11169 | /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b | 11229 | /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b |
diff --git a/src/macterm.h b/src/macterm.h index f23554f01c6..8b45777e546 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -584,10 +584,11 @@ extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, | |||
| 584 | extern void mac_clear_area P_ ((struct frame *, int, int, | 584 | extern void mac_clear_area P_ ((struct frame *, int, int, |
| 585 | unsigned int, unsigned int)); | 585 | unsigned int, unsigned int)); |
| 586 | extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); | 586 | extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); |
| 587 | extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int)); | ||
| 587 | extern OSErr install_window_handler P_ ((WindowPtr)); | 588 | extern OSErr install_window_handler P_ ((WindowPtr)); |
| 588 | extern void remove_window_handler P_ ((WindowPtr)); | 589 | extern void remove_window_handler P_ ((WindowPtr)); |
| 589 | extern Lisp_Object mac_make_lispy_event_code P_ ((int)); | ||
| 590 | extern void do_menu_choice P_ ((SInt32)); | 590 | extern void do_menu_choice P_ ((SInt32)); |
| 591 | extern OSStatus mac_post_mouse_moved_event P_ ((void)); | ||
| 591 | #if USE_CG_DRAWING | 592 | #if USE_CG_DRAWING |
| 592 | extern void mac_prepare_for_quickdraw P_ ((struct frame *)); | 593 | extern void mac_prepare_for_quickdraw P_ ((struct frame *)); |
| 593 | #endif | 594 | #endif |
| @@ -623,12 +624,15 @@ extern void free_frame_menubar P_ ((struct frame *)); | |||
| 623 | /* Defined in mac.c. */ | 624 | /* Defined in mac.c. */ |
| 624 | 625 | ||
| 625 | extern void mac_clear_font_name_table P_ ((void)); | 626 | extern void mac_clear_font_name_table P_ ((void)); |
| 626 | extern Lisp_Object mac_aedesc_to_lisp P_ ((AEDesc *)); | 627 | extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *)); |
| 627 | #if TARGET_API_MAC_CARBON | 628 | #if TARGET_API_MAC_CARBON |
| 628 | extern OSErr create_apple_event_from_event_ref P_ ((EventRef, UInt32, | 629 | extern OSErr create_apple_event_from_event_ref P_ ((EventRef, UInt32, |
| 629 | EventParamName *, | 630 | EventParamName *, |
| 630 | EventParamType *, | 631 | EventParamType *, |
| 631 | AppleEvent *)); | 632 | AppleEvent *)); |
| 633 | extern OSErr create_apple_event_from_drag_ref P_ ((DragRef, UInt32, | ||
| 634 | FlavorType *, | ||
| 635 | AppleEvent *)); | ||
| 632 | extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); | 636 | extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); |
| 633 | extern CFStringRef cfstring_create_with_string P_ ((Lisp_Object)); | 637 | extern CFStringRef cfstring_create_with_string P_ ((Lisp_Object)); |
| 634 | extern Lisp_Object cfdata_to_lisp P_ ((CFDataRef)); | 638 | extern Lisp_Object cfdata_to_lisp P_ ((CFDataRef)); |
diff --git a/src/minibuf.c b/src/minibuf.c index 2894eb19324..d37f82c9dcd 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -523,7 +523,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 523 | build_string ("Command attempted to use minibuffer while in minibuffer")); | 523 | build_string ("Command attempted to use minibuffer while in minibuffer")); |
| 524 | } | 524 | } |
| 525 | 525 | ||
| 526 | if (noninteractive) | 526 | if (noninteractive && NILP (Vexecuting_kbd_macro)) |
| 527 | { | 527 | { |
| 528 | val = read_minibuf_noninteractive (map, initial, prompt, | 528 | val = read_minibuf_noninteractive (map, initial, prompt, |
| 529 | make_number (pos), | 529 | make_number (pos), |
| @@ -2790,7 +2790,7 @@ syms_of_minibuf () | |||
| 2790 | DEFVAR_LISP ("history-length", &Vhistory_length, | 2790 | DEFVAR_LISP ("history-length", &Vhistory_length, |
| 2791 | doc: /* *Maximum length for history lists before truncation takes place. | 2791 | doc: /* *Maximum length for history lists before truncation takes place. |
| 2792 | A number means that length; t means infinite. Truncation takes place | 2792 | A number means that length; t means infinite. Truncation takes place |
| 2793 | just after a new element is inserted. Setting the history-length | 2793 | just after a new element is inserted. Setting the `history-length' |
| 2794 | property of a history variable overrides this default. */); | 2794 | property of a history variable overrides this default. */); |
| 2795 | XSETFASTINT (Vhistory_length, 30); | 2795 | XSETFASTINT (Vhistory_length, 30); |
| 2796 | 2796 | ||
diff --git a/src/process.c b/src/process.c index 8e4a0d22160..4e2717577cd 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -696,6 +696,8 @@ setup_process_coding_systems (process) | |||
| 696 | = (struct coding_system *) xmalloc (sizeof (struct coding_system)); | 696 | = (struct coding_system *) xmalloc (sizeof (struct coding_system)); |
| 697 | setup_coding_system (p->encode_coding_system, | 697 | setup_coding_system (p->encode_coding_system, |
| 698 | proc_encode_coding_system[outch]); | 698 | proc_encode_coding_system[outch]); |
| 699 | if (proc_encode_coding_system[outch]->eol_type == CODING_EOL_UNDECIDED) | ||
| 700 | proc_encode_coding_system[outch]->eol_type = system_eol_type; | ||
| 699 | } | 701 | } |
| 700 | 702 | ||
| 701 | DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, | 703 | DEFUN ("processp", Fprocessp, Sprocessp, 1, 1, 0, |
| @@ -5067,6 +5069,10 @@ read_process_output (proc, channel) | |||
| 5067 | p->encode_coding_system = Vlast_coding_system_used; | 5069 | p->encode_coding_system = Vlast_coding_system_used; |
| 5068 | setup_coding_system (p->encode_coding_system, | 5070 | setup_coding_system (p->encode_coding_system, |
| 5069 | proc_encode_coding_system[XINT (p->outfd)]); | 5071 | proc_encode_coding_system[XINT (p->outfd)]); |
| 5072 | if (proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5073 | == CODING_EOL_UNDECIDED) | ||
| 5074 | proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5075 | = system_eol_type; | ||
| 5070 | } | 5076 | } |
| 5071 | } | 5077 | } |
| 5072 | 5078 | ||
| @@ -5176,6 +5182,10 @@ read_process_output (proc, channel) | |||
| 5176 | p->encode_coding_system = Vlast_coding_system_used; | 5182 | p->encode_coding_system = Vlast_coding_system_used; |
| 5177 | setup_coding_system (p->encode_coding_system, | 5183 | setup_coding_system (p->encode_coding_system, |
| 5178 | proc_encode_coding_system[XINT (p->outfd)]); | 5184 | proc_encode_coding_system[XINT (p->outfd)]); |
| 5185 | if (proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5186 | == CODING_EOL_UNDECIDED) | ||
| 5187 | proc_encode_coding_system[XINT (p->outfd)]->eol_type | ||
| 5188 | = system_eol_type; | ||
| 5179 | } | 5189 | } |
| 5180 | } | 5190 | } |
| 5181 | if (coding->carryover_bytes > 0) | 5191 | if (coding->carryover_bytes > 0) |
diff --git a/src/sound.c b/src/sound.c index c1d5c40e9bb..0fbeceb4b9e 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -452,13 +452,12 @@ static Lisp_Object | |||
| 452 | sound_cleanup (arg) | 452 | sound_cleanup (arg) |
| 453 | Lisp_Object arg; | 453 | Lisp_Object arg; |
| 454 | { | 454 | { |
| 455 | if (current_sound_device) | 455 | if (current_sound_device->close) |
| 456 | { | 456 | current_sound_device->close (current_sound_device); |
| 457 | if (current_sound_device->close) | 457 | if (current_sound->fd > 0) |
| 458 | current_sound_device->close (current_sound_device); | 458 | emacs_close (current_sound->fd); |
| 459 | if (current_sound->fd > 0) | 459 | free (current_sound_device); |
| 460 | emacs_close (current_sound->fd); | 460 | free (current_sound); |
| 461 | } | ||
| 462 | 461 | ||
| 463 | return Qnil; | 462 | return Qnil; |
| 464 | } | 463 | } |
| @@ -991,8 +990,6 @@ Internal use only, use `play-sound' instead.\n */) | |||
| 991 | #ifndef WINDOWSNT | 990 | #ifndef WINDOWSNT |
| 992 | Lisp_Object file; | 991 | Lisp_Object file; |
| 993 | struct gcpro gcpro1, gcpro2; | 992 | struct gcpro gcpro1, gcpro2; |
| 994 | struct sound_device sd; | ||
| 995 | struct sound s; | ||
| 996 | Lisp_Object args[2]; | 993 | Lisp_Object args[2]; |
| 997 | #else /* WINDOWSNT */ | 994 | #else /* WINDOWSNT */ |
| 998 | int len = 0; | 995 | int len = 0; |
| @@ -1010,48 +1007,50 @@ Internal use only, use `play-sound' instead.\n */) | |||
| 1010 | #ifndef WINDOWSNT | 1007 | #ifndef WINDOWSNT |
| 1011 | file = Qnil; | 1008 | file = Qnil; |
| 1012 | GCPRO2 (sound, file); | 1009 | GCPRO2 (sound, file); |
| 1013 | bzero (&sd, sizeof sd); | 1010 | current_sound_device = (struct sound_device *) xmalloc (sizeof (struct sound_device)); |
| 1014 | bzero (&s, sizeof s); | 1011 | bzero (current_sound_device, sizeof (struct sound_device)); |
| 1015 | current_sound_device = &sd; | 1012 | current_sound = (struct sound *) xmalloc (sizeof (struct sound)); |
| 1016 | current_sound = &s; | 1013 | bzero (current_sound, sizeof (struct sound)); |
| 1017 | record_unwind_protect (sound_cleanup, Qnil); | 1014 | record_unwind_protect (sound_cleanup, Qnil); |
| 1018 | s.header = (char *) alloca (MAX_SOUND_HEADER_BYTES); | 1015 | current_sound->header = (char *) alloca (MAX_SOUND_HEADER_BYTES); |
| 1019 | 1016 | ||
| 1020 | if (STRINGP (attrs[SOUND_FILE])) | 1017 | if (STRINGP (attrs[SOUND_FILE])) |
| 1021 | { | 1018 | { |
| 1022 | /* Open the sound file. */ | 1019 | /* Open the sound file. */ |
| 1023 | s.fd = openp (Fcons (Vdata_directory, Qnil), | 1020 | current_sound->fd = openp (Fcons (Vdata_directory, Qnil), |
| 1024 | attrs[SOUND_FILE], Qnil, &file, Qnil); | 1021 | attrs[SOUND_FILE], Qnil, &file, Qnil); |
| 1025 | if (s.fd < 0) | 1022 | if (current_sound->fd < 0) |
| 1026 | sound_perror ("Could not open sound file"); | 1023 | sound_perror ("Could not open sound file"); |
| 1027 | 1024 | ||
| 1028 | /* Read the first bytes from the file. */ | 1025 | /* Read the first bytes from the file. */ |
| 1029 | s.header_size = emacs_read (s.fd, s.header, MAX_SOUND_HEADER_BYTES); | 1026 | current_sound->header_size |
| 1030 | if (s.header_size < 0) | 1027 | = emacs_read (current_sound->fd, current_sound->header, |
| 1028 | MAX_SOUND_HEADER_BYTES); | ||
| 1029 | if (current_sound->header_size < 0) | ||
| 1031 | sound_perror ("Invalid sound file header"); | 1030 | sound_perror ("Invalid sound file header"); |
| 1032 | } | 1031 | } |
| 1033 | else | 1032 | else |
| 1034 | { | 1033 | { |
| 1035 | s.data = attrs[SOUND_DATA]; | 1034 | current_sound->data = attrs[SOUND_DATA]; |
| 1036 | s.header_size = min (MAX_SOUND_HEADER_BYTES, SBYTES (s.data)); | 1035 | current_sound->header_size = min (MAX_SOUND_HEADER_BYTES, SBYTES (current_sound->data)); |
| 1037 | bcopy (SDATA (s.data), s.header, s.header_size); | 1036 | bcopy (SDATA (current_sound->data), current_sound->header, current_sound->header_size); |
| 1038 | } | 1037 | } |
| 1039 | 1038 | ||
| 1040 | /* Find out the type of sound. Give up if we can't tell. */ | 1039 | /* Find out the type of sound. Give up if we can't tell. */ |
| 1041 | find_sound_type (&s); | 1040 | find_sound_type (current_sound); |
| 1042 | 1041 | ||
| 1043 | /* Set up a device. */ | 1042 | /* Set up a device. */ |
| 1044 | if (STRINGP (attrs[SOUND_DEVICE])) | 1043 | if (STRINGP (attrs[SOUND_DEVICE])) |
| 1045 | { | 1044 | { |
| 1046 | int len = SCHARS (attrs[SOUND_DEVICE]); | 1045 | int len = SCHARS (attrs[SOUND_DEVICE]); |
| 1047 | sd.file = (char *) alloca (len + 1); | 1046 | current_sound_device->file = (char *) alloca (len + 1); |
| 1048 | strcpy (sd.file, SDATA (attrs[SOUND_DEVICE])); | 1047 | strcpy (current_sound_device->file, SDATA (attrs[SOUND_DEVICE])); |
| 1049 | } | 1048 | } |
| 1050 | 1049 | ||
| 1051 | if (INTEGERP (attrs[SOUND_VOLUME])) | 1050 | if (INTEGERP (attrs[SOUND_VOLUME])) |
| 1052 | sd.volume = XFASTINT (attrs[SOUND_VOLUME]); | 1051 | current_sound_device->volume = XFASTINT (attrs[SOUND_VOLUME]); |
| 1053 | else if (FLOATP (attrs[SOUND_VOLUME])) | 1052 | else if (FLOATP (attrs[SOUND_VOLUME])) |
| 1054 | sd.volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; | 1053 | current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; |
| 1055 | 1054 | ||
| 1056 | args[0] = Qplay_sound_functions; | 1055 | args[0] = Qplay_sound_functions; |
| 1057 | args[1] = sound; | 1056 | args[1] = sound; |
| @@ -1060,27 +1059,15 @@ Internal use only, use `play-sound' instead.\n */) | |||
| 1060 | /* There is only one type of device we currently support, the VOX | 1059 | /* There is only one type of device we currently support, the VOX |
| 1061 | sound driver. Set up the device interface functions for that | 1060 | sound driver. Set up the device interface functions for that |
| 1062 | device. */ | 1061 | device. */ |
| 1063 | vox_init (&sd); | 1062 | vox_init (current_sound_device); |
| 1064 | 1063 | ||
| 1065 | /* Open the device. */ | 1064 | /* Open the device. */ |
| 1066 | sd.open (&sd); | 1065 | current_sound_device->open (current_sound_device); |
| 1067 | 1066 | ||
| 1068 | /* Play the sound. */ | 1067 | /* Play the sound. */ |
| 1069 | s.play (&s, &sd); | 1068 | current_sound->play (current_sound, current_sound_device); |
| 1070 | |||
| 1071 | /* Close the input file, if any. */ | ||
| 1072 | if (!STRINGP (s.data)) | ||
| 1073 | { | ||
| 1074 | emacs_close (s.fd); | ||
| 1075 | s.fd = -1; | ||
| 1076 | } | ||
| 1077 | |||
| 1078 | /* Close the device. */ | ||
| 1079 | sd.close (&sd); | ||
| 1080 | 1069 | ||
| 1081 | /* Clean up. */ | 1070 | /* Clean up. */ |
| 1082 | current_sound_device = NULL; | ||
| 1083 | current_sound = NULL; | ||
| 1084 | UNGCPRO; | 1071 | UNGCPRO; |
| 1085 | 1072 | ||
| 1086 | #else /* WINDOWSNT */ | 1073 | #else /* WINDOWSNT */ |
diff --git a/src/termhooks.h b/src/termhooks.h index 8405cac3b88..de43d580c9b 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -332,9 +332,9 @@ enum event_kind | |||
| 332 | /* Generated when an Apple event, a HICommand event, or a Services | 332 | /* Generated when an Apple event, a HICommand event, or a Services |
| 333 | menu event is received and the corresponding handler is | 333 | menu event is received and the corresponding handler is |
| 334 | registered. Members `x' and `y' are for the event class and ID | 334 | registered. Members `x' and `y' are for the event class and ID |
| 335 | symbols, respectively. Member `code' points to the Apple event | 335 | symbols, respectively. Member `arg' is a Lisp object converted |
| 336 | descriptor. Parameters for Non-Apple events are converted to | 336 | from the received Apple event. Parameters for non-Apple events |
| 337 | those in Apple events. */ | 337 | are converted to those in Apple events. */ |
| 338 | MAC_APPLE_EVENT | 338 | MAC_APPLE_EVENT |
| 339 | #endif | 339 | #endif |
| 340 | }; | 340 | }; |
diff --git a/src/xdisp.c b/src/xdisp.c index 63a1338b2cb..b1404d9c593 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4543,6 +4543,24 @@ handle_composition_prop (it) | |||
| 4543 | 4543 | ||
| 4544 | if (id >= 0) | 4544 | if (id >= 0) |
| 4545 | { | 4545 | { |
| 4546 | struct composition *cmp = composition_table[id]; | ||
| 4547 | |||
| 4548 | if (cmp->glyph_len == 0) | ||
| 4549 | { | ||
| 4550 | /* No glyph. */ | ||
| 4551 | if (STRINGP (it->string)) | ||
| 4552 | { | ||
| 4553 | IT_STRING_CHARPOS (*it) = end; | ||
| 4554 | IT_STRING_BYTEPOS (*it) = string_char_to_byte (it->string, | ||
| 4555 | end); | ||
| 4556 | } | ||
| 4557 | else | ||
| 4558 | { | ||
| 4559 | IT_CHARPOS (*it) = end; | ||
| 4560 | IT_BYTEPOS (*it) = CHAR_TO_BYTE (end); | ||
| 4561 | } | ||
| 4562 | return HANDLED_RECOMPUTE_PROPS; | ||
| 4563 | } | ||
| 4546 | it->method = GET_FROM_COMPOSITION; | 4564 | it->method = GET_FROM_COMPOSITION; |
| 4547 | it->cmp_id = id; | 4565 | it->cmp_id = id; |
| 4548 | it->cmp_len = COMPOSITION_LENGTH (prop); | 4566 | it->cmp_len = COMPOSITION_LENGTH (prop); |
diff --git a/src/xfaces.c b/src/xfaces.c index 3a066ee12c3..5596d5dc613 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -7255,6 +7255,16 @@ realize_default_face (f) | |||
| 7255 | check_lface (lface); | 7255 | check_lface (lface); |
| 7256 | bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs); | 7256 | bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs); |
| 7257 | face = realize_face (c, attrs, DEFAULT_FACE_ID); | 7257 | face = realize_face (c, attrs, DEFAULT_FACE_ID); |
| 7258 | |||
| 7259 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 7260 | #ifdef HAVE_X_WINDOWS | ||
| 7261 | if (face->font != FRAME_FONT (f)) | ||
| 7262 | /* As the font specified for the frame was not acceptable as a | ||
| 7263 | font for the default face (perhaps because auto-scaled fonts | ||
| 7264 | are rejected), we must adjust the frame font. */ | ||
| 7265 | x_set_font (f, build_string (face->font_name), Qnil); | ||
| 7266 | #endif /* HAVE_X_WINDOWS */ | ||
| 7267 | #endif /* HAVE_WINDOW_SYSTEM */ | ||
| 7258 | return 1; | 7268 | return 1; |
| 7259 | } | 7269 | } |
| 7260 | 7270 | ||