aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2006-04-19 16:23:46 +0000
committerKaroly Lorentey2006-04-19 16:23:46 +0000
commit447b0165acd09060977e05c843f81c0bee4aa4df (patch)
tree70cf2d254760a2cf68a10b67f8a3570c05fff9a5
parent4c57cca724993ab1334cc5c0b35c22b06daee0c3 (diff)
parent0fea1d10293b4c6d35c1e55b68cd26e91445213c (diff)
downloademacs-447b0165acd09060977e05c843f81c0bee4aa4df.tar.gz
emacs-447b0165acd09060977e05c843f81c0bee4aa4df.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-216 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-217 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-218 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-219 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-220 Improve tq.el. * emacs@sv.gnu.org/emacs--devo--0--patch-221 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-222 Update from CVS: src/puresize.h (PURESIZE_RATIO): Reduce to 10/6. * emacs@sv.gnu.org/emacs--devo--0--patch-223 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-224 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-225 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-226 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-227 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-228 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-229 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-230 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-231 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-232 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-233 Update from CVS: lisp/progmodes/python.el (python-mode): Fix typo. * emacs@sv.gnu.org/gnus--rel--5.10--patch-84 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-85 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-86 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-550
-rw-r--r--admin/FOR-RELEASE9
-rw-r--r--etc/ChangeLog35
-rw-r--r--etc/MORE.STUFF2
-rw-r--r--etc/PROBLEMS2
-rw-r--r--etc/TODO14
-rw-r--r--etc/gnus-refcard.tex9
-rw-r--r--etc/orgcard.tex2
-rw-r--r--leim/Makefile.in4
-rw-r--r--leim/quail/croatian.el2
-rw-r--r--leim/quail/cyril-jis.el2
-rw-r--r--leim/quail/cyrillic.el2
-rw-r--r--leim/quail/hangul3.el2
-rw-r--r--leim/quail/hanja.el1
-rw-r--r--leim/quail/japanese.el1
-rw-r--r--leim/quail/latin-alt.el2
-rw-r--r--leim/quail/latin-ltx.el2
-rw-r--r--leim/quail/latin-post.el2
-rw-r--r--leim/quail/latin-pre.el4
-rw-r--r--leim/quail/pypunct-b5.el2
-rw-r--r--leim/quail/tibetan.el4
-rw-r--r--lisp/ChangeLog224
-rw-r--r--lisp/abbrev.el15
-rw-r--r--lisp/allout.el1
-rw-r--r--lisp/apropos.el1
-rw-r--r--lisp/calendar/appt.el10
-rw-r--r--lisp/comint.el46
-rw-r--r--lisp/complete.el66
-rw-r--r--lisp/cus-edit.el38
-rw-r--r--lisp/custom.el5
-rw-r--r--lisp/emacs-lisp/edebug.el14
-rw-r--r--lisp/emacs-lisp/find-func.el8
-rw-r--r--lisp/emacs-lisp/tq.el96
-rw-r--r--lisp/env.el24
-rw-r--r--lisp/files.el25
-rw-r--r--lisp/gnus/ChangeLog56
-rw-r--r--lisp/gnus/flow-fill.el2
-rw-r--r--lisp/gnus/gmm-utils.el413
-rw-r--r--lisp/gnus/gnus-art.el1
-rw-r--r--lisp/gnus/gnus-group.el171
-rw-r--r--lisp/gnus/gnus-sum.el197
-rw-r--r--lisp/gnus/message.el161
-rw-r--r--lisp/gnus/mm-bodies.el13
-rw-r--r--lisp/gnus/mm-util.el121
-rw-r--r--lisp/help-mode.el1
-rw-r--r--lisp/image-mode.el6
-rw-r--r--lisp/imenu.el88
-rw-r--r--lisp/mh-e/ChangeLog179
-rw-r--r--lisp/mh-e/mh-acros.el12
-rw-r--r--lisp/mh-e/mh-comp.el7
-rw-r--r--lisp/mh-e/mh-compat.el25
-rw-r--r--lisp/mh-e/mh-e.el670
-rw-r--r--lisp/mh-e/mh-folder.el9
-rw-r--r--lisp/mh-e/mh-funcs.el2
-rw-r--r--lisp/mh-e/mh-gnus.el24
-rw-r--r--lisp/mh-e/mh-letter.el5
-rw-r--r--lisp/mh-e/mh-mime.el15
-rw-r--r--lisp/mh-e/mh-search.el14
-rw-r--r--lisp/mh-e/mh-seq.el4
-rw-r--r--lisp/mh-e/mh-show.el2
-rw-r--r--lisp/mh-e/mh-utils.el65
-rw-r--r--lisp/mh-e/mh-xface.el3
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp.el52
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/newcomment.el14
-rw-r--r--lisp/pcvs-parse.el4
-rw-r--r--lisp/progmodes/cc-langs.el3
-rw-r--r--lisp/progmodes/gdb-ui.el46
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/python.el8
-rw-r--r--lisp/progmodes/tcl.el17
-rw-r--r--lisp/subr.el3
-rw-r--r--lisp/textmodes/org.el394
-rw-r--r--lisp/textmodes/tex-mode.el28
-rw-r--r--lisp/time-stamp.el11
-rw-r--r--lisp/tooltip.el16
-rw-r--r--lisp/vc.el12
-rw-r--r--lispref/ChangeLog35
-rw-r--r--lispref/customize.texi42
-rw-r--r--lispref/hooks.texi5
-rw-r--r--lispref/modes.texi7
-rw-r--r--lispref/processes.texi6
-rw-r--r--lispref/searching.texi4
-rw-r--r--lispref/tips.texi10
-rw-r--r--lispref/variables.texi2
-rw-r--r--mac/ChangeLog4
-rw-r--r--mac/inc/config.h2
-rw-r--r--man/ChangeLog51
-rw-r--r--man/building.texi15
-rw-r--r--man/gnus.texi7
-rw-r--r--man/mh-e.texi39
-rw-r--r--man/misc.texi6
-rw-r--r--man/org.texi502
-rw-r--r--man/search.texi14
-rw-r--r--man/trampver.texi2
-rw-r--r--src/ChangeLog191
-rw-r--r--src/abbrev.c26
-rw-r--r--src/coding.c19
-rw-r--r--src/dispnew.c2
-rw-r--r--src/eval.c1
-rw-r--r--src/fns.c7
-rw-r--r--src/image.c29
-rw-r--r--src/keyboard.c1
-rw-r--r--src/keymap.c2
-rw-r--r--src/lisp.h33
-rw-r--r--src/mac.c125
-rw-r--r--src/macfns.c49
-rw-r--r--src/macmenu.c2
-rw-r--r--src/macselect.c121
-rw-r--r--src/macterm.c516
-rw-r--r--src/macterm.h28
-rw-r--r--src/print.c3
-rw-r--r--src/process.c14
-rw-r--r--src/puresize.h2
-rw-r--r--src/s/ms-w32.h6
-rw-r--r--src/unexmacosx.c9
-rw-r--r--src/window.c63
-rw-r--r--src/xdisp.c7
-rw-r--r--src/xfaces.c40
-rw-r--r--src/xmenu.c66
120 files changed, 3827 insertions, 1847 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 934cda45906..c641fbe106c 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -37,6 +37,9 @@ Assigned to Bill Wohler <wohler@newt.com>.
37 37
38** Is there a basic problem with cl-byte-compile-compiler-macro? 38** Is there a basic problem with cl-byte-compile-compiler-macro?
39 39
40** Recalculate the tool bar height after changing the default font.
41(Bug report by Yamamoto Mistuharu, 31 Mar 2006)
42
40** Markus Gritsch's report about Emacs looping on Windoze with the following 43** Markus Gritsch's report about Emacs looping on Windoze with the following
41.emacs file, and then reduce Emacs frame width to "something quite narrow": 44.emacs file, and then reduce Emacs frame width to "something quite narrow":
42 (setq-default truncate-lines t) 45 (setq-default truncate-lines t)
@@ -76,7 +79,7 @@ you're going to handle.
76DIRECTORY STATUS IN CHARGE 79DIRECTORY STATUS IN CHARGE
77--------- ------ --------- 80--------- ------ ---------
78etc (and subdirs) done Thien-Thi Nguyen (ttn(@gnu.org)) 81etc (and subdirs) done Thien-Thi Nguyen (ttn(@gnu.org))
79leim working Kenichi Handa 82leim done Kenichi Handa
80lib-src done ttn 83lib-src done ttn
81lisp done ttn 84lisp done ttn
82lisp/calc done Jay Belanger 85lisp/calc done Jay Belanger
@@ -85,8 +88,8 @@ lisp/emacs-lisp done ttn
85lisp/emulation done ttn 88lisp/emulation done ttn
86lisp/eshell done ttn 89lisp/eshell done ttn
87lisp/gnus done Romain Francoise 90lisp/gnus done Romain Francoise
88lisp/international working Kenichi Handa 91lisp/international done Kenichi Handa
89lisp/language working Kenichi Handa 92lisp/language done Kenichi Handa
90lisp/mail done ttn 93lisp/mail done ttn
91lisp/mh-e done Bill Wohler 94lisp/mh-e done Bill Wohler
92lisp/net done ttn 95lisp/net done ttn
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 3772b1251bd..d0be9101a09 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,20 @@
12006-04-18 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-refcard.tex: Bump version to 5.11. Remove duplicate
4 \def's. Update date.
5
62006-04-18 Bill Wohler <wohler@newt.com>
7
8 * MORE.STUFF: Add MH-E.
9
102006-04-18 Carsten Dominik <dominik@science.uva.nl>
11
12 * orgcard.tex: Version number change only.
13
142006-04-12 Kenichi Handa <handa@m17n.org>
15
16 * PROBLEMS (C-SPC fails ...): Explicitly say fcitx in the header.
17
12006-04-11 Carsten Dominik <dominik@science.uva.nl> 182006-04-11 Carsten Dominik <dominik@science.uva.nl>
2 19
3 * orgcard.tex: (section{Tables}): Document column narrowing. 20 * orgcard.tex: (section{Tables}): Document column narrowing.
@@ -19,7 +36,7 @@
192006-03-28 Bill Wohler <wohler@newt.com> 362006-03-28 Bill Wohler <wohler@newt.com>
20 37
21 * images/README: Update with following information. 38 * images/README: Update with following information.
22 39
23 * images/data-save.xpm, images/mail/flag-for-followup.xpm: 40 * images/data-save.xpm, images/mail/flag-for-followup.xpm:
24 * images/zoom-in.xpm, images/zoom-out.xpm: New images from GNOME 41 * images/zoom-in.xpm, images/zoom-out.xpm: New images from GNOME
25 2.12. 42 2.12.
@@ -28,27 +45,27 @@
28 * images/mail/flag-for-followup.pbm, images/mail/inbox.pbm: 45 * images/mail/flag-for-followup.pbm, images/mail/inbox.pbm:
29 * images/mail/move.pbm, images/next-page.pbm, images/zoom-out.pbm: 46 * images/mail/move.pbm, images/next-page.pbm, images/zoom-out.pbm:
30 New bitmaps for new images. 47 New bitmaps for new images.
31 48
32 * images/refresh.xpm, images/sort-ascending.xpm, 49 * images/refresh.xpm, images/sort-ascending.xpm,
33 * images/sort-descending.xpm: Update with GTK 2.x images. Note 50 * images/sort-descending.xpm: Update with GTK 2.x images. Note
34 that the default GTK icons are not overridden by the GNOME theme 51 that the default GTK icons are not overridden by the GNOME theme
35 due to a bug which was fixed in GNOME 2.15. Once GNOME 2.16 is in 52 due to a bug which was fixed in GNOME 2.15. Once GNOME 2.16 is in
36 wide circulation, then the GTK icons should be replaced with the 53 wide circulation, then the GTK icons should be replaced with the
37 equivalent GNOME icons. Until then, we should be consistent with 54 equivalent GNOME icons. Until then, we should be consistent with
38 GTK first, then GNOME. 55 GTK first, then GNOME.
39 56
40 * images/mail/repack.xpm, images/mail/reply-from.xpm: 57 * images/mail/repack.xpm, images/mail/reply-from.xpm:
41 * images/mail/reply-to.xpm, images/search-replace.xpm: 58 * images/mail/reply-to.xpm, images/search-replace.xpm:
42 * images/separator.xpm, images/show.xpm: Update custom icons to be 59 * images/separator.xpm, images/show.xpm: Update custom icons to be
43 closer to their GNOME counterparts. 60 closer to their GNOME counterparts.
44 61
45 * images/attach.pbm, images/exit.pbm, images/mail/compose.pbm: 62 * images/attach.pbm, images/exit.pbm, images/mail/compose.pbm:
46 * images/mail/repack.pbm, images/mail/reply-all.pbm: 63 * images/mail/repack.pbm, images/mail/reply-all.pbm:
47 * images/mail/reply-from.pbm, images/mail/reply-to.pbm: 64 * images/mail/reply-from.pbm, images/mail/reply-to.pbm:
48 * images/mail/reply.pbm, images/mail/send.pbm, images/show.pbm: 65 * images/mail/reply.pbm, images/mail/send.pbm, images/show.pbm:
49 * images/search-replace.pbm: Update bitmaps. 66 * images/search-replace.pbm: Update bitmaps.
50 67
51 * images/execute.pbm, images/execute.xpm, images/fld-open.pbm: 68 * images/execute.pbm, images/execute.xpm, images/fld-open.pbm:
52 * images/fld-open.xpm, images/highlight.pbm, images/highlight.xpm: 69 * images/fld-open.xpm, images/highlight.pbm, images/highlight.xpm:
53 * images/mail.pbm, images/mail.xpm, images/mail/alias.pbm: 70 * images/mail.pbm, images/mail.xpm, images/mail/alias.pbm:
54 * images/mail/alias.xpm, images/mail/refile.pbm: 71 * images/mail/alias.xpm, images/mail/refile.pbm:
diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF
index 3fa5815d55a..fd98ef06b55 100644
--- a/etc/MORE.STUFF
+++ b/etc/MORE.STUFF
@@ -71,6 +71,8 @@ You might find bug-fixes or enhancements in these places.
71 71
72 * Ispell: <URL:http://www.eng.utah.edu/~kstevens/ispell-page.html> 72 * Ispell: <URL:http://www.eng.utah.edu/~kstevens/ispell-page.html>
73 73
74 * MH-E: <URL:http://mh-e.sourceforge.net/>
75
74 * PC Selection: <URL:ftp://ftp.thp.uni-duisburg.de/pub/source/elisp/> 76 * PC Selection: <URL:ftp://ftp.thp.uni-duisburg.de/pub/source/elisp/>
75 77
76 * PS mode: <URL:http://odur.let.rug.nl/%7Ekleiweg/postscript/> 78 * PS mode: <URL:http://odur.let.rug.nl/%7Ekleiweg/postscript/>
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index f106f9a4a17..0794c84f2fa 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -991,7 +991,7 @@ xmodmap command to the xdm setup script for that display.
991 991
992Use the shell command `xset bc' to make the old X Menu package work. 992Use the shell command `xset bc' to make the old X Menu package work.
993 993
994*** C-SPC fails to work on Fedora GNU/Linux (or with some input method). 994*** C-SPC fails to work on Fedora GNU/Linux (or with fcitx input method).
995 995
996Fedora Core 4 steals the C-SPC key by default for the `iiimx' program 996Fedora Core 4 steals the C-SPC key by default for the `iiimx' program
997which is the input method for some languages. It blocks Emacs users 997which is the input method for some languages. It blocks Emacs users
diff --git a/etc/TODO b/etc/TODO
index ecbdd167764..d210ecb7d6d 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -9,12 +9,14 @@ to the FSF.
9 9
10* Small but important fixes needed in existing features: 10* Small but important fixes needed in existing features:
11 11
12** whitespace-cleanup should work only on the region if the region is active.
13
14** Distribute a bar cursor of width > 1 evenly between the two glyphs
15 on each side of the bar (what to do at the edges?).
16
12** Make vc-checkin avoid reverting the buffer if has not changed after 17** Make vc-checkin avoid reverting the buffer if has not changed after
13 the checkin. Comparing (md5 BUFFER) to (md5 FILE) should be enough. 18 the checkin. Comparing (md5 BUFFER) to (md5 FILE) should be enough.
14 19
15** Make vc-annotate show place the cursor in the annotate buffer at the
16 same line as the current buffer.
17
18** buffer-offer-save should be a permanent local. 20** buffer-offer-save should be a permanent local.
19 21
20** revert-buffer should eliminate overlays and the mark. 22** revert-buffer should eliminate overlays and the mark.
@@ -69,7 +71,7 @@ to the FSF.
69** Redesign the load-history data structure so it can cope better 71** Redesign the load-history data structure so it can cope better
70 with evaluating definitions of the same function from different files, 72 with evaluating definitions of the same function from different files,
71 recording which file the latest definition came from. 73 recording which file the latest definition came from.
72 74
73* Important features: 75* Important features:
74 76
75** Provide user-friendly ways to list all available font families, 77** Provide user-friendly ways to list all available font families,
@@ -158,7 +160,7 @@ typically due to pilot errors and should thus be in debug-ignored-errors.
158** Emacs Lisp mode could put an overlay on the defun for every 160** Emacs Lisp mode could put an overlay on the defun for every
159 function that has advice. The overlay could have `after-text' like " 161 function that has advice. The overlay could have `after-text' like "
160 [Function has advice]". It might look like 162 [Function has advice]". It might look like
161 (defun foo [Function has advice] (x y) 163 (defun foo [Function has advice] (x y)
162 The overlay could also be a button that you could use to view the advice. 164 The overlay could also be a button that you could use to view the advice.
163 165
164** ange-ftp 166** ange-ftp
@@ -261,7 +263,7 @@ typically due to pilot errors and should thus be in debug-ignored-errors.
261** Highlight rectangles (`mouse-track-rectangle-p' in XEmacs). Already in CUA, 263** Highlight rectangles (`mouse-track-rectangle-p' in XEmacs). Already in CUA,
262 but it's a valuable feature worth making more general. 264 but it's a valuable feature worth making more general.
263 265
264** Support simultaneous tty and X frames. [See the multi-tty branch of Emacs 266** Support simultaneous tty and X frames. [See the multi-tty branch of Emacs
265 at http://lorentey.hu/project/emacs.] 267 at http://lorentey.hu/project/emacs.]
266 268
267** Provide MIME support for Rmail using the Gnus MIME library. [Maybe 269** Provide MIME support for Rmail using the Gnus MIME library. [Maybe
diff --git a/etc/gnus-refcard.tex b/etc/gnus-refcard.tex
index 3bfca03d93d..106e3dc6212 100644
--- a/etc/gnus-refcard.tex
+++ b/etc/gnus-refcard.tex
@@ -76,8 +76,9 @@
76% \input{gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % % 76% \input{gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % %
77%% include file for the Gnus refcard and booklet 77%% include file for the Gnus refcard and booklet
78 78
79\def\progver{5.10}\def\refver{5.10-2} % program and refcard versions 79\def\progver{5.11} % program version
80\def\date{Mar, 2005} 80% \def\refver{5.10-2} % refcard version (not used)
81\def\date{April, 2006}
81\def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$} 82\def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$}
82 83
83%% 84%%
@@ -1267,10 +1268,6 @@
1267 1268
1268\begin{document} 1269\begin{document}
1269 1270
1270\def\progver{5.10}\def\refver{5.10-1} % program and refcard versions
1271\def\date{Jan 10th, 2004}
1272\def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$}
1273
1274\ifthenelse{\isundefined{\booklettrue}}{ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1271\ifthenelse{\isundefined{\booklettrue}}{ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1275 \raggedbottom\raggedright 1272 \raggedbottom\raggedright
1276 \twocolumn 1273 \twocolumn
diff --git a/etc/orgcard.tex b/etc/orgcard.tex
index c149e041c07..0ad90af0c74 100644
--- a/etc/orgcard.tex
+++ b/etc/orgcard.tex
@@ -1,5 +1,5 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{4.21} 2\def\orgversionnumber{4.24}
3\def\year{2006} 3\def\year{2006}
4% 4%
5%**start of header 5%**start of header
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 657ef41ec42..7f354e7cd75 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -1,5 +1,5 @@
1# Makefile for leim subdirectory in GNU Emacs. 1# Makefile for leim subdirectory in GNU Emacs.
2# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 2# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
3# Free Software Foundation, Inc. 3# Free Software Foundation, Inc.
4# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 4# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
5# National Institute of Advanced Industrial Science and Technology (AIST) 5# National Institute of Advanced Industrial Science and Technology (AIST)
@@ -47,7 +47,7 @@ BUILT-EMACS = ${dot}${dot}/src/emacs
47buildlisppath=${srcdir}/${dot}${dot}/lisp 47buildlisppath=${srcdir}/${dot}${dot}/lisp
48 48
49# How to run Emacs. 49# How to run Emacs.
50RUN-EMACS = EMACSLOADPATH=$(buildlisppath) \ 50RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C\
51 ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte 51 ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
52 52
53# Subdirectories to be made if ${srcdir} is different from the current 53# Subdirectories to be made if ${srcdir} is different from the current
diff --git a/leim/quail/croatian.el b/leim/quail/croatian.el
index 09623077f3d..e6f7f4c341c 100644
--- a/leim/quail/croatian.el
+++ b/leim/quail/croatian.el
@@ -1,6 +1,6 @@
1;;; quail/croatian.el -- Quail package for inputing Croatian -*-coding: iso-8859-2;-*- 1;;; quail/croatian.el -- Quail package for inputing Croatian -*-coding: iso-8859-2;-*-
2 2
3;; Copyright (C) 2002 Free Software Foundation, Inc. 3;; Copyright (C) 2003 Free Software Foundation, Inc.
4 4
5;; Author: Hrvoje Nik¹iæ <hniksic@xemacs.org>, 5;; Author: Hrvoje Nik¹iæ <hniksic@xemacs.org>,
6;; modeled after czech.el by Milan Zamazal. 6;; modeled after czech.el by Milan Zamazal.
diff --git a/leim/quail/cyril-jis.el b/leim/quail/cyril-jis.el
index f594518bdbf..a7d91e7da73 100644
--- a/leim/quail/cyril-jis.el
+++ b/leim/quail/cyril-jis.el
@@ -1,7 +1,7 @@
1;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters 1;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 2005 4;; Copyright (C) 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
7 7
diff --git a/leim/quail/cyrillic.el b/leim/quail/cyrillic.el
index 445c2fbadaf..92cbe50a1cb 100644
--- a/leim/quail/cyrillic.el
+++ b/leim/quail/cyrillic.el
@@ -2,7 +2,7 @@
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005 3;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 2005 5;; Copyright (C) 1997, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST) 6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021 7;; Registration Number H14PRO021
8 8
diff --git a/leim/quail/hangul3.el b/leim/quail/hangul3.el
index 8cbfb061b9a..028ea6609ee 100644
--- a/leim/quail/hangul3.el
+++ b/leim/quail/hangul3.el
@@ -1,6 +1,6 @@
1;;; hangul3.el --- Quail package for inputting Korean Hangul characters -*-coding: iso-2022-7bit;-*- 1;;; hangul3.el --- Quail package for inputting Korean Hangul characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 2002 4;; Copyright (C) 1997, 2002
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/hanja.el b/leim/quail/hanja.el
index 7108e3b02f7..8d923bd534f 100644
--- a/leim/quail/hanja.el
+++ b/leim/quail/hanja.el
@@ -1,5 +1,6 @@
1;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: iso-2022-7bit;-*- 1;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997 Free Software Foundation, Inc.
3;; Copyright (C) 1997 4;; Copyright (C) 1997
4;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el
index 974a68c0449..2961e1856f5 100644
--- a/leim/quail/japanese.el
+++ b/leim/quail/japanese.el
@@ -1,5 +1,6 @@
1;;; japanese.el --- Quail package for inputting Japanese -*-coding: iso-2022-7bit;-*- 1;;; japanese.el --- Quail package for inputting Japanese -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc.
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2005 4;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2005
4;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021 6;; Registration Number H14PRO021
diff --git a/leim/quail/latin-alt.el b/leim/quail/latin-alt.el
index 58893788ebc..d7a8af61d8c 100644
--- a/leim/quail/latin-alt.el
+++ b/leim/quail/latin-alt.el
@@ -1,7 +1,7 @@
1;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: iso-2022-7bit;-*- 1;;; latin-alt.el --- Quail package for inputting various European characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1999 4;; Copyright (C) 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
7 7
diff --git a/leim/quail/latin-ltx.el b/leim/quail/latin-ltx.el
index 4bf9310abd7..9816cd42216 100644
--- a/leim/quail/latin-ltx.el
+++ b/leim/quail/latin-ltx.el
@@ -1,7 +1,7 @@
1;;; latin-ltx.el --- Quail package for TeX-style input -*-coding: utf-8;-*- 1;;; latin-ltx.el --- Quail package for TeX-style input -*-coding: utf-8;-*-
2 2
3;; Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
4;; Copyright (C) 2001 4;; Copyright (C) 2001, 2005
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
7 7
diff --git a/leim/quail/latin-post.el b/leim/quail/latin-post.el
index 046ec326e5c..a6c2e5e8fd5 100644
--- a/leim/quail/latin-post.el
+++ b/leim/quail/latin-post.el
@@ -1,7 +1,7 @@
1;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: iso-2022-7bit;-*- 1;;; latin-post.el --- Quail packages for inputting various European characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
4;; Copyright (C) 1997 4;; Copyright (C) 1997, 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
7 7
diff --git a/leim/quail/latin-pre.el b/leim/quail/latin-pre.el
index 661c6700bef..ca9d0560dbf 100644
--- a/leim/quail/latin-pre.el
+++ b/leim/quail/latin-pre.el
@@ -1,8 +1,8 @@
1;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: iso-2022-7bit;-*- 1;;; latin-pre.el --- Quail packages for inputting various European characters -*-coding: iso-2022-7bit;-*-
2 2
3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 3;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 1999, 2005 5;; Copyright (C) 1997, 1998, 1999, 2000, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST) 6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021 7;; Registration Number H14PRO021
8 8
diff --git a/leim/quail/pypunct-b5.el b/leim/quail/pypunct-b5.el
index b035ea2e6ba..4eff95a7a6c 100644
--- a/leim/quail/pypunct-b5.el
+++ b/leim/quail/pypunct-b5.el
@@ -1,6 +1,6 @@
1;;; pypunct-b5.el --- Quail packages for Chinese (pinyin + extra symbols) 1;;; pypunct-b5.el --- Quail packages for Chinese (pinyin + extra symbols)
2 2
3;; Copyright (C) 1997, 2000 3;; Copyright (C) 1997, 2000, 2003
4;; National Institute of Advanced Industrial Science and Technology (AIST) 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021 5;; Registration Number H14PRO021
6 6
diff --git a/leim/quail/tibetan.el b/leim/quail/tibetan.el
index c3da8a4a0ff..c065c1b69e4 100644
--- a/leim/quail/tibetan.el
+++ b/leim/quail/tibetan.el
@@ -1,7 +1,7 @@
1;;; tibetan.el --- Quail package for inputting Tibetan characters 1;;; tibetan.el --- Quail package for inputting Tibetan characters
2 2
3;; Copyright (C) 1995 Free Software Foundation, Inc. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Copyright (C) 1995, 1998, 1999, 2000 4;; Copyright (C) 1997, 1998, 1999, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST) 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021 6;; Registration Number H14PRO021
7 7
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 32b8304044f..22690ba2694 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,225 @@
12006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * progmodes/python.el (python-mode): Fix typo.
4
52006-04-18 J.D. Smith <jdsmith@as.arizona.edu>
6
7 * comint.el (comint-previous-input): Don't clobber input line
8 when moving off either end of the input history ring.
9 (comint-delete-input): New function, used by
10 `comint-previous-input' and others.
11 (comint-previous-matching-input): Use
12 `coming-delete-input'. Save the partial input if leaving the
13 edit line. Goto point-max before deleting input to avoid
14 partial input fragments hanging around.
15 (comint-restore-input): New function, used by
16 `comint-previous-input', and bound to "C-c C-j".
17
182006-04-18 Luc Teirlinck <teirllm@auburn.edu>
19
20 * imenu.el (imenu--index-alist): Balance parentheses.
21
222006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
23
24 * progmodes/python.el (python-mode): Add support for
25 hs-minor-mode.
26
272006-04-19 Reiner Steib <Reiner.Steib@gmx.de>
28
29 * abbrev.el (read-abbrev-file): Use abbrev-file-name if optional
30 file is nil.
31
322006-04-18 Richard Stallman <rms@gnu.org>
33
34 * tooltip.el (tooltip-mode, tooltip-use-echo-area): Doc fixes.
35
36 * imenu.el (imenu-create-index-function, imenu--index-alist)
37 (imenu--last-menubar-index-alist, imenu--make-index-alist)
38 (imenu-default-create-index-function, imenu--generic-function):
39 Doc fixes.
40
41 * image-mode.el (image-toggle-display): Handle tar and arc subfiles.
42
43 * help-mode.el (help-mode): Set view-exit-action to delete window.
44
45 * env.el (setenv): Get rid of arg UNSET. Interactive unsetting
46 now works by passing nil as arg.
47
48 * apropos.el (apropos-print): Don't do where-is on self-insert-command.
49
50 * abbrev.el (edit-abbrevs-redefine): Temporarily widen.
51 (read-abbrev-file): Provide default when reading filename.
52
53 * files.el (enable-local-variables): Allow :all as value.
54 (hack-local-variables): Implement that value.
55 (safe-local-variable-values, safe-local-eval-forms)
56 (enable-local-variables): Mark as risky.
57 (find-file-visit-truename, kept-old-versions): Mark safe.
58
59 * time-stamp.el (time-stamp-format, time-stamp-line-limit)
60 (time-stamp-start, time-stamp-end, time-stamp-inserts-lines)
61 (time-stamp-count, time-stamp-pattern): Add safe-local-variable prop.
62
632006-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
64
65 * progmodes/tcl.el (tcl-send-string, tcl-send-region):
66 Use forward-line so as to get to BOL even in the presence of fields.
67 (tcl-eval-region): Strip surrounding space to avoid multiple prompts
68 in return.
69 (inferior-tcl): Tell tclsh to work in interactive mode.
70
71 * complete.el (partial-completion-mode):
72 Use 'choose-completion-string-functions to make sure that
73 choose-completion fills the minibuffer properly.
74
75 * complete.el (PC-old-read-file-name-internal): Remove.
76 (PC-read-include-file-name-internal): Remove. Turn it into an advice
77 of read-file-name-internal.
78 (partial-completion-mode): Enable/disable this advice.
79
802006-04-18 Juanma Barranquero <lekktu@gmail.com>
81
82 * net/tramp.el (tramp-completion-file-name-handler): Revert change
83 of 2006-04-17.
84
852006-04-18 Carsten Dominik <dominik@science.uva.nl>
86
87 * textmodes/org.el (org-insert-heading): Insert heading before
88 current if at beginning of line.
89 (org-todo, org-date): New faces.
90 (org-table-align): Make sure tooltip window contains full text.
91 (org-no-properties): New defsubst.
92 (org-set-font-lock-defaults): Use new faces.
93
942006-04-18 Nick Roberts <nickrob@snap.net.nz>
95
96 * progmodes/gud.el (gud-speedbar-item-info): Display frame address
97 for root variables.
98
99 * progmodes/gdb-ui.el (gdb-pc-address): Rename from gdb-frame-address.
100 (gdb-frame-address): Re-use to identify frame for watch expression.
101 (gdb-var-list, gdb-var-create-handler): Add frame address for root
102 variables.
103 (gdb-init-1, gdb-source, gdb-post-prompt, )
104 (gdb-assembler-custom, gdb-invalidate-assembler): Use gdb-pc-address.
105 (gdb-frame-handler): Get gdb-frame-address.
106
1072006-04-17 Michael Albinus <michael.albinus@gmx.de>
108
109 Sync with Tramp 2.0.53.
110
111 * net/tramp.el (tramp-completion-mode): ?\t has event-modifier
112 'control. Reported by Matthias F,bv(Brste <slashdevslashnull@gmx.net>.
113 (tramp-completion-file-name-handler): Add autoload cookie for
114 adding to `file-name-handler-alist'.
115
116 * net/tramp-smb.el (tramp-smb-wait-for-output): Wait always for
117 the prompt. If it returns earlier (when detecting an error
118 message), the rest of the output will merge accidently with the
119 output of the next command. Reported by M Jared Finder
120 <jared@hpalace.com>.
121
122 * net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test
123 for `process-file', in order to let it work for older Emacsen too.
124
1252006-04-17 Ralf Angeli <angeli@iwi.uni-sb.de>
126
127 * textmodes/tex-mode.el (tex-font-lock-match-suscript): New function.
128 (tex-font-lock-keywords-3): Use it.
129
1302006-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
131
132 * newcomment.el (comment-add): New function.
133 (comment-region-default, comment-dwim): Use it.
134
1352006-04-15 Michael Olson <mwolson@gnu.org>
136
137 * emacs-lisp/tq.el: Improve comments.
138 (tq-queue-head-question): New accessor function.
139 (tq-queue-head-regexp, tq-queue-head-closure, tq-queue-head-fn):
140 Update for modified queue structure.
141 (tq-queue-add): Accept `question' argument.
142 (tq-queue-pop): If a question is pending, send it.
143 (tq-enqueue): Accept new optional argument `delay-question'.
144 If this is non-nil, and at least one other question is pending a
145 response, queue the question rather than sending it immediately.
146
1472006-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
148
149 * calendar/appt.el (appt-add): Check whether an appointment is
150 already present in appt-time-msg-list. Simplify code.
151
1522006-04-14 Stefan Monnier <monnier@iro.umontreal.ca>
153
154 * progmodes/cc-langs.el (c-mode-menu):
155 Don't presume c-subword-mode is bound.
156
1572006-04-13 Bill Wohler <wohler@newt.com>
158
159 * cus-edit.el (customize-package-emacs-version-alist): Update docstring.
160 (customize-package-emacs-version): Use cdr instead of cadr now
161 that alists use dotted pairs.
162
163 * custom.el (defcustom): Fix docstring for :package-version.
164
1652006-04-13 Michael Albinus <michael.albinus@gmx.de>
166
167 * net/tramp.el (tramp-display-shell-command-buffer): New defvar.
168 (tramp-handle-shell-command): Display output buffer only when
169 `tramp-display-shell-command-buffer' is true.
170 (tramp-handle-process-file): Set `tramp-display-shell-command-buffer'.
171
1722006-04-13 Carsten Dominik <dominik@science.uva.nl>
173
174 * textmodes/org.el (org-set-autofill-regexps): Set only the local
175 values of `adaptive-fill-regexp' and `adaptive-fill-function'.
176
1772006-04-13 Romain Francoise <romain@orebokech.com>
178
179 * pcvs-parse.el (cvs-parse-table): Use `with-temp-buffer' to avoid
180 leaving temporary .cvsignore buffers behind.
181
1822006-04-13 Carsten Dominik <dominik@science.uva.nl>
183
184 * textmodes/org.el: (org-set-regexps-and-options)
185 (org-get-current-options): Better names for the startup folding
186 options.
187
1882006-04-13 Thien-Thi Nguyen <ttn@gnu.org>
189
190 * vc.el (vc-annotate): Arrange for point to end up at the same
191 line number as in the original, but only when using a new buffer.
192
1932006-04-12 Davis Herring <herring@lanl.gov> (tiny change)
194
195 * files.el (hack-one-local-variable-eval-safep):
196 Recognize `edebug-form-spec' for `put', but only if it passes
197 `edebug-basic-spec'. Generalize `put' handling.
198
199 * emacs-lisp/edebug.el (edebug-basic-spec): New function for
200 vetting file-local form specs.
201
202 * allout.el (allout-layout): Autoload its `safe-local-variable'
203 property.
204
2052006-04-13 Carsten Dominik <dominik@science.uva.nl>
206
207 * textmodes/org.el: (org-ctrl-c-ctrl-c): Improve documentation string.
208 (org-agenda-mouse-1-follows-link)
209 (org-mouse-1-follows-link): New options.
210 (org-format-agenda-item): Fix bug if TAGS is nil.
211 (org-agenda-get-scheduled): Quote `priority' symbol in plist.
212
2132006-04-13 Nick Roberts <nickrob@snap.net.nz>
214
215 * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers):
216 GDB 6.1+ gives full filename for "info sources" so use
217 file-name-nondirectory.
218
2192006-04-12 Romain Francoise <romain@orebokech.com>
220
221 * subr.el (read-passwd): Bind `message-log-max' to nil.
222
12006-04-12 Stefan Monnier <monnier@iro.umontreal.ca> 2232006-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 224
3 * progmodes/perl-mode.el (perl-indent-new-calculate): 225 * progmodes/perl-mode.el (perl-indent-new-calculate):
@@ -2835,7 +3057,7 @@
2835 (vc-default-update-changelog): Don't use vc-user-login-name, we 3057 (vc-default-update-changelog): Don't use vc-user-login-name, we
2836 don't need it here. 3058 don't need it here.
2837 3059
2838 * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is 3060 * net/tramp-vc.el (vc-user-login-name): Comment out defadvice, it is
2839 no longer necessary. 3061 no longer necessary.
2840 3062
28412006-01-25 Kenichi Handa <handa@m17n.org> 30632006-01-25 Kenichi Handa <handa@m17n.org>
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index d7bce2b313a..9ba53f6f6f5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -160,8 +160,10 @@ or may be omitted (it is usually omitted)."
160(defun edit-abbrevs-redefine () 160(defun edit-abbrevs-redefine ()
161 "Redefine abbrevs according to current buffer contents." 161 "Redefine abbrevs according to current buffer contents."
162 (interactive) 162 (interactive)
163 (define-abbrevs t) 163 (save-restriction
164 (set-buffer-modified-p nil)) 164 (widen)
165 (define-abbrevs t)
166 (set-buffer-modified-p nil)))
165 167
166(defun define-abbrevs (&optional arg) 168(defun define-abbrevs (&optional arg)
167 "Define abbrevs according to current visible buffer contents. 169 "Define abbrevs according to current visible buffer contents.
@@ -195,9 +197,12 @@ the ones defined from the buffer now."
195Optional argument FILE is the name of the file to read; 197Optional argument FILE is the name of the file to read;
196it defaults to the value of `abbrev-file-name'. 198it defaults to the value of `abbrev-file-name'.
197Optional second argument QUIETLY non-nil means don't display a message." 199Optional second argument QUIETLY non-nil means don't display a message."
198 (interactive "fRead abbrev file: ") 200 (interactive
199 (load (if (and file (> (length file) 0)) file abbrev-file-name) 201 (list
200 nil quietly) 202 (read-file-name (format "Read abbrev file (default %s): "
203 abbrev-file-name)
204 nil abbrev-file-name t)))
205 (load (or file abbrev-file-name) nil quietly)
201 (setq abbrevs-changed nil)) 206 (setq abbrevs-changed nil))
202 207
203(defun quietly-read-abbrev-file (&optional file) 208(defun quietly-read-abbrev-file (&optional file)
diff --git a/lisp/allout.el b/lisp/allout.el
index 31ed3a791ea..66c4b8681db 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -666,6 +666,7 @@ the layout used for the allout.el source file.)
666`allout-layout' can additionally have the value `t', in which 666`allout-layout' can additionally have the value `t', in which
667case the value of `allout-default-layout' is used.") 667case the value of `allout-default-layout' is used.")
668(make-variable-buffer-local 'allout-layout) 668(make-variable-buffer-local 'allout-layout)
669;;;###autoload
669(put 'allout-layout 'safe-local-variable t) 670(put 'allout-layout 'safe-local-variable t)
670 671
671;;;_ : Topic header format 672;;;_ : Topic header format
diff --git a/lisp/apropos.el b/lisp/apropos.el
index b490b8173ba..3889655ff99 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -908,6 +908,7 @@ If non-nil TEXT is a string that will be printed as a heading."
908 ;; Calculate key-bindings if we want them. 908 ;; Calculate key-bindings if we want them.
909 (and do-keys 909 (and do-keys
910 (commandp symbol) 910 (commandp symbol)
911 (not (eq symbol 'self-insert-command))
911 (indent-to 30 1) 912 (indent-to 30 1)
912 (if (let ((keys 913 (if (let ((keys
913 (save-excursion 914 (save-excursion
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index bce30a1de20..36934783b93 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -498,11 +498,11 @@ The time should be in either 24 hour format or am/pm format."
498 (interactive "sTime (hh:mm[am/pm]): \nsMessage: ") 498 (interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
499 (unless (string-match appt-time-regexp new-appt-time) 499 (unless (string-match appt-time-regexp new-appt-time)
500 (error "Unacceptable time-string")) 500 (error "Unacceptable time-string"))
501 (let* ((appt-time-string (concat new-appt-time " " new-appt-msg)) 501 (let ((time-msg (list (list (appt-convert-time new-appt-time))
502 (appt-time (list (appt-convert-time new-appt-time))) 502 (concat new-appt-time " " new-appt-msg) t)))
503 (time-msg (list appt-time appt-time-string t))) 503 (unless (member time-msg appt-time-msg-list)
504 (setq appt-time-msg-list (nconc appt-time-msg-list (list time-msg))) 504 (setq appt-time-msg-list
505 (setq appt-time-msg-list (appt-sort-list appt-time-msg-list)))) 505 (appt-sort-list (nconc appt-time-msg-list (list time-msg)))))))
506 506
507;;;###autoload 507;;;###autoload
508(defun appt-delete () 508(defun appt-delete ()
diff --git a/lisp/comint.el b/lisp/comint.el
index 5ab00354f80..a44e252ca97 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -465,6 +465,7 @@ executed once when the buffer is created."
465 (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) 465 (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring)
466 (define-key map "\C-c\C-n" 'comint-next-prompt) 466 (define-key map "\C-c\C-n" 'comint-next-prompt)
467 (define-key map "\C-c\C-p" 'comint-previous-prompt) 467 (define-key map "\C-c\C-p" 'comint-previous-prompt)
468 (define-key map "\C-c\C-j" 'comint-restore-input)
468 (define-key map "\C-c\C-d" 'comint-send-eof) 469 (define-key map "\C-c\C-d" 'comint-send-eof)
469 (define-key map "\C-c\C-s" 'comint-write-output) 470 (define-key map "\C-c\C-s" 'comint-write-output)
470 (define-key map "\C-c." 'comint-insert-previous-argument) 471 (define-key map "\C-c." 'comint-insert-previous-argument)
@@ -558,6 +559,9 @@ This is to support the command \\[comint-get-next-from-history].")
558 "Non-nil if you are accumulating input lines to send as input together. 559 "Non-nil if you are accumulating input lines to send as input together.
559The command \\[comint-accumulate] sets this.") 560The command \\[comint-accumulate] sets this.")
560 561
562(defvar comint-stored-incomplete-input nil
563 "Stored input for history cycling.")
564
561(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand) 565(put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand)
562(put 'comint-input-ring 'permanent-local t) 566(put 'comint-input-ring 'permanent-local t)
563(put 'comint-input-ring-index 'permanent-local t) 567(put 'comint-input-ring-index 'permanent-local t)
@@ -638,6 +642,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
638 (make-local-variable 'comint-scroll-to-bottom-on-input) 642 (make-local-variable 'comint-scroll-to-bottom-on-input)
639 (make-local-variable 'comint-move-point-for-output) 643 (make-local-variable 'comint-move-point-for-output)
640 (make-local-variable 'comint-scroll-show-maximum-output) 644 (make-local-variable 'comint-scroll-show-maximum-output)
645 (make-local-variable 'comint-stored-incomplete-input)
641 ;; This makes it really work to keep point at the bottom. 646 ;; This makes it really work to keep point at the bottom.
642 (make-local-variable 'scroll-conservatively) 647 (make-local-variable 'scroll-conservatively)
643 (setq scroll-conservatively 10000) 648 (setq scroll-conservatively 10000)
@@ -1015,6 +1020,16 @@ See also `comint-read-input-ring'."
1015 (t 1020 (t
1016 arg))) 1021 arg)))
1017 1022
1023(defun comint-restore-input ()
1024 "Restore unfinished input."
1025 (interactive)
1026 (when comint-input-ring-index
1027 (comint-delete-input)
1028 (when (> (length comint-stored-incomplete-input) 0)
1029 (insert comint-stored-incomplete-input)
1030 (message "Input restored"))
1031 (setq comint-input-ring-index nil)))
1032
1018(defun comint-search-start (arg) 1033(defun comint-search-start (arg)
1019 "Index to start a directional search, starting at `comint-input-ring-index'." 1034 "Index to start a directional search, starting at `comint-input-ring-index'."
1020 (if comint-input-ring-index 1035 (if comint-input-ring-index
@@ -1035,9 +1050,18 @@ Moves relative to `comint-input-ring-index'."
1035 arg))) 1050 arg)))
1036 1051
1037(defun comint-previous-input (arg) 1052(defun comint-previous-input (arg)
1038 "Cycle backwards through input history." 1053 "Cycle backwards through input history, saving input."
1039 (interactive "*p") 1054 (interactive "*p")
1040 (comint-previous-matching-input "." arg)) 1055 (if (and comint-input-ring-index
1056 (or ;; leaving the "end" of the ring
1057 (and (< arg 0) ; going down
1058 (eq comint-input-ring-index 0))
1059 (and (> arg 0) ; going up
1060 (eq comint-input-ring-index
1061 (1- (ring-length comint-input-ring)))))
1062 comint-stored-incomplete-input)
1063 (comint-restore-input)
1064 (comint-previous-matching-input "." arg)))
1041 1065
1042(defun comint-next-input (arg) 1066(defun comint-next-input (arg)
1043 "Cycle forwards through input history." 1067 "Cycle forwards through input history."
@@ -1077,6 +1101,14 @@ Moves relative to START, or `comint-input-ring-index'."
1077 (if (string-match regexp (ring-ref comint-input-ring n)) 1101 (if (string-match regexp (ring-ref comint-input-ring n))
1078 n))) 1102 n)))
1079 1103
1104(defun comint-delete-input ()
1105 "Delete all input between accumulation or process mark and point."
1106 (delete-region
1107 ;; Can't use kill-region as it sets this-command
1108 (or (marker-position comint-accum-marker)
1109 (process-mark (get-buffer-process (current-buffer))))
1110 (point-max)))
1111
1080(defun comint-previous-matching-input (regexp n) 1112(defun comint-previous-matching-input (regexp n)
1081 "Search backwards through input history for match for REGEXP. 1113 "Search backwards through input history for match for REGEXP.
1082\(Previous history elements are earlier commands.) 1114\(Previous history elements are earlier commands.)
@@ -1088,13 +1120,13 @@ If N is negative, find the next or Nth next match."
1088 ;; Has a match been found? 1120 ;; Has a match been found?
1089 (if (null pos) 1121 (if (null pos)
1090 (error "Not found") 1122 (error "Not found")
1123 ;; If leaving the edit line, save partial input
1124 (if (null comint-input-ring-index) ;not yet on ring
1125 (setq comint-stored-incomplete-input
1126 (funcall comint-get-old-input)))
1091 (setq comint-input-ring-index pos) 1127 (setq comint-input-ring-index pos)
1092 (message "History item: %d" (1+ pos)) 1128 (message "History item: %d" (1+ pos))
1093 (delete-region 1129 (comint-delete-input)
1094 ;; Can't use kill-region as it sets this-command
1095 (or (marker-position comint-accum-marker)
1096 (process-mark (get-buffer-process (current-buffer))))
1097 (point))
1098 (insert (ring-ref comint-input-ring pos))))) 1130 (insert (ring-ref comint-input-ring pos)))))
1099 1131
1100(defun comint-next-matching-input (regexp n) 1132(defun comint-next-matching-input (regexp n)
diff --git a/lisp/complete.el b/lisp/complete.el
index a50d02c41f0..6620db860c3 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -141,8 +141,6 @@ If nil, means use the colon-separated path in the variable $INCPATH instead."
141 "A list of the environment variable names and values.") 141 "A list of the environment variable names and values.")
142 142
143 143
144(defvar PC-old-read-file-name-internal nil)
145
146(defun PC-bindings (bind) 144(defun PC-bindings (bind)
147 (let ((completion-map minibuffer-local-completion-map) 145 (let ((completion-map minibuffer-local-completion-map)
148 (must-match-map minibuffer-local-must-match-map)) 146 (must-match-map minibuffer-local-must-match-map))
@@ -219,21 +217,32 @@ second TAB brings up the `*Completions*' buffer."
219 ((not PC-disable-includes) 217 ((not PC-disable-includes)
220 (add-hook 'find-file-not-found-functions 'PC-look-for-include-file))) 218 (add-hook 'find-file-not-found-functions 'PC-look-for-include-file)))
221 ;; ... with some underhand redefining. 219 ;; ... with some underhand redefining.
222 (cond ((and (not partial-completion-mode) 220 (cond ((not partial-completion-mode)
223 (functionp PC-old-read-file-name-internal)) 221 (ad-disable-advice 'read-file-name-internal 'around 'PC-include-file)
224 (fset 'read-file-name-internal PC-old-read-file-name-internal)) 222 (ad-activate 'read-file-name-internal))
225 ((and (not PC-disable-includes) (not PC-old-read-file-name-internal)) 223 ((not PC-disable-includes)
226 (setq PC-old-read-file-name-internal 224 (ad-enable-advice 'read-file-name-internal 'around 'PC-include-file)
227 (symbol-function 'read-file-name-internal)) 225 (ad-activate 'read-file-name-internal)))
228 (fset 'read-file-name-internal 226 ;; Adjust the completion selection in *Completion* buffers to the way
229 'PC-read-include-file-name-internal))) 227 ;; we work. The default minibuffer completion code only completes the
230 (when (and partial-completion-mode (null PC-env-vars-alist)) 228 ;; text before point and leaves the text after point alone (new in
231 (setq PC-env-vars-alist 229 ;; Emacs-22). In contrast we use the whole text and we even sometimes
232 (mapcar (lambda (string) 230 ;; move point to a place before EOB, to indicate the first position where
233 (let ((d (string-match "=" string))) 231 ;; there's a difference, so when the user uses choose-completion, we have
234 (cons (concat "$" (substring string 0 d)) 232 ;; to trick choose-completion into replacing the whole minibuffer text
235 (and d (substring string (1+ d)))))) 233 ;; rather than only the text before point. --Stef
236 process-environment)))) 234 (funcall
235 (if partial-completion-mode 'add-hook 'remove-hook)
236 'choose-completion-string-functions
237 (lambda (&rest x) (goto-char (point-max)) nil))
238 ;; Build the env-completion and mapping table.
239 (when (and partial-completion-mode (null PC-env-vars-alist))
240 (setq PC-env-vars-alist
241 (mapcar (lambda (string)
242 (let ((d (string-match "=" string)))
243 (cons (concat "$" (substring string 0 d))
244 (and d (substring string (1+ d))))))
245 process-environment))))
237 246
238 247
239(defun PC-complete () 248(defun PC-complete ()
@@ -930,20 +939,23 @@ absolute rather than relative to some directory on the SEARCH-PATH."
930 (setq sorted (cdr sorted))) 939 (setq sorted (cdr sorted)))
931 compressed)))) 940 compressed))))
932 941
933(defun PC-read-include-file-name-internal (string dir action) 942(defadvice read-file-name-internal (around PC-include-file disable)
934 (if (string-match "<\\([^\"<>]*\\)>?$" string) 943 (if (string-match "<\\([^\"<>]*\\)>?\\'" (ad-get-arg 0))
935 (let* ((name (substring string (match-beginning 1) (match-end 1))) 944 (let* ((string (ad-get-arg 0))
945 (action (ad-get-arg 2))
946 (name (substring string (match-beginning 1) (match-end 1)))
936 (str2 (substring string (match-beginning 0))) 947 (str2 (substring string (match-beginning 0)))
937 (completion-table 948 (completion-table
938 (mapcar (function (lambda (x) (list (format "<%s>" x)))) 949 (mapcar (lambda (x) (format "<%s>" x))
939 (PC-include-file-all-completions 950 (PC-include-file-all-completions
940 name (PC-include-file-path))))) 951 name (PC-include-file-path)))))
941 (cond 952 (setq ad-return-value
942 ((not completion-table) nil) 953 (cond
943 ((eq action nil) (try-completion str2 completion-table nil)) 954 ((not completion-table) nil)
944 ((eq action t) (all-completions str2 completion-table nil)) 955 ((eq action 'lambda) (test-completion str2 completion-table nil))
945 ((eq action 'lambda) (test-completion str2 completion-table nil)))) 956 ((eq action nil) (try-completion str2 completion-table nil))
946 (funcall PC-old-read-file-name-internal string dir action))) 957 ((eq action t) (all-completions str2 completion-table nil)))))
958 ad-do-it))
947 959
948 960
949(provide 'complete) 961(provide 'complete)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 4de2a431392..e68d2eab293 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1082,14 +1082,29 @@ Show the buffer in another window, but don't select it."
1082;; Packages will update this variable, so make it available. 1082;; Packages will update this variable, so make it available.
1083;;;###autoload 1083;;;###autoload
1084(defvar customize-package-emacs-version-alist nil 1084(defvar customize-package-emacs-version-alist nil
1085 "Alist that maps packages to alists of package to Emacs versions. 1085 "Alist mapping versions of Emacs to versions of a package.
1086The value alists map all package versions used with 1086These package versions are listed in the :package-version
1087the :package-version keyword to Emacs versions. Packages are 1087keyword used in `defcustom', `defgroup', and `defface'. Its
1088symbols and versions are strings. 1088elements look like this:
1089 1089
1090For example: 1090 (PACKAGE (PVERSION . EVERSION)...)
1091 '((MH-E (\"7.4\" \"22.1\") (\"8.0\" \"22.1\")) 1091
1092 (Gnus (\"5.11\" \"22.1\")))") 1092For each PACKAGE, which is a symbol, there are one or more
1093elements that contain a package version PVERSION with an
1094associated Emacs version EVERSION. These versions are strings.
1095For example, the MH-E package updates this alist with the
1096following:
1097
1098 (add-to-list 'customize-package-emacs-version-alist
1099 '(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\")
1100 (\"7.0\" . \"22.1\") (\"7.1\" . \"22.1\")
1101 (\"7.2\" . \"22.1\") (\"7.3\" . \"22.1\")
1102 (\"7.4\" . \"22.1\") (\"8.0\" . \"22.1\")))
1103
1104The value of PACKAGE needs to be unique and it needs to match the
1105PACKAGE value appearing in the :package-version keyword. Since
1106the user might see the value in a error message, a good choice is
1107the official name of the package, such as MH-E or Gnus.")
1093 1108
1094;;;###autoload 1109;;;###autoload
1095(defalias 'customize-changed 'customize-changed-options) 1110(defalias 'customize-changed 'customize-changed-options)
@@ -1154,7 +1169,7 @@ that were added or redefined since that version."
1154 1169
1155(defun customize-package-emacs-version (symbol package-version) 1170(defun customize-package-emacs-version (symbol package-version)
1156 "Return Emacs version of SYMBOL. 1171 "Return Emacs version of SYMBOL.
1157PACKAGE-VERSION has the form (PACKAGE VERSION). The VERSION of 1172PACKAGE-VERSION has the form (PACKAGE . VERSION). The VERSION of
1158PACKAGE is looked up in the associated list 1173PACKAGE is looked up in the associated list
1159`customize-package-emacs-version-alist' to find the version of 1174`customize-package-emacs-version-alist' to find the version of
1160Emacs that is associated with it." 1175Emacs that is associated with it."
@@ -1167,9 +1182,10 @@ Emacs that is associated with it."
1167 ((setq package-versions (assq (car package-version) 1182 ((setq package-versions (assq (car package-version)
1168 customize-package-emacs-version-alist)) 1183 customize-package-emacs-version-alist))
1169 (setq emacs-version 1184 (setq emacs-version
1170 (cadr (assoc (cadr package-version) package-versions))) 1185 (cdr (assoc (cdr package-version) package-versions)))
1171 (unless emacs-version 1186 (unless emacs-version
1172 (message "Package version of %s not found in %s" symbol 1187 (message "%s version %s not found in %s" symbol
1188 (cdr package-version)
1173 "customize-package-emacs-version-alist"))) 1189 "customize-package-emacs-version-alist")))
1174 (t 1190 (t
1175 (message "Package %s neglected to update %s" 1191 (message "Package %s neglected to update %s"
diff --git a/lisp/custom.el b/lisp/custom.el
index cd97b425038..2ac1e23ac49 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -272,11 +272,14 @@ The following common keywords are also meaningful.
272 first introduced, or its default value was changed, in Emacs 272 first introduced, or its default value was changed, in Emacs
273 version VERSION. 273 version VERSION.
274:package-version 274:package-version
275 VALUE should be a list with the form (PACKAGE VERSION) 275 VALUE should be a list with the form (PACKAGE . VERSION)
276 specifying that the variable was first introduced, or its 276 specifying that the variable was first introduced, or its
277 default value was changed, in PACKAGE version VERSION. This 277 default value was changed, in PACKAGE version VERSION. This
278 keyword takes priority over :version. The PACKAGE and VERSION 278 keyword takes priority over :version. The PACKAGE and VERSION
279 must appear in the alist `customize-package-emacs-version-alist'. 279 must appear in the alist `customize-package-emacs-version-alist'.
280 Since PACKAGE must be unique and the user might see it in an
281 error message, a good choice is the official name of the
282 package, such as MH-E or Gnus.
280:tag LABEL 283:tag LABEL
281 Use LABEL, a string, instead of the item's name, to label the item 284 Use LABEL, a string, instead of the item's name, to label the item
282 in customization menus and buffers. 285 in customization menus and buffers.
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 444c310920d..d0be3a02f65 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -258,6 +258,20 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol
258 edebug-form-spec 258 edebug-form-spec
259 )) 259 ))
260 260
261;;;###autoload
262(defun edebug-basic-spec (spec)
263 "Return t if SPEC uses only extant spec symbols.
264An extant spec symbol is a symbol that is not a function and has a
265`edebug-form-spec' property."
266 (cond ((listp spec)
267 (catch 'basic
268 (while spec
269 (unless (edebug-basic-spec (car spec)) (throw 'basic nil))
270 (setq spec (cdr spec)))
271 t))
272 ((symbolp spec)
273 (unless (functionp spec) (get spec 'edebug-form-spec)))))
274
261;;; Utilities 275;;; Utilities
262 276
263;; Define edebug-gensym - from old cl.el 277;; Define edebug-gensym - from old cl.el
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 754ad9fdf19..5d504586323 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -228,6 +228,14 @@ The search is done in the source for library LIBRARY."
228 (with-syntax-table emacs-lisp-mode-syntax-table 228 (with-syntax-table emacs-lisp-mode-syntax-table
229 (goto-char (point-min)) 229 (goto-char (point-min))
230 (if (or (re-search-forward regexp nil t) 230 (if (or (re-search-forward regexp nil t)
231 ;; `regexp' matches definitions using known forms like
232 ;; `defun', or `defvar'. But some functions/variables
233 ;; are defined using special macros (or functions), so
234 ;; if `regexp' can't find the definition, we look for
235 ;; something of the form "(SOMETHING <symbol> ...)".
236 ;; This fails to distinguish function definitions from
237 ;; variable declarations (or even uses thereof), but is
238 ;; a good pragmatic fallback.
231 (re-search-forward 239 (re-search-forward
232 (concat "^([^ ]+" find-function-space-re "['(]?" 240 (concat "^([^ ]+" find-function-space-re "['(]?"
233 (regexp-quote (symbol-name symbol)) 241 (regexp-quote (symbol-name symbol))
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el
index a4a22806d09..2126d7663fc 100644
--- a/lisp/emacs-lisp/tq.el
+++ b/lisp/emacs-lisp/tq.el
@@ -27,18 +27,56 @@
27 27
28;;; Commentary: 28;;; Commentary:
29 29
30;; manages receiving a stream asynchronously, 30;; This file manages receiving a stream asynchronously, parsing it
31;; parsing it into transactions, and then calling 31;; into transactions, and then calling the associated handler function
32;; handler functions 32;; upon the completion of each transaction.
33 33
34;; Our basic structure is the queue/process/buffer triple. Each entry 34;; Our basic structure is the queue/process/buffer triple. Each entry
35;; of the queue is a regexp/closure/function triple. We buffer 35;; of the queue part is a list of question, regexp, closure, and
36;; bytes from the process until we see the regexp at the head of the 36;; function that is consed to the last element.
37;; queue. Then we call the function with the closure and the 37
38;; collected bytes. 38;; A transaction queue may be created by calling `tq-create'.
39
40;; A request may be added to the queue by calling `tq-enqueue'. If
41;; the `delay-question' argument is non-nil, we will wait to send the
42;; question to the process until it has finished sending other input.
43;; Otherwise, once a request is enqueued, we send the given question
44;; immediately to the process.
45
46;; We then buffer bytes from the process until we see the regexp that
47;; was provided in the call to `tq-enqueue'. Then we call the
48;; provided function with the closure and the collected bytes. If we
49;; have indicated that the question from the next transaction was not
50;; sent immediately, send it at this point, awaiting the response.
39 51
40;;; Code: 52;;; Code:
41 53
54;;; Accessors
55
56;; This part looks like (queue . (process . buffer))
57(defun tq-queue (tq) (car tq))
58(defun tq-process (tq) (car (cdr tq)))
59(defun tq-buffer (tq) (cdr (cdr tq)))
60
61;; The structure of `queue' is as follows
62;; ((question regexp closure . fn)
63;; <other queue entries>)
64;; question: string to send to the process
65(defun tq-queue-head-question (tq) (car (car (tq-queue tq))))
66;; regexp: regular expression that matches the end of a response from
67;; the process
68(defun tq-queue-head-regexp (tq) (car (cdr (car (tq-queue tq)))))
69;; closure: additional data to pass to function
70(defun tq-queue-head-closure (tq) (car (cdr (cdr (car (tq-queue tq))))))
71;; fn: function to call upon receiving a complete response from the
72;; process
73(defun tq-queue-head-fn (tq) (cdr (cdr (cdr (car (tq-queue tq))))))
74
75;; Determine whether queue is empty
76(defun tq-queue-empty (tq) (not (tq-queue tq)))
77
78;;; Core functionality
79
42;;;###autoload 80;;;###autoload
43(defun tq-create (process) 81(defun tq-create (process)
44 "Create and return a transaction queue communicating with PROCESS. 82 "Create and return a transaction queue communicating with PROCESS.
@@ -54,33 +92,37 @@ to a tcp server on another machine."
54 (tq-filter ',tq string))) 92 (tq-filter ',tq string)))
55 tq)) 93 tq))
56 94
57;;; accessors 95(defun tq-queue-add (tq question re closure fn)
58(defun tq-queue (tq) (car tq))
59(defun tq-process (tq) (car (cdr tq)))
60(defun tq-buffer (tq) (cdr (cdr tq)))
61
62(defun tq-queue-add (tq re closure fn)
63 (setcar tq (nconc (tq-queue tq) 96 (setcar tq (nconc (tq-queue tq)
64 (cons (cons re (cons closure fn)) nil))) 97 (cons (cons question (cons re (cons closure fn))) nil)))
65 'ok) 98 'ok)
66 99
67(defun tq-queue-head-regexp (tq) (car (car (tq-queue tq)))) 100(defun tq-queue-pop (tq)
68(defun tq-queue-head-fn (tq) (cdr (cdr (car (tq-queue tq))))) 101 (setcar tq (cdr (car tq)))
69(defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) 102 (let ((question (tq-queue-head-question tq)))
70(defun tq-queue-empty (tq) (not (tq-queue tq))) 103 (when question
71(defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) 104 (process-send-string (tq-process tq) question)))
105 (null (car tq)))
72 106
73 107(defun tq-enqueue (tq question regexp closure fn &optional delay-question)
74;;; must add to queue before sending!
75(defun tq-enqueue (tq question regexp closure fn)
76 "Add a transaction to transaction queue TQ. 108 "Add a transaction to transaction queue TQ.
77This sends the string QUESTION to the process that TQ communicates with. 109This sends the string QUESTION to the process that TQ communicates with.
78When the corresponding answer comes back, we call FN 110
79with two arguments: CLOSURE, and the answer to the question. 111When the corresponding answer comes back, we call FN with two
112arguments: CLOSURE, which may contain additional data that FN
113needs, and the answer to the question.
114
80REGEXP is a regular expression to match the entire answer; 115REGEXP is a regular expression to match the entire answer;
81that's how we tell where the answer ends." 116that's how we tell where the answer ends.
82 (tq-queue-add tq regexp closure fn) 117
83 (process-send-string (tq-process tq) question)) 118If DELAY-QUESTION is non-nil, delay sending this question until
119the process has finished replying to any previous questions.
120This produces more reliable results with some processes."
121 (let ((sendp (or (not delay-question)
122 (not (tq-queue-head-question tq)))))
123 (tq-queue-add tq (unless sendp question) regexp closure fn)
124 (when sendp
125 (process-send-string (tq-process tq) question))))
84 126
85(defun tq-close (tq) 127(defun tq-close (tq)
86 "Shut down transaction queue TQ, terminating the process." 128 "Shut down transaction queue TQ, terminating the process."
diff --git a/lisp/env.el b/lisp/env.el
index 22a86f13f3d..66d505ee011 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -94,15 +94,10 @@ Use `$$' to insert a single dollar sign."
94 94
95;; Fixme: Should the environment be recoded if LC_CTYPE &c is set? 95;; Fixme: Should the environment be recoded if LC_CTYPE &c is set?
96 96
97(defun setenv (variable &optional value unset substitute-env-vars frame) 97(defun setenv (variable &optional value substitute-env-vars frame)
98 "Set the value of the environment variable named VARIABLE to VALUE. 98 "Set the value of the environment variable named VARIABLE to VALUE.
99VARIABLE should be a string. VALUE is optional; if not provided or 99VARIABLE should be a string. VALUE is optional; if not provided or
100nil, the environment variable VARIABLE will be removed. 100nil, the environment variable VARIABLE will be removed.
101UNSET if non-nil means to remove VARIABLE from the environment.
102SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
103variables in VALUE with `substitute-env-vars', where see.
104Value is the new value if VARIABLE, or nil if removed from the
105environment.
106 101
107Interactively, a prefix argument means to unset the variable, and 102Interactively, a prefix argument means to unset the variable, and
108otherwise the current value (if any) of the variable appears at 103otherwise the current value (if any) of the variable appears at
@@ -116,6 +111,13 @@ modifying either `global-environment' or the environment
116belonging to the selected frame, depending on the value of 111belonging to the selected frame, depending on the value of
117`local-environment-variables'. 112`local-environment-variables'.
118 113
114SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
115variables in VALUE with `substitute-env-vars', which see.
116This is normally used only for interactive calls.
117
118The return value is the new value of VARIABLE, or nil if
119it was removed from the environment.
120
119If optional parameter FRAME is non-nil, then it should be a a 121If optional parameter FRAME is non-nil, then it should be a a
120frame. If the specified frame has its own set of environment 122frame. If the specified frame has its own set of environment
121variables, this function will modify VARIABLE in it. Note that 123variables, this function will modify VARIABLE in it. Note that
@@ -127,7 +129,7 @@ As a special case, setting variable `TZ' calls `set-time-zone-rule' as
127a side-effect." 129a side-effect."
128 (interactive 130 (interactive
129 (if current-prefix-arg 131 (if current-prefix-arg
130 (list (read-envvar-name "Clear environment variable: " 'exact) nil t) 132 (list (read-envvar-name "Clear environment variable: " 'exact) nil)
131 (let* ((var (read-envvar-name "Set environment variable: " nil)) 133 (let* ((var (read-envvar-name "Set environment variable: " nil))
132 (value (getenv var))) 134 (value (getenv var)))
133 (when value 135 (when value
@@ -137,7 +139,6 @@ a side-effect."
137 (read-from-minibuffer (format "Set %s to value: " var) 139 (read-from-minibuffer (format "Set %s to value: " var)
138 nil nil nil 'setenv-history 140 nil nil nil 'setenv-history
139 value) 141 value)
140 nil
141 t)))) 142 t))))
142 (if (and (multibyte-string-p variable) locale-coding-system) 143 (if (and (multibyte-string-p variable) locale-coding-system)
143 (let ((codings (find-coding-systems-string (concat variable value)))) 144 (let ((codings (find-coding-systems-string (concat variable value))))
@@ -145,10 +146,9 @@ a side-effect."
145 (memq (coding-system-base locale-coding-system) codings)) 146 (memq (coding-system-base locale-coding-system) codings))
146 (error "Can't encode `%s=%s' with `locale-coding-system'" 147 (error "Can't encode `%s=%s' with `locale-coding-system'"
147 variable (or value ""))))) 148 variable (or value "")))))
148 (if unset 149 (and value
149 (setq value nil) 150 substitute-env-vars
150 (if substitute-env-vars 151 (setq value (substitute-env-vars value)))
151 (setq value (substitute-env-vars value))))
152 (if (multibyte-string-p variable) 152 (if (multibyte-string-p variable)
153 (setq variable (encode-coding-string variable locale-coding-system))) 153 (setq variable (encode-coding-string variable locale-coding-system)))
154 (if (and value (multibyte-string-p value)) 154 (if (and value (multibyte-string-p value))
diff --git a/lisp/files.el b/lisp/files.el
index 440f2ea4f27..10cdb473045 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -452,6 +452,8 @@ not safe, Emacs queries you, once, whether to set them all.
452\(When you say yes to certain values, they are remembered as safe.) 452\(When you say yes to certain values, they are remembered as safe.)
453 453
454:safe means set the safe variables, and ignore the rest. 454:safe means set the safe variables, and ignore the rest.
455:all means set all variables, whether safe or not.
456 (Don't set it permanently to :all.)
455nil means always ignore the file local variables. 457nil means always ignore the file local variables.
456 458
457Any other value means always query you once whether to set them all. 459Any other value means always query you once whether to set them all.
@@ -464,8 +466,9 @@ a -*- line.
464The command \\[normal-mode], when used interactively, 466The command \\[normal-mode], when used interactively,
465always obeys file local variable specifications and the -*- line, 467always obeys file local variable specifications and the -*- line,
466and ignores this variable." 468and ignores this variable."
467 :type '(choice (const :tag "Obey" t) 469 :type '(choice (const :tag "Query Unsafe" t)
468 (const :tag "Safe Only" :safe) 470 (const :tag "Safe Only" :safe)
471 (const :tag "Do all" :all)
469 (const :tag "Ignore" nil) 472 (const :tag "Ignore" nil)
470 (other :tag "Query" other)) 473 (other :tag "Query" other))
471 :group 'find-file) 474 :group 'find-file)
@@ -2283,6 +2286,7 @@ asking you for confirmation."
2283 default-text-properties 2286 default-text-properties
2284 display-time-string 2287 display-time-string
2285 enable-local-eval 2288 enable-local-eval
2289 enable-local-variables
2286 eval 2290 eval
2287 exec-directory 2291 exec-directory
2288 exec-path 2292 exec-path
@@ -2319,6 +2323,8 @@ asking you for confirmation."
2319 parse-time-rules 2323 parse-time-rules
2320 process-environment 2324 process-environment
2321 rmail-output-file-alist 2325 rmail-output-file-alist
2326 safe-local-variable-values
2327 safe-local-eval-forms
2322 save-some-buffers-action-alist 2328 save-some-buffers-action-alist
2323 special-display-buffer-names 2329 special-display-buffer-names
2324 standard-input 2330 standard-input
@@ -2356,9 +2362,11 @@ asking you for confirmation."
2356 (c-indent-level . integerp) 2362 (c-indent-level . integerp)
2357 (comment-column . integerp) 2363 (comment-column . integerp)
2358 (compile-command . string-or-null-p) 2364 (compile-command . string-or-null-p)
2365 (find-file-visit-truename . t)
2359 (fill-column . integerp) 2366 (fill-column . integerp)
2360 (fill-prefix . string-or-null-p) 2367 (fill-prefix . string-or-null-p)
2361 (indent-tabs-mode . t) 2368 (indent-tabs-mode . t)
2369 (kept-old-versions . integerp)
2362 (kept-new-versions . integerp) 2370 (kept-new-versions . integerp)
2363 (left-margin . t) 2371 (left-margin . t)
2364 (no-byte-compile . t) 2372 (no-byte-compile . t)
@@ -2631,6 +2639,7 @@ is specified, returning t if it is specified."
2631 (if (or (and (eq enable-local-variables t) 2639 (if (or (and (eq enable-local-variables t)
2632 (null unsafe-vars) 2640 (null unsafe-vars)
2633 (null risky-vars)) 2641 (null risky-vars))
2642 (eq enable-local-variables :all)
2634 (hack-local-variables-confirm 2643 (hack-local-variables-confirm
2635 result unsafe-vars risky-vars)) 2644 result unsafe-vars risky-vars))
2636 (dolist (elt result) 2645 (dolist (elt result)
@@ -2690,12 +2699,14 @@ It is dangerous if either of these conditions are met:
2690 (and (eq (car exp) 'put) 2699 (and (eq (car exp) 'put)
2691 (hack-one-local-variable-quotep (nth 1 exp)) 2700 (hack-one-local-variable-quotep (nth 1 exp))
2692 (hack-one-local-variable-quotep (nth 2 exp)) 2701 (hack-one-local-variable-quotep (nth 2 exp))
2693 (memq (nth 1 (nth 2 exp)) 2702 (let ((prop (nth 1 (nth 2 exp))) (val (nth 3 exp)))
2694 '(lisp-indent-hook)) 2703 (cond ((eq prop 'lisp-indent-hook)
2695 ;; Only allow safe values of lisp-indent-hook; 2704 ;; Only allow safe values of lisp-indent-hook;
2696 ;; not functions. 2705 ;; not functions.
2697 (or (numberp (nth 3 exp)) 2706 (or (numberp val) (equal val ''defun)))
2698 (equal (nth 3 exp) ''defun))) 2707 ((eq prop 'edebug-form-spec)
2708 ;; Only allow indirect form specs.
2709 (edebug-basic-spec val)))))
2699 ;; Allow expressions that the user requested. 2710 ;; Allow expressions that the user requested.
2700 (member exp safe-local-eval-forms) 2711 (member exp safe-local-eval-forms)
2701 ;; Certain functions can be allowed with safe arguments 2712 ;; Certain functions can be allowed with safe arguments
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 792fb2a5c0d..09dbe9e0027 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,52 @@
12006-04-17 Reiner Steib <Reiner.Steib@gmx.de>
2
3 [ Merge from Gnus trunk. ]
4
5 * mm-util.el (mm-charset-synonym-alist): Improve doc string.
6 (mm-charset-override-alist): New variable.
7 (mm-charset-to-coding-system): Use it.
8 (mm-codepage-setup): New helper function.
9 (mm-charset-eval-alist): New variable.
10 (mm-charset-to-coding-system): Use mm-charset-eval-alist. Warn
11 about unknown charsets. Add allow-override. Use
12 `mm-charset-override-alist' only when decoding.
13 (mm-detect-mime-charset-region): Use :mime-charset.
14
15 * mm-bodies.el (mm-decode-body, mm-decode-string): Call
16 `mm-charset-to-coding-system' with allow-override argument.
17
18 * message.el (message-tool-bar-zap-list, message-tool-bar)
19 (message-tool-bar-gnome, message-tool-bar-retro): New variables.
20 (message-tool-bar-local-item-from-menu): Remove.
21 (message-tool-bar-map): Replace by `message-make-tool-bar'.
22 (message-make-tool-bar): New function.
23 (message-mode): Use `message-make-tool-bar'.
24
25 * gnus-sum.el (gnus-summary-tool-bar)
26 (gnus-summary-tool-bar-gnome, gnus-summary-tool-bar-retro)
27 (gnus-summary-tool-bar-zap-list): New variables.
28 (gnus-summary-make-tool-bar): Complete rewrite using
29 `gmm-tool-bar-from-list'.
30
31 * gnus-group.el (gnus-group-tool-bar, gnus-group-tool-bar-gnome)
32 (gnus-group-tool-bar-retro, gnus-group-tool-bar-zap-list): New
33 variables.
34 (gnus-group-make-tool-bar): Complete rewrite using
35 `gmm-tool-bar-from-list'.
36 (gnus-group-tool-bar-update): New function.
37
38 * gmm-utils.el: New file.
39
402006-04-12 Ralf Angeli <angeli@iwi.uni-sb.de>
41
42 * flow-fill.el (fill-flowed): Remove trailing space from blank
43 quoted lines.
44
452006-04-12 Reiner Steib <Reiner.Steib@gmx.de>
46
47 * gnus-art.el (gnus-article-mode): Set
48 cursor-in-non-selected-windows to nil.
49
12006-04-12 Katsumi Yamaoka <yamaoka@jpl.org> 502006-04-12 Katsumi Yamaoka <yamaoka@jpl.org>
2 51
3 * gnus-art.el (gnus-mime-view-part-as-charset): Ignore charset 52 * gnus-art.el (gnus-mime-view-part-as-charset): Ignore charset
@@ -12,13 +61,6 @@
12 * gnus-uu.el (gnus-uu-save-article): Put mml tags instead of part 61 * gnus-uu.el (gnus-uu-save-article): Put mml tags instead of part
13 tag to summarized topics part in order to encode non-ASCII text. 62 tag to summarized topics part in order to encode non-ASCII text.
14 63
152006-04-12 Kenichi Handa <handa@m17n.org>
16
17 * rfc2231.el (rfc2231-decode-encoded-string): Work on unibyte
18 buffer and then decode the buffer text if necessary.
19 (rfc2231-encode-string): Be sure to work on multibyte buffer at
20 first, and after mm-encode-body, change the buffer to unibyte.
21
222006-04-11 Reiner Steib <Reiner.Steib@gmx.de> 642006-04-11 Reiner Steib <Reiner.Steib@gmx.de>
23 65
24 * gnus-art.el (gnus-button-valid-localpart-regexp): Exclude `@'. 66 * gnus-art.el (gnus-button-valid-localpart-regexp): Exclude `@'.
diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el
index 98697439106..b47e9ba8365 100644
--- a/lisp/gnus/flow-fill.el
+++ b/lisp/gnus/flow-fill.el
@@ -114,7 +114,7 @@ RFC 2646 suggests 66 characters for readability."
114 (set-buffer (or (current-buffer) buffer)) 114 (set-buffer (or (current-buffer) buffer))
115 (goto-char (point-min)) 115 (goto-char (point-min))
116 ;; Remove space stuffing. 116 ;; Remove space stuffing.
117 (while (re-search-forward "^ " nil t) 117 (while (re-search-forward "^\\( \\|>+ $\\)" nil t)
118 (delete-char -1) 118 (delete-char -1)
119 (forward-line 1)) 119 (forward-line 1))
120 (goto-char (point-min)) 120 (goto-char (point-min))
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
new file mode 100644
index 00000000000..4db811053ec
--- /dev/null
+++ b/lisp/gnus/gmm-utils.el
@@ -0,0 +1,413 @@
1;;; gmm-utils.el --- Utility functions for Gnus, Message and MML
2
3;; Copyright (C) 2006 Free Software Foundation, Inc.
4
5;; Author: Reiner Steib <reiner.steib@gmx.de>
6;; Keywords: news
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option)
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to the
22;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23;; Boston, MA 02110-1301, USA.
24
25;;; Commentary:
26
27;; This library provides self-contained utility functions. The functions are
28;; used in Gnus, Message and MML, but within this library there are no
29;; dependencies on Gnus, Message, or MML or Gnus.
30
31;;; Code:
32
33;; (require 'wid-edit)
34
35(defgroup gmm nil
36 "Utility functions for Gnus, Message and MML"
37 :prefix "gmm-"
38 :version "23.0" ;; No Gnus
39 :group 'lisp)
40
41;; Helper functions from `gnus-utils.el': gmm-verbose, gmm-message, gmm-error
42
43(defcustom gmm-verbose 7
44 "Integer that says how verbose gmm should be.
45The higher the number, the more messages will flash to say what
46it done. At zero, it will be totally mute; at five, it will
47display most important messages; and at ten, it will keep on
48jabbering all the time."
49 :type 'integer
50 :group 'gmm)
51
52;;;###autoload
53(defun gmm-message (level &rest args)
54 "If LEVEL is lower than `gmm-verbose' print ARGS using `message'.
55
56Guideline for numbers:
571 - error messages, 3 - non-serious error messages, 5 - messages for things
58that take a long time, 7 - not very important messages on stuff, 9 - messages
59inside loops."
60 (if (<= level gmm-verbose)
61 (apply 'message args)
62 ;; We have to do this format thingy here even if the result isn't
63 ;; shown - the return value has to be the same as the return value
64 ;; from `message'.
65 (apply 'format args)))
66
67;;;###autoload
68(defun gmm-error (level &rest args)
69 "Beep an error if LEVEL is equal to or less than `gmm-verbose'.
70ARGS are passed to `message'."
71 (when (<= (floor level) gmm-verbose)
72 (apply 'message args)
73 (ding)
74 (let (duration)
75 (when (and (floatp level)
76 (not (zerop (setq duration (* 10 (- level (floor level)))))))
77 (sit-for duration))))
78 nil)
79
80;;;###autoload
81(defun gmm-widget-p (symbol)
82 "Non-nil iff SYMBOL is a widget."
83 (get symbol 'widget-type))
84
85;; Copy of the `nnmail-lazy' code from `nnmail.el':
86(define-widget 'gmm-lazy 'default
87 "Base widget for recursive datastructures.
88
89This is copy of the `lazy' widget in Emacs 22.1 provided for compatibility."
90 :format "%{%t%}: %v"
91 :convert-widget 'widget-value-convert-widget
92 :value-create (lambda (widget)
93 (let ((value (widget-get widget :value))
94 (type (widget-get widget :type)))
95 (widget-put widget :children
96 (list (widget-create-child-value
97 widget (widget-convert type) value)))))
98 :value-delete 'widget-children-value-delete
99 :value-get (lambda (widget)
100 (widget-value (car (widget-get widget :children))))
101 :value-inline (lambda (widget)
102 (widget-apply (car (widget-get widget :children))
103 :value-inline))
104 :default-get (lambda (widget)
105 (widget-default-get
106 (widget-convert (widget-get widget :type))))
107 :match (lambda (widget value)
108 (widget-apply (widget-convert (widget-get widget :type))
109 :match value))
110 :validate (lambda (widget)
111 (widget-apply (car (widget-get widget :children)) :validate)))
112
113;; Note: The format of `gmm-tool-bar-item' may change if some future Emacs
114;; version will provide customizable tool bar buttons using a different
115;; interface.
116
117;; TODO: Extend API so that the "Command" entry can be a function or a plist.
118;; In case of a list it should have the format...
119;;
120;; (:none command-without-modifier
121;; :shift command-with-shift-pressed
122;; :control command-with-ctrl-pressed
123;; :control-shift command-with-control-and-shift-pressed
124;; ;; mouse-2 and mouse-3 can't be used in Emacs yet.
125;; :mouse-2 command-on-mouse-2-press
126;; :mouse-3 command-on-mouse-3-press) ;; typically a menu of related commands
127;;
128;; Combinations of mouse-[23] plus shift and/or controll might be overkill.
129;;
130;; Then use (plist-get rs-command :none), (plist-get rs-command :shift)
131
132(define-widget 'gmm-tool-bar-item (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy)
133 "Tool bar list item."
134 :tag "Tool bar item"
135 :type '(choice
136 (list :tag "Command and Icon"
137 (function :tag "Command")
138 (string :tag "Icon file")
139 (choice
140 (const :tag "Default map" nil)
141 ;; Note: Usually we need non-nil attributes if map is t.
142 (const :tag "No menu" t)
143 (sexp :tag "Other map"))
144 (plist :inline t :tag "Properties"))
145 (list :tag "Separator"
146 (const :tag "No command" gmm-ignore)
147 (string :tag "Icon file")
148 (const :tag "No map")
149 (plist :inline t :tag "Properties"))))
150
151(define-widget 'gmm-tool-bar-zap-list (if (gmm-widget-p 'lazy) 'lazy 'gmm-lazy)
152 "Tool bar zap list."
153 :tag "Tool bar zap list"
154 :type '(choice (const :tag "Zap all" t)
155 (const :tag "Keep all" nil)
156 (list
157 ;; :value
158 ;; Work around (bug in customize?), see
159 ;; <news:v9is48jrj1.fsf@marauder.physik.uni-ulm.de>
160 ;; (new-file open-file dired kill-buffer write-file
161 ;; print-buffer customize help)
162 (set :inline t
163 (const new-file)
164 (const open-file)
165 (const dired)
166 (const kill-buffer)
167 (const save-buffer)
168 (const write-file)
169 (const undo)
170 (const cut)
171 (const copy)
172 (const paste)
173 (const search-forward)
174 (const print-buffer)
175 (const customize)
176 (const help))
177 (repeat :inline t
178 :tag "Other"
179 (symbol :tag "Icon item")))))
180
181;; (defun gmm-color-cells (&optional display)
182;; "Return the number of color cells supported by DISPLAY.
183;; Compatibility function."
184;; ;; `display-color-cells' doesn't return more than 256 even if color depth is
185;; ;; > 8 in Emacs 21.
186;; ;;
187;; ;; Feel free to add proper XEmacs support.
188;; (let* ((cells (and (fboundp 'display-color-cells)
189;; (display-color-cells display)))
190;; (plane (and (fboundp 'x-display-planes)
191;; (ash 1 (x-display-planes))))
192;; (none -1))
193;; (max (if (integerp cells) cells none)
194;; (if (integerp plane) plane none))))
195
196(defcustom gmm-tool-bar-style
197 (if (and (boundp 'tool-bar-mode)
198 tool-bar-mode
199 (and (fboundp 'display-visual-class)
200 (not (memq (display-visual-class)
201 (list 'static-gray 'gray-scale
202 'static-color 'pseudo-color)))))
203 'gnome
204 'retro)
205 "Prefered tool bar style."
206 :type '(choice (const :tag "GNOME style" 'gnome)
207 (const :tag "Retro look" 'retro))
208 :group 'gmm)
209
210(defvar tool-bar-map)
211
212;;;###autoload
213(defun gmm-tool-bar-from-list (icon-list zap-list default-map)
214 "Make a tool bar from ICON-LIST.
215
216Within each entry of ICON-LIST, the first element is a menu
217command, the second element is an icon file name and the third
218element is a test function. You can use \\[describe-key]
219<menu-entry> to find out the name of a menu command. The fourth
220and all following elements are passed a the PROPS argument to the
221function `tool-bar-local-item'.
222
223If ZAP-LIST is a list, remove those item from the default
224`tool-bar-map'. If it is t, start with a new sparse map. You
225can use \\[describe-key] <icon> to find out the name of an icon
226item. When \\[describe-key] <icon> shows \"<tool-bar> <new-file>
227runs the command find-file\", then use `new-file' in ZAP-LIST.
228
229DEFAULT-MAP specifies the default key map for ICON-LIST."
230 (let (;; For Emacs 21, we must let-bind `tool-bar-map'. In Emacs 22, we
231 ;; could use some other local variable.
232 (tool-bar-map (if (eq zap-list t)
233 (make-sparse-keymap)
234 (copy-keymap tool-bar-map))))
235 (when (listp zap-list)
236 ;; Zap some items which aren't relevant for this mode and take up space.
237 (dolist (key zap-list)
238 (define-key tool-bar-map (vector key) nil)))
239 (mapc (lambda (el)
240 (let ((command (car el))
241 (icon (nth 1 el))
242 (fmap (or (nth 2 el) default-map))
243 (props (cdr (cdr (cdr el)))) )
244 ;; command may stem from different from-maps:
245 (cond ((eq command 'gmm-ignore)
246 ;; The dummy `gmm-ignore', see `gmm-tool-bar-item'
247 ;; widget. Suppress tooltip by adding `:enable nil'.
248 (if (fboundp 'tool-bar-local-item)
249 (apply 'tool-bar-local-item icon nil nil
250 tool-bar-map :enable nil props)
251 ;; (tool-bar-local-item ICON DEF KEY MAP &rest PROPS)
252 ;; (tool-bar-add-item ICON DEF KEY &rest PROPS)
253 (apply 'tool-bar-add-item icon nil nil :enable nil props)))
254 ((equal fmap t) ;; Not a menu command
255 (if (fboundp 'tool-bar-local-item)
256 (apply 'tool-bar-local-item
257 icon command
258 (intern icon) ;; reuse icon or fmap here?
259 tool-bar-map props)
260 ;; Emacs 21 compatibility:
261 (apply 'tool-bar-add-item
262 icon command
263 (intern icon)
264 props)))
265 (t ;; A menu command
266 (if (fboundp 'tool-bar-local-item-from-menu)
267 (apply 'tool-bar-local-item-from-menu
268 ;; (apply 'tool-bar-local-item icon def key
269 ;; tool-bar-map props)
270 command icon tool-bar-map (symbol-value fmap)
271 props)
272 ;; Emacs 21 compatibility:
273 (apply 'tool-bar-add-item-from-menu
274 command icon (symbol-value fmap)
275 props))))
276 t))
277 (if (symbolp icon-list)
278 (eval icon-list)
279 icon-list))
280 tool-bar-map))
281
282;; WARNING: The following is subject to change. Don't rely on it yet.
283
284;; From MH-E without modifications:
285
286(defmacro gmm-defun-compat (name function arg-list &rest body)
287 "Create function NAME.
288If FUNCTION exists, then NAME becomes an alias for FUNCTION.
289Otherwise, create function NAME with ARG-LIST and BODY."
290 (let ((defined-p (fboundp function)))
291 (if defined-p
292 `(defalias ',name ',function)
293 `(defun ,name ,arg-list ,@body))))
294
295(gmm-defun-compat gmm-image-search-load-path
296 image-search-load-path (file &optional path)
297 "Emacs 21 and XEmacs don't have `image-search-load-path'.
298This function returns nil on those systems."
299 nil)
300
301;; From MH-E with modifications:
302
303;; Don't use `gmm-defun-compat' until API changes in
304;; `image-load-path-for-library' in Emacs CVS are completed.
305
306(defun gmm-image-load-path-for-library (library image &optional path no-error)
307 "Return a suitable search path for images relative to LIBRARY.
308
309First it searches for IMAGE in `image-load-path' (excluding
310\"`data-directory'/images\") and `load-path', followed by a path
311suitable for LIBRARY, which includes \"../../etc/images\" and
312\"../etc/images\" relative to the library file itself, and then
313in \"`data-directory'/images\".
314
315Then this function returns a list of directories which contains
316first the directory in which IMAGE was found, followed by the
317value of `load-path'. If PATH is given, it is used instead of
318`load-path'.
319
320If NO-ERROR is non-nil and a suitable path can't be found, don't
321signal an error. Instead, return a list of directories as before,
322except that nil appears in place of the image directory.
323
324Here is an example that uses a common idiom to provide
325compatibility with versions of Emacs that lack the variable
326`image-load-path':
327
328 ;; Shush compiler.
329 (defvar image-load-path)
330
331 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
332 (image-load-path (cons (car load-path)
333 (when (boundp 'image-load-path)
334 image-load-path))))
335 (mh-tool-bar-folder-buttons-init))"
336 (unless library (error "No library specified"))
337 (unless image (error "No image specified"))
338 (let (image-directory image-directory-load-path)
339 ;; Check for images in image-load-path or load-path.
340 (let ((img image)
341 (dir (or
342 ;; Images in image-load-path.
343 (gmm-image-search-load-path image) ;; "gmm-" prefix!
344 ;; Images in load-path.
345 (locate-library image)))
346 parent)
347 ;; Since the image might be in a nested directory (for
348 ;; example, mail/attach.pbm), adjust `image-directory'
349 ;; accordingly.
350 (when dir
351 (setq dir (file-name-directory dir))
352 (while (setq parent (file-name-directory img))
353 (setq img (directory-file-name parent)
354 dir (expand-file-name "../" dir))))
355 (setq image-directory-load-path dir))
356
357 ;; If `image-directory-load-path' isn't Emacs' image directory,
358 ;; it's probably a user preference, so use it. Then use a
359 ;; relative setting if possible; otherwise, use
360 ;; `image-directory-load-path'.
361 (cond
362 ;; User-modified image-load-path?
363 ((and image-directory-load-path
364 (not (equal image-directory-load-path
365 (file-name-as-directory
366 (expand-file-name "images" data-directory)))))
367 (setq image-directory image-directory-load-path))
368 ;; Try relative setting.
369 ((let (library-name d1ei d2ei)
370 ;; First, find library in the load-path.
371 (setq library-name (locate-library library))
372 (if (not library-name)
373 (error "Cannot find library %s in load-path" library))
374 ;; And then set image-directory relative to that.
375 (setq
376 ;; Go down 2 levels.
377 d2ei (file-name-as-directory
378 (expand-file-name
379 (concat (file-name-directory library-name) "../../etc/images")))
380 ;; Go down 1 level.
381 d1ei (file-name-as-directory
382 (expand-file-name
383 (concat (file-name-directory library-name) "../etc/images"))))
384 (setq image-directory
385 ;; Set it to nil if image is not found.
386 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
387 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
388 ;; Use Emacs' image directory.
389 (image-directory-load-path
390 (setq image-directory image-directory-load-path))
391 (no-error
392 (message "Could not find image %s for library %s" image library))
393 (t
394 (error "Could not find image %s for library %s" image library)))
395
396 ;; Return an augmented `path' or `load-path'.
397 (nconc (list image-directory)
398 (delete image-directory (copy-sequence (or path load-path))))))
399
400(defun gmm-customize-mode (&optional mode)
401 "Customize customization group for MODE.
402If mode is nil, use `major-mode' of the curent buffer."
403 (interactive)
404 (customize-group
405 (or mode
406 (intern (let ((mode (symbol-name major-mode)))
407 (string-match "^\\(.+\\)-mode$" mode)
408 (match-string 1 mode))))))
409
410(provide 'gmm-utils)
411
412;; arch-tag: e0b60920-2ce6-40c1-bfc0-cadbbe26b602
413;;; gmm-utils.el ends here
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index a4da4ae85f3..7e3b843d500 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -3809,6 +3809,7 @@ commands:
3809 (make-local-variable 'gnus-article-ignored-charsets) 3809 (make-local-variable 'gnus-article-ignored-charsets)
3810 ;; Prevent recent Emacsen from displaying non-break space as "\ ". 3810 ;; Prevent recent Emacsen from displaying non-break space as "\ ".
3811 (set (make-local-variable 'nobreak-char-display) nil) 3811 (set (make-local-variable 'nobreak-char-display) nil)
3812 (setq cursor-in-non-selected-windows nil)
3812 (gnus-set-default-directory) 3813 (gnus-set-default-directory)
3813 (buffer-disable-undo) 3814 (buffer-disable-undo)
3814 (setq buffer-read-only t) 3815 (setq buffer-read-only t)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 24e4df14712..51af7d48d9c 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -39,6 +39,7 @@
39(require 'gnus-range) 39(require 'gnus-range)
40(require 'gnus-win) 40(require 'gnus-win)
41(require 'gnus-undo) 41(require 'gnus-undo)
42(require 'gmm-utils)
42(require 'time-date) 43(require 'time-date)
43(require 'gnus-ems) 44(require 'gnus-ems)
44 45
@@ -979,36 +980,135 @@ simple manner.")
979 980
980 (gnus-run-hooks 'gnus-group-menu-hook))) 981 (gnus-run-hooks 'gnus-group-menu-hook)))
981 982
982(defvar gnus-group-toolbar-map nil) 983
983 984(defvar gnus-group-tool-bar-map nil)
984;; Emacs 21 tool bar. Should be no-op otherwise. 985
985(defun gnus-group-make-tool-bar () 986(defun gnus-group-tool-bar-update (&optional symbol value)
986 (if (and 987 "Update group buffer toolbar.
987 (condition-case nil (require 'tool-bar) (error nil)) 988Setter function for custom variables."
988 (fboundp 'tool-bar-add-item-from-menu) 989 (when symbol
989 (default-value 'tool-bar-mode) 990 (set-default symbol value))
990 (not gnus-group-toolbar-map)) 991 ;; (setq-default gnus-group-tool-bar-map nil)
991 (setq gnus-group-toolbar-map 992 ;; (use-local-map gnus-group-mode-map)
992 (let ((tool-bar-map (make-sparse-keymap)) 993 (when (gnus-alive-p)
993 (load-path (mm-image-load-path))) 994 (with-current-buffer gnus-group-buffer
994 (tool-bar-add-item-from-menu 995 (gnus-group-make-tool-bar t))))
995 'gnus-group-get-new-news "get-news" gnus-group-mode-map) 996
996 (tool-bar-add-item-from-menu 997(defcustom gnus-group-tool-bar (if (eq gmm-tool-bar-style 'gnome)
997 'gnus-group-get-new-news-this-group "gnntg" gnus-group-mode-map) 998 'gnus-group-tool-bar-gnome
998 (tool-bar-add-item-from-menu 999 'gnus-group-tool-bar-retro)
999 'gnus-group-catchup-current "catchup" gnus-group-mode-map) 1000 "Specifies the Gnus group tool bar.
1000 (tool-bar-add-item-from-menu 1001
1001 'gnus-group-describe-group "describe-group" gnus-group-mode-map) 1002It can be either a list or a symbol refering to a list. See
1002 (tool-bar-add-item "subscribe" 'gnus-group-subscribe 'subscribe 1003`gmm-tool-bar-from-list' for the format of the list. The
1003 :help "Subscribe to the current group") 1004default key map is `gnus-group-mode-map'.
1004 (tool-bar-add-item "unsubscribe" 'gnus-group-unsubscribe 1005
1005 'unsubscribe 1006Pre-defined symbols include `gnus-group-tool-bar-gnome' and
1006 :help "Unsubscribe from the current group") 1007`gnus-group-tool-bar-retro'."
1007 (tool-bar-add-item-from-menu 1008 :type '(choice (const :tag "GNOME style" gnus-group-tool-bar-gnome)
1008 'gnus-group-exit "exit-gnus" gnus-group-mode-map) 1009 (const :tag "Retro look" gnus-group-tool-bar-retro)
1009 tool-bar-map))) 1010 (repeat :tag "User defined list" gmm-tool-bar-item)
1010 (if gnus-group-toolbar-map 1011 (symbol))
1011 (set (make-local-variable 'tool-bar-map) gnus-group-toolbar-map))) 1012 :version "22.1" ;; Gnus 5.10.9
1013 :initialize 'custom-initialize-default
1014 :set 'gnus-group-tool-bar-update
1015 :group 'gnus-group)
1016
1017(defcustom gnus-group-tool-bar-gnome
1018 '((gnus-group-post-news "mail/compose")
1019 ;; Some useful agent icons? I don't use the agent so agent users should
1020 ;; suggest useful commands:
1021 (gnus-agent-toggle-plugged "connect" t
1022 :visible (and gnus-agent (not gnus-plugged)))
1023 (gnus-agent-toggle-plugged "disconnect" t
1024 :visible (and gnus-agent gnus-plugged))
1025 ;; FIXME: gnus-agent-toggle-plugged (in gnus-agent-group-make-menu-bar)
1026 ;; should have a better help text.
1027 (gnus-group-send-queue "mail/outbox" t
1028 :visible (and gnus-agent gnus-plugged)
1029 :help "Send articles from the queue group")
1030 (gnus-group-get-new-news "mail/inbox" nil
1031 :visible (or (not gnus-agent)
1032 gnus-plugged))
1033 ;; FIXME: gnus-*-read-group should have a better help text.
1034 (gnus-topic-read-group "open" nil
1035 :visible (and (boundp 'gnus-topic-mode)
1036 gnus-topic-mode))
1037 (gnus-group-read-group "open" nil
1038 :visible (not (and (boundp 'gnus-topic-mode)
1039 gnus-topic-mode)))
1040 ;; (gnus-group-find-new-groups "???" nil)
1041 (gnus-group-save-newsrc "save")
1042 (gnus-group-describe-group "describe")
1043 (gnus-group-unsubscribe-current-group "gnus/toggle-subscription")
1044 (gnus-group-prev-unread-group "left-arrow")
1045 (gnus-group-next-unread-group "right-arrow")
1046 (gnus-group-exit "exit")
1047 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
1048 (gnus-info-find-node "help"))
1049 "List of functions for the group tool bar (GNOME style).
1050
1051See `gmm-tool-bar-from-list' for the format of the list."
1052 :type '(repeat gmm-tool-bar-item)
1053 :version "22.1" ;; Gnus 5.10.9
1054 :initialize 'custom-initialize-default
1055 :set 'gnus-group-tool-bar-update
1056 :group 'gnus-group)
1057
1058(defcustom gnus-group-tool-bar-retro
1059 '((gnus-group-get-new-news "gnus/get-news")
1060 (gnus-group-get-new-news-this-group "gnus/gnntg")
1061 (gnus-group-catchup-current "gnus/catchup")
1062 (gnus-group-describe-group "gnus/describe-group")
1063 (gnus-group-subscribe "gnus/subscribe" t
1064 :help "Subscribe to the current group")
1065 (gnus-group-unsubscribe "gnus/unsubscribe" t
1066 :help "Unsubscribe from the current group")
1067 (gnus-group-exit "gnus/exit-gnus" gnus-group-mode-map))
1068 "List of functions for the group tool bar (retro look).
1069
1070See `gmm-tool-bar-from-list' for the format of the list."
1071 :type '(repeat gmm-tool-bar-item)
1072 :version "22.1" ;; Gnus 5.10.9
1073 :initialize 'custom-initialize-default
1074 :set 'gnus-group-tool-bar-update
1075 :group 'gnus-group)
1076
1077(defcustom gnus-group-tool-bar-zap-list t
1078 "List of icon items from the global tool bar.
1079These items are not displayed in the Gnus group mode tool bar.
1080
1081See `gmm-tool-bar-from-list' for the format of the list."
1082 :type 'gmm-tool-bar-zap-list
1083 :version "22.1" ;; Gnus 5.10.9
1084 :initialize 'custom-initialize-default
1085 :set 'gnus-group-tool-bar-update
1086 :group 'gnus-group)
1087
1088(defvar image-load-path)
1089
1090(defun gnus-group-make-tool-bar (&optional force)
1091 "Make a group mode tool bar from `gnus-group-tool-bar'.
1092When FORCE, rebuild the tool bar."
1093 (when (and (not (featurep 'xemacs))
1094 (boundp 'tool-bar-mode)
1095 tool-bar-mode
1096 ;; The Gnus 5.10.6 code checked (default-value 'tool-bar-mode).
1097 ;; Why? --rsteib
1098 (or (not gnus-group-tool-bar-map) force))
1099 (let* ((load-path
1100 (gmm-image-load-path-for-library "gnus"
1101 "gnus/toggle-subscription.xpm"
1102 nil t))
1103 (image-load-path (cons (car load-path)
1104 (when (boundp 'image-load-path)
1105 image-load-path)))
1106 (map (gmm-tool-bar-from-list gnus-group-tool-bar
1107 gnus-group-tool-bar-zap-list
1108 'gnus-group-mode-map)))
1109 (if map
1110 (set (make-local-variable 'tool-bar-map) map))))
1111 gnus-group-tool-bar-map)
1012 1112
1013(defun gnus-group-mode () 1113(defun gnus-group-mode ()
1014 "Major mode for reading news. 1114 "Major mode for reading news.
@@ -1379,6 +1479,17 @@ if it is a string, only list groups matching REGEXP."
1379 (gnus-range-difference (list active) (gnus-info-read info)) 1479 (gnus-range-difference (list active) (gnus-info-read info))
1380 seen)))))) 1480 seen))))))
1381 1481
1482;; Moving through the Group buffer (in topic mode) e.g. with C-n doesn't
1483;; update the state (enabled/disabled) of the icon `gnus-group-describe-group'
1484;; automatically. After `C-l' the state is correct. See the following report
1485;; on emacs-devel
1486;; <http://thread.gmane.org/v9acdmrcse.fsf@marauder.physik.uni-ulm.de>:
1487;; From: Reiner Steib
1488;; Subject: tool bar icons not updated according to :active condition
1489;; Newsgroups: gmane.emacs.devel
1490;; Date: Mon, 23 Jan 2006 19:59:13 +0100
1491;; Message-ID: <v9acdmrcse.fsf@marauder.physik.uni-ulm.de>
1492
1382(defcustom gnus-group-update-tool-bar 1493(defcustom gnus-group-update-tool-bar
1383 (and (not (featurep 'xemacs)) 1494 (and (not (featurep 'xemacs))
1384 (boundp 'tool-bar-mode) 1495 (boundp 'tool-bar-mode)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index bea7cb2445e..0de73bc879a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -38,6 +38,7 @@
38(require 'gnus-int) 38(require 'gnus-int)
39(require 'gnus-undo) 39(require 'gnus-undo)
40(require 'gnus-util) 40(require 'gnus-util)
41(require 'gmm-utils)
41(require 'mm-decode) 42(require 'mm-decode)
42(require 'nnoo) 43(require 'nnoo)
43 44
@@ -2546,47 +2547,161 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
2546 2547
2547(defvar gnus-summary-tool-bar-map nil) 2548(defvar gnus-summary-tool-bar-map nil)
2548 2549
2549;; Emacs 21 tool bar. Should be no-op otherwise. 2550;; Note: The :set function in the `gnus-summary-tool-bar*' variables will only
2550(defun gnus-summary-make-tool-bar () 2551;; affect _new_ message buffers. We might add a function that walks thru all
2551 (if (and (fboundp 'tool-bar-add-item-from-menu) 2552;; summary-mode buffers and force the update.
2552 (default-value 'tool-bar-mode) 2553(defun gnus-summary-tool-bar-update (&optional symbol value)
2553 (not gnus-summary-tool-bar-map)) 2554 "Update summary mode toolbar.
2554 (setq gnus-summary-tool-bar-map 2555Setter function for custom variables."
2555 (let ((tool-bar-map (make-sparse-keymap)) 2556 (setq-default gnus-summary-tool-bar-map nil)
2556 (load-path (mm-image-load-path))) 2557 (when symbol
2557 (tool-bar-add-item-from-menu 2558 ;; When used as ":set" function:
2558 'gnus-summary-prev-unread "prev-ur" gnus-summary-mode-map) 2559 (set-default symbol value))
2559 (tool-bar-add-item-from-menu 2560 (when (gnus-buffer-live-p gnus-summary-buffer)
2560 'gnus-summary-next-unread "next-ur" gnus-summary-mode-map) 2561 (with-current-buffer gnus-summary-buffer
2561 (tool-bar-add-item-from-menu 2562 (gnus-summary-make-tool-bar))))
2562 'gnus-summary-post-news "post" gnus-summary-mode-map) 2563
2563 (tool-bar-add-item-from-menu 2564(defcustom gnus-summary-tool-bar (if (eq gmm-tool-bar-style 'gnome)
2564 'gnus-summary-followup-with-original "fuwo" gnus-summary-mode-map) 2565 'gnus-summary-tool-bar-gnome
2565 (tool-bar-add-item-from-menu 2566 'gnus-summary-tool-bar-retro)
2566 'gnus-summary-followup "followup" gnus-summary-mode-map) 2567 "Specifies the Gnus summary tool bar.
2567 (tool-bar-add-item-from-menu 2568
2568 'gnus-summary-reply-with-original "reply-wo" gnus-summary-mode-map) 2569It can be either a list or a symbol refering to a list. See
2569 (tool-bar-add-item-from-menu 2570`gmm-tool-bar-from-list' for the format of the list. The
2570 'gnus-summary-reply "reply" gnus-summary-mode-map) 2571default key map is `gnus-summary-mode-map'.
2571 (tool-bar-add-item-from-menu 2572
2572 'gnus-summary-caesar-message "rot13" gnus-summary-mode-map) 2573Pre-defined symbols include `gnus-summary-tool-bar-gnome' and
2573 (tool-bar-add-item-from-menu 2574`gnus-summary-tool-bar-retro'."
2574 'gnus-uu-decode-uu "uu-decode" gnus-summary-mode-map) 2575 :type '(choice (const :tag "GNOME style" gnus-summary-tool-bar-gnome)
2575 (tool-bar-add-item-from-menu 2576 (const :tag "Retro look" gnus-summary-tool-bar-retro)
2576 'gnus-summary-save-article-file "save-aif" gnus-summary-mode-map) 2577 (repeat :tag "User defined list" gmm-tool-bar-item)
2577 (tool-bar-add-item-from-menu 2578 (symbol))
2578 'gnus-summary-save-article "save-art" gnus-summary-mode-map) 2579 :version "22.1" ;; Gnus 5.10.9
2579 (tool-bar-add-item-from-menu 2580 :initialize 'custom-initialize-default
2580 'gnus-uu-post-news "uu-post" gnus-summary-mode-map) 2581 :set 'gnus-summary-tool-bar-update
2581 (tool-bar-add-item-from-menu 2582 :group 'gnus-summary)
2582 'gnus-summary-catchup "catchup" gnus-summary-mode-map) 2583
2583 (tool-bar-add-item-from-menu 2584(defcustom gnus-summary-tool-bar-gnome
2584 'gnus-summary-catchup-and-exit "cu-exit" gnus-summary-mode-map) 2585 '((gnus-summary-post-news "mail/compose" nil)
2585 (tool-bar-add-item-from-menu 2586 (gnus-summary-insert-new-articles "mail/inbox" nil
2586 'gnus-summary-exit "exit-summ" gnus-summary-mode-map) 2587 :visible (or (not gnus-agent)
2587 tool-bar-map))) 2588 gnus-plugged))
2588 (if gnus-summary-tool-bar-map 2589 (gnus-summary-reply-with-original "mail/reply")
2589 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))) 2590 (gnus-summary-reply "mail/reply" nil :visible nil)
2591 (gnus-summary-followup-with-original "mail/reply-all")
2592 (gnus-summary-followup "mail/reply-all" nil :visible nil)
2593 (gnus-summary-mail-forward "mail/forward")
2594 (gnus-summary-save-article "mail/save")
2595 (gnus-summary-search-article-forward "search" nil :visible nil)
2596 (gnus-summary-print-article "print")
2597 (gnus-summary-tick-article-forward "flag-followup" nil :visible nil)
2598 ;; Some new commands that may need more suitable icons:
2599 (gnus-summary-save-newsrc "save" nil :visible nil)
2600 ;; (gnus-summary-show-article "stock_message-display" nil :visible nil)
2601 (gnus-summary-prev-article "left-arrow")
2602 (gnus-summary-next-article "right-arrow")
2603 (gnus-summary-next-page "next-page")
2604 ;; (gnus-summary-enter-digest-group "right_arrow" nil :visible nil)
2605 ;;
2606 ;; Maybe some sort-by-... could be added:
2607 ;; (gnus-summary-sort-by-author "sort-a-z" nil :visible nil)
2608 ;; (gnus-summary-sort-by-date "sort-1-9" nil :visible nil)
2609 (gnus-summary-mark-as-expirable
2610 "delete" nil
2611 :visible (gnus-check-backend-function 'request-expire-articles
2612 gnus-newsgroup-name))
2613 (gnus-summary-mark-as-spam
2614 "mail/spam" t
2615 :visible (and (fboundp 'spam-group-ham-contents-p)
2616 (spam-group-ham-contents-p gnus-newsgroup-name))
2617 :help "Mark as spam")
2618 (gnus-summary-mark-as-read-forward
2619 "mail/not-spam" nil
2620 :visible (and (fboundp 'spam-group-spam-contents-p)
2621 (spam-group-spam-contents-p gnus-newsgroup-name)))
2622 ;;
2623 (gnus-summary-exit "exit")
2624 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
2625 (gnus-info-find-node "help"))
2626 "List of functions for the summary tool bar (GNOME style).
2627
2628See `gmm-tool-bar-from-list' for the format of the list."
2629 :type '(repeat gmm-tool-bar-item)
2630 :version "22.1" ;; Gnus 5.10.9
2631 :initialize 'custom-initialize-default
2632 :set 'gnus-summary-tool-bar-update
2633 :group 'gnus-summary)
2634
2635(defcustom gnus-summary-tool-bar-retro
2636 '((gnus-summary-prev-unread-article "gnus/prev-ur")
2637 (gnus-summary-next-unread-article "gnus/next-ur")
2638 (gnus-summary-post-news "gnus/post")
2639 (gnus-summary-followup-with-original "gnus/fuwo")
2640 (gnus-summary-followup "gnus/followup")
2641 (gnus-summary-reply-with-original "gnus/reply-wo")
2642 (gnus-summary-reply "gnus/reply")
2643 (gnus-summary-caesar-message "gnus/rot13")
2644 (gnus-uu-decode-uu "gnus/uu-decode")
2645 (gnus-summary-save-article-file "gnus/save-aif")
2646 (gnus-summary-save-article "gnus/save-art")
2647 (gnus-uu-post-news "gnus/uu-post")
2648 (gnus-summary-catchup "gnus/catchup")
2649 (gnus-summary-catchup-and-exit "gnus/cu-exit")
2650 (gnus-summary-exit "gnus/exit-summ")
2651 ;; Some new command that may need more suitable icons:
2652 (gnus-summary-print-article "gnus/print" nil :visible nil)
2653 (gnus-summary-mark-as-expirable "gnus/close" nil :visible nil)
2654 (gnus-summary-save-newsrc "gnus/save" nil :visible nil)
2655 ;; (gnus-summary-enter-digest-group "gnus/right_arrow" nil :visible nil)
2656 (gnus-summary-search-article-forward "gnus/search" nil :visible nil)
2657 ;; (gnus-summary-insert-new-articles "gnus/paste" nil :visible nil)
2658 ;; (gnus-summary-toggle-threads "gnus/open" nil :visible nil)
2659 ;;
2660 (gnus-info-find-node "gnus/help" nil :visible nil))
2661 "List of functions for the summary tool bar (retro look).
2662
2663See `gmm-tool-bar-from-list' for the format of the list."
2664 :type '(repeat gmm-tool-bar-item)
2665 :version "22.1" ;; Gnus 5.10.9
2666 :initialize 'custom-initialize-default
2667 :set 'gnus-summary-tool-bar-update
2668 :group 'gnus-summary)
2669
2670(defcustom gnus-summary-tool-bar-zap-list t
2671 "List of icon items from the global tool bar.
2672These items are not displayed in the Gnus summary mode tool bar.
2673
2674See `gmm-tool-bar-from-list' for the format of the list."
2675 :type 'gmm-tool-bar-zap-list
2676 :version "22.1" ;; Gnus 5.10.9
2677 :initialize 'custom-initialize-default
2678 :set 'gnus-summary-tool-bar-update
2679 :group 'gnus-summary)
2680
2681(defvar image-load-path)
2682
2683(defun gnus-summary-make-tool-bar (&optional force)
2684 "Make a summary mode tool bar from `gnus-summary-tool-bar'.
2685When FORCE, rebuild the tool bar."
2686 (when (and (not (featurep 'xemacs))
2687 (boundp 'tool-bar-mode)
2688 tool-bar-mode
2689 (or (not gnus-summary-tool-bar-map) force))
2690 (let* ((load-path
2691 (gmm-image-load-path-for-library "gnus"
2692 "mail/save.xpm"
2693 nil t))
2694 (image-load-path (cons (car load-path)
2695 (when (boundp 'image-load-path)
2696 image-load-path)))
2697 (map (gmm-tool-bar-from-list gnus-summary-tool-bar
2698 gnus-summary-tool-bar-zap-list
2699 'gnus-summary-mode-map)))
2700 (when map
2701 ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode'
2702 ;; uses it's value.
2703 (setq gnus-summary-tool-bar-map map))))
2704 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))
2590 2705
2591(defun gnus-score-set-default (var value) 2706(defun gnus-score-set-default (var value)
2592 "A version of set that updates the GNU Emacs menu-bar." 2707 "A version of set that updates the GNU Emacs menu-bar."
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 741b193f779..472eb2468dd 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -37,6 +37,7 @@
37 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary 37 (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
38(require 'canlock) 38(require 'canlock)
39(require 'mailheader) 39(require 'mailheader)
40(require 'gmm-utils)
40(require 'nnheader) 41(require 'nnheader)
41;; This is apparently necessary even though things are autoloaded. 42;; This is apparently necessary even though things are autoloaded.
42;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better 43;; Because we dynamically bind mail-abbrev-mode-regexp, we'd better
@@ -2529,7 +2530,7 @@ M-RET `message-newline-and-reformat' (break the line and reformat)."
2529 (set (make-local-variable 'font-lock-defaults) 2530 (set (make-local-variable 'font-lock-defaults)
2530 '(message-font-lock-keywords t)) 2531 '(message-font-lock-keywords t))
2531 (if (boundp 'tool-bar-map) 2532 (if (boundp 'tool-bar-map)
2532 (set (make-local-variable 'tool-bar-map) (message-tool-bar-map)))) 2533 (set (make-local-variable 'tool-bar-map) (message-make-tool-bar))))
2533 (easy-menu-add message-mode-menu message-mode-map) 2534 (easy-menu-add message-mode-menu message-mode-map)
2534 (easy-menu-add message-mode-field-menu message-mode-map) 2535 (easy-menu-add message-mode-field-menu message-mode-map)
2535 (gnus-make-local-hook 'after-change-functions) 2536 (gnus-make-local-hook 'after-change-functions)
@@ -6586,53 +6587,123 @@ which specify the range to operate on."
6586 6587
6587;; Support for toolbar 6588;; Support for toolbar
6588(eval-when-compile 6589(eval-when-compile
6589 (defvar tool-bar-map)
6590 (defvar tool-bar-mode)) 6590 (defvar tool-bar-mode))
6591 6591
6592(defun message-tool-bar-local-item-from-menu (command icon in-map &optional from-map &rest props) 6592;; Note: The :set function in the `message-tool-bar*' variables will only
6593 ;; We need to make tool bar entries in local keymaps with 6593;; affect _new_ message buffers. We might add a function that walks thru all
6594 ;; `tool-bar-local-item-from-menu' in Emacs >= 22 6594;; message-mode buffers and force the update.
6595 (if (fboundp 'tool-bar-local-item-from-menu) 6595(defun message-tool-bar-update (&optional symbol value)
6596 (tool-bar-local-item-from-menu command icon in-map from-map props) 6596 "Update message mode toolbar.
6597 (tool-bar-add-item-from-menu command icon from-map props))) 6597Setter function for custom variables."
6598 6598 (setq-default message-tool-bar-map nil)
6599(defun message-tool-bar-map () 6599 (when symbol
6600 (or message-tool-bar-map 6600 ;; When used as ":set" function:
6601 (setq message-tool-bar-map 6601 (set-default symbol value)))
6602 (and 6602
6603 (condition-case nil (require 'tool-bar) (error nil)) 6603(defcustom message-tool-bar (if (eq gmm-tool-bar-style 'gnome)
6604 (fboundp 'tool-bar-add-item-from-menu) 6604 'message-tool-bar-gnome
6605 'message-tool-bar-retro)
6606 "Specifies the message mode tool bar.
6607
6608It can be either a list or a symbol refering to a list. See
6609`gmm-tool-bar-from-list' for the format of the list. The
6610default key map is `message-mode-map'.
6611
6612Pre-defined symbols include `message-tool-bar-gnome' and
6613`message-tool-bar-retro'."
6614 :type '(repeat gmm-tool-bar-list-item)
6615 :type '(choice (const :tag "GNOME style" message-tool-bar-gnome)
6616 (const :tag "Retro look" message-tool-bar-retro)
6617 (repeat :tag "User defined list" gmm-tool-bar-item)
6618 (symbol))
6619 :version "22.1" ;; Gnus 5.10.9
6620 :initialize 'custom-initialize-default
6621 :set 'message-tool-bar-update
6622 :group 'message)
6623
6624(defcustom message-tool-bar-gnome
6625 '((ispell-message "spell" nil
6626 :visible (or (not (boundp 'flyspell-mode))
6627 (not flyspell-mode)))
6628 (flyspell-buffer "spell" t
6629 :visible (and (boundp 'flyspell-mode)
6630 flyspell-mode)
6631 :help "Flyspell whole buffer")
6632 (gmm-ignore "separator")
6633 (message-send-and-exit "mail/send")
6634 (message-dont-send "mail/save-draft")
6635 (message-kill-buffer "close") ;; stock_cancel
6636 (mml-attach-file "attach" mml-mode-map)
6637 (mml-preview "mail/preview" mml-mode-map)
6638 ;; (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
6639 (message-insert-importance-high "important" nil :visible nil)
6640 (message-insert-importance-low "unimportant" nil :visible nil)
6641 (message-insert-disposition-notification-to "receipt" nil :visible nil)
6642 (gmm-customize-mode "preferences" t :help "Edit mode preferences")
6643 (message-info "help" t :help "Message manual"))
6644 "List of items for the message tool bar (GNOME style).
6645
6646See `gmm-tool-bar-from-list' for details on the format of the list."
6647 :type '(repeat gmm-tool-bar-item)
6648 :version "22.1" ;; Gnus 5.10.9
6649 :initialize 'custom-initialize-default
6650 :set 'message-tool-bar-update
6651 :group 'message)
6652
6653(defcustom message-tool-bar-retro
6654 '(;; Old Emacs 21 icon for consistency.
6655 (message-send-and-exit "gnus/mail_send")
6656 (message-kill-buffer "close")
6657 (message-dont-send "cancel")
6658 (mml-attach-file "attach" mml-mode-map)
6659 (ispell-message "spell")
6660 (mml-preview "preview" mml-mode-map)
6661 (message-insert-importance-high "gnus/important")
6662 (message-insert-importance-low "gnus/unimportant")
6663 (message-insert-disposition-notification-to "gnus/receipt"))
6664 "List of items for the message tool bar (retro style).
6665
6666See `gmm-tool-bar-from-list' for details on the format of the list."
6667 :type '(repeat gmm-tool-bar-item)
6668 :version "22.1" ;; Gnus 5.10.9
6669 :initialize 'custom-initialize-default
6670 :set 'message-tool-bar-update
6671 :group 'message)
6672
6673(defcustom message-tool-bar-zap-list
6674 '(new-file open-file dired kill-buffer write-file
6675 print-buffer customize help)
6676 "List of icon items from the global tool bar.
6677These items are not displayed on the message mode tool bar.
6678
6679See `gmm-tool-bar-from-list' for the format of the list."
6680 :type 'gmm-tool-bar-zap-list
6681 :version "22.1" ;; Gnus 5.10.9
6682 :initialize 'custom-initialize-default
6683 :set 'message-tool-bar-update
6684 :group 'message)
6685
6686(defvar image-load-path)
6687
6688(defun message-make-tool-bar (&optional force)
6689 "Make a message mode tool bar from `message-tool-bar-list'.
6690When FORCE, rebuild the tool bar."
6691 (when (and (not (featurep 'xemacs))
6692 (boundp 'tool-bar-mode)
6605 tool-bar-mode 6693 tool-bar-mode
6606 (let ((tool-bar-map (copy-keymap tool-bar-map)) 6694 (or (not message-tool-bar-map) force))
6607 (load-path (mm-image-load-path))) 6695 (setq message-tool-bar-map
6608 ;; Zap some items which aren't so relevant and take 6696 (let* ((load-path
6609 ;; up space. 6697 (gmm-image-load-path-for-library "message"
6610 (dolist (key '(print-buffer kill-buffer save-buffer 6698 "mail/save-draft.xpm"
6611 write-file dired open-file)) 6699 nil t))
6612 (define-key tool-bar-map (vector key) nil)) 6700 (image-load-path (cons (car load-path)
6613 (message-tool-bar-local-item-from-menu 6701 (when (boundp 'image-load-path)
6614 'message-send-and-exit "mail/send" tool-bar-map message-mode-map) 6702 image-load-path))))
6615 (message-tool-bar-local-item-from-menu 6703 (gmm-tool-bar-from-list message-tool-bar
6616 'message-kill-buffer "close" tool-bar-map message-mode-map) 6704 message-tool-bar-zap-list
6617 (message-tool-bar-local-item-from-menu 6705 'message-mode-map))))
6618 'message-dont-send "cancel" tool-bar-map message-mode-map) 6706 message-tool-bar-map)
6619 (message-tool-bar-local-item-from-menu
6620 'mml-attach-file "attach" tool-bar-map mml-mode-map)
6621 (message-tool-bar-local-item-from-menu
6622 'ispell-message "spell" tool-bar-map message-mode-map)
6623 (message-tool-bar-local-item-from-menu
6624 'mml-preview "preview"
6625 tool-bar-map mml-mode-map)
6626 (message-tool-bar-local-item-from-menu
6627 'message-insert-importance-high "important"
6628 tool-bar-map message-mode-map)
6629 (message-tool-bar-local-item-from-menu
6630 'message-insert-importance-low "unimportant"
6631 tool-bar-map message-mode-map)
6632 (message-tool-bar-local-item-from-menu
6633 'message-insert-disposition-notification-to "receipt"
6634 tool-bar-map message-mode-map)
6635 tool-bar-map)))))
6636 6707
6637;;; Group name completion. 6708;;; Group name completion.
6638 6709
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index c58eb6bd41d..a10b8b28399 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -56,6 +56,8 @@
56 ;; known to break servers. 56 ;; known to break servers.
57 ;; Note: UTF-16 variants are invalid for text parts [RFC 2781], 57 ;; Note: UTF-16 variants are invalid for text parts [RFC 2781],
58 ;; so this can't happen :-/. 58 ;; so this can't happen :-/.
59 ;; PPS: Yes, it can happen if the user specifies UTF-16 in the MML
60 ;; markup. - jh.
59 (utf-16 . base64) 61 (utf-16 . base64)
60 (utf-16be . base64) 62 (utf-16be . base64)
61 (utf-16le . base64)) 63 (utf-16le . base64))
@@ -251,7 +253,10 @@ decoding. If it is nil, default to `mail-parse-charset'."
251 (mm-decode-content-transfer-encoding encoding type)) 253 (mm-decode-content-transfer-encoding encoding type))
252 (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session. 254 (when (and (featurep 'mule) ;; Fixme: Wrong test for unibyte session.
253 (not (eq charset 'gnus-decoded))) 255 (not (eq charset 'gnus-decoded)))
254 (let ((coding-system (mm-charset-to-coding-system charset))) 256 (let ((coding-system (mm-charset-to-coding-system
257 ;; Allow overwrite using
258 ;; `mm-charset-override-alist'.
259 charset nil t)))
255 (if (and (not coding-system) 260 (if (and (not coding-system)
256 (listp mail-parse-ignored-charsets) 261 (listp mail-parse-ignored-charsets)
257 (memq 'gnus-unknown mail-parse-ignored-charsets)) 262 (memq 'gnus-unknown mail-parse-ignored-charsets))
@@ -282,7 +287,11 @@ decoding. If it is nil, default to `mail-parse-charset'."
282 (setq charset mail-parse-charset)) 287 (setq charset mail-parse-charset))
283 (or 288 (or
284 (when (featurep 'mule) 289 (when (featurep 'mule)
285 (let ((coding-system (mm-charset-to-coding-system charset))) 290 (let ((coding-system (mm-charset-to-coding-system
291 charset
292 ;; Allow overwrite using
293 ;; `mm-charset-override-alist'.
294 nil t)))
286 (if (and (not coding-system) 295 (if (and (not coding-system)
287 (listp mail-parse-ignored-charsets) 296 (listp mail-parse-ignored-charsets)
288 (memq 'gnus-unknown mail-parse-ignored-charsets)) 297 (memq 'gnus-unknown mail-parse-ignored-charsets))
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index a8c1f3a87a1..e16750cfcf6 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -177,6 +177,29 @@ system object in XEmacs."
177 ;; no-MULE XEmacs: 177 ;; no-MULE XEmacs:
178 (car (memq cs (mm-get-coding-system-list)))))) 178 (car (memq cs (mm-get-coding-system-list))))))
179 179
180(defun mm-codepage-setup (number &optional alias)
181 "Create a coding system cpNUMBER.
182The coding system is created using `codepage-setup'. If ALIAS is
183non-nil, an alias is created and added to
184`mm-charset-synonym-alist'. If ALIAS is a string, it's used as
185the alias. Else windows-NUMBER is used."
186 (interactive
187 (let ((completion-ignore-case t)
188 (candidates (cp-supported-codepages)))
189 (list (completing-read "Setup DOS Codepage: (default 437) " candidates
190 nil t nil nil "437"))))
191 (when alias
192 (setq alias (if (stringp alias)
193 (intern alias)
194 (intern (format "windows-%s" number)))))
195 (let* ((cp (intern (format "cp%s" number))))
196 (unless (mm-coding-system-p cp)
197 (codepage-setup number))
198 (when (and alias
199 ;; Don't add alias if setup of cp failed.
200 (mm-coding-system-p cp))
201 (add-to-list 'mm-charset-synonym-alist (cons alias cp)))))
202
180(defvar mm-charset-synonym-alist 203(defvar mm-charset-synonym-alist
181 `( 204 `(
182 ;; Not in XEmacs, but it's not a proper MIME charset anyhow. 205 ;; Not in XEmacs, but it's not a proper MIME charset anyhow.
@@ -200,8 +223,61 @@ system object in XEmacs."
200 ,@(if (and (not (mm-coding-system-p 'windows-1250)) 223 ,@(if (and (not (mm-coding-system-p 'windows-1250))
201 (mm-coding-system-p 'cp1250)) 224 (mm-coding-system-p 'cp1250))
202 '((windows-1250 . cp1250))) 225 '((windows-1250 . cp1250)))
226 ;; A Microsoft misunderstanding.
227 ,@(if (and (not (mm-coding-system-p 'unicode))
228 (mm-coding-system-p 'utf-16-le))
229 '((unicode . utf-16-le)))
230 ;; A Microsoft misunderstanding.
231 ,@(unless (mm-coding-system-p 'ks_c_5601-1987)
232 (if (mm-coding-system-p 'cp949)
233 '((ks_c_5601-1987 . cp949))
234 '((ks_c_5601-1987 . euc-kr))))
203 ) 235 )
204 "A mapping from invalid charset names to the real charset names.") 236 "A mapping from unknown or invalid charset names to the real charset names.")
237
238(defcustom mm-charset-override-alist
239 `((iso-8859-1 . windows-1252))
240 "A mapping from undesired charset names to their replacement.
241
242You may add pairs like (iso-8859-1 . windows-1252) here,
243i.e. treat iso-8859-1 as windows-1252. windows-1252 is a
244superset of iso-8859-1."
245 :type '(list (set :inline t
246 (const (iso-8859-1 . windows-1252))
247 (const (undecided . windows-1252)))
248 (repeat :inline t
249 :tag "Other options"
250 (cons (symbol :tag "From charset")
251 (symbol :tag "To charset"))))
252 :version "23.0" ;; No Gnus
253 :group 'mime)
254
255(defcustom mm-charset-eval-alist
256 (if (featurep 'xemacs)
257 nil ;; I don't know what would be useful for XEmacs.
258 '(;; Emacs 21 offers 1250 1251 1253 1257. Emacs 22 provides autoloads for
259 ;; 1250-1258 (i.e. `mm-codepage-setup' does nothing).
260 (windows-1250 . (mm-codepage-setup 1250 t))
261 (windows-1251 . (mm-codepage-setup 1251 t))
262 (windows-1253 . (mm-codepage-setup 1253 t))
263 (windows-1257 . (mm-codepage-setup 1257 t))))
264 "An alist of (CHARSET . FORM) pairs.
265If an article is encoded in an unknown CHARSET, FORM is
266evaluated. This allows to load additional libraries providing
267charsets on demand. If supported by your Emacs version, you
268could use `autoload-coding-system' here."
269 :version "23.0" ;; No Gnus
270 :type '(list (set :inline t
271 (const (windows-1250 . (mm-codepage-setup 1250 t)))
272 (const (windows-1251 . (mm-codepage-setup 1251 t)))
273 (const (windows-1253 . (mm-codepage-setup 1253 t)))
274 (const (windows-1257 . (mm-codepage-setup 1257 t)))
275 (const (cp850 . (mm-codepage-setup 850 nil))))
276 (repeat :inline t
277 :tag "Other options"
278 (cons (symbol :tag "charset")
279 (symbol :tag "form"))))
280 :group 'mime)
205 281
206(defvar mm-binary-coding-system 282(defvar mm-binary-coding-system
207 (cond 283 (cond
@@ -426,11 +502,17 @@ mail with multiple parts is preferred to sending a Unicode one.")
426 (pop alist)) 502 (pop alist))
427 out))) 503 out)))
428 504
429(defun mm-charset-to-coding-system (charset &optional lbt) 505(defun mm-charset-to-coding-system (charset &optional lbt
506 allow-override)
430 "Return coding-system corresponding to CHARSET. 507 "Return coding-system corresponding to CHARSET.
431CHARSET is a symbol naming a MIME charset. 508CHARSET is a symbol naming a MIME charset.
432If optional argument LBT (`unix', `dos' or `mac') is specified, it is 509If optional argument LBT (`unix', `dos' or `mac') is specified, it is
433used as the line break code type of the coding system." 510used as the line break code type of the coding system.
511
512If ALLOW-OVERRIDE is given, use `mm-charset-override-alist' to
513map undesired charset names to their replacement. This should
514only be used for decoding, not for encoding."
515 ;; OVERRIDE is used (only) in `mm-decode-body' and `mm-decode-string'.
434 (when (stringp charset) 516 (when (stringp charset)
435 (setq charset (intern (downcase charset)))) 517 (setq charset (intern (downcase charset))))
436 (when lbt 518 (when lbt
@@ -442,6 +524,11 @@ used as the line break code type of the coding system."
442 ((or (null (mm-get-coding-system-list)) 524 ((or (null (mm-get-coding-system-list))
443 (not (fboundp 'coding-system-get))) 525 (not (fboundp 'coding-system-get)))
444 charset) 526 charset)
527 ;; Check override list quite early. Should only used for decoding, not for
528 ;; encoding!
529 ((and allow-override
530 (let ((cs (cdr (assq charset mm-charset-override-alist))))
531 (and cs (mm-coding-system-p cs) cs))))
445 ;; ascii 532 ;; ascii
446 ((eq charset 'us-ascii) 533 ((eq charset 'us-ascii)
447 'ascii) 534 'ascii)
@@ -454,9 +541,27 @@ used as the line break code type of the coding system."
454;;; (eq charset (coding-system-get charset 'mime-charset)) 541;;; (eq charset (coding-system-get charset 'mime-charset))
455 ) 542 )
456 charset) 543 charset)
544 ;; Eval expressions from `mm-charset-eval-alist'
545 ((let* ((el (assq charset mm-charset-eval-alist))
546 (cs (car el))
547 (form (cdr el)))
548 (and cs
549 form
550 (prog2
551 ;; Avoid errors...
552 (condition-case nil (eval form) (error nil))
553 ;; (message "Failed to eval `%s'" form))
554 (mm-coding-system-p cs)
555 (message "Added charset `%s' via `mm-charset-eval-alist'" cs))
556 cs)))
457 ;; Translate invalid charsets. 557 ;; Translate invalid charsets.
458 ((let ((cs (cdr (assq charset mm-charset-synonym-alist)))) 558 ((let ((cs (cdr (assq charset mm-charset-synonym-alist))))
459 (and cs (mm-coding-system-p cs) cs))) 559 (and cs
560 (mm-coding-system-p cs)
561 ;; (message
562 ;; "Using synonym `%s' from `mm-charset-synonym-alist' for `%s'"
563 ;; cs charset)
564 cs)))
460 ;; Last resort: search the coding system list for entries which 565 ;; Last resort: search the coding system list for entries which
461 ;; have the right mime-charset in case the canonical name isn't 566 ;; have the right mime-charset in case the canonical name isn't
462 ;; defined (though it should be). 567 ;; defined (though it should be).
@@ -468,6 +573,11 @@ used as the line break code type of the coding system."
468 (eq charset (or (coding-system-get c :mime-charset) 573 (eq charset (or (coding-system-get c :mime-charset)
469 (coding-system-get c 'mime-charset)))) 574 (coding-system-get c 'mime-charset))))
470 (setq cs c))) 575 (setq cs c)))
576 (unless cs
577 ;; Warn the user about unknown charset:
578 (if (fboundp 'gnus-message)
579 (gnus-message 7 "Unknown charset: %s" charset)
580 (message "Unknown charset: %s" charset)))
471 cs)))) 581 cs))))
472 582
473(defsubst mm-replace-chars-in-string (string from to) 583(defsubst mm-replace-chars-in-string (string from to)
@@ -1070,7 +1180,8 @@ If SUFFIX is non-nil, add that at the end of the file name."
1070 (defun mm-detect-mime-charset-region (start end) 1180 (defun mm-detect-mime-charset-region (start end)
1071 "Detect MIME charset of the text in the region between START and END." 1181 "Detect MIME charset of the text in the region between START and END."
1072 (let ((cs (mm-detect-coding-region start end))) 1182 (let ((cs (mm-detect-coding-region start end)))
1073 (coding-system-get cs 'mime-charset))) 1183 (or (coding-system-get cs :mime-charset)
1184 (coding-system-get cs 'mime-charset))))
1074 (defun mm-detect-mime-charset-region (start end) 1185 (defun mm-detect-mime-charset-region (start end)
1075 "Detect MIME charset of the text in the region between START and END." 1186 "Detect MIME charset of the text in the region between START and END."
1076 (let ((cs (mm-detect-coding-region start end))) 1187 (let ((cs (mm-detect-coding-region start end)))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 94621535154..a5cdf1f4d72 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -197,6 +197,7 @@ Commands:
197 (view-mode) 197 (view-mode)
198 (make-local-variable 'view-no-disable-on-exit) 198 (make-local-variable 'view-no-disable-on-exit)
199 (setq view-no-disable-on-exit t) 199 (setq view-no-disable-on-exit t)
200 (setq view-exit-action (lambda (buffer) (delete-window)))
200 (run-mode-hooks 'help-mode-hook)) 201 (run-mode-hooks 'help-mode-hook))
201 202
202;;;###autoload 203;;;###autoload
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 258f852a4d6..1a55676e3c7 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -139,7 +139,11 @@ and showing the image as an image."
139 ;; was inserted 139 ;; was inserted
140 (let* ((image 140 (let* ((image
141 (if (and (buffer-file-name) 141 (if (and (buffer-file-name)
142 (not (buffer-modified-p))) 142 (not (buffer-modified-p))
143 (not (and (boundp 'archive-superior-buffer)
144 archive-superior-buffer))
145 (not (and (boundp 'tar-superior-buffer)
146 tar-superior-buffer)))
143 (progn (clear-image-cache) 147 (progn (clear-image-cache)
144 (create-image (buffer-file-name))) 148 (create-image (buffer-file-name)))
145 (create-image 149 (create-image
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 774903e1092..a609bcbadf9 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -208,18 +208,13 @@ during matching.")
208 208
209;;;###autoload 209;;;###autoload
210(defvar imenu-create-index-function 'imenu-default-create-index-function 210(defvar imenu-create-index-function 'imenu-default-create-index-function
211 "The function to use for creating a buffer index. 211 "The function to use for creating an index alist of the current buffer.
212 212
213It should be a function that takes no arguments and returns an index 213It should be a function that takes no arguments and returns
214of the current buffer as an alist. 214an index alist of the current buffer. The function is
215called within a `save-excursion'.
215 216
216Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 217See `imenu--index-alist' for the format of the buffer index alist.")
217Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...).
218A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
219The function `imenu--subalist-p' tests an element and returns t
220if it is a sub-alist.
221
222This function is called within a `save-excursion'.")
223;;;###autoload 218;;;###autoload
224(make-variable-buffer-local 'imenu-create-index-function) 219(make-variable-buffer-local 'imenu-create-index-function)
225 220
@@ -431,15 +426,27 @@ Don't move point."
431;; The latest buffer index. 426;; The latest buffer index.
432;; Buffer local. 427;; Buffer local.
433(defvar imenu--index-alist nil 428(defvar imenu--index-alist nil
434 "The buffer index computed for this buffer in Imenu. 429 "The buffer index alist computed for this buffer in Imenu.
435Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 430
436Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...). 431Simple elements in the alist look like (INDEX-NAME . POSITION).
437A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") 432POSITION is the buffer position of the item; to go to the item
433is simply to move point to that position.
434
435Special elements look like (INDEX-NAME POSITION FUNCTION ARGUMENTS...).
436To \"go to\" a special element means applying FUNCTION
437to INDEX-NAME, POSITION, and the ARGUMENTS.
438
439A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
440The function `imenu--subalist-p' tests an element and returns t
441if it is a sub-alist.
442
443There is one simple element with negative POSITION; selecting that
444element recalculates the buffer's index alist.")
438 445
439(make-variable-buffer-local 'imenu--index-alist) 446(make-variable-buffer-local 'imenu--index-alist)
440 447
441(defvar imenu--last-menubar-index-alist nil 448(defvar imenu--last-menubar-index-alist nil
442 "The latest buffer index used to update the menu bar menu.") 449 "The latest buffer index alist used to update the menu bar menu.")
443 450
444(make-variable-buffer-local 'imenu--last-menubar-index-alist) 451(make-variable-buffer-local 'imenu--last-menubar-index-alist)
445 452
@@ -547,19 +554,12 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).")
547 554
548 555
549(defun imenu--make-index-alist (&optional noerror) 556(defun imenu--make-index-alist (&optional noerror)
550 "Create an index-alist for the definitions in the current buffer. 557 "Create an index alist for the definitions in the current buffer.
551 558This works by using the hook function `imenu-create-index-function'.
552Report an error if the list is empty unless NOERROR is supplied and 559Report an error if the list is empty unless NOERROR is supplied and
553non-nil. 560non-nil.
554 561
555Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION). 562See `imenu--index-alist' for the format of the index alist."
556Special elements look like (INDEX-NAME FUNCTION ARGUMENTS...).
557A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
558The function `imenu--subalist-p' tests an element and returns t
559if it is a sub-alist.
560
561There is one simple element with negative POSITION; that's intended
562as a way for the user to ask to recalculate the buffer's index alist."
563 (or (and imenu--index-alist 563 (or (and imenu--index-alist
564 (or (not imenu-auto-rescan) 564 (or (not imenu-auto-rescan)
565 (and imenu-auto-rescan 565 (and imenu-auto-rescan
@@ -657,11 +657,15 @@ and speed-up matching.")
657(make-variable-buffer-local 'imenu-syntax-alist) 657(make-variable-buffer-local 'imenu-syntax-alist)
658 658
659(defun imenu-default-create-index-function () 659(defun imenu-default-create-index-function ()
660 "*Wrapper for index searching functions. 660 "*Default function to create an index alist of the current buffer.
661 661
662Moves point to end of buffer and then repeatedly calls 662The most general method is to move point to end of buffer, then repeatedly call
663`imenu-prev-index-position-function' and `imenu-extract-index-name-function'. 663`imenu-prev-index-position-function' and `imenu-extract-index-name-function'.
664Their results are gathered into an index alist." 664All the results returned by the latter are gathered into an index alist.
665This method is used if those two variables are non-nil.
666
667The alternate method, which is the one most often used, is to call
668`imenu--generic-function' with `imenu-generic-expression' as argument."
665 ;; These should really be done by setting imenu-create-index-function 669 ;; These should really be done by setting imenu-create-index-function
666 ;; in these major modes. But save that change for later. 670 ;; in these major modes. But save that change for later.
667 (cond ((and imenu-prev-index-position-function 671 (cond ((and imenu-prev-index-position-function
@@ -687,27 +691,6 @@ Their results are gathered into an index alist."
687 (t 691 (t
688 (error "This buffer cannot use `imenu-default-create-index-function'")))) 692 (error "This buffer cannot use `imenu-default-create-index-function'"))))
689 693
690;; Not used and would require cl at run time
691;; (defun imenu--flatten-index-alist (index-alist &optional concat-names prefix)
692;; ;; Takes a nested INDEX-ALIST and returns a flat index alist.
693;; ;; If optional CONCAT-NAMES is non-nil, then a nested index has its
694;; ;; name and a space concatenated to the names of the children.
695;; ;; Third argument PREFIX is for internal use only.
696;; (mapcan
697;; (lambda (item)
698;; (let* ((name (car item))
699;; (pos (cdr item))
700;; (new-prefix (and concat-names
701;; (if prefix
702;; (concat prefix imenu-level-separator name)
703;; name))))
704;; (cond
705;; ((or (markerp pos) (numberp pos))
706;; (list (cons new-prefix pos)))
707;; (t
708;; (imenu--flatten-index-alist pos new-prefix)))))
709;; index-alist))
710
711;;; 694;;;
712;;; Generic index gathering function. 695;;; Generic index gathering function.
713;;; 696;;;
@@ -724,7 +707,7 @@ for modes which use `imenu--generic-function'. If it is not set, but
724;; This function can be called with quitting disabled, 707;; This function can be called with quitting disabled,
725;; so it needs to be careful never to loop! 708;; so it needs to be careful never to loop!
726(defun imenu--generic-function (patterns) 709(defun imenu--generic-function (patterns)
727 "Return an index of the current buffer as an alist. 710 "Return an index alist of the current buffer based on PATTERNS.
728 711
729PATTERNS is an alist with elements that look like this: 712PATTERNS is an alist with elements that look like this:
730 (MENU-TITLE REGEXP INDEX) 713 (MENU-TITLE REGEXP INDEX)
@@ -732,9 +715,8 @@ or like this:
732 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...) 715 (MENU-TITLE REGEXP INDEX FUNCTION ARGUMENTS...)
733with zero or more ARGUMENTS. The former format creates a simple 716with zero or more ARGUMENTS. The former format creates a simple
734element in the index alist when it matches; the latter creates a 717element in the index alist when it matches; the latter creates a
735special element of the form (NAME POSITION-MARKER FUNCTION 718special element of the form (INDEX-NAME POSITION-MARKER FUNCTION
736ARGUMENTS...) with FUNCTION and ARGUMENTS copied from 719ARGUMENTS...) with FUNCTION and ARGUMENTS copied from PATTERNS.
737`imenu-generic-expression'.
738 720
739MENU-TITLE is a string used as the title for the submenu or nil 721MENU-TITLE is a string used as the title for the submenu or nil
740if the entries are not nested. 722if the entries are not nested.
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 6bf84517bde..72c7a87f257 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,172 @@
12006-04-18 Bill Wohler <wohler@newt.com>
2
3 * mh-e.el (defcustom-mh, defface-mh, defgroup-mh, mh-face-data)
4 (mh-strip-package-version, mh-face-data, mh-inherit-face-flag)
5 (mh-min-colors-defined-flag): Do not unbind these macros and
6 variables. Nice idea, but too many nasty side-effects. These
7 macros are needed by [Cc]ustom-make-dependencies when creating the
8 MH-E customization groups in mh-cus-load.el. These disappeared
9 when the macros above were introduced. Besides, if a developer
10 were to try to show the help for a macro or variable they were
11 looking at and got [No match] when they did so, that would be bad.
12
132006-04-17 Bill Wohler <wohler@newt.com>
14
15 * mh-comp.el (mh-insert-x-mailer): Strip build number from
16 version in X-Mailer field (closes SF #1466481).
17
18 * mh-acros.el (mh-defun-compat): Rename to defun-mh in order that
19 variables and functions with the same name are found correctly by
20 find-func (invoked by clicking on the filename link in the *Help*
21 buffer).
22 (mh-defmacro-compat): Rename to defmacro-mh. Ditto.
23 * mh-e.el: (mh-defgroup): Rename to defgroup-mh. Ditto.
24 (mh-defcustom): Rename to defcustom-mh. Ditto.
25 (mh-defface): Rename to defface-mh. Ditto.
26 (mh-font-lock-add-keywords): Make changes according to these
27 renamings.
28
29 * mh-e.el, mh-compat.el, mh-gnus.el: Use the new names (closes SF
30 #1472029).
31
32 * mh-utils.el (mh-sub-folders-actual): Mention that folder must
33 have been processed by mh-normalize-folder-name.
34 (mh-folder-completion-function): Handle completion of folders with
35 absolute names. Also, when flag is t, display complete folder name
36 to provide proper highlighting in Emacs 22 now that
37 minibuffer-completing-file-name is nil (closes SF #1470518).
38 (mh-folder-completing-read): No longer set
39 minibuffer-completing-file-name to t. This was causing "Can't set
40 current directory errors" when browsing absolute file names.
41 Another benefit of this change is that SPC can be used for
42 completion again (closes SF #1470518).
43
442006-04-15 Bill Wohler <wohler@newt.com>
45
46 * mh-compat.el (mh-font-lock-add-keywords): Fix typo in docstring.
47
482006-04-14 Bill Wohler <wohler@newt.com>
49
50 * mh-funcs.el (view-exit-action): No need to wrap defvar with
51 eval-when-compile when shushing compiler.
52
53 * mh-mime.el (mh-identity-pgg-default-user-id): Ditto.
54
55 * mh-seq.el (view-exit-action): Ditto.
56
57 * mh-show.el (font-lock-auto-fontify): Ditto.
58
59 * mh-utils.el (mh-speed-flists-cache): Ditto
60
61 * mh-acros.el (struct, x, y): No need to wrap defvar with
62 eval-when-compile when shushing compiler, even when
63 mh-do-in-xemacs or another construct is used.
64
65 * mh-comp.el (sendmail-coding-system): Ditto.
66
67 * mh-e.el (mark-active): Ditto.
68
69 * mh-folder.el (desktop-save-buffer, font-lock-auto-fontify)
70 (image-load-path, font-lock-defaults): Ditto.
71
72 * mh-letter.el (image-load-path, font-lock-defaults): Ditto.
73
74 * mh-mime.el (dots, type, ov)
75 (mm-verify-function-alist, mm-decrypt-function-alist)
76 (pressed-details): Ditto.
77
78 * mh-search.el (pick-folder, mh-do-in-xemacs)
79 (mh-mairix-folder, mh-flists-search-folders)
80 (which-func-mode, mh-speed-flists-inhibit-flag): Ditto.
81
82 * mh-seq.el (tool-bar-mode): Ditto.
83
84 * mh-utils.el (completion-root-regexp)
85 (minibuffer-completing-file-name): Ditto.
86
87 * mh-xface.el (default-enable-multibyte-characters): Ditto.
88
89 * mh-compat.el (mh-font-lock-add-keywords): New alias for
90 font-lock-add-keywords. Returns nil on XEmacs.
91
92 * mh-e.el: Add MH-E function and variable keywords such as
93 mh-defun-compat and mh-defcustom to font-lock-keywords.
94
952006-04-13 Bill Wohler <wohler@newt.com>
96
97 * mh-e.el (customize-package-emacs-version-alist)
98 (mh-e, mh-alias, mh-folder, mh-folder-selection)
99 (mh-identity, mh-inc, mh-junk, mh-letter, mh-ranges)
100 (mh-scan-line-formats, mh-search, mh-sending-mail, )
101 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar)
102 (mh-hooks, mh-faces, mh-alias-completion-ignore-case-flag)
103 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma)
104 (mh-alias-insert-file, mh-alias-insertion-location)
105 (mh-alias-local-users, mh-alias-local-users-prefix)
106 (mh-alias-passwd-gecos-comma-separator-flag)
107 (mh-new-messages-folders, mh-ticked-messages-folders)
108 (mh-large-folder, mh-recenter-summary-flag)
109 (mh-recursive-folders-flag, mh-sortm-args)
110 (mh-default-folder-for-message-function, )
111 (mh-default-folder-list, mh-default-folder-must-exist-flag)
112 (mh-default-folder-prefix, mh-identity-list)
113 (mh-auto-fields-list, mh-auto-fields-prompt-flag)
114 (mh-identity-default, mh-identity-handlers, mh-inc-prog)
115 (mh-inc-spool-list, mh-junk-background, mh-junk-disposition)
116 (mh-junk-program, mh-compose-insertion)
117 (mh-compose-skipped-header-fields)
118 (mh-compose-space-does-completion-flag)
119 (mh-delete-yanked-msg-window-flag)
120 (mh-extract-from-attribution-verb, mh-ins-buf-prefix)
121 (mh-letter-complete-function, mh-letter-fill-column)
122 (mh-mml-method-default, mh-signature-file-name)
123 (mh-signature-separator-flag, mh-x-face-file, )
124 (mh-yank-behavior, mh-interpret-number-as-range-flag)
125 (mh-adaptive-cmd-note-flag, mh-scan-format-file, mh-scan-prog)
126 (mh-search-program, mh-compose-forward-as-mime-flag)
127 (mh-compose-letter-function, mh-compose-prompt-flag)
128 (mh-forward-subject-format, mh-insert-x-mailer-flag)
129 (mh-redist-full-contents-flag, mh-reply-default-reply-to)
130 (mh-reply-show-message-flag, )
131 (mh-refile-preserves-sequences-flag, mh-tick-seq)
132 (mh-update-sequences-after-mh-show-flag)
133 (mh-bury-show-buffer-flag, mh-clean-message-header-flag)
134 (mh-decode-mime-flag, )
135 (mh-display-buttons-for-alternatives-flag)
136 (mh-display-buttons-for-inline-parts-flag)
137 (mh-do-not-confirm-flag, mh-fetch-x-image-url)
138 (mh-graphical-smileys-flag, mh-graphical-emphasis-flag)
139 (mh-highlight-citation-style, mh-invisible-header-fields)
140 (mh-invisible-header-fields-default, mh-lpr-command-format)
141 (mh-max-inline-image-height, mh-max-inline-image-width)
142 (mh-mhl-format-file, mh-mime-save-parts-default-directory)
143 (mh-print-background-flag, mh-show-maximum-size)
144 (mh-show-use-xface-flag, mh-store-default-directory)
145 (mh-summary-height, mh-speed-update-interval)
146 (mh-show-threads-flag, mh-tool-bar-search-function)
147 (mh-defcustom, mh-after-commands-processed-hook)
148 (mh-alias-reloaded-hook, mh-before-commands-processed-hook)
149 (mh-before-quit-hook, mh-before-send-letter-hook)
150 (mh-delete-msg-hook, mh-find-path-hook, mh-folder-mode-hook)
151 (mh-forward-hook, mh-inc-folder-hook, )
152 (mh-insert-signature-hook, )
153 (mh-kill-folder-suppress-prompt-hooks, mh-letter-mode-hook)
154 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook)
155 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook)
156 (mh-unseen-updated-hook, mh-folder-address, mh-folder-body)
157 (mh-folder-cur-msg-number, mh-folder-date, mh-folder-deleted)
158 (mh-folder-followup, mh-folder-msg-number, mh-folder-refiled)
159 (mh-folder-sent-to-me-hint, mh-folder-sent-to-me-sender)
160 (mh-folder-subject, mh-folder-tick, mh-folder-to)
161 (mh-letter-header-field, mh-search-folder, mh-show-cc)
162 (mh-show-date, mh-show-from, mh-show-header, mh-show-pgg-bad)
163 (mh-show-pgg-good, mh-show-pgg-unknown, mh-show-signature)
164 (mh-show-subject, mh-show-to, mh-show-xface, )
165 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages)
166 (mh-speedbar-selected-folder)
167 (mh-speedbar-selected-folder-with-unseen-messages): Use dotted
168 notation in :package-version keyword.
169
12006-04-07 Bill Wohler <wohler@newt.com> 1702006-04-07 Bill Wohler <wohler@newt.com>
2 171
3 * mh-e.el (mh-path, mh-variant): Define with mh-defcustom and add 172 * mh-e.el (mh-path, mh-variant): Define with mh-defcustom and add
@@ -21,7 +190,7 @@
21 (mh-scan-line-formats, mh-search, mh-sending-mail) 190 (mh-scan-line-formats, mh-search, mh-sending-mail)
22 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar) 191 (mh-sequences, mh-show, mh-speedbar, mh-thread, mh-tool-bar)
23 (mh-hooks, mh-faces): Add :package-version keyword to these 192 (mh-hooks, mh-faces): Add :package-version keyword to these
24 groups. 193 groups (closes SF #1452724).
25 (mh-alias-completion-ignore-case-flag) 194 (mh-alias-completion-ignore-case-flag)
26 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma) 195 (mh-alias-expand-aliases-flag, mh-alias-flash-on-comma)
27 (mh-alias-insert-file, mh-alias-insertion-location) 196 (mh-alias-insert-file, mh-alias-insertion-location)
@@ -67,7 +236,7 @@
67 (mh-show-use-xface-flag, mh-store-default-directory) 236 (mh-show-use-xface-flag, mh-store-default-directory)
68 (mh-summary-height, mh-speed-update-interval) 237 (mh-summary-height, mh-speed-update-interval)
69 (mh-show-threads-flag, mh-tool-bar-search-function): Add 238 (mh-show-threads-flag, mh-tool-bar-search-function): Add
70 :package-version keyword to these options. 239 :package-version keyword to these options (closes SF #1452724).
71 (mh-after-commands-processed-hook) 240 (mh-after-commands-processed-hook)
72 (mh-alias-reloaded-hook, mh-before-commands-processed-hook) 241 (mh-alias-reloaded-hook, mh-before-commands-processed-hook)
73 (mh-before-quit-hook, mh-before-send-letter-hook) 242 (mh-before-quit-hook, mh-before-send-letter-hook)
@@ -78,7 +247,7 @@
78 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook) 247 (mh-mh-to-mime-hook, mh-search-mode-hook, mh-quit-hook)
79 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook) 248 (mh-refile-msg-hook, mh-show-hook, mh-show-mode-hook)
80 (mh-unseen-updated-hook): Add :package-version keyword to these 249 (mh-unseen-updated-hook): Add :package-version keyword to these
81 hooks. 250 hooks (closes SF #1452724).
82 (mh-min-colors-defined-flag) 251 (mh-min-colors-defined-flag)
83 (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number) 252 (mh-folder-address, mh-folder-body, mh-folder-cur-msg-number)
84 (mh-folder-date, mh-folder-deleted, mh-folder-followup) 253 (mh-folder-date, mh-folder-deleted, mh-folder-followup)
@@ -92,10 +261,10 @@
92 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages) 261 (mh-speedbar-folder, mh-speedbar-folder-with-unseen-messages)
93 (mh-speedbar-selected-folder) 262 (mh-speedbar-selected-folder)
94 (mh-speedbar-selected-folder-with-unseen-messages): : Add 263 (mh-speedbar-selected-folder-with-unseen-messages): : Add
95 :package-version keyword to these faces. 264 :package-version keyword to these faces (closes SF #1452724).
96 265
97 * mh-tool-bar.el (mh-tool-bar-define): Added commented-out 266 * mh-tool-bar.el (mh-tool-bar-define): Added commented-out
98 :package-version keywords. 267 :package-version keywords (closes SF #1452724).
99 268
1002006-03-28 Bill Wohler <wohler@newt.com> 2692006-03-28 Bill Wohler <wohler@newt.com>
101 270
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 8f38abc56ee..9fa69fae5d9 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -82,7 +82,7 @@ loads \"cl\" appropriately."
82 (funcall ',function ,@args)))) 82 (funcall ',function ,@args))))
83 83
84;;;###mh-autoload 84;;;###mh-autoload
85(defmacro mh-defun-compat (name function arg-list &rest body) 85(defmacro defun-mh (name function arg-list &rest body)
86 "Create function NAME. 86 "Create function NAME.
87If FUNCTION exists, then NAME becomes an alias for FUNCTION. 87If FUNCTION exists, then NAME becomes an alias for FUNCTION.
88Otherwise, create function NAME with ARG-LIST and BODY." 88Otherwise, create function NAME with ARG-LIST and BODY."
@@ -90,10 +90,10 @@ Otherwise, create function NAME with ARG-LIST and BODY."
90 (if defined-p 90 (if defined-p
91 `(defalias ',name ',function) 91 `(defalias ',name ',function)
92 `(defun ,name ,arg-list ,@body)))) 92 `(defun ,name ,arg-list ,@body))))
93(put 'mh-defun-compat 'lisp-indent-function 'defun) 93(put 'defun-mh 'lisp-indent-function 'defun)
94 94
95;;;###mh-autoload 95;;;###mh-autoload
96(defmacro mh-defmacro-compat (name macro arg-list &rest body) 96(defmacro defmacro-mh (name macro arg-list &rest body)
97 "Create macro NAME. 97 "Create macro NAME.
98If MACRO exists, then NAME becomes an alias for MACRO. 98If MACRO exists, then NAME becomes an alias for MACRO.
99Otherwise, create macro NAME with ARG-LIST and BODY." 99Otherwise, create macro NAME with ARG-LIST and BODY."
@@ -101,7 +101,7 @@ Otherwise, create macro NAME with ARG-LIST and BODY."
101 (if defined-p 101 (if defined-p
102 `(defalias ',name ',macro) 102 `(defalias ',name ',macro)
103 `(defmacro ,name ,arg-list ,@body)))) 103 `(defmacro ,name ,arg-list ,@body))))
104(put 'mh-defmacro-compat 'lisp-indent-function 'defun) 104(put 'defmacro-mh 'lisp-indent-function 'defun)
105 105
106 106
107 107
@@ -130,7 +130,9 @@ check if variable `transient-mark-mode' is active."
130 (boundp 'mark-active) mark-active)))) 130 (boundp 'mark-active) mark-active))))
131 131
132;; Shush compiler. 132;; Shush compiler.
133(eval-when-compile (mh-do-in-xemacs (defvar struct) (defvar x) (defvar y))) 133(defvar struct) ; XEmacs
134(defvar x) ; XEmacs
135(defvar y) ; XEmacs
134 136
135;;;###mh-autoload 137;;;###mh-autoload
136(defmacro mh-defstruct (name-spec &rest fields) 138(defmacro mh-defstruct (name-spec &rest fields)
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 27806dc9ab9..ad80e3be838 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -215,7 +215,7 @@ ignored."
215 (setq other-headers (cdr other-headers))))) 215 (setq other-headers (cdr other-headers)))))
216 216
217;; Shush compiler. 217;; Shush compiler.
218(eval-when-compile (mh-do-in-xemacs (defvar sendmail-coding-system))) 218(defvar sendmail-coding-system) ; XEmacs
219 219
220;;;###autoload 220;;;###autoload
221(defun mh-send-letter (&optional arg) 221(defun mh-send-letter (&optional arg)
@@ -912,7 +912,10 @@ The versions of MH-E, Emacs, and MH are shown."
912 (format "MH-E %s; %s; %sEmacs %s" 912 (format "MH-E %s; %s; %sEmacs %s"
913 mh-version mh-variant-in-use 913 mh-version mh-variant-in-use
914 (if mh-xemacs-flag "X" "GNU ") 914 (if mh-xemacs-flag "X" "GNU ")
915 (cond ((not mh-xemacs-flag) emacs-version) 915 (cond ((not mh-xemacs-flag)
916 (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?"
917 emacs-version)
918 (match-string 0 emacs-version))
916 ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?" 919 ((string-match "[0-9.]*\\( +\([ a-z]+[0-9]+\)\\)?"
917 emacs-version) 920 emacs-version)
918 (match-string 0 emacs-version)) 921 (match-string 0 emacs-version))
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 256a8cfe831..b346a41fad7 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -40,7 +40,7 @@
40;; versions of Gnus. 40;; versions of Gnus.
41 41
42;; Items are listed alphabetically (except for mh-require which is 42;; Items are listed alphabetically (except for mh-require which is
43;; needed by a lesser character). 43;; needed sooner it would normally appear).
44 44
45(require 'mh-acros) 45(require 'mh-acros)
46 46
@@ -62,7 +62,7 @@ Simulate NOERROR argument in XEmacs which lacks it."
62 (load filename noerror t) 62 (load filename noerror t)
63 (load (format "%s" feature) noerror t))))) 63 (load (format "%s" feature) noerror t)))))
64 64
65(mh-defun-compat mh-assoc-string assoc-string (key list case-fold) 65(defun-mh mh-assoc-string assoc-string (key list case-fold)
66 "Like `assoc' but specifically for strings. 66 "Like `assoc' but specifically for strings.
67Case is ignored if CASE-FOLD is non-nil. 67Case is ignored if CASE-FOLD is non-nil.
68This function is used by Emacs versions that lack `assoc-string', 68This function is used by Emacs versions that lack `assoc-string',
@@ -77,7 +77,7 @@ introduced in Emacs 22."
77 'cancel-timer 77 'cancel-timer
78 'delete-itimer)) 78 'delete-itimer))
79 79
80(mh-defun-compat mh-display-color-cells display-color-cells (&optional display) 80(defun-mh mh-display-color-cells display-color-cells (&optional display)
81 "Return the number of color cells supported by DISPLAY. 81 "Return the number of color cells supported by DISPLAY.
82This function is used by XEmacs to return 2 when 82This function is used by XEmacs to return 2 when
83`device-color-cells' returns nil. This happens when compiling or 83`device-color-cells' returns nil. This happens when compiling or
@@ -115,7 +115,12 @@ introduced in Emacs 22."
115 `(face-background ,face ,frame) 115 `(face-background ,face ,frame)
116 `(face-background ,face ,frame ,inherit))) 116 `(face-background ,face ,frame ,inherit)))
117 117
118(mh-defun-compat mh-image-load-path-for-library 118(defun-mh mh-font-lock-add-keywords font-lock-add-keywords
119 (mode keywords &optional how)
120 "XEmacs does not have `font-lock-add-keywords'.
121This function returns nil on that system.")
122
123(defun-mh mh-image-load-path-for-library
119 image-load-path-for-library (library image &optional path no-error) 124 image-load-path-for-library (library image &optional path no-error)
120 "Return a suitable search path for images used by LIBRARY. 125 "Return a suitable search path for images used by LIBRARY.
121 126
@@ -210,7 +215,7 @@ compatibility with versions of Emacs that lack the variable
210 (nconc (list image-directory) 215 (nconc (list image-directory)
211 (delete image-directory (copy-sequence (or path load-path)))))) 216 (delete image-directory (copy-sequence (or path load-path))))))
212 217
213(mh-defun-compat mh-image-search-load-path 218(defun-mh mh-image-search-load-path
214 image-search-load-path (file &optional path) 219 image-search-load-path (file &optional path)
215 "Emacs 21 and XEmacs don't have `image-search-load-path'. 220 "Emacs 21 and XEmacs don't have `image-search-load-path'.
216This function returns nil on those systems." 221This function returns nil on those systems."
@@ -229,13 +234,13 @@ This function returns nil on those systems."
229 'point-at-eol)) 234 'point-at-eol))
230 235
231(mh-require 'mailabbrev nil t) 236(mh-require 'mailabbrev nil t)
232(mh-defun-compat mh-mail-abbrev-make-syntax-table 237(defun-mh mh-mail-abbrev-make-syntax-table
233 mail-abbrev-make-syntax-table () 238 mail-abbrev-make-syntax-table ()
234 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'. 239 "Emacs 21 and XEmacs don't have `mail-abbrev-make-syntax-table'.
235This function returns nil on those systems." 240This function returns nil on those systems."
236 nil) 241 nil)
237 242
238(mh-defun-compat mh-match-string-no-properties 243(defun-mh mh-match-string-no-properties
239 match-string-no-properties (num &optional string) 244 match-string-no-properties (num &optional string)
240 "Return string of text matched by last search, without text properties. 245 "Return string of text matched by last search, without text properties.
241This function is used by XEmacs that lacks `match-string-no-properties'. 246This function is used by XEmacs that lacks `match-string-no-properties'.
@@ -244,7 +249,7 @@ The argument STRING is ignored."
244 (buffer-substring-no-properties 249 (buffer-substring-no-properties
245 (match-beginning num) (match-end num))) 250 (match-beginning num) (match-end num)))
246 251
247(mh-defun-compat mh-replace-regexp-in-string replace-regexp-in-string 252(defun-mh mh-replace-regexp-in-string replace-regexp-in-string
248 (regexp rep string &optional fixedcase literal subexp start) 253 (regexp rep string &optional fixedcase literal subexp start)
249 "Replace REGEXP with REP everywhere in STRING and return result. 254 "Replace REGEXP with REP everywhere in STRING and return result.
250This function is used by XEmacs that lacks `replace-regexp-in-string'. 255This function is used by XEmacs that lacks `replace-regexp-in-string'.
@@ -264,7 +269,7 @@ The arguments FIXEDCASE, SUBEXP, and START, used by
264 "A list of characters that are _NOT_ reserved in the URL spec. 269 "A list of characters that are _NOT_ reserved in the URL spec.
265This is taken from RFC 2396.")) 270This is taken from RFC 2396."))
266 271
267(mh-defun-compat mh-url-hexify-string url-hexify-string (str) 272(defun-mh mh-url-hexify-string url-hexify-string (str)
268 "Escape characters in a string. 273 "Escape characters in a string.
269This is a copy of `url-hexify-string' from url-util.el in Emacs 274This is a copy of `url-hexify-string' from url-util.el in Emacs
27022; needed by Emacs 21." 27522; needed by Emacs 21."
@@ -278,7 +283,7 @@ This is a copy of `url-hexify-string' from url-util.el in Emacs
278 (char-to-string char))) 283 (char-to-string char)))
279 str "")) 284 str ""))
280 285
281(mh-defun-compat mh-view-mode-enter 286(defun-mh mh-view-mode-enter
282 view-mode-enter (&optional return-to exit-action) 287 view-mode-enter (&optional return-to exit-action)
283 "Enter View mode. 288 "Enter View mode.
284This function is used by XEmacs that lacks `view-mode-enter'. 289This function is used by XEmacs that lacks `view-mode-enter'.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index a2d0e85841b..9ae686d8950 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -109,6 +109,26 @@
109(require 'mh-buffers) 109(require 'mh-buffers)
110(require 'mh-compat) 110(require 'mh-compat)
111 111
112(mh-font-lock-add-keywords
113 'emacs-lisp-mode
114 (eval-when-compile
115 `((,(concat "(\\("
116 ;; Function declarations (use font-lock-function-name-face).
117 "\\(def\\(un\\|macro\\)-mh\\)\\|"
118 ;; Variable declarations (use font-lock-variable-name-face).
119 "\\(def\\(custom\\|face\\)-mh\\)\\|"
120 ;; Group declarations (use font-lock-type-face).
121 "\\(defgroup-mh\\)"
122 "\\)\\>"
123 ;; Any whitespace and defined object.
124 "[ \t'\(]*"
125 "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
126 (1 font-lock-keyword-face)
127 (7 (cond ((match-beginning 2) font-lock-function-name-face)
128 ((match-beginning 4) font-lock-variable-name-face)
129 (t font-lock-type-face))
130 nil t)))))
131
112 132
113 133
114;;; Global Variables 134;;; Global Variables
@@ -603,7 +623,7 @@ Output is expected to be shown to user, not parsed by MH-E."
603 (mh-exchange-point-and-mark-preserving-active-mark)) 623 (mh-exchange-point-and-mark-preserving-active-mark))
604 624
605;; Shush compiler. 625;; Shush compiler.
606(eval-when-compile (mh-do-in-xemacs (defvar mark-active))) 626(defvar mark-active) ; XEmacs
607 627
608(defun mh-exchange-point-and-mark-preserving-active-mark () 628(defun mh-exchange-point-and-mark-preserving-active-mark ()
609 "Put the mark where point is now, and point where the mark is now. 629 "Put the mark where point is now, and point where the mark is now.
@@ -664,7 +684,7 @@ ARGS is returned unchanged."
664 (t t)) 684 (t t))
665 collect keyword)))) 685 collect keyword))))
666 686
667(defmacro mh-defgroup (symbol members doc &rest args) 687(defmacro defgroup-mh (symbol members doc &rest args)
668 "Declare SYMBOL as a customization group containing MEMBERS. 688 "Declare SYMBOL as a customization group containing MEMBERS.
669See documentation for `defgroup' for a description of the arguments 689See documentation for `defgroup' for a description of the arguments
670SYMBOL, MEMBERS, DOC and ARGS. 690SYMBOL, MEMBERS, DOC and ARGS.
@@ -672,9 +692,9 @@ This macro is used by Emacs versions that lack the :package-version
672keyword, introduced in Emacs 22." 692keyword, introduced in Emacs 22."
673 (declare (doc-string 3)) 693 (declare (doc-string 3))
674 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args))) 694 `(defgroup ,symbol ,members ,doc ,@(mh-strip-package-version args)))
675(put 'mh-defgroup 'lisp-indent-function 'defun) 695(put 'defgroup-mh 'lisp-indent-function 'defun)
676 696
677(defmacro mh-defcustom (symbol value doc &rest args) 697(defmacro defcustom-mh (symbol value doc &rest args)
678 "Declare SYMBOL as a customizable variable that defaults to VALUE. 698 "Declare SYMBOL as a customizable variable that defaults to VALUE.
679See documentation for `defcustom' for a description of the arguments 699See documentation for `defcustom' for a description of the arguments
680SYMBOL, VALUE, DOC and ARGS. 700SYMBOL, VALUE, DOC and ARGS.
@@ -682,9 +702,9 @@ This macro is used by Emacs versions that lack the :package-version
682keyword, introduced in Emacs 22." 702keyword, introduced in Emacs 22."
683 (declare (doc-string 3)) 703 (declare (doc-string 3))
684 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args))) 704 `(defcustom ,symbol ,value ,doc ,@(mh-strip-package-version args)))
685(put 'mh-defcustom 'lisp-indent-function 'defun) 705(put 'defcustom-mh 'lisp-indent-function 'defun)
686 706
687(defmacro mh-defface (face spec doc &rest args) 707(defmacro defface-mh (face spec doc &rest args)
688 "Declare FACE as a customizable face that defaults to SPEC. 708 "Declare FACE as a customizable face that defaults to SPEC.
689See documentation for `defface' for a description of the arguments 709See documentation for `defface' for a description of the arguments
690FACE, SPEC, DOC and ARGS. 710FACE, SPEC, DOC and ARGS.
@@ -692,13 +712,13 @@ This macro is used by Emacs versions that lack the :package-version
692keyword, introduced in Emacs 22." 712keyword, introduced in Emacs 22."
693 (declare (doc-string 3)) 713 (declare (doc-string 3))
694 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args))) 714 `(defface ,face ,spec ,doc ,@(mh-strip-package-version args)))
695(put 'mh-defface 'lisp-indent-function 'defun) 715(put 'defface-mh 'lisp-indent-function 'defun)
696 716
697 717
698 718
699;;; Variant Support 719;;; Variant Support
700 720
701(mh-defcustom mh-path nil 721(defcustom-mh mh-path nil
702 "*Additional list of directories to search for MH. 722 "*Additional list of directories to search for MH.
703See `mh-variant'." 723See `mh-variant'."
704 :group 'mh-e 724 :group 'mh-e
@@ -912,7 +932,7 @@ finally GNU mailutils."
912 (mapconcat '(lambda (x) (format "%s" (car x))) 932 (mapconcat '(lambda (x) (format "%s" (car x)))
913 (mh-variants) " or ")))))) 933 (mh-variants) " or "))))))
914 934
915(mh-defcustom mh-variant 'autodetect 935(defcustom-mh mh-variant 'autodetect
916 "*Specifies the variant used by MH-E. 936 "*Specifies the variant used by MH-E.
917 937
918The default setting of this option is \"Auto-detect\" which means 938The default setting of this option is \"Auto-detect\" which means
@@ -989,148 +1009,148 @@ windows in the frame are removed."
989 1009
990(if (boundp 'customize-package-emacs-version-alist) 1010(if (boundp 'customize-package-emacs-version-alist)
991 (add-to-list 'customize-package-emacs-version-alist 1011 (add-to-list 'customize-package-emacs-version-alist
992 '(MH-E ("6.0" "22.1") ("6.1" "22.1") ("7.0" "22.1") 1012 '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
993 ("7.1" "22.1") ("7.2" "22.1") ("7.3" "22.1") 1013 ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
994 ("7.4" "22.1") ("8.0" "22.1")))) 1014 ("7.4" . "22.1") ("8.0" . "22.1"))))
995 1015
996 1016
997 1017
998;;; MH-E Customization Groups 1018;;; MH-E Customization Groups
999 1019
1000(mh-defgroup mh-e nil 1020(defgroup-mh mh-e nil
1001 "Emacs interface to the MH mail system. 1021 "Emacs interface to the MH mail system.
1002MH is the Rand Mail Handler. Other implementations include nmh 1022MH is the Rand Mail Handler. Other implementations include nmh
1003and GNU mailutils." 1023and GNU mailutils."
1004 :link '(custom-manual "(mh-e)Top") 1024 :link '(custom-manual "(mh-e)Top")
1005 :group 'mail 1025 :group 'mail
1006 :package-version '(MH-E "8.0")) 1026 :package-version '(MH-E . "8.0"))
1007 1027
1008(mh-defgroup mh-alias nil 1028(defgroup-mh mh-alias nil
1009 "Aliases." 1029 "Aliases."
1010 :link '(custom-manual "(mh-e)Aliases") 1030 :link '(custom-manual "(mh-e)Aliases")
1011 :prefix "mh-alias-" 1031 :prefix "mh-alias-"
1012 :group 'mh-e 1032 :group 'mh-e
1013 :package-version '(MH-E "7.1")) 1033 :package-version '(MH-E . "7.1"))
1014 1034
1015(mh-defgroup mh-folder nil 1035(defgroup-mh mh-folder nil
1016 "Organizing your mail with folders." 1036 "Organizing your mail with folders."
1017 :prefix "mh-" 1037 :prefix "mh-"
1018 :link '(custom-manual "(mh-e)Folders") 1038 :link '(custom-manual "(mh-e)Folders")
1019 :group 'mh-e 1039 :group 'mh-e
1020 :package-version '(MH-E "7.1")) 1040 :package-version '(MH-E . "7.1"))
1021 1041
1022(mh-defgroup mh-folder-selection nil 1042(defgroup-mh mh-folder-selection nil
1023 "Folder selection." 1043 "Folder selection."
1024 :prefix "mh-" 1044 :prefix "mh-"
1025 :link '(custom-manual "(mh-e)Folder Selection") 1045 :link '(custom-manual "(mh-e)Folder Selection")
1026 :group 'mh-e 1046 :group 'mh-e
1027 :package-version '(MH-E "8.0")) 1047 :package-version '(MH-E . "8.0"))
1028 1048
1029(mh-defgroup mh-identity nil 1049(defgroup-mh mh-identity nil
1030 "Identities." 1050 "Identities."
1031 :link '(custom-manual "(mh-e)Identities") 1051 :link '(custom-manual "(mh-e)Identities")
1032 :prefix "mh-identity-" 1052 :prefix "mh-identity-"
1033 :group 'mh-e 1053 :group 'mh-e
1034 :package-version '(MH-E "7.1")) 1054 :package-version '(MH-E . "7.1"))
1035 1055
1036(mh-defgroup mh-inc nil 1056(defgroup-mh mh-inc nil
1037 "Incorporating your mail." 1057 "Incorporating your mail."
1038 :prefix "mh-inc-" 1058 :prefix "mh-inc-"
1039 :link '(custom-manual "(mh-e)Incorporating Mail") 1059 :link '(custom-manual "(mh-e)Incorporating Mail")
1040 :group 'mh-e 1060 :group 'mh-e
1041 :package-version '(MH-E "8.0")) 1061 :package-version '(MH-E . "8.0"))
1042 1062
1043(mh-defgroup mh-junk nil 1063(defgroup-mh mh-junk nil
1044 "Dealing with junk mail." 1064 "Dealing with junk mail."
1045 :link '(custom-manual "(mh-e)Junk") 1065 :link '(custom-manual "(mh-e)Junk")
1046 :prefix "mh-junk-" 1066 :prefix "mh-junk-"
1047 :group 'mh-e 1067 :group 'mh-e
1048 :package-version '(MH-E "7.3")) 1068 :package-version '(MH-E . "7.3"))
1049 1069
1050(mh-defgroup mh-letter nil 1070(defgroup-mh mh-letter nil
1051 "Editing a draft." 1071 "Editing a draft."
1052 :prefix "mh-" 1072 :prefix "mh-"
1053 :link '(custom-manual "(mh-e)Editing Drafts") 1073 :link '(custom-manual "(mh-e)Editing Drafts")
1054 :group 'mh-e 1074 :group 'mh-e
1055 :package-version '(MH-E "7.1")) 1075 :package-version '(MH-E . "7.1"))
1056 1076
1057(mh-defgroup mh-ranges nil 1077(defgroup-mh mh-ranges nil
1058 "Ranges." 1078 "Ranges."
1059 :prefix "mh-" 1079 :prefix "mh-"
1060 :link '(custom-manual "(mh-e)Ranges") 1080 :link '(custom-manual "(mh-e)Ranges")
1061 :group 'mh-e 1081 :group 'mh-e
1062 :package-version '(MH-E "8.0")) 1082 :package-version '(MH-E . "8.0"))
1063 1083
1064(mh-defgroup mh-scan-line-formats nil 1084(defgroup-mh mh-scan-line-formats nil
1065 "Scan line formats." 1085 "Scan line formats."
1066 :link '(custom-manual "(mh-e)Scan Line Formats") 1086 :link '(custom-manual "(mh-e)Scan Line Formats")
1067 :prefix "mh-" 1087 :prefix "mh-"
1068 :group 'mh-e 1088 :group 'mh-e
1069 :package-version '(MH-E "8.0")) 1089 :package-version '(MH-E . "8.0"))
1070 1090
1071(mh-defgroup mh-search nil 1091(defgroup-mh mh-search nil
1072 "Searching." 1092 "Searching."
1073 :link '(custom-manual "(mh-e)Searching") 1093 :link '(custom-manual "(mh-e)Searching")
1074 :prefix "mh-search-" 1094 :prefix "mh-search-"
1075 :group 'mh-e 1095 :group 'mh-e
1076 :package-version '(MH-E "8.0")) 1096 :package-version '(MH-E . "8.0"))
1077 1097
1078(mh-defgroup mh-sending-mail nil 1098(defgroup-mh mh-sending-mail nil
1079 "Sending mail." 1099 "Sending mail."
1080 :prefix "mh-" 1100 :prefix "mh-"
1081 :link '(custom-manual "(mh-e)Sending Mail") 1101 :link '(custom-manual "(mh-e)Sending Mail")
1082 :group 'mh-e 1102 :group 'mh-e
1083 :package-version '(MH-E "8.0")) 1103 :package-version '(MH-E . "8.0"))
1084 1104
1085(mh-defgroup mh-sequences nil 1105(defgroup-mh mh-sequences nil
1086 "Sequences." 1106 "Sequences."
1087 :prefix "mh-" 1107 :prefix "mh-"
1088 :link '(custom-manual "(mh-e)Sequences") 1108 :link '(custom-manual "(mh-e)Sequences")
1089 :group 'mh-e 1109 :group 'mh-e
1090 :package-version '(MH-E "8.0")) 1110 :package-version '(MH-E . "8.0"))
1091 1111
1092(mh-defgroup mh-show nil 1112(defgroup-mh mh-show nil
1093 "Reading your mail." 1113 "Reading your mail."
1094 :prefix "mh-" 1114 :prefix "mh-"
1095 :link '(custom-manual "(mh-e)Reading Mail") 1115 :link '(custom-manual "(mh-e)Reading Mail")
1096 :group 'mh-e 1116 :group 'mh-e
1097 :package-version '(MH-E "7.1")) 1117 :package-version '(MH-E . "7.1"))
1098 1118
1099(mh-defgroup mh-speedbar nil 1119(defgroup-mh mh-speedbar nil
1100 "The speedbar." 1120 "The speedbar."
1101 :prefix "mh-speed-" 1121 :prefix "mh-speed-"
1102 :link '(custom-manual "(mh-e)Speedbar") 1122 :link '(custom-manual "(mh-e)Speedbar")
1103 :group 'mh-e 1123 :group 'mh-e
1104 :package-version '(MH-E "8.0")) 1124 :package-version '(MH-E . "8.0"))
1105 1125
1106(mh-defgroup mh-thread nil 1126(defgroup-mh mh-thread nil
1107 "Threading." 1127 "Threading."
1108 :prefix "mh-thread-" 1128 :prefix "mh-thread-"
1109 :link '(custom-manual "(mh-e)Threading") 1129 :link '(custom-manual "(mh-e)Threading")
1110 :group 'mh-e 1130 :group 'mh-e
1111 :package-version '(MH-E "8.0")) 1131 :package-version '(MH-E . "8.0"))
1112 1132
1113(mh-defgroup mh-tool-bar nil 1133(defgroup-mh mh-tool-bar nil
1114 "The tool bar" 1134 "The tool bar"
1115 :link '(custom-manual "(mh-e)Tool Bar") 1135 :link '(custom-manual "(mh-e)Tool Bar")
1116 :prefix "mh-" 1136 :prefix "mh-"
1117 :group 'mh-e 1137 :group 'mh-e
1118 :package-version '(MH-E "8.0")) 1138 :package-version '(MH-E . "8.0"))
1119 1139
1120(mh-defgroup mh-hooks nil 1140(defgroup-mh mh-hooks nil
1121 "MH-E hooks." 1141 "MH-E hooks."
1122 :link '(custom-manual "(mh-e)Top") 1142 :link '(custom-manual "(mh-e)Top")
1123 :prefix "mh-" 1143 :prefix "mh-"
1124 :group 'mh-e 1144 :group 'mh-e
1125 :package-version '(MH-E "7.1")) 1145 :package-version '(MH-E . "7.1"))
1126 1146
1127(mh-defgroup mh-faces nil 1147(defgroup-mh mh-faces nil
1128 "Faces used in MH-E." 1148 "Faces used in MH-E."
1129 :link '(custom-manual "(mh-e)Top") 1149 :link '(custom-manual "(mh-e)Top")
1130 :prefix "mh-" 1150 :prefix "mh-"
1131 :group 'faces 1151 :group 'faces
1132 :group 'mh-e 1152 :group 'mh-e
1133 :package-version '(MH-E "7.1")) 1153 :package-version '(MH-E . "7.1"))
1134 1154
1135 1155
1136 1156
@@ -1140,7 +1160,7 @@ and GNU mailutils."
1140 1160
1141;;; Aliases (:group 'mh-alias) 1161;;; Aliases (:group 'mh-alias)
1142 1162
1143(mh-defcustom mh-alias-completion-ignore-case-flag t 1163(defcustom-mh mh-alias-completion-ignore-case-flag t
1144 "*Non-nil means don't consider case significant in MH alias completion. 1164 "*Non-nil means don't consider case significant in MH alias completion.
1145 1165
1146As MH ignores case in the aliases, so too does MH-E. However, you 1166As MH ignores case in the aliases, so too does MH-E. However, you
@@ -1149,9 +1169,9 @@ used to segregate completion of your aliases. You might use
1149lowercase for mailing lists and uppercase for people." 1169lowercase for mailing lists and uppercase for people."
1150 :type 'boolean 1170 :type 'boolean
1151 :group 'mh-alias 1171 :group 'mh-alias
1152 :package-version '(MH-E "7.1")) 1172 :package-version '(MH-E . "7.1"))
1153 1173
1154(mh-defcustom mh-alias-expand-aliases-flag nil 1174(defcustom-mh mh-alias-expand-aliases-flag nil
1155 "*Non-nil means to expand aliases entered in the minibuffer. 1175 "*Non-nil means to expand aliases entered in the minibuffer.
1156 1176
1157In other words, aliases entered in the minibuffer will be 1177In other words, aliases entered in the minibuffer will be
@@ -1159,9 +1179,9 @@ expanded to the full address in the message draft. By default,
1159this expansion is not performed." 1179this expansion is not performed."
1160 :type 'boolean 1180 :type 'boolean
1161 :group 'mh-alias 1181 :group 'mh-alias
1162 :package-version '(MH-E "7.1")) 1182 :package-version '(MH-E . "7.1"))
1163 1183
1164(mh-defcustom mh-alias-flash-on-comma t 1184(defcustom-mh mh-alias-flash-on-comma t
1165 "*Specify whether to flash address or warn on translation. 1185 "*Specify whether to flash address or warn on translation.
1166 1186
1167This option controls the behavior when a [comma] is pressed while 1187This option controls the behavior when a [comma] is pressed while
@@ -1172,9 +1192,9 @@ does not display a warning if the alias is not found."
1172 (const :tag "Flash and Warn If No Alias" 1) 1192 (const :tag "Flash and Warn If No Alias" 1)
1173 (const :tag "Don't Flash Nor Warn If No Alias" nil)) 1193 (const :tag "Don't Flash Nor Warn If No Alias" nil))
1174 :group 'mh-alias 1194 :group 'mh-alias
1175 :package-version '(MH-E "7.1")) 1195 :package-version '(MH-E . "7.1"))
1176 1196
1177(mh-defcustom mh-alias-insert-file nil 1197(defcustom-mh mh-alias-insert-file nil
1178 "*Filename used to store a new MH-E alias. 1198 "*Filename used to store a new MH-E alias.
1179 1199
1180The default setting of this option is \"Use Aliasfile Profile 1200The default setting of this option is \"Use Aliasfile Profile
@@ -1186,9 +1206,9 @@ name, MH-E will prompt for one of them when MH-E adds an alias."
1186 (file :tag "Alias File") 1206 (file :tag "Alias File")
1187 (repeat :tag "List of Alias Files" file)) 1207 (repeat :tag "List of Alias Files" file))
1188 :group 'mh-alias 1208 :group 'mh-alias
1189 :package-version '(MH-E "7.1")) 1209 :package-version '(MH-E . "7.1"))
1190 1210
1191(mh-defcustom mh-alias-insertion-location 'sorted 1211(defcustom-mh mh-alias-insertion-location 'sorted
1192 "Specifies where new aliases are entered in alias files. 1212 "Specifies where new aliases are entered in alias files.
1193 1213
1194This option is set to \"Alphabetical\" by default. If you organize 1214This option is set to \"Alphabetical\" by default. If you organize
@@ -1198,9 +1218,9 @@ or \"Bottom\" of your alias file might be more appropriate."
1198 (const :tag "Top" top) 1218 (const :tag "Top" top)
1199 (const :tag "Bottom" bottom)) 1219 (const :tag "Bottom" bottom))
1200 :group 'mh-alias 1220 :group 'mh-alias
1201 :package-version '(MH-E "7.1")) 1221 :package-version '(MH-E . "7.1"))
1202 1222
1203(mh-defcustom mh-alias-local-users t 1223(defcustom-mh mh-alias-local-users t
1204 "*If on, local users are added to alias completion. 1224 "*If on, local users are added to alias completion.
1205 1225
1206Aliases are created from \"/etc/passwd\" entries with a user ID 1226Aliases are created from \"/etc/passwd\" entries with a user ID
@@ -1219,9 +1239,9 @@ password file. For example, use \"ypcat passwd\" to obtain the
1219NIS password file." 1239NIS password file."
1220 :type '(choice (boolean) (string)) 1240 :type '(choice (boolean) (string))
1221 :group 'mh-alias 1241 :group 'mh-alias
1222 :package-version '(MH-E "7.1")) 1242 :package-version '(MH-E . "7.1"))
1223 1243
1224(mh-defcustom mh-alias-local-users-prefix "local." 1244(defcustom-mh mh-alias-local-users-prefix "local."
1225 "*String prefixed to the real names of users from the password file. 1245 "*String prefixed to the real names of users from the password file.
1226This option can also be set to \"Use Login\". 1246This option can also be set to \"Use Login\".
1227 1247
@@ -1241,9 +1261,9 @@ turned off."
1241 :type '(choice (const :tag "Use Login" nil) 1261 :type '(choice (const :tag "Use Login" nil)
1242 (string)) 1262 (string))
1243 :group 'mh-alias 1263 :group 'mh-alias
1244 :package-version '(MH-E "7.4")) 1264 :package-version '(MH-E . "7.4"))
1245 1265
1246(mh-defcustom mh-alias-passwd-gecos-comma-separator-flag t 1266(defcustom-mh mh-alias-passwd-gecos-comma-separator-flag t
1247 "*Non-nil means the gecos field in the password file uses a comma separator. 1267 "*Non-nil means the gecos field in the password file uses a comma separator.
1248 1268
1249In the example in `mh-alias-local-users-prefix', commas are used 1269In the example in `mh-alias-local-users-prefix', commas are used
@@ -1253,11 +1273,11 @@ gecos field in your password file is not separated by commas and
1253whose contents may contain commas, you can turn this option off." 1273whose contents may contain commas, you can turn this option off."
1254 :type 'boolean 1274 :type 'boolean
1255 :group 'mh-alias 1275 :group 'mh-alias
1256 :package-version '(MH-E "7.4")) 1276 :package-version '(MH-E . "7.4"))
1257 1277
1258;;; Organizing Your Mail with Folders (:group 'mh-folder) 1278;;; Organizing Your Mail with Folders (:group 'mh-folder)
1259 1279
1260(mh-defcustom mh-new-messages-folders t 1280(defcustom-mh mh-new-messages-folders t
1261 "Folders searched for the \"unseen\" sequence. 1281 "Folders searched for the \"unseen\" sequence.
1262 1282
1263Set this option to \"Inbox\" to search the \"+inbox\" folder or 1283Set this option to \"Inbox\" to search the \"+inbox\" folder or
@@ -1270,9 +1290,9 @@ See also `mh-recursive-folders-flag'."
1270 (const :tag "All" nil) 1290 (const :tag "All" nil)
1271 (repeat :tag "Choose Folders" (string :tag "Folder"))) 1291 (repeat :tag "Choose Folders" (string :tag "Folder")))
1272 :group 'mh-folder 1292 :group 'mh-folder
1273 :package-version '(MH-E "8.0")) 1293 :package-version '(MH-E . "8.0"))
1274 1294
1275(mh-defcustom mh-ticked-messages-folders t 1295(defcustom-mh mh-ticked-messages-folders t
1276 "Folders searched for `mh-tick-seq'. 1296 "Folders searched for `mh-tick-seq'.
1277 1297
1278Set this option to \"Inbox\" to search the \"+inbox\" folder or 1298Set this option to \"Inbox\" to search the \"+inbox\" folder or
@@ -1285,9 +1305,9 @@ See also `mh-recursive-folders-flag'."
1285 (const :tag "All" nil) 1305 (const :tag "All" nil)
1286 (repeat :tag "Choose Folders" (string :tag "Folder"))) 1306 (repeat :tag "Choose Folders" (string :tag "Folder")))
1287 :group 'mh-folder 1307 :group 'mh-folder
1288 :package-version '(MH-E "8.0")) 1308 :package-version '(MH-E . "8.0"))
1289 1309
1290(mh-defcustom mh-large-folder 200 1310(defcustom-mh mh-large-folder 200
1291 "The number of messages that indicates a large folder. 1311 "The number of messages that indicates a large folder.
1292 1312
1293If a folder is deemed to be large, that is the number of messages 1313If a folder is deemed to be large, that is the number of messages
@@ -1297,24 +1317,24 @@ is not automatically threaded, if it is large. If set to nil all
1297folders are treated as if they are small." 1317folders are treated as if they are small."
1298 :type '(choice (const :tag "No Limit") integer) 1318 :type '(choice (const :tag "No Limit") integer)
1299 :group 'mh-folder 1319 :group 'mh-folder
1300 :package-version '(MH-E "7.0")) 1320 :package-version '(MH-E . "7.0"))
1301 1321
1302(mh-defcustom mh-recenter-summary-flag nil 1322(defcustom-mh mh-recenter-summary-flag nil
1303 "*Non-nil means to recenter the summary window. 1323 "*Non-nil means to recenter the summary window.
1304 1324
1305If this option is turned on, recenter the summary window when the 1325If this option is turned on, recenter the summary window when the
1306show window is toggled off." 1326show window is toggled off."
1307 :type 'boolean 1327 :type 'boolean
1308 :group 'mh-folder 1328 :group 'mh-folder
1309 :package-version '(MH-E "7.0")) 1329 :package-version '(MH-E . "7.0"))
1310 1330
1311(mh-defcustom mh-recursive-folders-flag nil 1331(defcustom-mh mh-recursive-folders-flag nil
1312 "*Non-nil means that commands which operate on folders do so recursively." 1332 "*Non-nil means that commands which operate on folders do so recursively."
1313 :type 'boolean 1333 :type 'boolean
1314 :group 'mh-folder 1334 :group 'mh-folder
1315 :package-version '(MH-E "7.0")) 1335 :package-version '(MH-E . "7.0"))
1316 1336
1317(mh-defcustom mh-sortm-args nil 1337(defcustom-mh mh-sortm-args nil
1318 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>. 1338 "*Additional arguments for \"sortm\"\\<mh-folder-mode-map>.
1319 1339
1320This option is consulted when a prefix argument is used with 1340This option is consulted when a prefix argument is used with
@@ -1324,11 +1344,11 @@ an alternate view. For example, \"'(\"-nolimit\" \"-textfield\"
1324\"subject\")\" is a useful setting." 1344\"subject\")\" is a useful setting."
1325 :type 'string 1345 :type 'string
1326 :group 'mh-folder 1346 :group 'mh-folder
1327 :package-version '(MH-E "8.0")) 1347 :package-version '(MH-E . "8.0"))
1328 1348
1329;;; Folder Selection (:group 'mh-folder-selection) 1349;;; Folder Selection (:group 'mh-folder-selection)
1330 1350
1331(mh-defcustom mh-default-folder-for-message-function nil 1351(defcustom-mh mh-default-folder-for-message-function nil
1332 "Function to select a default folder for refiling or \"Fcc:\". 1352 "Function to select a default folder for refiling or \"Fcc:\".
1333 1353
1334When this function is called, the current buffer contains the message 1354When this function is called, the current buffer contains the message
@@ -1338,9 +1358,9 @@ sign. It can also return nil so that the last folder name is used as
1338the default, or an empty string to suppress the default entirely." 1358the default, or an empty string to suppress the default entirely."
1339 :type 'function 1359 :type 'function
1340 :group 'mh-folder-selection 1360 :group 'mh-folder-selection
1341 :package-version '(MH-E "8.0")) 1361 :package-version '(MH-E . "8.0"))
1342 1362
1343(mh-defcustom mh-default-folder-list nil 1363(defcustom-mh mh-default-folder-list nil
1344 "*List of addresses and folders. 1364 "*List of addresses and folders.
1345 1365
1346The folder name associated with the first address found in this 1366The folder name associated with the first address found in this
@@ -1356,9 +1376,9 @@ for more information."
1356 (string :tag "Folder") 1376 (string :tag "Folder")
1357 (boolean :tag "Check Recipient"))) 1377 (boolean :tag "Check Recipient")))
1358 :group 'mh-folder-selection 1378 :group 'mh-folder-selection
1359 :package-version '(MH-E "7.2")) 1379 :package-version '(MH-E . "7.2"))
1360 1380
1361(mh-defcustom mh-default-folder-must-exist-flag t 1381(defcustom-mh mh-default-folder-must-exist-flag t
1362 "*Non-nil means guessed folder name must exist to be used. 1382 "*Non-nil means guessed folder name must exist to be used.
1363 1383
1364If the derived folder does not exist, and this option is on, then 1384If the derived folder does not exist, and this option is on, then
@@ -1370,9 +1390,9 @@ See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1370for more information." 1390for more information."
1371 :type 'boolean 1391 :type 'boolean
1372 :group 'mh-folder-selection 1392 :group 'mh-folder-selection
1373 :package-version '(MH-E "7.2")) 1393 :package-version '(MH-E . "7.2"))
1374 1394
1375(mh-defcustom mh-default-folder-prefix "" 1395(defcustom-mh mh-default-folder-prefix ""
1376 "*Prefix used for folder names generated from aliases. 1396 "*Prefix used for folder names generated from aliases.
1377The prefix is used to prevent clutter in your mail directory. 1397The prefix is used to prevent clutter in your mail directory.
1378 1398
@@ -1380,7 +1400,7 @@ See `mh-prompt-for-refile-folder' and `mh-folder-from-address'
1380for more information." 1400for more information."
1381 :type 'string 1401 :type 'string
1382 :group 'mh-folder-selection 1402 :group 'mh-folder-selection
1383 :package-version '(MH-E "7.2")) 1403 :package-version '(MH-E . "7.2"))
1384 1404
1385;;; Identities (:group 'mh-identity) 1405;;; Identities (:group 'mh-identity)
1386 1406
@@ -1391,7 +1411,7 @@ for more information."
1391Real definition will take effect when mh-identity is loaded." 1411Real definition will take effect when mh-identity is loaded."
1392 nil))) 1412 nil)))
1393 1413
1394(mh-defcustom mh-identity-list nil 1414(defcustom-mh mh-identity-list nil
1395 "*List of identities. 1415 "*List of identities.
1396 1416
1397To customize this option, click on the \"INS\" button and enter a label 1417To customize this option, click on the \"INS\" button and enter a label
@@ -1458,9 +1478,9 @@ fashion."
1458 (set-default symbol value) 1478 (set-default symbol value)
1459 (mh-identity-make-menu-no-autoload)) 1479 (mh-identity-make-menu-no-autoload))
1460 :group 'mh-identity 1480 :group 'mh-identity
1461 :package-version '(MH-E "7.1")) 1481 :package-version '(MH-E . "7.1"))
1462 1482
1463(mh-defcustom mh-auto-fields-list nil 1483(defcustom-mh mh-auto-fields-list nil
1464 "List of recipients for which header lines are automatically inserted. 1484 "List of recipients for which header lines are automatically inserted.
1465 1485
1466This option can be used to set the identity depending on the 1486This option can be used to set the identity depending on the
@@ -1519,16 +1539,16 @@ as the result is undefined."
1519 (string :tag "Field") 1539 (string :tag "Field")
1520 (string :tag "Value")))))) 1540 (string :tag "Value"))))))
1521 :group 'mh-identity 1541 :group 'mh-identity
1522 :package-version '(MH-E "7.3")) 1542 :package-version '(MH-E . "7.3"))
1523 1543
1524(mh-defcustom mh-auto-fields-prompt-flag t 1544(defcustom-mh mh-auto-fields-prompt-flag t
1525 "*Non-nil means to prompt before sending if fields inserted. 1545 "*Non-nil means to prompt before sending if fields inserted.
1526See `mh-auto-fields-list'." 1546See `mh-auto-fields-list'."
1527 :type 'boolean 1547 :type 'boolean
1528 :group 'mh-identity 1548 :group 'mh-identity
1529 :package-version '(MH-E "8.0")) 1549 :package-version '(MH-E . "8.0"))
1530 1550
1531(mh-defcustom mh-identity-default nil 1551(defcustom-mh mh-identity-default nil
1532 "Default identity to use when `mh-letter-mode' is called. 1552 "Default identity to use when `mh-letter-mode' is called.
1533See `mh-identity-list'." 1553See `mh-identity-list'."
1534 :type (append 1554 :type (append
@@ -1537,9 +1557,9 @@ See `mh-identity-list'."
1537 (mapcar (function (lambda (arg) `(const ,arg))) 1557 (mapcar (function (lambda (arg) `(const ,arg)))
1538 (mapcar 'car mh-identity-list)))) 1558 (mapcar 'car mh-identity-list))))
1539 :group 'mh-identity 1559 :group 'mh-identity
1540 :package-version '(MH-E "7.1")) 1560 :package-version '(MH-E . "7.1"))
1541 1561
1542(mh-defcustom mh-identity-handlers 1562(defcustom-mh mh-identity-handlers
1543 '(("From" . mh-identity-handler-top) 1563 '(("From" . mh-identity-handler-top)
1544 (":default" . mh-identity-handler-bottom) 1564 (":default" . mh-identity-handler-bottom)
1545 (":attribution-verb" . mh-identity-handler-attribution-verb) 1565 (":attribution-verb" . mh-identity-handler-attribution-verb)
@@ -1571,11 +1591,11 @@ fields (for example, \":signature\"), and the ACTION 'remove or
1571containing the VALUE for the field is given." 1591containing the VALUE for the field is given."
1572 :type '(repeat (cons (string :tag "Field") function)) 1592 :type '(repeat (cons (string :tag "Field") function))
1573 :group 'mh-identity 1593 :group 'mh-identity
1574 :package-version '(MH-E "8.0")) 1594 :package-version '(MH-E . "8.0"))
1575 1595
1576;;; Incorporating Your Mail (:group 'mh-inc) 1596;;; Incorporating Your Mail (:group 'mh-inc)
1577 1597
1578(mh-defcustom mh-inc-prog "inc" 1598(defcustom-mh mh-inc-prog "inc"
1579 "*Program to incorporate new mail into a folder. 1599 "*Program to incorporate new mail into a folder.
1580 1600
1581This program generates a one-line summary for each of the new 1601This program generates a one-line summary for each of the new
@@ -1585,7 +1605,7 @@ to be in the `mh-progs' directory. You may also link a file to
1585several scan line format variables appropriately." 1605several scan line format variables appropriately."
1586 :type 'string 1606 :type 'string
1587 :group 'mh-inc 1607 :group 'mh-inc
1588 :package-version '(MH-E "6.0")) 1608 :package-version '(MH-E . "6.0"))
1589 1609
1590(eval-and-compile 1610(eval-and-compile
1591 (unless (fboundp 'mh-inc-spool-make-no-autoload) 1611 (unless (fboundp 'mh-inc-spool-make-no-autoload)
@@ -1594,7 +1614,7 @@ several scan line format variables appropriately."
1594Real definition will take effect when mh-inc is loaded." 1614Real definition will take effect when mh-inc is loaded."
1595 nil))) 1615 nil)))
1596 1616
1597(mh-defcustom mh-inc-spool-list nil 1617(defcustom-mh mh-inc-spool-list nil
1598 "*Alternate spool files. 1618 "*Alternate spool files.
1599 1619
1600You can use the `mh-inc-spool-list' variable to direct MH-E to 1620You can use the `mh-inc-spool-list' variable to direct MH-E to
@@ -1635,7 +1655,7 @@ fashion."
1635 (set-default symbol value) 1655 (set-default symbol value)
1636 (mh-inc-spool-make-no-autoload)) 1656 (mh-inc-spool-make-no-autoload))
1637 :group 'mh-inc 1657 :group 'mh-inc
1638 :package-version '(MH-E "7.3")) 1658 :package-version '(MH-E . "7.3"))
1639 1659
1640;;; Dealing with Junk Mail (:group 'mh-junk) 1660;;; Dealing with Junk Mail (:group 'mh-junk)
1641 1661
@@ -1667,7 +1687,7 @@ The function is always called with SYMBOL bound to
1667 until (executable-find (symbol-name (car element))) 1687 until (executable-find (symbol-name (car element)))
1668 finally return (car element))))) 1688 finally return (car element)))))
1669 1689
1670(mh-defcustom mh-junk-background nil 1690(defcustom-mh mh-junk-background nil
1671 "If on, spam programs are run in background. 1691 "If on, spam programs are run in background.
1672 1692
1673By default, the programs are run in the foreground, but this can 1693By default, the programs are run in the foreground, but this can
@@ -1677,16 +1697,16 @@ you might try turning on this option."
1677 :type '(choice (const :tag "Off" nil) 1697 :type '(choice (const :tag "Off" nil)
1678 (const :tag "On" 0)) 1698 (const :tag "On" 0))
1679 :group 'mh-junk 1699 :group 'mh-junk
1680 :package-version '(MH-E "8.0")) 1700 :package-version '(MH-E . "8.0"))
1681 1701
1682(mh-defcustom mh-junk-disposition nil 1702(defcustom-mh mh-junk-disposition nil
1683 "Disposition of junk mail." 1703 "Disposition of junk mail."
1684 :type '(choice (const :tag "Delete Spam" nil) 1704 :type '(choice (const :tag "Delete Spam" nil)
1685 (string :tag "Spam Folder")) 1705 (string :tag "Spam Folder"))
1686 :group 'mh-junk 1706 :group 'mh-junk
1687 :package-version '(MH-E "8.0")) 1707 :package-version '(MH-E . "8.0"))
1688 1708
1689(mh-defcustom mh-junk-program nil 1709(defcustom-mh mh-junk-program nil
1690 "Spam program that MH-E should use. 1710 "Spam program that MH-E should use.
1691 1711
1692The default setting of this option is \"Auto-detect\" which means 1712The default setting of this option is \"Auto-detect\" which means
@@ -1700,11 +1720,11 @@ bogofilter, then you can set this option to \"Bogofilter\"."
1700 (const :tag "SpamProbe" spamprobe)) 1720 (const :tag "SpamProbe" spamprobe))
1701 :set 'mh-junk-choose 1721 :set 'mh-junk-choose
1702 :group 'mh-junk 1722 :group 'mh-junk
1703 :package-version '(MH-E "7.3")) 1723 :package-version '(MH-E . "7.3"))
1704 1724
1705;;; Editing a Draft (:group 'mh-letter) 1725;;; Editing a Draft (:group 'mh-letter)
1706 1726
1707(mh-defcustom mh-compose-insertion (if (locate-library "mml") 'mml 'mh) 1727(defcustom-mh mh-compose-insertion (if (locate-library "mml") 'mml 'mh)
1708 "Type of tags used when composing MIME messages. 1728 "Type of tags used when composing MIME messages.
1709 1729
1710In addition to MH-style directives, MH-E also supports MML (MIME 1730In addition to MH-style directives, MH-E also supports MML (MIME
@@ -1716,23 +1736,23 @@ MH-style directives are preferred."
1716 :type '(choice (const :tag "MML" mml) 1736 :type '(choice (const :tag "MML" mml)
1717 (const :tag "MH" mh)) 1737 (const :tag "MH" mh))
1718 :group 'mh-letter 1738 :group 'mh-letter
1719 :package-version '(MH-E "7.0")) 1739 :package-version '(MH-E . "7.0"))
1720 1740
1721(mh-defcustom mh-compose-skipped-header-fields 1741(defcustom-mh mh-compose-skipped-header-fields
1722 '("From" "Organization" "References" "In-Reply-To" 1742 '("From" "Organization" "References" "In-Reply-To"
1723 "X-Face" "Face" "X-Image-URL" "X-Mailer") 1743 "X-Face" "Face" "X-Image-URL" "X-Mailer")
1724 "List of header fields to skip over when navigating in draft." 1744 "List of header fields to skip over when navigating in draft."
1725 :type '(repeat (string :tag "Field")) 1745 :type '(repeat (string :tag "Field"))
1726 :group 'mh-letter 1746 :group 'mh-letter
1727 :package-version '(MH-E "7.4")) 1747 :package-version '(MH-E . "7.4"))
1728 1748
1729(mh-defcustom mh-compose-space-does-completion-flag nil 1749(defcustom-mh mh-compose-space-does-completion-flag nil
1730 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header." 1750 "*Non-nil means \\<mh-letter-mode-map>\\[mh-letter-complete-or-space] does completion in message header."
1731 :type 'boolean 1751 :type 'boolean
1732 :group 'mh-letter 1752 :group 'mh-letter
1733 :package-version '(MH-E "7.4")) 1753 :package-version '(MH-E . "7.4"))
1734 1754
1735(mh-defcustom mh-delete-yanked-msg-window-flag nil 1755(defcustom-mh mh-delete-yanked-msg-window-flag nil
1736 "*Non-nil means delete any window displaying the message. 1756 "*Non-nil means delete any window displaying the message.
1737 1757
1738This deletes the window containing the original message after 1758This deletes the window containing the original message after
@@ -1740,9 +1760,9 @@ yanking it with \\<mh-letter-mode-map>\\[mh-yank-cur-msg] to make
1740more room on your screen for your reply." 1760more room on your screen for your reply."
1741 :type 'boolean 1761 :type 'boolean
1742 :group 'mh-letter 1762 :group 'mh-letter
1743 :package-version '(MH-E "7.0")) 1763 :package-version '(MH-E . "7.0"))
1744 1764
1745(mh-defcustom mh-extract-from-attribution-verb "wrote:" 1765(defcustom-mh mh-extract-from-attribution-verb "wrote:"
1746 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. 1766 "*Verb to use for attribution when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1747 1767
1748The attribution consists of the sender's name and email address 1768The attribution consists of the sender's name and email address
@@ -1754,9 +1774,9 @@ followed by the content of this option. This option can be set to
1754 (const "schrieb:") 1774 (const "schrieb:")
1755 (string :tag "Custom String")) 1775 (string :tag "Custom String"))
1756 :group 'mh-letter 1776 :group 'mh-letter
1757 :package-version '(MH-E "7.0")) 1777 :package-version '(MH-E . "7.0"))
1758 1778
1759(mh-defcustom mh-ins-buf-prefix "> " 1779(defcustom-mh mh-ins-buf-prefix "> "
1760 "*String to put before each line of a yanked or inserted message. 1780 "*String to put before each line of a yanked or inserted message.
1761 1781
1762The prefix \"> \" is the default setting of this option. I 1782The prefix \"> \" is the default setting of this option. I
@@ -1770,9 +1790,9 @@ flavors of `mh-yank-behavior' or you have added a
1770`mail-citation-hook'." 1790`mail-citation-hook'."
1771 :type 'string 1791 :type 'string
1772 :group 'mh-letter 1792 :group 'mh-letter
1773 :package-version '(MH-E "6.0")) 1793 :package-version '(MH-E . "6.0"))
1774 1794
1775(mh-defcustom mh-letter-complete-function 'ispell-complete-word 1795(defcustom-mh mh-letter-complete-function 'ispell-complete-word
1776 "*Function to call when completing outside of address or folder fields. 1796 "*Function to call when completing outside of address or folder fields.
1777 1797
1778In the body of the message, 1798In the body of the message,
@@ -1780,18 +1800,18 @@ In the body of the message,
1780which is set to \"ispell-complete-word\" by default." 1800which is set to \"ispell-complete-word\" by default."
1781 :type '(choice function (const nil)) 1801 :type '(choice function (const nil))
1782 :group 'mh-letter 1802 :group 'mh-letter
1783 :package-version '(MH-E "7.1")) 1803 :package-version '(MH-E . "7.1"))
1784 1804
1785(mh-defcustom mh-letter-fill-column 72 1805(defcustom-mh mh-letter-fill-column 72
1786 "*Fill column to use in MH Letter mode. 1806 "*Fill column to use in MH Letter mode.
1787 1807
1788By default, this option is 72 to allow others to quote your 1808By default, this option is 72 to allow others to quote your
1789message without line wrapping." 1809message without line wrapping."
1790 :type 'integer 1810 :type 'integer
1791 :group 'mh-letter 1811 :group 'mh-letter
1792 :package-version '(MH-E "6.0")) 1812 :package-version '(MH-E . "6.0"))
1793 1813
1794(mh-defcustom mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none") 1814(defcustom-mh mh-mml-method-default (if mh-pgp-support-flag "pgpmime" "none")
1795 "Default method to use in security tags. 1815 "Default method to use in security tags.
1796 1816
1797This option is used to select between a variety of mail security 1817This option is used to select between a variety of mail security
@@ -1812,9 +1832,9 @@ you write!"
1812 (const :tag "S/MIME" "smime") 1832 (const :tag "S/MIME" "smime")
1813 (const :tag "None" "none")) 1833 (const :tag "None" "none"))
1814 :group 'mh-letter 1834 :group 'mh-letter
1815 :package-version '(MH-E "8.0")) 1835 :package-version '(MH-E . "8.0"))
1816 1836
1817(mh-defcustom mh-signature-file-name "~/.signature" 1837(defcustom-mh mh-signature-file-name "~/.signature"
1818 "*Source of user's signature. 1838 "*Source of user's signature.
1819 1839
1820By default, the text of your signature is taken from the file 1840By default, the text of your signature is taken from the file
@@ -1835,9 +1855,9 @@ The signature is inserted into your message with the command
1835`mh-identity-list'." 1855`mh-identity-list'."
1836 :type 'file 1856 :type 'file
1837 :group 'mh-letter 1857 :group 'mh-letter
1838 :package-version '(MH-E "6.0")) 1858 :package-version '(MH-E . "6.0"))
1839 1859
1840(mh-defcustom mh-signature-separator-flag t 1860(defcustom-mh mh-signature-separator-flag t
1841 "*Non-nil means a signature separator should be inserted. 1861 "*Non-nil means a signature separator should be inserted.
1842 1862
1843It is not recommended that you change this option since various 1863It is not recommended that you change this option since various
@@ -1846,9 +1866,9 @@ the signature differently, and to suppress the signature when
1846replying or yanking a letter into a draft." 1866replying or yanking a letter into a draft."
1847 :type 'boolean 1867 :type 'boolean
1848 :group 'mh-letter 1868 :group 'mh-letter
1849 :package-version '(MH-E "8.0")) 1869 :package-version '(MH-E . "8.0"))
1850 1870
1851(mh-defcustom mh-x-face-file "~/.face" 1871(defcustom-mh mh-x-face-file "~/.face"
1852 "*File containing face header field to insert in outgoing mail. 1872 "*File containing face header field to insert in outgoing mail.
1853 1873
1854If the file starts with either of the strings \"X-Face:\", \"Face:\" 1874If the file starts with either of the strings \"X-Face:\", \"Face:\"
@@ -1875,9 +1895,9 @@ To prevent the setting of any of these header fields, either set
1875this option doesn't exist." 1895this option doesn't exist."
1876 :type 'file 1896 :type 'file
1877 :group 'mh-letter 1897 :group 'mh-letter
1878 :package-version '(MH-E "7.0")) 1898 :package-version '(MH-E . "7.0"))
1879 1899
1880(mh-defcustom mh-yank-behavior 'attribution 1900(defcustom-mh mh-yank-behavior 'attribution
1881 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg]. 1901 "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
1882 1902
1883To include the entire message, including the entire header, use 1903To include the entire message, including the entire header, use
@@ -1920,11 +1940,11 @@ inserted."
1920 (const :tag "Body With Attribution, Automatically" 1940 (const :tag "Body With Attribution, Automatically"
1921 autoattrib)) 1941 autoattrib))
1922 :group 'mh-letter 1942 :group 'mh-letter
1923 :package-version '(MH-E "8.0")) 1943 :package-version '(MH-E . "8.0"))
1924 1944
1925;;; Ranges (:group 'mh-ranges) 1945;;; Ranges (:group 'mh-ranges)
1926 1946
1927(mh-defcustom mh-interpret-number-as-range-flag t 1947(defcustom-mh mh-interpret-number-as-range-flag t
1928 "*Non-nil means interpret a number as a range. 1948 "*Non-nil means interpret a number as a range.
1929 1949
1930Since one of the most frequent ranges used is \"last:N\", MH-E 1950Since one of the most frequent ranges used is \"last:N\", MH-E
@@ -1933,7 +1953,7 @@ option is on (which is the default). If you need to scan just the
1933message 200, then use the range \"200:200\"." 1953message 200, then use the range \"200:200\"."
1934 :type 'boolean 1954 :type 'boolean
1935 :group 'mh-ranges 1955 :group 'mh-ranges
1936 :package-version '(MH-E "7.4")) 1956 :package-version '(MH-E . "7.4"))
1937 1957
1938;;; Scan Line Formats (:group 'mh-scan-line-formats) 1958;;; Scan Line Formats (:group 'mh-scan-line-formats)
1939 1959
@@ -1944,7 +1964,7 @@ message 200, then use the range \"200:200\"."
1944Real definition, below, uses variables that aren't defined yet." 1964Real definition, below, uses variables that aren't defined yet."
1945 (set-default symbol value)))) 1965 (set-default symbol value))))
1946 1966
1947(mh-defcustom mh-adaptive-cmd-note-flag t 1967(defcustom-mh mh-adaptive-cmd-note-flag t
1948 "*Non-nil means that the message number width is determined dynamically. 1968 "*Non-nil means that the message number width is determined dynamically.
1949 1969
1950If you've created your own format to handle long message numbers, 1970If you've created your own format to handle long message numbers,
@@ -1960,7 +1980,7 @@ you would use \"(mh-set-cmd-note 4)\"."
1960 :type 'boolean 1980 :type 'boolean
1961 :group 'mh-scan-line-formats 1981 :group 'mh-scan-line-formats
1962 :set 'mh-adaptive-cmd-note-flag-check 1982 :set 'mh-adaptive-cmd-note-flag-check
1963 :package-version '(MH-E "7.0")) 1983 :package-version '(MH-E . "7.0"))
1964 1984
1965(defun mh-scan-format-file-check (symbol value) 1985(defun mh-scan-format-file-check (symbol value)
1966 "Check if desired setting is legal. 1986 "Check if desired setting is legal.
@@ -1973,7 +1993,7 @@ set SYMBOL to VALUE."
1973 "unless you use \"Use MH-E scan Format\"") 1993 "unless you use \"Use MH-E scan Format\"")
1974 (set-default symbol value))) 1994 (set-default symbol value)))
1975 1995
1976(mh-defcustom mh-scan-format-file t 1996(defcustom-mh mh-scan-format-file t
1977 "Specifies the format file to pass to the scan program. 1997 "Specifies the format file to pass to the scan program.
1978 1998
1979The default setting for this option is \"Use MH-E scan Format\". This 1999The default setting for this option is \"Use MH-E scan Format\". This
@@ -1999,7 +2019,7 @@ Emacs start with 0)."
1999 (file :tag "Specify a scan Format File")) 2019 (file :tag "Specify a scan Format File"))
2000 :group 'mh-scan-line-formats 2020 :group 'mh-scan-line-formats
2001 :set 'mh-scan-format-file-check 2021 :set 'mh-scan-format-file-check
2002 :package-version '(MH-E "6.0")) 2022 :package-version '(MH-E . "6.0"))
2003 2023
2004(defun mh-adaptive-cmd-note-flag-check (symbol value) 2024(defun mh-adaptive-cmd-note-flag-check (symbol value)
2005 "Check if desired setting is legal. 2025 "Check if desired setting is legal.
@@ -2012,7 +2032,7 @@ Otherwise, set SYMBOL to VALUE."
2012 "is set to \"Use MH-E scan Format\"") 2032 "is set to \"Use MH-E scan Format\"")
2013 (set-default symbol value))) 2033 (set-default symbol value)))
2014 2034
2015(mh-defcustom mh-scan-prog "scan" 2035(defcustom-mh mh-scan-prog "scan"
2016 "*Program used to scan messages. 2036 "*Program used to scan messages.
2017 2037
2018The name of the program that generates a listing of one line per 2038The name of the program that generates a listing of one line per
@@ -2022,12 +2042,12 @@ directory. You may link another program to `scan' (see
2022\"mh-profile(5)\") to produce a different type of listing." 2042\"mh-profile(5)\") to produce a different type of listing."
2023 :type 'string 2043 :type 'string
2024 :group 'mh-scan-line-formats 2044 :group 'mh-scan-line-formats
2025 :package-version '(MH-E "6.0")) 2045 :package-version '(MH-E . "6.0"))
2026(make-variable-buffer-local 'mh-scan-prog) 2046(make-variable-buffer-local 'mh-scan-prog)
2027 2047
2028;;; Searching (:group 'mh-search) 2048;;; Searching (:group 'mh-search)
2029 2049
2030(mh-defcustom mh-search-program nil 2050(defcustom-mh mh-search-program nil
2031 "Search program that MH-E shall use. 2051 "Search program that MH-E shall use.
2032 2052
2033The default setting of this option is \"Auto-detect\" which means 2053The default setting of this option is \"Auto-detect\" which means
@@ -2046,11 +2066,11 @@ MH-E can be found in the documentation of `mh-search'."
2046 (const :tag "pick" pick) 2066 (const :tag "pick" pick)
2047 (const :tag "grep" grep)) 2067 (const :tag "grep" grep))
2048 :group 'mh-search 2068 :group 'mh-search
2049 :package-version '(MH-E "8.0")) 2069 :package-version '(MH-E . "8.0"))
2050 2070
2051;;; Sending Mail (:group 'mh-sending-mail) 2071;;; Sending Mail (:group 'mh-sending-mail)
2052 2072
2053(mh-defcustom mh-compose-forward-as-mime-flag t 2073(defcustom-mh mh-compose-forward-as-mime-flag t
2054 "*Non-nil means that messages are forwarded as attachments. 2074 "*Non-nil means that messages are forwarded as attachments.
2055 2075
2056By default, this option is on which means that the forwarded 2076By default, this option is on which means that the forwarded
@@ -2064,9 +2084,9 @@ forwarded messages will always be included as attachments
2064regardless of the settings of this option." 2084regardless of the settings of this option."
2065 :type 'boolean 2085 :type 'boolean
2066 :group 'mh-sending-mail 2086 :group 'mh-sending-mail
2067 :package-version '(MH-E "8.0")) 2087 :package-version '(MH-E . "8.0"))
2068 2088
2069(mh-defcustom mh-compose-letter-function nil 2089(defcustom-mh mh-compose-letter-function nil
2070 "Invoked when starting a new draft. 2090 "Invoked when starting a new draft.
2071 2091
2072However, it is the last function called before you edit your 2092However, it is the last function called before you edit your
@@ -2076,15 +2096,15 @@ three arguments: the contents of the TO, SUBJECT, and CC header
2076fields." 2096fields."
2077 :type '(choice (const nil) function) 2097 :type '(choice (const nil) function)
2078 :group 'mh-sending-mail 2098 :group 'mh-sending-mail
2079 :package-version '(MH-E "6.0")) 2099 :package-version '(MH-E . "6.0"))
2080 2100
2081(mh-defcustom mh-compose-prompt-flag nil 2101(defcustom-mh mh-compose-prompt-flag nil
2082 "*Non-nil means prompt for header fields when composing a new draft." 2102 "*Non-nil means prompt for header fields when composing a new draft."
2083 :type 'boolean 2103 :type 'boolean
2084 :group 'mh-sending-mail 2104 :group 'mh-sending-mail
2085 :package-version '(MH-E "7.4")) 2105 :package-version '(MH-E . "7.4"))
2086 2106
2087(mh-defcustom mh-forward-subject-format "%s: %s" 2107(defcustom-mh mh-forward-subject-format "%s: %s"
2088 "*Format string for forwarded message subject. 2108 "*Format string for forwarded message subject.
2089 2109
2090This option is a string which includes two escapes (\"%s\"). The 2110This option is a string which includes two escapes (\"%s\"). The
@@ -2092,9 +2112,9 @@ first \"%s\" is replaced with the sender of the original message,
2092and the second one is replaced with the original \"Subject:\"." 2112and the second one is replaced with the original \"Subject:\"."
2093 :type 'string 2113 :type 'string
2094 :group 'mh-sending-mail 2114 :group 'mh-sending-mail
2095 :package-version '(MH-E "6.0")) 2115 :package-version '(MH-E . "6.0"))
2096 2116
2097(mh-defcustom mh-insert-x-mailer-flag t 2117(defcustom-mh mh-insert-x-mailer-flag t
2098 "*Non-nil means append an \"X-Mailer:\" header field to the header. 2118 "*Non-nil means append an \"X-Mailer:\" header field to the header.
2099 2119
2100This header field includes the version of MH-E and Emacs that you 2120This header field includes the version of MH-E and Emacs that you
@@ -2102,9 +2122,9 @@ are using. If you don't want to participate in our marketing, you
2102can turn this option off." 2122can turn this option off."
2103 :type 'boolean 2123 :type 'boolean
2104 :group 'mh-sending-mail 2124 :group 'mh-sending-mail
2105 :package-version '(MH-E "7.0")) 2125 :package-version '(MH-E . "7.0"))
2106 2126
2107(mh-defcustom mh-redist-full-contents-flag nil 2127(defcustom-mh mh-redist-full-contents-flag nil
2108 "*Non-nil means the \"dist\" command needs entire letter for redistribution. 2128 "*Non-nil means the \"dist\" command needs entire letter for redistribution.
2109 2129
2110This option must be turned on if \"dist\" requires the whole 2130This option must be turned on if \"dist\" requires the whole
@@ -2114,9 +2134,9 @@ find that MH will not allow you to redistribute a message that
2114has been redistributed before, turn off this option." 2134has been redistributed before, turn off this option."
2115 :type 'boolean 2135 :type 'boolean
2116 :group 'mh-sending-mail 2136 :group 'mh-sending-mail
2117 :package-version '(MH-E "8.0")) 2137 :package-version '(MH-E . "8.0"))
2118 2138
2119(mh-defcustom mh-reply-default-reply-to nil 2139(defcustom-mh mh-reply-default-reply-to nil
2120 "*Sets the person or persons to whom a reply will be sent. 2140 "*Sets the person or persons to whom a reply will be sent.
2121 2141
2122This option is set to \"Prompt\" by default so that you are 2142This option is set to \"Prompt\" by default so that you are
@@ -2130,9 +2150,9 @@ this option to \"cc\". Other choices include \"from\", \"to\", or
2130 (const "cc") 2150 (const "cc")
2131 (const "all")) 2151 (const "all"))
2132 :group 'mh-sending-mail 2152 :group 'mh-sending-mail
2133 :package-version '(MH-E "6.0")) 2153 :package-version '(MH-E . "6.0"))
2134 2154
2135(mh-defcustom mh-reply-show-message-flag t 2155(defcustom-mh mh-reply-show-message-flag t
2136 "*Non-nil means the MH-Show buffer is displayed when replying. 2156 "*Non-nil means the MH-Show buffer is displayed when replying.
2137 2157
2138If you include the message automatically, you can hide the 2158If you include the message automatically, you can hide the
@@ -2141,7 +2161,7 @@ MH-Show buffer by turning off this option.
2141See also `mh-reply'." 2161See also `mh-reply'."
2142 :type 'boolean 2162 :type 'boolean
2143 :group 'mh-sending-mail 2163 :group 'mh-sending-mail
2144 :package-version '(MH-E "7.0")) 2164 :package-version '(MH-E . "7.0"))
2145 2165
2146;;; Sequences (:group 'mh-sequences) 2166;;; Sequences (:group 'mh-sequences)
2147 2167
@@ -2149,7 +2169,7 @@ See also `mh-reply'."
2149;; the docstring: "Additional sequences that should not to be preserved can be 2169;; the docstring: "Additional sequences that should not to be preserved can be
2150;; specified by setting `mh-unpropagated-sequences' appropriately." XXX 2170;; specified by setting `mh-unpropagated-sequences' appropriately." XXX
2151 2171
2152(mh-defcustom mh-refile-preserves-sequences-flag t 2172(defcustom-mh mh-refile-preserves-sequences-flag t
2153 "*Non-nil means that sequences are preserved when messages are refiled. 2173 "*Non-nil means that sequences are preserved when messages are refiled.
2154 2174
2155If a message is in any sequence (except \"Previous-Sequence:\" 2175If a message is in any sequence (except \"Previous-Sequence:\"
@@ -2158,9 +2178,9 @@ sequences in the destination folder. If this behavior is not
2158desired, then turn off this option." 2178desired, then turn off this option."
2159 :type 'boolean 2179 :type 'boolean
2160 :group 'mh-sequences 2180 :group 'mh-sequences
2161 :package-version '(MH-E "7.4")) 2181 :package-version '(MH-E . "7.4"))
2162 2182
2163(mh-defcustom mh-tick-seq 'tick 2183(defcustom-mh mh-tick-seq 'tick
2164 "The name of the MH sequence for ticked messages. 2184 "The name of the MH sequence for ticked messages.
2165 2185
2166You can customize this option if you already use the \"tick\" 2186You can customize this option if you already use the \"tick\"
@@ -2170,9 +2190,9 @@ there isn't much advantage to that."
2170 :type '(choice (const :tag "Disable Ticking" nil) 2190 :type '(choice (const :tag "Disable Ticking" nil)
2171 symbol) 2191 symbol)
2172 :group 'mh-sequences 2192 :group 'mh-sequences
2173 :package-version '(MH-E "7.3")) 2193 :package-version '(MH-E . "7.3"))
2174 2194
2175(mh-defcustom mh-update-sequences-after-mh-show-flag t 2195(defcustom-mh mh-update-sequences-after-mh-show-flag t
2176 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>. 2196 "*Non-nil means flush MH sequences to disk after message is shown\\<mh-folder-mode-map>.
2177 2197
2178Three sequences are maintained internally by MH-E and pushed out 2198Three sequences are maintained internally by MH-E and pushed out
@@ -2185,11 +2205,11 @@ this option. You can then update the state manually with the
2185commands." 2205commands."
2186 :type 'boolean 2206 :type 'boolean
2187 :group 'mh-sequences 2207 :group 'mh-sequences
2188 :package-version '(MH-E "7.0")) 2208 :package-version '(MH-E . "7.0"))
2189 2209
2190;;; Reading Your Mail (:group 'mh-show) 2210;;; Reading Your Mail (:group 'mh-show)
2191 2211
2192(mh-defcustom mh-bury-show-buffer-flag t 2212(defcustom-mh mh-bury-show-buffer-flag t
2193 "*Non-nil means show buffer is buried. 2213 "*Non-nil means show buffer is buried.
2194 2214
2195One advantage of not burying the show buffer is that one can 2215One advantage of not burying the show buffer is that one can
@@ -2198,18 +2218,18 @@ because of its proximity to its associated MH-Folder buffer. Try
2198running \\[electric-buffer-list] to see what I mean." 2218running \\[electric-buffer-list] to see what I mean."
2199 :type 'boolean 2219 :type 'boolean
2200 :group 'mh-show 2220 :group 'mh-show
2201 :package-version '(MH-E "7.0")) 2221 :package-version '(MH-E . "7.0"))
2202 2222
2203(mh-defcustom mh-clean-message-header-flag t 2223(defcustom-mh mh-clean-message-header-flag t
2204 "*Non-nil means remove extraneous header fields. 2224 "*Non-nil means remove extraneous header fields.
2205 2225
2206See also `mh-invisible-header-fields-default' and 2226See also `mh-invisible-header-fields-default' and
2207`mh-invisible-header-fields'." 2227`mh-invisible-header-fields'."
2208 :type 'boolean 2228 :type 'boolean
2209 :group 'mh-show 2229 :group 'mh-show
2210 :package-version '(MH-E "7.0")) 2230 :package-version '(MH-E . "7.0"))
2211 2231
2212(mh-defcustom mh-decode-mime-flag (not (not (locate-library "mm-decode"))) 2232(defcustom-mh mh-decode-mime-flag (not (not (locate-library "mm-decode")))
2213 "*Non-nil means attachments are handled\\<mh-folder-mode-map>. 2233 "*Non-nil means attachments are handled\\<mh-folder-mode-map>.
2214 2234
2215MH-E can handle attachments as well if the Gnus `mm-decode' 2235MH-E can handle attachments as well if the Gnus `mm-decode'
@@ -2225,9 +2245,9 @@ messages and other graphical widgets. See the options
2225`mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'." 2245`mh-graphical-smileys-flag' and `mh-graphical-emphasis-flag'."
2226 :type 'boolean 2246 :type 'boolean
2227 :group 'mh-show 2247 :group 'mh-show
2228 :package-version '(MH-E "7.0")) 2248 :package-version '(MH-E . "7.0"))
2229 2249
2230(mh-defcustom mh-display-buttons-for-alternatives-flag nil 2250(defcustom-mh mh-display-buttons-for-alternatives-flag nil
2231 "*Non-nil means display buttons for all alternative attachments. 2251 "*Non-nil means display buttons for all alternative attachments.
2232 2252
2233Sometimes, a mail program will produce multiple alternatives of 2253Sometimes, a mail program will produce multiple alternatives of
@@ -2237,9 +2257,9 @@ displayed. If this option is on, then the preferred part is shown
2237inline and buttons are shown for each of the other alternatives." 2257inline and buttons are shown for each of the other alternatives."
2238 :type 'boolean 2258 :type 'boolean
2239 :group 'mh-show 2259 :group 'mh-show
2240 :package-version '(MH-E "7.4")) 2260 :package-version '(MH-E . "7.4"))
2241 2261
2242(mh-defcustom mh-display-buttons-for-inline-parts-flag nil 2262(defcustom-mh mh-display-buttons-for-inline-parts-flag nil
2243 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>. 2263 "*Non-nil means display buttons for all inline attachments\\<mh-folder-mode-map>.
2244 2264
2245The sender can request that attachments should be viewed inline so 2265The sender can request that attachments should be viewed inline so
@@ -2260,9 +2280,9 @@ MH-E cannot display all attachments inline however. It can display
2260text (including HTML) and images." 2280text (including HTML) and images."
2261 :type 'boolean 2281 :type 'boolean
2262 :group 'mh-show 2282 :group 'mh-show
2263 :package-version '(MH-E "7.0")) 2283 :package-version '(MH-E . "7.0"))
2264 2284
2265(mh-defcustom mh-do-not-confirm-flag nil 2285(defcustom-mh mh-do-not-confirm-flag nil
2266 "*Non-nil means non-reversible commands do not prompt for confirmation. 2286 "*Non-nil means non-reversible commands do not prompt for confirmation.
2267 2287
2268Commands such as `mh-pack-folder' prompt to confirm whether to 2288Commands such as `mh-pack-folder' prompt to confirm whether to
@@ -2272,9 +2292,9 @@ performed--which is usually desired but cannot be
2272retracted--without question." 2292retracted--without question."
2273 :type 'boolean 2293 :type 'boolean
2274 :group 'mh-show 2294 :group 'mh-show
2275 :package-version '(MH-E "7.0")) 2295 :package-version '(MH-E . "7.0"))
2276 2296
2277(mh-defcustom mh-fetch-x-image-url nil 2297(defcustom-mh mh-fetch-x-image-url nil
2278 "*Control fetching of \"X-Image-URL:\" header field image. 2298 "*Control fetching of \"X-Image-URL:\" header field image.
2279 2299
2280Ths option controls the fetching of the \"X-Image-URL:\" header 2300Ths option controls the fetching of the \"X-Image-URL:\" header
@@ -2308,9 +2328,9 @@ turned on."
2308 :type '(choice (const :tag "Ask Before Fetching" ask) 2328 :type '(choice (const :tag "Ask Before Fetching" ask)
2309 (const :tag "Never Fetch" nil)) 2329 (const :tag "Never Fetch" nil))
2310 :group 'mh-show 2330 :group 'mh-show
2311 :package-version '(MH-E "7.3")) 2331 :package-version '(MH-E . "7.3"))
2312 2332
2313(mh-defcustom mh-graphical-smileys-flag t 2333(defcustom-mh mh-graphical-smileys-flag t
2314 "*Non-nil means graphical smileys are displayed. 2334 "*Non-nil means graphical smileys are displayed.
2315 2335
2316It is a long standing custom to inject body language using a 2336It is a long standing custom to inject body language using a
@@ -2323,9 +2343,9 @@ This option is disabled if the option `mh-decode-mime-flag' is
2323turned off." 2343turned off."
2324 :type 'boolean 2344 :type 'boolean
2325 :group 'mh-show 2345 :group 'mh-show
2326 :package-version '(MH-E "7.0")) 2346 :package-version '(MH-E . "7.0"))
2327 2347
2328(mh-defcustom mh-graphical-emphasis-flag t 2348(defcustom-mh mh-graphical-emphasis-flag t
2329 "*Non-nil means graphical emphasis is displayed. 2349 "*Non-nil means graphical emphasis is displayed.
2330 2350
2331A few typesetting features are indicated in ASCII text with 2351A few typesetting features are indicated in ASCII text with
@@ -2340,9 +2360,9 @@ This option is disabled if the option `mh-decode-mime-flag' is
2340turned off." 2360turned off."
2341 :type 'boolean 2361 :type 'boolean
2342 :group 'mh-show 2362 :group 'mh-show
2343 :package-version '(MH-E "7.0")) 2363 :package-version '(MH-E . "7.0"))
2344 2364
2345(mh-defcustom mh-highlight-citation-style 'gnus 2365(defcustom-mh mh-highlight-citation-style 'gnus
2346 "Style for highlighting citations. 2366 "Style for highlighting citations.
2347 2367
2348If the sender of the message has cited other messages in his 2368If the sender of the message has cited other messages in his
@@ -2356,7 +2376,7 @@ of citations entirely, choose \"None\"."
2356 (const :tag "Monochrome" font-lock) 2376 (const :tag "Monochrome" font-lock)
2357 (const :tag "None" nil)) 2377 (const :tag "None" nil))
2358 :group 'mh-show 2378 :group 'mh-show
2359 :package-version '(MH-E "8.0")) 2379 :package-version '(MH-E . "8.0"))
2360 2380
2361;; Keep fields alphabetized. Mention source, if known. 2381;; Keep fields alphabetized. Mention source, if known.
2362(defvar mh-invisible-header-fields-internal 2382(defvar mh-invisible-header-fields-internal
@@ -2569,7 +2589,7 @@ Because the function `mh-invisible-headers' uses both
2569`mh-invisible-header-fields' and `mh-invisible-header-fields', it 2589`mh-invisible-header-fields' and `mh-invisible-header-fields', it
2570cannot be run until both variables have been initialized.") 2590cannot be run until both variables have been initialized.")
2571 2591
2572(mh-defcustom mh-invisible-header-fields nil 2592(defcustom-mh mh-invisible-header-fields nil
2573 "*Additional header fields to hide. 2593 "*Additional header fields to hide.
2574 2594
2575Header fields that you would like to hide that aren't listed in 2595Header fields that you would like to hide that aren't listed in
@@ -2588,9 +2608,9 @@ See also `mh-clean-message-header-flag'."
2588 (set-default symbol value) 2608 (set-default symbol value)
2589 (mh-invisible-headers)) 2609 (mh-invisible-headers))
2590 :group 'mh-show 2610 :group 'mh-show
2591 :package-version '(MH-E "7.1")) 2611 :package-version '(MH-E . "7.1"))
2592 2612
2593(mh-defcustom mh-invisible-header-fields-default nil 2613(defcustom-mh mh-invisible-header-fields-default nil
2594 "*List of hidden header fields. 2614 "*List of hidden header fields.
2595 2615
2596The header fields listed in this option are hidden, although you 2616The header fields listed in this option are hidden, although you
@@ -2606,7 +2626,7 @@ See also `mh-clean-message-header-flag'."
2606 (set-default symbol value) 2626 (set-default symbol value)
2607 (mh-invisible-headers)) 2627 (mh-invisible-headers))
2608 :group 'mh-show 2628 :group 'mh-show
2609 :package-version '(MH-E "8.0")) 2629 :package-version '(MH-E . "8.0"))
2610 2630
2611(defvar mh-invisible-header-fields-compiled nil 2631(defvar mh-invisible-header-fields-compiled nil
2612 "*Regexp matching lines in a message header that are not to be shown. 2632 "*Regexp matching lines in a message header that are not to be shown.
@@ -2643,7 +2663,7 @@ removed and entries from `mh-invisible-header-fields' are added."
2643;; Compile invisible header fields. 2663;; Compile invisible header fields.
2644(mh-invisible-headers) 2664(mh-invisible-headers)
2645 2665
2646(mh-defcustom mh-lpr-command-format "lpr -J '%s'" 2666(defcustom-mh mh-lpr-command-format "lpr -J '%s'"
2647 "*Command used to print\\<mh-folder-mode-map>. 2667 "*Command used to print\\<mh-folder-mode-map>.
2648 2668
2649This option contains the Unix command line which performs the 2669This option contains the Unix command line which performs the
@@ -2658,9 +2678,9 @@ This options is not used by the commands \\[mh-ps-print-msg] or
2658\\[mh-ps-print-msg-file]." 2678\\[mh-ps-print-msg-file]."
2659 :type 'string 2679 :type 'string
2660 :group 'mh-show 2680 :group 'mh-show
2661 :package-version '(MH-E "6.0")) 2681 :package-version '(MH-E . "6.0"))
2662 2682
2663(mh-defcustom mh-max-inline-image-height nil 2683(defcustom-mh mh-max-inline-image-height nil
2664 "*Maximum inline image height if \"Content-Disposition:\" is not present. 2684 "*Maximum inline image height if \"Content-Disposition:\" is not present.
2665 2685
2666Some older mail programs do not insert this needed plumbing to 2686Some older mail programs do not insert this needed plumbing to
@@ -2674,9 +2694,9 @@ a large number. The size of your screen is a good choice for
2674these numbers." 2694these numbers."
2675 :type '(choice (const nil) integer) 2695 :type '(choice (const nil) integer)
2676 :group 'mh-show 2696 :group 'mh-show
2677 :package-version '(MH-E "7.0")) 2697 :package-version '(MH-E . "7.0"))
2678 2698
2679(mh-defcustom mh-max-inline-image-width nil 2699(defcustom-mh mh-max-inline-image-width nil
2680 "*Maximum inline image width if \"Content-Disposition:\" is not present. 2700 "*Maximum inline image width if \"Content-Disposition:\" is not present.
2681 2701
2682Some older mail programs do not insert this needed plumbing to 2702Some older mail programs do not insert this needed plumbing to
@@ -2690,9 +2710,9 @@ a large number. The size of your screen is a good choice for
2690these numbers." 2710these numbers."
2691 :type '(choice (const nil) integer) 2711 :type '(choice (const nil) integer)
2692 :group 'mh-show 2712 :group 'mh-show
2693 :package-version '(MH-E "7.0")) 2713 :package-version '(MH-E . "7.0"))
2694 2714
2695(mh-defcustom mh-mhl-format-file nil 2715(defcustom-mh mh-mhl-format-file nil
2696 "*Specifies the format file to pass to the \"mhl\" program. 2716 "*Specifies the format file to pass to the \"mhl\" program.
2697 2717
2698Normally MH-E takes care of displaying messages itself (rather than 2718Normally MH-E takes care of displaying messages itself (rather than
@@ -2714,9 +2734,9 @@ file."
2714 (const :tag "Use Default mhl Format" t) 2734 (const :tag "Use Default mhl Format" t)
2715 (file :tag "Specify an mhl Format File")) 2735 (file :tag "Specify an mhl Format File"))
2716 :group 'mh-show 2736 :group 'mh-show
2717 :package-version '(MH-E "8.0")) 2737 :package-version '(MH-E . "8.0"))
2718 2738
2719(mh-defcustom mh-mime-save-parts-default-directory t 2739(defcustom-mh mh-mime-save-parts-default-directory t
2720 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts]. 2740 "Default directory to use for \\<mh-folder-mode-map>\\[mh-mime-save-parts].
2721 2741
2722The default value for this option is \"Prompt Always\" so that 2742The default value for this option is \"Prompt Always\" so that
@@ -2730,9 +2750,9 @@ directory's name."
2730 (const :tag "Prompt Always" t) 2750 (const :tag "Prompt Always" t)
2731 directory) 2751 directory)
2732 :group 'mh-show 2752 :group 'mh-show
2733 :package-version '(MH-E "7.0")) 2753 :package-version '(MH-E . "7.0"))
2734 2754
2735(mh-defcustom mh-print-background-flag nil 2755(defcustom-mh mh-print-background-flag nil
2736 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>. 2756 "*Non-nil means messages should be printed in the background\\<mh-folder-mode-map>.
2737 2757
2738Normally messages are printed in the foreground. If this is slow on 2758Normally messages are printed in the foreground. If this is slow on
@@ -2746,9 +2766,9 @@ This option is not used by the commands \\[mh-ps-print-msg] or
2746\\[mh-ps-print-msg-file]." 2766\\[mh-ps-print-msg-file]."
2747 :type 'boolean 2767 :type 'boolean
2748 :group 'mh-show 2768 :group 'mh-show
2749 :package-version '(MH-E "7.0")) 2769 :package-version '(MH-E . "7.0"))
2750 2770
2751(mh-defcustom mh-show-maximum-size 0 2771(defcustom-mh mh-show-maximum-size 0
2752 "*Maximum size of message (in bytes) to display automatically. 2772 "*Maximum size of message (in bytes) to display automatically.
2753 2773
2754This option provides an opportunity to skip over large messages 2774This option provides an opportunity to skip over large messages
@@ -2756,9 +2776,9 @@ which may be slow to load. The default value of 0 means that all
2756message are shown regardless of size." 2776message are shown regardless of size."
2757 :type 'integer 2777 :type 'integer
2758 :group 'mh-show 2778 :group 'mh-show
2759 :package-version '(MH-E "8.0")) 2779 :package-version '(MH-E . "8.0"))
2760 2780
2761(mh-defcustom mh-show-use-xface-flag (>= emacs-major-version 21) 2781(defcustom-mh mh-show-use-xface-flag (>= emacs-major-version 21)
2762 "*Non-nil means display face images in MH-show buffers. 2782 "*Non-nil means display face images in MH-show buffers.
2763 2783
2764MH-E can display the content of \"Face:\", \"X-Face:\", and 2784MH-E can display the content of \"Face:\", \"X-Face:\", and
@@ -2796,9 +2816,9 @@ The option `mh-fetch-x-image-url' controls the fetching of the
2796\"X-Image-URL:\" header field image." 2816\"X-Image-URL:\" header field image."
2797 :type 'boolean 2817 :type 'boolean
2798 :group 'mh-show 2818 :group 'mh-show
2799 :package-version '(MH-E "7.0")) 2819 :package-version '(MH-E . "7.0"))
2800 2820
2801(mh-defcustom mh-store-default-directory nil 2821(defcustom-mh mh-store-default-directory nil
2802 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg]. 2822 "*Default directory for \\<mh-folder-mode-map>\\[mh-store-msg].
2803 2823
2804If you would like to change the initial default directory, 2824If you would like to change the initial default directory,
@@ -2808,9 +2828,9 @@ the content of these messages."
2808 :type '(choice (const :tag "Current" nil) 2828 :type '(choice (const :tag "Current" nil)
2809 directory) 2829 directory)
2810 :group 'mh-show 2830 :group 'mh-show
2811 :package-version '(MH-E "6.0")) 2831 :package-version '(MH-E . "6.0"))
2812 2832
2813(mh-defcustom mh-summary-height nil 2833(defcustom-mh mh-summary-height nil
2814 "*Number of lines in MH-Folder buffer (including the mode line). 2834 "*Number of lines in MH-Folder buffer (including the mode line).
2815 2835
2816The default value of this option is \"Automatic\" which means 2836The default value of this option is \"Automatic\" which means
@@ -2821,20 +2841,20 @@ lines you'd like to see."
2821 :type '(choice (const :tag "Automatic" nil) 2841 :type '(choice (const :tag "Automatic" nil)
2822 (integer :tag "Fixed Size")) 2842 (integer :tag "Fixed Size"))
2823 :group 'mh-show 2843 :group 'mh-show
2824 :package-version '(MH-E "7.4")) 2844 :package-version '(MH-E . "7.4"))
2825 2845
2826;;; The Speedbar (:group 'mh-speedbar) 2846;;; The Speedbar (:group 'mh-speedbar)
2827 2847
2828(mh-defcustom mh-speed-update-interval 60 2848(defcustom-mh mh-speed-update-interval 60
2829 "Time between speedbar updates in seconds. 2849 "Time between speedbar updates in seconds.
2830Set to 0 to disable automatic update." 2850Set to 0 to disable automatic update."
2831 :type 'integer 2851 :type 'integer
2832 :group 'mh-speedbar 2852 :group 'mh-speedbar
2833 :package-version '(MH-E "8.0")) 2853 :package-version '(MH-E . "8.0"))
2834 2854
2835;;; Threading (:group 'mh-thread) 2855;;; Threading (:group 'mh-thread)
2836 2856
2837(mh-defcustom mh-show-threads-flag nil 2857(defcustom-mh mh-show-threads-flag nil
2838 "*Non-nil means new folders start in threaded mode. 2858 "*Non-nil means new folders start in threaded mode.
2839 2859
2840Threading large number of messages can be time consuming so this 2860Threading large number of messages can be time consuming so this
@@ -2843,14 +2863,14 @@ threading will be done only if the number of messages being
2843threaded is less than `mh-large-folder'." 2863threaded is less than `mh-large-folder'."
2844 :type 'boolean 2864 :type 'boolean
2845 :group 'mh-thread 2865 :group 'mh-thread
2846 :package-version '(MH-E "7.1")) 2866 :package-version '(MH-E . "7.1"))
2847 2867
2848;;; The Tool Bar (:group 'mh-tool-bar) 2868;;; The Tool Bar (:group 'mh-tool-bar)
2849 2869
2850;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined 2870;; mh-tool-bar-folder-buttons and mh-tool-bar-letter-buttons defined
2851;; dynamically in mh-tool-bar.el. 2871;; dynamically in mh-tool-bar.el.
2852 2872
2853(mh-defcustom mh-tool-bar-search-function 'mh-search 2873(defcustom-mh mh-tool-bar-search-function 'mh-search
2854 "*Function called by the tool bar search button. 2874 "*Function called by the tool bar search button.
2855 2875
2856By default, this is set to `mh-search'. You can also choose 2876By default, this is set to `mh-search'. You can also choose
@@ -2859,11 +2879,11 @@ of your own choosing."
2859 :type '(choice (const mh-search) 2879 :type '(choice (const mh-search)
2860 (function :tag "Other Function")) 2880 (function :tag "Other Function"))
2861 :group 'mh-tool-bar 2881 :group 'mh-tool-bar
2862 :package-version '(MH-E "7.0")) 2882 :package-version '(MH-E . "7.0"))
2863 2883
2864;; XEmacs has a couple of extra customizations... 2884;; XEmacs has a couple of extra customizations...
2865(mh-do-in-xemacs 2885(mh-do-in-xemacs
2866 (mh-defcustom mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag 2886 (defcustom-mh mh-xemacs-use-tool-bar-flag mh-xemacs-has-tool-bar-flag
2867 "*If non-nil, use tool bar. 2887 "*If non-nil, use tool bar.
2868 2888
2869This option controls whether to show the MH-E icons at all. By 2889This option controls whether to show the MH-E icons at all. By
@@ -2877,9 +2897,9 @@ won't be able to turn on this option."
2877 (not mh-xemacs-has-tool-bar-flag)) 2897 (not mh-xemacs-has-tool-bar-flag))
2878 (error "Tool bar not supported")) 2898 (error "Tool bar not supported"))
2879 (set-default symbol value)) 2899 (set-default symbol value))
2880 :package-version '(MH-E "7.3")) 2900 :package-version '(MH-E . "7.3"))
2881 2901
2882 (mh-defcustom mh-xemacs-tool-bar-position nil 2902 (defcustom-mh mh-xemacs-tool-bar-position nil
2883 "*Tool bar location. 2903 "*Tool bar location.
2884 2904
2885This option controls the placement of the tool bar along the four 2905This option controls the placement of the tool bar along the four
@@ -2895,13 +2915,13 @@ default tool bar."
2895 (const :tag "Left" :value left) 2915 (const :tag "Left" :value left)
2896 (const :tag "Right" :value right)) 2916 (const :tag "Right" :value right))
2897 :group 'mh-tool-bar 2917 :group 'mh-tool-bar
2898 :package-version '(MH-E "7.3"))) 2918 :package-version '(MH-E . "7.3")))
2899 2919
2900 2920
2901 2921
2902;;; Hooks (:group 'mh-hooks + group where hook described) 2922;;; Hooks (:group 'mh-hooks + group where hook described)
2903 2923
2904(mh-defcustom mh-after-commands-processed-hook nil 2924(defcustom-mh mh-after-commands-processed-hook nil
2905 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests. 2925 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] after performing outstanding refile and delete requests.
2906 2926
2907Variables that are useful in this hook include 2927Variables that are useful in this hook include
@@ -2911,16 +2931,16 @@ folder, which is also available in `mh-current-folder'."
2911 :type 'hook 2931 :type 'hook
2912 :group 'mh-hooks 2932 :group 'mh-hooks
2913 :group 'mh-folder 2933 :group 'mh-folder
2914 :package-version '(MH-E "8.0")) 2934 :package-version '(MH-E . "8.0"))
2915 2935
2916(mh-defcustom mh-alias-reloaded-hook nil 2936(defcustom-mh mh-alias-reloaded-hook nil
2917 "Hook run by `mh-alias-reload' after loading aliases." 2937 "Hook run by `mh-alias-reload' after loading aliases."
2918 :type 'hook 2938 :type 'hook
2919 :group 'mh-hooks 2939 :group 'mh-hooks
2920 :group 'mh-alias 2940 :group 'mh-alias
2921 :package-version '(MH-E "8.0")) 2941 :package-version '(MH-E . "8.0"))
2922 2942
2923(mh-defcustom mh-before-commands-processed-hook nil 2943(defcustom-mh mh-before-commands-processed-hook nil
2924 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests. 2944 "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
2925 2945
2926Variables that are useful in this hook include `mh-delete-list' 2946Variables that are useful in this hook include `mh-delete-list'
@@ -2929,9 +2949,9 @@ be made to the current folder, `mh-current-folder'."
2929 :type 'hook 2949 :type 'hook
2930 :group 'mh-hooks 2950 :group 'mh-hooks
2931 :group 'mh-folder 2951 :group 'mh-folder
2932 :package-version '(MH-E "8.0")) 2952 :package-version '(MH-E . "8.0"))
2933 2953
2934(mh-defcustom mh-before-quit-hook nil 2954(defcustom-mh mh-before-quit-hook nil
2935 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E. 2955 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] before quitting MH-E.
2936 2956
2937This hook is called before the quit occurs, so you might use it 2957This hook is called before the quit occurs, so you might use it
@@ -2942,9 +2962,9 @@ See also `mh-quit-hook'."
2942 :type 'hook 2962 :type 'hook
2943 :group 'mh-hooks 2963 :group 'mh-hooks
2944 :group 'mh-folder 2964 :group 'mh-folder
2945 :package-version '(MH-E "6.0")) 2965 :package-version '(MH-E . "6.0"))
2946 2966
2947(mh-defcustom mh-before-send-letter-hook nil 2967(defcustom-mh mh-before-send-letter-hook nil
2948 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command. 2968 "Hook run at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.
2949 2969
2950For example, if you want to check your spelling in your message 2970For example, if you want to check your spelling in your message
@@ -2953,9 +2973,9 @@ before sending, add the `ispell-message' function."
2953 :options '(ispell-message) 2973 :options '(ispell-message)
2954 :group 'mh-hooks 2974 :group 'mh-hooks
2955 :group 'mh-letter 2975 :group 'mh-letter
2956 :package-version '(MH-E "6.0")) 2976 :package-version '(MH-E . "6.0"))
2957 2977
2958(mh-defcustom mh-delete-msg-hook nil 2978(defcustom-mh mh-delete-msg-hook nil
2959 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion. 2979 "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
2960 2980
2961For example, a past maintainer of MH-E used this once when he 2981For example, a past maintainer of MH-E used this once when he
@@ -2963,9 +2983,9 @@ kept statistics on his mail usage."
2963 :type 'hook 2983 :type 'hook
2964 :group 'mh-hooks 2984 :group 'mh-hooks
2965 :group 'mh-show 2985 :group 'mh-show
2966 :package-version '(MH-E "6.0")) 2986 :package-version '(MH-E . "6.0"))
2967 2987
2968(mh-defcustom mh-find-path-hook nil 2988(defcustom-mh mh-find-path-hook nil
2969 "Hook run by `mh-find-path' after reading the user's MH profile. 2989 "Hook run by `mh-find-path' after reading the user's MH profile.
2970 2990
2971This hook can be used the change the value of the variables that 2991This hook can be used the change the value of the variables that
@@ -2974,30 +2994,30 @@ between MH and MH-E."
2974 :type 'hook 2994 :type 'hook
2975 :group 'mh-hooks 2995 :group 'mh-hooks
2976 :group 'mh-e 2996 :group 'mh-e
2977 :package-version '(MH-E "7.0")) 2997 :package-version '(MH-E . "7.0"))
2978 2998
2979(mh-defcustom mh-folder-mode-hook nil 2999(defcustom-mh mh-folder-mode-hook nil
2980 "Hook run by `mh-folder-mode' when visiting a new folder." 3000 "Hook run by `mh-folder-mode' when visiting a new folder."
2981 :type 'hook 3001 :type 'hook
2982 :group 'mh-hooks 3002 :group 'mh-hooks
2983 :group 'mh-folder 3003 :group 'mh-folder
2984 :package-version '(MH-E "6.0")) 3004 :package-version '(MH-E . "6.0"))
2985 3005
2986(mh-defcustom mh-forward-hook nil 3006(defcustom-mh mh-forward-hook nil
2987 "Hook run by `mh-forward' on a forwarded letter." 3007 "Hook run by `mh-forward' on a forwarded letter."
2988 :type 'hook 3008 :type 'hook
2989 :group 'mh-hooks 3009 :group 'mh-hooks
2990 :group 'mh-sending-mail 3010 :group 'mh-sending-mail
2991 :package-version '(MH-E "8.0")) 3011 :package-version '(MH-E . "8.0"))
2992 3012
2993(mh-defcustom mh-inc-folder-hook nil 3013(defcustom-mh mh-inc-folder-hook nil
2994 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder." 3014 "Hook run by \\<mh-folder-mode-map>\\[mh-inc-folder] after incorporating mail into a folder."
2995 :type 'hook 3015 :type 'hook
2996 :group 'mh-hooks 3016 :group 'mh-hooks
2997 :group 'mh-inc 3017 :group 'mh-inc
2998 :package-version '(MH-E "6.0")) 3018 :package-version '(MH-E . "6.0"))
2999 3019
3000(mh-defcustom mh-insert-signature-hook nil 3020(defcustom-mh mh-insert-signature-hook nil
3001 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted. 3021 "Hook run by \\<mh-letter-mode-map>\\[mh-insert-signature] after signature has been inserted.
3002 3022
3003Hook functions may access the actual name of the file or the 3023Hook functions may access the actual name of the file or the
@@ -3006,9 +3026,9 @@ function used to insert the signature with
3006 :type 'hook 3026 :type 'hook
3007 :group 'mh-hooks 3027 :group 'mh-hooks
3008 :group 'mh-letter 3028 :group 'mh-letter
3009 :package-version '(MH-E "8.0")) 3029 :package-version '(MH-E . "8.0"))
3010 3030
3011(mh-defcustom mh-kill-folder-suppress-prompt-hooks '(mh-search-p) 3031(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p)
3012 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder]. 3032 "Abnormal hook run at the beginning of \\<mh-folder-mode-map>\\[mh-kill-folder].
3013 3033
3014The hook functions are called with no arguments and should return 3034The hook functions are called with no arguments and should return
@@ -3024,9 +3044,9 @@ accident in the \"+inbox\" folder, you will not be happy."
3024 :type 'hook 3044 :type 'hook
3025 :group 'mh-hooks 3045 :group 'mh-hooks
3026 :group 'mh-folder 3046 :group 'mh-folder
3027 :package-version '(MH-E "7.4")) 3047 :package-version '(MH-E . "7.4"))
3028 3048
3029(mh-defcustom mh-letter-mode-hook nil 3049(defcustom-mh mh-letter-mode-hook nil
3030 "Hook run by `mh-letter-mode' on a new letter. 3050 "Hook run by `mh-letter-mode' on a new letter.
3031 3051
3032This hook allows you to do some processing before editing a 3052This hook allows you to do some processing before editing a
@@ -3037,16 +3057,16 @@ go."
3037 :type 'hook 3057 :type 'hook
3038 :group 'mh-hooks 3058 :group 'mh-hooks
3039 :group 'mh-sending-mail 3059 :group 'mh-sending-mail
3040 :package-version '(MH-E "6.0")) 3060 :package-version '(MH-E . "6.0"))
3041 3061
3042(mh-defcustom mh-mh-to-mime-hook nil 3062(defcustom-mh mh-mh-to-mime-hook nil
3043 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]." 3063 "Hook run on the formatted letter by \\<mh-letter-mode-map>\\[mh-mh-to-mime]."
3044 :type 'hook 3064 :type 'hook
3045 :group 'mh-hooks 3065 :group 'mh-hooks
3046 :group 'mh-letter 3066 :group 'mh-letter
3047 :package-version '(MH-E "8.0")) 3067 :package-version '(MH-E . "8.0"))
3048 3068
3049(mh-defcustom mh-search-mode-hook nil 3069(defcustom-mh mh-search-mode-hook nil
3050 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>. 3070 "Hook run upon entry to `mh-search-mode'\\<mh-folder-mode-map>.
3051 3071
3052If you find that you do the same thing over and over when editing 3072If you find that you do the same thing over and over when editing
@@ -3056,9 +3076,9 @@ This can be done with this hook which is called when
3056 :type 'hook 3076 :type 'hook
3057 :group 'mh-hooks 3077 :group 'mh-hooks
3058 :group 'mh-search 3078 :group 'mh-search
3059 :package-version '(MH-E "8.0")) 3079 :package-version '(MH-E . "8.0"))
3060 3080
3061(mh-defcustom mh-quit-hook nil 3081(defcustom-mh mh-quit-hook nil
3062 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E. 3082 "Hook run by \\<mh-folder-mode-map>\\[mh-quit] after quitting MH-E.
3063 3083
3064This hook is not run in an MH-E context, so you might use it to 3084This hook is not run in an MH-E context, so you might use it to
@@ -3068,16 +3088,16 @@ See also `mh-before-quit-hook'."
3068 :type 'hook 3088 :type 'hook
3069 :group 'mh-hooks 3089 :group 'mh-hooks
3070 :group 'mh-folder 3090 :group 'mh-folder
3071 :package-version '(MH-E "6.0")) 3091 :package-version '(MH-E . "6.0"))
3072 3092
3073(mh-defcustom mh-refile-msg-hook nil 3093(defcustom-mh mh-refile-msg-hook nil
3074 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling." 3094 "Hook run by \\<mh-folder-mode-map>\\[mh-refile-msg] after marking each message for refiling."
3075 :type 'hook 3095 :type 'hook
3076 :group 'mh-hooks 3096 :group 'mh-hooks
3077 :group 'mh-folder 3097 :group 'mh-folder
3078 :package-version '(MH-E "6.0")) 3098 :package-version '(MH-E . "6.0"))
3079 3099
3080(mh-defcustom mh-show-hook nil 3100(defcustom-mh mh-show-hook nil
3081 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message. 3101 "Hook run after \\<mh-folder-mode-map>\\[mh-show] shows a message.
3082 3102
3083It is the last thing called after messages are displayed. It's 3103It is the last thing called after messages are displayed. It's
@@ -3086,9 +3106,9 @@ used to affect the behavior of MH-E in general or when
3086 :type 'hook 3106 :type 'hook
3087 :group 'mh-hooks 3107 :group 'mh-hooks
3088 :group 'mh-show 3108 :group 'mh-show
3089 :package-version '(MH-E "6.0")) 3109 :package-version '(MH-E . "6.0"))
3090 3110
3091(mh-defcustom mh-show-mode-hook nil 3111(defcustom-mh mh-show-mode-hook nil
3092 "Hook run upon entry to `mh-show-mode'. 3112 "Hook run upon entry to `mh-show-mode'.
3093 3113
3094This hook is called early on in the process of the message 3114This hook is called early on in the process of the message
@@ -3097,9 +3117,9 @@ message's content. See `mh-show-hook'."
3097 :type 'hook 3117 :type 'hook
3098 :group 'mh-hooks 3118 :group 'mh-hooks
3099 :group 'mh-show 3119 :group 'mh-show
3100 :package-version '(MH-E "6.0")) 3120 :package-version '(MH-E . "6.0"))
3101 3121
3102(mh-defcustom mh-unseen-updated-hook nil 3122(defcustom-mh mh-unseen-updated-hook nil
3103 "Hook run after the unseen sequence has been updated. 3123 "Hook run after the unseen sequence has been updated.
3104 3124
3105The variable `mh-seen-list' can be used by this hook to obtain 3125The variable `mh-seen-list' can be used by this hook to obtain
@@ -3108,7 +3128,7 @@ sequence."
3108 :type 'hook 3128 :type 'hook
3109 :group 'mh-hooks 3129 :group 'mh-hooks
3110 :group 'mh-sequences 3130 :group 'mh-sequences
3111 :package-version '(MH-E "6.0")) 3131 :package-version '(MH-E . "6.0"))
3112 3132
3113 3133
3114 3134
@@ -3119,7 +3139,7 @@ sequence."
3119 3139
3120;; To add a new face: 3140;; To add a new face:
3121;; 1. Add entry to variable mh-face-data. 3141;; 1. Add entry to variable mh-face-data.
3122;; 2. Create face using mh-defface (which removes min-color spec and 3142;; 2. Create face using defface-mh (which removes min-color spec and
3123;; :package-version keyword where these are not supported), 3143;; :package-version keyword where these are not supported),
3124;; accessing face data with function mh-face-data. 3144;; accessing face data with function mh-face-data.
3125;; 3. Add inherit argument to function mh-face-data if applicable. 3145;; 3. Add inherit argument to function mh-face-data if applicable.
@@ -3268,7 +3288,7 @@ sequence."
3268 (:underline t))))) 3288 (:underline t)))))
3269 "MH-E face data. 3289 "MH-E face data.
3270Used by function `mh-face-data' which returns spec that is 3290Used by function `mh-face-data' which returns spec that is
3271consumed by `mh-defface'.") 3291consumed by `defface-mh'.")
3272 3292
3273(require 'cus-face) 3293(require 'cus-face)
3274 3294
@@ -3321,14 +3341,14 @@ specified colors."
3321 (setq new-spec (cons entry new-spec))))) 3341 (setq new-spec (cons entry new-spec)))))
3322 new-spec)))) 3342 new-spec))))
3323 3343
3324(mh-defface mh-folder-address 3344(defface-mh mh-folder-address
3325 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3345 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3326 "Recipient face." 3346 "Recipient face."
3327 :group 'mh-faces 3347 :group 'mh-faces
3328 :group 'mh-folder 3348 :group 'mh-folder
3329 :package-version '(MH-E "8.0")) 3349 :package-version '(MH-E . "8.0"))
3330 3350
3331(mh-defface mh-folder-body 3351(defface-mh mh-folder-body
3332 (mh-face-data 'mh-folder-msg-number 3352 (mh-face-data 'mh-folder-msg-number
3333 '((((class color)) 3353 '((((class color))
3334 (:inherit mh-folder-msg-number)) 3354 (:inherit mh-folder-msg-number))
@@ -3337,49 +3357,49 @@ specified colors."
3337 "Body text face." 3357 "Body text face."
3338 :group 'mh-faces 3358 :group 'mh-faces
3339 :group 'mh-folder 3359 :group 'mh-folder
3340 :package-version '(MH-E "8.0")) 3360 :package-version '(MH-E . "8.0"))
3341 3361
3342(mh-defface mh-folder-cur-msg-number 3362(defface-mh mh-folder-cur-msg-number
3343 (mh-face-data 'mh-folder-msg-number 3363 (mh-face-data 'mh-folder-msg-number
3344 '((t (:inherit mh-folder-msg-number :bold t)))) 3364 '((t (:inherit mh-folder-msg-number :bold t))))
3345 "Current message number face." 3365 "Current message number face."
3346 :group 'mh-faces 3366 :group 'mh-faces
3347 :group 'mh-folder 3367 :group 'mh-folder
3348 :package-version '(MH-E "8.0")) 3368 :package-version '(MH-E . "8.0"))
3349 3369
3350(mh-defface mh-folder-date 3370(defface-mh mh-folder-date
3351 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) 3371 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3352 "Date face." 3372 "Date face."
3353 :group 'mh-faces 3373 :group 'mh-faces
3354 :group 'mh-folder 3374 :group 'mh-folder
3355 :package-version '(MH-E "8.0")) 3375 :package-version '(MH-E . "8.0"))
3356 3376
3357(mh-defface mh-folder-deleted 3377(defface-mh mh-folder-deleted
3358 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number)))) 3378 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
3359 "Deleted message face." 3379 "Deleted message face."
3360 :group 'mh-faces 3380 :group 'mh-faces
3361 :group 'mh-folder 3381 :group 'mh-folder
3362 :package-version '(MH-E "8.0")) 3382 :package-version '(MH-E . "8.0"))
3363 3383
3364(mh-defface mh-folder-followup (mh-face-data 'mh-folder-followup) 3384(defface-mh mh-folder-followup (mh-face-data 'mh-folder-followup)
3365 "\"Re:\" face." 3385 "\"Re:\" face."
3366 :group 'mh-faces 3386 :group 'mh-faces
3367 :group 'mh-folder 3387 :group 'mh-folder
3368 :package-version '(MH-E "8.0")) 3388 :package-version '(MH-E . "8.0"))
3369 3389
3370(mh-defface mh-folder-msg-number (mh-face-data 'mh-folder-msg-number) 3390(defface-mh mh-folder-msg-number (mh-face-data 'mh-folder-msg-number)
3371 "Message number face." 3391 "Message number face."
3372 :group 'mh-faces 3392 :group 'mh-faces
3373 :group 'mh-folder 3393 :group 'mh-folder
3374 :package-version '(MH-E "8.0")) 3394 :package-version '(MH-E . "8.0"))
3375 3395
3376(mh-defface mh-folder-refiled (mh-face-data 'mh-folder-refiled) 3396(defface-mh mh-folder-refiled (mh-face-data 'mh-folder-refiled)
3377 "Refiled message face." 3397 "Refiled message face."
3378 :group 'mh-faces 3398 :group 'mh-faces
3379 :group 'mh-folder 3399 :group 'mh-folder
3380 :package-version '(MH-E "8.0")) 3400 :package-version '(MH-E . "8.0"))
3381 3401
3382(mh-defface mh-folder-sent-to-me-hint 3402(defface-mh mh-folder-sent-to-me-hint
3383 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date)))) 3403 (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-date))))
3384 "Fontification hint face in messages sent directly to us. 3404 "Fontification hint face in messages sent directly to us.
3385The detection of messages sent to us is governed by the scan 3405The detection of messages sent to us is governed by the scan
@@ -3387,9 +3407,9 @@ format `mh-scan-format-nmh' and the regular expression
3387`mh-scan-sent-to-me-sender-regexp'." 3407`mh-scan-sent-to-me-sender-regexp'."
3388 :group 'mh-faces 3408 :group 'mh-faces
3389 :group 'mh-folder 3409 :group 'mh-folder
3390 :package-version '(MH-E "8.0")) 3410 :package-version '(MH-E . "8.0"))
3391 3411
3392(mh-defface mh-folder-sent-to-me-sender 3412(defface-mh mh-folder-sent-to-me-sender
3393 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup)))) 3413 (mh-face-data 'mh-folder-followup '((t (:inherit mh-folder-followup))))
3394 "Sender face in messages sent directly to us. 3414 "Sender face in messages sent directly to us.
3395The detection of messages sent to us is governed by the scan 3415The detection of messages sent to us is governed by the scan
@@ -3397,145 +3417,135 @@ format `mh-scan-format-nmh' and the regular expression
3397`mh-scan-sent-to-me-sender-regexp'." 3417`mh-scan-sent-to-me-sender-regexp'."
3398 :group 'mh-faces 3418 :group 'mh-faces
3399 :group 'mh-folder 3419 :group 'mh-folder
3400 :package-version '(MH-E "8.0")) 3420 :package-version '(MH-E . "8.0"))
3401 3421
3402(mh-defface mh-folder-subject (mh-face-data 'mh-folder-subject) 3422(defface-mh mh-folder-subject (mh-face-data 'mh-folder-subject)
3403 "Subject face." 3423 "Subject face."
3404 :group 'mh-faces 3424 :group 'mh-faces
3405 :group 'mh-folder 3425 :group 'mh-folder
3406 :package-version '(MH-E "8.0")) 3426 :package-version '(MH-E . "8.0"))
3407 3427
3408(mh-defface mh-folder-tick (mh-face-data 'mh-folder-tick) 3428(defface-mh mh-folder-tick (mh-face-data 'mh-folder-tick)
3409 "Ticked message face." 3429 "Ticked message face."
3410 :group 'mh-faces 3430 :group 'mh-faces
3411 :group 'mh-folder 3431 :group 'mh-folder
3412 :package-version '(MH-E "8.0")) 3432 :package-version '(MH-E . "8.0"))
3413 3433
3414(mh-defface mh-folder-to (mh-face-data 'mh-folder-to) 3434(defface-mh mh-folder-to (mh-face-data 'mh-folder-to)
3415 "\"To:\" face." 3435 "\"To:\" face."
3416 :group 'mh-faces 3436 :group 'mh-faces
3417 :group 'mh-folder 3437 :group 'mh-folder
3418 :package-version '(MH-E "8.0")) 3438 :package-version '(MH-E . "8.0"))
3419 3439
3420(mh-defface mh-letter-header-field (mh-face-data 'mh-letter-header-field) 3440(defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field)
3421 "Editable header field value face in draft buffers." 3441 "Editable header field value face in draft buffers."
3422 :group 'mh-faces 3442 :group 'mh-faces
3423 :group 'mh-letter 3443 :group 'mh-letter
3424 :package-version '(MH-E "8.0")) 3444 :package-version '(MH-E . "8.0"))
3425 3445
3426(mh-defface mh-search-folder (mh-face-data 'mh-search-folder) 3446(defface-mh mh-search-folder (mh-face-data 'mh-search-folder)
3427 "Folder heading face in MH-Folder buffers created by searches." 3447 "Folder heading face in MH-Folder buffers created by searches."
3428 :group 'mh-faces 3448 :group 'mh-faces
3429 :group 'mh-search 3449 :group 'mh-search
3430 :package-version '(MH-E "8.0")) 3450 :package-version '(MH-E . "8.0"))
3431 3451
3432(mh-defface mh-show-cc (mh-face-data 'mh-show-cc) 3452(defface-mh mh-show-cc (mh-face-data 'mh-show-cc)
3433 "Face used to highlight \"cc:\" header fields." 3453 "Face used to highlight \"cc:\" header fields."
3434 :group 'mh-faces 3454 :group 'mh-faces
3435 :group 'mh-show 3455 :group 'mh-show
3436 :package-version '(MH-E "8.0")) 3456 :package-version '(MH-E . "8.0"))
3437 3457
3438(mh-defface mh-show-date (mh-face-data 'mh-show-date) 3458(defface-mh mh-show-date (mh-face-data 'mh-show-date)
3439 "Face used to highlight \"Date:\" header fields." 3459 "Face used to highlight \"Date:\" header fields."
3440 :group 'mh-faces 3460 :group 'mh-faces
3441 :group 'mh-show 3461 :group 'mh-show
3442 :package-version '(MH-E "8.0")) 3462 :package-version '(MH-E . "8.0"))
3443 3463
3444(mh-defface mh-show-from (mh-face-data 'mh-show-from) 3464(defface-mh mh-show-from (mh-face-data 'mh-show-from)
3445 "Face used to highlight \"From:\" header fields." 3465 "Face used to highlight \"From:\" header fields."
3446 :group 'mh-faces 3466 :group 'mh-faces
3447 :group 'mh-show 3467 :group 'mh-show
3448 :package-version '(MH-E "8.0")) 3468 :package-version '(MH-E . "8.0"))
3449 3469
3450(mh-defface mh-show-header (mh-face-data 'mh-show-header) 3470(defface-mh mh-show-header (mh-face-data 'mh-show-header)
3451 "Face used to deemphasize less interesting header fields." 3471 "Face used to deemphasize less interesting header fields."
3452 :group 'mh-faces 3472 :group 'mh-faces
3453 :group 'mh-show 3473 :group 'mh-show
3454 :package-version '(MH-E "8.0")) 3474 :package-version '(MH-E . "8.0"))
3455 3475
3456(mh-defface mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad) 3476(defface-mh mh-show-pgg-bad (mh-face-data 'mh-show-pgg-bad)
3457 "Bad PGG signature face." 3477 "Bad PGG signature face."
3458 :group 'mh-faces 3478 :group 'mh-faces
3459 :group 'mh-show 3479 :group 'mh-show
3460 :package-version '(MH-E "8.0")) 3480 :package-version '(MH-E . "8.0"))
3461 3481
3462(mh-defface mh-show-pgg-good (mh-face-data 'mh-show-pgg-good) 3482(defface-mh mh-show-pgg-good (mh-face-data 'mh-show-pgg-good)
3463 "Good PGG signature face." 3483 "Good PGG signature face."
3464 :group 'mh-faces 3484 :group 'mh-faces
3465 :group 'mh-show 3485 :group 'mh-show
3466 :package-version '(MH-E "8.0")) 3486 :package-version '(MH-E . "8.0"))
3467 3487
3468(mh-defface mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown) 3488(defface-mh mh-show-pgg-unknown (mh-face-data 'mh-show-pgg-unknown)
3469 "Unknown or untrusted PGG signature face." 3489 "Unknown or untrusted PGG signature face."
3470 :group 'mh-faces 3490 :group 'mh-faces
3471 :group 'mh-show 3491 :group 'mh-show
3472 :package-version '(MH-E "8.0")) 3492 :package-version '(MH-E . "8.0"))
3473 3493
3474(mh-defface mh-show-signature (mh-face-data 'mh-show-signature) 3494(defface-mh mh-show-signature (mh-face-data 'mh-show-signature)
3475 "Signature face." 3495 "Signature face."
3476 :group 'mh-faces 3496 :group 'mh-faces
3477 :group 'mh-show 3497 :group 'mh-show
3478 :package-version '(MH-E "8.0")) 3498 :package-version '(MH-E . "8.0"))
3479 3499
3480(mh-defface mh-show-subject 3500(defface-mh mh-show-subject
3481 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3501 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
3482 "Face used to highlight \"Subject:\" header fields." 3502 "Face used to highlight \"Subject:\" header fields."
3483 :group 'mh-faces 3503 :group 'mh-faces
3484 :group 'mh-show 3504 :group 'mh-show
3485 :package-version '(MH-E "8.0")) 3505 :package-version '(MH-E . "8.0"))
3486 3506
3487(mh-defface mh-show-to (mh-face-data 'mh-show-to) 3507(defface-mh mh-show-to (mh-face-data 'mh-show-to)
3488 "Face used to highlight \"To:\" header fields." 3508 "Face used to highlight \"To:\" header fields."
3489 :group 'mh-faces 3509 :group 'mh-faces
3490 :group 'mh-show 3510 :group 'mh-show
3491 :package-version '(MH-E "8.0")) 3511 :package-version '(MH-E . "8.0"))
3492 3512
3493(mh-defface mh-show-xface 3513(defface-mh mh-show-xface
3494 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight))))) 3514 (mh-face-data 'mh-show-from '((t (:inherit (mh-show-from highlight)))))
3495"X-Face image face. 3515"X-Face image face.
3496The background and foreground are used in the image." 3516The background and foreground are used in the image."
3497 :group 'mh-faces 3517 :group 'mh-faces
3498 :group 'mh-show 3518 :group 'mh-show
3499 :package-version '(MH-E "8.0")) 3519 :package-version '(MH-E . "8.0"))
3500 3520
3501(mh-defface mh-speedbar-folder (mh-face-data 'mh-speedbar-folder) 3521(defface-mh mh-speedbar-folder (mh-face-data 'mh-speedbar-folder)
3502 "Basic folder face." 3522 "Basic folder face."
3503 :group 'mh-faces 3523 :group 'mh-faces
3504 :group 'mh-speedbar 3524 :group 'mh-speedbar
3505 :package-version '(MH-E "8.0")) 3525 :package-version '(MH-E . "8.0"))
3506 3526
3507(mh-defface mh-speedbar-folder-with-unseen-messages 3527(defface-mh mh-speedbar-folder-with-unseen-messages
3508 (mh-face-data 'mh-speedbar-folder 3528 (mh-face-data 'mh-speedbar-folder
3509 '((t (:inherit mh-speedbar-folder :bold t)))) 3529 '((t (:inherit mh-speedbar-folder :bold t))))
3510 "Folder face when folder contains unread messages." 3530 "Folder face when folder contains unread messages."
3511 :group 'mh-faces 3531 :group 'mh-faces
3512 :group 'mh-speedbar 3532 :group 'mh-speedbar
3513 :package-version '(MH-E "8.0")) 3533 :package-version '(MH-E . "8.0"))
3514 3534
3515(mh-defface mh-speedbar-selected-folder 3535(defface-mh mh-speedbar-selected-folder
3516 (mh-face-data 'mh-speedbar-selected-folder) 3536 (mh-face-data 'mh-speedbar-selected-folder)
3517 "Selected folder face." 3537 "Selected folder face."
3518 :group 'mh-faces 3538 :group 'mh-faces
3519 :group 'mh-speedbar 3539 :group 'mh-speedbar
3520 :package-version '(MH-E "8.0")) 3540 :package-version '(MH-E . "8.0"))
3521 3541
3522(mh-defface mh-speedbar-selected-folder-with-unseen-messages 3542(defface-mh mh-speedbar-selected-folder-with-unseen-messages
3523 (mh-face-data 'mh-speedbar-selected-folder 3543 (mh-face-data 'mh-speedbar-selected-folder
3524 '((t (:inherit mh-speedbar-selected-folder :bold t)))) 3544 '((t (:inherit mh-speedbar-selected-folder :bold t))))
3525 "Selected folder face when folder contains unread messages." 3545 "Selected folder face when folder contains unread messages."
3526 :group 'mh-faces 3546 :group 'mh-faces
3527 :group 'mh-speedbar 3547 :group 'mh-speedbar
3528 :package-version '(MH-E "8.0")) 3548 :package-version '(MH-E . "8.0"))
3529
3530;; Get rid of temporary functions and data structures.
3531(fmakunbound 'mh-defcustom)
3532(fmakunbound 'mh-defface)
3533(fmakunbound 'mh-defgroup)
3534(fmakunbound 'mh-face-data)
3535(fmakunbound 'mh-strip-package-version)
3536(makunbound 'mh-face-data)
3537(makunbound 'mh-inherit-face-flag)
3538(makunbound 'mh-min-colors-defined-flag)
3539 3549
3540(provide 'mh-e) 3550(provide 'mh-e)
3541 3551
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 8fb65051a86..8516856f14e 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -522,11 +522,10 @@ font-lock is done highlighting.")
522 (add-to-list 'which-func-modes 'mh-folder-mode)) 522 (add-to-list 'which-func-modes 'mh-folder-mode))
523 523
524;; Shush compiler. 524;; Shush compiler.
525(eval-when-compile 525(defvar desktop-save-buffer)
526 (defvar desktop-save-buffer) 526(defvar font-lock-auto-fontify)
527 (defvar font-lock-auto-fontify) 527(defvar image-load-path)
528 (defvar image-load-path) 528(defvar font-lock-defaults) ; XEmacs
529 (mh-do-in-xemacs (defvar font-lock-defaults)))
530 529
531(defvar mh-folder-buttons-init-flag nil) 530(defvar mh-folder-buttons-init-flag nil)
532 531
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index 84b04d51c35..e97533e5724 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -138,7 +138,7 @@ Display the results only if something went wrong."
138 (display-buffer mh-temp-buffer))) 138 (display-buffer mh-temp-buffer)))
139 139
140;; Shush compiler. 140;; Shush compiler.
141(eval-when-compile (defvar view-exit-action)) 141(defvar view-exit-action)
142 142
143;;;###mh-autoload 143;;;###mh-autoload
144(defun mh-list-folders () 144(defun mh-list-folders ()
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index 970f98556e2..1e3b385eda7 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -39,19 +39,19 @@
39(mh-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(defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
43 "Return a list suitable for a text property list specifying keymap MAP." 43 "Return a list suitable for a text property list specifying keymap MAP."
44 (cond (mh-xemacs-flag (list 'keymap map)) 44 (cond (mh-xemacs-flag (list 'keymap map))
45 ((>= emacs-major-version 21) (list 'keymap map)) 45 ((>= emacs-major-version 21) (list 'keymap map))
46 (t (list 'local-map map)))) 46 (t (list 'local-map map))))
47 47
48;; Copy of function from mm-decode.el. 48;; Copy of function from mm-decode.el.
49(mh-defun-compat mh-mm-merge-handles mm-merge-handles (handles1 handles2) 49(defun-mh mh-mm-merge-handles mm-merge-handles (handles1 handles2)
50 (append (if (listp (car handles1)) handles1 (list handles1)) 50 (append (if (listp (car handles1)) handles1 (list handles1))
51 (if (listp (car handles2)) handles2 (list handles2)))) 51 (if (listp (car handles2)) handles2 (list handles2))))
52 52
53;; Copy of function from mm-decode.el. 53;; Copy of function from mm-decode.el.
54(mh-defun-compat mh-mm-set-handle-multipart-parameter 54(defun-mh mh-mm-set-handle-multipart-parameter
55 mm-set-handle-multipart-parameter (handle parameter value) 55 mm-set-handle-multipart-parameter (handle parameter value)
56 ;; HANDLE could be a CTL. 56 ;; HANDLE could be a CTL.
57 (if handle 57 (if handle
@@ -59,7 +59,7 @@
59 (car handle)))) 59 (car handle))))
60 60
61;; Copy of function from mm-view.el. 61;; Copy of function from mm-view.el.
62(mh-defun-compat mh-mm-inline-text-vcard mm-inline-text-vcard (handle) 62(defun-mh mh-mm-inline-text-vcard mm-inline-text-vcard (handle)
63 (let (buffer-read-only) 63 (let (buffer-read-only)
64 (mm-insert-inline 64 (mm-insert-inline
65 handle 65 handle
@@ -73,17 +73,17 @@
73 73
74;; Function from mm-decode.el used in PGP messages. Just define it with older 74;; Function from mm-decode.el used in PGP messages. Just define it with older
75;; Gnus to avoid compiler warning. 75;; Gnus to avoid compiler warning.
76(mh-defun-compat mh-mm-possibly-verify-or-decrypt 76(defun-mh mh-mm-possibly-verify-or-decrypt
77 mm-possibly-verify-or-decrypt (parts ctl) 77 mm-possibly-verify-or-decrypt (parts ctl)
78 nil) 78 nil)
79 79
80;; Copy of macro in mm-decode.el. 80;; Copy of macro in mm-decode.el.
81(mh-defmacro-compat mh-mm-handle-multipart-ctl-parameter 81(defmacro-mh mh-mm-handle-multipart-ctl-parameter
82 mm-handle-multipart-ctl-parameter (handle parameter) 82 mm-handle-multipart-ctl-parameter (handle parameter)
83 `(get-text-property 0 ,parameter (car ,handle))) 83 `(get-text-property 0 ,parameter (car ,handle)))
84 84
85;; Copy of function in mm-decode.el. 85;; Copy of function in mm-decode.el.
86(mh-defun-compat mh-mm-readable-p mm-readable-p (handle) 86(defun-mh mh-mm-readable-p mm-readable-p (handle)
87 "Say whether the content of HANDLE is readable." 87 "Say whether the content of HANDLE is readable."
88 (and (< (with-current-buffer (mm-handle-buffer handle) 88 (and (< (with-current-buffer (mm-handle-buffer handle)
89 (buffer-size)) 10000) 89 (buffer-size)) 10000)
@@ -93,7 +93,7 @@
93 (not (mh-mm-long-lines-p 76)))))) 93 (not (mh-mm-long-lines-p 76))))))
94 94
95;; Copy of function in mm-bodies.el. 95;; Copy of function in mm-bodies.el.
96(mh-defun-compat mh-mm-long-lines-p mm-long-lines-p (length) 96(defun-mh mh-mm-long-lines-p mm-long-lines-p (length)
97 "Say whether any of the lines in the buffer is longer than LENGTH." 97 "Say whether any of the lines in the buffer is longer than LENGTH."
98 (save-excursion 98 (save-excursion
99 (goto-char (point-min)) 99 (goto-char (point-min))
@@ -105,21 +105,21 @@
105 (and (> (current-column) length) 105 (and (> (current-column) length)
106 (current-column)))) 106 (current-column))))
107 107
108(mh-defun-compat mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle) 108(defun-mh mh-mm-keep-viewer-alive-p mm-keep-viewer-alive-p (handle)
109 ;; Released Gnus doesn't keep handles associated with externally displayed 109 ;; Released Gnus doesn't keep handles associated with externally displayed
110 ;; MIME parts. So this will always return nil. 110 ;; MIME parts. So this will always return nil.
111 nil) 111 nil)
112 112
113(mh-defun-compat mh-mm-destroy-parts mm-destroy-parts (list) 113(defun-mh mh-mm-destroy-parts mm-destroy-parts (list)
114 "Older versions of Emacs don't have this function." 114 "Older versions of Emacs don't have this function."
115 nil) 115 nil)
116 116
117(mh-defun-compat mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles) 117(defun-mh mh-mm-uu-dissect-text-parts mm-uu-dissect-text-parts (handles)
118 "Emacs 21 and XEmacs don't have this function." 118 "Emacs 21 and XEmacs don't have this function."
119 nil) 119 nil)
120 120
121;; Copy of function in mml.el. 121;; Copy of function in mml.el.
122(mh-defun-compat mh-mml-minibuffer-read-disposition 122(defun-mh mh-mml-minibuffer-read-disposition
123 mml-minibuffer-read-disposition (type &optional default) 123 mml-minibuffer-read-disposition (type &optional default)
124 (unless default (setq default 124 (unless default (setq default
125 (if (and (string-match "\\`text/" type) 125 (if (and (string-match "\\`text/" type)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 024c1875eac..2da824c34c2 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -278,9 +278,8 @@ searching for `mh-mail-header-separator' in the buffer."
278(defvar mh-letter-buttons-init-flag nil) 278(defvar mh-letter-buttons-init-flag nil)
279 279
280;; Shush compiler. 280;; Shush compiler.
281(eval-when-compile 281(defvar image-load-path)
282 (defvar image-load-path) 282(defvar font-lock-defaults) ; XEmacs
283 (mh-do-in-xemacs (defvar font-lock-defaults)))
284 283
285;; Ensure new buffers won't get this mode if default-major-mode is nil. 284;; Ensure new buffers won't get this mode if default-major-mode is nil.
286(put 'mh-letter-mode 'mode-class 'special) 285(put 'mh-letter-mode 'mode-class 'special)
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index d35e759bcd4..c05e867a2b4 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -825,7 +825,9 @@ being used to highlight the signature in a MIME part."
825;;; Button Display 825;;; Button Display
826 826
827;; Shush compiler. 827;; Shush compiler.
828(eval-when-compile (mh-do-in-xemacs (defvar dots) (defvar type) (defvar ov))) 828(defvar dots) ; XEmacs
829(defvar type) ; XEmacs
830(defvar ov) ; XEmacs
829 831
830(defun mh-insert-mime-button (handle index displayed) 832(defun mh-insert-mime-button (handle index displayed)
831 "Insert MIME button for HANDLE. 833 "Insert MIME button for HANDLE.
@@ -870,12 +872,9 @@ by commands like \"K v\" which operate on individual MIME parts."
870 (mh-funcall-if-exists overlay-put ov 'evaporate t)))) 872 (mh-funcall-if-exists overlay-put ov 'evaporate t))))
871 873
872;; Shush compiler. 874;; Shush compiler.
873(eval-when-compile 875(defvar mm-verify-function-alist) ; < Emacs 22
874 (when (< emacs-major-version 22) 876(defvar mm-decrypt-function-alist) ; < Emacs 22
875 (defvar mm-verify-function-alist) 877(defvar pressed-details) ; XEmacs
876 (defvar mm-decrypt-function-alist))
877 (mh-do-in-xemacs
878 (defvar pressed-details)))
879 878
880(defun mh-insert-mime-security-button (handle) 879(defun mh-insert-mime-security-button (handle)
881 "Display buttons for PGP message, HANDLE." 880 "Display buttons for PGP message, HANDLE."
@@ -1537,7 +1536,7 @@ a prefix argument NOCONFIRM."
1537 (after-find-file nil))) 1536 (after-find-file nil)))
1538 1537
1539;; Shush compiler. 1538;; Shush compiler.
1540(eval-when-compile (defvar mh-identity-pgg-default-user-id)) 1539(defvar mh-identity-pgg-default-user-id)
1541 1540
1542;;;###mh-autoload 1541;;;###mh-autoload
1543(defun mh-mml-secure-message-encrypt (method) 1542(defun mh-mml-secure-message-encrypt (method)
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 17b63c91000..14891204fad 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -324,7 +324,7 @@ folder containing the index search results."
324 count (> (hash-table-count msg-hash) 0))))))) 324 count (> (hash-table-count msg-hash) 0)))))))
325 325
326;; Shush compiler. 326;; Shush compiler.
327(eval-when-compile (mh-do-in-xemacs (defvar pick-folder))) 327(defvar pick-folder) ; XEmacs
328 328
329(defun mh-search-folder (folder window-config) 329(defun mh-search-folder (folder window-config)
330 "Search FOLDER for messages matching a pattern. 330 "Search FOLDER for messages matching a pattern.
@@ -404,10 +404,8 @@ or nothing to search all folders."
404 (mh-index-sequenced-messages folders mh-tick-seq)) 404 (mh-index-sequenced-messages folders mh-tick-seq))
405 405
406;; Shush compiler. 406;; Shush compiler.
407(eval-when-compile 407(defvar mh-mairix-folder) ; XEmacs
408 (mh-do-in-xemacs 408(defvar mh-flists-search-folders) ; XEmacs
409 (defvar mh-mairix-folder)
410 (defvar mh-flists-search-folders)))
411 409
412;;;###mh-autoload 410;;;###mh-autoload
413(defun mh-index-sequenced-messages (folders sequence) 411(defun mh-index-sequenced-messages (folders sequence)
@@ -1414,9 +1412,7 @@ being the list of messages originally from that folder."
1414(mh-require 'which-func nil t) 1412(mh-require 'which-func nil t)
1415 1413
1416;; Shush compiler. 1414;; Shush compiler.
1417(eval-when-compile 1415(defvar which-func-mode) ; < Emacs 22, XEmacs
1418 (if (or mh-xemacs-flag (< emacs-major-version 22))
1419 (defvar which-func-mode)))
1420 1416
1421;;;###mh-autoload 1417;;;###mh-autoload
1422(defun mh-index-create-imenu-index () 1418(defun mh-index-create-imenu-index ()
@@ -1441,7 +1437,7 @@ being the list of messages originally from that folder."
1441 mh-index-data) 1437 mh-index-data)
1442 1438
1443;; Shush compiler 1439;; Shush compiler
1444(eval-when-compile (if mh-xemacs-flag (defvar mh-speed-flists-inhibit-flag))) 1440(defvar mh-speed-flists-inhibit-flag) ; XEmacs
1445 1441
1446;;;###mh-autoload 1442;;;###mh-autoload
1447(defun mh-index-execute-commands () 1443(defun mh-index-execute-commands ()
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index a5732d00bc6..ae260692b74 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -134,7 +134,7 @@ you want to delete the messages, use \"\\[universal-argument]
134 (apply #'mh-speed-flists t folders-changed)))) 134 (apply #'mh-speed-flists t folders-changed))))
135 135
136;; Shush compiler. 136;; Shush compiler.
137(eval-when-compile (defvar view-exit-action)) 137(defvar view-exit-action)
138 138
139;;;###mh-autoload 139;;;###mh-autoload
140(defun mh-list-sequences () 140(defun mh-list-sequences ()
@@ -202,7 +202,7 @@ MESSAGE appears."
202 " ")))) 202 " "))))
203 203
204;; Shush compiler. 204;; Shush compiler.
205(eval-when-compile (mh-do-in-xemacs (defvar tool-bar-mode))) 205(defvar tool-bar-mode) ; XEmacs
206 206
207;;;###mh-autoload 207;;;###mh-autoload
208(defun mh-narrow-to-seq (sequence) 208(defun mh-narrow-to-seq (sequence)
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index d7b656d3462..fb6698467da 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -815,7 +815,7 @@ operation."
815(put 'mh-show-mode 'mode-class 'special) 815(put 'mh-show-mode 'mode-class 'special)
816 816
817;; Shush compiler. 817;; Shush compiler.
818(eval-when-compile (defvar font-lock-auto-fontify)) 818(defvar font-lock-auto-fontify)
819 819
820;;;###mh-autoload 820;;;###mh-autoload
821(define-derived-mode mh-show-mode text-mode "MH-Show" 821(define-derived-mode mh-show-mode text-mode "MH-Show"
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index e41ee0bcc4f..73a15583165 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -556,10 +556,18 @@ nested folders within them."
556 sub-folders) 556 sub-folders)
557 sub-folders))) 557 sub-folders)))
558 558
559;; FIXME: This function does not do well if FOLDER does not exist. It
560;; then changes the context to that folder which causes problems down
561;; the line. Since a folder in the cache could later be deleted, it
562;; would be good for mh-sub-folders-actual to return nil in this case
563;; so that mh-sub-folders could delete it from the cache. This
564;; function could protect itself by using a temporary context.
559(defun mh-sub-folders-actual (folder) 565(defun mh-sub-folders-actual (folder)
560 "Execute the command folders to return the sub-folders of FOLDER. 566 "Execute the command folders to return the sub-folders of FOLDER.
561Filters out the folder names that start with \".\" so that 567Filters out the folder names that start with \".\" so that
562directories that aren't usually mail folders are hidden." 568directories that aren't usually mail folders are hidden.
569Expects FOLDER to have already been normalized with
570 (mh-normalize-folder-name folder nil nil t)"
563 (let ((arg-list `(,(expand-file-name "folders" mh-progs) 571 (let ((arg-list `(,(expand-file-name "folders" mh-progs)
564 nil (t nil) nil "-noheader" "-norecurse" "-nototal" 572 nil (t nil) nil "-noheader" "-norecurse" "-nototal"
565 ,@(if (stringp folder) (list folder) ()))) 573 ,@(if (stringp folder) (list folder) ())))
@@ -657,7 +665,7 @@ See `expand-file-name' for description of DEFAULT."
657(defvar mh-folder-hist nil) 665(defvar mh-folder-hist nil)
658 666
659;; Shush compiler. 667;; Shush compiler.
660(eval-when-compile (defvar mh-speed-flists-cache)) 668(defvar mh-speed-flists-cache)
661 669
662(defvar mh-allow-root-folder-flag nil 670(defvar mh-allow-root-folder-flag nil
663 "Non-nil means \"+\" is an acceptable folder name. 671 "Non-nil means \"+\" is an acceptable folder name.
@@ -683,53 +691,58 @@ This variable should never be set.")
683(defun mh-folder-completion-function (name predicate flag) 691(defun mh-folder-completion-function (name predicate flag)
684 "Programmable completion for folder names. 692 "Programmable completion for folder names.
685NAME is the partial folder name that has been input. PREDICATE if 693NAME is the partial folder name that has been input. PREDICATE if
686non-nil is a function that is used to filter the possible choices 694non-nil is a function that is used to filter the possible
687and FLAG determines whether the completion is over." 695choices. FLAG is nil to indicate `try-completion', t for
696`all-completions', or the symbol lambda for `test-completion'.
697See Info node `(elisp) Programmed Completion' for details."
688 (let* ((orig-name name) 698 (let* ((orig-name name)
699 ;; After normalization, name is nil, +, or +something. If a
700 ;; trailing slash is present, it is preserved.
689 (name (mh-normalize-folder-name name nil t)) 701 (name (mh-normalize-folder-name name nil t))
690 (last-slash (mh-search-from-end ?/ name)) 702 (last-slash (mh-search-from-end ?/ name))
691 (last-complete (if last-slash (substring name 0 last-slash) nil)) 703 ;; nil if + or +folder; +folder/ if slash present.
704 (last-complete (if last-slash (substring name 0 (1+ last-slash)) nil))
705 ;; Either +folder/remainder, +remainder, or "".
692 (remainder (cond (last-complete (substring name (1+ last-slash))) 706 (remainder (cond (last-complete (substring name (1+ last-slash)))
693 ((and (> (length name) 0) (equal (aref name 0) ?+)) 707 (name (substring name 1))
694 (substring name 1))
695 (t "")))) 708 (t ""))))
696 (cond ((eq flag nil) 709 (cond ((eq flag nil)
697 (let ((try-res (try-completion 710 (let ((try-res
698 name 711 (try-completion
699 (mapcar (lambda (x) 712 name
700 (cons (if (not last-complete) 713 (mapcar (lambda (x)
701 (concat "+" (car x)) 714 (cons (concat (or last-complete "+") (car x))
702 (concat last-complete "/" (car x))) 715 (cdr x)))
703 (cdr x))) 716 (mh-sub-folders last-complete t))
704 (mh-sub-folders last-complete t)) 717 predicate)))
705 predicate)))
706 (cond ((eq try-res nil) nil) 718 (cond ((eq try-res nil) nil)
707 ((and (eq try-res t) (equal name orig-name)) t) 719 ((and (eq try-res t) (equal name orig-name)) t)
708 ((eq try-res t) name) 720 ((eq try-res t) name)
709 (t try-res)))) 721 (t try-res))))
710 ((eq flag t) 722 ((eq flag t)
711 (all-completions 723 (mapcar (lambda (x)
712 remainder (mh-sub-folders last-complete t) predicate)) 724 (concat (or last-complete "+") x))
725 (all-completions
726 remainder (mh-sub-folders last-complete t) predicate)))
713 ((eq flag 'lambda) 727 ((eq flag 'lambda)
714 (let ((path (concat mh-user-path 728 (let ((path (concat (unless (and (> (length name) 1)
715 (substring (mh-normalize-folder-name name) 1)))) 729 (eq (aref name 1) ?/))
730 mh-user-path)
731 (substring name 1))))
716 (cond (mh-allow-root-folder-flag (file-exists-p path)) 732 (cond (mh-allow-root-folder-flag (file-exists-p path))
717 ((equal path mh-user-path) nil) 733 ((equal path mh-user-path) nil)
718 (t (file-exists-p path)))))))) 734 (t (file-exists-p path))))))))
719 735
720;; Shush compiler. 736;; Shush compiler.
721(eval-when-compile 737(defvar completion-root-regexp) ; XEmacs
722 (mh-do-in-xemacs 738(defvar minibuffer-completing-file-name) ; XEmacs
723 (defvar completion-root-regexp)
724 (defvar minibuffer-completing-file-name)))
725 739
726(defun mh-folder-completing-read (prompt default allow-root-folder-flag) 740(defun mh-folder-completing-read (prompt default allow-root-folder-flag)
727 "Read folder name with PROMPT and default result DEFAULT. 741 "Read folder name with PROMPT and default result DEFAULT.
728If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be 742If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be
729a folder name corresponding to `mh-user-path'." 743a folder name corresponding to `mh-user-path'."
730 (mh-normalize-folder-name 744 (mh-normalize-folder-name
731 (let ((minibuffer-completing-file-name t) 745 (let ((completion-root-regexp "^[+/]")
732 (completion-root-regexp "^[+/]")
733 (minibuffer-local-completion-map mh-folder-completion-map) 746 (minibuffer-local-completion-map mh-folder-completion-map)
734 (mh-allow-root-folder-flag allow-root-folder-flag)) 747 (mh-allow-root-folder-flag allow-root-folder-flag))
735 (completing-read prompt 'mh-folder-completion-function nil nil nil 748 (completing-read prompt 'mh-folder-completion-function nil nil nil
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 58d175f5470..deb2cebad14 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -60,8 +60,7 @@
60 (funcall mh-show-xface-function))) 60 (funcall mh-show-xface-function)))
61 61
62;; Shush compiler. 62;; Shush compiler.
63(eval-when-compile 63(defvar default-enable-multibyte-characters) ; XEmacs
64 (mh-do-in-xemacs (defvar default-enable-multibyte-characters)))
65 64
66(defun mh-face-display-function () 65(defun mh-face-display-function ()
67 "Display a Face, X-Face, or X-Image-URL header field. 66 "Display a Face, X-Face, or X-Image-URL header field.
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 04fbd3636f8..34bb388f855 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -979,7 +979,7 @@ Returns nil if an error message has appeared."
979 ;; Algorithm: get waiting output. See if last line contains 979 ;; Algorithm: get waiting output. See if last line contains
980 ;; tramp-smb-prompt sentinel or tramp-smb-errors strings. 980 ;; tramp-smb-prompt sentinel or tramp-smb-errors strings.
981 ;; If not, wait a bit and again get waiting output. 981 ;; If not, wait a bit and again get waiting output.
982 (while (and (not found) (not err)) 982 (while (not found)
983 983
984 ;; Accept pending output. 984 ;; Accept pending output.
985 (tramp-accept-process-output proc) 985 (tramp-accept-process-output proc)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 58f74133cd5..617e21ebfeb 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3584,6 +3584,10 @@ the result will be a local, non-Tramp, filename."
3584 "Global variable keeping asynchronous process object. 3584 "Global variable keeping asynchronous process object.
3585Used in `tramp-handle-shell-command'") 3585Used in `tramp-handle-shell-command'")
3586 3586
3587(defvar tramp-display-shell-command-buffer t
3588 "Whether to display output buffer of `shell-command'.
3589This is necessary for handling DISPLAY of `process-file'.")
3590
3587(defun tramp-handle-shell-command (command &optional output-buffer error-buffer) 3591(defun tramp-handle-shell-command (command &optional output-buffer error-buffer)
3588 "Like `shell-command' for tramp files. 3592 "Like `shell-command' for tramp files.
3589This will break if COMMAND prints a newline, followed by the value of 3593This will break if COMMAND prints a newline, followed by the value of
@@ -3692,7 +3696,8 @@ This will break if COMMAND prints a newline, followed by the value of
3692 (skip-chars-forward "^ ") 3696 (skip-chars-forward "^ ")
3693 (setq status (read (current-buffer))))) 3697 (setq status (read (current-buffer)))))
3694 (unless (zerop (buffer-size)) 3698 (unless (zerop (buffer-size))
3695 (display-buffer output-buffer)) 3699 (when tramp-display-shell-command-buffer
3700 (display-buffer output-buffer)))
3696 status)) 3701 status))
3697 ;; The following is only executed if something strange was 3702 ;; The following is only executed if something strange was
3698 ;; happening. Emit a helpful message and do it anyway. 3703 ;; happening. Emit a helpful message and do it anyway.
@@ -3707,11 +3712,10 @@ This will break if COMMAND prints a newline, followed by the value of
3707 (when (and (numberp buffer) (zerop buffer)) 3712 (when (and (numberp buffer) (zerop buffer))
3708 (error "Implementation does not handle immediate return")) 3713 (error "Implementation does not handle immediate return"))
3709 (when (consp buffer) (error "Implementation does not handle error files")) 3714 (when (consp buffer) (error "Implementation does not handle error files"))
3710 (shell-command 3715 (let ((tramp-display-shell-command-buffer display))
3711 (mapconcat 'tramp-shell-quote-argument 3716 (shell-command
3712 (cons program args) 3717 (mapconcat 'tramp-shell-quote-argument (cons program args) " ")
3713 " ") 3718 buffer)))
3714 buffer))
3715 3719
3716;; File Editing. 3720;; File Editing.
3717 3721
@@ -4454,24 +4458,28 @@ necessary anymore."
4454 file) 4458 file)
4455 (member (match-string 1 file) (mapcar 'car tramp-methods))) 4459 (member (match-string 1 file) (mapcar 'car tramp-methods)))
4456 ((or (equal last-input-event 'tab) 4460 ((or (equal last-input-event 'tab)
4457 ;; Emacs 4461 ;; Emacs
4458 (and (integerp last-input-event) 4462 (and (integerp last-input-event)
4459 (not (event-modifiers last-input-event)) 4463 (or
4460 (or (char-equal last-input-event ?\?) 4464 ;; ?\t has event-modifier 'control
4461 (char-equal last-input-event ?\t) ; handled by 'tab already? 4465 (char-equal last-input-event ?\t)
4462 (char-equal last-input-event ?\ ))) 4466 (and (not (event-modifiers last-input-event))
4467 (or (char-equal last-input-event ?\?)
4468 (char-equal last-input-event ?\ )))))
4463 ;; XEmacs 4469 ;; XEmacs
4464 (and (featurep 'xemacs) 4470 (and (featurep 'xemacs)
4465 (not (event-modifiers last-input-event)) 4471 (or
4466 (or (char-equal 4472 ;; ?\t has event-modifier 'control
4467 (funcall (symbol-function 'event-to-character) 4473 (char-equal
4468 last-input-event) ?\?) 4474 (funcall (symbol-function 'event-to-character)
4469 (char-equal 4475 last-input-event) ?\t)
4470 (funcall (symbol-function 'event-to-character) 4476 (and (not (event-modifiers last-input-event))
4471 last-input-event) ?\t) 4477 (or (char-equal
4472 (char-equal 4478 (funcall (symbol-function 'event-to-character)
4473 (funcall (symbol-function 'event-to-character) 4479 last-input-event) ?\?)
4474 last-input-event) ?\ )))) 4480 (char-equal
4481 (funcall (symbol-function 'event-to-character)
4482 last-input-event) ?\ ))))))
4475 t))) 4483 t)))
4476 4484
4477(defun tramp-completion-handle-file-exists-p (filename) 4485(defun tramp-completion-handle-file-exists-p (filename)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index a71667291da..c7edf9a4cdc 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.52" 33(defconst tramp-version "2.0.53"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 5fa9ac09b0b..877d5c9f399 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -895,6 +895,11 @@ indentation to be kept as it was before narrowing."
895 (delete-char n) 895 (delete-char n)
896 (setq ,bindent (- ,bindent n))))))))))) 896 (setq ,bindent (- ,bindent n)))))))))))
897 897
898(defun comment-add (arg)
899 (if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1))
900 comment-add
901 (1- (prefix-numeric-value arg))))
902
898(defun comment-region-internal (beg end cs ce 903(defun comment-region-internal (beg end cs ce
899 &optional ccs cce block lines indent) 904 &optional ccs cce block lines indent)
900 "Comment region BEG .. END. 905 "Comment region BEG .. END.
@@ -999,7 +1004,6 @@ The strings used as comment starts are built from
999 1004
1000(defun comment-region-default (beg end &optional arg) 1005(defun comment-region-default (beg end &optional arg)
1001 (let* ((numarg (prefix-numeric-value arg)) 1006 (let* ((numarg (prefix-numeric-value arg))
1002 (add comment-add)
1003 (style (cdr (assoc comment-style comment-styles))) 1007 (style (cdr (assoc comment-style comment-styles)))
1004 (lines (nth 2 style)) 1008 (lines (nth 2 style))
1005 (block (nth 1 style)) 1009 (block (nth 1 style))
@@ -1032,8 +1036,7 @@ The strings used as comment starts are built from
1032 ((consp arg) (uncomment-region beg end)) 1036 ((consp arg) (uncomment-region beg end))
1033 ((< numarg 0) (uncomment-region beg end (- numarg))) 1037 ((< numarg 0) (uncomment-region beg end (- numarg)))
1034 (t 1038 (t
1035 (setq numarg (if (and (null arg) (= (length comment-start) 1)) 1039 (setq numarg (comment-add arg))
1036 add (1- numarg)))
1037 (comment-region-internal 1040 (comment-region-internal
1038 beg end 1041 beg end
1039 (let ((s (comment-padright comment-start numarg))) 1042 (let ((s (comment-padright comment-start numarg)))
@@ -1091,9 +1094,8 @@ You can configure `comment-style' to change the way regions are commented."
1091 ;; FIXME: If there's no comment to kill on this line and ARG is 1094 ;; FIXME: If there's no comment to kill on this line and ARG is
1092 ;; specified, calling comment-kill is not very clever. 1095 ;; specified, calling comment-kill is not very clever.
1093 (if arg (comment-kill (and (integerp arg) arg)) (comment-indent)) 1096 (if arg (comment-kill (and (integerp arg) arg)) (comment-indent))
1094 (let ((add (if arg (prefix-numeric-value arg) 1097 (let ((add (comment-add arg)))
1095 (if (= (length comment-start) 1) comment-add 0)))) 1098 ;; Some modes insist on keeping column 0 comment in column 0
1096 ;; Some modes insist on keeping column 0 comment in column 0
1097 ;; so we need to move away from it before inserting the comment. 1099 ;; so we need to move away from it before inserting the comment.
1098 (indent-according-to-mode) 1100 (indent-according-to-mode)
1099 (insert (comment-padright comment-start add)) 1101 (insert (comment-padright comment-start add))
diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el
index 2053d8f5bd5..892dc962767 100644
--- a/lisp/pcvs-parse.el
+++ b/lisp/pcvs-parse.el
@@ -271,8 +271,8 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
271 ;; on the current branch (either because it only exists in other 271 ;; on the current branch (either because it only exists in other
272 ;; branches, or because it's been removed). 272 ;; branches, or because it's been removed).
273 (if (ignore-errors 273 (if (ignore-errors
274 (with-current-buffer 274 (with-temp-buffer
275 (find-file-noselect (expand-file-name 275 (insert-file-contents (expand-file-name
276 ".cvsignore" (file-name-directory dir))) 276 ".cvsignore" (file-name-directory dir)))
277 (goto-char (point-min)) 277 (goto-char (point-min))
278 (re-search-forward 278 (re-search-forward
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index b02df16b4f5..8120094f606 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -267,7 +267,8 @@ the evaluated constant value at compile time."
267 ["Hungry delete" c-toggle-hungry-state 267 ["Hungry delete" c-toggle-hungry-state
268 :style toggle :selected c-hungry-delete-key] 268 :style toggle :selected c-hungry-delete-key]
269 ["Subword mode" c-subword-mode 269 ["Subword mode" c-subword-mode
270 :style toggle :selected c-subword-mode]))) 270 :style toggle :selected (and (boundp 'c-subword-mode)
271 c-subword-mode)])))
271 272
272 273
273;;; Syntax tables. 274;;; Syntax tables.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 244570170fa..e6325f1de80 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -100,7 +100,9 @@
100(defvar tool-bar-map) 100(defvar tool-bar-map)
101(defvar speedbar-initial-expansion-list-name) 101(defvar speedbar-initial-expansion-list-name)
102 102
103(defvar gdb-frame-address "main" "Initialization for Assembler buffer.") 103(defvar gdb-pc-address nil "Initialization for Assembler buffer.
104Set to \"main\" at start if gdb-show-main is t.")
105(defvar gdb-frame-address nil "Identity of frame for watch expression.")
104(defvar gdb-previous-frame-address nil) 106(defvar gdb-previous-frame-address nil)
105(defvar gdb-memory-address "main") 107(defvar gdb-memory-address "main")
106(defvar gdb-previous-frame nil) 108(defvar gdb-previous-frame nil)
@@ -109,8 +111,9 @@
109(defvar gdb-current-language nil) 111(defvar gdb-current-language nil)
110(defvar gdb-var-list nil 112(defvar gdb-var-list nil
111 "List of variables in watch window. 113 "List of variables in watch window.
112Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS) where 114Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
113STATUS is nil (unchanged), `changed' or `out-of-scope'.") 115where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame
116address for root variables.")
114(defvar gdb-force-update t 117(defvar gdb-force-update t
115 "Non-nil means that view of watch expressions will be updated in the speedbar.") 118 "Non-nil means that view of watch expressions will be updated in the speedbar.")
116(defvar gdb-main-file nil "Source file from which program execution begins.") 119(defvar gdb-main-file nil "Source file from which program execution begins.")
@@ -417,7 +420,8 @@ With arg, use separate IO iff arg is positive."
417 (goto-char (point-min)) 420 (goto-char (point-min))
418 (when (search-forward "read in on demand:" nil t) 421 (when (search-forward "read in on demand:" nil t)
419 (while (re-search-forward gdb-source-file-regexp nil t) 422 (while (re-search-forward gdb-source-file-regexp nil t)
420 (push (or (match-string 1) (match-string 2)) gdb-source-file-list)) 423 (push (file-name-nondirectory (or (match-string 1) (match-string 2)))
424 gdb-source-file-list))
421 (dolist (buffer (buffer-list)) 425 (dolist (buffer (buffer-list))
422 (with-current-buffer buffer 426 (with-current-buffer buffer
423 (when (and buffer-file-name 427 (when (and buffer-file-name
@@ -515,7 +519,7 @@ With arg, use separate IO iff arg is positive."
515 (setq comint-input-sender 'gdb-send) 519 (setq comint-input-sender 'gdb-send)
516 520
517 ;; (re-)initialize 521 ;; (re-)initialize
518 (setq gdb-frame-address (if gdb-show-main "main" nil)) 522 (setq gdb-pc-address (if gdb-show-main "main" nil))
519 (setq gdb-previous-frame-address nil 523 (setq gdb-previous-frame-address nil
520 gdb-memory-address "main" 524 gdb-memory-address "main"
521 gdb-previous-frame nil 525 gdb-previous-frame nil
@@ -719,7 +723,7 @@ With arg, enter name of variable to be watched in the minibuffer."
719 expr) 723 expr)
720 (match-string 2) 724 (match-string 2)
721 (match-string 3) 725 (match-string 3)
722 nil nil))) 726 nil nil gdb-frame-address)))
723 (push var gdb-var-list) 727 (push var gdb-var-list)
724 (speedbar 1) 728 (speedbar 1)
725 (unless (string-equal 729 (unless (string-equal
@@ -1205,7 +1209,7 @@ This filter may simply queue input for a later time."
1205 (cons 1209 (cons
1206 (match-string 1 args) 1210 (match-string 1 args)
1207 (string-to-number (match-string 2 args)))) 1211 (string-to-number (match-string 2 args))))
1208 (setq gdb-frame-address (match-string 3 args)) 1212 (setq gdb-pc-address (match-string 3 args))
1209 ;; cover for auto-display output which comes *before* 1213 ;; cover for auto-display output which comes *before*
1210 ;; stopped annotation 1214 ;; stopped annotation
1211 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user))) 1215 (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
@@ -1356,7 +1360,7 @@ happens to be appropriate."
1356 (gdb-get-buffer-create 'gdb-breakpoints-buffer) 1360 (gdb-get-buffer-create 'gdb-breakpoints-buffer)
1357 (gdb-invalidate-breakpoints) 1361 (gdb-invalidate-breakpoints)
1358 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler 1362 ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
1359 ;; so gdb-frame-address is updated. 1363 ;; so gdb-pc-address is updated.
1360 ;; (gdb-invalidate-assembler) 1364 ;; (gdb-invalidate-assembler)
1361 1365
1362 (if (string-equal gdb-version "pre-6.4") 1366 (if (string-equal gdb-version "pre-6.4")
@@ -3003,11 +3007,11 @@ BUFFER nil or omitted means use the current buffer."
3003 (pos 1) (address) (flag) (bptno)) 3007 (pos 1) (address) (flag) (bptno))
3004 (with-current-buffer buffer 3008 (with-current-buffer buffer
3005 (save-excursion 3009 (save-excursion
3006 (if (not (equal gdb-frame-address "main")) 3010 (if (not (equal gdb-pc-address "main"))
3007 (progn 3011 (progn
3008 (goto-char (point-min)) 3012 (goto-char (point-min))
3009 (if (and gdb-frame-address 3013 (if (and gdb-pc-address
3010 (search-forward gdb-frame-address nil t)) 3014 (search-forward gdb-pc-address nil t))
3011 (progn 3015 (progn
3012 (setq pos (point)) 3016 (setq pos (point))
3013 (beginning-of-line) 3017 (beginning-of-line)
@@ -3037,7 +3041,7 @@ BUFFER nil or omitted means use the current buffer."
3037 (goto-char (point-min)) 3041 (goto-char (point-min))
3038 (if (search-forward address nil t) 3042 (if (search-forward address nil t)
3039 (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) 3043 (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))))
3040 (if (not (equal gdb-frame-address "main")) 3044 (if (not (equal gdb-pc-address "main"))
3041 (with-current-buffer buffer 3045 (with-current-buffer buffer
3042 (set-window-point (get-buffer-window buffer 0) pos))))) 3046 (set-window-point (get-buffer-window buffer 0) pos)))))
3043 3047
@@ -3099,7 +3103,7 @@ BUFFER nil or omitted means use the current buffer."
3099 (special-display-frame-alist gdb-frame-parameters)) 3103 (special-display-frame-alist gdb-frame-parameters))
3100 (display-buffer (gdb-get-buffer-create 'gdb-assembler-buffer)))) 3104 (display-buffer (gdb-get-buffer-create 'gdb-assembler-buffer))))
3101 3105
3102;; modified because if gdb-frame-address has changed value a new command 3106;; modified because if gdb-pc-address has changed value a new command
3103;; must be enqueued to update the buffer with the new output 3107;; must be enqueued to update the buffer with the new output
3104(defun gdb-invalidate-assembler (&optional ignored) 3108(defun gdb-invalidate-assembler (&optional ignored)
3105 (if (gdb-get-buffer 'gdb-assembler-buffer) 3109 (if (gdb-get-buffer 'gdb-assembler-buffer)
@@ -3108,7 +3112,7 @@ BUFFER nil or omitted means use the current buffer."
3108 (string-equal gdb-selected-frame gdb-previous-frame)) 3112 (string-equal gdb-selected-frame gdb-previous-frame))
3109 (if (or (not (member 'gdb-invalidate-assembler 3113 (if (or (not (member 'gdb-invalidate-assembler
3110 gdb-pending-triggers)) 3114 gdb-pending-triggers))
3111 (not (string-equal gdb-frame-address 3115 (not (string-equal gdb-pc-address
3112 gdb-previous-frame-address))) 3116 gdb-previous-frame-address)))
3113 (progn 3117 (progn
3114 ;; take previous disassemble command, if any, off the queue 3118 ;; take previous disassemble command, if any, off the queue
@@ -3121,11 +3125,11 @@ BUFFER nil or omitted means use the current buffer."
3121 (gdb-enqueue-input 3125 (gdb-enqueue-input
3122 (list 3126 (list
3123 (concat gdb-server-prefix "disassemble " 3127 (concat gdb-server-prefix "disassemble "
3124 (if (member gdb-frame-address '(nil "main")) nil "0x") 3128 (if (member gdb-pc-address '(nil "main")) nil "0x")
3125 gdb-frame-address "\n") 3129 gdb-pc-address "\n")
3126 'gdb-assembler-handler)) 3130 'gdb-assembler-handler))
3127 (push 'gdb-invalidate-assembler gdb-pending-triggers) 3131 (push 'gdb-invalidate-assembler gdb-pending-triggers)
3128 (setq gdb-previous-frame-address gdb-frame-address) 3132 (setq gdb-previous-frame-address gdb-pc-address)
3129 (setq gdb-previous-frame gdb-selected-frame))))))) 3133 (setq gdb-previous-frame gdb-selected-frame)))))))
3130 3134
3131(defun gdb-get-selected-frame () 3135(defun gdb-get-selected-frame ()
@@ -3140,8 +3144,10 @@ BUFFER nil or omitted means use the current buffer."
3140 (setq gdb-pending-triggers 3144 (setq gdb-pending-triggers
3141 (delq 'gdb-get-selected-frame gdb-pending-triggers)) 3145 (delq 'gdb-get-selected-frame gdb-pending-triggers))
3142 (goto-char (point-min)) 3146 (goto-char (point-min))
3143 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) 3147 (when (re-search-forward
3144 (setq gdb-frame-number (match-string 1))) 3148 "Stack level \\([0-9]+\\), frame at \\(0x[[:xdigit:]]+\\)" nil t)
3149 (setq gdb-frame-number (match-string 1))
3150 (setq gdb-frame-address (match-string 2)))
3145 (goto-char (point-min)) 3151 (goto-char (point-min))
3146 (when (re-search-forward ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-+?\\)\ 3152 (when (re-search-forward ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-+?\\)\
3147\\(?: (\\(\\S-+?\\):[0-9]+?)\\)*;? " 3153\\(?: (\\(\\S-+?\\):[0-9]+?)\\)*;? "
@@ -3153,7 +3159,7 @@ BUFFER nil or omitted means use the current buffer."
3153 (if (gdb-get-buffer 'gdb-assembler-buffer) 3159 (if (gdb-get-buffer 'gdb-assembler-buffer)
3154 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer) 3160 (with-current-buffer (gdb-get-buffer 'gdb-assembler-buffer)
3155 (setq mode-name (concat "Machine:" gdb-selected-frame)))) 3161 (setq mode-name (concat "Machine:" gdb-selected-frame))))
3156 (setq gdb-frame-address (match-string 1)) 3162 (setq gdb-pc-address (match-string 1))
3157 (if (and (match-string 3) gud-overlay-arrow-position) 3163 (if (and (match-string 3) gud-overlay-arrow-position)
3158 (let ((buffer (marker-buffer gud-overlay-arrow-position)) 3164 (let ((buffer (marker-buffer gud-overlay-arrow-position))
3159 (position (marker-position gud-overlay-arrow-position))) 3165 (position (marker-position gud-overlay-arrow-position)))
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 907a2e7c300..e1e2b9e28cd 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -374,8 +374,9 @@ t means that there is no stack, and we are in display-file mode.")
374(defun gud-speedbar-item-info () 374(defun gud-speedbar-item-info ()
375 "Display the data type of the watch expression element." 375 "Display the data type of the watch expression element."
376 (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) 376 (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)))
377 (if (nth 4 var) 377 (if (nth 6 var)
378 (speedbar-message "%s" (nth 3 var))))) 378 (speedbar-message "%s: %s" (nth 6 var) (nth 3 var))
379 (speedbar-message "%s" (nth 3 var)))))
379 380
380(defun gud-install-speedbar-variables () 381(defun gud-install-speedbar-variables ()
381 "Install those variables used by speedbar to enhance gud/gdb." 382 "Install those variables used by speedbar to enhance gud/gdb."
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f110828d602..5e645535a23 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1744,6 +1744,14 @@ lines count as headers.
1744 #'python-eldoc-function) 1744 #'python-eldoc-function)
1745 (add-hook 'eldoc-mode-hook 1745 (add-hook 'eldoc-mode-hook
1746 '(lambda () (run-python nil t)) nil t) ; need it running 1746 '(lambda () (run-python nil t)) nil t) ; need it running
1747 (unless (assoc 'python-mode hs-special-modes-alist)
1748 (setq
1749 hs-special-modes-alist
1750 (cons (list
1751 'python-mode "^\\s-*def\\>" nil "#"
1752 (lambda (arg)(python-end-of-defun)(skip-chars-backward " \t\n"))
1753 nil)
1754 hs-special-modes-alist)))
1747 (if (featurep 'hippie-exp) 1755 (if (featurep 'hippie-exp)
1748 (set (make-local-variable 'hippie-expand-try-functions-list) 1756 (set (make-local-variable 'hippie-expand-try-functions-list)
1749 (cons 'python-try-complete hippie-expand-try-functions-list))) 1757 (cons 'python-try-complete hippie-expand-try-functions-list)))
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 5c8477ac337..b194bb56727 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -1042,7 +1042,7 @@ Returns nil if line starts inside a string, t if in a comment."
1042(defun tcl-send-string (proc string) 1042(defun tcl-send-string (proc string)
1043 (with-current-buffer (process-buffer proc) 1043 (with-current-buffer (process-buffer proc)
1044 (goto-char (process-mark proc)) 1044 (goto-char (process-mark proc))
1045 (beginning-of-line) 1045 (forward-line 0) ;Not (beginning-of-line) because of fields.
1046 (if (looking-at comint-prompt-regexp) 1046 (if (looking-at comint-prompt-regexp)
1047 (set-marker inferior-tcl-delete-prompt-marker (point)))) 1047 (set-marker inferior-tcl-delete-prompt-marker (point))))
1048 (comint-send-string proc string)) 1048 (comint-send-string proc string))
@@ -1050,7 +1050,7 @@ Returns nil if line starts inside a string, t if in a comment."
1050(defun tcl-send-region (proc start end) 1050(defun tcl-send-region (proc start end)
1051 (with-current-buffer (process-buffer proc) 1051 (with-current-buffer (process-buffer proc)
1052 (goto-char (process-mark proc)) 1052 (goto-char (process-mark proc))
1053 (beginning-of-line) 1053 (forward-line 0) ;Not (beginning-of-line) because of fields.
1054 (if (looking-at comint-prompt-regexp) 1054 (if (looking-at comint-prompt-regexp)
1055 (set-marker inferior-tcl-delete-prompt-marker (point)))) 1055 (set-marker inferior-tcl-delete-prompt-marker (point))))
1056 (comint-send-region proc start end)) 1056 (comint-send-region proc start end))
@@ -1080,7 +1080,11 @@ See variable `inferior-tcl-buffer'."
1080Prefix argument means switch to the Tcl buffer afterwards." 1080Prefix argument means switch to the Tcl buffer afterwards."
1081 (interactive "r\nP") 1081 (interactive "r\nP")
1082 (let ((proc (inferior-tcl-proc))) 1082 (let ((proc (inferior-tcl-proc)))
1083 (tcl-send-region proc start end) 1083 (tcl-send-region
1084 proc
1085 ;; Strip leading and trailing whitespace.
1086 (save-excursion (goto-char start) (skip-chars-forward " \t\n") (point))
1087 (save-excursion (goto-char end) (skip-chars-backward " \t\n") (point)))
1084 (tcl-send-string proc "\n") 1088 (tcl-send-string proc "\n")
1085 (if and-go (switch-to-tcl t)))) 1089 (if and-go (switch-to-tcl t))))
1086 1090
@@ -1149,7 +1153,12 @@ See documentation for function `inferior-tcl-mode' for more information."
1149 (unless (comint-check-proc "*inferior-tcl*") 1153 (unless (comint-check-proc "*inferior-tcl*")
1150 (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil 1154 (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
1151 tcl-command-switches)) 1155 tcl-command-switches))
1152 (inferior-tcl-mode)) 1156 (inferior-tcl-mode)
1157 ;; Make tclsh display a prompt on ms-windows (or under Unix, when a tty
1158 ;; wasn't used). Doesn't affect wish, unfortunately.
1159 (unless (process-tty-name (inferior-tcl-proc))
1160 (tcl-send-string (inferior-tcl-proc)
1161 "set ::tcl_interactive 1; concat\n")))
1153 (set (make-local-variable 'tcl-application) cmd) 1162 (set (make-local-variable 'tcl-application) cmd)
1154 (setq inferior-tcl-buffer "*inferior-tcl*") 1163 (setq inferior-tcl-buffer "*inferior-tcl*")
1155 (pop-to-buffer "*inferior-tcl*")) 1164 (pop-to-buffer "*inferior-tcl*"))
diff --git a/lisp/subr.el b/lisp/subr.el
index 344eccf816c..574c589448d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1540,7 +1540,8 @@ by doing (clear-string STRING)."
1540 (let ((pass nil) 1540 (let ((pass nil)
1541 (c 0) 1541 (c 0)
1542 (echo-keystrokes 0) 1542 (echo-keystrokes 0)
1543 (cursor-in-echo-area t)) 1543 (cursor-in-echo-area t)
1544 (message-log-max nil))
1544 (add-text-properties 0 (length prompt) 1545 (add-text-properties 0 (length prompt)
1545 minibuffer-prompt-properties prompt) 1546 minibuffer-prompt-properties prompt)
1546 (while (progn (message "%s%s" 1547 (while (progn (message "%s%s"
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 2ef9c60ce7c..936f8619fa2 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.21 8;; Version: 4.24
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -81,9 +81,17 @@
81;; 81;;
82;; Changes since version 4.00: 82;; Changes since version 4.00:
83;; --------------------------- 83;; ---------------------------
84;; Version 4.21 84;; Version 4.24
85;; - Bug fixes. 85;; - Bug fixes.
86;; 86;;
87;; Version 4.23
88;; - Bug fixes.
89;;
90;; Version 4.22
91;; - Bug fixes.
92;; - In agenda buffer, mouse-1 no longer follows link.
93;; See `org-agenda-mouse-1-follows-link' and `org-mouse-1-follows-link'.
94;;
87;; Version 4.20 95;; Version 4.20
88;; - Links use now the [[link][description]] format by default. 96;; - Links use now the [[link][description]] format by default.
89;; When inserting links, the user is prompted for a description. 97;; When inserting links, the user is prompted for a description.
@@ -174,7 +182,7 @@
174 182
175;;; Customization variables 183;;; Customization variables
176 184
177(defvar org-version "4.21" 185(defvar org-version "4.24"
178 "The version number of the file org.el.") 186 "The version number of the file org.el.")
179(defun org-version () 187(defun org-version ()
180 (interactive) 188 (interactive)
@@ -227,7 +235,11 @@ uninteresting. Also tables look terrible when wrapped."
227(defcustom org-startup-align-all-tables nil 235(defcustom org-startup-align-all-tables nil
228 "Non-nil means, align all tables when visiting a file. 236 "Non-nil means, align all tables when visiting a file.
229This is useful when the column width in tables is forced with <N> cookies 237This is useful when the column width in tables is forced with <N> cookies
230in table fields. Such tables will look correct only after the first re-align." 238in table fields. Such tables will look correct only after the first re-align.
239This can also be configured on a per-file basis by adding one of
240the following lines anywhere in the buffer:
241 #+STARTUP: align
242 #+STARTUP: noalign"
231 :group 'org-startup 243 :group 'org-startup
232 :type 'boolean) 244 :type 'boolean)
233 245
@@ -237,7 +249,6 @@ This means, if you start editing an org file, you will get an
237immediate reminder of any due deadlines. 249immediate reminder of any due deadlines.
238This can also be configured on a per-file basis by adding one of 250This can also be configured on a per-file basis by adding one of
239the following lines anywhere in the buffer: 251the following lines anywhere in the buffer:
240
241 #+STARTUP: dlcheck 252 #+STARTUP: dlcheck
242 #+STARTUP: nodlcheck" 253 #+STARTUP: nodlcheck"
243 :group 'org-startup 254 :group 'org-startup
@@ -391,7 +402,12 @@ This has the effect that two stars are being added/taken away in
391promotion/demotion commands. It also influences how levels are 402promotion/demotion commands. It also influences how levels are
392handled by the exporters. 403handled by the exporters.
393Changing it requires restart of `font-lock-mode' to become effective 404Changing it requires restart of `font-lock-mode' to become effective
394for fontification also in regions already fontified." 405for fontification also in regions already fontified.
406You may also set this on a per-file basis by adding one of the following
407lines to the buffer:
408
409 #+STARTUP: odd
410 #+STARTUP: oddeven"
395 :group 'org-edit-structure 411 :group 'org-edit-structure
396 :group 'org-font-lock 412 :group 'org-font-lock
397 :type 'boolean) 413 :type 'boolean)
@@ -870,6 +886,13 @@ Needs to be set before org.el is loaded."
870 :group 'org-link-follow 886 :group 'org-link-follow
871 :type 'boolean) 887 :type 'boolean)
872 888
889(defcustom org-mouse-1-follows-link t
890 "Non-nil means, mouse-1 on a link will follow the link.
891A longer mouse click will still set point. Does not wortk on XEmacs.
892Needs to be set before org.el is loaded."
893 :group 'org-link-follow
894 :type 'boolean)
895
873(defcustom org-mark-ring-length 4 896(defcustom org-mark-ring-length 4
874 "Number of different positions to be recorded in the ring 897 "Number of different positions to be recorded in the ring
875Changing this requires a restart of Emacs to work correctly." 898Changing this requires a restart of Emacs to work correctly."
@@ -1112,7 +1135,7 @@ closing date."
1112 :type 'boolean) 1135 :type 'boolean)
1113 1136
1114(defgroup org-priorities nil 1137(defgroup org-priorities nil
1115 "Keywords in Org-mode." 1138 "Priorities in Org-mode."
1116 :tag "Org Priorities" 1139 :tag "Org Priorities"
1117 :group 'org-todo) 1140 :group 'org-todo)
1118 1141
@@ -1167,7 +1190,7 @@ moved to the new date."
1167 :type 'boolean) 1190 :type 'boolean)
1168 1191
1169(defgroup org-tags nil 1192(defgroup org-tags nil
1170 "Options concerning startup of Org-mode." 1193 "Options concerning tags in Org-mode."
1171 :tag "Org Tags" 1194 :tag "Org Tags"
1172 :group 'org) 1195 :group 'org)
1173 1196
@@ -1301,21 +1324,28 @@ forth between agenda and calendar."
1301 :tag "Org Agenda Window Setup" 1324 :tag "Org Agenda Window Setup"
1302 :group 'org-agenda) 1325 :group 'org-agenda)
1303 1326
1327(defcustom org-agenda-mouse-1-follows-link nil
1328 "Non-nil means, mouse-1 on a link will follow the link in the agenda.
1329A longer mouse click will still set point. Does not wortk on XEmacs.
1330Needs to be set before org.el is loaded."
1331 :group 'org-agenda-setup
1332 :type 'boolean)
1333
1304(defcustom org-select-timeline-window t 1334(defcustom org-select-timeline-window t
1305 "Non-nil means, after creating a timeline, move cursor into Timeline window. 1335 "Non-nil means, after creating a timeline, move cursor into Timeline window.
1306When nil, cursor will remain in the current window." 1336When nil, cursor will remain in the current window."
1307 :group 'org-agenda-window-setup 1337 :group 'org-agenda-setup
1308 :type 'boolean) 1338 :type 'boolean)
1309 1339
1310(defcustom org-select-agenda-window t 1340(defcustom org-select-agenda-window t
1311 "Non-nil means, after creating an agenda, move cursor into Agenda window. 1341 "Non-nil means, after creating an agenda, move cursor into Agenda window.
1312When nil, cursor will remain in the current window." 1342When nil, cursor will remain in the current window."
1313 :group 'org-agenda-window-setup 1343 :group 'org-agenda-setup
1314 :type 'boolean) 1344 :type 'boolean)
1315 1345
1316(defcustom org-fit-agenda-window t 1346(defcustom org-fit-agenda-window t
1317 "Non-nil means, change window size of agenda to fit content." 1347 "Non-nil means, change window size of agenda to fit content."
1318 :group 'org-agenda-window-setup 1348 :group 'org-agenda-setup
1319 :type 'boolean) 1349 :type 'boolean)
1320 1350
1321(defgroup org-agenda-display nil 1351(defgroup org-agenda-display nil
@@ -1884,7 +1914,12 @@ face is white for a light background, and black for a dark
1884background. You may have to customize the face `org-hide' to 1914background. You may have to customize the face `org-hide' to
1885make this work. 1915make this work.
1886Changing it requires restart of `font-lock-mode' to become effective 1916Changing it requires restart of `font-lock-mode' to become effective
1887also in regions already fontified." 1917also in regions already fontified.
1918You may also set this on a per-file basis by adding one of the following
1919lines to the buffer:
1920
1921 #+STARTUP: hidestars
1922 #+STARTUP: showstars"
1888 :group 'org-font-lock 1923 :group 'org-font-lock
1889 :type 'boolean) 1924 :type 'boolean)
1890 1925
@@ -2051,6 +2086,14 @@ Changing this variable requires a restart of Emacs to take effect."
2051 "Face for links." 2086 "Face for links."
2052 :group 'org-faces) 2087 :group 'org-faces)
2053 2088
2089(defface org-date
2090 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
2091 (((class color) (background light)) (:foreground "Purple" :underline t))
2092 (((class color) (background dark)) (:foreground "Cyan" :underline t))
2093 (t (:bold t)))
2094 "Face for links."
2095 :group 'org-faces)
2096
2054(defface org-tag 2097(defface org-tag
2055 '((((type tty) (class color)) (:weight bold)) 2098 '((((type tty) (class color)) (:weight bold))
2056 (((class color) (background light)) (:weight bold)) 2099 (((class color) (background light)) (:weight bold))
@@ -2059,6 +2102,15 @@ Changing this variable requires a restart of Emacs to take effect."
2059 "Face for tags." 2102 "Face for tags."
2060 :group 'org-faces) 2103 :group 'org-faces)
2061 2104
2105(defface org-todo ;; font-lock-warning-face
2106 '((((type tty) (class color)) (:foreground "red"))
2107 (((class color) (background light)) (:foreground "Red" :bold t))
2108 (((class color) (background dark)) (:foreground "Red1" :bold t))
2109; (((class color) (background dark)) (:foreground "Pink" :bold t))
2110 (t (:inverse-video t :bold t)))
2111 "Face for TODO keywords."
2112 :group 'org-faces)
2113
2062(defface org-done ;; font-lock-type-face 2114(defface org-done ;; font-lock-type-face
2063 '((((type tty) (class color)) (:foreground "green")) 2115 '((((type tty) (class color)) (:foreground "green"))
2064 (((class color) (background light)) (:foreground "ForestGreen" :bold t)) 2116 (((class color) (background light)) (:foreground "ForestGreen" :bold t))
@@ -2165,7 +2217,9 @@ Changing this variable requires a restart of Emacs to take effect."
2165 ((equal key "STARTUP") 2217 ((equal key "STARTUP")
2166 (let ((opts (org-split-string value splitre)) 2218 (let ((opts (org-split-string value splitre))
2167 (set '(("fold" org-startup-folded t) 2219 (set '(("fold" org-startup-folded t)
2220 ("overview" org-startup-folded t)
2168 ("nofold" org-startup-folded nil) 2221 ("nofold" org-startup-folded nil)
2222 ("showall" org-startup-folded nil)
2169 ("content" org-startup-folded content) 2223 ("content" org-startup-folded content)
2170 ("hidestars" org-hide-leading-stars t) 2224 ("hidestars" org-hide-leading-stars t)
2171 ("showstars" org-hide-leading-stars nil) 2225 ("showstars" org-hide-leading-stars nil)
@@ -2379,6 +2433,10 @@ The following commands are available:
2379 s) 2433 s)
2380 (match-string-no-properties num string))) 2434 (match-string-no-properties num string)))
2381 2435
2436(defsubst org-no-properties (s)
2437 (remove-text-properties 0 (length s) org-rm-props s)
2438 s)
2439
2382(defun org-current-time () 2440(defun org-current-time ()
2383 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." 2441 "Current time, possibly rounded to `org-time-stamp-rounding-minutes'."
2384 (if (> org-time-stamp-rounding-minutes 0) 2442 (if (> org-time-stamp-rounding-minutes 0)
@@ -2406,7 +2464,8 @@ that will be added to PLIST. Returns the string that was modified."
2406 (if (featurep 'xemacs) [button2] [mouse-2]) 'org-open-at-mouse) 2464 (if (featurep 'xemacs) [button2] [mouse-2]) 'org-open-at-mouse)
2407(define-key org-mouse-map 2465(define-key org-mouse-map
2408 (if (featurep 'xemacs) [button3] [mouse-3]) 'org-find-file-at-mouse) 2466 (if (featurep 'xemacs) [button3] [mouse-3]) 'org-find-file-at-mouse)
2409(define-key org-mouse-map [follow-link] 'mouse-face) 2467(when org-mouse-1-follows-link
2468 (define-key org-mouse-map [follow-link] 'mouse-face))
2410(when org-tab-follows-link 2469(when org-tab-follows-link
2411 (define-key org-mouse-map [(tab)] 'org-open-at-point) 2470 (define-key org-mouse-map [(tab)] 'org-open-at-point)
2412 (define-key org-mouse-map "\C-i" 'org-open-at-point)) 2471 (define-key org-mouse-map "\C-i" 'org-open-at-point))
@@ -2508,7 +2567,9 @@ that will be added to PLIST. Returns the string that was modified."
2508(defun org-activate-bracket-links (limit) 2567(defun org-activate-bracket-links (limit)
2509 "Run through the buffer and add overlays to bracketed links." 2568 "Run through the buffer and add overlays to bracketed links."
2510 (if (re-search-forward org-bracket-link-regexp limit t) 2569 (if (re-search-forward org-bracket-link-regexp limit t)
2511 (let* ((help (concat "LINK: " (org-match-string-no-properties 1))) 2570 (let* ((help (concat "LINK: "
2571 (org-match-string-no-properties 1)))
2572 ;; FIXME: above we should remove the escapes.
2512 (ip (list 'invisible 'org-link 'intangible t 'rear-nonsticky t 2573 (ip (list 'invisible 'org-link 'intangible t 'rear-nonsticky t
2513 'keymap org-mouse-map 'mouse-face 'highlight 2574 'keymap org-mouse-map 'mouse-face 'highlight
2514 'help-echo help)) 2575 'help-echo help))
@@ -2656,13 +2717,13 @@ between words."
2656 (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t))) 2717 (if (memq 'plain lk) '(org-activate-plain-links (0 'org-link t)))
2657 (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t))) 2718 (if (memq 'bracket lk) '(org-activate-bracket-links (0 'org-link t)))
2658 (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t))) 2719 (if (memq 'radio lk) '(org-activate-target-links (0 'org-link t)))
2659 (if (memq 'date lk) '(org-activate-dates (0 'org-link t))) 2720 (if (memq 'date lk) '(org-activate-dates (0 'org-date t)))
2660 (if (memq 'camel lk) '(org-activate-camels (0 'org-link t))) 2721 (if (memq 'camel lk) '(org-activate-camels (0 'org-link t)))
2661 (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend))) 2722 (if (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend)))
2662 (if org-table-limit-column-width 2723 (if org-table-limit-column-width
2663 '(org-hide-wide-columns (0 nil append))) 2724 '(org-hide-wide-columns (0 nil append)))
2664 (list (concat "^\\*+[ \t]*" org-not-done-regexp) 2725 (list (concat "^\\*+[ \t]*" org-not-done-regexp)
2665 '(1 'org-warning t)) 2726 '(1 'org-todo t))
2666 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) 2727 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t))
2667 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) 2728 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t))
2668 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) 2729 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t))
@@ -2683,7 +2744,7 @@ between words."
2683 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) 2744 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
2684 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) 2745 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t))
2685 (if org-format-transports-properties-p 2746 (if org-format-transports-properties-p
2686 '("| *\\(<[0-9]+>\\) *|" (1 'org-formula t))) 2747 '("| *\\(<[0-9]+>\\) *" (1 'org-formula t)))
2687 ))) 2748 )))
2688 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords)) 2749 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords))
2689 ;; Now set the full font-lock-keywords 2750 ;; Now set the full font-lock-keywords
@@ -3048,7 +3109,10 @@ or nil."
3048 (error (outline-next-heading))) 3109 (error (outline-next-heading)))
3049 (prog1 (match-string 0) 3110 (prog1 (match-string 0)
3050 (funcall outline-level))))) 3111 (funcall outline-level)))))
3051 (unless (bolp) (newline)) 3112 (if (and (bolp)
3113 (save-excursion (backward-char 1) (not (org-invisible-p))))
3114 (open-line 1)
3115 (newline))
3052 (insert head) 3116 (insert head)
3053 (if (looking-at "[ \t]*") 3117 (if (looking-at "[ \t]*")
3054 (replace-match " ")) 3118 (replace-match " "))
@@ -4249,7 +4313,7 @@ used to insert the time stamp into the buffer to include the time."
4249 ;; the range start. 4313 ;; the range start.
4250 (if (save-excursion 4314 (if (save-excursion
4251 (re-search-backward 4315 (re-search-backward
4252 (concat org-ts-regexp "--\\=") 4316 (concat org-ts-regexp "--\\=") ; FIXME: exactly two minuses?
4253 (- (point) 20) t)) 4317 (- (point) 20) t))
4254 (apply 4318 (apply
4255 'encode-time 4319 'encode-time
@@ -4769,7 +4833,8 @@ The following commands are available:
4769 (if (featurep 'xemacs) [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse) 4833 (if (featurep 'xemacs) [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse)
4770(define-key org-agenda-keymap 4834(define-key org-agenda-keymap
4771 (if (featurep 'xemacs) [(button3)] [(mouse-3)]) 'org-agenda-show-mouse) 4835 (if (featurep 'xemacs) [(button3)] [(mouse-3)]) 'org-agenda-show-mouse)
4772(define-key org-agenda-keymap [follow-link] 'mouse-face) 4836(when org-agenda-mouse-1-follows-link
4837 (define-key org-agenda-keymap [follow-link] 'mouse-face))
4773(easy-menu-define org-agenda-menu org-agenda-mode-map "Agenda menu" 4838(easy-menu-define org-agenda-menu org-agenda-mode-map "Agenda menu"
4774 '("Agenda" 4839 '("Agenda"
4775 ("Agenda Files") 4840 ("Agenda Files")
@@ -5156,7 +5221,7 @@ NDAYS defaults to `org-agenda-ndays'."
5156 (d (- nt n1))) 5221 (d (- nt n1)))
5157 (- sd (+ (if (< d 0) 7 0) d))))) 5222 (- sd (+ (if (< d 0) 7 0) d)))))
5158 (day-numbers (list start)) 5223 (day-numbers (list start))
5159;FIXME (inhibit-redisplay t) 5224 (inhibit-redisplay t)
5160 s e rtn rtnall file date d start-pos end-pos todayp nd) 5225 s e rtn rtnall file date d start-pos end-pos todayp nd)
5161 (setq org-agenda-redo-command 5226 (setq org-agenda-redo-command
5162 (list 'org-agenda-list (list 'quote include-all) start-day ndays t)) 5227 (list 'org-agenda-list (list 'quote include-all) start-day ndays t))
@@ -5522,7 +5587,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
5522 (org-disable-agenda-to-diary t)) 5587 (org-disable-agenda-to-diary t))
5523 (save-excursion 5588 (save-excursion
5524 (save-window-excursion 5589 (save-window-excursion
5525 (list-diary-entries date 1))) 5590 (list-diary-entries date 1))) ;; Keep this name for now, compatibility
5526 (if (not (get-buffer fancy-diary-buffer)) 5591 (if (not (get-buffer fancy-diary-buffer))
5527 (setq entries nil) 5592 (setq entries nil)
5528 (with-current-buffer fancy-diary-buffer 5593 (with-current-buffer fancy-diary-buffer
@@ -5966,7 +6031,7 @@ the documentation of `org-diary'."
5966 (org-add-props txt nil 6031 (org-add-props txt nil
5967 'face 'org-scheduled-today 6032 'face 'org-scheduled-today
5968 'undone-face 'org-scheduled-today 'done-face 'org-done 6033 'undone-face 'org-scheduled-today 'done-face 'org-done
5969 'category category priority (+ 99 priority)) 6034 'category category 'priority (+ 99 priority))
5970 (org-add-props txt nil 'priority priority 'category category))) 6035 (org-add-props txt nil 'priority priority 'category category)))
5971 (push txt ee)) 6036 (push txt ee))
5972 (outline-next-heading)))) 6037 (outline-next-heading))))
@@ -6227,7 +6292,7 @@ only the correctly processes TXT should be returned - this is used by
6227 (file-name-sans-extension 6292 (file-name-sans-extension
6228 (file-name-nondirectory buffer-file-name)) 6293 (file-name-nondirectory buffer-file-name))
6229 ""))) 6294 "")))
6230 (tag (or (nth (1- (or (length tags) 0)) tags) "")) 6295 (tag (if tags (nth (1- (length tags)) tags) ""))
6231 time ;; needed for the eval of the prefix format 6296 time ;; needed for the eval of the prefix format
6232 (ts (if dotime (concat (if (stringp dotime) dotime "") txt))) 6297 (ts (if dotime (concat (if (stringp dotime) dotime "") txt)))
6233 (time-of-day (and dotime (org-get-time-of-day ts))) 6298 (time-of-day (and dotime (org-get-time-of-day ts)))
@@ -7282,7 +7347,10 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
7282 (format "Execute \"%s\" in shell? " 7347 (format "Execute \"%s\" in shell? "
7283 (org-add-props cmd nil 7348 (org-add-props cmd nil
7284 'face 'org-warning)))) 7349 'face 'org-warning))))
7285 (shell-command cmd) 7350 (progn
7351 (message "Executing %s..." cmd)
7352 (shell-command cmd)
7353 (message "Executing %s...done" cmd))
7286 (error "Abort")))) 7354 (error "Abort"))))
7287 7355
7288 (t 7356 (t
@@ -7670,6 +7738,28 @@ folders."
7670 (kill-this-buffer) 7738 (kill-this-buffer)
7671 (error "Message not found")))) 7739 (error "Message not found"))))
7672 7740
7741(defun org-upgrade-old-links (&optional query-description)
7742 "Transfer old <...> style links to new [[...]] style links.
7743With arg query-description, ask at each match for a description text to use
7744for this link."
7745 (interactive (list (y-or-n-p "Would you like to be queried for a description at each link?")))
7746 (save-excursion
7747 (goto-char (point-min))
7748 (let ((re (concat "\\([^[]\\)<\\("
7749 "\\(" (mapconcat 'identity org-link-types "\\|")
7750 "\\):"
7751 "[^" org-non-link-chars "]+\\)>"))
7752 l1 l2 (cnt 0))
7753 (while (re-search-forward re nil t)
7754 (setq cnt (1+ cnt)
7755 l1 (org-match-string-no-properties 2)
7756 l2 (save-match-data (org-link-escape l1)))
7757 (when query-description (setq l1 (read-string "Desc: " l1)))
7758 (if (equal l1 l2)
7759 (replace-match (concat (match-string 1) "[[" l1 "]]") t t)
7760 (replace-match (concat (match-string 1) "[[" l2 "][" l1 "]]") t t)))
7761 (message "%d matches have beed treated" cnt))))
7762
7673(defun org-open-file (path &optional in-emacs line search) 7763(defun org-open-file (path &optional in-emacs line search)
7674 "Open the file at PATH. 7764 "Open the file at PATH.
7675First, this expands any special file name abbreviations. Then the 7765First, this expands any special file name abbreviations. Then the
@@ -8619,7 +8709,7 @@ This is being used to correctly align a single field after TAB or RET.")
8619 (> (org-string-width xx) fmax)) 8709 (> (org-string-width xx) fmax))
8620 (org-add-props xx nil 8710 (org-add-props xx nil
8621 'help-echo 8711 'help-echo
8622 (concat "Clipped table field, use C-c ` to edit. Full value is:\n" (copy-sequence xx))) 8712 (concat "Clipped table field, use C-c ` to edit. Full value is:\n" (org-no-properties (copy-sequence xx))))
8623 (setq f1 (min fmax (or (string-match org-bracket-link-regexp xx) fmax))) 8713 (setq f1 (min fmax (or (string-match org-bracket-link-regexp xx) fmax)))
8624 (unless (> f1 1) 8714 (unless (> f1 1)
8625 (error "Cannot narrow field starting with wide link \"%s\"" 8715 (error "Cannot narrow field starting with wide link \"%s\""
@@ -10153,7 +10243,8 @@ $1-> %s\n" orig formula form))
10153 (org-table-align))))) 10243 (org-table-align)))))
10154 10244
10155(defun org-table-recalculate (&optional all noalign) 10245(defun org-table-recalculate (&optional all noalign)
10156 "Recalculate the current table line by applying all stored formulas." 10246 "Recalculate the current table line by applying all stored formulas.
10247With prefix arg ALL, do this for all lines in the table."
10157 (interactive "P") 10248 (interactive "P")
10158 (or (memq this-command org-recalc-commands) 10249 (or (memq this-command org-recalc-commands)
10159 (setq org-recalc-commands (cons this-command org-recalc-commands))) 10250 (setq org-recalc-commands (cons this-command org-recalc-commands)))
@@ -11376,7 +11467,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
11376 (mapconcat 'identity org-todo-keywords " ") 11467 (mapconcat 'identity org-todo-keywords " ")
11377 "Me Jason Marie DONE") 11468 "Me Jason Marie DONE")
11378 (cdr (assoc org-startup-folded 11469 (cdr (assoc org-startup-folded
11379 '((nil . "nofold")(t . "fold")(content . "content")))) 11470 '((nil . "showall") (t . "overview") (content . "content"))))
11380 (if org-startup-with-deadline-check "dlcheck" "nodlcheck") 11471 (if org-startup-with-deadline-check "dlcheck" "nodlcheck")
11381 (if org-odd-levels-only "odd" "oddeven") 11472 (if org-odd-levels-only "odd" "oddeven")
11382 (if org-hide-leading-stars "hidestars" "showstars") 11473 (if org-hide-leading-stars "hidestars" "showstars")
@@ -11718,8 +11809,9 @@ headlines. The default is 3. Lower levels will become bulleted lists."
11718 (concat "<img src=\"" thefile "\"/>") 11809 (concat "<img src=\"" thefile "\"/>")
11719 (concat "<a href=\"" thefile "\">" desc "</a>"))))) 11810 (concat "<a href=\"" thefile "\">" desc "</a>")))))
11720 ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) 11811 ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell"))
11721 (setq rpl (concat "<i>&lt;" type ":" path "&gt;</i>")))) 11812 (setq rpl (concat "<i>&lt;" type ":"
11722 ;; FIXME: We get to see the escaped links!!!!! 11813 (save-match-data (org-link-unescape path))
11814 "&gt;</i>"))))
11723 (setq line (replace-match rpl t t line) 11815 (setq line (replace-match rpl t t line)
11724 start (+ start (length rpl)))) 11816 start (+ start (length rpl))))
11725 ;; TODO items 11817 ;; TODO items
@@ -12196,6 +12288,89 @@ file, but with extension `.ics'."
12196 (interactive) 12288 (interactive)
12197 (org-export-icalendar nil buffer-file-name)) 12289 (org-export-icalendar nil buffer-file-name))
12198 12290
12291(defun org-export-as-xml ()
12292 "Export current buffer as XOXO XML buffer."
12293 (interactive)
12294 (cond ((eq org-export-xml-type 'xoxo)
12295 (org-export-as-xoxo (current-buffer)))))
12296
12297(defun org-export-as-xoxo-insert-into (buffer &rest output)
12298 (with-current-buffer buffer
12299 (apply 'insert output)))
12300
12301(defun org-export-as-xoxo (&optional buffer)
12302 "Export the org buffer as XOXO.
12303The XOXO buffer is named *xoxo-<source buffer name>*"
12304 (interactive (list (current-buffer)))
12305 ;; A quickie abstraction
12306
12307 ;; Output everything as XOXO
12308 (with-current-buffer (get-buffer buffer)
12309 (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
12310 (let* ((filename (concat (file-name-sans-extension buffer-file-name)
12311 ".xml"))
12312 (out (find-file-noselect filename))
12313 (last-level 1)
12314 (hanging-li nil))
12315 ;; Check the output buffer is empty.
12316 (with-current-buffer out (erase-buffer))
12317 ;; Kick off the output
12318 (org-export-as-xoxo-insert-into out "<ol class='xoxo'>\n")
12319 (while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
12320 (let* ((hd (match-string-no-properties 1))
12321 (level (length hd))
12322 (text (concat
12323 (match-string-no-properties 2)
12324 (save-excursion
12325 (goto-char (match-end 0))
12326 (let ((str ""))
12327 (catch 'loop
12328 (while 't
12329 (forward-line)
12330 (if (looking-at "^[ \t]\\(.*\\)")
12331 (setq str (concat str (match-string-no-properties 1)))
12332 (throw 'loop str)))))))))
12333
12334 ;; Handle level rendering
12335 (cond
12336 ((> level last-level)
12337 (org-export-as-xoxo-insert-into out "\n<ol>\n"))
12338
12339 ((< level last-level)
12340 (dotimes (- (- last-level level) 1)
12341 (if hanging-li
12342 (org-export-as-xoxo-insert-into out "</li>\n"))
12343 (org-export-as-xoxo-insert-into out "</ol>\n"))
12344 (when hanging-li
12345 (org-export-as-xoxo-insert-into out "</li>\n")
12346 (setq hanging-li nil)))
12347
12348 ((equal level last-level)
12349 (if hanging-li
12350 (org-export-as-xoxo-insert-into out "</li>\n")))
12351 )
12352
12353 (setq last-level level)
12354
12355 ;; And output the new li
12356 (setq hanging-li 't)
12357 (if (equal ?+ (elt text 0))
12358 (org-export-as-xoxo-insert-into out "<li class='" (substring text 1) "'>")
12359 (org-export-as-xoxo-insert-into out "<li>" text))))
12360
12361 ;; Finally finish off the ol
12362 (dotimes (- last-level 1)
12363 (if hanging-li
12364 (org-export-as-xoxo-insert-into out "</li>\n"))
12365 (org-export-as-xoxo-insert-into out "</ol>\n"))
12366
12367 ;; Finish the buffer off and clean it up.
12368 (switch-to-buffer-other-window out)
12369 (indent-region (point-min) (point-max))
12370 (save-buffer)
12371 (goto-char (point-min))
12372 )))
12373
12199;;;###autoload 12374;;;###autoload
12200(defun org-export-icalendar-all-agenda-files () 12375(defun org-export-icalendar-all-agenda-files ()
12201 "Export all files in `org-agenda-files' to iCalendar .ics files. 12376 "Export all files in `org-agenda-files' to iCalendar .ics files.
@@ -12742,19 +12917,36 @@ See the individual commands for more information."
12742 (org-paste-subtree arg))) 12917 (org-paste-subtree arg)))
12743 12918
12744(defun org-ctrl-c-ctrl-c (&optional arg) 12919(defun org-ctrl-c-ctrl-c (&optional arg)
12745 "Call realign table, or recognize a table.el table, or update keywords. 12920 "Set tags in headline, or update according to changed information at point.
12746When the cursor is inside a table created by the table.el package, 12921
12747activate that table. Otherwise, if the cursor is at a normal table 12922This command does many different things, depending on context:
12748created with org.el, re-align that table. This command works even if 12923
12749the automatic table editor has been turned off. 12924- If the cursor is in a headline, prompt for tags and insert them
12750 12925 into the current line, aligned to `org-tags-column'. When called
12751If the cursor is in a headline, prompt for tags and insert them into 12926 with prefix arg, realign all tags in the current buffer.
12752the current line, aligned to `org-tags-column'. When in a headline and 12927
12753called with prefix arg, realign all tags in the current buffer. 12928- If the cursor is in one of the special #+KEYWORD lines, this
12754 12929 triggers scanning the buffer for these lines and updating the
12755If the cursor is in one of the special #+KEYWORD lines, this triggers 12930 information.
12756scanning the buffer for these lines and updating the information. 12931
12757If the cursor is on a #+TBLFM line, re-apply the formulae to the table." 12932- If the cursor is inside a table, realign the table. This command
12933 works even if the automatic table editor has been turned off.
12934
12935- If the cursor is on a #+TBLFM line, re-apply the formulas to
12936 the entire table.
12937
12938- If the cursor is inside a table created by the table.el package,
12939 activate that table.
12940
12941- If the current buffer is a remember buffer, close note and file it.
12942 with a prefix argument, file it without further interaction to the default
12943 location.
12944
12945- If the cursor is on a <<<target>>>, update radio targets and corresponding
12946 links in this buffer.
12947
12948- If the cursor is on a numbered item in a plain list, renumber the
12949 ordered list."
12758 (interactive "P") 12950 (interactive "P")
12759 (let ((org-enable-table-editor t)) 12951 (let ((org-enable-table-editor t))
12760 (cond 12952 (cond
@@ -13091,9 +13283,10 @@ With optional NODE, go directly to that node."
13091 ;; through to `fill-paragraph' when appropriate. 13283 ;; through to `fill-paragraph' when appropriate.
13092 (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph) 13284 (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph)
13093 ;; Adaptive filling: To get full control, first make sure that 13285 ;; Adaptive filling: To get full control, first make sure that
13094 ;; `adaptive-fill-regexp' never matches. Then install our won matcher. 13286 ;; `adaptive-fill-regexp' never matches. Then install our own matcher.
13095 (setq adaptive-fill-regexp "\000") 13287 (set (make-local-variable 'adaptive-fill-regexp) "\000")
13096 (setq adaptive-fill-function 'org-adaptive-fill-function)) 13288 (set (make-local-variable 'adaptive-fill-function)
13289 'org-adaptive-fill-function))
13097 13290
13098(defun org-fill-paragraph (&optional justify) 13291(defun org-fill-paragraph (&optional justify)
13099 "Re-align a table, pass through to fill-paragraph if no table." 13292 "Re-align a table, pass through to fill-paragraph if no table."
@@ -13368,7 +13561,6 @@ Show the heading too, if it is currently invisible."
13368 (or (match-beginning 1) (point-max))) 13561 (or (match-beginning 1) (point-max)))
13369 (if org-noutline-p nil ?\n)))) 13562 (if org-noutline-p nil ?\n))))
13370 13563
13371
13372(defun org-make-options-regexp (kwds) 13564(defun org-make-options-regexp (kwds)
13373 "Make a regular expression for keyword lines." 13565 "Make a regular expression for keyword lines."
13374 (concat 13566 (concat
@@ -13402,114 +13594,6 @@ Show the heading too, if it is currently invisible."
13402 13594
13403(run-hooks 'org-load-hook) 13595(run-hooks 'org-load-hook)
13404 13596
13405;; Experimental code
13406;; FIXME: Move this code when it is ready.
13407
13408(defun org-upgrade-old-links (&optional query-description)
13409 "Transfer old <...> style links to new [[...]] style links.
13410With arg query-description, ask at each match for a description text to use
13411for this link."
13412 (interactive (list (y-or-n-p "Would you like to be queried for a description at each link?")))
13413 (save-excursion
13414 (goto-char (point-min))
13415 (let ((re (concat "\\([^[]\\)<\\("
13416 "\\(" (mapconcat 'identity org-link-types "\\|")
13417 "\\):"
13418 "[^" org-non-link-chars "]+\\)>"))
13419 l1 l2 (cnt 0))
13420 (while (re-search-forward re nil t)
13421 (setq cnt (1+ cnt)
13422 l1 (org-match-string-no-properties 2)
13423 l2 (save-match-data (org-link-escape l1)))
13424 (when query-description (setq l1 (read-string "Desc: " l1)))
13425 (if (equal l1 l2)
13426 (replace-match (concat (match-string 1) "[[" l1 "]]") t t)
13427 (replace-match (concat (match-string 1) "[[" l2 "][" l1 "]]") t t)))
13428 (message "%d matches have beed treated" cnt))))
13429
13430(defun org-export-as-xml ()
13431 "Export current buffer as XOXO XML buffer."
13432 (interactive)
13433 (cond ((eq org-export-xml-type 'xoxo)
13434 (org-export-as-xoxo (current-buffer)))))
13435
13436(defun org-export-as-xoxo-insert-into (buffer &rest output)
13437 (with-current-buffer buffer
13438 (apply 'insert output)))
13439
13440(defun org-export-as-xoxo (&optional buffer)
13441 "Export the org buffer as XOXO.
13442The XOXO buffer is named *xoxo-<source buffer name>*"
13443 (interactive (list (current-buffer)))
13444 ;; A quickie abstraction
13445
13446 ;; Output everything as XOXO
13447 (with-current-buffer (get-buffer buffer)
13448 (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
13449 (let* ((filename (concat (file-name-sans-extension buffer-file-name)
13450 ".xml"))
13451 (out (find-file-noselect filename))
13452 (last-level 1)
13453 (hanging-li nil))
13454 ;; Check the output buffer is empty.
13455 (with-current-buffer out (erase-buffer))
13456 ;; Kick off the output
13457 (org-export-as-xoxo-insert-into out "<ol class='xoxo'>\n")
13458 (while (re-search-forward "^\\(\\*+\\) \\(.+\\)" (point-max) 't)
13459 (let* ((hd (match-string-no-properties 1))
13460 (level (length hd))
13461 (text (concat
13462 (match-string-no-properties 2)
13463 (save-excursion
13464 (goto-char (match-end 0))
13465 (let ((str ""))
13466 (catch 'loop
13467 (while 't
13468 (forward-line)
13469 (if (looking-at "^[ \t]\\(.*\\)")
13470 (setq str (concat str (match-string-no-properties 1)))
13471 (throw 'loop str)))))))))
13472
13473 ;; Handle level rendering
13474 (cond
13475 ((> level last-level)
13476 (org-export-as-xoxo-insert-into out "\n<ol>\n"))
13477
13478 ((< level last-level)
13479 (dotimes (- (- last-level level) 1)
13480 (if hanging-li
13481 (org-export-as-xoxo-insert-into out "</li>\n"))
13482 (org-export-as-xoxo-insert-into out "</ol>\n"))
13483 (when hanging-li
13484 (org-export-as-xoxo-insert-into out "</li>\n")
13485 (setq hanging-li nil)))
13486
13487 ((equal level last-level)
13488 (if hanging-li
13489 (org-export-as-xoxo-insert-into out "</li>\n")))
13490 )
13491
13492 (setq last-level level)
13493
13494 ;; And output the new li
13495 (setq hanging-li 't)
13496 (if (equal ?+ (elt text 0))
13497 (org-export-as-xoxo-insert-into out "<li class='" (substring text 1) "'>")
13498 (org-export-as-xoxo-insert-into out "<li>" text))))
13499
13500 ;; Finally finish off the ol
13501 (dotimes (- last-level 1)
13502 (if hanging-li
13503 (org-export-as-xoxo-insert-into out "</li>\n"))
13504 (org-export-as-xoxo-insert-into out "</ol>\n"))
13505
13506 ;; Finish the buffer off and clean it up.
13507 (switch-to-buffer-other-window out)
13508 (indent-region (point-min) (point-max) nil)
13509 (save-buffer)
13510 (goto-char (point-min))
13511 )))
13512
13513;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 13597;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
13514;;; org.el ends here 13598;;; org.el ends here
13515 13599
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 97153e31a25..8ca7c3026e8 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -594,20 +594,24 @@ An alternative value is \" . \", if you use a font with a narrow period."
594 '(face subscript display (raise -0.3)) 594 '(face subscript display (raise -0.3))
595 '(face superscript display (raise +0.3))))) 595 '(face superscript display (raise +0.3)))))
596 596
597(defun tex-font-lock-match-suscript (limit)
598 "Match subscript and superscript patterns up to LIMIT."
599 (when (re-search-forward "[_^] *\\([^\n\\{}]\\|\
600\\\\\\([a-zA-Z@]+\\|[^ \t\n]\\)\\|{[^\\{]*}\\|\\({\\)\\)" limit t)
601 (when (match-end 3)
602 (let ((beg (match-beginning 3))
603 (end (save-restriction
604 (narrow-to-region (point-min) limit)
605 (condition-case nil (scan-lists (point) 1 1) (error nil)))))
606 (store-match-data (if end
607 (list (match-beginning 0) end beg end)
608 (list beg beg beg beg)))))
609 t))
610
597(defconst tex-font-lock-keywords-3 611(defconst tex-font-lock-keywords-3
598 (append tex-font-lock-keywords-2 612 (append tex-font-lock-keywords-2
599 (eval-when-compile 613 '((tex-font-lock-match-suscript
600 (let ((general "\\([a-zA-Z@]+\\|[^ \t\n]\\)") 614 (1 (tex-font-lock-suscript (match-beginning 0)) append))))
601 (slash "\\\\")
602 ;; This is not the same regexp as before: it has a `+' removed.
603 ;; The + makes the matching faster in the above cases (where we can
604 ;; exit as soon as the match fails) but would make this matching
605 ;; degenerate to nasty complexity (because we try to match the
606 ;; closing brace, which forces trying all matching combinations).
607 (arg "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*"))
608 `((,(concat "[_^] *\\([^\n\\{}#]\\|" slash general "\\|#[0-9]\\|" arg "}\\)")
609 (1 (tex-font-lock-suscript (match-beginning 0))
610 append))))))
611 "Experimental expressions to highlight in TeX modes.") 615 "Experimental expressions to highlight in TeX modes.")
612 616
613(defvar tex-font-lock-keywords tex-font-lock-keywords-1 617(defvar tex-font-lock-keywords tex-font-lock-keywords-1
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 3e3fcf78ae6..1c51c4c55ab 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -5,7 +5,7 @@
5 5
6;; This file is part of GNU Emacs. 6;; This file is part of GNU Emacs.
7 7
8;; Maintainer's Time-stamp: <2006-02-06 15:11:58 ttn> 8;; Maintainer's Time-stamp: <2006-04-12 20:30:56 rms>
9;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org> 9;; Maintainer: Stephen Gildea <gildea@stop.mail-abuse.org>
10;; Keywords: tools 10;; Keywords: tools
11 11
@@ -93,6 +93,7 @@ historical default."
93 :type 'string 93 :type 'string
94 :group 'time-stamp 94 :group 'time-stamp
95 :version "20.1") 95 :version "20.1")
96;;;###autoload(put 'time-stamp-format 'safe-local-variable 'stringp)
96 97
97(defcustom time-stamp-active t 98(defcustom time-stamp-active t
98 "*Non-nil to enable time-stamping of buffers by \\[time-stamp]. 99 "*Non-nil to enable time-stamping of buffers by \\[time-stamp].
@@ -150,7 +151,7 @@ Do not change `time-stamp-line-limit', `time-stamp-start',
150incompatible with other people's files! If you must change them for some 151incompatible with other people's files! If you must change them for some
151application, do so in the local variables section of the time-stamped file 152application, do so in the local variables section of the time-stamped file
152itself.") 153itself.")
153 154;;;###autoload(put 'time-stamp-line-limit 'safe-local-variable 'integerp)
154 155
155(defvar time-stamp-start "Time-stamp:[ \t]+\\\\?[\"<]+" ;Do not change! 156(defvar time-stamp-start "Time-stamp:[ \t]+\\\\?[\"<]+" ;Do not change!
156 "Regexp after which the time stamp is written by \\[time-stamp]. 157 "Regexp after which the time stamp is written by \\[time-stamp].
@@ -163,7 +164,7 @@ Do not change `time-stamp-line-limit', `time-stamp-start',
163incompatible with other people's files! If you must change them for some 164incompatible with other people's files! If you must change them for some
164application, do so in the local variables section of the time-stamped file 165application, do so in the local variables section of the time-stamped file
165itself.") 166itself.")
166 167;;;###autoload(put 'time-stamp-start 'safe-local-variable t)
167 168
168(defvar time-stamp-end "\\\\?[\">]" ;Do not change! 169(defvar time-stamp-end "\\\\?[\">]" ;Do not change!
169 "Regexp marking the text after the time stamp. 170 "Regexp marking the text after the time stamp.
@@ -183,6 +184,7 @@ Do not change `time-stamp-start', `time-stamp-end', `time-stamp-pattern',
183or `time-stamp-inserts-lines' for yourself or you will be incompatible 184or `time-stamp-inserts-lines' for yourself or you will be incompatible
184with other people's files! If you must change them for some application, 185with other people's files! If you must change them for some application,
185do so in the local variables section of the time-stamped file itself.") 186do so in the local variables section of the time-stamped file itself.")
187;;;###autoload(put 'time-stamp-end 'safe-local-variable t)
186 188
187 189
188(defvar time-stamp-inserts-lines nil ;Do not change! 190(defvar time-stamp-inserts-lines nil ;Do not change!
@@ -199,6 +201,7 @@ Do not change `time-stamp-end' or `time-stamp-inserts-lines' for
199yourself or you will be incompatible with other people's files! 201yourself or you will be incompatible with other people's files!
200If you must change them for some application, do so in the local 202If you must change them for some application, do so in the local
201variables section of the time-stamped file itself.") 203variables section of the time-stamped file itself.")
204;;;###autoload(put 'time-stamp-inserts-lines 'safe-local-variable t)
202 205
203 206
204(defvar time-stamp-count 1 ;Do not change! 207(defvar time-stamp-count 1 ;Do not change!
@@ -209,6 +212,7 @@ Do not change `time-stamp-count' for yourself or you will be
209incompatible with other people's files! If you must change it for 212incompatible with other people's files! If you must change it for
210some application, do so in the local variables section of the 213some application, do so in the local variables section of the
211time-stamped file itself.") 214time-stamped file itself.")
215;;;###autoload(put 'time-stamp-count 'safe-local-variable 'integerp)
212 216
213 217
214(defvar time-stamp-pattern nil ;Do not change! 218(defvar time-stamp-pattern nil ;Do not change!
@@ -244,6 +248,7 @@ Do not change `time-stamp-pattern' `time-stamp-line-limit',
244incompatible with other people's files! If you must change them for 248incompatible with other people's files! If you must change them for
245some application, do so only in the local variables section of the 249some application, do so only in the local variables section of the
246time-stamped file itself.") 250time-stamped file itself.")
251;;;###autoload(put 'time-stamp-pattern 'safe-local-variable 'stringp)
247 252
248 253
249 254
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 8dc811c09e6..cacd6f59670 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -47,11 +47,15 @@
47;; would be accompanied by a full redisplay. 47;; would be accompanied by a full redisplay.
48 48
49(define-minor-mode tooltip-mode 49(define-minor-mode tooltip-mode
50 "Toggle Tooltip display. 50 "Toggle Tooltip mode.
51With ARG, turn tooltip mode on if and only if ARG is positive. 51With ARG, turn Tooltip mode on if and only if ARG is positive.
52When this minor mode is enabled, Emacs displays help text 52When this minor mode is enabled, Emacs displays help text
53in a pop-up window on mouse-over. When it is disabled, 53in a pop-up window for buttons and menu items that you put the mouse on.
54Emacs displays the help text in the echo area instead." 54\(However, if `tooltip-use-echo-area' is non-nil, this and
55all pop-up help appears in the echo area.)
56
57When Tooltip mode is disabled, Emacs displays one line of
58the help text in the echo area, and does not make a pop-up window."
55 :global t 59 :global t
56 :init-value (not (or noninteractive 60 :init-value (not (or noninteractive
57 emacs-basic-display 61 emacs-basic-display
@@ -142,7 +146,9 @@ position to pop up the tooltip."
142 :group 'basic-faces) 146 :group 'basic-faces)
143 147
144(defcustom tooltip-use-echo-area nil 148(defcustom tooltip-use-echo-area nil
145 "Use the echo area instead of tooltip frames for help and GUD tooltips." 149 "Use the echo area instead of tooltip frames for help and GUD tooltips.
150To display multi-line help text in the echo area, set this to t
151and enable `tooltip-mode'."
146 :type 'boolean 152 :type 'boolean
147 :group 'tooltip) 153 :group 'tooltip)
148 154
diff --git a/lisp/vc.el b/lisp/vc.el
index 19b2f0f4a72..61b8aa05a4b 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -3107,7 +3107,11 @@ colors. `vc-annotate-background' specifies the background color."
3107 (vc-ensure-vc-buffer) 3107 (vc-ensure-vc-buffer)
3108 (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef 3108 (setq vc-annotate-display-mode display-mode) ;Not sure why. --Stef
3109 (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev)) 3109 (let* ((temp-buffer-name (format "*Annotate %s (rev %s)*" (buffer-name) rev))
3110 (temp-buffer-show-function 'vc-annotate-display-select)) 3110 (temp-buffer-show-function 'vc-annotate-display-select)
3111 ;; If BUF is specified, we presume the caller maintains current line,
3112 ;; so we don't need to do it here. This implementation may give
3113 ;; strange results occasionally in the case of REV != WORKFILE-REV.
3114 (current-line (unless buf (line-number-at-pos))))
3111 (message "Annotating...") 3115 (message "Annotating...")
3112 ;; If BUF is specified it tells in which buffer we should put the 3116 ;; If BUF is specified it tells in which buffer we should put the
3113 ;; annotations. This is used when switching annotations to another 3117 ;; annotations. This is used when switching annotations to another
@@ -3129,6 +3133,8 @@ colors. `vc-annotate-background' specifies the background color."
3129 (set (make-local-variable 'vc-annotate-parent-rev) rev) 3133 (set (make-local-variable 'vc-annotate-parent-rev) rev)
3130 (set (make-local-variable 'vc-annotate-parent-display-mode) 3134 (set (make-local-variable 'vc-annotate-parent-display-mode)
3131 display-mode))) 3135 display-mode)))
3136 (when current-line
3137 (goto-line current-line temp-buffer-name))
3132 (message "Annotating... done"))) 3138 (message "Annotating... done")))
3133 3139
3134(defun vc-annotate-prev-version (prefix) 3140(defun vc-annotate-prev-version (prefix)
@@ -3310,8 +3316,8 @@ The annotations are relative to the current time, unless overridden by OFFSET."
3310 (let* ((color (or (vc-annotate-compcar difference vc-annotate-color-map) 3316 (let* ((color (or (vc-annotate-compcar difference vc-annotate-color-map)
3311 (cons nil vc-annotate-very-old-color))) 3317 (cons nil vc-annotate-very-old-color)))
3312 ;; substring from index 1 to remove any leading `#' in the name 3318 ;; substring from index 1 to remove any leading `#' in the name
3313 (face-name (concat "vc-annotate-face-" 3319 (face-name (concat "vc-annotate-face-"
3314 (if (string-equal 3320 (if (string-equal
3315 (substring (cdr color) 0 1) "#") 3321 (substring (cdr color) 0 1) "#")
3316 (substring (cdr color) 1) 3322 (substring (cdr color) 1)
3317 (cdr color)))) 3323 (cdr color))))
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index f4ad95fc04e..48205488ef8 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,35 @@
12006-04-18 Richard Stallman <rms@gnu.org>
2
3 * tips.texi (Coding Conventions): Explain when the package's
4 prefix should appear later on (not at the start of the name).
5
6 * searching.texi (String Search): Clarify effect of NOERROR.
7
8 * modes.texi (Imenu): Clarify what special items do.
9
10 * hooks.texi (Standard Hooks): Delete text about old hook names.
11
122006-04-17 Romain Francoise <romain@orebokech.com>
13
14 * variables.texi (Local Variables): Update the default value of
15 `max-specpdl-size'.
16
172006-04-15 Michael Olson <mwolson@gnu.org>
18
19 * processes.texi (Transaction Queues): Mention the new optional
20 `delay-question' argument for `tq-enqueue'.
21
222006-04-13 Bill Wohler <wohler@newt.com>
23
24 * customize.texi (Common Keywords): Use dotted notation for
25 :package-version value. Specify its values. Improve documentation
26 for customize-package-emacs-version-alist.
27
282006-04-12 Bill Wohler <wohler@newt.com>
29
30 * customize.texi (Common Keywords): Move description of
31 customize-package-emacs-version-alist to @defvar.
32
12006-04-10 Bill Wohler <wohler@newt.com> 332006-04-10 Bill Wohler <wohler@newt.com>
2 34
3 * customize.texi (Common Keywords): Add :package-version. 35 * customize.texi (Common Keywords): Add :package-version.
@@ -43,8 +75,7 @@
43 75
442006-03-19 Alan Mackenzie <acm@muc.de> 762006-03-19 Alan Mackenzie <acm@muc.de>
45 77
46 * text.texi (Special Properties): Clarify the definition of 78 * text.texi (Special Properties): Clarify `fontified' property.
47 'fontified.
48 79
492006-03-16 Richard Stallman <rms@gnu.org> 802006-03-16 Richard Stallman <rms@gnu.org>
50 81
diff --git a/lispref/customize.texi b/lispref/customize.texi
index a13793ecb54..76b1c1a1a93 100644
--- a/lispref/customize.texi
+++ b/lispref/customize.texi
@@ -131,25 +131,47 @@ This option specifies that the item was first introduced in Emacs
131version @var{version}, or that its default value was changed in that 131version @var{version}, or that its default value was changed in that
132version. The value @var{version} must be a string. 132version. The value @var{version} must be a string.
133 133
134@item :package-version '(@var{package} @var{version}) 134@item :package-version '(@var{package} . @var{version})
135This option specifies that the item was first introduced in 135This option specifies that the item was first introduced in
136@var{package} version @var{version}, or that its default value was 136@var{package} version @var{version}, or that its default value was
137changed in that version. This keyword takes priority over :version. 137changed in that version. This keyword takes priority over :version.
138The value of @var{package} is a symbol and @var{version} is a string.
138The @var{package} and @var{version} must appear in the alist 139The @var{package} and @var{version} must appear in the alist
139@code{customize-package-emacs-version-alist}. This alist maps packages 140@code{customize-package-emacs-version-alist}. Since @var{package} must
140to alists that map all package versions used with the 141be unique and the user might see it in an error message, a good choice
141@code{:package-version} keyword to Emacs versions. Packages are 142is the official name of the package, such as MH-E or Gnus.
142symbols and versions are strings. For example, the MH-E package 143
143updates this alist with the following: 144@end table
145
146Packages that use the @code{:package-version} keyword must also update
147the @code{customize-package-emacs-version-alist} variable.
148
149@defvar customize-package-emacs-version-alist
150This alist provides a mapping for the versions of Emacs that are
151associated with versions of a package listed in the
152@code{:package-version} keyword. Its elements look like this:
153
154@example
155(@var{package} (@var{pversion} . @var{eversion})@dots{})
156@end example
157
158For each @var{package}, which is a symbol, there are one or more
159elements that contain a package version @var{pversion} with an
160associated Emacs version @var{eversion}. These versions are strings.
161For example, the MH-E package updates this alist with the following:
144 162
145@smallexample 163@smallexample
146(add-to-list 'customize-package-emacs-version-alist 164(add-to-list 'customize-package-emacs-version-alist
147 '(MH-E ("6.0" "22.1") ("6.1" "22.1") ("7.0" "22.1") 165 '(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
148 ("7.1" "22.1") ("7.2" "22.1") ("7.3" "22.1") 166 ("7.1" . "22.1") ("7.2" . "22.1") ("7.3" . "22.1")
149 ("7.4" "22.1") ("8.0" "22.1"))) 167 ("7.4" . "22.1") ("8.0" . "22.1")))
150@end smallexample 168@end smallexample
151 169
152@end table 170The value of @var{package} needs to be unique and it needs to match
171the @var{package} value appearing in the @code{:package-version}
172keyword. Since the user might see the value in a error message, a good
173choice is the official name of the package, such as MH-E or Gnus.
174@end defvar
153 175
154@node Group Definitions 176@node Group Definitions
155@section Defining Custom Groups 177@section Defining Custom Groups
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index 2ba06a2b19a..562d728339e 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -31,11 +31,6 @@ these functions are called in a special way (they are passed arguments,
31or their values are used). The variables whose names end in 31or their values are used). The variables whose names end in
32@samp{-function} have single functions as their values. 32@samp{-function} have single functions as their values.
33 33
34(In older Emacs versions, some normal hooks had names ending in
35@samp{-hooks} or @samp{-functions}, and some abnormal hooks had names
36ending in @samp{-hook}. We have renamed all of these to conform to
37the above conventions.)
38
39@c We need to xref to where each hook is documented or else document 34@c We need to xref to where each hook is documented or else document
40@c it here. 35@c it here.
41 36
diff --git a/lispref/modes.texi b/lispref/modes.texi
index fc1953d24d9..b33424a58be 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2174,10 +2174,9 @@ An element can also look like this:
2174(@var{menu-title} @var{regexp} @var{index} @var{function} @var{arguments}@dots{}) 2174(@var{menu-title} @var{regexp} @var{index} @var{function} @var{arguments}@dots{})
2175@end example 2175@end example
2176 2176
2177Like in the previous case, each match for this element creates an 2177Each match for this element creates an index item, and when the index
2178index item. However, if this index item is selected by the user, it 2178item is selected by the user, it calls @var{function} with arguments
2179calls @var{function} with arguments consisting of the item name, the 2179consisting of the item name, the buffer position, and @var{arguments}.
2180buffer position, and @var{arguments}.
2181 2180
2182For Emacs Lisp mode, @code{imenu-generic-expression} could look like 2181For Emacs Lisp mode, @code{imenu-generic-expression} could look like
2183this: 2182this:
diff --git a/lispref/processes.texi b/lispref/processes.texi
index 5f0cfb0edf0..44da398770d 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -1508,7 +1508,7 @@ process, or it may be a TCP connection to a server, possibly on another
1508machine. 1508machine.
1509@end defun 1509@end defun
1510 1510
1511@defun tq-enqueue queue question regexp closure fn 1511@defun tq-enqueue queue question regexp closure fn &optional delay-question
1512This function sends a transaction to queue @var{queue}. Specifying the 1512This function sends a transaction to queue @var{queue}. Specifying the
1513queue has the effect of specifying the subprocess to talk to. 1513queue has the effect of specifying the subprocess to talk to.
1514 1514
@@ -1521,6 +1521,10 @@ The argument @var{regexp} is a regular expression that should match
1521text at the end of the entire answer, but nothing before; that's how 1521text at the end of the entire answer, but nothing before; that's how
1522@code{tq-enqueue} determines where the answer ends. 1522@code{tq-enqueue} determines where the answer ends.
1523 1523
1524If the argument @var{delay-question} is non-nil, delay sending this
1525question until the process has finished replying to any previous
1526questions. This produces more reliable results with some processes."
1527
1524The return value of @code{tq-enqueue} itself is not meaningful. 1528The return value of @code{tq-enqueue} itself is not meaningful.
1525@end defun 1529@end defun
1526 1530
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 9b80fdfd930..644376f5cdd 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -86,6 +86,10 @@ upper bound and returns @code{nil}. (It would be more consistent now to
86return the new position of point in that case, but some existing 86return the new position of point in that case, but some existing
87programs may depend on a value of @code{nil}.) 87programs may depend on a value of @code{nil}.)
88 88
89The argument @var{noerror} only affects valid searches which fail to
90find a match. Invalid arguments cause errors regardless of
91@var{noerror}.
92
89If @var{repeat} is supplied (it must be a positive number), then the 93If @var{repeat} is supplied (it must be a positive number), then the
90search is repeated that many times (each time starting at the end of the 94search is repeated that many times (each time starting at the end of the
91previous time's match). If these successive searches succeed, the 95previous time's match). If these successive searches succeed, the
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 8b033139275..889ac3e6a6d 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -56,9 +56,13 @@ distinguish your program from other Lisp programs.@footnote{The
56benefits of a Common Lisp-style package system are considered not to 56benefits of a Common Lisp-style package system are considered not to
57outweigh the costs.} Then take care to begin the names of all global 57outweigh the costs.} Then take care to begin the names of all global
58variables, constants, and functions in your program with the chosen 58variables, constants, and functions in your program with the chosen
59prefix. This helps avoid name conflicts. (Occasionally, for a command 59prefix. This helps avoid name conflicts.
60name intended for users to use, it is cleaner if some words come 60
61before the package name prefix.) 61Occasionally, for a command name intended for users to use, it is more
62convenient if some words come before the package's name prefix. And
63constructs that define functions, variables, etc., work better if they
64start with @samp{defun} or @samp{defvar}, so put the name prefix later
65on in the name.
62 66
63This recommendation applies even to names for traditional Lisp 67This recommendation applies even to names for traditional Lisp
64primitives that are not primitives in Emacs Lisp---such as 68primitives that are not primitives in Emacs Lisp---such as
diff --git a/lispref/variables.texi b/lispref/variables.texi
index f3e81c3ddd3..d97848549c0 100644
--- a/lispref/variables.texi
+++ b/lispref/variables.texi
@@ -276,7 +276,7 @@ that Lisp avoids infinite recursion on an ill-defined function.
276@code{max-lisp-eval-depth} provides another limit on depth of nesting. 276@code{max-lisp-eval-depth} provides another limit on depth of nesting.
277@xref{Definition of max-lisp-eval-depth,, Eval}. 277@xref{Definition of max-lisp-eval-depth,, Eval}.
278 278
279The default value is 600. Entry to the Lisp debugger increases the 279The default value is 1000. Entry to the Lisp debugger increases the
280value, if there is little room left, to make sure the debugger itself 280value, if there is little room left, to make sure the debugger itself
281has room to execute. 281has room to execute.
282@end defvar 282@end defvar
diff --git a/mac/ChangeLog b/mac/ChangeLog
index 5da9f7aca76..80e30045dda 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -1,3 +1,7 @@
12006-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * inc/config.h (pid_t): Define to int.
4
12006-02-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 52006-02-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 6
3 * makefile.MPW (shortlisp, SOME_MACHINE_LISP): Sync with 7 * makefile.MPW (shortlisp, SOME_MACHINE_LISP): Sync with
diff --git a/mac/inc/config.h b/mac/inc/config.h
index cdb7fd5b0e8..200e4005ff0 100644
--- a/mac/inc/config.h
+++ b/mac/inc/config.h
@@ -906,7 +906,7 @@ Boston, MA 02110-1301, USA. */
906/* #undef mbstate_t */ 906/* #undef mbstate_t */
907 907
908/* Define to `int' if <sys/types.h> does not define. */ 908/* Define to `int' if <sys/types.h> does not define. */
909/* #undef pid_t */ 909#define pid_t int
910 910
911/* Define to any substitute for sys_siglist. */ 911/* Define to any substitute for sys_siglist. */
912/* #undef sys_siglist */ 912/* #undef sys_siglist */
diff --git a/man/ChangeLog b/man/ChangeLog
index e084c379762..3fa5d0dc0d3 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,54 @@
12006-04-18 J.D. Smith <jdsmith@as.arizona.edu>
2
3 * misc.texi (Shell Ring): Added notes on saved input when
4 navigating off the end of the history list.
5
62006-04-18 Chong Yidong <cyd@mit.edu>
7
8 * misc.texi (Shell Options): Correct default value of
9 comint-scroll-show-maximum-output.
10
112006-04-18 Carsten Dominik <dominik@science.uva.nl>
12
13 * org.texi: (Formula syntax): Fixed link to Calc Manual.
14
152006-04-17 Reiner Steib <Reiner.Steib@gmx.de>
16
17 * gnus.texi (Emacsen): Don't support Emacs 20.7 and XEmacs 21.1.
18
192006-04-17 Bill Wohler <wohler@newt.com>
20
21 * mh-e.texi (Folders): Updated mh-before-quit-hook and
22 mh-quit-hook example with code that removes the buffers rather
23 than just bury them.
24
252006-04-18 Nick Roberts <nickrob@snap.net.nz>
26
27 * building.texi (Watch Expressions): Update.
28
292006-04-17 Michael Albinus <michael.albinus@gmx.de>
30
31 Sync with Tramp 2.0.53.
32
332006-04-13 Carsten Dominik <dominik@science.uva.nl>
34
35 * org.texi: (Updating settings): New section.
36 (Visibility cycling): Better names for the startup folding
37 options.
38 (Exporting): Completely restructured.
39 (The very busy C-c C-c key): New section.
40 (Summary of in-buffer settings): New section.
41
422006-04-12 Richard Stallman <rms@gnu.org>
43
44 * search.texi: Clean up previous change.
45
462006-04-12 Eli Zaretskii <eliz@gnu.org>
47
48 * search.texi (Regexp Backslash, Regexp Replace): Add index
49 entries for ``back reference'' and mention the term itself in the
50 text.
51
12006-04-11 Richard Stallman <rms@gnu.org> 522006-04-11 Richard Stallman <rms@gnu.org>
2 53
3 * custom.texi (Safe File Variables): 54 * custom.texi (Safe File Variables):
diff --git a/man/building.texi b/man/building.texi
index ec44b828022..cc5e667f1c3 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -929,20 +929,26 @@ the new frame.
929@cindex Watching expressions in GDB 929@cindex Watching expressions in GDB
930 930
931@findex gud-watch 931@findex gud-watch
932@kindex C-x C-a C-w @r{(GUD)}
932 If you want to see how a variable changes each time your program 933 If you want to see how a variable changes each time your program
933stops, move point into the variable name and click on the watch icon 934stops, move point into the variable name and click on the watch icon
934in the tool bar (@code{gud-watch}). 935in the tool bar (@code{gud-watch}) or type @kbd{C-x C-a C-w}. If you
936specify a prefix argument, you can enter the variable name in the
937minibuffer.
935 938
936 Each watch expression is displayed in the speedbar. Complex data 939 Each watch expression is displayed in the speedbar. Complex data
937types, such as arrays, structures and unions are represented in a tree 940types, such as arrays, structures and unions are represented in a tree
938format. Leaves and simple data types show the name of the expression 941format. Leaves and simple data types show the name of the expression
939and its value and, when the speedbar frame is selected, display the 942and its value and, when the speedbar frame is selected, display the
940type as a tooltip. Higher levels show the name, type and address 943type as a tooltip. Higher levels show the name, type and address
941value for pointers and just the name and type otherwise. 944value for pointers and just the name and type otherwise. Root expressions
945also display the frame address as a tooltip to help identify the frame
946in which they were defined.
942 947
943 To expand or contract a complex data type, click @kbd{Mouse-2} 948 To expand or contract a complex data type, click @kbd{Mouse-2}
944on the tag to the left of the expression. 949on the tag to the left of the expression.
945 950
951@kindex D @r{(GDB speedbar)}
946@findex gdb-var-delete 952@findex gdb-var-delete
947 To delete a complex watch expression, move point to the root 953 To delete a complex watch expression, move point to the root
948expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}). 954expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}).
@@ -965,9 +971,8 @@ edit its value.
965@vindex gdb-use-colon-colon-notation 971@vindex gdb-use-colon-colon-notation
966 If the variable @code{gdb-use-colon-colon-notation} is 972 If the variable @code{gdb-use-colon-colon-notation} is
967non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}} 973non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}}
968format to display variables in the speedbar. Since this does not work 974format. This allows the user to display watch expressions which share
969for variables defined in compound statements, the default value is 975the same variable name. The default value is @code{nil}.
970@code{nil}.
971 976
972@vindex gdb-speedbar-auto-raise 977@vindex gdb-speedbar-auto-raise
973To automatically raise the speedbar every time the display of watch 978To automatically raise the speedbar every time the display of watch
diff --git a/man/gnus.texi b/man/gnus.texi
index c5857f40ab4..75e6243ba5e 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -24870,16 +24870,17 @@ Gnus should work on:
24870@itemize @bullet 24870@itemize @bullet
24871 24871
24872@item 24872@item
24873Emacs 20.7 and up. 24873Emacs 21.1 and up.
24874 24874
24875@item 24875@item
24876XEmacs 21.1 and up. 24876XEmacs 21.4 and up.
24877 24877
24878@end itemize 24878@end itemize
24879 24879
24880This Gnus version will absolutely not work on any Emacsen older than 24880This Gnus version will absolutely not work on any Emacsen older than
24881that. Not reliably, at least. Older versions of Gnus may work on older 24881that. Not reliably, at least. Older versions of Gnus may work on older
24882Emacs versions. 24882Emacs versions. Particularly, Gnus 5.10.8 should also work on Emacs
2488320.7 and XEmacs 21.1.
24883 24884
24884There are some vague differences between Gnus on the various 24885There are some vague differences between Gnus on the various
24885platforms---XEmacs features more graphics (a logo and a toolbar)---but 24886platforms---XEmacs features more graphics (a logo and a toolbar)---but
diff --git a/man/mh-e.texi b/man/mh-e.texi
index 956bad07859..d8245b325ab 100644
--- a/man/mh-e.texi
+++ b/man/mh-e.texi
@@ -11,8 +11,8 @@
11@set VERSION 7.93 11@set VERSION 7.93
12@c Edition of the manual. It is either empty for the first edition or 12@c Edition of the manual. It is either empty for the first edition or
13@c has the form ", nth Edition" (without the quotes). 13@c has the form ", nth Edition" (without the quotes).
14@set EDITION , 6th Edition 14@set EDITION , 7th Edition
15@set UPDATED 2006-04-02 15@set UPDATED 2006-04-17
16@set UPDATE-MONTH April, 2006 16@set UPDATE-MONTH April, 2006
17 17
18@c Other variables. 18@c Other variables.
@@ -3724,33 +3724,36 @@ again.
3724@findex mh-execute-commands 3724@findex mh-execute-commands
3725@kindex q 3725@kindex q
3726@vindex mh-before-quit-hook 3726@vindex mh-before-quit-hook
3727@vindex mh-before-quit-hook, example
3727@vindex mh-quit-hook 3728@vindex mh-quit-hook
3729@vindex mh-quit-hook, example
3728 3730
3729The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are 3731The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3730called by @kbd{q}. The former one is called before the quit occurs, so 3732called by @kbd{q}. The former one is called before the quit occurs, so
3731you might use it to perform any MH-E operations; you could perform 3733you might use it to perform any MH-E operations; you could perform
3732some query and abort the quit or call @code{mh-execute-commands}, for 3734some query and abort the quit or call @code{mh-execute-commands}, for
3733example. The latter is not run in an MH-E context, so you might use it 3735example. The latter is not run in an MH-E context, so you might use it
3734to modify the window setup. For example, if the window configuration 3736to modify the window setup. If you find that @kbd{q} buries a lot of
3735was saved as in the example in @ref{Miscellaneous Commands and 3737buffers that you would rather remove, you can use both
3736Options}, you would also want to set @code{mh-quit-hook} to the 3738@code{mh-before-quit-hook} and @code{mh-quit-hook} to accomplish that.
3737following:
3738
3739@c XXX Replace this with my example for killing the mail buffers.
3740
3741@vindex mh-quit-hook, example
3742 3739
3743@smalllisp 3740@smalllisp
3744@group 3741@group
3742(defvar my-mh-folder-buffer-to-delete nil
3743 "Folder buffer that is being quit.")
3744
3745(defun my-mh-before-quit-hook ()
3746 "Save folder buffer that is to be deleted."
3747 (setq my-mh-folder-buffer-to-delete (current-buffer)))
3748
3745(defun my-mh-quit-hook () 3749(defun my-mh-quit-hook ()
3746 "Clear window configuration variables as the MH window is gone." 3750 "Kill folder buffer rather than just bury it."
3747 (setq my-mh-screen-saved nil) 3751 (set-buffer my-mh-folder-buffer-to-delete)
3748 (setq my-mh-screen nil) 3752 (if (get-buffer mh-show-buffer)
3749 (if my-normal-screen 3753 (kill-buffer mh-show-buffer))
3750 (set-window-configuration my-normal-screen)) 3754 (kill-buffer (current-buffer)))
3751 (setq my-normal-screen nil)) 3755
3752 3756@i{Kill MH-Folder buffer instead of burying it}
3753@i{Clean up window setup in mh-quit-hook}
3754@end group 3757@end group
3755@end smalllisp 3758@end smalllisp
3756 3759
diff --git a/man/misc.texi b/man/misc.texi
index 42cc1a8ae63..6a99a20da3c 100644
--- a/man/misc.texi
+++ b/man/misc.texi
@@ -967,14 +967,14 @@ current directory.
967@vindex comint-scroll-to-bottom-on-input 967@vindex comint-scroll-to-bottom-on-input
968 If the variable @code{comint-scroll-to-bottom-on-input} is 968 If the variable @code{comint-scroll-to-bottom-on-input} is
969non-@code{nil}, insertion and yank commands scroll the selected window 969non-@code{nil}, insertion and yank commands scroll the selected window
970to the bottom before inserting. 970to the bottom before inserting. The default is @code{nil}.
971 971
972@vindex comint-scroll-show-maximum-output 972@vindex comint-scroll-show-maximum-output
973 If @code{comint-scroll-show-maximum-output} is non-@code{nil}, then 973 If @code{comint-scroll-show-maximum-output} is non-@code{nil}, then
974arrival of output when point is at the end tries to place the last line of 974arrival of output when point is at the end tries to place the last line of
975text at the bottom line of the window, so as to show as much useful 975text at the bottom line of the window, so as to show as much useful
976text as possible. (This mimics the scrolling behavior of many 976text as possible. (This mimics the scrolling behavior of most
977terminals.) The default is @code{nil}. 977terminals.) The default is @code{t}.
978 978
979@vindex comint-move-point-for-output 979@vindex comint-move-point-for-output
980 By setting @code{comint-move-point-for-output}, you can opt for 980 By setting @code{comint-move-point-for-output}, you can opt for
diff --git a/man/org.texi b/man/org.texi
index 19c0f222c57..1c89017f198 100644
--- a/man/org.texi
+++ b/man/org.texi
@@ -4,7 +4,7 @@
4@setfilename ../info/org 4@setfilename ../info/org
5@settitle Org Mode Manual 5@settitle Org Mode Manual
6 6
7@set VERSION 4.21 7@set VERSION 4.24
8@set DATE April 2006 8@set DATE April 2006
9 9
10@dircategory Emacs 10@dircategory Emacs
@@ -22,8 +22,7 @@
22 22
23@c Macro definitions 23@c Macro definitions
24 24
25@c FIXME: does not look good in html 25@c Subheadings inside a table.
26@c Subheadings inside a table. Need a difference between info and the rest.
27@macro tsubheading{text} 26@macro tsubheading{text}
28@ifinfo 27@ifinfo
29@subsubheading \text\ 28@subsubheading \text\
@@ -183,21 +182,24 @@ The weekly/daily agenda
183 182
184Exporting 183Exporting
185 184
186* ASCII export:: Export as a structured ASCII file 185* ASCII export:: Exporting to plain ASCII
187* HTML export:: Export as an HTML file 186* HTML export:: Exporting to HTML
188* iCalendar export:: Create calendar entries. 187* XML export:: Exporting to XML
188* iCalendar export:: Exporting in iCalendar format
189* Text interpretation:: How the exporter looks at the file
189 190
190HTML export 191Text interpretation by the exporter
191 192
192* HTML formatting:: Interpretation of the buffer content 193* Comment lines:: Some lines will not be exported
193* Export options:: How to influence exports 194* Enhancing text:: Subscripts, symbols and more
194* Comment lines:: Lines which will not be exported 195* Export options:: How to influence the export settings
195 196
196Miscellaneous 197Miscellaneous
197 198
198* Completion:: M-TAB knows what you need 199* Completion:: M-TAB knows what you need
199* Customization:: Adapting Org-mode to your taste 200* Customization:: Adapting Org-mode to your taste
200* Updating settings:: How to tell Org-mode that settings have changed 201* Summary of in-buffer settings:: Using special lines to set options
202* The very busy C-c C-c key:: When in doubt, press C-c C-c
201* Clean view:: Getting rid of leading stars in the outline 203* Clean view:: Getting rid of leading stars in the outline
202* TTY keys:: Using Org-mode on a tty 204* TTY keys:: Using Org-mode on a tty
203* FAQ:: Frequently asked questions 205* FAQ:: Frequently asked questions
@@ -451,9 +453,9 @@ per-file basis by adding one of the following lines anywhere in the
451buffer: 453buffer:
452 454
453@example 455@example
454#+STARTUP: fold 456#+STARTUP: overview
455#+STARTUP: nofold
456#+STARTUP: content 457#+STARTUP: content
458#+STARTUP: showall
457@end example 459@end example
458 460
459@node Motion, Structure editing, Visibility cycling, Document Structure 461@node Motion, Structure editing, Visibility cycling, Document Structure
@@ -786,8 +788,8 @@ unpredictable for you, configure the variables
786Convert the active region to table. If every line contains at least one 788Convert the active region to table. If every line contains at least one
787TAB character, the function assumes that the material is tab separated. 789TAB character, the function assumes that the material is tab separated.
788If not, lines are split at whitespace into fields. You can use a prefix 790If not, lines are split at whitespace into fields. You can use a prefix
789argument to indicate the minimum number of consequtive spaces required 791argument to indicate the minimum number of consecutive spaces required
790to indentify a field separator (default: just one).@* 792to identify a field separator (default: just one).@*
791If there is no active region, this command creates an empty Org-mode 793If there is no active region, this command creates an empty Org-mode
792table. However, it's easier to just start typing, like 794table. However, it's easier to just start typing, like
793@kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. 795@kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
@@ -982,7 +984,7 @@ it off with
982 984
983The width of columns is automatically determined by the table editor. 985The width of columns is automatically determined by the table editor.
984Sometimes a single field or a few fields need to carry more text, 986Sometimes a single field or a few fields need to carry more text,
985leading to unconveniently wide columns. To limit@footnote{This feature 987leading to inconveniently wide columns. To limit@footnote{This feature
986does not work on XEmacs.} the width of a column, one field anywhere in 988does not work on XEmacs.} the width of a column, one field anywhere in
987the column must carry the string @samp{<N>} where @samp{N} is an integer 989the column must carry the string @samp{<N>} where @samp{N} is an integer
988specifying the width of the column in characters. The next re-align 990specifying the width of the column in characters. The next re-align
@@ -1054,7 +1056,7 @@ A formula can be any algebraic expression understood by the Emacs
1054@file{calc} package. Note that @file{calc} has the slightly 1056@file{calc} package. Note that @file{calc} has the slightly
1055non-standard convention that @samp{/} has lower precedence than 1057non-standard convention that @samp{/} has lower precedence than
1056@samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before 1058@samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before
1057evaluation by @code{calc-eval} (@pxref{Calling Calc from Your Lisp 1059evaluation by @code{calc-eval} (@pxref{Calling Calc from Your
1058Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs 1060Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs
1059Calc Manual}), variable substitution takes place: 1061Calc Manual}), variable substitution takes place:
1060 1062
@@ -2888,21 +2890,34 @@ visit org files will not be removed.
2888@chapter Exporting 2890@chapter Exporting
2889@cindex exporting 2891@cindex exporting
2890 2892
2891For printing and sharing of notes, Org-mode documents can be exported 2893Org-mode documents can be exported into a variety of other formats. For
2892as ASCII or HTML files. To incorporate entries with associated times 2894printing and sharing of notes, ASCII export produces a readable and
2893like deadlines or appointments into a desktop calendar program like 2895simple version of an Org-mode file. HTML export allows to publish a
2894iCal, Org-mode can also produce extracts in the iCalendar format. 2896notes file on the web, while the XML format provides a solid base for
2897exchange with a broad range of other applications. To incorporate
2898entries with associated times like deadlines or appointments into a
2899desktop calendar program like iCal, Org-mode can also produce extracts
2900in the iCalendar format. Currently Org-mode only supports export, not
2901import of these different formats.
2902
2903When exporting, Org-mode uses special conventions to enrich the output
2904produced. @xref{Text interpretation}, for more details.
2895 2905
2896@menu 2906@menu
2897* ASCII export:: Export as a structured ASCII file 2907* ASCII export:: Exporting to plain ASCII
2898* HTML export:: Export as an HTML file 2908* HTML export:: Exporting to HTML
2899* iCalendar export:: Create calendar entries. 2909* XML export:: Exporting to XML
2910* iCalendar export:: Exporting in iCalendar format
2911* Text interpretation:: How the exporter looks at the file
2900@end menu 2912@end menu
2901 2913
2902@node ASCII export, HTML export, Exporting, Exporting 2914@node ASCII export, HTML export, Exporting, Exporting
2903@section ASCII export 2915@section ASCII export
2904@cindex ASCII export 2916@cindex ASCII export
2905 2917
2918ASCII export produces an simple and very readable version of an Org-mode
2919file.
2920
2906@cindex region, active 2921@cindex region, active
2907@cindex active region 2922@cindex active region
2908@cindex transient-mark-mode 2923@cindex transient-mark-mode
@@ -2926,11 +2941,9 @@ at a different level, specify it with a prefix argument. For example,
2926@end example 2941@end example
2927 2942
2928@noindent 2943@noindent
2929creates only top level headlines and does the rest as items. Lines 2944creates only top level headlines and does the rest as items.
2930starting with @samp{#} and subtrees starting with the word @samp{COMMENT}
2931will not be exported.
2932 2945
2933@node HTML export, iCalendar export, ASCII export, Exporting 2946@node HTML export, XML export, ASCII export, Exporting
2934@section HTML export 2947@section HTML export
2935@cindex HTML export 2948@cindex HTML export
2936 2949
@@ -2948,12 +2961,6 @@ Export as HTML file @file{myfile.html}.
2948@kindex C-c C-x b 2961@kindex C-c C-x b
2949@item C-c C-x b 2962@item C-c C-x b
2950Export as HTML file and open it with a browser. 2963Export as HTML file and open it with a browser.
2951@kindex C-c C-x t
2952@item C-c C-x t
2953Insert template with export options, see below.
2954@kindex C-c :
2955@item C-c :
2956Toggle fixed-width for entry (QUOTE) or region, see below.
2957@end table 2964@end table
2958 2965
2959@cindex headline levels, for exporting 2966@cindex headline levels, for exporting
@@ -2969,26 +2976,145 @@ at a different level, specify it with a prefix argument. For example,
2969@noindent 2976@noindent
2970creates two levels of headings and does the rest as items. 2977creates two levels of headings and does the rest as items.
2971 2978
2979If you want to include HTML tags which should be interpreted as such,
2980mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
2981Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
2982@samp{&gt;} in HTML export.
2983
2984You can also give style information for the exported file. The
2985default specification can be configured through the option
2986@code{org-export-html-style}. If you want to use a file-local style,
2987you may use file variables, best wrapped into a COMMENT section at the
2988end of the outline tree. For example:
2989
2990@example
2991* COMMENT HTML style specifications
2992
2993# Local Variables:
2994# org-export-html-style: " <style type=\"text/css\">
2995 p @{font-weight: normal; color: gray; @}
2996 h1 @{color: black; @}
2997 </style>"
2998# End: ***
2999@end example
3000
3001Remember to execute @kbd{M-x normal-mode} after changing this to make
3002the new style visible to Emacs. This command restarts org-mode for the
3003current buffer and forces Emacs to re-evaluate the local variables
3004section in the buffer.
3005
3006@node XML export, iCalendar export, HTML export, Exporting
3007@section XML export
3008@cindex XML export
3009
3010Org-mode contains an XML exporter that produces XOXO-style XML.
3011Currently, this exporter only handles the general outline structure and
3012does not interpret any additional Org-mode features.
3013
3014@table @kbd
3015@kindex C-c C-x C-x
3016@item C-c C-x C-x
3017Export as XML file @file{myfile.xml}.
3018@end table
3019
3020@node iCalendar export, Text interpretation, XML export, Exporting
3021@section iCalendar export
3022@cindex iCalendar export
3023
3024Some people like to use Org-mode for keeping track of projects, but
3025still prefer a standard calendar application for anniversaries and
3026appointments. In this case it can be useful to have deadlines and
3027other time-stamped items in Org-mode files show up in the calendar
3028application. Org-mode can export calendar information in the standard
3029iCalendar format.
3030
3031@table @kbd
3032@kindex C-c C-x i
3033@item C-c C-x i
3034Create iCalendar entries for the current file and store them in the same
3035directory, using a file extension @file{.ics}.
3036@kindex C-c C-x C-i
3037@item C-c C-x C-i
3038Like @kbd{C-c C-x i}, but do this for all files in
3039@code{org-agenda-files}. For each of these files, a separate iCalendar
3040file will be written.
3041@kindex C-c C-x c
3042@item C-c C-x c
3043Create a single large iCalendar file from all files in
3044@code{org-agenda-files} and write it to the file given by
3045@code{org-combined-agenda-icalendar-file}.
3046@end table
3047
3048How this calendar is best read and updated, depends on the application
3049you are using. For example, when using iCal under Apple MacOS X, you
3050could create a new calendar @samp{OrgMode} (the default name for the
3051calendar created by @kbd{C-c C-x c}, see the variables
3052@code{org-icalendar-combined-name} and
3053@code{org-combined-agenda-icalendar-file}). Then set Org-mode to
3054overwrite the corresponding file
3055@file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
3056to make iCal re-read the calendar files each time a new version of
3057@file{OrgMode.ics} is produced. Here is the setup needed for this:
3058
3059@cindex applescript, for calendar update
3060@lisp
3061(setq org-combined-agenda-icalendar-file
3062 "~/Library/Calendars/OrgMode.ics")
3063(add-hook 'org-after-save-iCalendar-file-hook
3064 (lambda ()
3065 (shell-command
3066 "osascript -e 'tell application \"iCal\" to reload calendars'")))
3067@end lisp
3068
3069@node Text interpretation, , iCalendar export, Exporting
3070@section Text interpretation by the exporter
3071
3072The exporter backends interpret additional structure in the Org-mode file
3073in order to produce better output.
3074
2972@menu 3075@menu
2973* HTML formatting:: Interpretation of the buffer content 3076* Comment lines:: Some lines will not be exported
2974* Export options:: How to influence exports 3077* Enhancing text:: Subscripts, symbols and more
2975* Comment lines:: Lines which will not be exported 3078* Export options:: How to influence the export settings
2976@end menu 3079@end menu
2977 3080
2978@node HTML formatting, Export options, HTML export, HTML export 3081@node Comment lines, Enhancing text, Text interpretation, Text interpretation
2979@subsection HTML formatting 3082@subsection Comment lines
3083@cindex comment lines
3084@cindex exporting, not
3085
3086Lines starting with @samp{#} in column zero are treated as comments
3087and will never be exported. Also entire subtrees starting with the
3088word @samp{COMMENT} will never be exported. Finally, any text before
3089the first headline will not be exported either.
3090
3091@table @kbd
3092@kindex C-c ;
3093@item C-c ;
3094Toggle the COMMENT keyword at the beginning of an entry.
3095@end table
3096
3097
3098
3099@node Enhancing text, Export options, Comment lines, Text interpretation
3100@subsection Enhancing text for export
3101@cindex enhancing text
3102@cindex richer text
3103
3104Some of the export backends of Org-mode allow for sophisticated text
3105formatting, this is true in particular for the HTML backend. Org-mode
3106has a number of typing conventions that allow to produce a richly
3107formatted output.
2980 3108
2981Not all text is transferred literally to the exported HTML file. The
2982exporter implements the following interpretation:
2983 3109
2984@itemize @bullet 3110@itemize @bullet
2985 3111
2986@cindex hand-formatted lists 3112@cindex hand-formatted lists
2987@cindex lists, hand-formatted 3113@cindex lists, hand-formatted
2988@item 3114@item
2989Hand-formatted lists with @samp{-}, @samp{*} or @samp{+} as 3115Plain lists @samp{-}, @samp{*} or @samp{+} as bullet, or with @samp{1.}
2990bullet, or with @samp{1.} or @samp{2)} as enumerator will be recognized and 3116or @samp{2)} as enumerator will be recognized and transformed if the
2991transformed into HTML lists. See @xref{Plain Lists}. 3117backend supports lists. See @xref{Plain Lists}.
2992 3118
2993@cindex underlined text 3119@cindex underlined text
2994@cindex bold text 3120@cindex bold text
@@ -3011,10 +3137,11 @@ use completion for these macros, just type @samp{\} and maybe a few
3011letters, and press @kbd{M-@key{TAB}} to see possible completions. 3137letters, and press @kbd{M-@key{TAB}} to see possible completions.
3012@end itemize 3138@end itemize
3013 3139
3014@cindex tables, export to HTML 3140@cindex tables, export
3015@item 3141@item
3016Tables are transformed into HTML tables. Data fields before the first 3142Tables are transformed into native tables under the exporter, if the
3017horizontal separator line will be formatted as table header fields. 3143export backend supports this. Data fields before the first horizontal
3144separator line will be formatted as table header fields.
3018 3145
3019@cindex fixed width 3146@cindex fixed width
3020@item 3147@item
@@ -3022,19 +3149,20 @@ If a headline starts with the word @samp{QUOTE}, the text below the
3022headline will be typeset as fixed-width, to allow quoting of computer 3149headline will be typeset as fixed-width, to allow quoting of computer
3023codes etc. Lines starting with @samp{:} are also typeset in 3150codes etc. Lines starting with @samp{:} are also typeset in
3024fixed-width font. 3151fixed-width font.
3025 3152@table @kbd
3026@cindex HTML tags 3153@kindex C-c :
3027@item 3154@item C-c :
3028If you want to include HTML tags which should be interpreted as such, 3155Toggle fixed-width for entry (QUOTE) or region, see below.
3029mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}. 3156@end table
3030Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
3031@samp{&gt;} in HTML export.
3032@end itemize 3157@end itemize
3033 3158
3034If these conversions conflict with your habits of typing ASCII text, 3159If these conversions conflict with your habits of typing ASCII text,
3035they can all be turned off with corresponding variables. 3160they can all be turned off with corresponding variables (see the
3161customization group @code{org-export-general}, and the following section
3162which explains how to set export options with special lines in a
3163buffer.
3036 3164
3037@node Export options, Comment lines, HTML formatting, HTML export 3165@node Export options, , Enhancing text, Text interpretation
3038@subsection Export options 3166@subsection Export options
3039@cindex options, for export 3167@cindex options, for export
3040 3168
@@ -3046,6 +3174,12 @@ C-x t}. For individual lines, a good way to make sure the keyword is
3046correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion 3174correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
3047(@pxref{Completion}). 3175(@pxref{Completion}).
3048 3176
3177@table @kbd
3178@kindex C-c C-x t
3179@item C-c C-x t
3180Insert template with export options, see example below.
3181@end table
3182
3049@example 3183@example
3050#+TITLE: the title to be shown (default is the buffer name) 3184#+TITLE: the title to be shown (default is the buffer name)
3051#+AUTHOR: the author (default taken from @code{user-full-name}) 3185#+AUTHOR: the author (default taken from @code{user-full-name})
@@ -3082,101 +3216,14 @@ toc: @r{turn on/off table of contents}
3082TeX: @r{turn on/off @TeX{} macros} 3216TeX: @r{turn on/off @TeX{} macros}
3083@end example 3217@end example
3084 3218
3085You can also give style information for the exported file. The
3086default specification can be configured through the option
3087@code{org-export-html-style}. If you want to use a file-local style,
3088you may use file variables, best wrapped into a COMMENT section at the
3089end of the outline tree. For example:
3090
3091@example
3092* COMMENT HTML style specifications
3093
3094# Local Variables:
3095# org-export-html-style: " <style type=\"text/css\">
3096 p @{font-weight: normal; color: gray; @}
3097 h1 @{color: black; @}
3098 </style>"
3099# End: ***
3100@end example
3101
3102Remember to execute @kbd{M-x normal-mode} after changing this to make
3103the new style visible to Emacs. This command reastarts org-mode for the
3104current buffer and forces Emacs to re-evaluate the loval variables
3105section in the buffer.
3106
3107@node Comment lines, , Export options, HTML export
3108@subsection Comment lines
3109@cindex comment lines
3110@cindex exporting, not
3111
3112Lines starting with @samp{#} in column zero are treated as comments
3113and will never be exported. Also entire subtrees starting with the
3114word @samp{COMMENT} will never be exported. Finally, any text before
3115the first headline will not be exported either. This applies also for
3116ASCII export.
3117
3118@table @kbd
3119@kindex C-c ;
3120@item C-c ;
3121Toggle the COMMENT keyword at the beginning of an entry.
3122@end table
3123
3124@node iCalendar export, , HTML export, Exporting
3125@section iCalendar export
3126@cindex iCalendar export
3127
3128Some people like to use Org-mode for keeping track of projects, but
3129still prefer a standard calendar application for anniversaries and
3130appointments. In this case it can be useful to have deadlines and
3131other time-stamped items in Org-mode files show up in the calendar
3132application. Org-mode can export calendar information in the standard
3133iCalendar format.
3134
3135@table @kbd
3136@kindex C-c C-x i
3137@item C-c C-x i
3138Create iCalendar entries for the current file and store them in the same
3139directory, using a file extension @file{.ics}.
3140@kindex C-c C-x C-i
3141@item C-c C-x C-i
3142Like @kbd{C-c C-x i}, but do this for all files in
3143@code{org-agenda-files}. For each of these files, a separate iCalendar
3144file will be written.
3145@kindex C-c C-x c
3146@item C-c C-x c
3147Create a single large iCalendar file from all files in
3148@code{org-agenda-files} and write it to the file given by
3149@code{org-combined-agenda-icalendar-file}.
3150@end table
3151
3152How this calendar is best read and updated, depends on the application
3153you are using. For example, when using iCal under Apple MacOS X, you
3154could create a new calendar @samp{OrgMode} (the default name for the
3155calendar created by @kbd{C-c C-x c}, see the variables
3156@code{org-icalendar-combined-name} and
3157@code{org-combined-agenda-icalendar-file}). Then set Org-mode to
3158overwrite the corresponding file
3159@file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
3160to make iCal re-read the calendar files each time a new version of
3161@file{OrgMode.ics} is produced. Here is the setup needed for this:
3162
3163@cindex applescript, for calendar update
3164@lisp
3165(setq org-combined-agenda-icalendar-file
3166 "~/Library/Calendars/OrgMode.ics")
3167(add-hook 'org-after-save-iCalendar-file-hook
3168 (lambda ()
3169 (shell-command
3170 "osascript -e 'tell application \"iCal\" to reload calendars'")))
3171@end lisp
3172
3173@node Miscellaneous, Index, Exporting, Top 3219@node Miscellaneous, Index, Exporting, Top
3174@chapter Miscellaneous 3220@chapter Miscellaneous
3175 3221
3176@menu 3222@menu
3177* Completion:: M-TAB knows what you need 3223* Completion:: M-TAB knows what you need
3178* Customization:: Adapting Org-mode to your taste 3224* Customization:: Adapting Org-mode to your taste
3179* Updating settings:: How to tell Org-mode that settings have changed 3225* Summary of in-buffer settings:: Using special lines to set options
3226* The very busy C-c C-c key:: When in doubt, press C-c C-c
3180* Clean view:: Getting rid of leading stars in the outline 3227* Clean view:: Getting rid of leading stars in the outline
3181* TTY keys:: Using Org-mode on a tty 3228* TTY keys:: Using Org-mode on a tty
3182* FAQ:: Frequently asked questions 3229* FAQ:: Frequently asked questions
@@ -3229,7 +3276,7 @@ Elsewhere, complete dictionary words using ispell.
3229@end table 3276@end table
3230 3277
3231 3278
3232@node Customization, Updating settings, Completion, Miscellaneous 3279@node Customization, Summary of in-buffer settings, Completion, Miscellaneous
3233@section Customization 3280@section Customization
3234@cindex customization 3281@cindex customization
3235@cindex options, for customization 3282@cindex options, for customization
@@ -3239,43 +3286,112 @@ There are more than 100 variables that can be used to customize
3239Org-mode. For the sake of compactness of the manual, we are not 3286Org-mode. For the sake of compactness of the manual, we are not
3240describing the variables here. A structured overview of customization 3287describing the variables here. A structured overview of customization
3241variables is available with @kbd{M-x org-customize}. Or select 3288variables is available with @kbd{M-x org-customize}. Or select
3242@code{Browse Org Group} from the @code{Org->Customization} menu. 3289@code{Browse Org Group} from the @code{Org->Customization} menu. Many
3290settings can also be activated on a per-file basis, by putting special
3291lines into the buffer (@pxref{Summary of in-buffer settings}).
3292
3293@node Summary of in-buffer settings, The very busy C-c C-c key, Customization, Miscellaneous
3294@section Summary of in-buffer settings
3295@cindex in-buffer settings
3296@cindex special keywords
3297
3298Org-mode uses special lines in the buffer to define settings on a
3299per-file basis. These lines start with a @samp{#+} followed by a
3300keyword, a colon, and then individual words defining a setting. Several
3301settings words con be in the same line, but you can also have multiple
3302lines for the keyword. While these settings are described throughout
3303the manual, here is a summary. After changing any of those lines in the
3304buffer, press @kbd{C-c C-c} with the cursor still in the line to
3305activate the changes immediately. Otherwise they become effective only
3306when the file is visited again in a new Emacs session.
3243 3307
3244@node Updating settings, Clean view, Customization, Miscellaneous 3308@table @kbd
3245@section Updating settings after changes 3309@item #+STARTUP:
3246@cindex updating, after setting changes 3310This line sets options to be used at startup of org-mode, when an
3311Org-mode file is being visited. The first set of options deals with the
3312initial visibility of the outline tree. The corresponding variable for
3313global default settings is @code{org-startup-folded}, with a default
3314value @code{t}, which means @code{overview}.
3315@example
3316overview @r{top-level headlines only}
3317content @r{all headlines}
3318showall @r{no folding at all, show everything}
3319@end example
3320Then there are options for aligning tables upon visiting a file. This
3321is useful in files containing narrowed table columns. The corresponding
3322variable is @code{org-startup-align-all-tables}, with a default value
3323@code{nil}.
3324@example
3325align @r{align all tables}
3326noalign @r{don't align table on startup}
3327@end example
3328Here are the options for hiding leading stars in outline headings. The
3329corresponding variables are @code{org-hide-leading-stars} and
3330@code{org-odd-levels-only}, both with a default setting @code{nil}
3331(meaning @code{showstars} and @code{oddeven}).
3332@example
3333hidestars @r{make all but one of the stars starting a headline invisible.}
3334showstars @r{show all stars starting a headline}
3335odd @r{allow only odd outline levels (1,3,...)}
3336oddeven @r{allow all outline levels}
3337@end example
3338@item #+SEQ_TODO: #+TYP_TODO:
3339These lines that the TODO keywords and their interpretation in the
3340current file. The corresponding variables are @code{org-todo-keywords}
3341and @code{org-todo-interpretation}.
3342@item #+CATEGORY:
3343This line sets the category for the agenda file. The category applies
3344for all subsequent lines until the next @samp{#+CATEGORY} line, or the
3345end of the file.
3346@item #+TBLFM:
3347This line contains the formulas for the table directly above the line.
3348@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS:
3349These line provide setting for exporting files. For more details see
3350@ref{Export options}.
3351@end table
3352
3353@node The very busy C-c C-c key, Clean view, Summary of in-buffer settings, Miscellaneous
3354@section The very busy C-c C-c key
3247@kindex C-c C-c 3355@kindex C-c C-c
3248 3356
3249Org-mode uses special lines in the buffer to set file-local values for a 3357The key @kbd{C-c C-c} has many purposes in org-mode, which are all
3250number of user options. When such settings are changed, you need to 3358mentioned scattered throughout this manual. One specific function of
3251inform Org-mode that something has be modified and that it should 3359this key is to add @emph{tags} to a headline (@pxref{Tags}). In many
3252recheck the buffer for setting. This is done with the command @kbd{C-c 3360other circumstances it means something like @emph{Hey Org-mode, look
3253C-c} in the following situations: 3361here and update according to what you see here}. Here is a summary what
3362this means in different contexts.
3254 3363
3255@itemize @bullet 3364@itemize @minus
3365@c @item
3366@c If the cursor is in a headline, prompt for tags and insert them
3367@c into the current line, aligned to `org-tags-column'. When called
3368@c with prefix arg, realign all tags in the current buffer.
3256@item 3369@item
3257After changing any of the special buffer lines starting with @samp{#+}, 3370If the cursor is in one of the special #+KEYWORD lines, this
3258for example @samp{#+STARTUP}, @samp{#+CATEGORY}. Org-mode will then 3371triggers scanning the buffer for these lines and updating the
3259read these settings and activate them (see @ref{Visibility cycling}, 3372information.
3260@ref{Narrow columns}, @ref{Clean view}, @ref{Per file keywords},
3261@ref{Categories})
3262@item 3373@item
3263After editing by hand a @samp{#+TBLFM} line containing formulas for a 3374If the cursor is inside a table, realign the table. This command
3264table. When pressing @kbd{C-c C-c} in that line, all formulas are 3375works even if the automatic table editor has been turned off.
3265re-applied to the entire table (@pxref{Editing/debugging formulas}).
3266@item 3376@item
3267In a table, @kbd{C-c C-c} does force a re-align, even if the table 3377If the cursor is on a #+TBLFM line, re-apply the formulas to
3268editor is turned off (@pxref{Built-in table editor}) 3378the entire table.
3269@item 3379@item
3270In an ordered plain list, @kbd{C-c C-c} forces a renumbering of the list 3380If the cursor is inside a table created by the @file{table.el} package,
3271(@pxref{Plain Lists}). 3381activate that table.
3272@item 3382@item
3273After adding a new radio target @samp{<<<New target>>>}, @kbd{C-c C-c} 3383If the current buffer is a remember buffer, close note and file it.
3274must be used with the cursor on that target to activate it throughout 3384with a prefix argument, file it without further interaction to the default
3275the buffer. 3385location.
3386@item
3387If the cursor is on a <<<target>>>, update radio targets and corresponding
3388links in this buffer.
3389@item
3390If the cursor is on a numbered item in a plain list, renumber the
3391ordered list.
3276@end itemize 3392@end itemize
3277 3393
3278@node Clean view, TTY keys, Updating settings, Miscellaneous 3394@node Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous
3279@section A cleaner outline view 3395@section A cleaner outline view
3280@cindex hiding leading stars 3396@cindex hiding leading stars
3281@cindex clean outline view 3397@cindex clean outline view
@@ -3371,12 +3487,10 @@ activate changes immediately).
3371#+STARTUP: oddeven 3487#+STARTUP: oddeven
3372@end example 3488@end example
3373 3489
3374You can convert an Org-mode file from single-star-per-level to 3490You can convert an Org-mode file from single-star-per-level to the
3375the double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels 3491double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels
3376RET} in that file. There is no command for the back conversion because 3492RET} in that file. The reverse operation is @kbd{M-x
3377such a command might merge levels and in this way destroy the 3493org-convert-to-oddeven-levels}.
3378structure of the tree.
3379@c FIXME: Maybe we should have such a command...
3380 3494
3381@node TTY keys, FAQ, Clean view, Miscellaneous 3495@node TTY keys, FAQ, Clean view, Miscellaneous
3382@section Using org-mode on a tty 3496@section Using org-mode on a tty
@@ -3448,8 +3562,8 @@ attached to the old style using angular brackets and no hiding of the
3448link text. Please give them back to me, don't tell me it is not 3562link text. Please give them back to me, don't tell me it is not
3449possible!}@* 3563possible!}@*
3450@c 3564@c
3451Would I let you down like that? If you must (even if I don't understand 3565Would I let you down like that? If you must, you can do this
3452why), you can do this 3566
3453@lisp 3567@lisp
3454(setq org-link-style 'plain 3568(setq org-link-style 'plain
3455 org-link-format "<%s>") 3569 org-link-format "<%s>")
@@ -3574,12 +3688,14 @@ You may also select specific files with
3574&%%(org-diary) ~/path/to/another/org-file.org 3688&%%(org-diary) ~/path/to/another/org-file.org
3575@end example 3689@end example
3576 3690
3577If you now launch the calendar and press @kbd{d} to display a diary, 3691If you now launch the calendar and press @kbd{d} to display a diary, the
3578the headlines of entries containing a timestamp, date range, schedule, 3692headlines of entries containing a timestamp, date range, schedule, or
3579or deadline referring to the selected date will be listed. Just like 3693deadline referring to the selected date will be listed. Just like in
3580in Org-mode's agenda view, the diary for @emph{today} contains 3694Org-mode's agenda view, the diary for @emph{today} contains additional
3581additional entries for overdue deadlines and scheduled items. See 3695entries for overdue deadlines and scheduled items. See also the
3582also the documentation of the @command{org-diary} function. 3696documentation of the @command{org-diary} function. Under XEmacs, it is
3697not possible to jump back from the diary to the org, this works only in
3698the agenda buffer.
3583 3699
3584@end enumerate 3700@end enumerate
3585 3701
@@ -3594,9 +3710,9 @@ Org-mode can cooperate with the following packages:
3594@item @file{org-mouse.el} by Piotr Zielinski 3710@item @file{org-mouse.el} by Piotr Zielinski
3595This package implements extended mouse functionality for Org-mode. It 3711This package implements extended mouse functionality for Org-mode. It
3596allows you to cycle visibility and to edit the document structure with 3712allows you to cycle visibility and to edit the document structure with
3597the mouse. It also provides a context-sensitive menu that changes 3713the mouse. Best of all, it provides a context-sensitive menu on
3598depending on the context of a mouse-click. Use a search engine to find 3714@key{mouse-3} that changes depending on the context of a mouse-click.
3599this package on the web. 3715Use a search engine to find this package on the web.
3600@cindex @file{table.el} 3716@cindex @file{table.el}
3601@item @file{table.el} by Takaaki Ota 3717@item @file{table.el} by Takaaki Ota
3602Org mode cooperates with table.el, see @ref{table.el}. @file{table.el} 3718Org mode cooperates with table.el, see @ref{table.el}. @file{table.el}
@@ -3687,12 +3803,6 @@ Recalculating a table line applies the formulas from left to right.
3687If a formula uses @emph{calculated} fields further down the row, 3803If a formula uses @emph{calculated} fields further down the row,
3688multiple recalculation may be needed to get all fields consistent. 3804multiple recalculation may be needed to get all fields consistent.
3689@item 3805@item
3690Under XEmacs, if Org-mode entries are included into the diary, it is
3691not possible to jump back from the diary to the org file. Apparently,
3692the text properties are lost when the fancy-diary-display is used.
3693However, from Org-mode's timeline and agenda buffers (created with
3694@kbd{C-c C-r} and @kbd{C-c a}), things do work correctly.
3695@item
3696You can only make a single word boldface or italic. To emphasize 3806You can only make a single word boldface or italic. To emphasize
3697several words in a row, each must have the emphasize markers, like in 3807several words in a row, each must have the emphasize markers, like in
3698@samp{*three* *bold* *words*}. 3808@samp{*three* *bold* *words*}.
@@ -3725,6 +3835,8 @@ specified time.
3725@item 3835@item
3726Sacha Chua suggested to copy some linking code from Planner. 3836Sacha Chua suggested to copy some linking code from Planner.
3727@item 3837@item
3838Kees Dullemond inspired the use of narrowed tabled columns.
3839@item
3728Christian Egli converted the documentation into TeXInfo format, patched 3840Christian Egli converted the documentation into TeXInfo format, patched
3729CSS formatting into the HTML exporter, and inspired the agenda. 3841CSS formatting into the HTML exporter, and inspired the agenda.
3730@item 3842@item
diff --git a/man/search.texi b/man/search.texi
index a38f56e3f26..4ea3053dea7 100644
--- a/man/search.texi
+++ b/man/search.texi
@@ -750,8 +750,10 @@ can add groups for syntactic purposes without interfering with
750the numbering of the groups that are meant to be referred to. 750the numbering of the groups that are meant to be referred to.
751 751
752@item \@var{d} 752@item \@var{d}
753@cindex back reference, in regexp
753matches the same text that matched the @var{d}th occurrence of a 754matches the same text that matched the @var{d}th occurrence of a
754@samp{\( @dots{} \)} construct. 755@samp{\( @dots{} \)} construct. This is called a @dfn{back
756reference}.
755 757
756After the end of a @samp{\( @dots{} \)} construct, the matcher remembers 758After the end of a @samp{\( @dots{} \)} construct, the matcher remembers
757the beginning and end of the text matched by that construct. Then, 759the beginning and end of the text matched by that construct. Then,
@@ -1002,15 +1004,17 @@ any match for a specified pattern.
1002Replace every match for @var{regexp} with @var{newstring}. 1004Replace every match for @var{regexp} with @var{newstring}.
1003@end table 1005@end table
1004 1006
1007@cindex back reference, in regexp replacement
1005 In @code{replace-regexp}, the @var{newstring} need not be constant: 1008 In @code{replace-regexp}, the @var{newstring} need not be constant:
1006it can refer to all or part of what is matched by the @var{regexp}. 1009it can refer to all or part of what is matched by the @var{regexp}.
1007@samp{\&} in @var{newstring} stands for the entire match being 1010@samp{\&} in @var{newstring} stands for the entire match being
1008replaced. @samp{\@var{d}} in @var{newstring}, where @var{d} is a 1011replaced. @samp{\@var{d}} in @var{newstring}, where @var{d} is a
1009digit, stands for whatever matched the @var{d}th parenthesized 1012digit, stands for whatever matched the @var{d}th parenthesized
1010grouping in @var{regexp}. @samp{\#} refers to the count of 1013grouping in @var{regexp}. (This is called a ``back reference''.)
1011replacements already made in this command, as a decimal number. In 1014@samp{\#} refers to the count of replacements already made in this
1012the first replacement, @samp{\#} stands for @samp{0}; in the second, 1015command, as a decimal number. In the first replacement, @samp{\#}
1013for @samp{1}; and so on. For example, 1016stands for @samp{0}; in the second, for @samp{1}; and so on. For
1017example,
1014 1018
1015@example 1019@example
1016M-x replace-regexp @key{RET} c[ad]+r @key{RET} \&-safe @key{RET} 1020M-x replace-regexp @key{RET} c[ad]+r @key{RET} \&-safe @key{RET}
diff --git a/man/trampver.texi b/man/trampver.texi
index 625e3869c11..4fc3958b2f2 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -4,7 +4,7 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.0.52 7@set trampver 2.0.53
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set prefix /usr/local 10@set prefix /usr/local
diff --git a/src/ChangeLog b/src/ChangeLog
index 936b14089b4..f0f504e6e64 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,194 @@
12006-04-18 Richard Stallman <rms@gnu.org>
2
3 * xmenu.c (restore_menu_items, save_menu_items): New fns.
4 (set_frame_menubar): Use save_menu_items. Save updated vector in
5 the frame before unwinding it. Don't use unuse_menu_items. Don't
6 use discard_menu_items.
7 (digest_single_submenu): Abort if an item is not in a pane.
8 (init_menu_items): Put the error check at the top.
9
10 * keymap.c (describe_map): Make "shadowed" warning more verbose.
11
12 * window.c (adjust_window_trailing_edge): Correctly distinguish
13 series vs parallel cases, even when window has no parent.
14
15 * abbrev.c (record_symbol): New function.
16 (Finsert_abbrev_table_description): Sort the abbrevs alphabetically.
17
182006-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19
20 * image.c (x_create_bitmap_from_data) [MAC_OS]: Don't check return
21 value of xmalloc.
22
23 * mac.c (mac_coerce_file_name_ptr, mac_coerce_file_name_desc)
24 (create_apple_event_from_event_ref, xrm_get_preference_database)
25 (cfstring_create_normalized): Don't check return value of xmalloc.
26
27 * macselect.c (get_scrap_target_type_list, defer_apple_events)
28 (copy_scrap_flavor_data, mac_handle_service_event): Don't check
29 return value of xmalloc/xrealloc.
30
31 * macterm.c (XCreateGC, x_per_char_metric, xlfdpat_create)
32 (init_font_name_table, init_font_name_table, mac_do_list_fonts)
33 (XLoadQueryFont, mac_store_apple_event): Don't check
34 return value of xmalloc.
35
362006-04-17 Kim F. Storm <storm@cua.dk>
37
38 * window.c (coordinates_in_window): On the vertical border,
39 calculate the row number measured from the top of the window, not
40 the top of the frame.
41 (window_loop): Test w->dedicated with !NILP instead of EQ Qt.
42 (window_scroll_pixel_based): Fix off-by-one bug in 2002-12-23 change.
43
442006-04-16 Eli Zaretskii <eliz@gnu.org>
45
46 * s/ms-w32.h (SYSTEM_PURESIZE_EXTRA): Reduce to 24000.
47
482006-04-16 Romain Francoise <romain@orebokech.com>
49
50 * puresize.h (BASE_PURESIZE): Decrement back to 1200000.
51
522006-04-16 Andreas Schwab <schwab@suse.de>
53
54 * puresize.h (PURESIZE_RATIO): Reduce to 10/6.
55
562006-04-15 Romain Francoise <romain@orebokech.com>
57
58 * puresize.h (BASE_PURESIZE): Increment to 1210000.
59
602006-04-13 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> (tiny change)
61
62 * print.c (Fprin1_to_string): Mention in the `doc' that the
63 behavior is modified by `print-level' and `print-length'.
64
652006-04-13 Kenichi Handa <handa@m17n.org>
66
67 * coding.c (setup_coding_system): If eol-type is not yet decided
68 and system_eol_type is not LF, set CODING_REQUIRE_ENCODING_MASK.
69 If coding_system is nil, return 0.
70 (code_convert_region1): Even if coding_system is nil, don't skip
71 conversion if system_eol_type is not LF.
72 (code_convert_string1): Likewise.
73 (code_convert_string_norecord): Likewise.
74
752006-04-13 Kenichi Handa <handa@m17n.org>
76
77 * coding.c (setup_coding_system): Fix previous change.
78 (encode_coding): If eol_type is not yet decided, use
79 system_eol_type.
80 (shrink_encoding_region): If eol_type is not yet decided and
81 system_eol_type is not LF, don't shrink.
82
832006-04-13 Nick Roberts <nickrob@snap.net.nz>
84
85 * xdisp.c (note_mouse_highlight): Add help echo for dragging vertical
86 line.
87
882006-04-12 Richard Stallman <rms@gnu.org>
89
90 * keyboard.c (read_key_sequence): Explicitly avoid keybuf[-1].
91
92 * process.c (conv_lisp_to_sockaddr): If FAMILY unknown, just return.
93 (Fprocess_send_eof): Abort if fail to open null device.
94
952006-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
96
97 * fns.c [HAVE_MENUS && MAC_OS]: Include macterm.h.
98
99 * image.c [MAC_OS] (xpm_load_image): Add parentheses around
100 assignment used as truth value. Add explicit braces to avoid
101 ambiguous `else'.
102 [MAC_OS] (gif_load): Remove unused variable `gcpro1'.
103
104 * lisp.h (syms_of_fontset, Fset_fontset_font): Put extern and
105 EXFUN in #ifdef HAVE_WINDOW_SYSTEM.
106 (syms_of_xfns, syms_of_xsmfns, syms_of_xselect, syms_of_xterm):
107 Put externs in #ifdef HAVE_X_WINDOWS.
108 (syms_of_macfns, syms_of_macselect, syms_of_macterm)
109 (syms_of_macmenu, syms_of_mac) [MAC_OS]: Add externs.
110 (init_mac_osx_environment) [MAC_OSX]: Add extern.
111
112 * mac.c (init_process): Remove undef.
113 (select) [MAC_OSX]: Undefine before including sysselect.h.
114 (posix_pathname_to_fsspec, fsspec_to_posix_pathname) [MAC_OSX]:
115 Remove functions and prototypes.
116 (parse_value): Add parentheses around + inside shift.
117 (path_from_vol_dir_name): Make static.
118 (get_temp_dir_name): Remove unused variables `cpb' and `dir_name'.
119 [!MAC_OSX] (get_path_to_system_folder): Likewise.
120 (Fmac_get_file_creator, Fmac_get_file_type): Remove unused
121 variable `cCode'.
122 (Fmac_coerce_ae_data): Remove unused variables `fref' and `fs'.
123 (Fmac_get_preference): Add explicit braces to avoid ambiguous `else'.
124
125 * macfns.c (x_to_mac_color): Remove unused variable `tail'.
126 (x_set_mouse_color): Remove unused variable `dpy'.
127 (Fx_create_frame): Remove unused variable `x_frame_count'.
128 (Fx_server_version): Add explicit braces to avoid ambiguous `else'.
129 (x_sync): Move from macterm.c.
130 (Fx_file_dialog): Remove unused variable `default_filter_index'.
131
132 * macmenu.c (min_menu_id): Make element type explicit.
133
134 * macselect.c (get_flavor_type_from_symbol): Remove unused
135 variable `val'.
136 (get_scrap_private_timestamp, x_get_foreign_selection)
137 (copy_scrap_flavor_data): Add explicit braces to avoid ambiguous `else'.
138 (Fmac_process_deferred_apple_events): Remove unused variables
139 `keyword', `reply', `apple_event', `count', and `err'.
140
141 * macterm.c: Don't include gnu.h.
142 (x_io_error_quitter, x_draw_image_foreground_1): Remove prototypes.
143 (x_sync): Move to macfns.c.
144 [USE_CG_DRAWING] (mac_define_fringe_bitmap): Remove unused
145 variable `mask_bits'.
146 (mac_compute_glyph_string_overhangs): Avoid ambiguous `else'.
147 (x_draw_image_glyph_string): Remove unused variable `pixmap'.
148 (x_mac_to_emacs_modifiers): Remove function.
149 (XTset_vertical_scroll_bar, mac_handle_visibility_change)
150 (x_make_frame_visible, xlfdpat_create, mac_handle_command_event):
151 Add explicit braces to avoid ambiguous `else'.
152 (x_make_frame_visible): Remove unused variables `type',
153 `original_top', and `original_left'.
154 (mac_do_list_fonts, XTread_socket): Add parentheses around && within ||.
155 (x_load_font): Remove unused variables `full_name', and `value'.
156 (do_get_menus, do_init_managers, do_check_ram_size) [!MAC_OS8]:
157 Remove functions.
158 (do_zoom_window): Reorganize variables with respect to conditionals.
159 (init_command_handler): Remove unused variable `err'.
160 [MAC_OSX] (mac_check_bundle): Remove unused variable `child'.
161
162 * macterm.h (x_set_mouse_position, x_set_mouse_pixel_position)
163 (x_make_frame_invisible, x_iconify_frame, x_free_frame_resources)
164 (x_destroy_window, x_wm_set_size_hint, x_delete_display, XFreeGC)
165 (do_menu_choice, have_menus_p, x_real_positions)
166 (x_set_menu_bar_lines, x_pixel_width, x_pixel_height, x_char_width)
167 (x_char_height, x_sync, x_set_tool_bar_lines, x_activate_menubar)
168 (free_frame_menubar): Add externs.
169
170 * unexmacosx.c: Include config.h before using HAVE_MALLOC_MALLOC_H.
171 (malloc, realloc, free): Add undefs.
172 (read_load_commands): Remove unused variable `n' and `j'.
173 (copy_data_segment): Remove unused variable `r'.
174
175 * xdisp.c (get_glyph_string_clip_rects): Add parentheses around &&
176 within ||. Add explicit braces to avoid ambiguous `else'.
177 (dump_glyph_row): Remove label for `inverse_p' from legend.
178
179 * xfaces.c (Finternal_merge_in_global_face, try_font_list): Add
180 explicit braces to avoid ambiguous `else'.
181
1822006-04-11 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> (tiny change)
183
184 * dispnew.c (init_display): Don't init X display if the user asked
185 for a non-X display.
186
1872006-04-12 Kenichi Handa <handa@m17n.org>
188
189 * coding.c (setup_coding_system): Use system_eol_type for default
190 coding->eol_type.
191
12006-04-11 Dan Nicolaescu <dann@ics.uci.edu> 1922006-04-11 Dan Nicolaescu <dann@ics.uci.edu>
2 193
3 * lisp.h (wrong_type_argument): Mark as NO_RETURN. 194 * lisp.h (wrong_type_argument): Mark as NO_RETURN.
diff --git a/src/abbrev.c b/src/abbrev.c
index e7dcec3a43a..e371797f139 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -531,6 +531,13 @@ describe_abbrev (sym, stream)
531 Fterpri (stream); 531 Fterpri (stream);
532} 532}
533 533
534static void
535record_symbol (sym, list)
536 Lisp_Object sym, list;
537{
538 XSETCDR (list, Fcons (sym, XCDR (list)));
539}
540
534DEFUN ("insert-abbrev-table-description", Finsert_abbrev_table_description, 541DEFUN ("insert-abbrev-table-description", Finsert_abbrev_table_description,
535 Sinsert_abbrev_table_description, 1, 2, 0, 542 Sinsert_abbrev_table_description, 1, 2, 0,
536 doc: /* Insert before point a full description of abbrev table named NAME. 543 doc: /* Insert before point a full description of abbrev table named NAME.
@@ -546,6 +553,7 @@ READABLE is non-nil, they are listed. */)
546 Lisp_Object name, readable; 553 Lisp_Object name, readable;
547{ 554{
548 Lisp_Object table; 555 Lisp_Object table;
556 Lisp_Object symbols;
549 Lisp_Object stream; 557 Lisp_Object stream;
550 558
551 CHECK_SYMBOL (name); 559 CHECK_SYMBOL (name);
@@ -554,12 +562,22 @@ READABLE is non-nil, they are listed. */)
554 562
555 XSETBUFFER (stream, current_buffer); 563 XSETBUFFER (stream, current_buffer);
556 564
565 symbols = Fcons (Qnil, Qnil);
566 map_obarray (table, record_symbol, symbols);
567 symbols = XCDR (symbols);
568 symbols = Fsort (symbols, Qstring_lessp);
569
557 if (!NILP (readable)) 570 if (!NILP (readable))
558 { 571 {
559 insert_string ("("); 572 insert_string ("(");
560 Fprin1 (name, stream); 573 Fprin1 (name, stream);
561 insert_string (")\n\n"); 574 insert_string (")\n\n");
562 map_obarray (table, describe_abbrev, stream); 575 while (! NILP (symbols))
576 {
577 describe_abbrev (XCAR (symbols), stream);
578 symbols = XCDR (symbols);
579 }
580
563 insert_string ("\n\n"); 581 insert_string ("\n\n");
564 } 582 }
565 else 583 else
@@ -567,7 +585,11 @@ READABLE is non-nil, they are listed. */)
567 insert_string ("(define-abbrev-table '"); 585 insert_string ("(define-abbrev-table '");
568 Fprin1 (name, stream); 586 Fprin1 (name, stream);
569 insert_string (" '(\n"); 587 insert_string (" '(\n");
570 map_obarray (table, write_abbrev, stream); 588 while (! NILP (symbols))
589 {
590 write_abbrev (XCAR (symbols), stream);
591 symbols = XCDR (symbols);
592 }
571 insert_string (" ))\n\n"); 593 insert_string (" ))\n\n");
572 } 594 }
573 595
diff --git a/src/coding.c b/src/coding.c
index 26d47da9317..d261418def5 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3603,6 +3603,8 @@ setup_coding_system (coding_system, coding)
3603 { 3603 {
3604 coding->eol_type = CODING_EOL_UNDECIDED; 3604 coding->eol_type = CODING_EOL_UNDECIDED;
3605 coding->common_flags = CODING_REQUIRE_DETECTION_MASK; 3605 coding->common_flags = CODING_REQUIRE_DETECTION_MASK;
3606 if (system_eol_type != CODING_EOL_LF)
3607 coding->common_flags |= CODING_REQUIRE_ENCODING_MASK;
3606 } 3608 }
3607 else if (XFASTINT (eol_type) == 1) 3609 else if (XFASTINT (eol_type) == 1)
3608 { 3610 {
@@ -3918,9 +3920,12 @@ setup_coding_system (coding_system, coding)
3918 coding->type = coding_type_no_conversion; 3920 coding->type = coding_type_no_conversion;
3919 coding->category_idx = CODING_CATEGORY_IDX_BINARY; 3921 coding->category_idx = CODING_CATEGORY_IDX_BINARY;
3920 coding->common_flags = 0; 3922 coding->common_flags = 0;
3921 coding->eol_type = CODING_EOL_LF; 3923 coding->eol_type = NILP (coding_system) ? system_eol_type : CODING_EOL_LF;
3924 if (coding->eol_type != CODING_EOL_LF)
3925 coding->common_flags
3926 |= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK;
3922 coding->pre_write_conversion = coding->post_read_conversion = Qnil; 3927 coding->pre_write_conversion = coding->post_read_conversion = Qnil;
3923 return -1; 3928 return NILP (coding_system) ? 0 : -1;
3924} 3929}
3925 3930
3926/* Free memory blocks allocated for storing composition information. */ 3931/* Free memory blocks allocated for storing composition information. */
@@ -4994,6 +4999,8 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes)
4994 coding->consumed = coding->consumed_char = 0; 4999 coding->consumed = coding->consumed_char = 0;
4995 coding->errors = 0; 5000 coding->errors = 0;
4996 coding->result = CODING_FINISH_NORMAL; 5001 coding->result = CODING_FINISH_NORMAL;
5002 if (coding->eol_type == CODING_EOL_UNDECIDED)
5003 coding->eol_type = system_eol_type;
4997 5004
4998 switch (coding->type) 5005 switch (coding->type)
4999 { 5006 {
@@ -5250,6 +5257,8 @@ shrink_encoding_region (beg, end, coding, str)
5250 if (coding->type == coding_type_ccl 5257 if (coding->type == coding_type_ccl
5251 || coding->eol_type == CODING_EOL_CRLF 5258 || coding->eol_type == CODING_EOL_CRLF
5252 || coding->eol_type == CODING_EOL_CR 5259 || coding->eol_type == CODING_EOL_CR
5260 || (coding->eol_type == CODING_EOL_UNDECIDED
5261 && system_eol_type != CODING_EOL_LF)
5253 || (coding->cmp_data && coding->cmp_data->used > 0)) 5262 || (coding->cmp_data && coding->cmp_data->used > 0))
5254 { 5263 {
5255 /* We can't skip any data. */ 5264 /* We can't skip any data. */
@@ -7105,7 +7114,7 @@ code_convert_region1 (start, end, coding_system, encodep)
7105 from = XFASTINT (start); 7114 from = XFASTINT (start);
7106 to = XFASTINT (end); 7115 to = XFASTINT (end);
7107 7116
7108 if (NILP (coding_system)) 7117 if (NILP (coding_system) && system_eol_type == CODING_EOL_LF)
7109 return make_number (to - from); 7118 return make_number (to - from);
7110 7119
7111 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) 7120 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0)
@@ -7160,7 +7169,7 @@ code_convert_string1 (string, coding_system, nocopy, encodep)
7160 CHECK_STRING (string); 7169 CHECK_STRING (string);
7161 CHECK_SYMBOL (coding_system); 7170 CHECK_SYMBOL (coding_system);
7162 7171
7163 if (NILP (coding_system)) 7172 if (NILP (coding_system) && system_eol_type == CODING_EOL_LF)
7164 return (NILP (nocopy) ? Fcopy_sequence (string) : string); 7173 return (NILP (nocopy) ? Fcopy_sequence (string) : string);
7165 7174
7166 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) 7175 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0)
@@ -7219,7 +7228,7 @@ code_convert_string_norecord (string, coding_system, encodep)
7219 CHECK_STRING (string); 7228 CHECK_STRING (string);
7220 CHECK_SYMBOL (coding_system); 7229 CHECK_SYMBOL (coding_system);
7221 7230
7222 if (NILP (coding_system)) 7231 if (NILP (coding_system) && system_eol_type == CODING_EOL_LF)
7223 return string; 7232 return string;
7224 7233
7225 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) 7234 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0)
diff --git a/src/dispnew.c b/src/dispnew.c
index 296dbece477..9b4dbf1d992 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6695,7 +6695,7 @@ init_display ()
6695 try to use X, and die with an error message if that doesn't work. */ 6695 try to use X, and die with an error message if that doesn't work. */
6696 6696
6697#ifdef HAVE_X_WINDOWS 6697#ifdef HAVE_X_WINDOWS
6698 if (! display_arg) 6698 if (! inhibit_window_system && ! display_arg)
6699 { 6699 {
6700 char *display; 6700 char *display;
6701#ifdef VMS 6701#ifdef VMS
diff --git a/src/eval.c b/src/eval.c
index 86ee384896c..20f29b5f06b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -204,6 +204,7 @@ init_eval_once ()
204 specpdl_size = 50; 204 specpdl_size = 50;
205 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); 205 specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding));
206 specpdl_ptr = specpdl; 206 specpdl_ptr = specpdl;
207 /* Don't forget to update docs (lispref node "Local Variables"). */
207 max_specpdl_size = 1000; 208 max_specpdl_size = 1000;
208 max_lisp_eval_depth = 300; 209 max_lisp_eval_depth = 300;
209 210
diff --git a/src/fns.c b/src/fns.c
index 0608fee2df6..f06f39fae04 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -48,9 +48,12 @@ Boston, MA 02110-1301, USA. */
48#include "frame.h" 48#include "frame.h"
49#include "window.h" 49#include "window.h"
50#include "blockinput.h" 50#include "blockinput.h"
51#include "termhooks.h" /* For display->kboard reference in terminal-local-value. */ 51#ifdef HAVE_MENUS
52#if defined (HAVE_MENUS) && defined (HAVE_X_WINDOWS) 52#if defined (HAVE_X_WINDOWS)
53#include "xterm.h" 53#include "xterm.h"
54#elif defined (MAC_OS)
55#include "macterm.h"
56#endif
54#endif 57#endif
55 58
56#ifndef NULL 59#ifndef NULL
diff --git a/src/image.c b/src/image.c
index 0d52399327e..a6b3c8f19c5 100644
--- a/src/image.c
+++ b/src/image.c
@@ -201,7 +201,7 @@ XPutPixel (ximage, x, y, pixel)
201 } 201 }
202 else 202 else
203#endif 203#endif
204 if (depth == 1) 204 if (depth == 1)
205 { 205 {
206 char *base_addr = GetPixBaseAddr (pixmap); 206 char *base_addr = GetPixBaseAddr (pixmap);
207 short row_bytes = GetPixRowBytes (pixmap); 207 short row_bytes = GetPixRowBytes (pixmap);
@@ -444,8 +444,6 @@ x_create_bitmap_from_data (f, bits, width, height)
444 id = x_allocate_bitmap_record (f); 444 id = x_allocate_bitmap_record (f);
445#ifdef MAC_OS 445#ifdef MAC_OS
446 dpyinfo->bitmaps[id - 1].bitmap_data = (char *) xmalloc (height * width); 446 dpyinfo->bitmaps[id - 1].bitmap_data = (char *) xmalloc (height * width);
447 if (! dpyinfo->bitmaps[id - 1].bitmap_data)
448 return -1;
449 bcopy (bits, dpyinfo->bitmaps[id - 1].bitmap_data, height * width); 447 bcopy (bits, dpyinfo->bitmaps[id - 1].bitmap_data, height * width);
450#endif /* MAC_OS */ 448#endif /* MAC_OS */
451 449
@@ -4381,7 +4379,7 @@ xpm_load_image (f, img, contents, end)
4381 if (color == NULL) 4379 if (color == NULL)
4382 goto failure; 4380 goto failure;
4383 4381
4384 while (str = strtok (NULL, " \t")) 4382 while ((str = strtok (NULL, " \t")) != NULL)
4385 { 4383 {
4386 next_key = xpm_str_to_color_key (str); 4384 next_key = xpm_str_to_color_key (str);
4387 if (next_key >= 0) 4385 if (next_key >= 0)
@@ -4409,17 +4407,21 @@ xpm_load_image (f, img, contents, end)
4409 Lisp_Object specified_color = Fassoc (symbol_color, color_symbols); 4407 Lisp_Object specified_color = Fassoc (symbol_color, color_symbols);
4410 4408
4411 if (CONSP (specified_color) && STRINGP (XCDR (specified_color))) 4409 if (CONSP (specified_color) && STRINGP (XCDR (specified_color)))
4412 if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0) 4410 {
4413 color_val = Qt; 4411 if (xstricmp (SDATA (XCDR (specified_color)), "None") == 0)
4414 else if (x_defined_color (f, SDATA (XCDR (specified_color)), 4412 color_val = Qt;
4415 &cdef, 0)) 4413 else if (x_defined_color (f, SDATA (XCDR (specified_color)),
4416 color_val = make_number (cdef.pixel); 4414 &cdef, 0))
4415 color_val = make_number (cdef.pixel);
4416 }
4417 } 4417 }
4418 if (NILP (color_val) && max_key > 0) 4418 if (NILP (color_val) && max_key > 0)
4419 if (xstricmp (max_color, "None") == 0) 4419 {
4420 color_val = Qt; 4420 if (xstricmp (max_color, "None") == 0)
4421 else if (x_defined_color (f, max_color, &cdef, 0)) 4421 color_val = Qt;
4422 color_val = make_number (cdef.pixel); 4422 else if (x_defined_color (f, max_color, &cdef, 0))
4423 color_val = make_number (cdef.pixel);
4424 }
4423 if (!NILP (color_val)) 4425 if (!NILP (color_val))
4424 (*put_color_table) (color_table, beg, chars_per_pixel, color_val); 4426 (*put_color_table) (color_table, beg, chars_per_pixel, color_val);
4425 4427
@@ -7848,7 +7850,6 @@ gif_load (f, img)
7848 int width, height; 7850 int width, height;
7849 XImagePtr ximg; 7851 XImagePtr ximg;
7850 TimeValue time; 7852 TimeValue time;
7851 struct gcpro gcpro1;
7852 int ino; 7853 int ino;
7853 CGrafPtr old_port; 7854 CGrafPtr old_port;
7854 GDHandle old_gdh; 7855 GDHandle old_gdh;
diff --git a/src/keyboard.c b/src/keyboard.c
index dff14877103..1ad852c819a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -9684,6 +9684,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9684 /* Don't downcase the last character if the caller says don't. 9684 /* Don't downcase the last character if the caller says don't.
9685 Don't downcase it if the result is undefined, either. */ 9685 Don't downcase it if the result is undefined, either. */
9686 if ((dont_downcase_last || first_binding >= nmaps) 9686 if ((dont_downcase_last || first_binding >= nmaps)
9687 && t > 0
9687 && t - 1 == original_uppercase_position) 9688 && t - 1 == original_uppercase_position)
9688 keybuf[t - 1] = original_uppercase; 9689 keybuf[t - 1] = original_uppercase;
9689 9690
diff --git a/src/keymap.c b/src/keymap.c
index af881d73ccd..5962dfc2efd 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3365,7 +3365,7 @@ describe_map (map, prefix, elt_describer, partial, shadow,
3365 if (vect[i].shadowed) 3365 if (vect[i].shadowed)
3366 { 3366 {
3367 SET_PT (PT - 1); 3367 SET_PT (PT - 1);
3368 insert_string (" (shadowed)"); 3368 insert_string ("\n (that binding is currently shadowed by another mode)");
3369 SET_PT (PT + 1); 3369 SET_PT (PT + 1);
3370 } 3370 }
3371 } 3371 }
diff --git a/src/lisp.h b/src/lisp.h
index 468b699fb06..0df41a0d1f4 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3209,10 +3209,14 @@ extern void fatal () NO_RETURN;
3209/* Defined in terminal.c */ 3209/* Defined in terminal.c */
3210extern void syms_of_terminal P_ ((void)); 3210extern void syms_of_terminal P_ ((void));
3211 3211
3212#ifdef HAVE_X_WINDOWS 3212#ifdef HAVE_WINDOW_SYSTEM
3213/* Defined in fontset.c */ 3213/* Defined in fontset.c */
3214extern void syms_of_fontset P_ ((void)); 3214extern void syms_of_fontset P_ ((void));
3215EXFUN (Fset_fontset_font, 4); 3215EXFUN (Fset_fontset_font, 4);
3216
3217/* Defined in xfns.c, w32fns.c, or macfns.c */
3218EXFUN (Fxw_display_color_p, 1);
3219EXFUN (Fx_file_dialog, 5);
3216#endif 3220#endif
3217 3221
3218/* Defined in xfaces.c */ 3222/* Defined in xfaces.c */
@@ -3226,12 +3230,6 @@ extern int getloadavg P_ ((double *, int));
3226#ifdef HAVE_X_WINDOWS 3230#ifdef HAVE_X_WINDOWS
3227/* Defined in xfns.c */ 3231/* Defined in xfns.c */
3228extern void syms_of_xfns P_ ((void)); 3232extern void syms_of_xfns P_ ((void));
3229#endif /* HAVE_X_WINDOWS */
3230#ifdef HAVE_WINDOW_SYSTEM
3231/* Defined in xfns.c, w32fns.c, or macfns.c */
3232EXFUN (Fxw_display_color_p, 1);
3233EXFUN (Fx_file_dialog, 5);
3234#endif /* HAVE_WINDOW_SYSTEM */
3235 3233
3236/* Defined in xsmfns.c */ 3234/* Defined in xsmfns.c */
3237extern void syms_of_xsmfns P_ ((void)); 3235extern void syms_of_xsmfns P_ ((void));
@@ -3241,11 +3239,32 @@ extern void syms_of_xselect P_ ((void));
3241 3239
3242/* Defined in xterm.c */ 3240/* Defined in xterm.c */
3243extern void syms_of_xterm P_ ((void)); 3241extern void syms_of_xterm P_ ((void));
3242#endif /* HAVE_X_WINDOWS */
3244 3243
3245#ifdef MSDOS 3244#ifdef MSDOS
3246/* Defined in msdos.c */ 3245/* Defined in msdos.c */
3247EXFUN (Fmsdos_downcase_filename, 1); 3246EXFUN (Fmsdos_downcase_filename, 1);
3248#endif 3247#endif
3248
3249#ifdef MAC_OS
3250/* Defined in macfns.c */
3251extern void syms_of_macfns P_ ((void));
3252
3253/* Defined in macselect.c */
3254extern void syms_of_macselect P_ ((void));
3255
3256/* Defined in macterm.c */
3257extern void syms_of_macterm P_ ((void));
3258
3259/* Defined in macmenu.c */
3260extern void syms_of_macmenu P_ ((void));
3261
3262/* Defined in mac.c */
3263extern void syms_of_mac P_ ((void));
3264#ifdef MAC_OSX
3265extern void init_mac_osx_environment P_ ((void));
3266#endif /* MAC_OSX */
3267#endif /* MAC_OS */
3249 3268
3250/* Nonzero means Emacs has already been initialized. 3269/* Nonzero means Emacs has already been initialized.
3251 Used during startup to detect startup of dumped Emacs. */ 3270 Used during startup to detect startup of dumped Emacs. */
diff --git a/src/mac.c b/src/mac.c
index 40bbacf15ce..7172301b6b0 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -28,7 +28,9 @@ Boston, MA 02110-1301, USA. */
28 28
29#include "lisp.h" 29#include "lisp.h"
30#include "process.h" 30#include "process.h"
31#undef init_process 31#ifdef MAC_OSX
32#undef select
33#endif
32#include "systime.h" 34#include "systime.h"
33#include "sysselect.h" 35#include "sysselect.h"
34#include "blockinput.h" 36#include "blockinput.h"
@@ -79,8 +81,10 @@ static ComponentInstance as_scripting_component;
79/* The single script context used for all script executions. */ 81/* The single script context used for all script executions. */
80static OSAID as_script_context; 82static OSAID as_script_context;
81 83
84#ifndef MAC_OSX
82static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); 85static OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
83static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); 86static OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int));
87#endif
84 88
85/* When converting from Mac to Unix pathnames, /'s in folder names are 89/* When converting from Mac to Unix pathnames, /'s in folder names are
86 converted to :'s. This function, used in copying folder names, 90 converted to :'s. This function, used in copying folder names,
@@ -449,15 +453,10 @@ mac_coerce_file_name_ptr (type_code, data_ptr, data_size,
449 char *buf; 453 char *buf;
450 454
451 buf = xmalloc (data_size + 1); 455 buf = xmalloc (data_size + 1);
452 if (buf) 456 memcpy (buf, data_ptr, data_size);
453 { 457 buf[data_size] = '\0';
454 memcpy (buf, data_ptr, data_size); 458 err = posix_pathname_to_fsspec (buf, &fs);
455 buf[data_size] = '\0'; 459 xfree (buf);
456 err = posix_pathname_to_fsspec (buf, &fs);
457 xfree (buf);
458 }
459 else
460 err = memFullErr;
461 if (err == noErr) 460 if (err == noErr)
462 err = AECoercePtr (typeFSS, &fs, sizeof (FSSpec), to_type, result); 461 err = AECoercePtr (typeFSS, &fs, sizeof (FSSpec), to_type, result);
463#endif 462#endif
@@ -485,14 +484,11 @@ mac_coerce_file_name_ptr (type_code, data_ptr, data_size,
485 { 484 {
486 size = AEGetDescDataSize (&desc); 485 size = AEGetDescDataSize (&desc);
487 buf = xmalloc (size); 486 buf = xmalloc (size);
488 if (buf) 487 err = AEGetDescData (&desc, buf, size);
489 { 488 if (err == noErr)
490 err = AEGetDescData (&desc, buf, size); 489 url = CFURLCreateWithBytes (NULL, buf, size,
491 if (err == noErr) 490 kCFStringEncodingUTF8, NULL);
492 url = CFURLCreateWithBytes (NULL, buf, size, 491 xfree (buf);
493 kCFStringEncodingUTF8, NULL);
494 xfree (buf);
495 }
496 AEDisposeDesc (&desc); 492 AEDisposeDesc (&desc);
497 } 493 }
498 } 494 }
@@ -577,21 +573,16 @@ mac_coerce_file_name_desc (from_desc, to_type, handler_refcon, result)
577 data_size = GetHandleSize (from_desc->dataHandle); 573 data_size = GetHandleSize (from_desc->dataHandle);
578#endif 574#endif
579 data_ptr = xmalloc (data_size); 575 data_ptr = xmalloc (data_size);
580 if (data_ptr)
581 {
582#if TARGET_API_MAC_CARBON 576#if TARGET_API_MAC_CARBON
583 err = AEGetDescData (from_desc, data_ptr, data_size); 577 err = AEGetDescData (from_desc, data_ptr, data_size);
584#else 578#else
585 memcpy (data_ptr, *(from_desc->dataHandle), data_size); 579 memcpy (data_ptr, *(from_desc->dataHandle), data_size);
586#endif 580#endif
587 if (err == noErr) 581 if (err == noErr)
588 err = mac_coerce_file_name_ptr (from_type, data_ptr, 582 err = mac_coerce_file_name_ptr (from_type, data_ptr,
589 data_size, to_type, 583 data_size, to_type,
590 handler_refcon, result); 584 handler_refcon, result);
591 xfree (data_ptr); 585 xfree (data_ptr);
592 }
593 else
594 err = memFullErr;
595 } 586 }
596 587
597 if (err != noErr) 588 if (err != noErr)
@@ -687,8 +678,6 @@ create_apple_event_from_event_ref (event, num_params, names, types, result)
687 if (err != noErr) 678 if (err != noErr)
688 break; 679 break;
689 buf = xmalloc (size); 680 buf = xmalloc (size);
690 if (buf == NULL)
691 break;
692 err = GetEventParameter (event, names[i], types[i], NULL, 681 err = GetEventParameter (event, names[i], types[i], NULL,
693 size, NULL, buf); 682 size, NULL, buf);
694 if (err == noErr) 683 if (err == noErr)
@@ -1222,7 +1211,7 @@ parse_value (p)
1222 && '0' <= P[1] && P[1] <= '7' 1211 && '0' <= P[1] && P[1] <= '7'
1223 && '0' <= P[2] && P[2] <= '7') 1212 && '0' <= P[2] && P[2] <= '7')
1224 { 1213 {
1225 *q++ = (P[0] - '0' << 6) + (P[1] - '0' << 3) + (P[2] - '0'); 1214 *q++ = ((P[0] - '0') << 6) + ((P[1] - '0') << 3) + (P[2] - '0');
1226 P += 3; 1215 P += 3;
1227 } 1216 }
1228 else 1217 else
@@ -1592,8 +1581,6 @@ xrm_get_preference_database (application)
1592 1581
1593 count = CFSetGetCount (key_set); 1582 count = CFSetGetCount (key_set);
1594 keys = xmalloc (sizeof (CFStringRef) * count); 1583 keys = xmalloc (sizeof (CFStringRef) * count);
1595 if (keys == NULL)
1596 goto out;
1597 CFSetGetValues (key_set, (const void **)keys); 1584 CFSetGetValues (key_set, (const void **)keys);
1598 for (index = 0; index < count; index++) 1585 for (index = 0; index < count; index++)
1599 { 1586 {
@@ -2789,7 +2776,7 @@ link (const char *name1, const char *name2)
2789/* Determine the path name of the file specified by VREFNUM, DIRID, 2776/* Determine the path name of the file specified by VREFNUM, DIRID,
2790 and NAME and place that in the buffer PATH of length 2777 and NAME and place that in the buffer PATH of length
2791 MAXPATHLEN. */ 2778 MAXPATHLEN. */
2792int 2779static int
2793path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num, 2780path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num,
2794 long dir_id, ConstStr255Param name) 2781 long dir_id, ConstStr255Param name)
2795{ 2782{
@@ -2834,6 +2821,8 @@ path_from_vol_dir_name (char *path, int man_path_len, short vol_ref_num,
2834} 2821}
2835 2822
2836 2823
2824#ifndef MAC_OSX
2825
2837static OSErr 2826static OSErr
2838posix_pathname_to_fsspec (ufn, fs) 2827posix_pathname_to_fsspec (ufn, fs)
2839 const char *ufn; 2828 const char *ufn;
@@ -2866,8 +2855,6 @@ fsspec_to_posix_pathname (fs, ufn, ufnbuflen)
2866 return fnfErr; 2855 return fnfErr;
2867} 2856}
2868 2857
2869#ifndef MAC_OSX
2870
2871int 2858int
2872readlink (const char *path, char *buf, int bufsiz) 2859readlink (const char *path, char *buf, int bufsiz)
2873{ 2860{
@@ -3124,8 +3111,7 @@ get_temp_dir_name ()
3124 short vol_ref_num; 3111 short vol_ref_num;
3125 long dir_id; 3112 long dir_id;
3126 OSErr err; 3113 OSErr err;
3127 Str255 dir_name, full_path; 3114 Str255 full_path;
3128 CInfoPBRec cpb;
3129 char unix_dir_name[MAXPATHLEN+1]; 3115 char unix_dir_name[MAXPATHLEN+1];
3130 DIR *dir; 3116 DIR *dir;
3131 3117
@@ -3217,8 +3203,7 @@ get_path_to_system_folder ()
3217 short vol_ref_num; 3203 short vol_ref_num;
3218 long dir_id; 3204 long dir_id;
3219 OSErr err; 3205 OSErr err;
3220 Str255 dir_name, full_path; 3206 Str255 full_path;
3221 CInfoPBRec cpb;
3222 static char system_folder_unix_name[MAXPATHLEN+1]; 3207 static char system_folder_unix_name[MAXPATHLEN+1];
3223 DIR *dir; 3208 DIR *dir;
3224 3209
@@ -3947,7 +3932,6 @@ DEFUN ("mac-get-file-creator", Fmac_get_file_creator, Smac_get_file_creator, 1,
3947#else 3932#else
3948 FSSpec fss; 3933 FSSpec fss;
3949#endif 3934#endif
3950 OSType cCode;
3951 Lisp_Object result = Qnil; 3935 Lisp_Object result = Qnil;
3952 CHECK_STRING (filename); 3936 CHECK_STRING (filename);
3953 3937
@@ -4002,7 +3986,6 @@ DEFUN ("mac-get-file-type", Fmac_get_file_type, Smac_get_file_type, 1, 1, 0,
4002#else 3986#else
4003 FSSpec fss; 3987 FSSpec fss;
4004#endif 3988#endif
4005 OSType cCode;
4006 Lisp_Object result = Qnil; 3989 Lisp_Object result = Qnil;
4007 CHECK_STRING (filename); 3990 CHECK_STRING (filename);
4008 3991
@@ -4296,11 +4279,6 @@ Each type should be a string of length 4 or the symbol
4296 Lisp_Object result = Qnil; 4279 Lisp_Object result = Qnil;
4297 DescType src_desc_type, dst_desc_type; 4280 DescType src_desc_type, dst_desc_type;
4298 AEDesc dst_desc; 4281 AEDesc dst_desc;
4299#ifdef MAC_OSX
4300 FSRef fref;
4301#else
4302 FSSpec fs;
4303#endif
4304 4282
4305 CHECK_STRING (src_data); 4283 CHECK_STRING (src_data);
4306 if (EQ (src_type, Qundecoded_file_name)) 4284 if (EQ (src_type, Qundecoded_file_name))
@@ -4422,18 +4400,20 @@ otherwise. */)
4422 } 4400 }
4423 4401
4424 if (NILP (key)) 4402 if (NILP (key))
4425 if (EQ (format, Qxml)) 4403 {
4426 { 4404 if (EQ (format, Qxml))
4427 CFDataRef data = CFPropertyListCreateXMLData (NULL, plist); 4405 {
4428 if (data == NULL) 4406 CFDataRef data = CFPropertyListCreateXMLData (NULL, plist);
4429 goto out; 4407 if (data == NULL)
4430 result = cfdata_to_lisp (data); 4408 goto out;
4431 CFRelease (data); 4409 result = cfdata_to_lisp (data);
4432 } 4410 CFRelease (data);
4433 else 4411 }
4434 result = 4412 else
4435 cfproperty_list_to_lisp (plist, EQ (format, Qt), 4413 result =
4436 NILP (hash_bound) ? -1 : XINT (hash_bound)); 4414 cfproperty_list_to_lisp (plist, EQ (format, Qt),
4415 NILP (hash_bound) ? -1 : XINT (hash_bound));
4416 }
4437 4417
4438 out: 4418 out:
4439 if (app_plist) 4419 if (app_plist)
@@ -4550,11 +4530,8 @@ cfstring_create_normalized (str, symbol)
4550 if (in_text == NULL) 4530 if (in_text == NULL)
4551 { 4531 {
4552 buffer = xmalloc (sizeof (UniChar) * length); 4532 buffer = xmalloc (sizeof (UniChar) * length);
4553 if (buffer) 4533 CFStringGetCharacters (str, CFRangeMake (0, length), buffer);
4554 { 4534 in_text = buffer;
4555 CFStringGetCharacters (str, CFRangeMake (0, length), buffer);
4556 in_text = buffer;
4557 }
4558 } 4535 }
4559 4536
4560 if (in_text) 4537 if (in_text)
@@ -4562,15 +4539,12 @@ cfstring_create_normalized (str, symbol)
4562 while (err == noErr) 4539 while (err == noErr)
4563 { 4540 {
4564 out_buf = xmalloc (out_size); 4541 out_buf = xmalloc (out_size);
4565 if (out_buf == NULL) 4542 err = ConvertFromUnicodeToText (uni, length * sizeof (UniChar),
4566 err = mFulErr; 4543 in_text,
4567 else 4544 kUnicodeDefaultDirectionMask,
4568 err = ConvertFromUnicodeToText (uni, length * sizeof (UniChar), 4545 0, NULL, NULL, NULL,
4569 in_text, 4546 out_size, &out_read, &out_len,
4570 kUnicodeDefaultDirectionMask, 4547 out_buf);
4571 0, NULL, NULL, NULL,
4572 out_size, &out_read, &out_len,
4573 out_buf);
4574 if (err == noErr && out_read < length * sizeof (UniChar)) 4548 if (err == noErr && out_read < length * sizeof (UniChar))
4575 { 4549 {
4576 xfree (out_buf); 4550 xfree (out_buf);
@@ -4701,7 +4675,6 @@ mac_get_system_locale ()
4701 4675
4702 4676
4703#ifdef MAC_OSX 4677#ifdef MAC_OSX
4704#undef select
4705 4678
4706extern int inhibit_window_system; 4679extern int inhibit_window_system;
4707extern int noninteractive; 4680extern int noninteractive;
diff --git a/src/macfns.c b/src/macfns.c
index a6a5e99727a..3f5151daee9 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1024,7 +1024,7 @@ Lisp_Object
1024x_to_mac_color (colorname) 1024x_to_mac_color (colorname)
1025 char * colorname; 1025 char * colorname;
1026{ 1026{
1027 register Lisp_Object tail, ret = Qnil; 1027 register Lisp_Object ret = Qnil;
1028 1028
1029 BLOCK_INPUT; 1029 BLOCK_INPUT;
1030 1030
@@ -1359,7 +1359,6 @@ x_set_mouse_color (f, arg, oldval)
1359 Lisp_Object arg, oldval; 1359 Lisp_Object arg, oldval;
1360{ 1360{
1361 struct x_output *x = f->output_data.x; 1361 struct x_output *x = f->output_data.x;
1362 Display *dpy = FRAME_MAC_DISPLAY (f);
1363 Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; 1362 Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
1364 Cursor hourglass_cursor, horizontal_drag_cursor; 1363 Cursor hourglass_cursor, horizontal_drag_cursor;
1365 unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); 1364 unsigned long pixel = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f));
@@ -2387,7 +2386,6 @@ This function is an internal primitive--use `make-frame' instead. */)
2387 struct mac_display_info *dpyinfo = NULL; 2386 struct mac_display_info *dpyinfo = NULL;
2388 Lisp_Object parent; 2387 Lisp_Object parent;
2389 struct kboard *kb; 2388 struct kboard *kb;
2390 static int x_frame_count = 2; /* begins at 2 because terminal frame is F1 */
2391 2389
2392 check_mac (); 2390 check_mac ();
2393 2391
@@ -2910,23 +2908,25 @@ If omitted or nil, that stands for the selected frame's display. */)
2910 BLOCK_INPUT; 2908 BLOCK_INPUT;
2911 err = Gestalt (gestaltSystemVersion, &response); 2909 err = Gestalt (gestaltSystemVersion, &response);
2912 if (err == noErr) 2910 if (err == noErr)
2913 if (response >= 0x00001040) 2911 {
2914 { 2912 if (response >= 0x00001040)
2915 err = Gestalt ('sys1', &major); /* gestaltSystemVersionMajor */ 2913 {
2916 if (err == noErr) 2914 err = Gestalt ('sys1', &major); /* gestaltSystemVersionMajor */
2917 err = Gestalt ('sys2', &minor); /* gestaltSystemVersionMinor */ 2915 if (err == noErr)
2918 if (err == noErr) 2916 err = Gestalt ('sys2', &minor); /* gestaltSystemVersionMinor */
2919 err = Gestalt ('sys3', &bugfix); /* gestaltSystemVersionBugFix */ 2917 if (err == noErr)
2920 } 2918 err = Gestalt ('sys3', &bugfix); /* gestaltSystemVersionBugFix */
2921 else 2919 }
2922 { 2920 else
2923 bugfix = response & 0xf; 2921 {
2924 response >>= 4; 2922 bugfix = response & 0xf;
2925 minor = response & 0xf; 2923 response >>= 4;
2926 response >>= 4; 2924 minor = response & 0xf;
2927 /* convert BCD to int */ 2925 response >>= 4;
2928 major = response - (response >> 4) * 6; 2926 /* convert BCD to int */
2929 } 2927 major = response - (response >> 4) * 6;
2928 }
2929 }
2930 UNBLOCK_INPUT; 2930 UNBLOCK_INPUT;
2931 2931
2932 if (err != noErr) 2932 if (err != noErr)
@@ -3210,6 +3210,14 @@ DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0,
3210 return Qnil; 3210 return Qnil;
3211} 3211}
3212 3212
3213/* x_sync is a no-op on Mac. */
3214
3215void
3216x_sync (f)
3217 FRAME_PTR f;
3218{
3219}
3220
3213 3221
3214/*********************************************************************** 3222/***********************************************************************
3215 Window properties 3223 Window properties
@@ -4187,7 +4195,6 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */)
4187 int count = SPECPDL_INDEX (); 4195 int count = SPECPDL_INDEX ();
4188 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; 4196 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
4189 char filename[MAXPATHLEN]; 4197 char filename[MAXPATHLEN];
4190 int default_filter_index = 1; /* 1: All Files, 2: Directories only */
4191 static NavEventUPP mac_nav_event_callbackUPP = NULL; 4198 static NavEventUPP mac_nav_event_callbackUPP = NULL;
4192 4199
4193 GCPRO6 (prompt, dir, default_filename, mustmatch, file, only_dir_p); 4200 GCPRO6 (prompt, dir, default_filename, mustmatch, file, only_dir_p);
diff --git a/src/macmenu.c b/src/macmenu.c
index 8610ecafd94..29233ec0d64 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -72,7 +72,7 @@ enum mac_menu_kind { /* Menu ID range */
72 MAC_MENU_END /* 32768 */ 72 MAC_MENU_END /* 32768 */
73}; 73};
74 74
75static const min_menu_id[] = {0, 1, 235, 236, 256, 16384, 32768}; 75static const int min_menu_id[] = {0, 1, 235, 236, 256, 16384, 32768};
76 76
77#define DIALOG_WINDOW_RESOURCE 130 77#define DIALOG_WINDOW_RESOURCE 130
78 78
diff --git a/src/macselect.c b/src/macselect.c
index 066892adce0..fe4a7c8eccc 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -153,7 +153,6 @@ static ScrapFlavorType
153get_flavor_type_from_symbol (sym) 153get_flavor_type_from_symbol (sym)
154 Lisp_Object sym; 154 Lisp_Object sym;
155{ 155{
156 ScrapFlavorType val;
157 Lisp_Object str = Fget (sym, Qmac_ostype); 156 Lisp_Object str = Fget (sym, Qmac_ostype);
158 157
159 if (STRINGP (str) && SBYTES (str) == 4) 158 if (STRINGP (str) && SBYTES (str) == 4)
@@ -322,17 +321,19 @@ get_scrap_private_timestamp (scrap, timestamp)
322 321
323 err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags); 322 err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags);
324 if (err == noErr) 323 if (err == noErr)
325 if (!(flags & kScrapFlavorMaskSenderOnly)) 324 {
326 err = noTypeErr; 325 if (!(flags & kScrapFlavorMaskSenderOnly))
327 else 326 err = noTypeErr;
328 { 327 else
329 Size size = sizeof (*timestamp); 328 {
329 Size size = sizeof (*timestamp);
330 330
331 err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, 331 err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP,
332 &size, timestamp); 332 &size, timestamp);
333 if (err == noErr && size != sizeof (*timestamp)) 333 if (err == noErr && size != sizeof (*timestamp))
334 err = noTypeErr; 334 err = noTypeErr;
335 } 335 }
336 }
336#else /* !TARGET_API_MAC_CARBON */ 337#else /* !TARGET_API_MAC_CARBON */
337 Handle handle; 338 Handle handle;
338 SInt32 size, offset; 339 SInt32 size, offset;
@@ -372,14 +373,11 @@ get_scrap_target_type_list (scrap)
372 err = GetScrapFlavorCount (scrap, &count); 373 err = GetScrapFlavorCount (scrap, &count);
373 if (err == noErr) 374 if (err == noErr)
374 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); 375 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
375 if (flavor_info) 376 err = GetScrapFlavorInfoList (scrap, &count, flavor_info);
377 if (err != noErr)
376 { 378 {
377 err = GetScrapFlavorInfoList (scrap, &count, flavor_info); 379 xfree (flavor_info);
378 if (err != noErr) 380 flavor_info = NULL;
379 {
380 xfree (flavor_info);
381 flavor_info = NULL;
382 }
383 } 381 }
384 if (flavor_info == NULL) 382 if (flavor_info == NULL)
385 count = 0; 383 count = 0;
@@ -683,18 +681,20 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp)
683 681
684 err = get_scrap_from_symbol (selection_symbol, 0, &scrap); 682 err = get_scrap_from_symbol (selection_symbol, 0, &scrap);
685 if (err == noErr && scrap) 683 if (err == noErr && scrap)
686 if (EQ (target_type, QTARGETS)) 684 {
687 { 685 if (EQ (target_type, QTARGETS))
688 result = get_scrap_target_type_list (scrap); 686 {
689 result = Fvconcat (1, &result); 687 result = get_scrap_target_type_list (scrap);
690 } 688 result = Fvconcat (1, &result);
691 else 689 }
692 { 690 else
693 result = get_scrap_string (scrap, target_type); 691 {
694 if (STRINGP (result)) 692 result = get_scrap_string (scrap, target_type);
695 Fput_text_property (make_number (0), make_number (SBYTES (result)), 693 if (STRINGP (result))
696 Qforeign_selection, target_type, result); 694 Fput_text_property (make_number (0), make_number (SBYTES (result)),
697 } 695 Qforeign_selection, target_type, result);
696 }
697 }
698 698
699 UNBLOCK_INPUT; 699 UNBLOCK_INPUT;
700 700
@@ -1009,7 +1009,7 @@ defer_apple_events (apple_event, reply)
1009 /* Mac OS 10.3 Xcode manual says AESuspendTheCurrentEvent makes 1009 /* Mac OS 10.3 Xcode manual says AESuspendTheCurrentEvent makes
1010 copies of the Apple event and the reply, but Mac OS 10.4 Xcode 1010 copies of the Apple event and the reply, but Mac OS 10.4 Xcode
1011 manual says it doesn't. Anyway we create copies of them and save 1011 manual says it doesn't. Anyway we create copies of them and save
1012 it in `deferred_apple_events'. */ 1012 them in `deferred_apple_events'. */
1013 if (err == noErr) 1013 if (err == noErr)
1014 { 1014 {
1015 if (deferred_apple_events.buf == NULL) 1015 if (deferred_apple_events.buf == NULL)
@@ -1018,20 +1018,13 @@ defer_apple_events (apple_event, reply)
1018 deferred_apple_events.count = 0; 1018 deferred_apple_events.count = 0;
1019 deferred_apple_events.buf = 1019 deferred_apple_events.buf =
1020 xmalloc (sizeof (AppleEvent) * deferred_apple_events.size); 1020 xmalloc (sizeof (AppleEvent) * deferred_apple_events.size);
1021 if (deferred_apple_events.buf == NULL)
1022 err = memFullErr;
1023 } 1021 }
1024 else if (deferred_apple_events.count == deferred_apple_events.size) 1022 else if (deferred_apple_events.count == deferred_apple_events.size)
1025 { 1023 {
1026 AppleEvent *newbuf;
1027
1028 deferred_apple_events.size *= 2; 1024 deferred_apple_events.size *= 2;
1029 newbuf = xrealloc (deferred_apple_events.buf, 1025 deferred_apple_events.buf
1030 sizeof (AppleEvent) * deferred_apple_events.size); 1026 = xrealloc (deferred_apple_events.buf,
1031 if (newbuf) 1027 sizeof (AppleEvent) * deferred_apple_events.size);
1032 deferred_apple_events.buf = newbuf;
1033 else
1034 err = memFullErr;
1035 } 1028 }
1036 } 1029 }
1037 1030
@@ -1123,11 +1116,8 @@ DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events,
1123 doc: /* Process Apple events that are deferred at the startup time. */) 1116 doc: /* Process Apple events that are deferred at the startup time. */)
1124 () 1117 ()
1125{ 1118{
1126 OSErr err;
1127 Lisp_Object result = Qnil; 1119 Lisp_Object result = Qnil;
1128 long i, count; 1120 long i;
1129 AppleEvent apple_event, reply;
1130 AEKeyword keyword;
1131 1121
1132 if (mac_ready_for_apple_events) 1122 if (mac_ready_for_apple_events)
1133 return Qnil; 1123 return Qnil;
@@ -1192,29 +1182,21 @@ copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type)
1192 buf = NULL; 1182 buf = NULL;
1193 } 1183 }
1194 else if (size_allocated < size) 1184 else if (size_allocated < size)
1195 { 1185 buf = xrealloc (buf, size);
1196 char *newbuf = xrealloc (buf, size);
1197
1198 if (newbuf)
1199 buf = newbuf;
1200 else
1201 {
1202 xfree (buf);
1203 buf = NULL;
1204 }
1205 }
1206 else 1186 else
1207 break; 1187 break;
1208 } 1188 }
1209 if (err == noErr) 1189 if (err == noErr)
1210 if (buf == NULL) 1190 {
1211 err = memFullErr; 1191 if (buf == NULL)
1212 else 1192 err = memFullErr;
1213 { 1193 else
1214 err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone, 1194 {
1215 size, buf); 1195 err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone,
1216 xfree (buf); 1196 size, buf);
1217 } 1197 xfree (buf);
1198 }
1199 }
1218 1200
1219 return err; 1201 return err;
1220} 1202}
@@ -1300,14 +1282,11 @@ mac_handle_service_event (call_ref, event, data)
1300 err = GetScrapFlavorCount (cur_scrap, &count); 1282 err = GetScrapFlavorCount (cur_scrap, &count);
1301 if (err == noErr) 1283 if (err == noErr)
1302 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); 1284 flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count);
1303 if (flavor_info) 1285 err = GetScrapFlavorInfoList (cur_scrap, &count, flavor_info);
1286 if (err != noErr)
1304 { 1287 {
1305 err = GetScrapFlavorInfoList (cur_scrap, &count, flavor_info); 1288 xfree (flavor_info);
1306 if (err != noErr) 1289 flavor_info = NULL;
1307 {
1308 xfree (flavor_info);
1309 flavor_info = NULL;
1310 }
1311 } 1290 }
1312 if (flavor_info == NULL) 1291 if (flavor_info == NULL)
1313 break; 1292 break;
diff --git a/src/macterm.c b/src/macterm.c
index 7c946a9fd3f..5696f13e5a0 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -77,7 +77,6 @@ Boston, MA 02110-1301, USA. */
77#include "termhooks.h" 77#include "termhooks.h"
78#include "termopts.h" 78#include "termopts.h"
79#include "termchar.h" 79#include "termchar.h"
80#include "gnu.h"
81#include "disptab.h" 80#include "disptab.h"
82#include "buffer.h" 81#include "buffer.h"
83#include "window.h" 82#include "window.h"
@@ -215,7 +214,6 @@ QDGlobals qd; /* QuickDraw global information structure. */
215 214
216struct mac_display_info *mac_display_info_for_display (Display *); 215struct mac_display_info *mac_display_info_for_display (Display *);
217static void x_update_window_end P_ ((struct window *, int, int)); 216static void x_update_window_end P_ ((struct window *, int, int));
218static int x_io_error_quitter P_ ((Display *));
219int x_catch_errors P_ ((Display *)); 217int x_catch_errors P_ ((Display *));
220void x_uncatch_errors P_ ((Display *, int)); 218void x_uncatch_errors P_ ((Display *, int));
221void x_lower_frame P_ ((struct frame *)); 219void x_lower_frame P_ ((struct frame *));
@@ -1510,11 +1508,8 @@ XCreateGC (display, window, mask, xgcv)
1510{ 1508{
1511 GC gc = xmalloc (sizeof (*gc)); 1509 GC gc = xmalloc (sizeof (*gc));
1512 1510
1513 if (gc) 1511 bzero (gc, sizeof (*gc));
1514 { 1512 XChangeGC (display, gc, mask, xgcv);
1515 bzero (gc, sizeof (*gc));
1516 XChangeGC (display, gc, mask, xgcv);
1517 }
1518 1513
1519 return gc; 1514 return gc;
1520} 1515}
@@ -1697,14 +1692,6 @@ XSetWindowBackground (display, w, color)
1697#endif 1692#endif
1698} 1693}
1699 1694
1700/* x_sync is a no-op on Mac. */
1701void
1702x_sync (f)
1703 void *f;
1704{
1705}
1706
1707
1708/* Flush display of frame F, or of all frames if F is null. */ 1695/* Flush display of frame F, or of all frames if F is null. */
1709 1696
1710static void 1697static void
@@ -2080,7 +2067,6 @@ mac_define_fringe_bitmap (which, bits, h, wd)
2080 unsigned short *bits; 2067 unsigned short *bits;
2081 int h, wd; 2068 int h, wd;
2082{ 2069{
2083 unsigned short *mask_bits;
2084 int i; 2070 int i;
2085 CGDataProviderRef provider; 2071 CGDataProviderRef provider;
2086 2072
@@ -2171,21 +2157,17 @@ x_per_char_metric (font, char2b)
2171 if (*row == NULL) 2157 if (*row == NULL)
2172 { 2158 {
2173 *row = xmalloc (sizeof (XCharStructRow)); 2159 *row = xmalloc (sizeof (XCharStructRow));
2174 if (*row) 2160 bzero (*row, sizeof (XCharStructRow));
2175 bzero (*row, sizeof (XCharStructRow));
2176 } 2161 }
2177 if (*row) 2162 pcm = (*row)->per_char + char2b->byte2;
2163 if (!XCHARSTRUCTROW_CHAR_VALID_P (*row, char2b->byte2))
2178 { 2164 {
2179 pcm = (*row)->per_char + char2b->byte2; 2165 BLOCK_INPUT;
2180 if (!XCHARSTRUCTROW_CHAR_VALID_P (*row, char2b->byte2)) 2166 mac_query_char_extents (font->mac_style,
2181 { 2167 (char2b->byte1 << 8) + char2b->byte2,
2182 BLOCK_INPUT; 2168 NULL, NULL, pcm, NULL);
2183 mac_query_char_extents (font->mac_style, 2169 UNBLOCK_INPUT;
2184 (char2b->byte1 << 8) + char2b->byte2, 2170 XCHARSTRUCTROW_SET_CHAR_VALID (*row, char2b->byte2);
2185 NULL, NULL, pcm, NULL);
2186 UNBLOCK_INPUT;
2187 XCHARSTRUCTROW_SET_CHAR_VALID (*row, char2b->byte2);
2188 }
2189 } 2171 }
2190 } 2172 }
2191 else 2173 else
@@ -2366,7 +2348,6 @@ static void x_setup_relief_colors P_ ((struct glyph_string *));
2366static void x_draw_image_glyph_string P_ ((struct glyph_string *)); 2348static void x_draw_image_glyph_string P_ ((struct glyph_string *));
2367static void x_draw_image_relief P_ ((struct glyph_string *)); 2349static void x_draw_image_relief P_ ((struct glyph_string *));
2368static void x_draw_image_foreground P_ ((struct glyph_string *)); 2350static void x_draw_image_foreground P_ ((struct glyph_string *));
2369static void x_draw_image_foreground_1 P_ ((struct glyph_string *, Pixmap));
2370static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int, 2351static void x_clear_glyph_string_rect P_ ((struct glyph_string *, int,
2371 int, int, int)); 2352 int, int, int));
2372static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int, 2353static void x_draw_relief_rect P_ ((struct frame *, int, int, int, int,
@@ -2567,34 +2548,36 @@ static void
2567mac_compute_glyph_string_overhangs (s) 2548mac_compute_glyph_string_overhangs (s)
2568 struct glyph_string *s; 2549 struct glyph_string *s;
2569{ 2550{
2570 if (s->cmp == NULL 2551 if (!(s->cmp == NULL
2571 && s->first_glyph->type == CHAR_GLYPH) 2552 && s->first_glyph->type == CHAR_GLYPH))
2572 if (!s->two_byte_p 2553 return;
2554
2555 if (!s->two_byte_p
2573#if USE_ATSUI 2556#if USE_ATSUI
2574 || s->font->mac_style 2557 || s->font->mac_style
2575#endif 2558#endif
2576 ) 2559 )
2577 { 2560 {
2578 XCharStruct cs; 2561 XCharStruct cs;
2579 2562
2580 mac_text_extents_16 (s->font, s->char2b, s->nchars, &cs); 2563 mac_text_extents_16 (s->font, s->char2b, s->nchars, &cs);
2581 s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0; 2564 s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0;
2582 s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0; 2565 s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0;
2583 } 2566 }
2584 else 2567 else
2585 { 2568 {
2586 Rect r; 2569 Rect r;
2587 MacFontStruct *font = s->font; 2570 MacFontStruct *font = s->font;
2588 2571
2589 TextFont (font->mac_fontnum); 2572 TextFont (font->mac_fontnum);
2590 TextSize (font->mac_fontsize); 2573 TextSize (font->mac_fontsize);
2591 TextFace (font->mac_fontface); 2574 TextFace (font->mac_fontface);
2592 2575
2593 QDTextBounds (s->nchars * 2, (char *)s->char2b, &r); 2576 QDTextBounds (s->nchars * 2, (char *)s->char2b, &r);
2594 2577
2595 s->right_overhang = r.right > s->width ? r.right - s->width : 0; 2578 s->right_overhang = r.right > s->width ? r.right - s->width : 0;
2596 s->left_overhang = r.left < 0 ? -r.left : 0; 2579 s->left_overhang = r.left < 0 ? -r.left : 0;
2597 } 2580 }
2598} 2581}
2599 2582
2600 2583
@@ -3430,7 +3413,6 @@ x_draw_image_glyph_string (s)
3430 int box_line_hwidth = abs (s->face->box_line_width); 3413 int box_line_hwidth = abs (s->face->box_line_width);
3431 int box_line_vwidth = max (s->face->box_line_width, 0); 3414 int box_line_vwidth = max (s->face->box_line_width, 0);
3432 int height; 3415 int height;
3433 Pixmap pixmap = 0;
3434 3416
3435 height = s->height - 2 * box_line_vwidth; 3417 height = s->height - 2 * box_line_vwidth;
3436 3418
@@ -4176,142 +4158,6 @@ x_frame_rehighlight (dpyinfo)
4176 4158
4177 4159
4178 4160
4179/* Keyboard processing - modifier keys, vendor-specific keysyms, etc. */
4180
4181#if 0 /* MAC_TODO */
4182/* Initialize mode_switch_bit and modifier_meaning. */
4183static void
4184x_find_modifier_meanings (dpyinfo)
4185 struct x_display_info *dpyinfo;
4186{
4187 int min_code, max_code;
4188 KeySym *syms;
4189 int syms_per_code;
4190 XModifierKeymap *mods;
4191
4192 dpyinfo->meta_mod_mask = 0;
4193 dpyinfo->shift_lock_mask = 0;
4194 dpyinfo->alt_mod_mask = 0;
4195 dpyinfo->super_mod_mask = 0;
4196 dpyinfo->hyper_mod_mask = 0;
4197
4198#ifdef HAVE_X11R4
4199 XDisplayKeycodes (dpyinfo->display, &min_code, &max_code);
4200#else
4201 min_code = dpyinfo->display->min_keycode;
4202 max_code = dpyinfo->display->max_keycode;
4203#endif
4204
4205 syms = XGetKeyboardMapping (dpyinfo->display,
4206 min_code, max_code - min_code + 1,
4207 &syms_per_code);
4208 mods = XGetModifierMapping (dpyinfo->display);
4209
4210 /* Scan the modifier table to see which modifier bits the Meta and
4211 Alt keysyms are on. */
4212 {
4213 int row, col; /* The row and column in the modifier table. */
4214
4215 for (row = 3; row < 8; row++)
4216 for (col = 0; col < mods->max_keypermod; col++)
4217 {
4218 KeyCode code
4219 = mods->modifiermap[(row * mods->max_keypermod) + col];
4220
4221 /* Zeroes are used for filler. Skip them. */
4222 if (code == 0)
4223 continue;
4224
4225 /* Are any of this keycode's keysyms a meta key? */
4226 {
4227 int code_col;
4228
4229 for (code_col = 0; code_col < syms_per_code; code_col++)
4230 {
4231 int sym = syms[((code - min_code) * syms_per_code) + code_col];
4232
4233 switch (sym)
4234 {
4235 case XK_Meta_L:
4236 case XK_Meta_R:
4237 dpyinfo->meta_mod_mask |= (1 << row);
4238 break;
4239
4240 case XK_Alt_L:
4241 case XK_Alt_R:
4242 dpyinfo->alt_mod_mask |= (1 << row);
4243 break;
4244
4245 case XK_Hyper_L:
4246 case XK_Hyper_R:
4247 dpyinfo->hyper_mod_mask |= (1 << row);
4248 break;
4249
4250 case XK_Super_L:
4251 case XK_Super_R:
4252 dpyinfo->super_mod_mask |= (1 << row);
4253 break;
4254
4255 case XK_Shift_Lock:
4256 /* Ignore this if it's not on the lock modifier. */
4257 if ((1 << row) == LockMask)
4258 dpyinfo->shift_lock_mask = LockMask;
4259 break;
4260 }
4261 }
4262 }
4263 }
4264 }
4265
4266 /* If we couldn't find any meta keys, accept any alt keys as meta keys. */
4267 if (! dpyinfo->meta_mod_mask)
4268 {
4269 dpyinfo->meta_mod_mask = dpyinfo->alt_mod_mask;
4270 dpyinfo->alt_mod_mask = 0;
4271 }
4272
4273 /* If some keys are both alt and meta,
4274 make them just meta, not alt. */
4275 if (dpyinfo->alt_mod_mask & dpyinfo->meta_mod_mask)
4276 {
4277 dpyinfo->alt_mod_mask &= ~dpyinfo->meta_mod_mask;
4278 }
4279
4280 XFree ((char *) syms);
4281 XFreeModifiermap (mods);
4282}
4283
4284#endif /* MAC_TODO */
4285
4286/* Convert between the modifier bits X uses and the modifier bits
4287 Emacs uses. */
4288
4289static unsigned int
4290x_mac_to_emacs_modifiers (dpyinfo, state)
4291 struct x_display_info *dpyinfo;
4292 unsigned short state;
4293{
4294 return (((state & shiftKey) ? shift_modifier : 0)
4295 | ((state & controlKey) ? ctrl_modifier : 0)
4296 | ((state & cmdKey) ? meta_modifier : 0)
4297 | ((state & optionKey) ? alt_modifier : 0));
4298}
4299
4300#if 0 /* MAC_TODO */
4301static unsigned short
4302x_emacs_to_x_modifiers (dpyinfo, state)
4303 struct x_display_info *dpyinfo;
4304 unsigned int state;
4305{
4306 return ( ((state & alt_modifier) ? dpyinfo->alt_mod_mask : 0)
4307 | ((state & super_modifier) ? dpyinfo->super_mod_mask : 0)
4308 | ((state & hyper_modifier) ? dpyinfo->hyper_mod_mask : 0)
4309 | ((state & shift_modifier) ? ShiftMask : 0)
4310 | ((state & ctrl_modifier) ? ControlMask : 0)
4311 | ((state & meta_modifier) ? dpyinfo->meta_mod_mask : 0));
4312}
4313#endif /* MAC_TODO */
4314
4315/* Convert a keysym to its name. */ 4161/* Convert a keysym to its name. */
4316 4162
4317char * 4163char *
@@ -5102,41 +4948,43 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
5102 4948
5103#ifdef USE_TOOLKIT_SCROLL_BARS 4949#ifdef USE_TOOLKIT_SCROLL_BARS
5104 if (NILP (bar->track_top)) 4950 if (NILP (bar->track_top))
5105 if (sb_width >= disp_height) 4951 {
5106 { 4952 if (sb_width >= disp_height)
5107 XSETINT (bar->track_top, 0); 4953 {
5108 XSETINT (bar->track_height, 0); 4954 XSETINT (bar->track_top, 0);
5109 } 4955 XSETINT (bar->track_height, 0);
5110 else 4956 }
5111 { 4957 else
5112 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); 4958 {
5113 Rect r0, r1; 4959 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
4960 Rect r0, r1;
5114 4961
5115 BLOCK_INPUT; 4962 BLOCK_INPUT;
5116 4963
5117 SetControl32BitMinimum (ch, 0); 4964 SetControl32BitMinimum (ch, 0);
5118 SetControl32BitMaximum (ch, 1); 4965 SetControl32BitMaximum (ch, 1);
5119 SetControlViewSize (ch, 1); 4966 SetControlViewSize (ch, 1);
5120 4967
5121 /* Move the scroll bar thumb to the top. */ 4968 /* Move the scroll bar thumb to the top. */
5122 SetControl32BitValue (ch, 0); 4969 SetControl32BitValue (ch, 0);
5123 get_control_part_bounds (ch, kControlIndicatorPart, &r0); 4970 get_control_part_bounds (ch, kControlIndicatorPart, &r0);
5124 4971
5125 /* Move the scroll bar thumb to the bottom. */ 4972 /* Move the scroll bar thumb to the bottom. */
5126 SetControl32BitValue (ch, 1); 4973 SetControl32BitValue (ch, 1);
5127 get_control_part_bounds (ch, kControlIndicatorPart, &r1); 4974 get_control_part_bounds (ch, kControlIndicatorPart, &r1);
5128 4975
5129 UnionRect (&r0, &r1, &r0); 4976 UnionRect (&r0, &r1, &r0);
5130 XSETINT (bar->track_top, r0.top); 4977 XSETINT (bar->track_top, r0.top);
5131 XSETINT (bar->track_height, r0.bottom - r0.top); 4978 XSETINT (bar->track_height, r0.bottom - r0.top);
5132 4979
5133 /* Don't show the scroll bar if its height is not enough to 4980 /* Don't show the scroll bar if its height is not enough to
5134 display the scroll bar thumb. */ 4981 display the scroll bar thumb. */
5135 if (r0.bottom - r0.top > 0) 4982 if (r0.bottom - r0.top > 0)
5136 ShowControl (ch); 4983 ShowControl (ch);
5137 4984
5138 UNBLOCK_INPUT; 4985 UNBLOCK_INPUT;
5139 } 4986 }
4987 }
5140 4988
5141 x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); 4989 x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
5142#else /* not USE_TOOLKIT_SCROLL_BARS */ 4990#else /* not USE_TOOLKIT_SCROLL_BARS */
@@ -6205,10 +6053,12 @@ mac_handle_visibility_change (f)
6205 struct input_event buf; 6053 struct input_event buf;
6206 6054
6207 if (IsWindowVisible (wp)) 6055 if (IsWindowVisible (wp))
6208 if (IsWindowCollapsed (wp)) 6056 {
6209 iconified = 1; 6057 if (IsWindowCollapsed (wp))
6210 else 6058 iconified = 1;
6211 visible = 1; 6059 else
6060 visible = 1;
6061 }
6212 6062
6213 if (!f->async_visible && visible) 6063 if (!f->async_visible && visible)
6214 { 6064 {
@@ -6254,9 +6104,6 @@ void
6254x_make_frame_visible (f) 6104x_make_frame_visible (f)
6255 struct frame *f; 6105 struct frame *f;
6256{ 6106{
6257 Lisp_Object type;
6258 int original_top, original_left;
6259
6260 BLOCK_INPUT; 6107 BLOCK_INPUT;
6261 6108
6262 if (! FRAME_VISIBLE_P (f)) 6109 if (! FRAME_VISIBLE_P (f))
@@ -6267,27 +6114,29 @@ x_make_frame_visible (f)
6267 before the window gets really visible. */ 6114 before the window gets really visible. */
6268 if (! FRAME_ICONIFIED_P (f) 6115 if (! FRAME_ICONIFIED_P (f)
6269 && ! f->output_data.mac->asked_for_visible) 6116 && ! f->output_data.mac->asked_for_visible)
6117 {
6270#if TARGET_API_MAC_CARBON 6118#if TARGET_API_MAC_CARBON
6271 if (!(FRAME_SIZE_HINTS (f)->flags & (USPosition | PPosition))) 6119 if (!(FRAME_SIZE_HINTS (f)->flags & (USPosition | PPosition)))
6272 { 6120 {
6273 struct frame *sf = SELECTED_FRAME (); 6121 struct frame *sf = SELECTED_FRAME ();
6274 if (!FRAME_MAC_P (sf)) 6122 if (!FRAME_MAC_P (sf))
6275 RepositionWindow (FRAME_MAC_WINDOW (f), NULL, 6123 RepositionWindow (FRAME_MAC_WINDOW (f), NULL,
6276 kWindowCenterOnMainScreen); 6124 kWindowCenterOnMainScreen);
6277 else 6125 else
6278 RepositionWindow (FRAME_MAC_WINDOW (f), 6126 RepositionWindow (FRAME_MAC_WINDOW (f),
6279 FRAME_MAC_WINDOW (sf), 6127 FRAME_MAC_WINDOW (sf),
6280#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 6128#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
6281 kWindowCascadeStartAtParentWindowScreen 6129 kWindowCascadeStartAtParentWindowScreen
6282#else 6130#else
6283 kWindowCascadeOnParentWindowScreen 6131 kWindowCascadeOnParentWindowScreen
6284#endif 6132#endif
6285 ); 6133 );
6286 x_real_positions (f, &f->left_pos, &f->top_pos); 6134 x_real_positions (f, &f->left_pos, &f->top_pos);
6287 } 6135 }
6288 else 6136 else
6289#endif 6137#endif
6290 x_set_offset (f, f->left_pos, f->top_pos, 0); 6138 x_set_offset (f, f->left_pos, f->top_pos, 0);
6139 }
6291 6140
6292 f->output_data.mac->asked_for_visible = 1; 6141 f->output_data.mac->asked_for_visible = 1;
6293 6142
@@ -6707,12 +6556,7 @@ xlfdpat_create (pattern)
6707 struct xlfdpat_block *blk; 6556 struct xlfdpat_block *blk;
6708 6557
6709 pat = xmalloc (sizeof (struct xlfdpat)); 6558 pat = xmalloc (sizeof (struct xlfdpat));
6710 if (pat == NULL)
6711 goto error;
6712
6713 pat->buf = xmalloc (strlen (pattern) + 1); 6559 pat->buf = xmalloc (strlen (pattern) + 1);
6714 if (pat->buf == NULL)
6715 goto error;
6716 6560
6717 /* Normalize the pattern string and store it to `pat->buf'. */ 6561 /* Normalize the pattern string and store it to `pat->buf'. */
6718 nblocks = 0; 6562 nblocks = 0;
@@ -6730,15 +6574,17 @@ xlfdpat_create (pattern)
6730 else 6574 else
6731 { 6575 {
6732 if (last_char == '?') 6576 if (last_char == '?')
6733 if (anychar_head > pat->buf && *(anychar_head - 1) == '*') 6577 {
6734 /* ...*??* -> ...*?? */ 6578 if (anychar_head > pat->buf && *(anychar_head - 1) == '*')
6735 continue; 6579 /* ...*??* -> ...*?? */
6736 else 6580 continue;
6737 /* ...a??* -> ...a*?? */ 6581 else
6738 { 6582 /* ...a??* -> ...a*?? */
6739 *anychar_head++ = '*'; 6583 {
6740 c = '?'; 6584 *anychar_head++ = '*';
6741 } 6585 c = '?';
6586 }
6587 }
6742 nblocks++; 6588 nblocks++;
6743 } 6589 }
6744 else if (c == '?') 6590 else if (c == '?')
@@ -6774,8 +6620,6 @@ xlfdpat_create (pattern)
6774 } 6620 }
6775 6621
6776 pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks); 6622 pat->blocks = xmalloc (sizeof (struct xlfdpat_block) * nblocks);
6777 if (pat->blocks == NULL)
6778 goto error;
6779 6623
6780 /* Divide the normalized pattern into blocks. */ 6624 /* Divide the normalized pattern into blocks. */
6781 p = pat->buf; 6625 p = pat->buf;
@@ -7235,9 +7079,10 @@ init_font_name_table ()
7235 Qnil, Qnil, Qnil);; 7079 Qnil, Qnil, Qnil);;
7236 err = ATSUFontCount (&nfonts); 7080 err = ATSUFontCount (&nfonts);
7237 if (err == noErr) 7081 if (err == noErr)
7238 font_ids = xmalloc (sizeof (ATSUFontID) * nfonts); 7082 {
7239 if (font_ids) 7083 font_ids = xmalloc (sizeof (ATSUFontID) * nfonts);
7240 err = ATSUGetFontIDs (font_ids, nfonts, NULL); 7084 err = ATSUGetFontIDs (font_ids, nfonts, NULL);
7085 }
7241 if (err == noErr) 7086 if (err == noErr)
7242 for (i = 0; i < nfonts; i++) 7087 for (i = 0; i < nfonts; i++)
7243 { 7088 {
@@ -7247,8 +7092,6 @@ init_font_name_table ()
7247 if (err != noErr) 7092 if (err != noErr)
7248 continue; 7093 continue;
7249 name = xmalloc (name_len + 1); 7094 name = xmalloc (name_len + 1);
7250 if (name == NULL)
7251 continue;
7252 name[name_len] = '\0'; 7095 name[name_len] = '\0';
7253 err = ATSUFindFontName (font_ids[i], kFontFamilyName, 7096 err = ATSUFindFontName (font_ids[i], kFontFamilyName,
7254 kFontMacintoshPlatform, kFontNoScript, 7097 kFontMacintoshPlatform, kFontNoScript,
@@ -7569,7 +7412,7 @@ mac_do_list_fonts (pattern, maxnames)
7569 if (xlfdpat_match (pat, font_name_table[i])) 7412 if (xlfdpat_match (pat, font_name_table[i]))
7570 { 7413 {
7571 font_list = Fcons (build_string (font_name_table[i]), font_list); 7414 font_list = Fcons (build_string (font_name_table[i]), font_list);
7572 if (exact || maxnames > 0 && ++n_fonts >= maxnames) 7415 if (exact || (maxnames > 0 && ++n_fonts >= maxnames))
7573 break; 7416 break;
7574 } 7417 }
7575 else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 7418 else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0
@@ -7578,8 +7421,6 @@ mac_do_list_fonts (pattern, maxnames)
7578 int former_len = ptr - font_name_table[i]; 7421 int former_len = ptr - font_name_table[i];
7579 7422
7580 scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1); 7423 scaled = xmalloc (strlen (font_name_table[i]) + 20 + 1);
7581 if (scaled == NULL)
7582 continue;
7583 memcpy (scaled, font_name_table[i], former_len); 7424 memcpy (scaled, font_name_table[i], former_len);
7584 sprintf (scaled + former_len, 7425 sprintf (scaled + former_len,
7585 "-%d-%d-72-72-m-%d-%s", 7426 "-%d-%d-72-72-m-%d-%s",
@@ -7592,7 +7433,7 @@ mac_do_list_fonts (pattern, maxnames)
7592 { 7433 {
7593 font_list = Fcons (build_string (scaled), font_list); 7434 font_list = Fcons (build_string (scaled), font_list);
7594 xfree (scaled); 7435 xfree (scaled);
7595 if (exact || maxnames > 0 && ++n_fonts >= maxnames) 7436 if (exact || (maxnames > 0 && ++n_fonts >= maxnames))
7596 break; 7437 break;
7597 } 7438 }
7598 else 7439 else
@@ -7912,18 +7753,8 @@ XLoadQueryFont (Display *dpy, char *fontname)
7912 font->max_char_or_byte2 = 0xff; 7753 font->max_char_or_byte2 = 0xff;
7913 7754
7914 font->bounds.rows = xmalloc (sizeof (XCharStructRow *) * 0x100); 7755 font->bounds.rows = xmalloc (sizeof (XCharStructRow *) * 0x100);
7915 if (font->bounds.rows == NULL)
7916 {
7917 mac_unload_font (&one_mac_display_info, font);
7918 return NULL;
7919 }
7920 bzero (font->bounds.rows, sizeof (XCharStructRow *) * 0x100); 7756 bzero (font->bounds.rows, sizeof (XCharStructRow *) * 0x100);
7921 font->bounds.rows[0] = xmalloc (sizeof (XCharStructRow)); 7757 font->bounds.rows[0] = xmalloc (sizeof (XCharStructRow));
7922 if (font->bounds.rows[0] == NULL)
7923 {
7924 mac_unload_font (&one_mac_display_info, font);
7925 return NULL;
7926 }
7927 bzero (font->bounds.rows[0], sizeof (XCharStructRow)); 7758 bzero (font->bounds.rows[0], sizeof (XCharStructRow));
7928 7759
7929#if USE_CG_TEXT_DRAWING 7760#if USE_CG_TEXT_DRAWING
@@ -7945,9 +7776,10 @@ XLoadQueryFont (Display *dpy, char *fontname)
7945 } 7776 }
7946 7777
7947 if (font->cg_font) 7778 if (font->cg_font)
7948 font->cg_glyphs = xmalloc (sizeof (CGGlyph) * 0x100); 7779 {
7949 if (font->cg_glyphs) 7780 font->cg_glyphs = xmalloc (sizeof (CGGlyph) * 0x100);
7950 bzero (font->cg_glyphs, sizeof (CGGlyph) * 0x100); 7781 bzero (font->cg_glyphs, sizeof (CGGlyph) * 0x100);
7782 }
7951#endif 7783#endif
7952 space_bounds = font->bounds.rows[0]->per_char + 0x20; 7784 space_bounds = font->bounds.rows[0]->per_char + 0x20;
7953 err = mac_query_char_extents (font->mac_style, 0x20, 7785 err = mac_query_char_extents (font->mac_style, 0x20,
@@ -8093,11 +7925,6 @@ XLoadQueryFont (Display *dpy, char *fontname)
8093 7925
8094 font->bounds.per_char = 7926 font->bounds.per_char =
8095 xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1)); 7927 xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1));
8096 if (font->bounds.per_char == NULL)
8097 {
8098 mac_unload_font (&one_mac_display_info, font);
8099 return NULL;
8100 }
8101 bzero (font->bounds.per_char, 7928 bzero (font->bounds.per_char,
8102 sizeof (XCharStruct) * (0xff - 0x20 + 1)); 7929 sizeof (XCharStruct) * (0xff - 0x20 + 1));
8103 7930
@@ -8241,10 +8068,8 @@ x_load_font (f, fontname, size)
8241 8068
8242 /* Load the font and add it to the table. */ 8069 /* Load the font and add it to the table. */
8243 { 8070 {
8244 char *full_name;
8245 struct MacFontStruct *font; 8071 struct MacFontStruct *font;
8246 struct font_info *fontp; 8072 struct font_info *fontp;
8247 unsigned long value;
8248 int i; 8073 int i;
8249 8074
8250 fontname = (char *) SDATA (XCAR (font_names)); 8075 fontname = (char *) SDATA (XCAR (font_names));
@@ -8756,6 +8581,7 @@ static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec)
8756 8581
8757#endif 8582#endif
8758 8583
8584#ifdef MAC_OS8
8759static void 8585static void
8760do_get_menus (void) 8586do_get_menus (void)
8761{ 8587{
@@ -8817,6 +8643,7 @@ do_check_ram_size (void)
8817 exit (1); 8643 exit (1);
8818 } 8644 }
8819} 8645}
8646#endif /* MAC_OS8 */
8820 8647
8821static void 8648static void
8822do_window_update (WindowPtr win) 8649do_window_update (WindowPtr win)
@@ -8998,42 +8825,41 @@ do_grow_window (WindowPtr w, EventRecord *e)
8998static void 8825static void
8999do_zoom_window (WindowPtr w, int zoom_in_or_out) 8826do_zoom_window (WindowPtr w, int zoom_in_or_out)
9000{ 8827{
9001 GrafPtr save_port;
9002 Rect zoom_rect, port_rect; 8828 Rect zoom_rect, port_rect;
9003 Point top_left; 8829 int columns, rows, width, height;
9004 int w_title_height, columns, rows, width, height;
9005 struct frame *f = mac_window_to_frame (w); 8830 struct frame *f = mac_window_to_frame (w);
9006 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); 8831 struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f);
9007
9008#if TARGET_API_MAC_CARBON 8832#if TARGET_API_MAC_CARBON
9009 { 8833 Point standard_size;
9010 Point standard_size;
9011 8834
9012 standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); 8835 standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS);
9013 standard_size.v = dpyinfo->height; 8836 standard_size.v = dpyinfo->height;
9014 8837
9015 if (IsWindowInStandardState (w, &standard_size, &zoom_rect)) 8838 if (IsWindowInStandardState (w, &standard_size, &zoom_rect))
9016 zoom_in_or_out = inZoomIn; 8839 zoom_in_or_out = inZoomIn;
9017 else 8840 else
9018 { 8841 {
9019 /* Adjust the standard size according to character boundaries. */ 8842 /* Adjust the standard size according to character boundaries. */
9020
9021 columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left);
9022 rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top);
9023 standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns);
9024 standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
9025 GetWindowBounds (w, kWindowContentRgn, &port_rect);
9026 if (IsWindowInStandardState (w, &standard_size, &zoom_rect)
9027 && port_rect.left == zoom_rect.left
9028 && port_rect.top == zoom_rect.top)
9029 zoom_in_or_out = inZoomIn;
9030 else
9031 zoom_in_or_out = inZoomOut;
9032 }
9033 8843
9034 ZoomWindowIdeal (w, zoom_in_or_out, &standard_size); 8844 columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left);
9035 } 8845 rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top);
8846 standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns);
8847 standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
8848 GetWindowBounds (w, kWindowContentRgn, &port_rect);
8849 if (IsWindowInStandardState (w, &standard_size, &zoom_rect)
8850 && port_rect.left == zoom_rect.left
8851 && port_rect.top == zoom_rect.top)
8852 zoom_in_or_out = inZoomIn;
8853 else
8854 zoom_in_or_out = inZoomOut;
8855 }
8856
8857 ZoomWindowIdeal (w, zoom_in_or_out, &standard_size);
9036#else /* not TARGET_API_MAC_CARBON */ 8858#else /* not TARGET_API_MAC_CARBON */
8859 GrafPtr save_port;
8860 Point top_left;
8861 int w_title_height;
8862
9037 GetPort (&save_port); 8863 GetPort (&save_port);
9038 8864
9039 SetPortWindowPort (w); 8865 SetPortWindowPort (w);
@@ -9101,15 +8927,12 @@ mac_store_apple_event (class, id, desc)
9101 Lisp_Object class, id; 8927 Lisp_Object class, id;
9102 const AEDesc *desc; 8928 const AEDesc *desc;
9103{ 8929{
9104 OSErr err = noErr; 8930 OSErr err;
9105 struct input_event buf; 8931 struct input_event buf;
9106 AEDesc *desc_copy; 8932 AEDesc *desc_copy;
9107 8933
9108 desc_copy = xmalloc (sizeof (AEDesc)); 8934 desc_copy = xmalloc (sizeof (AEDesc));
9109 if (desc_copy == NULL) 8935 err = AEDuplicateDesc (desc, desc_copy);
9110 err = memFullErr;
9111 else
9112 err = AEDuplicateDesc (desc, desc_copy);
9113 if (err == noErr) 8936 if (err == noErr)
9114 { 8937 {
9115 EVENT_INIT (buf); 8938 EVENT_INIT (buf);
@@ -9168,26 +8991,27 @@ mac_handle_command_event (next_handler, event, data)
9168 mac_find_apple_event_spec (0, command.commandID, 8991 mac_find_apple_event_spec (0, command.commandID,
9169 &class_key, &id_key, &binding); 8992 &class_key, &id_key, &binding);
9170 if (!NILP (binding) && !EQ (binding, Qundefined)) 8993 if (!NILP (binding) && !EQ (binding, Qundefined))
9171 if (INTEGERP (binding)) 8994 {
9172 return XINT (binding); 8995 if (INTEGERP (binding))
9173 else 8996 return XINT (binding);
9174 { 8997 else
9175 AppleEvent apple_event; 8998 {
9176 UInt32 modifiers; 8999 AppleEvent apple_event;
9177 static EventParamName names[] = {kEventParamDirectObject, 9000 static EventParamName names[] = {kEventParamDirectObject,
9178 kEventParamKeyModifiers}; 9001 kEventParamKeyModifiers};
9179 static EventParamType types[] = {typeHICommand, 9002 static EventParamType types[] = {typeHICommand,
9180 typeUInt32}; 9003 typeUInt32};
9181 err = create_apple_event_from_event_ref (event, 2, names, types, 9004 err = create_apple_event_from_event_ref (event, 2, names, types,
9182 &apple_event); 9005 &apple_event);
9183 if (err == noErr) 9006 if (err == noErr)
9184 { 9007 {
9185 err = mac_store_apple_event (class_key, id_key, &apple_event); 9008 err = mac_store_apple_event (class_key, id_key, &apple_event);
9186 AEDisposeDesc (&apple_event); 9009 AEDisposeDesc (&apple_event);
9187 } 9010 }
9188 if (err == noErr) 9011 if (err == noErr)
9189 return noErr; 9012 return noErr;
9190 } 9013 }
9014 }
9191 9015
9192 return eventNotHandledErr; 9016 return eventNotHandledErr;
9193} 9017}
@@ -9195,7 +9019,6 @@ mac_handle_command_event (next_handler, event, data)
9195static OSErr 9019static OSErr
9196init_command_handler () 9020init_command_handler ()
9197{ 9021{
9198 OSErr err = noErr;
9199 EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}}; 9022 EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}};
9200 static EventHandlerUPP handle_command_eventUPP = NULL; 9023 static EventHandlerUPP handle_command_eventUPP = NULL;
9201 9024
@@ -10071,18 +9894,18 @@ XTread_socket (sd, expected, hold_quit)
10071 XSETINT (inev.x, mouse_loc.h); 9894 XSETINT (inev.x, mouse_loc.h);
10072 XSETINT (inev.y, mouse_loc.v); 9895 XSETINT (inev.y, mouse_loc.v);
10073 9896
10074 if (dpyinfo->grabbed && tracked_scroll_bar 9897 if ((dpyinfo->grabbed && tracked_scroll_bar)
10075 || ch != 0 9898 || (ch != 0
10076#ifndef USE_TOOLKIT_SCROLL_BARS 9899#ifndef USE_TOOLKIT_SCROLL_BARS
10077 /* control_part_code becomes kControlNoPart if 9900 /* control_part_code becomes kControlNoPart if
10078 a progress indicator is clicked. */ 9901 a progress indicator is clicked. */
10079 && control_part_code != kControlNoPart 9902 && control_part_code != kControlNoPart
10080#else /* USE_TOOLKIT_SCROLL_BARS */ 9903#else /* USE_TOOLKIT_SCROLL_BARS */
10081#ifdef MAC_OSX 9904#ifdef MAC_OSX
10082 && control_kind.kind == kControlKindScrollBar 9905 && control_kind.kind == kControlKindScrollBar
10083#endif /* MAC_OSX */ 9906#endif /* MAC_OSX */
10084#endif /* USE_TOOLKIT_SCROLL_BARS */ 9907#endif /* USE_TOOLKIT_SCROLL_BARS */
10085 ) 9908 ))
10086 { 9909 {
10087 struct scroll_bar *bar; 9910 struct scroll_bar *bar;
10088 9911
@@ -10882,7 +10705,6 @@ mac_check_bundle()
10882 extern int inhibit_window_system; 10705 extern int inhibit_window_system;
10883 extern int noninteractive; 10706 extern int noninteractive;
10884 CFBundleRef appsBundle; 10707 CFBundleRef appsBundle;
10885 pid_t child;
10886 10708
10887 /* No need to test if already -nw*/ 10709 /* No need to test if already -nw*/
10888 if (inhibit_window_system || noninteractive) 10710 if (inhibit_window_system || noninteractive)
diff --git a/src/macterm.h b/src/macterm.h
index f6807d93487..db284fe7788 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -547,7 +547,15 @@ extern int XParseGeometry P_ ((char *, int *, int *, unsigned int *,
547/* Defined in macterm.c. */ 547/* Defined in macterm.c. */
548 548
549extern void x_set_window_size P_ ((struct frame *, int, int, int)); 549extern void x_set_window_size P_ ((struct frame *, int, int, int));
550extern void x_set_mouse_position P_ ((struct frame *, int, int));
551extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int));
550extern void x_make_frame_visible P_ ((struct frame *)); 552extern void x_make_frame_visible P_ ((struct frame *));
553extern void x_make_frame_invisible P_ ((struct frame *));
554extern void x_iconify_frame P_ ((struct frame *));
555extern void x_free_frame_resources P_ ((struct frame *));
556extern void x_destroy_window P_ ((struct frame *));
557extern void x_wm_set_size_hint P_ ((struct frame *, long, int));
558extern void x_delete_display P_ ((struct x_display_info *));
551extern void mac_initialize P_ ((void)); 559extern void mac_initialize P_ ((void));
552extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int, 560extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int,
553 unsigned int, unsigned int)); 561 unsigned int, unsigned int));
@@ -557,6 +565,7 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *,
557 unsigned int)); 565 unsigned int));
558extern void XFreePixmap P_ ((Display *, Pixmap)); 566extern void XFreePixmap P_ ((Display *, Pixmap));
559extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *)); 567extern GC XCreateGC P_ ((Display *, Window, unsigned long, XGCValues *));
568extern void XFreeGC P_ ((Display *, GC));
560extern void XSetForeground P_ ((Display *, GC, unsigned long)); 569extern void XSetForeground P_ ((Display *, GC, unsigned long));
561extern void XSetBackground P_ ((Display *, GC, unsigned long)); 570extern void XSetBackground P_ ((Display *, GC, unsigned long));
562extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); 571extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long));
@@ -568,6 +577,7 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
568extern OSErr install_window_handler P_ ((WindowPtr)); 577extern OSErr install_window_handler P_ ((WindowPtr));
569extern void remove_window_handler P_ ((WindowPtr)); 578extern void remove_window_handler P_ ((WindowPtr));
570extern Lisp_Object mac_make_lispy_event_code P_ ((int)); 579extern Lisp_Object mac_make_lispy_event_code P_ ((int));
580extern void do_menu_choice P_ ((SInt32));
571#if USE_CG_DRAWING 581#if USE_CG_DRAWING
572extern void mac_prepare_for_quickdraw P_ ((struct frame *)); 582extern void mac_prepare_for_quickdraw P_ ((struct frame *));
573#endif 583#endif
@@ -581,6 +591,24 @@ extern void mac_prepare_for_quickdraw P_ ((struct frame *));
581 591
582extern void x_clear_frame_selections P_ ((struct frame *)); 592extern void x_clear_frame_selections P_ ((struct frame *));
583 593
594/* Defined in macfns.c */
595
596extern int have_menus_p P_ ((void));
597
598extern void x_real_positions P_ ((struct frame *, int *, int *));
599extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
600extern int x_pixel_width P_ ((struct frame *));
601extern int x_pixel_height P_ ((struct frame *));
602extern int x_char_width P_ ((struct frame *));
603extern int x_char_height P_ ((struct frame *));
604extern void x_sync P_ ((struct frame *));
605extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object));
606
607/* Defined in macmenu.c */
608
609extern void x_activate_menubar P_ ((struct frame *));
610extern void free_frame_menubar P_ ((struct frame *));
611
584/* Defined in mac.c. */ 612/* Defined in mac.c. */
585 613
586extern void mac_clear_font_name_table P_ ((void)); 614extern void mac_clear_font_name_table P_ ((void));
diff --git a/src/print.c b/src/print.c
index 7e9ed30c32b..12960ef214d 100644
--- a/src/print.c
+++ b/src/print.c
@@ -759,7 +759,8 @@ DEFUN ("prin1-to-string", Fprin1_to_string, Sprin1_to_string, 1, 2, 0,
759 doc: /* Return a string containing the printed representation of OBJECT. 759 doc: /* Return a string containing the printed representation of OBJECT.
760OBJECT can be any Lisp object. This function outputs quoting characters 760OBJECT can be any Lisp object. This function outputs quoting characters
761when necessary to make output that `read' can handle, whenever possible, 761when necessary to make output that `read' can handle, whenever possible,
762unless the optional second argument NOESCAPE is non-nil. 762unless the optional second argument NOESCAPE is non-nil. For complex objects,
763the behavior is controlled by `print-level' and `print-length', which see.
763 764
764OBJECT is any of the Lisp data types: a number, a string, a symbol, 765OBJECT is any of the Lisp data types: a number, a string, a symbol,
765a list, a buffer, a window, a frame, etc. 766a list, a buffer, a window, a frame, etc.
diff --git a/src/process.c b/src/process.c
index 003f27b77b8..6e633a5825c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2322,7 +2322,11 @@ get_lisp_to_sockaddr_size (address, familyp)
2322} 2322}
2323 2323
2324/* Convert an address object (vector or string) to an internal sockaddr. 2324/* Convert an address object (vector or string) to an internal sockaddr.
2325 Format of address has already been validated by size_lisp_to_sockaddr. */ 2325
2326 The address format has been basically validated by
2327 get_lisp_to_sockaddr_size, but this does not mean FAMILY is valid;
2328 it could have come from user data. So if FAMILY is not valid,
2329 we return after zeroing *SA. */
2326 2330
2327static void 2331static void
2328conv_lisp_to_sockaddr (family, address, sa, len) 2332conv_lisp_to_sockaddr (family, address, sa, len)
@@ -2336,7 +2340,6 @@ conv_lisp_to_sockaddr (family, address, sa, len)
2336 register int i; 2340 register int i;
2337 2341
2338 bzero (sa, len); 2342 bzero (sa, len);
2339 sa->sa_family = family;
2340 2343
2341 if (VECTORP (address)) 2344 if (VECTORP (address))
2342 { 2345 {
@@ -2348,6 +2351,7 @@ conv_lisp_to_sockaddr (family, address, sa, len)
2348 i = XINT (p->contents[--len]); 2351 i = XINT (p->contents[--len]);
2349 sin->sin_port = htons (i); 2352 sin->sin_port = htons (i);
2350 cp = (unsigned char *)&sin->sin_addr; 2353 cp = (unsigned char *)&sin->sin_addr;
2354 sa->sa_family = family;
2351 } 2355 }
2352#ifdef AF_INET6 2356#ifdef AF_INET6
2353 else if (family == AF_INET6) 2357 else if (family == AF_INET6)
@@ -2363,9 +2367,10 @@ conv_lisp_to_sockaddr (family, address, sa, len)
2363 int j = XFASTINT (p->contents[i]) & 0xffff; 2367 int j = XFASTINT (p->contents[i]) & 0xffff;
2364 ip6[i] = ntohs (j); 2368 ip6[i] = ntohs (j);
2365 } 2369 }
2366 return; 2370 sa->sa_family = family;
2367 } 2371 }
2368#endif 2372#endif
2373 return;
2369 } 2374 }
2370 else if (STRINGP (address)) 2375 else if (STRINGP (address))
2371 { 2376 {
@@ -2376,6 +2381,7 @@ conv_lisp_to_sockaddr (family, address, sa, len)
2376 cp = SDATA (address); 2381 cp = SDATA (address);
2377 for (i = 0; i < sizeof (sockun->sun_path) && *cp; i++) 2382 for (i = 0; i < sizeof (sockun->sun_path) && *cp; i++)
2378 sockun->sun_path[i] = *cp++; 2383 sockun->sun_path[i] = *cp++;
2384 sa->sa_family = family;
2379 } 2385 }
2380#endif 2386#endif
2381 return; 2387 return;
@@ -6236,6 +6242,8 @@ text to PROCESS after you call this function. */)
6236 emacs_close (XINT (XPROCESS (proc)->outfd)); 6242 emacs_close (XINT (XPROCESS (proc)->outfd));
6237#endif /* not HAVE_SHUTDOWN */ 6243#endif /* not HAVE_SHUTDOWN */
6238 new_outfd = emacs_open (NULL_DEVICE, O_WRONLY, 0); 6244 new_outfd = emacs_open (NULL_DEVICE, O_WRONLY, 0);
6245 if (new_outfd < 0)
6246 abort ();
6239 old_outfd = XINT (XPROCESS (proc)->outfd); 6247 old_outfd = XINT (XPROCESS (proc)->outfd);
6240 6248
6241 if (!proc_encode_coding_system[new_outfd]) 6249 if (!proc_encode_coding_system[new_outfd])
diff --git a/src/puresize.h b/src/puresize.h
index 168e1e7980a..ccbc7a82554 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -49,7 +49,7 @@ Boston, MA 02110-1301, USA. */
49/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ 49/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */
50#ifndef PURESIZE_RATIO 50#ifndef PURESIZE_RATIO
51#if BITS_PER_EMACS_INT > 32 51#if BITS_PER_EMACS_INT > 32
52#define PURESIZE_RATIO 9/5 /* Don't surround with `()'. */ 52#define PURESIZE_RATIO 10/6 /* Don't surround with `()'. */
53#else 53#else
54#define PURESIZE_RATIO 1 54#define PURESIZE_RATIO 1
55#endif 55#endif
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index 3e5d9c865bb..55f62644d04 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -465,8 +465,10 @@ extern char *get_emacs_configuration_options (void);
465#endif 465#endif
466#include <string.h> 466#include <string.h>
467 467
468/* We need a little extra space, see ../../lisp/loadup.el */ 468/* We need a little extra space, see ../../lisp/loadup.el.
469#define SYSTEM_PURESIZE_EXTRA 137500 469 The number below comes from 22038 bytes worth (as of 2006-04)
470 of w32-specific files loaded by loadup.el, plus 2K spare. */
471#define SYSTEM_PURESIZE_EXTRA 24000
470 472
471/* For unexec to work on Alpha systems, we need to put Emacs' 473/* For unexec to work on Alpha systems, we need to put Emacs'
472 initialized data into a separate section from the CRT initialized 474 initialized data into a separate section from the CRT initialized
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index db77a83cee2..4ca0be829a2 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -100,7 +100,11 @@ Boston, MA 02110-1301, USA. */
100#if defined (__ppc__) 100#if defined (__ppc__)
101#include <mach-o/ppc/reloc.h> 101#include <mach-o/ppc/reloc.h>
102#endif 102#endif
103#if defined (HAVE_MALLOC_MALLOC_H) 103#include <config.h>
104#undef malloc
105#undef realloc
106#undef free
107#ifdef HAVE_MALLOC_MALLOC_H
104#include <malloc/malloc.h> 108#include <malloc/malloc.h>
105#else 109#else
106#include <objc/malloc.h> 110#include <objc/malloc.h>
@@ -558,7 +562,7 @@ print_load_command (struct load_command *lc)
558static void 562static void
559read_load_commands () 563read_load_commands ()
560{ 564{
561 int n, i, j; 565 int i;
562 566
563 if (!unexec_read (&mh, sizeof (struct mach_header))) 567 if (!unexec_read (&mh, sizeof (struct mach_header)))
564 unexec_error ("cannot read mach-o header"); 568 unexec_error ("cannot read mach-o header");
@@ -680,7 +684,6 @@ copy_data_segment (struct load_command *lc)
680 struct section *sectp; 684 struct section *sectp;
681 int j; 685 int j;
682 unsigned long header_offset, file_offset, old_file_offset; 686 unsigned long header_offset, file_offset, old_file_offset;
683 struct region_t *r;
684 687
685 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n", 688 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
686 scp->segname, scp->fileoff, scp->fileoff + scp->filesize, 689 scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
diff --git a/src/window.c b/src/window.c
index cbfc7e02401..61b85e5ad22 100644
--- a/src/window.c
+++ b/src/window.c
@@ -663,12 +663,24 @@ coordinates_in_window (w, x, y)
663 || WINDOW_RIGHTMOST_P (w)) 663 || WINDOW_RIGHTMOST_P (w))
664 { 664 {
665 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width) 665 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width)
666 return ON_VERTICAL_BORDER; 666 {
667 /* Convert X and Y to window relative coordinates.
668 Vertical border is at the left edge of window. */
669 *x = max (0, *x - x0);
670 *y -= top_y;
671 return ON_VERTICAL_BORDER;
672 }
667 } 673 }
668 else 674 else
669 { 675 {
670 if (abs (*x - x1) < grabbable_width) 676 if (abs (*x - x1) < grabbable_width)
671 return ON_VERTICAL_BORDER; 677 {
678 /* Convert X and Y to window relative coordinates.
679 Vertical border is at the right edge of window. */
680 *x = min (x1, *x) - x0;
681 *y -= top_y;
682 return ON_VERTICAL_BORDER;
683 }
672 } 684 }
673 685
674 if (*x < x0 || *x >= x1) 686 if (*x < x0 || *x >= x1)
@@ -710,7 +722,13 @@ coordinates_in_window (w, x, y)
710 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) 722 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
711 && !WINDOW_RIGHTMOST_P (w) 723 && !WINDOW_RIGHTMOST_P (w)
712 && (abs (*x - right_x) < grabbable_width)) 724 && (abs (*x - right_x) < grabbable_width))
713 return ON_VERTICAL_BORDER; 725 {
726 /* Convert X and Y to window relative coordinates.
727 Vertical border is at the right edge of window. */
728 *x = min (right_x, *x) - left_x;
729 *y -= top_y;
730 return ON_VERTICAL_BORDER;
731 }
714 } 732 }
715 else 733 else
716 { 734 {
@@ -722,6 +740,8 @@ coordinates_in_window (w, x, y)
722 { 740 {
723 /* On the border on the right side of the window? Assume that 741 /* On the border on the right side of the window? Assume that
724 this area begins at RIGHT_X minus a canonical char width. */ 742 this area begins at RIGHT_X minus a canonical char width. */
743 *x = min (right_x, *x) - left_x;
744 *y -= top_y;
725 return ON_VERTICAL_BORDER; 745 return ON_VERTICAL_BORDER;
726 } 746 }
727 } 747 }
@@ -2015,7 +2035,7 @@ window_loop (type, obj, mini, frames)
2015 `obj & 1' means consider only full-width windows. 2035 `obj & 1' means consider only full-width windows.
2016 `obj & 2' means consider also dedicated windows. */ 2036 `obj & 2' means consider also dedicated windows. */
2017 if (((XINT (obj) & 1) && !WINDOW_FULL_WIDTH_P (w)) 2037 if (((XINT (obj) & 1) && !WINDOW_FULL_WIDTH_P (w))
2018 || (!(XINT (obj) & 2) && EQ (w->dedicated, Qt)) 2038 || (!(XINT (obj) & 2) && !NILP (w->dedicated))
2019 /* Minibuffer windows are always ignored. */ 2039 /* Minibuffer windows are always ignored. */
2020 || MINI_WINDOW_P (w)) 2040 || MINI_WINDOW_P (w))
2021 break; 2041 break;
@@ -2070,7 +2090,7 @@ window_loop (type, obj, mini, frames)
2070 case GET_LARGEST_WINDOW: 2090 case GET_LARGEST_WINDOW:
2071 { /* nil `obj' means to ignore dedicated windows. */ 2091 { /* nil `obj' means to ignore dedicated windows. */
2072 /* Ignore dedicated windows and minibuffers. */ 2092 /* Ignore dedicated windows and minibuffers. */
2073 if (MINI_WINDOW_P (w) || (NILP (obj) && EQ (w->dedicated, Qt))) 2093 if (MINI_WINDOW_P (w) || (NILP (obj) && !NILP (w->dedicated)))
2074 break; 2094 break;
2075 2095
2076 if (NILP (best_window)) 2096 if (NILP (best_window))
@@ -4257,18 +4277,30 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4257 4277
4258 while (1) 4278 while (1)
4259 { 4279 {
4280 Lisp_Object first_parallel = Qnil;
4281
4260 p = XWINDOW (window); 4282 p = XWINDOW (window);
4261 parent = p->parent; 4283 parent = p->parent;
4262 4284
4263 /* Make sure there is a following window. */ 4285 if (NILP (XWINDOW (window)->next))
4264 if (NILP (parent)
4265 && (horiz_flag ? 1
4266 : NILP (XWINDOW (window)->next)))
4267 { 4286 {
4268 Fset_window_configuration (old_config); 4287 Fset_window_configuration (old_config);
4269 error ("No other window following this one"); 4288 error ("No other window following this one");
4270 } 4289 }
4271 4290
4291 /* See if this level has windows in parallel in the specified
4292 direction. If so, set FIRST_PARALLEL to the first one. */
4293 if (horiz_flag)
4294 {
4295 if (! NILP (parent) && !NILP (XWINDOW (parent)->vchild))
4296 first_parallel = XWINDOW (parent)->vchild;
4297 }
4298 else
4299 {
4300 if (! NILP (parent) && !NILP (XWINDOW (parent)->hchild))
4301 first_parallel = XWINDOW (parent)->hchild;
4302 }
4303
4272 /* Don't make this window too small. */ 4304 /* Don't make this window too small. */
4273 if (XINT (CURSIZE (window)) + delta 4305 if (XINT (CURSIZE (window)) + delta
4274 < (horiz_flag ? window_min_width : window_min_height)) 4306 < (horiz_flag ? window_min_width : window_min_height))
@@ -4286,12 +4318,11 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4286 XINT (CURSIZE (window)) + delta); 4318 XINT (CURSIZE (window)) + delta);
4287 4319
4288 /* If this window has following siblings in the desired dimension, 4320 /* If this window has following siblings in the desired dimension,
4289 make them smaller. 4321 make them smaller, and exit the loop.
4322
4290 (If we reach the top of the tree and can never do this, 4323 (If we reach the top of the tree and can never do this,
4291 we will fail and report an error, above.) */ 4324 we will fail and report an error, above.) */
4292 if (horiz_flag 4325 if (NILP (first_parallel))
4293 ? !NILP (XWINDOW (parent)->hchild)
4294 : !NILP (XWINDOW (parent)->vchild))
4295 { 4326 {
4296 if (!NILP (XWINDOW (window)->next)) 4327 if (!NILP (XWINDOW (window)->next))
4297 { 4328 {
@@ -4313,9 +4344,7 @@ adjust_window_trailing_edge (window, delta, horiz_flag)
4313 else 4344 else
4314 /* Here we have a chain of parallel siblings, in the other dimension. 4345 /* Here we have a chain of parallel siblings, in the other dimension.
4315 Change the size of the other siblings. */ 4346 Change the size of the other siblings. */
4316 for (child = (horiz_flag 4347 for (child = first_parallel;
4317 ? XWINDOW (parent)->vchild
4318 : XWINDOW (parent)->hchild);
4319 ! NILP (child); 4348 ! NILP (child);
4320 child = XWINDOW (child)->next) 4349 child = XWINDOW (child)->next)
4321 if (! EQ (child, window)) 4350 if (! EQ (child, window))
@@ -4856,7 +4885,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4856 { 4885 {
4857 if (it.current_y < it.last_visible_y 4886 if (it.current_y < it.last_visible_y
4858 && (it.current_y + it.max_ascent + it.max_descent 4887 && (it.current_y + it.max_ascent + it.max_descent
4859 >= it.last_visible_y)) 4888 > it.last_visible_y))
4860 { 4889 {
4861 /* The last line was only partially visible, make it fully 4890 /* The last line was only partially visible, make it fully
4862 visible. */ 4891 visible. */
diff --git a/src/xdisp.c b/src/xdisp.c
index fb80f349967..80b9ff6c8f6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14879,7 +14879,7 @@ dump_glyph_row (row, vpos, glyphs)
14879{ 14879{
14880 if (glyphs != 1) 14880 if (glyphs != 1)
14881 { 14881 {
14882 fprintf (stderr, "Row Start End Used oEI><\\CTZFesm X Y W H V A P\n"); 14882 fprintf (stderr, "Row Start End Used oE><\\CTZFesm X Y W H V A P\n");
14883 fprintf (stderr, "======================================================================\n"); 14883 fprintf (stderr, "======================================================================\n");
14884 14884
14885 fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d\ 14885 fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d\
@@ -22371,7 +22371,10 @@ note_mouse_highlight (f, x, y)
22371 } 22371 }
22372 22372
22373 if (part == ON_VERTICAL_BORDER) 22373 if (part == ON_VERTICAL_BORDER)
22374 cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; 22374 {
22375 cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
22376 help_echo_string = make_string ("drag-mouse-1: resize", 20);
22377 }
22375 else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE 22378 else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
22376 || part == ON_SCROLL_BAR) 22379 || part == ON_SCROLL_BAR)
22377 cursor = FRAME_X_OUTPUT (f)->nontext_cursor; 22380 cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
diff --git a/src/xfaces.c b/src/xfaces.c
index 27edd1a45dc..3222a7bdd91 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4991,10 +4991,12 @@ Default face attributes override any local face attributes. */)
4991 gvec = XVECTOR (global_lface)->contents; 4991 gvec = XVECTOR (global_lface)->contents;
4992 for (i = 1; i < LFACE_VECTOR_SIZE; ++i) 4992 for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
4993 if (! UNSPECIFIEDP (gvec[i])) 4993 if (! UNSPECIFIEDP (gvec[i]))
4994 if (IGNORE_DEFFACE_P (gvec[i])) 4994 {
4995 lvec[i] = Qunspecified; 4995 if (IGNORE_DEFFACE_P (gvec[i]))
4996 else 4996 lvec[i] = Qunspecified;
4997 lvec[i] = gvec[i]; 4997 else
4998 lvec[i] = gvec[i];
4999 }
4998 5000
4999 return Qnil; 5001 return Qnil;
5000} 5002}
@@ -6814,20 +6816,22 @@ try_font_list (f, attrs, family, registry, fonts, prefer_face_family)
6814 6816
6815#ifdef MAC_OS 6817#ifdef MAC_OS
6816 if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry)) 6818 if (nfonts == 0 && STRINGP (try_family) && STRINGP (registry))
6817 if (xstricmp (SDATA (registry), "mac-roman") == 0) 6819 {
6818 /* When realizing the default face and a font spec does not 6820 if (xstricmp (SDATA (registry), "mac-roman") == 0)
6819 matched exactly, Emacs looks for ones with the same registry 6821 /* When realizing the default face and a font spec does not
6820 as the default font. On the Mac, this is mac-roman, which 6822 matched exactly, Emacs looks for ones with the same registry
6821 does not work if the family is -etl-fixed, e.g. The 6823 as the default font. On the Mac, this is mac-roman, which
6822 following widens the choices and fixes that problem. */ 6824 does not work if the family is -etl-fixed, e.g. The
6823 nfonts = try_alternative_families (f, try_family, Qnil, fonts); 6825 following widens the choices and fixes that problem. */
6824 else if (SBYTES (try_family) > 0 6826 nfonts = try_alternative_families (f, try_family, Qnil, fonts);
6825 && SREF (try_family, SBYTES (try_family) - 1) != '*') 6827 else if (SBYTES (try_family) > 0
6826 /* Some Central European/Cyrillic font family names have the 6828 && SREF (try_family, SBYTES (try_family) - 1) != '*')
6827 Roman counterpart name as their prefix. */ 6829 /* Some Central European/Cyrillic font family names have the
6828 nfonts = try_alternative_families (f, concat2 (try_family, 6830 Roman counterpart name as their prefix. */
6829 build_string ("*")), 6831 nfonts = try_alternative_families (f, concat2 (try_family,
6830 registry, fonts); 6832 build_string ("*")),
6833 registry, fonts);
6834 }
6831#endif 6835#endif
6832 6836
6833 if (EQ (try_family, family)) 6837 if (EQ (try_family, family))
diff --git a/src/xmenu.c b/src/xmenu.c
index 3c8c6d81a37..6e5ec6c5058 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -266,14 +266,15 @@ menubar_id_to_frame (id)
266static void 266static void
267init_menu_items () 267init_menu_items ()
268{ 268{
269 if (!NILP (menu_items_inuse))
270 error ("Trying to use a menu from within a menu-entry");
271
269 if (NILP (menu_items)) 272 if (NILP (menu_items))
270 { 273 {
271 menu_items_allocated = 60; 274 menu_items_allocated = 60;
272 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); 275 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
273 } 276 }
274 277
275 if (!NILP (menu_items_inuse))
276 error ("Trying to use a menu from within a menu-entry");
277 menu_items_inuse = Qt; 278 menu_items_inuse = Qt;
278 menu_items_used = 0; 279 menu_items_used = 0;
279 menu_items_n_panes = 0; 280 menu_items_n_panes = 0;
@@ -310,6 +311,39 @@ discard_menu_items ()
310 xassert (NILP (menu_items_inuse)); 311 xassert (NILP (menu_items_inuse));
311} 312}
312 313
314/* This undoes save_menu_items, and it is called by the specpdl unwind
315 mechanism. */
316
317static Lisp_Object
318restore_menu_items (saved)
319 Lisp_Object saved;
320{
321 menu_items = XCAR (saved);
322 menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil);
323 menu_items_allocated = (VECTORP (menu_items) ? ASIZE (menu_items) : 0);
324 saved = XCDR (saved);
325 menu_items_used = XINT (XCAR (saved));
326 saved = XCDR (saved);
327 menu_items_n_panes = XINT (XCAR (saved));
328 saved = XCDR (saved);
329 menu_items_submenu_depth = XINT (XCAR (saved));
330}
331
332/* Push the whole state of menu_items processing onto the specpdl.
333 It will be restored when the specpdl is unwound. */
334
335static void
336save_menu_items ()
337{
338 Lisp_Object saved = list4 (!NILP (menu_items_inuse) ? menu_items : Qnil,
339 make_number (menu_items_used),
340 make_number (menu_items_n_panes),
341 make_number (menu_items_submenu_depth));
342 record_unwind_protect (restore_menu_items, saved);
343 menu_items_inuse = Qnil;
344 menu_items = Qnil;
345}
346
313/* Make the menu_items vector twice as large. */ 347/* Make the menu_items vector twice as large. */
314 348
315static void 349static void
@@ -320,6 +354,7 @@ grow_menu_items ()
320 old = menu_items; 354 old = menu_items;
321 355
322 menu_items_allocated *= 2; 356 menu_items_allocated *= 2;
357
323 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); 358 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
324 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents, 359 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
325 old_size * sizeof (Lisp_Object)); 360 old_size * sizeof (Lisp_Object));
@@ -1740,6 +1775,7 @@ digest_single_submenu (start, end, top_level_items)
1740 int i; 1775 int i;
1741 int submenu_depth = 0; 1776 int submenu_depth = 0;
1742 widget_value **submenu_stack; 1777 widget_value **submenu_stack;
1778 int panes_seen = 0;
1743 1779
1744 submenu_stack 1780 submenu_stack
1745 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *)); 1781 = (widget_value **) alloca (menu_items_used * sizeof (widget_value *));
@@ -1786,6 +1822,8 @@ digest_single_submenu (start, end, top_level_items)
1786 Lisp_Object pane_name, prefix; 1822 Lisp_Object pane_name, prefix;
1787 char *pane_string; 1823 char *pane_string;
1788 1824
1825 panes_seen++;
1826
1789 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME]; 1827 pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME];
1790 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; 1828 prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
1791 1829
@@ -1833,6 +1871,10 @@ digest_single_submenu (start, end, top_level_items)
1833 Lisp_Object item_name, enable, descrip, def, type, selected; 1871 Lisp_Object item_name, enable, descrip, def, type, selected;
1834 Lisp_Object help; 1872 Lisp_Object help;
1835 1873
1874 /* All items should be contained in panes. */
1875 if (panes_seen == 0)
1876 abort ();
1877
1836 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME); 1878 item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);
1837 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE); 1879 enable = AREF (menu_items, i + MENU_ITEMS_ITEM_ENABLE);
1838 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY); 1880 descrip = AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY);
@@ -2067,7 +2109,6 @@ set_frame_menubar (f, first_time, deep_p)
2067 specbind (Qdebug_on_next_call, Qnil); 2109 specbind (Qdebug_on_next_call, Qnil);
2068 2110
2069 record_unwind_save_match_data (); 2111 record_unwind_save_match_data ();
2070 record_unwind_protect (unuse_menu_items, Qnil);
2071 if (NILP (Voverriding_local_map_menu_flag)) 2112 if (NILP (Voverriding_local_map_menu_flag))
2072 { 2113 {
2073 specbind (Qoverriding_terminal_local_map, Qnil); 2114 specbind (Qoverriding_terminal_local_map, Qnil);
@@ -2095,6 +2136,8 @@ set_frame_menubar (f, first_time, deep_p)
2095 2136
2096 /* Fill in menu_items with the current menu bar contents. 2137 /* Fill in menu_items with the current menu bar contents.
2097 This can evaluate Lisp code. */ 2138 This can evaluate Lisp code. */
2139 save_menu_items ();
2140
2098 menu_items = f->menu_bar_vector; 2141 menu_items = f->menu_bar_vector;
2099 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0; 2142 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
2100 submenu_start = (int *) alloca (XVECTOR (items)->size * sizeof (int *)); 2143 submenu_start = (int *) alloca (XVECTOR (items)->size * sizeof (int *));
@@ -2154,23 +2197,33 @@ set_frame_menubar (f, first_time, deep_p)
2154 } 2197 }
2155 2198
2156 set_buffer_internal_1 (prev); 2199 set_buffer_internal_1 (prev);
2157 unbind_to (specpdl_count, Qnil);
2158 2200
2159 /* If there has been no change in the Lisp-level contents 2201 /* If there has been no change in the Lisp-level contents
2160 of the menu bar, skip redisplaying it. Just exit. */ 2202 of the menu bar, skip redisplaying it. Just exit. */
2161 2203
2204 /* Compare the new menu items with the ones computed last time. */
2162 for (i = 0; i < previous_menu_items_used; i++) 2205 for (i = 0; i < previous_menu_items_used; i++)
2163 if (menu_items_used == i 2206 if (menu_items_used == i
2164 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i]))) 2207 || (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i])))
2165 break; 2208 break;
2166 if (i == menu_items_used && i == previous_menu_items_used && i != 0) 2209 if (i == menu_items_used && i == previous_menu_items_used && i != 0)
2167 { 2210 {
2211 /* The menu items have not changed. Don't bother updating
2212 the menus in any form, since it would be a no-op. */
2168 free_menubar_widget_value_tree (first_wv); 2213 free_menubar_widget_value_tree (first_wv);
2169 discard_menu_items (); 2214 discard_menu_items ();
2170 2215 unbind_to (specpdl_count, Qnil);
2171 return; 2216 return;
2172 } 2217 }
2173 2218
2219 /* The menu items are different, so store them in the frame. */
2220 f->menu_bar_vector = menu_items;
2221 f->menu_bar_items_used = menu_items_used;
2222
2223 /* This calls restore_menu_items to restore menu_items, etc.,
2224 as they were outside. */
2225 unbind_to (specpdl_count, Qnil);
2226
2174 /* Now GC cannot happen during the lifetime of the widget_value, 2227 /* Now GC cannot happen during the lifetime of the widget_value,
2175 so it's safe to store data from a Lisp_String. */ 2228 so it's safe to store data from a Lisp_String. */
2176 wv = first_wv->contents; 2229 wv = first_wv->contents;
@@ -2185,9 +2238,6 @@ set_frame_menubar (f, first_time, deep_p)
2185 wv = wv->next; 2238 wv = wv->next;
2186 } 2239 }
2187 2240
2188 f->menu_bar_vector = menu_items;
2189 f->menu_bar_items_used = menu_items_used;
2190 discard_menu_items ();
2191 } 2241 }
2192 else 2242 else
2193 { 2243 {