aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2006-02-04 01:01:38 +0000
committerMiles Bader2006-02-04 01:01:38 +0000
commit307f5c57467e8e967f795d47ec885bf19fd5317f (patch)
tree937b5ce4db7094b06d5c1cf58413ca49b860e5db
parent50d4fbde0cd35834e2fc9f0adc4c189657ba7170 (diff)
parent6203370b5e51fe55a4132fe8ccc868c35ad8c67f (diff)
downloademacs-307f5c57467e8e967f795d47ec885bf19fd5317f.tar.gz
emacs-307f5c57467e8e967f795d47ec885bf19fd5317f.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-11
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 34-42) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 14-17) - Update from CVS - Merge from emacs--devo--0
-rw-r--r--INSTALL.CVS17
-rw-r--r--etc/ChangeLog12
-rw-r--r--etc/MH-E-NEWS413
-rw-r--r--etc/NEWS4
-rw-r--r--etc/TODO8
-rw-r--r--lisp/.arch-inventory3
-rw-r--r--lisp/ChangeLog115
-rw-r--r--lisp/arc-mode.el14
-rw-r--r--lisp/dframe.el21
-rw-r--r--lisp/emacs-lisp/unsafep.el15
-rw-r--r--lisp/emulation/cua-base.el7
-rw-r--r--lisp/erc/ChangeLog5
-rw-r--r--lisp/erc/erc.el4
-rw-r--r--lisp/ezimage.el10
-rw-r--r--lisp/gnus/ChangeLog21
-rw-r--r--lisp/gnus/gnus-util.el3
-rw-r--r--lisp/gnus/mml.el5
-rw-r--r--lisp/gnus/nnweb.el3
-rw-r--r--lisp/gnus/rfc2231.el31
-rw-r--r--lisp/hi-lock.el24
-rw-r--r--lisp/hilit-chg.el14
-rw-r--r--lisp/ibuf-ext.el13
-rw-r--r--lisp/ibuffer.el26
-rw-r--r--lisp/international/mule-cmds.el3
-rw-r--r--lisp/mail/mailclient.el54
-rw-r--r--lisp/mh-e/ChangeLog160
-rw-r--r--lisp/mh-e/mh-alias.el14
-rw-r--r--lisp/mh-e/mh-comp.el15
-rw-r--r--lisp/mh-e/mh-compat.el108
-rw-r--r--lisp/mh-e/mh-e.el41
-rw-r--r--lisp/mh-e/mh-folder.el2
-rw-r--r--lisp/mh-e/mh-funcs.el2
-rw-r--r--lisp/mh-e/mh-gnus.el10
-rw-r--r--lisp/mh-e/mh-letter.el6
-rw-r--r--lisp/mh-e/mh-limit.el6
-rw-r--r--lisp/mh-e/mh-mime.el16
-rw-r--r--lisp/mh-e/mh-search.el66
-rw-r--r--lisp/mh-e/mh-seq.el8
-rw-r--r--lisp/mh-e/mh-show.el2
-rw-r--r--lisp/mh-e/mh-speed.el60
-rw-r--r--lisp/mh-e/mh-thread.el20
-rw-r--r--lisp/mh-e/mh-tool-bar.el4
-rw-r--r--lisp/mh-e/mh-utils.el80
-rw-r--r--lisp/net/newsticker.el58
-rw-r--r--lisp/net/rcirc.el56
-rw-r--r--lisp/net/tramp.el11
-rw-r--r--lisp/newcomment.el11
-rw-r--r--lisp/replace.el4
-rw-r--r--lisp/savehist.el20
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/textmodes/nroff-mode.el18
-rw-r--r--lisp/textmodes/table.el4
-rw-r--r--lisp/xml.el132
-rw-r--r--lispref/frames.texi32
-rw-r--r--lispref/keymaps.texi169
-rw-r--r--lispref/minibuf.texi4
-rw-r--r--man/ChangeLog64
-rw-r--r--man/buffers.texi49
-rw-r--r--man/cmdargs.texi3
-rw-r--r--man/custom.texi16
-rw-r--r--man/display.texi14
-rw-r--r--man/emacs.texi6
-rw-r--r--man/files.texi309
-rw-r--r--man/frames.texi334
-rw-r--r--man/indent.texi24
-rw-r--r--man/kmacro.texi116
-rw-r--r--man/macos.texi2
-rw-r--r--man/major.texi8
-rw-r--r--man/misc.texi4
-rw-r--r--man/msdog.texi4
-rw-r--r--man/mule.texi424
-rw-r--r--man/windows.texi58
-rw-r--r--src/ChangeLog16
-rw-r--r--src/coding.c4
-rw-r--r--src/xdisp.c29
75 files changed, 2284 insertions, 1186 deletions
diff --git a/INSTALL.CVS b/INSTALL.CVS
index fa5b8e4958c..ce3fa9f2627 100644
--- a/INSTALL.CVS
+++ b/INSTALL.CVS
@@ -25,18 +25,17 @@ procedure:
25(If you want to install the Emacs binary, type "make install" instead 25(If you want to install the Emacs binary, type "make install" instead
26of "make" in the last command.) 26of "make" in the last command.)
27 27
28Occasionally the files "lisp/loaddefs.el" or lisp/mh-e/mh-loaddefs.el 28Occasionally the file "lisp/loaddefs.el" will need be updated to
29will need be updated to reflect new autoloaded functions. If you see 29reflect new autoloaded functions. If you see errors about undefined
30errors about undefined lisp functions during compilation, that may be 30lisp functions during compilation, that may be the reason. Another
31the reason. Another symptom may be an error saying that "loaddefs.el" 31symptom may be an error saying that "loaddefs.el" could not be found;
32could not be found; this is due to a change in the way loaddefs.el was 32this is due to a change in the way loaddefs.el was handled in CVS, and
33handled in CVS, and should only happen once, for users that are 33should only happen once, for users that are updating old CVS trees.
34updating old CVS trees.
35 34
36To update loaddefs.el and mh-loaddefs.el, do: 35To update loaddefs.el, do:
37 36
38 $ cd lisp 37 $ cd lisp
39 $ make autoloads mh-autoloads EMACS=../src/emacs 38 $ make autoloads EMACS=../src/emacs
40 39
41If either of the above partial procedures fails, try "make bootstrap". 40If either of the above partial procedures fails, try "make bootstrap".
42 41
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 7d975861e63..5411a0cf626 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,15 @@
12006-02-03 Bill Wohler <wohler@newt.com>
2
3 Release MH-E version 7.91.
4
5 * NEWS, MH-E-NEWS: Update for MH-E release 7.91.
6
72006-02-02 Bill Wohler <wohler@newt.com>
8
9 Release MH-E version 7.90.
10
11 * NEWS, MH-E-NEWS: Update for MH-E release 7.90.
12
12006-01-29 Michael Olson <mwolson@gnu.org> 132006-01-29 Michael Olson <mwolson@gnu.org>
2 14
3 * NEWS: Add entry for ERC. 15 * NEWS: Add entry for ERC.
diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS
index ba13b8aca15..8dc89e3cbcf 100644
--- a/etc/MH-E-NEWS
+++ b/etc/MH-E-NEWS
@@ -1,11 +1,420 @@
1* COPYRIGHT 1* COPYRIGHT
2 2
3Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 3Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 4
5Copying and distribution of this file, with or without modification, 5Copying and distribution of this file, with or without modification,
6are permitted in any medium without royalty provided the copyright 6are permitted in any medium without royalty provided the copyright
7notice and this notice are preserved. 7notice and this notice are preserved.
8 8
9* Changes in MH-E 7.91
10
11Version 7.91 is the second 8.0 beta release and fixes several bugs
12that were uncovered in wider testing.
13
14* Changes in MH-E 7.90
15
16Version 7.90 is the first 8.0 beta release and is a release that has
17finally broken away from some unfortunate legacy decisions in favor of
18something that will be easier to use and support. Many bugs were fixed
19and many features were added, including making the pick search
20equivalent to the other types of searches.
21
22The rewrite of the manual accelerated dramatically in recent months
23and drove the changes in this release. In order to make the
24manual--and hence the software--better, clearer, more consistent, more
25predictable, and easier to understand, many variables and functions
26were renamed. The changes to the user-visible variables are listed
27here. It is our hope that you, dear MH-E user, will embrace the
28changes for the better and forgive us from making so many incompatible
29changes.
30
31If you use undocumented functionality, be sure to read the ChangeLog
32for changes that might affect you.
33
34** New Features in MH-E 7.90
35
36*** Entry Points Have Moved
37
38Emacs 21 users must now add `(require 'mh-autoloads)' because the
39entry points (such as `mh-rmail' and `mh-smail') have moved to
40different files which have made the autoloads that come with Emacs
41inaccurate. This change was necessary because the code was reorganized
42to remove circular dependencies, to make the code more stable and
43maintainable, and to reduce the time to load MH-E.
44
45*** MH-E No Longer Calls install-mh
46
47The new variant detection code makes use of `mhparam' which assumes
48that your MH environment has already been set up. The code to call
49`install-mh', which could no longer be run anyway, was removed.
50
51*** Use run-hook-with-args
52
53We use normal hooks whenever possible and do not use
54`run-hook-with-args' (with one documented exception) (closes SF
55#643702).
56
57*** Merge mh-index.el and mh-pick.el
58
59We merged `mh-index.el' and `mh-pick.el' into a new file
60`mh-search.el'. As part of this process, the old `F s' behavior of
61adding messages to the search sequence has been removed. The `F i'
62keybinding was then renamed to `F s' (`mh-search'). The mode of the
63search-pattern buffer was renamed from MH-Pick to MH-Search. Within
64the MH-Search buffer, the command `C-c C-p' (`mh-pick-do-search') now
65runs pick on the given folder recursively and displays the results in
66a search folder like the other search methods (closes SF #829207).
67
68*** Improve Security of mh-fetch-x-image-url
69
70The default has been changed to "Never Fetch." Those of you who like
71the value of "Ask Before Fetching" will have to customize this option
72(closes SF #831278).
73
74*** Remove Emacs 20 Support
75
76As it turns out, we had already added some code that didn't work on
77Emacs 20. However, now we've formalized it and removed code that was
78present solely for Emacs 20 support (closes SF #1359240).
79
80*** Derive mh-letter-mode from mail-mode
81
82MH-Letter mode is now derived from `mail-mode'. We were able to delete
83a lot of code. In return, there are a few `mail-mode' commands that
84are available that may or may not be useful and the `mail-mode-hook'
85is run (closes SF #1385571).
86
87*** Add Choices to mh-to-field-choices
88
89In MH-Letter mode, you can use the "C-c C-f (mh-to-field)" prefix to
90go to and insert fields. The fields "Reply-To:", "Mail-Reply-To:",
91"Mail-Followup-To:" can now be created via the "C-r", "C-a" (for
92author), and "C-l" keys respectively. The key for the "From:" field
93has been renamed from "C-r" to "C-m" for consistency with `mail-mode'
94(closes SF #1400139).
95
96*** MH-Folder Keymap Changes
97
98The function `mh-ps-print-toggle-mime' was never implemented and the
99functionality in `mh-ps-print-msg-show' was better afforded by
100`mh-ps-print-msg' and `mh-ps-print-msg-file'.
101
102Key 7.4.85 7.4.90
103
104F i mh-index-search -
105F s mh-search-folder mh-search
106P A mh-ps-print-toggle-mime -
107P M mh-ps-print-toggle-mime -
108P s mh-ps-print-msg-show -
109
110*** MH-Letter Keymap Changes
111
112The change where `mh-letter-mode' derives from `mail-mode' adds a few
113keybindings. Some are interesting; experiment! Most of the changes
114have to do with the renaming of the functions with "mhn" in them to
115"mh" because nmh doesn't use `mhn'. The names were also made
116consistent with the the family of "mml" functions.
117
118Key 7.4.85 7.4.90
119
120C-c C-e mh-edit-mhn mh-mh-to-mime
121C-c C-f C-a - mh-to-field
122C-c C-f C-l - mh-to-field
123C-c C-f RET - mh-to-field
124C-c C-f a - mh-to-field
125C-c C-f l - mh-to-field
126C-c C-f m - mh-to-field
127C-c RET C-g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp
128C-c RET C-t mh-mhn-compose-external-compressed-tar
129 mh-mh-compose-external-compressed-tar
130C-c RET C-u mh-revert-mhn-edit mh-mh-to-mime-undo
131C-c RET C-x mh-mhn-compose-external-type mh-mh-compose-external-type
132C-c RET g mh-mhn-compose-anon-ftp mh-mh-compose-anon-ftp
133C-c RET t mh-mhn-compose-external-compressed-tar
134 mh-mh-compose-external-compressed-tar
135C-c RET u mh-revert-mhn-edit mh-mh-to-mime-undo
136C-c RET x mh-mhn-compose-external-type mh-mh-compose-external-type
137
138*** MH-Search Keymap Changes
139
140These are the changes associated with the new search mode. The command
141`C-c C-c' (`mh-index-do-search') now performs the standard indexed
142search, while `C-c C-p' (`mh-pick-do-search') runs pick as before,
143only better!
144
145Key 7.4.85 7.4.90
146
147C-c C-c mh-do-search mh-index-do-search
148C-c TAB mh-index-do-search -
149
150** New Variables in MH-E 7.90
151
152*** mh-after-commands-processed-hook
153
154Hook run by `x' (`mh-execute-commands') after performing outstanding
155refile and delete requests.
156
157*** mh-before-commands-processed-hook
158
159Renamed from `mh-folder-updated-hook'. It wasn't clear whether
160`mh-folder-updated-hook' was run before or after the commands were
161executed. We now provide both with clear names.
162
163*** mh-highlight-citation-style
164
165Renamed from `mh-highlight-citation-p' since it wasn't a boolean. The
166new name is also more descriptive.
167
168*** mh-insert-signature-hook
169
170Renamed from `mh-letter-insert-signature-hook' since most of the other
171hooks do not carry the mode in the prefix and because the new name is
172equally clear.
173
174*** mh-kill-folder-suppress-prompt-hooks
175
176Renamed from `mh-kill-folder-suppress-prompt-hook'. By convention,
177abnormal hooks, which this is, either have a -function or -hooks
178suffix.
179
180*** mh-mhl-format-file
181
182Renamed from `mhl-formfile' to put it in the MH-E namespace and to be
183consistent with other similar options.
184
185*** mh-mh-to-mime-hook
186
187Renamed from `mh-edit-mhn-hook'. We have a family of `mh-mml-to-mime'
188functions and variables; the older mhn functions and variables were
189renamed to have a consistent `mh-mh-to-mime' prefix.
190
191*** mh-new-messages-folders
192
193Renamed from `mh-index-new-messages-folders' for clarity.
194
195*** mh-path
196
197Additional list of directories to search for MH.
198
199*** mh-redist-full-contents-flag
200
201On means the `dist' command needs entire letter for redistribution.
202This was previously a variable. It's now an option.
203
204*** mh-search-mode-hook
205
206Renamed from `mh-pick-mode-hook' as part of the
207`mh-index.el'/`mh-pick.el' merge into `mh-search.el'.
208
209*** mh-search-program
210
211Renamed from `mh-index-program' as part of the
212`mh-index.el'/`mh-pick.el' merge into `mh-search.el'.
213
214*** mh-sortm-args
215
216Additional arguments for `sortm'. This was previously an internal
217variable. It's now an user-customizable option.
218
219*** mh-speed-update-interval
220
221Renamed from `mh-speed-flists-interval' for clarity.
222
223*** mh-ticked-messages-folders
224
225Renamed from `mh-index-ticked-messages-folders' for clarity.
226
227*** mh-xemacs-tool-bar-position
228
229Renamed from `mh-xemacs-toolbar-position' per GNU Emacs naming conventions.
230
231*** mh-xemacs-use-tool-bar-flag
232
233Renamed from `mh-xemacs-use-toolbar-flag' per GNU Emacs naming conventions.
234
235*** mh-yank-behavior
236
237Renamed from `mh-yank-from-start-of-msg' for clarity.
238
239** Variables Deleted in MH-E 7.90
240
241*** mail-citation-hook
242
243This is already defined in `sendmail.el'.
244
245*** mh-edit-mhn-hook
246
247Renamed to `mh-mh-to-mime-hook'.
248
249*** mh-folder-updated-hook
250
251Renamed to `mh-before-commands-processed-hook'.
252
253*** mh-highlight-citation-p
254
255Renamed to `mh-highlight-citation-style'.
256
257*** mh-index-new-messages-folders
258
259Renamed to `mh-new-messages-folders'.
260
261*** mh-index-program
262
263Renamed to `mh-search-program'.
264
265*** mh-index-ticked-messages-folders
266
267Renamed to `mh-ticked-messages-folders'.
268
269*** mh-kill-folder-suppress-prompt-hook
270
271Renamed to `mh-kill-folder-suppress-prompt-hooks'.
272
273*** mh-letter-insert-signature-hook
274
275Renamed to `mh-insert-signature-hook'.
276
277*** mhl-formfile
278
279Renamed to `mh-mhl-format-file'.
280
281*** mh-pick-mode-hook
282
283Renamed to `mh-search-mode-hook'.
284
285*** mh-speed-flists-interval
286
287Renamed to `mh-speed-update-interval'.
288
289*** mh-speed-run-flists-flag
290
291Deleted since setting `mh-speed-flists-interval' to 0 accomplishes the
292same thing.
293
294*** mh-xemacs-toolbar-position
295
296Renamed to `mh-xemacs-tool-bar-position'.
297
298*** mh-xemacs-use-toolbar-flag
299
300Renamed to `mh-xemacs-use-tool-bar-flag'.
301
302*** mh-yank-from-start-of-msg
303
304Renamed to `mh-yank-behavior'.
305
306** Bug Fixes in MH-E 7.90
307
308*** Error Message When Trying to Send Using MH-E
309
310This behavior is no longer observed (closes SF #1002103).
311
312*** "Args out of range" Error in Displaying Message
313
314This behavior is no longer observed (closes SF #1227504).
315
316*** Front-and-back Truncation in mailto: Rendering
317
318This behavior is no longer observed (closes SF #1227510).
319
320*** Completions Offered by mh-refile-message Are Not Sorted
321
322This behavior is no longer observed (closes SF #698734).
323
324*** Add Message-ID to Outgoing Messages
325
326If you replied to a message in your `+outbox', an `In-Reply-To:'
327header field was created that broke threading at the recipient's end.
328We now add a `Message-ID:' to outgoing messages which fixes this
329(closes SF #725425).
330
331*** Speedbar Creating New Folders Instead of Visiting Existing
332
333This was actually fixed in 7.4.3 (closes SF #792300).
334
335*** Args Out of Range
336
337This compilation error was actually fixed in 7.4.3 (closes SF
338#806577).
339
340*** Initialization Fails If ~/Mail Exists
341
342MH-E no longer calls `install-mh' so this issue has gone away (closes
343SF #835192).
344
345*** RETURN Causes Infinite Loop in mh-letter
346
347This behavior is no longer observed (closes SF #887346).
348
349*** Missing Headers When Replying to All
350
351User needed to edit `replgroupcomps' (closes SF #918194).
352
353*** mh-find-path Doesn't Use mhparam
354
355MH-E no longer peeks into the MH profile `~/.mh_profile' directly. It
356uses `mhparam' instead (closes SF #1016027).
357
358*** mh-index-previous-folder Does Not Work Correctly
359
360If your cursor was on an item below a folder heading and you used
361`M-TAB' (`mh-index-previous-folder'), you would move to the previous
362folder heading. This has been fixed (closes SF #1126188).
363
364*** XEmacs Compile Fails
365
366Compiling produced a "Symbol's value as variable is void: require"
367error on all files. This has been fixed. As a bonus, warnings have
368been reduced from hundreds to just a few (closes SF #1127595).
369
370*** buffer-offer-save Permanent Local
371
372There was a movement to make `buffer-offer-save' a permanent local
373which would have meant that we could not set it in `mh-letter-mode'.
374However, this movement was fraught with issues and was postponed
375(closes SF #1184756).
376
377*** Better Handling of Empty cur Sequence
378
379If you refiled a message into a folder and then used `F r'
380(`mh-rescan-folder') in that folder, your cursor would be taken to the
381first message. The cursor now stays where it was (closes SF #1207247).
382
383*** Name of the Draft File in mh-comp.el
384
385MH is documented to use the draft file. If you use a draft file for
386something else (like Sylpheed), then use draft folders (closes SF
387#1231483).
388
389*** Use Standard Default Notation in Prompts
390
391Emacs changed their defaults in prompts from "Prompt: [value]" to
392"Prompt (default value): ". All MH-E prompts have been updated to
393comply with the new standard (closes SF #1275933).
394
395*** Msg Display Broken After Displaying Msg with Inline Image
396
397Messages with inline images no longer trim certain message header
398fields (closes SF #1306141).
399
400*** mh-visit-folder Munges font-lock-keywords
401
402MH-E broke highlighting in Gnus buffers. This was actually a problem
403in CVS Emacs 22 and has been fixed there (closes SF #1393879).
404
405*** Illegal Filename Chars for W32 Filesystems
406
407Windows users who view `X-Image-URL:' images could not cache the
408images since the cached image file names had illegal characters. This
409has been fixed (closes SF #1396499).
410
411*** mh-send Doesn't Handle mml Insertions Via mail-user-agent
412
413Can now forward messages in Gnus if MH-E is your `mail-user-agent'
414(closes SF #1399307).
415
416
417
9* Changes in MH-E 7.85 418* Changes in MH-E 7.85
10 419
11Version 7.85 heralds a migration of the CVS repository from 420Version 7.85 heralds a migration of the CVS repository from
@@ -409,7 +818,7 @@ that you comment them out. The MH detection code has been completely
409rewritten and it is very likely that you no longer to set them and 818rewritten and it is very likely that you no longer to set them and
410their setting may confuse other MH-E settings. 819their setting may confuse other MH-E settings.
411 820
412** Variables Deleted in MH-E 821** Variables Deleted in MH-E 7.4.80
413 822
414Variables that have been removed from MH-E that have not been 823Variables that have been removed from MH-E that have not been
415discussed elsewhere are listed here. 824discussed elsewhere are listed here.
diff --git a/etc/NEWS b/etc/NEWS
index 480a3f12e3e..2ea7ddb9b25 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1,5 +1,5 @@
1GNU Emacs NEWS -- history of user-visible changes. 2003-05-21 1GNU Emacs NEWS -- history of user-visible changes. 2003-05-21
2Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 2Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4See the end for copying conditions. 4See the end for copying conditions.
5 5
@@ -3053,7 +3053,7 @@ See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
3053--- 3053---
3054** MH-E changes. 3054** MH-E changes.
3055 3055
3056Upgraded to MH-E version 7.85. There have been major changes since 3056Upgraded to MH-E version 7.91. There have been major changes since
3057version 5.0.2; see MH-E-NEWS for details. 3057version 5.0.2; see MH-E-NEWS for details.
3058 3058
3059** Calendar changes: 3059** Calendar changes:
diff --git a/etc/TODO b/etc/TODO
index 3ab9042fcba..28ea7742f99 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -123,6 +123,11 @@ to the FSF.
123 123
124* Other features we would like: 124* Other features we would like:
125 125
126** Create a category of errors called `user-error' for errors which are
127typically due to pilot errors and should thus be in debug-ignored-errors.
128
129** Give Tar mode all the features of Archive mode.
130
126** Create a category of errors called `process-error' 131** Create a category of errors called `process-error'
127 for some or all errors associated with using subprocesses. 132 for some or all errors associated with using subprocesses.
128 133
@@ -420,6 +425,9 @@ when the body only calls primitives.
420 "japanese". Currently, most Japanese users are using external 425 "japanese". Currently, most Japanese users are using external
421 packages (e.g. tamago, anthy) or an input method via XIM. 426 packages (e.g. tamago, anthy) or an input method via XIM.
422 427
428** Let LEIM handle the Mode_switch key like XIM does (i.e. a toggle like C-\
429but which can also be used as a modifier).
430
423** Provide the toolbar on ttys. This could map a bit like tmm-menubar 431** Provide the toolbar on ttys. This could map a bit like tmm-menubar
424 for the menubar and buttons could look a bit like those used by customize. 432 for the menubar and buttons could look a bit like those used by customize.
425 433
diff --git a/lisp/.arch-inventory b/lisp/.arch-inventory
index 9bd88350a95..5341c2d8fec 100644
--- a/lisp/.arch-inventory
+++ b/lisp/.arch-inventory
@@ -1,7 +1,4 @@
1# Auto-generated lisp files, which ignore 1# Auto-generated lisp files, which ignore
2precious ^(loaddefs|finder-inf|cus-load)\.el$ 2precious ^(loaddefs|finder-inf|cus-load)\.el$
3 3
4# Something generated during a windows build?!?
5precious ^(Makefile\.unix)$
6
7# arch-tag: fc62dc9f-3a91-455b-b8e7-d49df66beee0 4# arch-tag: fc62dc9f-3a91-455b-b8e7-d49df66beee0
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 34c179df334..0b6eae823e0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,120 @@
12006-02-03 Werner Lemberg <wl@gnu.org>
2
3 * textmodes/nroff-mode.el (nroff-font-lock-keywords): Don't be
4 greedy to find the closing bracket in \*[...] and similar
5 expressions. This is a first rough fix -- many additional
6 refinements are necessary to make nroff mode really usable with
7 groff.
8
92006-02-03 Jens Petersen <petersen@redhat.com> (tiny change)
10
11 * international/mule-cmds.el (set-locale-environment): Add
12 "/usr/share/X11/locale/locale.alias" to search list for xorg-x11
13 libX11.
14
152006-02-03 Joe Wells <jbw@macs.hw.ac.uk> (tiny change)
16
17 * arc-mode.el (archive-maybe-copy): Fix the way directories in the
18 archive are created in archive-tmpdir.
19
202006-02-02 John Paul Wallington <jpw@pobox.com>
21
22 * ibuffer.el (ibuffer-compressed-file-name-regexp): New defcustom.
23 (ibuffer-fontification-alist): Use it.
24 (ibuffer-mode-map): Bind `ibuffer-mark-compressed-file-buffers'
25 to "* z" and the Ibuffer Mark menu.
26
27 * ibuf-ext.el (ibuffer-mark-compressed-file-buffers): New command.
28
292006-02-02 Stefan Monnier <monnier@iro.umontreal.ca>
30
31 * textmodes/table.el (*table--cell-describe-mode)
32 (*table--cell-describe-bindings): Undo last change since
33 print-help-return-message is not obsoleted by anything at all.
34
352006-02-02 Luc Teirlinck <teirllm@auburn.edu>
36
37 * emulation/cua-base.el (cua-mode): Doc fix.
38
392006-02-02 Juanma Barranquero <lekktu@gmail.com>
40
41 * dframe.el (dframe-handle-make-frame-visible)
42 (dframe-handle-iconify-frame, dframe-get-focus)
43 (dframe-select-attached-frame, dframe-power-click)
44 (dframe-frame-mode): Fix typos in docstrings.
45
46 * ezimage.el (ezimage-mail, ezimage-object-out-of-date)
47 (ezimage-insert-image-button-maybe, ezimage-insert-over-text):
48 Fix typos in docstrings.
49
50 * hi-lock.el (hi-lock-mode, hi-lock-line-face-buffer)
51 (hi-lock-face-buffer, hi-lock-font-lock-hook)
52 (hi-lock-archaic-interface-message-used)
53 (hi-lock-file-patterns-range): Fix typos in docstrings.
54
55 * savehist.el (savehist-loaded, savehist-load, savehist-install)
56 (savehist-autosave, savehist-trim-history): Fix typos in docstrings.
57
58 * mail/mailclient.el (mailclient-place-body-on-clipboard-flag):
59 Fix typo in docstring.
60
61 * net/newsticker.el (newsticker--decode-iso8601-date)
62 (newsticker--set-customvar, newsticker--buffer-insert-item)
63 (newsticker--do-run-auto-mark-filter)
64 (newsticker--parse-generic-feed): Doc fixes.
65 (newsticker--retrieval-timer-list, newsticker-url-list)
66 (newsticker-hide-immortal-items-in-echo-area)
67 (newsticker-hide-obsolete-items-in-echo-area)
68 (newsticker-new-item-face, newsticker--enclosure)
69 (newsticker-buffer-update, newsticker-w3m-show-inline-images)
70 (newsticker--parse-atom-0.3, newsticker--parse-rss-1.0)
71 (newsticker--parse-generic-feed, newsticker--cache-contains)
72 (newsticker--stat-num-items, newsticker-download-enclosures):
73 Fix typos in docstrings.
74
75 * net/rcirc.el (rcirc-debug): Doc fix.
76 (rcirc-fill-column, rcirc-receive-message-hooks)
77 (rcirc-browse-url-map, rcirc-read-only-flag, rcirc-prompt)
78 (rcirc-mode, rcirc-generate-new-buffer-name)
79 (rcirc-startup-channels, rcirc-ignore-update-automatic)
80 (rcirc-cmd-ignore, rcirc-browse-url, rcirc-url-regexp):
81 Fix typos in docstrings.
82 (rcirc-print): "?\ " -> "?\s".
83 (rcirc-cmd-join): Improve argument/docstring consistency.
84
852006-02-01 Mark A. Hershberger <mah@everybody.org>
86
87 * xml.el (xml-parse-region): Move save-excursion and set-buffer up
88 before narrow-to-region.
89
902006-02-01 Richard M. Stallman <rms@gnu.org>
91
92 * simple.el (move-beginning-of-line): Scan properly for invis change.
93
94 * replace.el (multi-occur-in-matching-buffers): Fix prev change.
95
962006-02-01 Michael Albinus <michael.albinus@gmx.de>
97
98 * net/tramp.el (tramp-convert-file-attributes): Set file's gid
99 change bit only when id-format is 'integer. Reported by Matt
100 Hodges <M.P.Hodges@rl.ac.uk>.
101
1022006-02-01 Juanma Barranquero <lekktu@gmail.com>
103
104 * hilit-chg.el (highlight-changes-initial-state)
105 (highlight-changes-global-initial-state): Doc fixes.
106 (highlight-changes-global-modes, global-highlight-changes):
107 Fix typos in docstrings.
108
1092006-02-01 Kim F. Storm <storm@cua.dk>
110
111 * emulation/cua-base.el (cua-mode): Mention that CUA enables
112 transient-mark-mode in doc string.
113
12006-01-31 Richard M. Stallman <rms@gnu.org> 1142006-01-31 Richard M. Stallman <rms@gnu.org>
2 115
3 * replace.el (multi-occur): Doc fix. 116 * replace.el (multi-occur): Doc fix.
4 (multi-occur-in-matching-buffers): Renamed from 117 (multi-occur-in-matching-buffers): Rename from
5 multi-occur-by-filename-regexp. Prefix arg says match 118 multi-occur-by-filename-regexp. Prefix arg says match
6 buffer names instead of file names. 119 buffer names instead of file names.
7 120
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 4aabfdea310..4eff3b65635 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -822,17 +822,13 @@ using `make-temp-file', and the generated name is returned."
822 (archive-name 822 (archive-name
823 (or (and archive-subfile-mode (aref archive-subfile-mode 0)) 823 (or (and archive-subfile-mode (aref archive-subfile-mode 0))
824 archive))) 824 archive)))
825 (make-directory archive-tmpdir t)
826 ;; If ARCHIVE includes leading directories, make sure they
827 ;; exist under archive-tmpdir.
828 (let ((arch-dir (file-name-directory archive)))
829 (if arch-dir
830 (make-directory (concat
831 (file-name-as-directory archive-tmpdir)
832 arch-dir)
833 t)))
834 (setq archive-local-name 825 (setq archive-local-name
835 (archive-unique-fname archive-name archive-tmpdir)) 826 (archive-unique-fname archive-name archive-tmpdir))
827 ;; Maked sure all the leading directories in
828 ;; archive-local-name exist under archive-tmpdir, so that
829 ;; the directory structure recorded in the archive is
830 ;; reconstructed in the temporary directory.
831 (make-directory (file-name-directory archive-local-name) t)
836 (save-restriction 832 (save-restriction
837 (widen) 833 (widen)
838 (write-region start (point-max) archive-local-name nil 'nomessage)) 834 (write-region start (point-max) archive-local-name nil 'nomessage))
diff --git a/lisp/dframe.el b/lisp/dframe.el
index 56bbdc36c01..e15b57af605 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -1,6 +1,7 @@
1;;; dframe --- dedicate frame support modes 1;;; dframe --- dedicate frame support modes
2 2
3;;; Copyright (C) 1996, 97, 98, 99, 2000, 01, 02, 03, 04, 05 Free Software Foundation 3;;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation
4 5
5;; Author: Eric M. Ludlam <zappo@gnu.org> 6;; Author: Eric M. Ludlam <zappo@gnu.org>
6;; Keywords: file, tags, tools 7;; Keywords: file, tags, tools
@@ -299,7 +300,7 @@ This frame is either resurrected, hidden, killed, etc based on
299the value. 300the value.
300CACHE-VAR is a variable used to cache a cached frame. 301CACHE-VAR is a variable used to cache a cached frame.
301BUFFER-VAR is a variable used to cache the buffer being used in dframe. 302BUFFER-VAR is a variable used to cache the buffer being used in dframe.
302This buffer will have `dframe-mode' run on it. 303This buffer will have `dframe-frame-mode' run on it.
303FRAME-NAME is the name of the frame to create. 304FRAME-NAME is the name of the frame to create.
304LOCAL-MODE-FN is the function used to call this one. 305LOCAL-MODE-FN is the function used to call this one.
305PARAMETERS are frame parameters to apply to this dframe. 306PARAMETERS are frame parameters to apply to this dframe.
@@ -606,7 +607,7 @@ The function must take an EVENT.")
606 607
607(defun dframe-handle-make-frame-visible (e) 608(defun dframe-handle-make-frame-visible (e)
608 "Handle a `make-frame-visible' event. 609 "Handle a `make-frame-visible' event.
609Should enables auto-updating if the last state was also enabled. 610Should enable auto-updating if the last state was also enabled.
610Argument E is the event making the frame visible." 611Argument E is the event making the frame visible."
611 (interactive "e") 612 (interactive "e")
612 (let ((f last-event-frame)) 613 (let ((f last-event-frame))
@@ -617,7 +618,7 @@ Argument E is the event making the frame visible."
617 618
618(defun dframe-handle-iconify-frame (e) 619(defun dframe-handle-iconify-frame (e)
619 "Handle a `iconify-frame' event. 620 "Handle a `iconify-frame' event.
620Should disables auto-updating if the last state was also enabled. 621Should disable auto-updating if the last state was also enabled.
621Argument E is the event iconifying the frame." 622Argument E is the event iconifying the frame."
622 (interactive "e") 623 (interactive "e")
623 (let ((f last-event-frame)) 624 (let ((f last-event-frame))
@@ -652,7 +653,7 @@ If the selected frame is not in the symbol FRAME-VAR, then FRAME-VAR
652frame is selected. If the FRAME-VAR is active, then select the 653frame is selected. If the FRAME-VAR is active, then select the
653attached frame. If FRAME-VAR is nil, ACTIVATOR is called to 654attached frame. If FRAME-VAR is nil, ACTIVATOR is called to
654created it. HOOK is an optional argument of hooks to run when 655created it. HOOK is an optional argument of hooks to run when
655selecting FRAME." 656selecting FRAME-VAR."
656 (interactive) 657 (interactive)
657 (if (eq (selected-frame) (symbol-value frame-var)) 658 (if (eq (selected-frame) (symbol-value frame-var))
658 (if (frame-live-p dframe-attached-frame) 659 (if (frame-live-p dframe-attached-frame)
@@ -696,10 +697,10 @@ If optional arg FRAME is nil just return `dframe-attached-frame'."
696 dframe-attached-frame)) 697 dframe-attached-frame))
697 698
698(defun dframe-select-attached-frame (&optional frame) 699(defun dframe-select-attached-frame (&optional frame)
699 "Switch to the frame the dframe controlled frame FRAME was started from. If 700 "Switch to the frame the dframe controlled frame FRAME was started from.
700optional arg FRAME is nil assume the attached frame is already selected and 701If optional arg FRAME is nil assume the attached frame is already selected
701just run the hooks `dframe-after-select-attached-frame-hook'. Return the 702and just run the hooks `dframe-after-select-attached-frame-hook'. Return
702attached frame." 703the attached frame."
703 (let ((frame (dframe-attached-frame frame))) 704 (let ((frame (dframe-attached-frame frame)))
704 (if frame (select-frame frame)) 705 (if frame (select-frame frame))
705 (prog1 frame 706 (prog1 frame
@@ -957,7 +958,7 @@ This should be bound to mouse event E."
957 (funcall dframe-mouse-position-function))) 958 (funcall dframe-mouse-position-function)))
958 959
959(defun dframe-power-click (e) 960(defun dframe-power-click (e)
960 "Activate any `dframe' mouse click as a power click. 961 "Activate any dframe mouse click as a power click.
961A power click will dispose of cached data (if available) or bring a buffer 962A power click will dispose of cached data (if available) or bring a buffer
962up into a different window. 963up into a different window.
963This should be bound to mouse event E." 964This should be bound to mouse event E."
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el
index 4b1312d58d7..27e079b1dcd 100644
--- a/lisp/emacs-lisp/unsafep.el
+++ b/lisp/emacs-lisp/unsafep.el
@@ -79,11 +79,13 @@
79;; passed a circular list to `assoc', Emacs would crash. Historically, 79;; passed a circular list to `assoc', Emacs would crash. Historically,
80;; problems of this kind have been few and short-lived. 80;; problems of this kind have been few and short-lived.
81 81
82;;; Code:
83
82(provide 'unsafep) 84(provide 'unsafep)
83(require 'byte-opt) ;Set up the `side-effect-free' properties 85(require 'byte-opt) ;Set up the `side-effect-free' properties
84 86
85(defcustom safe-functions nil 87(defcustom safe-functions nil
86 "t to disable `unsafep', or a list of assumed-safe functions." 88 "A list of assumed-safe functions, or t to disable `unsafep'."
87 :group 'lisp 89 :group 'lisp
88 :type '(choice (const :tag "No" nil) (const :tag "Yes" t) hook)) 90 :type '(choice (const :tag "No" nil) (const :tag "Yes" t) hook))
89 91
@@ -210,7 +212,7 @@ of symbols with local bindings."
210 212
211 213
212(defun unsafep-function (fun) 214(defun unsafep-function (fun)
213 "Return nil if FUN is a safe function 215 "Return nil iff FUN is a safe function.
214\(either a safe lambda or a symbol that names a safe function). Otherwise 216\(either a safe lambda or a symbol that names a safe function). Otherwise
215result is a reason code." 217result is a reason code."
216 (cond 218 (cond
@@ -233,7 +235,8 @@ for the first unsafe form."
233 (if reason (throw 'unsafep-progn reason)))))) 235 (if reason (throw 'unsafep-progn reason))))))
234 236
235(defun unsafep-let (clause) 237(defun unsafep-let (clause)
236 "CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL 238 "Check the safety of a let binding.
239CLAUSE is a let-binding, either SYM or (SYM) or (SYM VAL). Checks VAL
237and throws a reason to `unsafep' if unsafe. Returns SYM." 240and throws a reason to `unsafep' if unsafe. Returns SYM."
238 (let (reason sym) 241 (let (reason sym)
239 (if (atom clause) 242 (if (atom clause)
@@ -245,7 +248,7 @@ and throws a reason to `unsafep' if unsafe. Returns SYM."
245 sym)) 248 sym))
246 249
247(defun unsafep-variable (sym global-okay) 250(defun unsafep-variable (sym global-okay)
248 "Returns nil if SYM is safe as a let-binding sym 251 "Return nil if SYM is safe as a let-binding sym
249\(because it already has a temporary binding or is a non-risky buffer-local 252\(because it already has a temporary binding or is a non-risky buffer-local
250variable), otherwise a reason why it is unsafe. Failing to be locally bound 253variable), otherwise a reason why it is unsafe. Failing to be locally bound
251is okay if GLOBAL-OKAY is non-nil." 254is okay if GLOBAL-OKAY is non-nil."
@@ -259,5 +262,5 @@ is okay if GLOBAL-OKAY is non-nil."
259 (local-variable-p sym))) 262 (local-variable-p sym)))
260 `(global-variable ,sym)))) 263 `(global-variable ,sym))))
261 264
262;;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658 265;; arch-tag: 6216f98b-eb8f-467a-9c33-7a7644f50658
263;; unsafep.el ends here. 266;;; unsafep.el ends here
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index fd5249fed1a..11ba0ea37ae 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1393,7 +1393,12 @@ options:
1393 1393
1394You can customize `cua-enable-cua-keys' to completely disable the 1394You can customize `cua-enable-cua-keys' to completely disable the
1395CUA bindings, or `cua-prefix-override-inhibit-delay' to change 1395CUA bindings, or `cua-prefix-override-inhibit-delay' to change
1396the prefix fallback behavior." 1396the prefix fallback behavior.
1397
1398CUA mode manages Transient Mark mode internally. Trying to disable
1399Transient Mark mode while CUA mode is enabled does not work; if you
1400only want to highlight the region when it is selected using a
1401shifted movement key, set `cua-highlight-region-shift-only'."
1397 :global t 1402 :global t
1398 :group 'cua 1403 :group 'cua
1399 :set-after '(cua-enable-modeline-indications cua-rectangle-modifier-key) 1404 :set-after '(cua-enable-modeline-indications cua-rectangle-modifier-key)
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 98022b601e6..c77b091bdb4 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
12006-02-03 Zhang Wei <id.brep@gmail.com> (tiny change)
2
3 * erc.el (erc-version-string): Don't hard-code Emacs version.
4 (erc-version): Use emacs-version.
5
12006-01-30 Simon Josefsson <jas@extundo.com> 62006-01-30 Simon Josefsson <jas@extundo.com>
2 7
3 * erc.el (erc-open-ssl-stream): Use tls.el. 8 * erc.el (erc-open-ssl-stream): Use tls.el.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 3c6baf1fdb4..cc9dc8bf1b9 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -66,7 +66,7 @@
66 66
67;;; Code: 67;;; Code:
68 68
69(defconst erc-version-string "Version 5.1 (Emacs 22)" 69(defconst erc-version-string "Version 5.1"
70 "ERC version. This is used by function `erc-version'.") 70 "ERC version. This is used by function `erc-version'.")
71 71
72(eval-when-compile (require 'cl)) 72(eval-when-compile (require 'cl))
@@ -5774,7 +5774,7 @@ P may be an integer or a service name."
5774If optional argument HERE is non-nil, insert version number at point." 5774If optional argument HERE is non-nil, insert version number at point."
5775 (interactive "P") 5775 (interactive "P")
5776 (let ((version-string 5776 (let ((version-string
5777 (format "ERC %s" erc-version-string))) 5777 (format "ERC %s (GNU Emacs %s)" erc-version-string emacs-version)))
5778 (if here 5778 (if here
5779 (insert version-string) 5779 (insert version-string)
5780 (if (interactive-p) 5780 (if (interactive-p)
diff --git a/lisp/ezimage.el b/lisp/ezimage.el
index a00703d5471..a689adc25cd 100644
--- a/lisp/ezimage.el
+++ b/lisp/ezimage.el
@@ -78,7 +78,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
78 78
79 ) 79 )
80 (if (not (fboundp 'make-glyph)) 80 (if (not (fboundp 'make-glyph))
81 81
82(defmacro defezimage (variable imagespec docstring) 82(defmacro defezimage (variable imagespec docstring)
83 "Don't bother loading up an image... 83 "Don't bother loading up an image...
84Argument VARIABLE is the variable to define. 84Argument VARIABLE is the variable to define.
@@ -194,7 +194,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
194 194
195(defezimage ezimage-mail 195(defezimage ezimage-mail
196 ((:type xpm :file "ezimage/mail.xpm" :ascent center)) 196 ((:type xpm :file "ezimage/mail.xpm" :ascent center))
197 "Image if an envelope.") 197 "Image of an envelope.")
198 198
199(defezimage ezimage-checkout 199(defezimage ezimage-checkout
200 ((:type xpm :file "ezimage/checkmark.xpm" :ascent center)) 200 ((:type xpm :file "ezimage/checkmark.xpm" :ascent center))
@@ -206,7 +206,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
206 206
207(defezimage ezimage-object-out-of-date 207(defezimage ezimage-object-out-of-date
208 ((:type xpm :file "ezimage/bitsbang.xpm" :ascent center)) 208 ((:type xpm :file "ezimage/bitsbang.xpm" :ascent center))
209 "Image representing bits with a ! in it. (an out of data object file.)") 209 "Image representing bits with a ! in it. (An out of data object file.)")
210 210
211(defezimage ezimage-label 211(defezimage ezimage-label
212 ((:type xpm :file "ezimage/label.xpm" :ascent center)) 212 ((:type xpm :file "ezimage/label.xpm" :ascent center))
@@ -264,7 +264,7 @@ IMAGESPEC is the image data, and DOCSTRING is documentation for the image."
264 "Insert an image button based on text starting at START for LENGTH chars. 264 "Insert an image button based on text starting at START for LENGTH chars.
265If buttontext is unknown, just insert that text. 265If buttontext is unknown, just insert that text.
266If we have an image associated with it, use that image. 266If we have an image associated with it, use that image.
267Optional argument STRING is a st ring upon which to add text properties." 267Optional argument STRING is a string upon which to add text properties."
268 (when ezimage-use-images 268 (when ezimage-use-images
269 (let* ((bt (buffer-substring start (+ length start))) 269 (let* ((bt (buffer-substring start (+ length start)))
270 (a (assoc bt ezimage-expand-image-button-alist))) 270 (a (assoc bt ezimage-expand-image-button-alist)))
@@ -293,7 +293,7 @@ Return STRING with properties applied."
293 293
294(defun ezimage-insert-over-text (image start end &optional string) 294(defun ezimage-insert-over-text (image start end &optional string)
295 "Place IMAGE over the text between START and END. 295 "Place IMAGE over the text between START and END.
296Assumes the image is part of a gui and can be clicked on. 296Assumes the image is part of a GUI and can be clicked on.
297Optional argument STRING is a string upon which to add text properties." 297Optional argument STRING is a string upon which to add text properties."
298 (when ezimage-use-images 298 (when ezimage-use-images
299 (if (featurep 'xemacs) 299 (if (featurep 'xemacs)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 87a3f1918d6..1edd84bea48 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,24 @@
12006-02-03 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-util.el (gnus-error): Describe `args'.
4
52006-02-03 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de>
6
7 * nnweb.el (nnweb-request-group): Avoid growing overview files.
8
92006-02-03 Katsumi Yamaoka <yamaoka@jpl.org>
10
11 * rfc2231.el (rfc2231-parse-string): Add missing semicolons to
12 segmented lines of parameter value to cope with Thunderbird 1.5
13 bug (cf. https://bugzilla.mozilla.org/show_bug.cgi?id=323318).
14 Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
15 (rfc2231-encode-string): Don't make lines exceeding 76 column.
16
172006-02-01 Max Froumentin <max@lapin-bleu.net> (tiny change)
18
19 * mml.el (mml-generate-mime-1): Correct the order of inline signed
20 parts.
21
12006-01-31 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de> 222006-01-31 Andreas Seltenreich <uwi7@stud.uni-karlsruhe.de>
2 23
3 * nnweb.el (nnweb-group-alist): Use defvar instead of defvoo, 24 * nnweb.el (nnweb-group-alist): Use defvar instead of defvoo,
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index f7fb279f20f..c71b9630db2 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -497,7 +497,8 @@ inside loops."
497 (apply 'format args))) 497 (apply 'format args)))
498 498
499(defun gnus-error (level &rest args) 499(defun gnus-error (level &rest args)
500 "Beep an error if LEVEL is equal to or less than `gnus-verbose'." 500 "Beep an error if LEVEL is equal to or less than `gnus-verbose'.
501ARGS are passed to `message'."
501 (when (<= (floor level) gnus-verbose) 502 (when (<= (floor level) gnus-verbose)
502 (apply 'message args) 503 (apply 'message args)
503 (ding) 504 (ding)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 7d7ea9e20a1..8993f641786 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1,7 +1,7 @@
1;;; mml.el --- A package for parsing and validating MML documents 1;;; mml.el --- A package for parsing and validating MML documents
2 2
3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc. 4;; 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7;; This file is part of GNU Emacs. 7;; This file is part of GNU Emacs.
@@ -577,7 +577,8 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
577 ;; Skip `multipart' and attributes. 577 ;; Skip `multipart' and attributes.
578 (when (and (consp part) (consp (cdr part))) 578 (when (and (consp part) (consp (cdr part)))
579 (insert "\n--" mml-boundary "\n") 579 (insert "\n--" mml-boundary "\n")
580 (mml-generate-mime-1 part)))) 580 (mml-generate-mime-1 part)
581 (goto-char (point-max)))))
581 (insert "\n--" mml-boundary "--\n"))))) 582 (insert "\n--" mml-boundary "--\n")))))
582 (t 583 (t
583 (error "Invalid element: %S" cont))) 584 (error "Invalid element: %S" cont)))
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index 4723a694182..bf49aba7f08 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -133,7 +133,8 @@ Valid types include `google', `dejanews', and `gmane'.")
133(deffoo nnweb-request-group (group &optional server dont-check) 133(deffoo nnweb-request-group (group &optional server dont-check)
134 (nnweb-possibly-change-server group server) 134 (nnweb-possibly-change-server group server)
135 (unless (or nnweb-ephemeral-p 135 (unless (or nnweb-ephemeral-p
136 dont-check) 136 dont-check
137 nnweb-articles)
137 (nnweb-read-overview group)) 138 (nnweb-read-overview group))
138 (cond 139 (cond
139 ((not nnweb-articles) 140 ((not nnweb-articles)
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el
index df9a5b7bd82..fb2d070328e 100644
--- a/lisp/gnus/rfc2231.el
+++ b/lisp/gnus/rfc2231.el
@@ -1,7 +1,7 @@
1;;; rfc2231.el --- Functions for decoding rfc2231 headers 1;;; rfc2231.el --- Functions for decoding rfc2231 headers
2 2
3;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 3;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005,
4;; 2005 Free Software Foundation, Inc. 4;; 2006 Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7;; This file is part of GNU Emacs. 7;; This file is part of GNU Emacs.
@@ -53,6 +53,10 @@ The list will be on the form
53 display-name mailbox c display-string parameters 53 display-name mailbox c display-string parameters
54 attribute value type subtype number encoded 54 attribute value type subtype number encoded
55 prev-attribute prev-encoded) 55 prev-attribute prev-encoded)
56 ;; Some mailer (e.g. Thunderbird 1.5) doesn't terminate each
57 ;; line with semicolon when folding a long parameter value.
58 (while (string-match "\\([^\t\n\r ;]\\)[\t ]*\r?\n[\t ]+" string)
59 (setq string (replace-match "\\1;\n " nil nil string)))
56 (ietf-drums-init (mail-header-remove-whitespace 60 (ietf-drums-init (mail-header-remove-whitespace
57 (mail-header-remove-comments string))) 61 (mail-header-remove-comments string)))
58 (let ((table (copy-syntax-table ietf-drums-syntax-table))) 62 (let ((table (copy-syntax-table ietf-drums-syntax-table)))
@@ -191,6 +195,7 @@ These look like \"us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A\"."
191 (special (ietf-drums-token-to-list "*'%\n\t")) 195 (special (ietf-drums-token-to-list "*'%\n\t"))
192 (ascii (ietf-drums-token-to-list ietf-drums-text-token)) 196 (ascii (ietf-drums-token-to-list ietf-drums-text-token))
193 (num -1) 197 (num -1)
198 (limit (- 74 (length param)))
194 spacep encodep charsetp charset broken) 199 spacep encodep charsetp charset broken)
195 (with-temp-buffer 200 (with-temp-buffer
196 (insert value) 201 (insert value)
@@ -209,24 +214,30 @@ These look like \"us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A\"."
209 (when charsetp 214 (when charsetp
210 (setq charset (mm-encode-body))) 215 (setq charset (mm-encode-body)))
211 (cond 216 (cond
212 ((or encodep charsetp) 217 ((or encodep charsetp
218 (progn
219 (end-of-line)
220 (> (current-column) (if spacep (- limit 2) limit))))
221 (setq limit (- limit 6))
213 (goto-char (point-min)) 222 (goto-char (point-min))
223 (insert (symbol-name (or charset 'us-ascii)) "''")
214 (while (not (eobp)) 224 (while (not (eobp))
215 (when (> (current-column) 60)
216 (insert ";\n")
217 (setq broken t))
218 (if (or (not (memq (following-char) ascii)) 225 (if (or (not (memq (following-char) ascii))
219 (memq (following-char) control) 226 (memq (following-char) control)
220 (memq (following-char) tspecial) 227 (memq (following-char) tspecial)
221 (memq (following-char) special) 228 (memq (following-char) special)
222 (eq (following-char) ? )) 229 (eq (following-char) ? ))
223 (progn 230 (progn
231 (when (>= (current-column) (1- limit))
232 (insert ";\n")
233 (setq broken t))
224 (insert "%" (format "%02x" (following-char))) 234 (insert "%" (format "%02x" (following-char)))
225 (delete-char 1)) 235 (delete-char 1))
236 (when (> (current-column) limit)
237 (insert ";\n")
238 (setq broken t))
226 (forward-char 1))) 239 (forward-char 1)))
227 (goto-char (point-min)) 240 (goto-char (point-min))
228 (insert (symbol-name (or charset 'us-ascii)) "''")
229 (goto-char (point-min))
230 (if (not broken) 241 (if (not broken)
231 (insert param "*=") 242 (insert param "*=")
232 (while (not (eobp)) 243 (while (not (eobp))
@@ -235,12 +246,12 @@ These look like \"us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A\"."
235 (forward-line 1)))) 246 (forward-line 1))))
236 (spacep 247 (spacep
237 (goto-char (point-min)) 248 (goto-char (point-min))
238 (insert param "=\"") 249 (insert "\n " param "=\"")
239 (goto-char (point-max)) 250 (goto-char (point-max))
240 (insert "\"")) 251 (insert "\""))
241 (t 252 (t
242 (goto-char (point-min)) 253 (goto-char (point-min))
243 (insert param "="))) 254 (insert "\n " param "=")))
244 (buffer-string)))) 255 (buffer-string))))
245 256
246(provide 'rfc2231) 257(provide 'rfc2231)
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 956ae3a6798..f028bd1f464 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -91,7 +91,7 @@
91 91
92(defcustom hi-lock-file-patterns-range 10000 92(defcustom hi-lock-file-patterns-range 10000
93 "Limit of search in a buffer for hi-lock patterns. 93 "Limit of search in a buffer for hi-lock patterns.
94When a file is visited and hi-lock mode is on patterns starting 94When a file is visited and hi-lock mode is on, patterns starting
95up to this limit are added to font-lock's patterns. See documentation 95up to this limit are added to font-lock's patterns. See documentation
96of functions `hi-lock-mode' and `hi-lock-find-patterns'." 96of functions `hi-lock-mode' and `hi-lock-find-patterns'."
97 :type 'integer 97 :type 'integer
@@ -200,7 +200,7 @@ calls."
200 200
201(defvar hi-lock-archaic-interface-message-used nil 201(defvar hi-lock-archaic-interface-message-used nil
202 "True if user alerted that `global-hi-lock-mode' is now the global switch. 202 "True if user alerted that `global-hi-lock-mode' is now the global switch.
203Earlier versions of hi-lock used `hi-lock-mode' as the global switch, 203Earlier versions of hi-lock used `hi-lock-mode' as the global switch;
204the message is issued if it appears that `hi-lock-mode' is used assuming 204the message is issued if it appears that `hi-lock-mode' is used assuming
205that older functionality. This variable avoids multiple reminders.") 205that older functionality. This variable avoids multiple reminders.")
206 206
@@ -283,10 +283,10 @@ called interactively, are:
283 Remove highlighting on matches of REGEXP in current buffer. 283 Remove highlighting on matches of REGEXP in current buffer.
284 284
285\\[hi-lock-write-interactive-patterns] 285\\[hi-lock-write-interactive-patterns]
286 Write active REGEXPs into buffer as comments (if possible). They will 286 Write active REGEXPs into buffer as comments (if possible). They will
287 be read the next time file is loaded or when the \\[hi-lock-find-patterns] command 287 be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
288 is issued. The inserted regexps are in the form of font lock keywords. 288 is issued. The inserted regexps are in the form of font lock keywords.
289 (See `font-lock-keywords') They may be edited and re-loaded with \\[hi-lock-find-patterns], 289 (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns],
290 any valid `font-lock-keywords' form is acceptable. 290 any valid `font-lock-keywords' form is acceptable.
291 291
292\\[hi-lock-find-patterns] 292\\[hi-lock-find-patterns]
@@ -295,12 +295,12 @@ called interactively, are:
295When hi-lock is started and if the mode is not excluded, the 295When hi-lock is started and if the mode is not excluded, the
296beginning of the buffer is searched for lines of the form: 296beginning of the buffer is searched for lines of the form:
297 Hi-lock: FOO 297 Hi-lock: FOO
298where FOO is a list of patterns. These are added to the font lock keywords 298where FOO is a list of patterns. These are added to the font lock
299already present. The patterns must start before position (number 299keywords already present. The patterns must start before position
300of characters into buffer) `hi-lock-file-patterns-range'. Patterns 300\(number of characters into buffer) `hi-lock-file-patterns-range'.
301will be read until 301Patterns will be read until
302 Hi-lock: end 302 Hi-lock: end
303is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." 303is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'."
304 :group 'hi-lock 304 :group 'hi-lock
305 :lighter (:eval (if (or hi-lock-interactive-patterns 305 :lighter (:eval (if (or hi-lock-interactive-patterns
306 hi-lock-file-patterns) 306 hi-lock-file-patterns)
@@ -365,7 +365,7 @@ versions before 22 use the following in your .emacs file:
365Interactively, prompt for REGEXP then FACE. Buffer-local history 365Interactively, prompt for REGEXP then FACE. Buffer-local history
366list maintained for regexps, global history maintained for faces. 366list maintained for regexps, global history maintained for faces.
367\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. 367\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item.
368\(See info node `Minibuffer History')" 368\(See info node `Minibuffer History'.)"
369 (interactive 369 (interactive
370 (list 370 (list
371 (hi-lock-regexp-okay 371 (hi-lock-regexp-okay
@@ -390,7 +390,7 @@ list maintained for regexps, global history maintained for faces.
390Interactively, prompt for REGEXP then FACE. Buffer-local history 390Interactively, prompt for REGEXP then FACE. Buffer-local history
391list maintained for regexps, global history maintained for faces. 391list maintained for regexps, global history maintained for faces.
392\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item. 392\\<minibuffer-local-map>Use \\[next-history-element] and \\[previous-history-element] to retrieve next or previous history item.
393\(See info node `Minibuffer History')" 393\(See info node `Minibuffer History'.)"
394 (interactive 394 (interactive
395 (list 395 (list
396 (hi-lock-regexp-okay 396 (hi-lock-regexp-okay
@@ -595,7 +595,7 @@ not suitable."
595 (message "Hi-lock added %d patterns." (length all-patterns)))))) 595 (message "Hi-lock added %d patterns." (length all-patterns))))))
596 596
597(defun hi-lock-font-lock-hook () 597(defun hi-lock-font-lock-hook ()
598 "Add hi lock patterns to font-lock's." 598 "Add hi-lock patterns to font-lock's."
599 (if font-lock-mode 599 (if font-lock-mode
600 (progn 600 (progn
601 (font-lock-add-keywords nil hi-lock-file-patterns t) 601 (font-lock-add-keywords nil hi-lock-file-patterns t)
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 7011ff37dd3..55eafb5c617 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -261,15 +261,15 @@ colors then use this, if you want fancier faces then set
261;; active or passive mode? 261;; active or passive mode?
262;; 262;;
263(defcustom highlight-changes-initial-state 'active 263(defcustom highlight-changes-initial-state 'active
264 "*What state (active or passive) `highlight-changes' should start in. 264 "*What state (active or passive) Highlight Changes mode should start in.
265This is used when `highlight-changes' is called with no argument. 265This is used when `highlight-changes-mode' is called with no argument.
266This variable must be set to one of the symbols `active' or `passive'." 266This variable must be set to one of the symbols `active' or `passive'."
267 :type '(choice (const :tag "Active" active) 267 :type '(choice (const :tag "Active" active)
268 (const :tag "Passive" passive)) 268 (const :tag "Passive" passive))
269 :group 'highlight-changes) 269 :group 'highlight-changes)
270 270
271(defcustom highlight-changes-global-initial-state 'passive 271(defcustom highlight-changes-global-initial-state 'passive
272 "*What state `global-highlight-changes' should start in. 272 "*What state global Highlight Changes mode should start in.
273This is used if `global-highlight-changes' is called with no argument. 273This is used if `global-highlight-changes' is called with no argument.
274This variable must be set to either `active' or `passive'." 274This variable must be set to either `active' or `passive'."
275 :type '(choice (const :tag "Active" active) 275 :type '(choice (const :tag "Active" active)
@@ -309,7 +309,7 @@ its name does not begin with ` ' or `*'.
309A value of nil means no buffers are suitable for `global-highlight-changes' 309A value of nil means no buffers are suitable for `global-highlight-changes'
310\(effectively disabling the mode). 310\(effectively disabling the mode).
311 311
312Examples: 312Example:
313 (c-mode c++-mode) 313 (c-mode c++-mode)
314means that Highlight Changes mode is turned on for buffers in C and C++ 314means that Highlight Changes mode is turned on for buffers in C and C++
315modes only." 315modes only."
@@ -366,7 +366,7 @@ remove it from existing buffers."
366 (copy-face 'highlight-changes new-name) 366 (copy-face 'highlight-changes new-name)
367 (copy-face old-name new-name) 367 (copy-face old-name new-name)
368 )) 368 ))
369 (setq new-list (append (list new-name) new-list)) 369 (setq new-list (append (list new-name) new-list))
370 (setq n (1- n)) 370 (setq n (1- n))
371 (setq p (cdr p))) 371 (setq p (cdr p)))
372 (if (equal new-list (widget-value w)) 372 (if (equal new-list (widget-value w))
@@ -419,7 +419,7 @@ Otherwise, this list will be constructed when needed from
419 419
420;;; Functions... 420;;; Functions...
421 421
422(defun hilit-chg-map-changes (func &optional start-position end-position) 422(defun hilit-chg-map-changes (func &optional start-position end-position)
423 "Call function FUNC for each region used by Highlight Changes mode." 423 "Call function FUNC for each region used by Highlight Changes mode."
424 ;; if start-position is nil, (point-min) is used 424 ;; if start-position is nil, (point-min) is used
425 ;; if end-position is nil, (point-max) is used 425 ;; if end-position is nil, (point-max) is used
@@ -1048,7 +1048,7 @@ changes are made, so \\[highlight-changes-next-change] and
1048When called interactively: 1048When called interactively:
1049- if no prefix, toggle global Highlight Changes mode on or off 1049- if no prefix, toggle global Highlight Changes mode on or off
1050- if called with a positive prefix (or just C-u) turn it on in active mode 1050- if called with a positive prefix (or just C-u) turn it on in active mode
1051- if called with a zero prefix turn it on in passive mode 1051- if called with a zero prefix turn it on in passive mode
1052- if called with a negative prefix turn it off 1052- if called with a negative prefix turn it off
1053 1053
1054When called from a program: 1054When called from a program:
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 2de72547887..e5820d066e2 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1,7 +1,7 @@
1;;; ibuf-ext.el --- extensions for ibuffer 1;;; ibuf-ext.el --- extensions for ibuffer
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc. 4;; 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Author: Colin Walters <walters@verbum.org> 6;; Author: Colin Walters <walters@verbum.org>
7;; Maintainer: John Paul Wallington <jpw@gnu.org> 7;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -1449,6 +1449,17 @@ You can then feed the file name(s) to other commands with \\[yank]."
1449 (memq major-mode ibuffer-help-buffer-modes))))) 1449 (memq major-mode ibuffer-help-buffer-modes)))))
1450 1450
1451;;;###autoload 1451;;;###autoload
1452(defun ibuffer-mark-compressed-file-buffers ()
1453 "Mark buffers whose associated file is compressed."
1454 (interactive)
1455 (ibuffer-mark-on-buffer
1456 #'(lambda (buf)
1457 (with-current-buffer buf
1458 (and buffer-file-name
1459 (string-match ibuffer-compressed-file-name-regexp
1460 buffer-file-name))))))
1461
1462;;;###autoload
1452(defun ibuffer-mark-old-buffers () 1463(defun ibuffer-mark-old-buffers ()
1453 "Mark buffers which have not been viewed in `ibuffer-old-time' days." 1464 "Mark buffers which have not been viewed in `ibuffer-old-time' days."
1454 (interactive) 1465 (interactive)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 9406cf0a1b8..179c7b334bd 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1,7 +1,7 @@
1;;; ibuffer.el --- operate on buffers like dired 1;;; ibuffer.el --- operate on buffers like dired
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 3;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc. 4;; 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Author: Colin Walters <walters@verbum.org> 6;; Author: Colin Walters <walters@verbum.org>
7;; Maintainer: John Paul Wallington <jpw@gnu.org> 7;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -142,12 +142,16 @@ elisp byte-compiler."
142 142
143(defcustom ibuffer-fontification-alist 143(defcustom ibuffer-fontification-alist
144 `((10 buffer-read-only font-lock-constant-face) 144 `((10 buffer-read-only font-lock-constant-face)
145 (15 (string-match "^*" (buffer-name)) font-lock-keyword-face) 145 (15 (and buffer-file-name
146 (20 (and (string-match "^ " (buffer-name)) 146 (string-match ibuffer-compressed-file-name-regexp
147 buffer-file-name))
148 font-lock-doc-face)
149 (20 (string-match "^*" (buffer-name)) font-lock-keyword-face)
150 (25 (and (string-match "^ " (buffer-name))
147 (null buffer-file-name)) 151 (null buffer-file-name))
148 italic) 152 italic)
149 (25 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face) 153 (30 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face)
150 (30 (eq major-mode 'dired-mode) font-lock-function-name-face)) 154 (35 (eq major-mode 'dired-mode) font-lock-function-name-face))
151 "An alist describing how to fontify buffers. 155 "An alist describing how to fontify buffers.
152Each element should be of the form (PRIORITY FORM FACE), where 156Each element should be of the form (PRIORITY FORM FACE), where
153PRIORITY is an integer, FORM is an arbitrary form to evaluate in the 157PRIORITY is an integer, FORM is an arbitrary form to evaluate in the
@@ -320,6 +324,14 @@ directory, like `default-directory'."
320 :type '(repeat function) 324 :type '(repeat function)
321 :group 'ibuffer) 325 :group 'ibuffer)
322 326
327(defcustom ibuffer-compressed-file-name-regexp
328 (concat "\\.\\("
329 (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z"))
330 "\\)$")
331 "Regexp to match compressed file names."
332 :type 'regexp
333 :group 'ibuffer)
334
323(defcustom ibuffer-hook nil 335(defcustom ibuffer-hook nil
324 "Hook run when `ibuffer' is called." 336 "Hook run when `ibuffer' is called."
325 :type 'hook 337 :type 'hook
@@ -403,6 +415,7 @@ directory, like `default-directory'."
403 (define-key map (kbd "* /") 'ibuffer-mark-dired-buffers) 415 (define-key map (kbd "* /") 'ibuffer-mark-dired-buffers)
404 (define-key map (kbd "* e") 'ibuffer-mark-dissociated-buffers) 416 (define-key map (kbd "* e") 'ibuffer-mark-dissociated-buffers)
405 (define-key map (kbd "* h") 'ibuffer-mark-help-buffers) 417 (define-key map (kbd "* h") 'ibuffer-mark-help-buffers)
418 (define-key map (kbd "* z") 'ibuffer-mark-compressed-file-buffers)
406 (define-key map (kbd ".") 'ibuffer-mark-old-buffers) 419 (define-key map (kbd ".") 'ibuffer-mark-old-buffers)
407 420
408 (define-key map (kbd "d") 'ibuffer-mark-for-delete) 421 (define-key map (kbd "d") 'ibuffer-mark-for-delete)
@@ -718,6 +731,9 @@ directory, like `default-directory'."
718 (define-key-after map [menu-bar mark mark-help-buffers] 731 (define-key-after map [menu-bar mark mark-help-buffers]
719 '(menu-item "Mark help buffers" ibuffer-mark-help-buffers 732 '(menu-item "Mark help buffers" ibuffer-mark-help-buffers
720 :help "Mark buffers in help-mode")) 733 :help "Mark buffers in help-mode"))
734 (define-key-after map [menu-bar mark mark-compressed-file-buffers]
735 '(menu-item "Mark compressed file buffers" ibuffer-mark-compressed-file-buffers
736 :help "Mark buffers which have a file that is compressed"))
721 (define-key-after map [menu-bar mark mark-old-buffers] 737 (define-key-after map [menu-bar mark mark-old-buffers]
722 '(menu-item "Mark old buffers" ibuffer-mark-old-buffers 738 '(menu-item "Mark old buffers" ibuffer-mark-old-buffers
723 :help "Mark buffers which have not been viewed recently")) 739 :help "Mark buffers which have not been viewed recently"))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 4b643fbc698..dcf46878aa2 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2384,7 +2384,8 @@ See also `locale-charset-language-names', `locale-language-names',
2384 ;; to a system without X. 2384 ;; to a system without X.
2385 (setq locale-translation-file-name 2385 (setq locale-translation-file-name
2386 (let ((files 2386 (let ((files
2387 '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4 2387 '("/usr/share/X11/locale/locale.alias" ; e.g. X11R7
2388 "/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4
2388 "/usr/X11R6/lib/X11/locale/locale.alias" ; XFree86, e.g. RedHat 4.2 2389 "/usr/X11R6/lib/X11/locale/locale.alias" ; XFree86, e.g. RedHat 4.2
2389 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6 2390 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6
2390 ;; 2391 ;;
diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el
index eb12d97f576..45afbd782d9 100644
--- a/lisp/mail/mailclient.el
+++ b/lisp/mail/mailclient.el
@@ -24,21 +24,21 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; This package allows to hand over a buffer to be sent off 27;; This package allows to hand over a buffer to be sent off
28;; via the system's designated e-mail client. 28;; via the system's designated e-mail client.
29;; Note that the e-mail client will display the contents of the buffer 29;; Note that the e-mail client will display the contents of the buffer
30;; again for editing. 30;; again for editing.
31;; The e-mail client is taken to be whoever handles a mailto: URL 31;; The e-mail client is taken to be whoever handles a mailto: URL
32;; via `browse-url'. 32;; via `browse-url'.
33;; Mailto: URLs are composed according to RFC2368. 33;; Mailto: URLs are composed according to RFC2368.
34 34
35;; MIME bodies are not supported - we rather expect the mail client 35;; MIME bodies are not supported - we rather expect the mail client
36;; to encode the body and add, for example, a digital signature. 36;; to encode the body and add, for example, a digital signature.
37;; The mailto URL RFC calls for "short text messages that are 37;; The mailto URL RFC calls for "short text messages that are
38;; actually the content of automatic processing." 38;; actually the content of automatic processing."
39;; So mailclient.el is ideal for situations where an e-mail is 39;; So mailclient.el is ideal for situations where an e-mail is
40;; generated automatically, and the user can edit it in the 40;; generated automatically, and the user can edit it in the
41;; mail client (e.g. bug-reports). 41;; mail client (e.g. bug-reports).
42 42
43;; To activate: 43;; To activate:
44;; (setq send-mail-function 'mailclient-send-it) ; if you use `mail' 44;; (setq send-mail-function 'mailclient-send-it) ; if you use `mail'
@@ -49,11 +49,11 @@
49(require 'sendmail) ;; for mail-sendmail-undelimit-header 49(require 'sendmail) ;; for mail-sendmail-undelimit-header
50(require 'mail-utils) ;; for mail-fetch-field 50(require 'mail-utils) ;; for mail-fetch-field
51 51
52(defcustom mailclient-place-body-on-clipboard-flag 52(defcustom mailclient-place-body-on-clipboard-flag
53 (fboundp 'w32-set-clipboard-data) 53 (fboundp 'w32-set-clipboard-data)
54 "If non-nil, put the e-mail body on the clipboard in mailclient. 54 "If non-nil, put the e-mail body on the clipboard in mailclient.
55This is useful on systems where only short mailto:// URLs are 55This is useful on systems where only short mailto:// URLs are
56supported. Defaults to non-nil on Windows, nil otherwise." 56supported. Defaults to non-nil on Windows, nil otherwise."
57 :type 'boolean 57 :type 'boolean
58 :group 'mail) 58 :group 'mail)
59 59
@@ -64,7 +64,7 @@ supported. Defaults to non-nil on Windows, nil otherwise."
64 (lambda (char) 64 (lambda (char)
65 (cond 65 (cond
66 ((eq char ?\x20) "%20") ;; space 66 ((eq char ?\x20) "%20") ;; space
67 ((eq char ?\n) "%0D%0A") ;; newline 67 ((eq char ?\n) "%0D%0A") ;; newline
68 ((string-match "[-a-zA-Z0-9_:/.@]" (char-to-string char)) 68 ((string-match "[-a-zA-Z0-9_:/.@]" (char-to-string char))
69 (char-to-string char)) ;; printable 69 (char-to-string char)) ;; printable
70 (t ;; everything else 70 (t ;; everything else
@@ -75,33 +75,33 @@ supported. Defaults to non-nil on Windows, nil otherwise."
75(defvar mailclient-delim-static "?") 75(defvar mailclient-delim-static "?")
76(defun mailclient-url-delim () 76(defun mailclient-url-delim ()
77 (let ((current mailclient-delim-static)) 77 (let ((current mailclient-delim-static))
78 (setq mailclient-delim-static "&") 78 (setq mailclient-delim-static "&")
79 current)) 79 current))
80 80
81(defun mailclient-gather-addresses (str &optional drop-first-name) 81(defun mailclient-gather-addresses (str &optional drop-first-name)
82 (let ((field (mail-fetch-field str nil t))) 82 (let ((field (mail-fetch-field str nil t)))
83 (if field 83 (if field
84 (save-excursion 84 (save-excursion
85 (let ((first t) 85 (let ((first t)
86 (result "")) 86 (result ""))
87 (mapc 87 (mapc
88 (lambda (recp) 88 (lambda (recp)
89 (setq result 89 (setq result
90 (concat 90 (concat
91 result 91 result
92 (if (and drop-first-name 92 (if (and drop-first-name
93 first) 93 first)
94 "" 94 ""
95 (concat (mailclient-url-delim) str "=")) 95 (concat (mailclient-url-delim) str "="))
96 (mailclient-encode-string-as-url 96 (mailclient-encode-string-as-url
97 recp))) 97 recp)))
98 (setq first nil)) 98 (setq first nil))
99 (split-string 99 (split-string
100 (mail-strip-quoted-names field) "\, *")) 100 (mail-strip-quoted-names field) "\, *"))
101 result))))) 101 result)))))
102 102
103;;;###autoload 103;;;###autoload
104(defun mailclient-send-it () 104(defun mailclient-send-it ()
105 "Pass current buffer on to the system's mail client. 105 "Pass current buffer on to the system's mail client.
106Suitable value for `send-mail-function'. 106Suitable value for `send-mail-function'.
107The mail client is taken to be the handler of mailto URLs." 107The mail client is taken to be the handler of mailto URLs."
@@ -122,19 +122,19 @@ The mail client is taken to be the handler of mailto URLs."
122 (while (and (re-search-forward "\n\n\n*" delimline t) 122 (while (and (re-search-forward "\n\n\n*" delimline t)
123 (< (point) delimline)) 123 (< (point) delimline))
124 (replace-match "\n")) 124 (replace-match "\n"))
125 (let ((case-fold-search t)) 125 (let ((case-fold-search t))
126 ;; initialize limiter 126 ;; initialize limiter
127 (setq mailclient-delim-static "?") 127 (setq mailclient-delim-static "?")
128 ;; construct and call up mailto URL 128 ;; construct and call up mailto URL
129 (browse-url 129 (browse-url
130 (concat 130 (concat
131 (save-excursion 131 (save-excursion
132 (narrow-to-region (point-min) delimline) 132 (narrow-to-region (point-min) delimline)
133 (concat 133 (concat
134 "mailto:" 134 "mailto:"
135 ;; some of the headers according to RFC822 135 ;; some of the headers according to RFC822
136 (mailclient-gather-addresses "To" 136 (mailclient-gather-addresses "To"
137 'drop-first-name) 137 'drop-first-name)
138 (mailclient-gather-addresses "cc" ) 138 (mailclient-gather-addresses "cc" )
139 (mailclient-gather-addresses "bcc" ) 139 (mailclient-gather-addresses "bcc" )
140 (mailclient-gather-addresses "Resent-To" ) 140 (mailclient-gather-addresses "Resent-To" )
@@ -151,16 +151,16 @@ The mail client is taken to be the handler of mailto URLs."
151 (if subj ;; if non-blank 151 (if subj ;; if non-blank
152 ;; the mail client will deal with 152 ;; the mail client will deal with
153 ;; warning the user etc. 153 ;; warning the user etc.
154 (concat (mailclient-url-delim) "subject=" 154 (concat (mailclient-url-delim) "subject="
155 (mailclient-encode-string-as-url subj)) 155 (mailclient-encode-string-as-url subj))
156 "")))) 156 ""))))
157 ;; body 157 ;; body
158 (concat 158 (concat
159 (mailclient-url-delim) "body=" 159 (mailclient-url-delim) "body="
160 (mailclient-encode-string-as-url 160 (mailclient-encode-string-as-url
161 (if mailclient-place-body-on-clipboard-flag 161 (if mailclient-place-body-on-clipboard-flag
162 (progn 162 (progn
163 (clipboard-kill-ring-save 163 (clipboard-kill-ring-save
164 (+ 1 delimline) (point-max)) 164 (+ 1 delimline) (point-max))
165 (concat 165 (concat
166 "*** E-Mail body has been placed on clipboard, " 166 "*** E-Mail body has been placed on clipboard, "
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index dc465888f44..8d8b64c75fb 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,10 +1,168 @@
12006-02-03 Bill Wohler <wohler@newt.com>
2
3 * mh-e.el (Version, mh-version): Add +cvs to version.
4
52006-02-03 Bill Wohler <wohler@newt.com>
6
7 Release MH-E version 7.91.
8
9 * mh-e.el (Version, mh-version): Update for release 7.91.
10
112006-02-03 Bill Wohler <wohler@newt.com>
12
13 * mh-utils.el (mh-image-load-path, mh-image-load-path-called-flag)
14 (mh-image-load-path): Checkdoc fix. Docstring edits. Reduce scope
15 of local variable mh-library-name.
16
17 * mh-e.el (mh-folder-msg-number, mh-folder-refiled, mh-folder-to)
18 (mh-show-cc, mh-show-date, mh-show-header): Replace (min-colors
19 88) with (min-colors 64) in face specifications so that MH-E still
20 looks good on systems with fewer colors (such as Eric Ding's).
21
222006-02-03 Peter Galbraith <psg@debian.org>
23
24 * mh-utils.el (mh-image-load-path): New variable to optionally
25 hold the directory where MH-E images are stored. If nil, then
26 the function `mh-image-load-path' will find it. This variable
27 will be used for Debian packaging.
28 (mh-image-load-path function): Use variable `mh-image-load-path'
29 if non-nil and exists.
30
312006-02-03 Mark D. Baushke <mdb@gnu.org>
32
33 * mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar
34 for gnu-emacs or xemacs to avoid void-variable tool-bar-map lisp
35 errors if describe-bindings is called before tool-bar-mode is used.
36
372006-02-03 Peter S Galbraith <psg@debian.org>
38
39 * mh-compat.el (mh-url-unreserved-chars): Fix typo from
40 `mh-url-unresrved-chars'.
41
422006-02-02 Bill Wohler <wohler@newt.com>
43
44 * mh-e.el (Version, mh-version): Add +cvs to version.
45
462006-02-02 Bill Wohler <wohler@newt.com>
47
48 Release MH-E version 7.90.
49
50 * mh-e.el (Version, mh-version): Update for release 7.90.
51
522006-02-01 Bill Wohler <wohler@newt.com>
53
54 * mh-search.el (which-func-mode): Shush compiler on Emacs 21 too.
55
56 * mh-alias.el (mh-alias-gecos-name): Use
57 mh-replace-regexp-in-string instead of replace-regexp-in-string.
58 (crm, multi-prompt): Use mh-require instead of require.
59 (mh-goto-address-find-address-at-point): Use
60 mh-line-beginning-position and mh-line-end-position instead of
61 line-beginning-position and line-end-position. Use
62 mh-match-string-no-properties instead of
63 match-string-no-properties.
64
65 * mh-comp.el (mh-modify-header-field): Use
66 mh-line-beginning-position and mh-line-end-position instead of
67 line-beginning-position and line-end-position.
68
69 * mh-compat.el (mailabbrev): Use mh-require instead of require.
70 (mh-assoc-string, mh-display-completion-list, mh-face-foreground)
71 (mh-face-background): Make docstring consistent.
72 (mh-require, mh-cancel-timer, mh-display-color-cells)
73 (mh-line-beginning-position, mh-line-end-position)
74 (mh-match-string-no-properties, mh-replace-regexp-in-string)
75 (mh-view-mode-enter): Move definition here from mh-xemacs.el and
76 add mh- prefix since compatibility functions should have our
77 package prefix (mh-) by Emacs convention and to avoid messing up
78 checks for the same functions in other packages.
79
80 * mh-e.el (mh-compiling-flag): Move mh-xemacs-compiling-flag here
81 from mh-xemacs.el and rename.
82 (mh-xargs): Use mh-line-beginning-position and
83 mh-line-end-position instead of line-beginning-position and
84 line-end-position.
85 (mh-defface-compat): Use mh-display-color-cells instead of
86 display-color-cells.
87
88 * mh-folder.el (which-func): Use mh-require instead of require.
89
90 * mh-funcs.el (mh-list-folders): Use mh-view-mode-enter instead of
91 view-mode-enter.
92
93 * mh-gnus.el (gnus-util, mm-bodies, mm-decode, mm-view, mml): Use
94 mh-require instead of require.
95
96 * mh-letter.el (mh-letter-header-end, mh-letter-mode)
97 (mh-letter-next-header-field): Use mh-line-beginning-position and
98 mh-line-end-position instead of line-beginning-position and
99 line-end-position.
100
101 * mh-limit.el (mh-subject-to-sequence-unthreaded): Use
102 mh-match-string-no-properties instead of
103 match-string-no-properties.
104 (mh-narrow-to-header-field): Use mh-line-beginning-position and
105 mh-line-end-position instead of line-beginning-position and
106 line-end-position.
107
108 * mh-mime.el (mh-mime-inline-part, mh-mm-display-part)
109 (mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p): Use
110 mh-line-beginning-position and mh-line-end-position instead of
111 line-beginning-position and line-end-position.
112
113 * mh-search.el (which-func): Use mh-require instead of require.
114 (mh-make-pick-template, mh-index-visit-folder)
115 (mh-pick-parse-search-buffer, mh-swish-next-result)
116 (mh-mairix-next-result, mh-namazu-next-result)
117 (mh-pick-next-result, mh-grep-next-result)
118 (mh-index-create-imenu-index, mh-index-match-checksum)
119 (mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps): Use
120 mh-line-beginning-position and mh-line-end-position instead of
121 line-beginning-position and line-end-position.
122
123 * mh-seq.el (mh-list-sequences): Use mh-view-mode-enter instead of
124 view-mode-enter.
125 (mh-folder-size-flist, mh-parse-flist-output-line)
126 (mh-add-sequence-notation): Use mh-line-beginning-position and
127 mh-line-end-position instead of line-beginning-position and
128 line-end-position.
129
130 * mh-show.el (mh-show-addr): Use mh-require instead of require.
131
132 * mh-speed.el (mh-folder-speedbar-menu-items, mh-speed-toggle)
133 (mh-speed-view, mh-folder-speedbar-buttons)
134 (mh-speed-highlight, mh-speed-goto-folder)
135 (mh-speed-add-buttons, mh-speed-parse-flists-output)
136 (mh-speed-invalidate-map, mh-speedbar-change-expand-button-char)
137 (mh-speed-add-folder): Use mh-line-beginning-position and
138 mh-line-end-position instead of line-beginning-position and
139 line-end-position.
140 (mh-speed-flists): Use mh-cancel-timer instead of cancel-timer.
141
142 * mh-thread.el (mh-thread-find-children)
143 (mh-thread-parse-scan-line, mh-thread-generate): Use
144 mh-line-beginning-position and mh-line-end-position instead of
145 line-beginning-position and line-end-position.
146
147 * mh-utils.el (mh-colors-available-p): Use mh-display-color-cells
148 instead of display-color-cells.
149 (mh-folder-list): Use mh-replace-regexp-in-string instead of
150 replace-regexp-in-string.
151 (mh-sub-folders-actual, mh-letter-toggle-header-field-display):
152 Use mh-line-beginning-position and mh-line-end-position instead of
153 line-beginning-position and line-end-position.
154
155 * mh-comp.el (mh-send-sub): Don't find components file in current
156 directory--this seems to have been a side-effect of commenting out
157 the use of an old mh-etc variable. Improve error message.
158
12006-01-31 Bill Wohler <wohler@newt.com> 1592006-01-31 Bill Wohler <wohler@newt.com>
2 160
3 * mh-acros.el (mh-defun-compat, mh-defmacro-compat): Add name 161 * mh-acros.el (mh-defun-compat, mh-defmacro-compat): Add name
4 argument since compatibility functions should have our package 162 argument since compatibility functions should have our package
5 prefix (mh-) by Emacs convention and to avoid messing up checks 163 prefix (mh-) by Emacs convention and to avoid messing up checks
6 for the same functions in other packages. Use explicit argument 164 for the same functions in other packages. Use explicit argument
7 instead of forming name by adding mh-e prefix so that one can grep 165 instead of forming name by adding mh- prefix so that one can grep
8 and find the definition. 166 and find the definition.
9 167
10 * mh-alias.el (mh-alias-local-users, mh-alias-reload) 168 * mh-alias.el (mh-alias-local-users, mh-alias-reload)
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 23af886c320..9dc2871241f 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -125,10 +125,10 @@ COMMA-SEPARATOR is non-nil."
125 (setq res (match-string 1 res))) 125 (setq res (match-string 1 res)))
126 ;; Replace "&" with capitalized username 126 ;; Replace "&" with capitalized username
127 (if (string-match "&" res) 127 (if (string-match "&" res)
128 (setq res (replace-regexp-in-string "&" (capitalize username) res))) 128 (setq res (mh-replace-regexp-in-string "&" (capitalize username) res)))
129 ;; Remove " character 129 ;; Remove " character
130 (if (string-match "\"" res) 130 (if (string-match "\"" res)
131 (setq res (replace-regexp-in-string "\"" "" res))) 131 (setq res (mh-replace-regexp-in-string "\"" "" res)))
132 ;; If empty string, use username instead 132 ;; If empty string, use username instead
133 (if (string-equal "" res) 133 (if (string-equal "" res)
134 (setq res username)) 134 (setq res username))
@@ -258,8 +258,8 @@ Blind aliases or users from /etc/passwd are not expanded."
258 (t 258 (t
259 (mh-alias-ali alias)))) 259 (mh-alias-ali alias))))
260 260
261(require 'crm nil t) ; completing-read-multiple 261(mh-require 'crm nil t) ; completing-read-multiple
262(require 'multi-prompt nil t) 262(mh-require 'multi-prompt nil t)
263 263
264;;;###mh-autoload 264;;;###mh-autoload
265(defun mh-read-address (prompt) 265(defun mh-read-address (prompt)
@@ -606,12 +606,12 @@ filing messages."
606 606
607Then search backwards to beginning of line for the start of an 607Then search backwards to beginning of line for the start of an
608e-mail address. If no e-mail address found, return nil." 608e-mail address. If no e-mail address found, return nil."
609 (re-search-backward "[^-_A-z0-9.@]" (line-beginning-position) 'lim) 609 (re-search-backward "[^-_A-z0-9.@]" (mh-line-beginning-position) 'lim)
610 (if (or (looking-at mh-address-mail-regexp) ; already at start 610 (if (or (looking-at mh-address-mail-regexp) ; already at start
611 (and (re-search-forward mh-address-mail-regexp 611 (and (re-search-forward mh-address-mail-regexp
612 (line-end-position) 'lim) 612 (mh-line-end-position) 'lim)
613 (goto-char (match-beginning 0)))) 613 (goto-char (match-beginning 0))))
614 (match-string-no-properties 0))) 614 (mh-match-string-no-properties 0)))
615 615
616(defun mh-alias-apropos (regexp) 616(defun mh-alias-apropos (regexp)
617 "Show all aliases or addresses that match a regular expression REGEXP." 617 "Show all aliases or addresses that match a regular expression REGEXP."
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 5a0907bf612..5d2730f4afa 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -759,18 +759,9 @@ CONFIG is the window configuration before sending mail."
759 (setq components 759 (setq components
760 (expand-file-name mh-comp-formfile mh-lib))) 760 (expand-file-name mh-comp-formfile mh-lib)))
761 components) 761 components)
762 ((file-exists-p
763 (setq components
764 (expand-file-name mh-comp-formfile
765 ;; What is this mh-etc ?? -sm
766 ;; This is dead code, so
767 ;; remove it.
768 ;(and (boundp 'mh-etc) mh-etc)
769 )))
770 components)
771 (t 762 (t
772 (error "Can't find components file \"%s\"" 763 (error "Can't find %s in %s or %s"
773 components)))) 764 mh-comp-formfile mh-user-path mh-lib))))
774 nil))) 765 nil)))
775 (mh-insert-fields "To:" to "Subject:" subject "Cc:" cc) 766 (mh-insert-fields "To:" to "Subject:" subject "Cc:" cc)
776 (goto-char (point-max)) 767 (goto-char (point-max))
@@ -1040,7 +1031,7 @@ discarded."
1040 (cond ((and overwrite-flag 1031 (cond ((and overwrite-flag
1041 (mh-goto-header-field (concat field ":"))) 1032 (mh-goto-header-field (concat field ":")))
1042 (insert " " value) 1033 (insert " " value)
1043 (delete-region (point) (line-end-position))) 1034 (delete-region (point) (mh-line-end-position)))
1044 ((and (not overwrite-flag) 1035 ((and (not overwrite-flag)
1045 (mh-regexp-in-field-p (concat "\\b" value "\\b") field)) 1036 (mh-regexp-in-field-p (concat "\\b" value "\\b") field))
1046 ;; Already there, do nothing. 1037 ;; Already there, do nothing.
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index c60ae20d811..1d7f1c90e79 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -37,31 +37,60 @@
37;; macros we can retire. 37;; macros we can retire.
38 38
39;; Please use mh-gnus.el when providing compatibility with different 39;; Please use mh-gnus.el when providing compatibility with different
40;; versions of Gnus and mh-xemacs.el for compatibility with XEmacs. 40;; versions of Gnus.
41 41
42;; Items are listed alphabetically. 42;; Items are listed alphabetically (except for mh-require which is
43;; needed by a lesser character).
44
45(require 'mh-acros)
46
47(mh-do-in-gnu-emacs
48 (defalias 'mh-require 'require))
49
50(mh-do-in-xemacs
51 (defun mh-require (feature &optional filename noerror)
52 "If feature FEATURE is not loaded, load it from FILENAME.
53If FEATURE is not a member of the list `features', then the feature
54is not loaded; so load the file FILENAME.
55If FILENAME is omitted, the printname of FEATURE is used as the file name.
56If the optional third argument NOERROR is non-nil,
57then return nil if the file is not found instead of signaling an error.
58
59Simulate NOERROR argument in XEmacs which lacks it."
60 (if (not (featurep feature))
61 (if filename
62 (load filename noerror t)
63 (load (format "%s" feature) noerror t)))))
43 64
44(mh-defun-compat mh-assoc-string assoc-string (key list case-fold) 65(mh-defun-compat mh-assoc-string assoc-string (key list case-fold)
45 "Like `assoc' but specifically for strings. 66 "Like `assoc' but specifically for strings.
46Case is ignored if CASE-FOLD is non-nil. 67Case is ignored if CASE-FOLD is non-nil.
47This function added by MH-E for Emacs versions that lack 68This function is used by Emacs versions that lack `assoc-string',
48`assoc-string', introduced in Emacs 22." 69introduced in Emacs 22."
49 (if case-fold 70 (if case-fold
50 (assoc-ignore-case key list) 71 (assoc-ignore-case key list)
51 (assoc key list))) 72 (assoc key list)))
52 73
53(require 'mailabbrev nil t) 74;; For XEmacs.
54(mh-defun-compat mh-mail-abbrev-make-syntax-table 75(defalias 'mh-cancel-timer
55 mail-abbrev-make-syntax-table () 76 (if (fboundp 'cancel-timer)
56 "Emacs 21 and XEmacs don't have this function." 77 'cancel-timer
57 nil) 78 'delete-itimer))
79
80(mh-defun-compat mh-display-color-cells display-color-cells (&optional display)
81 "Return the number of color cells supported by DISPLAY.
82This function is used by XEmacs to always return 0 when compiling
83to avoid compiling errors. Otherwise uses `device-color-cells'."
84 (if mh-compiling-flag
85 0
86 (device-color-cells display)))
58 87
59(defmacro mh-display-completion-list (completions &optional common-substring) 88(defmacro mh-display-completion-list (completions &optional common-substring)
60 "Display the list of COMPLETIONS. 89 "Display the list of COMPLETIONS.
61See documentation for `display-completion-list' for a description of the 90See documentation for `display-completion-list' for a description of the
62arguments COMPLETIONS and perhaps COMMON-SUBSTRING. 91arguments COMPLETIONS and perhaps COMMON-SUBSTRING.
63This macro added by MH-E for Emacs versions that lack a 92This macro is used by Emacs versions that lack a COMMON-SUBSTRING
64COMMON-SUBSTRING argument, introduced in Emacs 22." 93argument, introduced in Emacs 22."
65 (if (< emacs-major-version 22) 94 (if (< emacs-major-version 22)
66 `(display-completion-list ,completions) 95 `(display-completion-list ,completions)
67 `(display-completion-list ,completions ,common-substring))) 96 `(display-completion-list ,completions ,common-substring)))
@@ -70,8 +99,8 @@ COMMON-SUBSTRING argument, introduced in Emacs 22."
70 "Return the foreground color name of FACE, or nil if unspecified. 99 "Return the foreground color name of FACE, or nil if unspecified.
71See documentation for `face-foreground' for a description of the 100See documentation for `face-foreground' for a description of the
72arguments FACE, FRAME, and perhaps INHERIT. 101arguments FACE, FRAME, and perhaps INHERIT.
73This macro added by MH-E for Emacs versions that lack an INHERIT 102This macro is used by Emacs versions that lack an INHERIT argument,
74argument, introduced in Emacs 22." 103introduced in Emacs 22."
75 (if (< emacs-major-version 22) 104 (if (< emacs-major-version 22)
76 `(face-foreground ,face ,frame) 105 `(face-foreground ,face ,frame)
77 `(face-foreground ,face ,frame ,inherit))) 106 `(face-foreground ,face ,frame ,inherit)))
@@ -80,15 +109,51 @@ argument, introduced in Emacs 22."
80 "Return the background color name of face, or nil if unspecified. 109 "Return the background color name of face, or nil if unspecified.
81See documentation for `back-foreground' for a description of the 110See documentation for `back-foreground' for a description of the
82arguments FACE, FRAME, and INHERIT. 111arguments FACE, FRAME, and INHERIT.
83This macro added by MH-E for Emacs versions that lack an INHERIT 112This macro is used by Emacs versions that lack an INHERIT argument,
84argument, introduced in Emacs 22." 113introduced in Emacs 22."
85 (if (< emacs-major-version 22) 114 (if (< emacs-major-version 22)
86 `(face-background ,face ,frame) 115 `(face-background ,face ,frame)
87 `(face-background ,face ,frame ,inherit))) 116 `(face-background ,face ,frame ,inherit)))
88 117
118;; For XEmacs.
119(defalias 'mh-line-beginning-position
120 (if (fboundp 'line-beginning-position)
121 'line-beginning-position
122 'point-at-bol))
123
124;; For XEmacs.
125(defalias 'mh-line-end-position
126 (if (fboundp 'line-end-position)
127 'line-end-position
128 'point-at-eol))
129
130(mh-require 'mailabbrev nil t)
131(mh-defun-compat mh-mail-abbrev-make-syntax-table
132 mail-abbrev-make-syntax-table ()
133 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'.
134This function does nothing on those systems."
135 nil)
136
137(mh-defun-compat mh-match-string-no-properties
138 match-string-no-properties (num &optional string)
139 "Return string of text matched by last search, without text properties.
140This function is used by XEmacs that lacks `match-string-no-properties'.
141The function `buffer-substring-no-properties' is used instead.
142The argument STRING is ignored."
143 (buffer-substring-no-properties
144 (match-beginning num) (match-end num)))
145
146(mh-defun-compat mh-replace-regexp-in-string replace-regexp-in-string
147 (rep string &optional fixedcase literal subexp start)
148 "Replace REGEXP with REP everywhere in STRING and return result.
149This function is used by XEmacs that lacks `replace-regexp-in-string'.
150The function `replace-in-string' is used instead.
151The arguments FIXEDCASE, LITERAL, SUBEXP, and START are ignored."
152 (replace-in-string string regexp rep))
153
89;; Copy of constant from url-util.el in Emacs 22; needed by Emacs 21. 154;; Copy of constant from url-util.el in Emacs 22; needed by Emacs 21.
90(if (not (boundp 'url-unreserved-chars)) 155(if (not (boundp 'url-unreserved-chars))
91 (defconst mh-url-unresrved-chars 156 (defconst mh-url-unreserved-chars
92 '( 157 '(
93 ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z 158 ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z
94 ?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z 159 ?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z
@@ -111,6 +176,17 @@ This is a copy of `url-hexify-string' from url-util.el in Emacs
111 (char-to-string char))) 176 (char-to-string char)))
112 str "")) 177 str ""))
113 178
179(mh-defun-compat mh-view-mode-enter
180 view-mode-enter (&optional return-to exit-action)
181 "Enter View mode.
182This function is used by XEmacs that lacks `view-mode-enter'.
183The function `view-mode' is used instead.
184The arguments RETURN-TO and EXIT-ACTION are ignored."
185 ;; Shush compiler.
186 (if return-to nil)
187 (if exit-action nil)
188 (view-mode 1))
189
114(defmacro mh-write-file-functions () 190(defmacro mh-write-file-functions ()
115 "Return `write-file-functions' if it exists. 191 "Return `write-file-functions' if it exists.
116Otherwise return `local-write-file-hooks'. 192Otherwise return `local-write-file-hooks'.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 5b738933590..9be827a8071 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.85+cvs 9;; Version: 7.91+cvs
10;; Keywords: mail 10;; Keywords: mail
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -101,7 +101,13 @@
101 101
102(eval-and-compile 102(eval-and-compile
103 (defvar mh-xemacs-flag (featurep 'xemacs) 103 (defvar mh-xemacs-flag (featurep 'xemacs)
104 "Non-nil means the current Emacs is XEmacs.")) 104 "Non-nil means the current Emacs is XEmacs.")
105 (defvar mh-compiling-flag nil
106 "Non-nil means we're compiling."))
107
108(eval-when (compile)
109 (setq mh-compiling-flag t))
110
105(mh-do-in-xemacs 111(mh-do-in-xemacs
106 (require 'mh-xemacs)) 112 (require 'mh-xemacs))
107 113
@@ -115,7 +121,7 @@
115;; Try to keep variables local to a single file. Provide accessors if 121;; Try to keep variables local to a single file. Provide accessors if
116;; variables are shared. Use this section as a last resort. 122;; variables are shared. Use this section as a last resort.
117 123
118(defconst mh-version "7.85+sans-entropy" "Version number of MH-E.") 124(defconst mh-version "7.91+cvs" "Version number of MH-E.")
119 125
120;; Variants 126;; Variants
121 127
@@ -464,7 +470,8 @@ all the strings have been used."
464 (let ((arg-list (reverse args)) 470 (let ((arg-list (reverse args))
465 (count 0)) 471 (count 0))
466 (while (and (not (eobp)) (< count mh-index-max-cmdline-args)) 472 (while (and (not (eobp)) (< count mh-index-max-cmdline-args))
467 (push (buffer-substring-no-properties (point) (line-end-position)) 473 (push (buffer-substring-no-properties (point)
474 (mh-line-end-position))
468 arg-list) 475 arg-list)
469 (incf count) 476 (incf count)
470 (forward-line)) 477 (forward-line))
@@ -2970,7 +2977,7 @@ entirely if the display does not support the number of specified
2970colors." 2977colors."
2971 (if mh-min-colors-defined-flag 2978 (if mh-min-colors-defined-flag
2972 spec 2979 spec
2973 (let ((cells (display-color-cells)) 2980 (let ((cells (mh-display-color-cells))
2974 new-spec) 2981 new-spec)
2975 ;; Remove entries with min-colors, or delete them if we have fewer colors 2982 ;; Remove entries with min-colors, or delete them if we have fewer colors
2976 ;; than they specify. 2983 ;; than they specify.
@@ -3030,9 +3037,9 @@ colors."
3030 3037
3031(defface mh-folder-msg-number 3038(defface mh-folder-msg-number
3032 (mh-defface-compat 3039 (mh-defface-compat
3033 '((((class color) (min-colors 88) (background light)) 3040 '((((class color) (min-colors 64) (background light))
3034 (:foreground "snow4")) 3041 (:foreground "snow4"))
3035 (((class color) (min-colors 88) (background dark)) 3042 (((class color) (min-colors 64) (background dark))
3036 (:foreground "snow3")) 3043 (:foreground "snow3"))
3037 (((class color)) 3044 (((class color))
3038 (:foreground "cyan")))) 3045 (:foreground "cyan"))))
@@ -3043,9 +3050,9 @@ colors."
3043 3050
3044(defface mh-folder-refiled 3051(defface mh-folder-refiled
3045 (mh-defface-compat 3052 (mh-defface-compat
3046 '((((class color) (min-colors 88) (background light)) 3053 '((((class color) (min-colors 64) (background light))
3047 (:foreground "DarkGoldenrod")) 3054 (:foreground "DarkGoldenrod"))
3048 (((class color) (min-colors 88) (background dark)) 3055 (((class color) (min-colors 64) (background dark))
3049 (:foreground "LightGoldenrod")) 3056 (:foreground "LightGoldenrod"))
3050 (((class color)) 3057 (((class color))
3051 (:foreground "yellow" :weight light)) 3058 (:foreground "yellow" :weight light))
@@ -3099,9 +3106,9 @@ format `mh-scan-format-nmh' and the regular expression
3099 3106
3100(defface mh-folder-to 3107(defface mh-folder-to
3101 (mh-defface-compat 3108 (mh-defface-compat
3102 '((((class color) (min-colors 88) (background light)) 3109 '((((class color) (min-colors 64) (background light))
3103 (:foreground "RosyBrown")) 3110 (:foreground "RosyBrown"))
3104 (((class color) (min-colors 88) (background dark)) 3111 (((class color) (min-colors 64) (background dark))
3105 (:foreground "LightSalmon")) 3112 (:foreground "LightSalmon"))
3106 (((class color)) 3113 (((class color))
3107 (:foreground "green")) 3114 (:foreground "green"))
@@ -3139,9 +3146,9 @@ format `mh-scan-format-nmh' and the regular expression
3139 3146
3140(defface mh-show-cc 3147(defface mh-show-cc
3141 (mh-defface-compat 3148 (mh-defface-compat
3142 '((((class color) (min-colors 88) (background light)) 3149 '((((class color) (min-colors 64) (background light))
3143 (:foreground "DarkGoldenrod")) 3150 (:foreground "DarkGoldenrod"))
3144 (((class color) (min-colors 88) (background dark)) 3151 (((class color) (min-colors 64) (background dark))
3145 (:foreground "LightGoldenrod")) 3152 (:foreground "LightGoldenrod"))
3146 (((class color)) 3153 (((class color))
3147 (:foreground "yellow" :weight light)) 3154 (:foreground "yellow" :weight light))
@@ -3157,9 +3164,9 @@ format `mh-scan-format-nmh' and the regular expression
3157 3164
3158(defface mh-show-date 3165(defface mh-show-date
3159 (mh-defface-compat 3166 (mh-defface-compat
3160 '((((class color) (min-colors 88) (background light)) 3167 '((((class color) (min-colors 64) (background light))
3161 (:foreground "ForestGreen")) 3168 (:foreground "ForestGreen"))
3162 (((class color) (min-colors 88) (background dark)) 3169 (((class color) (min-colors 64) (background dark))
3163 (:foreground "PaleGreen")) 3170 (:foreground "PaleGreen"))
3164 (((class color)) 3171 (((class color))
3165 (:foreground "green")) 3172 (:foreground "green"))
@@ -3186,9 +3193,9 @@ format `mh-scan-format-nmh' and the regular expression
3186 3193
3187(defface mh-show-header 3194(defface mh-show-header
3188 (mh-defface-compat 3195 (mh-defface-compat
3189 '((((class color) (min-colors 88) (background light)) 3196 '((((class color) (min-colors 64) (background light))
3190 (:foreground "RosyBrown")) 3197 (:foreground "RosyBrown"))
3191 (((class color) (min-colors 88) (background dark)) 3198 (((class color) (min-colors 64) (background dark))
3192 (:foreground "LightSalmon")) 3199 (:foreground "LightSalmon"))
3193 (((class color)) 3200 (((class color))
3194 (:foreground "green")) 3201 (:foreground "green"))
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 5339363df19..59526986d35 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -516,7 +516,7 @@ font-lock is done highlighting.")
516 (cons (current-buffer) nil))))) 516 (cons (current-buffer) nil)))))
517 517
518;; Register mh-folder-mode as supporting which-function-mode... 518;; Register mh-folder-mode as supporting which-function-mode...
519(require 'which-func nil t) 519(mh-require 'which-func nil t)
520(when (boundp 'which-func-modes) 520(when (boundp 'which-func-modes)
521 (add-to-list 'which-func-modes 'mh-folder-mode)) 521 (add-to-list 'which-func-modes 'mh-folder-mode))
522 522
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index 0565ed42e6b..f7abb4cb389 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -154,7 +154,7 @@ Display the results only if something went wrong."
154 "-recurse" 154 "-recurse"
155 "-norecurse")) 155 "-norecurse"))
156 (goto-char (point-min)) 156 (goto-char (point-min))
157 (view-mode-enter) 157 (mh-view-mode-enter)
158 (setq view-exit-action 'kill-buffer) 158 (setq view-exit-action 'kill-buffer)
159 (message "Listing folders...done"))))) 159 (message "Listing folders...done")))))
160 160
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index 8944db89f70..970f98556e2 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -32,11 +32,11 @@
32 32
33(require 'mh-e) 33(require 'mh-e)
34 34
35(require 'gnus-util nil t) 35(mh-require 'gnus-util nil t)
36(require 'mm-bodies nil t) 36(mh-require 'mm-bodies nil t)
37(require 'mm-decode nil t) 37(mh-require 'mm-decode nil t)
38(require 'mm-view nil t) 38(mh-require 'mm-view nil t)
39(require 'mml nil t) 39(mh-require 'mml nil t)
40 40
41;; Copy of function from gnus-util.el. 41;; Copy of function from gnus-util.el.
42(mh-defun-compat mh-gnus-local-map-property gnus-local-map-property (map) 42(mh-defun-compat mh-gnus-local-map-property gnus-local-map-property (map)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index a5a7af24e91..c6af5c323a9 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -267,7 +267,7 @@ searching for `mh-mail-header-separator' in the buffer."
267 (goto-char (point-min)) 267 (goto-char (point-min))
268 (cond ((equal mh-mail-header-separator "") (point-min)) 268 (cond ((equal mh-mail-header-separator "") (point-min))
269 ((search-forward (format "\n%s\n" mh-mail-header-separator) nil t) 269 ((search-forward (format "\n%s\n" mh-mail-header-separator) nil t)
270 (line-beginning-position 0)) 270 (mh-line-beginning-position 0))
271 (t (point-min))))) 271 (t (point-min)))))
272 272
273 273
@@ -319,7 +319,7 @@ order).
319 (set (make-local-variable 'mh-mail-header-separator) 319 (set (make-local-variable 'mh-mail-header-separator)
320 (save-excursion 320 (save-excursion
321 (goto-char (mh-mail-header-end)) 321 (goto-char (mh-mail-header-end))
322 (buffer-substring-no-properties (point) (line-end-position)))) 322 (buffer-substring-no-properties (point) (mh-line-end-position))))
323 (make-local-variable 'mail-header-separator) 323 (make-local-variable 'mail-header-separator)
324 (setq mail-header-separator mh-mail-header-separator) ;override sendmail.el 324 (setq mail-header-separator mh-mail-header-separator) ;override sendmail.el
325 (mh-set-help mh-letter-mode-help-messages) 325 (mh-set-help mh-letter-mode-help-messages)
@@ -828,7 +828,7 @@ body."
828 ((< (point) (progn 828 ((< (point) (progn
829 (beginning-of-line) 829 (beginning-of-line)
830 (re-search-forward mh-letter-header-field-regexp 830 (re-search-forward mh-letter-header-field-regexp
831 (line-end-position) t) 831 (mh-line-end-position) t)
832 (point))) 832 (point)))
833 (beginning-of-line)) 833 (beginning-of-line))
834 (t (end-of-line))) 834 (t (end-of-line)))
diff --git a/lisp/mh-e/mh-limit.el b/lisp/mh-e/mh-limit.el
index 68ec25a9470..7a90b890cad 100644
--- a/lisp/mh-e/mh-limit.el
+++ b/lisp/mh-e/mh-limit.el
@@ -211,7 +211,7 @@ Return number of messages put in the sequence:
211 (string-equal "" (match-string 3))) 211 (string-equal "" (match-string 3)))
212 (progn (message "No subject line") 212 (progn (message "No subject line")
213 nil) 213 nil)
214 (let ((subject (match-string-no-properties 3)) 214 (let ((subject (mh-match-string-no-properties 3))
215 (list)) 215 (list))
216 (if (> (length subject) mh-limit-max-subject-size) 216 (if (> (length subject) mh-limit-max-subject-size)
217 (setq subject (substring subject 0 mh-limit-max-subject-size))) 217 (setq subject (substring subject 0 mh-limit-max-subject-size)))
@@ -219,7 +219,7 @@ Return number of messages put in the sequence:
219 (if all 219 (if all
220 (goto-char (point-min))) 220 (goto-char (point-min)))
221 (while (re-search-forward mh-scan-subject-regexp nil t) 221 (while (re-search-forward mh-scan-subject-regexp nil t)
222 (let ((this-subject (match-string-no-properties 3))) 222 (let ((this-subject (mh-match-string-no-properties 3)))
223 (if (> (length this-subject) mh-limit-max-subject-size) 223 (if (> (length this-subject) mh-limit-max-subject-size)
224 (setq this-subject (substring this-subject 224 (setq this-subject (substring this-subject
225 0 mh-limit-max-subject-size))) 225 0 mh-limit-max-subject-size)))
@@ -310,7 +310,7 @@ The MH command pick is used to do the match."
310 (while (not (eobp)) 310 (while (not (eobp))
311 (let ((num (ignore-errors 311 (let ((num (ignore-errors
312 (string-to-number 312 (string-to-number
313 (buffer-substring (point) (line-end-position)))))) 313 (buffer-substring (point) (mh-line-end-position))))))
314 (when num (push num msg-list)) 314 (when num (push num msg-list))
315 (forward-line)))) 315 (forward-line))))
316 (if (null msg-list) 316 (if (null msg-list)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index 776f0c067a8..787f5c371fe 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -302,14 +302,14 @@ the attachment labeled with that number."
302 start end) 302 start end)
303 (cond ((and data (not inserted-flag) (not displayed-flag)) 303 (cond ((and data (not inserted-flag) (not displayed-flag))
304 (let ((contents (mm-get-part data))) 304 (let ((contents (mm-get-part data)))
305 (add-text-properties (line-beginning-position) (line-end-position) 305 (add-text-properties (mh-line-beginning-position)
306 '(mh-mime-inserted t)) 306 (mh-line-end-position) '(mh-mime-inserted t))
307 (setq start (point-marker)) 307 (setq start (point-marker))
308 (forward-line 1) 308 (forward-line 1)
309 (mm-insert-inline data contents) 309 (mm-insert-inline data contents)
310 (setq end (point-marker)) 310 (setq end (point-marker))
311 (add-text-properties 311 (add-text-properties
312 start (progn (goto-char start) (line-end-position)) 312 start (progn (goto-char start) (mh-line-end-position))
313 `(mh-region (,start . ,end))))) 313 `(mh-region (,start . ,end)))))
314 ((and data (or inserted-flag displayed-flag)) 314 ((and data (or inserted-flag displayed-flag))
315 (mh-press-button) 315 (mh-press-button)
@@ -746,7 +746,8 @@ buttons for alternative parts that are usually suppressed."
746 (mh-insert-mime-button handle id (mm-handle-displayed-p handle)) 746 (mh-insert-mime-button handle id (mm-handle-displayed-p handle))
747 (goto-char point) 747 (goto-char point)
748 (when region 748 (when region
749 (add-text-properties (line-beginning-position) (line-end-position) 749 (add-text-properties (mh-line-beginning-position)
750 (mh-line-end-position)
750 `(mh-region ,region))))))) 751 `(mh-region ,region)))))))
751 752
752(defun mh-mime-part-index (handle) 753(defun mh-mime-part-index (handle)
@@ -1500,9 +1501,9 @@ This function will quote all such characters."
1500 (goto-char (point-min)) 1501 (goto-char (point-min))
1501 (while (re-search-forward "^#" nil t) 1502 (while (re-search-forward "^#" nil t)
1502 (beginning-of-line) 1503 (beginning-of-line)
1503 (unless (mh-mh-directive-present-p (point) (line-end-position)) 1504 (unless (mh-mh-directive-present-p (point) (mh-line-end-position))
1504 (insert "#")) 1505 (insert "#"))
1505 (goto-char (line-end-position))))) 1506 (goto-char (mh-line-end-position)))))
1506 1507
1507;;;###mh-autoload 1508;;;###mh-autoload
1508(defun mh-mh-to-mime-undo (noconfirm) 1509(defun mh-mh-to-mime-undo (noconfirm)
@@ -1672,7 +1673,8 @@ buffer, while END defaults to the the end of the buffer."
1672 (block 'search-for-mh-directive 1673 (block 'search-for-mh-directive
1673 (goto-char begin) 1674 (goto-char begin)
1674 (while (re-search-forward "^#" end t) 1675 (while (re-search-forward "^#" end t)
1675 (let ((s (buffer-substring-no-properties (point) (line-end-position)))) 1676 (let ((s (buffer-substring-no-properties
1677 (point) (mh-line-end-position))))
1676 (cond ((equal s "")) 1678 (cond ((equal s ""))
1677 ((string-match "^forw[ \t\n]+" s) 1679 ((string-match "^forw[ \t\n]+" s)
1678 (return-from 'search-for-mh-directive t)) 1680 (return-from 'search-for-mh-directive t))
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 9fc9355a065..f1292dd8e1e 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -51,7 +51,6 @@
51 51
52(require 'gnus-util) 52(require 'gnus-util)
53(require 'imenu) 53(require 'imenu)
54(require 'which-func nil t)
55 54
56(defvar mh-searcher nil 55(defvar mh-searcher nil
57 "Cached value of chosen search program.") 56 "Cached value of chosen search program.")
@@ -358,12 +357,13 @@ configuration and is used when the search folder is dismissed."
358 (goto-char (point-min)) 357 (goto-char (point-min))
359 (dotimes (i 5) 358 (dotimes (i 5)
360 (add-text-properties (point) (1+ (point)) '(front-sticky t)) 359 (add-text-properties (point) (1+ (point)) '(front-sticky t))
361 (add-text-properties (- (line-end-position) 2) (1- (line-end-position)) 360 (add-text-properties (- (mh-line-end-position) 2)
361 (1- (mh-line-end-position))
362 '(rear-nonsticky t)) 362 '(rear-nonsticky t))
363 (add-text-properties (point) (1- (line-end-position)) '(read-only t)) 363 (add-text-properties (point) (1- (mh-line-end-position)) '(read-only t))
364 (forward-line)) 364 (forward-line))
365 (add-text-properties (point) (1+ (point)) '(front-sticky t)) 365 (add-text-properties (point) (1+ (point)) '(front-sticky t))
366 (add-text-properties (point) (1- (line-end-position)) '(read-only t)) 366 (add-text-properties (point) (1- (mh-line-end-position)) '(read-only t))
367 (goto-char (point-max))) 367 (goto-char (point-max)))
368 368
369;; Sequence Searches 369;; Sequence Searches
@@ -526,9 +526,10 @@ group of results."
526 (cond ((and (bolp) (eolp)) 526 (cond ((and (bolp) (eolp))
527 (ignore-errors (forward-line -1)) 527 (ignore-errors (forward-line -1))
528 (setq msg (mh-get-msg-num t))) 528 (setq msg (mh-get-msg-num t)))
529 ((equal (char-after (line-beginning-position)) ?+) 529 ((equal (char-after (mh-line-beginning-position)) ?+)
530 (setq folder (buffer-substring-no-properties 530 (setq folder (buffer-substring-no-properties
531 (line-beginning-position) (line-end-position)))) 531 (mh-line-beginning-position)
532 (mh-line-end-position))))
532 (t (setq msg (mh-get-msg-num t))))) 533 (t (setq msg (mh-get-msg-num t)))))
533 (when (not folder) 534 (when (not folder)
534 (setq folder (car (gethash (gethash msg mh-index-msg-checksum-map) 535 (setq folder (car (gethash (gethash msg mh-index-msg-checksum-map)
@@ -655,13 +656,13 @@ The cdr of the element is the pattern to search."
655 start begin) 656 start begin)
656 (goto-char (point-min)) 657 (goto-char (point-min))
657 (while (not (eobp)) 658 (while (not (eobp))
658 (if (search-forward "--------" (line-end-position) t) 659 (if (search-forward "--------" (mh-line-end-position) t)
659 (setq in-body-flag t) 660 (setq in-body-flag t)
660 (beginning-of-line) 661 (beginning-of-line)
661 (setq begin (point)) 662 (setq begin (point))
662 (setq start (if in-body-flag 663 (setq start (if in-body-flag
663 (point) 664 (point)
664 (search-forward ":" (line-end-position) t) 665 (search-forward ":" (mh-line-end-position) t)
665 (point))) 666 (point)))
666 (push (cons (and (not in-body-flag) 667 (push (cons (and (not in-body-flag)
667 (intern (downcase 668 (intern (downcase
@@ -669,7 +670,7 @@ The cdr of the element is the pattern to search."
669 begin (1- start))))) 670 begin (1- start)))))
670 (mh-index-parse-search-regexp 671 (mh-index-parse-search-regexp
671 (buffer-substring-no-properties 672 (buffer-substring-no-properties
672 start (line-end-position)))) 673 start (mh-line-end-position))))
673 pattern-list)) 674 pattern-list))
674 (forward-line)) 675 (forward-line))
675 pattern-list))) 676 pattern-list)))
@@ -979,8 +980,8 @@ is used to search."
979 (return nil)) 980 (return nil))
980 (when (equal (char-after (point)) ?#) 981 (when (equal (char-after (point)) ?#)
981 (return 'error)) 982 (return 'error))
982 (let* ((start (search-forward " " (line-end-position) t)) 983 (let* ((start (search-forward " " (mh-line-end-position) t))
983 (end (search-forward " " (line-end-position) t))) 984 (end (search-forward " " (mh-line-end-position) t)))
984 (unless (and start end) 985 (unless (and start end)
985 (return 'error)) 986 (return 'error))
986 (setq end (1- end)) 987 (setq end (1- end))
@@ -1058,7 +1059,7 @@ SEARCH-REGEXP-LIST is used to search."
1058 (return 'error)) 1059 (return 'error))
1059 (let ((start (point)) 1060 (let ((start (point))
1060 end msg-start) 1061 end msg-start)
1061 (setq end (line-end-position)) 1062 (setq end (mh-line-end-position))
1062 (unless (search-forward mh-mairix-folder end t) 1063 (unless (search-forward mh-mairix-folder end t)
1063 (return 'error)) 1064 (return 'error))
1064 (goto-char (match-beginning 0)) 1065 (goto-char (match-beginning 0))
@@ -1191,7 +1192,7 @@ is used to search."
1191 (block nil 1192 (block nil
1192 (when (eobp) (return nil)) 1193 (when (eobp) (return nil))
1193 (let ((file-name (buffer-substring-no-properties 1194 (let ((file-name (buffer-substring-no-properties
1194 (point) (line-end-position)))) 1195 (point) (mh-line-end-position))))
1195 (unless (equal (string-match mh-namazu-folder file-name) 0) 1196 (unless (equal (string-match mh-namazu-folder file-name) 0)
1196 (return 'error)) 1197 (return 'error))
1197 (unless (file-exists-p file-name) 1198 (unless (file-exists-p file-name)
@@ -1239,17 +1240,17 @@ is used to search."
1239 (prog1 1240 (prog1
1240 (block nil 1241 (block nil
1241 (when (eobp) (return nil)) 1242 (when (eobp) (return nil))
1242 (when (search-forward-regexp "^\+" (line-end-position) t) 1243 (when (search-forward-regexp "^\+" (mh-line-end-position) t)
1243 (setq mh-index-pick-folder 1244 (setq mh-index-pick-folder
1244 (buffer-substring-no-properties (line-beginning-position) 1245 (buffer-substring-no-properties (mh-line-beginning-position)
1245 (line-end-position))) 1246 (mh-line-end-position)))
1246 (return 'error)) 1247 (return 'error))
1247 (unless (search-forward-regexp "^[1-9][0-9]*$" (line-end-position) t) 1248 (unless (search-forward-regexp "^[1-9][0-9]*$" (mh-line-end-position) t)
1248 (return 'error)) 1249 (return 'error))
1249 (list mh-index-pick-folder 1250 (list mh-index-pick-folder
1250 (string-to-number 1251 (string-to-number
1251 (buffer-substring-no-properties (line-beginning-position) 1252 (buffer-substring-no-properties (mh-line-beginning-position)
1252 (line-end-position))) 1253 (mh-line-end-position)))
1253 nil)) 1254 nil))
1254 (forward-line))) 1255 (forward-line)))
1255 1256
@@ -1326,8 +1327,8 @@ record is invalid return 'error."
1326 (block nil 1327 (block nil
1327 (when (eobp) 1328 (when (eobp)
1328 (return nil)) 1329 (return nil))
1329 (let ((eol-pos (line-end-position)) 1330 (let ((eol-pos (mh-line-end-position))
1330 (bol-pos (line-beginning-position)) 1331 (bol-pos (mh-line-beginning-position))
1331 folder-start msg-end) 1332 folder-start msg-end)
1332 (goto-char bol-pos) 1333 (goto-char bol-pos)
1333 (unless (search-forward mh-user-path eol-pos t) 1334 (unless (search-forward mh-user-path eol-pos t)
@@ -1408,8 +1409,12 @@ being the list of messages originally from that folder."
1408 (when cur-msg (mh-goto-msg cur-msg t t)) 1409 (when cur-msg (mh-goto-msg cur-msg t t))
1409 (set-buffer-modified-p old-buffer-modified-flag))) 1410 (set-buffer-modified-p old-buffer-modified-flag)))
1410 1411
1412(mh-require 'which-func nil t)
1413
1411;; Shush compiler. 1414;; Shush compiler.
1412(eval-when-compile (mh-do-in-xemacs (defvar which-func-mode))) 1415(eval-when-compile
1416 (if (or mh-xemacs-flag (< emacs-major-version 22))
1417 (defvar which-func-mode)))
1413 1418
1414;;;###mh-autoload 1419;;;###mh-autoload
1415(defun mh-index-create-imenu-index () 1420(defun mh-index-create-imenu-index ()
@@ -1423,7 +1428,7 @@ being the list of messages originally from that folder."
1423 (save-excursion 1428 (save-excursion
1424 (beginning-of-line) 1429 (beginning-of-line)
1425 (push (cons (buffer-substring-no-properties 1430 (push (cons (buffer-substring-no-properties
1426 (point) (line-end-position)) 1431 (point) (mh-line-end-position))
1427 (set-marker (make-marker) (point))) 1432 (set-marker (make-marker) (point)))
1428 alist))) 1433 alist)))
1429 (setq imenu--index-alist (nreverse alist))))) 1434 (setq imenu--index-alist (nreverse alist)))))
@@ -1696,7 +1701,8 @@ folder, is removed from `mh-index-data'."
1696 (mh-exec-cmd-output mh-scan-prog nil "-width" "80" 1701 (mh-exec-cmd-output mh-scan-prog nil "-width" "80"
1697 "-format" "%{x-mhe-checksum}\n" folder msg) 1702 "-format" "%{x-mhe-checksum}\n" folder msg)
1698 (goto-char (point-min)) 1703 (goto-char (point-min))
1699 (string-equal (buffer-substring-no-properties (point) (line-end-position)) 1704 (string-equal (buffer-substring-no-properties
1705 (point) (mh-line-end-position))
1700 checksum))) 1706 checksum)))
1701 1707
1702 1708
@@ -1805,8 +1811,8 @@ PROC is used to convert the value to actual data."
1805 1811
1806(defun mh-md5sum-parser () 1812(defun mh-md5sum-parser ()
1807 "Parse md5sum output." 1813 "Parse md5sum output."
1808 (let ((begin (line-beginning-position)) 1814 (let ((begin (mh-line-beginning-position))
1809 (end (line-end-position)) 1815 (end (mh-line-end-position))
1810 first-space last-slash) 1816 first-space last-slash)
1811 (setq first-space (search-forward " " end t)) 1817 (setq first-space (search-forward " " end t))
1812 (goto-char end) 1818 (goto-char end)
@@ -1819,8 +1825,8 @@ PROC is used to convert the value to actual data."
1819 1825
1820(defun mh-openssl-parser () 1826(defun mh-openssl-parser ()
1821 "Parse openssl output." 1827 "Parse openssl output."
1822 (let ((begin (line-beginning-position)) 1828 (let ((begin (mh-line-beginning-position))
1823 (end (line-end-position)) 1829 (end (mh-line-end-position))
1824 last-space last-slash) 1830 last-space last-slash)
1825 (goto-char end) 1831 (goto-char end)
1826 (setq last-space (search-backward " " begin t)) 1832 (setq last-space (search-backward " " begin t))
@@ -1854,7 +1860,7 @@ origin-index) map is updated too."
1854 (let (msg checksum) 1860 (let (msg checksum)
1855 (while (not (eobp)) 1861 (while (not (eobp))
1856 (setq msg (buffer-substring-no-properties 1862 (setq msg (buffer-substring-no-properties
1857 (point) (line-end-position))) 1863 (point) (mh-line-end-position)))
1858 (forward-line) 1864 (forward-line)
1859 (save-excursion 1865 (save-excursion
1860 (cond ((not (string-match "^[0-9]*$" msg))) 1866 (cond ((not (string-match "^[0-9]*$" msg)))
@@ -1865,7 +1871,7 @@ origin-index) map is updated too."
1865 (t 1871 (t
1866 ;; update maps 1872 ;; update maps
1867 (setq checksum (buffer-substring-no-properties 1873 (setq checksum (buffer-substring-no-properties
1868 (point) (line-end-position))) 1874 (point) (mh-line-end-position)))
1869 (let ((msg (string-to-number msg))) 1875 (let ((msg (string-to-number msg)))
1870 (set-buffer folder) 1876 (set-buffer folder)
1871 (mh-index-update-single-msg msg checksum origin-map))))) 1877 (mh-index-update-single-msg msg checksum origin-map)))))
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index cf2027392bd..a5732d00bc6 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -175,7 +175,7 @@ The list appears in a buffer named \"*MH-E Sequences*\"."
175 (insert "\n")) 175 (insert "\n"))
176 (setq seq-list (cdr seq-list))) 176 (setq seq-list (cdr seq-list)))
177 (goto-char (point-min)) 177 (goto-char (point-min))
178 (view-mode-enter) 178 (mh-view-mode-enter)
179 (setq view-exit-action 'kill-buffer) 179 (setq view-exit-action 'kill-buffer)
180 (message "Listing sequences...done"))))) 180 (message "Listing sequences...done")))))
181 181
@@ -749,7 +749,7 @@ completion is over."
749 (goto-char (point-min)) 749 (goto-char (point-min))
750 (multiple-value-bind (folder unseen total) 750 (multiple-value-bind (folder unseen total)
751 (mh-parse-flist-output-line 751 (mh-parse-flist-output-line
752 (buffer-substring (point) (line-end-position))) 752 (buffer-substring (point) (mh-line-end-position)))
753 (values total unseen folder)))) 753 (values total unseen folder))))
754 754
755(defun mh-folder-size-folder (folder) 755(defun mh-folder-size-folder (folder)
@@ -777,7 +777,7 @@ folders whose names end with a '+' character."
777 (when (search-backward " out of " (point-min) t) 777 (when (search-backward " out of " (point-min) t)
778 (setq total (string-to-number 778 (setq total (string-to-number
779 (buffer-substring-no-properties 779 (buffer-substring-no-properties
780 (match-end 0) (line-end-position)))) 780 (match-end 0) (mh-line-end-position))))
781 (when (search-backward " in sequence " (point-min) t) 781 (when (search-backward " in sequence " (point-min) t)
782 (setq p (point)) 782 (setq p (point))
783 (when (search-backward " has " (point-min) t) 783 (when (search-backward " has " (point-min) t)
@@ -955,7 +955,7 @@ font-lock is turned on."
955 ;; the case of user sequences. 955 ;; the case of user sequences.
956 (mh-notate nil nil mh-cmd-note) 956 (mh-notate nil nil mh-cmd-note)
957 (when font-lock-mode 957 (when font-lock-mode
958 (font-lock-fontify-region (point) (line-end-position)))) 958 (font-lock-fontify-region (point) (mh-line-end-position))))
959 (forward-char (+ mh-cmd-note mh-scan-field-destination-offset)) 959 (forward-char (+ mh-cmd-note mh-scan-field-destination-offset))
960 (let ((stack (gethash msg mh-sequence-notation-history))) 960 (let ((stack (gethash msg mh-sequence-notation-history)))
961 (setf (gethash msg mh-sequence-notation-history) 961 (setf (gethash msg mh-sequence-notation-history)
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index f8728edb3e4..ab636ae8ab6 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -878,7 +878,7 @@ See also `mh-folder-mode'.
878(defun mh-show-addr () 878(defun mh-show-addr ()
879 "Use `goto-address'." 879 "Use `goto-address'."
880 (when mh-show-use-goto-addr-flag 880 (when mh-show-use-goto-addr-flag
881 (require 'goto-addr nil t) 881 (mh-require 'goto-addr nil t)
882 (if (fboundp 'goto-address) 882 (if (fboundp 'goto-address)
883 (goto-address)))) 883 (goto-address))))
884 884
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index 00cfd5ef961..ebf34abbd4c 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -69,13 +69,13 @@
69 ["Visit Folder" mh-speed-view 69 ["Visit Folder" mh-speed-view
70 (save-excursion 70 (save-excursion
71 (set-buffer speedbar-buffer) 71 (set-buffer speedbar-buffer)
72 (get-text-property (line-beginning-position) 'mh-folder))] 72 (get-text-property (mh-line-beginning-position) 'mh-folder))]
73 ["Expand Nested Folders" mh-speed-expand-folder 73 ["Expand Nested Folders" mh-speed-expand-folder
74 (and (get-text-property (line-beginning-position) 'mh-children-p) 74 (and (get-text-property (mh-line-beginning-position) 'mh-children-p)
75 (not (get-text-property (line-beginning-position) 'mh-expanded)))] 75 (not (get-text-property (mh-line-beginning-position) 'mh-expanded)))]
76 ["Contract Nested Folders" mh-speed-contract-folder 76 ["Contract Nested Folders" mh-speed-contract-folder
77 (and (get-text-property (line-beginning-position) 'mh-children-p) 77 (and (get-text-property (mh-line-beginning-position) 'mh-children-p)
78 (get-text-property (line-beginning-position) 'mh-expanded))] 78 (get-text-property (mh-line-beginning-position) 'mh-expanded))]
79 ["Refresh Speedbar" mh-speed-refresh t]) 79 ["Refresh Speedbar" mh-speed-refresh t])
80 "Extra menu items for speedbar.") 80 "Extra menu items for speedbar.")
81 81
@@ -157,7 +157,7 @@ The optional ARGS from speedbar are ignored."
157 (forward-line -1) 157 (forward-line -1)
158 (speedbar-change-expand-button-char ?+) 158 (speedbar-change-expand-button-char ?+)
159 (add-text-properties 159 (add-text-properties
160 (line-beginning-position) (1+ (line-beginning-position)) 160 (mh-line-beginning-position) (1+ (line-beginning-position))
161 '(mh-expanded nil))) 161 '(mh-expanded nil)))
162 (t 162 (t
163 (forward-line) 163 (forward-line)
@@ -165,7 +165,7 @@ The optional ARGS from speedbar are ignored."
165 (goto-char point) 165 (goto-char point)
166 (speedbar-change-expand-button-char ?-) 166 (speedbar-change-expand-button-char ?-)
167 (add-text-properties 167 (add-text-properties
168 (line-beginning-position) (1+ (line-beginning-position)) 168 (mh-line-beginning-position) (1+ (line-beginning-position))
169 `(mh-expanded t))))))) 169 `(mh-expanded t)))))))
170 170
171(defun mh-speed-view (&rest args) 171(defun mh-speed-view (&rest args)
@@ -173,7 +173,7 @@ The optional ARGS from speedbar are ignored."
173The optional ARGS from speedbar are ignored." 173The optional ARGS from speedbar are ignored."
174 (interactive) 174 (interactive)
175 (declare (ignore args)) 175 (declare (ignore args))
176 (let* ((folder (get-text-property (line-beginning-position) 'mh-folder)) 176 (let* ((folder (get-text-property (mh-line-beginning-position) 'mh-folder))
177 (range (and (stringp folder) 177 (range (and (stringp folder)
178 (mh-read-range "Scan" folder t nil nil 178 (mh-read-range "Scan" folder t nil nil
179 mh-interpret-number-as-range-flag)))) 179 mh-interpret-number-as-range-flag))))
@@ -199,9 +199,9 @@ created."
199 (forward-line -1) 199 (forward-line -1)
200 (setf (gethash nil mh-speed-folder-map) 200 (setf (gethash nil mh-speed-folder-map)
201 (set-marker (or (gethash nil mh-speed-folder-map) (make-marker)) 201 (set-marker (or (gethash nil mh-speed-folder-map) (make-marker))
202 (1+ (line-beginning-position)))) 202 (1+ (mh-line-beginning-position))))
203 (add-text-properties 203 (add-text-properties
204 (line-beginning-position) (1+ (line-beginning-position)) 204 (mh-line-beginning-position) (1+ (line-beginning-position))
205 `(mh-folder nil mh-expanded nil mh-children-p t mh-level 0)) 205 `(mh-folder nil mh-expanded nil mh-children-p t mh-level 0))
206 (mh-speed-stealth-update t) 206 (mh-speed-stealth-update t)
207 (when (> mh-speed-update-interval 0) 207 (when (> mh-speed-update-interval 0)
@@ -268,12 +268,12 @@ The update is always carried out if FORCE is non-nil."
268 (speedbar-with-writable 268 (speedbar-with-writable
269 (goto-char (gethash folder mh-speed-folder-map (point))) 269 (goto-char (gethash folder mh-speed-folder-map (point)))
270 (beginning-of-line) 270 (beginning-of-line)
271 (if (re-search-forward "([1-9][0-9]*/[0-9]+)" (line-end-position) t) 271 (if (re-search-forward "([1-9][0-9]*/[0-9]+)" (mh-line-end-position) t)
272 (setq face (mh-speed-bold-face face)) 272 (setq face (mh-speed-bold-face face))
273 (setq face (mh-speed-normal-face face))) 273 (setq face (mh-speed-normal-face face)))
274 (beginning-of-line) 274 (beginning-of-line)
275 (when (re-search-forward "\\[.\\] " (line-end-position) t) 275 (when (re-search-forward "\\[.\\] " (mh-line-end-position) t)
276 (put-text-property (point) (line-end-position) 'face face))))) 276 (put-text-property (point) (mh-line-end-position) 'face face)))))
277 277
278(defun mh-speed-normal-face (face) 278(defun mh-speed-normal-face (face)
279 "Return normal face for given FACE." 279 "Return normal face for given FACE."
@@ -313,7 +313,7 @@ The function will expand out parent folders of FOLDER if needed."
313 (while suffix-list 313 (while suffix-list
314 ;; We always need atleast one toggle. We need two if the directory list 314 ;; We always need atleast one toggle. We need two if the directory list
315 ;; is stale since a folder was added. 315 ;; is stale since a folder was added.
316 (when (equal prefix (get-text-property (line-beginning-position) 316 (when (equal prefix (get-text-property (mh-line-beginning-position)
317 'mh-folder)) 317 'mh-folder))
318 (mh-speed-toggle) 318 (mh-speed-toggle)
319 (unless (get-text-property (point) 'mh-expanded) 319 (unless (get-text-property (point) 'mh-expanded)
@@ -368,9 +368,9 @@ uses."
368 (setf (gethash folder-name mh-speed-folder-map) 368 (setf (gethash folder-name mh-speed-folder-map)
369 (set-marker (or (gethash folder-name mh-speed-folder-map) 369 (set-marker (or (gethash folder-name mh-speed-folder-map)
370 (make-marker)) 370 (make-marker))
371 (1+ (line-beginning-position)))) 371 (1+ (mh-line-beginning-position))))
372 (add-text-properties 372 (add-text-properties
373 (line-beginning-position) (1+ (line-beginning-position)) 373 (mh-line-beginning-position) (1+ (mh-line-beginning-position))
374 `(mh-folder ,folder-name 374 `(mh-folder ,folder-name
375 mh-expanded nil 375 mh-expanded nil
376 mh-children-p ,(not (not (cdr f))) 376 mh-children-p ,(not (not (cdr f)))
@@ -400,7 +400,7 @@ flists is run only for that one folder."
400 (interactive (list t)) 400 (interactive (list t))
401 (when force 401 (when force
402 (when mh-speed-flists-timer 402 (when mh-speed-flists-timer
403 (cancel-timer mh-speed-flists-timer) 403 (mh-cancel-timer mh-speed-flists-timer)
404 (setq mh-speed-flists-timer nil)) 404 (setq mh-speed-flists-timer nil))
405 (when (and (processp mh-speed-flists-process) 405 (when (and (processp mh-speed-flists-process)
406 (not (eq (process-status mh-speed-flists-process) 'exit))) 406 (not (eq (process-status mh-speed-flists-process) 'exit)))
@@ -471,25 +471,25 @@ be handled next."
471 face) 471 face)
472 (when pos 472 (when pos
473 (goto-char pos) 473 (goto-char pos)
474 (goto-char (line-beginning-position)) 474 (goto-char (mh-line-beginning-position))
475 (cond 475 (cond
476 ((null (get-text-property (point) 'mh-count)) 476 ((null (get-text-property (point) 'mh-count))
477 (goto-char (line-end-position)) 477 (goto-char (mh-line-end-position))
478 (setq face (get-text-property (1- (point)) 'face)) 478 (setq face (get-text-property (1- (point)) 'face))
479 (insert (format " (%s/%s)" unseen total)) 479 (insert (format " (%s/%s)" unseen total))
480 (mh-speed-highlight 'unknown face) 480 (mh-speed-highlight 'unknown face)
481 (goto-char (line-beginning-position)) 481 (goto-char (mh-line-beginning-position))
482 (add-text-properties (point) (1+ (point)) 482 (add-text-properties (point) (1+ (point))
483 `(mh-count (,unseen . ,total)))) 483 `(mh-count (,unseen . ,total))))
484 ((not (equal (get-text-property (point) 'mh-count) 484 ((not (equal (get-text-property (point) 'mh-count)
485 (cons unseen total))) 485 (cons unseen total)))
486 (goto-char (line-end-position)) 486 (goto-char (mh-line-end-position))
487 (setq face (get-text-property (1- (point)) 'face)) 487 (setq face (get-text-property (1- (point)) 'face))
488 (re-search-backward " " (line-beginning-position) t) 488 (re-search-backward " " (mh-line-beginning-position) t)
489 (delete-region (point) (line-end-position)) 489 (delete-region (point) (mh-line-end-position))
490 (insert (format " (%s/%s)" unseen total)) 490 (insert (format " (%s/%s)" unseen total))
491 (mh-speed-highlight 'unknown face) 491 (mh-speed-highlight 'unknown face)
492 (goto-char (line-beginning-position)) 492 (goto-char (mh-line-beginning-position))
493 (add-text-properties 493 (add-text-properties
494 (point) (1+ (point)) 494 (point) (1+ (point))
495 `(mh-count (,unseen . ,total)))))))))))) 495 `(mh-count (,unseen . ,total))))))))))))
@@ -519,15 +519,15 @@ be handled next."
519 (caar parent-kids))) 519 (caar parent-kids)))
520 (setq parent-change ? )))) 520 (setq parent-change ? ))))
521 (goto-char parent-position) 521 (goto-char parent-position)
522 (when (equal (get-text-property (line-beginning-position) 'mh-folder) 522 (when (equal (get-text-property (mh-line-beginning-position) 'mh-folder)
523 parent) 523 parent)
524 (when (get-text-property (line-beginning-position) 'mh-expanded) 524 (when (get-text-property (mh-line-beginning-position) 'mh-expanded)
525 (mh-speed-toggle)) 525 (mh-speed-toggle))
526 (when parent-change 526 (when parent-change
527 (speedbar-with-writable 527 (speedbar-with-writable
528 (mh-speedbar-change-expand-button-char parent-change) 528 (mh-speedbar-change-expand-button-char parent-change)
529 (add-text-properties 529 (add-text-properties
530 (line-beginning-position) (1+ (line-beginning-position)) 530 (mh-line-beginning-position) (1+ (mh-line-beginning-position))
531 `(mh-children-p ,(equal parent-change ?+))))) 531 `(mh-children-p ,(equal parent-change ?+)))))
532 (mh-speed-highlight mh-speed-last-selected-folder 'mh-speedbar-folder) 532 (mh-speed-highlight mh-speed-last-selected-folder 'mh-speedbar-folder)
533 (setq mh-speed-last-selected-folder nil) 533 (setq mh-speed-last-selected-folder nil)
@@ -541,7 +541,7 @@ be handled next."
541 "Change the expansion button character to CHAR for the current line." 541 "Change the expansion button character to CHAR for the current line."
542 (save-excursion 542 (save-excursion
543 (beginning-of-line) 543 (beginning-of-line)
544 (if (re-search-forward "\\[.\\]" (line-end-position) t) 544 (if (re-search-forward "\\[.\\]" (mh-line-end-position) t)
545 (speedbar-with-writable 545 (speedbar-with-writable
546 (backward-char 2) 546 (backward-char 2)
547 (delete-char 1) 547 (delete-char 1)
@@ -573,9 +573,9 @@ The function invalidates the latest ancestor that is present."
573 (speedbar-with-writable 573 (speedbar-with-writable
574 (mh-speedbar-change-expand-button-char ?+) 574 (mh-speedbar-change-expand-button-char ?+)
575 (add-text-properties 575 (add-text-properties
576 (line-beginning-position) (1+ (line-beginning-position)) 576 (mh-line-beginning-position) (1+ (mh-line-beginning-position))
577 `(mh-children-p t))) 577 `(mh-children-p t)))
578 (when (get-text-property (line-beginning-position) 'mh-expanded) 578 (when (get-text-property (mh-line-beginning-position) 'mh-expanded)
579 (mh-speed-toggle)) 579 (mh-speed-toggle))
580 (setq mh-speed-refresh-flag t)))) 580 (setq mh-speed-refresh-flag t))))
581 581
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el
index fa9719985a9..0686b10ac26 100644
--- a/lisp/mh-e/mh-thread.el
+++ b/lisp/mh-e/mh-thread.el
@@ -296,7 +296,7 @@ at the end."
296 (while (not (eobp)) 296 (while (not (eobp))
297 (forward-char address-start-offset) 297 (forward-char address-start-offset)
298 (unless (equal (string-match spaces (buffer-substring-no-properties 298 (unless (equal (string-match spaces (buffer-substring-no-properties
299 (point) (line-end-position))) 299 (point) (mh-line-end-position)))
300 0) 300 0)
301 (beginning-of-line) 301 (beginning-of-line)
302 (backward-char) 302 (backward-char)
@@ -456,9 +456,9 @@ are the same containers."
456If optional argument STRING is given then that is assumed to be 456If optional argument STRING is given then that is assumed to be
457the scan line. Otherwise uses the line at point as the scan line 457the scan line. Otherwise uses the line at point as the scan line
458to parse." 458to parse."
459 (let* ((string (or string 459 (let* ((string (or string (buffer-substring-no-properties
460 (buffer-substring-no-properties (line-beginning-position) 460 (mh-line-beginning-position)
461 (line-end-position)))) 461 (mh-line-end-position))))
462 (address-start (+ mh-cmd-note mh-scan-field-from-start-offset)) 462 (address-start (+ mh-cmd-note mh-scan-field-from-start-offset))
463 (body-start (+ mh-cmd-note mh-scan-field-from-end-offset)) 463 (body-start (+ mh-cmd-note mh-scan-field-from-end-offset))
464 (first-string (substring string 0 address-start))) 464 (first-string (substring string 0 address-start)))
@@ -599,18 +599,20 @@ Only information about messages in MSG-LIST are added to the tree."
599 (while (not (eobp)) 599 (while (not (eobp))
600 (block process-message 600 (block process-message
601 (let* ((index-line 601 (let* ((index-line
602 (prog1 (buffer-substring (point) (line-end-position)) 602 (prog1 (buffer-substring (point) (mh-line-end-position))
603 (forward-line))) 603 (forward-line)))
604 (index (string-to-number index-line)) 604 (index (string-to-number index-line))
605 (id (prog1 (buffer-substring (point) (line-end-position)) 605 (id (prog1 (buffer-substring (point) (mh-line-end-position))
606 (forward-line))) 606 (forward-line)))
607 (refs (prog1 (buffer-substring (point) (line-end-position)) 607 (refs (prog1
608 (buffer-substring (point) (mh-line-end-position))
608 (forward-line))) 609 (forward-line)))
609 (in-reply-to (prog1 (buffer-substring (point) 610 (in-reply-to (prog1 (buffer-substring (point)
610 (line-end-position)) 611 (mh-line-end-position))
611 (forward-line))) 612 (forward-line)))
612 (subject (prog1 613 (subject (prog1
613 (buffer-substring (point) (line-end-position)) 614 (buffer-substring
615 (point) (mh-line-end-position))
614 (forward-line))) 616 (forward-line)))
615 (subject-re-p nil)) 617 (subject-re-p nil))
616 (unless (gethash index mh-thread-scan-line-map) 618 (unless (gethash index mh-thread-scan-line-map)
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index ebf07a77672..20b239189fa 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -31,6 +31,10 @@
31;;; Code: 31;;; Code:
32 32
33(require 'mh-e) 33(require 'mh-e)
34(mh-do-in-gnu-emacs
35 (require 'tool-bar))
36(mh-do-in-xemacs
37 (require 'toolbar))
34 38
35;;; Tool Bar Commands 39;;; Tool Bar Commands
36 40
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index b34ff8ee5b6..42f11376262 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -68,7 +68,7 @@ used in lieu of `search' in the CL package."
68(defun mh-colors-available-p () 68(defun mh-colors-available-p ()
69 "Check if colors are available in the Emacs being used." 69 "Check if colors are available in the Emacs being used."
70 (or mh-xemacs-flag 70 (or mh-xemacs-flag
71 (let ((color-cells (display-color-cells))) 71 (let ((color-cells (mh-display-color-cells)))
72 (and (numberp color-cells) (>= color-cells 8))))) 72 (and (numberp color-cells) (>= color-cells 8)))))
73 73
74;;;###mh-autoload 74;;;###mh-autoload
@@ -81,30 +81,49 @@ used in lieu of `search' in the CL package."
81 "Delete the next LINES lines." 81 "Delete the next LINES lines."
82 (delete-region (point) (progn (forward-line lines) (point)))) 82 (delete-region (point) (progn (forward-line lines) (point))))
83 83
84(defvar mh-image-load-path-called-flag nil) 84(defvar mh-image-load-path nil
85 "Directory where images for MH-E are found.
86If nil, then the function `mh-image-load-path' will search for
87the images in \"../../etc/images\" relative to the files in
88\"lisp/mh-e\".")
89
90(defvar mh-image-load-path-called-flag nil
91 "Non-nil means that the function `mh-image-load-path' has been called.
92This variable is used by that function to avoid doing the work repeatedly.")
85 93
86;;;###mh-autoload 94;;;###mh-autoload
87(defun mh-image-load-path () 95(defun mh-image-load-path ()
88 "Ensure that the MH-E images are accessible by `find-image'. 96 "Ensure that the MH-E images are accessible by `find-image'.
89Images for MH-E are found in ../../etc/images relative to the 97
90files in \"lisp/mh-e\". If `image-load-path' exists (since Emacs 98Images for MH-E are found in \"../../etc/images\" relative to the
9122), then the images directory is added to it if isn't already 99files in \"lisp/mh-e\". This function saves the actual location
92there. Otherwise, the images directory is added to the 100found in the variable `mh-image-load-path'. If the images on your
93`load-path' if it isn't already there." 101system are actually located elsewhere, then set the variable
102`mh-image-load-path' before starting MH-E.
103
104If `image-load-path' exists (since Emacs 22), then the contents
105of the variable `mh-image-load-path' is added to it if isn't
106already there. Otherwise, the contents of the variable
107`mh-image-load-path' is added to the `load-path' if it isn't
108already there.
109
110See also variable `mh-image-load-path-called-flag'."
94 (unless mh-image-load-path-called-flag 111 (unless mh-image-load-path-called-flag
95 (let (mh-library-name mh-image-load-path) 112 (if (or (not mh-image-load-path)
96 ;; First, find mh-e in the load-path. 113 (not (file-exists-p mh-image-load-path)))
97 (setq mh-library-name (locate-library "mh-e")) 114 (let (mh-library-name)
98 (if (not mh-library-name) 115 ;; First, find mh-e in the load-path.
99 (error "Can not find MH-E in load-path")) 116 (setq mh-library-name (locate-library "mh-e"))
100 (setq mh-image-load-path 117 (if (not mh-library-name)
101 (expand-file-name (concat (file-name-directory mh-library-name) 118 (error "Can not find MH-E in load-path"))
102 "../../etc/images"))) 119 (setq mh-image-load-path
103 (if (not (file-exists-p mh-image-load-path)) 120 (expand-file-name (concat (file-name-directory mh-library-name)
104 (error "Can not find image directory %s" mh-image-load-path)) 121 "../../etc/images")))))
105 (if (boundp 'image-load-path) 122 (if (not (file-exists-p mh-image-load-path))
106 (add-to-list 'image-load-path mh-image-load-path) 123 (error "Can not find image directory %s" mh-image-load-path))
107 (add-to-list 'load-path mh-image-load-path))) 124 (if (boundp 'image-load-path)
125 (add-to-list 'image-load-path mh-image-load-path)
126 (add-to-list 'load-path mh-image-load-path))
108 (setq mh-image-load-path-called-flag t))) 127 (setq mh-image-load-path-called-flag t)))
109 128
110;;;###mh-autoload 129;;;###mh-autoload
@@ -502,8 +521,8 @@ not be returned."
502 ;; top-level folders; otherwise mh-sub-folders returns all the 521 ;; top-level folders; otherwise mh-sub-folders returns all the
503 ;; files in / if given an empty string or +. 522 ;; files in / if given an empty string or +.
504 (when folder 523 (when folder
505 (setq folder (replace-regexp-in-string "^\+" "" folder)) 524 (setq folder (mh-replace-regexp-in-string "^\+" "" folder))
506 (setq folder (replace-regexp-in-string "/*$" "/" folder)) 525 (setq folder (mh-replace-regexp-in-string "/*$" "/" folder))
507 (if (equal folder "") 526 (if (equal folder "")
508 (setq folder nil))) 527 (setq folder nil)))
509 (loop for f in (mh-sub-folders folder) do 528 (loop for f in (mh-sub-folders folder) do
@@ -553,9 +572,10 @@ directories that aren't usually mail folders are hidden."
553 (apply #'call-process arg-list) 572 (apply #'call-process arg-list)
554 (goto-char (point-min)) 573 (goto-char (point-min))
555 (while (not (and (eolp) (bolp))) 574 (while (not (and (eolp) (bolp)))
556 (goto-char (line-end-position)) 575 (goto-char (mh-line-end-position))
557 (let ((start-pos (line-beginning-position)) 576 (let ((start-pos (mh-line-beginning-position))
558 (has-pos (search-backward " has " (line-beginning-position) t))) 577 (has-pos (search-backward " has "
578 (mh-line-beginning-position) t)))
559 (when (integerp has-pos) 579 (when (integerp has-pos)
560 (while (equal (char-after has-pos) ? ) 580 (while (equal (char-after has-pos) ? )
561 (decf has-pos)) 581 (decf has-pos))
@@ -570,7 +590,7 @@ directories that aren't usually mail folders are hidden."
570 (setq name (substring name 0 (1- (length name))))) 590 (setq name (substring name 0 (1- (length name)))))
571 (push 591 (push
572 (cons name 592 (cons name
573 (search-forward "(others)" (line-end-position) t)) 593 (search-forward "(others)" (mh-line-end-position) t))
574 results)))) 594 results))))
575 (forward-line 1)))) 595 (forward-line 1))))
576 (setq results (nreverse results)) 596 (setq results (nreverse results))
@@ -927,10 +947,12 @@ is hidden, if positive then the field is displayed."
927 (unwind-protect 947 (unwind-protect
928 (cond ((or (and (not arg) 948 (cond ((or (and (not arg)
929 (text-property-any begin end 'invisible 'vanish)) 949 (text-property-any begin end 'invisible 'vanish))
930 (and (numberp arg) (>= arg 0)) 950 (and (numberp arg)
931 (and (eq arg 'long) (> (line-beginning-position 5) end))) 951 (>= arg 0))
952 (and (eq arg 'long)
953 (> (mh-line-beginning-position 5) end)))
932 (remove-text-properties begin end '(invisible nil)) 954 (remove-text-properties begin end '(invisible nil))
933 (search-forward ":" (line-end-position) t) 955 (search-forward ":" (mh-line-end-position) t)
934 (mh-letter-skip-leading-whitespace-in-header-field)) 956 (mh-letter-skip-leading-whitespace-in-header-field))
935 ;; XXX Redesign to make usable by user. Perhaps use a positive 957 ;; XXX Redesign to make usable by user. Perhaps use a positive
936 ;; numeric prefix to make that many lines visible. 958 ;; numeric prefix to make that many lines visible.
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el
index 1854e7adda0..c07faa4ca63 100644
--- a/lisp/net/newsticker.el
+++ b/lisp/net/newsticker.el
@@ -1,6 +1,6 @@
1;;; newsticker.el --- A Newsticker for Emacs. 1;;; newsticker.el --- A Newsticker for Emacs.
2 2
3;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; This file is part of GNU Emacs. 5;; This file is part of GNU Emacs.
6 6
@@ -397,7 +397,7 @@
397 397
398(defvar newsticker--retrieval-timer-list nil 398(defvar newsticker--retrieval-timer-list nil
399 "List of timers for news retrieval. 399 "List of timers for news retrieval.
400This is an alist, each element consisting of (feed-name . timer)") 400This is an alist, each element consisting of (feed-name . timer).")
401 401
402(defvar newsticker--display-timer nil 402(defvar newsticker--display-timer nil
403 "Timer for newsticker display.") 403 "Timer for newsticker display.")
@@ -485,8 +485,8 @@ This list is fed into defcustom via `newsticker--splicer'.")
485(defun newsticker--set-customvar (symbol value) 485(defun newsticker--set-customvar (symbol value)
486 "Set newsticker-variable SYMBOL value to VALUE. 486 "Set newsticker-variable SYMBOL value to VALUE.
487 487
488Calls all necessary actions which are necessary in order to make 488Calls all actions which are necessary in order to make the new
489the new value effective. Changing `newsticker-url-list', for example, 489value effective. Changing `newsticker-url-list', for example,
490will re-start the retrieval-timers." 490will re-start the retrieval-timers."
491 (unless (condition-case nil 491 (unless (condition-case nil
492 (eq (symbol-value symbol) value) 492 (eq (symbol-value symbol) value)
@@ -586,7 +586,7 @@ specify as `newsticker-wget-name'.
586 586
587The START-TIME can be either a string, or nil. If it is a string it 587The START-TIME can be either a string, or nil. If it is a string it
588specifies a fixed time at which this feed shall be retrieved for the 588specifies a fixed time at which this feed shall be retrieved for the
589first time. (Examples: \"11:00pm\", \"23:00\"). If it is nil (or 589first time. (Examples: \"11:00pm\", \"23:00\".) If it is nil (or
590unspecified), this feed will be retrieved immediately after calling 590unspecified), this feed will be retrieved immediately after calling
591`newsticker-start'. 591`newsticker-start'.
592 592
@@ -940,7 +940,7 @@ or, if you use htmlr
940 (:family "helvetica" :bold t)) 940 (:family "helvetica" :bold t))
941 (((class color) (background light)) 941 (((class color) (background light))
942 (:family "helvetica" :bold t))) 942 (:family "helvetica" :bold t)))
943 "Face for old news items." 943 "Face for news items."
944 :group 'newsticker-faces) 944 :group 'newsticker-faces)
945 945
946(defface newsticker-old-item-face 946(defface newsticker-old-item-face
@@ -1041,7 +1041,7 @@ at all. If you change `newsticker-scroll-smoothly' you should also change
1041 t 1041 t
1042 "Decides whether to show immortal/non-expiring news items in the ticker. 1042 "Decides whether to show immortal/non-expiring news items in the ticker.
1043If t the echo area will not show immortal items. See also 1043If t the echo area will not show immortal items. See also
1044`newsticker-hide-old-items-in-echo-area." 1044`newsticker-hide-old-items-in-echo-area'."
1045 :type 'boolean 1045 :type 'boolean
1046 :set 'newsticker--set-customvar 1046 :set 'newsticker--set-customvar
1047 :group 'newsticker-ticker) 1047 :group 'newsticker-ticker)
@@ -1059,7 +1059,7 @@ been added between the last two retrievals."
1059 t 1059 t
1060 "Decides whether to show obsolete items items in the ticker. 1060 "Decides whether to show obsolete items items in the ticker.
1061If t the echo area will not show obsolete items. See also 1061If t the echo area will not show obsolete items. See also
1062`newsticker-hide-old-items-in-echo-area." 1062`newsticker-hide-old-items-in-echo-area'."
1063 :type 'boolean 1063 :type 'boolean
1064 :set 'newsticker--set-customvar 1064 :set 'newsticker--set-customvar
1065 :group 'newsticker-ticker) 1065 :group 'newsticker-ticker)
@@ -2376,7 +2376,7 @@ static char * visit_xpm[] = {
2376 guid 2376 guid
2377 (car (xml-node-children guid))))) 2377 (car (xml-node-children guid)))))
2378(defsubst newsticker--enclosure (item) 2378(defsubst newsticker--enclosure (item)
2379 "Return enclosure element of ITEM in the form \(...FIXME...\)or nil." 2379 "Return enclosure element of ITEM in the form \(...FIXME...\) or nil."
2380 (let ((enclosure (assoc 'enclosure (newsticker--extra item)))) 2380 (let ((enclosure (assoc 'enclosure (newsticker--extra item))))
2381 (if enclosure 2381 (if enclosure
2382 (xml-node-attributes enclosure)))) 2382 (xml-node-attributes enclosure))))
@@ -2490,7 +2490,7 @@ if newsticker has been running."
2490 2490
2491(defun newsticker-buffer-update (&optional force) 2491(defun newsticker-buffer-update (&optional force)
2492 "Update the *newsticker* buffer. 2492 "Update the *newsticker* buffer.
2493Unless FORCE is t this is donly only if necessary, i.e. when the 2493Unless FORCE is t this is done only if necessary, i.e. when the
2494*newsticker* buffer is not up-to-date." 2494*newsticker* buffer is not up-to-date."
2495 (interactive) 2495 (interactive)
2496 ;; bring cache data into proper order.... 2496 ;; bring cache data into proper order....
@@ -2584,7 +2584,7 @@ If URL is nil it is searched at point."
2584 "Show inline images in visible text ranges. 2584 "Show inline images in visible text ranges.
2585In-line images in invisible text ranges are hidden. This function 2585In-line images in invisible text ranges are hidden. This function
2586calls `w3m-toggle-inline-image'. It works only if 2586calls `w3m-toggle-inline-image'. It works only if
2587`newsticker-html-renderer' is set to `w3m-region'" 2587`newsticker-html-renderer' is set to `w3m-region'."
2588 (interactive) 2588 (interactive)
2589 (if (eq newsticker-html-renderer 'w3m-region) 2589 (if (eq newsticker-html-renderer 'w3m-region)
2590 (let ((inhibit-read-only t)) 2590 (let ((inhibit-read-only t))
@@ -3290,7 +3290,7 @@ Argument EVENT tells what has happened to the process."
3290 (newsticker--cache-replace-age newsticker--cache 3290 (newsticker--cache-replace-age newsticker--cache
3291 name-symbol 3291 name-symbol
3292 'feed 'obsolete-old) 3292 'feed 'obsolete-old)
3293 3293
3294 ;; check Atom/RSS version and call corresponding parser 3294 ;; check Atom/RSS version and call corresponding parser
3295 (condition-case error-data 3295 (condition-case error-data
3296 (if (cond 3296 (if (cond
@@ -3405,7 +3405,7 @@ Argument EVENT tells what has happened to the process."
3405(defun newsticker--parse-atom-0.3 (name time topnode) 3405(defun newsticker--parse-atom-0.3 (name time topnode)
3406 "Parse Atom 0.3 data. 3406 "Parse Atom 0.3 data.
3407Return value as well as arguments NAME, TIME, and TOPNODE are the 3407Return value as well as arguments NAME, TIME, and TOPNODE are the
3408same as in `newsticker--parse-generic-rss'." 3408same as in `newsticker--parse-atom-1.0'."
3409 (newsticker--debug-msg "Parsing Atom 0.3 feed %s" name) 3409 (newsticker--debug-msg "Parsing Atom 0.3 feed %s" name)
3410 (let (new-feed new-item) 3410 (let (new-feed new-item)
3411 (setq new-feed (newsticker--parse-generic-feed 3411 (setq new-feed (newsticker--parse-generic-feed
@@ -3613,8 +3613,8 @@ For the RSS 0.92 specification see http://backend.userland.com/rss092."
3613 3613
3614(defun newsticker--parse-rss-1.0 (name time topnode) 3614(defun newsticker--parse-rss-1.0 (name time topnode)
3615 "Parse RSS 1.0 data. 3615 "Parse RSS 1.0 data.
3616Return value as well as arguments NAME, TIME, and 3616Return value as well as arguments NAME, TIME, and TOPNODE are the
3617TOPNODE are the same as in `newsticker--parse-atom-1.0'. 3617same as in `newsticker--parse-atom-1.0'.
3618 3618
3619For the RSS 1.0 specification see http://web.resource.org/rss/1.0/spec." 3619For the RSS 1.0 specification see http://web.resource.org/rss/1.0/spec."
3620 (newsticker--debug-msg "Parsing RSS 1.0 feed %s" name) 3620 (newsticker--debug-msg "Parsing RSS 1.0 feed %s" name)
@@ -3724,9 +3724,7 @@ For the RSS 2.0 specification see http://blogs.law.harvard.edu/tech/rss."
3724 extra-elements) 3724 extra-elements)
3725 "Parse generic news feed data. 3725 "Parse generic news feed data.
3726Argument NAME gives the name of a news feed. TIME gives the 3726Argument NAME gives the name of a news feed. TIME gives the
3727system time at which the data have been retrieved. CHANNELNODE 3727system time at which the data have been retrieved.
3728is the node in the feed data which contains the description, link
3729etc. of the feed itself.
3730 3728
3731The arguments TITLE, DESC, LINK, and EXTRA-ELEMENTS give the feed's title, 3729The arguments TITLE, DESC, LINK, and EXTRA-ELEMENTS give the feed's title,
3732description, link, and extra elements resp." 3730description, link, and extra elements resp."
@@ -3966,7 +3964,7 @@ This function calls `message' with arguments STRING and ARGS, if
3966 3964
3967(defun newsticker--decode-iso8601-date (iso8601-string) 3965(defun newsticker--decode-iso8601-date (iso8601-string)
3968 "Return ISO8601-STRING in format like `decode-time'. 3966 "Return ISO8601-STRING in format like `decode-time'.
3969Converts from ISO-8601 to Emacs representation. If ISO8601-STRING 3967Converts from ISO-8601 to Emacs representation.
3970Examples: 3968Examples:
39712004-09-17T05:09:49+00:00 39692004-09-17T05:09:49+00:00
39722004-09-17T05:09+00:00 39702004-09-17T05:09+00:00
@@ -4300,10 +4298,9 @@ Keeps order of feeds as given in `newsticker-url-list' and
4300 4298
4301(defun newsticker--buffer-insert-item (item &optional feed-name-symbol) 4299(defun newsticker--buffer-insert-item (item &optional feed-name-symbol)
4302 "Insert a news item in the current buffer. 4300 "Insert a news item in the current buffer.
4303Insert the string PREFIX and a formatted representation of the 4301Insert a formatted representation of the ITEM. The optional parameter
4304ITEM. The optional parameter FEED-NAME-SYMBOL determines how the 4302FEED-NAME-SYMBOL determines how the item is formatted and whether the
4305item is formatted and whether the item-retrieval time is added as 4303item-retrieval time is added as well."
4306well."
4307 ;; insert headline 4304 ;; insert headline
4308 (if (eq (newsticker--age item) 'feed) 4305 (if (eq (newsticker--age item) 'feed)
4309 (newsticker--buffer-do-insert-text item 'feed feed-name-symbol) 4306 (newsticker--buffer-do-insert-text item 'feed feed-name-symbol)
@@ -4831,11 +4828,11 @@ backwards."
4831 (goto-char pos)) 4828 (goto-char pos))
4832 pos)) 4829 pos))
4833 4830
4834(defun newsticker--buffer-hideshow (mark-age onoff ) 4831(defun newsticker--buffer-hideshow (mark-age onoff)
4835 "Hide or show items of type MARK-AGE. 4832 "Hide or show items of type MARK-AGE.
4836If ONOFF is nil the item is hidden, otherwise it is shown." 4833If ONOFF is nil the item is hidden, otherwise it is shown."
4837 (if onoff 4834 (if onoff
4838 (remove-from-invisibility-spec mark-age ) 4835 (remove-from-invisibility-spec mark-age)
4839 (add-to-invisibility-spec mark-age))) 4836 (add-to-invisibility-spec mark-age)))
4840 4837
4841(defun newsticker--buffer-beginning-of-item () 4838(defun newsticker--buffer-beginning-of-item ()
@@ -5026,7 +5023,7 @@ GUID. In general all properties must match in order to return a
5026certain item, except for the following cases. 5023certain item, except for the following cases.
5027 5024
5028If AGE equals 'feed the TITLE, DESCription and LINK do not 5025If AGE equals 'feed the TITLE, DESCription and LINK do not
5029matter. If DESC is nil it is ignored as well. If 5026matter. If DESC is nil it is ignored as well. If
5030`newsticker-desc-comp-max' is non-nil, only the first 5027`newsticker-desc-comp-max' is non-nil, only the first
5031`newsticker-desc-comp-max' characters of DESC are taken into 5028`newsticker-desc-comp-max' characters of DESC are taken into
5032account. 5029account.
@@ -5252,7 +5249,7 @@ FEED is a symbol!"
5252;; ====================================================================== 5249;; ======================================================================
5253(defun newsticker--stat-num-items (feed &optional age) 5250(defun newsticker--stat-num-items (feed &optional age)
5254 "Return number of items in the given FEED which have the given AGE. 5251 "Return number of items in the given FEED which have the given AGE.
5255If AGE is nil, the total number items is returned." 5252If AGE is nil, the total number of items is returned."
5256 (let ((items (cdr (newsticker--cache-get-feed feed))) 5253 (let ((items (cdr (newsticker--cache-get-feed feed)))
5257 (num 0)) 5254 (num 0))
5258 (while items 5255 (while items
@@ -5329,7 +5326,8 @@ for an entry that matches FEED and ITEM."
5329 newsticker-auto-mark-filter-list))) 5326 newsticker-auto-mark-filter-list)))
5330 5327
5331(defun newsticker--do-run-auto-mark-filter (item list) 5328(defun newsticker--do-run-auto-mark-filter (item list)
5332 "Actually compare ITEM AGE LIST against `newsticker-auto-mark-filter-list'." 5329 "Actually compare ITEM against the pattern-LIST
5330\(from `newsticker-auto-mark-filter-list')."
5333 (mapc (lambda (pattern) 5331 (mapc (lambda (pattern)
5334 (let ((age (nth 0 pattern)) 5332 (let ((age (nth 0 pattern))
5335 (place (nth 1 pattern)) 5333 (place (nth 1 pattern))
@@ -5384,8 +5382,8 @@ in the description=contents of ITEM to the directory
5384(defun newsticker-download-enclosures (feed item) 5382(defun newsticker-download-enclosures (feed item)
5385 "In all FEEDs download the enclosed object of the news ITEM. 5383 "In all FEEDs download the enclosed object of the news ITEM.
5386The object is saved to the directory \"~/tmp/newsticker/FEED/TITLE\", which 5384The object is saved to the directory \"~/tmp/newsticker/FEED/TITLE\", which
5387is created if it does not exist. TITLE is the title of the news 5385is created if it does not exist. TITLE is the title of the news
5388item. Argument FEED is ignored. 5386item. Argument FEED is ignored.
5389This function is suited for adding it to `newsticker-new-item-functions'." 5387This function is suited for adding it to `newsticker-new-item-functions'."
5390 (let ((title (newsticker--title item)) 5388 (let ((title (newsticker--title item))
5391 (enclosure (newsticker--enclosure item))) 5389 (enclosure (newsticker--enclosure item)))
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index ca007554267..2e512ae4e19 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -92,7 +92,7 @@ Each element looks like (SERVER-REGEXP . CHANNEL-LIST)."
92 92
93(defcustom rcirc-fill-column nil 93(defcustom rcirc-fill-column nil
94 "*Column beyond which automatic line-wrapping should happen. 94 "*Column beyond which automatic line-wrapping should happen.
95If nil, use value of `fill-column'. If frame-width, use the 95If nil, use value of `fill-column'. If 'frame-width, use the
96maximum frame width." 96maximum frame width."
97 :type '(choice (const :tag "Value of `fill-column'") 97 :type '(choice (const :tag "Value of `fill-column'")
98 (const :tag "Full frame width" frame-width) 98 (const :tag "Full frame width" frame-width)
@@ -128,7 +128,7 @@ Used as the first arg to `format-time-string'."
128 :group 'rcirc) 128 :group 'rcirc)
129 129
130(defcustom rcirc-read-only-flag t 130(defcustom rcirc-read-only-flag t
131 "*Non-nil means make text in irc buffers read-only." 131 "*Non-nil means make text in IRC buffers read-only."
132 :type 'boolean 132 :type 'boolean
133 :group 'rcirc) 133 :group 'rcirc)
134 134
@@ -167,7 +167,7 @@ See also `rcirc-authinfo-file-name'."
167 :group 'rcirc) 167 :group 'rcirc)
168 168
169(defcustom rcirc-prompt "> " 169(defcustom rcirc-prompt "> "
170 "Prompt string to use in irc buffers. 170 "Prompt string to use in IRC buffers.
171 171
172The following replacements are made: 172The following replacements are made:
173%n is your nick. 173%n is your nick.
@@ -354,7 +354,7 @@ last ping."
354 "If non-nil, write information to `rcirc-debug-buffer'.") 354 "If non-nil, write information to `rcirc-debug-buffer'.")
355(defun rcirc-debug (process text) 355(defun rcirc-debug (process text)
356 "Add an entry to the debug log including PROCESS and TEXT. 356 "Add an entry to the debug log including PROCESS and TEXT.
357Debug text is written to `rcirc-debug-buffer' if `rcirc-debug-p' 357Debug text is written to `rcirc-debug-buffer' if `rcirc-debug-flag'
358is non-nil." 358is non-nil."
359 (when rcirc-debug-flag 359 (when rcirc-debug-flag
360 (save-excursion 360 (save-excursion
@@ -401,8 +401,8 @@ Functions are called with PROCESS and SENTINEL arguments.")
401 ps)) 401 ps))
402 402
403(defvar rcirc-receive-message-hooks nil 403(defvar rcirc-receive-message-hooks nil
404 "Hook functions run when a message is recieved from server. 404 "Hook functions run when a message is received from server.
405Function is called with PROCESS COMMAND SENDER ARGS and LINE.") 405Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
406(defun rcirc-filter (process output) 406(defun rcirc-filter (process output)
407 "Called when PROCESS receives OUTPUT." 407 "Called when PROCESS receives OUTPUT."
408 (rcirc-debug process output) 408 (rcirc-debug process output)
@@ -587,7 +587,7 @@ If buffer is nil, return the target of the current buffer."
587(define-key global-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer) 587(define-key global-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer)
588 588
589(defvar rcirc-browse-url-map (make-sparse-keymap) 589(defvar rcirc-browse-url-map (make-sparse-keymap)
590 "Keymap used ror browsing URLs in `rcirc-mode'.") 590 "Keymap used for browsing URLs in `rcirc-mode'.")
591 591
592(define-key rcirc-browse-url-map (kbd "RET") 'rcirc-browse-url-at-point) 592(define-key rcirc-browse-url-map (kbd "RET") 'rcirc-browse-url-at-point)
593(define-key rcirc-browse-url-map (kbd "<mouse-2>") 'rcirc-browse-url-at-mouse) 593(define-key rcirc-browse-url-map (kbd "<mouse-2>") 'rcirc-browse-url-at-mouse)
@@ -599,7 +599,7 @@ If buffer is nil, return the target of the current buffer."
599 "Hook run when setting up rcirc buffer.") 599 "Hook run when setting up rcirc buffer.")
600 600
601(defun rcirc-mode (process target) 601(defun rcirc-mode (process target)
602 "Major mode for irc channel buffers. 602 "Major mode for IRC channel buffers.
603 603
604\\{rcirc-mode-map}" 604\\{rcirc-mode-map}"
605 (kill-all-local-variables) 605 (kill-all-local-variables)
@@ -722,7 +722,7 @@ If ALL is non-nil, update prompts in all IRC buffers."
722 722
723(defun rcirc-generate-new-buffer-name (process target) 723(defun rcirc-generate-new-buffer-name (process target)
724 "Return a buffer name based on PROCESS and TARGET. 724 "Return a buffer name based on PROCESS and TARGET.
725This is used for the initial name given to irc buffers." 725This is used for the initial name given to IRC buffers."
726 (if target 726 (if target
727 (concat target "@" (process-name process)) 727 (concat target "@" (process-name process))
728 (concat "*" (process-name process) "*"))) 728 (concat "*" (process-name process) "*")))
@@ -985,7 +985,7 @@ record activity."
985 1)) ; [ 985 1)) ; [
986 (t 3)) ; *** 986 (t 3)) ; ***
987 1) 987 1)
988 ? ))) 988 ?\s)))
989 (fill-column (cond ((eq rcirc-fill-column 'frame-width) 989 (fill-column (cond ((eq rcirc-fill-column 'frame-width)
990 (1- (frame-width))) 990 (1- (frame-width)))
991 (rcirc-fill-column 991 (rcirc-fill-column
@@ -1046,7 +1046,7 @@ record activity."
1046 process sender response target text))))) 1046 process sender response target text)))))
1047 1047
1048(defun rcirc-startup-channels (server) 1048(defun rcirc-startup-channels (server)
1049 "Return the list of startup channels for server." 1049 "Return the list of startup channels for SERVER."
1050 (let (channels) 1050 (let (channels)
1051 (dolist (i rcirc-startup-channels-alist) 1051 (dolist (i rcirc-startup-channels-alist)
1052 (if (string-match (car i) server) 1052 (if (string-match (car i) server)
@@ -1127,8 +1127,8 @@ record activity."
1127 (sort nicks (lambda (x y) (time-less-p (cdr y) (cdr x)))))))) 1127 (sort nicks (lambda (x y) (time-less-p (cdr y) (cdr x))))))))
1128 1128
1129(defun rcirc-ignore-update-automatic (nick) 1129(defun rcirc-ignore-update-automatic (nick)
1130 "Remove NICK from `rcirc-ignore-list' 1130 "Remove NICK from `rcirc-ignore-list'
1131if NICK is also on `rcirc-ignore-list-automatic'." 1131if NICK is also on `rcirc-ignore-list-automatic'."
1132 (when (member nick rcirc-ignore-list-automatic) 1132 (when (member nick rcirc-ignore-list-automatic)
1133 (setq rcirc-ignore-list-automatic 1133 (setq rcirc-ignore-list-automatic
1134 (delete nick rcirc-ignore-list-automatic) 1134 (delete nick rcirc-ignore-list-automatic)
@@ -1375,14 +1375,14 @@ Also, clear the overlay arrow if the current buffer is now hidden."
1375 (when (not existing-buffer) 1375 (when (not existing-buffer)
1376 (rcirc-cmd-whois nick)))) 1376 (rcirc-cmd-whois nick))))
1377 1377
1378(defun-rcirc-command join (args) 1378(defun-rcirc-command join (channel)
1379 "Join CHANNEL." 1379 "Join CHANNEL."
1380 (interactive "sJoin channel: ") 1380 (interactive "sJoin channel: ")
1381 (let* ((channel (car (split-string args))) 1381 (let ((buffer (rcirc-get-buffer-create process
1382 (buffer (rcirc-get-buffer-create process channel))) 1382 (car (split-string channel)))))
1383 (when (not (eq (selected-window) (minibuffer-window))) 1383 (when (not (eq (selected-window) (minibuffer-window)))
1384 (funcall rcirc-switch-to-buffer-function buffer)) 1384 (funcall rcirc-switch-to-buffer-function buffer))
1385 (rcirc-send-string process (concat "JOIN " args)))) 1385 (rcirc-send-string process (concat "JOIN " channel))))
1386 1386
1387(defun-rcirc-command part (channel) 1387(defun-rcirc-command part (channel)
1388 "Part CHANNEL." 1388 "Part CHANNEL."
@@ -1486,10 +1486,10 @@ With a prefix arg, prompt for new topic."
1486 "Manage the ignore list. 1486 "Manage the ignore list.
1487Ignore NICK, unignore NICK if already ignored, or list ignored 1487Ignore NICK, unignore NICK if already ignored, or list ignored
1488nicks when no NICK is given. When listing ignored nicks, the 1488nicks when no NICK is given. When listing ignored nicks, the
1489ones added to the list automatically are marked with an asterix." 1489ones added to the list automatically are marked with an asterisk."
1490 (interactive "sToggle ignoring of nick: ") 1490 (interactive "sToggle ignoring of nick: ")
1491 (if (string= "" nick) 1491 (if (string= "" nick)
1492 (rcirc-print process (rcirc-nick process) "NOTICE" target 1492 (rcirc-print process (rcirc-nick process) "NOTICE" target
1493 (mapconcat 1493 (mapconcat
1494 (lambda (nick) 1494 (lambda (nick)
1495 (concat nick 1495 (concat nick
@@ -1511,19 +1511,19 @@ ones added to the list automatically are marked with an asterix."
1511 (propertize (or string "") 'face face 'rear-nonsticky t)) 1511 (propertize (or string "") 'face face 'rear-nonsticky t))
1512 1512
1513(defvar rcirc-url-regexp 1513(defvar rcirc-url-regexp
1514 (rx word-boundary 1514 (rx word-boundary
1515 (or "www." 1515 (or "www."
1516 (and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" "wais" 1516 (and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" "wais"
1517 "mailto") 1517 "mailto")
1518 "://" 1518 "://"
1519 (1+ (char "a-zA-Z0-9_.")) 1519 (1+ (char "a-zA-Z0-9_."))
1520 (optional ":" (1+ (char "0-9"))))) 1520 (optional ":" (1+ (char "0-9")))))
1521 (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,")) 1521 (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,"))
1522 (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;")) 1522 (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;"))
1523 "Regexp matching URL's. Set to nil to disable URL features in rcirc.") 1523 "Regexp matching URLs. Set to nil to disable URL features in rcirc.")
1524 1524
1525(defun rcirc-browse-url (&optional arg) 1525(defun rcirc-browse-url (&optional arg)
1526 "Prompt for url to browse based on urls in buffer." 1526 "Prompt for URL to browse based on URLs in buffer."
1527 (interactive) 1527 (interactive)
1528 (let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls)) 1528 (let ((completions (mapcar (lambda (x) (cons x nil)) rcirc-urls))
1529 (initial-input (car rcirc-urls)) 1529 (initial-input (car rcirc-urls))
@@ -1559,13 +1559,13 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
1559 "Return TEXT with properties added based on various patterns." 1559 "Return TEXT with properties added based on various patterns."
1560 ;; ^B 1560 ;; ^B
1561 (setq text 1561 (setq text
1562 (rcirc-map-regexp 1562 (rcirc-map-regexp
1563 (lambda (start end string) 1563 (lambda (start end string)
1564 (let ((orig-face (get-text-property start 'face string))) 1564 (let ((orig-face (get-text-property start 'face string)))
1565 (add-text-properties 1565 (add-text-properties
1566 start end 1566 start end
1567 (list 'face (if (listp orig-face) 1567 (list 'face (if (listp orig-face)
1568 (append orig-face 1568 (append orig-face
1569 (list 'bold)) 1569 (list 'bold))
1570 (list orig-face 'bold)) 1570 (list orig-face 'bold))
1571 'rear-nonsticky t) 1571 'rear-nonsticky t)
@@ -1573,7 +1573,7 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
1573 ".*?" 1573 ".*?"
1574 text)) 1574 text))
1575 ;; TODO: deal with ^_ and ^C colors sequences 1575 ;; TODO: deal with ^_ and ^C colors sequences
1576 (while (string-match "\\(.*\\)[]\\(.*\\)" text) 1576 (while (string-match "\\(.*\\)[]\\(.*\\)" text)
1577 (setq text (concat (match-string 1 text) 1577 (setq text (concat (match-string 1 text)
1578 (match-string 2 text)))) 1578 (match-string 2 text))))
1579 ;; my nick 1579 ;; my nick
@@ -1596,7 +1596,7 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
1596 (let ((orig-face (get-text-property start 'face string))) 1596 (let ((orig-face (get-text-property start 'face string)))
1597 (add-text-properties start end 1597 (add-text-properties start end
1598 (list 'face (if (listp orig-face) 1598 (list 'face (if (listp orig-face)
1599 (append orig-face 1599 (append orig-face
1600 (list 'bold)) 1600 (list 'bold))
1601 (list orig-face 'bold)) 1601 (list orig-face 'bold))
1602 'rear-nonsticky t 1602 'rear-nonsticky t
@@ -1991,7 +1991,7 @@ Passwords are read from `rcirc-authinfo-file-name' (which see)."
1991 '((((min-colors 88) (background dark)) (:foreground "cyan1")) 1991 '((((min-colors 88) (background dark)) (:foreground "cyan1"))
1992 (((background dark)) (:foreground "cyan")) 1992 (((background dark)) (:foreground "cyan"))
1993 (t (:foreground "dark blue"))) 1993 (t (:foreground "dark blue")))
1994 "The face to use to highlight prompts." 1994 "The face used to highlight prompts."
1995 :group 'rcirc-faces) 1995 :group 'rcirc-faces)
1996 1996
1997(defface rcirc-mode-line-nick 1997(defface rcirc-mode-line-nick
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 10a5dd9eedf..5ff8a0832bc 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -6766,13 +6766,14 @@ If `tramp-discard-garbage' is nil, just erase buffer."
6766 "Convert file-attributes ATTR generated by perl script or ls. 6766 "Convert file-attributes ATTR generated by perl script or ls.
6767Convert file mode bits to string and set virtual device number. 6767Convert file mode bits to string and set virtual device number.
6768Return ATTR." 6768Return ATTR."
6769 ;; Convert file mode bits to string.
6769 (unless (stringp (nth 8 attr)) 6770 (unless (stringp (nth 8 attr))
6770 ;; Convert file mode bits to string.
6771 (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr)))) 6771 (setcar (nthcdr 8 attr) (tramp-file-mode-from-int (nth 8 attr))))
6772 ;; Set file's gid change bit. 6772 ;; Set file's gid change bit. Possible only when id-format is 'integer.
6773 (setcar (nthcdr 9 attr) 6773 (when (numberp (nth 3 attr))
6774 (not (= (nth 3 attr) 6774 (setcar (nthcdr 9 attr)
6775 (tramp-get-remote-gid multi-method method user host)))) 6775 (not (= (nth 3 attr)
6776 (tramp-get-remote-gid multi-method method user host)))))
6776 ;; Set virtual device number. 6777 ;; Set virtual device number.
6777 (setcar (nthcdr 11 attr) 6778 (setcar (nthcdr 11 attr)
6778 (tramp-get-device multi-method method user host)) 6779 (tramp-get-device multi-method method user host))
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 9995b4b9156..5fa9ac09b0b 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1,7 +1,7 @@
1;;; newcomment.el --- (un)comment regions of buffers 1;;; newcomment.el --- (un)comment regions of buffers
2 2
3;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 3;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
4;; 2005 Free Software Foundation, Inc. 4;; 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Author: code extracted from Emacs-20's simple.el 6;; Author: code extracted from Emacs-20's simple.el
7;; Maintainer: Stefan Monnier <monnier@iro.umontreal.ca> 7;; Maintainer: Stefan Monnier <monnier@iro.umontreal.ca>
@@ -96,7 +96,7 @@ Major modes should set this variable.")
96 96
97;;;###autoload 97;;;###autoload
98(defcustom comment-column 32 98(defcustom comment-column 32
99 "*Column to indent right-margin comments to. 99 "Column to indent right-margin comments to.
100Each mode establishes a different default value for this variable; you 100Each mode establishes a different default value for this variable; you
101can set the value for a particular mode using that mode's hook. 101can set the value for a particular mode using that mode's hook.
102Comments might be indented to a value smaller than this in order 102Comments might be indented to a value smaller than this in order
@@ -200,7 +200,7 @@ INDENT specifies that the `comment-start' markers should not be put at the
200 200
201;;;###autoload 201;;;###autoload
202(defcustom comment-style 'plain 202(defcustom comment-style 'plain
203 "*Style to be used for `comment-region'. 203 "Style to be used for `comment-region'.
204See `comment-styles' for a list of available styles." 204See `comment-styles' for a list of available styles."
205 :type (if (boundp 'comment-styles) 205 :type (if (boundp 'comment-styles)
206 `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles)) 206 `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles))
@@ -220,7 +220,7 @@ makes the comment easier to read. Default is 1. nil means 0."
220 220
221;;;###autoload 221;;;###autoload
222(defcustom comment-multi-line nil 222(defcustom comment-multi-line nil
223 "*Non-nil means `comment-indent-new-line' continues comments. 223 "Non-nil means `comment-indent-new-line' continues comments.
224That is, it inserts no new terminator or starter. 224That is, it inserts no new terminator or starter.
225This affects `auto-fill-mode', which is the main reason to 225This affects `auto-fill-mode', which is the main reason to
226customize this variable. 226customize this variable.
@@ -1081,7 +1081,8 @@ If the region is active and `transient-mark-mode' is on, call
1081 case it calls `uncomment-region'). 1081 case it calls `uncomment-region').
1082Else, if the current line is empty, insert a comment and indent it. 1082Else, if the current line is empty, insert a comment and indent it.
1083Else if a prefix ARG is specified, call `comment-kill'. 1083Else if a prefix ARG is specified, call `comment-kill'.
1084Else, call `comment-indent'." 1084Else, call `comment-indent'.
1085You can configure `comment-style' to change the way regions are commented."
1085 (interactive "*P") 1086 (interactive "*P")
1086 (comment-normalize-vars) 1087 (comment-normalize-vars)
1087 (if (and mark-active transient-mark-mode) 1088 (if (and mark-active transient-mark-mode)
diff --git a/lisp/replace.el b/lisp/replace.el
index 8a17104c599..92b4be7fd7b 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1004,7 +1004,7 @@ See also `multi-occur'."
1004 (let* ((default (car regexp-history)) 1004 (let* ((default (car regexp-history))
1005 (input 1005 (input
1006 (read-from-minibuffer 1006 (read-from-minibuffer
1007 (if allbufs 1007 (if current-prefix-arg
1008 "List lines in buffers whose names match regexp: " 1008 "List lines in buffers whose names match regexp: "
1009 "List lines in buffers whose filenames match regexp: ") 1009 "List lines in buffers whose filenames match regexp: ")
1010 nil 1010 nil
@@ -1016,7 +1016,7 @@ See also `multi-occur'."
1016 input)) 1016 input))
1017 (occur-read-primary-args))) 1017 (occur-read-primary-args)))
1018 (when bufregexp 1018 (when bufregexp
1019 (occur-1 regexp nlines 1019 (occur-1 regexp nil
1020 (delq nil 1020 (delq nil
1021 (mapcar (lambda (buf) 1021 (mapcar (lambda (buf)
1022 (when (if allbufs 1022 (when (if allbufs
diff --git a/lisp/savehist.el b/lisp/savehist.el
index ef75369c761..6c6d936af6a 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -1,6 +1,6 @@
1;;; savehist.el --- Save minibuffer history. 1;;; savehist.el --- Save minibuffer history.
2 2
3;; Copyright (C) 1997,2005 Free Software Foundation 3;; Copyright (C) 1997, 2005 Free Software Foundation
4 4
5;; Author: Hrvoje Niksic <hniksic@xemacs.org> 5;; Author: Hrvoje Niksic <hniksic@xemacs.org>
6;; Keywords: minibuffer 6;; Keywords: minibuffer
@@ -171,7 +171,7 @@ buffer text.")
171 171
172(defvar savehist-loaded nil 172(defvar savehist-loaded nil
173 "Whether the history has already been loaded. 173 "Whether the history has already been loaded.
174This prevents toggling savehist-mode from destroying existing 174This prevents toggling `savehist-mode' from destroying existing
175minibuffer history.") 175minibuffer history.")
176 176
177(when (featurep 'xemacs) 177(when (featurep 'xemacs)
@@ -226,9 +226,9 @@ which is probably undesirable."
226Don't call this from new code, use (savehist-mode 1) instead. 226Don't call this from new code, use (savehist-mode 1) instead.
227 227
228This function loads the variables stored in `savehist-file' and turns on 228This function loads the variables stored in `savehist-file' and turns on
229savehist-mode. If savehist-file is in the old format that doesn't record 229`savehist-mode'. If `savehist-file' is in the old format that doesn't
230the value of `savehist-minibuffer-history-variables', that value is 230record the value of `savehist-minibuffer-history-variables', that value
231deducted from the contents of the file." 231is deducted from the contents of the file."
232 (savehist-mode 1) 232 (savehist-mode 1)
233 ;; Old versions of savehist distributed with XEmacs didn't save 233 ;; Old versions of savehist distributed with XEmacs didn't save
234 ;; savehist-minibuffer-history-variables. If that variable is nil 234 ;; savehist-minibuffer-history-variables. If that variable is nil
@@ -250,8 +250,8 @@ deducted from the contents of the file."
250(defun savehist-install () 250(defun savehist-install ()
251 "Hook savehist into Emacs. 251 "Hook savehist into Emacs.
252Normally invoked by calling `savehist-mode' to set the minor mode. 252Normally invoked by calling `savehist-mode' to set the minor mode.
253Installs `savehist-autosave' in `kill-emacs-hook' and on a timer. To 253Installs `savehist-autosave' in `kill-emacs-hook' and on a timer.
254undo this, call `savehist-uninstall'." 254To undo this, call `savehist-uninstall'."
255 (add-hook 'minibuffer-setup-hook 'savehist-minibuffer-hook) 255 (add-hook 'minibuffer-setup-hook 'savehist-minibuffer-hook)
256 (add-hook 'kill-emacs-hook 'savehist-autosave) 256 (add-hook 'kill-emacs-hook 'savehist-autosave)
257 ;; Install an invocation of savehist-autosave on a timer. This 257 ;; Install an invocation of savehist-autosave on a timer. This
@@ -333,14 +333,14 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
333 333
334(defun savehist-autosave () 334(defun savehist-autosave ()
335 "Save the minibuffer history if it has been modified since the last save. 335 "Save the minibuffer history if it has been modified since the last save.
336Does nothing if savehist-mode is off." 336Does nothing if `savehist-mode' is off."
337 (when savehist-mode 337 (when savehist-mode
338 (savehist-save t))) 338 (savehist-save t)))
339 339
340(defun savehist-trim-history (value) 340(defun savehist-trim-history (value)
341 "Retain only the first history-length items in VALUE. 341 "Retain only the first `history-length' items in VALUE.
342Only used under XEmacs, which doesn't (yet) implement automatic 342Only used under XEmacs, which doesn't (yet) implement automatic
343trimming of history lists to history-length items." 343trimming of history lists to `history-length' items."
344 (if (and (featurep 'xemacs) 344 (if (and (featurep 'xemacs)
345 (natnump history-length) 345 (natnump history-length)
346 (> (length value) history-length)) 346 (> (length value) history-length))
diff --git a/lisp/simple.el b/lisp/simple.el
index 429428f0350..67225f07f94 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3743,7 +3743,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
3743 ;; Move to beginning-of-line, ignoring fields and invisibles. 3743 ;; Move to beginning-of-line, ignoring fields and invisibles.
3744 (skip-chars-backward "^\n") 3744 (skip-chars-backward "^\n")
3745 (while (and (not (bobp)) (line-move-invisible-p (1- (point)))) 3745 (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
3746 (goto-char (previous-char-property-change (1- (point)))) 3746 (goto-char (previous-char-property-change (point)))
3747 (skip-chars-backward "^\n")) 3747 (skip-chars-backward "^\n"))
3748 3748
3749 ;; Take care of fields. 3749 ;; Take care of fields.
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 7fd2db1deb6..ababc041099 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -1,7 +1,7 @@
1;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source 1;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source
2 2
3;; Copyright (C) 1985, 1986, 1994, 1995, 1997, 2001, 2002, 2003, 3;; Copyright (C) 1985, 1986, 1994, 1995, 1997, 2001, 2002, 2003,
4;; 2004, 2005 Free Software Foundation, Inc. 4;; 2004, 2005, 2006 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Keywords: wp 7;; Keywords: wp
@@ -86,14 +86,14 @@
86 ;; variants). This won't currently do groff's \A'foo' and 86 ;; variants). This won't currently do groff's \A'foo' and
87 ;; the like properly. One might expect it to highlight an escape's 87 ;; the like properly. One might expect it to highlight an escape's
88 ;; arguments in common cases, like \f. 88 ;; arguments in common cases, like \f.
89 (concat "\\\\" ; backslash 89 (concat "\\\\" ; backslash
90 "\\(" ; followed by various possibilities 90 "\\(" ; followed by various possibilities
91 (mapconcat 'identity 91 (mapconcat 'identity
92 '("[f*n]*\\[.+]" ; some groff extensions 92 '("[f*n]*\\[.+?]" ; some groff extensions
93 "(.." ; two chars after ( 93 "(.." ; two chars after (
94 "[^(\"]" ; single char escape 94 "[^(\"]" ; single char escape
95 ) "\\|") 95 ) "\\|")
96 "\\)") 96 "\\)")
97 ) 97 )
98 "Font-lock highlighting control in `nroff-mode'." 98 "Font-lock highlighting control in `nroff-mode'."
99 :group 'nroff 99 :group 'nroff
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index db8d2c94c46..6c9463fe11e 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -4076,7 +4076,7 @@ fit in the cell width the word is folded into the next line. The
4076folded location is marked by a continuation character which is 4076folded location is marked by a continuation character which is
4077specified in the variable `table-word-continuation-char'. 4077specified in the variable `table-word-continuation-char'.
4078") 4078")
4079 (help-print-return-message)))) 4079 (print-help-return-message))))
4080 4080
4081(defun *table--cell-describe-bindings () 4081(defun *table--cell-describe-bindings ()
4082 "Table cell version of `describe-bindings'." 4082 "Table cell version of `describe-bindings'."
@@ -4094,7 +4094,7 @@ key binding
4094 (key-description (car binding)) 4094 (key-description (car binding))
4095 (cdr binding)))) 4095 (cdr binding))))
4096 table-cell-bindings) 4096 table-cell-bindings)
4097 (help-print-return-message)))) 4097 (print-help-return-message))))
4098 4098
4099(defun *table--cell-dabbrev-expand (arg) 4099(defun *table--cell-dabbrev-expand (arg)
4100 "Table cell version of `dabbrev-expand'." 4100 "Table cell version of `dabbrev-expand'."
diff --git a/lisp/xml.el b/lisp/xml.el
index 5b83f4d3479..c97c8052148 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -188,62 +188,62 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
188(defvar xml-att-def-re) 188(defvar xml-att-def-re)
189(let* ((start-chars (concat "[:alpha:]:_")) 189(let* ((start-chars (concat "[:alpha:]:_"))
190 (name-chars (concat "-[:digit:]." start-chars)) 190 (name-chars (concat "-[:digit:]." start-chars))
191;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ 191 ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+
192 (whitespace "[ \t\n\r]")) 192 (whitespace "[ \t\n\r]"))
193;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] 193 ;;[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6]
194;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] 194 ;; | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF]
195;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] 195 ;; | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF]
196;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] 196 ;; | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
197 (defvar xml-name-start-char-re (concat "[" start-chars "]")) 197 (defvar xml-name-start-char-re (concat "[" start-chars "]"))
198;;[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] 198 ;;[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
199 (defvar xml-name-char-re (concat "[" name-chars "]")) 199 (defvar xml-name-char-re (concat "[" name-chars "]"))
200;;[5] Name ::= NameStartChar (NameChar)* 200 ;;[5] Name ::= NameStartChar (NameChar)*
201 (defvar xml-name-re (concat xml-name-start-char-re xml-name-char-re "*")) 201 (defvar xml-name-re (concat xml-name-start-char-re xml-name-char-re "*"))
202;;[6] Names ::= Name (#x20 Name)* 202 ;;[6] Names ::= Name (#x20 Name)*
203 (defvar xml-names-re (concat xml-name-re "\\(?: " xml-name-re "\\)*")) 203 (defvar xml-names-re (concat xml-name-re "\\(?: " xml-name-re "\\)*"))
204;;[7] Nmtoken ::= (NameChar)+ 204 ;;[7] Nmtoken ::= (NameChar)+
205 (defvar xml-nmtoken-re (concat xml-name-char-re "+")) 205 (defvar xml-nmtoken-re (concat xml-name-char-re "+"))
206;;[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)* 206 ;;[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
207 (defvar xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*")) 207 (defvar xml-nmtokens-re (concat xml-nmtoken-re "\\(?: " xml-name-re "\\)*"))
208;;[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' 208 ;;[66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
209 (defvar xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)") 209 (defvar xml-char-ref-re "\\(?:&#[0-9]+;\\|&#x[0-9a-fA-F]+;\\)")
210;;[68] EntityRef ::= '&' Name ';' 210 ;;[68] EntityRef ::= '&' Name ';'
211 (defvar xml-entity-ref (concat "&" xml-name-re ";")) 211 (defvar xml-entity-ref (concat "&" xml-name-re ";"))
212;;[69] PEReference ::= '%' Name ';' 212 ;;[69] PEReference ::= '%' Name ';'
213 (defvar xml-pe-reference-re (concat "%" xml-name-re ";")) 213 (defvar xml-pe-reference-re (concat "%" xml-name-re ";"))
214;;[67] Reference ::= EntityRef | CharRef 214 ;;[67] Reference ::= EntityRef | CharRef
215 (defvar xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)")) 215 (defvar xml-reference-re (concat "\\(?:" xml-entity-ref "\\|" xml-char-ref-re "\\)"))
216;;[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" 216 ;;[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
217 (defvar xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|" 217 (defvar xml-att-value-re (concat "\\(?:\"\\(?:[^&\"]\\|" xml-reference-re "\\)*\"\\|"
218 "'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)")) 218 "'\\(?:[^&']\\|" xml-reference-re "\\)*'\\)"))
219;;[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default] 219 ;;[56] TokenizedType ::= 'ID' [VC: ID] [VC: One ID per Element Type] [VC: ID Attribute Default]
220;; | 'IDREF' [VC: IDREF] 220 ;; | 'IDREF' [VC: IDREF]
221;; | 'IDREFS' [VC: IDREF] 221 ;; | 'IDREFS' [VC: IDREF]
222;; | 'ENTITY' [VC: Entity Name] 222 ;; | 'ENTITY' [VC: Entity Name]
223;; | 'ENTITIES' [VC: Entity Name] 223 ;; | 'ENTITIES' [VC: Entity Name]
224;; | 'NMTOKEN' [VC: Name Token] 224 ;; | 'NMTOKEN' [VC: Name Token]
225;; | 'NMTOKENS' [VC: Name Token] 225 ;; | 'NMTOKENS' [VC: Name Token]
226 (defvar xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)") 226 (defvar xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)")
227;;[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')' 227 ;;[58] NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
228 (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re 228 (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re
229 "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)")) 229 "\\(?:" whitespace "*|" whitespace "*" xml-name-re "\\)*" whitespace "*)\\)"))
230;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens] 230 ;;[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' [VC: Enumeration] [VC: No Duplicate Tokens]
231 (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re 231 (defvar xml-enumeration-re (concat "\\(?:(" whitespace "*" xml-nmtoken-re
232 "\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*" 232 "\\(?:" whitespace "*|" whitespace "*" xml-nmtoken-re "\\)*"
233 whitespace ")\\)")) 233 whitespace ")\\)"))
234;;[57] EnumeratedType ::= NotationType | Enumeration 234 ;;[57] EnumeratedType ::= NotationType | Enumeration
235 (defvar xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)")) 235 (defvar xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)"))
236;;[54] AttType ::= StringType | TokenizedType | EnumeratedType 236 ;;[54] AttType ::= StringType | TokenizedType | EnumeratedType
237;;[55] StringType ::= 'CDATA' 237 ;;[55] StringType ::= 'CDATA'
238 (defvar xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re "\\|" xml-notation-type-re"\\|" xml-enumerated-type-re "\\)")) 238 (defvar xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re "\\|" xml-notation-type-re"\\|" xml-enumerated-type-re "\\)"))
239;;[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue) 239 ;;[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
240 (defvar xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED" whitespace "\\)*" xml-att-value-re "\\)")) 240 (defvar xml-default-decl-re (concat "\\(?:#REQUIRED\\|#IMPLIED\\|\\(?:#FIXED" whitespace "\\)*" xml-att-value-re "\\)"))
241;;[53] AttDef ::= S Name S AttType S DefaultDecl 241 ;;[53] AttDef ::= S Name S AttType S DefaultDecl
242 (defvar xml-att-def-re (concat "\\(?:" whitespace "*" xml-name-re 242 (defvar xml-att-def-re (concat "\\(?:" whitespace "*" xml-name-re
243 whitespace "*" xml-att-type-re 243 whitespace "*" xml-att-type-re
244 whitespace "*" xml-default-decl-re "\\)")) 244 whitespace "*" xml-default-decl-re "\\)"))
245;;[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' 245 ;;[9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"'
246;; | "'" ([^%&'] | PEReference | Reference)* "'" 246 ;; | "'" ([^%&'] | PEReference | Reference)* "'"
247 (defvar xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re 247 (defvar xml-entity-value-re (concat "\\(?:\"\\(?:[^%&\"]\\|" xml-pe-reference-re
248 "\\|" xml-reference-re "\\)*\"\\|'\\(?:[^%&']\\|" 248 "\\|" xml-reference-re "\\)*\"\\|'\\(?:[^%&']\\|"
249 xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)"))) 249 xml-pe-reference-re "\\|" xml-reference-re "\\)*'\\)")))
@@ -269,7 +269,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
269 ;; Get space syntax correct per XML [3]. 269 ;; Get space syntax correct per XML [3].
270 (dotimes (c 31) 270 (dotimes (c 31)
271 (modify-syntax-entry c "." table)) ; all are space in standard table 271 (modify-syntax-entry c "." table)) ; all are space in standard table
272 (dolist (c '(?\t ?\n ?\r)) ; these should be space 272 (dolist (c '(?\t ?\n ?\r)) ; these should be space
273 (modify-syntax-entry c " " table)) 273 (modify-syntax-entry c " " table))
274 ;; For skipping attributes. 274 ;; For skipping attributes.
275 (modify-syntax-entry ?\" "\"" table) 275 (modify-syntax-entry ?\" "\"" table)
@@ -306,16 +306,16 @@ is not well-formed XML.
306If PARSE-DTD is non-nil, the DTD is parsed rather than skipped, 306If PARSE-DTD is non-nil, the DTD is parsed rather than skipped,
307and returned as the first element of the list. 307and returned as the first element of the list.
308If PARSE-NS is non-nil, then QNAMES are expanded." 308If PARSE-NS is non-nil, then QNAMES are expanded."
309 (save-restriction 309 ;; Use fixed syntax table to ensure regexp char classes and syntax
310 (narrow-to-region beg end) 310 ;; specs DTRT.
311 ;; Use fixed syntax table to ensure regexp char classes and syntax 311 (with-syntax-table (standard-syntax-table)
312 ;; specs DTRT. 312 (let ((case-fold-search nil) ; XML is case-sensitive.
313 (with-syntax-table (standard-syntax-table) 313 xml result dtd)
314 (let ((case-fold-search nil) ; XML is case-sensitive. 314 (save-excursion
315 xml result dtd) 315 (if buffer
316 (save-excursion 316 (set-buffer buffer))
317 (if buffer 317 (save-restriction
318 (set-buffer buffer)) 318 (narrow-to-region beg end)
319 (goto-char (point-min)) 319 (goto-char (point-min))
320 (while (not (eobp)) 320 (while (not (eobp))
321 (if (search-forward "<" nil t) 321 (if (search-forward "<" nil t)
@@ -390,7 +390,7 @@ Returns one of:
390 parse-ns 390 parse-ns
391 (if parse-ns 391 (if parse-ns
392 (list 392 (list
393 ;; Default for empty prefix is no namespace 393 ;; Default for empty prefix is no namespace
394 (cons "" "") 394 (cons "" "")
395 ;; "xml" namespace 395 ;; "xml" namespace
396 (cons "xml" "http://www.w3.org/XML/1998/namespace") 396 (cons "xml" "http://www.w3.org/XML/1998/namespace")
@@ -431,12 +431,12 @@ Returns one of:
431 431
432 ;; Parse this node 432 ;; Parse this node
433 (let* ((node-name (match-string 1)) 433 (let* ((node-name (match-string 1))
434 ;; Parse the attribute list. 434 ;; Parse the attribute list.
435 (attrs (xml-parse-attlist xml-ns)) 435 (attrs (xml-parse-attlist xml-ns))
436 children pos) 436 children pos)
437 437
438 ;; add the xmlns:* attrs to our cache 438 ;; add the xmlns:* attrs to our cache
439 (when (consp xml-ns) 439 (when (consp xml-ns)
440 (dolist (attr attrs) 440 (dolist (attr attrs)
441 (when (and (consp (car attr)) 441 (when (and (consp (car attr))
442 (equal "http://www.w3.org/2000/xmlns/" 442 (equal "http://www.w3.org/2000/xmlns/"
@@ -444,7 +444,7 @@ Returns one of:
444 (push (cons (cdar attr) (cdr attr)) 444 (push (cons (cdar attr) (cdr attr))
445 xml-ns)))) 445 xml-ns))))
446 446
447 (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns))) 447 (setq children (list attrs (xml-maybe-do-ns node-name "" xml-ns)))
448 448
449 ;; is this an empty element ? 449 ;; is this an empty element ?
450 (if (looking-at "/>") 450 (if (looking-at "/>")
@@ -494,21 +494,21 @@ Returns one of:
494 494
495(defun xml-parse-string () 495(defun xml-parse-string ()
496 "Parse the next whatever. Could be a string, or an element." 496 "Parse the next whatever. Could be a string, or an element."
497 (let* ((pos (point)) 497 (let* ((pos (point))
498 (string (progn (if (search-forward "<" nil t) 498 (string (progn (if (search-forward "<" nil t)
499 (forward-char -1) 499 (forward-char -1)
500 (goto-char (point-max))) 500 (goto-char (point-max)))
501 (buffer-substring pos (point))))) 501 (buffer-substring pos (point)))))
502 ;; Clean up the string. As per XML specifications, the XML 502 ;; Clean up the string. As per XML specifications, the XML
503 ;; processor should always pass the whole string to the 503 ;; processor should always pass the whole string to the
504 ;; application. But \r's should be replaced: 504 ;; application. But \r's should be replaced:
505 ;; http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends 505 ;; http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends
506 (setq pos 0) 506 (setq pos 0)
507 (while (string-match "\r\n?" string pos) 507 (while (string-match "\r\n?" string pos)
508 (setq string (replace-match "\n" t t string)) 508 (setq string (replace-match "\n" t t string))
509 (setq pos (1+ (match-beginning 0)))) 509 (setq pos (1+ (match-beginning 0))))
510 510
511 (xml-substitute-special string))) 511 (xml-substitute-special string)))
512 512
513(defun xml-parse-attlist (&optional xml-ns) 513(defun xml-parse-attlist (&optional xml-ns)
514 "Return the attribute-list after point. 514 "Return the attribute-list after point.
@@ -543,8 +543,8 @@ Leave point at the first non-blank character after the tag."
543 (replace-regexp-in-string "\\s-\\{2,\\}" " " string) 543 (replace-regexp-in-string "\\s-\\{2,\\}" " " string)
544 (let ((expansion (xml-substitute-special string))) 544 (let ((expansion (xml-substitute-special string)))
545 (unless (stringp expansion) 545 (unless (stringp expansion)
546 ; We say this is the constraint. It is acctually that 546 ; We say this is the constraint. It is acctually that
547 ; external entities nor "<" can be in an attribute value. 547 ; external entities nor "<" can be in an attribute value.
548 (error "XML: (Not Well-Formed) Entities in attributes cannot expand into elements")) 548 (error "XML: (Not Well-Formed) Entities in attributes cannot expand into elements"))
549 (push (cons name expansion) attlist))) 549 (push (cons name expansion) attlist)))
550 550
diff --git a/lispref/frames.texi b/lispref/frames.texi
index 4b967d8989c..8212e9325f9 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -64,6 +64,7 @@ The frame is displayed on an MS-DOS terminal.
64* Dialog Boxes:: Displaying a box to ask yes or no. 64* Dialog Boxes:: Displaying a box to ask yes or no.
65* Pointer Shapes:: Specifying the shape of the mouse pointer. 65* Pointer Shapes:: Specifying the shape of the mouse pointer.
66* Window System Selections:: Transferring text to and from other X clients. 66* Window System Selections:: Transferring text to and from other X clients.
67* Drag and Drop:: Internals of Drag-and-Drop implementation.
67* Color Names:: Getting the definitions of color names. 68* Color Names:: Getting the definitions of color names.
68* Text Terminal Colors:: Defining colors for text-only terminals. 69* Text Terminal Colors:: Defining colors for text-only terminals.
69* Resources:: Getting resource values from the server. 70* Resources:: Getting resource values from the server.
@@ -469,7 +470,7 @@ frame, or control their sizes.
469The width in pixels of the frame's border. 470The width in pixels of the frame's border.
470 471
471@item internal-border-width 472@item internal-border-width
472The distance in pixels between text and the frame's border. 473The distance in pixels between text (or fringe) and the frame's border.
473 474
474@item vertical-scroll-bars 475@item vertical-scroll-bars
475Whether the frame has scroll bars for vertical scrolling, and which side 476Whether the frame has scroll bars for vertical scrolling, and which side
@@ -1685,6 +1686,35 @@ access the clipboard at all. The default is @code{nil} on most systems,
1685but @code{t} on MS-Windows. 1686but @code{t} on MS-Windows.
1686@end defopt 1687@end defopt
1687 1688
1689@node Drag and Drop
1690@section Drag and Drop
1691
1692@vindex x-dnd-test-function
1693@vindex x-dnd-known-types
1694 When a user drags something from another application over Emacs, that other
1695application expects Emacs to tell it if Emacs can handle the data that is
1696dragged. The variable @code{x-dnd-test-function} is used by Emacs to determine
1697what to reply. The default value is @code{x-dnd-default-test-function}
1698which accepts drops if the type of the data to be dropped is present in
1699@code{x-dnd-known-types}. You can customize @code{x-dnd-test-function} and/or
1700@code{x-dnd-known-types} if you want Emacs to accept or reject drops based
1701on some other criteria.
1702
1703@vindex x-dnd-types-alist
1704 If you want to change the way Emacs handles drop of different types
1705or add a new type, customize @code{x-dnd-types-alist}. This requires
1706detailed knowledge of what types other applications use for drag and
1707drop.
1708
1709@vindex dnd-protocol-alist
1710 When an URL is dropped on Emacs it may be a file, but it may also be
1711another URL type (ftp, http, etc.). Emacs first checks
1712@code{dnd-protocol-alist} to determine what to do with the URL. If
1713there is no match there and if @code{browse-url-browser-function} is
1714an alist, Emacs looks for a match there. If no match is found the
1715text for the URL is inserted. If you want to alter Emacs behavior,
1716you can customize these variables.
1717
1688@node Color Names 1718@node Color Names
1689@section Color Names 1719@section Color Names
1690 1720
diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi
index f30fb5c9659..5a732af4ebb 100644
--- a/lispref/keymaps.texi
+++ b/lispref/keymaps.texi
@@ -22,10 +22,13 @@ found. The whole process is called @dfn{key lookup}.
22* Inheritance and Keymaps:: How one keymap can inherit the bindings 22* Inheritance and Keymaps:: How one keymap can inherit the bindings
23 of another keymap. 23 of another keymap.
24* Prefix Keys:: Defining a key with a keymap as its definition. 24* Prefix Keys:: Defining a key with a keymap as its definition.
25* Active Keymaps:: Each buffer has a local keymap 25* Active Keymaps:: How Emacs searches the active keymaps
26 for a key binding.
27* Searching Keymaps:: A pseudo-Lisp summary of searching active maps.
28* Controlling Active Maps:: Each buffer has a local keymap
26 to override the standard (global) bindings. 29 to override the standard (global) bindings.
27 A minor mode can also override them. 30 A minor mode can also override them.
28* Key Lookup:: How extracting elements from keymaps works. 31* Key Lookup:: Finding a key's binding in one keymap.
29* Functions for Key Lookup:: How to request key lookup. 32* Functions for Key Lookup:: How to request key lookup.
30* Changing Key Bindings:: Redefining a key in a keymap. 33* Changing Key Bindings:: Redefining a key in a keymap.
31* Remapping Commands:: Bindings that translate one command to another. 34* Remapping Commands:: Bindings that translate one command to another.
@@ -537,17 +540,38 @@ string for the keymap. The prompt string should be given for menu keymaps
537@cindex local keymap 540@cindex local keymap
538 541
539 Emacs normally contains many keymaps; at any given time, just a few 542 Emacs normally contains many keymaps; at any given time, just a few
540of them are @dfn{active} in that they participate in the 543of them are @dfn{active}, meaning that they participate in the
541interpretation of user input. All the active keymaps are used 544interpretation of user input. All the active keymaps are used
542together to determine what command to execute when a key is entered. 545together to determine what command to execute when a key is entered.
543Emacs searches these keymaps one by one, in a standard order, until it 546Emacs searches these keymaps one by one, in a standard order, until it
544finds a binding in one of the keymaps. (Searching a single keymap for a 547finds a binding in one of the keymaps.
545binding is called @dfn{key lookup}; see @ref{Key Lookup}.)
546 548
547 Normally the active keymaps are the @code{keymap} property keymap, 549 Normally the active keymaps are the @code{keymap} property keymap,
548the keymaps of any enabled minor modes, the current buffer's local 550the keymaps of any enabled minor modes, the current buffer's local
549keymap, and the global keymap, in that order. Therefore, Emacs 551keymap, and the global keymap, in that order. Therefore, Emacs
550searches for each input key sequence in all these keymaps. 552searches for each input key sequence in all these keymaps. Here is a
553pseudo-Lisp description of how this process works:
554
555@lisp
556(or (if overriding-terminal-local-map
557 (@var{find-in} overriding-terminal-local-map)
558 (if overriding-local-map
559 (@var{find-in} overriding-local-map)
560 (or (@var{find-in} (get-text-property (point) 'keymap))
561 (@var{find-in-any} emulation-mode-map-alists)
562 (@var{find-in-any} minor-mode-overriding-map-alist)
563 (@var{find-in-any} minor-mode-map-alist)
564 (if (get-text-property (point) 'local-map))
565 (@var{find-in} (get-text-property (point) 'local-map))
566 (@var{find-in} (current-local-map))))))
567 (@var{find-in} (current-global-map)))
568@end lisp
569
570@noindent
571Here, the pseudo-function @var{find-in} means to look up the key
572sequence in a single map, and @var{find-in-any} means to search the
573appropriate keymaps from an alist. (Searching a single keymap for a
574binding is called @dfn{key lookup}; see @ref{Key Lookup}.)
551 575
552 The @dfn{global keymap} holds the bindings of keys that are defined 576 The @dfn{global keymap} holds the bindings of keys that are defined
553regardless of the current buffer, such as @kbd{C-f}. The variable 577regardless of the current buffer, such as @kbd{C-f}. The variable
@@ -597,10 +621,92 @@ events within @code{read-key-sequence}. @xref{Translating Input}.
597 621
598 @xref{Standard Keymaps}, for a list of standard keymaps. 622 @xref{Standard Keymaps}, for a list of standard keymaps.
599 623
624@defun current-active-maps &optional olp
625This returns the list of active keymaps that would be used by the
626command loop in the current circumstances to look up a key sequence.
627Normally it ignores @code{overriding-local-map} and
628@code{overriding-terminal-local-map}, but if @var{olp} is
629non-@code{nil} then it pays attention to them.
630@end defun
631
632@defun key-binding key &optional accept-defaults no-remap
633This function returns the binding for @var{key} according to the
634current active keymaps. The result is @code{nil} if @var{key} is
635undefined in the keymaps.
636
637@c Emacs 19 feature
638The argument @var{accept-defaults} controls checking for default
639bindings, as in @code{lookup-key} (above).
640
641When commands are remapped (@pxref{Remapping Commands}),
642@code{key-binding} normally processes command remappings so as to
643returns the remapped command that will actually be executed. However,
644if @var{no-remap} is non-@code{nil}, @code{key-binding} ignores
645remappings and returns the binding directly specified for @var{key}.
646
647An error is signaled if @var{key} is not a string or a vector.
648
649@example
650@group
651(key-binding "\C-x\C-f")
652 @result{} find-file
653@end group
654@end example
655@end defun
656
657@node Searching Keymaps
658@section Searching the Active Keymaps
659
660 After translation of the input events (@pxref{Translating Input})
661Emacs looks for them in the active keymaps. Here is a pseudo-Lisp
662description of the order in which the active keymaps are searched:
663
664@lisp
665(or (if overriding-terminal-local-map
666 (@var{find-in} overriding-terminal-local-map)
667 (if overriding-local-map
668 (@var{find-in} overriding-local-map)
669 (or (@var{find-in} (get-text-property (point) 'keymap))
670 (@var{find-in-any} emulation-mode-map-alists)
671 (@var{find-in-any} minor-mode-overriding-map-alist)
672 (@var{find-in-any} minor-mode-map-alist)
673 (@var{find-in} (get-text-property (point) 'local-map))
674 (@var{find-in} (current-local-map)))))
675 (@var{find-in} (current-global-map)))
676@end lisp
677
678@noindent
679The @var{find-in} and @var{find-in-any} are pseudo functions that
680searches in one keymap respectively an alist of keymaps.
681
682@enumerate
683@item
684The function finally found may be remapped
685(@pxref{Remapping Commands}).
686
687@item
688Characters that are bound to @code{self-insert-command} are translated
689according to @code{translation-table-for-input} before insertion.
690
691@item
692@code{current-active-maps} returns a list of the
693currently active keymaps at point.
694
695@item
696When a match is found (@pxref{Key Lookup}), if the binding in the
697keymap is a function, the search is over. However if the keymap entry
698is a symbol with a value or a string, Emacs replaces the input key
699sequences with the variable's value or the string, and restarts the
700search of the active keymaps.
701@end enumerate
702
703@node Controlling Active Maps
704@section Controlling the Active Keymaps
705
600@defvar global-map 706@defvar global-map
601This variable contains the default global keymap that maps Emacs 707This variable contains the default global keymap that maps Emacs
602keyboard input to commands. The global keymap is normally this keymap. 708keyboard input to commands. The global keymap is normally this
603The default global keymap is a full keymap that binds 709keymap. The default global keymap is a full keymap that binds
604@code{self-insert-command} to all of the printing characters. 710@code{self-insert-command} to all of the printing characters.
605 711
606It is normal practice to change the bindings in the global keymap, but you 712It is normal practice to change the bindings in the global keymap, but you
@@ -763,14 +869,14 @@ are used before @code{minor-mode-map-alist} and
763@cindex keymap entry 869@cindex keymap entry
764 870
765 @dfn{Key lookup} is the process of finding the binding of a key 871 @dfn{Key lookup} is the process of finding the binding of a key
766sequence from a given keymap. Actual execution of the binding is not 872sequence from a given keymap. The execution or use of the binding is
767part of key lookup. 873not part of key lookup.
768 874
769 Key lookup uses just the event type of each event in the key sequence; 875 Key lookup uses just the event type of each event in the key sequence;
770the rest of the event is ignored. In fact, a key sequence used for key 876the rest of the event is ignored. In fact, a key sequence used for key
771lookup may designate a mouse event with just its types (a symbol) 877lookup may designate a mouse event with just its types (a symbol)
772instead of the entire event (a list). @xref{Input Events}. Such 878instead of the entire event (a list). @xref{Input Events}. Such
773a ``key-sequence'' is insufficient for @code{command-execute} to run, 879a ``key sequence'' is insufficient for @code{command-execute} to run,
774but it is sufficient for looking up or rebinding a key. 880but it is sufficient for looking up or rebinding a key.
775 881
776 When the key sequence consists of multiple events, key lookup 882 When the key sequence consists of multiple events, key lookup
@@ -965,39 +1071,6 @@ Used in keymaps to undefine keys. It calls @code{ding}, but does
965not cause an error. 1071not cause an error.
966@end deffn 1072@end deffn
967 1073
968@defun key-binding key &optional accept-defaults no-remap
969This function returns the binding for @var{key} in the current
970keymaps, trying all the active keymaps. The result is @code{nil} if
971@var{key} is undefined in the keymaps.
972
973@c Emacs 19 feature
974The argument @var{accept-defaults} controls checking for default
975bindings, as in @code{lookup-key} (above).
976
977When commands are remapped (@pxref{Remapping Commands}),
978@code{key-binding} normally processes command remappings so as to
979returns the remapped command that will actually be executed. However,
980if @var{no-remap} is non-@code{nil}, @code{key-binding} ignores
981remappings and returns the binding directly specified for @var{key}.
982
983An error is signaled if @var{key} is not a string or a vector.
984
985@example
986@group
987(key-binding "\C-x\C-f")
988 @result{} find-file
989@end group
990@end example
991@end defun
992
993@defun current-active-maps &optional olp
994This returns the list of keymaps that would be used by the command
995loop in the current circumstances to look up a key sequence. Normally
996it ignores @code{overriding-local-map} and
997@code{overriding-terminal-local-map}, but if @var{olp} is
998non-@code{nil} then it pays attention to them.
999@end defun
1000
1001@defun local-key-binding key &optional accept-defaults 1074@defun local-key-binding key &optional accept-defaults
1002This function returns the binding for @var{key} in the current 1075This function returns the binding for @var{key} in the current
1003local keymap, or @code{nil} if it is undefined there. 1076local keymap, or @code{nil} if it is undefined there.
@@ -1036,11 +1109,11 @@ bindings, as in @code{lookup-key} (above).
1036 1109
1037@defvar meta-prefix-char 1110@defvar meta-prefix-char
1038@cindex @key{ESC} 1111@cindex @key{ESC}
1039This variable is the meta-prefix character code. It is used when 1112This variable is the meta-prefix character code. It is used for
1040translating a meta character to a two-character sequence so it can be 1113translating a meta character to a two-character sequence so it can be
1041looked up in a keymap. For useful results, the value should be a prefix 1114looked up in a keymap. For useful results, the value should be a
1042event (@pxref{Prefix Keys}). The default value is 27, which is the 1115prefix event (@pxref{Prefix Keys}). The default value is 27, which is
1043@acronym{ASCII} code for @key{ESC}. 1116the @acronym{ASCII} code for @key{ESC}.
1044 1117
1045As long as the value of @code{meta-prefix-char} remains 27, key lookup 1118As long as the value of @code{meta-prefix-char} remains 27, key lookup
1046translates @kbd{M-b} into @kbd{@key{ESC} b}, which is normally defined 1119translates @kbd{M-b} into @kbd{@key{ESC} b}, which is normally defined
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi
index 6f98785f69f..c0990bae3ee 100644
--- a/lispref/minibuf.texi
+++ b/lispref/minibuf.texi
@@ -583,6 +583,10 @@ themselves to do with minibuffers. We describe them in this chapter
583so as to keep them near the higher-level completion features that do 583so as to keep them near the higher-level completion features that do
584use the minibuffer. 584use the minibuffer.
585 585
586 If you store a completion alist in a variable, you should mark the
587variable as ``risky'' with a non-@code{nil}
588@code{risky-local-variable} property.
589
586@defun try-completion string collection &optional predicate 590@defun try-completion string collection &optional predicate
587This function returns the longest common substring of all possible 591This function returns the longest common substring of all possible
588completions of @var{string} in @var{collection}. The value of 592completions of @var{string} in @var{collection}. The value of
diff --git a/man/ChangeLog b/man/ChangeLog
index e7c90d400bc..d4923434daf 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,67 @@
12006-02-03 Eli Zaretskii <eliz@gnu.org>
2
3 * custom.texi (Init File, Find Init): Add cross-references to
4 where $HOME is described.
5
62006-02-01 Luc Teirlinck <teirllm@auburn.edu>
7
8 * frames.texi (Frame Parameters): Remove @item for S-Mouse-1; it
9 is not inside the @table.
10
11 * emacs.texi (Top): Correct node name.
12
13 * files.texi (File Names): Fix @xref.
14 (Reverting): Fix typo.
15
16 * mule.texi (International): Correct node name.
17
18 * kmacro.texi (Save Keyboard Macro): Add missing @kbd to @table.
19
202006-02-01 Richard M. Stallman <rms@gnu.org>
21
22 * emacs.texi (Top): Update subnode menu.
23
24 * mule.texi: Minor clarifications.
25 Reduce the specific references to X Windows.
26 Refer to "graphical" terminals, rather than window systems.
27 (Text Coding): Renamed from Specify Coding.
28 (Communication Coding, File Name Coding, Terminal Coding):
29 New nodes split out from Text Coding.
30
31 * kmacro.texi: Minor clarifications.
32 (Keyboard Macro Ring): Comment out some excessive commands.
33 (Basic Keyboard Macro): Split up the table, putting part in each node.
34
35 * major.texi: Minor clarifications.
36
37 * misc.texi (Single Shell, Interactive Shell): Fix xrefs.
38
39 * windows.texi: Minor clarifications.
40 (Change Window): Don't describe mode-line mouse cmds here.
41 Add xref to Mode Line Mouse.
42
43 * msdog.texi (Text and Binary, MS-DOS and MULE): Fix xrefs.
44
45 * macos.texi (Mac International): Fix xref.
46
47 * indent.texi: Minor clarifications.
48
49 * frames.texi: Minor clarifications.
50 Reduce the specific references to X Windows.
51 Refer to "graphical" terminals, rather than window systems.
52 (Frame Parameters): Don't mention commands like
53 set-foreground-color. Just say to customize a face.
54 (Drag and Drop): Lisp-level stuff moved to Emacs Lisp manual.
55
56 * files.texi: Minor clarifications.
57 (Numbered Backups): New node, split out from Backup Names.
58
59 * display.texi (Font Lock): C mode no longer depends on (-in-col-0.
60
61 * cmdargs.texi (General Variables): Fix xref.
62
63 * buffers.texi: Minor clarifications.
64
12006-01-31 Romain Francoise <romain@orebokech.com> 652006-01-31 Romain Francoise <romain@orebokech.com>
2 66
3 * message.texi (Message Headers): Explain what 67 * message.texi (Message Headers): Explain what
diff --git a/man/buffers.texi b/man/buffers.texi
index 3e4b311bd50..a8e23086f79 100644
--- a/man/buffers.texi
+++ b/man/buffers.texi
@@ -87,8 +87,8 @@ selected buffer other than the current buffer.
87@findex switch-to-buffer 87@findex switch-to-buffer
88 To select the buffer named @var{bufname}, type @kbd{C-x b @var{bufname} 88 To select the buffer named @var{bufname}, type @kbd{C-x b @var{bufname}
89@key{RET}}. This runs the command @code{switch-to-buffer} with argument 89@key{RET}}. This runs the command @code{switch-to-buffer} with argument
90@var{bufname}. You can use completion on an abbreviation for the buffer 90@var{bufname}. You can use completion to enter the buffer
91name you want (@pxref{Completion}). An empty argument to @kbd{C-x b} 91name (@pxref{Completion}). An empty argument to @kbd{C-x b}
92specifies the buffer that was current most recently among those not 92specifies the buffer that was current most recently among those not
93now displayed in any window. 93now displayed in any window.
94 94
@@ -128,7 +128,7 @@ customizing the variables @code{special-display-buffer-names},
128@ref{Special Buffer Frames}, for more about these variables. In 128@ref{Special Buffer Frames}, for more about these variables. In
129addition, if the value of @code{display-buffer-reuse-frames} is 129addition, if the value of @code{display-buffer-reuse-frames} is
130non-@code{nil}, and the buffer you want to switch to is already 130non-@code{nil}, and the buffer you want to switch to is already
131displayed in some frame, Emacs will raise that frame. 131displayed in some frame, Emacs will just raise that frame.
132 132
133 Most buffers are created by visiting files, or by Emacs commands that 133 Most buffers are created by visiting files, or by Emacs commands that
134want to display some text, but you can also create a buffer explicitly 134want to display some text, but you can also create a buffer explicitly
@@ -177,10 +177,11 @@ line in the list shows one buffer's name, major mode and visited file.
177The buffers are listed in the order that they were current; the 177The buffers are listed in the order that they were current; the
178buffers that were current most recently come first. 178buffers that were current most recently come first.
179 179
180 @samp{*} in the first field of a line indicates the buffer is ``modified.'' 180 @samp{*} in the first field of a line indicates the buffer is
181If several buffers are modified, it may be time to save some with @kbd{C-x s} 181``modified.'' If several buffers are modified, it may be time to save
182(@pxref{Save Commands}). @samp{%} indicates a read-only buffer. @samp{.} marks the 182some with @kbd{C-x s} (@pxref{Save Commands}). @samp{%} indicates a
183current buffer. Here is an example of a buffer list:@refill 183read-only buffer. @samp{.} marks the current buffer. Here is an
184example of a buffer list:@refill
184 185
185@smallexample 186@smallexample
186CRM Buffer Size Mode File 187CRM Buffer Size Mode File
@@ -199,7 +200,7 @@ CRM Buffer Size Mode File
199Note that the buffer @samp{*Help*} was made by a help request; it is 200Note that the buffer @samp{*Help*} was made by a help request; it is
200not visiting any file. The buffer @code{src} was made by Dired on the 201not visiting any file. The buffer @code{src} was made by Dired on the
201directory @file{~/cvs/emacs/src/}. You can list only buffers that are 202directory @file{~/cvs/emacs/src/}. You can list only buffers that are
202visiting files by giving the command a prefix; for instance, by typing 203visiting files by giving the command a prefix argument, as in
203@kbd{C-u C-x C-b}. 204@kbd{C-u C-x C-b}.
204 205
205 @code{list-buffers} omits buffers whose names begin with a space, 206 @code{list-buffers} omits buffers whose names begin with a space,
@@ -243,10 +244,10 @@ flag, but it also checks the file in or out. @xref{Version
243Control}. 244Control}.
244 245
245@findex rename-buffer 246@findex rename-buffer
246 @kbd{M-x rename-buffer} changes the name of the current buffer. Specify 247 @kbd{M-x rename-buffer} changes the name of the current buffer. You
247the new name as a minibuffer argument. There is no default. If you 248specify the new name as a minibuffer argument; there is no default.
248specify a name that is in use for some other buffer, an error happens and 249If you specify a name that is in use for some other buffer, an error
249no renaming is done. 250happens and no renaming is done.
250 251
251@findex rename-uniquely 252@findex rename-uniquely
252 @kbd{M-x rename-uniquely} renames the current buffer to a similar 253 @kbd{M-x rename-uniquely} renames the current buffer to a similar
@@ -274,7 +275,7 @@ your perusal remain in effect.
274 275
275 The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer} 276 The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
276can be used to copy text from one buffer to another. @xref{Accumulating 277can be used to copy text from one buffer to another. @xref{Accumulating
277Text}.@refill 278Text}.
278 279
279@node Kill Buffer 280@node Kill Buffer
280@section Killing Buffers 281@section Killing Buffers
@@ -470,17 +471,15 @@ you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select
470the buffer list manually, you can use all of the commands described 471the buffer list manually, you can use all of the commands described
471here. 472here.
472 473
473 Normally, the buffer @samp{*Buffer List*} is not updated automatically when 474 Normally, the buffer @samp{*Buffer List*} is not updated
474buffers are created and killed; its contents are just text. If you have 475automatically when buffers are created and killed; its contents are
475created, deleted or renamed buffers, the way to update @samp{*Buffer 476just text. If you have created, deleted or renamed buffers, the way
476List*} to show what you have done is to type @kbd{g} 477to update @samp{*Buffer List*} to show what you have done is to type
477(@code{revert-buffer}) or repeat the @code{buffer-menu} command. 478@kbd{g} (@code{revert-buffer}). You can make this happen regularly
478 479every @code{auto-revert-interval} seconds if you enable Auto Revert
479 The @samp{*Buffer List*} buffer does automatically update every 480mode in this buffer, as long as it is not marked modified. Global
480@code{auto-revert-interval} seconds if you enable Auto Revert mode in 481Auto Revert mode applies to the @samp{*Buffer List*} buffer only if
481it. (As long as it is not marked modified.) Global Auto Revert mode 482@code{global-auto-revert-non-file-buffers} is non-@code{nil}.
482does not update the @samp{*Buffer List*} buffer by default, but it
483does if @code{global-auto-revert-non-file-buffers} is non-@code{nil}.
484@inforef{Autorevert,, emacs-xtra}, for details. 483@inforef{Autorevert,, emacs-xtra}, for details.
485 484
486 The command @code{buffer-menu-other-window} works the same as 485 The command @code{buffer-menu-other-window} works the same as
@@ -589,7 +588,7 @@ forward order after the file name, as in @samp{file|top/middle}.
589name is not very important if you are going to @emph{look} at the 588name is not very important if you are going to @emph{look} at the
590buffer names before you type one. But as an experienced user, if you 589buffer names before you type one. But as an experienced user, if you
591know the rule, you won't have to look. And then you may find that one 590know the rule, you won't have to look. And then you may find that one
592rule or another is easier for you to remember and utilize fast. 591rule or another is easier for you to remember and apply quickly.
593 592
594@node Iswitchb 593@node Iswitchb
595@subsection Switching Between Buffers using Substrings 594@subsection Switching Between Buffers using Substrings
diff --git a/man/cmdargs.texi b/man/cmdargs.texi
index 28cb567f0cd..74de707cd2c 100644
--- a/man/cmdargs.texi
+++ b/man/cmdargs.texi
@@ -577,8 +577,7 @@ does not use @env{TZ} at all.
577The user's login name. See also @env{LOGNAME}. On MS-DOS, this 577The user's login name. See also @env{LOGNAME}. On MS-DOS, this
578defaults to @samp{root}. 578defaults to @samp{root}.
579@item VERSION_CONTROL 579@item VERSION_CONTROL
580Used to initialize the @code{version-control} variable (@pxref{Backup 580Used to initialize the @code{version-control} variable (@pxref{Numbered Backups}).
581Names}).
582@end table 581@end table
583 582
584@node Misc Variables 583@node Misc Variables
diff --git a/man/custom.texi b/man/custom.texi
index 509a63a4de2..d10c8aeca2e 100644
--- a/man/custom.texi
+++ b/man/custom.texi
@@ -2029,8 +2029,9 @@ Reference Manual}.
2029@cindex startup (init file) 2029@cindex startup (init file)
2030 2030
2031 When Emacs is started, it normally loads a Lisp program from the 2031 When Emacs is started, it normally loads a Lisp program from the
2032file @file{.emacs} or @file{.emacs.el} in your home directory. We 2032file @file{.emacs} or @file{.emacs.el} in your home directory
2033call this file your @dfn{init file} because it specifies how to 2033(see @ref{General Variables, HOME} if you don't know where that is).
2034We call this file your @dfn{init file} because it specifies how to
2034initialize Emacs for you. You can use the command line switch 2035initialize Emacs for you. You can use the command line switch
2035@samp{-q} to prevent loading your init file, and @samp{-u} (or 2036@samp{-q} to prevent loading your init file, and @samp{-u} (or
2036@samp{--user}) to specify a different user's init file (@pxref{Initial 2037@samp{--user}) to specify a different user's init file (@pxref{Initial
@@ -2442,11 +2443,12 @@ library. @xref{Hooks}.
2442@node Find Init 2443@node Find Init
2443@subsection How Emacs Finds Your Init File 2444@subsection How Emacs Finds Your Init File
2444 2445
2445 Normally Emacs uses the environment variable @env{HOME} to find 2446 Normally Emacs uses the environment variable @env{HOME}
2446@file{.emacs}; that's what @samp{~} means in a file name. If 2447(@pxref{General Variables, HOME}) to find @file{.emacs}; that's what
2447@file{.emacs} is not found inside @file{~/} (nor @file{.emacs.el}), 2448@samp{~} means in a file name. If @file{.emacs} is not found inside
2448Emacs looks for @file{~/.emacs.d/init.el} (which, like 2449@file{~/} (nor @file{.emacs.el}), Emacs looks for
2449@file{~/.emacs.el}, can be byte-compiled). 2450@file{~/.emacs.d/init.el} (which, like @file{~/.emacs.el}, can be
2451byte-compiled).
2450 2452
2451 However, if you run Emacs from a shell started by @code{su}, Emacs 2453 However, if you run Emacs from a shell started by @code{su}, Emacs
2452tries to find your own @file{.emacs}, not that of the user you are 2454tries to find your own @file{.emacs}, not that of the user you are
diff --git a/man/display.texi b/man/display.texi
index 37edc372fa0..1f359f9e5aa 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -557,13 +557,13 @@ buffer fontification is suppressed.
557@cindex brace in column zero and fontification 557@cindex brace in column zero and fontification
558 Comment and string fontification (or ``syntactic'' fontification) 558 Comment and string fontification (or ``syntactic'' fontification)
559relies on analysis of the syntactic structure of the buffer text. For 559relies on analysis of the syntactic structure of the buffer text. For
560the sake of speed, some modes, including C mode and Lisp mode, 560the sake of speed, some modes, including Lisp mode, rely on a special
561rely on a special convention: an open-parenthesis or open-brace in the 561convention: an open-parenthesis or open-brace in the leftmost column
562leftmost column always defines the @w{beginning} of a defun, and is 562always defines the @w{beginning} of a defun, and is thus always
563thus always outside any string or comment. (@xref{Left Margin 563outside any string or comment. (@xref{Left Margin Paren}.) If you
564Paren}.) If you don't follow this convention, Font Lock mode can 564don't follow this convention, Font Lock mode can misfontify the text
565misfontify the text that follows an open-parenthesis or open-brace in 565that follows an open-parenthesis or open-brace in the leftmost column
566the leftmost column that is inside a string or comment. 566that is inside a string or comment.
567 567
568@cindex slow display during scrolling 568@cindex slow display during scrolling
569 The variable @code{font-lock-beginning-of-syntax-function} (always 569 The variable @code{font-lock-beginning-of-syntax-function} (always
diff --git a/man/emacs.texi b/man/emacs.texi
index ddd0660c41d..5fb9af71c43 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -460,7 +460,11 @@ International Character Set Support
460* Coding Systems:: Character set conversion when you read and 460* Coding Systems:: Character set conversion when you read and
461 write files, and so on. 461 write files, and so on.
462* Recognize Coding:: How Emacs figures out which conversion to use. 462* Recognize Coding:: How Emacs figures out which conversion to use.
463* Specify Coding:: Various ways to choose which conversion to use. 463* Text Coding:: Choosing conversion to use for file text.
464* Communication Coding:: Coding systems for interprocess communication.
465* File Name Coding:: Coding systems for file @emph{names}.
466* Terminal Coding:: Specifying coding systems for converting
467 terminal input and output.
464* Fontsets:: Fontsets are collections of fonts 468* Fontsets:: Fontsets are collections of fonts
465 that cover the whole spectrum of characters. 469 that cover the whole spectrum of characters.
466* Defining Fontsets:: Defining a new fontset. 470* Defining Fontsets:: Defining a new fontset.
diff --git a/man/files.texi b/man/files.texi
index 7b08fc5c791..6edf938261a 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -68,21 +68,22 @@ a slash, it is interpreted with respect to the default directory. The
68default directory is kept in the variable @code{default-directory}, 68default directory is kept in the variable @code{default-directory},
69which has a separate value in every buffer. 69which has a separate value in every buffer.
70 70
71 For example, if the default file name is @file{/u/rms/gnu/gnu.tasks} then
72the default directory is @file{/u/rms/gnu/}. If you type just @samp{foo},
73which does not specify a directory, it is short for @file{/u/rms/gnu/foo}.
74@samp{../.login} would stand for @file{/u/rms/.login}. @samp{new/foo}
75would stand for the file name @file{/u/rms/gnu/new/foo}.
76
77@findex cd 71@findex cd
78@findex pwd 72@findex pwd
79 The command @kbd{M-x pwd} displays the current buffer's default 73 The command @kbd{M-x pwd} displays the current buffer's default
80directory, and the command @kbd{M-x cd} sets it (to a value read using 74directory, and the command @kbd{M-x cd} sets it (to a value read using
81the minibuffer). A buffer's default directory changes only when the 75the minibuffer). A buffer's default directory changes only when the
82@code{cd} command is used. A file-visiting buffer's default directory 76@code{cd} command is used. A file-visiting buffer's default directory
83is initialized to the directory of the file that is visited in that buffer. If 77is initialized to the directory of the file it visits. If you create
84you create a buffer with @kbd{C-x b}, its default directory is copied 78a buffer with @kbd{C-x b}, its default directory is copied from that
85from that of the buffer that was current at the time. 79of the buffer that was current at the time.
80
81 For example, if the default file name is @file{/u/rms/gnu/gnu.tasks}
82then the default directory is normally @file{/u/rms/gnu/}. If you
83type just @samp{foo}, which does not specify a directory, it is short
84for @file{/u/rms/gnu/foo}. @samp{../.login} would stand for
85@file{/u/rms/.login}. @samp{new/foo} would stand for the file name
86@file{/u/rms/gnu/new/foo}.
86 87
87@vindex insert-default-directory 88@vindex insert-default-directory
88 The default directory actually appears in the minibuffer when the 89 The default directory actually appears in the minibuffer when the
@@ -102,6 +103,14 @@ with @samp{/usr/tmp/} and you add @samp{/x1/rms/foo}, you get
102first slash in the double slash; the result is @samp{/x1/rms/foo}. 103first slash in the double slash; the result is @samp{/x1/rms/foo}.
103@xref{Minibuffer File}. 104@xref{Minibuffer File}.
104 105
106@cindex home directory shorthand
107 You can use @file{~/} in a file name to mean your home directory,
108or @file{~@var{user-id}/} to mean the home directory of a user whose
109login name is @code{user-id}. (On DOS and Windows systems, where a user
110doesn't have a home directory, Emacs substitutes @file{~/} with the
111value of the environment variable @code{HOME}; see @ref{General
112Variables}.)
113
105@cindex environment variables in file names 114@cindex environment variables in file names
106@cindex expansion of environment variables 115@cindex expansion of environment variables
107@cindex @code{$} in file names 116@cindex @code{$} in file names
@@ -120,14 +129,6 @@ is not defined).
120 Note that shell commands to set environment variables affect Emacs 129 Note that shell commands to set environment variables affect Emacs
121only when done before Emacs is started. 130only when done before Emacs is started.
122 131
123@cindex home directory shorthand
124 You can use @file{~/} in a file name to mean your home directory,
125or @file{~@var{user-id}/} to mean the home directory of a user whose
126login name is @code{user-id}. (On DOS and Windows systems, where a user
127doesn't have a home directory, Emacs substitutes @file{~/} with the
128value of the environment variable @code{HOME}; see @ref{General
129Variables}.)
130
131 To access a file with @samp{$} in its name, if the @samp{$} causes 132 To access a file with @samp{$} in its name, if the @samp{$} causes
132expansion, type @samp{$$}. This pair is converted to a single 133expansion, type @samp{$$}. This pair is converted to a single
133@samp{$} at the same time as variable substitution is performed for a 134@samp{$} at the same time as variable substitution is performed for a
@@ -136,13 +137,13 @@ single @samp{$}. Alternatively, quote the whole file name with
136literal @samp{~} should also be quoted with @samp{/:}. 137literal @samp{~} should also be quoted with @samp{/:}.
137 138
138@findex substitute-in-file-name 139@findex substitute-in-file-name
139 The Lisp function that performs the substitution is called 140 The Lisp function that performs the @samp{$}-substitution is called
140@code{substitute-in-file-name}. The substitution is performed only on 141@code{substitute-in-file-name}. The substitution is performed only on
141file names read as such using the minibuffer. 142file names read as such using the minibuffer.
142 143
143 You can include non-@acronym{ASCII} characters in file names if you set the 144 You can include non-@acronym{ASCII} characters in file names if you set the
144variable @code{file-name-coding-system} to a non-@code{nil} value. 145variable @code{file-name-coding-system} to a non-@code{nil} value.
145@xref{Specify Coding}. 146@xref{File Name Coding}.
146 147
147@node Visiting 148@node Visiting
148@section Visiting Files 149@section Visiting Files
@@ -185,7 +186,7 @@ in that window, so you can always tell what buffer you are editing.
185 186
186 The changes you make with editing commands are made in the Emacs 187 The changes you make with editing commands are made in the Emacs
187buffer. They do not take effect in the file that you visited, or any 188buffer. They do not take effect in the file that you visited, or any
188place permanent, until you @dfn{save} the buffer. Saving the buffer 189permanent place, until you @dfn{save} the buffer. Saving the buffer
189means that Emacs writes the current contents of the buffer into its 190means that Emacs writes the current contents of the buffer into its
190visited file. @xref{Saving}. 191visited file. @xref{Saving}.
191 192
@@ -208,17 +209,17 @@ While in the minibuffer, you can abort @kbd{C-x C-f} by typing
208@kbd{C-g}. File-name completion ignores certain filenames; for more 209@kbd{C-g}. File-name completion ignores certain filenames; for more
209about this, see @ref{Completion Options}. 210about this, see @ref{Completion Options}.
210 211
211 Your confirmation that @kbd{C-x C-f} has completed successfully is the 212 Your confirmation that @kbd{C-x C-f} has completed successfully is
212appearance of new text on the screen and a new buffer name in the mode 213the appearance of new text on the screen and a new buffer name in the
213line. If the specified file does not exist and could not be created, or 214mode line. If the specified file does not exist and you could not
214cannot be read, then you get an error, with an error message displayed 215create it, or exists but you can't read it, then you get an error,
215in the echo area. 216with an error message displayed in the echo area.
216 217
217 If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make 218 If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make
218another copy. It selects the existing buffer containing that file. 219another copy. It selects the existing buffer containing that file.
219However, before doing so, it checks that the file itself has not changed 220However, before doing so, it checks whether the file itself has changed
220since you visited or saved it last. If the file has changed, a warning 221since you visited or saved it last. If the file has changed, Emacs offers
221message is shown. @xref{Interlocking,,Simultaneous Editing}. 222to reread it.
222 223
223@vindex large-file-warning-threshold 224@vindex large-file-warning-threshold
224@cindex maximum buffer size exceeded, error message 225@cindex maximum buffer size exceeded, error message
@@ -232,7 +233,7 @@ buffer size, which is around 256 megabytes on 32-bit machines
232saying that the maximum buffer size has been exceeded. 233saying that the maximum buffer size has been exceeded.
233 234
234@cindex file selection dialog 235@cindex file selection dialog
235 On graphical terminals, there are two additional methods for 236 On graphical displays there are two additional methods for
236visiting files. Firstly, when Emacs is built with a suitable GUI 237visiting files. Firstly, when Emacs is built with a suitable GUI
237toolkit, commands invoked with the mouse (by clicking on the menu bar 238toolkit, commands invoked with the mouse (by clicking on the menu bar
238or tool bar) use the toolkit's standard File Selection dialog instead 239or tool bar) use the toolkit's standard File Selection dialog instead
@@ -313,9 +314,6 @@ buffer (after first offering to save it if it is modified). When
313default file name in the buffer, with point just after the directory 314default file name in the buffer, with point just after the directory
314part; this is convenient if you made a slight error in typing the name. 315part; this is convenient if you made a slight error in typing the name.
315 316
316 If you find a file which exists but cannot be read, @kbd{C-x C-f}
317signals an error.
318
319@kindex C-x 4 f 317@kindex C-x 4 f
320@findex find-file-other-window 318@findex find-file-other-window
321 @kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f} 319 @kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f}
@@ -392,7 +390,7 @@ Save any or all buffers in their visited files (@code{save-some-buffers}).
392Forget that the current buffer has been changed (@code{not-modified}). 390Forget that the current buffer has been changed (@code{not-modified}).
393With prefix argument (@kbd{C-u}), mark the current buffer as changed. 391With prefix argument (@kbd{C-u}), mark the current buffer as changed.
394@item C-x C-w 392@item C-x C-w
395Save the current buffer as a specified file name (@code{write-file}). 393Save the current buffer with a specified file name (@code{write-file}).
396@item M-x set-visited-file-name 394@item M-x set-visited-file-name
397Change the file name under which the current buffer will be saved. 395Change the file name under which the current buffer will be saved.
398@end table 396@end table
@@ -464,9 +462,9 @@ saved. (@samp{~} is often used as a mathematical symbol for `not'; thus
464a different file name, one which is not in use for anything important. 462a different file name, one which is not in use for anything important.
465Alternatively, you can cancel all the changes made since the file was 463Alternatively, you can cancel all the changes made since the file was
466visited or saved, by reading the text from the file again. This is 464visited or saved, by reading the text from the file again. This is
467called @dfn{reverting}. @xref{Reverting}. You could also undo all the 465called @dfn{reverting}. @xref{Reverting}. (You could also undo all the
468changes by repeating the undo command @kbd{C-x u} until you have undone 466changes by repeating the undo command @kbd{C-x u} until you have undone
469all the changes; but reverting is easier. 467all the changes; but reverting is easier.) You can also kill the buffer.
470 468
471@findex set-visited-file-name 469@findex set-visited-file-name
472 @kbd{M-x set-visited-file-name} alters the name of the file that the 470 @kbd{M-x set-visited-file-name} alters the name of the file that the
@@ -522,6 +520,9 @@ to make backup files. By default it is @code{nil}, since backup files
522are redundant when you store all the previous versions in a version 520are redundant when you store all the previous versions in a version
523control system. @xref{General VC Options}. 521control system. @xref{General VC Options}.
524 522
523 At your option, Emacs can keep either a single backup for each file,
524or make a series of numbered backup files for each file that you edit.
525
525@vindex backup-enable-predicate 526@vindex backup-enable-predicate
526@vindex temporary-file-directory 527@vindex temporary-file-directory
527@vindex small-temporary-file-directory 528@vindex small-temporary-file-directory
@@ -530,9 +531,6 @@ prevents backup files being written for files in the directories used
530for temporary files, specified by @code{temporary-file-directory} or 531for temporary files, specified by @code{temporary-file-directory} or
531@code{small-temporary-file-directory}. 532@code{small-temporary-file-directory}.
532 533
533 At your option, Emacs can keep either a single backup file or a series of
534numbered backup files for each file that you edit.
535
536 Emacs makes a backup for a file only the first time the file is saved 534 Emacs makes a backup for a file only the first time the file is saved
537from one buffer. No matter how many times you save a file, its backup file 535from one buffer. No matter how many times you save a file, its backup file
538continues to contain the contents from before the file was visited. 536continues to contain the contents from before the file was visited.
@@ -550,19 +548,54 @@ backup from the previous contents, and arranges to make another from the
550newly saved contents if you save again. 548newly saved contents if you save again.
551 549
552@menu 550@menu
553* Names: Backup Names. How backup files are named; 551* One or Many: Numbered Backups. Whether to make one backup file or many.
554 choosing single or numbered backup files. 552* Names: Backup Names. How backup files are named.
555* Deletion: Backup Deletion. Emacs deletes excess numbered backups. 553* Deletion: Backup Deletion. Emacs deletes excess numbered backups.
556* Copying: Backup Copying. Backups can be made by copying or renaming. 554* Copying: Backup Copying. Backups can be made by copying or renaming.
557@end menu 555@end menu
558 556
557@node Numbered Backups
558@subsubsection Numbered Backups
559
560@vindex version-control
561 The choice of single backup file or multiple numbered backup files
562is controlled by the variable @code{version-control}. Its possible
563values are:
564
565@table @code
566@item t
567Make numbered backups.
568@item nil
569Make numbered backups for files that have numbered backups already.
570Otherwise, make single backups.
571@item never
572Never make numbered backups; always make single backups.
573@end table
574
575@noindent
576The usual way to set this variable is globally, through your
577@file{.emacs} file or the customization buffer. However, you can set
578@code{version-control} locally in an individual buffer to control the
579making of backups for that buffer's file. For example, Rmail mode
580locally sets @code{version-control} to @code{never} to make sure that
581there is only one backup for an Rmail file. @xref{Locals}.
582
583@cindex @env{VERSION_CONTROL} environment variable
584 If you set the environment variable @env{VERSION_CONTROL}, to tell
585various GNU utilities what to do with backup files, Emacs also obeys the
586environment variable by setting the Lisp variable @code{version-control}
587accordingly at startup. If the environment variable's value is @samp{t}
588or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
589value is @samp{nil} or @samp{existing}, then @code{version-control}
590becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
591@code{version-control} becomes @code{never}.
592
559@node Backup Names 593@node Backup Names
560@subsubsection Single or Numbered Backups 594@subsubsection Single or Numbered Backups
561 595
562 If you choose to have a single backup file (this is the default), 596 When Emacs makes a single backup file, its name is normally
563the backup file's name is normally constructed by appending @samp{~} to the 597constructed by appending @samp{~} to the file name being edited; thus,
564file name being edited; thus, the backup file for @file{eval.c} would 598the backup file for @file{eval.c} would be @file{eval.c~}.
565be @file{eval.c~}.
566 599
567@vindex make-backup-file-name-function 600@vindex make-backup-file-name-function
568@vindex backup-directory-alist 601@vindex backup-directory-alist
@@ -593,36 +626,6 @@ through names like @file{eval.c.~259~} and beyond. The variable
593@code{backup-directory-alist} applies to numbered backups just as 626@code{backup-directory-alist} applies to numbered backups just as
594usual. 627usual.
595 628
596@vindex version-control
597 The choice of single backup or numbered backups is controlled by the
598variable @code{version-control}. Its possible values are
599
600@table @code
601@item t
602Make numbered backups.
603@item nil
604Make numbered backups for files that have numbered backups already.
605Otherwise, make single backups.
606@item never
607Never make numbered backups; always make single backups.
608@end table
609
610@noindent
611You can set @code{version-control} locally in an individual buffer to
612control the making of backups for that buffer's file. For example,
613Rmail mode locally sets @code{version-control} to @code{never} to make sure
614that there is only one backup for an Rmail file. @xref{Locals}.
615
616@cindex @env{VERSION_CONTROL} environment variable
617 If you set the environment variable @env{VERSION_CONTROL}, to tell
618various GNU utilities what to do with backup files, Emacs also obeys the
619environment variable by setting the Lisp variable @code{version-control}
620accordingly at startup. If the environment variable's value is @samp{t}
621or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
622value is @samp{nil} or @samp{existing}, then @code{version-control}
623becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
624@code{version-control} becomes @code{never}.
625
626@node Backup Deletion 629@node Backup Deletion
627@subsubsection Automatic Deletion of Backups 630@subsubsection Automatic Deletion of Backups
628 631
@@ -822,6 +825,7 @@ different name, and use @code{diff} to compare the two files.@refill
822@subsection Shadowing Files 825@subsection Shadowing Files
823@cindex shadow files 826@cindex shadow files
824@cindex file shadows 827@cindex file shadows
828@findex shadow-initialize
825 829
826@table @kbd 830@table @kbd
827@item M-x shadow-initialize 831@item M-x shadow-initialize
@@ -867,7 +871,6 @@ shadow-define-cluster}.
867 871
868@node Time Stamps 872@node Time Stamps
869@subsection Updating Time Stamps Automatically 873@subsection Updating Time Stamps Automatically
870@findex time-stamp
871@cindex time stamps 874@cindex time stamps
872@cindex modification dates 875@cindex modification dates
873@cindex locale, date format 876@cindex locale, date format
@@ -888,6 +891,7 @@ or like this:
888Time-stamp: " " 891Time-stamp: " "
889@end example 892@end example
890 893
894@findex time-stamp
891 Then add the hook function @code{time-stamp} to the hook 895 Then add the hook function @code{time-stamp} to the hook
892@code{before-save-hook}; that hook function will automatically update 896@code{before-save-hook}; that hook function will automatically update
893the time stamp, inserting the current date and time when you save the 897the time stamp, inserting the current date and time when you save the
@@ -946,24 +950,26 @@ discard your changes.)
946 You may find it useful to have Emacs revert files automatically when 950 You may find it useful to have Emacs revert files automatically when
947they change. Three minor modes are available to do this. 951they change. Three minor modes are available to do this.
948 952
949 @kbd{M-x global-auto-revert-mode} runs Global Auto-Revert mode, 953 @kbd{M-x global-auto-revert-mode} enables Global Auto-Revert mode,
950which periodically checks all file buffers and reverts when the 954which periodically checks all file buffers and reverts when the
951corresponding file has changed. @kbd{M-x auto-revert-mode} runs a 955corresponding file has changed. @kbd{M-x auto-revert-mode} enables a
952local version, Auto-Revert mode, which applies only to the buffer in 956local version, Auto-Revert mode, which applies only to the current
953which it was activated. Auto-Revert mode can be used to ``tail'' a 957buffer.
954file, such as a system log, so that changes made to that file by other 958
955programs are continuously displayed. To do this, just move the point 959 You can use Auto-Revert mode to ``tail'' a file such as a system
956to the end of the buffer, and it will stay there as the file contents 960log, so that changes made to that file by other programs are
957change. However, if you are sure that the file will only change by 961continuously displayed. To do this, just move the point to the end of
958growing at the end, you can tail the file more efficiently using 962the buffer, and it will stay there as the file contents change.
959Auto-Revert Tail mode, @kbd{M-x auto-revert-tail-mode}. 963However, if you are sure that the file will only change by growing at
964the end, use Auto-Revert Tail mode instead
965(@code{auto-revert-tail-mode}). It is more efficient for this.
960 966
961@vindex auto-revert-interval 967@vindex auto-revert-interval
962 The variable @code{auto-revert-interval} controls how often to check 968 The variable @code{auto-revert-interval} controls how often to check
963for a changed file. Since checking a remote file is too slow, these 969for a changed file. Since checking a remote file is too slow, these
964modes do not check or revert remote files. 970modes do not check or revert remote files.
965 971
966@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that 972 @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
967visit files under version control. 973visit files under version control.
968 974
969@node Auto Save 975@node Auto Save
@@ -977,13 +983,13 @@ your keystrokes) without being asked. This is called @dfn{auto-saving}.
977It prevents you from losing more than a limited amount of work if the 983It prevents you from losing more than a limited amount of work if the
978system crashes. 984system crashes.
979 985
980 When Emacs determines that it is time for auto-saving, each buffer is 986 When Emacs determines that it is time for auto-saving, it considers
981considered, and is auto-saved if auto-saving is turned on for it and it 987each buffer, and each is auto-saved if auto-saving is enabled for it
982has been changed since the last time it was auto-saved. The message 988and it has been changed since the last time it was auto-saved. The
983@samp{Auto-saving...} is displayed in the echo area during auto-saving, 989message @samp{Auto-saving...} is displayed in the echo area during
984if any files are actually auto-saved. Errors occurring during 990auto-saving, if any files are actually auto-saved. Errors occurring
985auto-saving are caught so that they do not interfere with the execution 991during auto-saving are caught so that they do not interfere with the
986of commands you have been typing. 992execution of commands you have been typing.
987 993
988@menu 994@menu
989* Files: Auto Save Files. The file where auto-saved changes are 995* Files: Auto Save Files. The file where auto-saved changes are
@@ -1041,10 +1047,10 @@ saving.
1041 1047
1042@vindex delete-auto-save-files 1048@vindex delete-auto-save-files
1043 A buffer's auto-save file is deleted when you save the buffer in its 1049 A buffer's auto-save file is deleted when you save the buffer in its
1044visited file. To inhibit this, set the variable @code{delete-auto-save-files} 1050visited file. (You can inhibit this by setting the variable
1045to @code{nil}. Changing the visited file name with @kbd{C-x C-w} or 1051@code{delete-auto-save-files} to @code{nil}.) Changing the visited
1046@code{set-visited-file-name} renames any auto-save file to go with 1052file name with @kbd{C-x C-w} or @code{set-visited-file-name} renames
1047the new visited name. 1053any auto-save file to go with the new visited name.
1048 1054
1049@node Auto Save Control 1055@node Auto Save Control
1050@subsection Controlling Auto-Saving 1056@subsection Controlling Auto-Saving
@@ -1284,9 +1290,11 @@ merging, and use of symbolic links and meta-data in repositories.
1284terms of capabilities, it is the weakest of the six that VC supports. 1290terms of capabilities, it is the weakest of the six that VC supports.
1285VC compensates for certain features missing in SCCS (snapshots, for 1291VC compensates for certain features missing in SCCS (snapshots, for
1286example) by implementing them itself, but some other VC features, such 1292example) by implementing them itself, but some other VC features, such
1287as multiple branches, are not available with SCCS. You should use 1293as multiple branches, are not available with SCCS. Since SCCS is
1288SCCS only if for some reason you cannot use RCS, or one of the 1294non-free, not respecting its users freedom,d, you should not use it;
1289higher-level systems such as CVS or GNU Arch. 1295use its free replacement CSSC instead. But you should use CSSC only
1296if for some reason you cannot use RCS, or one of the higher-level
1297systems such as CVS or GNU Arch.
1290 1298
1291In the following, we discuss mainly RCS, SCCS and CVS. Nearly 1299In the following, we discuss mainly RCS, SCCS and CVS. Nearly
1292everything said about CVS applies to GNU Arch, Subversion and Meta-CVS 1300everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
@@ -1549,13 +1557,13 @@ Version Control}).
1549 When you check in changes, @kbd{C-x v v} first reads a log entry. It 1557 When you check in changes, @kbd{C-x v v} first reads a log entry. It
1550pops up a buffer called @samp{*VC-Log*} for you to enter the log entry. 1558pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
1551 1559
1552Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it, 1560 Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
1553typically the last log message entered. If it does, mark and point 1561typically the last log message entered. If it does, mark and point
1554are set around the entire contents of the buffer so that it is easy to 1562are set around the entire contents of the buffer so that it is easy to
1555kill the contents of the buffer with @kbd{C-w}. 1563kill the contents of the buffer with @kbd{C-w}.
1556 1564
1557@findex log-edit-insert-changelog 1565@findex log-edit-insert-changelog
1558If you work by writing entries in the @file{ChangeLog} 1566 If you work by writing entries in the @file{ChangeLog}
1559(@pxref{Change Log}) and then commit the change under revision 1567(@pxref{Change Log}) and then commit the change under revision
1560control, you can generate the Log Edit text from the ChangeLog using 1568control, you can generate the Log Edit text from the ChangeLog using
1561@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for 1569@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for
@@ -1565,13 +1573,13 @@ if the top entry was made under your user name on the current date.
1565@xref{Change Logs and VC}, for the opposite way of 1573@xref{Change Logs and VC}, for the opposite way of
1566working---generating ChangeLog entries from the revision control log. 1574working---generating ChangeLog entries from the revision control log.
1567 1575
1568In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files}) 1576 In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files})
1569shows the list of files to be committed in case you need to check 1577shows the list of files to be committed in case you need to check
1570that. (This can be a list of more than one file if you use VC Dired 1578that. (This can be a list of more than one file if you use VC Dired
1571mode or PCL-CVS. @xref{VC Dired Mode}, and @ref{Top, , About PCL-CVS, 1579mode or PCL-CVS. @xref{VC Dired Mode}, and @ref{Top, , About PCL-CVS,
1572pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.) 1580pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.)
1573 1581
1574When you have finished editing the log message, type @kbd{C-c C-c} to 1582 When you have finished editing the log message, type @kbd{C-c C-c} to
1575exit the buffer and commit the change. 1583exit the buffer and commit the change.
1576 1584
1577 To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that 1585 To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that
@@ -1665,8 +1673,8 @@ them; they exist only in the records of the master file.
1665 For some backends, you can display the file @dfn{annotated} with 1673 For some backends, you can display the file @dfn{annotated} with
1666per-line version information and using colors to enhance the visual 1674per-line version information and using colors to enhance the visual
1667appearance, with the command @kbd{M-x vc-annotate}. 1675appearance, with the command @kbd{M-x vc-annotate}.
1668It creates a new buffer 1676It creates a new buffer (the ``annotate buffer'') displaying the
1669to display file's text, colored to show how old each part is. Text 1677file's text, with each part colored to show how old it is. Text
1670colored red is new, blue means old, and intermediate colors indicate 1678colored red is new, blue means old, and intermediate colors indicate
1671intermediate ages. By default, the time scale is 360 days, so that 1679intermediate ages. By default, the time scale is 360 days, so that
1672everything more than one year old is shown in blue. 1680everything more than one year old is shown in blue.
@@ -1790,8 +1798,8 @@ changes to the current file, including the text of the log entries. The
1790output appears in a separate window. The point is centered at the 1798output appears in a separate window. The point is centered at the
1791revision of the file that is currently being visited. 1799revision of the file that is currently being visited.
1792 1800
1793From the change log buffer, the following keys are used to move 1801 In the change log buffer, you can use the following keys to move
1794between the logs of revisions and files, to view past revisions, and 1802between the logs of revisions and of files, to view past revisions, and
1795to view diffs: 1803to view diffs:
1796 1804
1797@table @kbd 1805@table @kbd
@@ -2410,14 +2418,16 @@ or a snapshot against a named version.
2410 2418
2411@cindex named configurations (RCS) 2419@cindex named configurations (RCS)
2412 VC's snapshot facilities are modeled on RCS's named-configuration 2420 VC's snapshot facilities are modeled on RCS's named-configuration
2413support. They use RCS's native facilities for this, so under VC 2421support. They use RCS's native facilities for this, so
2414snapshots made using RCS are visible even when you bypass VC. 2422snapshots made using RCS through VC are visible even when you bypass VC.
2415 2423
2416@c worded verbosely to avoid overfull hbox. 2424@c worded verbosely to avoid overfull hbox.
2417 For SCCS, VC implements snapshots itself. The files it uses contain 2425 For SCCS, VC implements snapshots itself. The files it uses contain
2418name/file/version-number triples. These snapshots are visible only 2426name/file/version-number triples. These snapshots are visible only
2419through VC. 2427through VC.
2420 2428
2429@c ??? What about CVS?
2430
2421 A snapshot is a set of checked-in versions. So make sure that all the 2431 A snapshot is a set of checked-in versions. So make sure that all the
2422files are checked in and not locked when you make a snapshot. 2432files are checked in and not locked when you make a snapshot.
2423 2433
@@ -2472,6 +2482,8 @@ most recent entry in the change log file.
2472 2482
2473This command works with RCS or CVS only, not with SCCS. 2483This command works with RCS or CVS only, not with SCCS.
2474 2484
2485@c ??? What about other back ends?
2486
2475@item C-u C-x v a 2487@item C-u C-x v a
2476As above, but only find entries for the current buffer's file. 2488As above, but only find entries for the current buffer's file.
2477 2489
@@ -2625,6 +2637,8 @@ directly into working files. Certain special strings called
2625@dfn{version headers} are replaced in each successive version by the 2637@dfn{version headers} are replaced in each successive version by the
2626number of that version. 2638number of that version.
2627 2639
2640@c ??? How does this relate to CVS?
2641
2628 If you are using RCS, and version headers are present in your working 2642 If you are using RCS, and version headers are present in your working
2629files, Emacs can use them to determine the current version and the 2643files, Emacs can use them to determine the current version and the
2630locking state of the files. This is more reliable than referring to the 2644locking state of the files. This is more reliable than referring to the
@@ -2657,7 +2671,7 @@ setting the variables @code{vc-@var{backend}-header} where
2657each string in the list is inserted as a separate header on a line of 2671each string in the list is inserted as a separate header on a line of
2658its own. 2672its own.
2659 2673
2660 It is often necessary to use ``superfluous'' backslashes when 2674 It may be necessary to use apparently-superfluous backslashes when
2661writing the strings that you put in this variable. For instance, you 2675writing the strings that you put in this variable. For instance, you
2662might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra 2676might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
2663backslash prevents the string constant from being interpreted as a 2677backslash prevents the string constant from being interpreted as a
@@ -2899,8 +2913,8 @@ only for repositories from hosts that match the pattern.
2899listing} is a list of all the files in a directory. Emacs provides 2913listing} is a list of all the files in a directory. Emacs provides
2900commands to create and delete directories, and to make directory 2914commands to create and delete directories, and to make directory
2901listings in brief format (file names only) and verbose format (sizes, 2915listings in brief format (file names only) and verbose format (sizes,
2902dates, and authors included). There is also a directory browser called 2916dates, and authors included). Emacs also includes a directory browser
2903Dired; see @ref{Dired}. 2917feature called Dired; see @ref{Dired}.
2904 2918
2905@table @kbd 2919@table @kbd
2906@item C-x C-d @var{dir-or-pattern} @key{RET} 2920@item C-x C-d @var{dir-or-pattern} @key{RET}
@@ -2950,9 +2964,10 @@ default).
2950 2964
2951@vindex directory-free-space-program 2965@vindex directory-free-space-program
2952@vindex directory-free-space-args 2966@vindex directory-free-space-args
2953 Emacs adds information about the amount of free space on the disk 2967 In verbose directory listings, Emacs adds information about the
2954that contains the directory. To do this, it runs the program 2968amount of free space on the disk that contains the directory. To do
2955specified by @code{directory-free-space-program} with arguments 2969this, it runs the program specified by
2970@code{directory-free-space-program} with arguments
2956@code{directory-free-space-args}. 2971@code{directory-free-space-args}.
2957 2972
2958@node Comparing Files 2973@node Comparing Files
@@ -2967,19 +2982,26 @@ running the @code{diff} program, using options taken from the variable
2967@code{diff-switches}. The value of @code{diff-switches} should be a 2982@code{diff-switches}. The value of @code{diff-switches} should be a
2968string; the default is @code{"-c"} to specify a context diff. 2983string; the default is @code{"-c"} to specify a context diff.
2969 2984
2970@findex diff-goto-source
2971 After running @kbd{M-x diff}, you can use @kbd{C-x `} to visit
2972successive changed locations in the two source files, as in
2973Compilation mode (@pxref{Compilation Mode}.) In the @samp{*diff*} buffer,
2974you can move to a particular hunk of changes and type @kbd{C-c C-c}
2975(@code{diff-goto-source}) to visit the corresponding source location.
2976
2977@findex diff-backup 2985@findex diff-backup
2978 The command @kbd{M-x diff-backup} compares a specified file with its most 2986 The command @kbd{M-x diff-backup} compares a specified file with its most
2979recent backup. If you specify the name of a backup file, 2987recent backup. If you specify the name of a backup file,
2980@code{diff-backup} compares it with the source file that it is a backup 2988@code{diff-backup} compares it with the source file that it is a backup
2981of. 2989of.
2982 2990
2991@findex diff-goto-source
2992@findex diff-mode
2993@cindex Diff mode
2994 The @samp{*diff*} buffer uses Diff mode, which enables you to use
2995@kbd{C-x `} to visit successive changed locations in the two source
2996files, as in Compilation mode (@pxref{Compilation Mode}.) You can
2997also move to a particular hunk of changes and type @kbd{C-c C-c}
2998(@code{diff-goto-source}) to visit the corresponding source location.
2999
3000@cindex patches
3001 Differences between versions of files are often distributed as
3002patches, which are the output from the @command{diff} program. You
3003can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}.
3004
2983@findex compare-windows 3005@findex compare-windows
2984 The command @kbd{M-x compare-windows} compares the text in the 3006 The command @kbd{M-x compare-windows} compares the text in the
2985current window with that in the next window. (For more information 3007current window with that in the next window. (For more information
@@ -2990,10 +3012,10 @@ one character at a time, until it reaches characters that don't match.
2990Then the command exits. 3012Then the command exits.
2991 3013
2992 If point in the two windows is followed by non-matching text when 3014 If point in the two windows is followed by non-matching text when
2993the command starts, it tries heuristically to advance up to matching 3015the command starts, @kbd{M-x compare-windows} tries heuristically to
2994text in the two windows, and then exits. So if you use @kbd{M-x 3016advance up to matching text in the two windows, and then exits. So if
2995compare-windows} repeatedly, each time it either skips one matching 3017you use @kbd{M-x compare-windows} repeatedly, each time it either
2996range or finds the start of another. 3018skips one matching range or finds the start of another.
2997 3019
2998@vindex compare-ignore-case 3020@vindex compare-ignore-case
2999@vindex compare-ignore-whitespace 3021@vindex compare-ignore-whitespace
@@ -3004,16 +3026,6 @@ If the variable @code{compare-ignore-whitespace} is non-@code{nil},
3004@code{compare-windows} normally ignores changes in whitespace, and a 3026@code{compare-windows} normally ignores changes in whitespace, and a
3005prefix argument turns that off. 3027prefix argument turns that off.
3006 3028
3007@findex diff-mode
3008@cindex diffs
3009@cindex patches
3010@cindex Diff mode
3011 Differences between versions of files are often distributed as
3012@dfn{patches}, which are the output from @command{diff} or a version
3013control system that uses @command{diff}. @kbd{M-x diff-mode} turns on
3014Diff mode, a major mode for viewing and editing patches, either as
3015``unified diffs'' or ``context diffs.''
3016
3017@cindex Smerge mode 3029@cindex Smerge mode
3018@findex smerge-mode 3030@findex smerge-mode
3019@cindex failed merges 3031@cindex failed merges
@@ -3154,19 +3166,20 @@ mode called Tar mode which provides a Dired-like list of the contents
3154would in Dired, and visit the subfiles contained in the archive. 3166would in Dired, and visit the subfiles contained in the archive.
3155However, not all Dired commands are available in Tar mode. 3167However, not all Dired commands are available in Tar mode.
3156 3168
3157 If you enable Auto Compression mode (@pxref{Compressed Files}), then 3169 If Auto Compression mode is enabled (@pxref{Compressed Files}), then
3158Tar mode is used also for compressed archives---files with extensions 3170Tar mode is used also for compressed archives---files with extensions
3159@samp{.tgz}, @code{.tar.Z} and @code{.tar.gz}. 3171@samp{.tgz}, @code{.tar.Z} and @code{.tar.gz}.
3160 3172
3161 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file 3173 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
3162into its own buffer. You can edit it there and when you save the buffer 3174into its own buffer. You can edit it there, and if you save the
3163the edited version will replace the version in the Tar buffer. @kbd{v} 3175buffer, the edited version will replace the version in the Tar buffer.
3164extracts a file into a buffer in View mode. @kbd{o} extracts the file 3176@kbd{v} extracts a file into a buffer in View mode. @kbd{o} extracts
3165and displays it in another window, so you could edit the file and 3177the file and displays it in another window, so you could edit the file
3166operate on the archive simultaneously. @kbd{d} marks a file for 3178and operate on the archive simultaneously. @kbd{d} marks a file for
3167deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in 3179deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in
3168Dired. @kbd{C} copies a file from the archive to disk and @kbd{R} 3180Dired. @kbd{C} copies a file from the archive to disk and @kbd{R}
3169renames a file. @kbd{g} reverts the buffer from the archive on disk. 3181renames a file within the archive. @kbd{g} reverts the buffer from
3182the archive on disk.
3170 3183
3171 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission 3184 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission
3172bits, group, and owner, respectively. 3185bits, group, and owner, respectively.
@@ -3282,8 +3295,6 @@ This is achieved using the variable @code{auto-save-file-name-transforms}.
3282 Normally, if you do not specify a user name in a remote file name, 3295 Normally, if you do not specify a user name in a remote file name,
3283that means to use your own user name. But if you set the variable 3296that means to use your own user name. But if you set the variable
3284@code{ange-ftp-default-user} to a string, that string is used instead. 3297@code{ange-ftp-default-user} to a string, that string is used instead.
3285(The Emacs package that implements FTP file access is called
3286@code{ange-ftp}.)
3287 3298
3288@cindex anonymous FTP 3299@cindex anonymous FTP
3289@vindex ange-ftp-generate-anonymous-password 3300@vindex ange-ftp-generate-anonymous-password
@@ -3293,8 +3304,8 @@ are handled specially. The variable
3293@code{ange-ftp-generate-anonymous-password} controls what happens: if 3304@code{ange-ftp-generate-anonymous-password} controls what happens: if
3294the value of this variable is a string, then that string is used as 3305the value of this variable is a string, then that string is used as
3295the password; if non-@code{nil} (the default), then the value of 3306the password; if non-@code{nil} (the default), then the value of
3296@code{user-mail-address} is used; if @code{nil}, the user is prompted 3307@code{user-mail-address} is used; if @code{nil}, then Emacs prompts
3297for a password as normal. 3308you for a password as usual.
3298 3309
3299@cindex firewall, and accessing remote files 3310@cindex firewall, and accessing remote files
3300@cindex gateway, and remote file access with @code{ange-ftp} 3311@cindex gateway, and remote file access with @code{ange-ftp}
@@ -3453,7 +3464,7 @@ This adds a @samp{Filesets} menu to the menu bar.
3453 3464
3454@findex filesets-add-buffer 3465@findex filesets-add-buffer
3455@findex filesets-remove-buffer 3466@findex filesets-remove-buffer
3456 The simplest way to define filesets is by adding files to them one 3467 The simplest way to define a fileset is by adding files to it one
3457at a time. To add a file to fileset @var{name}, visit the file and 3468at a time. To add a file to fileset @var{name}, visit the file and
3458type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If 3469type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If
3459there is no fileset @var{name}, this creates a new one, which 3470there is no fileset @var{name}, this creates a new one, which
diff --git a/man/frames.texi b/man/frames.texi
index dd076262e82..3561bd89b2d 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -3,29 +3,29 @@
3@c 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3@c 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Frames, International, Windows, Top 5@node Frames, International, Windows, Top
6@chapter Frames and X Windows 6@chapter Frames and Graphical Displays
7@cindex frames 7@cindex frames
8 8
9 When using the X Window System, you can create multiple windows at the 9 When using a graphical display, you can create multiple windows at
10X level in a single Emacs session. Each X window that belongs to Emacs 10the system in a single Emacs session. Each system-level window that
11displays a @dfn{frame} which can contain one or several Emacs windows. 11belongs to Emacs displays a @dfn{frame} which can contain one or
12A frame initially contains a single general-purpose Emacs window which 12several Emacs windows. A frame initially contains a single
13you can subdivide vertically or horizontally into smaller windows. A 13general-purpose Emacs window which you can subdivide vertically or
14frame normally contains its own echo area and minibuffer, but you can 14horizontally into smaller windows. A frame normally contains its own
15make frames that don't have these---they use the echo area and 15echo area and minibuffer, but you can make frames that don't have
16minibuffer of another frame. 16these---they use the echo area and minibuffer of another frame.
17 17
18 Editing you do in one frame also affects the other frames. For 18 To avoid confusion, we reserve the word ``window'' for the
19subdivisions that Emacs implements, and never use it to refer to a
20frame.
21
22 Editing you do in one frame affects the other frames. For
19instance, if you put text in the kill ring in one frame, you can yank it 23instance, if you put text in the kill ring in one frame, you can yank it
20in another frame. If you exit Emacs through @kbd{C-x C-c} in one frame, 24in another frame. If you exit Emacs through @kbd{C-x C-c} in one frame,
21it terminates all the frames. To delete just one frame, use @kbd{C-x 5 25it terminates all the frames. To delete just one frame, use @kbd{C-x 5
220} (that is zero, not @kbd{o}). 260} (that is zero, not @kbd{o}).
23 27
24 To avoid confusion, we reserve the word ``window'' for the 28 Emacs compiled for MS-DOS emulates some windowing functionality,
25subdivisions that Emacs implements, and never use it to refer to a
26frame.
27
28 Emacs compiled for MS-DOS emulates some aspects of the window system
29so that you can use many of the features described in this chapter. 29so that you can use many of the features described in this chapter.
30@xref{MS-DOS Mouse}, for more information. 30@xref{MS-DOS Mouse}, for more information.
31 31
@@ -185,46 +185,46 @@ point. Then it does not matter where you click, or even which of the
185frame's windows you click on. The default value is @code{nil}. This 185frame's windows you click on. The default value is @code{nil}. This
186variable also affects yanking the secondary selection. 186variable also affects yanking the secondary selection.
187 187
188@cindex cutting and X 188@cindex cutting
189@cindex pasting and X 189@cindex pasting
190@cindex X cutting and pasting 190@cindex X cutting and pasting
191 To copy text to another X window, kill it or save it in the kill ring. 191 To copy text to another windowing application, kill it or save it in
192Under X, this also sets the @dfn{primary selection}. Then use the 192the kill ring. Then use the ``paste'' or ``yank'' command of the
193``paste'' or ``yank'' command of the program operating the other window 193other application to insert the text.
194to insert the text from the selection.
195
196 To copy text from another X window, use the ``cut'' or ``copy''
197command of the program operating the other window, to select the text
198you want. Then yank it in Emacs with @kbd{C-y} or @kbd{Mouse-2}.
199 194
200 The standard coding system for X selections is 195 To copy text from another windowing application, use its ``cut'' or
201@code{compound-text-with-extensions}. To specify another coding 196``copy'' command to select the text you want. Then yank it in Emacs
202system for X selections, use @kbd{C-x @key{RET} x} or @kbd{C-x 197with @kbd{C-y} or @kbd{Mouse-2}.
203@key{RET} X}. @xref{Specify Coding}.
204 198
205@cindex primary selection 199@cindex primary selection
206@cindex cut buffer 200@cindex cut buffer
207@cindex selection, primary 201@cindex selection, primary
208@vindex x-cut-buffer-max 202@vindex x-cut-buffer-max
209 When Emacs puts text into the kill ring, or rotates text to the front 203 When Emacs puts text into the kill ring, or rotates text to the
210of the kill ring, it sets the @dfn{primary selection} in the X server. 204front of the kill ring, it sets the @dfn{primary selection} in the
211This is how other X clients can access the text. Emacs also stores the 205window system. This is how other windowing applications can access
212text in the cut buffer, but only if the text is short enough 206the text. On the X Window System, emacs also stores the text in the
213(the value of @code{x-cut-buffer-max} specifies the maximum number of 207cut buffer, but only if the text is short enough (the value of
214characters); putting long strings in the cut buffer can be slow. 208@code{x-cut-buffer-max} specifies the maximum number of characters);
209putting long strings in the cut buffer can be slow.
215 210
216 The commands to yank the first entry in the kill ring actually check 211 The commands to yank the first entry in the kill ring actually check
217first for a primary selection in another program; after that, they check 212first for a primary selection in another program; after that, they check
218for text in the cut buffer. If neither of those sources provides text 213for text in the cut buffer. If neither of those sources provides text
219to yank, the kill ring contents are used. 214to yank, the kill ring contents are used.
220 215
216 The standard coding system for X Window System selections is
217@code{compound-text-with-extensions}. To specify another coding
218system for selections, use @kbd{C-x @key{RET} x} or @kbd{C-x @key{RET}
219X}. @xref{Communication Coding}.
220
221@node Secondary Selection 221@node Secondary Selection
222@section Secondary Selection 222@section Secondary Selection
223@cindex secondary selection 223@cindex secondary selection
224 224
225 The @dfn{secondary selection} is another way of selecting text using 225 The @dfn{secondary selection} is another way of selecting text using
226X. It does not use point or the mark, so you can use it to kill text 226the X Window System. It does not use point or the mark, so you can
227without setting point or the mark. 227use it to kill text without setting point or the mark.
228 228
229@table @kbd 229@table @kbd
230@findex mouse-set-secondary 230@findex mouse-set-secondary
@@ -275,16 +275,15 @@ that matters is which window you click on. @xref{Mouse Commands}.
275 275
276@node Clipboard 276@node Clipboard
277@section Using the Clipboard 277@section Using the Clipboard
278@cindex X clipboard
279@cindex clipboard 278@cindex clipboard
280@vindex x-select-enable-clipboard 279@vindex x-select-enable-clipboard
281@findex menu-bar-enable-clipboard 280@findex menu-bar-enable-clipboard
282@cindex OpenWindows 281@cindex OpenWindows
283@cindex Gnome 282@cindex Gnome
284 283
285 Apart from the primary and secondary selection types, X supports a 284 Apart from the primary and secondary selection types, Emacs can
286@dfn{clipboard} selection type which is used by some applications, 285handle the @dfn{clipboard} selection type which is used by some
287particularly under OpenWindows and Gnome. 286applications, particularly under OpenWindows and Gnome.
288 287
289 The command @kbd{M-x menu-bar-enable-clipboard} makes the @code{Cut}, 288 The command @kbd{M-x menu-bar-enable-clipboard} makes the @code{Cut},
290@code{Paste} and @code{Copy} menu items, as well as the keys of the same 289@code{Paste} and @code{Copy} menu items, as well as the keys of the same
@@ -295,7 +294,7 @@ the Emacs yank functions consult the clipboard before the primary
295selection, and to make the kill functions to store in the clipboard as 294selection, and to make the kill functions to store in the clipboard as
296well as the primary selection. Otherwise they do not access the 295well as the primary selection. Otherwise they do not access the
297clipboard at all. Using the clipboard is the default on MS-Windows, 296clipboard at all. Using the clipboard is the default on MS-Windows,
298unlike most systems. 297but not on other systems.
299 298
300@node Mouse References 299@node Mouse References
301@section Following References with the Mouse 300@section Following References with the Mouse
@@ -342,16 +341,16 @@ the mouse.
342 341
343@vindex mouse-1-click-follows-link 342@vindex mouse-1-click-follows-link
344 In Emacs versions before 22, only @kbd{Mouse-2} follows links and 343 In Emacs versions before 22, only @kbd{Mouse-2} follows links and
345@kbd{Mouse-1} always sets points. If you prefer this behavior, set 344@kbd{Mouse-1} always sets point. If you prefer this older behavior,
346the variable @code{mouse-1-click-follows-link} to @code{nil}. This 345set the variable @code{mouse-1-click-follows-link} to @code{nil}.
347variable also lets you choose various other alternatives for following 346This variable also lets you choose various other alternatives for
348links with the mouse. Type @kbd{C-h v mouse-1-click-follows-link @key{RET}} 347following links with the mouse. Type @kbd{C-h v
349for more details. 348mouse-1-click-follows-link @key{RET}} for more details.
350 349
351@node Menu Mouse Clicks 350@node Menu Mouse Clicks
352@section Mouse Clicks for Menus 351@section Mouse Clicks for Menus
353 352
354 Mouse clicks modified with the @key{CTRL} and @key{SHIFT} keys 353 Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers
355bring up menus. 354bring up menus.
356 355
357@table @kbd 356@table @kbd
@@ -382,7 +381,7 @@ present in the menu bar---not just the mode-specific ones---so that
382you can access them without having to display the menu bar. 381you can access them without having to display the menu bar.
383 382
384@item S-Mouse-1 383@item S-Mouse-1
385This menu is for specifying the frame's principal font. 384This menu is for specifying the frame's default font.
386@end table 385@end table
387 386
388@node Mode Line Mouse 387@node Mode Line Mouse
@@ -396,17 +395,17 @@ windows.
396 Some areas of the mode line, such as the buffer name and the major 395 Some areas of the mode line, such as the buffer name and the major
397mode name, have their own special mouse bindings. These areas are 396mode name, have their own special mouse bindings. These areas are
398highlighted when you hold the mouse over them, and information about 397highlighted when you hold the mouse over them, and information about
399the special bindings will be displayed (@pxref{Tooltips}). 398the special bindings will be displayed (@pxref{Tooltips}). This
400 399section's commands do not apply in those areas.
401 You can also click on areas of the mode line that do not have
402special mouse bindings of their own. This has the following effects:
403 400
404@table @kbd 401@table @kbd
405@item Mouse-1 402@item Mouse-1
406@kindex Mouse-1 @r{(mode line)} 403@kindex Mouse-1 @r{(mode line)}
407@kbd{Mouse-1} on a mode line selects the window it belongs to. By 404@kbd{Mouse-1} on a mode line selects the window it belongs to. By
408dragging @kbd{Mouse-1} on the mode line, you can move it, thus 405dragging @kbd{Mouse-1} on the mode line, you can move it, thus
409changing the height of the windows above and below. 406changing the height of the windows above and below. Changing heights
407with the mouse in this way never deletes windows, it just refuses to
408make any window smaller than the minimum height.
410 409
411@item Mouse-2 410@item Mouse-2
412@kindex Mouse-2 @r{(mode line)} 411@kindex Mouse-2 @r{(mode line)}
@@ -425,7 +424,10 @@ horizontally, above the place in the mode line where you click.
425@end table 424@end table
426 425
427@kindex C-Mouse-2 @r{(scroll bar)} 426@kindex C-Mouse-2 @r{(scroll bar)}
428 @kbd{C-Mouse-2} on a scroll bar splits the corresponding window 427@kindex Mouse-1 @r{(scroll bar)}
428 Using @kbd{Mouse-1} on the divider between two side-by-side mode
429lines, you can move the vertical boundary left or right. Using
430@kbd{C-Mouse-2} on a scroll bar splits the corresponding window
429vertically. @xref{Split Window}. 431vertically. @xref{Split Window}.
430 432
431@node Creating Frames 433@node Creating Frames
@@ -638,12 +640,12 @@ for all of them!
638@section Special Buffer Frames 640@section Special Buffer Frames
639 641
640@vindex special-display-buffer-names 642@vindex special-display-buffer-names
641 You can make certain chosen buffers, for which Emacs normally creates 643 You can make certain chosen buffers, which Emacs normally displays
642a second window when you have just one window, appear in special frames 644in ``another window,'' appear in special frames of their own. To do
643of their own. To do this, set the variable 645this, set the variable @code{special-display-buffer-names} to a list
644@code{special-display-buffer-names} to a list of buffer names; any 646of buffer names; any buffer whose name is in that list automatically
645buffer whose name is in that list automatically gets a special frame, 647gets a special frame, when an Emacs command wants to display it ``in
646when an Emacs command wants to display it ``in another window.'' 648another window.''
647 649
648 For example, if you set the variable this way, 650 For example, if you set the variable this way,
649 651
@@ -664,7 +666,7 @@ frame automatically.
664 More generally, you can set @code{special-display-regexps} to a list 666 More generally, you can set @code{special-display-regexps} to a list
665of regular expressions; then a buffer gets its own frame if its name 667of regular expressions; then a buffer gets its own frame if its name
666matches any of those regular expressions. (Once again, this applies only 668matches any of those regular expressions. (Once again, this applies only
667to buffers that normally get displayed for you in a separate window.) 669to buffers that normally get displayed for you in ``another window.'')
668 670
669@vindex special-display-frame-alist 671@vindex special-display-frame-alist
670 The variable @code{special-display-frame-alist} specifies the frame 672 The variable @code{special-display-frame-alist} specifies the frame
@@ -707,79 +709,38 @@ whether that feature is also in use for the same buffer name.
707@cindex Auto-Raise mode 709@cindex Auto-Raise mode
708@cindex Auto-Lower mode 710@cindex Auto-Lower mode
709 711
710 This section describes commands for altering the display style and 712@kindex S-Mouse-1
711window management behavior of the selected frame. 713 You can specify the font and colors used for text display, and the
714colors for the frame borders, the cursor, and the mouse cursor, by
715customizing the faces @code{default}, @code{border}, @code{cursor} and
716@code{mouse}. @xref{Face Customization}. You can also set a frame's
717default font through a pop-up menu. Press @kbd{S-Mouse-1} to activate
718this menu.
719
720 These commands are available for controlling the window management
721behavior of the selected frame.
712 722
713@findex set-foreground-color
714@findex set-background-color
715@findex set-cursor-color
716@findex set-mouse-color
717@findex set-border-color
718@findex auto-raise-mode
719@findex auto-lower-mode
720@cindex colors
721@table @kbd 723@table @kbd
722@item M-x set-foreground-color @key{RET} @var{color} @key{RET} 724@findex auto-raise-mode
723Specify color @var{color} for the foreground of the selected frame.
724(This also changes the foreground color of the default face.) You can
725specify @var{color} either by its symbolic name or by its RGB
726numerical specification@footnote{
727See the X Window System documentation for more details. On a typical
728GNU or Unix system, the command @kbd{man 7 X} or @kbd{man -s 7 X} will
729display the X manual page that explains how to specify colors.}.
730
731@item M-x set-background-color @key{RET} @var{color} @key{RET}
732Specify color @var{color} for the background of the selected frame.
733(This also changes the background color of the default face.)
734
735@item M-x set-cursor-color @key{RET} @var{color} @key{RET}
736Specify color @var{color} for the cursor of the selected frame.
737
738@item M-x set-mouse-color @key{RET} @var{color} @key{RET}
739Specify color @var{color} for the mouse cursor when it is over the
740selected frame.
741
742@item M-x set-border-color @key{RET} @var{color} @key{RET}
743Specify color @var{color} for the border of the selected frame.
744
745@item M-x list-colors-display
746Display the defined color names and show what the colors look like.
747This command is somewhat slow. @xref{Colors, list-colors-display,
748Display available colors}.
749
750@item M-x auto-raise-mode 725@item M-x auto-raise-mode
751Toggle whether or not the selected frame should auto-raise. Auto-raise 726Toggle whether or not the selected frame should auto-raise. Auto-raise
752means that every time you move the mouse onto the frame, it raises the 727means that every time you move the mouse onto the frame, it raises the
753frame. 728frame.
754 729
755Note that this auto-raise feature is implemented by Emacs itself. Some 730Some window managers also implement auto-raise. If you enable
756window managers also implement auto-raise. If you enable auto-raise for 731auto-raise for Emacs frames in your window manager, it will work, but
757Emacs frames in your X window manager, it should work, but it is beyond 732it is beyond Emacs' control, so @code{auto-raise-mode} has no effect
758Emacs's control and therefore @code{auto-raise-mode} has no effect on 733on it.
759it.
760 734
735@findex auto-lower-mode
761@item M-x auto-lower-mode 736@item M-x auto-lower-mode
762Toggle whether or not the selected frame should auto-lower. 737Toggle whether or not the selected frame should auto-lower.
763Auto-lower means that every time you move the mouse off the frame, 738Auto-lower means that every time you move the mouse off the frame,
764the frame moves to the bottom of the stack of X windows. 739the frame moves to the bottom of the stack on the screen.
765 740
766The command @code{auto-lower-mode} has no effect on auto-lower 741The command @code{auto-lower-mode} has no effect on auto-lower
767implemented by the X window manager. To control that, you must use 742implemented by the window manager. To control that, you must use the
768the appropriate window manager features. 743appropriate window manager features.
769
770@findex set-frame-font
771@item M-x set-frame-font @key{RET} @var{font} @key{RET}
772@cindex font (principal)
773Specify font @var{font} as the principal font for the selected frame.
774The principal font controls several face attributes of the
775@code{default} face (@pxref{Faces}). For example, if the principal font
776has a height of 12 pt, all text will be drawn in 12 pt fonts, unless you
777use another face that specifies a different height. @xref{Font X}, for
778ways to list the available fonts on your system.
779
780@kindex S-Mouse-1
781You can also set a frame's principal font through a pop-up menu.
782Press @kbd{S-Mouse-1} to activate this menu.
783@end table 744@end table
784 745
785 In Emacs versions that use an X toolkit, the color-setting and 746 In Emacs versions that use an X toolkit, the color-setting and
@@ -800,13 +761,13 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}.
800@cindex Scroll Bar mode 761@cindex Scroll Bar mode
801@cindex mode, Scroll Bar 762@cindex mode, Scroll Bar
802 763
803 When using X, Emacs normally makes a @dfn{scroll bar} at the left of 764 On graphical displays, Emacs normally makes a @dfn{scroll bar} at
804each Emacs window.@footnote{Placing it at the left is usually more 765the left of each Emacs window.@footnote{Placing it at the left is
805useful with overlapping frames with text starting at the left margin.} 766usually more useful with overlapping frames with text starting at the
806The scroll bar runs the height of the window, and shows a moving 767left margin.} The scroll bar runs the height of the window, and shows
807rectangular inner box which represents the portion of the buffer 768a moving rectangular inner box which represents the portion of the
808currently displayed. The entire height of the scroll bar represents the 769buffer currently displayed. The entire height of the scroll bar
809entire length of the buffer. 770represents the entire length of the buffer.
810 771
811 You can use @kbd{Mouse-2} (normally, the middle button) in the scroll 772 You can use @kbd{Mouse-2} (normally, the middle button) in the scroll
812bar to move or drag the inner box up and down. If you move it to the 773bar to move or drag the inner box up and down. If you move it to the
@@ -826,16 +787,18 @@ window vertically. The split occurs on the line where you click.
826@findex scroll-bar-mode 787@findex scroll-bar-mode
827@vindex scroll-bar-mode 788@vindex scroll-bar-mode
828 You can enable or disable Scroll Bar mode with the command @kbd{M-x 789 You can enable or disable Scroll Bar mode with the command @kbd{M-x
829scroll-bar-mode}. With no argument, it toggles the use of scroll bars. 790scroll-bar-mode}. With no argument, it toggles the use of scroll
830With an argument, it turns use of scroll bars on if and only if the 791bars. With an argument, it turns use of scroll bars on if and only if
831argument is positive. This command applies to all frames, including 792the argument is positive. This command applies to all frames,
832frames yet to be created. Customize the variable @code{scroll-bar-mode} 793including frames yet to be created. Customize the variable
833to control the use of scroll bars at startup. You can use it to specify 794@code{scroll-bar-mode} to control the use of scroll bars at startup.
834that they are placed at the right of windows if you prefer that. You 795You can use it to specify that they are placed at the right of windows
835have to set this variable through the @samp{Customize} interface 796if you prefer that. You have to set this variable through the
836(@pxref{Easy Customization}). Otherwise, it will not work properly. 797@samp{Customize} interface (@pxref{Easy Customization}), or it will
837You can use the X resource @samp{verticalScrollBars} to control the 798not work properly.
838initial setting of Scroll Bar mode similarly. @xref{Resources}. 799
800 You can also use the X resource @samp{verticalScrollBars} to control
801the initial setting of Scroll Bar mode. @xref{Resources}.
839 802
840@findex toggle-scroll-bar 803@findex toggle-scroll-bar
841 To enable or disable scroll bars for just the selected frame, use the 804 To enable or disable scroll bars for just the selected frame, use the
@@ -887,37 +850,8 @@ directory displayed in that buffer.
887you prefer to visit the file in a new window in such cases, customize 850you prefer to visit the file in a new window in such cases, customize
888the variable @code{dnd-open-file-other-window}. 851the variable @code{dnd-open-file-other-window}.
889 852
890@ignore 853 The XDND and Motif drag and drop protocols, and the old KDE 1.x
891@c ??? To Lisp manual 854protocol, are currently supported.
892@vindex x-dnd-test-function
893@vindex x-dnd-known-types
894 When a user drags something from another application over Emacs, that other
895application expects Emacs to tell it if Emacs can handle the data that is
896dragged. The variable @code{x-dnd-test-function} is used by Emacs to determine
897what to reply. The default value is @code{x-dnd-default-test-function}
898which accepts drops if the type of the data to be dropped is present in
899@code{x-dnd-known-types}. You can customize @code{x-dnd-test-function} and/or
900@code{x-dnd-known-types} if you want Emacs to accept or reject drops based
901on some other criteria.
902
903@vindex x-dnd-types-alist
904 If you want to change the way Emacs handles drop of different types
905or add a new type, customize @code{x-dnd-types-alist}. This requires
906detailed knowledge of what types other applications use for drag and
907drop.
908
909@vindex dnd-protocol-alist
910 When an URL is dropped on Emacs it may be a file, but it may also be
911another URL type (ftp, http, etc.). Emacs first checks
912@code{dnd-protocol-alist} to determine what to do with the URL. If
913there is no match there and if @code{browse-url-browser-function} is
914an alist, Emacs looks for a match there. If no match is found the
915text for the URL is inserted. If you want to alter Emacs behavior,
916you can customize these variables.
917@end ignore
918
919 The drag and drop protocols XDND, Motif and the
920old KDE 1.x protocol are currently supported.
921 855
922@node Menu Bars 856@node Menu Bars
923@section Menu Bars 857@section Menu Bars
@@ -941,7 +875,7 @@ with @kbd{C-Mouse-3} on a display which supports pop-up menus.
941 875
942 @xref{Menu Bar}, for information on how to invoke commands with the 876 @xref{Menu Bar}, for information on how to invoke commands with the
943menu bar. @xref{X Resources}, for how to customize the menu bar 877menu bar. @xref{X Resources}, for how to customize the menu bar
944menus. 878menus' visual appearance.
945 879
946@node Tool Bars 880@node Tool Bars
947@section Tool Bars 881@section Tool Bars
@@ -980,13 +914,18 @@ use of dialog boxes. This also controls whether to use file selection
980windows (but those are not supported on all platforms). 914windows (but those are not supported on all platforms).
981 915
982@vindex use-file-dialog 916@vindex use-file-dialog
983 A file selection window is a special kind of dialog box for asking for 917 A file selection window is a special kind of dialog box for asking
984file names. 918for file names. You can customize the variable @code{use-file-dialog}
919to suppress the use of file selection windows, even if you still want
920other kinds of dialogs. This variable has no effect if you have
921suppressed all dialog boxes with the variable @code{use-dialog-box}.
985 922
986 You can customize the variable @code{use-file-dialog} to suppress the 923@vindex x-gtk-show-hidden-files
987use of file selection windows even if you still want other kinds 924 For Gtk+ version 2.4 and newer, Emacs use the Gtk+ file chooser
988of dialogs. This variable has no effect if you have suppressed all dialog 925dialog. Emacs adds a toggle button that enables and disables showing
989boxes with the variable @code{use-dialog-box}. 926of hidden files (files starting with a dot) in that dialog. The
927variable @code{x-gtk-show-hidden-files} controls whether to show
928hidden files by default.
990 929
991@vindex x-use-old-gtk-file-dialog 930@vindex x-use-old-gtk-file-dialog
992 For Gtk+ version 2.4 and 2.6, you can make Emacs use the old file dialog 931 For Gtk+ version 2.4 and 2.6, you can make Emacs use the old file dialog
@@ -994,12 +933,6 @@ by setting the variable @code{x-use-old-gtk-file-dialog} to a non-@code{nil}
994value. If Emacs is built with a Gtk+ version that has only one file dialog, 933value. If Emacs is built with a Gtk+ version that has only one file dialog,
995the setting of this variable has no effect. 934the setting of this variable has no effect.
996 935
997@vindex x-gtk-show-hidden-files
998 For Gtk+ version 2.4 and newer, Emacs use the Gtk+ file chooser dialog.
999Emacs adds a toggle button that enables and disables showing of hidden files
1000(files starting with a dot) in that dialog. This variable controls if
1001hidden files should be shown by default or not.
1002
1003@node Tooltips 936@node Tooltips
1004@section Tooltips 937@section Tooltips
1005@cindex tooltips 938@cindex tooltips
@@ -1010,13 +943,13 @@ movement. There are two types of tooltip: help tooltips and GUD
1010tooltips. 943tooltips.
1011 944
1012 @dfn{Help tooltips} typically display over text---including the mode 945 @dfn{Help tooltips} typically display over text---including the mode
1013line---but may be also available for many other parts of the Emacs 946line---but are also available for other parts of the Emacs frame, such
1014frame such as the tool bar and menu items. 947as the tool bar and menu items.
1015 948
1016@findex tooltip-mode 949@findex tooltip-mode
1017 You can toggle help tooltips (Tooltip mode) with the command 950 You can toggle display of help tooltips (Tooltip mode) with the
1018 @kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the help text 951command @kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the
1019is displayed in the echo area instead. 952help text is displayed in the echo area instead.
1020 953
1021 @dfn{GUD tooltips} show values of variables. They are useful when 954 @dfn{GUD tooltips} show values of variables. They are useful when
1022you are debugging a program. @xref{Debugger Operation}. 955you are debugging a program. @xref{Debugger Operation}.
@@ -1066,11 +999,10 @@ the mode.
1066@cindex non-window terminals 999@cindex non-window terminals
1067@cindex single-frame terminals 1000@cindex single-frame terminals
1068 1001
1069 If your terminal does not have a window system that Emacs supports, 1002 On a text-only terminal, Emacs can display only one Emacs frame at a
1070then it can display only one Emacs frame at a time. However, you can 1003time. However, you can still create multiple Emacs frames, and switch
1071still create multiple Emacs frames, and switch between them. Switching 1004between them. Switching frames on these terminals is much like
1072frames on these terminals is much like switching between different 1005switching between different window configurations.
1073window configurations.
1074 1006
1075 Use @kbd{C-x 5 2} to create a new frame and switch to it; use @kbd{C-x 1007 Use @kbd{C-x 5 2} to create a new frame and switch to it; use @kbd{C-x
10765 o} to cycle through the existing frames; use @kbd{C-x 5 0} to delete 10085 o} to cycle through the existing frames; use @kbd{C-x 5 0} to delete
@@ -1083,20 +1015,20 @@ appears near the beginning of the mode line, in the form
1083 1015
1084@findex set-frame-name 1016@findex set-frame-name
1085@findex select-frame-by-name 1017@findex select-frame-by-name
1086 @samp{F@var{n}} is actually the frame's name. You can also specify a 1018 @samp{F@var{n}} is in fact the frame's initial name. You can give
1087different name if you wish, and you can select a frame by its name. Use 1019frames more meaningful names if you wish, and you can select a frame
1088the command @kbd{M-x set-frame-name @key{RET} @var{name} @key{RET}} to 1020by its name. Use the command @kbd{M-x set-frame-name @key{RET}
1089specify a new name for the selected frame, and use @kbd{M-x 1021@var{name} @key{RET}} to specify a new name for the selected frame,
1090select-frame-by-name @key{RET} @var{name} @key{RET}} to select a frame 1022and use @kbd{M-x select-frame-by-name @key{RET} @var{name} @key{RET}}
1091according to its name. The name you specify appears in the mode line 1023to select a frame according to its name. The name you specify appears
1092when the frame is selected. 1024in the mode line when the frame is selected.
1093 1025
1094@node XTerm Mouse 1026@node XTerm Mouse
1095@section Using a Mouse in Terminal Emulators 1027@section Using a Mouse in Terminal Emulators
1096@cindex xterm, mouse support 1028@cindex xterm, mouse support
1097@cindex terminal emulators, mouse support 1029@cindex terminal emulators, mouse support
1098 1030
1099Some terminal emulators under X support mouse clicks in the terminal 1031 Some terminal emulators under X support mouse clicks in the terminal
1100window. In a terminal emulator which is compatible with @code{xterm}, 1032window. In a terminal emulator which is compatible with @code{xterm},
1101you can use @kbd{M-x xterm-mouse-mode} to give Emacs control over 1033you can use @kbd{M-x xterm-mouse-mode} to give Emacs control over
1102simple use of the mouse---basically, only non-modified single clicks 1034simple use of the mouse---basically, only non-modified single clicks
diff --git a/man/indent.texi b/man/indent.texi
index c748f5010b1..ad0ef315fe8 100644
--- a/man/indent.texi
+++ b/man/indent.texi
@@ -45,7 +45,7 @@ Insert a tab character. You can type @kbd{C-q @key{TAB}} to do this.
45 45
46A tab character is displayed as a stretch of whitespace which extends 46A tab character is displayed as a stretch of whitespace which extends
47to the next display tab stop position, and the default width of a tab 47to the next display tab stop position, and the default width of a tab
48stop is eight. @xref{Display Custom}, for more details. 48stop is eight. @xref{Text Display}, for more details.
49 49
50@item 50@item
51Insert whitespace up to the next tab stop. You can set tab stops at 51Insert whitespace up to the next tab stop. You can set tab stops at
@@ -114,13 +114,13 @@ regard, @kbd{C-M-o} resembles @kbd{C-o}.
114@kindex M-^ 114@kindex M-^
115@findex delete-indentation 115@findex delete-indentation
116 To join two lines cleanly, use the @kbd{M-^} 116 To join two lines cleanly, use the @kbd{M-^}
117(@code{delete-indentation}) command. It deletes the indentation at the 117(@code{delete-indentation}) command. It deletes the indentation at
118front of the current line, and the line boundary as well, replacing them 118the front of the current line, and the line boundary as well,
119with a single space. As a special case (useful for Lisp code) the 119replacing them with a single space. As a special case (useful for
120single space is omitted if the characters to be joined are consecutive 120Lisp code) the single space is omitted if the characters to be joined
121open parentheses or closing parentheses, or if the junction follows 121are consecutive open parentheses or closing parentheses, or if the
122another newline. To delete just the indentation of a line, go to the 122junction follows another newline. To delete just the indentation of a
123beginning of the line and use @kbd{M-\} 123line, go to the beginning of the line and use @kbd{M-\}
124(@code{delete-horizontal-space}), which deletes all spaces and tabs 124(@code{delete-horizontal-space}), which deletes all spaces and tabs
125around the cursor. 125around the cursor.
126 126
@@ -140,12 +140,12 @@ shifted left or right so that its first nonblank character appears in
140that column. @kbd{C-x @key{TAB}} (@code{indent-rigidly}) moves all of 140that column. @kbd{C-x @key{TAB}} (@code{indent-rigidly}) moves all of
141the lines in the region right by its argument (left, for negative 141the lines in the region right by its argument (left, for negative
142arguments). The whole group of lines moves rigidly sideways, which is 142arguments). The whole group of lines moves rigidly sideways, which is
143how the command gets its name.@refill 143how the command gets its name.
144 144
145@cindex remove indentation 145@cindex remove indentation
146 If you want to remove all indentation from all of the line in the 146 To remove all indentation from all of the lines in the region,
147region, invoke @kbd{C-x @key{TAB}} with a large negative argument, 147invoke @kbd{C-x @key{TAB}} with a large negative argument, such as
148such as -1000. 148-1000.
149 149
150@findex indent-relative 150@findex indent-relative
151 @kbd{M-x indent-relative} indents at point based on the previous line 151 @kbd{M-x indent-relative} indents at point based on the previous line
diff --git a/man/kmacro.texi b/man/kmacro.texi
index 852f999adac..89cd8f9e54b 100644
--- a/man/kmacro.texi
+++ b/man/kmacro.texi
@@ -7,22 +7,22 @@
7@cindex defining keyboard macros 7@cindex defining keyboard macros
8@cindex keyboard macro 8@cindex keyboard macro
9 9
10 In this chapter we describe how a sequence of editing commands can 10 In this chapter we describe how to record a sequence of editing
11be recorded and repeated multiple times. 11commands so you can repeat it conveniently later.
12 12
13 A @dfn{keyboard macro} is a command defined by the user to stand for 13 A @dfn{keyboard macro} is a command defined by the user to stand for
14another sequence of keys. For example, if you discover that you are 14another sequence of keys. For example, if you discover that you are
15about to type @kbd{C-n C-d} forty times, you can speed your work by 15about to type @kbd{C-n M-d C-d} forty times, you can speed your work by
16defining a keyboard macro to do @kbd{C-n C-d} and calling it with a 16defining a keyboard macro to do @kbd{C-n M-d C-d}, and then executing
17repeat count of forty. 17it 39 more times.
18 18
19 You define a keyboard macro while executing the commands which are the 19 You define a keyboard macro by executing and recording the commands
20definition. Put differently, as you define a keyboard macro, the 20which are its definition. Put differently, as you define a keyboard
21definition is being executed for the first time. This way, you can see 21macro, the definition is being executed for the first time. This way,
22what the effects of your commands are, so that you don't have to figure 22you can see the effects of your commands, so that you don't have to
23them out in your head. When you are finished, the keyboard macro is 23figure them out in your head. When you close the definition, the
24defined and also has been, in effect, executed once. You can then do the 24keyboard macro is defined and also has been, in effect, executed once.
25whole thing over again by invoking the macro. 25You can then do the whole thing over again by invoking the macro.
26 26
27 Keyboard macros differ from ordinary Emacs commands in that they are 27 Keyboard macros differ from ordinary Emacs commands in that they are
28written in the Emacs command language rather than in Lisp. This makes it 28written in the Emacs command language rather than in Lisp. This makes it
@@ -63,19 +63,6 @@ execute the most recent keyboard macro
63Re-execute last keyboard macro, then add more keys to its definition. 63Re-execute last keyboard macro, then add more keys to its definition.
64@item C-u C-u C-x ( 64@item C-u C-u C-x (
65Add more keys to the last keyboard macro without re-executing it. 65Add more keys to the last keyboard macro without re-executing it.
66@item C-x q
67When this point is reached during macro execution, ask for confirmation
68(@code{kbd-macro-query}).
69@item C-x C-k n
70Give a command name (for the duration of the session) to the most
71recently defined keyboard macro (@code{kmacro-name-last-macro}).
72@item C-x C-k b
73Bind the most recently defined keyboard macro to a key sequence (for
74the duration of the session) (@code{kmacro-bind-to-key}).
75@item M-x insert-kbd-macro
76Insert in the buffer a keyboard macro's definition, as Lisp code.
77@item C-x C-k e
78Edit a previously defined keyboard macro (@code{edit-kbd-macro}).
79@item C-x C-k r 66@item C-x C-k r
80Run the last keyboard macro on each line that begins in the region 67Run the last keyboard macro on each line that begins in the region
81(@code{apply-macro-to-region-lines}). 68(@code{apply-macro-to-region-lines}).
@@ -157,12 +144,12 @@ of that event, the position that the mouse had while you were defining
157the macro. The effect of this may be hard to predict. (Using the 144the macro. The effect of this may be hard to predict. (Using the
158current mouse position would be even less predictable.) 145current mouse position would be even less predictable.)
159 146
160 One thing that doesn't always work well in a keyboard macro is the 147 One thing that sometimes works badly in a keyboard macro is the
161command @kbd{C-M-c} (@code{exit-recursive-edit}). When this command 148command @kbd{C-M-c} (@code{exit-recursive-edit}). When this command
162exits a recursive edit that started within the macro, it works as you'd 149exits a recursive edit that started within the macro, it works as
163expect. But if it exits a recursive edit that started before you 150you'd expect. But if it exits a recursive edit that started before
164invoked the keyboard macro, it also necessarily exits the keyboard macro 151you invoked the keyboard macro, it also necessarily exits the keyboard
165as part of the process. 152macro as part of the process.
166 153
167 After you have terminated the definition of a keyboard macro, you can add 154 After you have terminated the definition of a keyboard macro, you can add
168to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent 155to the end of its definition by typing @kbd{C-u C-x (}. This is equivalent
@@ -190,6 +177,17 @@ beginning of the line and then executing the macro.
190a list of sequences of keys. There is only one keyboard macro ring, 177a list of sequences of keys. There is only one keyboard macro ring,
191shared by all buffers. 178shared by all buffers.
192 179
180@table @kbd
181@item C-x C-k C-k
182Execute the keyboard macro at the head of the ring (@code{kmacro-end-or-call-macro-repeat}).
183@item C-x C-k C-n
184Rotate the keyboard macro ring to the next macro (defined earlier)
185(@code{kmacro-cycle-ring-next}).
186@item C-x C-k C-p
187Rotate the keyboard macro ring to the previous macro (defined later)
188(@code{kmacro-cycle-ring-previous}).
189@end table
190
193 All commands which operate on the keyboard macro ring use the 191 All commands which operate on the keyboard macro ring use the
194same @kbd{C-x C-k} prefix. Most of these commands can be executed and 192same @kbd{C-x C-k} prefix. Most of these commands can be executed and
195repeated immediately after each other without repeating the @kbd{C-x 193repeated immediately after each other without repeating the @kbd{C-x
@@ -212,7 +210,7 @@ executes the keyboard macro at the head of the macro ring. You can
212repeat the macro immediately by typing another @kbd{C-k}, or you can 210repeat the macro immediately by typing another @kbd{C-k}, or you can
213rotate the macro ring immediately by typing @kbd{C-n} or @kbd{C-p}. 211rotate the macro ring immediately by typing @kbd{C-n} or @kbd{C-p}.
214 212
215When a keyboard macro is being defined, @kbd{C-x C-k C-k} behaves like 213 When a keyboard macro is being defined, @kbd{C-x C-k C-k} behaves like
216@kbd{C-x )} except that, immediately afterward, you can use most key 214@kbd{C-x )} except that, immediately afterward, you can use most key
217bindings of this section without the @kbd{C-x C-k} prefix. For 215bindings of this section without the @kbd{C-x C-k} prefix. For
218instance, another @kbd{C-k} will re-execute the macro. 216instance, another @kbd{C-k} will re-execute the macro.
@@ -231,12 +229,13 @@ desired macro is at the head of the ring. To execute the new macro
231ring head immediately, just type @kbd{C-k}. 229ring head immediately, just type @kbd{C-k}.
232 230
233 Note that Emacs treats the head of the macro ring as the ``last 231 Note that Emacs treats the head of the macro ring as the ``last
234defined keyboard macro''. For instance, it is the keyboard macro that 232defined keyboard macro.'' For instance, @kbd{C-x e} will execute that
235@kbd{C-x e} will execute. 233macro, and @kbd{C-x C-k n} will give it a name.
236 234
235@ignore @c This interface is too kludgy
236 @c and the functionality duplicates the functionality above -- rms.
237@findex kmacro-view-macro-repeat 237@findex kmacro-view-macro-repeat
238@kindex C-x C-k C-v 238@kindex C-x C-k C-v
239
240 The command @kbd{C-x C-k C-v} (@code{kmacro-view-macro-repeat}) 239 The command @kbd{C-x C-k C-v} (@code{kmacro-view-macro-repeat})
241displays the last keyboard macro, or when repeated (with @kbd{C-v}), 240displays the last keyboard macro, or when repeated (with @kbd{C-v}),
242it displays the previous macro on the macro ring, just like @kbd{C-x 241it displays the previous macro on the macro ring, just like @kbd{C-x
@@ -248,7 +247,11 @@ macro is executed, but still without altering the macro ring.
248macro the current macro and executes it twice, @kbd{C-x C-k C-v C-v 247macro the current macro and executes it twice, @kbd{C-x C-k C-v C-v
249C-v C-k C-k} will display and execute the 3rd previous macro once and 248C-v C-k C-k} will display and execute the 3rd previous macro once and
250then the current macro once. 249then the current macro once.
250@end ignore
251 251
252@ignore @c This is just too much feeping creaturism.
253 @c If you are reusing certain macros enough to want these,
254 @c you should give then names. -- rms
252@findex kmacro-delete-ring-head 255@findex kmacro-delete-ring-head
253@kindex C-x C-k C-d 256@kindex C-x C-k C-d
254 257
@@ -269,6 +272,7 @@ the macro ring.
269 272
270 The command @kbd{C-x C-k C-l} (@code{kmacro-call-ring-2nd-repeat}) 273 The command @kbd{C-x C-k C-l} (@code{kmacro-call-ring-2nd-repeat})
271executes the previous (rather than the head) element on the macro ring. 274executes the previous (rather than the head) element on the macro ring.
275@end ignore
272 276
273@vindex kmacro-ring-max 277@vindex kmacro-ring-max
274 The maximum number of macros stored in the keyboard macro ring is 278 The maximum number of macros stored in the keyboard macro ring is
@@ -277,6 +281,19 @@ determined by the customizable variable @code{kmacro-ring-max}.
277@node Keyboard Macro Counter 281@node Keyboard Macro Counter
278@section The Keyboard Macro Counter 282@section The Keyboard Macro Counter
279 283
284@table @kbd
285@item C-x C-k C-i
286Insert the keyboard macro counter value in the buffer
287(@code{kmacro-insert-counter}).
288@item C-x C-k C-c
289Set the keyboard macro counter (@code{kmacro-set-counter}).
290@item C-x C-k C-a
291Add the prefix arg to the keyboard macro counter (@code{kmacro-add-counter}).
292@item C-x C-k C-f
293Specify the format for inserting the keyboard macro counter
294(@code{kmacro-set-format}).
295@end table
296
280 Each keyboard macro has an associated counter. Normally, the 297 Each keyboard macro has an associated counter. Normally, the
281macro counter is initialized to 0 when you start defining the macro, 298macro counter is initialized to 0 when you start defining the macro,
282and incremented by 1 after each insertion of the counter value; 299and incremented by 1 after each insertion of the counter value;
@@ -364,6 +381,12 @@ numbers stored in registers.
364@node Keyboard Macro Query 381@node Keyboard Macro Query
365@section Executing Macros with Variations 382@section Executing Macros with Variations
366 383
384@table @kbd
385@item C-x q
386When this point is reached during macro execution, ask for confirmation
387(@code{kbd-macro-query}).
388@end table
389
367@kindex C-x q 390@kindex C-x q
368@findex kbd-macro-query 391@findex kbd-macro-query
369 Using @kbd{C-x q} (@code{kbd-macro-query}), you can get an effect 392 Using @kbd{C-x q} (@code{kbd-macro-query}), you can get an effect
@@ -408,6 +431,17 @@ register as a counter, incrementing it on each repetition of the macro.
408@node Save Keyboard Macro 431@node Save Keyboard Macro
409@section Naming and Saving Keyboard Macros 432@section Naming and Saving Keyboard Macros
410 433
434@table @kbd
435@item C-x C-k n
436Give a command name (for the duration of the Emacs session) to the most
437recently defined keyboard macro (@code{kmacro-name-last-macro}).
438@item C-x C-k b
439Bind the most recently defined keyboard macro to a key sequence (for
440the duration of the session) (@code{kmacro-bind-to-key}).
441@item M-x insert-kbd-macro
442Insert in the buffer a keyboard macro's definition, as Lisp code.
443@end table
444
411@cindex saving keyboard macros 445@cindex saving keyboard macros
412@findex kmacro-name-last-macro 446@findex kmacro-name-last-macro
413@kindex C-x C-k n 447@kindex C-x C-k n
@@ -434,7 +468,7 @@ bindings, you should select the key sequence carefully. If you try to
434bind to a key sequence with an existing binding (in any keymap), this 468bind to a key sequence with an existing binding (in any keymap), this
435command asks you for confirmation before replacing the existing binding. 469command asks you for confirmation before replacing the existing binding.
436 470
437To avoid problems caused by overriding existing bindings, the key 471 To avoid problems caused by overriding existing bindings, the key
438sequences @kbd{C-x C-k 0} through @kbd{C-x C-k 9} and @kbd{C-x C-k A} 472sequences @kbd{C-x C-k 0} through @kbd{C-x C-k 9} and @kbd{C-x C-k A}
439through @kbd{C-x C-k Z} are reserved for your own keyboard macro 473through @kbd{C-x C-k Z} are reserved for your own keyboard macro
440bindings. In fact, to bind to one of these key sequences, you only 474bindings. In fact, to bind to one of these key sequences, you only
@@ -474,6 +508,16 @@ when you load the file.
474@node Edit Keyboard Macro 508@node Edit Keyboard Macro
475@section Editing a Keyboard Macro 509@section Editing a Keyboard Macro
476 510
511@table @kbd
512@item C-x C-k C-e
513Edit the last defined keyboard macro (@code{kmacro-edit-macro}).
514@item C-x C-k e @var{name} @key{RET}
515Edit a previously defined keyboard macro @var{name} (@code{edit-kbd-macro}).
516@item C-x C-k l
517Edit the last 100 keystrokes as a keyboard macro
518(@code{kmacro-edit-lossage}).
519@end table
520
477@findex kmacro-edit-macro 521@findex kmacro-edit-macro
478@kindex C-x C-k C-e 522@kindex C-x C-k C-e
479@kindex C-x C-k RET 523@kindex C-x C-k RET
diff --git a/man/macos.texi b/man/macos.texi
index 3649c18040e..b4c09217092 100644
--- a/man/macos.texi
+++ b/man/macos.texi
@@ -130,7 +130,7 @@ One can still do copy and paste with another application from the Edit
130menu. 130menu.
131 131
132 On Mac, the role of the coding system for selection that is set by 132 On Mac, the role of the coding system for selection that is set by
133@code{set-selection-coding-system} (@pxref{Specify Coding}) is 133@code{set-selection-coding-system} (@pxref{Communication Coding}) is
134two-fold. First, it is used as a preferred coding system for the 134two-fold. First, it is used as a preferred coding system for the
135traditional text flavor that does not specify any particular encodings 135traditional text flavor that does not specify any particular encodings
136and is mainly used by applications on Mac OS Classic. Second, it 136and is mainly used by applications on Mac OS Classic. Second, it
diff --git a/man/major.texi b/man/major.texi
index 74613a24321..5bff7146ebe 100644
--- a/man/major.texi
+++ b/man/major.texi
@@ -65,10 +65,10 @@ because most lines in a program are usually indented
65most of the time Emacs determines which mode to use based on the file 65most of the time Emacs determines which mode to use based on the file
66name or on special text in the file. 66name or on special text in the file.
67 67
68 Explicit selection of a new major mode is done with a @kbd{M-x} command. 68 To explicitly select a new major, you use an @kbd{M-x} command.
69From the name of a major mode, add @code{-mode} to get the name of a 69Take the name of a major mode and add @code{-mode} to get the name of
70command to select that mode. Thus, you can enter Lisp mode by executing 70the command to select that mode. Thus, you can enter Lisp mode by
71@kbd{M-x lisp-mode}. 71executing @kbd{M-x lisp-mode}.
72 72
73@vindex auto-mode-alist 73@vindex auto-mode-alist
74 When you visit a file, Emacs usually chooses the right major mode based 74 When you visit a file, Emacs usually chooses the right major mode based
diff --git a/man/misc.texi b/man/misc.texi
index f1f19ea8b6a..cae58a9c7f4 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -419,7 +419,7 @@ the buffer @samp{*Async Shell Command*}. Output arrives in that
419buffer regardless of whether it is visible in a window. 419buffer regardless of whether it is visible in a window.
420 420
421 To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command 421 To specify a coding system for @kbd{M-!} or @kbd{M-|}, use the command
422@kbd{C-x @key{RET} c} immediately beforehand. @xref{Specify Coding}. 422@kbd{C-x @key{RET} c} immediately beforehand. @xref{Communication Coding}.
423 423
424@vindex shell-command-default-error-buffer 424@vindex shell-command-default-error-buffer
425 Error output from the command is normally intermixed with the regular 425 Error output from the command is normally intermixed with the regular
@@ -481,7 +481,7 @@ from. For example, if you use bash, the file sent to it is
481 To specify a coding system for the shell, you can use the command 481 To specify a coding system for the shell, you can use the command
482@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can also 482@kbd{C-x @key{RET} c} immediately before @kbd{M-x shell}. You can also
483specify a coding system after starting the shell by using @kbd{C-x 483specify a coding system after starting the shell by using @kbd{C-x
484@key{RET} p} in the shell buffer. @xref{Specify Coding}. 484@key{RET} p} in the shell buffer. @xref{Communication Coding}.
485 485
486@cindex @env{EMACS} environment variable 486@cindex @env{EMACS} environment variable
487 Unless the environment variable @env{EMACS} is already defined, 487 Unless the environment variable @env{EMACS} is already defined,
diff --git a/man/msdog.texi b/man/msdog.texi
index 1724a1103fb..58ce170a738 100644
--- a/man/msdog.texi
+++ b/man/msdog.texi
@@ -344,7 +344,7 @@ the usual carriage-return linefeed.
344 344
345@cindex DOS-to-Unix conversion of files 345@cindex DOS-to-Unix conversion of files
346 To visit a file and specify whether it uses DOS-style or Unix-style 346 To visit a file and specify whether it uses DOS-style or Unix-style
347end-of-line, specify a coding system (@pxref{Specify Coding}). For 347end-of-line, specify a coding system (@pxref{Text Coding}). For
348example, @kbd{C-x @key{RET} c unix @key{RET} C-x C-f foobar.txt} 348example, @kbd{C-x @key{RET} c unix @key{RET} C-x C-f foobar.txt}
349visits the file @file{foobar.txt} without converting the EOLs; if some 349visits the file @file{foobar.txt} without converting the EOLs; if some
350line ends with a carriage-return linefeed pair, Emacs will display 350line ends with a carriage-return linefeed pair, Emacs will display
@@ -719,7 +719,7 @@ visit a file written on a DOS machine in another country), use the
719the codepage, with completion, then creates the coding system for the 719the codepage, with completion, then creates the coding system for the
720specified codepage. You can then use the new coding system to read and 720specified codepage. You can then use the new coding system to read and
721write files, but you must specify it explicitly for the file command 721write files, but you must specify it explicitly for the file command
722when you want to use it (@pxref{Specify Coding}). 722when you want to use it (@pxref{Text Coding}).
723 723
724 These coding systems are also useful for visiting a file encoded using 724 These coding systems are also useful for visiting a file encoded using
725a DOS codepage, using Emacs running on some other operating system. 725a DOS codepage, using Emacs running on some other operating system.
diff --git a/man/mule.texi b/man/mule.texi
index fa5e1246f25..86f7bec0b9b 100644
--- a/man/mule.texi
+++ b/man/mule.texi
@@ -40,10 +40,7 @@ including European and Vietnamese variants of the Latin alphabet, as
40well as Cyrillic, Devanagari (for Hindi and Marathi), Ethiopic, Greek, 40well as Cyrillic, Devanagari (for Hindi and Marathi), Ethiopic, Greek,
41Han (for Chinese and Japanese), Hangul (for Korean), Hebrew, IPA, 41Han (for Chinese and Japanese), Hangul (for Korean), Hebrew, IPA,
42Kannada, Lao, Malayalam, Tamil, Thai, Tibetan, and Vietnamese scripts. 42Kannada, Lao, Malayalam, Tamil, Thai, Tibetan, and Vietnamese scripts.
43These features have been merged from the modified version of Emacs 43Emacs also supports various encodings of these characters used by
44known as MULE (for ``MULti-lingual Enhancement to GNU Emacs'')
45
46 Emacs also supports various encodings of these characters used by
47other internationalized software, such as word processors and mailers. 44other internationalized software, such as word processors and mailers.
48 45
49 Emacs allows editing text with international characters by supporting 46 Emacs allows editing text with international characters by supporting
@@ -57,15 +54,15 @@ compilers, spell-checkers, and mailers). Setting your language
57environment (@pxref{Language Environments}) takes care of setting up the 54environment (@pxref{Language Environments}) takes care of setting up the
58coding systems and other options for a specific language or culture. 55coding systems and other options for a specific language or culture.
59Alternatively, you can specify how Emacs should encode or decode text 56Alternatively, you can specify how Emacs should encode or decode text
60for each command; see @ref{Specify Coding}. 57for each command; see @ref{Text Coding}.
61 58
62@item 59@item
63You can display non-@acronym{ASCII} characters encoded by the various scripts. 60You can display non-@acronym{ASCII} characters encoded by the various
64This works by using appropriate fonts on X and similar graphics 61scripts. This works by using appropriate fonts on graphics displays
65displays (@pxref{Defining Fontsets}), and by sending special codes to 62(@pxref{Defining Fontsets}), and by sending special codes to text-only
66text-only displays (@pxref{Specify Coding}). If some characters are 63displays (@pxref{Terminal Coding}). If some characters are displayed
67displayed incorrectly, refer to @ref{Undisplayable Characters}, which 64incorrectly, refer to @ref{Undisplayable Characters}, which describes
68describes possible problems and explains how to solve them. 65possible problems and explains how to solve them.
69 66
70@item 67@item
71You can insert non-@acronym{ASCII} characters or search for them. To do that, 68You can insert non-@acronym{ASCII} characters or search for them. To do that,
@@ -73,12 +70,14 @@ you can specify an input method (@pxref{Select Input Method}) suitable
73for your language, or use the default input method set up when you set 70for your language, or use the default input method set up when you set
74your language environment. If 71your language environment. If
75your keyboard can produce non-@acronym{ASCII} characters, you can select an 72your keyboard can produce non-@acronym{ASCII} characters, you can select an
76appropriate keyboard coding system (@pxref{Specify Coding}), and Emacs 73appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs
77will accept those characters. Latin-1 characters can also be input by 74will accept those characters. Latin-1 characters can also be input by
78using the @kbd{C-x 8} prefix, see @ref{Single-Byte Character Support, 75using the @kbd{C-x 8} prefix, see @ref{Single-Byte Character Support,
79C-x 8}. On X Window systems, your locale should be set to an 76C-x 8}.
80appropriate value to make sure Emacs interprets keyboard input 77
81correctly; see @ref{Language Environments, locales}. 78On X Window systems, your locale should be set to an appropriate value
79to make sure Emacs interprets keyboard input correctly; see
80@ref{Language Environments, locales}.
82@end itemize 81@end itemize
83 82
84 The rest of this chapter describes these issues in detail. 83 The rest of this chapter describes these issues in detail.
@@ -93,7 +92,11 @@ correctly; see @ref{Language Environments, locales}.
93* Coding Systems:: Character set conversion when you read and 92* Coding Systems:: Character set conversion when you read and
94 write files, and so on. 93 write files, and so on.
95* Recognize Coding:: How Emacs figures out which conversion to use. 94* Recognize Coding:: How Emacs figures out which conversion to use.
96* Specify Coding:: Various ways to choose which conversion to use. 95* Text Coding:: Choosing conversion to use for file text.
96* Communication Coding:: Coding systems for interprocess communication.
97* File Name Coding:: Coding systems for file @emph{names}.
98* Terminal Coding:: Specifying coding systems for converting
99 terminal input and output.
97* Fontsets:: Fontsets are collections of fonts 100* Fontsets:: Fontsets are collections of fonts
98 that cover the whole spectrum of characters. 101 that cover the whole spectrum of characters.
99* Defining Fontsets:: Defining a new fontset. 102* Defining Fontsets:: Defining a new fontset.
@@ -106,15 +109,16 @@ correctly; see @ref{Language Environments, locales}.
106@node International Chars 109@node International Chars
107@section Introduction to International Character Sets 110@section Introduction to International Character Sets
108 111
109 The users of international character sets and scripts have established 112 The users of international character sets and scripts have
110many more-or-less standard coding systems for storing files. Emacs 113established many more-or-less standard coding systems for storing
111internally uses a single multibyte character encoding, so that it can 114files. Emacs internally uses a single multibyte character encoding,
112intermix characters from all these scripts in a single buffer or string. 115so that it can intermix characters from all these scripts in a single
113This encoding represents each non-@acronym{ASCII} character as a sequence of bytes 116buffer or string. This encoding represents each non-@acronym{ASCII}
114in the range 0200 through 0377. Emacs translates between the multibyte 117character as a sequence of bytes in the range 0200 through 0377.
115character encoding and various other coding systems when reading and 118Emacs translates between the multibyte character encoding and various
116writing files, when exchanging data with subprocesses, and (in some 119other coding systems when reading and writing files, when exchanging
117cases) in the @kbd{C-q} command (@pxref{Multibyte Conversion}). 120data with subprocesses, and (in some cases) in the @kbd{C-q} command
121(@pxref{Multibyte Conversion}).
118 122
119@kindex C-h h 123@kindex C-h h
120@findex view-hello-file 124@findex view-hello-file
@@ -138,23 +142,24 @@ to multibyte characters, coding systems, and input methods.
138@node Enabling Multibyte 142@node Enabling Multibyte
139@section Enabling Multibyte Characters 143@section Enabling Multibyte Characters
140 144
141@cindex turn multibyte support on or off
142 You can enable or disable multibyte character support, either for
143Emacs as a whole, or for a single buffer. When multibyte characters are
144disabled in a buffer, then each byte in that buffer represents a
145character, even codes 0200 through 0377. The old features for
146supporting the European character sets, ISO Latin-1 and ISO Latin-2,
147work as they did in Emacs 19 and also work for the other ISO 8859
148character sets.
149
150 However, there is no need to turn off multibyte character support to
151use ISO Latin; the Emacs multibyte character set includes all the
152characters in these character sets, and Emacs can translate
153automatically to and from the ISO codes.
154
155 By default, Emacs starts in multibyte mode, because that allows you to 145 By default, Emacs starts in multibyte mode, because that allows you to
156use all the supported languages and scripts without limitations. 146use all the supported languages and scripts without limitations.
157 147
148@cindex turn multibyte support on or off
149 You can enable or disable multibyte character support, either for
150Emacs as a whole, or for a single buffer. When multibyte characters
151are disabled in a buffer, we call that @dfn{unibyte mode}. Then each
152byte in that buffer represents a character, even codes 0200 through
1530377.
154
155 The old features for supporting the European character sets, ISO
156Latin-1 and ISO Latin-2, work in unibyte mode as they did in Emacs 19
157and also work for the other ISO 8859 character sets. However, there
158is no need to turn off multibyte character support to use ISO Latin;
159the Emacs multibyte character set includes all the characters in these
160character sets, and Emacs can translate automatically to and from the
161ISO codes.
162
158 To edit a particular file in unibyte representation, visit it using 163 To edit a particular file in unibyte representation, visit it using
159@code{find-file-literally}. @xref{Visiting}. To convert a buffer in 164@code{find-file-literally}. @xref{Visiting}. To convert a buffer in
160multibyte representation into a single-byte representation of the same 165multibyte representation into a single-byte representation of the same
@@ -162,7 +167,7 @@ characters, the easiest way is to save the contents in a file, kill the
162buffer, and find the file again with @code{find-file-literally}. You 167buffer, and find the file again with @code{find-file-literally}. You
163can also use @kbd{C-x @key{RET} c} 168can also use @kbd{C-x @key{RET} c}
164(@code{universal-coding-system-argument}) and specify @samp{raw-text} as 169(@code{universal-coding-system-argument}) and specify @samp{raw-text} as
165the coding system with which to find or save a file. @xref{Specify 170the coding system with which to find or save a file. @xref{Text
166Coding}. Finding a file as @samp{raw-text} doesn't disable format 171Coding}. Finding a file as @samp{raw-text} doesn't disable format
167conversion, uncompression and auto mode selection as 172conversion, uncompression and auto mode selection as
168@code{find-file-literally} does. 173@code{find-file-literally} does.
@@ -209,8 +214,8 @@ load a Lisp file as unibyte, on any one occasion, by typing @kbd{C-x
209 The mode line indicates whether multibyte character support is enabled 214 The mode line indicates whether multibyte character support is enabled
210in the current buffer. If it is, there are two or more characters (most 215in the current buffer. If it is, there are two or more characters (most
211often two dashes) before the colon near the beginning of the mode line. 216often two dashes) before the colon near the beginning of the mode line.
212When multibyte characters are not enabled, just one dash precedes the 217When multibyte characters are not enabled, nothing precedes the colon
213colon. 218except a single dash.
214 219
215@node Language Environments 220@node Language Environments
216@section Language Environments 221@section Language Environments
@@ -314,12 +319,12 @@ file.
314@findex describe-language-environment 319@findex describe-language-environment
315 To display information about the effects of a certain language 320 To display information about the effects of a certain language
316environment @var{lang-env}, use the command @kbd{C-h L @var{lang-env} 321environment @var{lang-env}, use the command @kbd{C-h L @var{lang-env}
317@key{RET}} (@code{describe-language-environment}). This tells you which 322@key{RET}} (@code{describe-language-environment}). This tells you
318languages this language environment is useful for, and lists the 323which languages this language environment is useful for, and lists the
319character sets, coding systems, and input methods that go with it. It 324character sets, coding systems, and input methods that go with it. It
320also shows some sample text to illustrate scripts used in this language 325also shows some sample text to illustrate scripts used in this
321environment. By default, this command describes the chosen language 326language environment. If you give an empty input for @var{lang-env},
322environment. 327this command describes the chosen language environment.
323 328
324@vindex set-language-environment-hook 329@vindex set-language-environment-hook
325 You can customize any language environment with the normal hook 330 You can customize any language environment with the normal hook
@@ -483,9 +488,9 @@ language environment that it is meant to be used with. The variable
483 488
484@findex toggle-input-method 489@findex toggle-input-method
485@kindex C-\ 490@kindex C-\
486 Input methods use various sequences of @acronym{ASCII} characters to stand for 491 Input methods use various sequences of @acronym{ASCII} characters to
487non-@acronym{ASCII} characters. Sometimes it is useful to turn off the input 492stand for non-@acronym{ASCII} characters. Sometimes it is useful to
488method temporarily. To do this, type @kbd{C-\} 493turn off the input method temporarily. To do this, type @kbd{C-\}
489(@code{toggle-input-method}). To reenable the input method, type 494(@code{toggle-input-method}). To reenable the input method, type
490@kbd{C-\} again. 495@kbd{C-\} again.
491 496
@@ -674,13 +679,14 @@ variants @code{iso-latin-1-unix}, @code{iso-latin-1-dos} and
674@code{iso-latin-1-mac}. 679@code{iso-latin-1-mac}.
675 680
676 The coding system @code{raw-text} is good for a file which is mainly 681 The coding system @code{raw-text} is good for a file which is mainly
677@acronym{ASCII} text, but may contain byte values above 127 which are not meant to 682@acronym{ASCII} text, but may contain byte values above 127 which are
678encode non-@acronym{ASCII} characters. With @code{raw-text}, Emacs copies those 683not meant to encode non-@acronym{ASCII} characters. With
679byte values unchanged, and sets @code{enable-multibyte-characters} to 684@code{raw-text}, Emacs copies those byte values unchanged, and sets
680@code{nil} in the current buffer so that they will be interpreted 685@code{enable-multibyte-characters} to @code{nil} in the current buffer
681properly. @code{raw-text} handles end-of-line conversion in the usual 686so that they will be interpreted properly. @code{raw-text} handles
682way, based on the data encountered, and has the usual three variants to 687end-of-line conversion in the usual way, based on the data
683specify the kind of end-of-line conversion to use. 688encountered, and has the usual three variants to specify the kind of
689end-of-line conversion to use.
684 690
685 In contrast, the coding system @code{no-conversion} specifies no 691 In contrast, the coding system @code{no-conversion} specifies no
686character code conversion at all---none for non-@acronym{ASCII} byte values and 692character code conversion at all---none for non-@acronym{ASCII} byte values and
@@ -822,16 +828,16 @@ pattern, are decoded correctly. One of the builtin
822 828
823 If Emacs recognizes the encoding of a file incorrectly, you can 829 If Emacs recognizes the encoding of a file incorrectly, you can
824reread the file using the correct coding system by typing @kbd{C-x 830reread the file using the correct coding system by typing @kbd{C-x
825@key{RET} r @var{coding-system} 831@key{RET} r @var{coding-system} @key{RET}}. To see what coding system
826@key{RET}}. To see what coding system Emacs actually used to decode 832Emacs actually used to decode the file, look at the coding system
827the file, look at the coding system mnemonic letter near the left edge 833mnemonic letter near the left edge of the mode line (@pxref{Mode
828of the mode line (@pxref{Mode Line}), or type @kbd{C-h C @key{RET}}. 834Line}), or type @kbd{C-h C @key{RET}}.
829 835
830@findex unify-8859-on-decoding-mode 836@findex unify-8859-on-decoding-mode
831 The command @code{unify-8859-on-decoding-mode} enables a mode that 837 The command @code{unify-8859-on-decoding-mode} enables a mode that
832``unifies'' the Latin alphabets when decoding text. This works by 838``unifies'' the Latin alphabets when decoding text. This works by
833converting all non-@acronym{ASCII} Latin-@var{n} characters to either Latin-1 or 839converting all non-@acronym{ASCII} Latin-@var{n} characters to either
834Unicode characters. This way it is easier to use various 840Latin-1 or Unicode characters. This way it is easier to use various
835Latin-@var{n} alphabets together. In a future Emacs version we hope 841Latin-@var{n} alphabets together. In a future Emacs version we hope
836to move towards full Unicode support and complete unification of 842to move towards full Unicode support and complete unification of
837character sets. 843character sets.
@@ -843,7 +849,7 @@ system, by default, for operations that write from this buffer into a
843file. This includes the commands @code{save-buffer} and 849file. This includes the commands @code{save-buffer} and
844@code{write-region}. If you want to write files from this buffer using 850@code{write-region}. If you want to write files from this buffer using
845a different coding system, you can specify a different coding system for 851a different coding system, you can specify a different coding system for
846the buffer using @code{set-buffer-file-coding-system} (@pxref{Specify 852the buffer using @code{set-buffer-file-coding-system} (@pxref{Text
847Coding}). 853Coding}).
848 854
849 You can insert any possible character into any Emacs buffer, but 855 You can insert any possible character into any Emacs buffer, but
@@ -901,11 +907,12 @@ default value is @code{nil}, which means that Rmail files are not
901translated (they are read and written in the Emacs internal character 907translated (they are read and written in the Emacs internal character
902code). 908code).
903 909
904@node Specify Coding 910@node Text Coding
905@section Specifying a Coding System 911@section Specifying a Coding System for File Text
906 912
907 In cases where Emacs does not automatically choose the right coding 913 In cases where Emacs does not automatically choose the right coding
908system, you can use these commands to specify one: 914system for a file's contents, you can use these commands to specify
915one:
909 916
910@table @kbd 917@table @kbd
911@item C-x @key{RET} f @var{coding} @key{RET} 918@item C-x @key{RET} f @var{coding} @key{RET}
@@ -919,32 +926,9 @@ command.
919@item C-x @key{RET} r @var{coding} @key{RET} 926@item C-x @key{RET} r @var{coding} @key{RET}
920Revisit the current file using the coding system @var{coding}. 927Revisit the current file using the coding system @var{coding}.
921 928
922@item C-x @key{RET} k @var{coding} @key{RET} 929@item M-x recode-region @key{RET} @var{right} @key{RET} @var{wrong} @key{RET}
923Use coding system @var{coding} for keyboard input. 930Convert a region that was decoded using coding system @var{wrong},
924 931decoding it using coding system @var{right} instead.
925@item C-x @key{RET} t @var{coding} @key{RET}
926Use coding system @var{coding} for terminal output.
927
928@item C-x @key{RET} p @var{input-coding} @key{RET} @var{output-coding} @key{RET}
929Use coding systems @var{input-coding} and @var{output-coding} for
930subprocess input and output in the current buffer.
931
932@item C-x @key{RET} x @var{coding} @key{RET}
933Use coding system @var{coding} for transferring selections to and from
934other programs through the window system.
935
936@item C-x @key{RET} F @var{coding} @key{RET}
937Use coding system @var{coding} for encoding and decoding file
938@emph{names}. This affects the use of non-ASCII characters in file
939names. It has no effect on reading and writing the @emph{contents} of
940files.
941
942@item C-x @key{RET} X @var{coding} @key{RET}
943Use coding system @var{coding} for transferring @emph{one}
944selection---the next one---to or from the window system.
945
946@item M-x recode-region
947Convert the region from a previous coding system to a new one.
948@end table 932@end table
949 933
950@kindex C-x RET f 934@kindex C-x RET f
@@ -978,10 +962,9 @@ contains characters that the coding system cannot handle.
978 Other file commands affected by a specified coding system include 962 Other file commands affected by a specified coding system include
979@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants 963@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants
980of @kbd{C-x C-f}. @kbd{C-x @key{RET} c} also affects commands that 964of @kbd{C-x C-f}. @kbd{C-x @key{RET} c} also affects commands that
981start subprocesses, including @kbd{M-x shell} (@pxref{Shell}). 965start subprocesses, including @kbd{M-x shell} (@pxref{Shell}). If the
982 966immediately following command does not use the coding system, then
983 If the immediately following command does not use the coding system, 967@kbd{C-x @key{RET} c} ultimately has no effect.
984then @kbd{C-x @key{RET} c} ultimately has no effect.
985 968
986 An easy way to visit a file with no conversion is with the @kbd{M-x 969 An easy way to visit a file with no conversion is with the @kbd{M-x
987find-file-literally} command. @xref{Visiting}. 970find-file-literally} command. @xref{Visiting}.
@@ -1000,62 +983,45 @@ environment.
1000with @kbd{C-x @key{RET} r} (@code{revert-buffer-with-coding-system}). 983with @kbd{C-x @key{RET} r} (@code{revert-buffer-with-coding-system}).
1001This visits the current file again, using a coding system you specify. 984This visits the current file again, using a coding system you specify.
1002 985
1003@kindex C-x RET t 986@findex recode-region
1004@findex set-terminal-coding-system 987 If a piece of text has already been inserted into a buffer using the
1005 The command @kbd{C-x @key{RET} t} (@code{set-terminal-coding-system}) 988wrong coding system, you can redo the decoding of it using @kbd{M-x
1006specifies the coding system for terminal output. If you specify a 989recode-region}. This prompts you for the proper coding system, then
1007character code for terminal output, all characters output to the 990for the wrong coding system that was actually used, and does the
1008terminal are translated into that coding system. 991conversion. It first encodes the region using the wrong coding system,
992then decodes it again using the proper coding system.
1009 993
1010 This feature is useful for certain character-only terminals built to 994@node Communication Coding
1011support specific languages or character sets---for example, European 995@section Coding Systems for Interprocess Communication
1012terminals that support one of the ISO Latin character sets. You need to
1013specify the terminal coding system when using multibyte text, so that
1014Emacs knows which characters the terminal can actually handle.
1015 996
1016 By default, output to the terminal is not translated at all, unless 997 This section explains how to specify coding systems for use
1017Emacs can deduce the proper coding system from your terminal type or 998in communication with other processes.
1018your locale specification (@pxref{Language Environments}).
1019
1020@kindex C-x RET k
1021@findex set-keyboard-coding-system
1022@vindex keyboard-coding-system
1023 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system})
1024or the variable @code{keyboard-coding-system} specifies the coding
1025system for keyboard input. Character-code translation of keyboard
1026input is useful for terminals with keys that send non-@acronym{ASCII}
1027graphic characters---for example, some terminals designed for ISO
1028Latin-1 or subsets of it.
1029 999
1030 By default, keyboard input is translated based on your system locale 1000@table @kbd
1031setting. If your terminal does not really support the encoding 1001@item C-x @key{RET} x @var{coding} @key{RET}
1032implied by your locale (for example, if you find it inserts a 1002Use coding system @var{coding} for transferring selections to and from
1033non-@acronym{ASCII} character if you type @kbd{M-i}), you will need to set 1003other programs through the window system.
1034@code{keyboard-coding-system} to @code{nil} to turn off encoding.
1035You can do this by putting
1036 1004
1037@lisp 1005@item C-x @key{RET} X @var{coding} @key{RET}
1038(set-keyboard-coding-system nil) 1006Use coding system @var{coding} for transferring @emph{one}
1039@end lisp 1007selection---the next one---to or from the window system.
1040 1008
1041@noindent 1009@item C-x @key{RET} p @var{input-coding} @key{RET} @var{output-coding} @key{RET}
1042in your @file{~/.emacs} file. 1010Use coding systems @var{input-coding} and @var{output-coding} for
1011subprocess input and output in the current buffer.
1043 1012
1044 There is a similarity between using a coding system translation for 1013@item C-x @key{RET} c @var{coding} @key{RET}
1045keyboard input, and using an input method: both define sequences of 1014Specify coding system @var{coding} for the immediately following
1046keyboard input that translate into single characters. However, input 1015command.
1047methods are designed to be convenient for interactive use by humans, and 1016@end table
1048the sequences that are translated are typically sequences of @acronym{ASCII}
1049printing characters. Coding systems typically translate sequences of
1050non-graphic characters.
1051 1017
1052@kindex C-x RET x 1018@kindex C-x RET x
1053@kindex C-x RET X 1019@kindex C-x RET X
1054@findex set-selection-coding-system 1020@findex set-selection-coding-system
1055@findex set-next-selection-coding-system 1021@findex set-next-selection-coding-system
1056 The command @kbd{C-x @key{RET} x} (@code{set-selection-coding-system}) 1022 The command @kbd{C-x @key{RET} x} (@code{set-selection-coding-system})
1057specifies the coding system for sending selected text to the window 1023specifies the coding system for sending selected text to other windowing
1058system, and for receiving the text of selections made in other 1024applications, and for receiving the text of selections made in other
1059applications. This command applies to all subsequent selections, until 1025applications. This command applies to all subsequent selections, until
1060you override it by using the command again. The command @kbd{C-x 1026you override it by using the command again. The command @kbd{C-x
1061@key{RET} X} (@code{set-next-selection-coding-system}) specifies the 1027@key{RET} X} (@code{set-next-selection-coding-system}) specifies the
@@ -1070,33 +1036,56 @@ own buffer, and thus you can use this command to specify translation to
1070and from a particular subprocess by giving the command in the 1036and from a particular subprocess by giving the command in the
1071corresponding buffer. 1037corresponding buffer.
1072 1038
1039 You can also use @kbd{C-x @key{RET} c} just before the command that
1040runs or starts a subprocess, to specify the coding system to use for
1041communication with that subprocess.
1042
1073 The default for translation of process input and output depends on the 1043 The default for translation of process input and output depends on the
1074current language environment. 1044current language environment.
1075 1045
1076@findex recode-region 1046@vindex locale-coding-system
1077 If a piece of text has already been inserted into a buffer using the 1047@cindex decoding non-@acronym{ASCII} keyboard input on X
1078wrong coding system, you can decode it again using @kbd{M-x 1048 The variable @code{locale-coding-system} specifies a coding system
1079recode-region}. This prompts you for the old coding system and the 1049to use when encoding and decoding system strings such as system error
1080desired coding system, and acts on the text in the region. 1050messages and @code{format-time-string} formats and time stamps. That
1051coding system is also used for decoding non-@acronym{ASCII} keyboard input on X
1052Window systems. You should choose a coding system that is compatible
1053with the underlying system's text representation, which is normally
1054specified by one of the environment variables @env{LC_ALL},
1055@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order
1056specified above, whose value is nonempty is the one that determines
1057the text representation.)
1058
1059@node File Name Coding
1060@section Coding Systems for File Names
1061
1062@table @kbd
1063@item C-x @key{RET} F @var{coding} @key{RET}
1064Use coding system @var{coding} for encoding and decoding file
1065@emph{names}.
1066@end table
1081 1067
1082@vindex file-name-coding-system 1068@vindex file-name-coding-system
1083@cindex file names with non-@acronym{ASCII} characters 1069@cindex file names with non-@acronym{ASCII} characters
1070 The variable @code{file-name-coding-system} specifies a coding
1071system to use for encoding file names. It has no effect on reading
1072and writing the @emph{contents} of files.
1073
1084@findex set-file-name-coding-system 1074@findex set-file-name-coding-system
1085@kindex C-x @key{RET} F 1075@kindex C-x @key{RET} F
1086 The variable @code{file-name-coding-system} specifies a coding 1076 If you set the variable to a coding system name (as a Lisp symbol or
1087system to use for encoding file names. If you set the variable to a 1077a string), Emacs encodes file names using that coding system for all
1088coding system name (as a Lisp symbol or a string), Emacs encodes file 1078file operations. This makes it possible to use non-@acronym{ASCII}
1089names using that coding system for all file operations. This makes it 1079characters in file names---or, at least, those non-@acronym{ASCII}
1090possible to use non-@acronym{ASCII} characters in file names---or, at 1080characters which the specified coding system can encode. Use @kbd{C-x
1091least, those non-@acronym{ASCII} characters which the specified coding 1081@key{RET} F} (@code{set-file-name-coding-system}) to specify this
1092system can encode. Use @kbd{C-x @key{RET} F} 1082interactively.
1093(@code{set-file-name-coding-system}) to specify this interactively. 1083
1094 1084 If @code{file-name-coding-system} is @code{nil}, Emacs uses a
1095 If @code{file-name-coding-system} is @code{nil}, Emacs uses a default 1085default coding system determined by the selected language environment.
1096coding system determined by the selected language environment. In the 1086In the default language environment, any non-@acronym{ASCII}
1097default language environment, any non-@acronym{ASCII} characters in file names are 1087characters in file names are not encoded specially; they appear in the
1098not encoded specially; they appear in the file system using the internal 1088file system using the internal Emacs representation.
1099Emacs representation.
1100 1089
1101 @strong{Warning:} if you change @code{file-name-coding-system} (or the 1090 @strong{Warning:} if you change @code{file-name-coding-system} (or the
1102language environment) in the middle of an Emacs session, problems can 1091language environment) in the middle of an Emacs session, problems can
@@ -1113,28 +1102,75 @@ C-w} to specify a new file name for that buffer.
1113system. This prompts for an existing file name, its old coding 1102system. This prompts for an existing file name, its old coding
1114system, and the coding system to which you wish to convert. 1103system, and the coding system to which you wish to convert.
1115 1104
1116@vindex locale-coding-system 1105@node Terminal Coding
1117@cindex decoding non-@acronym{ASCII} keyboard input on X 1106@section Coding Systems for Terminal I/O
1118 The variable @code{locale-coding-system} specifies a coding system 1107
1119to use when encoding and decoding system strings such as system error 1108@table @kbd
1120messages and @code{format-time-string} formats and time stamps. That 1109@item C-x @key{RET} k @var{coding} @key{RET}
1121coding system is also used for decoding non-@acronym{ASCII} keyboard input on X 1110Use coding system @var{coding} for keyboard input.
1122Window systems. You should choose a coding system that is compatible 1111
1123with the underlying system's text representation, which is normally 1112@item C-x @key{RET} t @var{coding} @key{RET}
1124specified by one of the environment variables @env{LC_ALL}, 1113Use coding system @var{coding} for terminal output.
1125@env{LC_CTYPE}, and @env{LANG}. (The first one, in the order 1114@end table
1126specified above, whose value is nonempty is the one that determines 1115
1127the text representation.) 1116@kindex C-x RET t
1117@findex set-terminal-coding-system
1118 The command @kbd{C-x @key{RET} t} (@code{set-terminal-coding-system})
1119specifies the coding system for terminal output. If you specify a
1120character code for terminal output, all characters output to the
1121terminal are translated into that coding system.
1122
1123 This feature is useful for certain character-only terminals built to
1124support specific languages or character sets---for example, European
1125terminals that support one of the ISO Latin character sets. You need to
1126specify the terminal coding system when using multibyte text, so that
1127Emacs knows which characters the terminal can actually handle.
1128
1129 By default, output to the terminal is not translated at all, unless
1130Emacs can deduce the proper coding system from your terminal type or
1131your locale specification (@pxref{Language Environments}).
1132
1133@kindex C-x RET k
1134@findex set-keyboard-coding-system
1135@vindex keyboard-coding-system
1136 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system})
1137or the variable @code{keyboard-coding-system} specifies the coding
1138system for keyboard input. Character-code translation of keyboard
1139input is useful for terminals with keys that send non-@acronym{ASCII}
1140graphic characters---for example, some terminals designed for ISO
1141Latin-1 or subsets of it.
1142
1143 By default, keyboard input is translated based on your system locale
1144setting. If your terminal does not really support the encoding
1145implied by your locale (for example, if you find it inserts a
1146non-@acronym{ASCII} character if you type @kbd{M-i}), you will need to set
1147@code{keyboard-coding-system} to @code{nil} to turn off encoding.
1148You can do this by putting
1149
1150@lisp
1151(set-keyboard-coding-system nil)
1152@end lisp
1153
1154@noindent
1155in your @file{~/.emacs} file.
1156
1157 There is a similarity between using a coding system translation for
1158keyboard input, and using an input method: both define sequences of
1159keyboard input that translate into single characters. However, input
1160methods are designed to be convenient for interactive use by humans, and
1161the sequences that are translated are typically sequences of @acronym{ASCII}
1162printing characters. Coding systems typically translate sequences of
1163non-graphic characters.
1128 1164
1129@node Fontsets 1165@node Fontsets
1130@section Fontsets 1166@section Fontsets
1131@cindex fontsets 1167@cindex fontsets
1132 1168
1133 A font for X typically defines shapes for a single alphabet or script. 1169 A font for X Windows typically defines shapes for a single alphabet
1134Therefore, displaying the entire range of scripts that Emacs supports 1170or script. Therefore, displaying the entire range of scripts that
1135requires a collection of many fonts. In Emacs, such a collection is 1171Emacs supports requires a collection of many fonts. In Emacs, such a
1136called a @dfn{fontset}. A fontset is defined by a list of fonts, each 1172collection is called a @dfn{fontset}. A fontset is defined by a list
1137assigned to handle a range of character codes. 1173of fonts, each assigned to handle a range of character codes.
1138 1174
1139 Each fontset has a name, like a font. The available X fonts are 1175 Each fontset has a name, like a font. The available X fonts are
1140defined by the X server; fontsets, however, are defined within Emacs 1176defined by the X server; fontsets, however, are defined within Emacs
@@ -1148,11 +1184,11 @@ additional font support.}
1148 1184
1149 Emacs creates two fontsets automatically: the @dfn{standard fontset} 1185 Emacs creates two fontsets automatically: the @dfn{standard fontset}
1150and the @dfn{startup fontset}. The standard fontset is most likely to 1186and the @dfn{startup fontset}. The standard fontset is most likely to
1151have fonts for a wide variety of non-@acronym{ASCII} characters; however, this is 1187have fonts for a wide variety of non-@acronym{ASCII} characters;
1152not the default for Emacs to use. (By default, Emacs tries to find a 1188however, this is not the default for Emacs to use. (By default, Emacs
1153font that has bold and italic variants.) You can specify use of the 1189tries to find a font that has bold and italic variants.) You can
1154standard fontset with the @samp{-fn} option, or with the @samp{Font} X 1190specify use of the standard fontset with the @samp{-fn} option, or
1155resource (@pxref{Font X}). For example, 1191with the @samp{Font} X resource (@pxref{Font X}). For example,
1156 1192
1157@example 1193@example
1158emacs -fn fontset-standard 1194emacs -fn fontset-standard
@@ -1295,13 +1331,13 @@ call this function explicitly to create a fontset.
1295@section Undisplayable Characters 1331@section Undisplayable Characters
1296 1332
1297 There may be a some non-@acronym{ASCII} characters that your terminal cannot 1333 There may be a some non-@acronym{ASCII} characters that your terminal cannot
1298display. Most non-windowing terminals support just a single character 1334display. Most text-only terminals support just a single character
1299set (use the variable @code{default-terminal-coding-system} 1335set (use the variable @code{default-terminal-coding-system}
1300(@pxref{Specify Coding}) to tell Emacs which one); characters which 1336(@pxref{Terminal Coding}) to tell Emacs which one); characters which
1301can't be encoded in that coding system are displayed as @samp{?} by 1337can't be encoded in that coding system are displayed as @samp{?} by
1302default. 1338default.
1303 1339
1304 Windowing terminals can display a broader range of characters, but 1340 Graphical displays can display a broader range of characters, but
1305you may not have fonts installed for all of them; characters that have 1341you may not have fonts installed for all of them; characters that have
1306no font appear as a hollow box. 1342no font appear as a hollow box.
1307 1343
@@ -1335,8 +1371,8 @@ such as @samp{Latin-@var{n}}.
1335 1371
1336 For more information about unibyte operation, see @ref{Enabling 1372 For more information about unibyte operation, see @ref{Enabling
1337Multibyte}. Note particularly that you probably want to ensure that 1373Multibyte}. Note particularly that you probably want to ensure that
1338your initialization files are read as unibyte if they contain non-@acronym{ASCII} 1374your initialization files are read as unibyte if they contain
1339characters. 1375non-@acronym{ASCII} characters.
1340 1376
1341@vindex unibyte-display-via-language-environment 1377@vindex unibyte-display-via-language-environment
1342 Emacs can also display those characters, provided the terminal or font 1378 Emacs can also display those characters, provided the terminal or font
@@ -1377,11 +1413,11 @@ If your keyboard can generate character codes 128 (decimal) and up,
1377representing non-@acronym{ASCII} characters, you can type those character codes 1413representing non-@acronym{ASCII} characters, you can type those character codes
1378directly. 1414directly.
1379 1415
1380On a window system, you should not need to do anything special to use 1416On a graphical display, you should not need to do anything special to use
1381these keys; they should simply work. On a text-only terminal, you 1417these keys; they should simply work. On a text-only terminal, you
1382should use the command @code{M-x set-keyboard-coding-system} or the 1418should use the command @code{M-x set-keyboard-coding-system} or the
1383variable @code{keyboard-coding-system} to specify which coding system 1419variable @code{keyboard-coding-system} to specify which coding system
1384your keyboard uses (@pxref{Specify Coding}). Enabling this feature 1420your keyboard uses (@pxref{Terminal Coding}). Enabling this feature
1385will probably require you to use @kbd{ESC} to type Meta characters; 1421will probably require you to use @kbd{ESC} to type Meta characters;
1386however, on a console terminal or in @code{xterm}, you can arrange for 1422however, on a console terminal or in @code{xterm}, you can arrange for
1387Meta to be converted to @kbd{ESC} and still be able type 8-bit 1423Meta to be converted to @kbd{ESC} and still be able type 8-bit
@@ -1417,11 +1453,11 @@ Use @kbd{C-x 8 C-h} to list all the available @kbd{C-x 8} translations.
1417 Emacs groups all supported characters into disjoint @dfn{charsets}. 1453 Emacs groups all supported characters into disjoint @dfn{charsets}.
1418Each character code belongs to one and only one charset. For 1454Each character code belongs to one and only one charset. For
1419historical reasons, Emacs typically divides an 8-bit character code 1455historical reasons, Emacs typically divides an 8-bit character code
1420for an extended version of @acronym{ASCII} into two charsets: @acronym{ASCII}, which 1456for an extended version of @acronym{ASCII} into two charsets:
1421covers the codes 0 through 127, plus another charset which covers the 1457@acronym{ASCII}, which covers the codes 0 through 127, plus another
1422``right-hand part'' (the codes 128 and up). For instance, the 1458charset which covers the ``right-hand part'' (the codes 128 and up).
1423characters of Latin-1 include the Emacs charset @code{ascii} plus the 1459For instance, the characters of Latin-1 include the Emacs charset
1424Emacs charset @code{latin-iso8859-1}. 1460@code{ascii} plus the Emacs charset @code{latin-iso8859-1}.
1425 1461
1426 Emacs characters belonging to different charsets may look the same, 1462 Emacs characters belonging to different charsets may look the same,
1427but they are still different characters. For example, the letter 1463but they are still different characters. For example, the letter
diff --git a/man/windows.texi b/man/windows.texi
index ecd13de7286..53cef3d3cbc 100644
--- a/man/windows.texi
+++ b/man/windows.texi
@@ -29,24 +29,24 @@ one frame.
29 29
30 Each Emacs window displays one Emacs buffer at any time. A single 30 Each Emacs window displays one Emacs buffer at any time. A single
31buffer may appear in more than one window; if it does, any changes in 31buffer may appear in more than one window; if it does, any changes in
32its text are displayed in all the windows where it appears. But the 32its text are displayed in all the windows where it appears. But these
33windows showing the same buffer can show different parts of it, because 33windows can show different parts of the buffer, because each window
34each window has its own value of point. 34has its own value of point.
35 35
36@cindex selected window 36@cindex selected window
37 At any time, one of the windows is the @dfn{selected window}; the 37 At any time, one Emacs window is the @dfn{selected window}; the
38buffer this window is displaying is the current buffer. The terminal's 38buffer this window is displaying is the current buffer. The terminal's
39cursor shows the location of point in this window. Each other window 39cursor shows the location of point in this window. Each other window
40has a location of point as well. On text-only terminals, there is no 40has a location of point as well. On text-only terminals, there is no
41way to show where those locations are, since the terminal has only one 41way to show where those locations are, since the terminal has only one
42cursor. If you are using a window system, the location of point in a 42cursor. On a graphical display, the location of point in a
43non-selected window is indicated by a hollow box. The cursor in the 43non-selected window is indicated by a hollow box; the cursor in the
44selected window is blinking or solid. 44selected window is blinking or solid.
45 45
46 Commands to move point affect the value of point for the selected Emacs 46 Commands to move point affect the value of point for the selected Emacs
47window only. They do not change the value of point in any other Emacs 47window only. They do not change the value of point in other Emacs
48window, even one showing the same buffer. The same is true for commands 48windows, even those showing the same buffer. The same is true for commands
49such as @kbd{C-x b} to change the current buffer in the selected window; 49such as @kbd{C-x b} to switch buffers in the selected window;
50they do not affect other windows at all. However, there are other commands 50they do not affect other windows at all. However, there are other commands
51such as @kbd{C-x 4 b} that select a different window and switch buffers in 51such as @kbd{C-x 4 b} that select a different window and switch buffers in
52it. Also, all commands that display information in a window, including 52it. Also, all commands that display information in a window, including
@@ -129,8 +129,7 @@ inevitable. If this variable is @code{nil}, then @kbd{C-x 2} tries to
129avoid scrolling the text currently visible on the screen, by putting 129avoid scrolling the text currently visible on the screen, by putting
130point in each window at a position already visible in the window. It 130point in each window at a position already visible in the window. It
131also selects whichever window contains the screen line that the cursor 131also selects whichever window contains the screen line that the cursor
132was previously on. Some users prefer the latter mode on slow 132was previously on. Some users prefer that mode on slow terminals.
133terminals.
134 133
135@node Other Window 134@node Other Window
136@section Using Other Windows 135@section Using Other Windows
@@ -283,17 +282,6 @@ Shrink this window if its buffer doesn't need so many lines
283(@code{shrink-window-if-larger-than-buffer}). 282(@code{shrink-window-if-larger-than-buffer}).
284@item C-x + 283@item C-x +
285Make all windows the same height (@code{balance-windows}). 284Make all windows the same height (@code{balance-windows}).
286@item Drag-Mouse-1
287Dragging a window's mode line up or down with @kbd{Mouse-1} changes
288window heights.
289@item Mouse-2
290@kbd{Mouse-2} in a window's mode line deletes all other windows in the frame
291(@code{mouse-delete-other-windows}).
292@item Mouse-3
293@kbd{Mouse-3} in a window's mode line deletes that window
294(@code{mouse-delete-window}), unless the frame has only one window, in
295which case it buries the current buffer instead and switches to another
296buffer.
297@end table 285@end table
298 286
299@kindex C-x 0 287@kindex C-x 0
@@ -320,19 +308,6 @@ different way; it deletes all the windows except the selected one (and
320the minibuffer); the selected window expands to use the whole frame 308the minibuffer); the selected window expands to use the whole frame
321except for the echo area. 309except for the echo area.
322 310
323 You can also delete a window by clicking on its mode line with
324@kbd{Mouse-3}, and delete all the windows in a frame except one window
325by clicking on that window's mode line with @kbd{Mouse-2}.
326
327 You can also adjust window heights and widths with the mouse. If
328you press @kbd{Mouse-1} on a mode line, you can drag that mode line up
329or down, changing the heights of the windows above and below it. If
330you press it on the divider between two consecutive mode lines, you
331can drag that divider right or left, changing the widths of the
332windows to either side. Note that changing heights and widths with
333the mouse never deletes windows, it just refuses to make any window
334smaller than it can be.
335
336@kindex C-x ^ 311@kindex C-x ^
337@findex enlarge-window 312@findex enlarge-window
338@kindex C-x @} 313@kindex C-x @}
@@ -341,7 +316,7 @@ smaller than it can be.
341@vindex window-min-width 316@vindex window-min-width
342 To readjust the division of space among vertically adjacent windows, 317 To readjust the division of space among vertically adjacent windows,
343use @kbd{C-x ^} (@code{enlarge-window}). It makes the currently 318use @kbd{C-x ^} (@code{enlarge-window}). It makes the currently
344selected window get one line bigger, or as many lines as is specified 319selected window one line bigger, or as many lines as is specified
345with a numeric argument. With a negative argument, it makes the 320with a numeric argument. With a negative argument, it makes the
346selected window smaller. @kbd{C-x @}} 321selected window smaller. @kbd{C-x @}}
347(@code{enlarge-window-horizontally}) makes the selected window wider by 322(@code{enlarge-window-horizontally}) makes the selected window wider by
@@ -349,10 +324,10 @@ the specified number of columns. @kbd{C-x @{}
349(@code{shrink-window-horizontally}) makes the selected window narrower 324(@code{shrink-window-horizontally}) makes the selected window narrower
350by the specified number of columns. 325by the specified number of columns.
351 326
352 When you make a window bigger, the space comes from one of its 327 When you make a window bigger, the space comes from its peers. If
353neighbors. If this makes any window too small, it is deleted and its 328this makes any window too small, it is deleted and its space is given
354space is given to an adjacent window. The minimum size is specified by 329to an adjacent window. The minimum size is specified by the variables
355the variables @code{window-min-height} and @code{window-min-width}. 330@code{window-min-height} and @code{window-min-width}.
356 331
357@kindex C-x - 332@kindex C-x -
358@findex shrink-window-if-larger-than-buffer 333@findex shrink-window-if-larger-than-buffer
@@ -366,6 +341,9 @@ gives the extra lines to other windows in the frame.
366 You can also use @kbd{C-x +} (@code{balance-windows}) to even out the 341 You can also use @kbd{C-x +} (@code{balance-windows}) to even out the
367heights of all the windows in the selected frame. 342heights of all the windows in the selected frame.
368 343
344 Mouse clicks on the mode line provide another way to change window
345heights and to delete windows. @xref{Mode Line Mouse}.
346
369@node Window Convenience 347@node Window Convenience
370@section Window Handling Convenience Features and Customization 348@section Window Handling Convenience Features and Customization
371 349
diff --git a/src/ChangeLog b/src/ChangeLog
index cce484a0e3a..dc6a1641ac5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12006-02-03 Kim F. Storm <storm@cua.dk>
2
3 * xdisp.c: Cache last merged escape glyph face.
4 (last_escape_glyph_frame, last_escape_glyph_face_id)
5 (last_escape_glyph_merged_face_id): New variables.
6 (get_next_display_element): Use/update them.
7 (redisplay_internal): Reset them before redisplay.
8
9 * xdisp.c (set_iterator_to_next): Optimize 2004-12-13 fix.
10 Only recheck faces after displaying ellipsis.
11
122006-02-02 Kenichi Handa <handa@m17n.org>
13
14 * coding.c (decode_composition_emacs_mule): Fix handling of
15 incorrect format data.
16
12006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 172006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 18
3 * gtkutil.c (update_frame_tool_bar): Use new tool bar functions 19 * gtkutil.c (update_frame_tool_bar): Use new tool bar functions
diff --git a/src/coding.c b/src/coding.c
index 6ec0804353f..f10a10e1e72 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1039,7 +1039,7 @@ coding_alloc_by_making_gap (coding, bytes)
1039 make_gap (bytes); 1039 make_gap (bytes);
1040 GAP_SIZE += add; ZV -= add; Z -= add; ZV_BYTE -= add; Z_BYTE -= add; 1040 GAP_SIZE += add; ZV -= add; Z -= add; ZV_BYTE -= add; Z_BYTE -= add;
1041 } 1041 }
1042 else 1042 else if (c >= 0x80)
1043 { 1043 {
1044 Lisp_Object this_buffer; 1044 Lisp_Object this_buffer;
1045 1045
@@ -1308,6 +1308,8 @@ decode_coding_utf_8 (coding)
1308 *charbuf++ = ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c); 1308 *charbuf++ = ASCII_BYTE_P (c) ? c : BYTE8_TO_CHAR (c);
1309 coding->errors++; 1309 coding->errors++;
1310 } 1310 }
1311 else
1312 return 0;
1311 1313
1312 no_more_source: 1314 no_more_source:
1313 coding->consumed_char += consumed_chars_base; 1315 coding->consumed_char += consumed_chars_base;
diff --git a/src/xdisp.c b/src/xdisp.c
index 8b1b6f59cf2..fb071542925 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5425,6 +5425,10 @@ static int (* get_next_element[NUM_IT_METHODS]) P_ ((struct it *it)) =
5425 display element from the current position of IT. Value is zero if 5425 display element from the current position of IT. Value is zero if
5426 end of buffer (or C string) is reached. */ 5426 end of buffer (or C string) is reached. */
5427 5427
5428static struct frame *last_escape_glyph_frame = NULL;
5429static unsigned last_escape_glyph_face_id = (1 << FACE_ID_BITS);
5430static int last_escape_glyph_merged_face_id = 0;
5431
5428int 5432int
5429get_next_display_element (it) 5433get_next_display_element (it)
5430 struct it *it; 5434 struct it *it;
@@ -5536,11 +5540,19 @@ get_next_display_element (it)
5536 face_id = merge_faces (it->f, Qt, lface_id, 5540 face_id = merge_faces (it->f, Qt, lface_id,
5537 it->face_id); 5541 it->face_id);
5538 } 5542 }
5543 else if (it->f == last_escape_glyph_frame
5544 && it->face_id == last_escape_glyph_face_id)
5545 {
5546 face_id = last_escape_glyph_merged_face_id;
5547 }
5539 else 5548 else
5540 { 5549 {
5541 /* Merge the escape-glyph face into the current face. */ 5550 /* Merge the escape-glyph face into the current face. */
5542 face_id = merge_faces (it->f, Qescape_glyph, 0, 5551 face_id = merge_faces (it->f, Qescape_glyph, 0,
5543 it->face_id); 5552 it->face_id);
5553 last_escape_glyph_frame = it->f;
5554 last_escape_glyph_face_id = it->face_id;
5555 last_escape_glyph_merged_face_id = face_id;
5544 } 5556 }
5545 5557
5546 XSETINT (it->ctl_chars[0], g); 5558 XSETINT (it->ctl_chars[0], g);
@@ -5586,11 +5598,19 @@ get_next_display_element (it)
5586 face_id = merge_faces (it->f, Qt, lface_id, 5598 face_id = merge_faces (it->f, Qt, lface_id,
5587 it->face_id); 5599 it->face_id);
5588 } 5600 }
5601 else if (it->f == last_escape_glyph_frame
5602 && it->face_id == last_escape_glyph_face_id)
5603 {
5604 face_id = last_escape_glyph_merged_face_id;
5605 }
5589 else 5606 else
5590 { 5607 {
5591 /* Merge the escape-glyph face into the current face. */ 5608 /* Merge the escape-glyph face into the current face. */
5592 face_id = merge_faces (it->f, Qescape_glyph, 0, 5609 face_id = merge_faces (it->f, Qescape_glyph, 0,
5593 it->face_id); 5610 it->face_id);
5611 last_escape_glyph_frame = it->f;
5612 last_escape_glyph_face_id = it->face_id;
5613 last_escape_glyph_merged_face_id = face_id;
5594 } 5614 }
5595 5615
5596 /* Handle soft hyphens in the mode where they only get 5616 /* Handle soft hyphens in the mode where they only get
@@ -5788,6 +5808,8 @@ set_iterator_to_next (it, reseat_p)
5788 5808
5789 if (it->dpvec + it->current.dpvec_index == it->dpend) 5809 if (it->dpvec + it->current.dpvec_index == it->dpend)
5790 { 5810 {
5811 int recheck_faces = it->ellipsis_p;
5812
5791 if (it->s) 5813 if (it->s)
5792 it->method = GET_FROM_C_STRING; 5814 it->method = GET_FROM_C_STRING;
5793 else if (STRINGP (it->string)) 5815 else if (STRINGP (it->string))
@@ -5810,8 +5832,9 @@ set_iterator_to_next (it, reseat_p)
5810 set_iterator_to_next (it, reseat_p); 5832 set_iterator_to_next (it, reseat_p);
5811 } 5833 }
5812 5834
5813 /* Recheck faces after display vector */ 5835 /* Maybe recheck faces after display vector */
5814 it->stop_charpos = IT_CHARPOS (*it); 5836 if (recheck_faces)
5837 it->stop_charpos = IT_CHARPOS (*it);
5815 } 5838 }
5816 break; 5839 break;
5817 5840
@@ -10651,6 +10674,8 @@ redisplay_internal (preserve_echo_area)
10651 retry: 10674 retry:
10652 pause = 0; 10675 pause = 0;
10653 reconsider_clip_changes (w, current_buffer); 10676 reconsider_clip_changes (w, current_buffer);
10677 last_escape_glyph_frame = NULL;
10678 last_escape_glyph_face_id = (1 << FACE_ID_BITS);
10654 10679
10655 /* If new fonts have been loaded that make a glyph matrix adjustment 10680 /* If new fonts have been loaded that make a glyph matrix adjustment
10656 necessary, do it. */ 10681 necessary, do it. */